forked from X16Community/x16-rom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KERNAL] Initial 65C816 support (X16Community#281)
* Proof of Concept for resolving the clash of UDTIM with the 65C816's NMIB vector. At $FFEA in the ROM is the jump table entry for UDTIM aka `jmp clock_update`. In native mode, the 65C816 reads its NMIB vector from $FFEA as well. By hardcoding the address for `clock_update`, which is an alias for `softclock_timer_update`, to an address with the low byte $XX, the NMIB handler can be hardcoded to $XX4C, as $4C is the opcode for an absolute `jmp`. This PoC uses $EEEE for `softclock_timer_update` and $EE4C for the NMIB handler as example values. * Add 65C816 support for NMI, IRQ and BRK * Add support for COP * Add native IRQ handler and make sure BASIC starts in emulation mode * Replace low RAM 65C816 detection variable with a runtime detection macro * SCREEN: Don't clobber Y * Handle DP and SP in native IRQ * Use 03 instead of 01 for CPU detection * Add native interrupt and emulated COP vectors and fully implement all interrupt types * Add native and emulated ABORT handler * Reorder segments so that C816_ABORT_NATIVE can sit at address * Add dedicated vectors in KVECTORS * Move the KERNAL signature to the SIGNATURE section (see X16Community/x16-emulator@23f1f14 * Fix COP and ABORT trampolines not being in low RAM * 65c816.s: Indent with tabs * Remove now-unused KVEC816 segment * Move 65c816.s to drivers/x16/65c816/interrupt.s * Fix SCREEN and IOBASE interrupt dispatch logic * Add first draft of stack API * fixup! Fix SCREEN and IOBASE interrupt dispatch logic * fixup! Fix SCREEN and IOBASE interrupt dispatch logic * STACK: Use an extra byte that is always for code simplification * Rename STACK_foo to stack_foo * Native IRQ: Call the KERNAL emulated IRQ code directly in native mode if the emulated IRQ vector hasn't been replaced * Add missing newline at end of files * Explicitely annotate 65C816 code with address & index width * fix minor error while rebasing * [KERNAL] add legacy/c816 extended APIs (X16Community#280) * [KERNAL] refactor, comment 65C816 native stack API * rewording comments * [KERNAL] implement native-capable jsrfar (X16Community#283) * [KERNAL] implement native-capable jsrfar * native jsrfar falls back to old code if in emulated mode * fix off-by-one error * fix up some logic, jmpfr need only be in one place * Save a couple cycles here * save a few more cycles w/ carry assumptions * add assert for jsrfar3n * saved one more cycle * trivial changes * trivial changes * updates to comments * updates to comments * no need to preserve X in the native jsrfar * fix stack misalignment issue in a 16-bit jsrfar call * requested changes * [KERNAL] typo in 816 native jsrfar RAM routine * [KERNAL] add extapi16 #0 test reflector call * [CI/CD] the first unit tests * [CI/CD] update build deps * [MONITOR] 65C816 emulation mode stack unwinding (X16Community#292) * [META] remove CODEX, move DIAG 16->7 (X16Community#293) --------- Co-authored-by: George Tokmaji <[email protected]>
- Loading branch information
1 parent
b45ccfc
commit 85878c1
Showing
104 changed files
with
1,342 additions
and
16,043 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.