void nes_ks7016_device::pcb_reset() { prg8_89(0xc); prg8_ab(0xd); prg8_cd(0xe); prg8_ef(0xf); chr8(0, CHRRAM); m_reg = 4; }
void nes_benshieng_device::update_banks() { prg8_89(m_mmc_prg_bank[0]); prg8_ab(m_mmc_prg_bank[1]); prg8_cd(m_mmc_prg_bank[2]); prg8_ef(m_mmc_prg_bank[3]); chr2_0(m_mmc_vrom_bank[0], CHRROM); chr2_2(m_mmc_vrom_bank[1], CHRROM); chr2_4(m_mmc_vrom_bank[2], CHRROM); chr2_6(m_mmc_vrom_bank[3], CHRROM); }
void nes_lh10_device::pcb_reset() { chr8(0, CHRRAM); prg8_89(0); prg8_ab(0); // 0xc000-0xdfff reads/writes WRAM prg8_ef(0xff); memset(m_reg, 0, sizeof(m_reg)); m_latch = 0; }
void nes_ks7037_device::update_prg() { prg8_89(m_reg[6]); prg8_ab(0xfe); prg8_cd(m_reg[7]); prg8_ef(0xff); set_nt_page(0, CIRAM, m_reg[2] & 1, 1); set_nt_page(1, CIRAM, m_reg[3] & 1, 1); set_nt_page(2, CIRAM, m_reg[4] & 1, 1); set_nt_page(3, CIRAM, m_reg[5] & 1, 1); }
void nes_ks7037_device::pcb_reset() { prg8_89(0); prg8_ab(0x1e); prg8_cd(0); prg8_ef(0x1f); chr8(0, CHRRAM); memset(m_reg, 0, sizeof(m_reg)); m_latch = 0; }
void nes_lh53_device::pcb_reset() { chr8(0, CHRRAM); prg8_89(0xc); prg8_ab(0xd); // last 2K are overlayed by WRAM prg8_cd(0xe); // first 6K are overlayed by WRAM prg8_ef(0xf); m_reg = 0; m_irq_count = 0; m_irq_enable = 0; }
void nes_smb2jb_device::pcb_reset() { m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; prg8_89(0x08); prg8_ab(0x09); prg8_cd(0); prg8_ef(0x0b); chr8(0, m_chr_source); m_irq_enable = 0; m_irq_count = 0; }
void nes_smb3p_device::pcb_reset() { m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; prg8_89((m_prg_chunks << 1) - 1); prg8_ab(0); prg8_cd(0); prg8_ef((m_prg_chunks << 1) - 1); chr8(0, m_chr_source); m_irq_enable = 0; m_irq_count = 0; }
void nes_pxrom_device::pcb_reset() { m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; prg8_89(0); prg8_ab((m_prg_chunks << 1) - 3); prg8_cd((m_prg_chunks << 1) - 2); prg8_ef((m_prg_chunks << 1) - 1); chr8(0, m_chr_source); m_reg[0] = m_reg[2] = 0; m_reg[1] = m_reg[3] = 0; m_latch1 = m_latch2 = 0xfe; }
void nes_ax5705_device::pcb_reset() { m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; chr8(0, m_chr_source); m_mmc_prg_bank[0] = 0; m_mmc_prg_bank[1] = 1; prg8_89(m_mmc_prg_bank[0]); prg8_ab(m_mmc_prg_bank[1]); prg8_cd(0xfe); prg8_ef(0xff); memset(m_mmc_vrom_bank, 0, sizeof(m_mmc_vrom_bank)); }
void nes_konami_vrc7_device::pcb_reset() { m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; prg8_89(0); prg8_ab(0); prg8_cd(0); prg8_ef(0xff); chr8(0, m_chr_source); m_irq_mode = 0; m_irq_prescale = 341; m_irq_enable = 0; m_irq_enable_latch = 0; m_irq_count = 0; m_irq_count_latch = 0; }
void nes_cne_fsb_device::write_m(offs_t offset, uint8_t data) { LOG_MMC(("cne_fsb write_m, offset: %04x, data: %02x\n", offset, data)); if (offset < 0x0800) { switch (offset & 0x0007) { case 0x0000: prg8_89(data); break; case 0x0001: prg8_ab(data); break; case 0x0002: prg8_cd(data); break; case 0x0003: prg8_ef(data); break; case 0x0004: chr2_0(data, CHRROM); break; case 0x0005: chr2_2(data, CHRROM); break; case 0x0006: chr2_4(data, CHRROM); break; case 0x0007: chr2_6(data, CHRROM); break; } } else m_battery[offset] = data; }
void nes_exrom_device::update_prg() { int bank0, bank1, bank2, bank3; switch (m_prg_mode) { case 0: // 32k banks bank3 = m_prg_regs[3] >> 2; prg32(bank3); break; case 1: // 16k banks bank1 = m_prg_regs[1] >> 1; bank3 = m_prg_regs[3] >> 1; if (m_prg_ram_mapped[1]) { m_ram_hi_banks[0] = ((bank1 << 1) & 0x07); m_ram_hi_banks[1] = ((bank1 << 1) & 0x07) | 1; } else prg16_89ab(bank1); prg16_cdef(bank3); break; case 2: // 16k-8k banks bank1 = m_prg_regs[1] >> 1; bank2 = m_prg_regs[2]; bank3 = m_prg_regs[3]; if (m_prg_ram_mapped[1]) { m_ram_hi_banks[0] = ((bank1 << 1) & 0x07); m_ram_hi_banks[1] = ((bank1 << 1) & 0x07) | 1; } else prg16_89ab(bank1); if (m_prg_ram_mapped[2]) m_ram_hi_banks[2] = (bank2 & 0x07); else prg8_cd(bank2); prg8_ef(bank3); break; case 3: // 8k banks bank0 = m_prg_regs[0]; bank1 = m_prg_regs[1]; bank2 = m_prg_regs[2]; bank3 = m_prg_regs[3]; if (m_prg_ram_mapped[0]) m_ram_hi_banks[0] = (bank0 & 0x07); else prg8_89(bank0); if (m_prg_ram_mapped[1]) m_ram_hi_banks[1] = (bank1 & 0x07); else prg8_ab(bank1); if (m_prg_ram_mapped[2]) m_ram_hi_banks[2] = (bank2 & 0x07); else prg8_cd(bank2); prg8_ef(bank3); break; } }
void nes_exrom_device::update_prg() { int bank0, bank1, bank2, bank3; switch (m_prg_mode) { case 0: // 32k banks bank3 = m_prg_regs[3]; prg32(bank3 >> 2); break; case 1: // 16k banks bank1 = m_prg_regs[1]; bank3 = m_prg_regs[3]; if (!BIT(bank1, 7)) // PRG RAM { prgram_bank8_x(0, (bank1 & 0x06)); prgram_bank8_x(1, (bank1 & 0x06) + 1); } else prg16_89ab(bank1 >> 1); prg16_cdef(bank3); break; case 2: // 16k-8k banks bank1 = m_prg_regs[1]; bank2 = m_prg_regs[2]; bank3 = m_prg_regs[3]; if (!BIT(bank1, 7)) { prgram_bank8_x(0, (bank1 & 0x06)); prgram_bank8_x(1, (bank1 & 0x06) + 1); } else prg16_89ab((bank1 & 0x7f) >> 1); if (!BIT(bank2, 7)) prgram_bank8_x(2, bank2 & 0x07); else prg8_cd(bank2 & 0x7f); prg8_ef(bank3); break; case 3: // 8k banks bank0 = m_prg_regs[0]; bank1 = m_prg_regs[1]; bank2 = m_prg_regs[2]; bank3 = m_prg_regs[3]; if (!BIT(bank0, 7)) prgram_bank8_x(0, bank0 & 0x07); else prg8_89(bank0 & 0x7f); if (!BIT(bank1, 7)) prgram_bank8_x(1, bank1 & 0x07); else prg8_ab(bank1 & 0x7f); if (!BIT(bank2, 7)) prgram_bank8_x(2, bank2 & 0x07); else prg8_cd(bank2 & 0x7f); prg8_ef(bank3); break; } }