From 21fd26ebd3e68ce98f2f1eb5041423f6c7182fdf Mon Sep 17 00:00:00 2001 From: davidhay Date: Fri, 6 Feb 2009 22:09:40 +0000 Subject: [PATCH] PinMAME --- Merging back in the PinMAME drivers is proposed every now and again, and since we've just added other non-video based things I figured that now might be a good time to look at it. This is likely to be a HUGE undertaking as PinMAME is based on old code, and is Macro-hell, I see it as a several step plan. 1) Convert all the PinMAME drivers to compile their ROM Loading with current versions of MAME 2) Clean up the ROM loading, removing the excessive Macros which really don't help readability at all IMO 3) Hook up the Machine Drivers again for each system, so that the CPU core runs again 4) Look at ways in which the artwork system can be used to simulate the display parts etc. (there is a scary amount of code in PinMAME for handling this stuff) 5) See how feasible it is to allow MAME to communicate with another program, as it's unlikely we'll be able to simulate the full table physics in MAME. I've updated the System11 rom loading to compile for now. The old PinMAME code which hasn't been updated is there #if 0'd out for reference for when a stab is made at hooking back up the actual CPUs to run etc. Part of me wonders if just rewriting it from scratch would be easier, but it would be a shame to throw away the information that was figured out in PinMAME. This was done by request, so I'm not especially bothered if it doesn't get included, PinMAME is rather hideous ;-) If anybody wants to help they're more than welcome. The other Williams systems should be easy to hook up the rom loading for because they share most of the Macros that have already been updated to compile. --- .gitattributes | 6 + src/mame/drivers/p_core.c | 1497 ++++++++++++++++++++++++++++++ src/mame/drivers/p_core.h | 511 ++++++++++ src/mame/drivers/p_s11.c | 1741 +++++++++++++++++++++++++++++++++++ src/mame/drivers/p_s11.h | 263 ++++++ src/mame/drivers/p_wmssnd.c | 1416 ++++++++++++++++++++++++++++ src/mame/drivers/p_wmssnd.h | 398 ++++++++ src/mame/mame.mak | 8 + src/mame/mamedriv.c | 82 +- 9 files changed, 5921 insertions(+), 1 deletion(-) create mode 100644 src/mame/drivers/p_core.c create mode 100644 src/mame/drivers/p_core.h create mode 100644 src/mame/drivers/p_s11.c create mode 100644 src/mame/drivers/p_s11.h create mode 100644 src/mame/drivers/p_wmssnd.c create mode 100644 src/mame/drivers/p_wmssnd.h diff --git a/.gitattributes b/.gitattributes index 9dacdcefa19..6a3aaa7dedd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1823,6 +1823,12 @@ src/mame/drivers/orbit.c svneol=native#text/plain src/mame/drivers/othldrby.c svneol=native#text/plain src/mame/drivers/othunder.c svneol=native#text/plain src/mame/drivers/overdriv.c svneol=native#text/plain +src/mame/drivers/p_core.c svneol=native#text/plain +src/mame/drivers/p_core.h svneol=native#text/plain +src/mame/drivers/p_s11.c svneol=native#text/plain +src/mame/drivers/p_s11.h svneol=native#text/plain +src/mame/drivers/p_wmssnd.c svneol=native#text/plain +src/mame/drivers/p_wmssnd.h svneol=native#text/plain src/mame/drivers/pachifev.c svneol=native#text/plain src/mame/drivers/pacland.c svneol=native#text/plain src/mame/drivers/pacman.c svneol=native#text/plain diff --git a/src/mame/drivers/p_core.c b/src/mame/drivers/p_core.c new file mode 100644 index 00000000000..306bfb56836 --- /dev/null +++ b/src/mame/drivers/p_core.c @@ -0,0 +1,1497 @@ +/************************************************************************************************ +************************************************************************************************* + Old PinMAME code below for reference ONLY +************************************************************************************************* +************************************************************************************************/ + +#if 0 +/***********************************************/ +/* PINMAME - Interface function (Input/Output) */ +/***********************************************/ +#include +#include "driver.h" +#include "sim.h" +#include "snd_cmd.h" +#include "mech.h" +#include "core.h" + +/* stuff to test VPINMAME */ +#if 0 +#define VPINMAME +int g_fHandleKeyboard = 1, g_fHandleMechanics = 1, g_fMechSamples = 1; +void OnSolenoid(int nSolenoid, int IsActive) {} +void OnStateChange(int nChange) {} +UINT64 vp_getSolMask64(void) { return -1; } +void vp_updateMech(void) {}; +int vp_getDip(int bank) { return 0; } +void vp_setDIP(int bank, int value) { } +#endif + +#ifdef VPINMAME + #include "vpintf.h" + extern int g_fPause; + extern int g_fHandleKeyboard, g_fHandleMechanics; + extern void OnSolenoid(int nSolenoid, int IsActive); + extern void OnStateChange(int nChange); +#else /* VPINMAME */ + #define g_fHandleKeyboard (TRUE) + #define g_fHandleMechanics (0xff) + #define OnSolenoid(nSolenoid, IsActive) + #define OnStateChange(nChange) + #define vp_getSolMask64() ((UINT64)(-1)) + #define vp_updateMech() + #define vp_setDIP(x,y) +#endif /* VPINMAME */ + +static void drawChar(struct mame_bitmap *bitmap, int row, int col, UINT32 bits, int type, int dimming); +static UINT32 core_initDisplaySize(const struct core_dispLayout *layout); +static VIDEO_UPDATE(core_status); + +/*--------------------------- +/ Global variables +/----------------------------*/ +tPMoptions pmoptions; /* PinMAME specific options */ +core_tGlobals coreGlobals; +struct pinMachine *coreData; +const core_tGameData *core_gameData = NULL; /* data about the running game */ + +/*--------------------- +/ Global constants +/----------------------*/ +const int core_bcd2seg7[16] = { +/* 0 1 2 3 4 5 6 7 8 9 */ + 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f +#ifdef MAME_DEBUG +/* A B C D E */ + ,0x77,0x7c,0x39,0x5e,0x79 +#endif /* MAME_DEBUG */ +}; +// including the 0x0a to 0x0e characters of a SN5446A type BCD-to-7-segment encoder +const int core_bcd2seg7e[16] = { +/* 0 1 2 3 4 5 6 7 8 9 */ + 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f, +/* A B C D E */ + 0x58,0x4c,0x62,0x69,0x78 +}; +// missing top line for 6 and bottom line for 9 numbers (e.g. Atari) +const int core_bcd2seg7a[16] = { +/* 0 1 2 3 4 5 6 7 8 9 */ + 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67 +#ifdef MAME_DEBUG +/* A B C D E */ + ,0x77,0x7c,0x39,0x5e,0x79 +#endif /* MAME_DEBUG */ +}; +const int core_bcd2seg9[16] = { +/* 0 1 2 3 4 5 6 7 8 9 */ + 0x3f,0x100,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f +#ifdef MAME_DEBUG +/* A B C D E */ + ,0x77,0x7c,0x39,0x5e,0x79 +#endif /* MAME_DEBUG */ +}; +// missing top line for 6 and bottom line for 9 numbers, and including the 0x0a to 0x0e characters (e.g. Gottlieb Sys80/a) +const int core_bcd2seg9a[16] = { +/* 0 1 2 3 4 5 6 7 8 9 */ + 0x3f,0x100,0x5b,0x4f,0x66,0x6d,0x7c,0x07,0x7f,0x67, +/* A B C D E */ + 0x58,0x4c,0x62,0x69,0x78 +}; + +/* makes it easier to swap bits */ + // 0 1 2 3 4 5 6 7 8 9 10,11,12,13,14,15 +const UINT8 core_swapNyb[16] = { 0, 8, 4,12, 2,10, 6,14, 1, 9, 5,13, 3,11, 7,15}; +/* Palette */ + +static const unsigned char core_palette[48+COL_COUNT][3] = { +{/* 0 */ 0x00,0x00,0x00}, /* Background */ +/* -- DMD DOT COLORS-- */ +{/* 1 */ 0x30,0x00,0x00}, /* "Black" Dot - DMD Background */ +{/* 2 */ 0x00,0x00,0x00}, /* Intensity 33% - Filled in @ Run Time */ +{/* 3 */ 0x00,0x00,0x00}, /* Intensity 66% - Filled in @ Run Time */ +{/* 4 */ 0xff,0xe0,0x20}, /* Intensity 100% - Changed @ Run Time to match config vars*/ +/* -- PLAYFIELD LAMP COLORS -- */ +{/* 5 */ 0x00,0x00,0x00}, /* Black */ +{/* 6 */ 0xff,0xff,0xff}, /* White */ +{/* 7 */ 0x40,0xff,0x00}, /* green */ +{/* 8 */ 0xff,0x00,0x00}, /* Red */ +{/* 9 */ 0xff,0x80,0x00}, /* orange */ +{/* 10 */ 0xff,0xff,0x00}, /* yellow */ +{/* 11 */ 0x00,0x80,0xff}, /* lblue */ +{/* 12 */ 0x9f,0x40,0xff} /* lpurple*/ +}; + +/*------------------------------ +/ Display segment drawing data +/------------------------------*/ +typedef UINT32 tSegRow[17]; +typedef struct { int rows, cols; tSegRow *segs; } tSegData; + +static tSegRow segSize1C[5][20] = { /* with commas */ +{ /* alphanumeric display characters */ +/* all 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 0400 0800 1000 2000 4000 8000 */ +/* 11111111111 */{0x00555554,0x00555554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1133331333311 */{0x017fdff5,0x003fcff0,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00400000,0x00001000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 11 1 1 1 */{0x01401011,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00400000,0x00001000,0x00000010,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 31 1 31 1 31 */{0x0d10d04d,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x0d000000,0x00000000,0x00000000,0x00100000,0x0000d000,0x00000040,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 32 1 32 1 32 */{0x0e10e04e,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x0e000000,0x00000000,0x00000000,0x00100000,0x0000e000,0x00000040,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 22 1 22 1 22 */{0x0a04a10a,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x0a000000,0x00000000,0x00000000,0x00040000,0x0000a000,0x00000100,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 23 1 231 23 */{0x0b04b40b,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x0b000000,0x00000000,0x00000000,0x00040000,0x0000b000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 13 1131 13 */{0x07017407,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x07000000,0x00000000,0x00000000,0x00010000,0x00007000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333311133331 */{0x07fd5ff4,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x04000000,0x03fc0000,0x00000000,0x00010000,0x00004000,0x00001000,0x00000ff0,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 3111113111113 */{0x0d55d55c,0x00000000,0x0000000c,0x0000000c,0x00000000,0x0c000000,0x0c000000,0x0155c000,0x00000000,0x0000c000,0x0000c000,0x0000c000,0x0000d550,0x0000c000,0x0000c000,0x0000c000,0x00000000}, +/* 1333311133331 */{0x07fd5ff4,0x00000000,0x00000000,0x00000004,0x00000000,0x04000000,0x00000000,0x03fc0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000ff0,0x00001000,0x00004000,0x00010000,0x00000000}, +/* 31 1311 31 */{0x34075034,0x00000000,0x00000000,0x00000034,0x00000000,0x34000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00001000,0x00034000,0x00040000,0x00000000}, +/* 32 132 1 32 */{0x38078438,0x00000000,0x00000000,0x00000038,0x00000000,0x38000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00038000,0x00040000,0x00000000}, +/* 22 1 22 1 22 */{0x28128428,0x00000000,0x00000000,0x00000028,0x00000000,0x28000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00028000,0x00100000,0x00000000}, +/* 23 1 23 1 23 */{0x2c42c12c,0x00000000,0x00000000,0x0000002c,0x00000000,0x2c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100,0x0002c000,0x00400000,0x00000000}, +/* 13 1 13 1 13 */{0x1c41c11c,0x00000000,0x00000000,0x0000001c,0x00000000,0x1c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100,0x0001c000,0x00400000,0x00000000}, +/* 1 1 1 11 */{0x11010050,0x00000000,0x00000000,0x00000010,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000040,0x00010000,0x01000000,0x00000000}, +/* 113333133331132 */{0x17fdff5e,0x00000000,0x00000000,0x00000010,0x03fcff00,0x10000000,0x00000000,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x00000000,0x00000040,0x00010000,0x04000000,0x0000000e}, +/* 11111111111 31 */{0x0555554d,0x00000000,0x00000000,0x00000000,0x05555540,0x00000000,0x00000000,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000000d}, +/* 1 */{0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +},{ /* 8 segment LED characters */ +/* 11111111111 */{0x00555554,0x00555554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333333333331 */{0x01fffffd,0x00fffffc,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000}, +/* 1 1 */{0x01000001,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000}, +/* 31 31 */{0x0d00000d,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x0d000000,0x00000000,0x00000000}, +/* 32 32 */{0x0e00000e,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x0e000000,0x00000000,0x00000000}, +/* 22 22 */{0x0a00000a,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x0a000000,0x00000000,0x00000000}, +/* 23 23 */{0x0b00000b,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x0b000000,0x00000000,0x00000000}, +/* 13 13 */{0x07000007,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x07000000,0x00000000,0x00000000}, +/* 1333333333331 */{0x07fffff4,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x04000000,0x03fffff0,0x00000000}, +/* 3111111111113 */{0x0d55555c,0x00000000,0x0000000c,0x0000000c,0x00000000,0x0c000000,0x0c000000,0x0d55555c,0x00000000}, +/* 1333333333331 */{0x07fffff4,0x00000000,0x00000000,0x00000004,0x00000000,0x04000000,0x00000000,0x03fffff0,0x00000000}, +/* 31 31 */{0x34000034,0x00000000,0x00000000,0x00000034,0x00000000,0x34000000,0x00000000,0x00000000,0x00000000}, +/* 32 32 */{0x38000038,0x00000000,0x00000000,0x00000038,0x00000000,0x38000000,0x00000000,0x00000000,0x00000000}, +/* 22 22 */{0x28000028,0x00000000,0x00000000,0x00000028,0x00000000,0x28000000,0x00000000,0x00000000,0x00000000}, +/* 23 23 */{0x2c00002c,0x00000000,0x00000000,0x0000002c,0x00000000,0x2c000000,0x00000000,0x00000000,0x00000000}, +/* 13 13 */{0x1c00001c,0x00000000,0x00000000,0x0000001c,0x00000000,0x1c000000,0x00000000,0x00000000,0x00000000}, +/* 1 1 */{0x10000010,0x00000000,0x00000000,0x00000010,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* 133333333333132 */{0x1fffffde,0x00000000,0x00000000,0x00000010,0x0fffffc0,0x10000000,0x00000000,0x00000000,0x0000000e}, +/* 11111111111 31 */{0x0555554d,0x00000000,0x00000000,0x00000000,0x05555540,0x00000000,0x00000000,0x00000000,0x0000000d}, +/* 1 */{0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000004} +},{ /* 10 segment LED characters */ +/* 11111111111 */{0x00555554,0x00555554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333331333331 */{0x01ffdffd,0x00ffcffc,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00001000,0x00000000}, +/* 1 1 1 */{0x01001001,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00001000,0x00000000}, +/* 31 31 31 */{0x0d00d00d,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x0d000000,0x00000000,0x00000000,0x0000d000,0x00000000}, +/* 32 32 32 */{0x0e00e00e,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x0e000000,0x00000000,0x00000000,0x0000e000,0x00000000}, +/* 22 22 22 */{0x0a00a00a,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x0a000000,0x00000000,0x00000000,0x0000a000,0x00000000}, +/* 23 23 23 */{0x0b00b00b,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x0b000000,0x00000000,0x00000000,0x0000b000,0x00000000}, +/* 13 13 13 */{0x07007007,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x07000000,0x00000000,0x00000000,0x00007000,0x00000000}, +/* 1333331333331 */{0x07ff7ff4,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x04000000,0x03ff3ff0,0x00000000,0x00004000,0x00000000}, +/* 3111111111113 */{0x0d55555c,0x00000000,0x0000000c,0x0000000c,0x00000000,0x0c000000,0x0c000000,0x0d55555c,0x00000000,0x0000c000,0x0000c000}, +/* 1333331333331 */{0x07ff7ff4,0x00000000,0x00000000,0x00000004,0x00000000,0x04000000,0x00000000,0x03ff3ff0,0x00000000,0x00000000,0x00004000}, +/* 31 31 31 */{0x34034034,0x00000000,0x00000000,0x00000034,0x00000000,0x34000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00034000}, +/* 32 32 32 */{0x38038038,0x00000000,0x00000000,0x00000038,0x00000000,0x38000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00038000}, +/* 22 22 22 */{0x28028028,0x00000000,0x00000000,0x00000028,0x00000000,0x28000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00028000}, +/* 23 23 23 */{0x2c02c02c,0x00000000,0x00000000,0x0000002c,0x00000000,0x2c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0002c000}, +/* 13 13 13 */{0x1c01c01c,0x00000000,0x00000000,0x0000001c,0x00000000,0x1c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0001c000}, +/* 1 1 1 */{0x10010010,0x00000000,0x00000000,0x00000010,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000}, +/* 133333133333132 */{0x1ffdffde,0x00000000,0x00000000,0x00000010,0x0ffcffc0,0x10000000,0x00000000,0x00000000,0x0000000e,0x00000000,0x00010000}, +/* 11111111111 31 */{0x0555554d,0x00000000,0x00000000,0x00000000,0x05555540,0x00000000,0x00000000,0x00000000,0x0000000d,0x00000000,0x00000000}, +/* 1 */{0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000004,0x00000000,0x00000000} +},{ /* alphanumeric display characters (reversed comma with period) */ +/* 11111111111 */{0x00555554,0x00555554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1133331333311 */{0x017fdff5,0x003fcff0,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00400000,0x00001000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 11 1 1 1 */{0x01401011,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00400000,0x00001000,0x00000010,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 31 1 31 1 31 */{0x0d10d04d,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x0d000000,0x00000000,0x00000000,0x00100000,0x0000d000,0x00000040,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 32 1 32 1 32 */{0x0e10e04e,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x0e000000,0x00000000,0x00000000,0x00100000,0x0000e000,0x00000040,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 22 1 22 1 22 */{0x0a04a10a,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x0a000000,0x00000000,0x00000000,0x00040000,0x0000a000,0x00000100,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 23 1 231 23 */{0x0b04b40b,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x0b000000,0x00000000,0x00000000,0x00040000,0x0000b000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 13 1131 13 */{0x07017407,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x07000000,0x00000000,0x00000000,0x00010000,0x00007000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333311133331 */{0x07fd5ff4,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x04000000,0x03fc0000,0x00000000,0x00010000,0x00004000,0x00001000,0x00000ff0,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 3111113111113 */{0x0d55d55c,0x00000000,0x0000000c,0x0000000c,0x00000000,0x0c000000,0x0c000000,0x0155c000,0x00000000,0x0000c000,0x0000c000,0x0000c000,0x0000d550,0x0000c000,0x0000c000,0x0000c000,0x00000000}, +/* 1333311133331 */{0x07fd5ff4,0x00000000,0x00000000,0x00000004,0x00000000,0x04000000,0x00000000,0x03fc0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000ff0,0x00001000,0x00004000,0x00010000,0x00000000}, +/* 31 1311 31 */{0x34075034,0x00000000,0x00000000,0x00000034,0x00000000,0x34000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00001000,0x00034000,0x00040000,0x00000000}, +/* 32 132 1 32 */{0x38078438,0x00000000,0x00000000,0x00000038,0x00000000,0x38000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00038000,0x00040000,0x00000000}, +/* 22 1 22 1 22 */{0x28128428,0x00000000,0x00000000,0x00000028,0x00000000,0x28000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00028000,0x00100000,0x00000000}, +/* 23 1 23 1 23 */{0x2c42c12c,0x00000000,0x00000000,0x0000002c,0x00000000,0x2c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100,0x0002c000,0x00400000,0x00000000}, +/* 13 1 13 1 13 */{0x1c41c11c,0x00000000,0x00000000,0x0000001c,0x00000000,0x1c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100,0x0001c000,0x00400000,0x00000000}, +/* 1 1 1 11 */{0x11010050,0x00000000,0x00000000,0x00000010,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000040,0x00010000,0x01000000,0x00000000}, +/* 113333133331132 */{0x17fdff5e,0x00000000,0x00000000,0x00000010,0x03fcff00,0x10000000,0x00000000,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x00000000,0x00000040,0x00010000,0x04000000,0x0000000e}, +/* 11111111111 31 */{0x0555554d,0x00000000,0x00000000,0x00000000,0x05555540,0x00000000,0x00000000,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0000000d}, +/* 1 */{0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000004} +},{ /* 8 segment LED characters with dots instead of commas */ +/* 11111111111 */{0x00555554,0x00555554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333333333331 */{0x01fffffd,0x00fffffc,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000}, +/* 1 1 */{0x01000001,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000}, +/* 31 31 */{0x0d00000d,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x0d000000,0x00000000,0x00000000}, +/* 32 32 */{0x0e00000e,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x0e000000,0x00000000,0x00000000}, +/* 22 22 */{0x0a00000a,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x0a000000,0x00000000,0x00000000}, +/* 23 23 */{0x0b00000b,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x0b000000,0x00000000,0x00000000}, +/* 13 13 */{0x07000007,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x07000000,0x00000000,0x00000000}, +/* 1333333333331 */{0x07fffff4,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x04000000,0x03fffff0,0x00000000}, +/* 3111111111113 */{0x0d55555c,0x00000000,0x0000000c,0x0000000c,0x00000000,0x0c000000,0x0c000000,0x0d55555c,0x00000000}, +/* 1333333333331 */{0x07fffff4,0x00000000,0x00000000,0x00000004,0x00000000,0x04000000,0x00000000,0x03fffff0,0x00000000}, +/* 31 31 */{0x34000034,0x00000000,0x00000000,0x00000034,0x00000000,0x34000000,0x00000000,0x00000000,0x00000000}, +/* 32 32 */{0x38000038,0x00000000,0x00000000,0x00000038,0x00000000,0x38000000,0x00000000,0x00000000,0x00000000}, +/* 22 22 */{0x28000028,0x00000000,0x00000000,0x00000028,0x00000000,0x28000000,0x00000000,0x00000000,0x00000000}, +/* 23 23 */{0x2c00002c,0x00000000,0x00000000,0x0000002c,0x00000000,0x2c000000,0x00000000,0x00000000,0x00000000}, +/* 13 13 */{0x1c00001c,0x00000000,0x00000000,0x0000001c,0x00000000,0x1c000000,0x00000000,0x00000000,0x00000000}, +/* 1 1 */{0x10000010,0x00000000,0x00000000,0x00000010,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* 133333333333132 */{0x1fffffde,0x00000000,0x00000000,0x00000010,0x0fffffc0,0x10000000,0x00000000,0x00000000,0x0000000e}, +/* 11111111111 31 */{0x0555554d,0x00000000,0x00000000,0x00000000,0x05555540,0x00000000,0x00000000,0x00000000,0x0000000d}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +}}; +static tSegRow segSize1[3][20] = { /* without commas */ +{ /* alphanumeric display characters */ +/* all 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 0400 0800 1000 2000 4000 */ +/* 11111111111 */{0x00555554,0x00555554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1133331333311 */{0x017fdff5,0x003fcff0,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00400000,0x00001000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 11 1 1 1 */{0x01401011,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00400000,0x00001000,0x00000010,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 31 1 31 1 31 */{0x0d10d04d,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x0d000000,0x00000000,0x00000000,0x00100000,0x0000d000,0x00000040,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 32 1 32 1 32 */{0x0e10e04e,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x0e000000,0x00000000,0x00000000,0x00100000,0x0000e000,0x00000040,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 22 1 22 1 22 */{0x0a04a10a,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x0a000000,0x00000000,0x00000000,0x00040000,0x0000a000,0x00000100,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 23 1 231 23 */{0x0b04b40b,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x0b000000,0x00000000,0x00000000,0x00040000,0x0000b000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 13 1131 13 */{0x07017407,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x07000000,0x00000000,0x00000000,0x00010000,0x00007000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333311133331 */{0x07fd5ff4,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x04000000,0x03fc0000,0x00000000,0x00010000,0x00004000,0x00001000,0x00000ff0,0x00000000,0x00000000,0x00000000}, +/* 3111113111113 */{0x0d55d55c,0x00000000,0x0000000c,0x0000000c,0x00000000,0x0c000000,0x0c000000,0x0155c000,0x00000000,0x0000c000,0x0000c000,0x0000c000,0x0000d550,0x0000c000,0x0000c000,0x0000c000}, +/* 1333311133331 */{0x07fd5ff4,0x00000000,0x00000000,0x00000004,0x00000000,0x04000000,0x00000000,0x03fc0000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000ff0,0x00001000,0x00004000,0x00010000}, +/* 31 1311 31 */{0x34075034,0x00000000,0x00000000,0x00000034,0x00000000,0x34000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00001000,0x00034000,0x00040000}, +/* 32 132 1 32 */{0x38078438,0x00000000,0x00000000,0x00000038,0x00000000,0x38000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00038000,0x00040000}, +/* 22 1 22 1 22 */{0x28128428,0x00000000,0x00000000,0x00000028,0x00000000,0x28000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00028000,0x00100000}, +/* 23 1 23 1 23 */{0x2c42c12c,0x00000000,0x00000000,0x0000002c,0x00000000,0x2c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100,0x0002c000,0x00400000}, +/* 13 1 13 1 13 */{0x1c41c11c,0x00000000,0x00000000,0x0000001c,0x00000000,0x1c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100,0x0001c000,0x00400000}, +/* 1 1 1 11 */{0x11010050,0x00000000,0x00000000,0x00000010,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000040,0x00010000,0x01000000}, +/* 1133331333311 */{0x17fdff50,0x00000000,0x00000000,0x00000010,0x03fcff00,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000040,0x00010000,0x04000000}, +/* 11111111111 */{0x05555540,0x00000000,0x00000000,0x00000000,0x05555540,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +},{ /* 7 segment LED characters */ +/* 11111111111 */{0x00555554,0x00555554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333333333331 */{0x01fffffd,0x00fffffc,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000}, +/* 1 1 */{0x01000001,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000}, +/* 31 31 */{0x0d00000d,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x0d000000,0x00000000}, +/* 32 32 */{0x0e00000e,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x0e000000,0x00000000}, +/* 22 22 */{0x0a00000a,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x0a000000,0x00000000}, +/* 23 23 */{0x0b00000b,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x0b000000,0x00000000}, +/* 13 13 */{0x07000007,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x07000000,0x00000000}, +/* 1333333333331 */{0x07fffff4,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x04000000,0x03fffff0}, +/* 3111111111113 */{0x0d55555c,0x00000000,0x0000000c,0x0000000c,0x00000000,0x0c000000,0x0c000000,0x0d55555c}, +/* 1333333333331 */{0x07fffff4,0x00000000,0x00000000,0x00000004,0x00000000,0x04000000,0x00000000,0x03fffff0}, +/* 31 31 */{0x34000034,0x00000000,0x00000000,0x00000034,0x00000000,0x34000000,0x00000000,0x00000000}, +/* 32 32 */{0x38000038,0x00000000,0x00000000,0x00000038,0x00000000,0x38000000,0x00000000,0x00000000}, +/* 22 22 */{0x28000028,0x00000000,0x00000000,0x00000028,0x00000000,0x28000000,0x00000000,0x00000000}, +/* 23 23 */{0x2c00002c,0x00000000,0x00000000,0x0000002c,0x00000000,0x2c000000,0x00000000,0x00000000}, +/* 13 13 */{0x1c00001c,0x00000000,0x00000000,0x0000001c,0x00000000,0x1c000000,0x00000000,0x00000000}, +/* 1 1 */{0x10000010,0x00000000,0x00000000,0x00000010,0x00000000,0x10000000,0x00000000,0x00000000}, +/* 1333333333331 */{0x1fffffd0,0x00000000,0x00000000,0x00000010,0x0fffffc0,0x10000000,0x00000000,0x00000000}, +/* 11111111111 */{0x05555540,0x00000000,0x00000000,0x00000000,0x05555540,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +},{ /* 9 segment LED characters */ +/* 11111111111 */{0x00555554,0x00555554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333331333331 */{0x01ffdffd,0x00ffcffc,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00001000,0x00000000}, +/* 1 1 1 */{0x01001001,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x01000000,0x00000000,0x00000000,0x00001000,0x00000000}, +/* 31 31 31 */{0x0d00d00d,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x0d000000,0x00000000,0x00000000,0x0000d000,0x00000000}, +/* 32 32 32 */{0x0e00e00e,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x0e000000,0x00000000,0x00000000,0x0000e000,0x00000000}, +/* 22 22 22 */{0x0a00a00a,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x0a000000,0x00000000,0x00000000,0x0000a000,0x00000000}, +/* 23 23 23 */{0x0b00b00b,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x0b000000,0x00000000,0x00000000,0x0000b000,0x00000000}, +/* 13 13 13 */{0x07007007,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x07000000,0x00000000,0x00000000,0x00007000,0x00000000}, +/* 1333331333331 */{0x07ff7ff4,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x04000000,0x03ff3ff0,0x00000000,0x00004000,0x00000000}, +/* 3111111111113 */{0x0d55555c,0x00000000,0x0000000c,0x0000000c,0x00000000,0x0c000000,0x0c000000,0x0d55555c,0x00000000,0x0000c000,0x0000c000}, +/* 1333331333331 */{0x07ff7ff4,0x00000000,0x00000000,0x00000004,0x00000000,0x04000000,0x00000000,0x03ff3ff0,0x00000000,0x00000000,0x00004000}, +/* 31 31 31 */{0x34034034,0x00000000,0x00000000,0x00000034,0x00000000,0x34000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00034000}, +/* 32 32 32 */{0x38038038,0x00000000,0x00000000,0x00000038,0x00000000,0x38000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00038000}, +/* 22 22 22 */{0x28028028,0x00000000,0x00000000,0x00000028,0x00000000,0x28000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00028000}, +/* 23 23 23 */{0x2c02c02c,0x00000000,0x00000000,0x0000002c,0x00000000,0x2c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0002c000}, +/* 13 13 13 */{0x1c01c01c,0x00000000,0x00000000,0x0000001c,0x00000000,0x1c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0001c000}, +/* 1 1 1 */{0x10010010,0x00000000,0x00000000,0x00000010,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000}, +/* 1333331333331 */{0x1ffdffd0,0x00000000,0x00000000,0x00000010,0x0ffcffc0,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000}, +/* 11111111111 */{0x05555540,0x00000000,0x00000000,0x00000000,0x05555540,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +}}; +static tSegRow segSize2C[5][12] = { /* with commas */ +{ /* alphanumeric display characters */ +/* all 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 0400 0800 1000 2000 4000 8000 */ +/* xxxxxxx */{0x05554000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* xx x xx */{0x14105000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x04000000,0x00100000,0x00004000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00100000,0x00010000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00100000,0x00010000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x xxx x */{0x10541000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00400000,0x00100000,0x00040000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* xxx xxx */{0x05454000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00054000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x xxx x */{0x10541000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00040000,0x00100000,0x00400000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x00100000,0x01000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x00100000,0x01000000,0x00000000}, +/* xx x xx x */{0x14105100,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000100,0x00000000,0x00000000,0x00000000,0x00000000,0x00004000,0x00100000,0x04000000,0x00000000}, +/* xxxxxxx x */{0x05554100,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000100,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100}, +/* x */{0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +},{ /* 8 segment LED characters */ +/* xxxxxxx */{0x05554000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* xxxxxxx */{0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x10001100,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000100}, +/* xxxxxxx x */{0x05554100,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000100}, +/* x */{0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400} +},{ /* 10 segment LED characters */ +/* xxxxxxx */{0x05554000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00100000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00100000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00100000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00100000,0x00000000}, +/* xxxxxxx */{0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00100000}, +/* x x x */{0x10101000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00100000}, +/* x x x */{0x10101000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00100000}, +/* x x x x */{0x10101100,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000100,0x00000000,0x00100000}, +/* xxxxxxx x */{0x05554100,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000100,0x00000000,0x00000000}, +/* x */{0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00000000,0x00000000} +},{ /* alphanumeric display characters (reversed comma with period) */ +/* xxxxxxx */{0x05554000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* xx x xx */{0x14105000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x04000000,0x00100000,0x00004000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00100000,0x00010000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00100000,0x00010000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x xxx x */{0x10541000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00400000,0x00100000,0x00040000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* xxx xxx */{0x05454000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00054000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x xxx x */{0x10541000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00040000,0x00100000,0x00400000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x00100000,0x01000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x00100000,0x01000000,0x00000000}, +/* xx x xx x */{0x14105100,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00004000,0x00100000,0x04000000,0x00000100}, +/* xxxxxxx x */{0x05554100,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000100,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100}, +/* x */{0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400} +},{ /* 8 segment LED characters with dots instead of commas */ +/* xxxxxxx */{0x05554000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* xxxxxxx */{0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* xxxxxxx x */{0x05554100,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000100}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +}}; +static tSegRow segSize2[3][12] = { /* without commas */ +{ /* alphanumeric display characters */ +/* all 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 0400 0800 1000 2000 4000 8000 */ +/* xxxxxxx */{0x05554000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* xx x xx */{0x14105000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x04000000,0x00100000,0x00004000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00100000,0x00010000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00100000,0x00010000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x xxx x */{0x10541000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00400000,0x00100000,0x00040000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* xxx xxx */{0x05454000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00054000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x xxx x */{0x10541000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00040000,0x00100000,0x00400000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x00100000,0x01000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x00100000,0x01000000,0x00000000}, +/* xx x xx */{0x14105000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00004000,0x00100000,0x04000000,0x00000000}, +/* xxxxxxx */{0x05554000,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +},{ /* 7 segment LED characters */ +/* xxxxxxx */{0x05554000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000}, +/* xxxxxxx */{0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05554000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10001000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* xxxxxxx */{0x05554000,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +},{ /* 9 segment LED characters */ +/* xxxxxxx */{0x05554000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00100000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00100000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00100000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00100000,0x00000000}, +/* xxxxxxx */{0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x10101000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00100000}, +/* x x x */{0x10101000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00100000}, +/* x x x */{0x10101000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00100000}, +/* x x x */{0x10101000,0x00000000,0x00000000,0x00001000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00100000}, +/* xxxxxxx */{0x05554000,0x00000000,0x00000000,0x00000000,0x05554000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +}}; +static tSegRow segSize3C[3][8] = { +{ /* alphanumeric display characters */ +{0} /* not possible */ +},{ /* 8 segment LED characters with commas */ +/* all 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 */ +/* xxx */{0x05400000,0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10100000,0x00000000,0x00100000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10100000,0x00000000,0x00100000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* xxx */{0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000}, +/* x x */{0x10100000,0x00000000,0x00000000,0x00100000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10100000,0x00000000,0x00000000,0x00100000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000}, +/* xxx x */{0x05410000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000,0x00010000}, +/* x */{0x00040000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00040000} +},{ /* 10 segment LED characters with commas */ +/* xxx */{0x05400000,0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x11100000,0x00000000,0x00100000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00000000}, +/* x x x */{0x11100000,0x00000000,0x00100000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00000000}, +/* xxx */{0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x11100000,0x00000000,0x00000000,0x00100000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x01000000}, +/* x x x */{0x11100000,0x00000000,0x00000000,0x00100000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x01000000}, +/* xxx x */{0x05410000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000,0x00010000,0x00000000,0x00000000}, +/* x */{0x00040000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00040000,0x00000000,0x00000000} +}}; +static tSegRow segSize3[3][8] = { +{ /* alphanumeric display characters */ +{0} /* not possible */ +},{ /* 8 segment LED characters without commas */ +/* all 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 */ +/* xxx */{0x05400000,0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x */{0x10100000,0x00000000,0x00100000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000}, +/* x x */{0x10100000,0x00000000,0x00100000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000}, +/* xxx */{0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05400000}, +/* x x */{0x10100000,0x00000000,0x00000000,0x00100000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* x x */{0x10100000,0x00000000,0x00000000,0x00100000,0x00000000,0x10000000,0x00000000,0x00000000}, +/* xxx */{0x05400000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +},{ /* 10 segment LED characters without commas */ +/* xxx */{0x05400000,0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x11100000,0x00000000,0x00100000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00000000}, +/* x x x */{0x11100000,0x00000000,0x00100000,0x00000000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x01000000,0x00000000}, +/* xxx */{0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000}, +/* x x x */{0x11100000,0x00000000,0x00000000,0x00100000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x01000000}, +/* x x x */{0x11100000,0x00000000,0x00000000,0x00100000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x01000000}, +/* xxx */{0x05400000,0x00000000,0x00000000,0x00000000,0x05400000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +}}; +static tSegRow segSize1S[1][20] = { /* 16 segment displays without commas but split top & bottom lines */ +{ /* alphanumeric display characters */ +/* all 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 0400 0800 1000 2000 4000 8000 */ +/* 11111311111 */{0x00557554,0x00557000,0x00003554,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1133331333311 */{0x017fdff5,0x003fc000,0x00003ff0,0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x01000000,0x00400000,0x00001000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 11 1 1 1 */{0x01401011,0x00000000,0x00000000,0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x01000000,0x00400000,0x00001000,0x00000010,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 31 1 31 1 31 */{0x0d10d04d,0x00000000,0x00000000,0x0000000d,0x00000000,0x00000000,0x00000000,0x00000000,0x0d000000,0x00100000,0x0000d000,0x00000040,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 32 1 32 1 32 */{0x0e10e04e,0x00000000,0x00000000,0x0000000e,0x00000000,0x00000000,0x00000000,0x00000000,0x0e000000,0x00100000,0x0000e000,0x00000040,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 22 1 22 1 22 */{0x0a04a10a,0x00000000,0x00000000,0x0000000a,0x00000000,0x00000000,0x00000000,0x00000000,0x0a000000,0x00040000,0x0000a000,0x00000100,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 23 1 231 23 */{0x0b04b40b,0x00000000,0x00000000,0x0000000b,0x00000000,0x00000000,0x00000000,0x00000000,0x0b000000,0x00040000,0x0000b000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 13 1131 13 */{0x07017407,0x00000000,0x00000000,0x00000007,0x00000000,0x00000000,0x00000000,0x00000000,0x07000000,0x00010000,0x00007000,0x00000400,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* 1333311133331 */{0x07fd5ff4,0x00000000,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x04000000,0x00010000,0x00004000,0x00001000,0x00000ff0,0x00000000,0x00000000,0x00000000,0x03fc0000}, +/* 3111113111113 */{0x0d55d55c,0x00000000,0x00000000,0x0000000c,0x0000000c,0x00000000,0x00000000,0x0c000000,0x0c000000,0x0000c000,0x0000c000,0x0000c000,0x0000d550,0x0000c000,0x0000c000,0x0000c000,0x0155c000}, +/* 1333311133331 */{0x07fd5ff4,0x00000000,0x00000000,0x00000000,0x00000004,0x00000000,0x00000000,0x04000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000ff0,0x00001000,0x00004000,0x00010000,0x03fc0000}, +/* 31 1311 31 */{0x34075034,0x00000000,0x00000000,0x00000000,0x00000034,0x00000000,0x00000000,0x34000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00001000,0x00034000,0x00040000,0x00000000}, +/* 32 132 1 32 */{0x38078438,0x00000000,0x00000000,0x00000000,0x00000038,0x00000000,0x00000000,0x38000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00038000,0x00040000,0x00000000}, +/* 22 1 22 1 22 */{0x28128428,0x00000000,0x00000000,0x00000000,0x00000028,0x00000000,0x00000000,0x28000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000400,0x00028000,0x00100000,0x00000000}, +/* 23 1 23 1 23 */{0x2c42c12c,0x00000000,0x00000000,0x00000000,0x0000002c,0x00000000,0x00000000,0x2c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100,0x0002c000,0x00400000,0x00000000}, +/* 13 1 13 1 13 */{0x1c41c11c,0x00000000,0x00000000,0x00000000,0x0000001c,0x00000000,0x00000000,0x1c000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000100,0x0001c000,0x00400000,0x00000000}, +/* 1 1 1 11 */{0x11010050,0x00000000,0x00000000,0x00000000,0x00000010,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000040,0x00010000,0x01000000,0x00000000}, +/* 1133331333311 */{0x17fdff50,0x00000000,0x00000000,0x00000000,0x00000010,0x0003ff00,0x03fc0000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000040,0x00010000,0x04000000,0x00000000}, +/* 11111311111 */{0x05575540,0x00000000,0x00000000,0x00000000,0x00000000,0x00035540,0x05570000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +}}; +static tSegRow segSize2S[1][12] = { /* 16 segment displays without commas but split top & bottom lines */ +{ /* alphanumeric display characters */ +/* all 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 0400 0800 1000 2000 4000 8000 */ +/* xxxxxxx */{0x05754000,0x05700000,0x00354000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* xx x xx */{0x14105000,0x00000000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x00000000,0x10000000,0x04000000,0x00100000,0x00004000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x00000000,0x10000000,0x01000000,0x00100000,0x00010000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x00000000,0x10000000,0x01000000,0x00100000,0x00010000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* x xxx x */{0x10541000,0x00000000,0x00000000,0x00001000,0x00000000,0x00000000,0x00000000,0x00000000,0x10000000,0x00400000,0x00100000,0x00040000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* xxx xxx */{0x05454000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00054000,0x00000000,0x00000000,0x00000000,0x05400000}, +/* x xxx x */{0x10541000,0x00000000,0x00000000,0x00000000,0x00001000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00040000,0x00100000,0x00400000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00000000,0x00001000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x00100000,0x01000000,0x00000000}, +/* x x x x x */{0x11111000,0x00000000,0x00000000,0x00000000,0x00001000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00010000,0x00100000,0x01000000,0x00000000}, +/* xx x xx */{0x14105000,0x00000000,0x00000000,0x00000000,0x00001000,0x00000000,0x00000000,0x10000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00004000,0x00100000,0x04000000,0x00000000}, +/* xxxxxxx */{0x05754000,0x00000000,0x00000000,0x00000000,0x00000000,0x00354000,0x05700000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000}, +/* */{0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000} +}}; + +static tSegData segData[2][16] = {{ + {20,15,&segSize1C[0][0]},/* SEG16 */ + {20,15,&segSize1C[3][0]},/* SEG16R*/ + {20,15,&segSize1C[2][0]},/* SEG10 */ + {20,15,&segSize1[2][0]}, /* SEG9 */ + {20,15,&segSize1C[1][0]},/* SEG8 */ + {20,15,&segSize1C[4][0]},/* SEG8FD */ + {20,15,&segSize1[1][0]}, /* SEG7 */ + {20,15,&segSize1C[1][0]},/* SEG87 */ + {20,15,&segSize1C[1][0]},/* SEG87F */ + {20,15,&segSize1C[2][0]},/* SEG98 */ + {20,15,&segSize1C[2][0]},/* SEG98F */ + {12,11,&segSize2[1][0]}, /* SEG7S */ + {12,11,&segSize2C[1][0]},/* SEG7SC */ + {20,15,&segSize1S[0][0]},/* SEG16S */ + { 2, 2,NULL}, /* DMD */ + { 1, 1,NULL} /* VIDEO */ +},{ + {12,11,&segSize2C[0][0]},/* SEG16 */ + {12,11,&segSize2C[3][0]},/* SEG16R*/ + {12,11,&segSize2C[2][0]},/* SEG10 */ + {12,11,&segSize2[2][0]}, /* SEG9 */ + {12,11,&segSize2C[1][0]},/* SEG8 */ + {12,11,&segSize2C[4][0]},/* SEG8D */ + {12,11,&segSize2[1][0]}, /* SEG7 */ + {12,11,&segSize2C[1][0]},/* SEG87 */ + {12,11,&segSize2C[1][0]},/* SEG87F */ + {12,11,&segSize2C[2][0]},/* SEG98 */ + {12,11,&segSize2C[2][0]},/* SEG98F */ + { 8, 7,&segSize3[1][0]}, /* SEG7S */ + { 8, 7,&segSize3C[1][0]},/* SEG7SC */ + {12,11,&segSize2S[0][0]},/* SEG16S */ + { 1, 1,NULL}, /* DMD */ + { 1, 1,NULL} /* VIDEO */ +}}; + +/*------------------- +/ local variables +/-------------------*/ +static struct { + core_tSeg lastSeg; // previous segments values + int displaySize; // 1=compact 2=normal + tSegData *segData; // segments to use (normal/compact) + void *timers[5]; // allocated timers + int flipTimer[4]; // time since flipper was activated (used for EOS simulation) + UINT8 flipMask; // Flipper bits used for flippers + int firstSimRow, maxSimRows; // space available for simulator + int solLog[4]; + int solLogCount; +} locals; + +/*------------------------------- +/ Initialize the game palette +/-------------------------------*/ +static PALETTE_INIT(core) { + const int palSize = sizeof(core_palette)/3; + unsigned char tmpPalette[sizeof(core_palette)/3][3]; + int rStart = 0xff, gStart = 0xe0, bStart = 0x20; + int perc66 = 67, perc33 = 33, perc0 = 20; + int ii; + float diff; + + if ((pmoptions.dmd_red > 0) || (pmoptions.dmd_green > 0) || (pmoptions.dmd_blue > 0)) { + rStart = pmoptions.dmd_red; gStart = pmoptions.dmd_green; bStart = pmoptions.dmd_blue; + } + if ((pmoptions.dmd_perc0 > 0) || (pmoptions.dmd_perc33 > 0) || (pmoptions.dmd_perc66 > 0)) { + perc66 = pmoptions.dmd_perc66; perc33 = pmoptions.dmd_perc33; perc0 = pmoptions.dmd_perc0; + } + memcpy(tmpPalette, core_palette, sizeof(core_palette)); + + /*-- Autogenerate DMD Color Shades--*/ + tmpPalette[COL_DMDOFF][0] = rStart * perc0 / 100; + tmpPalette[COL_DMDOFF][1] = gStart * perc0 / 100; + tmpPalette[COL_DMDOFF][2] = bStart * perc0 / 100; + tmpPalette[COL_DMD33][0] = rStart * perc33 / 100; + tmpPalette[COL_DMD33][1] = gStart * perc33 / 100; + tmpPalette[COL_DMD33][2] = bStart * perc33 / 100; + tmpPalette[COL_DMD66][0] = rStart * perc66 / 100; + tmpPalette[COL_DMD66][1] = gStart * perc66 / 100; + tmpPalette[COL_DMD66][2] = bStart * perc66 / 100; + tmpPalette[COL_DMDON][0] = rStart; + tmpPalette[COL_DMDON][1] = gStart; + tmpPalette[COL_DMDON][2] = bStart; + /*-- segment display antialias colors --*/ + tmpPalette[COL_SEGAAON1][0] = rStart * 72 / 100; + tmpPalette[COL_SEGAAON1][1] = gStart * 72 / 100; + tmpPalette[COL_SEGAAON1][2] = bStart * 72 / 100; + tmpPalette[COL_SEGAAON2][0] = rStart * 33 / 100; + tmpPalette[COL_SEGAAON2][1] = gStart * 33 / 100; + tmpPalette[COL_SEGAAON2][2] = bStart * 33 / 100; + tmpPalette[COL_SEGAAOFF1][0] = rStart * perc0 * 72 / 10000; + tmpPalette[COL_SEGAAOFF1][1] = gStart * perc0 * 72 / 10000; + tmpPalette[COL_SEGAAOFF1][2] = bStart * perc0 * 72 / 10000; + tmpPalette[COL_SEGAAOFF2][0] = rStart * perc0 * 33 / 10000; + tmpPalette[COL_SEGAAOFF2][1] = gStart * perc0 * 33 / 10000; + tmpPalette[COL_SEGAAOFF2][2] = bStart * perc0 * 33 / 10000; + + /*-- generate 16 shades of the segment color for all antialiased segments --*/ + diff = (float)(100 - perc0) / 15.0; + for (ii = 0; ii < 16; ii++) { + tmpPalette[palSize-16+ii][0] = rStart * (perc0 + diff * ii) / 100; + tmpPalette[palSize-16+ii][1] = gStart * (perc0 + diff * ii) / 100; + tmpPalette[palSize-16+ii][2] = bStart * (perc0 + diff * ii) / 100; + tmpPalette[palSize-32+ii][0] = rStart * (perc0 + diff * ii) * 72 / 10000; + tmpPalette[palSize-32+ii][1] = gStart * (perc0 + diff * ii) * 72 / 10000; + tmpPalette[palSize-32+ii][2] = bStart * (perc0 + diff * ii) * 72 / 10000; + tmpPalette[palSize-48+ii][0] = rStart * (perc0 + diff * ii) * 33 / 10000; + tmpPalette[palSize-48+ii][1] = gStart * (perc0 + diff * ii) * 33 / 10000; + tmpPalette[palSize-48+ii][2] = bStart * (perc0 + diff * ii) * 33 / 10000; + } + +//for (int i = 0; i < palSize; i++) printf("Col %d: %02x %02x %02x\n", i, tmpPalette[i][0],tmpPalette[i][1],tmpPalette[i][2]); + + rStart = tmpPalette[COL_DMDOFF][0]; + gStart = tmpPalette[COL_DMDOFF][1]; + bStart = tmpPalette[COL_DMDOFF][2]; + + /*-- Autogenerate Dark Playfield Lamp Colors --*/ + for (ii = 0; ii < COL_LAMPCOUNT; ii++) { /* Reduce by 75% */ + tmpPalette[COL_LAMP+COL_LAMPCOUNT+ii][0] = (tmpPalette[COL_LAMP+ii][0] * 25) / 100; + tmpPalette[COL_LAMP+COL_LAMPCOUNT+ii][1] = (tmpPalette[COL_LAMP+ii][1] * 25) / 100; + tmpPalette[COL_LAMP+COL_LAMPCOUNT+ii][2] = (tmpPalette[COL_LAMP+ii][2] * 25) / 100; + } + + if (pmoptions.dmd_antialias) + { /*-- Autogenerate antialias colours --*/ + int rStep, gStep, bStep; + rStart = gStart = bStart = 0; + + rStep = (tmpPalette[COL_DMDON][0] * pmoptions.dmd_antialias / 100 - rStart) / 6; + gStep = (tmpPalette[COL_DMDON][1] * pmoptions.dmd_antialias / 100 - gStart) / 6; + bStep = (tmpPalette[COL_DMDON][2] * pmoptions.dmd_antialias / 100 - bStart) / 6; + + for (ii = 1; ii < COL_DMDAACOUNT; ii++) { // first is black + tmpPalette[COL_DMDAA+ii][0] = rStart; + tmpPalette[COL_DMDAA+ii][1] = gStart; + tmpPalette[COL_DMDAA+ii][2] = bStart; + rStart += rStep; gStart += gStep; bStart += bStep; + } + } +#if MAMEVER >= 6100 + for (ii = 0; ii < sizeof(tmpPalette)/3; ii++) + palette_set_color(ii, tmpPalette[ii][0], tmpPalette[ii][1], tmpPalette[ii][2]); +#else /* MAMEVER */ + memcpy(palette, tmpPalette, sizeof(tmpPalette)); +#endif /* MAMEVER */ +} + +/*----------------------------------- +/ Generic DMD display handler +/------------------------------------*/ +void video_update_core_dmd(struct mame_bitmap *bitmap, const struct rectangle *cliprect, tDMDDot dotCol, const struct core_dispLayout *layout) { + UINT32 *dmdColor = &CORE_COLOR(COL_DMDOFF); + UINT32 *aaColor = &CORE_COLOR(COL_DMDAA); + BMTYPE **lines = ((BMTYPE **)bitmap->line) + (layout->top*locals.displaySize); + int noaa = !pmoptions.dmd_antialias || (layout->type & CORE_DMDNOAA); + int ii, jj; + + memset(&dotCol[layout->start+1][0], 0, sizeof(dotCol[0][0])*layout->length+1); + memset(&dotCol[0][0], 0, sizeof(dotCol[0][0])*layout->length+1); // clear above + for (ii = 0; ii < layout->start+1; ii++) { + BMTYPE *line = (*lines++) + (layout->left*locals.displaySize); + dotCol[ii][layout->length] = 0; + if (ii > 0) { + for (jj = 0; jj < layout->length; jj++) { + *line++ = dmdColor[dotCol[ii][jj]]; + if (locals.displaySize > 1) + *line++ = noaa ? 0 : aaColor[dotCol[ii][jj] + dotCol[ii][jj+1]]; + } + } + if (locals.displaySize > 1) { + int col1 = dotCol[ii][0] + dotCol[ii+1][0]; + line = (*lines++) + (layout->left*locals.displaySize); + for (jj = 0; jj < layout->length; jj++) { + int col2 = dotCol[ii][jj+1] + dotCol[ii+1][jj+1]; + *line++ = noaa ? 0 : aaColor[col1]; + *line++ = noaa ? 0 : aaColor[2*(col1 + col2)/5]; + col1 = col2; + } + } + } + osd_mark_dirty(layout->left*locals.displaySize,layout->top*locals.displaySize, + (layout->left+layout->length)*locals.displaySize,(layout->top+layout->start)*locals.displaySize); +} +#ifdef VPINMAME +# define inRect(r,l,t,w,h) FALSE +#else /* VPINMAME */ +INLINE int inRect(const struct rectangle *r, int left, int top, int width, int height) { + return (r->max_x >= left) && (r->max_y >= top) && + (r->min_x <= left + width) && (r->min_y <= top + height); +} +#endif /* VPINMAME */ + +/*----------------------------------- +/ Generic segment display handler +/------------------------------------*/ +static void updateDisplay(struct mame_bitmap *bitmap, const struct rectangle *cliprect, + const struct core_dispLayout *layout, int *pos) { + if (layout == NULL) { DBGLOG(("gen_refresh without LCD layout\n")); return; } + for (; layout->length; layout += 1) { + if (layout->type == CORE_IMPORT) + { updateDisplay(bitmap, cliprect, (const struct core_dispLayout *)layout->ptr, pos); continue; } + if (layout->ptr) + if (((ptPinMAMEvidUpdate)(layout->ptr))(bitmap,cliprect,layout) == 0) continue; + { + int left = layout->left * (locals.segData[layout->type & CORE_SEGMASK].cols+1) / 2; + int top = layout->top * (locals.segData[0].rows + 1) / 2; + int ii = layout->length; + UINT16 *seg = &coreGlobals.segments[layout->start].w; + UINT16 *lastSeg = &locals.lastSeg[layout->start].w; + int step = (layout->type & CORE_SEGREV) ? -1 : 1; + + if (step < 0) { seg += ii-1; lastSeg += ii-1; } + while (ii--) { + UINT16 tmpSeg = *seg; + int tmpType = layout->type & CORE_SEGMASK; + +#ifdef VPINMAME + //SJE: Force an update of the segments ALWAYS in VPM - corrects Pause Display Bugs + if(1) { +#else + if ((tmpSeg != *lastSeg) || + inRect(cliprect,left,top,locals.segData[layout->type & 0x0f].cols,locals.segData[layout->type & 0x0f].rows)) { +#endif + tmpSeg >>= (layout->type & CORE_SEGHIBIT) ? 8 : 0; + + switch (tmpType) { + case CORE_SEG87: case CORE_SEG87F: + if ((ii > 0) && (ii % 3 == 0)) { // Handle Comma + if ((tmpType == CORE_SEG87F) && tmpSeg) tmpSeg |= 0x80; + tmpType = CORE_SEG8; + } else + tmpType = CORE_SEG7; + break; + case CORE_SEG98: case CORE_SEG98F: + tmpSeg |= (tmpSeg & 0x100)<<1; + if ((ii > 0) && (ii % 3 == 0)) { // Handle Comma + if ((tmpType == CORE_SEG98F) && tmpSeg) tmpSeg |= 0x80; + tmpType = CORE_SEG10; + } else + tmpType = CORE_SEG9; + break; + case CORE_SEG9: + tmpSeg |= (tmpSeg & 0x100)<<1; + break; + } + if (!pmoptions.dmd_only || !layout->ptr) + drawChar(bitmap, top, left, tmpSeg, tmpType, coreGlobals.segDim[*pos] > 15 ? 15 : coreGlobals.segDim[*pos]); + coreGlobals.drawSeg[*pos] = tmpSeg; + } + (*pos)++; + left += locals.segData[layout->type & 0x0f].cols+1; + seg += step; lastSeg += step; + } + } + } +} + +VIDEO_UPDATE(core_gen) { + int count = 0; + updateDisplay(bitmap, cliprect, core_gameData->lcdLayout, &count); + memcpy(locals.lastSeg, coreGlobals.segments, sizeof(locals.lastSeg)); + video_update_core_status(bitmap,cliprect); +} + +/*--------------------- +/ Update all switches +/----------------------*/ +void core_updateSw(int flipEn) { + /*-- handle flippers--*/ + const int flip = core_gameData->hw.flippers; + const int flipSwCol = (core_gameData->gen & (GEN_GTS3 | GEN_ALVG)) ? 15 : CORE_FLIPPERSWCOL; + int inports[CORE_MAXPORTS]; + UINT8 swFlip; + int ii; + + if (g_fHandleKeyboard) { + for (ii = 0; ii < CORE_COREINPORT+(coreData->coreDips+31)/16; ii++) + inports[ii] = readinputport(ii); + + /*-- buttons --*/ + swFlip = 0; + if (inports[CORE_FLIPINPORT] & CORE_LLFLIPKEY) swFlip |= CORE_SWLLFLIPBUTBIT; + if (inports[CORE_FLIPINPORT] & CORE_LRFLIPKEY) swFlip |= CORE_SWLRFLIPBUTBIT; + if (locals.flipMask & CORE_SWULFLIPBUTBIT) { /* have UL switch */ + if (flip & FLIP_BUT(FLIP_UL)) + { if (inports[CORE_FLIPINPORT] & CORE_ULFLIPKEY) swFlip |= CORE_SWULFLIPBUTBIT; } + else + { if (inports[CORE_FLIPINPORT] & CORE_LLFLIPKEY) swFlip |= CORE_SWULFLIPBUTBIT; } + } + if (locals.flipMask & CORE_SWURFLIPBUTBIT) { /* have UR switch */ + if (flip & FLIP_BUT(FLIP_UR)) + { if (inports[CORE_FLIPINPORT] & CORE_URFLIPKEY) swFlip |= CORE_SWURFLIPBUTBIT; } + else + { if (inports[CORE_FLIPINPORT] & CORE_LRFLIPKEY) swFlip |= CORE_SWURFLIPBUTBIT; } + } + } + else + swFlip = (coreGlobals.swMatrix[flipSwCol] ^ coreGlobals.invSw[flipSwCol]) & (CORE_SWULFLIPBUTBIT|CORE_SWURFLIPBUTBIT|CORE_SWLLFLIPBUTBIT|CORE_SWLRFLIPBUTBIT); + + /*-- set switches in matrix for non-fliptronic games --*/ + if (FLIP_SWL(flip)) core_setSw(FLIP_SWL(flip), swFlip & CORE_SWLLFLIPBUTBIT); + if (FLIP_SWR(flip)) core_setSw(FLIP_SWR(flip), swFlip & CORE_SWLRFLIPBUTBIT); + + /*-- fake solenoids if not CPU controlled --*/ + if ((flip & FLIP_SOL(FLIP_L)) == 0) { + coreGlobals.solenoids2 &= 0xffffff00; + if (flipEn) { + if (swFlip & CORE_SWLLFLIPBUTBIT) coreGlobals.solenoids2 |= CORE_LLFLIPSOLBITS; + if (swFlip & CORE_SWLRFLIPBUTBIT) coreGlobals.solenoids2 |= CORE_LRFLIPSOLBITS; + } + } + + /*-- EOS switches --*/ + if (locals.flipMask & CORE_SWULFLIPEOSBIT) { + if (core_getSol(sULFlip)) locals.flipTimer[0] += 1; + else locals.flipTimer[0] = 0; + if (locals.flipTimer[0] >= CORE_FLIPSTROKETIME) swFlip |= CORE_SWULFLIPEOSBIT; + } + if (locals.flipMask & CORE_SWURFLIPEOSBIT) { + if (core_getSol(sURFlip)) locals.flipTimer[1] += 1; + else locals.flipTimer[1] = 0; + if (locals.flipTimer[1] >= CORE_FLIPSTROKETIME) swFlip |= CORE_SWURFLIPEOSBIT; + } + if (locals.flipMask & CORE_SWLLFLIPEOSBIT) { + if (core_getSol(sLLFlip)) locals.flipTimer[2] += 1; + else locals.flipTimer[2] = 0; + if (locals.flipTimer[2] >= CORE_FLIPSTROKETIME) swFlip |= CORE_SWLLFLIPEOSBIT; + } + if (locals.flipMask & CORE_SWLRFLIPEOSBIT) { + if (core_getSol(sLRFlip)) locals.flipTimer[3] += 1; + else locals.flipTimer[3] = 0; + if (locals.flipTimer[3] >= CORE_FLIPSTROKETIME) swFlip |= CORE_SWLRFLIPEOSBIT; + } + coreGlobals.swMatrix[flipSwCol] = (coreGlobals.swMatrix[flipSwCol] & ~locals.flipMask) | + ((swFlip ^ coreGlobals.invSw[flipSwCol]) & locals.flipMask); + + /*-- update core dependent switches --*/ + if (coreData->updSw) coreData->updSw(g_fHandleKeyboard ? inports : NULL); + + /*-- update game dependent switches --*/ + if (g_fHandleMechanics) { + if (core_gameData->hw.handleMech) core_gameData->hw.handleMech(g_fHandleMechanics); + } + /*-- Run simulator --*/ + if (coreGlobals.simAvail) + sim_run(inports, CORE_COREINPORT+(coreData->coreDips+31)/16, + (inports[CORE_SIMINPORT] & SIM_SWITCHKEY) == 0, + (SIM_BALLS(inports[CORE_SIMINPORT]))); + { /*-- check changed solenoids --*/ + UINT64 allSol = core_getAllSol(); + UINT64 chgSol = (allSol ^ coreGlobals.lastSol) & vp_getSolMask64(); + + if (chgSol) { + coreGlobals.lastSol = allSol; + for (ii = 1; ii < CORE_FIRSTCUSTSOL+core_gameData->hw.custSol; ii++) { + if (chgSol & 0x01) { + /*-- solenoid has changed state --*/ + OnSolenoid(ii, allSol & 0x01); + /*-- log solenoid number on the display (except flippers) --*/ + if ((!pmoptions.dmd_only && (allSol & 0x01)) && + ((ii < CORE_FIRSTLFLIPSOL) || (ii >= CORE_FIRSTSIMSOL))) { + locals.solLog[locals.solLogCount] = ii; + core_textOutf(Machine->visible_area.max_x - 12*8,0,BLACK,"%2d %2d %2d %2d", + locals.solLog[(locals.solLogCount+1) & 3], + locals.solLog[(locals.solLogCount+2) & 3], + locals.solLog[(locals.solLogCount+3) & 3], + locals.solLog[(locals.solLogCount+0) & 3]); + locals.solLogCount = (locals.solLogCount + 1) & 3; + } + if (coreGlobals.soundEn) + proc_mechsounds(ii, allSol & 0x01); + } + chgSol >>= 1; + allSol >>= 1; + } + } + } + + /*-- check if we should use simulator keys --*/ + if (g_fHandleKeyboard && + (!coreGlobals.simAvail || inports[CORE_SIMINPORT] & SIM_SWITCHKEY)) { + /*-- simulator keys disabled, use row+column keys --*/ + static int lastRow = 0, lastCol = 0; + int row = 0, col = 0; + + if (((inports[CORE_MANSWINPORT] & CORE_MANSWCOLUMNS) == 0) || + ((inports[CORE_MANSWINPORT] & CORE_MANSWROWS) == 0)) + lastRow = lastCol = 0; + else { + int bit = 0x0101; + + for (ii = 0; ii < 8; ii++) { + if (inports[CORE_MANSWINPORT] & CORE_MANSWCOLUMNS & bit) col = ii+1; + if (inports[CORE_MANSWINPORT] & CORE_MANSWROWS & bit) row = ii+1; + bit <<= 1; + } + if ((col != lastCol) || (row != lastRow)) { + coreGlobals.swMatrix[col] ^= (1<<(row-1)); + lastCol = col; lastRow = row; + } + } + } + +#ifdef MAME_DEBUG /* Press W and E at the same time to insert a mark in logfile */ + if (g_fHandleKeyboard && ((inports[CORE_MANSWINPORT] & 0x06) == 0x06)) + logerror("\nLogfile Mark\n"); +#endif /* MAME_DEBUG */ +} + +/*-------------------------- +/ Write text on the screen +/---------------------------*/ +void core_textOut(char *buf, int length, int x, int y, int color) { + if (y < locals.maxSimRows) { + int ii, l; + + l = strlen(buf); + for (ii = 0; ii < length; ii++) { + char c = (ii >= l) ? ' ' : buf[ii]; + + drawgfx(Machine->scrbitmap, Machine->uifont, c, color-1, 0, 0, + x + ii * Machine->uifont->width, y+locals.firstSimRow, 0, + TRANSPARENCY_NONE, 0); + } + } +} + +/*----------------------------------- +/ Write formatted text on the screen +/------------------------------------*/ +void CLIB_DECL core_textOutf(int x, int y, int color, const char *text, ...) { + va_list arg; + if (y < locals.maxSimRows) { + char buf[100]; + char *bufPtr = buf; + + va_start(arg, text); vsprintf(buf, text, arg); va_end(arg); + + while (*bufPtr) { + drawgfx(Machine->scrbitmap, Machine->uifont, *bufPtr++, color-1, 0, 0, + x, y+locals.firstSimRow, 0, TRANSPARENCY_NONE, 0); + x += Machine->uifont->width; + } + } +} + +/*-------------------------------------------- +/ Draw status display +/ Lamps, Switches, Solenoids, Diagnostic LEDs +/---------------------------------------------*/ +static VIDEO_UPDATE(core_status) { + BMTYPE **lines = (BMTYPE **)bitmap->line; + int startRow = 0, nextCol = 0, thisCol = 0; + int ii, jj, bits; + BMTYPE dotColor[2]; + + /*-- anything to do ? --*/ + if ((pmoptions.dmd_only) || (locals.maxSimRows < 16) || + (coreGlobals.soundEn && (!manual_sound_commands(bitmap)))) + return; + + dotColor[0] = CORE_COLOR(COL_DMDOFF); dotColor[1] = CORE_COLOR(COL_DMDON); + /*-- Draw lamps --*/ + if ((core_gameData->hw.lampData) && + (startRow + core_gameData->hw.lampData->startpos.x + core_gameData->hw.lampData->size.x < locals.maxSimRows)) { + core_tLampDisplay *drawData = core_gameData->hw.lampData; + int startx = drawData->startpos.x; + int starty = drawData->startpos.y + thisCol; + BMTYPE **line = &lines[locals.firstSimRow + startRow + startx]; + int num = 0; + int qq; + + for (ii = 0; ii < CORE_CUSTLAMPCOL+core_gameData->hw.lampCol; ii++) { + bits = coreGlobals.lampMatrix[ii]; + + for (jj = 0; jj < 8; jj++) { + for (qq = 0; qq < drawData->lamps[num].totnum; qq++) { + int color = drawData->lamps[num].lamppos[qq].color; + int lampx = drawData->lamps[num].lamppos[qq].x; + int lampy = drawData->lamps[num].lamppos[qq].y; + line[lampx][starty + lampy] = CORE_COLOR((bits & 0x01) ? color : COL_SHADE(color)); + } + bits >>= 1; + num++; + } + } + osd_mark_dirty(starty, locals.firstSimRow + startRow + startx, + starty + drawData->size.y, + locals.firstSimRow + startRow + startx + drawData->size.x); + startRow += startx + drawData->size.x; + if (starty + drawData->size.y > nextCol) nextCol = starty + drawData->size.y; + } + /*-- Defult square lamp matrix layout --*/ + else { + for (ii = 0; ii < CORE_CUSTLAMPCOL + core_gameData->hw.lampCol; ii++) { + BMTYPE **line = &lines[locals.firstSimRow + startRow]; + bits = coreGlobals.lampMatrix[ii]; + + for (jj = 0; jj < 8; jj++) { + line[0][thisCol + ii*2] = dotColor[bits & 0x01]; + line += 2; bits >>= 1; + } + } + osd_mark_dirty(thisCol, locals.firstSimRow + startRow, thisCol + ii*2 ,locals.firstSimRow + startRow + 16); + startRow += 16; if (thisCol + ii*2 > nextCol) nextCol = thisCol + ii*2; + } /* else */ + + /* Draw the switches */ + startRow += 3; + if (startRow + 16 >= locals.maxSimRows) { startRow = 0; thisCol = nextCol + 5; } + + for (ii = 0; ii < CORE_CUSTSWCOL+core_gameData->hw.swCol; ii++) { + BMTYPE **line = &lines[locals.firstSimRow + startRow]; + bits = coreGlobals.swMatrix[ii]; + + for (jj = 0; jj < 8; jj++) { + line[0][thisCol + ii*2] = dotColor[bits & 0x01]; + line += 2; bits >>= 1; + } + } + osd_mark_dirty(thisCol, locals.firstSimRow + startRow, thisCol + ii*2, locals.firstSimRow + startRow + 16); + startRow += 16; if (thisCol + ii*2 > nextCol) nextCol = thisCol + ii*2; + + /* Draw Solenoids and Flashers */ + startRow += 3; + + if (startRow + 16 >= locals.maxSimRows) { startRow = 0; thisCol = nextCol + 5; } + + { + BMTYPE **line = &lines[locals.firstSimRow + startRow]; + UINT64 allSol = core_getAllSol(); + for (ii = 0; ii < CORE_FIRSTCUSTSOL+core_gameData->hw.custSol; ii++) { + line[(ii/8)*2][thisCol + (ii%8)*2] = dotColor[allSol & 0x01]; + allSol >>= 1; + } + osd_mark_dirty(thisCol, locals.firstSimRow + startRow, thisCol + 16, + locals.firstSimRow + startRow + 16); + startRow += 16; if (thisCol + 16 > nextCol) nextCol = thisCol + 16; + } + + /*-- draw diagnostic LEDs --*/ + startRow += 3; + + if (startRow + 16 >= locals.maxSimRows) { startRow = 0; thisCol = nextCol; } + + if (coreData->diagLEDs == 0xff) { /* 7 SEG */ + drawChar(bitmap, locals.firstSimRow + startRow, thisCol, coreGlobals.diagnosticLed, CORE_SEG7, 0); + startRow += 16; if (thisCol + 12 > nextCol) nextCol = thisCol + 12; + } + else { + BMTYPE **line = &lines[locals.firstSimRow + startRow]; + bits = coreGlobals.diagnosticLed; + + // Draw LEDS Vertically + if (coreData->diagLEDs & DIAGLED_VERTICAL) { + for (ii = 0; ii < (coreData->diagLEDs & ~DIAGLED_VERTICAL); ii++) { + line[0][thisCol + 3] = dotColor[bits & 0x01]; + line += 2; bits >>= 1; + } + osd_mark_dirty(thisCol + 3, locals.firstSimRow + startRow, thisCol + 4, locals.firstSimRow + startRow + ii*2); + startRow += ii*2; if (thisCol + 4 > nextCol) nextCol = thisCol + 4; + } + else { // Draw LEDS Horizontally + for (ii = 0; ii < coreData->diagLEDs; ii++) { + line[0][thisCol + ii*2] = dotColor[bits & 0x01]; + bits >>= 1; + } + osd_mark_dirty(thisCol, locals.firstSimRow + startRow, thisCol + ii*2, locals.firstSimRow + startRow + 1); + startRow += 1; if (thisCol + ii*2 > nextCol) nextCol = thisCol + ii*2; + } + } + /*-- GI Strings --*/ + if (core_gameData->gen & GEN_ALLWPC) { + startRow += 3; + if (startRow + 2 >= locals.maxSimRows) { startRow = 0; thisCol = nextCol + 5; } + + for (ii = 0; ii < CORE_MAXGI; ii++) + { + if(coreGlobals.gi[ii]==8) + lines[locals.firstSimRow + startRow][thisCol + ii*2] = dotColor[1]; + else + lines[locals.firstSimRow + startRow][thisCol + ii*2] = 64+(coreGlobals.gi[ii]<<1); + } + osd_mark_dirty(thisCol, locals.firstSimRow + startRow, thisCol + ii*2, locals.firstSimRow + startRow + 1); + } + if (coreGlobals.simAvail) sim_draw(locals.firstSimRow); + /*-- draw game specific mechanics --*/ + if (core_gameData->hw.drawMech) core_gameData->hw.drawMech((void *)&bitmap->line[locals.firstSimRow]); +} + +/*-- lamp handling --*/ +void core_setLamp(UINT8 *lampMatrix, int col, int row) { + while (col) { + if (col & 0x01) *lampMatrix |= row; + col >>= 1; + lampMatrix += 1; + } +} +void core_setLampBlank(UINT8 *lampMatrix, int col, int row) { + while (col) { + if (col & 0x01) *lampMatrix = row; + col >>= 1; + lampMatrix += 1; + } +} + +/*-- "normal" switch/lamp numbering (1-64) --*/ +int core_swSeq2m(int no) { return no+7; } +int core_m2swSeq(int col, int row) { return col*8+row-7; } + +/*------------------------------------------ +/ Read the current switch value +/ +/ This function returns TRUE for active +/ switches even if the switch is active low. +/-------------------------------------------*/ +int core_getSw(int swNo) { + if (coreData->sw2m) swNo = coreData->sw2m(swNo); else swNo = (swNo/10)*8+(swNo%10-1); + return (coreGlobals.swMatrix[swNo/8] ^ coreGlobals.invSw[swNo/8]) & (1<<(swNo%8)); +} + +int core_getSwCol(int colEn) { + int ii = 1; + if (colEn) { + while ((colEn & 0x01) == 0) { + colEn >>= 1; + ii += 1; + } + } + return coreGlobals.swMatrix[ii]; +} + +/*---------------------- +/ Set/reset a switch +/-----------------------*/ +void core_setSw(int swNo, int value) { + if (coreData->sw2m) swNo = coreData->sw2m(swNo); else swNo = (swNo/10)*8+(swNo%10-1); + coreGlobals.swMatrix[swNo/8] &= ~(1<<(swNo%8)); /* clear the bit first */ + coreGlobals.swMatrix[swNo/8] |= ((value ? 0xff : 0) ^ coreGlobals.invSw[swNo/8]) & (1<<(swNo%8)); +} + +/*------------------------- +/ update active low/high +/-------------------------*/ +void core_updInvSw(int swNo, int inv) { + int bit; + if (coreData->sw2m) swNo = coreData->sw2m(swNo); else swNo = (swNo/10)*8+(swNo%10-1); + bit = (1 << (swNo%8)); + + if (inv) + inv = bit; + if ((coreGlobals.invSw[swNo/8] ^ inv) & bit) { + coreGlobals.invSw[swNo/8] ^= bit; + coreGlobals.swMatrix[swNo/8] ^= bit; + } +} + +/*------------------------------------- +/ Read the status of a solenoid +/ For the standard solenoids this is +/ the "smoothed" value +/--------------------------------------*/ +int core_getSol(int solNo) { + if (solNo <= 28) + return coreGlobals.solenoids & CORE_SOLBIT(solNo); + else if (solNo <= 32) { // 29-32 + if (core_gameData->gen & GEN_ALLS11) + return coreGlobals.solenoids & CORE_SOLBIT(solNo); + else if (core_gameData->gen & GEN_ALLWPC) // GI circuits + return coreGlobals.solenoids2 & (1<<(solNo-29+8)); // GameOn + } + else if (solNo <= 36) { // 33-36 Upper flipper (WPC only) + if (core_gameData->gen & GEN_ALLWPC) { + int mask; + /*-- flipper coils --*/ + if ((solNo == sURFlip) && (core_gameData->hw.flippers & FLIP_SOL(FLIP_UR))) + mask = CORE_URFLIPSOLBITS; + else if ((solNo == sULFlip) && (core_gameData->hw.flippers & FLIP_SOL(FLIP_UL))) + mask = CORE_ULFLIPSOLBITS; + else + mask = 1<<(solNo - 33 + 4); + return coreGlobals.solenoids2 & mask; + } + } + else if (solNo <= 44) { // 37-44 WPC95 & S11 extra + if (core_gameData->gen & (GEN_WPC95|GEN_WPC95DCS)) + return coreGlobals.solenoids & (1<<((solNo - 13)|4)); + if (core_gameData->gen & GEN_ALLS11) + return coreGlobals.solenoids2 & (1<<(solNo - 37 + 8)); + } + else if (solNo <= 48) { // 45-48 Lower flippers + int mask = 1<<(solNo - 45); + /*-- Game must have lower flippers but for symmetry we check anyway --*/ + if ((solNo == sLRFlip) /*&& (core_gameData->hw.flippers & FLIP_SOL(FLIP_LR))*/) + mask = CORE_LRFLIPSOLBITS; + else if ((solNo == sLLFlip) /*&& (core_gameData->hw.flippers & FLIP_SOL(FLIP_LL))*/) + mask = CORE_LLFLIPSOLBITS; + return coreGlobals.solenoids2 & mask; + } + else if (solNo <= 50) // 49-50 simulated + return sim_getSol(solNo); + else if (core_gameData->hw.getSol) + return core_gameData->hw.getSol(solNo); + return 0; +} + +/*------------------------------------- +/ Read the instant status of a solenoid +/--------------------------------------*/ +int core_getPulsedSol(int solNo) { + if (solNo <= 32) + return coreGlobals.pulsedSolState & CORE_SOLBIT(solNo); + else if ((core_gameData->gen & (GEN_WPC95|GEN_WPC95DCS)) && (solNo >= 37) && (solNo <= 44)) + // This is a little messy. Pulsed state is in 29-32 but 29-32 non pulsed is GameOn sol + return coreGlobals.pulsedSolState & (1<<((solNo-13)|4)); + return core_getSol(solNo); /* sol is not smoothed anyway */ +} + +/*------------------------------------------------- +/ Get the value of all solenoids in one variable +/--------------------------------------------------*/ +UINT64 core_getAllSol(void) { + UINT64 sol = coreGlobals.solenoids; + if (core_gameData->gen & GEN_ALLWPC) // 29-32 GameOn + sol = (sol & 0x0fffffff) | ((coreGlobals.solenoids2 & 0x0f00)<<20); + if (core_gameData->gen & (GEN_WPC95|GEN_WPC95DCS)) { // 37-44 WPC95 extra + UINT64 tmp = coreGlobals.solenoids & 0xf0000000; + sol |= (tmp<<12)|(tmp<<8); + } + if (core_gameData->gen & (GEN_ALLS11|GEN_SAM)) // 37-44 S11, SAM extra + sol |= ((UINT64)(coreGlobals.solenoids2 & 0xff00))<<28; + { // 33-36, 45-48 flipper solenoids + UINT8 lFlip = (coreGlobals.solenoids2 & (CORE_LRFLIPSOLBITS|CORE_LLFLIPSOLBITS)); + UINT8 uFlip = (coreGlobals.solenoids2 & (CORE_URFLIPSOLBITS|CORE_ULFLIPSOLBITS)); + // hold coil is set if either coil is set + lFlip = lFlip | ((lFlip & 0x05)<<1); + if (core_gameData->hw.flippers & FLIP_SOL(FLIP_UR)) + uFlip = uFlip | ((uFlip & 0x10)<<1); + if (core_gameData->hw.flippers & FLIP_SOL(FLIP_UL)) + uFlip = uFlip | ((uFlip & 0x40)<<1); + sol |= (((UINT64)lFlip)<<44) | (((UINT64)uFlip)<<28); + } + /*-- simulated --*/ + sol |= sim_getSol(49) ? (((UINT64)1)<<48) : 0; + /*-- custom --*/ + if ( core_gameData->hw.getSol ) { + UINT64 bit = ((UINT64)1)<<(CORE_FIRSTCUSTSOL-1); + int ii; + + for (ii = 0; ii < core_gameData->hw.custSol; ii++) { + sol |= core_gameData->hw.getSol(CORE_FIRSTCUSTSOL + ii) ? bit : 0; + bit <<= 1; + } + } + return sol; +} + +/*--------------------------------------- +/ Get the status of a DIP bank (8 dips) +/-----------------------------------------*/ +int core_getDip(int dipBank) { +#ifdef VPINMAME + return vp_getDIP(dipBank); +#else /* VPINMAME */ + return (readinputport(CORE_COREINPORT+1+dipBank/2)>>((dipBank & 0x01)*8))&0xff; +#endif /* VPINMAME */ +} + +/*-------------------- +/ Draw a LED digit +/---------------------*/ +static void drawChar(struct mame_bitmap *bitmap, int row, int col, UINT32 bits, int type, int dimming) { + const tSegData *s = &locals.segData[type]; + int palSize = sizeof(core_palette)/3; + UINT32 pixel[21] = {0}; + int kk,ll; + int pens[4][4] = {{ 0, palSize-1-dimming, palSize-17-dimming, palSize-33-dimming }, + { COL_DMDOFF, palSize-1-dimming, palSize-17-dimming, palSize-33-dimming }, + { COL_SEGAAOFF1, palSize-1-dimming, palSize-17-dimming, palSize-33-dimming }, + { COL_SEGAAOFF2, palSize-1-dimming, palSize-17-dimming, palSize-33-dimming }}; + + for (kk = 1; bits; kk++, bits >>= 1) { + if (bits & 0x01) + for (ll = 0; ll < s->rows; ll++) + pixel[ll] |= s->segs[ll][kk]; + } + for (kk = 0; kk < s->rows; kk++) { + BMTYPE *line = &((BMTYPE **)(bitmap->line))[row+kk][col + s->cols]; + // why don't the bitmap use the leftmost bits. i.e. size is limited to 15 + UINT32 p = pixel[kk]>>(30-2*s->cols), np = s->segs[kk][0]>>(30-2*s->cols); + + for (ll = 0; ll < s->cols; ll++, p >>= 2, np >>= 2) + *(--line) = CORE_COLOR(pens[np & 0x03][p & 0x03]); + } + osd_mark_dirty(col,row,col+s->cols,row+s->rows); +} + +/*---------------------- +/ Initialize PinMAME +/-----------------------*/ +static MACHINE_INIT(core) { + if (!coreData) { // first time + /*-- init variables --*/ + memset(&coreGlobals, 0, sizeof(coreGlobals)); + memset(&locals, 0, sizeof(locals)); + memset(&locals.lastSeg, -1, sizeof(locals.lastSeg)); + coreData = (struct pinMachine *)&Machine->drv->pinmame; + //-- initialise timers -- + if (coreData->timers[0].callback) { + int ii; + for (ii = 0; ii < 5; ii++) { + if (coreData->timers[ii].callback) { + locals.timers[ii] = timer_alloc(coreData->timers[ii].callback); + timer_adjust(locals.timers[ii], TIME_IN_HZ(coreData->timers[ii].rate), 0, TIME_IN_HZ(coreData->timers[ii].rate)); + } + } + } + /*-- init switch matrix --*/ + memcpy(&coreGlobals.invSw, core_gameData->wpc.invSw, sizeof(core_gameData->wpc.invSw)); + memcpy(coreGlobals.swMatrix, coreGlobals.invSw, sizeof(coreGlobals.invSw)); + /*-- masks bit used by flippers --*/ + { + const int flip = core_gameData->hw.flippers; + locals.flipMask = CORE_SWLRFLIPBUTBIT | CORE_SWLLFLIPBUTBIT | + ((flip & FLIP_SW(FLIP_UL)) ? CORE_SWULFLIPBUTBIT : 0) | + ((flip & FLIP_SW(FLIP_UR)) ? CORE_SWURFLIPBUTBIT : 0) | + ((flip & FLIP_EOS(FLIP_UL))? CORE_SWULFLIPEOSBIT : 0) | + ((flip & FLIP_EOS(FLIP_UR))? CORE_SWURFLIPEOSBIT : 0) | + ((flip & FLIP_EOS(FLIP_LL))? CORE_SWLLFLIPEOSBIT : 0) | + ((flip & FLIP_EOS(FLIP_LR))? CORE_SWLRFLIPEOSBIT : 0); + } + /*-- command line options --*/ + locals.displaySize = pmoptions.dmd_compact ? 1 : 2; + { + UINT32 size = core_initDisplaySize(core_gameData->lcdLayout) >> 16; + if ((size > Machine->drv->screen_width) && (locals.displaySize > 1)) { + /* force small display */ + locals.displaySize = 1; + core_initDisplaySize(core_gameData->lcdLayout); + } + } + /*-- Sound enabled ? */ + if (((Machine->gamedrv->flags & GAME_NO_SOUND) == 0) && Machine->sample_rate) + coreGlobals.soundEn = TRUE; + + /*-- init simulator --*/ + if (g_fHandleKeyboard && core_gameData->simData) { + int inports[CORE_MAXPORTS]; + int ii; + + for (ii = 0; ii < CORE_COREINPORT+(coreData->coreDips+31)/16; ii++) + inports[ii] = readinputport(ii); + + coreGlobals.simAvail = sim_init((sim_tSimData *)core_gameData->simData, + inports,CORE_COREINPORT+(coreData->coreDips+31)/16); + } + /*-- finally init the core --*/ + if (coreData->init) coreData->init(); + /*-- init sound commander --*/ + snd_cmd_init(); + } + /*-- now reset everything --*/ + if (coreData->reset) coreData->reset(); + mech_emuInit(); + OnStateChange(1); /* We have a lift-off */ + +/* TOM: this causes to draw the static sim text */ + schedule_full_refresh(); +} + +static MACHINE_STOP(core) { + int ii; + mech_emuExit(); + if (coreData->stop) coreData->stop(); + snd_cmd_exit(); + for (ii = 0; ii < 5; ii++) { + if (locals.timers[ii]) + timer_remove(locals.timers[ii]); + } + memset(locals.timers, 0, sizeof(locals.timers)); + coreData = NULL; +} + +static void core_findSize(const struct core_dispLayout *layout, int *maxX, int *maxY) { + if (layout) { + for (; layout->length; layout += 1) { + int tmpX = 0, tmpY = 0, type = layout->type & CORE_SEGMASK; + if (type == CORE_IMPORT) + { core_findSize(layout->ptr, maxX, maxY); continue; } + if (type >= CORE_DMD) { + tmpX = (layout->left + layout->length) * locals.segData[type].cols + 1; + tmpY = (layout->top + layout->start) * locals.segData[type].rows + 1; + } + else { + tmpX = (layout->left + 2*layout->length) * (locals.segData[type & 0x07].cols + 1) / 2; + tmpY = (layout->top + 2) * (locals.segData[0].rows + 1) / 2; + } + if (tmpX > *maxX) *maxX = tmpX; + if (tmpY > *maxY) *maxY = tmpY; + } +#ifndef VPINMAME + if (*maxX < 256) *maxX = 256; +#endif + } +} + +static UINT32 core_initDisplaySize(const struct core_dispLayout *layout) { + int maxX = 0, maxY = 0; + + locals.segData = &segData[locals.displaySize == 1][0]; + if (layout) + core_findSize(layout, &maxX, &maxY); + else if (locals.displaySize > 1) +#ifdef VPINMAME + { maxX = 257; maxY = 65; } +#else + { maxX = 256; maxY = 65; } +#endif /* VPINMAME */ + else + { maxX = 129; maxY = 33; } + locals.firstSimRow = maxY + 3; + locals.maxSimRows = Machine->drv->screen_height - locals.firstSimRow; + if ((!pmoptions.dmd_only) || (maxY >= Machine->drv->screen_height)) + maxY = Machine->drv->screen_height; +#ifndef VPINMAME + if (maxX == 257) maxX = 256; +#endif /* VPINMAME */ + set_visible_area(0, maxX-1, 0, maxY-1); + return (maxX<<16) | maxY; +} + +void core_nvram(void *file, int write, void *mem, int length, UINT8 init) { + if (write) mame_fwrite(file, mem, length); /* save */ + else if (file) mame_fread(file, mem, length); /* load */ + else memset(mem, init, length); /* first time */ + mech_nv(file, write); /* save mech positions */ + { /*-- Load/Save DIP settings --*/ + UINT8 dips[6]; + int ii; + + if (write) { + for (ii = 0; ii < 6; ii++) dips[ii] = core_getDip(ii); + mame_fwrite(file, dips, sizeof(dips)); + } + else if (file) { + /* set the defaults (for compabilty with older versions) */ + dips[0] = readinputport(CORE_COREINPORT+1) & 0xff; + dips[1] = readinputport(CORE_COREINPORT+1)>>8; + dips[2] = readinputport(CORE_COREINPORT+2) & 0xff; + dips[3] = readinputport(CORE_COREINPORT+2)>>8; + dips[4] = readinputport(CORE_COREINPORT+3) & 0xff; + dips[5] = readinputport(CORE_COREINPORT+3)>>8; + + mame_fread(file, dips, sizeof(dips)); + for (ii = 0; ii < 6; ii++) vp_setDIP(ii, dips[ii]); + + } + else { // always get the default from the inports + /* coreData not initialised yet. Don't know exact number of DIPs */ + vp_setDIP(0, readinputport(CORE_COREINPORT+1) & 0xff); + vp_setDIP(1, readinputport(CORE_COREINPORT+1)>>8); + vp_setDIP(2, readinputport(CORE_COREINPORT+2) & 0xff); + vp_setDIP(3, readinputport(CORE_COREINPORT+2)>>8); + vp_setDIP(4, readinputport(CORE_COREINPORT+3) & 0xff); + vp_setDIP(5, readinputport(CORE_COREINPORT+3)>>8); + } + } +} + +/*---------------------------------------------- +/ Add a timer when building the machine driver +/-----------------------------------------------*/ +void machine_add_timer(struct InternalMachineDriver *machine, void (*func)(int), int rate) { + int ii; + for (ii = 0; machine->pinmame.timers[ii].callback; ii++) + ; + machine->pinmame.timers[ii].callback = func; + machine->pinmame.timers[ii].rate = rate; +} + +/*--------------------------------------- +/ Default machine driver for all games +/----------------------------------------*/ +MACHINE_DRIVER_START(PinMAME) + MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY) + MDRV_SCREEN_SIZE(CORE_SCREENX, CORE_SCREENY) + MDRV_VISIBLE_AREA(0, CORE_SCREENX-1, 0, CORE_SCREENY-1) + MDRV_PALETTE_INIT(core) + MDRV_PALETTE_LENGTH(sizeof(core_palette)/sizeof(core_palette[0][0])/3) + MDRV_FRAMES_PER_SECOND(60) + MDRV_SWITCH_CONV(core_swSeq2m,core_m2swSeq) + MDRV_LAMP_CONV(core_swSeq2m,core_m2swSeq) + MDRV_MACHINE_INIT(core) MDRV_MACHINE_STOP(core) + MDRV_VIDEO_UPDATE(core_gen) +MACHINE_DRIVER_END +#endif diff --git a/src/mame/drivers/p_core.h b/src/mame/drivers/p_core.h new file mode 100644 index 00000000000..5dda3b8be1e --- /dev/null +++ b/src/mame/drivers/p_core.h @@ -0,0 +1,511 @@ +// new code to allow the PinMAME rom loading to compile + +#define NORMALREGION(size, reg) ROM_REGION(size, reg, ROMREGION_ERASE00) +#define NORMALREGIONE(size, reg) ROM_REGION(size, reg, ROMREGION_ERASE00) +#define SOUNDREGION(size ,reg) ROM_REGION(size, reg, ROMREGION_ERASE00) +#define SOUNDREGIONE(size ,reg) ROM_REGION(size, reg, ROMREGION_ERASE00) + +/*----------------- +/ define the game +/------------------*/ +#define CORE_GAMEDEF(name, ver, longname, year, manuf, machine, flag) \ + GAME(year,name##_##ver,0,machine,name,name,ROT0,manuf,longname,flag | GAME_NOT_WORKING | GAME_NO_SOUND ) + + +#define CORE_CLONEDEF(name, ver, clonever, longname, year, manuf, machine,flag) \ + GAME(year,name##_##ver,name##_##clonever,machine,name,name,ROT0,manuf,longname,flag | GAME_NOT_WORKING | GAME_NO_SOUND) + +#if 0 +#define CORE_GAMEDEFNV(name, longname, year, manuf, machine, flag) \ + GAME(year,name,0,machine,name,name,ROT0,manuf,longname,flag | GAME_NOT_WORKING | GAME_NO_SOUND) + +#define CORE_CLONEDEFNV(name, cl, longname, year, manuf, machine,flag) \ + GAME(year,name,cl,machine,name,name,ROT0,manuf,longname,flag | GAME_NOT_WORKING | GAME_NO_SOUND) + +#define CORE_GAMEDEFNVR90(name, longname, year, manuf, machine, flag) \ + GAME(year,name,0,machine,name,name,ROT90,manuf,longname,flag | GAME_NOT_WORKING | GAME_NO_SOUND) +#endif + +/************************************************************************************************ +************************************************************************************************* + Old PinMAME code below for reference ONLY +************************************************************************************************* +************************************************************************************************/ + +#if 0 + +#ifndef INC_CORE +#define INC_CORE + +#include "wpcsam.h" +#include "gen.h" +#include "sim.h" + +/*-- some convenience macros --*/ +#ifndef FALSE + #define FALSE (0) +#endif +#ifndef TRUE + #define TRUE (1) +#endif + +#ifdef MAME_DEBUG + #define DBGLOG(x) logerror x +#else + #define DBGLOG(x) +#endif + + + +/*-- convenience macro for handling bits --*/ +#define GET_BIT0 (data & 0x01) >> 0 +#define GET_BIT1 (data & 0x02) >> 1 +#define GET_BIT2 (data & 0x04) >> 2 +#define GET_BIT3 (data & 0x08) >> 3 +#define GET_BIT4 (data & 0x10) >> 4 +#define GET_BIT5 (data & 0x20) >> 5 +#define GET_BIT6 (data & 0x40) >> 6 +#define GET_BIT7 (data & 0x80) >> 7 + + +/*-- default screen size */ +#ifdef VPINMAME +# define CORE_SCREENX 640 +# define CORE_SCREENY 400 +#else /* VPINMAME */ +# define CORE_SCREENX 320 +# define CORE_SCREENY 256 +#endif /* VPINMAME */ + + +/*-------------- +/ Input ports +/---------------*/ +/* strange but there are no way to define IMP and TOG with key without using BITX */ +#define COREPORT_BIT(mask, name, key) \ + PORT_BITX(mask,IP_ACTIVE_HIGH,IPT_BUTTON1,name,key,IP_JOY_NONE) +#define COREPORT_BITIMP(mask, name, key) \ + PORT_BITX(mask,IP_ACTIVE_HIGH,IPT_BUTTON1 | IPF_IMPULSE | (1<<8),name,key,IP_JOY_NONE) +#define COREPORT_BITTOG(mask, name, key) \ + PORT_BITX(mask,IP_ACTIVE_HIGH,IPT_BUTTON1 | IPF_TOGGLE,name,key,IP_JOY_NONE) +#define COREPORT_DIPNAME(mask,default,name) \ + PORT_DIPNAME(mask,default,name) +#define COREPORT_DIPSET(mask,name) \ + PORT_DIPSETTING(mask,name) + +/*-- only used in standard inport --*/ +#define COREPORT_BITDEF(mask, type, key) \ + PORT_BITX(mask,IP_ACTIVE_HIGH, type, IP_NAME_DEFAULT, key, IP_JOY_DEFAULT) + +/*---------------- +/ Common inports +/-----------------*/ +#define CORE_PORTS \ + PORT_START /* 0 */ \ + COREPORT_BIT(0x0001, "Column 1", KEYCODE_Q) \ + COREPORT_BIT(0x0002, "Column 2", KEYCODE_W) \ + COREPORT_BIT(0x0004, "Column 3", KEYCODE_E) \ + COREPORT_BIT(0x0008, "Column 4", KEYCODE_R) \ + COREPORT_BIT(0x0010, "Column 5", KEYCODE_T) \ + COREPORT_BIT(0x0020, "Column 6", KEYCODE_Y) \ + COREPORT_BIT(0x0040, "Column 7", KEYCODE_U) \ + COREPORT_BIT(0x0080, "Column 8", KEYCODE_I) \ + COREPORT_BIT(0x0100, "Row 1", KEYCODE_A) \ + COREPORT_BIT(0x0200, "Row 2", KEYCODE_S) \ + COREPORT_BIT(0x0400, "Row 3", KEYCODE_D) \ + COREPORT_BIT(0x0800, "Row 4", KEYCODE_F) \ + COREPORT_BIT(0x1000, "Row 5", KEYCODE_G) \ + COREPORT_BIT(0x2000, "Row 6", KEYCODE_H) \ + COREPORT_BIT(0x4000, "Row 7", KEYCODE_J) \ + COREPORT_BIT(0x8000, "Row 8", KEYCODE_K) \ + PORT_START /* 1 */ \ + COREPORT_BIT(0x0001, "Left Flipper", KEYCODE_LSHIFT) \ + COREPORT_BIT(0x0002, "Right Flipper", KEYCODE_RSHIFT) \ + COREPORT_BIT(0x0004, "U Left Flipper", KEYCODE_A) \ + COREPORT_BIT(0x0008, "Y Right Flipper", KEYCODE_L) + +/*----------------------- +/ Access to common ports +/------------------------*/ +/*-- manual switch keys --*/ +#define CORE_MANSWINPORT 0 +#define CORE_MANSWCOLUMNS 0x00ff +#define CORE_MANSWROWS 0xff00 + +/*-- common keys (start, tilt etc) --*/ +#define CORE_FLIPINPORT 1 +#define CORE_LLFLIPKEY 0x0001 +#define CORE_LRFLIPKEY 0x0002 +#define CORE_ULFLIPKEY 0x0004 +#define CORE_URFLIPKEY 0x0008 + +#define CORE_SIMINPORT 1 /* Inport for simulator */ +#define CORE_COREINPORT 2 /* Inport for core use */ + +// Macro to ease switch assignment +#define CORE_SETKEYSW(value, mask, swcol) \ + coreGlobals.swMatrix[(swcol)] = (coreGlobals.swMatrix[(swcol)] & ~(mask)) | ((value) & (mask)) + +/*------------------------------------------------------ +/ Flipper hardware is described with the following macros +/ (macros use FLIP_LL, FLIP_LR, FLIP_UL, FLIP_UR) +/ FLIP_SW() Flipper switches available +/ FLIP_SWNO(L,R) Flipper switch numbers if other than default (Pre-fliptronics) +/ FLIP_SOL() CPU controlled flippers +/ Example: CPU controlled upper right flipper +/ FLIP_SW(FLIP_LL | FLIP_LR | FLIP_UR) + FLIP_SOL(FLIP_LL | FLIP_LR | FLIP_UR) +/ Example: Flippers not controlled by CPU +/ FLIP_SWNO(swFlipL, swFlipR) +/--------------------------------------------------------------*/ +/*-- flipper names --*/ +#define FLIP_LR (0x1) +#define FLIP_LL (0x2) +#define FLIP_UR (0x4) +#define FLIP_UL (0x8) +#define FLIP_L (FLIP_LL | FLIP_LR) +#define FLIP_U (FLIP_UL | FLIP_UR) + +/*-- definition macros --*/ +#define FLIP_BUT(x) ((x)<<16) +#define FLIP_SW(x) ((x)<<20) +#define FLIP_SWNO(l,r) (((l)<<8)|(r)|FLIP_SW(FLIP_L)) +#define FLIP_EOS(x) ((x)<<28) +#define FLIP_SOL(x) (((x)<<24)|FLIP_EOS(x)) + +#define FLIP_SWL(x) (((x)>>8)&0xff) +#define FLIP_SWR(x) ((x)&0xff) + +/*--------------------- +/ Exported variables +/----------------------*/ +#define CORE_FLIPSTROKETIME 2 /* Timer for flipper to reach top VBLANKs */ + +/*----------------------------- +/ Generic Display layout data +/------------------------------*/ +/* The different kind of display units */ +#define CORE_SEG16 0 // 16 segments +#define CORE_SEG16R 1 // 16 segments with comma and period reversed +#define CORE_SEG10 2 // 9 segments and comma +#define CORE_SEG9 3 // 9 segments +#define CORE_SEG8 4 // 7 segments and comma +#define CORE_SEG8D 5 // 7 segments and period +#define CORE_SEG7 6 // 7 segments +#define CORE_SEG87 7 // 7 segments, comma every three +#define CORE_SEG87F 8 // 7 segments, forced comma every three +#define CORE_SEG98 9 // 9 segments, comma every three +#define CORE_SEG98F 10 // 9 segments, forced comma every three +#define CORE_SEG7S 11 // 7 segments, small +#define CORE_SEG7SC 12 // 7 segments, small, with comma +#define CORE_SEG16S 13 // 16 segments with split top and bottom line +#define CORE_DMD 14 // DMD Display +#define CORE_VIDEO 15 // VIDEO Display + +#define CORE_IMPORT 0x10 // Link to another display layout +#define CORE_SEGHIBIT 0x20 +#define CORE_SEGREV 0x40 +#define CORE_DMDNOAA 0x80 +#define CORE_SEGMASK 0x1f // Note that CORE_IMPORT must be part of the segmask as well! + +#define CORE_SEG8H (CORE_SEG8 | CORE_SEGHIBIT) +#define CORE_SEG7H (CORE_SEG7 | CORE_SEGHIBIT) +#define CORE_SEG87H (CORE_SEG87 | CORE_SEGHIBIT) +#define CORE_SEG87FH (CORE_SEG87F| CORE_SEGHIBIT) +#define CORE_SEG7SH (CORE_SEG7S | CORE_SEGHIBIT) +#define CORE_SEG7SCH (CORE_SEG7SC| CORE_SEGHIBIT) + +#define DMD_MAXX 256 +#define DMD_MAXY 64 + +typedef UINT8 tDMDDot[DMD_MAXY+2][DMD_MAXX+2]; + +/* Shortcuts for some common display sizes */ +#define DISP_SEG_16(row,type) {4*row, 0, 20*row, 16, type} +#define DISP_SEG_7(row,col,type) {4*row,16*col,row*20+col*8+1,7,type} +#define DISP_SEG_CREDIT(no1,no2,type) {2,2,no1,1,type},{2,4,no2,1,type} +#define DISP_SEG_BALLS(no1,no2,type) {2,8,no1,1,type},{2,10,no2,1,type} +#define DISP_SEG_IMPORT(x) {0,0,0,1,CORE_IMPORT,x} +/* display layout structure */ +/* Don't know how the LCD got in there. Should have been LED but now it + handles all kinds of displays so we call it dispLayout. + Keep the typedef of core_tLCDLayout for some time. */ +struct core_dispLayout { + UINT16 top, left, start, length, type; + void *ptr; +}; +typedef struct core_dispLayout core_tLCDLayout, *core_ptLCDLayout; + +#define PINMAME_VIDEO_UPDATE(name) int (name)(struct mame_bitmap *bitmap, const struct rectangle *cliprect, const struct core_dispLayout *layout) +typedef int (*ptPinMAMEvidUpdate)(struct mame_bitmap *bitmap, const struct rectangle *cliprect, const struct core_dispLayout *layout); +extern void video_update_core_dmd(struct mame_bitmap *bitmap, const struct rectangle *cliprect, tDMDDot dotCol, const struct core_dispLayout *layout); + +/*---------------------- +/ WPC driver constants +/-----------------------*/ +/* Solenoid numbering */ +/* WPC */ +/* 1-28 Standard */ +/* 33-36 Upper flipper solenoids */ +/* 37-40 Standard (WPC95 only) */ +/* 41-44 - "" - Copy of above */ +/* 45-48 Lower flipper solenoids */ +/* 49-50 Simulated */ +/* 51-44 */ +/* S9/S11 */ +/* 1- 8 Standard 'A'-side */ +/* 9-16 Standard */ +/* 17-22 Special */ +/* 23 Flipper & SS Enabled Sol (fake) */ +/* 25-32 Standard 'C'-side */ +/* 37-41 Sound overlay board */ +/* S7 */ +/* 1-16 Standard */ +/* 17-24 Special */ +/* 25 Flipper & SS Enabled Sol (fake) */ +/* BY17/BY35 */ +/* 1-15 Standard Pulse */ +/* 17-20 Standard Hold */ +/* GTS80 */ +/* 1- 9 Standard */ +/* 10 GameOn (fake) */ +/* 11 Tilt (for GI) (fake) */ +#define CORE_FIRSTEXTSOL 37 +#define CORE_FIRSTUFLIPSOL 33 +#define CORE_FIRSTCUSTSOL 51 +#define CORE_FIRSTLFLIPSOL 45 +#define CORE_FIRSTSIMSOL 49 + +#define CORE_SSFLIPENSOL 23 +#define CORE_FIRSTSSSOL 17 + +#define CORE_SOLBIT(x) (1<<((x)-1)) + +/* Flipper Solenoid numbers */ +#define sLRFlip (CORE_FIRSTLFLIPSOL+1) +#define sLRFlipPow (CORE_FIRSTLFLIPSOL+0) +#define sLLFlip (CORE_FIRSTLFLIPSOL+3) +#define sLLFlipPow (CORE_FIRSTLFLIPSOL+2) +#define sURFlip (CORE_FIRSTUFLIPSOL+1) +#define sURFlipPow (CORE_FIRSTUFLIPSOL+0) +#define sULFlip (CORE_FIRSTUFLIPSOL+3) +#define sULFlipPow (CORE_FIRSTUFLIPSOL+2) + +/*-- Flipper solenoid bits --*/ +#define CORE_LRFLIPSOLBITS 0x03 +#define CORE_LLFLIPSOLBITS 0x0c +#define CORE_URFLIPSOLBITS 0x30 +#define CORE_ULFLIPSOLBITS 0xc0 + +/*-- create a custom solenoid number --*/ +/* example: #define swCustom CORE_CUSTSOLNO(1) // custom solenoid 1 */ +#define CORE_CUSTSOLNO(n) (CORE_FIRSTCUSTSOL-1+(n)) + +#define CORE_STDLAMPCOLS 8 +#define CORE_STDSWCOLS 12 + +#define CORE_COINDOORSWCOL 0 /* internal array number */ +#define CORE_MAXSWCOL 16 /* switch columns (0-9=sw matrix, 10=coin door, 11=cabinet/flippers) */ +#define CORE_FLIPPERSWCOL 11 /* internal array number */ +#define CORE_CUSTSWCOL CORE_STDSWCOLS /* first custom (game specific) switch column */ +#define CORE_MAXLAMPCOL 42 /* lamp column (0-7=std lamp matrix 8- custom) */ +#define CORE_CUSTLAMPCOL CORE_STDLAMPCOLS /* first custom lamp column */ +#define CORE_MAXPORTS 8 /* Maximum input ports */ +#define CORE_MAXGI 5 /* Maximum GI strings */ + +/*-- create a custom switch number --*/ +/* example: #define swCustom CORE_CUSTSWNO(1,2) // custom column 1 row 2 */ +#define CORE_CUSTSWNO(c,r) ((CORE_CUSTSWCOL-1+c)*10+r) + +/*------------------- +/ Flipper Switches +/ in column FLIPPERSWCOL +/--------------------*/ +#define CORE_SWLRFLIPEOSBIT 0x01 +#define CORE_SWLRFLIPBUTBIT 0x02 +#define CORE_SWLLFLIPEOSBIT 0x04 +#define CORE_SWLLFLIPBUTBIT 0x08 +#define CORE_SWURFLIPEOSBIT 0x10 +#define CORE_SWURFLIPBUTBIT 0x20 +#define CORE_SWULFLIPEOSBIT 0x40 +#define CORE_SWULFLIPBUTBIT 0x80 + +#define CORE_FIRSTSIMROW 80 /* first free row on display */ + +/*-- Colours --*/ +#define CORE_COLOR(x) Machine->pens[(x)] +#define COL_DMD 1 +#define COL_DMDOFF (COL_DMD+0) +#define COL_DMD33 (COL_DMD+1) +#define COL_DMD66 (COL_DMD+2) +#define COL_DMDON (COL_DMD+3) +#define COL_DMDCOUNT 4 +#define COL_LAMP (COL_DMD+COL_DMDCOUNT) +#define COL_LAMPCOUNT 8 +#define COL_SHADE(x) (COL_LAMPCOUNT+(x)) +#define COL_DMDAA (COL_LAMP+COL_LAMPCOUNT*2) +#define COL_DMDAACOUNT 7 +#define COL_SEGAAON1 (COL_DMDAA+COL_DMDAACOUNT) +#define COL_SEGAAON2 (COL_SEGAAON1+1) +#define COL_SEGAAOFF1 (COL_SEGAAON1+2) +#define COL_SEGAAOFF2 (COL_SEGAAON1+3) +#define COL_SEGAACOUNT 4 +#define COL_COUNT (COL_SEGAAON1+COL_SEGAACOUNT) + +/* Lamp Colors */ +#define BLACK (COL_LAMP+0) +#define WHITE (COL_LAMP+1) +#define GREEN (COL_LAMP+2) +#define RED (COL_LAMP+3) +#define ORANGE (COL_LAMP+4) +#define YELLOW (COL_LAMP+5) +#define LBLUE (COL_LAMP+6) +#define LPURPLE (COL_LAMP+7) + +/*------------------------------------------- +/ Draw data. draw lamps,switches,solenoids +/ in this way instead of a matrix +/--------------------------------------------*/ +typedef struct { + UINT8 x,y, color; +} core_tDrawData; + +typedef struct { + UINT8 totnum; /*Total # of lamp positions defined - Up to 4 Max*/ + core_tDrawData lamppos[4]; /*Can support up to 4 lamp positions for each lamp matrix entry!*/ +} core_tLampData; /*This means, one lamp matrix entry can share up to 4 bulbs on the playfield*/ + +typedef struct { + core_tDrawData startpos; /*Starting Coordinates to draw matrix*/ + core_tDrawData size; /*Size of lamp matrix*/ + core_tLampData lamps[CORE_MAXLAMPCOL*8]; /*Can support up to 160 lamps!*/ +} core_tLampDisplay; + +#define CORE_SEGCOUNT 64 +#ifdef LSB_FIRST +typedef union { struct { UINT8 lo, hi; } b; UINT16 w; } core_tSeg[CORE_SEGCOUNT]; +#else /* LSB_FIRST */ +typedef union { struct { UINT8 hi, lo; } b; UINT16 w; } core_tSeg[CORE_SEGCOUNT]; +#endif /* LSB_FIRST */ +typedef struct { + UINT8 swMatrix[CORE_MAXSWCOL]; + UINT8 invSw[CORE_MAXSWCOL]; /* Active low switches */ + UINT8 lampMatrix[CORE_MAXLAMPCOL], tmpLampMatrix[CORE_MAXLAMPCOL]; + core_tSeg segments; /* segments data from driver */ + UINT16 drawSeg[CORE_SEGCOUNT]; /* segments drawn */ + UINT32 solenoids; /* on power driver bord */ + UINT32 solenoids2; /* flipper solenoids */ + UINT32 pulsedSolState; /* current pulse value of solenoids on driver board */ + UINT64 lastSol; /* last state of all solenoids */ + int gi[CORE_MAXGI]; /* WPC gi strings */ + int simAvail; /* simulator (keys) available */ + int soundEn; /* Sound enabled ? */ + int diagnosticLed; /* data relating to diagnostic led(s)*/ + char segDim[CORE_SEGCOUNT]; /* segments dimming */ +} core_tGlobals; +extern core_tGlobals coreGlobals; +/* shortcut for coreGlobals */ +#define cg coreGlobals +extern struct pinMachine *coreData; +/*Exported variables*/ +/*-- There are no custom fields in the game driver --*/ +/*-- so I have to invent some by myself. Each driver --*/ +/*-- fills in one of these in the game_init function --*/ +typedef struct { + UINT64 gen; /* Hardware Generation */ + const struct core_dispLayout *lcdLayout; /* LCD display layout */ + struct { + UINT32 flippers; /* flippers installed (see defines below) */ + int swCol, lampCol, custSol; /* Custom switch columns, lamp columns and solenoids */ + UINT32 soundBoard, display; + UINT32 gameSpecific1, gameSpecific2; + /*-- custom functions --*/ + int (*getSol)(int solNo); /* get state of custom solenoid */ + void (*handleMech)(int mech); /* update switches depending on playfield mechanics */ + int (*getMech)(int mechNo); /* get status of mechanics */ + void (*drawMech)(BMTYPE **line); /* draw game specific hardware */ + core_tLampDisplay *lampData; /* lamp layout */ + wpc_tSamSolMap *solsammap; /* solenoids samples */ + } hw; + const void *simData; + struct { /* WPC specific stuff */ + char serialNo[21]; /* Securty chip serial number */ + UINT8 invSw[CORE_MAXSWCOL]; /* inverted switches (e.g. optos) */ + /* common switches */ + struct { int start, tilt, sTilt, coinDoor, shooter; } comSw; + } wpc; + struct { /* S3-S11 specific stuff (incl DE) */ + int muxSol; /* S11 Mux solenoid */ + int ssSw[8]; /* Special solenoid switches */ + } sxx; + /* simulator data */ +} core_tGameData; +extern const core_tGameData *core_gameData; + +extern const int core_bcd2seg9[]; /* BCD to 9 segment display */ +extern const int core_bcd2seg9a[]; /* BCD to 9 segment display, missing 6 top line */ +extern const int core_bcd2seg7[]; /* BCD to 7 segment display */ +extern const int core_bcd2seg7a[]; /* BCD to 7 segment display, missing 6 top line */ +extern const int core_bcd2seg7e[]; /* BCD to 7 segment display with A to E letters */ +#define core_bcd2seg core_bcd2seg7 + +/*-- Exported Display handling functions--*/ +void core_updateSw(int flipEn); + +/*-- text output functions --*/ +void core_textOut(char *buf, int length, int x, int y, int color); +void CLIB_DECL core_textOutf(int x, int y, int color, const char *text, ...); + +/*-- lamp handling --*/ +void core_setLamp(UINT8 *lampMatrix, int col, int row); +void core_setLampBlank(UINT8 *lampMatrix, int col, int row); + +/*-- switch handling --*/ +extern void core_setSw(int swNo, int value); +extern int core_getSw(int swNo); +extern void core_updInvSw(int swNo, int inv); + +/*-- get a switch column. (colEn=bits) --*/ +extern int core_getSwCol(int colEn); + +/*-- solenoid handling --*/ +extern int core_getSol(int solNo); +extern int core_getPulsedSol(int solNo); +extern UINT64 core_getAllSol(void); + +/*-- nvram handling --*/ +extern void core_nvram(void *file, int write, void *mem, int length, UINT8 init); + +/* makes it easier to swap bits */ +extern const UINT8 core_swapNyb[16]; +INLINE UINT8 core_revbyte(UINT8 x) { return (core_swapNyb[x & 0xf]<<4)|(core_swapNyb[x>>4]); } +INLINE UINT8 core_revnyb(UINT8 x) { return core_swapNyb[x]; } +INLINE UINT16 core_revword(UINT16 x) { + UINT8 lo,hi; + lo = core_revbyte(x & 0x00ff); + hi = core_revbyte((x & 0xff00)>>8); + return ((lo<<8) | hi); +} + +/*-- core DIP handling --*/ +// Get the status of a DIP bank (8 dips) +extern int core_getDip(int dipBank); + +/*-- Easy Bit Column to Number conversion + * Convert Bit Column Data to corresponding #, ie, if Bit 3=1, return 3 - Zero Based (Bit1=1 returns 0) + * Assumes only 1 bit is set at a time. --*/ +INLINE int core_BitColToNum(int tmp) +{ + int data=0, i=0; + do { + if (tmp & 1) data += i; + i++; + } while (tmp >>= 1); + return data; +} + +extern MACHINE_DRIVER_EXTERN(PinMAME); +#endif /* INC_CORE */ + +#endif + + diff --git a/src/mame/drivers/p_s11.c b/src/mame/drivers/p_s11.c new file mode 100644 index 00000000000..c45a082cded --- /dev/null +++ b/src/mame/drivers/p_s11.c @@ -0,0 +1,1741 @@ +/*********************************************************************************************************** + Project to port PinMAME drivers back to MAME 06/02/09 + + This adapted to compile (not run) using skeleton structures under new versions of MAME. Everyhing will + need further heavy refactoring, I feel the overuse of driver specific Macros in PinMAME makes for very + difficult reading and a lot of the PinMAME art simulation can be handled by the MAME artwork system now. + +***********************************************************************************************************/ + +#include "driver.h" +#include "p_core.h" +#include "p_wmssnd.h" +#include "p_s11.h" + +static MACHINE_DRIVER_START(s11) +MACHINE_DRIVER_END + +/* System 9 */ +static MACHINE_DRIVER_START(s11_s9S) +MACHINE_DRIVER_END + +/* System 11 with S11C sound board, diagnostic digit */ +static MACHINE_DRIVER_START(s11_s11XS) +MACHINE_DRIVER_END + +/* Pennant Fever */ +static MACHINE_DRIVER_START(s11_s9PS) +MACHINE_DRIVER_END + +/* System 11 with S11C sound board, diagnostic LED only */ +static MACHINE_DRIVER_START(s11_s11XSL) +MACHINE_DRIVER_END + +/* System 11a without external sound board*/ +static MACHINE_DRIVER_START(s11_s11S) +MACHINE_DRIVER_END + +/* System 11a with S11C sound board */ +static MACHINE_DRIVER_START(s11_s11aS) +MACHINE_DRIVER_END + +/* System 11B with Jokerz! sound board*/ +static MACHINE_DRIVER_START(s11_s11b2S) +MACHINE_DRIVER_END + +/* System 11C */ +static MACHINE_DRIVER_START(s11_s11cS) +MACHINE_DRIVER_END + +/* DE alpa numeric No Sound */ +static MACHINE_DRIVER_START(de_a) +MACHINE_DRIVER_END + +/* DE alphanumeric Sound 1 */ +static MACHINE_DRIVER_START(de_a1S) +MACHINE_DRIVER_END + +/* DE 128x16 Sound 1 */ +static MACHINE_DRIVER_START(de_dmd161S) +MACHINE_DRIVER_END + +/* DE 128x16 Sound 2a */ +static MACHINE_DRIVER_START(de_dmd162aS) +MACHINE_DRIVER_END + +/* DE 128x32 Sound 2a */ +static MACHINE_DRIVER_START(de_dmd322aS) +MACHINE_DRIVER_END + +/* DE 192x64 Sound 2a */ +static MACHINE_DRIVER_START(de_dmd642aS) +MACHINE_DRIVER_END + +S11_INPUT_PORTS_START(s11, 1) S11_INPUT_PORTS_END + +static MACHINE_DRIVER_START(s11a_one) +MACHINE_DRIVER_END + +static MACHINE_DRIVER_START(s11c_one) +MACHINE_DRIVER_END + +#define INITGAME(name, gen, disp, mux, flip, db, gs1) \ + DRIVER_INIT( name ) { } \ + +#define INITGAMEFULL(name, gen, disp, mux, flip, db, gs1, gs2,ss17,ss18,ss19,ss20,ss21,ss22) \ + DRIVER_INIT( name ) { } \ + +/* +Issues: +Pool: Sound loops on startup, stops after one minute? +Jokerz: Startup sound does not stop +*/ + +#if 0 + +#define INITGAME(name, gen, disp, mux, flip, db, gs1) \ +static core_tGameData name##GameData = { \ + gen, disp, {flip,0,0,0,0,db,gs1}, NULL, {{0}}, {mux} }; \ +static void init_##name(void) { core_gameData = &name##GameData; } + +#define INITGAMEFULL(name, gen, disp, mux, flip, db, gs1, gs2,ss17,ss18,ss19,ss20,ss21,ss22) \ +static core_tGameData name##GameData = { \ + gen, disp, {flip,0,0,0,0,db,gs1,gs2}, NULL, {{0}}, {mux,{ss17,ss18,ss19,ss20,ss21,ss22}}}; \ +static void init_##name(void) { core_gameData = &name##GameData; } + + +static core_tLCDLayout disp16oneline[] = { \ + {0,0,0,16,CORE_SEG16},{0,33,20,16,CORE_SEG16}, {0} +}; + +static core_tLCDLayout dispTaxi[] = { \ + DISP_SEG_16(0,CORE_SEG16),DISP_SEG_16(1,CORE_SEG8),\ + { 2, 0,21,7,CORE_SEG7SCH},{0} +}; + +static core_tLCDLayout dispPolic[] = { + { 0,8,20, 8,CORE_SEG8H }, + { 2,0, 0,16,CORE_SEG16 }, + { 4,0,20,16,CORE_SEG8},{0} +}; + +static core_tLCDLayout dispRvrbt[] = { + { 0,18,21, 7, CORE_SEG87H }, + { 0, 4,32, 4, CORE_SEG7H }, + { 2, 0, 0,16, CORE_SEG16 }, + { 4, 0,20,16, CORE_SEG8 },{0} +}; + +static MACHINE_DRIVER_START(s11a_one) + MDRV_IMPORT_FROM(s11_s11aS) + MDRV_SCREEN_SIZE(640, 400) + MDRV_VISIBLE_AREA(0, 639, 0, 399) +MACHINE_DRIVER_END + +static MACHINE_DRIVER_START(s11c_one) + MDRV_IMPORT_FROM(s11_s11cS) + MDRV_SCREEN_SIZE(640, 400) + MDRV_VISIBLE_AREA(0, 639, 0, 399) +MACHINE_DRIVER_END +#endif + + +/*-------------------- +/ Space Shuttle (S9) 12/84 +/--------------------*/ +#if 0 +static core_tLCDLayout dispSshtl[] = { \ + { 0, 0,21,7, CORE_SEG87}, + { 2, 0,29,7, CORE_SEG87}, + { 4, 0, 1,7, CORE_SEG87}, { 4,26, 9,7,CORE_SEG87}, + { 5,16, 0,1, CORE_SEG7}, { 5,18, 8,1,CORE_SEG7}, + { 5,21,20,1, CORE_SEG7}, { 5,23,28,1,CORE_SEG7},{0} +}; +#endif + +INITGAMEFULL(sshtl, GEN_S9, dispSshtl, 0, FLIP_SWNO(0,41), + S11_BCDDIAG|S11_BCDDISP,0,3750, 39, 40, 27, 26, 25, 0) +S9_ROMSTARTx4(sshtl,l7,"cpu_u20.128", CRC(848ad54c) SHA1(4e4ce5fb970da37706472f94a27fd912e1ecb1a0)) +S9S_SOUNDROM4111( "cpu_u49.128", CRC(20e77990) SHA1(b9ec143526d7d152b653c7119e4d07945b6813eb), + "spch_u4.732", CRC(b0d03c5e) SHA1(46b952f71a7ecc03e22e427875f6e16a9d124067), + "spch_u5.732", CRC(13edd4e5) SHA1(46c4052c31ddc20bb87445636f8fe3b6f7bff856), + "spch_u6.732", CRC(cf48b2e7) SHA1(fe55419a5d40b3a4e8c02a92746b25a075b8efd3)) +S9_ROMEND +#define ipt_sshtl ipt_s11 +CORE_GAMEDEF(sshtl, l7, "Space Shuttle (L-7) (Pinball)", 1984, "Williams", s9_mS9S,0) + +/*-------------------- +/ Sorcerer (S9) 03/85 +/--------------------*/ +INITGAMEFULL(sorcr, GEN_S9, s11_dispS9, 0, FLIP_SWNO(0,44), + S11_BCDDIAG|S11_BCDDISP,0,0,32,33,21,22,23,0) +S9_ROMSTART12(sorcr,l1,"cpu_u19.732", CRC(88b6837d) SHA1(d26b06342741443406a72ba48a70e82df62bb26e), + "cpu_u20.764", CRC(c235b692) SHA1(d3b97fad2d501c894570601b387933c7644f64e6)) +S9S_SOUNDROM41111( "cpu_u49.128", CRC(a0bae1e4) SHA1(dc5172aa1d59191d4119da20757cb2c2469f8fe3), + "spch_u4.732", CRC(0c81902d) SHA1(6d8f703327e5c73a321fc4aa3a67ce68fff82d70), + "spch_u5.732", CRC(d48c68ad) SHA1(b1391b87519ad47be3dcce7f8581f871e6a3669f), + "spch_u6.732", CRC(a5c54d47) SHA1(4e1206412ecf52ae61c9df2055e0715749a6325d), + "spch_u7.732", CRC(bba9ed18) SHA1(8e37ba8cb6bbc1e0afeef230088beda4513adddb)) +S9_ROMEND +#define ipt_sorcr ipt_s11 +CORE_CLONEDEF(sorcr,l1,l2, "Sorcerer (L-1) (Pinball)", 1985, "Williams", s9_mS9S,0) + +S9_ROMSTART12(sorcr,l2,"cpu_u19.l2", CRC(faf738db) SHA1(a3b3f4160dc837ddf5379e1edb0eafeefcc11e3d), + "cpu_u20.l2", CRC(74fc8117) SHA1(c228c76ade670603f77bb324e6794ec6dd358285)) +S9S_SOUNDROM41111( "cpu_u49.128", CRC(a0bae1e4) SHA1(dc5172aa1d59191d4119da20757cb2c2469f8fe3), + "spch_u4.732", CRC(0c81902d) SHA1(6d8f703327e5c73a321fc4aa3a67ce68fff82d70), + "spch_u5.732", CRC(d48c68ad) SHA1(b1391b87519ad47be3dcce7f8581f871e6a3669f), + "spch_u6.732", CRC(a5c54d47) SHA1(4e1206412ecf52ae61c9df2055e0715749a6325d), + "spch_u7.732", CRC(bba9ed18) SHA1(8e37ba8cb6bbc1e0afeef230088beda4513adddb)) +S9_ROMEND +CORE_GAMEDEF(sorcr, l2, "Sorcerer (L-2) (Pinball)", 1985, "Williams", s9_mS9S,0) + +/*-------------------- +/ Comet (S9) 06/85 +/--------------------*/ +INITGAMEFULL(comet, GEN_S9, s11_dispS9, 0, FLIP_SWNO(0,30), + S11_BCDDIAG|S11_BCDDISP,0,0,47,48,40,41,42,0) +S9_ROMSTARTx4(comet,l4,"cpu_u20.128", CRC(36193600) SHA1(efdc44ef26c2def8f860a0296e27b2c3dac55ec8)) +S9S_SOUNDROM41111( "cpu_u49.128", CRC(f1db0cbe) SHA1(59b7f36fb2003b90b288abeff56df62ce50f10c6), + "spch_u4.732", CRC(d0215c49) SHA1(4f0925a826199b6e8baa5e7fbff5cde9e31d505b), + "spch_u5.732", CRC(89f7ede5) SHA1(bbfbd991c9e005c2fa36d8458803b121f4933618), + "spch_u6.732", CRC(6ba2aba6) SHA1(783b4e9b38db8677d91f86cb4805f0fa1ae8f856), + "spch_u7.732", CRC(36545b22) SHA1(f4a026f3fa58dce81b439d76120a6769f4632955)) +S9_ROMEND +#define ipt_comet ipt_s11 +CORE_CLONEDEF(comet,l4,l5,"Comet (L-4) (Pinball)", 1985, "Williams", s9_mS9S,0) + +S9_ROMSTARTx4(comet,l5,"cpu_u20.l5", CRC(d153d9ab) SHA1(0b97591b8ba35207b1427900486d69078ae122bc)) +S9S_SOUNDROM41111( "cpu_u49.128", CRC(f1db0cbe) SHA1(59b7f36fb2003b90b288abeff56df62ce50f10c6), + "spch_u4.732", CRC(d0215c49) SHA1(4f0925a826199b6e8baa5e7fbff5cde9e31d505b), + "spch_u5.732", CRC(89f7ede5) SHA1(bbfbd991c9e005c2fa36d8458803b121f4933618), + "spch_u6.732", CRC(6ba2aba6) SHA1(783b4e9b38db8677d91f86cb4805f0fa1ae8f856), + "spch_u7.732", CRC(36545b22) SHA1(f4a026f3fa58dce81b439d76120a6769f4632955)) +S9_ROMEND +CORE_GAMEDEF(comet, l5, "Comet (L-5) (Pinball)", 1985, "Williams", s9_mS9S,0) + +/*-------------------- +/ High Speed 01/86 +/--------------------*/ +INITGAMEFULL(hs, GEN_S11X, s11_dispS11, 0, FLIP_SWNO(37,38), + S11_BCDDIAG,0,0,49,50,35,34,33,0) +S11_ROMSTART28(hs,l4,"hs_u26.l4", CRC(38b73830) SHA1(df89670f3df2b657dcf1f8ee08e506e54e016028), + "hs_u27.l4", CRC(24c6f7f0) SHA1(bb0058650ec0908f88b6a202df79e971b46f8594)) +S11XS_SOUNDROM88( "hs_u21.l2", CRC(c0580037) SHA1(675ca65a6a20f8607232c532b4d127641f77d837), + "hs_u22.l2", CRC(c03be631) SHA1(53823e0f55377a45aa181882c310dd307cf368f5)) +S11CS_SOUNDROM8( "hs_u4.l1", CRC(0f96e094) SHA1(58650705a02a71ced85f5c2a243722a35282cbf7)) +S11_ROMEND +#define ipt_hs ipt_s11 + +S11_ROMSTART28(hs,l3,"u26-l3.rom", CRC(fd587959) SHA1(20fe6d7bd617b1fa886362ce520393a25be9a632), + "hs_u27.l4", CRC(24c6f7f0) SHA1(bb0058650ec0908f88b6a202df79e971b46f8594)) +S11XS_SOUNDROM88( "hs_u21.l2", CRC(c0580037) SHA1(675ca65a6a20f8607232c532b4d127641f77d837), + "hs_u22.l2", CRC(c03be631) SHA1(53823e0f55377a45aa181882c310dd307cf368f5)) +S11CS_SOUNDROM8( "hs_u4.l1", CRC(0f96e094) SHA1(58650705a02a71ced85f5c2a243722a35282cbf7)) +S11_ROMEND + +CORE_GAMEDEF(hs, l4, "High Speed (L-4) (Pinball)", 1986, "Williams", s11_mS11XS,0) +CORE_CLONEDEF(hs,l3,l4, "High Speed (L-3) (Pinball)", 1986, "Williams", s11_mS11XS,0) + +/*-------------------- +/ Grand Lizard 04/86 +/--------------------*/ +INITGAMEFULL(grand, GEN_S11X, s11_dispS11, 0, FLIP_SWNO(0,48), + S11_BCDDIAG,0,0,43,44,0,0,0,0) +S11_ROMSTART28(grand,l4,"lzrd_u26.l4", CRC(5fe50db6) SHA1(7e2adfefce5c33ad605606574dbdfb2642aa0e85), + "lzrd_u27.l4", CRC(6462ca55) SHA1(0ebfa998d3cefc213ada9ed815d44977120e5d6d)) +S11XS_SOUNDROM44( "lzrd_u21.l1", CRC(98859d37) SHA1(08429b9e6a3b3007815373dc280b985e3441aa9f), + "lzrd_u22.l1", CRC(4e782eba) SHA1(b44ab499128300175bdb57f07ffe2992c82e47e4)) +S11CS_SOUNDROM8( "lzrd_u4.l1", CRC(4baafc11) SHA1(3507f5f37e02688fa56cf5bb303eaccdcedede06)) +S11_ROMEND +#define ipt_grand ipt_s11 +CORE_GAMEDEF(grand, l4, "Grand Lizard (L-4) (Pinball)", 1986, "Williams", s11_mS11XS,0) + +/*-------------------- +/ Road Kings 07/86 +/--------------------*/ +INITGAMEFULL(rdkng, GEN_S11X, s11_dispS11,12, FLIP_SWNO(47,48), + S11_BCDDIAG,S11_RKMUX,0,43,44,24,25,26,27) +S11_ROMSTART48(rdkng,l4,"road_u26.l4", CRC(4ea27d67) SHA1(cf46e8c5e417999150403d6d40adf8c36b1c0347), + "road_u27.l4", CRC(5b88e755) SHA1(6438505bb335f670e0892126764819a48eec9b88)) +S11XS_SOUNDROM88( "road_u21.l1", CRC(f34efbf4) SHA1(cb5ffe9818994f4681e3492a5cd46f410d2e5353), + "road_u22.l1", CRC(a9803804) SHA1(a400d4621c3f7a6e47546b2f33dc4920183a5a74)) +S11CS_SOUNDROM8( "road_u4.l1", CRC(4395b48f) SHA1(2325ce6ba7f6f92f884c302e6f053c31229dc774)) +S11_ROMEND +#define ipt_rdkng ipt_s11 +CORE_GAMEDEF(rdkng, l4, "Road Kings (L-4) (Pinball)", 1986, "Williams", s11_mS11XS,0) + +S11_ROMSTART48(rdkng,l1,"road_u26.l1", CRC(19abe96b) SHA1(d6c3b6dab328f23cc4506e4f56cd0beeb06fb3cb), + "road_u27.l1", CRC(3dcad794) SHA1(0cf06f8e16d738f0bc0111e2e12351a26e2f02c6)) +S11XS_SOUNDROM88( "road_u21.l1", CRC(f34efbf4) SHA1(cb5ffe9818994f4681e3492a5cd46f410d2e5353), + "road_u22.l1", CRC(a9803804) SHA1(a400d4621c3f7a6e47546b2f33dc4920183a5a74)) +S11CS_SOUNDROM8( "road_u4.l1", CRC(4395b48f) SHA1(2325ce6ba7f6f92f884c302e6f053c31229dc774)) +S11_ROMEND +CORE_CLONEDEF(rdkng,l1,l4,"Road Kings (L-1) (Pinball)", 1986, "Williams", s11_mS11XS,0) + +S11_ROMSTART48(rdkng,l2,"road_u26.l1", CRC(19abe96b) SHA1(d6c3b6dab328f23cc4506e4f56cd0beeb06fb3cb), + "road_u27.l2", CRC(aff45e2b) SHA1(c52aca20639f519a940951ef04c2bd179a596b30)) +S11XS_SOUNDROM88( "road_u21.l1", CRC(f34efbf4) SHA1(cb5ffe9818994f4681e3492a5cd46f410d2e5353), + "road_u22.l1", CRC(a9803804) SHA1(a400d4621c3f7a6e47546b2f33dc4920183a5a74)) +S11CS_SOUNDROM8( "road_u4.l1", CRC(4395b48f) SHA1(2325ce6ba7f6f92f884c302e6f053c31229dc774)) +S11_ROMEND +CORE_CLONEDEF(rdkng,l2,l4,"Road Kings (L-2) (Pinball)", 1986, "Williams", s11_mS11XS,0) + +S11_ROMSTART48(rdkng,l3,"road_u26.l3", CRC(9bade45d) SHA1(c1791724761cdd1d863e12b02655c5fed8936162), + "road_u27.l3", CRC(97b599dc) SHA1(18524d22a75b0569bb480d847cef8047ee51f91e)) +S11XS_SOUNDROM88( "road_u21.l1", CRC(f34efbf4) SHA1(cb5ffe9818994f4681e3492a5cd46f410d2e5353), + "road_u22.l1", CRC(a9803804) SHA1(a400d4621c3f7a6e47546b2f33dc4920183a5a74)) +S11CS_SOUNDROM8( "road_u4.l1", CRC(4395b48f) SHA1(2325ce6ba7f6f92f884c302e6f053c31229dc774)) +S11_ROMEND +CORE_CLONEDEF(rdkng,l3,l4,"Road Kings (L-3) (Pinball)", 1986, "Williams", s11_mS11XS,0) + +/*-------------------- +/ Pinbot 10/86 +/--------------------*/ +INITGAMEFULL(pb, GEN_S11X, s11_dispS11, 14, FLIP_SWNO(10,11), + 0,0,0, 53, 0, 48, 54, 55,52) +S11_ROMSTART48(pb,l5,"pbot_u26.l5", CRC(daa0c8e4) SHA1(47289b350eb0d84aa0d37e53383e18625451bbe8), + "pbot_u27.l5", CRC(e625d6ce) SHA1(1858dc2183954342b8e2e5eb9a14edcaa8dad5ae)) +S11XS_SOUNDROM88( "pbot_u21.l1", CRC(3eab88d9) SHA1(667e3b675e2ae8fec6a6faddb9b0dd5531d64f8f), + "pbot_u22.l1", CRC(a2d2c9cb) SHA1(46437dc54538f1626caf41a2818ddcf8000c44e4)) +S11CS_SOUNDROM88( "pbot_u4.l1", CRC(de5926bd) SHA1(3d111e27c5f0c8c0afc5fe5cc45bf77c12b69228), + "pbot_u19.l1", CRC(40eb4e9f) SHA1(07b0557b35599a2dd5aa66a306fbbe8f50eed998)) +S11_ROMEND +#define ipt_pb ipt_s11 + +S11_ROMSTART48(pb,l2,"u26-l2.rom", CRC(e3b94ca4) SHA1(1db2acb025941cc165cc7ec70a160e07ab1eeb2e), + "u27-l2.rom", CRC(0a334fc5) SHA1(d08afe6ddc141e37f97ea588d184a316ff7f6db7)) +S11XS_SOUNDROM88( "pbot_u21.l1", CRC(3eab88d9) SHA1(667e3b675e2ae8fec6a6faddb9b0dd5531d64f8f), + "pbot_u22.l1", CRC(a2d2c9cb) SHA1(46437dc54538f1626caf41a2818ddcf8000c44e4)) +S11CS_SOUNDROM88( "pbot_u4.l1", CRC(de5926bd) SHA1(3d111e27c5f0c8c0afc5fe5cc45bf77c12b69228), + "pbot_u19.l1", CRC(40eb4e9f) SHA1(07b0557b35599a2dd5aa66a306fbbe8f50eed998)) +S11_ROMEND + +S11_ROMSTART48(pb,l3,"u26-l2.rom", CRC(e3b94ca4) SHA1(1db2acb025941cc165cc7ec70a160e07ab1eeb2e), + "u27-l3.rom", CRC(6f40ee84) SHA1(85453137e3fdb1e422e3903dd053e04c9f2b9607)) +S11XS_SOUNDROM88( "pbot_u21.l1", CRC(3eab88d9) SHA1(667e3b675e2ae8fec6a6faddb9b0dd5531d64f8f), + "pbot_u22.l1", CRC(a2d2c9cb) SHA1(46437dc54538f1626caf41a2818ddcf8000c44e4)) +S11CS_SOUNDROM88( "pbot_u4.l1", CRC(de5926bd) SHA1(3d111e27c5f0c8c0afc5fe5cc45bf77c12b69228), + "pbot_u19.l1", CRC(40eb4e9f) SHA1(07b0557b35599a2dd5aa66a306fbbe8f50eed998)) +S11_ROMEND + +CORE_GAMEDEF(pb, l5, "Pinbot (L-5) (Pinball)", 1987, "Williams", s11_mS11XSL,0) +CORE_CLONEDEF(pb,l2,l5, "Pinbot (L-2) (Pinball)", 1987, "Williams", s11_mS11XSL,0) +CORE_CLONEDEF(pb,l3,l5, "Pinbot (L-3) (Pinball)", 1987, "Williams", s11_mS11XSL,0) + +/*-------------------- +/ F14 Tomcat 3/87 +/--------------------*/ +INITGAMEFULL(f14, GEN_S11A, s11_dispS11a, 14, FLIP_SWNO(15,63), + 0,0,0, 57, 58, 0, 28, 0, 0) +S11_ROMSTART48(f14,l1,"f14_u26.l1", CRC(62c2e615) SHA1(456ce0d1f74fa5e619c272880ba8ac6819848ddc), + "f14_u27.l1", CRC(da1740f7) SHA1(1395a4f3891a043cfedc5426ec88af35eab8d4ea)) +S11XS_SOUNDROM88( "f14_u21.l1", CRC(e412300c) SHA1(382d0cfa47abea295f0c7501bc0a010473e9d73b), + "f14_u22.l1", CRC(c9dd7496) SHA1(de3cb855d87033274cc912578b02d1593d2d69f9)) +S11CS_SOUNDROM88( "f14_u4.l1", CRC(43ecaabf) SHA1(64b50dbff03cd556130d0cff47b951fdf37d397d), + "f14_u19.l1", CRC(d0de4a7c) SHA1(46ecd5786653add47751cc56b38d9db7c4622377)) +S11_ROMEND +#define ipt_f14 ipt_s11 +CORE_GAMEDEF(f14, l1, "F14 Tomcat (L-1) (Pinball)", 1987, "Williams", s11_mS11AS,0) + +/*-------------------- +/ Fire! 8/87 +/--------------------*/ +INITGAMEFULL(fire, GEN_S11A, s11_dispS11a, 12, FLIP_SWNO(23,24), + 0,0,0, 0,0, 61, 62, 57, 58) +S11_ROMSTART48(fire,l3,"fire_u26.l3", CRC(48abae33) SHA1(00ce24316aa007eec090ae74818003e11a141214), + "fire_u27.l3", CRC(4ebf4888) SHA1(45dc0231404ed70be2ab5d599a673aac6271550e)) +S11XS_SOUNDROM88( "fire_u21.l2", CRC(2edde0a4) SHA1(de292a340a3a06b0b996fc69fee73eb7bbfbbe64), + "fire_u22.l2", CRC(16145c97) SHA1(523e99df3907a2c843c6e27df4d16799c4136a46)) +S11CS_SOUNDROM8( "fire_u4.l1", CRC(0e058918) SHA1(4d6bf2290141119174787f8dd653c47ea4c73693)) + +S11_ROMEND +#define ipt_fire ipt_s11 +CORE_GAMEDEF(fire, l3, "Fire! (L-3) (Pinball)", 1987, "Williams", s11_mS11AS,0) + +/*-------------------- +/ Big Guns 10/87 +/--------------------*/ +INITGAME(bguns, GEN_S11A,s11_dispS11a,12, FLIP_SWNO(52,53) ,0,0) +S11_ROMSTART48(bguns,l8,"guns_u26.l8", CRC(792dc1e8) SHA1(34586585bbaf579cb522569238e24d9ab891b471), + "guns_u27.l8", CRC(ac4a1a51) SHA1(d48b5e5b550107df8c6edc2d5f78777d7d408959)) +S11XS_SOUNDROM88( "guns_u21.l1", CRC(35c6bfe4) SHA1(83dbd10311add75f56046de58d315f8a87389703), + "guns_u22.l1", CRC(091a5cb8) SHA1(db77314241eb6ed7f4385f99312a49b7caad1283)) +S11CS_SOUNDROM88( "gund_u4.l1", CRC(d4a430a3) SHA1(5b44e3f313cc7cb75f51c239013d46e5eb986f9d), + "guns_u19.l1", CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) +S11_ROMEND +#define ipt_bguns ipt_s11 +CORE_GAMEDEF(bguns, l8, "Big Guns (L-8) (Pinball)", 1987, "Williams", s11_mS11AS,0) + +S11_ROMSTART48(bguns,l7,"guns_u26.l8", CRC(792dc1e8) SHA1(34586585bbaf579cb522569238e24d9ab891b471), + "guns_u27.l7", CRC(8ff26d24) SHA1(eab732b401144ad7efc80d336299beae85ca7d24)) +S11XS_SOUNDROM88( "guns_u21.l1", CRC(35c6bfe4) SHA1(83dbd10311add75f56046de58d315f8a87389703), + "guns_u22.l1", CRC(091a5cb8) SHA1(db77314241eb6ed7f4385f99312a49b7caad1283)) +S11CS_SOUNDROM88( "gund_u4.l1", CRC(d4a430a3) SHA1(5b44e3f313cc7cb75f51c239013d46e5eb986f9d), + "guns_u19.l1", CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) +S11_ROMEND +CORE_CLONEDEF(bguns,l7,l8,"Big Guns (L-7) (Pinball)", 1987, "Williams", s11_mS11AS,0) + +S11_ROMSTART48(bguns,la,"u26-l-a.rom", CRC(613b4d5c) SHA1(7eed4ddb661cd03839a9a89ca695de9cbd1c4d45), + "u27-l-a.rom", CRC(eee9e1cc) SHA1(32fbade5cbc9047a61d4ce0ec1e616d5324d507f)) +S11XS_SOUNDROM88( "guns_u21.l1", CRC(35c6bfe4) SHA1(83dbd10311add75f56046de58d315f8a87389703), + "guns_u22.l1", CRC(091a5cb8) SHA1(db77314241eb6ed7f4385f99312a49b7caad1283)) +S11CS_SOUNDROM88( "gund_u4.l1", CRC(d4a430a3) SHA1(5b44e3f313cc7cb75f51c239013d46e5eb986f9d), + "guns_u19.l1", CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) +S11_ROMEND +CORE_CLONEDEF(bguns,la,l8,"Big Guns (L-A) (Pinball)", 1987, "Williams", s11_mS11AS,0) + +S11_ROMSTART48(bguns,p1,"u26-p-1.rom", CRC(26b8d58f) SHA1(678d4f706b862f3168d6d15859dba6288912e462), + "u27-p-1.rom", CRC(2fba9a0d) SHA1(16629a5f009865825207378118a147e3135c51cf)) +S11XS_SOUNDROM88( "guns_u21.l1", CRC(35c6bfe4) SHA1(83dbd10311add75f56046de58d315f8a87389703), + "guns_u22.l1", CRC(091a5cb8) SHA1(db77314241eb6ed7f4385f99312a49b7caad1283)) +S11CS_SOUNDROM88( "gund_u4.l1", CRC(d4a430a3) SHA1(5b44e3f313cc7cb75f51c239013d46e5eb986f9d), + "guns_u19.l1", CRC(ec1a6c23) SHA1(45bb4f78b89de9e690b5f9741d17f97766e702d6)) +S11_ROMEND +CORE_CLONEDEF(bguns,p1,l8,"Big Guns (P-1) (Pinball)", 1987, "Williams", s11_mS11AS,0) + +/*-------------------- +/ Space Station 1/88 +/--------------------*/ +INITGAMEFULL(spstn, GEN_S11B,s11_dispS11b1,12, FLIP_SWNO(55,56), + 0,0,0,0,63,61,64,60,62) +S11_ROMSTART48(spstn,l5,"sstn_u26.l5", CRC(614c8528) SHA1(4f177e3d72a5cc302c62c756ec778ae2a98c8f2e), + "sstn_u27.l5", CRC(4558d963) SHA1(be317310978cca4ddd616d76fe892dcf7c980473)) +S11XS_SOUNDROM88( "sstn_u21.l1", CRC(a2ceccaa) SHA1(4c23713543e06458e49e3f2d472543c4a4246a93), + "sstn_u22.l1", CRC(2b745994) SHA1(67ebfe13db6670237496b033611bf9d4ba8d5c30)) +S11CS_SOUNDROM8( "sstn_u4.l1", CRC(ad7a0511) SHA1(9aa6412de12599fd0d10faef8fffb5d535f49015)) +S11_ROMEND +#define ipt_spstn ipt_s11 +CORE_GAMEDEF(spstn, l5, "Space Station (L-5) (Pinball)", 1988, "Williams", s11_mS11BS,0) + +/*-------------------- +/ Cyclone 2/88 +/--------------------*/ +INITGAME(cycln, GEN_S11B,s11_dispS11b1, 12, FLIP_SWNO(57,58), 0,0) +S11_ROMSTART48(cycln,l5,"cycl_u26.l5", CRC(9ab15e12) SHA1(406f3212269dc42de1f3fabcf179958adbd4b5e8), + "cycl_u27.l5", CRC(c4b6aac0) SHA1(9058e450dbf9d198b1746c258b0e437d7ee844e9)) +S11XS_SOUNDROM88( "cycl_u21.l1", CRC(d4f69a7c) SHA1(da0ce27d92b22583be54a41fc8083cee803c987a), + "cycl_u22.l1", CRC(28dc8f13) SHA1(bccce3a9b6b2f52da919c6df8db07e5e3de12657)) +S11CS_SOUNDROM88( "cycl_u4.l5", CRC(d04b663b) SHA1(f54c6df08ec73b733cfeb2a989e44e5c04da3d9e), + "cycl_u19.l1", CRC(a20f6519) SHA1(63ded5f76133340fa31d4fe65420f4465866fb85)) +S11_ROMEND +#define ipt_cycln ipt_s11 +CORE_GAMEDEF(cycln, l5, "Cyclone (L-5) (Pinball)", 1988, "Williams", s11_mS11BS,0) + +S11_ROMSTART48(cycln,l4,"cycl_u26.l4", CRC(7da30995) SHA1(3774004df22ddce508fe0604c0349df3edd513b4), + "cycl_u27.l4", CRC(8874d65f) SHA1(600e2e8cd21faf8999ebef06fb08c43a1eb2ffd7)) +S11XS_SOUNDROM88( "cycl_u21.l1", CRC(d4f69a7c) SHA1(da0ce27d92b22583be54a41fc8083cee803c987a), + "cycl_u22.l1", CRC(28dc8f13) SHA1(bccce3a9b6b2f52da919c6df8db07e5e3de12657)) +S11CS_SOUNDROM88( "cycl_u4.l5", CRC(d04b663b) SHA1(f54c6df08ec73b733cfeb2a989e44e5c04da3d9e), + "cycl_u19.l1", CRC(a20f6519) SHA1(63ded5f76133340fa31d4fe65420f4465866fb85)) +S11_ROMEND +CORE_CLONEDEF(cycln, l4, l5, "Cyclone (L-4) (Pinball)", 1988, "Williams", s11_mS11BS,0) + +/*-------------------- +/ Banzai Run 7/88 +/--------------------*/ +INITGAME(bnzai, GEN_S11B,s11_dispS11b1,12, FLIP_SWNO(25,34),0,0) +S11_ROMSTART48(bnzai,l3,"banz_u26.l3", CRC(ca578aa3) SHA1(32c03178cc9d9514f76e084e56f6cf6f82754331), + "banz_u27.l3", CRC(af66fac4) SHA1(84929aaad8a8e4a312a230b73f206d3b43a04dc3)) +S11XS_SOUNDROM88( "banz_u21.l1", CRC(cd06716e) SHA1(b61a0dc017dd4a09296a43a855461c5cee07517b), + "banz_u22.l1", CRC(e8159033) SHA1(e8f15801feefeb30768e88d685c208108aa134e8)) +S11CS_SOUNDROM888( "banz_u4.l1", CRC(8fd69c69) SHA1(c024cda85c6616943c3a12ab5943a7be8709bfe3), + "banz_u19.l1", CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f), + "banz_u20.l1", CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) +S11_ROMEND +#define ipt_bnzai ipt_s11 + +S11_ROMSTART48(bnzai,g3,"banz_u26.l3g",CRC(744b8758) SHA1(0bcd5dfd872656d0261a819e3dbd222754585ec0), + "banz_u27.l3", CRC(af66fac4) SHA1(84929aaad8a8e4a312a230b73f206d3b43a04dc3)) +S11XS_SOUNDROM88( "banz_u21.l1", CRC(cd06716e) SHA1(b61a0dc017dd4a09296a43a855461c5cee07517b), + "banz_u22.l1", CRC(e8159033) SHA1(e8f15801feefeb30768e88d685c208108aa134e8)) +S11CS_SOUNDROM888( "banz_u4.l1", CRC(8fd69c69) SHA1(c024cda85c6616943c3a12ab5943a7be8709bfe3), + "banz_u19.l1", CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f), + "banz_u20.l1", CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) +S11_ROMEND + +S11_ROMSTART48(bnzai,l1,"u26-l1.rom", CRC(556abdc0) SHA1(6de78345e5839a4ae9ff97273b6edb2635e0e8b4), + "u27-l1.rom", CRC(7fc6de2e) SHA1(a7b42c2cd8c1e3810a319c755e52273454d5ca41)) +S11XS_SOUNDROM88( "banz_u21.l1", CRC(cd06716e) SHA1(b61a0dc017dd4a09296a43a855461c5cee07517b), + "banz_u22.l1", CRC(e8159033) SHA1(e8f15801feefeb30768e88d685c208108aa134e8)) +S11CS_SOUNDROM888( "banz_u4.l1", CRC(8fd69c69) SHA1(c024cda85c6616943c3a12ab5943a7be8709bfe3), + "banz_u19.l1", CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f), + "banz_u20.l1", CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) +S11_ROMEND + +S11_ROMSTART48(bnzai,pa,"u26-pa.rom", CRC(65a73e31) SHA1(0332b51ecfc548f72eaca402d83a5ad6dd223272), + "u27-pa.rom", CRC(c64e2898) SHA1(b2291e9e65f8392f2f05f116dc47fcaf37500e60)) +S11XS_SOUNDROM88( "banz_u21.l1", CRC(cd06716e) SHA1(b61a0dc017dd4a09296a43a855461c5cee07517b), + "banz_u22.l1", CRC(e8159033) SHA1(e8f15801feefeb30768e88d685c208108aa134e8)) +S11CS_SOUNDROM888( "u4-p7.rom", CRC(630d1ce9) SHA1(fb7f6004b94bf20281216519f18b53949eef4405), + "banz_u19.l1", CRC(9104248c) SHA1(48a8c41f3a4127f4fb4de37e876c8380e3511e1f), + "banz_u20.l1", CRC(26b3d15c) SHA1(528084b6c62394f8ed9fc0f90b91d844060fc904)) +S11_ROMEND + +CORE_GAMEDEF(bnzai, l3, "Banzai Run (L-3) (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(bnzai,g3,l3,"Banzai Run (L-3) Germany (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(bnzai,l1,l3,"Banzai Run (L-1) (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(bnzai,pa,l3,"Banzai Run (P-A) (Pinball)", 1988, "Williams", s11_mS11BS,0) + +/*-------------------- +/ Swords of Fury 8/88 +/--------------------*/ +INITGAME(swrds, GEN_S11B, s11_dispS11b1,12, FLIP_SWNO(58,60),0,0) +S11_ROMSTART48(swrds,l2,"swrd_u26.l2", CRC(c036f4ff) SHA1(a86840dbc117774aeca695ded1ab3ec76e134325), + "swrd_u27.l2", CRC(33b0fb5a) SHA1(a55bdfe20b1c869eae52d3be75df1c550d0b20f5)) +S11XS_SOUNDROM88( "swrd_u21.l1", CRC(ee8b0a64) SHA1(c2c52059a9a5f7c0abcfdd76cfc6d5b5451f7d1e), + "swrd_u22.l1", CRC(73dcdbb0) SHA1(66f5b3804442a1742b6fb3cccf539c4df956b3f2)) +S11CS_SOUNDROM88( "swrd_u4.l1", CRC(272b509c) SHA1(756d3783f664ca1c41dd1d12032330b74c3f89ea), + "swrd_u19.l1", CRC(a22f84fa) SHA1(1731e86e85cca2d283512d5048c787df3970c9c5)) +S11_ROMEND +#define ipt_swrds ipt_s11 +CORE_GAMEDEF(swrds, l2, "Swords of Fury (L-2) (Pinball)", 1988, "Williams", s11_mS11BS, 0) + +/*-------------------- +/ Taxi 10/88 +/--------------------*/ + +INITGAME(taxi, GEN_S11B,dispTaxi,12, FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(taxi, l4,"taxi_u26.l4", CRC(a70d8088) SHA1(0986035436e2b1199571248dac8eb7a903b5015c), + "taxi_u27.l4", CRC(f973f79c) SHA1(a33ab04451d8a5b2354e4d174c238878e962f228)) +S11XS_SOUNDROM88( "taxi_u21.l1", CRC(2b20e9ab) SHA1(d785667ae0fd237dd8343bb1ecfbacf050ec2c6f), + "taxi_u22.l1", CRC(d13055c5) SHA1(8c2959bde03567b83db425ebc9e7309d9601c2b2)) +S11CS_SOUNDROM88( "taxi_u4.l1", CRC(6082ebb5) SHA1(37e19ad27fe05b4c8e572f6598d2d574e4ac5a7d), + "taxi_u19.l1", CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) +S11_ROMEND +S11_ROMSTART48(taxi, l3,"taxi_u26.l4", CRC(a70d8088) SHA1(0986035436e2b1199571248dac8eb7a903b5015c), + "taxi_u27.l3", CRC(e2bfb6fa) SHA1(ba1bddffe4d4e8f04131dd6f5a0380765fbcdfc5)) +S11XS_SOUNDROM88( "taxi_u21.l1", CRC(2b20e9ab) SHA1(d785667ae0fd237dd8343bb1ecfbacf050ec2c6f), + "taxi_u22.l1", CRC(d13055c5) SHA1(8c2959bde03567b83db425ebc9e7309d9601c2b2)) +S11CS_SOUNDROM88( "taxi_u4.l1", CRC(6082ebb5) SHA1(37e19ad27fe05b4c8e572f6598d2d574e4ac5a7d), + "taxi_u19.l1", CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) +S11_ROMEND +S11_ROMSTART48(taxi, lg1,"u26-lg1m.rom", CRC(40a2f33c) SHA1(815910b36a5df6c63862590c42b6a41286f38236), + "u27-lg1m.rom", CRC(955dcbab) SHA1(e66e0da6366885ceed7618b09cf66fe11ae27627)) +S11XS_SOUNDROM88( "taxi_u21.l1", CRC(2b20e9ab) SHA1(d785667ae0fd237dd8343bb1ecfbacf050ec2c6f), + "taxi_u22.l1", CRC(d13055c5) SHA1(8c2959bde03567b83db425ebc9e7309d9601c2b2)) +S11CS_SOUNDROM88( "taxi_u4.l1", CRC(6082ebb5) SHA1(37e19ad27fe05b4c8e572f6598d2d574e4ac5a7d), + "taxi_u19.l1", CRC(91c64913) SHA1(10e48977f925f6bc1be0c56854aafa99283b4047)) +S11_ROMEND +#define ipt_taxi ipt_s11 +CORE_GAMEDEF(taxi , l4, "Taxi (Lola) (L-4) (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(taxi , l3, l4, "Taxi (Marilyn) (L-3) (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(taxi , lg1, l4, "Taxi (Marilyn) (L-1) Germany (Pinball)", 1988, "Williams", s11_mS11BS,0) + +/*-------------------- +/ Jokerz 1/89 +/--------------------*/ +INITGAME(jokrz, GEN_S11B2, s11_dispS11b2,12, FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(jokrz,l6,"jokeru26.l6", CRC(c748c1ba) SHA1(e74b3be2c5d3e81ff29bc4444384f456846111b3), + "jokeru27.l6", CRC(612d0ea7) SHA1(35d88de615a15442689e13414117b7dfca6a4614)) +S11XS_SOUNDROM88( "jokeru21.l1", CRC(9e2be4f6) SHA1(6e26b55935d0c8138176b54a11c1a9ab58366628), + "jokeru22.l1", CRC(2f67160c) SHA1(f1e179fde41f9bf8226069c24b0bd5152a13e518)) +S11JS_SOUNDROM( "jokeru5.l2" , CRC(e9dc0095) SHA1(23a99555e50461ccc8e67de01796642c080294c2)) +S11_ROMEND +#define ipt_jokrz ipt_s11 +CORE_GAMEDEF(jokrz, l6, "Jokerz (L-6) (Pinball)", 1989, "Williams", s11_mS11B2S,GAME_IMPERFECT_SOUND) + +S11_ROMSTART48(jokrz,l3,"u26-l3.rom", CRC(3bf963df) SHA1(9f7757d96deca8638dbc1fe3669eee78dc222ebb), + "u27-l3.rom", CRC(32526aff) SHA1(c4ee4b58e90f214012addada114fc9333d2d274c)) +S11XS_SOUNDROM88( "jokeru21.l1", CRC(9e2be4f6) SHA1(6e26b55935d0c8138176b54a11c1a9ab58366628), + "jokeru22.l1", CRC(2f67160c) SHA1(f1e179fde41f9bf8226069c24b0bd5152a13e518)) +S11JS_SOUNDROM( "jokeru5.l2" , CRC(e9dc0095) SHA1(23a99555e50461ccc8e67de01796642c080294c2)) +S11_ROMEND +CORE_CLONEDEF(jokrz,l3,l6,"Jokerz (L-3) (Pinball)", 1989, "Williams", s11_mS11B2S,GAME_IMPERFECT_SOUND) + +/*-------------------- +/ Earthshaker 4/89 +/--------------------*/ +INITGAME(esha,GEN_S11B, s11_dispS11b2,12, FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(esha,pr4,"eshk_u26.f1", CRC(15e2bfe3) SHA1(57ce7f017a6f9ab88f221870efde91e97efbc8a6), + "eshk_u27.f1", CRC(ddfa8edd) SHA1(e59ba6c1e8a0087abda218a8922d83ebefd84666)) +S11XS_SOUNDROM88( "eshk_u21.l1", CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b), + "eshk_u22.l1", CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) +S11CS_SOUNDROM88( "eshk_u4.l1", CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e), + "eshk_u19.l1", CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + +S11_ROMEND +S11_ROMSTART48(esha,la3,"eshk_u26.l3", CRC(5350d132) SHA1(fbc671c89f85375c34c49610943c87336123fdc8), + "eshk_u27.l3", CRC(91389290) SHA1(3f80b77aa0b7db2409bc6b197feb7a4d289b6ec8)) +S11XS_SOUNDROM88( "eshk_u21.l1", CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b), + "eshk_u22.l1", CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) +S11CS_SOUNDROM88( "eshk_u4.l1", CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e), + "eshk_u19.l1", CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + +S11_ROMEND +S11_ROMSTART48(esha,lg1,"u26-lg1.rom", CRC(6b1c4d12) SHA1(8e90878ab3b6319e4b81967b4cb8c47e1b6b936c), + "u27-lg1.rom", CRC(6ee69cda) SHA1(227a4b311b9fa5f34d38bee2b5063572a06809cf)) +S11XS_SOUNDROM88( "eshk_u21.l1", CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b), + "eshk_u22.l1", CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) +S11CS_SOUNDROM88( "eshk_u4.l1", CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e), + "eshk_u19.l1", CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + +S11_ROMEND +S11_ROMSTART48(esha,lg2,"u26-lg2.rom", CRC(e30361c6) SHA1(f5626aaf36348b3aad6b04901c5d84eee1153f51), + "u27-lg1.rom", CRC(6ee69cda) SHA1(227a4b311b9fa5f34d38bee2b5063572a06809cf)) +S11XS_SOUNDROM88( "eshk_u21.l1", CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b), + "eshk_u22.l1", CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) +S11CS_SOUNDROM88( "eshk_u4.l1", CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e), + "eshk_u19.l1", CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) + +S11_ROMEND +S11_ROMSTART48(esha,la1,"u26-la1.rom", CRC(c9c9a32d) SHA1(cd273198e777b644535836ea5785b0dfe5c792c5), + "u27-la1.rom", CRC(3433b516) SHA1(5aff6bc72f2d6c0fd00f125ed5b4b6d8035d54bc)) +S11XS_SOUNDROM88( "eshk_u21.l1", CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b), + "eshk_u22.l1", CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) +S11CS_SOUNDROM88( "eshk_u4.l1", CRC(40069f8c) SHA1(aafdc189259fa9c8dc49e60e978b84775e16c64e), + "eshk_u19.l1", CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) +S11_ROMEND +S11_ROMSTART48(esha,pa1,"u26-pa1.rom", CRC(08c0b0d6) SHA1(36c23655e1ae07a3a5c91f68fdb27a78ca272683), + "u27-pa1.rom", CRC(ddd6e8bb) SHA1(b46da424f9c4ac70e65af3ee7b4e08df38ffdb26)) +S11XS_SOUNDROM88( "eshk_u21.l1", CRC(feac68e5) SHA1(2f12a78398bc3a468e3e0656da91260d45b0663b), + "eshk_u22.l1", CRC(44f50fe1) SHA1(a8e24dbb0f5cf300118e1ebdcd2bb6b274d87936)) +S11CS_SOUNDROM88( "u4-p1.rom", CRC(7219ffc2) SHA1(b8585b7d12f401d8ba4d95a5e2f20d35ff0ac26a), + "eshk_u19.l1", CRC(e5593075) SHA1(549b03402e5639b449e35325eb52e78f8810b07a)) +S11_ROMEND +#define ipt_esha ipt_s11 +CORE_GAMEDEF (esha, la3, "Earthshaker (LA-3) (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(esha, pr4, la3, "Earthshaker (Family version) (PR-4) (Pinball)", 1989, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(esha, lg1, la3, "Earthshaker (German) (LG-1) (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(esha, lg2, la3, "Earthshaker (German) (LG-2) (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(esha, la1, la3, "Earthshaker (LA-1) (Pinball)", 1988, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(esha, pa1, la3, "Earthshaker (Prototype) (PA-1) (Pinball)", 1988, "Williams", s11_mS11BS,0) + +/*----------------------- +/ Black Knight 2000 6/89 +/-----------------------*/ +INITGAME(bk2k, GEN_S11B, s11_dispS11b2,12, FLIP_SWNO(58,57), S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(bk2k, l4,"bk2k_u26.l4", CRC(16c7b9e7) SHA1(b6d5edb5ac2b58da699702ece00534d18c1a9fd7), + "bk2k_u27.l4", CRC(5cf3ab40) SHA1(ee8cb554d10478b028da4a761476d6ec8c56a042)) +S11XS_SOUNDROM88( "bk2k_u21.l1", CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027), + "bk2k_u22.l1", CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) +S11CS_SOUNDROM88( "bk2k_u4.l2", CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c), + "bk2k_u19.l1", CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) +S11_ROMEND +#define ipt_bk2k ipt_s11 +CORE_GAMEDEF(bk2k, l4, "Black Knight 2000 (L-4) (Pinball)", 1989, "Williams", s11_mS11BS,0) + +S11_ROMSTART48(bk2k,lg1,"bk2kgu26.lg1", CRC(f916d163) SHA1(bd8cbac9345a8debd01c8c68110652f591ad9d51), + "bk2kgu27.lg1", CRC(4132ac5c) SHA1(5636d4e8fb9bf5a5f4ccafe4ef035ab0e8964e8b)) +S11XS_SOUNDROM88( "bk2k_u21.l1", CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027), + "bk2k_u22.l1", CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) +S11CS_SOUNDROM88( "bk2k_u4.l2", CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c), + "bk2k_u19.l1", CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) +S11_ROMEND +CORE_CLONEDEF(bk2k,lg1,l4, "Black Knight 2000 (LG-1) (Pinball)", 1989, "Williams", s11_mS11BS,0) + +S11_ROMSTART48(bk2k,lg3,"u26-lg3.rom", CRC(6f468c85) SHA1(b919b436559a29c43911bd2839c5ae7c03e9b06f), + "u27-lg3.rom", CRC(27707522) SHA1(37844e2f3c70430ee169e1c369aa8e9d47b2c8f2)) +S11XS_SOUNDROM88( "bk2k_u21.l1", CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027), + "bk2k_u22.l1", CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) +S11CS_SOUNDROM88( "bk2k_u4.l2", CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c), + "bk2k_u19.l1", CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) +S11_ROMEND +CORE_CLONEDEF(bk2k,lg3,l4,"Black Knight 2000 (LG-3) (Pinball)", 1989, "Williams", s11_mS11BS,0) + +S11_ROMSTART48(bk2k,pu1,"u26-pu1.rom", CRC(2da07403) SHA1(4b48c5d7b0a03aa4593dc6053dc5e94df22d2a64), + "u27-pu1.rom", CRC(245efbae) SHA1(e6354a6f5029f21aab2343cd90daf6cbfb51e556)) +S11XS_SOUNDROM88( "bk2k_u21.l1", CRC(08be36ad) SHA1(0f4c448e003df54ed8ccf0e0c57f6123ce1e2027), + "bk2k_u22.l1", CRC(9c8becd8) SHA1(9090e8104dad63f14246caabafec428d94d5e18d)) +S11CS_SOUNDROM88( "bk2k_u4.l2", CRC(1d87281b) SHA1(609288b017aac6ce6da8717a35fdf87013adeb3c), + "bk2k_u19.l1", CRC(58e162b2) SHA1(891f810ae18b46593f570d719f0290a1d08a1a10)) +S11_ROMEND +CORE_CLONEDEF(bk2k,pu1,l4,"Black Knight 2000 (PU-1) (Pinball)", 1989, "Williams", s11_mS11BS,0) + +/*----------------------- +/ Police Force 9/89 +/-----------------------*/ + + +INITGAME(polic,GEN_S11B, dispPolic, 12, FLIP_SWNO(58,57), S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(polic,l4,"pfrc_u26.l4", CRC(1a1409e9) SHA1(775d35a22483bcf8c4b03841e0aca22b6504a48f), + "pfrc_u27.l4", CRC(641ed5d4) SHA1(f98b8bb64184aba062715555bd1de679d6382ac3)) +S11XS_SOUNDROM88( "pfrc_u21.l1", CRC(7729afd3) SHA1(9cd2898a7a4203cf3b2dcd203e25cde5dd582ee7), + "pfrc_u22.l1", CRC(40f5e6b2) SHA1(4af2e2658720b08d03d24c9d314a6e5074b2c747)) +S11CS_SOUNDROM88( "pfrc_u4.l2", CRC(8f431529) SHA1(0f479990715a31fd860c000a066cffb70da502c2), + "pfrc_u19.l1", CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) +S11_ROMEND +#define ipt_polic ipt_s11 +CORE_GAMEDEF(polic,l4, "Police Force (LA-4) (Pinball)", 1989, "Williams", s11_mS11BS,0) + +S11_ROMSTART48(polic,l3,"pfrc_u26.l4", CRC(1a1409e9) SHA1(775d35a22483bcf8c4b03841e0aca22b6504a48f), + "pfrc_u27.lx3",CRC(ef5d4808) SHA1(89cf62640e39397899776ab1d132645a5eab9e0e)) +S11XS_SOUNDROM88( "pfrc_u21.l1", CRC(7729afd3) SHA1(9cd2898a7a4203cf3b2dcd203e25cde5dd582ee7), + "pfrc_u22.l1", CRC(40f5e6b2) SHA1(4af2e2658720b08d03d24c9d314a6e5074b2c747)) +S11CS_SOUNDROM88( "pfrc_u4.l2", CRC(8f431529) SHA1(0f479990715a31fd860c000a066cffb70da502c2), + "pfrc_u19.l1", CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) +S11_ROMEND +CORE_CLONEDEF(polic,l3,l4,"Police Force (LA-3) (Pinball)", 1989, "Williams", s11_mS11BS,0) + +S11_ROMSTART48(polic,l2,"pfrc_u26.l2", CRC(4bc972dc) SHA1(7d6e421945832bd2c95a7b8e27d5573a42109379), + "pfrc_u27.l2", CRC(46ae36f2) SHA1(6685efa858a14b21fae5e3192ab714750ff51341)) +S11XS_SOUNDROM88( "pfrc_u21.l1", CRC(7729afd3) SHA1(9cd2898a7a4203cf3b2dcd203e25cde5dd582ee7), + "pfrc_u22.l1", CRC(40f5e6b2) SHA1(4af2e2658720b08d03d24c9d314a6e5074b2c747)) +S11CS_SOUNDROM88( "pfrc_u4.l2", CRC(8f431529) SHA1(0f479990715a31fd860c000a066cffb70da502c2), + "pfrc_u19.l1", CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) +S11_ROMEND +CORE_CLONEDEF(polic,l2,l4,"Police Force (LA-2) (Pinball)", 1989, "Williams", s11_mS11BS,0) + +/*----------------------------- +/ Transporter the Rescue 6/89 +/----------------------------*/ +INITGAME(tsptr,GEN_S11B,disp16oneline,12, FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(tsptr,l3,"tran_u26.l3", CRC(2d48a108) SHA1(d41bf077aab1201b08ea14725d4a0d841ee6b919), + "tran_u27.l3", CRC(50efb01c) SHA1(941f18d51bf8a5d209ed90e0865b7fa638a6eab3)) +S11XS_SOUNDROM88( "tran_u21.l2", CRC(b10120ee) SHA1(305a898a8b762c27dba26921ef169556bf96e518), + "tran_u22.l2", CRC(337784b5) SHA1(30c17afd8f76118940982db946cd3a2a29445d10)) +S11CS_SOUNDROM888( "tran_u4.l2", CRC(a06ddd61) SHA1(630fe7ab94516930c4876a95f822024a44371170), + "tran_u19.l2", CRC(3cfde8b0) SHA1(7bdc71ba1ba4fd337f052354323c86fd97b2b881), + "tran_u20.l2", CRC(e9890cf1) SHA1(0ae37504c704401101c79ce49df11044f8d8caa9)) + +S11_ROMEND +#define ipt_tsptr ipt_s11 +CORE_GAMEDEF(tsptr,l3, "Transporter the Rescue (L-3) (Pinball)", 1989, "Bally", s11a_one,0) + +/*----------------------- +/ Bad Cats 12/89 +/-----------------------*/ +INITGAME(bcats,GEN_S11B,s11_dispS11b2,12,FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(bcats,l5,"cats_u26.l5", CRC(32246d12) SHA1(b8aa89d197a6b992501904f5072a10ab1a31db87), + "cats_u27.l5", CRC(ef842bbf) SHA1(854860db428795d5de5c075aa78496f0c18a380f)) +S11XS_SOUNDROM88( "cats_u21.l1", CRC(04110d08) SHA1(4b44b26983cb5d14a93c16a19dc2bdbaa665dc69), + "cats_u22.l1", CRC(7e152c78) SHA1(b4ab770fdd9420a5d35e55bf8fb84c99ac544b8b)) +S11CS_SOUNDROM888( "cats_u4.l1", CRC(18c62813) SHA1(a4fb69cfedd0b92c22b599913df3cdf8b3eef42c), + "cats_u19.l1", CRC(f2fea68b) SHA1(9a41823e71342b7a162420378f122bba34ce0636), + "cats_u20.l1", CRC(bf4dc35a) SHA1(9920ce90d93fb6ecf98792c35bb6eb8862a969f3)) +S11_ROMEND +#define ipt_bcats ipt_s11 + +S11_ROMSTART48(bcats,l2,"bcgu26.la2", CRC(206c7cf8) SHA1(34eb128d46a0e1ba943f4e37aa95fa6d81aefb0e), + "bcgu27.la2", CRC(911981c6) SHA1(0d5b5c6d8399c6337300c789a0466242f91eaf94)) +S11XS_SOUNDROM88( "cats_u21.l1", CRC(04110d08) SHA1(4b44b26983cb5d14a93c16a19dc2bdbaa665dc69), + "cats_u22.l1", CRC(7e152c78) SHA1(b4ab770fdd9420a5d35e55bf8fb84c99ac544b8b)) +S11CS_SOUNDROM888( "cats_u4.l1", CRC(18c62813) SHA1(a4fb69cfedd0b92c22b599913df3cdf8b3eef42c), + "cats_u19.l1", CRC(f2fea68b) SHA1(9a41823e71342b7a162420378f122bba34ce0636), + "cats_u20.l1", CRC(bf4dc35a) SHA1(9920ce90d93fb6ecf98792c35bb6eb8862a969f3)) +S11_ROMEND + +CORE_GAMEDEF(bcats,l5, "Bad Cats (L-5) (Pinball)", 1989, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(bcats,l2,l5,"Bad Cats (LA-2) (Pinball)", 1989, "Williams", s11_mS11BS,0) + +/*----------------------- +/ Mousin' Around 12/89 +/-----------------------*/ +INITGAME(mousn,GEN_S11B,disp16oneline,12, FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(mousn,l4,"mous_u26.l4", CRC(a540edc1) SHA1(c0b208369ac770f0d4cd7decfce5f8401ded082f), + "mous_u27.l4", CRC(ff108148) SHA1(32b44286d43a39d5677c6582c5b09fc3b9833806)) +S11XS_SOUNDROM88( "mous_u20.l2", CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7), + "mous_u22.l1", CRC(00ad198c) SHA1(4f15696909e1f3574ad20b28e31da2c155ed129f)) +S11CS_SOUNDROM888( "mous_u4.l2", CRC(643add1e) SHA1(45dea0f4c6f24d17e6f7dda75afaa7caefdc6b96), + "mous_u19.l2", CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91), + "mous_u20.l2", CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) +S11_ROMEND +#define ipt_mousn ipt_s11 + +S11_ROMSTART48(mousn,l1,"u26-la1.rom", CRC(0fff7946) SHA1(53bd68fd21218128f9311047ac911cff7eea8b23), + "u27-la1.rom", CRC(a440192b) SHA1(837a9eb290f46d792f7307c569dfc627507420b8)) +S11XS_SOUNDROM88( "mous_u20.l2", CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7), + "mous_u22.l1", CRC(00ad198c) SHA1(4f15696909e1f3574ad20b28e31da2c155ed129f)) +S11CS_SOUNDROM888( "mous_u4.l2", CRC(643add1e) SHA1(45dea0f4c6f24d17e6f7dda75afaa7caefdc6b96), + "mous_u19.l2", CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91), + "mous_u20.l2", CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) +S11_ROMEND + +S11_ROMSTART48(mousn,lu,"u26-la1.rom", CRC(0fff7946) SHA1(53bd68fd21218128f9311047ac911cff7eea8b23), + "u27-lu1.rom", CRC(6e5b692c) SHA1(20c4b8d105d5df6e1b540c02c1c54bca08ec42e8)) +S11XS_SOUNDROM88( "mous_u20.l2", CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7), + "mous_u22.l1", CRC(00ad198c) SHA1(4f15696909e1f3574ad20b28e31da2c155ed129f)) +S11CS_SOUNDROM888( "mous_u4.l2", CRC(643add1e) SHA1(45dea0f4c6f24d17e6f7dda75afaa7caefdc6b96), + "mous_u19.l2", CRC(7b4941f7) SHA1(2b2fc8e7634b1885b020b2115126d6341172cc91), + "mous_u20.l2", CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) +S11_ROMEND + +S11_ROMSTART48(mousn,lx,"mous_u26.l4", CRC(a540edc1) SHA1(c0b208369ac770f0d4cd7decfce5f8401ded082f), + "mous_u27.l4", CRC(ff108148) SHA1(32b44286d43a39d5677c6582c5b09fc3b9833806)) +S11XS_SOUNDROM88( "mous_u20.l2", CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7), + "mous_u22.l1", CRC(00ad198c) SHA1(4f15696909e1f3574ad20b28e31da2c155ed129f)) +S11CS_SOUNDROM888( "mous_u4.lx", CRC(d311db4a) SHA1(d9d20921eb42c19c5074c976608bfec0d3130204), + "mous_u19.lx", CRC(c7a6f494) SHA1(272f0bd3885bb81da13ee6ed3d66f9424ccf4b0d), + "mous_u20.l2", CRC(59b1b0c5) SHA1(443426be41c1413f22b137145dbc3bcf84d9ccc7)) +S11_ROMEND + +CORE_GAMEDEF(mousn,l4,"Mousin' Around (LA-4) (Pinball)", 1989, "Bally", s11a_one,0) +CORE_CLONEDEF(mousn,l1,l4,"Mousin' Around (LA-1) (Pinball)", 1989, "Bally", s11a_one,0) +CORE_CLONEDEF(mousn,lu,l4,"Mousin' Around (LU-1) (Pinball)", 1989, "Bally", s11a_one,0) +CORE_CLONEDEF(mousn,lx,l4,"Mousin' Around (LX-1) (Pinball)", 1989, "Bally", s11a_one,0) + +/*----------------------- +/ Whirlwind 4/90 +/-----------------------*/ +INITGAME(whirl,GEN_S11B,s11_dispS11b2,12, FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2|S11_SNDOVERLAY) +S11_ROMSTART48(whirl,l3,"whir_u26.l3", CRC(066b8fec) SHA1(017ca12ef5ebd9bb70690b0e096064be5144a512), + "whir_u27.l3", CRC(47fc033d) SHA1(42518650ecb538323bc33ee193bc229d89ca1936)) +S11XS_SOUNDROM88( "whir_u21.l1", CRC(fa3da322) SHA1(732107eace9eecdb97eff4abb4420a2febef7425), + "whir_u22.l1", CRC(fcaf8c4e) SHA1(8e8cab1923a56bcef4671dce28aef1e39303c04a)) +S11CS_SOUNDROM888( "whir_u4.l1", CRC(29952d84) SHA1(26479a341b0552c5f9d9bf9dd013855e51a7b857), + "whir_u19.l1", CRC(c63f6fe9) SHA1(947bbccb5eeae414770254d42d0a95425e2dca8c), + "whir_u20.l1", CRC(713007af) SHA1(3ac88bb905ccf8e227bbf3c102c74e3d2446cc88)) +S11_ROMEND +#define ipt_whirl ipt_s11 + +S11_ROMSTART48(whirl,l2,"whir_u26.l3", CRC(066b8fec) SHA1(017ca12ef5ebd9bb70690b0e096064be5144a512), + "wwdgu27.l2", CRC(d8fb48f3) SHA1(8c64f94cca51abd6f4a7e53ac59a6f623bd2cfd7)) +S11XS_SOUNDROM88( "whir_u21.l1", CRC(fa3da322) SHA1(732107eace9eecdb97eff4abb4420a2febef7425), + "whir_u22.l1", CRC(fcaf8c4e) SHA1(8e8cab1923a56bcef4671dce28aef1e39303c04a)) +S11CS_SOUNDROM888( "whir_u4.l1", CRC(29952d84) SHA1(26479a341b0552c5f9d9bf9dd013855e51a7b857), + "whir_u19.l1", CRC(c63f6fe9) SHA1(947bbccb5eeae414770254d42d0a95425e2dca8c), + "whir_u20.l1", CRC(713007af) SHA1(3ac88bb905ccf8e227bbf3c102c74e3d2446cc88)) +S11_ROMEND + +CORE_GAMEDEF(whirl,l3, "Whirlwind (L-3) (Pinball)", 1990, "Williams", s11_mS11BS,0) +CORE_CLONEDEF(whirl,l2,l3,"Whirlwind (L-2) (Pinball)", 1990, "Williams", s11_mS11BS,0) + +/*-------------------- +/ Game Show 4/90 +/--------------------*/ +INITGAME(gs ,GEN_S11C,disp16oneline,12,FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(gs,l3,"gshw_u26.l3", CRC(3419bfb2) SHA1(7ce294a3118d20c7cdc3d5cd946e4c43090c5151), + "gshw_u27.l3", CRC(4f3babb6) SHA1(87091a6786fc6817529cfed7f60396babe153d8d)) +S11CS_SOUNDROM000( "gshw_u4.l2", CRC(e89e0116) SHA1(e96bee143d1662d078f21531f405d838fdace693), + "gshw_u19.l1", CRC(8bae0813) SHA1(a2b1beca13796892d8ee1533e395cabdbbb11f88), + "gshw_u20.l1", CRC(75ccbdf7) SHA1(7dce8ae427a621919caad8d8b08b06bb0adad850)) +S11_ROMEND +#define ipt_gs ipt_s11 + +S11_ROMSTART48(gs,l4,"gshw_u26.l3", CRC(3419bfb2) SHA1(7ce294a3118d20c7cdc3d5cd946e4c43090c5151), + "u27-lu4.rom", CRC(ba265978) SHA1(66ac8e83e35cdfd72f1d3aa8ce6d92c2c833f304)) +S11CS_SOUNDROM000( "gshw_u4.l2", CRC(e89e0116) SHA1(e96bee143d1662d078f21531f405d838fdace693), + "gshw_u19.l1", CRC(8bae0813) SHA1(a2b1beca13796892d8ee1533e395cabdbbb11f88), + "gshw_u20.l1", CRC(75ccbdf7) SHA1(7dce8ae427a621919caad8d8b08b06bb0adad850)) +S11_ROMEND + +CORE_CLONEDEF(gs,l3,l4,"Game Show (L-3) (Pinball)", 1990, "Bally", s11c_one,0) +CORE_GAMEDEF(gs,l4,"Game Show (L-4) (Pinball)", 1990, "Bally", s11c_one,0) + +/*-------------------- +/ Rollergames 5/90 +/--------------------*/ +INITGAME(rollr,GEN_S11C,s11_dispS11c,12,FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(rollr,l2,"rolr_u26.l2", CRC(cd7cad9e) SHA1(e381fa73895c307a0b3b4b699cfec2a68908f6f7), + "rolr_u27.l2", CRC(f3bac2b8) SHA1(9f0ff32ea83e43097de42065909137a362b29d49)) +S11CS_SOUNDROM000( "rolr_u4.l3", CRC(d366c705) SHA1(76018305b5040b2e5d8c45cc81a18f13e1a8f8da), + "rolr_u19.l3", CRC(45a89e55) SHA1(3aff897514d242c83a8e7575d430d594a873736e), + "rolr_u20.l3", CRC(77f89aff) SHA1(dcd9fe233f33ef8f97cdeaaa365532e485a28944)) +S11_ROMEND +#define ipt_rollr ipt_s11 +CORE_GAMEDEF(rollr, l2, "Rollergames (L-2) (Pinball)", 1990, "Williams", s11_mS11CS,0) + +S11_ROMSTART48(rollr,ex,"rolr-u26.ea3", CRC(78c3c1ad) SHA1(04e4370548b3ba85c49634402a0ea166e3643f68), + "rolr_u27.ea3", CRC(18685158) SHA1(d1a79fbe1185fb9e1ae1d9e2b2751429f487bb4c)) +S11CS_SOUNDROM000( "rolr_u4.l3", CRC(d366c705) SHA1(76018305b5040b2e5d8c45cc81a18f13e1a8f8da), + "rolr_u19.l3", CRC(45a89e55) SHA1(3aff897514d242c83a8e7575d430d594a873736e), + "rolr_u20.l3", CRC(77f89aff) SHA1(dcd9fe233f33ef8f97cdeaaa365532e485a28944)) +S11_ROMEND +CORE_CLONEDEF(rollr,ex,l2, "Rollergames (EXPERIMENTAL) (Pinball)", 1991, "Williams", s11_mS11CS,0) + +S11_ROMSTART48(rollr,e1,"rolr_u26.pe1", CRC(56620505) SHA1(2df9097e52178f246148a40e0ad4a6e6a5cdb5d4), + "rolr_u27.pe1", CRC(724d0af2) SHA1(5de5596f4e594c0e6b8448817de6ff46ffc7194b)) +S11CS_SOUNDROM000( "rolr_u4.pe1", CRC(8c383b24) SHA1(5c738e5ec566f7fa5706cd4c33e5d706fa76c72d), + "rolr_u19.pe1", CRC(c6880cff) SHA1(c8ce23d68297d36ef62e508855a478434ff9a592), + "rolr_u20.pe1", CRC(4220812b) SHA1(7071565f1087020d1e1738e801dafb509ea37622)) +S11_ROMEND +CORE_CLONEDEF(rollr,e1,l2, "Rollergames (PU-1) (Pinball)", 1991, "Williams", s11_mS11CS,0) + +S11_ROMSTART48(rollr,p2,"rolr_u26.pa2", CRC(11d96b1c) SHA1(e96991bdef8b14043285feeb4cacc182a6e9dcbd), + "rolr_u27.pa2", CRC(ee547bd5) SHA1(db45bf7a25321ac041f58404f7512bded9ebf11e)) +S11CS_SOUNDROM000( "rolr_u4.pa1", CRC(324df946) SHA1(e7ba2b9434baea20a0cf38540fdab1668c058539), + "rolr_u19.pa1", CRC(45a89e55) SHA1(3aff897514d242c83a8e7575d430d594a873736e), + "rolr_u20.pa1", CRC(8ddaaad1) SHA1(33f58c6a9b0e509b7c9a460a687d6e2c388b4b54)) +S11_ROMEND +CORE_CLONEDEF(rollr,p2,l2, "Rollergames (PA-2, PA-1 Sound) (Pinball)", 1991, "Williams", s11_mS11CS,0) + +S11_ROMSTART48(rollr,l3,"rolr-u26.lu3", CRC(7d71ed50) SHA1(092aa13706a7fe58ad80e88c1c4a5c1d7d712546), + "rolr_u27.l2", CRC(f3bac2b8) SHA1(9f0ff32ea83e43097de42065909137a362b29d49)) +S11CS_SOUNDROM000( "rolr_u4.l3", CRC(d366c705) SHA1(76018305b5040b2e5d8c45cc81a18f13e1a8f8da), + "rolr_u19.l3", CRC(45a89e55) SHA1(3aff897514d242c83a8e7575d430d594a873736e), + "rolr_u20.l3", CRC(77f89aff) SHA1(dcd9fe233f33ef8f97cdeaaa365532e485a28944)) +S11_ROMEND +CORE_CLONEDEF(rollr,l3,l2, "Rollergames (LU-3) Europe (Pinball)", 1990, "Williams", s11_mS11CS,0) + +S11_ROMSTART48(rollr,g3,"rolr-u26.lg3", CRC(438d2b94) SHA1(f507a06794563701b6d4fc51ff90a42a6d21d060), + "rolr_u27.l2", CRC(f3bac2b8) SHA1(9f0ff32ea83e43097de42065909137a362b29d49)) +S11CS_SOUNDROM000( "rolr_u4.l3", CRC(d366c705) SHA1(76018305b5040b2e5d8c45cc81a18f13e1a8f8da), + "rolr_u19.l3", CRC(45a89e55) SHA1(3aff897514d242c83a8e7575d430d594a873736e), + "rolr_u20.l3", CRC(77f89aff) SHA1(dcd9fe233f33ef8f97cdeaaa365532e485a28944)) +S11_ROMEND +CORE_CLONEDEF(rollr,g3,l2, "Rollergames (LG-3) Germany (Pinball)", 1990, "Williams", s11_mS11CS,0) + +/*-------------------- +/ Pool Sharks 6/90 +/--------------------*/ +INITGAME(pool ,GEN_S11C,disp16oneline,12,FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2|S11_SNDDELAY) +S11_ROMSTART48(pool ,l7,"pool_u26.l7", CRC(cee98aed) SHA1(5b652684c10ab4945783089d848b2f663d3b2547), + "pool_u27.l7", CRC(356d9a89) SHA1(ce795c535d03a14d28fb3f2071cae48ccdb1a856)) +S11CS_SOUNDROM000( "pool_u4.l2", CRC(04e95e10) SHA1(3873b3cd6c2961b3f2f28a1e17f8a63c6db808d2), + "pool_u19.l2", CRC(0f45d02b) SHA1(58bbfdb3b98c43b66e11808cec7cd65a7f2dce6d), + "pool_u20.l2", CRC(925f62d6) SHA1(21b8d6f9a8b98fce8a3cdf7f5f2d40200544a898)) +S11_ROMEND +#define ipt_pool ipt_s11 +CORE_GAMEDEF(pool , l7, "Pool Sharks (L-7) (Pinball)", 1990, "Bally", s11c_one,0) + +/*-------------------- +/ Diner 8/90 +/--------------------*/ +INITGAME(diner,GEN_S11C,s11_dispS11c,12,FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(diner,l4,"dinr_u26.l4", CRC(6f187abf) SHA1(8acabbccdf3528a9c5e60cc8939ab960bf4c5512), + "dinr_u27.l4", CRC(d69f9f74) SHA1(88d9b42c2313a90e5d6f50220d3b44331595d86b)) +S11CS_SOUNDROM000( "dinr_u4.l1", CRC(3bd28368) SHA1(41eec2f5f863039deaabfae8aece4b1cf15e4b78), + "dinr_u19.l1", CRC(278b9a30) SHA1(41e59adb8b6c08caee46c3dd73256480b4041619), + "dinr_u20.l1", CRC(511fb260) SHA1(e6e25b464c5c38f3c0492436f1e8aa2be33dd278)) +S11_ROMEND +#define ipt_diner ipt_s11 + +S11_ROMSTART48(diner,l3,"u26-la3.rom", CRC(8b6aa22e) SHA1(6b802a85fc2babf5a183fb434df11597363c1c9d), + "u27-la3.rom", CRC(4171451a) SHA1(818e330245691d9ef3181b885c9342880f89d912)) +S11CS_SOUNDROM000( "dinr_u4.l1", CRC(3bd28368) SHA1(41eec2f5f863039deaabfae8aece4b1cf15e4b78), + "dinr_u19.l1", CRC(278b9a30) SHA1(41e59adb8b6c08caee46c3dd73256480b4041619), + "dinr_u20.l1", CRC(511fb260) SHA1(e6e25b464c5c38f3c0492436f1e8aa2be33dd278)) +S11_ROMEND + +S11_ROMSTART48(diner,l1,"u26-lu1.rom", CRC(259b302f) SHA1(d7e19c2d2ad7805d9158178c24d180d158a59b0c), + "u27-lu1.rom", CRC(35fafbb3) SHA1(0db3d0c9421f4fdcf4d376d543626559e1bf2daa)) +S11CS_SOUNDROM000( "dinr_u4.l1", CRC(3bd28368) SHA1(41eec2f5f863039deaabfae8aece4b1cf15e4b78), + "dinr_u19.l1", CRC(278b9a30) SHA1(41e59adb8b6c08caee46c3dd73256480b4041619), + "dinr_u20.l1", CRC(511fb260) SHA1(e6e25b464c5c38f3c0492436f1e8aa2be33dd278)) +S11_ROMEND + +CORE_GAMEDEF(diner, l4, "Diner (L-4) (Pinball)", 1990, "Williams", s11_mS11CS,0) +CORE_CLONEDEF(diner,l3,l4, "Diner (L-3) (Pinball)", 1990, "Williams", s11_mS11CS,0) +CORE_CLONEDEF(diner,l1,l4, "Diner (L-1) Europe (Pinball)", 1990, "Williams", s11_mS11CS,0) + +/*-------------------- +/ Radical 9/90 +/--------------------*/ +INITGAME(radcl,GEN_S11C,disp16oneline,12,FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(radcl,l1,"rad_u26.l1", CRC(84b1a125) SHA1(dd01fb9189acd2620c57149921aadb051f7a2412), + "rad_u27.l1", CRC(6f6ca382) SHA1(a61055aab97d3fe2ecd0ed4281a9681b1d910269)) +S11CS_SOUNDROM008( "rad_u4.l1", CRC(5aafc09c) SHA1(27984bbc91dc7593e6a5b42f74dd6ddf58189bec), + "rad_u19.l1", CRC(7c005e1f) SHA1(bdeea7517f2adf72b4b642bffb25ba5b98453127), + "rad_u20.l1", CRC(05b96292) SHA1(7da0289cf0a0c93768c0706fdedfc3a5f2101e77)) +S11_ROMEND +#define ipt_radcl ipt_s11 +CORE_GAMEDEF(radcl, l1, "Radical (L-1) (Pinball)", 1990, "Bally", s11c_one,0) + +S11_ROMSTART48(radcl,g1,"rad_u26.l1", CRC(84b1a125) SHA1(dd01fb9189acd2620c57149921aadb051f7a2412), + "u27-lg1.rom", CRC(4f2eca4b) SHA1(ff44deded1686cfa0351c4499485d6eb4561cbc1)) +S11CS_SOUNDROM008( "rad_u4.l1", CRC(5aafc09c) SHA1(27984bbc91dc7593e6a5b42f74dd6ddf58189bec), + "rad_u19.l1", CRC(7c005e1f) SHA1(bdeea7517f2adf72b4b642bffb25ba5b98453127), + "rad_u20.l1", CRC(05b96292) SHA1(7da0289cf0a0c93768c0706fdedfc3a5f2101e77)) +S11_ROMEND +CORE_CLONEDEF(radcl,g1,l1, "Radical (G-1) (Pinball)", 1990, "Bally", s11c_one,0) + +S11_ROMSTART48(radcl,p3,"rad_u26.p1", CRC(7d736ae9) SHA1(4ea6945fa5cfbd33fcdf780814b0bf5cb3faa388), + "u27-p1.rom", CRC(83b1d928) SHA1(b1bd5d8a93f1ab9fb9bf5c268d8530be438448e6)) +S11CS_SOUNDROM008( "rad_u4.p3", CRC(d31b7744) SHA1(7ebcc1503fc322909d32c7c8bda8c0b6505919b3), + "rad_u19.l1", CRC(7c005e1f) SHA1(bdeea7517f2adf72b4b642bffb25ba5b98453127), + "rad_u20.p3", CRC(82f8369c) SHA1(0691a80672fc11d46359f710bd211de7a59de346)) +S11_ROMEND +CORE_CLONEDEF(radcl,p3,l1, "Radical (P-3) (Pinball)", 1990, "Bally", s11c_one,0) + +/*----------------------- +/ Star Trax 9/90 +/-----------------------*/ +INITGAME(strax,GEN_S11B, s11_dispS11b2, 12, FLIP_SW(FLIP_L),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(strax,p7,"strx_u26.p7", CRC(0d2a401c) SHA1(b0a0899dcde04dc42e4fd5d6baf39bb0e81dbb34), + "strx_u27.p7", CRC(6e9c0632) SHA1(5c0ea2b60dd9001b802d2ecdb5c381ab05f08ec9)) +S11XS_SOUNDROM88( "strx_u21.l1", CRC(6a323227) SHA1(7c7263754e5672c654a2ee9582f0b278e637a909), + "strx_u22.l1", CRC(58407eb4) SHA1(6bd9b304c88d9470eae5afb6621187f4a8313573)) +S11CS_SOUNDROM88( "pfrc_u4.l2", CRC(8f431529) SHA1(0f479990715a31fd860c000a066cffb70da502c2), + "pfrc_u19.l1", CRC(abc4caeb) SHA1(6faef2de9a49a1015b4038ab18849de2f25dbded)) +S11_ROMEND +#define ipt_strax ipt_s11 +CORE_GAMEDEF(strax,p7, "Star Trax (domestic prototype) (Pinball)", 1990, "Williams", s11_mS11BS,0) + +/*-------------------- +/ Riverboat Gambler 10/90 +/--------------------*/ + + +INITGAME(rvrbt,GEN_S11C,dispRvrbt,12,FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(rvrbt,l3,"gamb_u26.l3", CRC(a65f6004) SHA1(ea44bb7f8f2ec9e5989be63ba41f674b14d19b8a), + "gamb_u27.l3", CRC(9be0f613) SHA1(1c2b442bc3daef212fe23ff03f5409c354e79989)) +S11CS_SOUNDROM000( "gamb_u4.l2", CRC(c0cfa9be) SHA1(352df9a4dcbc131ae249416e9e517137a04627ba), + "gamb_u19.l1", CRC(04a3a8c8) SHA1(e72ef767f13282d2335cda3288037610d9bfedf2), + "gamb_u20.l1", CRC(a60c734d) SHA1(76cfcf96276ca4f6b5eee0e0402fab5ee9685366)) +S11_ROMEND +#define ipt_rvrbt ipt_s11 +CORE_GAMEDEF(rvrbt, l3, "Riverboat Gambler (L-3) (Pinball)", 1990, "Williams", s11_mS11CS,0) + +/*-------------------- +/ Bugs Bunny Birthday Ball 11/90 +/--------------------*/ +INITGAME(bbnny,GEN_S11C,disp16oneline,12,FLIP_SWNO(58,57),S11_LOWALPHA|S11_DISPINV,S11_MUXSW2) +S11_ROMSTART48(bbnny,l2,"bugs_u26.l2", CRC(b4358920) SHA1(93af1cf5dc2b5442f428a621c0f73b27c197a3df), + "bugs_u27.l2", CRC(8ff29439) SHA1(8fcdcea556e9e01ea8cb7c1548f98af2467c8a5f)) +S11CS_SOUNDROM000( "bugs_u4.l2", CRC(04bc9aa5) SHA1(c3da2dc3e26b88a0ebc6f87e61fc71bec45330c3), + "bugs_u19.l1", CRC(a2084702) SHA1(ffd749387e7b52bad1e98c6a8939fb87bc67524c), + "bugs_u20.l1", CRC(5df734ef) SHA1(c8d153444dd6171c3ebddc8100ab06fde3373cc6)) +S11_ROMEND +#define ipt_bbnny ipt_s11 +CORE_GAMEDEF(bbnny, l2, "Bugs Bunny Birthday Ball (L-2) (Pinball)", 1990, "Bally", s11c_one,0) + +S11_ROMSTART48(bbnny,lu,"bugs_u26.l2", CRC(b4358920) SHA1(93af1cf5dc2b5442f428a621c0f73b27c197a3df), + "u27-lu2.rom", CRC(aaa2c82d) SHA1(b279c87cb2ac90a818eeb1afa6115b8cdab1b0df)) +S11CS_SOUNDROM000( "bugs_u4.l2", CRC(04bc9aa5) SHA1(c3da2dc3e26b88a0ebc6f87e61fc71bec45330c3), + "bugs_u19.l1", CRC(a2084702) SHA1(ffd749387e7b52bad1e98c6a8939fb87bc67524c), + "bugs_u20.l1", CRC(5df734ef) SHA1(c8d153444dd6171c3ebddc8100ab06fde3373cc6)) +S11_ROMEND +CORE_CLONEDEF(bbnny,lu,l2,"Bugs Bunny Birthday Ball (LU-2) European (Pinball)", 1990, "Bally", s11c_one,0) + +/*-------------------- +/ Dr. Dude - moved to own simulator +/--------------------*/ + + + + +/************************************************************************************************ +************************************************************************************************* + Old PinMAME code below for reference ONLY +************************************************************************************************* +************************************************************************************************/ + +#if 0 + +/* Williams System 9, 11, and All Data East Hardware */ +#include +#include +#include "driver.h" +#include "cpu/m6800/m6800.h" +#include "machine/6821pia.h" +#include "core.h" +#include "sndbrd.h" +#include "snd_cmd.h" +#include "wmssnd.h" +#include "desound.h" +#include "dedmd.h" +#include "s11.h" + +#define FIXMUX // DataEast Playboy 35th fix + +// TODO: +// DE display layouts +#define S11_PIA0 0 +#define S11_PIA1 1 +#define S11_PIA2 2 +#define S11_PIA3 3 +#define S11_PIA4 4 +#define S11_PIA5 5 + +#define S11_VBLANKFREQ 60 /* VBLANK frequency */ + +#define S11_IRQFREQ 1000 + +#define S11_SOLSMOOTH 2 /* Smooth the Solenoids over this numer of VBLANKS */ +#define S11_LAMPSMOOTH 2 /* Smooth the lamps over this number of VBLANKS */ +#define S11_DISPLAYSMOOTH 2 /* Smooth the display over this number of VBLANKS */ + +static MACHINE_STOP(s11); +static NVRAM_HANDLER(s11); +static NVRAM_HANDLER(de); + +const struct core_dispLayout s11_dispS9[] = { + {4, 0, 1,7, CORE_SEG87}, {4,16, 9,7, CORE_SEG87}, + {0, 0,21,7, CORE_SEG87}, {0,16,29,7, CORE_SEG87}, + DISP_SEG_CREDIT(0,8,CORE_SEG7S),DISP_SEG_BALLS(20,28,CORE_SEG7S),{0} +}; +const struct core_dispLayout s11_dispS11[] = { + DISP_SEG_7(0,0,CORE_SEG16),DISP_SEG_7(0,1,CORE_SEG16), + DISP_SEG_7(1,0,CORE_SEG8), DISP_SEG_7(1,1,CORE_SEG8), + {2,8,0,1,CORE_SEG7S},{2,10,8,1,CORE_SEG7S}, {2,2,20,1,CORE_SEG7S},{2,4,28,1,CORE_SEG7S}, {0} +}; +const struct core_dispLayout s11_dispS11a[] = { + DISP_SEG_7(0,0,CORE_SEG16),DISP_SEG_7(0,1,CORE_SEG16), + DISP_SEG_7(1,0,CORE_SEG8), DISP_SEG_7(1,1,CORE_SEG8) ,{0} +}; +const struct core_dispLayout s11_dispS11b2[] = { + DISP_SEG_16(0,CORE_SEG16),DISP_SEG_16(1,CORE_SEG16),{0} +}; + +/*---------------- +/ Local variables +/-----------------*/ +static struct { + int vblankCount; + UINT32 solenoids, solsmooth[S11_SOLSMOOTH]; + UINT32 extSol, extSolPulse; + core_tSeg segments, pseg; + int lampRow, lampColumn; + int digSel; + int diagnosticLed; + int swCol; + int ssEn; /* Special solenoids and flippers enabled ? */ + int sndCmd; /* external sound board cmd */ + int piaIrq; + int deGame; /*Flag to see if it's a Data East game running*/ +#ifdef FIXMUX + UINT8 solBits1,solBits2; + UINT8 solBits2prv; +#endif +} locals; + +static void s11_irqline(int state) { + if (state) { + cpu_set_irq_line(0, M6808_IRQ_LINE, ASSERT_LINE); + /*Set coin door inputs, differs between S11 & DE*/ + if (locals.deGame) { + pia_set_input_ca1(S11_PIA2, !core_getSw(DE_SWADVANCE)); + pia_set_input_cb1(S11_PIA2, core_getSw(DE_SWUPDN)); + } + else { + pia_set_input_ca1(S11_PIA2, core_getSw(S11_SWADVANCE)); + pia_set_input_cb1(S11_PIA2, core_getSw(S11_SWUPDN)); + } + } + else if (!locals.piaIrq) { + cpu_set_irq_line(0, M6808_IRQ_LINE, CLEAR_LINE); + pia_set_input_ca1(S11_PIA2, locals.deGame); + pia_set_input_cb1(S11_PIA2, locals.deGame); + } +} + +static void s11_piaMainIrq(int state) { + s11_irqline(locals.piaIrq = state); +} + +static INTERRUPT_GEN(s11_irq) { + s11_irqline(1); timer_set(TIME_IN_CYCLES(32,0),0,s11_irqline); +} + +static INTERRUPT_GEN(s11_vblank) { + /*------------------------------- + / copy local data to interface + /--------------------------------*/ + locals.vblankCount += 1; + /*-- lamps --*/ + if ((locals.vblankCount % S11_LAMPSMOOTH) == 0) { + memcpy(coreGlobals.lampMatrix, coreGlobals.tmpLampMatrix, sizeof(coreGlobals.tmpLampMatrix)); + memset(coreGlobals.tmpLampMatrix, 0, sizeof(coreGlobals.tmpLampMatrix)); + } + /*-- solenoids --*/ + if (locals.ssEn) { // set gameon and special solenoids + int ii; + locals.solenoids |= CORE_SOLBIT(S11_GAMEONSOL); + /*-- special solenoids updated based on switches --*/ + for (ii = 0; ii < 6; ii++) { + if (core_gameData->sxx.ssSw[ii] && core_getSw(core_gameData->sxx.ssSw[ii])) + locals.solenoids |= CORE_SOLBIT(CORE_FIRSTSSSOL+ii); + } + } +#ifdef FIXMUX +// mux translation moved +#else + if ((core_gameData->sxx.muxSol) && + (locals.solenoids & CORE_SOLBIT(core_gameData->sxx.muxSol))) { + if (core_gameData->hw.gameSpecific1 & S11_RKMUX) + locals.solenoids = (locals.solenoids & 0x00ff8fef) | + ((locals.solenoids & 0x00000010)<<20) | + ((locals.solenoids & 0x00007000)<<13); + else + locals.solenoids = (locals.solenoids & 0x00ffff00) | (locals.solenoids<<24); + } +#endif + locals.solsmooth[locals.vblankCount % S11_SOLSMOOTH] = locals.solenoids; +#if S11_SOLSMOOTH != 2 +# error "Need to update smooth formula" +#endif + coreGlobals.solenoids = locals.solsmooth[0] | locals.solsmooth[1]; + coreGlobals.solenoids2 = locals.extSol << 8; + locals.solenoids = coreGlobals.pulsedSolState; + locals.extSol = locals.extSolPulse; + /*-- display --*/ + if ((locals.vblankCount % S11_DISPLAYSMOOTH) == 0) { + memcpy(coreGlobals.segments, locals.segments, sizeof(coreGlobals.segments)); + memcpy(locals.segments, locals.pseg, sizeof(locals.segments)); + coreGlobals.diagnosticLed = locals.diagnosticLed; + locals.diagnosticLed = 0; + } + core_updateSw(locals.ssEn); +} + +/*--------------- +/ Lamp handling +/----------------*/ +static WRITE_HANDLER(pia1a_w) { + core_setLamp(coreGlobals.tmpLampMatrix, locals.lampColumn, locals.lampRow = ~data); +} +static WRITE_HANDLER(pia1b_w) { + core_setLamp(coreGlobals.tmpLampMatrix, locals.lampColumn = data, locals.lampRow); +} + +/*-- Jumper W7 --*/ +static READ_HANDLER (pia2a_r) { return core_getDip(0)<<7; } + +/*----------------- +/ Display handling +/-----------------*/ +/*NOTE: Data East DMD Games: data = 0x01, CN1-Pin 7 (Strobe) goes low + data = 0x04, CN2-Pin 1 (Enable) goes low + (currently we don't need to read these values)*/ +static WRITE_HANDLER(pia2a_w) { + locals.digSel = data & 0x0f; + if (core_gameData->hw.display & S11_BCDDIAG) + locals.diagnosticLed |= core_bcd2seg[(data & 0x70)>>4]; + else + locals.diagnosticLed |= (data & 0x10)>>4; +} + +static WRITE_HANDLER(pia2b_w) { + /* Data East writes auxiliary solenoids here for DMD games + CN3 Printer Data Lines (Used by various games) + data = 0x01, CN3-Pin 9 (GNR Magnet 3, inverted for Star Trek 25th chase lights) + data = 0x02, CN3-Pin 8 (GNR Magnet 2, -"-) + data = 0x04, CN3-Pin 7 (GNR Magnet 1, -"-) + .... + data = 0x80, CN3-Pin 1 (Blinder on Tommy)*/ + if (core_gameData->gen & GEN_DEDMD16) { + if (core_gameData->hw.gameSpecific1 & S11_PRINTERLINE) locals.extSol |= locals.extSolPulse = (data ^ 0xff); + } else if (core_gameData->gen & (GEN_DEDMD32|GEN_DEDMD64)) { + if (core_gameData->hw.gameSpecific1 & S11_PRINTERLINE) locals.extSol |= locals.extSolPulse = data; + } + else { + if (core_gameData->hw.display & S11_DISPINV) data = ~data; + if (core_gameData->hw.display & S11_BCDDISP) { + locals.segments[locals.digSel].w |= + locals.pseg[locals.digSel].w = core_bcd2seg[data&0x0f]; + locals.segments[20+locals.digSel].w |= + locals.pseg[20+locals.digSel].w = core_bcd2seg[data>>4]; + } + else + locals.segments[20+locals.digSel].b.lo |= + locals.pseg[20+locals.digSel].b.lo = data; + } +} +static WRITE_HANDLER(pia5a_w) { // Not used for DMD + if (core_gameData->hw.display & S11_DISPINV) data = ~data; + if (core_gameData->hw.display & S11_LOWALPHA) + locals.segments[20+locals.digSel].b.hi |= + locals.pseg[20+locals.digSel].b.hi = data; +} +static WRITE_HANDLER(pia3a_w) { + if (core_gameData->hw.display & S11_DISPINV) data = ~data; + locals.segments[locals.digSel].b.hi |= locals.pseg[locals.digSel].b.hi = data; +} +static WRITE_HANDLER(pia3b_w) { + if (core_gameData->hw.display & S11_DISPINV) data = ~data; + locals.segments[locals.digSel].b.lo |= locals.pseg[locals.digSel].b.lo = data; +} + +static READ_HANDLER(pia3b_dmd_r) { + if (core_gameData->gen & GEN_DEDMD32) + return (sndbrd_0_data_r(0) ? 0x80 : 0x00) | (sndbrd_0_ctrl_r(0)<<3); + else if (core_gameData->gen & GEN_DEDMD64) + return sndbrd_0_data_r(0) ? 0x80 : 0x00; + return 0; +} + +//NOTE: Unusued in Data East Alpha Games +static WRITE_HANDLER(pia2ca2_w) { + data = data ? 0x80 : 0x00; + if (core_gameData->gen & GEN_S9) { + locals.segments[1+locals.digSel].b.lo |= data; + locals.pseg[1+locals.digSel].b.lo = (locals.pseg[1+locals.digSel].b.lo & 0x7f) | data; + } else { + locals.segments[20+locals.digSel].b.lo |= data; + locals.pseg[20+locals.digSel].b.lo = (locals.pseg[20+locals.digSel].b.lo & 0x7f) | data; + } +} +//NOTE: Pin 10 of CN3 for Data East DMD Games (Currently we don't need to read this value) +static WRITE_HANDLER(pia2cb2_w) { + data = data ? 0x80 : 0x00; + if (core_gameData->gen & GEN_S9) { + locals.segments[21+locals.digSel].b.lo |= data; + locals.pseg[21+locals.digSel].b.lo = (locals.pseg[21+locals.digSel].b.lo & 0x7f) | data; + } else { + locals.segments[locals.digSel].b.lo |= data; + locals.pseg[locals.digSel].b.lo = (locals.pseg[locals.digSel].b.lo & 0x7f) | data; + } +} + +static READ_HANDLER(pia5a_r) { + if (core_gameData->gen & GEN_DEDMD64) + return sndbrd_0_ctrl_r(0); + else if (core_gameData->gen & GEN_DEDMD16) + return (sndbrd_0_data_r(0) ? 0x01 : 0x00) | (sndbrd_0_ctrl_r(0)<<1); + return 0; +} + +/*------------ +/ Solenoids +/-------------*/ +static void setSSSol(int data, int solNo) { + /* WMS DE */ + static const int ssSolNo[2][6] = {{5,4,1,2,0,3},{3,4,5,1,0,2}}; + int bit = CORE_SOLBIT(CORE_FIRSTSSSOL + ssSolNo[locals.deGame][solNo]); + if (locals.ssEn & (~data & 1)) + { coreGlobals.pulsedSolState |= bit; locals.solenoids |= bit; } + else + coreGlobals.pulsedSolState &= ~bit; +} + +#ifdef FIXMUX + +static void updsol(void) { + /* set new solenoids, preserve SSSol */ + coreGlobals.pulsedSolState = (coreGlobals.pulsedSolState & 0x00ff0000) + | (locals.solBits2 << 8) + | (locals.solBits1 ); + + /* if game has a MUX and it's active... */ + if ((core_gameData->sxx.muxSol) && + (coreGlobals.pulsedSolState & CORE_SOLBIT(core_gameData->sxx.muxSol))) { + if (core_gameData->hw.gameSpecific1 & S11_RKMUX) /* special case WMS Road Kings */ + coreGlobals.pulsedSolState = (coreGlobals.pulsedSolState & 0x00ff8fef) | + ((coreGlobals.pulsedSolState & 0x00000010)<<20) | + ((coreGlobals.pulsedSolState & 0x00007000)<<13); + else + coreGlobals.pulsedSolState = (coreGlobals.pulsedSolState & 0x00ffff00) | + (coreGlobals.pulsedSolState << 24); + } + + locals.solenoids |= coreGlobals.pulsedSolState; +} + +static WRITE_HANDLER(pia0b_w) { + // DataEast Playboy35th needs the MUX delayed my one IRQ: + if (core_gameData->hw.gameSpecific1 & S11_MUXDELAY) { + // new solbits are stored, previous solbits are processed + UINT8 h = locals.solBits2prv; + locals.solBits2prv = data; + data = h; + } + if (data != locals.solBits2) { + locals.solBits2 = data; + updsol(); + } +} + +static WRITE_HANDLER(latch2200) { + if (data != locals.solBits1) { + locals.solBits1 = data; + updsol(); + } +} + +#else +static WRITE_HANDLER(pia0b_w) { + coreGlobals.pulsedSolState = (coreGlobals.pulsedSolState & 0xffff00ff) | (data<<8); + locals.solenoids |= (data<<8); +} +static WRITE_HANDLER(latch2200) { + coreGlobals.pulsedSolState = (coreGlobals.pulsedSolState & 0xffffff00) | data; + locals.solenoids |= data; +} +#endif + +static WRITE_HANDLER(pia0cb2_w) { locals.ssEn = !data;} + +static WRITE_HANDLER(pia1ca2_w) { setSSSol(data, 0); } +static WRITE_HANDLER(pia1cb2_w) { setSSSol(data, 1); } +static WRITE_HANDLER(pia3ca2_w) { setSSSol(data, 2); } +static WRITE_HANDLER(pia3cb2_w) { setSSSol(data, 3); } +static WRITE_HANDLER(pia4ca2_w) { setSSSol(data, 4); } +static WRITE_HANDLER(pia4cb2_w) { setSSSol(data, 5); } + +/*--------------- +/ Switch reading +/----------------*/ +static WRITE_HANDLER(pia4b_w) { locals.swCol = data; } +static READ_HANDLER(pia4a_r) { return core_getSwCol(locals.swCol); } + +/*------- +/ Sound +/--------*/ +/*-- Sound board sound command--*/ +static WRITE_HANDLER(pia5b_w) { + //Data East 128x16 games need to eat the 0xfe command (especially Hook) + if ((core_gameData->gen & GEN_DEDMD16) && (data == 0xfe)) return; + locals.sndCmd = data; sndbrd_1_data_w(0,data); +} + +/*-- Sound board sound command available --*/ +static WRITE_HANDLER(pia5cb2_w) { + /* don't pass to sound board if a sound overlay board is available */ + if ((core_gameData->hw.gameSpecific1 & S11_SNDOVERLAY) && + ((locals.sndCmd & 0xe0) == 0)) { + if (!data) locals.extSol |= locals.extSolPulse = (~locals.sndCmd) & 0x1f; + } + else sndbrd_1_ctrl_w(0,data); +} +/*-- reset sound board CPU --*/ +static WRITE_HANDLER(pia5ca2_w) { /* + if (core_gameData->gen & ~(GEN_S11B_3|GEN_S9)) { + cpu_set_reset_line(S11_SCPU1NO, PULSE_LINE); + s11cs_reset(); + } */ +} +static WRITE_HANDLER(s11_sndCmd_w) { + static int soundSys = -1; /* 0 = CPU board sound, 1 = Sound board */ + if (soundSys < 0) + soundSys = (data & 0x01); + else { + sndbrd_data_w(soundSys, data); sndbrd_ctrl_w(soundSys,1); sndbrd_ctrl_w(soundSys,0); + soundSys = -1; + } +} + +static WRITE_HANDLER(de_sndCmd_w) { + sndbrd_data_w(1, data); sndbrd_ctrl_w(1,1); sndbrd_ctrl_w(1,0); +} + +//NOTE: Not used for Data East +static WRITE_HANDLER(pia0ca2_w) { sndbrd_0_ctrl_w(0,data); } +//NOTE: Not used for Data East +static READ_HANDLER(pia5b_r) { return sndbrd_1_ctrl_r(0); } + +static struct pia6821_interface s11_pia[] = { +{/* PIA 0 (2100) */ + /* PA0 - PA7 Sound Select Outputs (sound latch) */ + /* PB0 - PB7 Solenoid 9-16 (12 is usually for multiplexing) */ + /* CA2 Sound H.S. */ + /* CB2 Enable Special Solenoids */ + /* in : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ sndbrd_0_data_w, pia0b_w, pia0ca2_w, pia0cb2_w, + /* irq : A/B */ s11_piaMainIrq, s11_piaMainIrq +},{ /* PIA 1 (2400) */ + /* PA0 - PA7 Lamp Matrix Strobe */ + /* PB0 - PB7 Lamp Matrix Return */ + /* CA2 F SS6 */ + /* CB2 E SS5 */ + /* in : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ pia1a_w, pia1b_w, pia1ca2_w, pia1cb2_w, + /* irq : A/B */ s11_piaMainIrq, s11_piaMainIrq +},{ /* PIA 2 (2800) */ + /* PA0 - PA3 Digit Select 1-16 */ + /* PA4 Diagnostic LED */ + /* PA5-PA6 NC */ + /* PA7 (I) Jumper W7 */ + /* PB0 - PB7 Digit BCD */ + /* CA1 (I) Diagnostic Advance */ + /* CB1 (I) Diagnostic Up/dn */ + /* CA2 Comma 3+4 */ + /* CB2 Comma 1+2 */ + /* in : A/B,CA/B1,CA/B2 */ pia2a_r, 0, 0,0, 0, 0, + /* out : A/B,CA/B2 */ pia2a_w, pia2b_w, pia2ca2_w, pia2cb2_w, + /* irq : A/B */ s11_piaMainIrq, s11_piaMainIrq +},{ /* PIA 3 (2c00) */ + /* PA0 - PA7 Display Data (h,j,k,m,n,p,r,dot) */ + /* PB0 - PB7 Display Data (a,b,c,d,e,f,g,com) */ + /* CA1 Widget I/O LCA1 */ + /* CB1 Widget I/O LCB1 */ + /* CA2 (I) B SST2 */ + /* CB2 (I) C SST3 */ + /* in : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ pia3a_w, pia3b_w, pia3ca2_w, pia3cb2_w, + /* irq : A/B */ s11_piaMainIrq, s11_piaMainIrq +},{ /* PIA 4 (3000) */ + /* PA0 - PA7 Switch Input (row) */ + /* PB0 - PB7 Switch Drivers (column) */ + /* CA1/CB1 GND */ + /* CA2 (I) A SS1 */ + /* CB2 (I) D SS4 */ + /* in : A/B,CA/B1,CA/B2 */ pia4a_r, 0, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ 0, pia4b_w, pia4ca2_w, pia4cb2_w, + /* irq : A/B */ s11_piaMainIrq, s11_piaMainIrq +},{ /* PIA 5 (3400) */ + /* PA0 - PA7 Display Data' (h,j,k ,m,n,p,r,dot), DMD status */ + /* PB0 - PB7 Widget I/O MD0-MD7 */ + /* CA1 Widget I/O MCA1 */ + /* CB1 Widget I/O MCB1 */ + /* CA2 Widget I/O MCA2 */ + /* CB2 Widget I/O MCB2 */ + /* in : A/B,CA/B1,CA/B2 */ pia5a_r, pia5b_r, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ pia5a_w, pia5b_w, pia5ca2_w, pia5cb2_w, + /* irq : A/B */ s11_piaMainIrq, s11_piaMainIrq +},{ /* PIA 3 (2c00) for DMD games*/ + /* PA0 - PA7 DMD data */ + /* PB0 - PB7 DMD ctrl */ + /* CA1 NC */ + /* CB1 NC */ + /* CA2 (O) B SST2 */ + /* CB2 (O) C SST3 */ + /* in : A/B,CA/B1,CA/B2 */ 0, pia3b_dmd_r, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ sndbrd_0_data_w, sndbrd_0_ctrl_w, pia3ca2_w, pia3cb2_w, + /* irq : A/B */ s11_piaMainIrq, s11_piaMainIrq +} +}; + +static SWITCH_UPDATE(s11) { + if (inports) { + coreGlobals.swMatrix[0] = (inports[S11_COMINPORT] & 0x7f00)>>8; + coreGlobals.swMatrix[1] = inports[S11_COMINPORT]; + } + /*-- Generate interupts for diganostic keys --*/ + cpu_set_nmi_line(0, core_getSw(S11_SWCPUDIAG) ? ASSERT_LINE : CLEAR_LINE); + sndbrd_0_diag(core_getSw(S11_SWSOUNDDIAG)); + if ((core_gameData->hw.gameSpecific1 & S11_MUXSW2) && core_gameData->sxx.muxSol) + core_setSw(2, core_getSol(core_gameData->sxx.muxSol)); + if (locals.deGame) { + /* Show Status of Black Advance Switch */ + core_textOutf(40,20,BLACK,core_getSw(DE_SWADVANCE) ? "B-Down" : "B-Up "); + /* Show Status of Green Up/Down Switch */ + core_textOutf(40,30,BLACK,core_getSw(DE_SWUPDN) ? "G-Down" : "G-Up "); + } + else { + /* Show Status of Advance Switch */ + core_textOutf(40,20,BLACK,core_getSw(S11_SWADVANCE) ? "A-Down" : "A-Up "); + /* Show Status of Green Up/Down Switch */ + core_textOutf(40,30,BLACK,core_getSw(S11_SWUPDN) ? "G-Down" : "G-Up "); + } +} + +// convert lamp and switch numbers +// S11 is 1-64 +// convert to 0-64 (+8) +// i.e. 1=8, 2=9... +static int s11_sw2m(int no) { return no+7; } +static int s11_m2sw(int col, int row) { return col*8+row-7; } + +static MACHINE_INIT(s11) { + if (core_gameData->gen & (GEN_DE | GEN_DEDMD16 | GEN_DEDMD32 | GEN_DEDMD64)) + locals.deGame = 1; + pia_config(S11_PIA0, PIA_STANDARD_ORDERING, &s11_pia[0]); + pia_config(S11_PIA1, PIA_STANDARD_ORDERING, &s11_pia[1]); + pia_config(S11_PIA2, PIA_STANDARD_ORDERING, &s11_pia[2]); + pia_config(S11_PIA3, PIA_STANDARD_ORDERING, &s11_pia[3]); + pia_config(S11_PIA4, PIA_STANDARD_ORDERING, &s11_pia[4]); + pia_config(S11_PIA5, PIA_STANDARD_ORDERING, &s11_pia[5]); + + /*Additional hardware dependent init code*/ + switch (core_gameData->gen) { + case GEN_S9: + sndbrd_0_init(SNDBRD_S9S, 1, NULL, NULL, NULL); + break; + case GEN_S11: + sndbrd_0_init(SNDBRD_S11S, 1, memory_region(S11S_ROMREGION), NULL, NULL); + break; + case GEN_S11X: + sndbrd_0_init(SNDBRD_S11XS, 2, memory_region(S11XS_ROMREGION), NULL, NULL); + sndbrd_1_init(SNDBRD_S11CS, 1, memory_region(S11CS_ROMREGION), pia_5_cb1_w, NULL); + break; + case GEN_S11B2: + sndbrd_0_init(SNDBRD_S11BS, 2, memory_region(S11XS_ROMREGION), NULL, NULL); + sndbrd_1_init(SNDBRD_S11JS, 1, memory_region(S11JS_ROMREGION), pia_5_cb1_w, NULL); + break; + case GEN_S11C: + sndbrd_1_init(SNDBRD_S11CS, 1, memory_region(S11CS_ROMREGION), pia_5_cb1_w, NULL); + break; + case GEN_DE: + sndbrd_1_init(SNDBRD_DE1S, 1, memory_region(DE1S_ROMREGION), pia_5_cb1_w, NULL); + break; + case GEN_DEDMD16: + case GEN_DEDMD32: + case GEN_DEDMD64: + pia_config(S11_PIA3, PIA_STANDARD_ORDERING, &s11_pia[6]); // PIA 3 is different for DMD games + sndbrd_0_init(core_gameData->hw.display, 2, memory_region(DE_DMD16ROMREGION),NULL,NULL); + sndbrd_1_init(core_gameData->hw.soundBoard, 1, memory_region(DE1S_ROMREGION), pia_5_cb1_w, NULL); + break; + } +} +static MACHINE_INIT(s9pf) { + pia_config(S11_PIA0, PIA_STANDARD_ORDERING, &s11_pia[0]); + pia_config(S11_PIA1, PIA_STANDARD_ORDERING, &s11_pia[1]); + pia_config(S11_PIA2, PIA_STANDARD_ORDERING, &s11_pia[2]); + pia_config(S11_PIA3, PIA_STANDARD_ORDERING, &s11_pia[3]); + pia_config(S11_PIA4, PIA_STANDARD_ORDERING, &s11_pia[4]); + pia_config(S11_PIA5, PIA_STANDARD_ORDERING, &s11_pia[5]); + sndbrd_0_init(SNDBRD_S9S, 1, NULL, NULL, NULL); +} +static MACHINE_RESET(s11) { + pia_reset(); +} +static MACHINE_STOP(s11) { + sndbrd_0_exit(); sndbrd_1_exit(); +} + +/*--------------------------- +/ Memory map for main CPU +/----------------------------*/ +static MEMORY_READ_START(s11_readmem) + { 0x0000, 0x1fff, MRA_RAM}, + { 0x2100, 0x2103, pia_r(S11_PIA0) }, + { 0x2400, 0x2403, pia_r(S11_PIA1) }, + { 0x2800, 0x2803, pia_r(S11_PIA2) }, + { 0x2c00, 0x2c03, pia_r(S11_PIA3) }, + { 0x3000, 0x3003, pia_r(S11_PIA4) }, + { 0x3400, 0x3403, pia_r(S11_PIA5) }, + { 0x4000, 0xffff, MRA_ROM }, +MEMORY_END + +static MEMORY_WRITE_START(s11_writemem) + { 0x0000, 0x1fff, MWA_RAM }, /* CMOS */ + { 0x2100, 0x2103, pia_w(S11_PIA0) }, + { 0x2200, 0x2200, latch2200}, + { 0x2400, 0x2403, pia_w(S11_PIA1) }, + { 0x2800, 0x2803, pia_w(S11_PIA2) }, + { 0x2c00, 0x2c03, pia_w(S11_PIA3) }, + { 0x3000, 0x3003, pia_w(S11_PIA4) }, + { 0x3400, 0x3403, pia_w(S11_PIA5) }, + { 0x4000, 0xffff, MWA_ROM }, +MEMORY_END + +/*----------------- +/ Machine drivers +/------------------*/ +static MACHINE_DRIVER_START(s11) + MDRV_IMPORT_FROM(PinMAME) + MDRV_CORE_INIT_RESET_STOP(s11,s11,s11) + MDRV_CPU_ADD(M6808, 1000000) + MDRV_CPU_MEMORY(s11_readmem, s11_writemem) + MDRV_CPU_VBLANK_INT(s11_vblank, 1) + MDRV_CPU_PERIODIC_INT(s11_irq, S11_IRQFREQ) + MDRV_DIPS(1) /* (actually a jumper) */ + MDRV_SWITCH_UPDATE(s11) +MACHINE_DRIVER_END + +/* System 9 */ +MACHINE_DRIVER_START(s11_s9S) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(wmssnd_s9s) + MDRV_NVRAM_HANDLER(s11) + MDRV_DIAGNOSTIC_LED7 + MDRV_SOUND_CMD(s11_sndCmd_w) + MDRV_SOUND_CMDHEADING("s11") +MACHINE_DRIVER_END + +/* System 11 with S11C sound board, diagnostic digit */ +MACHINE_DRIVER_START(s11_s11XS) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(wmssnd_s11xs) + MDRV_NVRAM_HANDLER(s11) + MDRV_DIAGNOSTIC_LED7 + MDRV_SOUND_CMD(s11_sndCmd_w) + MDRV_SOUND_CMDHEADING("s11") +MACHINE_DRIVER_END + +/* Pennant Fever */ +MACHINE_DRIVER_START(s11_s9PS) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(wmssnd_s9ps) + MDRV_CORE_INIT_RESET_STOP(s9pf,s11,s11) + MDRV_NVRAM_HANDLER(s11) + MDRV_DIAGNOSTIC_LED7 + MDRV_SOUND_CMD(s11_sndCmd_w) + MDRV_SOUND_CMDHEADING("s11") +MACHINE_DRIVER_END + +/* System 11 with S11C sound board, diagnostic LED only */ +MACHINE_DRIVER_START(s11_s11XSL) + MDRV_IMPORT_FROM(s11_s11XS) + MDRV_DIAGNOSTIC_LEDH(1) +MACHINE_DRIVER_END + +/* System 11a without external sound board*/ +MACHINE_DRIVER_START(s11_s11S) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(wmssnd_s11s) + MDRV_NVRAM_HANDLER(s11) + MDRV_DIAGNOSTIC_LEDH(1) + MDRV_SOUND_CMD(s11_sndCmd_w) + MDRV_SOUND_CMDHEADING("s11") +MACHINE_DRIVER_END + +/* System 11a with S11C sound board */ +MACHINE_DRIVER_START(s11_s11aS) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(wmssnd_s11xs) + MDRV_NVRAM_HANDLER(s11) + MDRV_DIAGNOSTIC_LEDH(1) + MDRV_SOUND_CMD(s11_sndCmd_w) + MDRV_SOUND_CMDHEADING("s11") +MACHINE_DRIVER_END + +/* System 11B with Jokerz! sound board*/ +MACHINE_DRIVER_START(s11_s11b2S) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(wmssnd_s11b2s) + MDRV_NVRAM_HANDLER(s11) + MDRV_DIAGNOSTIC_LEDH(1) + MDRV_SOUND_CMD(s11_sndCmd_w) + MDRV_SOUND_CMDHEADING("s11") +MACHINE_DRIVER_END + +/* System 11C */ +MACHINE_DRIVER_START(s11_s11cS) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(wmssnd_s11cs) + MDRV_NVRAM_HANDLER(s11) + MDRV_DIAGNOSTIC_LEDH(1) + MDRV_SOUND_CMD(s11_sndCmd_w) + MDRV_SOUND_CMDHEADING("s11") +MACHINE_DRIVER_END + +/* DE alpa numeric No Sound */ +MACHINE_DRIVER_START(de_a) + MDRV_IMPORT_FROM(s11) + MDRV_NVRAM_HANDLER(de) + MDRV_DIAGNOSTIC_LEDH(1) +MACHINE_DRIVER_END + +/* DE alphanumeric Sound 1 */ +MACHINE_DRIVER_START(de_a1S) + MDRV_IMPORT_FROM(de_a) + MDRV_IMPORT_FROM(de1s) + MDRV_SOUND_CMD(de_sndCmd_w) + MDRV_SOUND_CMDHEADING("DE") +MACHINE_DRIVER_END + +/* DE 128x16 Sound 1 */ +MACHINE_DRIVER_START(de_dmd161S) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(de1s) + MDRV_IMPORT_FROM(de_dmd16) + MDRV_NVRAM_HANDLER(de) + MDRV_DIAGNOSTIC_LEDH(1) + MDRV_SOUND_CMD(de_sndCmd_w) + MDRV_SOUND_CMDHEADING("DE") +MACHINE_DRIVER_END + +/* DE 128x16 Sound 2a */ +MACHINE_DRIVER_START(de_dmd162aS) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(de2aas) + MDRV_IMPORT_FROM(de_dmd16) + MDRV_NVRAM_HANDLER(de) + MDRV_DIAGNOSTIC_LEDH(1) + MDRV_SOUND_CMD(de_sndCmd_w) + MDRV_SOUND_CMDHEADING("DE") +MACHINE_DRIVER_END + +/* DE 128x32 Sound 2a */ +MACHINE_DRIVER_START(de_dmd322aS) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(de2aas) + MDRV_IMPORT_FROM(de_dmd32) + MDRV_NVRAM_HANDLER(de) + MDRV_DIAGNOSTIC_LEDH(1) + MDRV_SOUND_CMD(de_sndCmd_w) + MDRV_SOUND_CMDHEADING("DE") +MACHINE_DRIVER_END + +/* DE 192x64 Sound 2a */ +MACHINE_DRIVER_START(de_dmd642aS) + MDRV_IMPORT_FROM(s11) + MDRV_IMPORT_FROM(de2aas) + MDRV_IMPORT_FROM(de_dmd64) + MDRV_NVRAM_HANDLER(de) + MDRV_DIAGNOSTIC_LEDH(1) + MDRV_SOUND_CMD(de_sndCmd_w) + MDRV_SOUND_CMDHEADING("DE") +MACHINE_DRIVER_END + +/*----------------------------------------------- +/ Load/Save static ram +/-------------------------------------------------*/ +static NVRAM_HANDLER(s11) { + core_nvram(file, read_or_write, memory_region(S11_CPUREGION), 0x0800, 0xff); +} +static NVRAM_HANDLER(de) { + core_nvram(file, read_or_write, memory_region(S11_CPUREGION), 0x2000, 0xff); +} +#endif diff --git a/src/mame/drivers/p_s11.h b/src/mame/drivers/p_s11.h new file mode 100644 index 00000000000..4e154e2a2d9 --- /dev/null +++ b/src/mame/drivers/p_s11.h @@ -0,0 +1,263 @@ +// new code to allow the PinMAME rom loading to compile + +#define S11_INPUT_PORTS_START(name,balls) \ + INPUT_PORTS_START(name) \ + +#define S11_INPUT_PORTS_END \ + INPUT_PORTS_END \ + + +/*-- Memory regions --*/ +#define S11_CPUREGION "cpu1" + +/*-- Main CPU regions and ROM --*/ +#define S9_ROMSTARTx4(name, ver, n1, chk1) \ + ROM_START(name##_##ver) \ + NORMALREGION(0x10000, S11_CPUREGION) \ + ROM_LOAD(n1, 0x8000, 0x4000, chk1) \ + ROM_RELOAD( 0xc000, 0x4000) + +#define S9_ROMSTART12(name, ver, n1, chk1,n2,chk2) \ + ROM_START(name##_##ver) \ + NORMALREGION(0x10000, S11_CPUREGION) \ + ROM_LOAD(n1, 0x5000, 0x1000, chk1) \ + ROM_RELOAD( 0xd000, 0x1000) \ + ROM_LOAD(n2, 0x6000, 0x2000, chk2) \ + ROM_RELOAD( 0xe000, 0x2000) + +#define S11_ROMSTART48(name, ver, n1, chk1, n2, chk2) \ + ROM_START(name##_##ver) \ + NORMALREGION(0x10000, S11_CPUREGION) \ + ROM_LOAD(n1, 0x4000, 0x4000, chk1) \ + ROM_LOAD(n2, 0x8000, 0x8000, chk2) + +#define S11_ROMSTART28(name, ver, n1, chk1, n2, chk2) \ + ROM_START(name##_##ver) \ + NORMALREGION(0x10000, S11_CPUREGION) \ + ROM_LOAD(n1, 0x4000, 0x2000, chk1) \ + ROM_RELOAD( 0x6000, 0x2000) \ + ROM_LOAD(n2, 0x8000, 0x8000, chk2) + +#define S11_ROMSTART24(name, ver, n1, chk1, n2, chk2) \ + ROM_START(name##_##ver) \ + NORMALREGION(0x10000, S11_CPUREGION) \ + ROM_LOAD(n1, 0x4000, 0x2000, chk1) \ + ROM_RELOAD( 0x6000, 0x2000) \ + ROM_LOAD(n2, 0x8000, 0x4000, chk2) \ + ROM_RELOAD( 0xc000, 0x4000) + +#define S11_ROMEND ROM_END +#define S9_ROMEND ROM_END +#define DE_ROMEND ROM_END + +#define DE_CPUREGION REGION_CPU1 + +/** 16K & 32K ROMS 1632 **/ +#define DE_ROMSTART48(name, n1, chk1, n2, chk2) \ + ROM_START(name) \ + NORMALREGION(0x10000, DE_CPUREGION) \ + ROM_LOAD(n1, 0x4000, 0x4000, chk1) \ + ROM_LOAD(n2, 0x8000, 0x8000, chk2) + +/** 2 X 32K(1st 8K of B5 Chip is Blank) ROMS 3232 **/ +#define DE_ROMSTART88(name, n1, chk1, n2, chk2) \ + ROM_START(name) \ + NORMALREGION(0x10000, DE_CPUREGION) \ + ROM_LOAD(n1, 0x0000, 0x8000, chk1) \ + ROM_LOAD(n2, 0x8000, 0x8000, chk2) + +/******* GAMES USING ONLY 1 ROM *******/ +/** 32K in 1 Rom Only **/ +#define DE_ROMSTARTx8(name, n1, chk1) \ + ROM_START(name) \ + NORMALREGION(0x10000, DE_CPUREGION) \ + ROM_LOAD(n1, 0x8000, 0x8000, chk1) + +/** 64K(1st 8K of Chip is Blank) ROM **/ +#define DE_ROMSTARTx0(name, n1, chk1) \ + ROM_START(name) \ + NORMALREGION(0x10000, DE_CPUREGION) \ + ROM_LOAD(n1, 0x0000, 0x10000, chk1) + + +#define s9_mS9S s11_s9S +#define s9_mS9PS s11_s9PS +#define s11_mS11S s11_s11S +#define s11_mS11XS s11_s11XS +#define s11_mS11XSL s11_s11XSL +#define s11_mS11AS s11_s11aS +#define s11_mS11BS s11_s11aS +#define s11_mS11B2S s11_s11b2S +#define s11_mS11CS s11_s11cS +#define de_mDEA de_a +#define de_mDEAS1 de_a1S +#define de_mDEDMD16S1 de_dmd161S +#define de_mDEDMD16S2A de_dmd162aS +#define de_mDEDMD32S2A de_dmd322aS +#define de_mDEDMD64S2A de_dmd642aS + + +/************************************************************************************************ +************************************************************************************************* + Old PinMAME code below for reference ONLY +************************************************************************************************* +************************************************************************************************/ + +#if 0 + +#ifndef INC_S11 +#define INC_S11 + +/*-- Common Inports for S11Games --*/ +#define S11_COMPORTS \ + PORT_START /* 0 */ \ + /* Switch Column 1 */ \ + COREPORT_BITDEF( 0x0001, IPT_TILT, KEYCODE_INSERT) \ + COREPORT_BIT( 0x0002, "Ball Tilt", KEYCODE_2) \ + COREPORT_BITDEF( 0x0004, IPT_START1, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0008, IPT_COIN1, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0010, IPT_COIN2, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0020, IPT_COIN3, KEYCODE_3) \ + COREPORT_BIT( 0x0040, "Slam Tilt", KEYCODE_HOME) \ + COREPORT_BIT( 0x0080, "Hiscore Reset", KEYCODE_4) \ + /* These are put in switch column 0 */ \ + COREPORT_BIT( 0x0100, "Advance", KEYCODE_8) \ + COREPORT_BITTOG( 0x0200, "Up/Down", KEYCODE_7) \ + COREPORT_BIT( 0x0400, "CPU Diagnostic", KEYCODE_9) \ + COREPORT_BIT( 0x0800, "Sound Diagnostic", KEYCODE_0) \ + PORT_START /* 1 */ \ + COREPORT_DIPNAME( 0x0001, 0x0000, "Country") \ + COREPORT_DIPSET(0x0001, "Germany" ) \ + COREPORT_DIPSET(0x0000, "USA" ) + +#define DE_COMPORTS \ + PORT_START /* 0 */ \ + /* Switch Column 1 */ \ + COREPORT_BITDEF( 0x0001, IPT_TILT, KEYCODE_INSERT) \ + COREPORT_BIT( 0x0002, "Ball Tilt", KEYCODE_2) \ + COREPORT_BITDEF( 0x0004, IPT_START1, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0008, IPT_COIN1, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0010, IPT_COIN2, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0020, IPT_COIN3, KEYCODE_3) \ + COREPORT_BIT( 0x0040, "Slam Tilt", KEYCODE_HOME) \ + /* These are put in switch column 0 */ \ + COREPORT_BIT( 0x0100, "Black Button", KEYCODE_8) \ + COREPORT_BITTOG( 0x0200, "Green Button", KEYCODE_7) + +//Games after Frankenstein used Non-Toggling Up/Down(Green Button) Switch +#define DE_COMPORTS2 \ + PORT_START /* 0 */ \ + /* Switch Column 1 */ \ + COREPORT_BITDEF( 0x0001, IPT_TILT, KEYCODE_INSERT) \ + COREPORT_BIT( 0x0002, "Ball Tilt", KEYCODE_2) \ + COREPORT_BITDEF( 0x0004, IPT_START1, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0008, IPT_COIN1, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0010, IPT_COIN2, IP_KEY_DEFAULT) \ + COREPORT_BITDEF( 0x0020, IPT_COIN3, KEYCODE_3) \ + COREPORT_BIT( 0x0040, "Slam Tilt", KEYCODE_HOME) \ + /* These are put in switch column 0 */ \ + COREPORT_BIT( 0x0100, "Black Button", KEYCODE_8) \ + COREPORT_BIT( 0x0200, "Green Button", KEYCODE_7) \ + + +/*-- Standard input ports --*/ +#define S11_INPUT_PORTS_START(name,balls) \ + INPUT_PORTS_START(name) \ + CORE_PORTS \ + SIM_PORTS(balls) \ + S11_COMPORTS + +#define S11_INPUT_PORTS_END INPUT_PORTS_END + +#define S11_COMINPORT CORE_COREINPORT + +#define DE_INPUT_PORTS_START(name,balls) \ + INPUT_PORTS_START(name) \ + CORE_PORTS \ + SIM_PORTS(balls) \ + DE_COMPORTS + +#define DE_INPUT_PORTS_END INPUT_PORTS_END + +#define DE_COMINPORT CORE_COREINPORT + +/*-- Standard input ports --*/ +#define DE_INPUT_PORTS_START2(name,balls) \ + INPUT_PORTS_START(name) \ + CORE_PORTS \ + SIM_PORTS(balls) \ + DE_COMPORTS2 + +/*-- To access C-side multiplexed solenoid/flasher --*/ +#define S11_CSOL(x) ((x)+(WPC_FIRSTFLIPPERSOL-1)) +#define DE_CSOL(x) ((x)+24) +/*-- GameOn solenoids --*/ +#define S11_GAMEONSOL 23 +#define DE_GAMEONSOL 23 + +/*-- DE switch numbers --*/ +#define DE_SWADVANCE -7 +#define DE_SWUPDN -6 + +/*-- S11 switch numbers --*/ +#define S11_SWADVANCE -7 +#define S11_SWUPDN -6 +#define S11_SWCPUDIAG -5 +#define S11_SWSOUNDDIAG -4 + +/*------------------------- +/ Machine driver constants +/--------------------------*/ + + +/*-- standard display layouts --*/ +extern const core_tLCDLayout s11_dispS9[], s11_dispS11[], s11_dispS11a[], s11_dispS11b2[]; +#define s11_dispS11b1 s11_dispS11a +#define s11_dispS11c s11_dispS11b2 + +extern MACHINE_DRIVER_EXTERN(s11_s9S); +extern MACHINE_DRIVER_EXTERN(s11_s9PS); +extern MACHINE_DRIVER_EXTERN(s11_s11S); +extern MACHINE_DRIVER_EXTERN(s11_s11XS); +extern MACHINE_DRIVER_EXTERN(s11_s11XSL); +extern MACHINE_DRIVER_EXTERN(s11_s11aS); +extern MACHINE_DRIVER_EXTERN(s11_s11b2S); +extern MACHINE_DRIVER_EXTERN(s11_s11cS); +extern MACHINE_DRIVER_EXTERN(de_a); +extern MACHINE_DRIVER_EXTERN(de_a1S); +extern MACHINE_DRIVER_EXTERN(de_dmd161S); +extern MACHINE_DRIVER_EXTERN(de_dmd162aS); +extern MACHINE_DRIVER_EXTERN(de_dmd322aS); +extern MACHINE_DRIVER_EXTERN(de_dmd642aS); + + + +// Display options +#define S11_BCDDIAG 0x01 // 7seg diagnostic led +#define S11_BCDDISP 0x02 // BCD display +#define S11_LOWALPHA 0x04 // Alphanumeric second line display +#define S11_DISPINV 0x08 // Display signals are inverted +// Game specific options +#define S11_MUXSW2 0x01 // MUX Solenoid activates switch 2 +#define S11_SNDOVERLAY 0x02 // Overlay solenoid board +#define S11_PRINTERLINE 0x04 // Got printer lines +#define S11_RKMUX 0x08 // Road Kings muxes different solenoids +#define S11_MUXDELAY 0x10 // Delay mux solenoid by one IRQ +#define S11_SNDDELAY 0x20 // Sound delay for Pool Sharks + +#if 0 +GEN_S9 BCDDISP +GEN_S11 +GEN_S11A +GEN_S11B_1 +GEN_S11B_2 LOWALPHA | INV MUX2 +GEN_S11B_2x LOWALPHA | INV | EXTSOLBOARD MUX2 +GEN_S11B_3 LOWALPHA | INV MUX2 +GEN_S11C LOWALPHA | INV MUX2 +DE_ALPHA1 +DE_ALPHA2 +DE_ALPHA3 LOWALPHA +#endif +#endif /* INC_S11 */ + +#endif diff --git a/src/mame/drivers/p_wmssnd.c b/src/mame/drivers/p_wmssnd.c new file mode 100644 index 00000000000..a3396da312d --- /dev/null +++ b/src/mame/drivers/p_wmssnd.c @@ -0,0 +1,1416 @@ +/************************************************************************************************ +************************************************************************************************* + Old PinMAME code below for reference ONLY +************************************************************************************************* +************************************************************************************************/ + +#if 0 + +#include "driver.h" +#include "cpu/m6800/m6800.h" +#include "cpu/m6809/m6809.h" +#include "cpu/adsp2100/adsp2100.h" +#include "machine/6821pia.h" +#include "sound/2151intf.h" +#include "sound/hc55516.h" +#include "sound/dac.h" +#include "core.h" +#include "sndbrd.h" +#include "s11.h" +#include "wpc.h" +#include "wmssnd.h" + +//This awful hack is here to prevent the bug where the speech pitch is too low on pre-dcs games when +//the YM2151 is not outputing music. In the hardware the YM2151's Timer A is set to control the FIRQ of the sound cpu 6809. +//The 6809 will output CVSD speech data based on the speed of the FIRQ. The faster the speed, the higher the +//pitch. For some reason, when the YM2151 is not outputting sound, the FIRQ rate goes down.. Def. some kind of +//MAME core bug with timing, but I can't find it. I really hope someone can fix this hack someday..SJE 09/17/03 +#define PREDCS_FIRQ_HACK + +/*---------------------- +/ System 3 - 7 +/-----------------------*/ +#define S67S_PIA0 6 + +/* sound board interface */ +static void s67s_init(struct sndbrdData *brdData); +static WRITE_HANDLER(s67s_cmd_w); +static void s67s_diag(int button); + +const struct sndbrdIntf s67sIntf = { + "WMSS67", s67s_init, NULL, s67s_diag, s67s_cmd_w, s67s_cmd_w, NULL, NULL, NULL, SNDBRD_NOCTRLSYNC +}; + +/* machine interface */ +static MEMORY_READ_START(s67s_readmem ) + { 0x0000, 0x007f, MRA_RAM }, + { 0x0400, 0x0403, pia_r(S67S_PIA0) }, + { 0x3000, 0x7fff, MRA_ROM }, + { 0x8400, 0x8403, pia_r(S67S_PIA0) }, + { 0xb000, 0xffff, MRA_ROM }, +MEMORY_END + +static MEMORY_WRITE_START(s67s_writemem ) + { 0x0000, 0x007f, MWA_RAM }, + { 0x0400, 0x0403, pia_w(S67S_PIA0) }, + { 0x8400, 0x8403, pia_w(S67S_PIA0) }, +MEMORY_END +static struct DACinterface s67s_dacInt = { 1, { 50 }}; +static struct hc55516_interface s67s_hc55516Int = { 1, { 100 }}; + +MACHINE_DRIVER_START(wmssnd_s67s) + MDRV_CPU_ADD(M6808, 3579000/4) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(s67s_readmem, s67s_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD(DAC, s67s_dacInt) + MDRV_SOUND_ADD(HC55516, s67s_hc55516Int) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +MACHINE_DRIVER_END + +static void s67s_piaIrq(int state); +static const struct pia6821_interface s67s_pia = { + /* PIA0 (0400) + PA0-7 DAC + PB0-7 Sound input + CB1 Sound input != 0x1f + CB2 Speech clock + CA2 Speech data + CA1 NC */ + /* in : A/B,CA/B1,CA/B2 */ 0, 0, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ DAC_0_data_w, 0, hc55516_0_digit_w, hc55516_0_clock_w, + /* irq : A/B */ s67s_piaIrq, s67s_piaIrq +}; + +static struct { + struct sndbrdData brdData; +} s67slocals; + +static void s67s_init(struct sndbrdData *brdData) { + s67slocals.brdData = *brdData; + pia_config(S67S_PIA0, PIA_STANDARD_ORDERING, &s67s_pia); +} + +static WRITE_HANDLER(s67s_cmd_w) { + if (s67slocals.brdData.subType) { // don't use sound dips + data &= 0x7f; + } else { + data = (data & 0x1f) | (core_getDip(0)<<5); + } + pia_set_input_b(S67S_PIA0, data); + if (s67slocals.brdData.subType) { + pia_set_input_cb1(S67S_PIA0, !((data & 0x7f) == 0x7f)); + } else { + pia_set_input_cb1(S67S_PIA0, !((data & 0x1f) == 0x1f)); + } +} +static void s67s_diag(int button) { + cpu_set_nmi_line(s67slocals.brdData.cpuNo, button ? ASSERT_LINE : CLEAR_LINE); +} + +static void s67s_piaIrq(int state) { + cpu_set_irq_line(s67slocals.brdData.cpuNo, M6808_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); +} + +/*---------------------------- +/ S11 CPU board sound +/-----------------------------*/ +#define S11S_PIA0 6 +#define S11S_BANK0 1 +#define S11S_BANK1 2 + +/* sound board interface */ +static void s11s_init(struct sndbrdData *brdData); +static void s11s_diag(int button); +static WRITE_HANDLER(s11s_manCmd_w); +static WRITE_HANDLER(s11s_bankSelect); +const struct sndbrdIntf s11sIntf = { + "WMSS11", s11s_init, NULL, s11s_diag, s11s_manCmd_w, soundlatch_w, NULL, CAT3(pia_,S11S_PIA0,_ca1_w), NULL +}; +/* machine interface */ +static MEMORY_READ_START(s9s_readmem) + { 0x0000, 0x0fff, MRA_RAM}, + { 0x2000, 0x2003, pia_r(S11S_PIA0)}, + { 0x8000, 0xffff, MRA_ROM}, /* U22 */ +MEMORY_END +static MEMORY_WRITE_START(s9s_writemem) + { 0x0000, 0x0fff, MWA_RAM }, + { 0x2000, 0x2003, pia_w(S11S_PIA0)}, +MEMORY_END + +static struct DACinterface s9s_dacInt = { 1, { 50 }}; +static struct hc55516_interface s9s_hc55516Int = { 1, { 100 }}; + +MACHINE_DRIVER_START(wmssnd_s9s) + MDRV_CPU_ADD(M6808, 1000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(s9s_readmem, s9s_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD(DAC, s9s_dacInt) + MDRV_SOUND_ADD(HC55516,s9s_hc55516Int) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +MACHINE_DRIVER_END + +static MEMORY_READ_START(s11s_readmem) + { 0x0000, 0x0fff, MRA_RAM}, + { 0x2000, 0x2003, pia_r(S11S_PIA0) }, + { 0x8000, 0xbfff, MRA_BANKNO(S11S_BANK0)}, /* U22 */ + { 0xc000, 0xffff, MRA_BANKNO(S11S_BANK1)}, /* U21 */ +MEMORY_END +static MEMORY_WRITE_START(s11s_writemem) + { 0x0000, 0x0fff, MWA_RAM }, + { 0x1000, 0x1000, s11s_bankSelect}, + { 0x2000, 0x2003, pia_w(S11S_PIA0)}, +MEMORY_END + +static void s11cs_ym2151IRQ(int state); +static struct DACinterface s11xs_dacInt2 = { 2, { 50,50 }}; +static struct hc55516_interface s11b2s_hc55516Int = { 1, { 80 }}; +static struct hc55516_interface s11xs_hc55516Int2 = { 2, { 80,80 }}; +static struct YM2151interface s11cs_ym2151Int = { + 1, 3579545, /* Hz */ + { YM3012_VOL(10,MIXER_PAN_CENTER,30,MIXER_PAN_CENTER) }, + { s11cs_ym2151IRQ } +}; + +MACHINE_DRIVER_START(wmssnd_s11s) + MDRV_CPU_ADD(M6808, 1000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(s11s_readmem, s11s_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD(DAC, s9s_dacInt) + MDRV_SOUND_ADD(HC55516,s9s_hc55516Int) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +MACHINE_DRIVER_END + +MACHINE_DRIVER_START(wmssnd_s11xs) + MDRV_IMPORT_FROM(wmssnd_s11cs) + MDRV_CPU_ADD(M6808, 1000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(s11s_readmem, s11s_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_REPLACE("dac", DAC, s11xs_dacInt2) + MDRV_SOUND_REPLACE("cvsd", HC55516,s11xs_hc55516Int2) +MACHINE_DRIVER_END + +MACHINE_DRIVER_START(wmssnd_s11b2s) + MDRV_IMPORT_FROM(wmssnd_s11js) + MDRV_CPU_ADD(M6808, 1000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(s11s_readmem, s11s_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD_TAG("dac", DAC, s11xs_dacInt2) + MDRV_SOUND_ADD_TAG("cvsd",HC55516,s11b2s_hc55516Int) +MACHINE_DRIVER_END + +static void s11s_piaIrq(int state); +static const struct pia6821_interface s11s_pia[] = {{ + /* PIA 0 (sound 2000) S11 */ + /* PA0 - PA7 (I) Sound Select Input (soundlatch) */ + /* PB0 - PB7 DAC */ + /* CA1 (I) Sound H.S */ + /* CB1 (I) 1ms */ + /* CA2 55516 Clk */ + /* CB2 55516 Dig */ + /* subType 0 and 4 for S9 and S11S */ + /* in : A/B,CA/B1,CA/B2 */ soundlatch_r, 0, PIA_UNUSED_VAL(0), 0, 0, 0, + /* out : A/B,CA/B2 */ 0, DAC_0_data_w, hc55516_0_clock_w, hc55516_0_digit_w, + /* irq : A/B */ s11s_piaIrq, s11s_piaIrq +},{ + /* subType 1 for S11X */ + /* in : A/B,CA/B1,CA/B2 */ soundlatch_r, 0, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ 0, DAC_1_data_w, hc55516_1_clock_w, hc55516_1_digit_w, + /* irq : A/B */ s11s_piaIrq, s11s_piaIrq +},{ + /* subType 2 for S11B2 */ + /* in : A/B,CA/B1,CA/B2 */ soundlatch_r, 0, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ 0, DAC_1_data_w, hc55516_0_clock_w, hc55516_0_digit_w, + /* irq : A/B */ s11s_piaIrq, s11s_piaIrq +}}; + +static struct { + struct sndbrdData brdData; +} s11slocals; + +static void s11s_init(struct sndbrdData *brdData) { + int i; + s11slocals.brdData = *brdData; + pia_config(S11S_PIA0, PIA_STANDARD_ORDERING, &s11s_pia[s11slocals.brdData.subType & 3]); + if (s11slocals.brdData.subType) { + cpu_setbank(S11S_BANK0, s11slocals.brdData.romRegion+0xc000); + cpu_setbank(S11S_BANK1, s11slocals.brdData.romRegion+0x4000); + } + for (i=0; i < 0x1000; i++) memory_region(S9S_CPUREGION)[i] = 0xff; + if (core_gameData->hw.gameSpecific2) { + hc55516_set_gain(0, core_gameData->hw.gameSpecific2); + } +} +static WRITE_HANDLER(s11s_manCmd_w) { + soundlatch_w(0, data); pia_set_input_ca1(S11S_PIA0, 1); pia_set_input_ca1(S11S_PIA0, 0); +} +static WRITE_HANDLER(s11s_bankSelect) { + cpu_setbank(S11S_BANK0, s11slocals.brdData.romRegion + 0x8000+((data&0x01)<<14)); + cpu_setbank(S11S_BANK1, s11slocals.brdData.romRegion + 0x0000+((data&0x02)<<13)); +} + +static void s11s_piaIrq(int state) { + cpu_set_irq_line(s11slocals.brdData.cpuNo, M6808_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); +} + +static void s11s_diag(int button) { + cpu_set_nmi_line(s11slocals.brdData.cpuNo, button ? ASSERT_LINE : CLEAR_LINE); +} + +/*-------------------------- +/ Pennant Fever sound board. +/ Thanks to Destruk for +/ buying the schematics! :) +/---------------------------*/ +#define S9P_PIA0 6 + +static struct { + struct sndbrdData brdData; +} s9plocals; + +static WRITE_HANDLER(s9p_hs_w) { pia_set_input_ca1(0, data); } +static WRITE_HANDLER(ext_hs_w) { pia_set_input_ca1(S9P_PIA0, data); } +static void s9p_piaIrq(int state) { + cpu_set_irq_line(s9plocals.brdData.cpuNo, M6808_IRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); +} + +static const struct pia6821_interface s9p_pia = { + /* PIA 0 (4000) */ + /* PA0 - PA7 CPU interface (MDx) */ + /* PB0 - PB7 DAC */ + /* in : A/B,CA/B1,CA/B2 */ + soundlatch_r, 0, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ + 0, DAC_0_data_w, s9p_hs_w, 0, + /* irq : A/B */ + s9p_piaIrq, s9p_piaIrq +}; + +static void s9p_init(struct sndbrdData *brdData) { + s9plocals.brdData = *brdData; + pia_config(S9P_PIA0, PIA_STANDARD_ORDERING, &s9p_pia); +} + +static void s9p_diag(int state) { + cpu_set_nmi_line(s9plocals.brdData.cpuNo, state ? ASSERT_LINE : CLEAR_LINE); +} + +static MEMORY_READ_START(s9p_readmem) + { 0x0000, 0x00ff, MRA_RAM }, + { 0x4000, 0x4003, pia_r(S9P_PIA0) }, + { 0xc000, 0xffff, MRA_ROM }, +MEMORY_END + +static MEMORY_WRITE_START(s9p_writemem) + { 0x0000, 0x00ff, MWA_RAM }, + { 0x4000, 0x4003, pia_w(S9P_PIA0) }, +MEMORY_END + +static struct DACinterface s9p_dacInt = { 1, { 60 }}; + +const struct sndbrdIntf s9psIntf = { + "WMSS9P", s9p_init, NULL, s9p_diag, soundlatch_w, soundlatch_w, NULL, ext_hs_w +}; + +MACHINE_DRIVER_START(wmssnd_s9ps) + MDRV_CPU_ADD(M6808, 1000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(s9p_readmem, s9p_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD_TAG("dac", DAC, s9p_dacInt) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +MACHINE_DRIVER_END + +/*-------------------------- +/ System 11C sound board +/---------------------------*/ +#define S11CS_PIA0 7 +#define S11CS_BANK0 4 + +static void s11cs_piaIrqA(int state); +static void s11cs_piaIrqB(int state); +static WRITE_HANDLER(s11cs_pia0ca2_w); +static WRITE_HANDLER(s11cs_pia0cb2_w); +static WRITE_HANDLER(s11cs_rombank_w); +static WRITE_HANDLER(s11cs_manCmd_w); +static void s11cs_init(struct sndbrdData *brdData); + +static struct { + struct sndbrdData brdData; + int ignore; +} s11clocals; + +static WRITE_HANDLER(cslatch2_w) { + if (!s11clocals.ignore) + soundlatch2_w(offset, data); + else s11clocals.ignore--; +} + +const struct sndbrdIntf s11csIntf = { + "WMSS11C", s11cs_init, NULL, NULL, s11cs_manCmd_w, + cslatch2_w, NULL, + CAT3(pia_,S11CS_PIA0,_cb1_w), soundlatch3_r +}; + +static MEMORY_READ_START(s11cs_readmem) + { 0x0000, 0x1fff, MRA_RAM }, + { 0x2001, 0x2001, YM2151_status_port_0_r }, /* 2001-2fff odd */ + { 0x4000, 0x4003, pia_r(S11CS_PIA0) }, /* 4000-4fff */ + { 0x8000, 0xffff, MRA_BANKNO(S11CS_BANK0) }, +MEMORY_END + +static WRITE_HANDLER(odd_w) { + logerror("Star Trax sound write: %02x:%02x\n", offset, data); +} +static MEMORY_WRITE_START(s11cs_writemem) + { 0x0000, 0x1fff, MWA_RAM }, + { 0x2000, 0x2000, YM2151_register_port_0_w }, /* 2000-2ffe even */ + { 0x2001, 0x2001, YM2151_data_port_0_w }, /* 2001-2fff odd */ + { 0x4000, 0x4003, pia_w(S11CS_PIA0) }, /* 4000-4fff */ + { 0x6000, 0x6000, hc55516_0_digit_clock_clear_w },/* 6000-67ff */ + { 0x6800, 0x6800, hc55516_0_clock_set_w }, /* 6800-6fff */ + { 0x7800, 0x7800, s11cs_rombank_w }, /* 7800-7fff */ + { 0x9c00, 0x9cff, odd_w }, +MEMORY_END + +static struct DACinterface s11cs_dacInt = { 1, { 50 }}; +static struct hc55516_interface s11cs_hc55516Int = { 1, { 100 }}; + +MACHINE_DRIVER_START(wmssnd_s11cs) + MDRV_CPU_ADD(M6809, 2000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(s11cs_readmem, s11cs_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD(YM2151, s11cs_ym2151Int) + MDRV_SOUND_ADD_TAG("dac", DAC, s11cs_dacInt) + MDRV_SOUND_ADD_TAG("cvsd", HC55516,s11cs_hc55516Int) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +MACHINE_DRIVER_END + +static const struct pia6821_interface s11cs_pia = { + /* PIA 0 (4000) */ + /* PA0 - PA7 DAC */ + /* PB0 - PB7 CPU interface (MDx) */ + /* CA1 YM2151 IRQ */ + /* CB1 (I) CPU interface (MCB2) */ + /* CA2 YM 2151 pin 3 (Reset ?) */ + /* CB2 CPU interface (MCB1) */ + /* in : A/B,CA/B1,CA/B2 */ + 0, soundlatch2_r, 0, 0, 0, 0, + /* out : A/B,CA/B2 */ + DAC_0_data_w, soundlatch3_w, s11cs_pia0ca2_w, s11cs_pia0cb2_w, + /* irq : A/B */ + s11cs_piaIrqA, s11cs_piaIrqB +}; + +static WRITE_HANDLER(s11cs_rombank_w) { + cpu_setbank(S11CS_BANK0, s11clocals.brdData.romRegion + 0x10000*(data & 0x03) + 0x8000*((data & 0x04)>>2)); +} +static void s11cs_init(struct sndbrdData *brdData) { + s11clocals.brdData = *brdData; + s11clocals.ignore = core_gameData->hw.gameSpecific1 & S11_SNDDELAY ? 7 : 0; + pia_config(S11CS_PIA0, PIA_STANDARD_ORDERING, &s11cs_pia); + cpu_setbank(S11CS_BANK0, s11clocals.brdData.romRegion); +} +static WRITE_HANDLER(s11cs_manCmd_w) { + cslatch2_w(0, data); pia_set_input_cb1(S11CS_PIA0, 1); pia_set_input_cb1(S11CS_PIA0, 0); +} + +static WRITE_HANDLER(s11cs_pia0ca2_w) { if (!data) YM2151_sh_reset(); } +static WRITE_HANDLER(s11cs_pia0cb2_w) { sndbrd_data_cb(s11clocals.brdData.boardNo,data); } + +static void s11cs_ym2151IRQ(int state) { pia_set_input_ca1(S11CS_PIA0, !state); } +static void s11cs_piaIrqA(int state) { + cpu_set_irq_line(s11clocals.brdData.cpuNo, M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); +} +static void s11cs_piaIrqB(int state) { + cpu_set_nmi_line(s11clocals.brdData.cpuNo, state ? ASSERT_LINE : CLEAR_LINE); +} + +/*-------------------------- +/ S11 Jokerz sound board +/---------------------------*/ +#define S11JS_BANK0 4 + +static void s11js_ym2151IRQ(int state); +static void s11js_init(struct sndbrdData *brdData); +static WRITE_HANDLER(s11js_reply_w); +static WRITE_HANDLER(s11js_rombank_w); +static WRITE_HANDLER(s11js_ctrl_w); +static WRITE_HANDLER(s11js_manCmd_w); + +static struct { + struct sndbrdData brdData; + int irqen; + int ignore; +} s11jlocals; + +static WRITE_HANDLER(jlatch2_w) { + if (!s11jlocals.ignore) + soundlatch2_w(offset, data); + else s11jlocals.ignore--; +} + +const struct sndbrdIntf s11jsIntf = { + "WMSS11J", s11js_init, NULL, NULL, s11js_manCmd_w, + jlatch2_w, soundlatch3_r, + s11js_ctrl_w, NULL, 0 +}; + +static WRITE_HANDLER(s11js_odd_w) { + logerror("%04x: Jokerz ROM write to 0xf8%02x = %02x\n", activecpu_get_previouspc(), offset, data); +} +static WRITE_HANDLER(s11js_dac_w) { + logerror("%04x: Jokerz DAC write = %02x\n", activecpu_get_previouspc(), data); +} +static WRITE_HANDLER(s11js_sync_w) { + logerror("%04x: Jokerz SYNC write = %02x\n", activecpu_get_previouspc(), data); +} +static READ_HANDLER(s11js_port_r) { + s11jlocals.irqen = 0; + cpu_set_irq_line(s11jlocals.brdData.cpuNo, M6809_IRQ_LINE, CLEAR_LINE); + return soundlatch2_r(offset); +} + +static MEMORY_READ_START(s11js_readmem) + { 0x0000, 0x1fff, MRA_RAM }, + { 0x2001, 0x2001, YM2151_status_port_0_r }, /* 2001-2fff odd */ + { 0x3400, 0x3400, s11js_port_r }, + { 0x4000, 0xbfff, MRA_BANKNO(S11JS_BANK0) }, + { 0xc000, 0xffff, MRA_ROM }, +MEMORY_END + +static MEMORY_WRITE_START(s11js_writemem) + { 0x0000, 0x1fff, MWA_RAM }, + { 0x2000, 0x2000, YM2151_register_port_0_w }, /* 2000-2ffe even */ + { 0x2001, 0x2001, YM2151_data_port_0_w }, /* 2001-2fff odd */ + { 0x2800, 0x2800, s11js_reply_w }, + { 0x3000, 0x3000, s11js_dac_w }, + { 0x3800, 0x3800, s11js_rombank_w }, + { 0x3c00, 0x3c00, s11js_sync_w }, + { 0xf800, 0xf8ff, s11js_odd_w }, +MEMORY_END + +static struct YM2151interface s11js_ym2151Int = { + 1, 3579545, /* Hz */ + { YM3012_VOL(30,MIXER_PAN_LEFT,30,MIXER_PAN_RIGHT) }, + { s11js_ym2151IRQ } +}; + +MACHINE_DRIVER_START(wmssnd_s11js) + MDRV_CPU_ADD(M6809, 2000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(s11js_readmem, s11js_writemem) + MDRV_SOUND_ATTRIBUTES(SOUND_SUPPORTS_STEREO) + MDRV_SOUND_ADD( YM2151, s11js_ym2151Int) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +MACHINE_DRIVER_END + +static WRITE_HANDLER(s11js_rombank_w) { + cpu_setbank(S11JS_BANK0, s11jlocals.brdData.romRegion + 0x8000*(data & 0x01)); +} +static void s11js_init(struct sndbrdData *brdData) { + s11jlocals.brdData = *brdData; + s11jlocals.ignore = 10; +// cpu_setbank(S11JS_BANK0, s11jlocals.brdData.romRegion); +} +static WRITE_HANDLER(s11js_ctrl_w) { + if (!s11jlocals.ignore) { + if (!data) s11jlocals.irqen++; + if (s11jlocals.irqen) cpu_set_irq_line(s11jlocals.brdData.cpuNo, M6809_IRQ_LINE, ASSERT_LINE); + } +} +static WRITE_HANDLER(s11js_reply_w) { + soundlatch3_w(0,data); + sndbrd_data_cb(s11jlocals.brdData.boardNo, 0); sndbrd_data_cb(s11jlocals.brdData.boardNo, 1); +} +static WRITE_HANDLER(s11js_manCmd_w) { +//printf("m:%02x ", data); // the manual commands are not passed through, why??? + jlatch2_w(0, data); s11js_ctrl_w(0,0); +} +static void s11js_ym2151IRQ(int state) { + cpu_set_irq_line(s11jlocals.brdData.cpuNo, M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); +} + + +/*------------------ +/ WPC sound board +/-------------------*/ +#define WPCS_BANK0 4 + +/*-- internal sound interface --*/ +static WRITE_HANDLER(wpcs_latch_w); +static READ_HANDLER(wpcs_latch_r); + +/*-- external interfaces --*/ +static void wpcs_init(struct sndbrdData *brdData); +static READ_HANDLER(wpcs_data_r); +static WRITE_HANDLER(wpcs_data_w); +static READ_HANDLER(wpcs_ctrl_r); +static WRITE_HANDLER(wpcs_ctrl_w); +const struct sndbrdIntf wpcsIntf = { "WPCS", wpcs_init, NULL, NULL, wpcs_data_w, wpcs_data_w, wpcs_data_r, wpcs_ctrl_w, wpcs_ctrl_r }; + +/*-- other memory handlers --*/ +static WRITE_HANDLER(wpcs_rombank_w); +static WRITE_HANDLER(wpcs_volume_w); +static void wpcs_ym2151IRQ(int state); + +/*-- local data --*/ +static struct { + struct sndbrdData brdData; + int replyAvail; + int volume; +} locals; + +static WRITE_HANDLER(wpcs_rombank_w) { + /* the hardware can actually handle 1M chip but no games uses it */ + /* if such ROM appear the region must be doubled and mask set to 0x1f */ + /* this would be much easier if the region was filled in opposit order */ + /* but I don't want to change it now */ + int bankBase = data & 0x0f; +#ifdef MAME_DEBUG + /* this register can no be read but this makes debugging easier */ + *(memory_region(REGION_CPU1+locals.brdData.cpuNo) + 0x2000) = data; +#endif /* MAME_DEBUG */ + + switch ((~data) & 0xe0) { + case 0x80: /* U18 */ + bankBase |= 0x00; break; + case 0x40: /* U15 */ + bankBase |= 0x10; break; + case 0x20: /* U14 */ + bankBase |= 0x20; break; + default: + DBGLOG(("WPCS:Unknown bank %x\n",data)); return; + } + cpu_setbank(WPCS_BANK0, locals.brdData.romRegion + (bankBase<<15)); +} + +static WRITE_HANDLER(wpcs_volume_w) { + if (data & 0x01) { + if ((locals.volume > 0) && (data & 0x02)) + locals.volume -= 1; + else if ((locals.volume < 0xff) && ((data & 0x02) == 0)) + locals.volume += 1; + /* DBGLOG(("Volume set to %d\n",locals.volume)); */ + { + int ch; + for (ch = 0; ch < MIXER_MAX_CHANNELS; ch++) { + if (mixer_get_name(ch) != NULL) + mixer_set_volume(ch, locals.volume * 100 / 127); + } + } + } +} + +static WRITE_HANDLER(wpcs_latch_w) { + locals.replyAvail = TRUE; soundlatch2_w(0,data); + sndbrd_data_cb(locals.brdData.boardNo, data); +} + +static READ_HANDLER(wpcs_latch_r) { + cpu_set_irq_line(locals.brdData.cpuNo, M6809_IRQ_LINE, CLEAR_LINE); + return soundlatch_r(0); +} + +static void wpcs_ym2151IRQ(int state) { + cpu_set_irq_line(locals.brdData.cpuNo, M6809_FIRQ_LINE, state ? ASSERT_LINE : CLEAR_LINE); +} + +#ifdef PREDCS_FIRQ_HACK + + //This value is based on a lot of trial and error and comparing the same voice sample played with and without music playing + #define FIRQ_HACK_RATE 2400 + + extern int YM2151ReadOutputFlag(int chip); + + //Force the FIRQ to toggle @ the specified rate, but only while the 2151 is not outputting sound + static void firq_hack(int data) { + static int last = 0; + if(!YM2151ReadOutputFlag(0)) { + if(last) + { + cpu_set_irq_line(locals.brdData.cpuNo, M6809_FIRQ_LINE, CLEAR_LINE); + last = 0; + } + else + { + cpu_set_irq_line(locals.brdData.cpuNo, M6809_FIRQ_LINE, ASSERT_LINE); + last++; + } + } + + } +#endif + +static MEMORY_READ_START(wpcs_readmem) + { 0x0000, 0x1fff, MRA_RAM }, + { 0x2401, 0x2401, YM2151_status_port_0_r }, /* 2401-27ff odd */ + { 0x3000, 0x3000, wpcs_latch_r }, /* 3000-33ff */ + { 0x4000, 0xbfff, CAT2(MRA_BANK, WPCS_BANK0) }, //32K + { 0xc000, 0xffff, MRA_ROM }, /* same as page 7f */ //16K +MEMORY_END + +static MEMORY_WRITE_START(wpcs_writemem) + { 0x0000, 0x1fff, MWA_RAM }, + { 0x2000, 0x2000, wpcs_rombank_w }, /* 2000-23ff */ + { 0x2400, 0x2400, YM2151_register_port_0_w }, /* 2400-27fe even */ + { 0x2401, 0x2401, YM2151_data_port_0_w }, /* 2401-27ff odd */ + { 0x2800, 0x2800, DAC_0_data_w }, /* 2800-2bff */ + { 0x2c00, 0x2c00, hc55516_0_clock_set_w }, /* 2c00-2fff */ + { 0x3400, 0x3400, hc55516_0_digit_clock_clear_w }, /* 3400-37ff */ + { 0x3800, 0x3800, wpcs_volume_w }, /* 3800-3bff */ + { 0x3c00, 0x3c00, wpcs_latch_w }, /* 3c00-3fff */ +MEMORY_END +//NOTE: These volume levels sound really good compared to my own Funhouse and T2. (Dac=100%,CVSD=80%,2151=15%) +static struct DACinterface wpcs_dacInt = { 1, { 100 }}; +static struct hc55516_interface wpcs_hc55516Int = { 1, { 100 }}; +static struct YM2151interface wpcs_ym2151Int = { + 1, 3579545, /* Hz */ + { YM3012_VOL(15,MIXER_PAN_CENTER,15,MIXER_PAN_CENTER) }, + { wpcs_ym2151IRQ } +}; + +MACHINE_DRIVER_START(wmssnd_wpcs) + MDRV_CPU_ADD(M6809, 2000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(wpcs_readmem, wpcs_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD(YM2151, wpcs_ym2151Int) + MDRV_SOUND_ADD(DAC, wpcs_dacInt) + MDRV_SOUND_ADD(HC55516,wpcs_hc55516Int) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +#ifdef PREDCS_FIRQ_HACK + //Force the FIRQ to toggle @ the specified rate, but only while the 2151 is not outputting sound + MDRV_TIMER_ADD(firq_hack, FIRQ_HACK_RATE) +#endif +MACHINE_DRIVER_END + +/*--------------------- +/ Interface functions +/----------------------*/ +static READ_HANDLER(wpcs_data_r) { + locals.replyAvail = FALSE; return soundlatch2_r(0); +} + +static WRITE_HANDLER(wpcs_data_w) { + soundlatch_w(0, data); cpu_set_irq_line(locals.brdData.cpuNo, M6809_IRQ_LINE, ASSERT_LINE); +} + +static READ_HANDLER(wpcs_ctrl_r) { + return locals.replyAvail; +} + +static WRITE_HANDLER(wpcs_ctrl_w) { /*-- a write here resets the CPU --*/ + cpunum_set_reset_line(locals.brdData.cpuNo, PULSE_LINE); +} + +static void wpcs_init(struct sndbrdData *brdData) { + locals.brdData = *brdData; + /* the non-paged ROM is at the end of the image. move it to its correct place */ + memcpy(memory_region(REGION_CPU1+locals.brdData.cpuNo) + 0x00c000, locals.brdData.romRegion + 0x07c000, 0x4000); + wpcs_rombank_w(0,0); + hc55516_set_gain(0, 4250); +} + +/*-------------------- +/ DCS sound board +/---------------------*/ +/*-- ADSP core functions --*/ +static void adsp_init(data8_t *(*getBootROM)(int soft), + void (*txData)(UINT16 start, UINT16 size, UINT16 memStep, int sRate)); +static void adsp_boot(int soft); +static void adsp_txCallback(int port, INT32 data); +static WRITE16_HANDLER(adsp_control_w); + +/*-- bank handlers --*/ +static WRITE16_HANDLER(dcs1_ROMbankSelect1_w); +static WRITE16_HANDLER(dcs2_ROMbankSelect1_w); +static WRITE16_HANDLER(dcs2_ROMbankSelect2_w); +static WRITE16_HANDLER(dcs2_RAMbankSelect_w); +static READ16_HANDLER(dcs2_RAMbankSelect_r); +static READ16_HANDLER(dcs_ROMbank_r); +static READ16_HANDLER(dcs2_RAMbank_r); +static WRITE16_HANDLER(dcs2_RAMbank_w); + +/*-- sound interface handlers --*/ +/* once the ADSP core is updated to handle PM mapping */ +/* these can be static */ +/*static*/ READ16_HANDLER(dcs_latch_r); +/*static*/ WRITE16_HANDLER(dcs_latch_w); +/* ADSP patch need to know if we are using dcs95 soundboard */ +int WPC_gWPC95; + +/*-- sound generation --*/ +static int dcs_custStart(const struct MachineSound *msound); +static void dcs_custStop(void); +static void dcs_dacUpdate(int num, INT16 *buffer, int length); +static void dcs_txData(UINT16 start, UINT16 size, UINT16 memStep, int sRate); + +/*-- external interface --*/ +static READ_HANDLER(dcs_data_r); +static WRITE_HANDLER(dcs_data_w); +static READ_HANDLER(dcs_ctrl_r); +static WRITE_HANDLER(dcs_ctrl_w); +static void dcs_init(struct sndbrdData *brdData); + +/*-- local data --*/ +#define DCS_BUFFER_SIZE 4096 +#define DCS_BUFFER_MASK (DCS_BUFFER_SIZE - 1) + +static struct { + int enabled; + UINT32 sOut, sIn, sStep; + INT16 *buffer; + int stream; +} dcs_dac; + +static struct { + struct sndbrdData brdData; + UINT8 *cpuRegion; + UINT16 ROMbank1, ROMbank2; + UINT16 RAMbank; + UINT8 *ROMbankPtr; + UINT16 *RAMbankPtr; + int replyAvail; +} dcslocals; + +static struct CustomSound_interface dcs_custInt = { dcs_custStart, dcs_custStop, 0 }; + +static MEMORY_READ16_START(dcs1_readmem) + { ADSP_DATA_ADDR_RANGE(0x0000, 0x1fff), MRA16_RAM }, + { ADSP_DATA_ADDR_RANGE(0x2000, 0x2fff), dcs_ROMbank_r }, + { ADSP_DATA_ADDR_RANGE(0x3800, 0x39ff), MRA16_RAM }, + { ADSP_PGM_ADDR_RANGE (0x0000, 0x0800), MRA16_RAM }, /* Internal boot RAM */ + { ADSP_PGM_ADDR_RANGE (0x1000, 0x2fff), MRA16_RAM }, /* External RAM */ + { ADSP_PGM_ADDR_RANGE (0x3000, 0x3000), dcs_latch_r }, +MEMORY_END + +static MEMORY_WRITE16_START(dcs1_writemem) + { ADSP_DATA_ADDR_RANGE(0x0000, 0x1fff), MWA16_RAM }, + { ADSP_DATA_ADDR_RANGE(0x2000, 0x2fff), MWA16_ROM }, + { ADSP_DATA_ADDR_RANGE(0x3000, 0x3000), dcs1_ROMbankSelect1_w }, + { ADSP_DATA_ADDR_RANGE(0x3800, 0x39ff), MWA16_RAM }, + { ADSP_DATA_ADDR_RANGE(0x3fe0, 0x3fff), adsp_control_w }, + { ADSP_PGM_ADDR_RANGE (0x0000, 0x0800), MWA16_RAM }, + { ADSP_PGM_ADDR_RANGE (0x1000, 0x2fff), MWA16_RAM }, + { ADSP_PGM_ADDR_RANGE (0x3000, 0x3000), dcs_latch_w }, +MEMORY_END + +MACHINE_DRIVER_START(wmssnd_dcs1) + MDRV_CPU_ADD(ADSP2105, 10000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(dcs1_readmem, dcs1_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD(CUSTOM, dcs_custInt) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +MACHINE_DRIVER_END + +static MEMORY_READ16_START(dcs2_readmem) + { ADSP_DATA_ADDR_RANGE(0x0000, 0x07ff), dcs_ROMbank_r }, + { ADSP_DATA_ADDR_RANGE(0x1000, 0x1fff), MRA16_RAM }, + { ADSP_DATA_ADDR_RANGE(0x2000, 0x2fff), dcs2_RAMbank_r }, + { ADSP_DATA_ADDR_RANGE(0x3200, 0x3200), dcs2_RAMbankSelect_r }, + { ADSP_DATA_ADDR_RANGE(0x3300, 0x3300), dcs_latch_r }, + { ADSP_DATA_ADDR_RANGE(0x3800, 0x39ff), MRA16_RAM }, + { ADSP_PGM_ADDR_RANGE (0x0000, 0x0800), MRA16_RAM }, /* Internal boot RAM */ + { ADSP_PGM_ADDR_RANGE (0x1000, 0x3fff), MRA16_RAM }, /* External RAM */ +MEMORY_END + +static MEMORY_WRITE16_START(dcs2_writemem) + { ADSP_DATA_ADDR_RANGE(0x0000, 0x07ff), MWA16_ROM }, + { ADSP_DATA_ADDR_RANGE(0x1000, 0x1fff), MWA16_RAM }, + { ADSP_DATA_ADDR_RANGE(0x2000, 0x2fff), dcs2_RAMbank_w }, + { ADSP_DATA_ADDR_RANGE(0x3000, 0x3000), dcs2_ROMbankSelect1_w }, + { ADSP_DATA_ADDR_RANGE(0x3100, 0x3100), dcs2_ROMbankSelect2_w }, + { ADSP_DATA_ADDR_RANGE(0x3200, 0x3200), dcs2_RAMbankSelect_w }, + { ADSP_DATA_ADDR_RANGE(0x3300, 0x3300), dcs_latch_w }, + { ADSP_DATA_ADDR_RANGE(0x3800, 0x39ff), MWA16_RAM }, + { ADSP_DATA_ADDR_RANGE(0x3fe0, 0x3fff), adsp_control_w }, + { ADSP_PGM_ADDR_RANGE (0x0000, 0x0800), MWA16_RAM }, /* Internal boot RAM */ + { ADSP_PGM_ADDR_RANGE (0x1000, 0x3fff), MWA16_RAM }, /* External RAM */ +MEMORY_END + +MACHINE_DRIVER_START(wmssnd_dcs2) + MDRV_CPU_ADD(ADSP2105, 10000000) + MDRV_CPU_FLAGS(CPU_AUDIO_CPU) + MDRV_CPU_MEMORY(dcs2_readmem, dcs2_writemem) + MDRV_INTERLEAVE(50) + MDRV_SOUND_ADD(CUSTOM, dcs_custInt) + MDRV_SOUND_ADD(SAMPLES, samples_interface) +MACHINE_DRIVER_END + +/*---------------- +/ Sound interface +/-----------------*/ +const struct sndbrdIntf dcsIntf = { "DCS", dcs_init, NULL, NULL, dcs_data_w, dcs_data_w, dcs_data_r, dcs_ctrl_w, dcs_ctrl_r }; + +/*--------------- +/ Bank handlers +/----------------*/ +#define DCS1_ROMBANKBASE(bank) \ + (dcslocals.brdData.romRegion + (((bank) & 0x7ff)<<12)) +#define DCS2_ROMBANKBASE(bankH, bankL) \ + (dcslocals.brdData.romRegion + (((bankH) & 0x1c)<<18) + (((bankH) & 0x01)<<19) + (((bankL) & 0xff)<<11)) +#define DCS2_RAMBANKBASE(bank) \ + ((UINT16 *)(((bank) & 0x08) ? memory_region(DCS_BANKREGION) : \ + (dcslocals.cpuRegion + ADSP2100_DATA_OFFSET + (0x2000<<1)))) + +static WRITE16_HANDLER(dcs1_ROMbankSelect1_w) { + dcslocals.ROMbank1 = data; + dcslocals.ROMbankPtr = DCS1_ROMBANKBASE(dcslocals.ROMbank1); +} +static WRITE16_HANDLER(dcs2_ROMbankSelect1_w) { + dcslocals.ROMbank1 = data; + dcslocals.ROMbankPtr = DCS2_ROMBANKBASE(dcslocals.ROMbank2,dcslocals.ROMbank1); +} +static WRITE16_HANDLER(dcs2_ROMbankSelect2_w) { + dcslocals.ROMbank2 = data; + dcslocals.ROMbankPtr = DCS2_ROMBANKBASE(dcslocals.ROMbank2,dcslocals.ROMbank1); +} +static WRITE16_HANDLER(dcs2_RAMbankSelect_w) { + dcslocals.RAMbank = data; + dcslocals.RAMbankPtr = DCS2_RAMBANKBASE(dcslocals.RAMbank); +} +static READ16_HANDLER (dcs2_RAMbankSelect_r) { + return dcslocals.RAMbank; +} + +static READ16_HANDLER(dcs_ROMbank_r) { return dcslocals.ROMbankPtr[offset]; } + +static READ16_HANDLER(dcs2_RAMbank_r) { return dcslocals.RAMbankPtr[offset]; } + +static WRITE16_HANDLER(dcs2_RAMbank_w) { dcslocals.RAMbankPtr[offset] = data; } + +static data8_t *dcs_getBootROM(int soft) { + return (data8_t *)(dcslocals.brdData.romRegion + + (soft ? ((dcslocals.ROMbank1 & 0xff)<<12) : 0)); +} + +/*---------------------- +/ Other memory handlers +/-----------------------*/ +/* These should be static but the patched ADSP core requires them */ + +/*static*/ READ16_HANDLER(dcs_latch_r) { + cpu_set_irq_line(dcslocals.brdData.cpuNo, ADSP2105_IRQ2, CLEAR_LINE); +#if 1 + return soundlatch_r(0); +#else + { int x = soundlatch_r(0); DBGLOG(("Latch_r: %02x\n",x)); return x; } +#endif +} + +/*static*/ WRITE16_HANDLER(dcs_latch_w) { + soundlatch2_w(0, data); + dcslocals.replyAvail = TRUE; + sndbrd_data_cb(dcslocals.brdData.boardNo, data); +} + +static int dcs_custStart(const struct MachineSound *msound) { + /*-- clear DAC data --*/ + memset(&dcs_dac,0,sizeof(dcs_dac)); + + /*-- allocate a DAC stream --*/ + dcs_dac.stream = stream_init("DCS DAC", 100, 32000, 0, dcs_dacUpdate); + + /*-- allocate memory for our buffer --*/ + dcs_dac.buffer = malloc(DCS_BUFFER_SIZE * sizeof(INT16)); + + dcs_dac.sStep = 0x10000; + + return (dcs_dac.buffer == 0); +} + +static void dcs_custStop(void) { + if (dcs_dac.buffer) + { free(dcs_dac.buffer); dcs_dac.buffer = NULL; } +} + +static void dcs_dacUpdate(int num, INT16 *buffer, int length) { + if (!dcs_dac.enabled) + memset(buffer, 0, length * sizeof(INT16)); + else { + int ii; + /* fill in with samples until we hit the end or run out */ + for (ii = 0; ii < length; ii++) { + if (dcs_dac.sOut == dcs_dac.sIn) break; + buffer[ii] = dcs_dac.buffer[dcs_dac.sOut]; + dcs_dac.sOut = (dcs_dac.sOut + 1) & DCS_BUFFER_MASK; + } + /* fill the rest with the last sample */ + for ( ; ii < length; ii++) + buffer[ii] = dcs_dac.buffer[(dcs_dac.sOut - 1) & DCS_BUFFER_MASK]; + } +} + +/*------------------- +/ Exported interface +/---------------------*/ +static READ_HANDLER(dcs_data_r) { + dcslocals.replyAvail = FALSE; + return soundlatch2_r(0) & 0xff; +} + +static WRITE_HANDLER(dcs_data_w) { + DBGLOG(("Latch_w: %02x\n",data)); + soundlatch_w(0, data); cpu_set_irq_line(dcslocals.brdData.cpuNo, ADSP2105_IRQ2, ASSERT_LINE); +} + +static WRITE_HANDLER(dcs_ctrl_w) { + DBGLOG(("ctrl_w: %02x\n",data)); + + // Tom: Removed the next line which now prevents some "sound board interface error" + // if (dcslocals.brdData.subType < 2) + { +#ifdef WPCDCSSPEEDUP + // probably a bug in the mame reset handler + // if a cpu is suspended for some reason a reset will not wake it up + cpu_triggerint(dcslocals.brdData.cpuNo); +#endif /* WPCDCSSPEEDUP */ + // Reset is triggered on write so just pulse the line + cpunum_set_reset_line(dcslocals.brdData.cpuNo, PULSE_LINE); + adsp_boot(0); + } +} + +static READ_HANDLER(dcs_ctrl_r) { + return dcslocals.replyAvail ? 0x80 : 0x00; +} + +/*---------------------------- +/ Checksum in DCS +/ GEN_SECURITY: Page 0x0004 +/ WPC95: Page 0x000c +/ +/ Pages, StartPage, ChkSum +/ +-----------------------------*/ + +/*-- handle bug in ADSP core */ +static OPBASE_HANDLER(opbaseoveride) { return -1; } + +static void dcs_init(struct sndbrdData *brdData) { + memset(&dcslocals, 0, sizeof(dcslocals)); + dcslocals.brdData = *brdData; + dcslocals.cpuRegion = memory_region(REGION_CPU1+dcslocals.brdData.cpuNo); + memory_set_opbase_handler(dcslocals.brdData.cpuNo, opbaseoveride); + /*-- initialize our structure --*/ + dcslocals.ROMbankPtr = dcslocals.brdData.romRegion; + dcslocals.RAMbankPtr = (UINT16 *)memory_region(DCS_BANKREGION); + + WPC_gWPC95 = brdData->subType; + + adsp_init(dcs_getBootROM, dcs_txData); + + /*-- clear all interrupts --*/ + cpu_set_irq_line(dcslocals.brdData.cpuNo, ADSP2105_IRQ0, CLEAR_LINE ); + cpu_set_irq_line(dcslocals.brdData.cpuNo, ADSP2105_IRQ1, CLEAR_LINE ); + cpu_set_irq_line(dcslocals.brdData.cpuNo, ADSP2105_IRQ2, CLEAR_LINE ); + + /*-- speed up startup by disable checksum --*/ +#if 0 + if (options.cheat) { + if (core_gameData->gen & GEN_WPC95) + *((UINT16 *)(memory_region(WPC_MEMREG_SROM) + 0x6000)) = 0x0000; + else + *((UINT16 *)(memory_region(WPC_MEMREG_SROM) + 0x4000)) = 0x0000; + } +#endif + /*-- boot ADSP2100 --*/ + adsp_boot(0); +} + +/*----------------- +/ local functions +/------------------*/ +/*-- autobuffer SPORT transmission --*/ +/*-- copy data to transmit into dac buffer --*/ +static void dcs_txData(UINT16 start, UINT16 size, UINT16 memStep, int sRate) { + UINT16 *mem = ((UINT16 *)(dcslocals.cpuRegion + ADSP2100_DATA_OFFSET)) + start; + int idx; + + stream_update(dcs_dac.stream, 0); + if (size == 0) /* No data, stop playing */ + { dcs_dac.enabled = FALSE; return; } + /*-- For some reason can't the sample rate of streams be changed --*/ + /*-- The DCS samplerate is now hardcoded to 32K. Seems to work with all games */ + // if (!dcs_dac.enabled) stream_set_sample_frequency(dcs_dac.stream,sRate); + /*-- size is the size of the buffer not the number of samples --*/ +#if MAMEVER >= 3716 + for (idx = 0; idx < size; idx += memStep) { + dcs_dac.buffer[dcs_dac.sIn] = mem[idx]; + dcs_dac.sIn = (dcs_dac.sIn + 1) & DCS_BUFFER_MASK; + } +#else /* MAMEVER */ + size /= memStep; + sStep = sRate * 65536.0 / (double)(Machine->sample_rate); + + /*-- copy samples into buffer --*/ + while ((idx>>16) < size) { + dcs_dac.buffer[dcs_dac.sIn] = mem[(idx>>16)*memStep]; + dcs_dac.sIn = (dcs_dac.sIn + 1) & DCS_BUFFER_MASK; + idx += sStep; + } +#endif /* MAMEVER */ + /*-- enable the dac playing --*/ + dcs_dac.enabled = TRUE; +} +#define DCS_IRQSTEPS 4 +/*--------------------------------------------------*/ +/*-- This should actually be part of the CPU core --*/ +/*--------------------------------------------------*/ +enum { + S1_AUTOBUF_REG = 15, S1_RFSDIV_REG, S1_SCLKDIV_REG, S1_CONTROL_REG, + S0_AUTOBUF_REG, S0_RFSDIV_REG, S0_SCLKDIV_REG, S0_CONTROL_REG, + S0_MCTXLO_REG, S0_MCTXHI_REG, S0_MCRXLO_REG, S0_MCRXHI_REG, + TIMER_SCALE_REG, TIMER_COUNT_REG, TIMER_PERIOD_REG, WAITSTATES_REG, + SYSCONTROL_REG +}; + +static struct { + UINT16 ctrlRegs[32]; + void *irqTimer; + data8_t *(*getBootROM)(int soft); + void (*txData)(UINT16 start, UINT16 size, UINT16 memStep, int sRate); +} adsp; /* = {{0},NULL,dcs_getBootROM,dcs_txData};*/ +static void adsp_irqGen(int dummy); + +static void adsp_init(data8_t *(*getBootROM)(int soft), + void (*txData)(UINT16 start, UINT16 size, UINT16 memStep, int sRate)) { + /* stupid timer/machine init handling in MAME */ + if (adsp.irqTimer) timer_remove(adsp.irqTimer); + /*-- reset control registers etc --*/ + memset(&adsp, 0, sizeof(adsp)); + adsp.getBootROM = getBootROM; + adsp.txData = txData; + adsp.irqTimer = timer_alloc(adsp_irqGen); + /*-- initialize the ADSP Tx callback --*/ + adsp2105_set_tx_callback(adsp_txCallback); +} + +#if MAMEVER < 6300 +static void adsp2105_load_boot_data(data8_t *srcdata, data32_t *dstdata) { + UINT32 size = 8 * (srcdata[3] + 1), i; + for (i = 0; i < size; i++) { + UINT32 opcode = (srcdata[i*4+0] << 16) | (srcdata[i*4+1] << 8) | srcdata[i*4+2]; + ADSP2100_WRPGM(&dstdata[i], opcode); + } +} +#endif /* MAMEVER */ + +static void adsp_boot(int soft) { + adsp2105_load_boot_data(adsp.getBootROM(soft), (UINT32 *)(dcslocals.cpuRegion+ADSP2100_PGM_OFFSET)); + timer_enable(adsp.irqTimer, FALSE); +} + +static WRITE16_HANDLER(adsp_control_w) { + adsp.ctrlRegs[offset] = data; + switch (offset) { + case SYSCONTROL_REG: + if (data & 0x0200) { + /* boot force */ + DBGLOG(("boot force\n")); + cpunum_set_reset_line(dcslocals.brdData.cpuNo, PULSE_LINE); + adsp_boot(1); + adsp.ctrlRegs[SYSCONTROL_REG] &= ~0x0200; + } + /* see if SPORT1 got disabled */ + if ((data & 0x0800) == 0) { + dcs_txData(0, 0, 0, 0); + /* nuke the timer */ + timer_enable(adsp.irqTimer, FALSE); + } + break; + case S1_AUTOBUF_REG: + /* autobuffer off: nuke the timer */ + if ((data & 0x0002) == 0) { + adsp.txData(0, 0, 0, 0); + /* nuke the timer */ + timer_enable(adsp.irqTimer, FALSE); + } + break; + case S1_CONTROL_REG: + if (((data>>4) & 3) == 2) + DBGLOG(("Oh no!, the data is compresed with u-law encoding\n")); + if (((data>>4) & 3) == 3) + DBGLOG(("Oh no!, the data is compresed with A-law encoding\n")); + break; + } /* switch */ +} + +static struct { + UINT16 start; + UINT16 size, step; + int sRate; + int iReg; + int last; + int irqCount; +} adsp_aBufData; + +static void adsp_irqGen(int dummy) { + int next; + + if (adsp_aBufData.irqCount < DCS_IRQSTEPS) { + adsp_aBufData.irqCount += 1; +#ifdef WPCDCSSPEEDUP + /* wake up suspended cpu by simulating an interrupt trigger */ + cpu_triggerint(dcslocals.brdData.cpuNo); +#endif /* WPCDCSSPEEDUP */ + } + else { + adsp_aBufData.irqCount = 1; + adsp_aBufData.last = 0; + cpu_set_irq_line(dcslocals.brdData.cpuNo, ADSP2105_IRQ1, PULSE_LINE); + } + + next = (adsp_aBufData.size / adsp_aBufData.step * adsp_aBufData.irqCount / + DCS_IRQSTEPS - 1) * adsp_aBufData.step; + + cpunum_set_reg(dcslocals.brdData.cpuNo, ADSP2100_I0 + adsp_aBufData.iReg, + adsp_aBufData.start + next); + + adsp.txData(adsp_aBufData.start + adsp_aBufData.last, (next - adsp_aBufData.last), + adsp_aBufData.step, adsp_aBufData.sRate); + + adsp_aBufData.last = next; + +} + +static void adsp_txCallback(int port, INT32 data) { + if (port != 1) + { DBGLOG(("tx0 not handled\n")); return; }; + /*-- remove any pending timer --*/ + timer_enable(adsp.irqTimer, FALSE); + if ((adsp.ctrlRegs[SYSCONTROL_REG] & 0x0800) == 0) + DBGLOG(("tx1 without SPORT1 enabled\n")); + else if ((adsp.ctrlRegs[S1_AUTOBUF_REG] & 0x0002) == 0) + DBGLOG(("SPORT1 without autobuffer")); + else { + int ireg, mreg; + + ireg = (adsp.ctrlRegs[S1_AUTOBUF_REG]>>9) & 7; + mreg = ((adsp.ctrlRegs[S1_AUTOBUF_REG]>>7) & 3) | (ireg & 0x04); + + /* start = In, size = Ln, step = Mn */ + adsp_aBufData.step = activecpu_get_reg(ADSP2100_M0 + mreg); + adsp_aBufData.size = activecpu_get_reg(ADSP2100_L0 + ireg); + /*-- assume that the first sample comes from the memory position before --*/ + adsp_aBufData.start = activecpu_get_reg(ADSP2100_I0 + ireg) - adsp_aBufData.step; + adsp_aBufData.sRate = Machine->drv->cpu[dcslocals.brdData.cpuNo].cpu_clock / + (2 * (adsp.ctrlRegs[S1_SCLKDIV_REG] + 1)) / 16; + adsp_aBufData.iReg = ireg; + adsp_aBufData.irqCount = adsp_aBufData.last = 0; + adsp_irqGen(0); /* first part, rest is handled via the timer */ + /*-- fire the irq timer --*/ + timer_adjust(adsp.irqTimer, 0, 0, TIME_IN_HZ(adsp_aBufData.sRate) * + adsp_aBufData.size / adsp_aBufData.step / DCS_IRQSTEPS); + DBGLOG(("DCS size=%d,step=%d,rate=%d\n",adsp_aBufData.size,adsp_aBufData.step,adsp_aBufData.sRate)); + return; + } + /*-- if we get here, something went wrong. Disable transmission --*/ + adsp.txData(0, 0, 0, 0); +} + +#ifdef WPCDCSSPEEDUP + +UINT32 dcs_speedup(UINT32 pc) { + UINT16 *ram1source, *ram2source, volume; + int ii; + + /* DCS and DCS95 uses different buffers */ + if (pc > 0x2000) { + UINT32 volumeOP = *(UINT32 *)&OP_ROM[ADSP2100_PGM_OFFSET + ((pc+0x2b84-0x2b44)<<2)]; + + ram1source = (UINT16 *)(dcslocals.cpuRegion + ADSP2100_DATA_OFFSET + (0x1000<<1)); + ram2source = dcslocals.RAMbankPtr; + volume = ram1source[((volumeOP>>4)&0x3fff)-0x1000]; + /*DBGLOG(("OP=%6x addr=%4x V=%4x\n",volumeOP,(volumeOP>>4)&0x3fff,volume));*/ + } + else { + UINT32 volumeOP = *(UINT32 *)&OP_ROM[ADSP2100_PGM_OFFSET + ((pc+0x2b84-0x2b44)<<2)]; + + ram1source = (UINT16 *)(dcslocals.cpuRegion + ADSP2100_DATA_OFFSET + (0x0700<<1)); + ram2source = (UINT16 *)(dcslocals.cpuRegion + ADSP2100_DATA_OFFSET + (0x3800<<1)); + volume = ram2source[((volumeOP>>4)&0x3fff)-0x3800]; + /*DBGLOG(("OP=%6x addr=%4x V=%4x\n",volumeOP,(volumeOP>>4)&0x3fff,volume));*/ + } + { + UINT16 *i0, *i2; + /* 2B44 I0 = $2000 >>> (3800) <<< */ + i0 = &ram2source[0]; + /* 2B45: I2 = $2080 >>> (3880) <<< */ + i2 = &ram2source[0x0080]; + /* 2B46 M2 = $3FFF */ + /* 2B47 M3 = $3FFD */ + /* 2B48 CNTR = $0040 */ + /* 2B49 DO $2B53 UNTIL CE */ + /* M0 = 0, M1 = 1, M2 = -1 */ + for (ii = 0; ii < 0x0040; ii++) { + INT16 ax0 , ay0, ax1, ay1, ar; + /* 2B4A AX0 = DM(I0,M1) */ + ax0 = *i0++; + /* 2B4B AY0 = DM(I2,M0) */ + ay0 = *i2; + /* 2B4C AR = AX0 + AY0, AX1 = DM(I0,M2) */ + ax1 = *i0--; + ar = ax0 + ay0; + /* 2B4D AR = AX0 - AY0, DM(I0,M1) = AR */ + *i0++ = ar; + ar = ax0 - ay0; + /* 2B4E DM(I2,M1) = AR */ + *i2++ = ar; + /* 2B4F AY1 = DM(I2,M0) */ + ay1 = *i2; + /* 2B50 AR = AX1 + AY1 */ + ar = ax1 + ay1; + /* 2B51 DM(I0,M1) = AR */ + *i0++ = ar; + /* 2B52 AR = AX1 - AY1 */ + ar = ax1 - ay1; + /* 2B53 DM(I2,M1) = AR */ + *i2++ = ar; + } + } + { + int mem63d, mem63e, mem63f; + int jj,kk; + /* 2B54 AR = $0002 */ + /* 2B55 DM($15EB) = AR (063d) */ + mem63d = 2; + /* 2B56 SI = $0040 */ + /* 2B57 DM($15ED) = SI (063e) */ + mem63e = 0x40; + /* 2B58 SR = LSHIFT SI BY -1 (LO) */ + /* 2B59 DM($15EF) = SR0 (063f) */ + mem63f = mem63e >> 1; + /* 2B5A M0 = $3FFF */ + /* 2B5B CNTR = $0006 */ + /* 2B5C DO $2B80 UNTIL CE */ + + /* M0 = -1, M1 = 1, M5 = 1 */ + for (ii = 0; ii < 6; ii++) { + UINT16 *i0, *i1, *i2, *i4, *i5; + INT16 m2, m3; + /* 2B5D I4 = $1080 >>> (0780) <<< */ + i4 = &ram1source[0x0080]; + /* 2B5E I5 = $1000 >>> (0700) <<< */ + i5 = &ram1source[0x0000]; + /* 2B5F I0 = $2000 >>> (3800) <<< */ + i0 = &ram2source[0x0000]; + /* 2B60 I1 = $2000 >>> (3800) <<< */ + i1 = &ram2source[0x0000]; + /* 2B61 AY0 = DM($15ED) (063e) */ + /* 2B62 M2 = AY0 */ + m2 = mem63e; + /* 2B63 MODIFY (I1,M2) */ + i1 += m2; + /* 2B64 I2 = I1 */ + i2 = i1; + /* 2B65 AR = AY0 - 1 */ + /* 2B66 M3 = AR */ + m3 = mem63e - 1; + /* 2B67 CNTR = DM($15EB) (063d) */ + /* 2B68 DO $2B79 UNTIL CE */ + + for (jj = 0; jj < mem63d; jj++) { + INT16 mx0, mx1, my0, my1; + /* 2B6A MY0 = DM(I4,M5) */ + my0 = *i4++; + /* 2B6B MY1 = DM(I5,M5) */ + my1 = *i5++; + /* 2B6C MX0 = DM(I1,M1) */ + mx0 = *i1++; + /* 2B69 CNTR = DM($15EF) (063f) */ + /* 2B6D DO $2B76 UNTIL CE */ + for (kk = 0; kk < mem63f; kk++) { + INT16 ax0, ay0, ay1, ar; + INT32 tmp, mr; + /* 2B6E MR = MX0 * MY0 (SS), MX1 = DM(I1,M1) */ + mx1 = *i1++; + tmp = ((mx0 * my0)<<1); + mr = tmp; + /* 2B6F MR = MR - MX1 * MY1 (RND), AY0 = DM(I0,M1) */ + ay0 = *i0++; + tmp = ((mx1 * my1)<<1); + mr = (mr - tmp + 0x8000) & (((tmp & 0xffff) == 0x8000) ? 0xfffeffff : 0xffffffff); + /* 2B70 MR = MX1 * MY0 (SS), AX0 = MR1 */ + ax0 = mr>>16; + tmp = (mx1 * my0)<<1; + mr = tmp; + /* 2B71 MR = MR + MX0 * MY1 (RND), AY1 = DM(I0,M0) */ + ay1 = *i0--; /* M0 = -1 */ + tmp = ((mx0 * my1)<<1); + mr = (mr + tmp + 0x8000) & (((tmp & 0xffff) == 0x8000) ? 0xfffeffff : 0xffffffff); + /* 2B72 AR = AY0 - AX0, MX0 = DM(I1,M1) */ + mx0 = *i1++; + ar = ay0 - ax0; + /* 2B73 AR = AX0 + AY0, DM(I0,M1) = AR */ + *i0++ = ar; + ar = ax0 + ay0; + /* 2B74 AR = AY1 - MR1, DM(I2,M1) = AR */ + *i2++ = ar; + ar = ay1 - (mr>>16); + /* 2B75 AR = MR1 + AY1, DM(I0,M1) = AR */ + *i0++ = ar; + ar = (mr>>16) + ay1; + /* 2B76 DM(I2,M1) = AR */ + *i2++ = ar; + } + /* 2B77 MODIFY (I2,M2) */ + i2 += m2; + /* 2B78 MODIFY (I1,M3) */ + i1 += m3; + /* 2B79 MODIFY (I0,M2) */ + i0 += m2; + } + /* 2B7A SI = DM($15EB) (063d) */ + /* 2B7B: SR = LSHIFT SI BY 1 (LO) */ + /* 2B7C: DM($15EB) = SR0 (063d) */ + mem63d <<= 1; + /* 2B7D SI = DM($15EF) (063f) */ + /* 2B7E DM($15ED) = SI (063e) */ + mem63e = mem63f; + /* 2B7F SR = LSHIFT SI BY -1 (LO) */ + /* 2B80 DM($15EF) = SR0 (063f) */ + mem63f >>= 1; + } + } + { /* Volume scaling */ + UINT16 *i0; + UINT16 my0; + /* 2B81 M0 = $0000 */ + /* 2B82 I0 = $2000 >>> (3800) <<< */ + i0 = &ram2source[0x0000]; + /* 2B84 MY0 = DM($15FD) (390e) */ + my0 = volume; + /* 2B83 CNTR = $0100 */ + /* 2B85 DO $2B89 UNTIL CE */ + /* M0 = 0, M1 = 1 */ + for (ii = 0; ii < 0x0100; ii++) { + INT16 mx0; + INT32 mr; + /* 2B86 MX0 = DM(I0,M0) */ + mx0 = *i0; + /* 2B87 MR = MX0 * MY0 (SU) */ + mr = (mx0 * my0)<<1; + /* 2B88 IF MV SAT MR */ + /* This instruction limits MR to 32 bits */ + /* In reality the volume will never be higher than 0x8000 so */ + /* this is not needed */ + /* 2B89 DM(I0,M1) = MR1 */ + *i0++ = mr>>16; + } + } + activecpu_set_reg(ADSP2100_PC, pc + 0x2b89 - 0x2b44); + return 0; /* execute a NOP */ +} + +#endif /* WPCDCSSPEEDUP */ + +#endif + diff --git a/src/mame/drivers/p_wmssnd.h b/src/mame/drivers/p_wmssnd.h new file mode 100644 index 00000000000..acd63fa8137 --- /dev/null +++ b/src/mame/drivers/p_wmssnd.h @@ -0,0 +1,398 @@ +// new code to allow the PinMAME rom loading to compile + +/*------------------------- +/ S9 sound on CPU board +/--------------------------*/ + +#define S9S_CPUREGION "s9s_cpu" +//MACHINE_DRIVER_EXTERN(wmssnd_s9s); +//MACHINE_DRIVER_EXTERN(wmssnd_s9ps); /* pennant fever */ + +#define S9S_STDREG SOUNDREGION(0x10000, S9S_CPUREGION) + +#define S9S_SOUNDROM41111(u49,chk49, u4,chk4, u5,chk5, u6,chk6, u7,chk7) \ + S9S_STDREG \ + ROM_LOAD(u49, 0xc000, 0x4000, chk49) \ + ROM_LOAD(u7, 0x8000, 0x1000, chk7) \ + ROM_LOAD(u5, 0x9000, 0x1000, chk5) \ + ROM_LOAD(u6, 0xa000, 0x1000, chk6) \ + ROM_LOAD(u4, 0xb000, 0x1000, chk4) + +#define S9S_SOUNDROM4111(u49,chk49, u4,chk4, u5,chk5, u6,chk6) \ + S9S_STDREG \ + ROM_LOAD(u49, 0xc000, 0x4000, chk49) \ + ROM_LOAD(u5, 0x9000, 0x1000, chk5) \ + ROM_LOAD(u6, 0xa000, 0x1000, chk6) \ + ROM_LOAD(u4, 0xb000, 0x1000, chk4) + +#define S9S_SOUNDROM4(u49,chk49) \ + S9S_STDREG \ + ROM_LOAD(u49, 0xc000, 0x4000, chk49) \ + ROM_RELOAD(0x8000, 0x4000) + +#define S9RR_SOUNDROM(u49, chk49) \ + S9S_STDREG \ + ROM_LOAD(u49, 0xe000, 0x2000, chk49) \ + ROM_RELOAD(0xc000, 0x2000) \ + ROM_RELOAD(0xa000, 0x2000) \ + ROM_RELOAD(0x8000, 0x2000) + +/*------------------------- +/ S11 sound on CPU board +/--------------------------*/ + +#define S11XS_CPUREGION "s11xs_cpu" +#define S11XS_ROMREGION "sound2" +#define S11S_CPUREGION "s11s_cpu" +#define S11S_ROMREGION "sound2" +//extern MACHINE_DRIVER_EXTERN(wmssnd_s11s); /* without extra sound board */ +//extern MACHINE_DRIVER_EXTERN(wmssnd_s11xs); /* with s11c sound board */ +//extern MACHINE_DRIVER_EXTERN(wmssnd_s11b2s); /* with jokerz sound board */ + +#define S11XS_STDREG \ + +#define S11XS_SOUNDROM44(n1, chk1, n2, chk2) \ + SOUNDREGION(0x10000, S11XS_CPUREGION) \ + SOUNDREGION(0x10000, S11XS_ROMREGION) \ + ROM_LOAD(n1, 0x4000, 0x4000, chk1) \ + ROM_LOAD(n2, 0xc000, 0x4000, chk2) \ + ROM_RELOAD( 0x8000, 0x4000) + +#define S11XS_SOUNDROMx8(n2, chk2) \ + SOUNDREGION(0x10000, S11XS_CPUREGION) \ + SOUNDREGION(0x10000, S11XS_ROMREGION) \ + ROM_LOAD(n2, 0x4000, 0x4000, chk2) \ + ROM_CONTINUE(0xc000, 0x4000) + +#define S11XS_SOUNDROM88(n1, chk1, n2, chk2) \ + SOUNDREGION(0x10000, S11XS_CPUREGION) \ + SOUNDREGION(0x10000, S11XS_ROMREGION) \ + ROM_LOAD(n1, 0x0000, 0x8000, chk1) \ + ROM_LOAD(n2, 0x8000, 0x8000, chk2) + +#define S11S_SOUNDROM88(n1, chk1, n2, chk2) \ + SOUNDREGION(0x10000, S11S_CPUREGION) \ + SOUNDREGION(0x10000, S11S_ROMREGION) \ + ROM_LOAD(n1, 0x0000, 0x8000, chk1) \ + ROM_LOAD(n2, 0x8000, 0x8000, chk2) + +/*------------------------- +/ S11C sound board +/--------------------------*/ + +#define S11CS_CPUREGION "s11cs_cpu" +#define S11CS_ROMREGION "sound1" +//extern MACHINE_DRIVER_EXTERN(wmssnd_s11cs); + +#define S11CS_STDREG \ + SOUNDREGION(0x10000, S11CS_CPUREGION) \ + SOUNDREGION(0x30000, S11CS_ROMREGION) + +#define S11CS_ROMLOAD8(start, n, chk) \ + ROM_LOAD(n, start, 0x8000, chk) \ + ROM_RELOAD(start+0x8000, 0x8000) + +#define S11CS_ROMLOAD0(start, n, chk) \ + ROM_LOAD(n, start, 0x10000, chk) + +#define S11CS_SOUNDROM000(n1,chk1,n2,chk2,n3,chk3) \ + S11CS_STDREG \ + S11CS_ROMLOAD0(0x00000, n1, chk1) \ + S11CS_ROMLOAD0(0x10000, n2, chk2) \ + S11CS_ROMLOAD0(0x20000, n3, chk3) + +#define S11CS_SOUNDROM008(n1,chk1,n2,chk2,n3,chk3) \ + S11CS_STDREG \ + S11CS_ROMLOAD0(0x00000, n1, chk1) \ + S11CS_ROMLOAD0(0x10000, n2, chk2) \ + S11CS_ROMLOAD8(0x20000, n3, chk3) + +#define S11CS_SOUNDROM888(n1,chk1,n2,chk2,n3,chk3) \ + S11CS_STDREG \ + S11CS_ROMLOAD8(0x00000, n1, chk1) \ + S11CS_ROMLOAD8(0x10000, n2, chk2) \ + S11CS_ROMLOAD8(0x20000, n3, chk3) + +#define S11CS_SOUNDROM88(n1,chk1,n2,chk2) \ + S11CS_STDREG \ + S11CS_ROMLOAD8(0x00000, n1, chk1) \ + S11CS_ROMLOAD8(0x10000, n2, chk2) + +#define S11CS_SOUNDROM8(n1,chk1) \ + S11CS_STDREG \ + S11CS_ROMLOAD8(0x00000, n1, chk1) + + +/*------------------------- +/ Jokerz! sound board +/--------------------------*/ +#define S11JS_CPUREGION "s11js_cpu" +#define S11JS_ROMREGION "sound1" +//extern MACHINE_DRIVER_EXTERN(wmssnd_s11js); + +#define S11JS_SOUNDROM(n1, chk1) \ + SOUNDREGION(0x10000, S11JS_CPUREGION) \ + ROM_LOAD(n1, 0x0000, 0x10000, chk1) \ + SOUNDREGION(0x10000, S11JS_ROMREGION) \ + ROM_LOAD(n1, 0x0000, 0x10000, chk1) + +/************************************************************************************************ +************************************************************************************************* + Old PinMAME code below for reference ONLY +************************************************************************************************* +************************************************************************************************/ + +#if 0 + +#ifndef INC_WMSSND +#define INC_WMSSND +/* DCS sound needs this one */ +#include "cpu/adsp2100/adsp2100.h" + +/*------------------------- +/ S3-S7 sound board +/--------------------------*/ +#define S67S_CPUNO 1 +#define S67S_MEMREG_SCPU (REGION_CPU1+S67S_CPUNO) +extern MACHINE_DRIVER_EXTERN(wmssnd_s67s); + +#define S67S_SOUNDROMS0(ic12, chk12) \ + SOUNDREGION(0x10000, S67S_MEMREG_SCPU) \ + ROM_LOAD(ic12, 0x7000, 0x1000, chk12) \ + ROM_RELOAD( 0xf000, 0x1000) + +#define S67S_SOUNDROMS8(ic12, chk12) \ + SOUNDREGION(0x10000, S67S_MEMREG_SCPU) \ + ROM_LOAD(ic12, 0x7800, 0x0800, chk12) \ + ROM_RELOAD( 0xf800, 0x0800) + +#define S67S_SPEECHROMS0000(ic7,chk7, ic5,chk5, ic6,chk6, ic4, chk4) \ + ROM_LOAD(ic7, 0x3000, 0x1000, chk7) \ + ROM_RELOAD( 0xb000, 0x1000) \ + ROM_LOAD(ic5, 0x4000, 0x1000, chk5) \ + ROM_RELOAD( 0xc000, 0x1000) \ + ROM_LOAD(ic6, 0x5000, 0x1000, chk6) \ + ROM_RELOAD( 0xd000, 0x1000) \ + ROM_LOAD(ic4, 0x6000, 0x1000, chk4) \ + ROM_RELOAD( 0xe000, 0x1000) + +#define S67S_SPEECHROMS000x(ic7,chk7, ic5,chk5, ic6,chk6) \ + ROM_LOAD(ic7, 0x3000, 0x1000, chk7) \ + ROM_RELOAD( 0xb000, 0x1000) \ + ROM_LOAD(ic5, 0x4000, 0x1000, chk5) \ + ROM_RELOAD( 0xc000, 0x1000) \ + ROM_LOAD(ic6, 0x5000, 0x1000, chk6) \ + ROM_RELOAD( 0xd000, 0x1000) + + + + + + +/*------------------------- +/ WPC sound board +/--------------------------*/ +#define WPCS_CPUNO 1 +#define WPCS_CPUREGION (REGION_CPU1+WPCS_CPUNO) +#define WPCS_ROMREGION (REGION_SOUND1) +extern MACHINE_DRIVER_EXTERN(wmssnd_wpcs); + +#define WPCS_STDREG \ + SOUNDREGION(0x010000, WPCS_CPUREGION) \ + SOUNDREGION(0x180000, WPCS_ROMREGION) + +#define WPCS_ROMLOAD2(start, n, chk) \ + ROM_LOAD(n, start, 0x20000, chk) \ + ROM_RELOAD( start + 0x20000, 0x20000) \ + ROM_RELOAD( start + 0x40000, 0x20000) \ + ROM_RELOAD( start + 0x60000, 0x20000) + +#define WPCS_ROMLOAD4(start, n, chk) \ + ROM_LOAD(n, start, 0x40000, chk) \ + ROM_RELOAD( start + 0x40000, 0x40000) + +#define WPCS_ROMLOAD8(start, n, chk) \ + ROM_LOAD(n, start, 0x80000, chk) + +#define WPCS_SOUNDROM882(u18,chk18,u15,chk15,u14,chk14) \ + WPCS_STDREG \ + WPCS_ROMLOAD8(0x000000, u18, chk18) \ + WPCS_ROMLOAD8(0x080000, u15, chk15) \ + WPCS_ROMLOAD2(0x100000, u14, chk14) +#define WPCS_SOUNDROM288(u18,chk18,u15,chk15,u14,chk14) \ + WPCS_STDREG \ + WPCS_ROMLOAD2(0x000000, u18, chk18) \ + WPCS_ROMLOAD8(0x080000, u15, chk15) \ + WPCS_ROMLOAD8(0x100000, u14, chk14) +#define WPCS_SOUNDROM222(u18,chk18,u15,chk15,u14,chk14) \ + WPCS_STDREG \ + WPCS_ROMLOAD2(0x000000, u18, chk18) \ + WPCS_ROMLOAD2(0x080000, u15, chk15) \ + WPCS_ROMLOAD2(0x100000, u14, chk14) +#define WPCS_SOUNDROM224(u18,chk18,u15,chk15,u14,chk14) \ + WPCS_STDREG \ + WPCS_ROMLOAD2(0x000000, u18, chk18) \ + WPCS_ROMLOAD2(0x080000, u15, chk15) \ + WPCS_ROMLOAD4(0x100000, u14, chk14) +#define WPCS_SOUNDROM248(u18,chk18,u15,chk15,u14,chk14) \ + WPCS_STDREG \ + WPCS_ROMLOAD2(0x000000, u18, chk18) \ + WPCS_ROMLOAD4(0x080000, u15, chk15) \ + WPCS_ROMLOAD8(0x100000, u14, chk14) +#define WPCS_SOUNDROM2x8(u18,chk18,u14,chk14) \ + WPCS_STDREG \ + WPCS_ROMLOAD2(0x000000, u18, chk18) \ + WPCS_ROMLOAD8(0x100000, u14, chk14) +#define WPCS_SOUNDROM84x(u18,chk18,u15,chk15) \ + WPCS_STDREG \ + WPCS_ROMLOAD8(0x000000, u18, chk18) \ + WPCS_ROMLOAD4(0x080000, u15, chk15) +#define WPCS_SOUNDROM22x(u18,chk18,u15,chk15) \ + WPCS_STDREG \ + WPCS_ROMLOAD2(0x000000, u18, chk18) \ + WPCS_ROMLOAD2(0x080000, u15, chk15) +#define WPCS_SOUNDROM888(u18,chk18,u15,chk15,u14,chk14) \ + WPCS_STDREG \ + WPCS_ROMLOAD8(0x000000, u18, chk18) \ + WPCS_ROMLOAD8(0x080000, u15, chk15) \ + WPCS_ROMLOAD8(0x100000, u14, chk14) +#define WPCS_SOUNDROM8xx(u18,chk18) \ + WPCS_STDREG \ + WPCS_ROMLOAD8(0x000000, u18, chk18) + +/*------------------------- +/ DCS sound board +/--------------------------*/ +#define DCS_CPUNO 1 +#define DCS_CPUREGION (REGION_CPU1+DCS_CPUNO) +#define DCS_ROMREGION (REGION_SOUND1) +#define DCS_BANKREGION (REGION_USER3) +extern MACHINE_DRIVER_EXTERN(wmssnd_dcs1); +/* DCS on WPC95 audio/visual board */ +extern MACHINE_DRIVER_EXTERN(wmssnd_dcs2); + +#define DCS_STDREG(size) \ + SOUNDREGION(ADSP2100_SIZE, DCS_CPUREGION) \ + SOUNDREGION(0x1000*2, DCS_BANKREGION) \ + SOUNDREGION(0x800000, DCS_ROMREGION) + +#define DCS_ROMLOADx(start, n, chk) \ + ROM_LOAD(n, start, 0x080000, chk) ROM_RELOAD(start+0x080000, 0x080000) +#define DCS_ROMLOADm(start, n,chk) \ + ROM_LOAD(n, start, 0x100000, chk) + +#define DCS_SOUNDROM1x(n2,chk2) \ + DCS_STDREG(0x100000) \ + DCS_ROMLOADx(0x000000,n2,chk2) + +#define DCS_SOUNDROM1m(n2,chk2) \ + DCS_STDREG(0x100000) \ + DCS_ROMLOADm(0x000000,n2,chk2) + +#define DCS_SOUNDROM2m(n2,chk2,n3,chk3) \ + DCS_STDREG(0x200000) \ + DCS_ROMLOADm(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) + +#define DCS_SOUNDROM3m(n2,chk2,n3,chk3,n4,chk4) \ + DCS_STDREG(0x300000) \ + DCS_ROMLOADm(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) \ + DCS_ROMLOADm(0x200000,n4,chk4) + +#define DCS_SOUNDROM4m(n2,chk2,n3,chk3,n4,chk4,n5,chk5) \ + DCS_STDREG(0x400000) \ + DCS_ROMLOADm(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) \ + DCS_ROMLOADm(0x200000,n4,chk4) \ + DCS_ROMLOADm(0x300000,n5,chk5) + +#define DCS_SOUNDROM4xm(n2,chk2,n3,chk3,n4,chk4,n5,chk5) \ + DCS_STDREG(0x400000) \ + DCS_ROMLOADx(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) \ + DCS_ROMLOADm(0x200000,n4,chk4) \ + DCS_ROMLOADm(0x300000,n5,chk5) + +#define DCS_SOUNDROM4mx(n2,chk2,n3,chk3,n4,chk4,n5,chk5) \ + DCS_STDREG(0x400000) \ + DCS_ROMLOADm(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) \ + DCS_ROMLOADm(0x200000,n4,chk4) \ + DCS_ROMLOADx(0x300000,n5,chk5) + +#define DCS_SOUNDROM5xm(n2,chk2,n3,chk3,n4,chk4,n5,chk5,n6,chk6) \ + DCS_STDREG(0x500000) \ + DCS_ROMLOADx(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) \ + DCS_ROMLOADm(0x200000,n4,chk4) \ + DCS_ROMLOADm(0x300000,n5,chk5) \ + DCS_ROMLOADm(0x400000,n6,chk6) + +#define DCS_SOUNDROM5x(n2,chk2,n3,chk3,n4,chk4,n5,chk5,n6,chk6) \ + DCS_STDREG(0x500000) \ + DCS_ROMLOADx(0x000000,n2,chk2) \ + DCS_ROMLOADx(0x100000,n3,chk3) \ + DCS_ROMLOADx(0x200000,n4,chk4) \ + DCS_ROMLOADx(0x300000,n5,chk5) \ + DCS_ROMLOADx(0x400000,n6,chk6) + +#define DCS_SOUNDROM5m(n2,chk2,n3,chk3,n4,chk4,n5,chk5,n6,chk6) \ + DCS_STDREG(0x500000) \ + DCS_ROMLOADm(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) \ + DCS_ROMLOADm(0x200000,n4,chk4) \ + DCS_ROMLOADm(0x300000,n5,chk5) \ + DCS_ROMLOADm(0x400000,n6,chk6) + +#define DCS_SOUNDROM6x(n2,chk2,n3,chk3,n4,chk4,n5,chk5,n6,chk6,n7,chk7) \ + DCS_STDREG(0x600000) \ + DCS_ROMLOADx(0x000000,n2,chk2) \ + DCS_ROMLOADx(0x100000,n3,chk3) \ + DCS_ROMLOADx(0x200000,n4,chk4) \ + DCS_ROMLOADx(0x300000,n5,chk5) \ + DCS_ROMLOADx(0x400000,n6,chk6) \ + DCS_ROMLOADx(0x500000,n7,chk7) + +#define DCS_SOUNDROM6m(n2,chk2,n3,chk3,n4,chk4,n5,chk5,n6,chk6,n7,chk7) \ + DCS_STDREG(0x600000) \ + DCS_ROMLOADm(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) \ + DCS_ROMLOADm(0x200000,n4,chk4) \ + DCS_ROMLOADm(0x300000,n5,chk5) \ + DCS_ROMLOADm(0x400000,n6,chk6) \ + DCS_ROMLOADm(0x500000,n7,chk7) + +#define DCS_SOUNDROM6xm(n2,chk2,n3,chk3,n4,chk4,n5,chk5,n6,chk6,n7,chk7) \ + DCS_STDREG(0x600000) \ + DCS_ROMLOADx(0x000000,n2,chk2) \ + DCS_ROMLOADm(0x100000,n3,chk3) \ + DCS_ROMLOADm(0x200000,n4,chk4) \ + DCS_ROMLOADm(0x300000,n5,chk5) \ + DCS_ROMLOADm(0x400000,n6,chk6) \ + DCS_ROMLOADm(0x500000,n7,chk7) + +#define DCS_SOUNDROM7x(n2,chk2,n3,chk3,n4,chk4,n5,chk5,n6,chk6,n7,chk7,n8,chk8) \ + DCS_STDREG(0x700000) \ + DCS_ROMLOADx(0x000000,n2,chk2) \ + DCS_ROMLOADx(0x100000,n3,chk3) \ + DCS_ROMLOADx(0x200000,n4,chk4) \ + DCS_ROMLOADx(0x300000,n5,chk5) \ + DCS_ROMLOADx(0x400000,n6,chk6) \ + DCS_ROMLOADx(0x500000,n7,chk7) \ + DCS_ROMLOADx(0x600000,n8,chk8) + +#define DCS_SOUNDROM8x(n2,chk2,n3,chk3,n4,chk4,n5,chk5,n6,chk6,n7,chk7,n8,chk8,n9,chk9) \ + DCS_STDREG(0x800000) \ + DCS_ROMLOADx(0x000000,n2,chk2) \ + DCS_ROMLOADx(0x100000,n3,chk3) \ + DCS_ROMLOADx(0x200000,n4,chk4) \ + DCS_ROMLOADx(0x300000,n5,chk5) \ + DCS_ROMLOADx(0x400000,n6,chk6) \ + DCS_ROMLOADx(0x500000,n7,chk7) \ + DCS_ROMLOADx(0x600000,n8,chk8) \ + DCS_ROMLOADx(0x700000,n9,chk9) + +#endif /* INC_WMSSND */ + +#endif diff --git a/src/mame/mame.mak b/src/mame/mame.mak index 308fa07f0e8..5915d9738da 100644 --- a/src/mame/mame.mak +++ b/src/mame/mame.mak @@ -1516,6 +1516,14 @@ $(MAMEOBJ)/zaccaria.a: \ $(DRIVERS)/zaccaria.o $(VIDEO)/zaccaria.o \ +#------------------------------------------------- +# Pinball drivers +#------------------------------------------------- + +$(MAMEOBJ)/zaccaria.a: \ + $(DRIVERS)/p_s11.o \ + $(DRIVERS)/p_core.o \ + $(DRIVERS)/p_wmssnd.o \ #------------------------------------------------- # remaining drivers diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c index 6e5a59511a0..649e05e138a 100644 --- a/src/mame/mamedriv.c +++ b/src/mame/mamedriv.c @@ -8644,5 +8644,85 @@ Other Sun games /* MPU5 */ DRIVER( m_honmon ) - + /* Drivers below are pinball machines + There is currently no way of fully supporting these in MAME + */ + + DRIVER( sshtl_l7 ) + DRIVER( sorcr_l1 ) + DRIVER( sorcr_l2 ) + DRIVER( comet_l4 ) + DRIVER( comet_l5 ) + DRIVER( hs_l4 ) + DRIVER( hs_l3 ) + DRIVER( grand_l4 ) + DRIVER( rdkng_l4 ) + DRIVER( rdkng_l1 ) + DRIVER( rdkng_l2 ) + DRIVER( rdkng_l3 ) + DRIVER( pb_l5 ) + DRIVER( pb_l2 ) + DRIVER( pb_l3 ) + DRIVER( f14_l1 ) + DRIVER( fire_l3 ) + DRIVER( bguns_l8 ) + DRIVER( bguns_l7 ) + DRIVER( bguns_la ) + DRIVER( bguns_p1 ) + DRIVER( spstn_l5 ) + DRIVER( cycln_l5 ) + DRIVER( cycln_l4 ) + DRIVER( bnzai_l3 ) + DRIVER( bnzai_g3 ) + DRIVER( bnzai_l1 ) + DRIVER( bnzai_pa ) + DRIVER( swrds_l2 ) + DRIVER( taxi_l4 ) + DRIVER( taxi_l3 ) + DRIVER( taxi_lg1 ) + DRIVER( jokrz_l6 ) + DRIVER( jokrz_l3 ) + DRIVER( esha_la3 ) + DRIVER( esha_pr4 ) + DRIVER( esha_lg1 ) + DRIVER( esha_lg2 ) + DRIVER( esha_la1 ) + DRIVER( esha_pa1 ) + DRIVER( bk2k_l4 ) + DRIVER( bk2k_lg1 ) + DRIVER( bk2k_lg3 ) + DRIVER( bk2k_pu1 ) + DRIVER( polic_l4 ) + DRIVER( polic_l3 ) + DRIVER( polic_l2 ) + DRIVER( tsptr_l3 ) + DRIVER( bcats_l5 ) + DRIVER( bcats_l2 ) + DRIVER( mousn_l4 ) + DRIVER( mousn_l1 ) + DRIVER( mousn_lu ) + DRIVER( mousn_lx ) + DRIVER( whirl_l3 ) + DRIVER( whirl_l2 ) + DRIVER( gs_l3 ) + DRIVER( gs_l4 ) + DRIVER( rollr_l2 ) + DRIVER( rollr_ex ) + DRIVER( rollr_e1 ) + DRIVER( rollr_p2 ) + DRIVER( rollr_l3 ) + DRIVER( rollr_g3 ) + DRIVER( pool_l7 ) + DRIVER( diner_l4 ) + DRIVER( diner_l3 ) + DRIVER( diner_l1 ) + DRIVER( radcl_l1 ) + DRIVER( radcl_g1 ) + DRIVER( radcl_p3 ) + DRIVER( strax_p7 ) + DRIVER( rvrbt_l3 ) + DRIVER( bbnny_l2 ) + DRIVER( bbnny_lu ) + + #endif /* DRIVER_RECURSIVE */