* Fixed incorrect behavior of SHA, SHX, SHY, and SHS
Opcodes $93, $9B, $9C, $9E, and $9F, also referred to as the "Unstable High Byte Group", all rely on the High Byte of the target address being incremented internally when the processor adds the X or Y register as an offset, and this new value of the high byte is ANDed with the value being stored.
* Fixed a typo
In the comment made for private byte H, changed the word "varaible" to "variable"
* Added H to the 6502 SyncState
Added H to the 6502 SyncState, which is used during the final cycles of a few unofficial instructions.
* Updated LxaConstant for Chip6510.cs
This now passes Disk2.d64's "LXAB" test.
Does this need to change in Drive1541.cs as well?
* Updated AneConstant for Chip6510.cs
This now passes Disk2.d64's "TRAP1" test.
Does this need to change in Drive1541.cs as well?
* Updated the 6502's unstable high byte group for RDY beahvior.
SHA, for example, typically writes a value of A & X & H, but if the RDY line is low 2 cycles before the write occurs, (tested with a DMC DMA) the value written is just A & X. To recreate that behavior, H is set to $FF if the RDY line is low during that particular stage of the instruction.
* Removed trailing whitespace added in previous commit
* The 6502 ext_ppu_cycle variable is now updated in NesHawk
The ext_ppu_cycle was only used in SubNesHawk, though it would still appear in the tracelogger for NesHawk, just always with a value of 0.
This value is now incremented at the end of runppu() in PPU.cs, and reset at the beginning of a frame inside DoFrame() of SubNesHawk, and FrameAdvance() for NesHawk.
* Fixed formatting of a line added in the previous commit.
Added spaces around the equal sign.
* Added the 6502 address bus, and DMC DMA Halt cycles occur on the correct cycles
Added the 16 bit address bus as a public variable to Execute.cs
The 6502 Address Bus is not updated by the DMC DMA or OAM DMA.
The DMC DMA's "halt cycles" and "put cycles" read from wherever the 6502 address bus currently is. This can result in extra reads from read-sensitive PPU and APU registers.
Likewise, APU Register Activation is tied to the 6502 address bus. (Previously using the value of the PC, as the address bus will be the value of the PC during OAM DMAs)
* Removed unnecessary includes
I have no idea what added these, but it was a mistake.
* Added the 6502 address bus to the SyncState
Added the 6502 address bus to the SyncState
* Updated controller strobing and clocking
Controllers only get strobed when the CPU transitions from a get cycle to a put cycle.
Controllers only get clocked if the previous CPU cycle was not reading from the controller port.
* Updating timing of clearing the Frame Counter Interrupt Flag
The Frame Counter Interrupt Flag is only cleared on "put" cycles.
This can be detected by running an instruction that double-reads address $4015, such as the unofficial SLO $4015, X instruction. The Value in the A register after that instruction will have different results depending on if the cycle this ran on was a get or a put cycle, since the flag is only cleared on the put cycle after the read occured.
* Update src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/CPUs/MOS 6502X/Execute.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/Computers/Commodore64/MOS/Chip6510.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/APU.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Update src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Fixed a typo
* Updated formatting, and fixed a potential bug.
Two read cycles in a row, one from either controller port, will still clock both controllers once.
* Update src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/NES.Core.cs
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* Updated sprite evaluation for misaligned OAM
If a write to $2003 occurs on a visible scanline before sprite evaluation, the initial index into OAM for the evaluation will not begin at OAM index 0. If the OAM index was not a multiple of 4 when this occurs, an interesting phenomenon becomes visible, where the lower two bits of the OAM index are cleared if the Y position is out of range for the scanline. Surprisingly, the X position makes this same "in range" check, resulting in the lower two bits being cleared if not in range.
* Updated glitchy increment of OAM index when writing to $2004
When this occurs, reg_2003 needs to increment, and this also results in a bitwise AND with $FC.
---------
Co-authored-by: YoshiRulz <OSSYoshiRulz+GitHub@gmail.com>
* allow a TAStudio rewind to go back a configurable number of frames.
* rename FramesPerRewind to RewindStep.
* make whitespace consistent.
Use tabs for regular lines, but use spaces in argument lists that are formatted as one argument per line.
* remove tiny designer resizes.
* refactor isFastForwarding variables in main form.
* refactor isFastForwarding variables in main form, v2.
Copy IsFastForwarding into a local variable to minimize recalculations.
* add doc string to MainForm.IsFastForwarding.
* refactor if statement shape in TAStudio.MenuItems.cs .