diff --git a/bsnes/sfc/cpu/cpu.hpp b/bsnes/sfc/cpu/cpu.hpp index e4046538..fa69da40 100644 --- a/bsnes/sfc/cpu/cpu.hpp +++ b/bsnes/sfc/cpu/cpu.hpp @@ -52,8 +52,8 @@ struct CPU : Processor::WDC65816, Thread, PPUcounter { alwaysinline auto dmaEdge() -> void; //irq.cpp - alwaysinline auto pollNMI() -> void; - alwaysinline auto pollIRQ() -> void; + alwaysinline auto nmiPoll() -> void; + alwaysinline auto irqPoll() -> void; auto nmitimenUpdate(uint8 data) -> void; auto rdnmi() -> bool; auto timeup() -> bool; diff --git a/bsnes/sfc/cpu/io.cpp b/bsnes/sfc/cpu/io.cpp index 2b9667af..dd10da74 100644 --- a/bsnes/sfc/cpu/io.cpp +++ b/bsnes/sfc/cpu/io.cpp @@ -191,24 +191,24 @@ auto CPU::writeCPU(uint addr, uint8 data) -> void { io.htime = (io.htime >> 2) - 1; io.htime = io.htime & 0x100 | data << 0; io.htime = (io.htime + 1) << 2; - pollIRQ(); //unverified + irqPoll(); //unverified return; case 0x4208: //HTIMEH io.htime = (io.htime >> 2) - 1; io.htime = io.htime & 0x0ff | (data & 1) << 8; io.htime = (io.htime + 1) << 2; - pollIRQ(); //unverified + irqPoll(); //unverified return; case 0x4209: //VTIMEL io.vtime = io.vtime & 0x100 | data << 0; - pollIRQ(); //unverified + irqPoll(); //unverified return; case 0x420a: //VTIMEH io.vtime = io.vtime & 0x0ff | (data & 1) << 8; - pollIRQ(); //unverified + irqPoll(); //unverified return; case 0x420b: //DMAEN diff --git a/bsnes/sfc/cpu/irq.cpp b/bsnes/sfc/cpu/irq.cpp index 60d9979d..05deed38 100644 --- a/bsnes/sfc/cpu/irq.cpp +++ b/bsnes/sfc/cpu/irq.cpp @@ -1,10 +1,10 @@ -//pollNMI() and pollIRQ() are called once every four clock cycles; +//nmiPoll() and irqPoll() are called once every four clock cycles; //as NMI steps by scanlines (divisible by 4) and IRQ by PPU 4-cycle dots. // //ppu.(vh)counter(n) returns the value of said counters n-clocks before current time; //it is used to emulate hardware communication delay between opcode and interrupt units. -auto CPU::pollNMI() -> void { +auto CPU::nmiPoll() -> void { //NMI hold if(status.nmiHold.lower() && io.nmiEnable) { status.nmiTransition = 1; @@ -16,7 +16,7 @@ auto CPU::pollNMI() -> void { } } -auto CPU::pollIRQ() -> void { +auto CPU::irqPoll() -> void { //IRQ hold status.irqHold = 0; if(status.irqLine && io.irqEnable) { diff --git a/bsnes/sfc/cpu/timing.cpp b/bsnes/sfc/cpu/timing.cpp index ce6f973b..8fb40023 100644 --- a/bsnes/sfc/cpu/timing.cpp +++ b/bsnes/sfc/cpu/timing.cpp @@ -11,7 +11,7 @@ auto CPU::joypadCounter() const -> uint { auto CPU::stepOnce() -> void { counter.cpu += 2; tick(); - if(hcounter() & 2) pollNMI(), pollIRQ(); + if(hcounter() & 2) nmiPoll(), irqPoll(); if(joypadCounter() == 0) joypadEdge(); }