Copper68k 1.5.28
dotnet add package Copper68k --version 1.5.28
NuGet\Install-Package Copper68k -Version 1.5.28
<PackageReference Include="Copper68k" Version="1.5.28" />
<PackageVersion Include="Copper68k" Version="1.5.28" />
<PackageReference Include="Copper68k" />
paket add Copper68k --version 1.5.28
#r "nuget: Copper68k, 1.5.28"
#:package Copper68k@1.5.28
#addin nuget:?package=Copper68k&version=1.5.28
#tool nuget:?package=Copper68k&version=1.5.28
Copper68k
Mainline release 1.5.28
MC68000 long immediate instructions retain their internal execution clocks after a contended refill. Memory-source ADDA.W and SUBA.W spend the predecrement and indexed effective-address calculation clocks before their first bus transfer and preserve the execution clocks after the refill. Short register ALU instructions sample interrupts before the queue refill.
At a matched clear launch, Planet Rocklobster Voxel agrees with WinUAE through the first queued blit on all 7,828 CPU accesses and 8,000 blitter destination writes. The normal replay checks the exit threshold 304 times and exits at interrupt 1,203. These results compare emulator replays.
Mainline release 1.5.27
MC68000 MOVE.W now spends the indexed destination's two calculation clocks
after the source read completes and before the destination extension refill.
Previously memory-source forms relied on the nominal instruction floor, which
placed the clocks too late and could lose them entirely after DTACK waits.
The shared helper covers all three interpreter dispatch paths.
Motorola MC68000UM table 8-2 specifies the nominal totals; the WinUAE CE000 implementation and Planet Rocklobster bus history independently locate the destination clocks between the source data read and next fetch. Regression cases cover five memory source addressing modes, all three dispatch paths, and ordinary/waited reads. This is implementation evidence, not physical CPU timing qualification. The 30 focused regressions and full CPU suite pass (7,226 passes, 109 optional skips). The unmodified Planet Rocklobster replay completes 30,000 fields; both reported polygon images match the reference, with 370/381 dense polygon images exact. Eleven small raster differences remain. No physical CPU timing qualification is claimed. This revision retains the 1.5.26 MOVEM correction.
Publication was authorized on 2026-12-04. The trusted-publishing workflow retains the full CPU, accepted synthetic coverage, AHX consumer and package-content gates. Existing published versions remain unchanged.
Mainline release 1.5.26
This revision retains the 1.5.25 maintenance corrections and completes the
MC68000 MOVEM.L registers,(An) final instruction fetch after the register
stores, including when a store's DTACK wait exceeds the nominal instruction
floor. Previously the fetch could remain pending at instruction return;
a following MOVEM with a displacement then entered with a cold instruction
queue and fetched one successor word ahead of its operand reads.
The ordering follows Jorge Cwik's MOVEM prefetch description and the aligned WinUAE CE000 bus trace from Planet Rocklobster. The regression covers all three interpreter dispatch paths, empty/single/seven-register masks, and ordinary/waited stores. Six waited cases fail before the correction; all fifteen pass afterward. This is a shared CPU correction, not a title-specific Amiga timing adjustment. It does not by itself resolve the fractal CPU/blitter write race or establish physical CPU timing qualification.
Publication of this new revision was authorized on 2026-12-04. The existing trusted-publishing workflow runs the full CPU suite, accepted synthetic coverage, AHX consumer tests and two-target package validation before uploading the NuGet and symbol packages. Existing published versions remain unchanged.
Development 1.5.5-nitro.1
This unpublished development version samples MC68000 memory BTST interrupt pins after effective-address extensions and before the operand read. The later mandatory prefetch, flag update ordering and total instruction cycles remain unchanged. This follows the bus-phase ordering in WinUAE's generated CE000 immediate absolute-long BTST and corresponding dynamic forms; it is implementation evidence, not a physical CPU timing measurement.
The regression covers static/dynamic bit numbers, address-indirect/absolute-long operands, all three dispatch paths and operand DTACK waits. It distinguishes interrupts arriving during a waited operand from the earlier IPL poll. The CopperScreen Nitro replay supplies consumer integration evidence. This change does not authorize package publication or revise the historical integer gate.
Mainline release 1.5.4
This release promotes the qualified integer instruction suite and mainline corrections previously supplied as development packages. The required semantic matrices cover MOVE/MOVEA, transfer/address, arithmetic/comparison, logical/bit/shift/atomic and control/system instructions across 68000, 68010, 68EC020, 68020, 68030, 68040, 68060 and the A1200 EC020 profile. The retained qualification gate requires 86,663,530 architectural cases in 783 reporting batches, with no required mismatches, unsupported execution or untested cases. Logical case counts are separate from xUnit test counts.
The general logical handler includes EORI byte/word/long postincrement; Detroit's ten explicit semantic regressions and first-month native gameplay record are retained. The release also retains independent pending-delivery state when CPU contexts are copied and completes mandatory memory BTST prefetch after waited reads, including static/dynamic bit-number and planned/scalar dispatch checks. No new CPU execution changes are introduced by the stable version promotion.
Acceptance covers the approved known integer behavior. Five unresolved areas remain deferred: 010 rejected-RTE CCR, 060 ordinary STOP privilege, disputed 030/040 trace boundaries, broader architectural restoration, and other private continuation candidates. They are never counted as passing. Physical CPU timing, FPU arithmetic, enabled-MMU and general OS qualification remain outside this integer gate. Advanced CPU profiles retain their experimental limits.
Publication was authorized on 2026-10-22. The release workflow runs the CPU suite, validates required architectural reports, tests the AHX shared consumer and validates package contents before publishing the package and symbols. Earlier release and development evidence below retains its original scope and counts.
Historical mainline release 1.5.3
This release retains the preceding 1.5.2 development integer fixes and adds consumer integration for 68010, 040/060 paging and the 060 FPU. The 010 forwards motherboard bus timing and implements SR privilege, MOVE from CCR, MOVEC USP/VBR/SFC/DFC, MOVES, RTD and the 58-byte format-8 address-error frame. RTE consumes that frame; internal fault continuation/retry state is still incomplete.
040/060 paging uses the documented three-level descriptors, 4/8 KiB pages, indirection, supervisor/write protection, used/modified updates, transparent translation and explicit PFLUSH. MOVEC root/TC writes retain the ATC until guest invalidation. Physical table walks use the timed bus; compiler peeks do not modify descriptors or populate the ATC. Faults use translated supervisor stacks and model-specific frames. Full 040 format-7 continuation/writeback recovery and partially completed operand recovery remain incomplete; this is not qualification for general-purpose virtual-memory OS operation. The 030 PMMU is outside this slice.
The 060 shares the ext80 arithmetic implementation, with its own 12-byte NULL/IDLE/EXCP frames, exceptional operand state and deferred arithmetic exceptions. Removed FPU forms trap for guest FPSP handling. The supported older Amiga ROM task frames remain incompatible; native 060-aware OS boot is unverified. BUSCR, complete trace/exception conformance and physical cache/pipeline timing remain incomplete. External 68881/68882 emulation and 060 JIT are not provided.
The optional 040 JIT exposes IM68kJitDiagnostics counters and falls back to
the interpreter when paging or transparent translation is active. Its instruction
cache enable check uses architectural CACR bit 15. The consumer supplies immutable
code snapshots, write/map invalidation and device/interrupt boundaries. Compilation
and cache invalidation may allocate; no throughput acceptance is implied.
These contracts follow MC68000UM, MC68040UM and MC68060UM. Consumer evidence and remaining integration limits are recorded in CopperScreen CPU support. Publication of this stable version was explicitly authorized on 2026-10-07. The advanced CPU profiles remain experimental; a stable package version does not certify complete CPU, virtual-memory OS or physical timing conformance. The shared suite passes 4,433 tests; seven optional external/seeded checks are unavailable. CopperScreen additionally passes 1,163 engine tests, 180 host tests and 74 disk tests, including native 68010 disk boot and actual 040 JIT execution. Six optional native host cases remain unavailable. No new throughput acceptance is claimed.
Preceding integer development milestone 1.5.2
This source version is unpublished and requires explicit release authorization.
The synthetic instruction suite completes legal MOVE/MOVEA, transfer/address and arithmetic/comparison milestones across 68000, 68010, 68EC020, 68020, 68030, 68040, 68060 and the A1200 EC020 profile. Its deterministic gate executes 2,945,168 logical cases, including every legal MOVE opcode word and full-format indexed structures. Later integer families remain explicitly untested in its roadmap inventory. Diagnostic 010/060 coverage does not qualify desktop readiness. Seven optional seeded or external cases remain unavailable in the ordinary run; see the suite plan for the current full-suite and consumer results.
The suite fixes absolute-word decoding, remaining legal MOVE/MOVEM operand forms, EXG/MOVEM active-stack updates, MOVEM's 020+ predecrement base snapshot, 040 full-index/address-width/alignment fallback rules and 24-bit transfer spans. Existing admitted forms retain their timing plans; new forms use the approximate operand-shape policy. Rejected 040 extensions never retry partial operand effects. Eleven mutation proofs detect historical and targeted arithmetic defect categories. No specialized cache, prefetch, bus-order, JIT or native replay regressions have been retired.
Arithmetic covers ADD/SUB, quick/immediate/address/extend variants, comparisons, word and long signed/unsigned multiplication/division, decimal arithmetic and PACK/UNPK. Full indexed EAs and active stack writes are supported throughout the promoted families. Decimal aliases read the source before updating the destination; divide traps save the model-specific frame and return correctly through RTE.
Earlier native development slices
The following records describe the pre-suite development slices. Their stated MOVE/MOVEM unsupported boundaries were subsequently completed by the synthetic milestones above; their native replay evidence and physical timing limitations remain historical results.
Native stock PAL A1200 replays of supplied UFO: Enemy Unknown and Alien Breed 3D II: The Killing Grounds media exposed missing integer operand forms in the shared advanced executor. The changes implement CMPM.W/L, sized PC-relative ADD/SUB, PC-indexed AND.B/W, absolute-long AND/ADD.B/W, ADDA.W/L indirect, postincrement and absolute-long, MOVEM.W indirect, CLR.W absolute-long, NOT.B/W/L indirect/postincrement/absolute-long, TST.L absolute-long, ADDI.B/W absolute-long and ADDI.W/L indirect, ADDQ.W absolute-long, dynamic BCLR/BSET indirect, SUBX.B/W register, and the reached MOVE.W/L forms.
The continuation adds full-format indexed effective addresses to admitted MOVE, MOVEA, CLR, LEA, PEA, JMP and JSR forms. Base/index suppression, signed word/long displacements, scaled indexes, pre/post memory indirection and ordinary timed pointer reads are implemented. LEA, PEA and jumps resolve addresses without reading the final operand; JSR resolves aliased stack bases/indexes before pushing the complete return PC. MOVE sources cover An/PC indexed reads to Dn/An, postincrement and absolute-long destinations, plus long displacement destinations. Register stores cover Dn B/W/L and An long to indexed memory. Other full-indexed instruction and destination combinations remain explicitly unsupported; reserved extensions stop before consuming displacement words. The continuation also adds sized SUB/SUBA absolute-long, quick postincrement arithmetic, ORI/ANDI absolute-long, EORI displacement, SUBI absolute-long, immediate bit modification with postincrement, immediate BCHG registers, indexed MOVEM.W/L loads, and the further byte/word/long MOVE, ADD, SUB and CMP forms reached by the games. The new MOVEM load routes support An/PC brief indexes; full extensions retain the explicit unsupported boundary. MOVE.W (An)+,SR checks privilege before reading memory and retires the increment in the old stack bank before applying SR's supervisor/master mode change. AND.B/W/L (An)+,Dn preserves the untouched data-register bits and source memory, advances the address register with the A7 byte stride, and updates NZVC while retaining X. The next Alien Breed continuation adds OR.B/W absolute-long sources, MOVE.B/W/L absolute-long to brief indexed memory, NEG.B/W/L absolute-long, CMPA.W/L absolute-long, TST.B/W/L PC displacement and MOVE.B/L PC displacement to absolute-long memory. CMPA sign-extends word sources and preserves X and An; NEG retains sized memory writes and the explicit read-modify-write barrier. PC brief indexed ADDA.W/L reads the operand from the extension-word base, sign-extends word sources and leaves CCR unchanged, including aliased An/A7 indexes and destinations. SUB.W An,Dn implements the low-word arithmetic reached by forward movement, preserving the upper data word and address register while setting XNZVC. The new memory-to-indexed MOVE route retains its full-destination unsupported boundary and the existing 040 fallback policy.
Native 4th Dimension and Kick Off 3 startup adds CMP.B/W/L predecrement, MOVE.B/W/L absolute-word to postincrement and postincrement to absolute-word, MOVE.B/W absolute-long to address-indirect, EOR.B/W/L data to address-indirect, ADDI.B/W/L postincrement, OR.B/W address-indirect to data registers, ADDQ.B absolute-long, and ASL.B immediate shifts used after menu selection. Absolute-word addresses are sign-extended; postincrement and predecrement retain the A7 byte stride and active stack bank. The memory arithmetic plans retain explicit read-modify-write barriers. The new execution routes preserve the 040 integer fallback and its fetch buffer. Fifty-nine focused cases cover these forms, shared 020/030/040 controls, operand widths, signed addresses, arithmetic flags, source preservation, memory aliases, stack strides, immediate shift count eight and overflow from intermediate sign changes. The original native stops and further continuation stops were reproduced before each implementation; the supplied demo now reaches effects with audio, and Kick Off 3 reaches its title and disk-2 prompt. Later milestones require separate native replay evidence.
Regression tests cover signed/scaled brief indexes and extension-word PC bases, operand widths, sign extension, source/destination aliasing, A7 byte stride, sticky SUBX zero, extend/borrow/overflow, surrounding memory and CCR preservation. MOVEM tests retain the 000/010 ignored-tail read and a separate 040 fallback control while validating the new native indirect route. Timing-plan admission and read-modify-write barriers remain explicit. Costs retain the existing approximate operand-shape policy; these results do not certify physical timing. The Brian the Lion CD32 hard-disk rip adds MOVE.W An to indexed memory, OR.B/W PC/An brief indexed to data registers, CLR.B/W and TST.B/W/L absolute-word, MOVE.B/W/L PC indexed to absolute-word, MOVEM.L register lists to absolute-word, SUBQ.B/W/L absolute-word, MOVE.B/W immediate to absolute-word, EORI.B/W/L immediate to indirect/absolute-long memory, immediate BTST to absolute-word and SUBI.B/W/L immediate to indirect memory. Byte/word Dn stores distinguish absolute-word from absolute-long destinations: the old broad decode consumed the following opcode as part of a long address. Sized MOVE also admits address-displacement sources stored to absolute-word memory. Sized postincrement MOVE to brief indexed memory updates the source before calculating an aliased destination base or address-register index, and retains the A7 byte stride. Its full-format destination remains explicitly unsupported. ASR.W displacement memory performs one signed word shift, retains surrounding memory and An, and updates XNZVC with the existing memory read-modify-write barrier. Indexed MOVE retains admitted full extensions and consumes the destination after all source displacements. Absolute-word addresses sign-extend; byte immediates ignore their unused high byte. MOVEM preserves CCR and registers, stores D0..D7 then A0..A7, and admits empty masks. SUBQ retains sized writes, encoded count eight, arithmetic flags and read-modify-write barriers. BTST uses byte bits modulo eight and changes only Z. One hundred forty-five focused cases cover these routes and the unchanged 040 fallback. Native unpacking and title progression work through an isolated candidate; the supplied hard-disk rip does not verify physical CD32 optical hardware or Akiko.
The complete CPU suite passes 4,253 cases, with six optional external corpus cases unavailable. The retained AHX consumer suite passes all 18 cases.
The supplied UFO crack intro runs and accepts its normal mouse-click exit.
UFO now responds to New Game and difficulty selection, first-base placement and
naming, advances the Geoscape clock and opens the interception menu. Both normal
and scalar replays complete 22,000 fields with all 139 capture files identical.
Alien Breed 3D II accepts the requested levels-disk replacement, reaches the
first 3D level and responds to forward movement, right turning and firing; ammo
decreases from 20 to 16. Both modes complete 72,000 fields with all 871 captures
identical. Some completed Alien Breed rasters omit most of the viewport or HUD,
so continuous visual stability remains open in the consumer's LWA-AGA-001 issue.
These results verify bounded gameplay input, not complete AGA compatibility.
The consumer evidence
retains exact candidate, media, input and capture identities, earlier failures
and the remaining visual limitation.
The unchanged application still pins published 1.5.1; the
candidate is tested through an isolated runtime/package, never a sibling
project reference. Architectural expectations follow
Motorola's programmer reference
and MC68020UM.
Mainline release 1.5.1
1.5.1 adds M68kCoreFactory.Default.CreateA1200Ec020(bus), an explicit
experimental PAL A1200 68EC020 profile using two native clocks per motherboard
clock. Its operand timing rules distinguish long Chip/ROM transfers and byte
CIA/Gayle accesses. The supplied bus remains responsible for actual transfer
widths, contention and the canonical clock. The existing Create(M68EC020, bus)
continues to select the OCS accelerator profile.
Native A1200 Kickstart 3.0 and DOS/graphics startup reached missing integer operand forms. The shared executor now implements ADD.W An,Dn; SUB.B/W #imm,Dn; MOVE.B/W d16(PC),Dn; MOVEM.W d16(PC),registers; BTST Dn,(An); AND.B/W/L (An),Dn; CMPI.B/W #imm,(An)+; MOVEA.L -(An),Am; SUBA.W/L (An),Am; immediate indexed BTST/BCHG/BCLR/BSET; TST.W indexed; ADDQ/SUBQ.W indexed; CMPA.W d16(An),Am; ADD.B/W Dn,(An); BCHG/BCLR Dn,d16(An); and ANDI.W/L #imm,(An). Focused tests cover operand widths, sign extension, PC extension bases, stack stride/aliasing, modulo-eight bit selection, CCR preservation, surrounding registers and timing admission. The complete CPU suite passes 3,522 cases; six optional external corpus cases are unavailable in the ordinary run.
The instruction semantics follow Motorola's M68000PRM. Costs retain the existing approximate operand-shape policy; indexed word quick arithmetic uses the displacement cost plus the existing two-clock indexed-EA increment. These tests and native boot are not physical timing certification. AGA display/DMA and motherboard execution belong to CopperScreen. Its initial native eight-plane PAL screen uses all 256 RGB24 colours; full AGA games, enhanced sprites, dual playfields and HAM8 require separate consumer coverage. Publication of this mainline version was explicitly authorized on 2026-10-01.
Mainline release 1.5.0
1.5.0 brings the preceding OCS CPU development series into main and the
normal NuGet release line. The old ocs020 prerelease suffix described the
original OCS/68020 integration effort; this release also includes experimental
030/040 support and a distinct diagnostic MC68060 core. A normal package version
does not remove the advanced CPU limitations documented below.
The release includes the 1.4.2-ocs020.56 correction to instruction fetching in the OCS
040 interpreter. Aligned longword reads start at the eight-byte half-line base,
including when execution starts in the second longword. The holding register
retains loops in the first six bytes even with CACR.IE clear. Integer fallback
execution now uses the same frontend rather than a separate 68000 prefetch queue.
Reset, instruction-cache maintenance, privilege/translation changes and host
mapping generations prevent reuse of stale context. Guest data writes alone do
not invalidate held instructions. JIT max-speed fetching is unchanged.
This is a demand-driven approximation, not a complete 040 pipeline: consuming the fourth word retires the half-line; speculative next-half-line transfers, deferred prefetch faults, pipeline overlap and accurate instruction costs remain unimplemented. These limits are not a Lotus-specific delay or compatibility rule. The architectural fetch/retention expectations come from MC68040UM section 4.2 and the paragraph after table 7-3. Timings in chapter 10 require a separate BCLK pipeline model; the current fixed one-native-cycle policy does not implement it.
The preceding 1.4.2-ocs020.55 work supplies experimental OCS 030/040 integration and
a distinct, integer-focused MC68060 diagnostic core. The 060 has its own
PCR identity, single supervisor stack with software M bit, removed-control-register
exceptions, vector-61 removed-integer traps, aligned CAS boundary, and eight-native-
clock approximate fixed timing policy. It is not a complete 68060 implementation:
FPU arithmetic, enabled MMU/transparent translation, BUSCR operation, full indexed
addressing and full exception/trace conformance remain unavailable or incomplete.
FPU control-register transfers and NULL/IDLE 12-byte state frames are implemented;
unsupported FPU forms stop explicitly. No JIT is provided for the 060.
The 040 now uses its documented CACR enable bits (15/31), with CINV/CPUSH line/page/all maintenance and privilege/encoding checks. Chip RAM permits instruction caching on 030/040 as well as 020. Cache capacity/associativity, copyback data, physical cache-fill timing and superscalar dispatch remain bounded policies, not hardware certification. The 000/020 execution profiles are preserved.
Native Kickstart 1.3 cannot boot this 060 profile. Its initial task FPU frame is four bytes; MC68060UM requires twelve even for NULL. The correctly sized restore consumes the following saved context and sends the task to address zero. A newer OS and 060-aware task/FPU support are required before desktop availability. The 030 and 040 native paths are validated separately by the CopperScreen consumer. Native boot and Lotus III replay evidence is maintained in the CopperScreen consumer. That evidence covers boot, demo and menu progress with retained inputs; it does not certify complete gameplay or physical accelerator timing.
Architectural sources: MC68060UM sections 3.2.2, 8.2.4, 11.1.2, C.2 and appendix D; MC68040UM section 2.2.2.5; M68000PRM CINV/CPUSH. Remaining features must be implemented from these contracts, without substituting 040 FPU frames or 68881 NULL frames to make old software boot.
Preceding prerelease 1.4.2-ocs020.54
Prerelease 1.4.2-ocs020.54 fixes indexed JSR and 13 further operand forms
reached by Kickstart 1.3 CopperHDF startup and native Fast RAM allocation/file I/O.
The added forms cover JMP, MOVE, MOVEA, ADD, ADDA, SUBA, ANDI, NOT,
CMPI and MOVEM. Focused cases check signed/scaled indexes, extension-word PC
bases (including MOVEM's preceding register mask), stack aliasing/alignment,
widths, flags and preserved surrounding memory. The shared 030 executor receives
these forms; 040 retains its fallback. Full index extensions remain explicitly
unsupported on these paths. The operand-shape timing policy remains approximate.
This prerelease is approved for publication; no additional host CPU is enabled.
The suite passes 3,395 cases, including 189 new HDF/indexed-control cases. Against
the preceding .53 binary, 162 of those new cases reproduce the missing forms;
27 fallback/full-extension controls pass. Six optional external conformance
cases are unavailable. Architectural expectations follow the instruction and
effective-address definitions in M68000PRM.
The preceding 1.4.2-ocs020.53 adds PC-relative brief-indexed LEA for the
020/EC020 Autoconfig boot path. The shared 030 executor receives the same operand
form; this does not enable another host CPU. Signed indexes, scale, PC base,
register aliasing and unchanged flags have focused coverage. Full index
extensions on this path remain unsupported; 040 keeps its existing fallback.
Instruction timing uses the existing bounded indexed-LEA policy.
Copper68k is a reusable C# Motorola 68000-family CPU emulation core extracted from CopperScreen and CopperMod. It provides interpreter backends for MC68000, MC68010, 68EC020, MC68020, MC68030, and MC68040-style execution behind a small bus/core API, plus an opt-in MC68040 JIT backend for hosts that expose stable code snapshots and write invalidation.
The package is intended for emulator projects that want to supply their own memory map, devices, interrupt sources, and host integration.
Install
dotnet add package Copper68k
Copper68k currently targets .NET 11.
Development version 1.4.2-ocs020.52
The advanced interpreter now distinguishes absolute and PC-relative memory
sources from immediate values for MOVE.L <ea>,(An). The old decoder mask could
copy an address as instruction bytes, corrupting later execution. Its 30-case
regression includes 24 memory-source failures under the old mask and six passing
immediate controls. Additional memory moves, arithmetic, logical/bit operations,
shifts and PC-relative jumps cover the newly reached Lotus III continuation path.
Tests check width, flags, signed/scaled addresses and ordered side effects when
source and destination address registers alias.
The 020 profiles now permit Chip RAM instruction caching. A Chip RAM code write retains the cached instruction until guest invalidation, as documented by Commodore's CacheClearE autodoc. Custom/CIA instruction fetches remain uncached; 030/040 profile policies are unchanged. Four enabled/disabled-cache regression cases cover both 020 variants. A standalone Chip RAM self-modification ROM agrees with WinUAE's stale-code/flush behavior. Cache-line fetch timing remains approximate and is not certified here.
This candidate extends the shared advanced interpreter for experimental OCS 68EC020/68020 integration. EC020 now advertises host code reads only when the underlying bus supplies that optional capability. Added operand forms cover MOVE, arithmetic/logical, condition-code, bit, MOVEM and rotate-through-extend operations exercised by Kickstart 1.3 and Lotus III startup. Regression cases cover operand width, flags, signed/scaled addressing, register aliasing, stack updates and optional code-reader behavior.
The 68000 implementation is unchanged; new advanced forms retain the 68040's existing fallback. The 68030 shares advanced execution code, but this work does not establish native 68030 host support. Missing advanced forms still fail explicitly. Operand-shape timing remains a bounded execution policy; it does not certify a particular accelerator card or the sequence-dependent timings in MC68020UM section 8. This is an unpublished development version, not a stable release. Native Kickstart boot and bounded Lotus III driving-demo/menu progression are covered; complete game compatibility, player-controlled racing, FPU/MMU behavior and physical timing conformance remain outside this slice.
The candidate passes 3,107 regular CPU tests, including 1,419 continuation cases across 020, EC020 and the shared 030 executor. The earlier 184 expansion cases and Chip RAM cache checks remain included. Six optional external conformance tests were unavailable and skipped.
Stable version 1.4.1
Copper68k 1.4.1 is the stable NuGet release. It retains the 68000 trace-exception
correction and prefetch-locality improvements from the 1.4.1-locality.1
development build. It further reduces interpreter stack initialization in cached
fixed-batch execution and avoids deferred interrupt-sample resolution when no
deferred-timing provider is present. The public API and emulated bus ordering are
unchanged.
The combined candidate passed all 1,499 regular Copper68k tests and all three retained CopperScreen performance workloads on the recorded Ryzen 5 5600X host. The one-sided 95% upper regression bound is below 1% for each workload; native Lemmings gains 2.76% paired FPS. Six optional external conformance suites were not run because their external datasets or generators are opt-in. See the complete benchmark and validation record for exact binaries, confidence bounds and coverage details.
Quick Start
Implement IM68kBus, create a core through M68kCoreFactory, reset it with an
initial PC and stack pointer, then execute instructions.
using Copper68k;
var bus = new RamBus(64 * 1024);
bus.WriteWord(0x1000, 0x7042); // MOVEQ #$42,D0
using var cpu = M68kCoreFactory.Default.Create(M68kCpuModel.M68000, bus);
cpu.Reset(programCounter: 0x1000, stackPointer: 0x2000);
cpu.ExecuteInstruction();
Console.WriteLine(cpu.State.D[0]); // 66
sealed class RamBus : IM68kBus
{
private readonly byte[] memory;
public RamBus(int size) => memory = new byte[size];
public byte ReadByte(uint address, ref long cycle, M68kBusAccessKind accessKind)
=> memory[address % memory.Length];
public ushort ReadWord(uint address, ref long cycle, M68kBusAccessKind accessKind)
=> (ushort)((ReadByte(address, ref cycle, accessKind) << 8) |
ReadByte(address + 1, ref cycle, accessKind));
public uint ReadLong(uint address, ref long cycle, M68kBusAccessKind accessKind)
=> ((uint)ReadWord(address, ref cycle, accessKind) << 16) |
ReadWord(address + 2, ref cycle, accessKind);
public void WriteByte(uint address, byte value, ref long cycle, M68kBusAccessKind accessKind)
=> memory[address % memory.Length] = value;
public void WriteWord(uint address, ushort value)
{
long cycle = 0;
WriteWord(address, value, ref cycle, M68kBusAccessKind.CpuDataWrite);
}
public void WriteWord(uint address, ushort value, ref long cycle, M68kBusAccessKind accessKind)
{
WriteByte(address, (byte)(value >> 8), ref cycle, accessKind);
WriteByte(address + 1, (byte)value, ref cycle, accessKind);
}
public void WriteLong(uint address, uint value, ref long cycle, M68kBusAccessKind accessKind)
{
WriteWord(address, (ushort)(value >> 16), ref cycle, accessKind);
WriteWord(address + 2, (ushort)value, ref cycle, accessKind);
}
public bool HasHostGateway(uint address) => false;
public bool TryInvokeHostGateway(uint instructionProgramCounter, uint token, M68kCpuState state)
=> false;
public void ResetExternalDevices(long cycle)
{
}
}
CPU Models
Use M68kCpuModel to select the default interpreter backend:
M68000: base 68000 interpreter with 68000-style exception frames.M68010: 68010-style core with VBR and a 24-bit external address bus.M68020: 68020-style core with VBR, format-zero exception frames, and native-cycle timing state.M68EC020: 68020-style core with a 24-bit external address bus and full 32-bit registers.M68030: 68030-oriented interpreter profile.M68040: 68040-oriented interpreter with the current integer/FPU/MMU support used by CopperScreen.
M68kCoreFactory.Create(model, bus) always creates the interpreter path. Use
the options overload only when you want a non-default execution mode.
MC68040 JIT
The MC68040 JIT is included in the package as an opt-in backend. The concrete
implementation remains internal; package consumers select it through
M68kCoreOptions.
using var cpu = M68kCoreFactory.Default.Create(
M68kCpuModel.M68040,
bus,
new M68kCoreOptions { ExecutionMode = M68kExecutionMode.Jit });
JIT mode is supported only for M68kCpuModel.M68040. Requesting it for another
model throws M68kEmulationException.
The bus must implement IM68kJitBus. That capability tells Copper68k which
physical code ranges are eligible for compilation, lets the JIT capture immutable
code snapshots for background compilation, and raises invalidation events when
writable code changes.
Hosts may also implement IM68kJitFastMemoryBus and
IM68kJitTimedMemoryBus to expose direct fast-memory paths or host-specific
timed device shortcuts. If those optional interfaces are absent, compiled traces
fall back to normal IM68kBus memory access.
Bus Contract
IM68kBus receives every CPU byte, word, and long access with an address, a
mutable cycle counter, and an access kind. Implementations may advance the
cycle counter to model memory wait states.
M68kBusAccessKind distinguishes instruction fetches, data reads, and data
writes. This matters for bus errors, address errors, MMU translation, and
device side effects.
HasHostGateway and TryInvokeHostGateway are optional host integration hooks.
The private gateway instruction is FF00 followed by a big-endian 32-bit opaque token.
Return false from both if your emulator does not use CopperMod host gateways.
Reset and Interrupts
Reset(programCounter, stackPointer) clears the general registers, sets the PC
and supervisor stack pointer, and initializes SR to 0x2700 (Supervisor | IPL 7), matching 68k reset behavior.
RequestInterrupt(level, vectorAddress) ignores levels that are masked by SR.
Pass a vector-table byte offset such as 24u * 4 for level 6 autovector, or a
device-specific vector offset. On 68020+ cores the offset is relative to the
current vector base register.
State
M68kCpuState exposes data registers D[0..7], address registers A[0..7],
the program counter, status register, stack pointers, cycle counters, STOP/HALT
state, and 68020+ control registers. Setting StatusRegister also updates the
active stack pointer when supervisor/user or master/interrupt stack mode
changes.
Status
Copper68k 1.1 is an accuracy-oriented emulator core with a stable,
intentionally small public API. Applications should create cores through
M68kCoreFactory and depend on IM68kBus, IM68kCore, M68kCpuModel,
M68kCpuState, and the optional JIT capability interfaces rather than
implementation-specific interpreter or JIT classes.
MC68000 fast-path coverage
The MC68000 interpreter retires instructions through one of several paths: a cycle-accurate scalar decoder, a planned dispatch that skips decoding, and cached fixed-plan runs that hoist the prefetch and bus-timing machinery out of hot loops entirely. All paths are held to byte-identical retired cycle counts by a differential test harness.
Register-direct forms of the following are admitted to the cached fixed-plan-run
path, so loops built from them stay on the fastest tier: NOP, MOVEQ, short
unconditional branches, ADDQ/SUBQ, long register OR/AND/EOR/ADD,
CLR/NEG/NEGX/NOT/TST, and shifts and rotates with an immediate count.
Shifts with a register-sourced count stay on the planned dispatch because their
cycle cost depends on register state.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- CopperFloat (= 1.0.0)
-
net11.0
- CopperFloat (= 1.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Copper68k:
| Package | Downloads |
|---|---|
|
CopperStart.FileSystem.Service
CopperFS filesystem service executing an embedded standalone CopperStart ROM on Copper68k. Writes require explicit opt-in storage. |
|
|
CopperMod.Amiga
Internal Amiga hardware emulation core layered on Copper68k for CUST playback and emulator hosts. |
|
|
CopperMod.Amiga.Emulator
Full Amiga emulator host services, boot helpers, and disk media adapters layered on CopperMod.Amiga. |
|
|
CopperMod.Amiga.Lightweight
Independent single-clock PAL OCS A500 engine with reusable framebuffer and 48 kHz stereo audio output. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.28 | 0 | 12/5/2026 |
| 1.5.27 | 60 | 12/4/2026 |
| 1.5.26 | 54 | 12/4/2026 |
| 1.5.25 | 74 | 12/4/2026 |
| 1.5.24 | 550 | 12/1/2026 |
| 1.5.23 | 129 | 12/1/2026 |
| 1.5.22 | 156 | 12/1/2026 |
| 1.5.21 | 178 | 12/1/2026 |
| 1.5.20 | 681 | 11/30/2026 |
| 1.5.19 | 558 | 11/30/2026 |
| 1.5.18 | 142 | 11/29/2026 |
| 1.5.17 | 138 | 11/29/2026 |
| 1.5.16 | 560 | 11/27/2026 |
| 1.5.15 | 207 | 11/26/2026 |
| 1.5.14 | 136 | 11/25/2026 |
| 1.5.13 | 126 | 11/24/2026 |
| 1.5.12 | 192 | 11/24/2026 |
| 1.5.11 | 238 | 11/24/2026 |
| 1.5.10 | 188 | 11/24/2026 |
| 1.5.9 | 99 | 11/24/2026 |
Preserve MC68000 long immediate and word address arithmetic timing across contended bus transfers. Sample short register ALU interrupts before the refill. Correct the Planet Rocklobster Voxel initial-clear timing and retain the prior indexed MOVE.W and MOVEM corrections.