trunk/src/mame/drivers/dblcrown.c
| r0 | r18544 | |
| 1 | /*************************************************************************** |
| 2 | Double Crown |
| 3 | (C) 1994, or maybe 1995 |
| 4 | cards gambling game |
| 5 | |
| 6 | dfinal.c ish, but newer? |
| 7 | |
| 8 | |
| 9 | Excellent System |
| 10 | boardlabel: ES-9411B |
| 11 | |
| 12 | 28.6363 xtal |
| 13 | ES-9409 QFP is 208 pins.. for graphics only? |
| 14 | Z0840006PSC Zilog z80, is rated 6.17 MHz |
| 15 | OKI M82C55A-2 |
| 16 | 65764H-5 .. 64kbit ram CMOS |
| 17 | 2 * N341256P-25 - CMOS SRAM 256K-BIT(32KX8) |
| 18 | 4 * dipsw 8pos |
| 19 | YMZ284-D (ay8910, but without i/o ports) |
| 20 | MAXIM MAX693ACPE is a "Microprocessor Supervisory Circuit", for watchdog? and for keeping nvram stable? |
| 21 | |
| 22 | ***************************************************************************/ |
| 23 | |
| 24 | |
| 25 | #include "emu.h" |
| 26 | #include "cpu/z80/z80.h" |
| 27 | #include "sound/ay8910.h" |
| 28 | #include "machine/nvram.h" |
| 29 | |
| 30 | #define MAIN_CLOCK XTAL_28_63636MHz |
| 31 | |
| 32 | class dblcrown_state : public driver_device |
| 33 | { |
| 34 | public: |
| 35 | dblcrown_state(const machine_config &mconfig, device_type type, const char *tag) |
| 36 | : driver_device(mconfig, type, tag), |
| 37 | m_maincpu(*this, "maincpu") |
| 38 | { } |
| 39 | |
| 40 | // devices |
| 41 | required_device<cpu_device> m_maincpu; |
| 42 | |
| 43 | // screen updates |
| 44 | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 45 | |
| 46 | protected: |
| 47 | // driver_device overrides |
| 48 | virtual void machine_start(); |
| 49 | virtual void machine_reset(); |
| 50 | |
| 51 | virtual void video_start(); |
| 52 | virtual void palette_init(); |
| 53 | }; |
| 54 | |
| 55 | void dblcrown_state::video_start() |
| 56 | { |
| 57 | |
| 58 | } |
| 59 | |
| 60 | UINT32 dblcrown_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) |
| 61 | { |
| 62 | return 0; |
| 63 | } |
| 64 | |
| 65 | static ADDRESS_MAP_START( dblcrown_map, AS_PROGRAM, 8, dblcrown_state ) |
| 66 | AM_RANGE(0x0000, 0x7fff) AM_ROM |
| 67 | AM_RANGE(0xa000, 0xb7ff) AM_RAM |
| 68 | AM_RANGE(0xb800, 0xbfff) AM_RAM AM_SHARE("nvram") |
| 69 | AM_RANGE(0xc000, 0xc3ff) AM_RAM |
| 70 | AM_RANGE(0xc400, 0xc7ff) AM_RAM |
| 71 | AM_RANGE(0xd000, 0xdfff) AM_RAM |
| 72 | AM_RANGE(0xff00, 0xffff) AM_RAM //stack? sp not initialized? |
| 73 | ADDRESS_MAP_END |
| 74 | |
| 75 | static ADDRESS_MAP_START( dblcrown_io, AS_IO, 8, dblcrown_state ) |
| 76 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 77 | ADDRESS_MAP_END |
| 78 | |
| 79 | static INPUT_PORTS_START( dblcrown ) |
| 80 | /* dummy active high structure */ |
| 81 | PORT_START("SYSA") |
| 82 | PORT_DIPNAME( 0x01, 0x00, "SYSA" ) |
| 83 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 84 | PORT_DIPSETTING( 0x01, DEF_STR( On ) ) |
| 85 | PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) |
| 86 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 87 | PORT_DIPSETTING( 0x02, DEF_STR( On ) ) |
| 88 | PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) |
| 89 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 90 | PORT_DIPSETTING( 0x04, DEF_STR( On ) ) |
| 91 | PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) |
| 92 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 93 | PORT_DIPSETTING( 0x08, DEF_STR( On ) ) |
| 94 | PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) |
| 95 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 96 | PORT_DIPSETTING( 0x10, DEF_STR( On ) ) |
| 97 | PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) |
| 98 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 99 | PORT_DIPSETTING( 0x20, DEF_STR( On ) ) |
| 100 | PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) |
| 101 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 102 | PORT_DIPSETTING( 0x40, DEF_STR( On ) ) |
| 103 | PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) |
| 104 | PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) |
| 105 | PORT_DIPSETTING( 0x80, DEF_STR( On ) ) |
| 106 | |
| 107 | /* dummy active low structure */ |
| 108 | PORT_START("DSWA") |
| 109 | PORT_DIPNAME( 0x01, 0x01, "DSWA" ) |
| 110 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 111 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 112 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| 113 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 114 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 115 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 116 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 117 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 118 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 119 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 120 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 121 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 122 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 123 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 124 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 125 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 126 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 127 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 128 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 129 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 130 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 131 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 132 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 133 | INPUT_PORTS_END |
| 134 | |
| 135 | static const gfx_layout tiles16x8_layout = |
| 136 | { |
| 137 | 8,8, |
| 138 | RGN_FRAC(1,1), |
| 139 | 4, |
| 140 | { 0, 1, 2, 3 }, |
| 141 | { 8, 0, 12, 4, 24, 16, 28, 20 }, |
| 142 | { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 }, |
| 143 | 32*8 |
| 144 | }; |
| 145 | |
| 146 | static GFXDECODE_START( dblcrown ) |
| 147 | GFXDECODE_ENTRY( "gfx1", 0, tiles16x8_layout, 0, 16*4 ) |
| 148 | GFXDECODE_END |
| 149 | |
| 150 | |
| 151 | |
| 152 | void dblcrown_state::machine_start() |
| 153 | { |
| 154 | } |
| 155 | |
| 156 | void dblcrown_state::machine_reset() |
| 157 | { |
| 158 | } |
| 159 | |
| 160 | |
| 161 | void dblcrown_state::palette_init() |
| 162 | { |
| 163 | } |
| 164 | |
| 165 | static MACHINE_CONFIG_START( dblcrown, dblcrown_state ) |
| 166 | |
| 167 | /* basic machine hardware */ |
| 168 | MCFG_CPU_ADD("maincpu",Z80,MAIN_CLOCK/6) |
| 169 | MCFG_CPU_PROGRAM_MAP(dblcrown_map) |
| 170 | MCFG_CPU_IO_MAP(dblcrown_io) |
| 171 | |
| 172 | /* video hardware */ |
| 173 | MCFG_SCREEN_ADD("screen", RASTER) |
| 174 | MCFG_SCREEN_REFRESH_RATE(60) |
| 175 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) |
| 176 | MCFG_SCREEN_UPDATE_DRIVER(dblcrown_state, screen_update) |
| 177 | MCFG_SCREEN_SIZE(32*8, 32*8) |
| 178 | MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) |
| 179 | |
| 180 | MCFG_GFXDECODE(dblcrown) |
| 181 | |
| 182 | MCFG_PALETTE_LENGTH(16) |
| 183 | |
| 184 | MCFG_NVRAM_ADD_0FILL("nvram") |
| 185 | |
| 186 | /* sound hardware */ |
| 187 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 188 | MCFG_SOUND_ADD("aysnd", AY8910, MAIN_CLOCK/12) |
| 189 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) |
| 190 | MACHINE_CONFIG_END |
| 191 | |
| 192 | |
| 193 | /*************************************************************************** |
| 194 | |
| 195 | Game driver(s) |
| 196 | |
| 197 | ***************************************************************************/ |
| 198 | |
| 199 | ROM_START( dblcrown ) |
| 200 | ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASE00 ) |
| 201 | ROM_LOAD("1.u33", 0x00000, 0x40000, CRC(5df95a9c) SHA1(799333206089989c25ff9f167363073d4cf64bd2) ) |
| 202 | |
| 203 | ROM_REGION( 0x80000, "gfx1", ROMREGION_ERASE00 ) |
| 204 | ROM_LOAD("2.u43", 0x00000, 0x80000, CRC(58200bd4) SHA1(2795cfc41056111f66bfb82916343d1c733baa83) ) |
| 205 | ROM_END |
| 206 | |
| 207 | GAME( 199?, dblcrown, 0, dblcrown, dblcrown, driver_device, 0, ROT0, "Excellent Systems", "Double Crown", GAME_IS_SKELETON ) |