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
@@ -67,13 +67,9 @@ Saves the binary data from the given memory area. NOTE: for now syntax differs f
|
||||
|
||||
Resets the machine. In direct mode asks for confirmation first.
|
||||
|
||||
### `FAST` (all)
|
||||
### `FAST`, `SLOW` (all)
|
||||
|
||||
Tries to switch the machine to turbo mode - details differ depending on the configured machine / motherboard.
|
||||
|
||||
### `SLOW` (all)
|
||||
|
||||
Tries to switch the machine back to 1 MHz operation mode.
|
||||
Tries to switch the machine to turbo mode (or back to 1MHz operation mode) - details differ depending on the configured machine / motherboard. On MEGA65 motherboard this is not available in native mode, it is not designed to run in 1MHz due to using compound CPU instructions.
|
||||
|
||||
### `OLD` (all)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
;; #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
|
||||
|
||||
@@ -14,12 +14,6 @@ M65_JMODEGET:
|
||||
M65_JISMODESET:
|
||||
jsr M65_MODESET
|
||||
|
||||
M65_JSLOW:
|
||||
jsr M65_SLOW
|
||||
|
||||
M65_JFAST:
|
||||
jsr M65_FAST
|
||||
|
||||
M65_JSELDEV:
|
||||
jsr SELDEV
|
||||
|
||||
|
||||
@@ -25,13 +25,15 @@ m65_mode64:
|
||||
jsr viciv_shutdown
|
||||
jsr vicii_init
|
||||
|
||||
; Reenable interrupts
|
||||
; Switch CPU speed back to normal
|
||||
|
||||
lda #$40
|
||||
sta CPU_D6510
|
||||
|
||||
; Reenable interrupts and quit
|
||||
|
||||
cli
|
||||
|
||||
; Switch CPU speed back to slow and quit
|
||||
|
||||
jmp M65_SLOW
|
||||
rts
|
||||
|
||||
|
||||
m65_mode65:
|
||||
@@ -42,7 +44,8 @@ m65_mode65:
|
||||
|
||||
; Switch CPU speed to fast
|
||||
|
||||
jsr M65_FAST
|
||||
lda #$41
|
||||
sta CPU_D6510
|
||||
|
||||
; Set the magic string to mark native mode
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
;; #LAYOUT# M65 KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
M65_SLOW: ; set CPU speed to 1 MHz
|
||||
|
||||
lda #$40
|
||||
+skip_2_bytes_trash_nvz
|
||||
|
||||
; FALLTROUGH
|
||||
|
||||
M65_FAST: ; set CPU speed to 40 MHz
|
||||
|
||||
lda #$41
|
||||
sta CPU_D6510
|
||||
rts
|
||||
@@ -276,7 +276,9 @@ const StringEntryList GLOBAL_Errors = { ListType::STRINGS_BASIC, "errors",
|
||||
{ true, true, true, true, "EV7_28", "NOT IMPLEMENTED" }, // this message actually differs from the CBM one
|
||||
{ false, false, false, false, "EV7_29", "FILE READ" }, // not used for now
|
||||
// STD M65 U64 X16 --- error strings specific to Open ROMs, not present in CBM BASIC dialects
|
||||
{ true, true, true, true, "EOR_2A", "MEMORY CORRUPT" },
|
||||
{ true, true, true, true, "EOR_2A", "MEMORY CORRUPT" },
|
||||
{ false, true, false, false, "EOR_2B", "NATIVE MODE ONLY" },
|
||||
{ false, true, false, false, "EOR_2C", "LEGACY MODE ONLY" },
|
||||
} };
|
||||
|
||||
// BASIC errors - miscelaneous strings
|
||||
|
||||
Reference in new issue
Block a user