src/mess/machine/nes.c
| r14108 | r14109 | |
| 140 | 140 | |
| 141 | 141 | if (state->m_four_screen_vram) |
| 142 | 142 | { |
| 143 | | state->m_extended_ntram = auto_alloc_array(machine, UINT8, 0x2000); |
| 143 | state->m_extended_ntram = auto_alloc_array_clear(machine, UINT8, 0x2000); |
| 144 | 144 | state->save_pointer(NAME(state->m_extended_ntram), 0x2000); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | if (state->m_four_screen_vram) |
| 148 | set_nt_mirroring(machine, PPU_MIRROR_4SCREEN); |
| 149 | else |
| 150 | { |
| 151 | switch (state->m_hard_mirroring) |
| 152 | { |
| 153 | case PPU_MIRROR_HORZ: |
| 154 | case PPU_MIRROR_VERT: |
| 155 | case PPU_MIRROR_HIGH: |
| 156 | case PPU_MIRROR_LOW: |
| 157 | set_nt_mirroring(machine, state->m_hard_mirroring); |
| 158 | break; |
| 159 | default: |
| 160 | set_nt_mirroring(machine, PPU_MIRROR_NONE); |
| 161 | break; |
| 162 | } |
| 163 | } |
| 164 | |
| 147 | 165 | // there are still some quirk about writes to bank5... I hope to fix them soon. (mappers 34,45,52,246 have both mid_w and WRAM-->check) |
| 148 | 166 | if (state->m_mmc_write_mid) |
| 149 | 167 | space->install_legacy_write_handler(0x6000, 0x7fff, state->m_mmc_write_mid,state->m_mmc_write_mid_name); |
src/mess/video/nes.c
| r14108 | r14109 | |
| 13 | 13 | |
| 14 | 14 | static void nes_vh_reset( running_machine &machine ) |
| 15 | 15 | { |
| 16 | | nes_state *state = machine.driver_data<nes_state>(); |
| 17 | 16 | ppu2c0x_set_vidaccess_callback(machine.device("ppu"), nes_ppu_vidaccess); |
| 18 | | |
| 19 | | if (state->m_four_screen_vram) |
| 20 | | set_nt_mirroring(machine, PPU_MIRROR_4SCREEN); |
| 21 | | else |
| 22 | | { |
| 23 | | switch (state->m_hard_mirroring) |
| 24 | | { |
| 25 | | case PPU_MIRROR_HORZ: |
| 26 | | case PPU_MIRROR_VERT: |
| 27 | | case PPU_MIRROR_HIGH: |
| 28 | | case PPU_MIRROR_LOW: |
| 29 | | set_nt_mirroring(machine, state->m_hard_mirroring); |
| 30 | | break; |
| 31 | | default: |
| 32 | | set_nt_mirroring(machine, PPU_MIRROR_NONE); |
| 33 | | break; |
| 34 | | } |
| 35 | | } |
| 36 | 17 | } |
| 37 | 18 | |
| 38 | 19 | VIDEO_START( nes ) |