trunk/src/mame/drivers/supercrd.c
| r0 | r18791 | |
| 1 | /********************************************************************************** |
| 2 | |
| 3 | Super Card - Fun World. |
| 4 | |
| 5 | Encrypted CPU (based on a Z80) |
| 6 | plus 2x 8255 + YM3014 + YM3812 hardware. |
| 7 | |
| 8 | |
| 9 | Driver by Roberto Fresca. |
| 10 | |
| 11 | |
| 12 | *********************************************************************************** |
| 13 | |
| 14 | Games running on this hardware: |
| 15 | |
| 16 | * Super Card (encrypted), Fun World, 1992. |
| 17 | |
| 18 | |
| 19 | *********************************************************************************** |
| 20 | |
| 21 | Herdware Notes.... |
| 22 | |
| 23 | CPU: Fun World custom CPU based on Z80 family. |
| 24 | Denom: SUPCA. |
| 25 | Number: 417. |
| 26 | Type: E92. |
| 27 | Date: 20-07-92. |
| 28 | |
| 29 | SND: 1x Yamaha YM3812. |
| 30 | 1x Yamaha Y3014B (DAC). |
| 31 | |
| 32 | CRTC: MC68B45P. |
| 33 | I/O: 2x M5L8255AP-5 |
| 34 | |
| 35 | ROMs: PRG: 2x 27C512 (IC37, IC51) |
| 36 | GFX: 2x 27C512 (IC10, IC11) |
| 37 | BP: 1x N82S147N |
| 38 | |
| 39 | 1x Xtal 16 MHz. |
| 40 | 1x 8 DIP switches bank. |
| 41 | |
| 42 | |
| 43 | PCB Layout: |
| 44 | |
| 45 | +-----------------------------------------------------------------------------------------------------------------------+ |
| 46 | | | |
| 47 | | +--------+ +--------+ | |
| 48 | | | | +------------+ | | +----+ +----+ +-----------+ | |
| 49 | | | | | GD74LS157 | | | | A01| | A02| | LM380N | +---+ |
| 50 | | | | +------------+ |SRM2064C| +----+ +----+ +-----------+ +---+ ---| |
| 51 | | | | |15 | +-------------------------------------+ +--------+ |MC1| ---| |
| 52 | | |MC68B45P| +------------+ | | |## ooooooooooooooooooooooooooooooo ##| | | |413| ---| |
| 53 | | | | | GD74LS157 | | | |## ooooooooooooooooooooooooooooooo ##| | YAMAHA | |P /| ---| |
| 54 | | | | +------------+ | | +-------------------------------------+ | YM3812 | |ULN| ---| |
| 55 | | | QL | | | +--------+ +--------+ +--------+ +---------+ | | |200| ---| |
| 56 | | |JR58833 | +------------+ |F92A 488| |Supca417| | GS | |Supca417| | | | | |3A | ---| |
| 57 | | | | | GD74LS157 | | | | | | | | | |Lfnd. Nr.| |862180B | +---+ ---| |
| 58 | | | | +------------+ | | | CE2 | |GM76C88-| | CE1 | |SUPCA 417| | | ---| |
| 59 | | | | | | | | |12D | | | | | | | +---+ ---| |
| 60 | | | | +------------+ | | | | | | | | | | | | |MC1| ---| |
| 61 | | | | | GD74LS157 | +--------+ | | | | | | |Type: E92| | | |413| +---+ |
| 62 | | | | +------------+ | | | | | | | | | | |P /| | |
| 63 | | | | | | | I20 | | | | | +--------+ |ULN| | |
| 64 | | | | +----+ | | | | | | |Datum: | |200| | |
| 65 | | | | +--------------------+ |XTAL| | | | | | | | 20.7.92| +--------+ |3A | | |
| 66 | | +--------+ | | | | | | | KOREA | | | | | | | +---+ | |
| 67 | | | GM76C88-12D | |16.0| | 27C512| | | | 27C512| | | | | | |
| 68 | | +-------------+ | | |00 | | IC51| | | | IC37| | | | | +---+ | |
| 69 | | | 74LS245 | | | +----+ +--------+ +--------+ +--------+ |FUNWORLD | | | |8 | | |
| 70 | | +-------------+ +--------------------+ | | |M5L8255A| | | +---+ |
| 71 | | | | |P-5 | | | ---| |
| 72 | | +-------------+ +------------+ +---+ +--------------+ +--------------+ | | | | |DIP| ---| |
| 73 | | | 74LS374 | | GD74LS374 | |74L| | GD74LS374 | | GD74LS374 | +---------+ | | | | ---| |
| 74 | | +-------------+ +------------+ |S36| +--------------+ +--------------+ | | | | ---| |
| 75 | | |8AN| | | |1 | ---| |
| 76 | |+--------------------+ +---------+ | | +---+ | | +---+ ---| |
| 77 | ||Supca 410 / ZG1 | |74LS194A | | | +---------+ +---------+ |GD7| | | ---| |
| 78 | || | +---------+ +---+ |GD74LS393| |GD74LS393| |4LS| | | ---| |
| 79 | || 27C512| +---------+ +---------+ |139| | | ---| |
| 80 | || IC10| +---------+ +---+ +---+ | | | | ---| |
| 81 | |+--------------------+ |74LS194A | |GD7| |GD7| | | | | ---| |
| 82 | | +---------+ |4LS| |4LS| +---------+ +---------+ | | | | ---| |
| 83 | | |393| |32 | | GD4066B | |GD74LS08 | +---+ +--------+ ---| |
| 84 | |+--------------------+ +---------+ | | | | +---------+ +---------+ ---| |
| 85 | ||Supca 410 / ZG2 | |74LS194A | | | | | +--------+ ---| |
| 86 | || | +---------+ | | | | +---+ | | ---| |
| 87 | || 27C512| +---+ +---+ +----------+ +---------+ |74L| | | ---| |
| 88 | || IC11| +---------+ |GD74LS174 | |GD74LS138| |S36| | | ---| |
| 89 | |+--------------------+ |74LS194A | +----------+ +---------+ |8AN| | | ---| |
| 90 | | +---------+ +---+ | | |M5L8255A| ---| |
| 91 | | |GD7| | | |P-5 | ---| |
| 92 | |+--------------------+ +---------+ |4LS| | | | | ---| |
| 93 | || | |74LS194A | |174| +---+ | | ---| |
| 94 | || EMPTY SOCKET | +---------+ | | | | ---| |
| 95 | || | | | | | ---| |
| 96 | || | +---------+ | | +--------+ | | ---| |
| 97 | |+--------------------+ |74LS194A | +---+ +---+ | | | | ---| |
| 98 | | +---------+ |A00| | BATTERY| | | ---| |
| 99 | | +---+ +---+ | | | | | | ---| |
| 100 | |+----------+ +----------+ | | |GD7| +---+ |3.6V | | | ---| |
| 101 | || 74LS174 | | 74LS174 | |TBP| |4LS| | 50mA| | | ---| |
| 102 | |+----------+ +----------+ |24S| |174| | | | | ---| |
| 103 | | |10N| | | | | +--------+ +---+ |
| 104 | | +----------+ +--------------+ | | | | | | | |
| 105 | | | 74LS02 | | N82S147N | | | | | +--------+ | |
| 106 | | +----------+ +--------------+ +---+ +---+ | |
| 107 | +-----------------------------------------------------------------------------------------------------------------------+ |
| 108 | |
| 109 | A00 = PCF1251P |
| 110 | A01 = Y3014B |
| 111 | A02 = GL358/I27 |
| 112 | |
| 113 | Marking on the back of the PCB: "CPU-AF Z80 IB300" |
| 114 | |
| 115 | |
| 116 | DIP Switches bank |
| 117 | +---------------+ |
| 118 | | |#| |#| |#| | | |
| 119 | |---------------| |
| 120 | |#| |#| |#| |#|#| |
| 121 | +---------------+ |
| 122 | 1 2 3 4 5 6 7 8 |
| 123 | |
| 124 | |
| 125 | Fun World common color system circuitry |
| 126 | --------------------------------------- |
| 127 | |
| 128 | 74LS174 - Hex D-type flip-flops with reset; positive-edge trigger. |
| 129 | N82S147 - 4K-bit TTL Bipolar PROM. |
| 130 | 74LS374 - 3-STATE Octal D-Type transparent latches and edge-triggered flip-flops. |
| 131 | |
| 132 | N82S147 74LS374 RESNET PULL-DOWN |
| 133 | 74HC174 .-------. .-------. |
| 134 | .-------. (1)-|01 20|--VCC--|20 02|------[(1K)]---+ .-----. |
| 135 | | | (1)-|02 06|-------|03 05|------[(470)]--+--+-----------| RED | |
| 136 | |16: VCC| (1)-|03 07|-------|04 06|------[(220)]--+ | '-----' |
| 137 | | | (1)-|04 08|-------|07 | '--[(100)]--GND |
| 138 | | 02|-------|05 09|-------|08 09|------[(1K)]---+ .------. |
| 139 | | 05|-------|16 11|-------|13 12|------[(470)]--+--+-----------| BLUE | |
| 140 | | 07|-------|17 12|-------|14 15|------[(220)]--+ | '------' |
| 141 | | 10|-------|18 13|-------|17 | '--[(100)]--GND |
| 142 | | 12|-------|19 14|-------|18 16|------[(470)]--+ .-------. |
| 143 | | 13|---+---|15 10|---+---|10 19|------[(220)]--+--+-----------| GREEN | |
| 144 | |15 08 | | | | | | 01 | | '-------' |
| 145 | '-+--+--' | '-------' | '----+--' '--[(100)]--GND |
| 146 | | | | | | |
| 147 | | '------+------GND------' | |
| 148 | '----------------------------------' |
| 149 | |
| 150 | (1): Connected either to: |
| 151 | |
| 152 | NOTE: The 74LS374 could be replaced by a 74HCT373. |
| 153 | |
| 154 | ***********************************************************************************/ |
| 155 | |
| 156 | |
| 157 | #define MASTER_CLOCK XTAL_16MHz |
| 158 | |
| 159 | #include "emu.h" |
| 160 | #include "cpu/z80/z80.h" |
| 161 | #include "machine/i8255.h" |
| 162 | #include "video/mc6845.h" |
| 163 | #include "machine/nvram.h" |
| 164 | #include "video/resnet.h" |
| 165 | |
| 166 | |
| 167 | class supercrd_state : public driver_device |
| 168 | { |
| 169 | public: |
| 170 | supercrd_state(const machine_config &mconfig, device_type type, const char *tag) |
| 171 | : driver_device(mconfig, type, tag) , |
| 172 | m_videoram(*this, "videoram"), |
| 173 | m_colorram(*this, "colorram"){ } |
| 174 | |
| 175 | required_shared_ptr<UINT8> m_videoram; |
| 176 | required_shared_ptr<UINT8> m_colorram; |
| 177 | tilemap_t *m_bg_tilemap; |
| 178 | DECLARE_WRITE8_MEMBER(supercrd_videoram_w); |
| 179 | DECLARE_WRITE8_MEMBER(supercrd_colorram_w); |
| 180 | TILE_GET_INFO_MEMBER(get_bg_tile_info); |
| 181 | DECLARE_PALETTE_INIT(supercrd); |
| 182 | DECLARE_VIDEO_START(supercrd); |
| 183 | UINT32 screen_update_supercrd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 184 | }; |
| 185 | |
| 186 | |
| 187 | /************************* |
| 188 | * Video Hardware * |
| 189 | *************************/ |
| 190 | |
| 191 | PALETTE_INIT_MEMBER(supercrd_state, supercrd) |
| 192 | { |
| 193 | const UINT8 *color_prom = machine().root_device().memregion("proms")->base(); |
| 194 | int i; |
| 195 | static const int resistances_rb[3] = { 1000, 470, 220 }; |
| 196 | static const int resistances_g [2] = { 470, 220 }; |
| 197 | double weights_r[3], weights_b[3], weights_g[2]; |
| 198 | |
| 199 | compute_resistor_weights(0, 255, -1.0, |
| 200 | 3, resistances_rb, weights_r, 100, 0, |
| 201 | 3, resistances_rb, weights_b, 100, 0, |
| 202 | 2, resistances_g, weights_g, 100, 0); |
| 203 | |
| 204 | |
| 205 | for (i = 0; i < machine().total_colors(); i++) |
| 206 | { |
| 207 | int bit0, bit1, bit2, r, g, b; |
| 208 | |
| 209 | /* red component */ |
| 210 | bit0 = (color_prom[i] >> 0) & 0x01; |
| 211 | bit1 = (color_prom[i] >> 1) & 0x01; |
| 212 | bit2 = (color_prom[i] >> 2) & 0x01; |
| 213 | r = combine_3_weights(weights_r, bit0, bit1, bit2); |
| 214 | /* blue component */ |
| 215 | bit0 = (color_prom[i] >> 3) & 0x01; |
| 216 | bit1 = (color_prom[i] >> 4) & 0x01; |
| 217 | bit2 = (color_prom[i] >> 5) & 0x01; |
| 218 | b = combine_3_weights(weights_b, bit0, bit1, bit2); |
| 219 | /* green component */ |
| 220 | bit0 = (color_prom[i] >> 6) & 0x01; |
| 221 | bit1 = (color_prom[i] >> 7) & 0x01; |
| 222 | g = combine_2_weights(weights_g, bit0, bit1); |
| 223 | |
| 224 | palette_set_color(machine(),i,MAKE_RGB(r,g,b)); |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | |
| 229 | WRITE8_MEMBER(supercrd_state::supercrd_videoram_w) |
| 230 | { |
| 231 | m_videoram[offset] = data; |
| 232 | m_bg_tilemap->mark_tile_dirty(offset); |
| 233 | } |
| 234 | |
| 235 | WRITE8_MEMBER(supercrd_state::supercrd_colorram_w) |
| 236 | { |
| 237 | m_colorram[offset] = data; |
| 238 | m_bg_tilemap->mark_tile_dirty(offset); |
| 239 | } |
| 240 | |
| 241 | |
| 242 | TILE_GET_INFO_MEMBER(supercrd_state::get_bg_tile_info) |
| 243 | { |
| 244 | /* - bits - |
| 245 | 7654 3210 |
| 246 | xxxx ---- tiles color. |
| 247 | ---- xxxx unused. |
| 248 | */ |
| 249 | int offs = tile_index; |
| 250 | int attr = m_videoram[offs] + (m_colorram[offs] << 8); |
| 251 | int code = attr & 0xfff; |
| 252 | int color = m_colorram[offs] >> 4; // 4 bits for color. |
| 253 | |
| 254 | SET_TILE_INFO_MEMBER(0, code, color, 0); |
| 255 | } |
| 256 | |
| 257 | |
| 258 | VIDEO_START_MEMBER(supercrd_state, supercrd) |
| 259 | { |
| 260 | m_bg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(supercrd_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 4, 8, 96, 29); |
| 261 | } |
| 262 | |
| 263 | |
| 264 | UINT32 supercrd_state::screen_update_supercrd(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 265 | { |
| 266 | m_bg_tilemap->draw(bitmap, cliprect, 0, 0); |
| 267 | return 0; |
| 268 | } |
| 269 | |
| 270 | |
| 271 | /***************************** |
| 272 | * Memory map information * |
| 273 | *****************************/ |
| 274 | |
| 275 | static ADDRESS_MAP_START( supercrd_map, AS_PROGRAM, 8, supercrd_state ) |
| 276 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 277 | AM_RANGE(0xc000, 0xcfff) AM_RAM_WRITE(supercrd_videoram_w) AM_SHARE("videoram") // wrong |
| 278 | AM_RANGE(0xd000, 0xdfff) AM_RAM_WRITE(supercrd_colorram_w) AM_SHARE("colorram") // wrong |
| 279 | // AM_RANGE(0x0000, 0x0000) AM_RAM AM_SHARE("nvram") |
| 280 | // AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 281 | // AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 282 | ADDRESS_MAP_END |
| 283 | |
| 284 | |
| 285 | /***************************** |
| 286 | * Input port definitions * |
| 287 | *****************************/ |
| 288 | |
| 289 | static INPUT_PORTS_START( supercrd ) |
| 290 | PORT_START("IN0") |
| 291 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("IN0-1") |
| 292 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("IN0-2") |
| 293 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("IN0-3") |
| 294 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("IN0-4") |
| 295 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("IN0-5") |
| 296 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("IN0-6") |
| 297 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("IN0-7") |
| 298 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("IN0-8") |
| 299 | |
| 300 | PORT_START("IN1") |
| 301 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("IN1-1") |
| 302 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) PORT_NAME("IN1-2") |
| 303 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) PORT_NAME("IN1-3") |
| 304 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN1-4") |
| 305 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("IN1-5") |
| 306 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) PORT_NAME("IN1-6") |
| 307 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("IN1-7") |
| 308 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN1-8") |
| 309 | |
| 310 | PORT_START("IN2") |
| 311 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("IN2-1") |
| 312 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("IN2-2") |
| 313 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN2-3") |
| 314 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN2-4") |
| 315 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN2-5") |
| 316 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN2-6") |
| 317 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-7") |
| 318 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) PORT_NAME("IN2-8") |
| 319 | |
| 320 | PORT_START("IN3") |
| 321 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_NAME("IN3-1") |
| 322 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_NAME("IN3-2") |
| 323 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) PORT_NAME("IN3-3") |
| 324 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) PORT_NAME("IN3-4") |
| 325 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) PORT_NAME("IN3-5") |
| 326 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("IN3-6") |
| 327 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("IN3-7") |
| 328 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) PORT_NAME("IN3-8") |
| 329 | |
| 330 | PORT_START("IN4") |
| 331 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("IN4-1") |
| 332 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("IN4-2") |
| 333 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("IN4-3") |
| 334 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("IN4-4") |
| 335 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("IN4-5") |
| 336 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("IN4-6") |
| 337 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("IN4-7") |
| 338 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("IN4-8") |
| 339 | |
| 340 | PORT_START("DSW1") |
| 341 | PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) |
| 342 | PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) |
| 343 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 344 | PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) |
| 345 | PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) |
| 346 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 347 | PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) |
| 348 | PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) |
| 349 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 350 | PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) |
| 351 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 352 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 353 | PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) |
| 354 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 355 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 356 | PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) |
| 357 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 358 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 359 | PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) |
| 360 | PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) |
| 361 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 362 | PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) |
| 363 | PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) |
| 364 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 365 | INPUT_PORTS_END |
| 366 | |
| 367 | |
| 368 | /************************* |
| 369 | * Graphics Layouts * |
| 370 | *************************/ |
| 371 | |
| 372 | static const gfx_layout charlayout = |
| 373 | { |
| 374 | 4,8, |
| 375 | RGN_FRAC(1,2), |
| 376 | 4, |
| 377 | { RGN_FRAC(0,2), RGN_FRAC(0,2) + 4, RGN_FRAC(1,2), RGN_FRAC(1,2) + 4 }, |
| 378 | { 3, 2, 1, 0 }, |
| 379 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, |
| 380 | 8*4*2 |
| 381 | }; |
| 382 | |
| 383 | |
| 384 | /****************************** |
| 385 | * Graphics Decode Information * |
| 386 | ******************************/ |
| 387 | |
| 388 | /* The palette system is adressable through a PLD. |
| 389 | The game could have 2 different palettes, located |
| 390 | in the first and second half of the bipolar PROM. |
| 391 | */ |
| 392 | |
| 393 | static GFXDECODE_START( supercrd ) /* Adressing the first half of the palette */ |
| 394 | GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 ) |
| 395 | GFXDECODE_END |
| 396 | |
| 397 | |
| 398 | /************************ |
| 399 | * CRTC Interface * |
| 400 | ************************/ |
| 401 | |
| 402 | //static const mc6845_interface mc6845_intf = |
| 403 | //{ |
| 404 | // "screen", /* screen we are acting on */ |
| 405 | // 4, /* number of pixels per video memory address */ |
| 406 | // NULL, /* before pixel update callback */ |
| 407 | // NULL, /* row update callback */ |
| 408 | // NULL, /* after pixel update callback */ |
| 409 | // DEVCB_NULL, /* callback for display state changes */ |
| 410 | // DEVCB_NULL, /* callback for cursor state changes */ |
| 411 | // DEVCB_NULL, /* HSYNC callback */ |
| 412 | // DEVCB_NULL, /* VSYNC callback */ |
| 413 | // NULL /* update address callback */ |
| 414 | //}; |
| 415 | |
| 416 | |
| 417 | /************************ |
| 418 | * PPI's Interface * |
| 419 | ************************/ |
| 420 | |
| 421 | //static I8255_INTERFACE (ppi8255_intf_0) |
| 422 | //{ |
| 423 | // /* (port) Mode X - description */ |
| 424 | // DEVCB_UNMAPPED, /* Port A read */ |
| 425 | // DEVCB_UNMAPPED, /* Port A write */ |
| 426 | // DEVCB_UNMAPPED, /* Port B read */ |
| 427 | // DEVCB_UNMAPPED, /* Port B write */ |
| 428 | // DEVCB_UNMAPPED, /* Port C read */ |
| 429 | // DEVCB_UNMAPPED /* Port C write */ |
| 430 | //}; |
| 431 | |
| 432 | //static I8255_INTERFACE (ppi8255_intf_1) |
| 433 | //{ |
| 434 | // /* (port) Mode X - description */ |
| 435 | // DEVCB_UNMAPPED, /* Port A read */ |
| 436 | // DEVCB_UNMAPPED, /* Port A write */ |
| 437 | // DEVCB_UNMAPPED, /* Port B read */ |
| 438 | // DEVCB_UNMAPPED, /* Port B write */ |
| 439 | // DEVCB_UNMAPPED, /* Port C read */ |
| 440 | // DEVCB_UNMAPPED /* Port C write */ |
| 441 | //}; |
| 442 | |
| 443 | /************************** |
| 444 | * Machine Drivers * |
| 445 | **************************/ |
| 446 | |
| 447 | static MACHINE_CONFIG_START( supercrd, supercrd_state ) |
| 448 | /* basic machine hardware */ |
| 449 | MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/8) /* 2MHz, guess */ |
| 450 | MCFG_CPU_PROGRAM_MAP(supercrd_map) |
| 451 | |
| 452 | // MCFG_NVRAM_ADD_0FILL("nvram") |
| 453 | |
| 454 | // MCFG_I8255_ADD( "ppi8255_0", ppi8255_intf_0 ) |
| 455 | // MCFG_I8255_ADD( "ppi8255_1", ppi8255_intf_1 ) |
| 456 | |
| 457 | /* video hardware */ |
| 458 | |
| 459 | MCFG_SCREEN_ADD("screen", RASTER) |
| 460 | MCFG_SCREEN_REFRESH_RATE(60) |
| 461 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 462 | MCFG_SCREEN_SIZE((124+1)*4, (30+1)*8) /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) */ |
| 463 | MCFG_SCREEN_VISIBLE_AREA(0*4, 96*4-1, 0*8, 29*8-1) /* Taken from MC6845 init, registers 01 & 06 */ |
| 464 | MCFG_SCREEN_UPDATE_DRIVER(supercrd_state, screen_update_supercrd) |
| 465 | |
| 466 | MCFG_GFXDECODE(supercrd) |
| 467 | |
| 468 | MCFG_PALETTE_LENGTH(0x200) |
| 469 | MCFG_PALETTE_INIT_OVERRIDE(supercrd_state, supercrd) |
| 470 | MCFG_VIDEO_START_OVERRIDE(supercrd_state, supercrd) |
| 471 | |
| 472 | // MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf) |
| 473 | |
| 474 | /* sound hardware */ |
| 475 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 476 | |
| 477 | // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 478 | MACHINE_CONFIG_END |
| 479 | |
| 480 | |
| 481 | /************************* |
| 482 | * Rom Load * |
| 483 | *************************/ |
| 484 | |
| 485 | ROM_START( supercrd ) |
| 486 | ROM_REGION( 0x18000, "maincpu", 0 ) |
| 487 | ROM_LOAD( "supca_417_ce1.ic37", 0x00000, 0x10000, CRC(b67f7d38) SHA1(eaf8f24d476185d4744858afcbf0005362f49cab) ) // wrong |
| 488 | ROM_LOAD( "supca_417_ce2.ic51", 0x10000, 0x08000, CRC(36415f73) SHA1(9881b88991f034d79260502289432a7318aa1647) ) // wrong |
| 489 | ROM_IGNORE( 0x8000) |
| 490 | |
| 491 | // ROM_LOAD( "supca_417_ce1.ic37", 0x0000, 0x8000, CRC(b67f7d38) SHA1(eaf8f24d476185d4744858afcbf0005362f49cab) ) |
| 492 | // ROM_CONTINUE( 0x0000, 0x8000) |
| 493 | // ROM_LOAD( "supca_417_ce2.ic51", 0x8000, 0x8000, CRC(36415f73) SHA1(9881b88991f034d79260502289432a7318aa1647) ) |
| 494 | // ROM_IGNORE( 0x8000) |
| 495 | |
| 496 | ROM_REGION( 0x20000, "gfxtemp", 0 ) |
| 497 | ROM_LOAD( "supca_410_zg2.ic11", 0x00000, 0x10000, CRC(a4646dc6) SHA1(638ad334bb4f1430381474ddfaa1029cb4d13916) ) |
| 498 | ROM_LOAD( "supca_410_zg1.ic10", 0x10000, 0x10000, CRC(d3d9ae13) SHA1(4825677bbab2b77ce5aa6500c55a61874932b319) ) |
| 499 | |
| 500 | ROM_REGION( 0x10000, "gfx1", 0 ) |
| 501 | ROM_COPY( "gfxtemp", 0x08000, 0x0000, 0x8000 ) // ok |
| 502 | ROM_COPY( "gfxtemp", 0x18000, 0x8000, 0x8000 ) // ok |
| 503 | |
| 504 | ROM_REGION( 0x0800, "proms", 0 ) |
| 505 | ROM_LOAD( "82s147_bad", 0x0000, 0x0200, CRC(8a220b4b) SHA1(4ce4f1e13526e0598a87eee731295e925c2e7d3f) ) // dump attempt #1 |
| 506 | ROM_LOAD( "82s147_bad_1", 0x0200, 0x0200, CRC(306be196) SHA1(531d876cd48984b5b167ebafd6e61ea66e3e60b2) ) // dump attempt #2 |
| 507 | ROM_LOAD( "82s147_bad_2", 0x0400, 0x0200, CRC(39cb5cf4) SHA1(2eb5d6de673bafdfcb8811d0355197864c2f7ee8) ) // dump attempt #3 |
| 508 | ROM_LOAD( "tbp24s10n.ic6", 0x0600, 0x0200, CRC(6f9c6934) SHA1(1f424f8cf5755a0e5feb4724f3282308c0774f1f) ) // other bp... |
| 509 | ROM_END |
| 510 | |
| 511 | |
| 512 | |
| 513 | /* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ |
| 514 | GAME( 1992, supercrd, 0, supercrd, supercrd, driver_device, 0, ROT0, "Fun World", "Super Card (encrypted)", GAME_NOT_WORKING ) |