trunk/src/mame/drivers/magicard.c
| r30898 | r30899 | |
| 187 | 187 | m_scc68070_dma_ch2_regs(*this, "scc_dma2_regs"), |
| 188 | 188 | m_scc68070_mmu_regs(*this, "scc_mmu_regs"), |
| 189 | 189 | m_maincpu(*this, "maincpu"), |
| 190 | m_screen(*this, "screen"), |
| 190 | 191 | m_palette(*this, "palette") { } |
| 191 | 192 | |
| 192 | 193 | required_shared_ptr<UINT16> m_magicram; |
| r30898 | r30899 | |
| 224 | 225 | UINT32 screen_update_magicard(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 225 | 226 | INTERRUPT_GEN_MEMBER(magicard_irq); |
| 226 | 227 | required_device<cpu_device> m_maincpu; |
| 228 | required_device<screen_device> m_screen; |
| 227 | 229 | required_device<palette_device> m_palette; |
| 228 | 230 | }; |
| 229 | 231 | |
| r30898 | r30899 | |
| 503 | 505 | { |
| 504 | 506 | switch(offset) |
| 505 | 507 | { |
| 506 | | // case 0/2: |
| 507 | | // return machine().rand(); //TODO |
| 508 | case 0/2: |
| 509 | { |
| 510 | UINT8 vdisp; |
| 511 | vdisp = m_screen->vpos() < 256; |
| 512 | |
| 513 | return (m_pcab_vregs[offset] & 0xff7f) | vdisp<<7; //TODO |
| 514 | } |
| 508 | 515 | } |
| 509 | 516 | |
| 510 | 517 | //printf("[%04x]\n",offset*2); |
| r30898 | r30899 | |
| 651 | 658 | |
| 652 | 659 | static ADDRESS_MAP_START( magicard_mem, AS_PROGRAM, 16, magicard_state ) |
| 653 | 660 | // ADDRESS_MAP_GLOBAL_MASK(0x1fffff) |
| 654 | | AM_RANGE(0x00000000, 0x0017ffff) AM_MIRROR(0x7fe00000) AM_RAM AM_SHARE("magicram") /*only 0-7ffff accessed in Magic Card*/ |
| 661 | AM_RANGE(0x00000000, 0x001ffbff) AM_MIRROR(0x7fe00000) AM_RAM AM_SHARE("magicram") /*only 0-7ffff accessed in Magic Card*/ |
| 655 | 662 | AM_RANGE(0x00180000, 0x001ffbff) AM_MIRROR(0x7fe00000) AM_RAM AM_REGION("maincpu", 0) |
| 656 | 663 | /* 001ffc00-001ffdff System I/O */ |
| 657 | 664 | AM_RANGE(0x001ffc00, 0x001ffc01) AM_MIRROR(0x7fe00000) AM_READ(test_r) |
| r30898 | r30899 | |
| 717 | 724 | MCFG_CPU_VBLANK_INT_DRIVER("screen", magicard_state, magicard_irq) /* no interrupts? (it erases the vectors..) */ |
| 718 | 725 | |
| 719 | 726 | MCFG_SCREEN_ADD("screen", RASTER) |
| 720 | | MCFG_SCREEN_REFRESH_RATE(60) |
| 727 | MCFG_SCREEN_REFRESH_RATE(50) |
| 721 | 728 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) |
| 722 | 729 | MCFG_SCREEN_SIZE(400, 300) |
| 723 | 730 | MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 256-1) //dynamic resolution,TODO |