for MEGA65 disabled FAST/SLOW commands in native mode
This commit is contained in:
1 parent
3b0f38e6b2
commit
5c5c14f76a
11 files changed
+62
-48
No files matched your search
@@ -29,11 +29,13 @@
|
||||
|
||||
;; #ALIAS# SELDEV = KERNAL_0.SELDEV
|
||||
|
||||
;
|
||||
; MEGA65 specific parts
|
||||
;
|
||||
|
||||
;; #ALIAS# map_end = KERNAL_0.map_end
|
||||
;; #ALIAS# map_NORMAL = KERNAL_0.map_NORMAL
|
||||
|
||||
;; #ALIAS# M65_MODEGET = KERNAL_0.M65_MODEGET
|
||||
;; #ALIAS# M65_MODESET = KERNAL_0.M65_MODESET
|
||||
;; #ALIAS# M65_SLOW = KERNAL_0.M65_SLOW
|
||||
;; #ALIAS# M65_FAST = KERNAL_0.M65_FAST
|
||||
;; #ALIAS# M65_SETWIN_Y = KERNAL_0.M65_SETWIN_Y
|
||||
@@ -6,18 +6,9 @@
|
||||
; Jumptable for BASIC commands with tokens prefixed by $01
|
||||
;
|
||||
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
|
||||
!set ITEM_00 = M65_SLOW
|
||||
!set ITEM_01 = M65_FAST
|
||||
|
||||
} else {
|
||||
|
||||
!set ITEM_00 = cmd_slow
|
||||
!set ITEM_01 = cmd_fast
|
||||
|
||||
}
|
||||
|
||||
!set ITEM_02 = cmd_old
|
||||
|
||||
; NOTE! These commands are temporarily placed here, they should be a part of list 02!
|
||||
|
||||
@@ -5,6 +5,32 @@
|
||||
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
|
||||
; NOTE: In native mode the system should not run at 1 MHz speed - it's dangerous,
|
||||
; as it uses compound instructions, which are not safe in 1MHz mode
|
||||
|
||||
cmd_slow: ; set CPU speed to 1 MHz
|
||||
|
||||
jsr helper_ensure_legacy_mode
|
||||
|
||||
lda #$40
|
||||
bra cmd_slow_fast_common
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_fast: ; set CPU speed to 40 MHz
|
||||
|
||||
jsr helper_ensure_legacy_mode
|
||||
|
||||
lda #$41
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_slow_fast_common:
|
||||
|
||||
sta CPU_D6510
|
||||
rts
|
||||
|
||||
|
||||
; For MEGA65 Kernal routines are called directly
|
||||
|
||||
} else ifdef CONFIG_MB_U64 {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
;; #LAYOUT# M65 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
helper_ensure_legacy_mode:
|
||||
|
||||
jsr M65_MODEGET
|
||||
+bcc do_LEGACY_MODE_ONLY_error
|
||||
|
||||
rts
|
||||
@@ -52,6 +52,14 @@ do_kernal_error: ; .A = KERNAL error code, also almost mat
|
||||
|
||||
; Error messages specific to Open ROMs BASIC dialect
|
||||
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
|
||||
do_LEGACY_MODE_ONLY_error:
|
||||
!byte $E6
|
||||
do_NATIVE_MODE_ONLY_error:
|
||||
!byte $E6
|
||||
}
|
||||
|
||||
do_MEMORY_CORRUPT_error:
|
||||
!byte $E6
|
||||
|
||||
|
||||
Reference in new issue
Block a user