src/mess/drivers/pasopia.c
| r8466 | r8467 | |
| 46 | 46 | static READ8_HANDLER( vram_r ) |
| 47 | 47 | { |
| 48 | 48 | if(vram_sel) |
| 49 | | return 0xff; |
| 49 | return 0xff; //TODO: investigate on this |
| 50 | 50 | |
| 51 | 51 | return p7_vram[offset]; |
| 52 | 52 | } |
| r8466 | r8467 | |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /* writes always occurs to the RAM banks, even if the ROMs are selected. */ |
| 144 | | static WRITE8_HANDLER( ram_bank1_w ) |
| 144 | static WRITE8_HANDLER( ram_bank_w ) |
| 145 | 145 | { |
| 146 | 146 | UINT8 *cpu = memory_region(space->machine, "maincpu"); |
| 147 | 147 | |
| 148 | 148 | cpu[offset] = data; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | | static WRITE8_HANDLER( ram_bank2_w ) |
| 152 | | { |
| 153 | | UINT8 *cpu = memory_region(space->machine, "maincpu"); |
| 154 | | |
| 155 | | cpu[offset+0x4000] = data; |
| 156 | | } |
| 157 | | |
| 158 | 151 | static ADDRESS_MAP_START(paso7_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 159 | 152 | ADDRESS_MAP_UNMAP_HIGH |
| 160 | | AM_RANGE( 0x0000, 0x3fff ) AM_ROMBANK("bank1") AM_WRITE( ram_bank1_w ) |
| 161 | | AM_RANGE( 0x4000, 0x7fff ) AM_ROMBANK("bank2") AM_WRITE( ram_bank2_w ) |
| 153 | AM_RANGE( 0x0000, 0x7fff ) AM_WRITE( ram_bank_w ) |
| 154 | AM_RANGE( 0x0000, 0x3fff ) AM_ROMBANK("bank1") |
| 155 | AM_RANGE( 0x4000, 0x7fff ) AM_ROMBANK("bank2") |
| 162 | 156 | AM_RANGE( 0x8000, 0xbfff ) AM_READWRITE(vram_r, vram_w ) AM_BASE(&p7_vram) |
| 163 | 157 | AM_RANGE( 0xc000, 0xffff ) AM_RAMBANK("bank4") |
| 164 | 158 | ADDRESS_MAP_END |
| r8466 | r8467 | |
| 281 | 275 | /* ---- --x- sound off */ |
| 282 | 276 | } |
| 283 | 277 | |
| 278 | /* TODO: investigate on these. */ |
| 279 | static READ8_DEVICE_HANDLER( unk_r ) |
| 280 | { |
| 281 | return 0xff;//mame_rand(device->machine); |
| 282 | } |
| 284 | 283 | |
| 285 | 284 | static I8255A_INTERFACE( ppi8255_intf_0 ) |
| 286 | 285 | { |
| 287 | | DEVCB_NULL, /* Port A read */ |
| 286 | DEVCB_HANDLER(unk_r), /* Port A read */ |
| 288 | 287 | DEVCB_HANDLER(crtc_portb_r), /* Port B read */ |
| 289 | 288 | DEVCB_NULL, /* Port C read */ |
| 290 | 289 | DEVCB_HANDLER(ppi8255_0a_w), /* Port A write */ |
| r8466 | r8467 | |
| 306 | 305 | { |
| 307 | 306 | DEVCB_NULL, /* Port A read */ |
| 308 | 307 | DEVCB_NULL, /* Port B read */ |
| 309 | | DEVCB_NULL, /* Port C read */ |
| 308 | DEVCB_HANDLER(unk_r), /* Port C read */ |
| 310 | 309 | DEVCB_HANDLER(ppi8255_2a_w), /* Port A write */ |
| 311 | 310 | DEVCB_NULL, /* Port B write */ |
| 312 | 311 | DEVCB_NULL /* Port C write */ |
| r8466 | r8467 | |
| 377 | 376 | static DRIVER_INIT( paso7 ) |
| 378 | 377 | { |
| 379 | 378 | UINT8 *bios = memory_region(machine, "maincpu"); |
| 380 | | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 381 | 379 | |
| 382 | | memory_unmap_write(space, 0x0000, 0x7fff, 0, 0); |
| 383 | 380 | memory_set_bankptr(machine, "bank1", bios + 0x10000); |
| 384 | 381 | memory_set_bankptr(machine, "bank2", bios + 0x10000); |
| 385 | 382 | // memory_set_bankptr(machine, "bank3", bios + 0x10000); |