From 10106657d3192b4afd2c29c623118ca46c0f2348 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sat, 2 May 2026 14:13:01 +0100 Subject: [PATCH] Some small cosmetic changes --- M6502/Core.cs | 7 +++---- M6502/MOS6502.cs | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/M6502/Core.cs b/M6502/Core.cs index 91784c7..c506f26 100644 --- a/M6502/Core.cs +++ b/M6502/Core.cs @@ -772,10 +772,10 @@ namespace M6502 protected void Branch(bool condition) { - _ = this.FetchByte(); + var data = this.FetchByte(); if (condition) { - var relative = (sbyte)this.Bus.Data; + var relative = (sbyte)data; this.SwallowRead(); this.FixupBranch(relative); this.Jump(this.Bus.Address); @@ -1183,8 +1183,7 @@ namespace M6502 { this.SwallowRead(); this.SwallowPop(); - this.Pop(); - this.P = ClearBit(SetBit(this.Bus.Data, StatusBits.RF), StatusBits.BF); + this.P = ClearBit(SetBit(this.Pop(), StatusBits.RF), StatusBits.BF); } private void RTI() diff --git a/M6502/MOS6502.cs b/M6502/MOS6502.cs index 55caad8..c2569db 100644 --- a/M6502/MOS6502.cs +++ b/M6502/MOS6502.cs @@ -38,15 +38,15 @@ namespace M6502 case 0x1f: this.AbsoluteXAddress(); this.FixupRead(); this.SLO(); break; // *SLO (absolute, X) case 0x22: this.JAM(); break; // *JAM - case 0x23: this.IndexedIndirectX(); this.RLA(); ; break; // *RLA (indexed indirect X) - case 0x27: this.ZeroPage(); this.RLA(); ; break; // *RLA (zero page) + case 0x23: this.IndexedIndirectX(); this.RLA(); break; // *RLA (indexed indirect X) + case 0x27: this.ZeroPage(); this.RLA(); break; // *RLA (zero page) case 0x2b: this.FetchByte(); this.ANC(); break; // *ANC (immediate) case 0x2f: this.Absolute(); this.RLA(); break; // *RLA (absolute) case 0x32: this.JAM(); break; // *JAM case 0x33: this.IndirectIndexedYAddress(); this.FixupRead(); this.RLA(); break; // *RLA (indirect indexed Y) case 0x34: this.ZeroPageX(); break; // *NOP (zero page, X) - case 0x37: this.ZeroPageX(); this.RLA(); ; break; // *RLA (zero page, X) + case 0x37: this.ZeroPageX(); this.RLA(); break; // *RLA (zero page, X) case 0x3a: this.SwallowRead(); break; // *NOP (implied) case 0x3b: this.AbsoluteYAddress(); this.FixupRead(); this.RLA(); break; // *RLA (absolute, Y) case 0x3c: this.AbsoluteXAddress(); this.MaybeFixupRead(); break; // *NOP (absolute, X)