added command to change color palette on MEGA65

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2021-01-26 00:03:07 +01:00
1 parent 0c5f08c775
commit 413183474b
13 files changed
+701 -251

No files matched your search

+2
View File
@@ -45,6 +45,8 @@
;; #ALIAS# M65_MODESET = KERNAL_0.M65_MODESET
;; #ALIAS# M65_SETWIN_Y = KERNAL_0.M65_SETWIN_Y
;; #ALIAS# m65_colorset = KERNAL_0.m65_colorset
;
; Ultimate 64 specific parts
;
@@ -9,6 +9,7 @@
!set ITEM_02 = cmd_monitor
!set ITEM_03 = BOOTCPM
!set ITEM_04 = cmd_joycrsr
!set ITEM_05 = cmd_colorset
!ifndef HAS_OPCODES_65C02 {
@@ -18,12 +19,16 @@ command_04_jumptable_lo:
!byte <(ITEM_01-1)
!byte <(ITEM_02-1)
!byte <(ITEM_03-1)
!byte <(ITEM_04-1)
!byte <(ITEM_05-1)
command_04_jumptable_hi:
!byte >(ITEM_01-1)
!byte >(ITEM_02-1)
!byte >(ITEM_03-1)
!byte >(ITEM_04-1)
!byte >(ITEM_05-1)
} else { ; HAS_OPCODES_65C02
@@ -35,4 +40,5 @@ command_04_jumptable:
!word ITEM_02
!word ITEM_03
!word ITEM_04
!word ITEM_05
}
@@ -0,0 +1,21 @@
;; #LAYOUT# M65 BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_colorset:
; Make sure we are in MEGA65 native mode
jsr helper_ensure_native_mode
; Fetch palette ID
jsr fetch_uint8
+bcs do_SYNTAX_error
; Set the palette
jsr m65_colorset
+bcs do_ILLEGAL_QUANTITY_error
rts