trunk/src/mame/drivers/adp.c
| r30748 | r30749 | |
| 158 | 158 | #include "video/h63484.h" |
| 159 | 159 | #include "machine/microtch.h" |
| 160 | 160 | #include "machine/mc68681.h" |
| 161 | #include "machine/msm6242.h" |
| 162 | #include "machine/nvram.h" |
| 161 | 163 | |
| 162 | 164 | class adp_state : public driver_device |
| 163 | 165 | { |
| 164 | 166 | public: |
| 165 | 167 | adp_state(const machine_config &mconfig, device_type type, const char *tag) |
| 166 | 168 | : driver_device(mconfig, type, tag), |
| 167 | | m_h63484(*this, "h63484"), |
| 168 | 169 | m_microtouch(*this, "microtouch"), |
| 169 | 170 | m_maincpu(*this, "maincpu"), |
| 170 | 171 | m_duart(*this, "duart68681"), |
| 171 | | m_screen(*this, "screen"), |
| 172 | | m_palette(*this, "palette") |
| 172 | m_palette(*this, "palette"), |
| 173 | m_in0(*this, "IN0") |
| 173 | 174 | { } |
| 174 | 175 | |
| 175 | | required_device<h63484_device> m_h63484; |
| 176 | 176 | required_device<microtouch_device> m_microtouch; |
| 177 | 177 | required_device<cpu_device> m_maincpu; |
| 178 | 178 | required_device<mc68681_device> m_duart; |
| 179 | | required_device<screen_device> m_screen; |
| 180 | 179 | required_device<palette_device> m_palette; |
| 180 | required_ioport m_in0; |
| 181 | 181 | |
| 182 | | UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 183 | | |
| 184 | 182 | /* misc */ |
| 185 | 183 | UINT8 m_mux_data; |
| 186 | | UINT8 m_register_active; |
| 187 | 184 | struct { int r,g,b,offs,offs_internal; } m_pal; |
| 188 | 185 | |
| 189 | 186 | /* devices */ |
| 190 | | DECLARE_READ16_MEMBER(test_r); |
| 191 | | DECLARE_WRITE16_MEMBER(wh2_w); |
| 187 | DECLARE_READ16_MEMBER(input_r); |
| 188 | DECLARE_WRITE16_MEMBER(input_w); |
| 192 | 189 | DECLARE_WRITE8_MEMBER(ramdac_io_w); |
| 193 | | DECLARE_READ8_MEMBER(t2_r); |
| 194 | 190 | DECLARE_MACHINE_START(skattv); |
| 195 | 191 | DECLARE_MACHINE_RESET(skattv); |
| 196 | 192 | DECLARE_PALETTE_INIT(adp); |
| 193 | DECLARE_PALETTE_INIT(fstation); |
| 197 | 194 | DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); |
| 198 | | UINT32 screen_update_adp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 199 | | H63484_DISPLAY_PIXELS_MEMBER( acrtc_display_pixels ); |
| 200 | 195 | //INTERRUPT_GEN_MEMBER(adp_int); |
| 201 | 196 | }; |
| 202 | 197 | |
| 203 | 198 | |
| 204 | | H63484_DISPLAY_PIXELS_MEMBER( adp_state::acrtc_display_pixels ) |
| 205 | | { |
| 206 | | if (cliprect.contains(x, y)) |
| 207 | | bitmap.pix16(y, x) = data; |
| 208 | | } |
| 209 | 199 | |
| 210 | | UINT32 adp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 211 | | { |
| 212 | | bitmap.fill(0, cliprect); |
| 213 | | |
| 214 | | /* graphics */ |
| 215 | | m_h63484->update_screen(screen, bitmap, cliprect); |
| 216 | | |
| 217 | | return 0; |
| 218 | | } |
| 219 | | |
| 220 | | |
| 221 | | #if 0 |
| 222 | | UINT32 adp_state::screen_update_adp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 223 | | { |
| 224 | | m_h63484->update_screen(bitmap, cliprect); |
| 225 | | |
| 226 | | #if 0 |
| 227 | | int x, y, b, src; |
| 228 | | |
| 229 | | b = ((m_hd63484->regs_r(0xcc/2, 0xffff) & 0x000f) << 16) + m_hd63484->regs_r(0xce/2, 0xffff); |
| 230 | | |
| 231 | | for (y = 0;y < 280;y++) |
| 232 | | { |
| 233 | | for (x = 0 ; x < (m_hd63484->regs_r(0xca/2, 0xffff) & 0x0fff) * 4 ; x += 4) |
| 234 | | { |
| 235 | | b &= (HD63484_RAM_SIZE - 1); |
| 236 | | src = m_hd63484->ram_r(b, 0xffff); |
| 237 | | bitmap.pix16(y, x ) = ((src & 0x000f) >> 0) << 0; |
| 238 | | bitmap.pix16(y, x + 1) = ((src & 0x00f0) >> 4) << 0; |
| 239 | | bitmap.pix16(y, x + 2) = ((src & 0x0f00) >> 8) << 0; |
| 240 | | bitmap.pix16(y, x + 3) = ((src & 0xf000) >> 12) << 0; |
| 241 | | b++; |
| 242 | | } |
| 243 | | } |
| 244 | | if (!machine().input().code_pressed(KEYCODE_O)) // debug: toggle window |
| 245 | | if ((m_hd63484->regs_r(0x06/2, 0xffff) & 0x0300) == 0x0300) |
| 246 | | { |
| 247 | | int sy = (m_hd63484->regs_r(0x94/2, 0xffff) & 0x0fff) - (m_hd63484->regs_r(0x88/2, 0xffff) >> 8); |
| 248 | | int h = m_hd63484->regs_r(0x96/2, 0xffff) & 0x0fff; |
| 249 | | int sx = ((m_hd63484->regs_r(0x92/2, 0xffff) >> 8) - (m_hd63484->regs_r(0x84/2, 0xffff) >> 8)) * 2 * 2; |
| 250 | | int w = (m_hd63484->regs_r(0x92/2, 0xffff) & 0xff) * 2; |
| 251 | | if (sx < 0) sx = 0; // not sure about this (shangha2 title screen) |
| 252 | | |
| 253 | | b = (((m_hd63484->regs_r(0xdc/2, 0xffff) & 0x000f) << 16) + m_hd63484->regs_r(0xde/2, 0xffff)); |
| 254 | | |
| 255 | | for (y = sy ; y <= sy + h && y < 280 ; y++) |
| 256 | | { |
| 257 | | for (x = 0 ; x < (m_hd63484->regs_r(0xca/2, 0xffff) & 0x0fff) * 4 ; x += 4) |
| 258 | | { |
| 259 | | b &= (HD63484_RAM_SIZE - 1); |
| 260 | | src = m_hd63484->ram_r(b, 0xffff); |
| 261 | | |
| 262 | | if (x <= w && x + sx >= 0 && x + sx < (m_hd63484->regs_r(0xca/2, 0xffff) & 0x0fff) * 4) |
| 263 | | { |
| 264 | | bitmap.pix16(y, x + sx ) = ((src & 0x000f) >> 0) << 0; |
| 265 | | bitmap.pix16(y, x + sx + 1) = ((src & 0x00f0) >> 4) << 0; |
| 266 | | bitmap.pix16(y, x + sx + 2) = ((src & 0x0f00) >> 8) << 0; |
| 267 | | bitmap.pix16(y, x + sx + 3) = ((src & 0xf000) >> 12) << 0; |
| 268 | | } |
| 269 | | b++; |
| 270 | | } |
| 271 | | } |
| 272 | | } |
| 273 | | #endif |
| 274 | | |
| 275 | | return 0; |
| 276 | | } |
| 277 | | #endif |
| 278 | | |
| 279 | 200 | /*************************************************************************** |
| 280 | 201 | |
| 281 | 202 | 68681 DUART <-> Microtouch touch screen controller communication |
| r30748 | r30749 | |
| 290 | 211 | MACHINE_START_MEMBER(adp_state,skattv) |
| 291 | 212 | { |
| 292 | 213 | save_item(NAME(m_mux_data)); |
| 293 | | save_item(NAME(m_register_active)); |
| 294 | | |
| 295 | | #if 0 |
| 296 | | /* |
| 297 | | ACRTC memory: |
| 298 | | |
| 299 | | 00000-3ffff = RAM |
| 300 | | 40000-7ffff = ROM |
| 301 | | 80000-bffff = unused |
| 302 | | c0000-fffff = unused |
| 303 | | */ |
| 304 | | |
| 305 | | // hack to handle acrt rom |
| 306 | | { |
| 307 | | UINT16 *rom = (UINT16*)memregion("gfx1")->base(); |
| 308 | | int i; |
| 309 | | |
| 310 | | for(i = 0; i < 0x40000/2; ++i) |
| 311 | | { |
| 312 | | m_hd63484->ram_w(i + 0x00000/2, rom[i], 0xffff); |
| 313 | | m_hd63484->ram_w(i + 0x40000/2, rom[i], 0xffff); |
| 314 | | m_hd63484->ram_w(i + 0x80000/2, rom[i], 0xffff); |
| 315 | | m_hd63484->ram_w(i + 0xc0000/2, rom[i], 0xffff); |
| 316 | | } |
| 317 | | } |
| 318 | | #endif |
| 319 | 214 | } |
| 320 | 215 | |
| 321 | 216 | MACHINE_RESET_MEMBER(adp_state,skattv) |
| 322 | 217 | { |
| 323 | 218 | m_mux_data = 0; |
| 324 | | m_register_active = 0; |
| 325 | 219 | } |
| 326 | 220 | |
| 327 | 221 | PALETTE_INIT_MEMBER(adp_state,adp) |
| r30748 | r30749 | |
| 332 | 226 | { |
| 333 | 227 | int bit0, bit1, bit2, r, g, b; |
| 334 | 228 | |
| 335 | | |
| 336 | 229 | // red component |
| 337 | 230 | bit0 = (i >> 0) & 0x01; |
| 338 | 231 | bit1 = (i >> 3) & 0x01; |
| r30748 | r30749 | |
| 353 | 246 | } |
| 354 | 247 | } |
| 355 | 248 | |
| 356 | | READ16_MEMBER(adp_state::test_r) |
| 249 | PALETTE_INIT_MEMBER(adp_state,fstation) |
| 357 | 250 | { |
| 358 | | int value = 0xffff; |
| 359 | | |
| 360 | | switch (m_mux_data) |
| 361 | | { |
| 362 | | case 0x00: value = ioport("x0")->read(); break; |
| 363 | | case 0x01: value = ioport("1P_UP")->read(); break; |
| 364 | | case 0x02: value = ioport("x2")->read(); break; |
| 365 | | case 0x03: value = ioport("x1")->read(); break; |
| 366 | | case 0x04: value = ioport("1P_RIGHT")->read(); break; |
| 367 | | case 0x05: value = ioport("x5")->read(); break; |
| 368 | | case 0x06: value = ioport("1P_B1")->read(); break; |
| 369 | | case 0x07: value = ioport("1P_DOWN")->read(); break; |
| 370 | | case 0x08: value = ioport("x10")->read(); break; |
| 371 | | case 0x09: value = ioport("x9")->read(); break; |
| 372 | | case 0x0a: value = ioport("1P_LEFT")->read(); break; |
| 373 | | case 0x0b: value = ioport("x11")->read(); break; |
| 374 | | case 0x0c: value = ioport("x12")->read(); break; |
| 375 | | case 0x0d: value = ioport("x13")->read(); break; |
| 376 | | case 0x0e: value = ioport("1P_START")->read(); break; |
| 377 | | case 0x0f: value = ioport("1P_COIN")->read(); break; |
| 378 | | } |
| 379 | | |
| 380 | | m_mux_data++; |
| 381 | | m_mux_data &= 0xf; |
| 382 | | /* |
| 383 | | switch (machine().rand() & 3) |
| 384 | | { |
| 385 | | case 0: |
| 386 | | return 0; |
| 387 | | case 1: |
| 388 | | return 0xffff; |
| 389 | | default: |
| 390 | | return machine().rand() & 0xffff; |
| 391 | | } |
| 392 | | */ |
| 393 | | return value | (machine().rand() & 0x0000); |
| 251 | for (int i = 0; i < palette.entries(); i++) |
| 252 | palette.set_pen_color(i, rgb_t(pal3bit(i>>5), pal3bit(i>>2), pal2bit(i>>0))); |
| 394 | 253 | } |
| 395 | 254 | |
| 396 | | /*???*/ |
| 397 | | WRITE16_MEMBER(adp_state::wh2_w) |
| 255 | READ16_MEMBER(adp_state::input_r) |
| 398 | 256 | { |
| 399 | | m_register_active = data; |
| 400 | | } |
| 257 | UINT16 data = 0xffff; |
| 401 | 258 | |
| 402 | | READ8_MEMBER(adp_state::t2_r) |
| 403 | | { |
| 404 | | UINT8 res; |
| 405 | | int h,w; |
| 406 | | res = 0; |
| 407 | | h = m_screen->height(); |
| 408 | | w = m_screen->width(); |
| 259 | data &= ~(BIT(m_in0->read(), m_mux_data) ? 0x0000 : 0x0004); |
| 409 | 260 | |
| 410 | | // popmessage("%d %d",h,w); |
| 261 | return data; |
| 262 | } |
| 411 | 263 | |
| 412 | | if (m_screen->hpos() > h) |
| 413 | | res|= 0x20; //hblank |
| 414 | | |
| 415 | | if (m_screen->vpos() > w) |
| 416 | | res|= 0x40; //vblank |
| 417 | | |
| 418 | | return res; |
| 264 | WRITE16_MEMBER(adp_state::input_w) |
| 265 | { |
| 266 | m_mux_data++; |
| 267 | m_mux_data &= 0x0f; |
| 419 | 268 | } |
| 420 | 269 | |
| 421 | 270 | static ADDRESS_MAP_START( skattv_mem, AS_PROGRAM, 16, adp_state ) |
| 422 | 271 | AM_RANGE(0x000000, 0x0fffff) AM_ROM |
| 423 | 272 | AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE("h63484", h63484_device, status_r, address_w) |
| 424 | 273 | AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE("h63484", h63484_device, data_r, data_w) |
| 425 | | AM_RANGE(0x800100, 0x800101) AM_READWRITE(test_r,wh2_w) //related to input |
| 274 | AM_RANGE(0x800100, 0x800101) AM_READWRITE(input_r, input_w) |
| 426 | 275 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, address_data_w, 0x00ff) //18b too |
| 427 | 276 | AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8("duart68681", mc68681_device, read, write, 0xff ) |
| 428 | | AM_RANGE(0xffc000, 0xffffff) AM_RAM |
| 277 | AM_RANGE(0xffc000, 0xffffff) AM_RAM AM_SHARE("nvram") |
| 429 | 278 | ADDRESS_MAP_END |
| 430 | 279 | |
| 431 | 280 | static ADDRESS_MAP_START( quickjac_mem, AS_PROGRAM, 16, adp_state ) |
| 432 | 281 | AM_RANGE(0x000000, 0x01ffff) AM_ROM |
| 433 | | // AM_RANGE(0x400000, 0x40001f) ? |
| 282 | AM_RANGE(0x400000, 0x40001f) AM_DEVREADWRITE8("rtc",msm6242_device, read, write, 0x00ff) |
| 434 | 283 | AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE("h63484", h63484_device, status_r, address_w) // bad |
| 435 | 284 | AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE("h63484", h63484_device, data_r, data_w) // bad |
| 436 | 285 | AM_RANGE(0x800100, 0x800101) AM_READ_PORT("IN0") |
| 437 | 286 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, address_data_w, 0x00ff) //18b too |
| 438 | 287 | AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8("duart68681", mc68681_device, read, write, 0xff ) |
| 439 | | AM_RANGE(0xff0000, 0xffffff) AM_RAM |
| 288 | AM_RANGE(0xff0000, 0xffffff) AM_RAM AM_SHARE("nvram") |
| 440 | 289 | ADDRESS_MAP_END |
| 441 | 290 | |
| 442 | 291 | static ADDRESS_MAP_START( backgamn_mem, AS_PROGRAM, 16, adp_state ) |
| r30748 | r30749 | |
| 444 | 293 | AM_RANGE(0x100000, 0x10003f) AM_RAM |
| 445 | 294 | AM_RANGE(0x200000, 0x20003f) AM_RAM |
| 446 | 295 | AM_RANGE(0x400000, 0x40001f) AM_DEVREADWRITE8("duart68681", mc68681_device, read, write, 0xff ) |
| 447 | | AM_RANGE(0x500000, 0x503fff) AM_RAM //work RAM |
| 296 | AM_RANGE(0x500000, 0x503fff) AM_RAM AM_SHARE("nvram") //work RAM |
| 448 | 297 | AM_RANGE(0x600006, 0x600007) AM_NOP //(r) is discarded (watchdog?) |
| 449 | 298 | ADDRESS_MAP_END |
| 450 | 299 | |
| r30748 | r30749 | |
| 485 | 334 | |
| 486 | 335 | static ADDRESS_MAP_START( funland_mem, AS_PROGRAM, 16, adp_state ) |
| 487 | 336 | AM_RANGE(0x000000, 0x0fffff) AM_ROM |
| 337 | AM_RANGE(0x400000, 0x40001f) AM_DEVREADWRITE8("rtc",msm6242_device, read, write, 0x00ff) |
| 488 | 338 | AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE("h63484", h63484_device, status_r, address_w) |
| 489 | 339 | AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE("h63484", h63484_device, data_r, data_w) |
| 490 | 340 | AM_RANGE(0x800088, 0x80008d) AM_WRITE8(ramdac_io_w, 0x00ff) |
| 491 | | AM_RANGE(0x800100, 0x800101) AM_RAM //??? |
| 341 | AM_RANGE(0x800100, 0x800101) AM_READ_PORT("IN0") |
| 492 | 342 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, address_data_w, 0x00ff) //18b too |
| 493 | 343 | AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8("duart68681", mc68681_device, read, write, 0xff ) |
| 494 | | AM_RANGE(0xfc0000, 0xffffff) AM_RAM |
| 344 | AM_RANGE(0xfc0000, 0xffffff) AM_RAM AM_SHARE("nvram") |
| 495 | 345 | ADDRESS_MAP_END |
| 496 | 346 | |
| 497 | 347 | static ADDRESS_MAP_START( fstation_mem, AS_PROGRAM, 16, adp_state ) |
| r30748 | r30749 | |
| 499 | 349 | //400000-40001f? |
| 500 | 350 | AM_RANGE(0x800080, 0x800081) AM_DEVREADWRITE("h63484", h63484_device, status_r, address_w) |
| 501 | 351 | AM_RANGE(0x800082, 0x800083) AM_DEVREADWRITE("h63484", h63484_device, data_r, data_w) |
| 502 | | AM_RANGE(0x800100, 0x800101) AM_RAM //??? |
| 352 | AM_RANGE(0x800100, 0x800101) AM_READWRITE(input_r, input_w) |
| 503 | 353 | AM_RANGE(0x800140, 0x800143) AM_DEVREADWRITE8("aysnd", ay8910_device, data_r, address_data_w, 0x00ff) //18b too |
| 504 | 354 | AM_RANGE(0x800180, 0x80019f) AM_DEVREADWRITE8("duart68681", mc68681_device, read, write, 0xff ) |
| 505 | | AM_RANGE(0xfc0000, 0xffffff) AM_RAM |
| 355 | AM_RANGE(0xfc0000, 0xffffff) AM_RAM AM_SHARE("nvram") |
| 506 | 356 | ADDRESS_MAP_END |
| 507 | 357 | |
| 508 | 358 | |
| r30748 | r30749 | |
| 546 | 396 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 547 | 397 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 548 | 398 | |
| 549 | | PORT_START("x0") //vblank status? |
| 550 | | PORT_DIPNAME( 0x0004,0x0004, "SW0" ) |
| 551 | | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 399 | PORT_START("IN0") |
| 400 | PORT_DIPNAME( 0x0001,0x0001, "SW0" ) //vblank status? |
| 401 | PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) |
| 552 | 402 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 553 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 554 | | |
| 555 | | PORT_START("x1") |
| 556 | | PORT_DIPNAME( 0x0004,0x0004, "SW1" ) //another up button |
| 403 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| 404 | PORT_DIPNAME( 0x0004,0x0004, "SW2" ) //another up button |
| 557 | 405 | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 558 | 406 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 559 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 560 | | |
| 561 | | PORT_START("x2") |
| 562 | | PORT_DIPNAME( 0x0004,0x0004, "SW2" ) |
| 563 | | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 407 | PORT_DIPNAME( 0x0008,0x0008, "SW3" ) |
| 408 | PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) |
| 564 | 409 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 565 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 566 | | PORT_START("1P_UP") |
| 567 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| 568 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 569 | | PORT_START("1P_B1") |
| 570 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 571 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 572 | | PORT_START("x5") |
| 573 | | PORT_DIPNAME( 0x0004,0x0004, "SW5" ) |
| 574 | | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 410 | PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) |
| 411 | PORT_DIPNAME( 0x0020,0x0020, "SW5" ) |
| 412 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) |
| 575 | 413 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 576 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 577 | | PORT_START("1P_RIGHT") |
| 578 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) |
| 579 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 580 | | PORT_START("1P_DOWN") |
| 581 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| 582 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 583 | | PORT_START("1P_LEFT") |
| 414 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 415 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| 416 | PORT_DIPNAME( 0x0100,0x0100, "SW8" ) |
| 417 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) |
| 418 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 419 | PORT_DIPNAME( 0x0200,0x0200, "SW9" ) //button 2 |
| 420 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) |
| 421 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 422 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) |
| 423 | PORT_DIPNAME( 0x0800,0x0800, "SW11" ) |
| 424 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) |
| 425 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 426 | PORT_DIPNAME( 0x1000,0x1000, "SW12" ) //button 3 |
| 427 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) |
| 428 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 429 | PORT_DIPNAME( 0x2000,0x2000, "SW13" ) |
| 430 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) |
| 431 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 432 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 ) |
| 433 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 434 | INPUT_PORTS_END |
| 435 | |
| 436 | static INPUT_PORTS_START( fstation ) |
| 437 | PORT_START("PA") |
| 438 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 439 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) |
| 440 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 441 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 442 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 443 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_HBLANK("screen") |
| 444 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") |
| 445 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 446 | |
| 447 | PORT_START("DSW1") |
| 448 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 449 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 450 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 451 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 452 | PORT_SERVICE( 0x10, IP_ACTIVE_LOW ) |
| 453 | PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 454 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 455 | PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 456 | |
| 457 | PORT_START("IN0") |
| 458 | PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) |
| 459 | PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| 584 | 460 | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) |
| 585 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 586 | | PORT_START("x9") |
| 587 | | PORT_DIPNAME( 0x0004,0x0004, "SW9" ) |
| 588 | | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 461 | PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) |
| 462 | PORT_DIPNAME( 0x0010,0x0010, "SW4" ) |
| 463 | PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) |
| 589 | 464 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 590 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 591 | | PORT_START("x10") //button 2 |
| 592 | | PORT_DIPNAME( 0x0004,0x0004, "SW10" ) |
| 593 | | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 465 | PORT_DIPNAME( 0x0020,0x0020, "SW5" ) |
| 466 | PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) |
| 594 | 467 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 595 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 596 | | PORT_START("x11") |
| 597 | | PORT_DIPNAME( 0x0004,0x0004, "SW11" ) |
| 598 | | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 468 | PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) |
| 469 | PORT_DIPNAME( 0x0080,0x0080, "SW7" ) |
| 470 | PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) |
| 599 | 471 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 600 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 601 | | PORT_START("x12") //button 3 |
| 602 | | PORT_DIPNAME( 0x0004,0x0004, "SW12" ) |
| 603 | | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 472 | PORT_DIPNAME( 0x0100,0x0100, "SW8" ) |
| 473 | PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) |
| 604 | 474 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 605 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 606 | | PORT_START("x13") |
| 607 | | PORT_DIPNAME( 0x0004,0x0004, "SW13" ) |
| 608 | | PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) |
| 475 | PORT_DIPNAME( 0x0200,0x0200, "SW9" ) |
| 476 | PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) |
| 609 | 477 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 610 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 611 | | PORT_START("1P_START") |
| 612 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 ) |
| 613 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 614 | | PORT_START("1P_COIN") |
| 615 | | PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 616 | | PORT_BIT( 0xfffb, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 478 | PORT_DIPNAME( 0x0400,0x0400, "SW10" ) |
| 479 | PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) |
| 480 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 481 | PORT_DIPNAME( 0x0800,0x0800, "SW11" ) |
| 482 | PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) |
| 483 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 484 | PORT_DIPNAME( 0x1000,0x1000, "SW12" ) |
| 485 | PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) |
| 486 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 487 | PORT_DIPNAME( 0x2000,0x2000, "SW13" ) |
| 488 | PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) |
| 489 | PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) |
| 490 | PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 ) |
| 491 | PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) |
| 617 | 492 | INPUT_PORTS_END |
| 618 | 493 | |
| 619 | 494 | /* |
| r30748 | r30749 | |
| 654 | 529 | |
| 655 | 530 | MCFG_MICROTOUCH_ADD( "microtouch", 9600, DEVWRITELINE("duart68681", mc68681_device, rx_a_w) ) |
| 656 | 531 | |
| 532 | MCFG_NVRAM_ADD_NO_FILL("nvram") |
| 533 | |
| 534 | MCFG_DEVICE_ADD("rtc", MSM6242, XTAL_32_768kHz) |
| 535 | //MCFG_MSM6242_OUT_INT_HANDLER(WRITELINE(adp_state, rtc_irq)) |
| 536 | |
| 657 | 537 | MCFG_SCREEN_ADD("screen", RASTER) |
| 658 | 538 | MCFG_SCREEN_REFRESH_RATE(60) |
| 659 | 539 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) |
| 660 | 540 | MCFG_SCREEN_SIZE(384, 280) |
| 661 | 541 | MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 280-1) |
| 662 | | MCFG_SCREEN_UPDATE_DRIVER(adp_state, screen_update) |
| 542 | MCFG_SCREEN_UPDATE_DEVICE("h63484", h63484_device, update_screen) |
| 663 | 543 | MCFG_SCREEN_PALETTE("palette") |
| 664 | 544 | |
| 665 | 545 | MCFG_PALETTE_ADD("palette", 0x10) |
| r30748 | r30749 | |
| 667 | 547 | MCFG_PALETTE_INIT_OWNER(adp_state,adp) |
| 668 | 548 | |
| 669 | 549 | MCFG_H63484_ADD("h63484", 0, adp_h63484_map) |
| 670 | | MCFG_H63484_DISPLAY_CALLBACK_OWNER(adp_state, acrtc_display_pixels) |
| 671 | 550 | |
| 672 | 551 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 673 | 552 | MCFG_SOUND_ADD("aysnd", AY8910, 3686400/2) |
| r30748 | r30749 | |
| 709 | 588 | static MACHINE_CONFIG_DERIVED( fstation, funland ) |
| 710 | 589 | MCFG_CPU_MODIFY("maincpu") |
| 711 | 590 | MCFG_CPU_PROGRAM_MAP(fstation_mem) |
| 591 | |
| 592 | MCFG_SCREEN_MODIFY("screen") |
| 593 | MCFG_SCREEN_SIZE(640, 480) |
| 594 | MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 595 | |
| 596 | MCFG_PALETTE_MODIFY("palette") |
| 597 | MCFG_PALETTE_INIT_OWNER(adp_state, fstation) |
| 712 | 598 | MACHINE_CONFIG_END |
| 713 | 599 | |
| 714 | 600 | |
| r30748 | r30749 | |
| 810 | 696 | GAME( 1997, fashiong, 0, fashiong, skattv, driver_device, 0, ROT0, "ADP", "Fashion Gambler (set 1)", GAME_NOT_WORKING ) |
| 811 | 697 | GAME( 1997, fashiong2, fashiong, fashiong, skattv, driver_device, 0, ROT0, "ADP", "Fashion Gambler (set 2)", GAME_NOT_WORKING ) |
| 812 | 698 | GAME( 1999, funlddlx, 0, funland, skattv, driver_device, 0, ROT0, "Stella", "Funny Land de Luxe", GAME_NOT_WORKING ) |
| 813 | | GAME( 2000, fstation, 0, fstation, skattv, driver_device, 0, ROT0, "ADP", "Fun Station Spielekoffer 9 Spiele", GAME_NOT_WORKING ) |
| 699 | GAME( 2000, fstation, 0, fstation, fstation, driver_device, 0, ROT0, "ADP", "Fun Station Spielekoffer 9 Spiele", GAME_NOT_WORKING ) |