migrated to ACME assembler
commit 145d64aa6e78838ed07cefed372f0ad6a4687e97 Author: FeralChild64 <you@example.com> Date: Sun Sep 20 20:16:57 2020 +0200 ACME adaptation commit 885209d7822286744ea53232ae7461472a01d5d6 Author: FeralChild64 <you@example.com> Date: Sun Sep 20 19:57:25 2020 +0200 ACME adaptation commit 334d84486bc603551887e7cbeb59d329f2224cc7 Author: FeralChild64 <you@example.com> Date: Sun Sep 20 18:29:15 2020 +0200 ACME adaptation commit b5966f49bcd8f0ca79cbec93819a31238924707e Author: FeralChild64 <you@example.com> Date: Sun Sep 20 18:09:31 2020 +0200 ACME adaptation commit 786536a93a5eab5e676fca99625b4eb094a554e7 Author: FeralChild64 <you@example.com> Date: Sun Sep 20 17:24:48 2020 +0200 ACME adaptation commit 704c70dfb1f5d68775d6f3da220803b8a3990f56 Author: FeralChild64 <you@example.com> Date: Sun Sep 20 15:07:12 2020 +0200 ACME adaptation commit 136874964c9083b375f151475310f9636871fc72 Author: FeralChild64 <you@example.com> Date: Sun Sep 20 14:45:14 2020 +0200 ACME adaptation commit 8eca0d5700b72d04336e72c5cd3a68e18b85f96d Author: FeralChild64 <you@example.com> Date: Sun Sep 20 14:06:52 2020 +0200 ACME adaptation commit 11d29eb7ee318239d782f85498b6d0524624d5c4 Author: FeralChild64 <you@example.com> Date: Sun Sep 20 13:56:45 2020 +0200 ACME apaptation commit c9b5e5e04cceb92c66bc027e6440bc0f7c5a499f Author: FeralChild64 <you@example.com> Date: Sun Sep 20 13:49:04 2020 +0200 ACME adaptation commit f5cc254cbc921f07863807468cb3fe26b410b409 Author: FeralChild64 <you@example.com> Date: Sun Sep 20 13:01:18 2020 +0200 ACME adaptation commit e135a27bf9c30cc0965379c954564e06406303b1 Author: FeralChild64 <you@example.com> Date: Sat Sep 19 21:55:01 2020 +0200 ACME adaptation commit e9dfddf90d9e2795e88b7da40ae050d733faeb56 Author: FeralChild64 <you@example.com> Date: Sat Sep 19 21:48:47 2020 +0200 Makefile fix commit 07030104c65cf5e5beeacf6d629ccb9245e58657 Author: FeralChild64 <you@example.com> Date: Sat Sep 19 21:42:00 2020 +0200 ACME adaptation commit f824362ee5bcfbffca86c430b57773b2ffd65655 Author: FeralChild64 <you@example.com> Date: Sat Sep 19 20:14:56 2020 +0200 ACME adaptation commit 3a3c59007dcd4940d89b8669f34ca56b61c25fdf Author: FeralChild64 <you@example.com> Date: Fri Sep 18 21:51:45 2020 +0200 ACME adaptation commit 6790ef7bc88a41de2881c69b7524dd4ab8c74b5d Author: FeralChild64 <you@example.com> Date: Fri Sep 18 20:35:23 2020 +0200 ACME adaptation commit 38ad18b90e9ec713aa7ca49576b3388ce1733357 Author: FeralChild64 <you@example.com> Date: Fri Sep 18 18:46:20 2020 +0200 ACME adaptation commit 541340371122a9702f7b2d9771c298223cffd0e9 Author: FeralChild64 <you@example.com> Date: Fri Sep 18 16:49:46 2020 +0200 ACME adaptation commit 25cfd5e186459be1a260d3eb8cfff767838de370 Author: FeralChild64 <you@example.com> Date: Thu Sep 17 20:13:33 2020 +0200 ACME adaptation commit f61599444d5b1d03d8fd8e4a6a7c3b85069bedb3 Author: FeralChild64 <you@example.com> Date: Thu Sep 17 19:29:23 2020 +0200 ACME adaptation commit b290be31ec7bb2e5723607697da1bbc621c84429 Author: FeralChild64 <you@example.com> Date: Thu Sep 17 17:20:14 2020 +0200 ACME adaptation commit 877be9e856880d98fd4bcb25b42aaaacda9dc463 Author: FeralChild64 <you@example.com> Date: Wed Sep 16 21:47:38 2020 +0200 ACME adaptation commit bb20edaf85d386e41d5c2f715b745b68fbd3362e Author: FeralChild64 <you@example.com> Date: Wed Sep 16 21:31:30 2020 +0200 ACME adaptation commit c5d31bd8685abce37c8e254d15aac20bd1570d9f Author: FeralChild64 <you@example.com> Date: Wed Sep 16 18:40:49 2020 +0200 ACME adaptation commit 29349826b38f8a89649171559dc8cf24c560aff1 Author: FeralChild64 <you@example.com> Date: Mon Sep 14 23:35:47 2020 +0200 ACME adaptation commit 8bcd6a621c4b11766d0cf34f79858ba90a67248e Author: FeralChild64 <you@example.com> Date: Mon Sep 14 22:52:25 2020 +0200 ACME adaptation commit e87a69edc2ce4bfcc460c31e08dcc352a985f88d Author: FeralChild64 <you@example.com> Date: Mon Sep 14 22:43:27 2020 +0200 ACME adaptation commit f49a097bd52e96d00b866c02bda7121e4543233c Author: FeralChild64 <you@example.com> Date: Mon Sep 14 19:02:07 2020 +0200 ACME adaptation commit fa0e9214a633b8e8f867cc70925b390940dcd426 Author: FeralChild64 <you@example.com> Date: Mon Sep 14 17:47:19 2020 +0200 ACME adaptation commit 1b763b91e7a03e426227129c7f22f0ce57a4c197 Author: FeralChild64 <you@example.com> Date: Mon Sep 14 17:17:10 2020 +0200 ACME adaptation commit e92a4b57b232cd85eb1e71090b8a89c7c8461ebc Author: FeralChild64 <you@example.com> Date: Mon Sep 14 17:15:37 2020 +0200 ACME adaptation commit de3c693e8a7e73ea5289198946058e3240894e6a Author: FeralChild64 <you@example.com> Date: Mon Sep 14 17:10:05 2020 +0200 ACME adaptation commit f9bd7ae0f04e932d613be9ed5cb19af9be5d338e Author: FeralChild64 <you@example.com> Date: Sun Sep 13 14:34:44 2020 +0200 ACME adaptation commit 694dee52555dbfc2b1f7f452a9671ff51106c057 Author: FeralChild64 <you@example.com> Date: Sun Sep 13 14:16:14 2020 +0200 ACME adaptation commit 0af2c55edfcd22942d9f25417eb0d35f55b71604 Author: FeralChild64 <you@example.com> Date: Fri Sep 11 17:38:09 2020 +0200 ACME adaptation commit 2015e17334bd56a1e8a13a5abc098d9c2e7ea44f Author: FeralChild64 <you@example.com> Date: Fri Sep 11 16:46:05 2020 +0200 ACME adaptation commit b1e972162798d60f4483cd6cc261e856c20c2c8c Author: FeralChild64 <you@example.com> Date: Fri Sep 11 16:24:31 2020 +0200 ACME adaptation commit 9d027e868466901ba53bf074a79ec8cf16273021 Author: FeralChild64 <you@example.com> Date: Fri Sep 11 15:04:31 2020 +0200 ACME adaptation commit 957186deddd1aa4f3b4f1aa1f421e4239a584e57 Author: FeralChild64 <you@example.com> Date: Thu Sep 10 22:49:07 2020 +0200 ACME adaptation commit b8060f67a455cfac109f08d96b62c360d693b931 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 23:07:28 2020 +0200 ACME adaptation commit e54d004568f44bbfe5c070ef1d7cf3544112e497 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 22:58:20 2020 +0200 ACME adaptation commit f90b77f073c5a605cb31c6ee451f65c8a8aff7d8 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 22:12:09 2020 +0200 ACME adaptation commit b211bb4afcd9c58fe1f5c92f3007717d611cd531 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 22:01:40 2020 +0200 ACME adaptation commit 8d7ea343b07e9e08e5f77f3c414758a6cffd0440 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 21:38:34 2020 +0200 ACME adaptation commit 46413eb0d92d6400aba0ff8dfe556e61e8a44d78 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 21:07:47 2020 +0200 ACME adaptation commit 9f98f69ecc21f7b74a5eb89e247f5a2c6fcb655d Author: FeralChild64 <you@example.com> Date: Wed Sep 9 20:05:03 2020 +0200 ACME adaptation commit 7bb9f1cadc682c7e0a4a6796739d860d473ca110 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 19:55:12 2020 +0200 ACME adaptation commit 5fc115392b5bdca6b56f67ad866b1884d2d2bdf8 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 19:31:10 2020 +0200 ACME adaptation commit b7940fc60e568d859df9e3156f6bacc6d685b2cc Author: FeralChild64 <you@example.com> Date: Wed Sep 9 19:16:09 2020 +0200 ACME adaptation commit 56288cb97197561afa0816b29c134ec1190e8eab Author: FeralChild64 <you@example.com> Date: Wed Sep 9 18:48:23 2020 +0200 ACME adaptation commit 10401a60fc7922a53d782120ef6795d889140218 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 16:34:16 2020 +0200 ACME adaptation commit 8ce76e4d2b56837a691ae84b1a412a2ae32a157b Author: FeralChild64 <you@example.com> Date: Wed Sep 9 16:20:44 2020 +0200 ACME adaptation commit 33fade899fa6172ea6b5b5f6683bb61f544429fd Author: FeralChild64 <you@example.com> Date: Wed Sep 9 15:28:46 2020 +0200 ACME adaptation commit a416f04734402fcfbc57a933731376df2e0180a1 Author: FeralChild64 <you@example.com> Date: Wed Sep 9 12:40:03 2020 +0200 ACME adaptation commit f8daee005b1d29f6912723be2ac94bc5fbeb0508 Author: FeralChild64 <you@example.com> Date: Mon Sep 7 23:29:54 2020 +0200 ACME adaptation commit 83fe6bdd0b08a44fdbfc6eefe323a4b194ccaf5b Author: FeralChild64 <you@example.com> Date: Mon Sep 7 22:23:16 2020 +0200 ACME adaptation commit cb1f75620b9c83000a15c9c7f7acefdfee79a979 Author: FeralChild64 <you@example.com> Date: Mon Sep 7 19:23:12 2020 +0200 ACME adaptation commit e524d517c933ae1f0aeb49764d307fadb4845025 Author: FeralChild64 <you@example.com> Date: Sun Sep 6 08:24:25 2020 +0200 ACME adaptation - replaced comments commit 2ab572c3a21f4a78a7312d0e684bc11d91d1717a Author: FeralChild64 <you@example.com> Date: Sat Sep 5 17:59:10 2020 +0200 ACME adaptation - replaced the assembler
This commit is contained in:
1 parent
bfc8291e41
commit
c8d255130c
685 files changed
+15835
-16296
No files matched your search
@@ -1,72 +1,64 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE-FLOAT
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE-FLOAT
|
||||
;; #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Definitions for communication with MEGA65 segment KERNAL_1 from KERNAL_0
|
||||
//
|
||||
;
|
||||
; Definitions for communication with MEGA65 segment KERNAL_1 from KERNAL_0
|
||||
;
|
||||
|
||||
|
||||
#if SEGMENT_KERNAL_0
|
||||
!ifdef SEGMENT_KERNAL_0 {
|
||||
|
||||
// Label definitions
|
||||
; Label definitions
|
||||
|
||||
.label VK1__IOINIT = $4000 + 2 * 0
|
||||
.label VK1__RAMTAS = $4000 + 2 * 1
|
||||
.label VK1__vicii_init = $4000 + 2 * 2
|
||||
.label VK1__load_tape_normal = $4000 + 2 * 3
|
||||
.label VK1__load_tape_turbo = $4000 + 2 * 4
|
||||
.label VK1__load_tape_auto = $4000 + 2 * 5
|
||||
.label VK1__tape_head_align = $4000 + 2 * 6
|
||||
.label VK1__m65_chrout_screen = $4000 + 2 * 7
|
||||
.label VK1__m65_chrin_keyboard = $4000 + 2 * 8
|
||||
.label VK1__M65_MODESET = $4000 + 2 * 9
|
||||
.label VK1__M65_SCRMODEGET = $4000 + 2 * 10
|
||||
.label VK1__M65_SCRMODESET = $4000 + 2 * 11
|
||||
.label VK1__M65_CLRSCR = $4000 + 2 * 12
|
||||
.label VK1__M65_CLRWIN = $4000 + 2 * 13
|
||||
.label VK1__m65_screen_upd_txtrow_off = $4000 + 2 * 14
|
||||
!addr VK1__IOINIT = $4000 + 2 * 0
|
||||
!addr VK1__RAMTAS = $4000 + 2 * 1
|
||||
!addr VK1__vicii_init = $4000 + 2 * 2
|
||||
!addr VK1__load_tape_normal = $4000 + 2 * 3
|
||||
!addr VK1__load_tape_turbo = $4000 + 2 * 4
|
||||
!addr VK1__load_tape_auto = $4000 + 2 * 5
|
||||
!addr VK1__tape_head_align = $4000 + 2 * 6
|
||||
!addr VK1__m65_chrout_screen = $4000 + 2 * 7
|
||||
!addr VK1__m65_chrin_keyboard = $4000 + 2 * 8
|
||||
!addr VK1__M65_MODESET = $4000 + 2 * 9
|
||||
!addr VK1__M65_SCRMODEGET = $4000 + 2 * 10
|
||||
!addr VK1__M65_SCRMODESET = $4000 + 2 * 11
|
||||
!addr VK1__M65_CLRSCR = $4000 + 2 * 12
|
||||
!addr VK1__M65_CLRWIN = $4000 + 2 * 13
|
||||
!addr VK1__m65_screen_upd_txtrow_off = $4000 + 2 * 14
|
||||
|
||||
#else
|
||||
} else {
|
||||
|
||||
// Vector table (Open ROMs private!)
|
||||
; Vector table (Open ROMs private!)
|
||||
|
||||
.word IOINIT
|
||||
.word RAMTAS
|
||||
.word vicii_init
|
||||
!word IOINIT
|
||||
!word RAMTAS
|
||||
!word vicii_init
|
||||
|
||||
#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_AUTODETECT
|
||||
.word load_tape_normal
|
||||
#else
|
||||
.word $0000
|
||||
#endif
|
||||
!ifdef CONFIG_TAPE_NORMAL { !ifndef CONFIG_TAPE_AUTODETECT {
|
||||
!word load_tape_normal
|
||||
} else { !word $0000 } } else { !word $0000 }
|
||||
|
||||
#if CONFIG_TAPE_TURBO && !CONFIG_TAPE_AUTODETECT
|
||||
.word load_tape_turbo
|
||||
#else
|
||||
.word $0000
|
||||
#endif
|
||||
!ifdef CONFIG_TAPE_TURBO { !ifndef CONFIG_TAPE_AUTODETECT {
|
||||
!word load_tape_turbo
|
||||
} else { !word $0000 } } else { !word $0000 }
|
||||
|
||||
#if CONFIG_TAPE_AUTODETECT
|
||||
.word load_tape_auto
|
||||
#else
|
||||
.word $0000
|
||||
#endif
|
||||
|
||||
#if CONFIG_TAPE_HEAD_ALIGN
|
||||
.word tape_head_align
|
||||
#else
|
||||
.word $0000
|
||||
#endif
|
||||
!ifdef CONFIG_TAPE_AUTODETECT {
|
||||
!word load_tape_auto
|
||||
} else { !word $0000 }
|
||||
|
||||
.word m65_chrout_screen
|
||||
.word m65_chrin_keyboard
|
||||
!ifdef CONFIG_TAPE_HEAD_ALIGN {
|
||||
!word tape_head_align
|
||||
} else { !word $0000 }
|
||||
|
||||
.word M65_MODESET
|
||||
.word M65_SCRMODEGET
|
||||
.word M65_SCRMODESET
|
||||
.word M65_CLRSCR
|
||||
.word M65_CLRWIN
|
||||
.word m65_screen_upd_txtrow_off
|
||||
!word m65_chrout_screen
|
||||
!word m65_chrin_keyboard
|
||||
|
||||
#endif
|
||||
!word M65_MODESET
|
||||
!word M65_SCRMODEGET
|
||||
!word M65_SCRMODESET
|
||||
!word M65_CLRSCR
|
||||
!word M65_CLRWIN
|
||||
!word m65_screen_upd_txtrow_off
|
||||
}
|
||||
@@ -1,79 +1,81 @@
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
// Helper routines for DMAgic usage
|
||||
; Helper routines for DMAgic usage
|
||||
|
||||
// See:
|
||||
// - https://c65gs.blogspot.com/2019/03/auto-detecting-required-revision-of.html
|
||||
// - https://c65gs.blogspot.com/2018/01/improving-dmagic-controller-interface.html
|
||||
; See:
|
||||
; - https://c65gs.blogspot.com/2019/03/auto-detecting-required-revision-of.html
|
||||
; - https://c65gs.blogspot.com/2018/01/improving-dmagic-controller-interface.html
|
||||
|
||||
|
||||
m65_dmagic_oper_fill:
|
||||
|
||||
// To configure job parameters, use:
|
||||
// - M65_DMAJOB_SIZE_*
|
||||
// - M65_DMAJOB_DST_*
|
||||
// - .A - byte for filling
|
||||
// Afterwards, consider M65_DMAJOB_*_2 and M65_DMAJOB_*_3 destroyed.
|
||||
; To configure job parameters, use:
|
||||
; - M65_DMAJOB_SIZE_*
|
||||
; - M65_DMAJOB_DST_*
|
||||
; - .A - byte for filling
|
||||
; Afterwards, consider M65_DMAJOB_DST_2 and M65_DMAJOB_*_3 destroyed.
|
||||
|
||||
// Set fill address
|
||||
; Set fill address
|
||||
|
||||
sta M65_DMAJOB_SRC_0
|
||||
|
||||
// Set operation type
|
||||
; Set operation type
|
||||
|
||||
lda #($03 + $08) // operation: FILL + allow interrupts
|
||||
lda #($03 + $08) ; operation: FILL + allow interrupts
|
||||
sta M65_DMAGIC_LIST+6
|
||||
|
||||
// Adapt the addresses, launch the job
|
||||
; XXX! put 0 into M65_DMAJOB_SRC_3 to clear the flags
|
||||
|
||||
; Adapt the addresses, launch the job
|
||||
|
||||
jsr m65_dmagic_adapt_dst
|
||||
jmp_8 m65_dmagic_launch
|
||||
bra m65_dmagic_launch
|
||||
|
||||
m65_dmagic_oper_copy:
|
||||
|
||||
// To configure job parameters, use:
|
||||
// - M65_DMAJOB_SIZE_*
|
||||
// - M65_DMAJOB_SRC_*
|
||||
// - M65_DMAJOB_DST_*
|
||||
// Afterwards, consider M65_DMAJOB_DST_2 and M65_DMAJOB_DST_3 destroyed.
|
||||
; To configure job parameters, use:
|
||||
; - M65_DMAJOB_SIZE_*
|
||||
; - M65_DMAJOB_SRC_*
|
||||
; - M65_DMAJOB_DST_*
|
||||
; Afterwards, consider M65_DMAJOB_*_2 and M65_DMAJOB_*_3 destroyed.
|
||||
|
||||
// Set operation type
|
||||
; Set operation type
|
||||
|
||||
lda #($00 + $08) // operation: COPY + allow interrupts
|
||||
lda #($00 + $08) ; operation: COPY + allow interrupts
|
||||
sta M65_DMAGIC_LIST+6
|
||||
|
||||
// Adapt the addresses, launch the job
|
||||
; Adapt the addresses, launch the job
|
||||
|
||||
jsr m65_dmagic_adapt_src
|
||||
jsr m65_dmagic_adapt_dst
|
||||
|
||||
// XXX prepare separate version for the opposite direction - change direction
|
||||
// by setting bit 6 of M65_DMAJOB_*_2
|
||||
; XXX possibly prepare separate version for the opposite direction - change direction
|
||||
; by setting bit 6 of M65_DMAJOB_*_2
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
m65_dmagic_launch:
|
||||
|
||||
// Launch the DMA list
|
||||
; Launch the DMA list
|
||||
|
||||
lda #$00
|
||||
sta DMA_ADDRBANK // $D702
|
||||
sta DMA_ADDRMB // $D704
|
||||
sta DMA_ADDRBANK ; $D702
|
||||
sta DMA_ADDRMB ; $D704
|
||||
|
||||
lda #>M65_DMAGIC_LIST
|
||||
sta DMA_ADDRMSB // $D701
|
||||
sta DMA_ADDRMSB ; $D701
|
||||
lda #<M65_DMAGIC_LIST
|
||||
sta DMA_ETRIG // $D705
|
||||
sta DMA_ETRIG ; $D705
|
||||
|
||||
rts
|
||||
|
||||
|
||||
m65_dmagic_adapt_src:
|
||||
|
||||
// We need to adapt the addresses:
|
||||
// - M65_DMAJOB_SRC_2 - contain bits 16-23, should contain 16-19
|
||||
// - M65_DMAJOB_SRC_3 - contain bits 24-27, should contain 20-27
|
||||
; We need to adapt the addresses:
|
||||
; - M65_DMAJOB_SRC_2 - contain bits 16-23, should contain 16-19
|
||||
; - M65_DMAJOB_SRC_3 - contain bits 24-27, should contain 20-27
|
||||
|
||||
lda M65_DMAJOB_SRC_2
|
||||
pha
|
||||
@@ -96,9 +98,9 @@ m65_dmagic_adapt_src:
|
||||
|
||||
m65_dmagic_adapt_dst:
|
||||
|
||||
// We need to adapt the addresses:
|
||||
// - M65_DMAJOB_DST_2 - contain bits 16-23, should contain 16-19
|
||||
// - M65_DMAJOB_DST_3 - contain bits 24-27, should contain 20-27
|
||||
; We need to adapt the addresses:
|
||||
; - M65_DMAJOB_DST_2 - contain bits 16-23, should contain 16-19
|
||||
; - M65_DMAJOB_DST_3 - contain bits 24-27, should contain 20-27
|
||||
|
||||
lda M65_DMAJOB_DST_2
|
||||
pha
|
||||
@@ -121,19 +123,20 @@ m65_dmagic_adapt_dst:
|
||||
|
||||
m65_dmagic_init:
|
||||
|
||||
// Set common job parameters
|
||||
; Set common job parameters
|
||||
|
||||
lda #$0A
|
||||
sta M65_DMAGIC_LIST+0 // <- $0A = use F018A list format (it is shorter by 1 byte)
|
||||
sta M65_DMAGIC_LIST+0 ; <- $0A = use F018A list format (it is shorter by 1 byte)
|
||||
lda #$80
|
||||
sta M65_DMAGIC_LIST+1 // <- $80 = next byte is highest 8 bits of source address
|
||||
inc_a
|
||||
sta M65_DMAGIC_LIST+3 // <- $81 = next byte is highest 8 bits of destination address
|
||||
sta M65_DMAGIC_LIST+1 ; <- $80 = next byte is highest 8 bits of source address
|
||||
inc
|
||||
sta M65_DMAGIC_LIST+3 ; <- $81 = next byte is highest 8 bits of destination address
|
||||
|
||||
lda #$00
|
||||
sta M65_DMAGIC_LIST+5 // <- end of options
|
||||
sta M65_DMAGIC_LIST+5 ; <- end of options
|
||||
|
||||
sta M65_DMAGIC_LIST+15 // <- set modulo to 0
|
||||
; !XXX modulo is ignored - remove these, shift M65_DMAGIC_LIST up by 2 bytes
|
||||
sta M65_DMAGIC_LIST+15 ; <- set modulo to 0
|
||||
sta M65_DMAGIC_LIST+16
|
||||
|
||||
rts
|
||||
@@ -1,101 +1,81 @@
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Definitions for calling MEGA65 segment KERNAL_0 routines from KERNAL_1
|
||||
//
|
||||
;; #IMPORT# KERNAL_0 = KERNAL_0_combined.sym
|
||||
|
||||
#import "KERNAL_0_combined.sym"
|
||||
;
|
||||
; Definitions for calling MEGA65 segment KERNAL_0 routines from KERNAL_1
|
||||
;
|
||||
|
||||
;; #ALIAS# CHROUT = KERNAL_0.proxy_K1_CHROUT
|
||||
;; #ALIAS# STOP = KERNAL_0.STOP
|
||||
;; #ALIAS# M65_SLOW = KERNAL_0.M65_SLOW
|
||||
;; #ALIAS# M65_FAST = KERNAL_0.M65_FAST
|
||||
;; #ALIAS# M65_MODEGET = KERNAL_0.M65_MODEGET
|
||||
;; #ALIAS# M65_SETWIN_XY = KERNAL_0.M65_SETWIN_XY
|
||||
;; #ALIAS# M65_SETWIN_WH = KERNAL_0.M65_SETWIN_WH
|
||||
;; #ALIAS# M65_SETWIN_N = KERNAL_0.M65_SETWIN_N
|
||||
;; #ALIAS# M65_SETWIN_Y = KERNAL_0.M65_SETWIN_Y
|
||||
|
||||
.label CHROUT = KERNAL_0.proxy_K1_CHROUT
|
||||
.label STOP = KERNAL_0.STOP
|
||||
.label M65_SLOW = KERNAL_0.M65_SLOW
|
||||
.label M65_FAST = KERNAL_0.M65_FAST
|
||||
.label M65_MODEGET = KERNAL_0.M65_MODEGET
|
||||
.label M65_SETWIN_XY = KERNAL_0.M65_SETWIN_XY
|
||||
.label M65_SETWIN_WH = KERNAL_0.M65_SETWIN_WH
|
||||
.label M65_SETWIN_N = KERNAL_0.M65_SETWIN_N
|
||||
.label M65_SETWIN_Y = KERNAL_0.M65_SETWIN_Y
|
||||
;; #ALIAS# map_NORMAL = KERNAL_0.map_NORMAL
|
||||
;; #ALIAS# map_KERNAL_1 = KERNAL_0.map_KERNAL_1
|
||||
|
||||
;; #ALIAS# screen_on = KERNAL_0.screen_on
|
||||
;; #ALIAS# screen_off = KERNAL_0.screen_off
|
||||
|
||||
#if (CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO) || (CONFIG_IEC_JIFFYDOS && !CONFIG_MEMORY_MODEL_60K)
|
||||
.label screen_on = KERNAL_0.screen_on
|
||||
.label screen_off = KERNAL_0.screen_off
|
||||
#endif
|
||||
;; #ALIAS# hw_entry_reset = KERNAL_0.hw_entry_reset
|
||||
;; #ALIAS# return_from_interrupt = KERNAL_0.return_from_interrupt
|
||||
;; #ALIAS# clrchn_reset = KERNAL_0.clrchn_reset
|
||||
;; #ALIAS# udtim_keyboard = KERNAL_0.udtim_keyboard
|
||||
;; #ALIAS# chrout_to_screen_code = KERNAL_0.chrout_to_screen_code
|
||||
;; #ALIAS# colour_codes = KERNAL_0.colour_codes
|
||||
;; #ALIAS# screen_check_toggle_quote = KERNAL_0.screen_check_toggle_quote
|
||||
;; #ALIAS# screen_code_to_petscii = KERNAL_0.screen_code_to_petscii
|
||||
|
||||
.label hw_entry_reset = KERNAL_0.hw_entry_reset
|
||||
.label return_from_interrupt = KERNAL_0.return_from_interrupt
|
||||
.label clrchn_reset = KERNAL_0.clrchn_reset
|
||||
.label udtim_keyboard = KERNAL_0.udtim_keyboard
|
||||
.label chrout_to_screen_code = KERNAL_0.chrout_to_screen_code
|
||||
.label colour_codes = KERNAL_0.colour_codes
|
||||
.label screen_check_toggle_quote = KERNAL_0.screen_check_toggle_quote
|
||||
.label screen_code_to_petscii = KERNAL_0.screen_code_to_petscii
|
||||
;; #ALIAS# setup_irq_timer = KERNAL_0.setup_irq_timer
|
||||
;; #ALIAS# wait_x_bars = KERNAL_0.wait_x_bars
|
||||
;; #ALIAS# viciv_unhide = KERNAL_0.viciv_unhide
|
||||
;; #ALIAS# viciv_init = KERNAL_0.viciv_init
|
||||
;; #ALIAS# viciv_shutdown = KERNAL_0.viciv_shutdown
|
||||
;; #ALIAS# viciv_hotregs_on = KERNAL_0.viciv_hotregs_on
|
||||
;; #ALIAS# viciv_hotregs_off = KERNAL_0.viciv_hotregs_off
|
||||
|
||||
.label setup_irq_timer = KERNAL_0.setup_irq_timer
|
||||
.label wait_x_bars = KERNAL_0.wait_x_bars
|
||||
.label viciv_unhide = KERNAL_0.viciv_unhide
|
||||
.label viciv_init = KERNAL_0.viciv_init
|
||||
.label viciv_shutdown = KERNAL_0.viciv_shutdown
|
||||
.label viciv_hotregs_on = KERNAL_0.viciv_hotregs_on
|
||||
.label viciv_hotregs_off = KERNAL_0.viciv_hotregs_off
|
||||
;; #ALIAS# m65_clr_magictstr = KERNAL_0.m65_clr_magictstr
|
||||
;; #ALIAS# m65_scrtab_txtwidth = KERNAL_0.m65_scrtab_txtwidth
|
||||
;; #ALIAS# m65_scrtab_txtheight = KERNAL_0.m65_scrtab_txtheight
|
||||
;; #ALIAS# m65_screen_set_indx = KERNAL_0.m65_screen_set_indx
|
||||
;; #ALIAS# cursor_enable = KERNAL_0.cursor_enable
|
||||
;; #ALIAS# cursor_undraw_cont = KERNAL_0.cursor_undraw_cont
|
||||
;; #ALIAS# cursor_timer_reset = KERNAL_0.cursor_timer_reset
|
||||
;; #ALIAS# cursor_show_if_enabled = KERNAL_0.cursor_show_if_enabled
|
||||
;; #ALIAS# chrin_programmable_keys = KERNAL_0.proxy_K1_chrin_programmable_keys
|
||||
;; #ALIAS# pop_keyboard_buffer = KERNAL_0.pop_keyboard_buffer
|
||||
|
||||
.label m65_clr_magictstr = KERNAL_0.m65_clr_magictstr
|
||||
.label m65_scrtab_txtwidth = KERNAL_0.m65_scrtab_txtwidth
|
||||
.label m65_scrtab_txtheight = KERNAL_0.m65_scrtab_txtheight
|
||||
.label m65_screen_set_indx = KERNAL_0.m65_screen_set_indx
|
||||
.label cursor_enable = KERNAL_0.cursor_enable
|
||||
.label cursor_undraw_cont = KERNAL_0.cursor_undraw_cont
|
||||
.label cursor_timer_reset = KERNAL_0.cursor_timer_reset
|
||||
.label cursor_show_if_enabled = KERNAL_0.cursor_show_if_enabled
|
||||
.label chrin_programmable_keys = KERNAL_0.proxy_K1_chrin_programmable_keys
|
||||
.label pop_keyboard_buffer = KERNAL_0.pop_keyboard_buffer
|
||||
;; #ALIAS# iec_set_idle = KERNAL_0.iec_set_idle
|
||||
|
||||
#if CONFIG_IEC
|
||||
;; #ALIAS# tape_motor_on = KERNAL_0.tape_motor_on
|
||||
;; #ALIAS# tape_motor_off = KERNAL_0.tape_motor_off
|
||||
|
||||
.label iec_set_idle = KERNAL_0.iec_set_idle
|
||||
;; #ALIAS# lvs_display_loading_verifying = KERNAL_0.proxy_K1_lvs_display_loading_verifying
|
||||
;; #ALIAS# lvs_display_done = KERNAL_0.proxy_K1_lvs_display_done
|
||||
;; #ALIAS# lvs_return_last_address = KERNAL_0.proxy_K1_lvs_return_last_address
|
||||
;; #ALIAS# lvs_device_not_found_error = KERNAL_0.proxy_K1_lvs_device_not_found_error
|
||||
;; #ALIAS# lvs_load_verify_error = KERNAL_0.proxy_K1_lvs_load_verify_error
|
||||
;; #ALIAS# m65_load_autoswitch_tape = KERNAL_0.proxy_K1_m65_load_autoswitch_tape
|
||||
|
||||
#endif
|
||||
;; #ALIAS# lvs_check_EAL = KERNAL_0.lvs_check_EAL
|
||||
;; #ALIAS# lvs_STAL_to_MEMUSS = KERNAL_0.lvs_STAL_to_MEMUSS
|
||||
|
||||
;; #ALIAS# kernalerror_ROUTINE_TERMINATED = KERNAL_0.proxy_K1_kernalerror_ROUTINE_TERMINATED
|
||||
|
||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||
;; #ALIAS# print_kernal_message = KERNAL_0.proxy_K1_print_kernal_message
|
||||
;; #ALIAS# print_return = KERNAL_0.proxy_K1_print_return
|
||||
|
||||
.label tape_motor_on = KERNAL_0.tape_motor_on
|
||||
.label tape_motor_off = KERNAL_0.tape_motor_off
|
||||
;; #ALIAS# __MSG_KERNAL_PRESS_PLAY = KERNAL_0.__MSG_KERNAL_PRESS_PLAY
|
||||
;; #ALIAS# __MSG_KERNAL_OK_SEARCHING = KERNAL_0.__MSG_KERNAL_OK_SEARCHING
|
||||
;; #ALIAS# __MSG_KERNAL_FOUND = KERNAL_0.__MSG_KERNAL_FOUND
|
||||
|
||||
.label lvs_display_loading_verifying = KERNAL_0.proxy_K1_lvs_display_loading_verifying
|
||||
.label lvs_display_done = KERNAL_0.proxy_K1_lvs_display_done
|
||||
.label lvs_return_last_address = KERNAL_0.proxy_K1_lvs_return_last_address
|
||||
.label lvs_device_not_found_error = KERNAL_0.proxy_K1_lvs_device_not_found_error
|
||||
.label lvs_load_verify_error = KERNAL_0.proxy_K1_lvs_load_verify_error
|
||||
.label m65_load_autoswitch_tape = KERNAL_0.proxy_K1_m65_load_autoswitch_tape
|
||||
;; #ALIAS# tape_normal_byte_store = KERNAL_0.tape_normal_byte_store
|
||||
|
||||
.label lvs_check_EAL = KERNAL_0.lvs_check_EAL
|
||||
.label lvs_STAL_to_MEMUSS = KERNAL_0.lvs_STAL_to_MEMUSS
|
||||
|
||||
.label kernalerror_ROUTINE_TERMINATED = KERNAL_0.proxy_K1_kernalerror_ROUTINE_TERMINATED
|
||||
|
||||
.label print_kernal_message = KERNAL_0.proxy_K1_print_kernal_message
|
||||
.label print_return = KERNAL_0.proxy_K1_print_return
|
||||
|
||||
.label __MSG_KERNAL_PRESS_PLAY = KERNAL_0.__MSG_KERNAL_PRESS_PLAY
|
||||
.label __MSG_KERNAL_OK_SEARCHING = KERNAL_0.__MSG_KERNAL_OK_SEARCHING
|
||||
.label __MSG_KERNAL_FOUND = KERNAL_0.__MSG_KERNAL_FOUND
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if CONFIG_TAPE_NORMAL
|
||||
|
||||
.label tape_normal_byte_store = KERNAL_0.tape_normal_byte_store
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if CONFIG_TAPE_HEAD_ALIGN
|
||||
|
||||
.label CLALL = KERNAL_0.proxy_K1_CLALL
|
||||
.label nmi_lock = KERNAL_0.nmi_lock
|
||||
|
||||
#endif
|
||||
;; #ALIAS# CLALL = KERNAL_0.proxy_K1_CLALL
|
||||
;; #ALIAS# nmi_lock = KERNAL_0.nmi_lock
|
||||
@@ -1,43 +1,43 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Automatic switching to legacy C64 mode if loading anything below $0800
|
||||
//
|
||||
;
|
||||
; Automatic switching to legacy C64 mode if loading anything below $0800
|
||||
;
|
||||
|
||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||
!ifdef HAS_TAPE {
|
||||
|
||||
|
||||
m65_load_autoswitch_tape:
|
||||
|
||||
lda VERCKK
|
||||
bne m65_load_autoswitch_done // no autoswitch for VERIFY
|
||||
bne m65_load_autoswitch_done ; no autoswitch for VERIFY
|
||||
|
||||
lda STAL+1
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
m65_load_autoswitch:
|
||||
|
||||
lda VERCKK
|
||||
bne m65_load_autoswitch_done // no autoswitch for VERIFY
|
||||
bne m65_load_autoswitch_done ; no autoswitch for VERIFY
|
||||
|
||||
lda EAL+1
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
m65_load_autoswitch_check:
|
||||
|
||||
cmp #$08
|
||||
bcs m65_load_autoswitch_done // no autoswitch if loading above $07FF
|
||||
bcs m65_load_autoswitch_done ; no autoswitch if loading above $07FF
|
||||
|
||||
jsr M65_MODEGET
|
||||
bcs m65_load_autoswitch_done // no autoswitch if already in legacy mode
|
||||
bcs m65_load_autoswitch_done ; no autoswitch if already in legacy mode
|
||||
|
||||
sec
|
||||
jmp M65_MODESET
|
||||
|
||||
// XXX consider displaying something here
|
||||
; XXX consider displaying something here
|
||||
|
||||
m65_load_autoswitch_done:
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// ROM mapping routines for MEGA65
|
||||
//
|
||||
;
|
||||
; ROM mapping routines for MEGA65
|
||||
;
|
||||
|
||||
// Available memory maps:
|
||||
// - NORMAL - nothing mapped in
|
||||
// - KERNAL_1 - for calling KERNAL_1 segment code
|
||||
// - DOS_1 - for swiching to DOS context
|
||||
// - NORMAL_from_DOS_1 - for switching bact from DOS context
|
||||
; Available memory maps:
|
||||
; - NORMAL - nothing mapped in
|
||||
; - KERNAL_1 - for calling KERNAL_1 segment code
|
||||
; - DOS_1 - for swiching to DOS context
|
||||
; - NORMAL_from_DOS_1 - for switching bact from DOS context
|
||||
|
||||
|
||||
map_NORMAL:
|
||||
@@ -22,7 +22,7 @@ map_NORMAL:
|
||||
|
||||
lda #$00
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
map_NORMAL_common:
|
||||
|
||||
@@ -30,14 +30,14 @@ map_NORMAL_common:
|
||||
tay
|
||||
taz
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
map_end:
|
||||
|
||||
map
|
||||
eom
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
map_end_no_eom:
|
||||
|
||||
@@ -62,9 +62,9 @@ map_KERNAL_1:
|
||||
tay
|
||||
taz
|
||||
|
||||
ldx #$42 // $4000 <- map 8KB from $20000
|
||||
ldx #$42 ; $4000 <- map 8KB from $20000
|
||||
|
||||
jmp_8 map_end
|
||||
bra map_end
|
||||
|
||||
map_DOS_1:
|
||||
|
||||
@@ -75,17 +75,17 @@ map_DOS_1:
|
||||
phz
|
||||
|
||||
lda #$80
|
||||
tab // from now on, zeropage starts from $C000
|
||||
tab ; from now on, zeropage starts from $C000
|
||||
|
||||
ldy #$80
|
||||
lda #$30
|
||||
taz // $8000 <- map 16KB RAM from $10000
|
||||
taz ; $8000 <- map 16KB RAM from $10000
|
||||
|
||||
lda #$C0
|
||||
ldx #$C1 // $4000 <- map 16KB ROM from $20000
|
||||
ldx #$C1 ; $4000 <- map 16KB ROM from $20000
|
||||
|
||||
map
|
||||
jmp_8 map_end_no_eom // no EOM, we do not want interrupts within DOS!
|
||||
bra map_end_no_eom ; no EOM, we do not want interrupts within DOS!
|
||||
|
||||
map_NORMAL_from_DOS_1:
|
||||
|
||||
@@ -98,4 +98,4 @@ map_NORMAL_from_DOS_1:
|
||||
lda #$00
|
||||
tab
|
||||
|
||||
jmp_8 map_NORMAL_common
|
||||
bra map_NORMAL_common
|
||||
@@ -1,21 +1,21 @@
|
||||
// #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_1 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
m65_native_meminit:
|
||||
|
||||
// Prepare generic DMAgic list
|
||||
; Prepare generic DMAgic list
|
||||
|
||||
jsr m65_dmagic_init
|
||||
|
||||
// Copy MEGA65 charset to target location - set size
|
||||
; Copy MEGA65 charset to target location - set size
|
||||
|
||||
lda #$00
|
||||
sta M65_DMAJOB_SIZE_0
|
||||
lda #$10
|
||||
sta M65_DMAJOB_SIZE_1
|
||||
|
||||
// Set destination
|
||||
; Set destination
|
||||
|
||||
lda #$00
|
||||
sta M65_DMAJOB_DST_3
|
||||
@@ -26,7 +26,7 @@ m65_native_meminit:
|
||||
lda #<MEMCONF_CHRBASE
|
||||
sta M65_DMAJOB_DST_0
|
||||
|
||||
// Set source
|
||||
; Set source
|
||||
|
||||
lda #$00
|
||||
sta M65_DMAJOB_SRC_3
|
||||
@@ -37,6 +37,6 @@ m65_native_meminit:
|
||||
lda #$00
|
||||
sta M65_DMAJOB_SRC_0
|
||||
|
||||
// Launch the DMA job
|
||||
; Launch the DMA job
|
||||
|
||||
jmp m65_dmagic_oper_copy
|
||||
@@ -1,25 +1,29 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Proxies for calling MEGA65 segment KERNAL_0 routines from KERNAL_1
|
||||
//
|
||||
;
|
||||
; Proxies for calling MEGA65 segment KERNAL_0 routines from KERNAL_1
|
||||
;
|
||||
|
||||
|
||||
proxy_K1_chrin_programmable_keys:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr chrin_programmable_keys
|
||||
jmp_8 !+
|
||||
bra proxy_K1_end
|
||||
|
||||
proxy_K1_CHROUT:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr CHROUT
|
||||
!:
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
proxy_K1_end:
|
||||
|
||||
jmp map_KERNAL_1
|
||||
|
||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||
!ifdef HAS_TAPE {
|
||||
|
||||
proxy_K1_kernalerror_ROUTINE_TERMINATED:
|
||||
|
||||
@@ -30,13 +34,13 @@ proxy_K1_lvs_display_loading_verifying:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr lvs_display_loading_verifying
|
||||
jmp_8 !-
|
||||
bra proxy_K1_end
|
||||
|
||||
proxy_K1_lvs_display_done:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr lvs_display_done
|
||||
jmp_8 !-
|
||||
bra proxy_K1_end
|
||||
|
||||
proxy_K1_lvs_return_last_address:
|
||||
|
||||
@@ -57,28 +61,27 @@ proxy_K1_m65_load_autoswitch_tape:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr m65_load_autoswitch_tape
|
||||
jmp_8 !-
|
||||
bra proxy_K1_end
|
||||
|
||||
proxy_K1_print_kernal_message:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr print_kernal_message
|
||||
jmp_8 !-
|
||||
bra proxy_K1_end
|
||||
|
||||
proxy_K1_print_return:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr print_return
|
||||
jmp_8 !-
|
||||
bra proxy_K1_end
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if CONFIG_TAPE_HEAD_ALIGN
|
||||
!ifdef CONFIG_TAPE_HEAD_ALIGN {
|
||||
|
||||
proxy_K1_CLALL:
|
||||
|
||||
jsr map_NORMAL
|
||||
jsr CLALL
|
||||
jmp_8 !-
|
||||
|
||||
#endif
|
||||
bra proxy_K1_end
|
||||
}
|
||||
@@ -1,41 +1,41 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// ROM routine call redirect for MEGA65 API routines
|
||||
//
|
||||
;
|
||||
; ROM routine call redirect for MEGA65 API routines
|
||||
;
|
||||
|
||||
M65_MODESET:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__M65_MODESET
|
||||
bra m65_api_end
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__M65_MODESET)
|
||||
bra m65_api_end
|
||||
|
||||
M65_SCRMODEGET:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__M65_SCRMODEGET
|
||||
bra m65_api_end
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__M65_SCRMODEGET)
|
||||
bra m65_api_end
|
||||
|
||||
M65_SCRMODESET:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__M65_SCRMODESET
|
||||
bra m65_api_end
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__M65_SCRMODESET)
|
||||
bra m65_api_end
|
||||
|
||||
M65_CLRSCR:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__M65_CLRSCR
|
||||
bra m65_api_end
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__M65_CLRSCR)
|
||||
bra m65_api_end
|
||||
|
||||
M65_CLRWIN:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__M65_CLRWIN
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__M65_CLRWIN)
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
m65_api_end:
|
||||
|
||||
jmp map_NORMAL
|
||||
jmp map_NORMAL
|
||||
@@ -1,26 +1,26 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// ROM routine call redirect for MEGA65 screen routines
|
||||
//
|
||||
;
|
||||
; ROM routine call redirect for MEGA65 screen routines
|
||||
;
|
||||
|
||||
|
||||
m65_chrout_screen:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__m65_chrout_screen
|
||||
jsr map_NORMAL
|
||||
jmp chrout_done_success
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__m65_chrout_screen)
|
||||
jsr map_NORMAL
|
||||
jmp chrout_done_success
|
||||
|
||||
m65_chrin_keyboard:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__m65_chrin_keyboard
|
||||
jmp map_NORMAL
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__m65_chrin_keyboard)
|
||||
jmp map_NORMAL
|
||||
|
||||
m65_screen_upd_txtrow_off:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__m65_screen_upd_txtrow_off
|
||||
jmp map_NORMAL
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__m65_screen_upd_txtrow_off)
|
||||
jmp map_NORMAL
|
||||
@@ -1,50 +1,46 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// ROM routine call redirect for tape routines
|
||||
//
|
||||
;
|
||||
; ROM routine call redirect for tape routines
|
||||
;
|
||||
|
||||
|
||||
#if CONFIG_TAPE_NORMAL && !CONFIG_TAPE_AUTODETECT
|
||||
!ifdef CONFIG_TAPE_NORMAL { !ifndef CONFIG_TAPE_AUTODETECT {
|
||||
|
||||
load_tape_normal:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__load_tape_normal
|
||||
jmp map_NORMAL
|
||||
|
||||
#endif
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__load_tape_normal)
|
||||
jmp map_NORMAL
|
||||
} }
|
||||
|
||||
|
||||
#if CONFIG_TAPE_TURBO && !CONFIG_TAPE_AUTODETECT
|
||||
!ifdef CONFIG_TAPE_TURBO { !ifndef CONFIG_TAPE_AUTODETECT {
|
||||
|
||||
load_tape_turbo:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__load_tape_turbo
|
||||
jmp map_NORMAL
|
||||
|
||||
#endif
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__load_tape_turbo)
|
||||
jmp map_NORMAL
|
||||
} }
|
||||
|
||||
|
||||
#if CONFIG_TAPE_AUTODETECT
|
||||
!ifdef CONFIG_TAPE_AUTODETECT {
|
||||
|
||||
load_tape_auto:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__load_tape_auto
|
||||
jmp map_NORMAL
|
||||
|
||||
#endif
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__load_tape_auto)
|
||||
jmp map_NORMAL
|
||||
}
|
||||
|
||||
|
||||
#if CONFIG_TAPE_HEAD_ALIGN
|
||||
!ifdef CONFIG_TAPE_HEAD_ALIGN {
|
||||
|
||||
tape_head_align:
|
||||
|
||||
jsr map_KERNAL_1
|
||||
jsr_ind VK1__tape_head_align
|
||||
jmp map_NORMAL
|
||||
|
||||
#endif
|
||||
jsr map_KERNAL_1
|
||||
jsr (VK1__tape_head_align)
|
||||
jmp map_NORMAL
|
||||
}
|
||||
@@ -1,26 +1,28 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
// MEGA65 specific part of the hardware
|
||||
; MEGA65 specific part of the hardware
|
||||
|
||||
|
||||
m65_reset_part:
|
||||
|
||||
jsr map_NORMAL // we want normal memory mapping
|
||||
jsr viciv_shutdown // by default we do not want the VIC-IV
|
||||
jsr map_NORMAL ; we want normal memory mapping
|
||||
jsr viciv_shutdown ; by default we do not want the VIC-IV
|
||||
|
||||
jsr M65_MODEGET
|
||||
bcs !+
|
||||
bcs m65_clr_end
|
||||
|
||||
// Clear MEAGA65 native mode mark, it might cause confusion
|
||||
; Clear MEAGA65 native mode mark, it might cause confusion
|
||||
|
||||
m65_clr_magictstr: // entry point for mode switching routine
|
||||
m65_clr_magictstr: ; entry point for mode switching routine
|
||||
|
||||
lda #$00
|
||||
sta M65_MAGICSTR+0
|
||||
sta M65_MAGICSTR+1
|
||||
sta M65_MAGICSTR+2
|
||||
|
||||
// FALLTROUGH
|
||||
!:
|
||||
; FALLTROUGH
|
||||
|
||||
m65_clr_end:
|
||||
|
||||
rts
|
||||
@@ -1,12 +1,12 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Tape (normal) helper routine - byte storage when banking change is needed
|
||||
//
|
||||
;
|
||||
; Tape (normal) helper routine - byte storage when banking change is needed
|
||||
;
|
||||
|
||||
|
||||
#if CONFIG_TAPE_NORMAL
|
||||
!ifdef CONFIG_TAPE_NORMAL {
|
||||
|
||||
|
||||
tape_normal_byte_store:
|
||||
@@ -14,6 +14,4 @@ tape_normal_byte_store:
|
||||
jsr map_NORMAL
|
||||
sta (MEMUSS), y
|
||||
jmp map_KERNAL_1
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1,36 +1,40 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Routine to initialize VIC-IV for entering MEGA65 native mode
|
||||
//
|
||||
;
|
||||
; Routine to initialize VIC-IV for entering MEGA65 native mode
|
||||
;
|
||||
|
||||
|
||||
viciv_init:
|
||||
|
||||
// Switch VIC to VIC-IV mode
|
||||
; Switch VIC to VIC-IV mode
|
||||
|
||||
jsr viciv_unhide
|
||||
|
||||
// Disable badlines and slow interrupt emulation
|
||||
; Disable badlines and slow interrupt emulation
|
||||
|
||||
lda #$00
|
||||
sta MISC_EMU
|
||||
|
||||
// Set misc VIC-IV flags
|
||||
; Set misc VIC-IV flags
|
||||
|
||||
lda #%01000000 // enable C65 character set
|
||||
lda #%01000000 ; enable C65 character set
|
||||
sta VIC_CTRLA
|
||||
|
||||
// Disable hot registers
|
||||
; Disable hot registers
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
viciv_hotregs_off:
|
||||
|
||||
lda VIC_SRH
|
||||
and #$7F
|
||||
!:
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
viciv_hotregs_common:
|
||||
|
||||
sta VIC_SRH
|
||||
|
||||
rts
|
||||
@@ -39,4 +43,4 @@ viciv_hotregs_on:
|
||||
|
||||
lda VIC_SRH
|
||||
ora #$80
|
||||
bra !-
|
||||
bra viciv_hotregs_common
|
||||
@@ -1,33 +1,33 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Routine to shutdown VIC-IV for leaving MEGA65 native mode
|
||||
//
|
||||
;
|
||||
; Routine to shutdown VIC-IV for leaving MEGA65 native mode
|
||||
;
|
||||
|
||||
|
||||
viciv_shutdown:
|
||||
|
||||
// Switch VIC to VIC-IV mode, temporarily
|
||||
; Switch VIC to VIC-IV mode, temporarily
|
||||
|
||||
jsr viciv_unhide
|
||||
|
||||
// Reenable badlines and slow interrupt emulation
|
||||
; Reenable badlines and slow interrupt emulation
|
||||
|
||||
lda #$03
|
||||
sta MISC_EMU
|
||||
|
||||
// Set misc VIC-IV flags
|
||||
; Set misc VIC-IV flags
|
||||
|
||||
lda #%00000000
|
||||
sta VIC_CTRLA // enable C64 character set
|
||||
sta VIC_CTRLB // disable extended resolution and attributes
|
||||
sta VIC_CTRLA ; enable C64 character set
|
||||
sta VIC_CTRLB ; disable extended resolution and attributes
|
||||
|
||||
// Reenable hot registers
|
||||
; Reenable hot registers
|
||||
|
||||
jsr viciv_hotregs_on
|
||||
|
||||
// Hide VIC-IV registers and quit
|
||||
; Hide VIC-IV registers and quit
|
||||
|
||||
sta VIC_KEY
|
||||
rts
|
||||
@@ -1,9 +1,9 @@
|
||||
// #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Routine to unhide MEGA65 extra registers
|
||||
//
|
||||
;
|
||||
; Routine to unhide MEGA65 extra registers
|
||||
;
|
||||
|
||||
|
||||
viciv_unhide:
|
||||
|
||||
Reference in new issue
Block a user