trunk/src/mame/drivers/deco_mlc.c
| r21943 | r21944 | |
| 88 | 88 | it is barely used by the game (only checked at startup). See decoprot.c |
| 89 | 89 | |
| 90 | 90 | Driver todo: |
| 91 | | stadhr96 seems to require raster IRQ video update support. |
| 91 | stadhr96 - protection? issues (or 156 co-processor? or timing?) |
| 92 | avengrgs - doesn't generate enough line interrupts? |
| 92 | 93 | ddream95 seems to have a dual screen mode(??) |
| 94 | hoops** - crash entering test mode (regression from 0.113 era?) |
| 93 | 95 | |
| 94 | 96 | Driver by Bryan McPhail, bmcphail@tendril.co.uk, thank you to Avedis and The Guru. |
| 95 | 97 | |
| r21943 | r21944 | |
| 115 | 117 | return machine().rand(); //0xffffffff; |
| 116 | 118 | } |
| 117 | 119 | |
| 118 | | READ32_MEMBER(deco_mlc_state::test3_r) |
| 120 | READ32_MEMBER(deco_mlc_state::mlc_440000_r) |
| 119 | 121 | { |
| 122 | return 0xffffffff; |
| 123 | } |
| 124 | |
| 125 | READ32_MEMBER(deco_mlc_state::mlc_440004_r) |
| 126 | { |
| 127 | return 0xffffffff; |
| 128 | } |
| 129 | |
| 130 | |
| 131 | READ32_MEMBER(deco_mlc_state::mlc_440008_r) |
| 132 | { |
| 133 | return 0xffffffff; |
| 134 | } |
| 135 | |
| 136 | READ32_MEMBER(deco_mlc_state::mlc_44001c_r) |
| 137 | { |
| 120 | 138 | /* |
| 121 | 139 | test3 7 - vbl loop on 0x10 0000 at end of IRQ |
| 122 | | |
| 140 | avengrgs tests other bits too |
| 123 | 141 | */ |
| 124 | 142 | //if (offset==0) |
| 125 | 143 | // return machine().rand()|(machine().rand()<<16); |
| 126 | 144 | // logerror("%08x: Test3_r %d\n",space.device().safe_pc(),offset); |
| 145 | // return 0x00100000; |
| 127 | 146 | return 0xffffffff; |
| 128 | 147 | } |
| 129 | 148 | |
| 149 | WRITE32_MEMBER(deco_mlc_state::mlc_44001c_w) |
| 150 | { |
| 151 | |
| 152 | } |
| 153 | |
| 154 | READ32_MEMBER(deco_mlc_state::mlc_200070_r) |
| 155 | { |
| 156 | m_vbl_i ^=0xffffffff; |
| 157 | //logerror("vbl r %08x\n", space.device().safe_pc()); |
| 158 | // Todo: Vblank probably in $10 |
| 159 | return m_vbl_i; |
| 160 | } |
| 161 | |
| 162 | READ32_MEMBER(deco_mlc_state::mlc_200000_r) |
| 163 | { |
| 164 | return 0xffffffff; |
| 165 | } |
| 166 | |
| 167 | READ32_MEMBER(deco_mlc_state::mlc_200004_r) |
| 168 | { |
| 169 | return 0xffffffff; |
| 170 | } |
| 171 | |
| 172 | READ32_MEMBER(deco_mlc_state::mlc_20007c_r) |
| 173 | { |
| 174 | return 0xffffffff; |
| 175 | } |
| 176 | |
| 177 | READ32_MEMBER(deco_mlc_state::mlc_scanline_r) |
| 178 | { |
| 179 | // logerror("read scanline counter (%d)\n", machine().primary_screen->vpos()); |
| 180 | return machine().primary_screen->vpos(); |
| 181 | } |
| 182 | |
| 183 | |
| 130 | 184 | WRITE32_MEMBER(deco_mlc_state::avengrs_eprom_w) |
| 131 | 185 | { |
| 132 | 186 | device_t *device = machine().device("eeprom"); |
| r21943 | r21944 | |
| 153 | 207 | palette_set_color_rgb(machine(),offset,pal5bit(m_generic_paletteram_32[offset] >> 0),pal5bit(m_generic_paletteram_32[offset] >> 5),pal5bit(m_generic_paletteram_32[offset] >> 10)); |
| 154 | 208 | } |
| 155 | 209 | |
| 156 | | READ32_MEMBER(deco_mlc_state::decomlc_vbl_r) |
| 157 | | { |
| 158 | | m_vbl_i ^=0xffffffff; |
| 159 | | //logerror("vbl r %08x\n", space.device().safe_pc()); |
| 160 | | // Todo: Vblank probably in $10 |
| 161 | | return m_vbl_i; |
| 162 | | } |
| 163 | 210 | |
| 164 | | READ32_MEMBER(deco_mlc_state::mlc_scanline_r) |
| 165 | | { |
| 166 | | // logerror("read scanline counter (%d)\n", machine().primary_screen->vpos()); |
| 167 | | return machine().primary_screen->vpos(); |
| 168 | | } |
| 169 | | |
| 170 | 211 | TIMER_DEVICE_CALLBACK_MEMBER(deco_mlc_state::interrupt_gen) |
| 171 | 212 | { |
| 172 | 213 | // logerror("hit scanline IRQ %d (%08x)\n", machine.primary_screen->vpos(), info.i); |
| r21943 | r21944 | |
| 271 | 312 | static ADDRESS_MAP_START( decomlc_map, AS_PROGRAM, 32, deco_mlc_state ) |
| 272 | 313 | AM_RANGE(0x0000000, 0x00fffff) AM_ROM AM_MIRROR(0xff000000) |
| 273 | 314 | AM_RANGE(0x0100000, 0x011ffff) AM_RAM AM_SHARE("mlc_ram") AM_MIRROR(0xff000000) |
| 274 | | AM_RANGE(0x0200000, 0x020000f) AM_READNOP AM_MIRROR(0xff000000)/* IRQ control? */ |
| 275 | | AM_RANGE(0x0200070, 0x0200073) AM_READ(decomlc_vbl_r) AM_MIRROR(0xff000000) |
| 315 | AM_RANGE(0x0200000, 0x0200003) AM_READ(mlc_200000_r) AM_MIRROR(0xff000000) |
| 316 | AM_RANGE(0x0200004, 0x0200007) AM_READ(mlc_200004_r) AM_MIRROR(0xff000000) |
| 317 | AM_RANGE(0x0200070, 0x0200073) AM_READ(mlc_200070_r) AM_MIRROR(0xff000000) |
| 276 | 318 | AM_RANGE(0x0200074, 0x0200077) AM_READ(mlc_scanline_r) AM_MIRROR(0xff000000) |
| 277 | | AM_RANGE(0x0200078, 0x020007f) AM_READ(test2_r) AM_MIRROR(0xff000000) |
| 319 | AM_RANGE(0x020007c, 0x020007f) AM_READ(mlc_20007c_r) AM_MIRROR(0xff000000) |
| 278 | 320 | AM_RANGE(0x0200000, 0x020007f) AM_WRITE(mlc_irq_w) AM_SHARE("irq_ram") AM_MIRROR(0xff000000) |
| 279 | 321 | AM_RANGE(0x0200080, 0x02000ff) AM_RAM AM_SHARE("mlc_clip_ram") AM_MIRROR(0xff000000) |
| 280 | 322 | AM_RANGE(0x0204000, 0x0206fff) AM_READWRITE( mlc_spriteram_r, mlc_spriteram_w ) AM_MIRROR(0xff000000) |
| 281 | 323 | AM_RANGE(0x0280000, 0x029ffff) AM_RAM AM_SHARE("mlc_vram") AM_MIRROR(0xff000000) |
| 282 | 324 | AM_RANGE(0x0300000, 0x0307fff) AM_RAM_WRITE(avengrs_palette_w) AM_SHARE("paletteram") AM_MIRROR(0xff000000) |
| 283 | 325 | AM_RANGE(0x0400000, 0x0400003) AM_READ_PORT("INPUTS") AM_MIRROR(0xff000000) |
| 284 | | AM_RANGE(0x0440000, 0x044001f) AM_READ(test3_r) AM_MIRROR(0xff000000) |
| 285 | | AM_RANGE(0x044001c, 0x044001f) AM_WRITENOP AM_MIRROR(0xff000000) |
| 326 | AM_RANGE(0x0440000, 0x0440003) AM_READ(mlc_440000_r) AM_MIRROR(0xff000000) |
| 327 | AM_RANGE(0x0440004, 0x0440007) AM_READ(mlc_440004_r) AM_MIRROR(0xff000000) |
| 328 | AM_RANGE(0x0440008, 0x044000b) AM_READ(mlc_440008_r) AM_MIRROR(0xff000000) |
| 329 | AM_RANGE(0x044001c, 0x044001f) AM_READWRITE(mlc_44001c_r, mlc_44001c_w) AM_MIRROR(0xff000000) |
| 286 | 330 | AM_RANGE(0x0500000, 0x0500003) AM_WRITE(avengrs_eprom_w) AM_MIRROR(0xff000000) |
| 287 | 331 | AM_RANGE(0x0600000, 0x0600007) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0xff000000) AM_MIRROR(0xff000000) |
| 288 | 332 | AM_RANGE(0x070f000, 0x070ffff) AM_READWRITE(stadhr96_prot_146_r, stadhr96_prot_146_w) AM_MIRROR(0xff000000) |