From 5cc3f8fdddeeb5742faa3542abf3dc6f4f5dfb3f Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 13 Aug 2022 21:24:12 +0200 Subject: [PATCH] kotlin 1.7.10 --- build.gradle.kts | 3 ++- src/main/kotlin/razorvine/ksim65/Cpu6502.kt | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b0b8b1c..ff84fce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ import kotlin.math.max plugins { // Apply the Kotlin JVM plugin to add support for Kotlin on the JVM. - kotlin("jvm") version "1.6.10" + kotlin("jvm") version "1.7.10" `maven-publish` application java @@ -37,6 +37,7 @@ allprojects { dependencies { // Align versions of all Kotlin components implementation(platform("org.jetbrains.kotlin:kotlin-bom")) + implementation("org.jetbrains.kotlin:kotlin-reflect") // Use the Kotlin JDK 8 standard library. implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") diff --git a/src/main/kotlin/razorvine/ksim65/Cpu6502.kt b/src/main/kotlin/razorvine/ksim65/Cpu6502.kt index c0e8eeb..aa8ea5d 100644 --- a/src/main/kotlin/razorvine/ksim65/Cpu6502.kt +++ b/src/main/kotlin/razorvine/ksim65/Cpu6502.kt @@ -188,9 +188,7 @@ open class Cpu6502 : BusComponent() { regPC++ instrCycles = currentInstruction.cycles - val extraCycleFromAddr = applyAddressingMode(currentInstruction.mode) - val extraCycleFromInstr = dispatchOpcode(currentOpcode) - if(extraCycleFromAddr and extraCycleFromInstr) + if(applyAddressingMode(currentInstruction.mode) and dispatchOpcode(currentOpcode)) instrCycles++ }