mirror of
https://github.com/irmen/ksim65.git
synced 2024-06-06 07:29:29 +00:00
Compare commits
2 Commits
87c7aad49a
...
67c70abb41
Author | SHA1 | Date | |
---|---|---|---|
|
67c70abb41 | ||
|
5cc3f8fddd |
|
@ -9,7 +9,7 @@
|
||||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleHome" value="/usr/share/java/gradle" />
|
<option name="gradleHome" value="/usr/share/java/gradle" />
|
||||||
<option name="gradleJvm" value="11" />
|
<option name="gradleJvm" value="openjdk-11" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
|
|
|
@ -7,5 +7,5 @@
|
||||||
<component name="JavaScriptSettings">
|
<component name="JavaScriptSettings">
|
||||||
<option name="languageLevel" value="ES6" />
|
<option name="languageLevel" value="ES6" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="Kotlin SDK" project-jdk-type="KotlinSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="openjdk-11" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
|
@ -5,7 +5,7 @@ import kotlin.math.max
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// Apply the Kotlin JVM plugin to add support for Kotlin on the JVM.
|
// Apply the Kotlin JVM plugin to add support for Kotlin on the JVM.
|
||||||
kotlin("jvm") version "1.6.10"
|
kotlin("jvm") version "1.8.21"
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
application
|
application
|
||||||
java
|
java
|
||||||
|
@ -24,7 +24,7 @@ allprojects {
|
||||||
}
|
}
|
||||||
version = versionProps["version"] as String
|
version = versionProps["version"] as String
|
||||||
group = "net.razorvine"
|
group = "net.razorvine"
|
||||||
base.archivesBaseName = "ksim65"
|
// base.archivesBaseName = "ksim65"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// You can declare any Maven/Ivy/file repository here.
|
// You can declare any Maven/Ivy/file repository here.
|
||||||
|
@ -37,6 +37,7 @@ allprojects {
|
||||||
dependencies {
|
dependencies {
|
||||||
// Align versions of all Kotlin components
|
// Align versions of all Kotlin components
|
||||||
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
|
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
|
||||||
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||||||
|
|
||||||
// Use the Kotlin JDK 8 standard library.
|
// Use the Kotlin JDK 8 standard library.
|
||||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
||||||
|
|
|
@ -188,9 +188,7 @@ open class Cpu6502 : BusComponent() {
|
||||||
|
|
||||||
regPC++
|
regPC++
|
||||||
instrCycles = currentInstruction.cycles
|
instrCycles = currentInstruction.cycles
|
||||||
val extraCycleFromAddr = applyAddressingMode(currentInstruction.mode)
|
if(applyAddressingMode(currentInstruction.mode) and dispatchOpcode(currentOpcode))
|
||||||
val extraCycleFromInstr = dispatchOpcode(currentOpcode)
|
|
||||||
if(extraCycleFromAddr and extraCycleFromInstr)
|
|
||||||
instrCycles++
|
instrCycles++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,14 +153,14 @@ class Test6502CpuBasics {
|
||||||
val bus = Bus()
|
val bus = Bus()
|
||||||
bus.add(cpu)
|
bus.add(cpu)
|
||||||
cpu.breakpointForBRK = { _, pc -> fail("brk instruction at \$${hexW(pc)}") }
|
cpu.breakpointForBRK = { _, pc -> fail("brk instruction at \$${hexW(pc)}") }
|
||||||
cpu.addBreakpoint(0xffee) { cpu, pc ->
|
cpu.addBreakpoint(0xffee) { cpu2, pc ->
|
||||||
// OSWRCH write character
|
// OSWRCH write character
|
||||||
print("${cpu.regA.toChar()}")
|
print("${cpu2.regA.toChar()}")
|
||||||
Cpu6502.BreakpointResultAction()
|
Cpu6502.BreakpointResultAction()
|
||||||
}
|
}
|
||||||
cpu.addBreakpoint(0xffe0) { cpu, pc ->
|
cpu.addBreakpoint(0xffe0) { cpu2, pc ->
|
||||||
// OSRDCH read character
|
// OSRDCH read character
|
||||||
cpu.regA = testChoice.code
|
cpu2.regA = testChoice.code
|
||||||
Cpu6502.BreakpointResultAction()
|
Cpu6502.BreakpointResultAction()
|
||||||
}
|
}
|
||||||
val ram = Ram(0, 0xffff)
|
val ram = Ram(0, 0xffff)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user