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
+123
-110
@@ -1,145 +1,158 @@
|
||||
|
||||
.const CONFIG_ID = $00 // should be 1 byte, different for each config file!
|
||||
.encoding "petscii_upper"
|
||||
!set CONFIG_ID = $00 ; should be 1 byte, different for each config file!
|
||||
|
||||
//
|
||||
// Please read CONFIG.md before modifying this file!
|
||||
//
|
||||
;
|
||||
; Please read CONFIG.md before modifying this file!
|
||||
;
|
||||
|
||||
// Idea:
|
||||
// - configuration for custom builds and for development
|
||||
// - file contains options to enable unfinished functionalities
|
||||
; Idea:
|
||||
; - configuration for custom builds and for development
|
||||
; - file contains options to enable unfinished functionalities
|
||||
|
||||
|
||||
|
||||
// Hardware platform and brand
|
||||
; Hardware platform and brand
|
||||
|
||||
#define CONFIG_PLATFORM_COMMODORE_64
|
||||
|
||||
// #define CONFIG_MB_MEGA_65
|
||||
// #define CONFIG_MB_ULTIMATE_64
|
||||
|
||||
#define CONFIG_BRAND_CUSTOM_BUILD
|
||||
// #define CONFIG_BRAND_GENERIC
|
||||
// #define CONFIG_BRAND_TESTING
|
||||
// #define CONFIG_BRAND_ULTIMATE_64
|
||||
|
||||
.const CONFIG_CUSTOM_BRAND = @"CUSTOM BUILD"
|
||||
!set CONFIG_PLATFORM_COMMODORE_64 = 1
|
||||
!set CONFIG_BRAND_CUSTOM_BUILD = 1
|
||||
!macro CONFIG_CUSTOM_BRAND { !pet "custom build" }
|
||||
|
||||
|
||||
// Processor instruction set
|
||||
; Processor instruction set
|
||||
|
||||
#define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
!set CONFIG_CPU_MOS_6502 = 1
|
||||
; !set CONFIG_CPU_DTV_6502 = 1
|
||||
; !set CONFIG_CPU_RCW_65C02 = 1
|
||||
; !set CONFIG_CPU_WDC_65C02 = 1
|
||||
; !set CONFIG_CPU_WDC_65816 = 1
|
||||
; !set CONFIG_CPU_CSG_65CE02 = 1
|
||||
|
||||
|
||||
// Memory model
|
||||
; Memory model
|
||||
|
||||
// #define CONFIG_MEMORY_MODEL_38K
|
||||
// #define CONFIG_MEMORY_MODEL_46K
|
||||
#define CONFIG_MEMORY_MODEL_50K
|
||||
// #define CONFIG_MEMORY_MODEL_60K
|
||||
; !set CONFIG_MEMORY_MODEL_38K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_46K = 1
|
||||
!set CONFIG_MEMORY_MODEL_50K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_60K = 1
|
||||
|
||||
|
||||
// I/O devices
|
||||
; IEC bus configuration
|
||||
|
||||
#define CONFIG_IEC
|
||||
#define CONFIG_IEC_DOLPHINDOS
|
||||
#define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
// #define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
// #define CONFIG_IEC_BURST_CIA1 // please keep disabled for now
|
||||
// #define CONFIG_IEC_BURST_CIA2 // please keep disabled for now
|
||||
// #define CONFIG_IEC_BURST_MEGA_65 // please keep disabled for now
|
||||
!set CONFIG_IEC = 1
|
||||
!set CONFIG_IEC_DOLPHINDOS = 1
|
||||
!set CONFIG_IEC_DOLPHINDOS_FAST = 1
|
||||
!set CONFIG_IEC_JIFFYDOS = 1
|
||||
; !set CONFIG_IEC_JIFFYDOS_BLANK = 1
|
||||
; !set CONFIG_IEC_BURST_CIA1 = 1 ; please keep disabled for now
|
||||
; !set CONFIG_IEC_BURST_CIA2 = 1 ; please keep disabled for now
|
||||
|
||||
|
||||
#define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
#define CONFIG_TAPE_AUTODETECT
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
; Tape deck configuration
|
||||
|
||||
// #define CONFIG_RS232_UP2400 // please keep disabled for now
|
||||
// #define CONFIG_RS232_UP9600 // please keep disabled for now
|
||||
!set CONFIG_TAPE_NORMAL = 1
|
||||
!set CONFIG_TAPE_TURBO = 1
|
||||
!set CONFIG_TAPE_AUTODETECT = 1
|
||||
; !set CONFIG_TAPE_NO_KEY_SENSE = 1
|
||||
; !set CONFIG_TAPE_NO_MOTOR_CONTROL = 1
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
; RS-232 configuration
|
||||
|
||||
// #define CONFIG_SID_2ND
|
||||
.const CONFIG_SID_2ND_ADDRESS = $D420
|
||||
|
||||
// #define CONFIG_SID_3RD
|
||||
.const CONFIG_SID_3RD_ADDRESS = $D440
|
||||
|
||||
// #define CONFIG_SID_D4XX
|
||||
// #define CONFIG_SID_D5XX
|
||||
; !set CONFIG_RS232_ACIA = 1 ; please keep disabled for now
|
||||
; !set CONFIG_RS232_UP2400 = 1 ; please keep disabled for now
|
||||
; !set CONFIG_RS232_UP9600 = 1 ; please keep disabled for now
|
||||
|
||||
|
||||
// Keyboard settings
|
||||
; Sound support
|
||||
|
||||
// #define CONFIG_LEGACY_SCNKEY
|
||||
// #define CONFIG_KEYBOARD_C128
|
||||
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEYBOARD_C65 // untested
|
||||
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
|
||||
// #define CONFIG_KEY_REPEAT_DEFAULT
|
||||
// #define CONFIG_KEY_REPEAT_ALWAYS
|
||||
#define CONFIG_KEY_FAST_SCAN
|
||||
// #define CONFIG_JOY1_CURSOR
|
||||
// #define CONFIG_JOY2_CURSOR
|
||||
|
||||
#define CONFIG_PROGRAMMABLE_KEYS
|
||||
|
||||
.const CONFIG_KEYCMD_RUN = @"\$5FL"
|
||||
|
||||
.const CONFIG_KEYCMD_F1 = @"@"
|
||||
.const CONFIG_KEYCMD_F2 = @""
|
||||
.const CONFIG_KEYCMD_F3 = @"RUN:"
|
||||
.const CONFIG_KEYCMD_F4 = @""
|
||||
.const CONFIG_KEYCMD_F5 = @"LOAD"
|
||||
.const CONFIG_KEYCMD_F6 = @""
|
||||
.const CONFIG_KEYCMD_F7 = @"@$"
|
||||
.const CONFIG_KEYCMD_F8 = @""
|
||||
|
||||
.const CONFIG_KEYCMD_HELP = @"LIST"
|
||||
|
||||
.const CONFIG_KEYCMD_F9 = @""
|
||||
.const CONFIG_KEYCMD_F10 = @""
|
||||
.const CONFIG_KEYCMD_F11 = @""
|
||||
.const CONFIG_KEYCMD_F12 = @""
|
||||
.const CONFIG_KEYCMD_F13 = @""
|
||||
.const CONFIG_KEYCMD_F14 = @""
|
||||
; !set CONFIG_SID_2ND_ADDRESS = $D420
|
||||
; !set CONFIG_SID_3RD_ADDRESS = $D440
|
||||
; !set CONFIG_SID_D4XX = 1
|
||||
; !set CONFIG_SID_D5XX = 1
|
||||
|
||||
|
||||
// Screen editor
|
||||
; Keyboard settings
|
||||
|
||||
#define CONFIG_EDIT_STOPQUOTE
|
||||
// #define CONFIG_EDIT_TABULATORS
|
||||
; !set CONFIG_LEGACY_SCNKEY = 1
|
||||
; !set CONFIG_KEYBOARD_C128 = 1
|
||||
; !set CONFIG_KEYBOARD_C128_CAPS_LOCK = 1
|
||||
; !set CONFIG_KEYBOARD_C65 = 1 ; untested
|
||||
; !set CONFIG_KEYBOARD_C65_CAPS_LOCK = 1 ; untested
|
||||
; !set CONFIG_KEY_REPEAT_DEFAULT = 1
|
||||
; !set CONFIG_KEY_REPEAT_ALWAYS = 1
|
||||
!set CONFIG_KEY_FAST_SCAN = 1
|
||||
; !set CONFIG_JOY1_CURSOR = 1
|
||||
; !set CONFIG_JOY2_CURSOR = 1
|
||||
|
||||
!set CONFIG_PROGRAMMABLE_KEYS = 1
|
||||
|
||||
!set CONFIG_KEYCMD_RUN = 1
|
||||
!macro CONFIG_KEYCMD_RUN {
|
||||
!byte $5F
|
||||
!pet "l"
|
||||
}
|
||||
|
||||
!set CONFIG_KEYCMD_F1 = 1
|
||||
!macro CONFIG_KEYCMD_F1 { !pet "@" }
|
||||
; !set CONFIG_KEYCMD_F2 = 1
|
||||
; !macro CONFIG_KEYCMD_F2 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F3 = 1
|
||||
!macro CONFIG_KEYCMD_F3 { !pet "run:" }
|
||||
; !set CONFIG_KEYCMD_F4 = 1
|
||||
; !macro CONFIG_KEYCMD_F4 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F5 = 1
|
||||
!macro CONFIG_KEYCMD_F5 { !pet "load" }
|
||||
; !set CONFIG_KEYCMD_F6 = 1
|
||||
; !macro CONFIG_KEYCMD_F6 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F7 = 1
|
||||
!macro CONFIG_KEYCMD_F7 { !pet "@$" }
|
||||
; !set CONFIG_KEYCMD_F8 = 1
|
||||
; !macro CONFIG_KEYCMD_F8 { !pet "" }
|
||||
|
||||
!set CONFIG_KEYCMD_HELP = 1
|
||||
!macro CONFIG_KEYCMD_HELP { !pet "list" }
|
||||
|
||||
; !set CONFIG_KEYCMD_F9 = 1
|
||||
; !macro CONFIG_KEYCMD_F9 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F10 = 1
|
||||
; !macro CONFIG_KEYCMD_F10 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F11 = 1
|
||||
; !macro CONFIG_KEYCMD_F11 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F12 = 1
|
||||
; !macro CONFIG_KEYCMD_F12 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F13 = 1
|
||||
; !macro CONFIG_KEYCMD_F13 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F14 = 1
|
||||
; !macro CONFIG_KEYCMD_F14 { !pet "" }
|
||||
|
||||
|
||||
// Software features
|
||||
; Screen editor
|
||||
|
||||
#define CONFIG_PANIC_SCREEN
|
||||
#define CONFIG_DOS_WEDGE
|
||||
#define CONFIG_TAPE_WEDGE
|
||||
// #define CONFIG_TAPE_HEAD_ALIGN
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
|
||||
// Eye candy
|
||||
|
||||
// #define CONFIG_COLORS_BRAND
|
||||
// #define CONFIG_BANNER_SIMPLE
|
||||
#define CONFIG_BANNER_FANCY
|
||||
#define CONFIG_SHOW_FEATURES
|
||||
!set CONFIG_EDIT_STOPQUOTE = 1
|
||||
; !set CONFIG_EDIT_TABULATORS = 1
|
||||
|
||||
|
||||
// Debug options
|
||||
; Software features
|
||||
|
||||
// #define CONFIG_DBG_STUBS_BRK
|
||||
// #define CONFIG_DBG_PRINTF
|
||||
!set CONFIG_PANIC_SCREEN = 1
|
||||
!set CONFIG_DOS_WEDGE = 1
|
||||
!set CONFIG_TAPE_WEDGE = 1
|
||||
; !set CONFIG_TAPE_HEAD_ALIGN = 1
|
||||
!set CONFIG_BCD_SAFE_INTERRUPTS = 1
|
||||
|
||||
// Other
|
||||
; Eye candy
|
||||
|
||||
// #define CONFIG_COMPRESSION_LVL_2
|
||||
; !set CONFIG_COLORS_BRAND = 1
|
||||
; !set CONFIG_BANNER_SIMPLE = 1
|
||||
!set CONFIG_BANNER_FANCY = 1
|
||||
!set CONFIG_SHOW_FEATURES = 1
|
||||
|
||||
|
||||
; Debug options
|
||||
|
||||
; !set CONFIG_DBG_STUBS_BRK = 1
|
||||
; !set CONFIG_DBG_PRINTF = 1
|
||||
|
||||
; Other
|
||||
|
||||
; !set CONFIG_COMPRESSION_LVL_2 = 1
|
||||
+67
-112
@@ -1,139 +1,94 @@
|
||||
|
||||
.const CONFIG_ID = $04 // should be 1 byte, different for each config file!
|
||||
.encoding "petscii_upper"
|
||||
!set CONFIG_ID = $04 ; should be 1 byte, different for each config file!
|
||||
|
||||
//
|
||||
// Please read CONFIG.md before modifying this file!
|
||||
//
|
||||
;
|
||||
; Please read CONFIG.md before modifying this file!
|
||||
;
|
||||
|
||||
// Idea:
|
||||
// - settings file for the Commander X16 machine
|
||||
; Idea:
|
||||
; - settings file for the Commander X16 machine
|
||||
|
||||
|
||||
|
||||
// Hardware platform and brand
|
||||
; Hardware platform and brand
|
||||
|
||||
#define CONFIG_PLATFORM_COMMANDER_X16
|
||||
|
||||
// #define CONFIG_MB_MEGA_65
|
||||
// #define CONFIG_MB_ULTIMATE_64
|
||||
|
||||
#define CONFIG_BRAND_CUSTOM_BUILD
|
||||
// #define CONFIG_BRAND_GENERIC
|
||||
// #define CONFIG_BRAND_TESTING
|
||||
// #define CONFIG_BRAND_ULTIMATE_64
|
||||
|
||||
.const CONFIG_CUSTOM_BRAND = @"FOR COMMANDER X16"
|
||||
!set CONFIG_PLATFORM_COMMANDER_X16 = 1
|
||||
|
||||
|
||||
// Processor instruction set
|
||||
; Memory model
|
||||
|
||||
// #define CONFIG_CPU_MOS_6502
|
||||
#define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
!set CONFIG_MEMORY_MODEL_38K = 1
|
||||
|
||||
|
||||
// Memory model
|
||||
; Keyboard settings
|
||||
|
||||
#define CONFIG_MEMORY_MODEL_38K
|
||||
// #define CONFIG_MEMORY_MODEL_46K
|
||||
// #define CONFIG_MEMORY_MODEL_50K
|
||||
// #define CONFIG_MEMORY_MODEL_60K
|
||||
; !set CONFIG_PROGRAMMABLE_KEYS = 1
|
||||
|
||||
!set CONFIG_KEYCMD_RUN = 1
|
||||
!macro CONFIG_KEYCMD_RUN { !pet "load\"*\"" }
|
||||
|
||||
!set CONFIG_KEYCMD_F1 = 1
|
||||
!macro CONFIG_KEYCMD_F1 { !pet "@" }
|
||||
; !set CONFIG_KEYCMD_F2 = 1
|
||||
; !macro CONFIG_KEYCMD_F2 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F3 = 1
|
||||
!macro CONFIG_KEYCMD_F3 { !pet "run:" }
|
||||
; !set CONFIG_KEYCMD_F4 = 1
|
||||
; !macro CONFIG_KEYCMD_F4 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F5 = 1
|
||||
!macro CONFIG_KEYCMD_F5 { !pet "load" }
|
||||
; !set CONFIG_KEYCMD_F6 = 1
|
||||
; !macro CONFIG_KEYCMD_F6 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F7 = 1
|
||||
!macro CONFIG_KEYCMD_F7 { !pet "@$" }
|
||||
; !set CONFIG_KEYCMD_F8 = 1
|
||||
; !macro CONFIG_KEYCMD_F8 { !pet "" }
|
||||
|
||||
!set CONFIG_KEYCMD_HELP = 1
|
||||
!macro CONFIG_KEYCMD_HELP { !pet "list" }
|
||||
|
||||
; !set CONFIG_KEYCMD_F9 = 1
|
||||
; !macro CONFIG_KEYCMD_F9 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F10 = 1
|
||||
; !macro CONFIG_KEYCMD_F10 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F11 = 1
|
||||
; !macro CONFIG_KEYCMD_F11 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F12 = 1
|
||||
; !macro CONFIG_KEYCMD_F12 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F13 = 1
|
||||
; !macro CONFIG_KEYCMD_F13 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F14 = 1
|
||||
; !macro CONFIG_KEYCMD_F14 { !pet "" }
|
||||
|
||||
|
||||
// I/O devices
|
||||
; Screen editor
|
||||
|
||||
// #define CONFIG_IEC
|
||||
// #define CONFIG_IEC_DOLPHINDOS
|
||||
// #define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
// #define CONFIG_IEC_JIFFYDOS
|
||||
// #define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
// #define CONFIG_TAPE_NORMAL
|
||||
// #define CONFIG_TAPE_TURBO
|
||||
// #define CONFIG_TAPE_AUTODETECT
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
; !set CONFIG_EDIT_STOPQUOTE = 1
|
||||
; !set CONFIG_EDIT_TABULATORS = 1
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
; Software features
|
||||
|
||||
// #define CONFIG_SID_2ND
|
||||
.const CONFIG_SID_2ND_ADDRESS = $D440
|
||||
|
||||
// #define CONFIG_SID_3RD
|
||||
.const CONFIG_SID_3RD_ADDRESS = $D480
|
||||
|
||||
// #define CONFIG_SID_D4XX
|
||||
// #define CONFIG_SID_D5XX
|
||||
; !set CONFIG_PANIC_SCREEN = 1
|
||||
; !set CONFIG_DOS_WEDGE = 1
|
||||
; !set CONFIG_TAPE_WEDGE = 1
|
||||
; !set CONFIG_TAPE_HEAD_ALIGN = 1
|
||||
!set CONFIG_BCD_SAFE_INTERRUPTS = 1
|
||||
|
||||
|
||||
// Keyboard settings
|
||||
; Eye candy
|
||||
|
||||
// #define CONFIG_LEGACY_SCNKEY
|
||||
// #define CONFIG_KEYBOARD_C128
|
||||
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEYBOARD_C65 // untested
|
||||
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
|
||||
// #define CONFIG_KEY_REPEAT_DEFAULT
|
||||
// #define CONFIG_KEY_REPEAT_ALWAYS
|
||||
// #define CONFIG_KEY_FAST_SCAN
|
||||
// #define CONFIG_JOY1_CURSOR
|
||||
// #define CONFIG_JOY2_CURSOR
|
||||
|
||||
// #define CONFIG_PROGRAMMABLE_KEYS
|
||||
|
||||
.const CONFIG_KEYCMD_RUN = @"LOAD\"*\""
|
||||
|
||||
.const CONFIG_KEYCMD_F1 = @"@"
|
||||
.const CONFIG_KEYCMD_F2 = @""
|
||||
.const CONFIG_KEYCMD_F3 = @"RUN:"
|
||||
.const CONFIG_KEYCMD_F4 = @""
|
||||
.const CONFIG_KEYCMD_F5 = @"LOAD"
|
||||
.const CONFIG_KEYCMD_F6 = @""
|
||||
.const CONFIG_KEYCMD_F7 = @"@$"
|
||||
.const CONFIG_KEYCMD_F8 = @""
|
||||
|
||||
.const CONFIG_KEYCMD_HELP = @"LIST"
|
||||
|
||||
.const CONFIG_KEYCMD_F9 = @"REM F9"
|
||||
.const CONFIG_KEYCMD_F10 = @"REM F10"
|
||||
.const CONFIG_KEYCMD_F11 = @"REM F11"
|
||||
.const CONFIG_KEYCMD_F12 = @"REM F12"
|
||||
.const CONFIG_KEYCMD_F13 = @"REM F13"
|
||||
.const CONFIG_KEYCMD_F14 = @"REM F14"
|
||||
; !set CONFIG_COLORS_BRAND = 1
|
||||
; !set CONFIG_BANNER_SIMPLE = 1
|
||||
!set CONFIG_BANNER_FANCY = 1
|
||||
; !set CONFIG_SHOW_FEATURES = 1
|
||||
|
||||
|
||||
// Screen editor
|
||||
; Debug options
|
||||
|
||||
// #define CONFIG_EDIT_STOPQUOTE
|
||||
// #define CONFIG_EDIT_TABULATORS
|
||||
; !set CONFIG_DBG_STUBS_BRK = 1
|
||||
; !set CONFIG_DBG_PRINTF = 1
|
||||
|
||||
; Other
|
||||
|
||||
// Software features
|
||||
|
||||
// #define CONFIG_PANIC_SCREEN
|
||||
// #define CONFIG_DOS_WEDGE
|
||||
// #define CONFIG_TAPE_WEDGE
|
||||
// #define CONFIG_TAPE_HEAD_ALIGN
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
|
||||
|
||||
// Eye candy
|
||||
|
||||
// #define CONFIG_COLORS_BRAND
|
||||
// #define CONFIG_BANNER_SIMPLE
|
||||
#define CONFIG_BANNER_FANCY
|
||||
// #define CONFIG_SHOW_FEATURES
|
||||
|
||||
|
||||
// Debug options
|
||||
|
||||
// #define CONFIG_DBG_STUBS_BRK
|
||||
// #define CONFIG_DBG_PRINTF
|
||||
|
||||
// Other
|
||||
|
||||
// #define CONFIG_COMPRESSION_LVL_2
|
||||
; !set CONFIG_COMPRESSION_LVL_2 = 1
|
||||
+112
-101
@@ -1,137 +1,148 @@
|
||||
|
||||
.const CONFIG_ID = $01 // should be 1 byte, different for each config file!
|
||||
.encoding "petscii_upper"
|
||||
!set CONFIG_ID = $01 ; should be 1 byte, different for each config file!
|
||||
|
||||
//
|
||||
// Please read CONFIG.md before modifying this file!
|
||||
//
|
||||
;
|
||||
; Please read CONFIG.md before modifying this file!
|
||||
;
|
||||
|
||||
// Idea:
|
||||
// - sane defaults for the original Commodore 64/128 machines
|
||||
// - do not enable features which are a significant compatibility risk
|
||||
; Idea:
|
||||
; - sane defaults for the original Commodore 64/128 machines
|
||||
; - do not enable features which are a significant compatibility risk
|
||||
|
||||
|
||||
|
||||
// Hardware platform and brand
|
||||
; Hardware platform and brand
|
||||
|
||||
#define CONFIG_PLATFORM_COMMODORE_64
|
||||
|
||||
// #define CONFIG_MB_MEGA_65
|
||||
// #define CONFIG_MB_ULTIMATE_64
|
||||
|
||||
#define CONFIG_BRAND_GENERIC
|
||||
// #define CONFIG_BRAND_TESTING
|
||||
// #define CONFIG_BRAND_ULTIMATE_64
|
||||
!set CONFIG_PLATFORM_COMMODORE_64 = 1
|
||||
!set CONFIG_BRAND_GENERIC = 1
|
||||
|
||||
|
||||
// Processor instruction set
|
||||
; Processor instruction set
|
||||
|
||||
#define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
!set CONFIG_CPU_MOS_6502 = 1
|
||||
; !set CONFIG_CPU_DTV_6502 = 1
|
||||
; !set CONFIG_CPU_RCW_65C02 = 1
|
||||
; !set CONFIG_CPU_WDC_65C02 = 1
|
||||
; !set CONFIG_CPU_WDC_65816 = 1
|
||||
; !set CONFIG_CPU_CSG_65CE02 = 1
|
||||
|
||||
|
||||
// Memory model
|
||||
; Memory model
|
||||
|
||||
// #define CONFIG_MEMORY_MODEL_38K
|
||||
// #define CONFIG_MEMORY_MODEL_46K
|
||||
#define CONFIG_MEMORY_MODEL_50K
|
||||
// #define CONFIG_MEMORY_MODEL_60K
|
||||
; !set CONFIG_MEMORY_MODEL_38K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_46K = 1
|
||||
!set CONFIG_MEMORY_MODEL_50K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_60K = 1
|
||||
|
||||
|
||||
// I/O devices
|
||||
; IEC bus configuration
|
||||
|
||||
#define CONFIG_IEC
|
||||
#define CONFIG_IEC_DOLPHINDOS
|
||||
#define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
#define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
#define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
#define CONFIG_TAPE_AUTODETECT
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
!set CONFIG_IEC = 1
|
||||
!set CONFIG_IEC_DOLPHINDOS = 1
|
||||
!set CONFIG_IEC_DOLPHINDOS_FAST = 1
|
||||
!set CONFIG_IEC_JIFFYDOS = 1
|
||||
!set CONFIG_IEC_JIFFYDOS_BLANK = 1
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
; Tape deck configuration
|
||||
|
||||
// #define CONFIG_SID_2ND
|
||||
.const CONFIG_SID_2ND_ADDRESS = $D420
|
||||
|
||||
// #define CONFIG_SID_3RD
|
||||
.const CONFIG_SID_3RD_ADDRESS = $D440
|
||||
|
||||
// #define CONFIG_SID_D4XX
|
||||
// #define CONFIG_SID_D5XX
|
||||
!set CONFIG_TAPE_NORMAL = 1
|
||||
!set CONFIG_TAPE_TURBO = 1
|
||||
!set CONFIG_TAPE_AUTODETECT = 1
|
||||
; !set CONFIG_TAPE_NO_KEY_SENSE = 1
|
||||
; !set CONFIG_TAPE_NO_MOTOR_CONTROL = 1
|
||||
|
||||
|
||||
// Keyboard settings
|
||||
; Sound support
|
||||
|
||||
// #define CONFIG_LEGACY_SCNKEY
|
||||
// #define CONFIG_KEYBOARD_C128
|
||||
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEYBOARD_C65 // untested
|
||||
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
|
||||
// #define CONFIG_KEY_REPEAT_DEFAULT
|
||||
// #define CONFIG_KEY_REPEAT_ALWAYS
|
||||
#define CONFIG_KEY_FAST_SCAN
|
||||
#define CONFIG_JOY1_CURSOR
|
||||
#define CONFIG_JOY2_CURSOR
|
||||
|
||||
#define CONFIG_PROGRAMMABLE_KEYS
|
||||
|
||||
.const CONFIG_KEYCMD_RUN = @"\$5FL"
|
||||
|
||||
.const CONFIG_KEYCMD_F1 = @"@"
|
||||
.const CONFIG_KEYCMD_F2 = @""
|
||||
.const CONFIG_KEYCMD_F3 = @"RUN:"
|
||||
.const CONFIG_KEYCMD_F4 = @""
|
||||
.const CONFIG_KEYCMD_F5 = @"LOAD"
|
||||
.const CONFIG_KEYCMD_F6 = @""
|
||||
.const CONFIG_KEYCMD_F7 = @"@$"
|
||||
.const CONFIG_KEYCMD_F8 = @""
|
||||
|
||||
.const CONFIG_KEYCMD_HELP = @"LIST"
|
||||
|
||||
.const CONFIG_KEYCMD_F9 = @""
|
||||
.const CONFIG_KEYCMD_F10 = @""
|
||||
.const CONFIG_KEYCMD_F11 = @""
|
||||
.const CONFIG_KEYCMD_F12 = @""
|
||||
.const CONFIG_KEYCMD_F13 = @""
|
||||
.const CONFIG_KEYCMD_F14 = @""
|
||||
; !set CONFIG_SID_2ND_ADDRESS = $D420
|
||||
; !set CONFIG_SID_3RD_ADDRESS = $D440
|
||||
; !set CONFIG_SID_D4XX = 1
|
||||
; !set CONFIG_SID_D5XX = 1
|
||||
|
||||
|
||||
// Screen editor
|
||||
; Keyboard settings
|
||||
|
||||
#define CONFIG_EDIT_STOPQUOTE
|
||||
// #define CONFIG_EDIT_TABULATORS
|
||||
; !set CONFIG_LEGACY_SCNKEY = 1
|
||||
; !set CONFIG_KEYBOARD_C128 = 1
|
||||
; !set CONFIG_KEYBOARD_C128_CAPS_LOCK = 1
|
||||
; !set CONFIG_KEYBOARD_C65 = 1 ; untested
|
||||
; !set CONFIG_KEYBOARD_C65_CAPS_LOCK = 1 ; untested
|
||||
; !set CONFIG_KEY_REPEAT_DEFAULT = 1
|
||||
; !set CONFIG_KEY_REPEAT_ALWAYS = 1
|
||||
!set CONFIG_KEY_FAST_SCAN = 1
|
||||
!set CONFIG_JOY1_CURSOR = 1
|
||||
!set CONFIG_JOY2_CURSOR = 1
|
||||
|
||||
!set CONFIG_PROGRAMMABLE_KEYS = 1
|
||||
|
||||
!set CONFIG_KEYCMD_RUN = 1
|
||||
!macro CONFIG_KEYCMD_RUN {
|
||||
!byte $5F
|
||||
!pet "l" }
|
||||
|
||||
!set CONFIG_KEYCMD_F1 = 1
|
||||
!macro CONFIG_KEYCMD_F1 { !pet "@" }
|
||||
; !set CONFIG_KEYCMD_F2 = 1
|
||||
; !macro CONFIG_KEYCMD_F2 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F3 = 1
|
||||
!macro CONFIG_KEYCMD_F3 { !pet "RUN:" }
|
||||
; !set CONFIG_KEYCMD_F4 = 1
|
||||
; !macro CONFIG_KEYCMD_F4 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F5 = 1
|
||||
!macro CONFIG_KEYCMD_F5 { !pet "LOAD" }
|
||||
; !set CONFIG_KEYCMD_F6 = 1
|
||||
; !macro CONFIG_KEYCMD_F6 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F7 = 1
|
||||
!macro CONFIG_KEYCMD_F7 { !pet "@$" }
|
||||
; !set CONFIG_KEYCMD_F8 = 1
|
||||
; !macro CONFIG_KEYCMD_F8 { !pet "" }
|
||||
|
||||
!set CONFIG_KEYCMD_HELP = 1
|
||||
!macro CONFIG_KEYCMD_HELP { !pet "LIST" }
|
||||
|
||||
; !set CONFIG_KEYCMD_F9 = 1
|
||||
; !macro CONFIG_KEYCMD_F9 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F10 = 1
|
||||
; !macro CONFIG_KEYCMD_F10 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F11 = 1
|
||||
; !macro CONFIG_KEYCMD_F11 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F12 = 1
|
||||
; !macro CONFIG_KEYCMD_F12 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F13 = 1
|
||||
; !macro CONFIG_KEYCMD_F13 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F14 = 1
|
||||
; !macro CONFIG_KEYCMD_F14 { !pet "" }
|
||||
|
||||
|
||||
// Software features
|
||||
; Screen editor
|
||||
|
||||
#define CONFIG_PANIC_SCREEN
|
||||
#define CONFIG_DOS_WEDGE
|
||||
#define CONFIG_TAPE_WEDGE
|
||||
// #define CONFIG_TAPE_HEAD_ALIGN
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
!set CONFIG_EDIT_STOPQUOTE = 1
|
||||
; !set CONFIG_EDIT_TABULATORS = 1
|
||||
|
||||
|
||||
// Eye candy
|
||||
; Software features
|
||||
|
||||
#define CONFIG_COLORS_BRAND
|
||||
// #define CONFIG_BANNER_SIMPLE
|
||||
#define CONFIG_BANNER_FANCY
|
||||
#define CONFIG_SHOW_FEATURES
|
||||
!set CONFIG_PANIC_SCREEN = 1
|
||||
!set CONFIG_DOS_WEDGE = 1
|
||||
!set CONFIG_TAPE_WEDGE = 1
|
||||
; !set CONFIG_TAPE_HEAD_ALIGN = 1
|
||||
!set CONFIG_BCD_SAFE_INTERRUPTS = 1
|
||||
|
||||
|
||||
// Debug options
|
||||
; Eye candy
|
||||
|
||||
// #define CONFIG_DBG_STUBS_BRK
|
||||
// #define CONFIG_DBG_PRINTF
|
||||
!set CONFIG_COLORS_BRAND = 1
|
||||
; !set CONFIG_BANNER_SIMPLE = 1
|
||||
!set CONFIG_BANNER_FANCY = 1
|
||||
!set CONFIG_SHOW_FEATURES = 1
|
||||
|
||||
// Other
|
||||
|
||||
// #define CONFIG_COMPRESSION_LVL_2
|
||||
; Debug options
|
||||
|
||||
; !set CONFIG_DBG_STUBS_BRK = 1
|
||||
; !set CONFIG_DBG_PRINTF = 1
|
||||
|
||||
; Other
|
||||
|
||||
; !set CONFIG_COMPRESSION_LVL_2 = 1
|
||||
+91
-92
@@ -1,130 +1,129 @@
|
||||
|
||||
.const CONFIG_ID = $02 // should be 1 byte, different for each config file!
|
||||
.encoding "petscii_upper"
|
||||
!set CONFIG_ID = $02 ; should be 1 byte, different for each config file!
|
||||
|
||||
//
|
||||
// Please read CONFIG.md before modifying this file!
|
||||
//
|
||||
;
|
||||
; Please read CONFIG.md before modifying this file!
|
||||
;
|
||||
|
||||
// Idea:
|
||||
// - sane defaults for the Mega 65 FPGA computer
|
||||
// - do not enable features which are a significant compatibility risk
|
||||
; Idea:
|
||||
; - sane defaults for the Mega 65 FPGA computer
|
||||
; - do not enable features which are a significant compatibility risk
|
||||
|
||||
|
||||
|
||||
// Hardware platform
|
||||
; Hardware platform
|
||||
|
||||
#define CONFIG_PLATFORM_COMMODORE_64
|
||||
|
||||
#define CONFIG_MB_MEGA_65
|
||||
|
||||
// Processor instruction set
|
||||
|
||||
// #define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
#define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
!set CONFIG_PLATFORM_COMMODORE_64 = 1
|
||||
!set CONFIG_MB_M65 = 1
|
||||
|
||||
|
||||
// Memory model
|
||||
; Memory model
|
||||
|
||||
// #define CONFIG_MEMORY_MODEL_38K
|
||||
// #define CONFIG_MEMORY_MODEL_46K
|
||||
#define CONFIG_MEMORY_MODEL_50K
|
||||
// #define CONFIG_MEMORY_MODEL_60K
|
||||
; !set CONFIG_MEMORY_MODEL_38K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_46K = 1
|
||||
!set CONFIG_MEMORY_MODEL_50K = 1
|
||||
|
||||
|
||||
// I/O devices
|
||||
; IEC bus configuration
|
||||
|
||||
#define CONFIG_IEC
|
||||
// #define CONFIG_IEC_DOLPHINDOS
|
||||
// #define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
#define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
#define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
#define CONFIG_TAPE_AUTODETECT
|
||||
#define CONFIG_TAPE_NO_KEY_SENSE
|
||||
#define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
!set CONFIG_IEC = 1
|
||||
; !set CONFIG_IEC_DOLPHINDOS = 1
|
||||
; !set CONFIG_IEC_DOLPHINDOS_FAST = 1
|
||||
!set CONFIG_IEC_JIFFYDOS = 1
|
||||
!set CONFIG_IEC_JIFFYDOS_BLANK = 1
|
||||
; !set CONFIG_IEC_BURST_M65 = 1 ; please keep disabled for now
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
; Tape deck configuration
|
||||
|
||||
// #define CONFIG_SID_2ND
|
||||
.const CONFIG_SID_2ND_ADDRESS = $D440
|
||||
|
||||
// #define CONFIG_SID_3RD
|
||||
.const CONFIG_SID_3RD_ADDRESS = $D480
|
||||
|
||||
// #define CONFIG_SID_D4XX
|
||||
// #define CONFIG_SID_D5XX
|
||||
!set CONFIG_TAPE_NORMAL = 1
|
||||
!set CONFIG_TAPE_TURBO = 1
|
||||
!set CONFIG_TAPE_AUTODETECT = 1
|
||||
!set CONFIG_TAPE_NO_KEY_SENSE = 1
|
||||
!set CONFIG_TAPE_NO_MOTOR_CONTROL = 1
|
||||
|
||||
|
||||
// Keyboard settings
|
||||
; Keyboard settings
|
||||
|
||||
// #define CONFIG_LEGACY_SCNKEY
|
||||
// #define CONFIG_KEYBOARD_C128
|
||||
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEYBOARD_C65 // untested
|
||||
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
|
||||
// #define CONFIG_KEY_REPEAT_DEFAULT
|
||||
// #define CONFIG_KEY_REPEAT_ALWAYS
|
||||
#define CONFIG_KEY_FAST_SCAN
|
||||
#define CONFIG_JOY1_CURSOR
|
||||
#define CONFIG_JOY2_CURSOR
|
||||
; !set CONFIG_LEGACY_SCNKEY = 1
|
||||
; !set CONFIG_KEYBOARD_C128 = 1
|
||||
; !set CONFIG_KEYBOARD_C128_CAPS_LOCK = 1
|
||||
; !set CONFIG_KEYBOARD_C65 = 1 ; untested
|
||||
; !set CONFIG_KEYBOARD_C65_CAPS_LOCK = 1 ; untested
|
||||
; !set CONFIG_KEY_REPEAT_DEFAULT = 1
|
||||
; !set CONFIG_KEY_REPEAT_ALWAYS = 1
|
||||
!set CONFIG_KEY_FAST_SCAN = 1
|
||||
!set CONFIG_JOY1_CURSOR = 1
|
||||
!set CONFIG_JOY2_CURSOR = 1
|
||||
|
||||
#define CONFIG_PROGRAMMABLE_KEYS
|
||||
!set CONFIG_PROGRAMMABLE_KEYS = 1
|
||||
|
||||
.const CONFIG_KEYCMD_RUN = @"\$5FL"
|
||||
!set CONFIG_KEYCMD_RUN = 1
|
||||
!macro CONFIG_KEYCMD_RUN {
|
||||
!byte $5F
|
||||
!pet "l" }
|
||||
|
||||
.const CONFIG_KEYCMD_F1 = @"@"
|
||||
.const CONFIG_KEYCMD_F2 = @""
|
||||
.const CONFIG_KEYCMD_F3 = @"RUN:"
|
||||
.const CONFIG_KEYCMD_F4 = @""
|
||||
.const CONFIG_KEYCMD_F5 = @"LOAD"
|
||||
.const CONFIG_KEYCMD_F6 = @""
|
||||
.const CONFIG_KEYCMD_F7 = @"@$"
|
||||
.const CONFIG_KEYCMD_F8 = @""
|
||||
!set CONFIG_KEYCMD_F1 = 1
|
||||
!macro CONFIG_KEYCMD_F1 { !pet "@" }
|
||||
; !set CONFIG_KEYCMD_F2 = 1
|
||||
; !macro CONFIG_KEYCMD_F2 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F3 = 1
|
||||
!macro CONFIG_KEYCMD_F3 { !pet "run:" }
|
||||
; !set CONFIG_KEYCMD_F4 = 1
|
||||
; !macro CONFIG_KEYCMD_F4 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F5 = 1
|
||||
!macro CONFIG_KEYCMD_F5 { !pet "load" }
|
||||
; !set CONFIG_KEYCMD_F6 = 1
|
||||
; !macro CONFIG_KEYCMD_F6 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F7 = 1
|
||||
!macro CONFIG_KEYCMD_F7 { !pet "@$" }
|
||||
; !set CONFIG_KEYCMD_F8 = 1
|
||||
; !macro CONFIG_KEYCMD_F8 { !pet "" }
|
||||
|
||||
.const CONFIG_KEYCMD_HELP = @"LIST"
|
||||
!set CONFIG_KEYCMD_HELP = 1
|
||||
!macro CONFIG_KEYCMD_HELP { !pet "list" }
|
||||
|
||||
.const CONFIG_KEYCMD_F9 = @"BOOT"
|
||||
.const CONFIG_KEYCMD_F10 = @"REM F10"
|
||||
.const CONFIG_KEYCMD_F11 = @"MONITOR"
|
||||
.const CONFIG_KEYCMD_F12 = @"REM F12"
|
||||
.const CONFIG_KEYCMD_F13 = @"\$5FH"
|
||||
.const CONFIG_KEYCMD_F14 = @"REM F14"
|
||||
!set CONFIG_KEYCMD_F9 = 1
|
||||
!macro CONFIG_KEYCMD_F9 { !pet "boot" }
|
||||
!set CONFIG_KEYCMD_F10 = 1
|
||||
!macro CONFIG_KEYCMD_F10 { !pet "rem f10" }
|
||||
!set CONFIG_KEYCMD_F11 = 1
|
||||
!macro CONFIG_KEYCMD_F11 { !pet "monitor" }
|
||||
!set CONFIG_KEYCMD_F12 = 1
|
||||
!macro CONFIG_KEYCMD_F12 { !pet "rem f12" }
|
||||
!set CONFIG_KEYCMD_F13 = 1
|
||||
!macro CONFIG_KEYCMD_F13 { !byte $5F !pet "h" }
|
||||
!set CONFIG_KEYCMD_F14 = 1
|
||||
!macro CONFIG_KEYCMD_F14 { !pet "rem f14" }
|
||||
|
||||
|
||||
// Screen editor
|
||||
; Screen editor
|
||||
|
||||
#define CONFIG_EDIT_STOPQUOTE
|
||||
#define CONFIG_EDIT_TABULATORS
|
||||
!set CONFIG_EDIT_STOPQUOTE = 1
|
||||
!set CONFIG_EDIT_TABULATORS = 1
|
||||
|
||||
|
||||
// Software features
|
||||
; Software features
|
||||
|
||||
#define CONFIG_PANIC_SCREEN
|
||||
#define CONFIG_DOS_WEDGE
|
||||
#define CONFIG_TAPE_WEDGE
|
||||
#define CONFIG_TAPE_HEAD_ALIGN
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
!set CONFIG_PANIC_SCREEN = 1
|
||||
!set CONFIG_DOS_WEDGE = 1
|
||||
!set CONFIG_TAPE_WEDGE = 1
|
||||
!set CONFIG_TAPE_HEAD_ALIGN = 1
|
||||
!set CONFIG_BCD_SAFE_INTERRUPTS = 1
|
||||
|
||||
|
||||
// Built-in DOS configuration
|
||||
; Built-in DOS configuration
|
||||
|
||||
.const CONFIG_UNIT_SDCARD = 0 // do not change, DOS is not implemented yet
|
||||
.const CONFIG_UNIT_FLOPPY = 0 // do not change, DOS is not implemented yet
|
||||
.const CONFIG_UNIT_RAMDISK = 0 // do not change, DOS is not implemented yet
|
||||
!set CONFIG_UNIT_SDCARD = 0 ; do not change, DOS is not implemented yet
|
||||
!set CONFIG_UNIT_FLOPPY = 0 ; do not change, DOS is not implemented yet
|
||||
!set CONFIG_UNIT_RAMDISK = 0 ; do not change, DOS is not implemented yet
|
||||
|
||||
|
||||
// Debug options
|
||||
; Debug options
|
||||
|
||||
// #define CONFIG_DBG_STUBS_BRK
|
||||
// #define CONFIG_DBG_PRINTF
|
||||
; !set CONFIG_DBG_STUBS_BRK = 1
|
||||
; !set CONFIG_DBG_PRINTF = 1
|
||||
|
||||
// Other
|
||||
; Other
|
||||
|
||||
// #define CONFIG_COMPRESSION_LVL_2
|
||||
; !set CONFIG_COMPRESSION_LVL_2 = 1
|
||||
+113
-101
@@ -1,137 +1,149 @@
|
||||
|
||||
.const CONFIG_ID = $F0 // should be 1 byte, different for each config file!
|
||||
.encoding "petscii_upper"
|
||||
!set CONFIG_ID = $F0 ; should be 1 byte, different for each config file!
|
||||
|
||||
//
|
||||
// Please read CONFIG.md before modifying this file!
|
||||
//
|
||||
;
|
||||
; Please read CONFIG.md before modifying this file!
|
||||
;
|
||||
|
||||
// Idea:
|
||||
// - enable compatibility-risky features
|
||||
// - enable code not normally used - to make sure they still compile
|
||||
; Idea:
|
||||
; - enable compatibility-risky features
|
||||
; - enable code not normally used - to make sure they still compile
|
||||
|
||||
|
||||
|
||||
// Hardware platform and brand
|
||||
; Hardware platform and brand
|
||||
|
||||
#define CONFIG_PLATFORM_COMMODORE_64
|
||||
|
||||
// #define CONFIG_MB_MEGA_65
|
||||
// #define CONFIG_MB_ULTIMATE_64
|
||||
|
||||
// #define CONFIG_BRAND_GENERIC
|
||||
#define CONFIG_BRAND_TESTING
|
||||
// #define CONFIG_BRAND_ULTIMATE_64
|
||||
!set CONFIG_PLATFORM_COMMODORE_64 = 1
|
||||
!set CONFIG_BRAND_TESTING = 1
|
||||
|
||||
|
||||
// Processor instruction set
|
||||
; Processor instruction set
|
||||
|
||||
#define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
!set CONFIG_CPU_MOS_6502 = 1
|
||||
; !set CONFIG_CPU_DTV_6502 = 1
|
||||
; !set CONFIG_CPU_RCW_65C02 = 1
|
||||
; !set CONFIG_CPU_WDC_65C02 = 1
|
||||
; !set CONFIG_CPU_WDC_65816 = 1
|
||||
; !set CONFIG_CPU_CSG_65CE02 = 1
|
||||
|
||||
|
||||
// Memory model
|
||||
; Memory model
|
||||
|
||||
// #define CONFIG_MEMORY_MODEL_38K
|
||||
// #define CONFIG_MEMORY_MODEL_46K
|
||||
// #define CONFIG_MEMORY_MODEL_50K
|
||||
#define CONFIG_MEMORY_MODEL_60K
|
||||
; !set CONFIG_MEMORY_MODEL_38K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_46K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_50K = 1
|
||||
!set CONFIG_MEMORY_MODEL_60K = 1
|
||||
|
||||
|
||||
// I/O devices
|
||||
; IEC bus configuration
|
||||
|
||||
#define CONFIG_IEC
|
||||
#define CONFIG_IEC_DOLPHINDOS
|
||||
// #define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
// #define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
// #define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
// #define CONFIG_TAPE_AUTODETECT
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
!set CONFIG_IEC = 1
|
||||
!set CONFIG_IEC_DOLPHINDOS = 1
|
||||
; !set CONFIG_IEC_DOLPHINDOS_FAST = 1
|
||||
!set CONFIG_IEC_JIFFYDOS = 1
|
||||
; !set CONFIG_IEC_JIFFYDOS_BLANK = 1
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
; Tape deck configuration
|
||||
|
||||
#define CONFIG_SID_2ND
|
||||
.const CONFIG_SID_2ND_ADDRESS = $D420
|
||||
|
||||
#define CONFIG_SID_3RD
|
||||
.const CONFIG_SID_3RD_ADDRESS = $D440
|
||||
|
||||
// #define CONFIG_SID_D4XX
|
||||
// #define CONFIG_SID_D5XX
|
||||
; !set CONFIG_TAPE_NORMAL = 1
|
||||
!set CONFIG_TAPE_TURBO = 1
|
||||
; !set CONFIG_TAPE_AUTODETECT = 1
|
||||
; !set CONFIG_TAPE_NO_KEY_SENSE = 1
|
||||
; !set CONFIG_TAPE_NO_MOTOR_CONTROL = 1
|
||||
|
||||
|
||||
// Keyboard settings
|
||||
; Sound support
|
||||
|
||||
#define CONFIG_LEGACY_SCNKEY
|
||||
// #define CONFIG_KEYBOARD_C128
|
||||
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEYBOARD_C65 // untested
|
||||
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
|
||||
// #define CONFIG_KEY_REPEAT_DEFAULT
|
||||
// #define CONFIG_KEY_REPEAT_ALWAYS
|
||||
#define CONFIG_KEY_FAST_SCAN
|
||||
#define CONFIG_JOY1_CURSOR
|
||||
#define CONFIG_JOY2_CURSOR
|
||||
|
||||
#define CONFIG_PROGRAMMABLE_KEYS
|
||||
|
||||
.const CONFIG_KEYCMD_RUN = @"\$5FL"
|
||||
|
||||
.const CONFIG_KEYCMD_F1 = @"@"
|
||||
.const CONFIG_KEYCMD_F2 = @""
|
||||
.const CONFIG_KEYCMD_F3 = @"RUN:"
|
||||
.const CONFIG_KEYCMD_F4 = @""
|
||||
.const CONFIG_KEYCMD_F5 = @"LOAD"
|
||||
.const CONFIG_KEYCMD_F6 = @""
|
||||
.const CONFIG_KEYCMD_F7 = @"@$"
|
||||
.const CONFIG_KEYCMD_F8 = @""
|
||||
|
||||
.const CONFIG_KEYCMD_HELP = @"LIST"
|
||||
|
||||
.const CONFIG_KEYCMD_F9 = @""
|
||||
.const CONFIG_KEYCMD_F10 = @""
|
||||
.const CONFIG_KEYCMD_F11 = @""
|
||||
.const CONFIG_KEYCMD_F12 = @""
|
||||
.const CONFIG_KEYCMD_F13 = @""
|
||||
.const CONFIG_KEYCMD_F14 = @""
|
||||
!set CONFIG_SID_2ND_ADDRESS = $D420
|
||||
!set CONFIG_SID_3RD_ADDRESS = $D440
|
||||
; !set CONFIG_SID_D4XX = 1
|
||||
; !set CONFIG_SID_D5XX = 1
|
||||
|
||||
|
||||
// Screen editor
|
||||
; Keyboard settings
|
||||
|
||||
#define CONFIG_EDIT_STOPQUOTE
|
||||
#define CONFIG_EDIT_TABULATORS
|
||||
!set CONFIG_LEGACY_SCNKEY = 1
|
||||
; !set CONFIG_KEYBOARD_C128 = 1
|
||||
; !set CONFIG_KEYBOARD_C128_CAPS_LOCK = 1
|
||||
; !set CONFIG_KEYBOARD_C65 = 1 ; untested
|
||||
; !set CONFIG_KEYBOARD_C65_CAPS_LOCK = 1 ; untested
|
||||
; !set CONFIG_KEY_REPEAT_DEFAULT = 1
|
||||
; !set CONFIG_KEY_REPEAT_ALWAYS = 1
|
||||
!set CONFIG_KEY_FAST_SCAN = 1
|
||||
!set CONFIG_JOY1_CURSOR = 1
|
||||
!set CONFIG_JOY2_CURSOR = 1
|
||||
|
||||
!set CONFIG_PROGRAMMABLE_KEYS = 1
|
||||
|
||||
!set CONFIG_KEYCMD_RUN = 1
|
||||
!macro CONFIG_KEYCMD_RUN {
|
||||
!byte $5F
|
||||
!pet "l" }
|
||||
|
||||
!set CONFIG_KEYCMD_F1 = 1
|
||||
!macro CONFIG_KEYCMD_F1 { !pet "@" }
|
||||
; !set CONFIG_KEYCMD_F2 = 1
|
||||
; !macro CONFIG_KEYCMD_F2 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F3 = 1
|
||||
!macro CONFIG_KEYCMD_F3 { !pet "run:" }
|
||||
; !set CONFIG_KEYCMD_F4 = 1
|
||||
; !macro CONFIG_KEYCMD_F4 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F5 = 1
|
||||
!macro CONFIG_KEYCMD_F5 { !pet "load" }
|
||||
; !set CONFIG_KEYCMD_F6 = 1
|
||||
; !macro CONFIG_KEYCMD_F6 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F7 = 1
|
||||
!macro CONFIG_KEYCMD_F7 { !pet "@$" }
|
||||
; !set CONFIG_KEYCMD_F8 = 1
|
||||
; !macro CONFIG_KEYCMD_F8 { !pet "" }
|
||||
|
||||
!set CONFIG_KEYCMD_HELP = 1
|
||||
!macro CONFIG_KEYCMD_HELP { !pet "list" }
|
||||
|
||||
; !set CONFIG_KEYCMD_F9 = 1
|
||||
; !macro CONFIG_KEYCMD_F9 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F10 = 1
|
||||
; !macro CONFIG_KEYCMD_F10 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F11 = 1
|
||||
; !macro CONFIG_KEYCMD_F11 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F12 = 1
|
||||
; !macro CONFIG_KEYCMD_F12 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F13 = 1
|
||||
; !macro CONFIG_KEYCMD_F13 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F14 = 1
|
||||
; !macro CONFIG_KEYCMD_F14 { !pet "" }
|
||||
|
||||
|
||||
// Software features
|
||||
|
||||
#define CONFIG_PANIC_SCREEN
|
||||
#define CONFIG_DOS_WEDGE
|
||||
#define CONFIG_TAPE_WEDGE
|
||||
// #define CONFIG_TAPE_HEAD_ALIGN
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
; Screen editor
|
||||
|
||||
!set CONFIG_EDIT_STOPQUOTE = 1
|
||||
!set CONFIG_EDIT_TABULATORS = 1
|
||||
|
||||
|
||||
// Eye candy
|
||||
; Software features
|
||||
|
||||
// #define CONFIG_COLORS_BRAND
|
||||
#define CONFIG_BANNER_SIMPLE
|
||||
// #define CONFIG_BANNER_FANCY
|
||||
#define CONFIG_SHOW_FEATURES
|
||||
!set CONFIG_PANIC_SCREEN = 1
|
||||
!set CONFIG_DOS_WEDGE = 1
|
||||
!set CONFIG_TAPE_WEDGE = 1
|
||||
; !set CONFIG_TAPE_HEAD_ALIGN = 1
|
||||
!set CONFIG_BCD_SAFE_INTERRUPTS = 1
|
||||
|
||||
|
||||
// Debug options
|
||||
; Eye candy
|
||||
|
||||
// #define CONFIG_DBG_STUBS_BRK
|
||||
#define CONFIG_DBG_PRINTF
|
||||
; !set CONFIG_COLORS_BRAND = 1
|
||||
!set CONFIG_BANNER_SIMPLE = 1
|
||||
; !set CONFIG_BANNER_FANCY = 1
|
||||
!set CONFIG_SHOW_FEATURES = 1
|
||||
|
||||
// Other
|
||||
|
||||
// #define CONFIG_COMPRESSION_LVL_2
|
||||
; Debug options
|
||||
|
||||
; !set CONFIG_DBG_STUBS_BRK = 1
|
||||
!set CONFIG_DBG_PRINTF = 1
|
||||
|
||||
; Other
|
||||
|
||||
; !set CONFIG_COMPRESSION_LVL_2 = 1
|
||||
+97
-96
@@ -1,137 +1,138 @@
|
||||
|
||||
.const CONFIG_ID = $03 // should be 1 byte, different for each config file!
|
||||
.encoding "petscii_upper"
|
||||
!set CONFIG_ID = $03 ; should be 1 byte, different for each config file!
|
||||
|
||||
//
|
||||
// Please read CONFIG.md before modifying this file!
|
||||
//
|
||||
;
|
||||
; Please read CONFIG.md before modifying this file!
|
||||
;
|
||||
|
||||
// Idea:
|
||||
// - sane defaults for the Ultimate 64 FPGA computer
|
||||
// - do not enable features which are a significant compatibility risk
|
||||
; Idea:
|
||||
; - sane defaults for the Ultimate 64 FPGA computer
|
||||
; - do not enable features which are a significant compatibility risk
|
||||
|
||||
|
||||
|
||||
// Hardware platform and brand
|
||||
; Hardware platform and brand
|
||||
|
||||
#define CONFIG_PLATFORM_COMMODORE_64
|
||||
|
||||
// #define CONFIG_MB_MEGA_65
|
||||
#define CONFIG_MB_ULTIMATE_64
|
||||
|
||||
// #define CONFIG_BRAND_GENERIC
|
||||
// #define CONFIG_BRAND_TESTING
|
||||
#define CONFIG_BRAND_ULTIMATE_64
|
||||
!set CONFIG_PLATFORM_COMMODORE_64 = 1
|
||||
!set CONFIG_MB_U64 = 1
|
||||
|
||||
|
||||
// Processor instruction set
|
||||
; Memory model
|
||||
|
||||
#define CONFIG_CPU_MOS_6502
|
||||
// #define CONFIG_CPU_WDC_65C02
|
||||
// #define CONFIG_CPU_CSG_65CE02
|
||||
// #define CONFIG_CPU_M65_45GS02
|
||||
// #define CONFIG_CPU_WDC_65816
|
||||
; !set CONFIG_MEMORY_MODEL_38K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_46K = 1
|
||||
!set CONFIG_MEMORY_MODEL_50K = 1
|
||||
; !set CONFIG_MEMORY_MODEL_60K = 1
|
||||
|
||||
|
||||
// Memory model
|
||||
; IEC bus configuration
|
||||
|
||||
// #define CONFIG_MEMORY_MODEL_38K
|
||||
// #define CONFIG_MEMORY_MODEL_46K
|
||||
#define CONFIG_MEMORY_MODEL_50K
|
||||
// #define CONFIG_MEMORY_MODEL_60K
|
||||
!set CONFIG_IEC = 1
|
||||
!set CONFIG_IEC_DOLPHINDOS = 1
|
||||
!set CONFIG_IEC_DOLPHINDOS_FAST = 1
|
||||
!set CONFIG_IEC_JIFFYDOS = 1
|
||||
!set CONFIG_IEC_JIFFYDOS_BLANK = 1
|
||||
|
||||
|
||||
// I/O devices
|
||||
; Tape deck configuration
|
||||
|
||||
#define CONFIG_IEC
|
||||
#define CONFIG_IEC_DOLPHINDOS
|
||||
#define CONFIG_IEC_DOLPHINDOS_FAST
|
||||
#define CONFIG_IEC_JIFFYDOS
|
||||
#define CONFIG_IEC_JIFFYDOS_BLANK
|
||||
|
||||
#define CONFIG_TAPE_NORMAL
|
||||
#define CONFIG_TAPE_TURBO
|
||||
#define CONFIG_TAPE_AUTODETECT
|
||||
// #define CONFIG_TAPE_NO_KEY_SENSE
|
||||
// #define CONFIG_TAPE_NO_MOTOR_CONTROL
|
||||
!set CONFIG_TAPE_NORMAL = 1
|
||||
!set CONFIG_TAPE_TURBO = 1
|
||||
!set CONFIG_TAPE_AUTODETECT = 1
|
||||
; !set CONFIG_TAPE_NO_KEY_SENSE = 1
|
||||
; !set CONFIG_TAPE_NO_MOTOR_CONTROL = 1
|
||||
|
||||
|
||||
// Multiple SID support
|
||||
; Sound support
|
||||
|
||||
// #define CONFIG_SID_2ND
|
||||
.const CONFIG_SID_2ND_ADDRESS = $D420
|
||||
|
||||
// #define CONFIG_SID_3RD
|
||||
.const CONFIG_SID_3RD_ADDRESS = $D440
|
||||
|
||||
#define CONFIG_SID_D4XX
|
||||
#define CONFIG_SID_D5XX
|
||||
; !set CONFIG_SID_2ND_ADDRESS = $D420
|
||||
; !set CONFIG_SID_3RD_ADDRESS = $D440
|
||||
!set CONFIG_SID_D4XX = 1
|
||||
!set CONFIG_SID_D5XX = 1
|
||||
|
||||
|
||||
// Keyboard settings
|
||||
; Keyboard settings
|
||||
|
||||
// #define CONFIG_LEGACY_SCNKEY
|
||||
// #define CONFIG_KEYBOARD_C128
|
||||
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEYBOARD_C65 // untested
|
||||
// #define CONFIG_KEYBOARD_C65_CAPS_LOCK // untested
|
||||
// #define CONFIG_KEY_REPEAT_DEFAULT
|
||||
// #define CONFIG_KEY_REPEAT_ALWAYS
|
||||
#define CONFIG_KEY_FAST_SCAN
|
||||
#define CONFIG_JOY1_CURSOR
|
||||
#define CONFIG_JOY2_CURSOR
|
||||
; !set CONFIG_LEGACY_SCNKEY = 1
|
||||
; !set CONFIG_KEYBOARD_C128 = 1
|
||||
; !set CONFIG_KEYBOARD_C128_CAPS_LOCK = 1
|
||||
; !set CONFIG_KEYBOARD_C65 = 1 ; untested
|
||||
; !set CONFIG_KEYBOARD_C65_CAPS_LOCK = 1 ; untested
|
||||
; !set CONFIG_KEY_REPEAT_DEFAULT = 1
|
||||
; !set CONFIG_KEY_REPEAT_ALWAYS = 1
|
||||
!set CONFIG_KEY_FAST_SCAN = 1
|
||||
!set CONFIG_JOY1_CURSOR = 1
|
||||
!set CONFIG_JOY2_CURSOR = 1
|
||||
|
||||
#define CONFIG_PROGRAMMABLE_KEYS
|
||||
!set CONFIG_PROGRAMMABLE_KEYS = 1
|
||||
|
||||
.const CONFIG_KEYCMD_RUN = @"\$5FL"
|
||||
!set CONFIG_KEYCMD_RUN = 1
|
||||
!macro CONFIG_KEYCMD_RUN {
|
||||
!byte $5F
|
||||
!pet "l" }
|
||||
|
||||
.const CONFIG_KEYCMD_F1 = @"@"
|
||||
.const CONFIG_KEYCMD_F2 = @""
|
||||
.const CONFIG_KEYCMD_F3 = @"RUN:"
|
||||
.const CONFIG_KEYCMD_F4 = @""
|
||||
.const CONFIG_KEYCMD_F5 = @"LOAD"
|
||||
.const CONFIG_KEYCMD_F6 = @""
|
||||
.const CONFIG_KEYCMD_F7 = @"@$"
|
||||
.const CONFIG_KEYCMD_F8 = @""
|
||||
!set CONFIG_KEYCMD_F1 = 1
|
||||
!macro CONFIG_KEYCMD_F1 { !pet "@" }
|
||||
; !set CONFIG_KEYCMD_F2 = 1
|
||||
; !macro CONFIG_KEYCMD_F2 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F3 = 1
|
||||
!macro CONFIG_KEYCMD_F3 { !pet "run:" }
|
||||
; !set CONFIG_KEYCMD_F4 = 1
|
||||
; !macro CONFIG_KEYCMD_F4 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F5 = 1
|
||||
!macro CONFIG_KEYCMD_F5 { !pet "load" }
|
||||
; !set CONFIG_KEYCMD_F6 = 1
|
||||
; !macro CONFIG_KEYCMD_F6 { !pet "" }
|
||||
!set CONFIG_KEYCMD_F7 = 1
|
||||
!macro CONFIG_KEYCMD_F7 { !pet "@$" }
|
||||
; !set CONFIG_KEYCMD_F8 = 1
|
||||
; !macro CONFIG_KEYCMD_F8 { !pet "" }
|
||||
|
||||
.const CONFIG_KEYCMD_HELP = @"LIST"
|
||||
!set CONFIG_KEYCMD_HELP = 1
|
||||
!macro CONFIG_KEYCMD_HELP { !pet "list" }
|
||||
|
||||
.const CONFIG_KEYCMD_F9 = @""
|
||||
.const CONFIG_KEYCMD_F10 = @""
|
||||
.const CONFIG_KEYCMD_F11 = @""
|
||||
.const CONFIG_KEYCMD_F12 = @""
|
||||
.const CONFIG_KEYCMD_F13 = @""
|
||||
.const CONFIG_KEYCMD_F14 = @""
|
||||
; !set CONFIG_KEYCMD_F9 = 1
|
||||
; !macro CONFIG_KEYCMD_F9 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F10 = 1
|
||||
; !macro CONFIG_KEYCMD_F10 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F11 = 1
|
||||
; !macro CONFIG_KEYCMD_F11 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F12 = 1
|
||||
; !macro CONFIG_KEYCMD_F12 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F13 = 1
|
||||
; !macro CONFIG_KEYCMD_F13 { !pet "" }
|
||||
; !set CONFIG_KEYCMD_F14 = 1
|
||||
; !macro CONFIG_KEYCMD_F14 { !pet "" }
|
||||
|
||||
|
||||
// Screen editor
|
||||
; Screen editor
|
||||
|
||||
#define CONFIG_EDIT_STOPQUOTE
|
||||
// #define CONFIG_EDIT_TABULATORS
|
||||
!set CONFIG_EDIT_STOPQUOTE = 1
|
||||
; !set CONFIG_EDIT_TABULATORS = 1
|
||||
|
||||
|
||||
// Software features
|
||||
; Software features
|
||||
|
||||
#define CONFIG_PANIC_SCREEN
|
||||
#define CONFIG_DOS_WEDGE
|
||||
#define CONFIG_TAPE_WEDGE
|
||||
// #define CONFIG_TAPE_HEAD_ALIGN
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
!set CONFIG_PANIC_SCREEN = 1
|
||||
!set CONFIG_DOS_WEDGE = 1
|
||||
!set CONFIG_TAPE_WEDGE = 1
|
||||
; !set CONFIG_TAPE_HEAD_ALIGN = 1
|
||||
!set CONFIG_BCD_SAFE_INTERRUPTS = 1
|
||||
|
||||
|
||||
// Eye candy
|
||||
; Eye candy
|
||||
|
||||
#define CONFIG_COLORS_BRAND
|
||||
// #define CONFIG_BANNER_SIMPLE
|
||||
#define CONFIG_BANNER_FANCY
|
||||
#define CONFIG_SHOW_FEATURES
|
||||
!set CONFIG_COLORS_BRAND = 1
|
||||
; !set CONFIG_BANNER_SIMPLE = 1
|
||||
!set CONFIG_BANNER_FANCY = 1
|
||||
!set CONFIG_SHOW_FEATURES = 1
|
||||
|
||||
|
||||
// Debug options
|
||||
; Debug options
|
||||
|
||||
// #define CONFIG_DBG_STUBS_BRK
|
||||
// #define CONFIG_DBG_PRINTF
|
||||
; !set CONFIG_DBG_STUBS_BRK = 1
|
||||
; !set CONFIG_DBG_PRINTF = 1
|
||||
|
||||
// Other
|
||||
; Other
|
||||
|
||||
// #define CONFIG_COMPRESSION_LVL_2
|
||||
; !set CONFIG_COMPRESSION_LVL_2 = 1
|
||||
+321
-281
@@ -1,375 +1,415 @@
|
||||
|
||||
//
|
||||
// Various configuration dependent aliases/macros/checks
|
||||
//
|
||||
|
||||
.encoding "petscii_upper"
|
||||
;
|
||||
; Configuration dependent aliases/macros/checks
|
||||
;
|
||||
|
||||
|
||||
|
||||
// Check that platform configuration is correct
|
||||
{
|
||||
.var selected = 0;
|
||||
; Check that platform is specified
|
||||
|
||||
#if CONFIG_PLATFORM_COMMODORE_64
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_PLATFORM_COMMANDER_X16
|
||||
.eval selected++
|
||||
#endif
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_PLATFORM_COMMODORE_64 { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 { !set counter = counter + 1 }
|
||||
|
||||
.if (selected != 1) .error "Please select exactly one CONFIG_PLATFORM_* option"
|
||||
!if (counter != 1) { !error "Please select exactly one CONFIG_PLATFORM_* option" }
|
||||
|
||||
|
||||
|
||||
; Check that motherboard configuration is correct
|
||||
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_MB_M65 { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_MB_U64 { !set counter = counter + 1 }
|
||||
|
||||
!if (counter > 1) { !error "Please select at most one CONFIG_MB_* option" }
|
||||
|
||||
!ifdef ROM_LAYOUT_M65 { !ifndef CONFIG_MB_M65 { !error "ROM layout requires CONFIG_MB_M65 option" } }
|
||||
!ifdef ROM_LAYOUT_U16 { !ifndef CONFIG_MB_U64 { !error "ROM layout requires CONFIG_MB_U64 option" } }
|
||||
|
||||
!ifdef CONFIG_MB_M65 { !ifndef ROM_LAYOUT_M65 { !error "CONFIG_MB_M65 can only be used with appropriate ROM layout" } }
|
||||
; !ifdef CONFIG_MB_U64 { !ifndef ROM_LAYOUT_U64 { !error "CONFIG_MB_U64 can only be used with appropriate ROM layout" } }
|
||||
|
||||
!ifdef CONFIG_MB_M65 { !ifndef CONFIG_PLATFORM_COMMODORE_64 { !error "CONFIG_MB_M65 can only be used with CONFIG_PLATFORM_COMMODORE_64" } }
|
||||
!ifdef CONFIG_MB_U64 { !ifndef CONFIG_PLATFORM_COMMODORE_64 { !error "CONFIG_MB_U64 can only be used with CONFIG_PLATFORM_COMMODORE_64" } }
|
||||
|
||||
|
||||
|
||||
; Check that brand configuration is correct
|
||||
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_BRAND_CUSTOM_BUILD { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_BRAND_GENERIC { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_BRAND_TESTING { !set counter = counter + 1 }
|
||||
|
||||
!ifndef CONFIG_PLATFORM_COMMODORE_64 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_BRAND_* options for non-C64 platforms" }
|
||||
} else ifdef CONFIG_MB_M65 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_BRAND_* options for the MEGA65 motherboard" }
|
||||
} else ifdef CONFIG_MB_U64 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_BRAND_* options for the Ultimate 64 motherboard" }
|
||||
} else if (counter != 1) {
|
||||
!error "Please select exactly one CONFIG_BRAND_* option"
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that motherboard extras configuration is correct
|
||||
{
|
||||
.var selected = 0;
|
||||
; Check that processor configuration is correct
|
||||
|
||||
#if CONFIG_MB_MEGA_65
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_MB_ULTIMATE_64
|
||||
.eval selected++
|
||||
#endif
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_CPU_MOS_6502 { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_CPU_DTV_6502 { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_CPU_RCW_65C02 { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_CPU_WDC_65C02 { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_CPU_WDC_65816 { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_CPU_CSG_65CE02 { !set counter = counter + 1 }
|
||||
|
||||
.if (selected > 1) .error "Please select at most one CONFIG_MB_* option"
|
||||
|
||||
#if !CONFIG_PLATFORM_COMMODORE_64 && CONFIG_BRAND_MEGA_65 &&
|
||||
.error "CONFIG_BRAND_MEGA_65 can only be used with CONFIG_PLATFORM_COMMODORE_64"
|
||||
#endif
|
||||
#if !CONFIG_PLATFORM_COMMODORE_64 && CONFIG_BRAND_ULTIMATE_64 &&
|
||||
.error "CONFIG_BRAND_ULTIMATE_64 can only be used with CONFIG_PLATFORM_COMMODORE_64"
|
||||
#endif
|
||||
|
||||
#if CONFIG_MB_MEGA_65 && (CONFIG_SID_2ND || CONFIG_SID_3RD || CONFIG_SID_D4XX || CONFIG_SID_D5XX)
|
||||
.error "CONFIG_MB_MEGA_65 cannot be used with CONFIG_SID_*"
|
||||
#endif
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_CPU_* options for Commander X16 platform" }
|
||||
} else ifdef CONFIG_MB_M65 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_CPU_* options for MEGA65 motherboard" }
|
||||
} else ifdef CONFIG_MB_U64 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_CPU_* options for Ultimate 64 motherboard" }
|
||||
} else if (counter != 1) {
|
||||
!error "Please select exactly one CONFIG_CPU_* option"
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that brand configuration is correct
|
||||
{
|
||||
.var selected = 0;
|
||||
; Check that memory model configuration is correct
|
||||
|
||||
#if CONFIG_BRAND_CUSTOM_BUILD
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_BRAND_GENERIC
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_BRAND_TESTING
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_BRAND_ULTIMATE_64
|
||||
.eval selected++
|
||||
#endif
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_MEMORY_MODEL_38K { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_MEMORY_MODEL_46K { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_MEMORY_MODEL_50K { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_MEMORY_MODEL_60K { !set counter = counter + 1 }
|
||||
|
||||
#if !CONFIG_MB_MEGA_65
|
||||
.if (selected != 1) .error "Please select exactly one CONFIG_BRAND_* option"
|
||||
#endif
|
||||
#if CONFIG_MB_MEGA_65
|
||||
.if (selected != 0) .error "Do not use CONFIG_BRAND_* options for MEGA65"
|
||||
#endif
|
||||
|
||||
#if CONFIG_MB_MEGA_65 && CONFIG_SHOW_FEATURES
|
||||
.if (selected != 0) .error "Do not use CONFIG_SHOW_FEATURES options for MEGA65"
|
||||
#endif
|
||||
|
||||
#if CONFIG_MB_ULTIMATE_64 && !(CONFIG_BRAND_ULTIMATE_64 || CONFIG_BRAND_TESTING || CONFIG_BRAND_CUSTOM_BUILD)
|
||||
.error "Please select brand either matching the CONFIG_MB_*, or a testing/custom one"
|
||||
#endif
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
!ifdef CONFIG_MEMORY_MODEL_60K { !error "Do not use CONFIG_MEMORY_MODEL_60K options for MEGA65 motherboard" }
|
||||
}
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
!ifndef CONFIG_MEMORY_MODEL_38K { !error "Select CONFIG_MEMORY_MODEL_38K options for Commander X16 platform" }
|
||||
}
|
||||
!if (counter != 1) {
|
||||
!error "Please select exactly one CONFIG_MEMORY_MODEL_* option"
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that processor configuration is correct
|
||||
{
|
||||
.var selected = 0;
|
||||
; Check that IEC configuration is correct
|
||||
|
||||
#if CONFIG_CPU_MOS_6502
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_CPU_WDC_65C02
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_CPU_CSG_65CE02
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_CPU_M65_45GS02
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_CPU_WDC_65816
|
||||
.eval selected++
|
||||
#endif
|
||||
|
||||
.if (selected != 1) .error "Please select exactly one CONFIG_CPU_* option"
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
!ifdef CONFIG_IEC { !error "Do not use CONFIG_IEC options for Commander X16 platform, it is not implemented" }
|
||||
}
|
||||
!ifdef CONFIG_MB_MEGA65 {
|
||||
!ifdef CONFIG_IEC_BURST_CIA1 { !error "Do not use CONFIG_IEC_BURST_CIA1 options for MEGA65 motherboard, CONFIG_IEC_BURST_M65 instead" }
|
||||
!ifdef CONFIG_IEC_BURST_CIA2 { !error "Do not use CONFIG_IEC_BURST_CIA2 options for MEGA65 motherboard, CONFIG_IEC_BURST_M65 instead" }
|
||||
}
|
||||
!ifndef CONFIG_MB_MEGA65 {
|
||||
!ifdef CONFIG_IEC_BURST_M65 { !error "CONFIG_IEC_BURST_M65 is only possible for MEGA65 motherboard" }
|
||||
}
|
||||
!ifdef CONFIG_IEC_BURST_CIA1 {
|
||||
!ifndef CONFIG_IEC { !error "CONFIG_IEC_BURST_CIA1 requires CONFIG_IEC" }
|
||||
}
|
||||
!ifdef CONFIG_IEC_BURST_CIA2 {
|
||||
!ifndef CONFIG_IEC { !error "CONFIG_IEC_BURST_CIA2 requires CONFIG_IEC" }
|
||||
}
|
||||
!ifdef CONFIG_IEC_BURST_CIA1 {
|
||||
!ifdef CONFIG_IEC_BURST_CIA2 { !error "CONFIG_IEC_BURST_CIA1 and CONFIG_IEC_BURST_CIA2 are mutually exclusive" }
|
||||
}
|
||||
!ifdef CONFIG_IEC_BURST_M65 {
|
||||
!ifndef CONFIG_IEC { !error "CONFIG_IEC_BURST_M65 requires CONFIG_IEC" }
|
||||
}
|
||||
!ifdef CONFIG_IEC_DOLPHINDOS {
|
||||
!ifndef CONFIG_IEC { !error "CONFIG_IEC_DOLPHINDOS requires CONFIG_IEC" }
|
||||
}
|
||||
!ifdef CONFIG_IEC_DOLPHINDOS_FAST {
|
||||
!ifndef CONFIG_IEC_DOLPHINDOS { !error "CONFIG_IEC_DOLPHINDOS_FAST requires CONFIG_IEC_DOLPHINDOS" }
|
||||
}
|
||||
!ifdef CONFIG_IEC_JIFFYDOS {
|
||||
!ifndef CONFIG_IEC { !error "CONFIG_IEC_JIFFYDOS requires CONFIG_IEC" }
|
||||
}
|
||||
!ifdef CONFIG_IEC_JIFFYDOS_BLANK {
|
||||
!ifndef CONFIG_IEC_JIFFYDOS { !error "CONFIG_IEC_JIFFYDOS_BLANK requires CONFIG_IEC_JIFFYDOS" }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that memory model and ROM layout configurations is correct
|
||||
{
|
||||
#if ROM_LAYOUT_M65 && !CONFIG_CPU_M65_45GS02
|
||||
.error "MEGA65 ROM layout requires CONFIG_CPU_M65_45GS02"
|
||||
#endif
|
||||
#if ROM_LAYOUT_M65 && !CONFIG_MB_MEGA_65
|
||||
.error "MEGA65 ROM layout requires CONFIG_MB_MEGA_65"
|
||||
#endif
|
||||
; Check that tape deck configuration is correct
|
||||
|
||||
.var selected = 0;
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_TAPE_NORMAL { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_TAPE_TURBO { !set counter = counter + 1 }
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_38K
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_MEMORY_MODEL_46K
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_MEMORY_MODEL_50K
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
.eval selected++
|
||||
#endif
|
||||
|
||||
.if (selected != 1) .error "Please select exactly one CONFIG_MEMORY_MODEL_* option"
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
!ifdef CONFIG_TAPE_NORMAL { !error "Do not use CONFIG_TAPE_NORMAL options for Commander X16 platform, it is not implemented" }
|
||||
!ifdef CONFIG_TAPE_TURBO { !error "Do not use CONFIG_TAPE_TURBO options for Commander X16 platform, it is not implemented" }
|
||||
}
|
||||
!ifdef CONFIG_TAPE_AUTODETECT { !ifndef CONFIG_TAPE_NORMAL { !ifndef CONFIG_TAPE_TURBO {
|
||||
!error "CONFIG_TAPE_AUTODETECT requires both CONFIG_TAPE_NORMAL and CONFIG_TAPE_TURBO"
|
||||
} } }
|
||||
!ifdef CONFIG_TAPE_HEAD_ALIGN {
|
||||
!ifndef CONFIG_TAPE_WEDGE { !error "CONFIG_TAPE_HEAD_ALIGN requires CONFIG_TAPE_WEDGE" }
|
||||
}
|
||||
!ifdef CONFIG_TAPE_WEDGE {
|
||||
!if (counter = 0) { !error "CONFIG_TAPE_WEDGE requires CONFIG_TAPE_TURBO or CONFIG_TAPE_NORMAL"}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that IEC configuration is correct
|
||||
{
|
||||
#if CONFIG_IEC_JIFFYDOS && !CONFIG_IEC
|
||||
.error "CONFIG_IEC_JIFFYDOS requires CONFIG_IEC"
|
||||
#endif
|
||||
; Check that RS-232 configuration is correct
|
||||
|
||||
#if CONFIG_IEC_JIFFYDOS_BLANK && !CONFIG_IEC_JIFFYDOS
|
||||
.error "CONFIG_IEC_JIFFYDOS_BLANK requires CONFIG_IEC_JIFFYDOS"
|
||||
#endif
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_RS232_ACIA { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_RS232_UP2400 { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_RS232_UP9600 { !set counter = counter + 1 }
|
||||
|
||||
#if CONFIG_IEC_DOLPHINDOS && !CONFIG_IEC
|
||||
.error "CONFIG_IEC_DOLPHINDOS requires CONFIG_IEC"
|
||||
#endif
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_RS232_* options for Commander X16 platform, it is not implemented" }
|
||||
}
|
||||
!ifdef CONFIG_RS232_UP9600 {
|
||||
!ifdef CONFIG_TAPE_NORMAL { !error "CONFIG_RS232_UP9600 is not compatible with CONFIG_TAPE_NORMAL" }
|
||||
!ifdef CONFIG_TAPE_TURBO { !error "CONFIG_RS232_UP9600 is not compatible with CONFIG_TAPE_TURBO" }
|
||||
}
|
||||
!if (counter > 1) { !error "Please select at most one CONFIG_RS232_* option" }
|
||||
|
||||
#if CONFIG_IEC_DOLPHINDOS_FAST && !CONFIG_IEC_DOLPHINDOS
|
||||
.error "CONFIG_IEC_DOLPHINDOS_FAST requires CONFIG_IEC_DOLPHINDOS"
|
||||
#endif
|
||||
|
||||
#if (CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_MEGA_65) && !CONFIG_IEC
|
||||
.error "CONFIG_IEC_BURST_* requires CONFIG_IEC"
|
||||
#endif
|
||||
|
||||
#if CONFIG_IEC_BURST_MEGA_65 && !CONFIG_MB_MEGA_65
|
||||
.error "CONFIG_IEC_BURST_MEGA_65 requires CONFIG_MB_MEGA_65"
|
||||
#endif
|
||||
; Check that sound support configuration is correct
|
||||
|
||||
.var selected_iec_burst = 0;
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_SID_2ND_ADDRESS { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_SID_3RD_ADDRESS { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_SID_D4XX { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_SID_D5XX { !set counter = counter + 1 }
|
||||
|
||||
#if CONFIG_IEC_BURST_CIA1
|
||||
.eval selected_iec_burst++
|
||||
#endif
|
||||
#if CONFIG_IEC_BURST_CIA2
|
||||
.eval selected_iec_burst++
|
||||
#endif
|
||||
#if CONFIG_IEC_BURST_MEGA_65
|
||||
.eval selected_iec_burst++
|
||||
#endif
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_SID_* options for Commander X16 platform" }
|
||||
}
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
!if (counter != 0) { !error "Do not use CONFIG_SID_* options for MEGA65 motherboard" }
|
||||
}
|
||||
!ifdef CONFIG_SID_2ND_ADDRESS {
|
||||
!if (CONFIG_SID_2ND_ADDRESS = $D400) { !error "CONFIG_SID_2ND_ADDRESS points to the 1st SID" }
|
||||
}
|
||||
!ifdef CONFIG_SID_3RD_ADDRESS {
|
||||
!if (CONFIG_SID_3RD_ADDRESS = $D400) { !error "CONFIG_SID_3RD_ADDRESS points to the 1st SID" }
|
||||
}
|
||||
!ifdef CONFIG_SID_2ND_ADDRESS { !ifdef CONFIG_SID_3RD_ADDRESS {
|
||||
!if (CONFIG_SID_2ND_ADDRESS = CONFIG_SID_3RD_ADDRESS) { !error "Configured SIDs have the same addresses" }
|
||||
} }
|
||||
|
||||
.if (selected_iec_burst > 1) .error "Please select at most one CONFIG_IEC_BURST_* option"
|
||||
|
||||
|
||||
; Check that keyboard settings are correct
|
||||
|
||||
!ifdef CONFIG_LEGACY_SCNKEY {
|
||||
!ifdef CONFIG_RS232_UP2400 { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_RS232_UP2400" }
|
||||
!ifdef CONFIG_RS232_UP9600 { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_RS232_UP9600" }
|
||||
!ifdef CONFIG_TAPE_NORMAL { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_TAPE_NORMAL" }
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_KEYBOARD_C128" }
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_KEYBOARD_C128_CAPS_LOCK" }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_KEYBOARD_C65" }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_KEYBOARD_C65_CAPS_LOCK" }
|
||||
}
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !error "MEGA65 motherboard is not compatible with CONFIG_KEYBOARD_C128" }
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !error "MEGA65 motherboard is not compatible with CONFIG_KEYBOARD_C128_CAPS_LOCK" }
|
||||
!ifdef CONFIG_LEGACY_SCNKEY { !error "MEGA65 motherboard is not compatible with CONFIG_LEGACY_SCNKEY" }
|
||||
}
|
||||
!ifdef CONFIG_MB_U64 {
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !error "Ultimate 64 motherboard is not compatible with CONFIG_KEYBOARD_C128" }
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !error "Ultimate 64 motherboard is not compatible with CONFIG_KEYBOARD_C128_CAPS_LOCK" }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !error "Ultimate 64 motherboard is not compatible with CONFIG_KEYBOARD_C65" }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !error "Ultimate 64 motherboard is not compatible with CONFIG_KEYBOARD_C65_CAPS_LOCK" }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that tape configuration is correct
|
||||
{
|
||||
#if (!CONFIG_TAPE_NORMAL || !CONFIG_TAPE_TURBO) && CONFIG_TAPE_AUTODETECT
|
||||
.error "CONFIG_TAPE_AUTODETECT requires both CONFIG_TAPE_NORMAL and CONFIG_TAPE_TURBO"
|
||||
#endif
|
||||
; Check that startup banner configuration is correct
|
||||
|
||||
!set counter = 0
|
||||
!ifdef CONFIG_BANNER_SIMPLE { !set counter = counter + 1 }
|
||||
!ifdef CONFIG_BANNER_FANCY { !set counter = counter + 1 }
|
||||
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
!if (counter > 0) { !error "Do not use CONFIG_BANNER_* options for MEGA65" }
|
||||
!ifdef CONFIG_COLORS_BRAND { !errror "Do not use CONFIG_COLORS_BRAND options for MEGA65" }
|
||||
!ifdef CONFIG_SHOW_FEATURES { !errror "Do not use CONFIG_SHOW_FEATURES options for MEGA65" }
|
||||
} else {
|
||||
!if (counter != 1) { !error "Please select exactly one CONFIG_BANNER_* option" }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that RS-232 configuration is correct
|
||||
{
|
||||
#if CONFIG_RS232_UP9600 && (CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO)
|
||||
.error "CONFIG_RS232_UP9600 is not compatible with CONFIG_TAPE_*"
|
||||
#endif
|
||||
;
|
||||
; Define some macros depending on the configuration
|
||||
;
|
||||
|
||||
.var selected_rs232 = 0;
|
||||
|
||||
#if CONFIG_RS232_UP2400
|
||||
.eval selected_rs232++
|
||||
#endif
|
||||
#if CONFIG_RS232_UP9600
|
||||
.eval selected_rs232++
|
||||
#endif
|
||||
|
||||
.if (selected_rs232 > 1) .error "Please select at most one CONFIG_RS232_* option"
|
||||
; Handle CPU configuration
|
||||
|
||||
!ifdef CONFIG_BCD_SAFE_INTERRUPTS { !set HAS_BCD_SAFE_INTERRUPTS = 1 }
|
||||
|
||||
!ifdef CONFIG_CPU_MOS_6502 {
|
||||
!cpu 6502
|
||||
}
|
||||
!ifdef CONFIG_CPU_DTV_6502 {
|
||||
!cpu c64dtv2
|
||||
!set HAS_OPCODE_BRA = 1
|
||||
; XXX
|
||||
}
|
||||
!ifdef CONFIG_CPU_RCW_65C02 {
|
||||
!cpu r65c02
|
||||
!set HAS_BCD_SAFE_INTERRUPTS = 1
|
||||
!set HAS_OPCODE_BRA = 1
|
||||
!set HAS_OPCODES_65C02 = 1
|
||||
}
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
!cpu w65c02
|
||||
!set HAS_BCD_SAFE_INTERRUPTS = 1
|
||||
!set HAS_OPCODE_BRA = 1
|
||||
!set HAS_OPCODES_65C02 = 1
|
||||
}
|
||||
!ifdef CONFIG_CPU_WDC_65C02 {
|
||||
!cpu w65c02
|
||||
!set HAS_BCD_SAFE_INTERRUPTS = 1
|
||||
!set HAS_OPCODE_BRA = 1
|
||||
!set HAS_OPCODES_65C02 = 1
|
||||
}
|
||||
!ifdef CONFIG_CPU_WDC_65816 {
|
||||
!cpu 65816
|
||||
!set HAS_BCD_SAFE_INTERRUPTS = 1
|
||||
!set HAS_OPCODE_BRA = 1
|
||||
!set HAS_OPCODES_65C02 = 1
|
||||
!set HAS_OPCODES_65816 = 1
|
||||
}
|
||||
!ifdef CONFIG_CPU_CSG_65CE02 {
|
||||
!cpu 65ce02
|
||||
!set HAS_BCD_SAFE_INTERRUPTS = 1
|
||||
!set HAS_OPCODE_BRA = 1
|
||||
!set HAS_OPCODES_65C02 = 1
|
||||
!set HAS_OPCODES_65CE02 = 1
|
||||
}
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
!cpu m65
|
||||
!set HAS_BCD_SAFE_INTERRUPTS = 1
|
||||
!set HAS_OPCODE_BRA = 1
|
||||
!set HAS_OPCODES_65C02 = 1
|
||||
!set HAS_OPCODES_65CE02 = 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Check that startup banner configuration is correct
|
||||
{
|
||||
.var selected = 0;
|
||||
; Handle memory model
|
||||
|
||||
#if CONFIG_BANNER_SIMPLE
|
||||
.eval selected++
|
||||
#endif
|
||||
#if CONFIG_BANNER_FANCY
|
||||
.eval selected++
|
||||
#endif
|
||||
|
||||
#if !CONFIG_MB_MEGA_65
|
||||
.if (selected != 1) .error "Please select exactly one CONFIG_BANNER_* option"
|
||||
#endif
|
||||
|
||||
#if CONFIG_MB_MEGA_65
|
||||
.if (selected != 0) .error "Do not use CONFIG_BANNER_* options for MEGA65"
|
||||
#endif
|
||||
|
||||
#if CONFIG_MB_MEGA_65 && CONFIG_COLORS_BRAND
|
||||
.error "Do not use CONFIG_COLORS_BRAND options for MEGA65"
|
||||
#endif
|
||||
|
||||
}
|
||||
!ifdef CONFIG_MEMORY_MODEL_46K { !set CONFIG_MEMORY_MODEL_46K_OR_50K = 1 }
|
||||
!ifdef CONFIG_MEMORY_MODEL_50K { !set CONFIG_MEMORY_MODEL_46K_OR_50K = 1 }
|
||||
|
||||
|
||||
|
||||
// Check if keyboard options are correct
|
||||
.function CHECK_KEYCMD(keycmd)
|
||||
{
|
||||
.if (keycmd.size() > 0) .return 1
|
||||
.return 0
|
||||
}
|
||||
{
|
||||
#if CONFIG_LEGACY_SCNKEY && CONFIG_RS232_UP9600
|
||||
.error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_RS232_UP9600"
|
||||
#endif
|
||||
#if CONFIG_LEGACY_SCNKEY && CONFIG_TAPE_NORMAL
|
||||
.error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_TAPE_NORMAL"
|
||||
#endif
|
||||
#if CONFIG_LEGACY_SCNKEY && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C128_CAPS_LOCK || CONFIG_KEYBOARD_C65 || CONFIG_KEYBOARD_C65_CAPS_LOCK)
|
||||
.error "CONFIG_LEGACY_SCNKEY and CONFIG_KEYBOARD_C128* / CONFIG_KEYBOARD_C65* are mutually exclusive"
|
||||
#endif
|
||||
; Handle IEC configuration
|
||||
|
||||
#if (CONFIG_MB_MEGA_65 || CONFIG_MB_ULTIMATE_64) && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C128_CAPS_LOCK)
|
||||
.error "Selected CONFIG_MB_* is not compatible with CONFIG_KEYBOARD_C128*"
|
||||
#endif
|
||||
#if CONFIG_MB_ULTIMATE_64 && (CONFIG_KEYBOARD_C65 || CONFIG_KEYBOARD_C65_CAPS_LOCK)
|
||||
.error "Selected CONFIG_MB_* is not compatible with CONFIG_KEYBOARD_C65*"
|
||||
#endif
|
||||
!ifdef CONFIG_IEC_BURST_CIA1 { !set HAS_IEC_BURST = 1 }
|
||||
!ifdef CONFIG_IEC_BURST_CIA2 { !set HAS_IEC_BURST = 1 }
|
||||
!ifdef CONFIG_IEC_BURST_M65 { !set HAS_IEC_BURST = 1 }
|
||||
|
||||
.var num_pkeys_base = 0
|
||||
.var num_pkeys_ext1 = 0
|
||||
.var num_pkeys_ext2 = 0
|
||||
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_RUN)
|
||||
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F1)
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F2)
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F3)
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F4)
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F5)
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F6)
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F7)
|
||||
.eval num_pkeys_base += CHECK_KEYCMD(CONFIG_KEYCMD_F8)
|
||||
|
||||
.eval num_pkeys_ext1 += CHECK_KEYCMD(CONFIG_KEYCMD_HELP)
|
||||
|
||||
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F9)
|
||||
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F10)
|
||||
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F11)
|
||||
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F12)
|
||||
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F13)
|
||||
.eval num_pkeys_ext2 += CHECK_KEYCMD(CONFIG_KEYCMD_F14)
|
||||
|
||||
.var num_pkeys = num_pkeys_base
|
||||
#if !CONFIG_LEGACY_SCNKEY && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65)
|
||||
.eval num_pkeys += num_pkeys_ext1
|
||||
#endif
|
||||
#if !CONFIG_LEGACY_SCNKEY && CONFIG_KEYBOARD_C65
|
||||
.eval num_pkeys += num_pkeys_ext2
|
||||
#endif
|
||||
|
||||
#if CONFIG_PROGRAMMABLE_KEYS
|
||||
.if (num_pkeys == 0) .error "CONFIG_PROGRAMMABLE_KEYS requires at least one defined key"
|
||||
#endif
|
||||
}
|
||||
!ifdef CONFIG_IEC_JIFFYDOS { !set CONFIG_IEC_JIFFYDOS_OR_DOLPHINDOS = 1 }
|
||||
!ifdef CONFIG_IEC_DOLPHINDOS { !set CONFIG_IEC_JIFFYDOS_OR_DOLPHINDOS = 1 }
|
||||
|
||||
|
||||
|
||||
// Check that features are configured correctly
|
||||
{
|
||||
#if CONFIG_TAPE_WEDGE && !CONFIG_TAPE_TURBO && !CONFIG_TAPE_NORMAL
|
||||
.error "CONFIG_TAPE_WEDGE requires CONFIG_TAPE_TURBO or CONFIG_TAPE_NORMAL"
|
||||
#endif
|
||||
#if !CONFIG_TAPE_WEDGE && CONFIG_TAPE_HEAD_ALIGN
|
||||
.error "CONFIG_TAPE_HEAD_ALIGN requires CONFIG_TAPE_WEDGE"
|
||||
#endif
|
||||
}
|
||||
; Handle tape configuration
|
||||
|
||||
!ifdef CONFIG_TAPE_NORMAL { !set HAS_TAPE = 1 }
|
||||
!ifdef CONFIG_TAPE_TURBO { !set HAS_TAPE = 1 }
|
||||
|
||||
!ifdef CONFIG_TAPE_NORMAL { !set HAS_TAPE_OR_IEC = 1 }
|
||||
!ifdef CONFIG_TAPE_TURBO { !set HAS_TAPE_OR_IEC = 1 }
|
||||
!ifdef CONFIG_IEC { !set HAS_TAPE_OR_IEC = 1 }
|
||||
|
||||
!ifdef CONFIG_DOS_WEDGE { !set HAS_WEDGE = 1 }
|
||||
!ifdef CONFIG_TAPE_WEDGE { !set HAS_WEDGE = 1 }
|
||||
|
||||
|
||||
|
||||
// Handle I/O configuration
|
||||
; Handle RS-232 configuration
|
||||
|
||||
#if CONFIG_RS232_UP2400 || CONFIG_RS232_UP9600
|
||||
#define HAS_RS232
|
||||
#endif
|
||||
!ifdef CONFIG_RS232_ACIA { !set HAS_RS232 = 1 }
|
||||
!ifdef CONFIG_RS232_UP2400 { !set HAS_RS232 = 1 }
|
||||
!ifdef CONFIG_RS232_UP9600 { !set HAS_RS232 = 1 }
|
||||
|
||||
|
||||
|
||||
// Handle configuration of various features
|
||||
; Handle sound configuration
|
||||
|
||||
#if CONFIG_BCD_SAFE_INTERRUPTS
|
||||
#define HAS_BCD_SAFE_INTERRUPTS
|
||||
#endif
|
||||
!ifdef CONFIG_SID_D4XX { !set CONFIG_SID_D4XX_OR_D5XX = 1 }
|
||||
!ifdef CONFIG_SID_D5XX { !set CONFIG_SID_D4XX_OR_D5XX = 1 }
|
||||
|
||||
|
||||
|
||||
// Handle configuration of debug infrastructure
|
||||
; Handle keyboard configuration
|
||||
|
||||
.macro STUB_IMPLEMENTATION_RTS() {
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !set CONFIG_KEYBOARD_C128_OR_C65 = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !set CONFIG_KEYBOARD_C128_OR_C65 = 1 }
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !set CONFIG_KEYBOARD_C65_OR_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !set CONFIG_KEYBOARD_C65_OR_CAPS_LOCK = 1 }
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !set CONFIG_KEYBOARD_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !set CONFIG_KEYBOARD_CAPS_LOCK = 1 }
|
||||
|
||||
!ifdef CONFIG_JOY1_CURSOR { !set CONFIG_JOY1_OR_JOY2_CURSOR = 1 }
|
||||
!ifdef CONFIG_JOY2_CURSOR { !set CONFIG_JOY1_OR_JOY2_CURSOR = 1 }
|
||||
|
||||
|
||||
; Handle debug configuration
|
||||
|
||||
!macro STUB_IMPLEMENTATION_RTS {
|
||||
rts
|
||||
}
|
||||
|
||||
.macro STUB_IMPLEMENTATION_BRK() {
|
||||
.break
|
||||
!macro STUB_IMPLEMENTATION_BRK {
|
||||
; XXX set VICE breakpoint
|
||||
brk
|
||||
brk
|
||||
jmp *-2
|
||||
}
|
||||
|
||||
.macro STUB_IMPLEMENTATION()
|
||||
{
|
||||
#if CONFIG_DBG_STUBS_BRK
|
||||
STUB_IMPLEMENTATION_BRK()
|
||||
#else
|
||||
STUB_IMPLEMENTATION_RTS()
|
||||
#endif
|
||||
!ifdef CONFIG_DBG_STUBS_BRK {
|
||||
!macro STUB_IMPLEMENTATION { +STUB_IMPLEMENTATION_BRK }
|
||||
} else {
|
||||
!macro STUB_IMPLEMENTATION { +STUB_IMPLEMENTATION_RTS }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Setup colors
|
||||
; Handle colors
|
||||
|
||||
#if CONFIG_COLORS_BRAND && CONFIG_BRAND_ULTIMATE_64
|
||||
!set CONFIG_COLOR_BG = $06
|
||||
!set CONFIG_COLOR_TXT = $01
|
||||
|
||||
.const CONFIG_COLOR_BG = $00
|
||||
.const CONFIG_COLOR_TXT = $01
|
||||
|
||||
#else
|
||||
|
||||
.const CONFIG_COLOR_BG = $06
|
||||
.const CONFIG_COLOR_TXT = $01
|
||||
|
||||
#endif
|
||||
!ifdef CONFIG_COLORS_BRAND {
|
||||
!ifdef CONFIG_MB_U64 {
|
||||
!set CONFIG_COLOR_BG = $00
|
||||
!set CONFIG_COLOR_TXT = $01
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Determine if we need space-savings in BASIC code
|
||||
|
||||
#if !ROM_LAYOUT_M65
|
||||
#define HAS_SMALL_BASIC
|
||||
#endif
|
||||
; Determine if we need space-savings in BASIC code
|
||||
|
||||
!ifndef CONFIG_MB_M65 {
|
||||
!set HAS_SMALL_BASIC = 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
; Defines for multi-segment ROMs
|
||||
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
!ifdef SEGMENT_BASIC_0 { !set SEGMENT_M65_BASIC_0 = 1 }
|
||||
!ifdef SEGMENT_BASIC_1 { !set SEGMENT_M65_BASIC_1 = 1 }
|
||||
!ifdef SEGMENT_KERNAL_0 { !set SEGMENT_M65_KERNAL_0 = 1 }
|
||||
}
|
||||
+101
-509
@@ -1,546 +1,138 @@
|
||||
|
||||
//
|
||||
// Provide pseudocommands (and other goodies) to make CPU optimizations easier
|
||||
//
|
||||
|
||||
#if CONFIG_CPU_WDC_65C02 || CONFIG_CPU_CSG_65CE02 || CONFIG_CPU_CSG_4510 || CONFIG_CPU_M65_45GS02 || CONFIG_CPU_WDC_65816
|
||||
.cpu _65c02
|
||||
#define HAS_OPCODES_65C02
|
||||
#define HAS_BCD_SAFE_INTERRUPTS
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU_CSG_65CE02 || CONFIG_CPU_CSG_4510 || CONFIG_CPU_M65_45GS02
|
||||
#define HAS_OPCODES_65CE02
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU_CSG_4510 || CONFIG_CPU_M65_45GS02
|
||||
#define HAS_OPCODES_4510
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU_M65_45GS02
|
||||
#define HAS_OPCODES_45GS02
|
||||
#endif
|
||||
|
||||
#if CONFIG_CPU_WDC_65816
|
||||
#define HAS_OPCODES_65816
|
||||
#endif
|
||||
;
|
||||
; Various macros - mainly for making CPU-specific optimizations easier
|
||||
;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// These are not exactly for optimization - but to encourage proper usage of panic screen
|
||||
//
|
||||
|
||||
.pseudocommand panic code
|
||||
{
|
||||
// If case no panic screen is used, we can skip providing error codes within Kernal
|
||||
#if CONFIG_PANIC_SCREEN
|
||||
lda code
|
||||
#endif
|
||||
!macro panic @code {
|
||||
; If case no panic screen is used, we can skip providing error codes within Kernal
|
||||
!ifdef CONFIG_PANIC_SCREEN { lda #@code }
|
||||
jmp ($E4B7)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Macros for generating jumptables
|
||||
//
|
||||
|
||||
|
||||
.macro put_jumptable_lo(list)
|
||||
{
|
||||
.for (var i = 0; i < list.size(); i++)
|
||||
{
|
||||
.byte mod((list.get(i) - 1), $100)
|
||||
}
|
||||
!macro skip_2_bytes_trash_nvz {
|
||||
; Trick to skip a 2-byte instruction
|
||||
!byte $2C
|
||||
}
|
||||
|
||||
.macro put_jumptable_hi(list)
|
||||
{
|
||||
.for (var i = 0; i < list.size(); i++)
|
||||
{
|
||||
.byte floor((list.get(i) - 1) / $100)
|
||||
}
|
||||
}
|
||||
|
||||
#if HAS_OPCODES_65C02
|
||||
|
||||
.macro put_jumptable(list)
|
||||
{
|
||||
.for (var i = 0; i < list.size(); i++)
|
||||
{
|
||||
.word list.get(i)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Trick to skip a 2-byte instruction
|
||||
//
|
||||
|
||||
.pseudocommand skip_2_bytes_trash_nvz { .byte $2C }
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Memory mapping for C65 and MEGA65
|
||||
//
|
||||
|
||||
#if HAS_OPCODES_4510
|
||||
|
||||
.pseudocommand map { .byte $5C }
|
||||
.pseudocommand eom { .byte $EA }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Some additional 65C02 instructions
|
||||
//
|
||||
|
||||
#if HAS_OPCODES_65C02
|
||||
|
||||
.pseudocommand inc_a { .byte $1A }
|
||||
.pseudocommand dec_a { .byte $3A }
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Some additional 65CE02 instructions
|
||||
//
|
||||
|
||||
#if HAS_OPCODES_65CE02
|
||||
|
||||
// CPU flags support
|
||||
|
||||
.pseudocommand cle { .byte $02 }
|
||||
.pseudocommand see { .byte $03 }
|
||||
|
||||
// .B register support
|
||||
|
||||
.pseudocommand tab { .byte $5B }
|
||||
.pseudocommand tba { .byte $7B }
|
||||
|
||||
// .Z register support
|
||||
|
||||
.pseudocommand inz { .byte $1B }
|
||||
.pseudocommand dez { .byte $3B }
|
||||
.pseudocommand phz { .byte $DB }
|
||||
.pseudocommand plz { .byte $FB }
|
||||
.pseudocommand taz { .byte $4B }
|
||||
.pseudocommand tza { .byte $6B }
|
||||
|
||||
// 16-bit data processing
|
||||
|
||||
.pseudocommand dew addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "DEW requires zeropage address"
|
||||
.byte $C3, arg
|
||||
}
|
||||
|
||||
.pseudocommand inw addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "INW requires zeropage address"
|
||||
.byte $E3, arg
|
||||
}
|
||||
|
||||
// Zero page bit handling
|
||||
|
||||
.pseudocommand rmb0 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "RMB0 requires zeropage address"
|
||||
.byte $07, arg
|
||||
}
|
||||
|
||||
.pseudocommand rmb1 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "RMB1 requires zeropage address"
|
||||
.byte $17, arg
|
||||
}
|
||||
|
||||
.pseudocommand rmb2 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "RMB2 requires zeropage address"
|
||||
.byte $27, arg
|
||||
}
|
||||
|
||||
.pseudocommand rmb3 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "RMB3 requires zeropage address"
|
||||
.byte $37, arg
|
||||
}
|
||||
|
||||
.pseudocommand rmb4 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "RMB4 requires zeropage address"
|
||||
.byte $47, arg
|
||||
}
|
||||
|
||||
.pseudocommand rmb5 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "RMB5 requires zeropage address"
|
||||
.byte $57, arg
|
||||
}
|
||||
|
||||
.pseudocommand rmb6 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "RMB6 requires zeropage address"
|
||||
.byte $67, arg
|
||||
}
|
||||
|
||||
.pseudocommand rmb7 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "RMB7 requires zeropage address"
|
||||
.byte $77, arg
|
||||
}
|
||||
|
||||
.pseudocommand smb0 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "SMB0 requires zeropage address"
|
||||
.byte $87, arg
|
||||
}
|
||||
|
||||
.pseudocommand smb1 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "SMB1 requires zeropage address"
|
||||
.byte $97, arg
|
||||
}
|
||||
|
||||
.pseudocommand smb2 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "SMB2 requires zeropage address"
|
||||
.byte $A7, arg
|
||||
}
|
||||
|
||||
.pseudocommand smb3 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "SMB3 requires zeropage address"
|
||||
.byte $B7, arg
|
||||
}
|
||||
|
||||
.pseudocommand smb4 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "SMB4 requires zeropage address"
|
||||
.byte $C7, arg
|
||||
}
|
||||
|
||||
.pseudocommand smb5 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "SMB5 requires zeropage address"
|
||||
.byte $D7, arg
|
||||
}
|
||||
|
||||
.pseudocommand smb6 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "SMB6 requires zeropage address"
|
||||
.byte $E7, arg
|
||||
}
|
||||
|
||||
.pseudocommand smb7 addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.if (arg > $FF) .error "SMB7 requires zeropage address"
|
||||
.byte $F7, arg
|
||||
}
|
||||
|
||||
// Additional addressing modes
|
||||
|
||||
.pseudocommand jsr_ind addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.byte $22, mod(arg, $100), floor(arg / $100)
|
||||
}
|
||||
|
||||
.pseudocommand jsr_ind_x addr
|
||||
{
|
||||
.var arg = addr.getValue()
|
||||
.byte $23, mod(arg, $100), floor(arg / $100)
|
||||
}
|
||||
|
||||
|
||||
// Others, taken from https://github.com/smnjameson/M65_KickAsm_PseudoCommands
|
||||
|
||||
.const z = -999 // allows (base page),z addressing mode
|
||||
.const sy = -998 // allows (base page, s),y addressing mode
|
||||
.const AT_IZEROPAGEZ = 13 // adds a pseudo addressing mode
|
||||
.const AT_INDIRECTX = -5 // adds a pseudo addressing mode
|
||||
|
||||
.function GetAdressingModeType(arg) {
|
||||
.if(arg == AT_NONE) .return "AT_NONE"
|
||||
.if(arg == AT_IMMEDIATE) .return "AT_IMMEDIATE"
|
||||
.if(arg == AT_INDIRECT) .return "AT_INDIRECT"
|
||||
.if(arg == AT_INDIRECTX) .return "AT_INDIRECTX"
|
||||
.if(arg == AT_ABSOLUTE) .return "AT_ABSOLUTE"
|
||||
.if(arg == AT_ABSOLUTEX) .return "AT_ABSOLUTEX"
|
||||
.if(arg == AT_ABSOLUTEY) .return "AT_ABSOLUTEY"
|
||||
.if(arg == AT_IZEROPAGEX) .return "AT_IZEROPAGEX"
|
||||
.if(arg == AT_IZEROPAGEY) .return "AT_IZEROPAGEY"
|
||||
.if(arg == AT_IZEROPAGEZ) .return "AT_IZEROPAGEZ"
|
||||
.return arg
|
||||
}
|
||||
|
||||
.pseudocommand cpz arg {
|
||||
.var value = arg.getValue()
|
||||
.var type = arg.getType()
|
||||
.if(type == AT_IMMEDIATE) {
|
||||
.byte $C2, value
|
||||
} else .if(type == AT_ABSOLUTE) {
|
||||
.if(value <= $FF ) {
|
||||
.byte $D4, value
|
||||
} else {
|
||||
.byte $DC, <value, >value
|
||||
}
|
||||
!macro lda_zero {
|
||||
; WARNING: this one can be dangerous in soem cases, use with care!
|
||||
!ifdef HAS_OPCODES_65CE02 {
|
||||
tba
|
||||
} else {
|
||||
.error "Invalid adressingmode. 'cpz' doesn't support "+GetAdressingModeType(type)+" mode"
|
||||
lda #$00
|
||||
}
|
||||
}
|
||||
|
||||
.pseudocommand lda arg {
|
||||
.var value = arg.getValue()
|
||||
.var type = arg.getType()
|
||||
.if(type != AT_IZEROPAGEZ) .error "':lda' only accepts AT_IZEROPAGEZ"
|
||||
.if(value > $FF ) .error "':lda ($nn),z' requires zeropage address"
|
||||
.byte $B2, value
|
||||
}
|
||||
|
||||
.pseudocommand ldz arg
|
||||
{
|
||||
.var value = arg.getValue()
|
||||
.var type = arg.getType()
|
||||
.if(type == AT_IMMEDIATE) {
|
||||
.byte $A3, value
|
||||
} else .if(type == AT_ABSOLUTE) {
|
||||
.byte $AB, <value, >value
|
||||
} else .if(type == AT_ABSOLUTEX) {
|
||||
.byte $BB, <value, >value
|
||||
|
||||
; Stack manipulation - some CPUs will leave .A unchanged, some will use it as temporary storage, so consider .A trashed
|
||||
|
||||
!macro phx_trash_a { !ifdef HAS_OPCODES_65C02 {
|
||||
phx
|
||||
} else {
|
||||
.error "Invalid adressingmode. 'ldz' doesn't support "+GetAdressingModeType(type)+" mode"
|
||||
}
|
||||
}
|
||||
txa
|
||||
pha
|
||||
} }
|
||||
|
||||
.pseudocommand sta arg {
|
||||
.var value = arg.getValue()
|
||||
.var type = arg.getType()
|
||||
.if(type != AT_IZEROPAGEZ) .error "':sta' only accepts AT_IZEROPAGEZ"
|
||||
.if(value > $FF ) .error "':sta ($nn),z' requires zeropage address"
|
||||
.byte $92, value
|
||||
}
|
||||
!macro phy_trash_a { !ifdef HAS_OPCODES_65C02 {
|
||||
phy
|
||||
} else {
|
||||
tya
|
||||
pha
|
||||
} }
|
||||
|
||||
// Flat memory access support
|
||||
!macro plx_trash_a { !ifdef HAS_OPCODES_65C02 {
|
||||
plx
|
||||
} else {
|
||||
pla
|
||||
tax
|
||||
} }
|
||||
|
||||
.pseudocommand lda_lp arg {
|
||||
.var value = arg.getValue()
|
||||
.var type = arg.getType()
|
||||
.if(type != AT_IZEROPAGEZ) .error "'lda_lp' only accepts AT_IZEROPAGEZ"
|
||||
.if(value > $FF ) .error "'lda_lp' requires zeropage address"
|
||||
nop
|
||||
.byte $B2, value
|
||||
}
|
||||
|
||||
.pseudocommand sta_lp arg {
|
||||
.var value = arg.getValue()
|
||||
.var type = arg.getType()
|
||||
.if(type != AT_IZEROPAGEZ) .error "'sta_lp' only accepts AT_IZEROPAGEZ"
|
||||
.if(value > $FF ) .error "'sta_lp' requires zeropage address"
|
||||
nop
|
||||
.byte $92, value
|
||||
}
|
||||
|
||||
#endif
|
||||
!macro ply_trash_a { !ifdef HAS_OPCODES_65C02 {
|
||||
ply
|
||||
} else {
|
||||
pla
|
||||
tay
|
||||
} }
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Calculation shortcuts
|
||||
//
|
||||
; Near jump, on some CPUs can be substituted with shorter instruction
|
||||
|
||||
.pseudocommand lda_zero // WARNING: do not use within interrupts
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
tba
|
||||
#else
|
||||
lda #$00
|
||||
#endif
|
||||
}
|
||||
!macro bra @dst { !ifdef HAS_OPCODE_BRA {
|
||||
bra @dst
|
||||
} else {
|
||||
jmp @dst
|
||||
} }
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Stack manipulation - some CPUs will leave .A unchanged, some will use it as temporary storage, so consider .A trashed
|
||||
//
|
||||
; NOP definition, MEGA65 CPU uses EOM instead
|
||||
|
||||
.pseudocommand phx_trash_a
|
||||
{
|
||||
#if HAS_OPCODES_65C02
|
||||
phx
|
||||
#else
|
||||
txa
|
||||
pha
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand phy_trash_a
|
||||
{
|
||||
#if HAS_OPCODES_65C02
|
||||
phy
|
||||
#else
|
||||
tya
|
||||
pha
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand plx_trash_a
|
||||
{
|
||||
#if HAS_OPCODES_65C02
|
||||
plx
|
||||
#else
|
||||
pla
|
||||
tax
|
||||
#endif
|
||||
}
|
||||
|
||||
.pseudocommand ply_trash_a
|
||||
{
|
||||
#if HAS_OPCODES_65C02
|
||||
ply
|
||||
#else
|
||||
pla
|
||||
tay
|
||||
#endif
|
||||
}
|
||||
!macro nop { !ifdef CONFIG_MB_M65 {
|
||||
eom
|
||||
} else {
|
||||
nop
|
||||
} }
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Branches with far offsets, substitutes by Bxx + JMP for CPUs not supporting the instruction
|
||||
//
|
||||
; Branches with far offsets, substitutes by Bxx + JMP for CPUs not supporting the instruction
|
||||
|
||||
.pseudocommand bcs_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $B3, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bcc __l
|
||||
jmp dst
|
||||
__l:
|
||||
#endif
|
||||
}
|
||||
!macro bcs @dst { !ifdef HAS_OPCODES_65CE02 {
|
||||
lbcs @dst
|
||||
} else {
|
||||
bcc *+5
|
||||
jmp @dst
|
||||
} }
|
||||
|
||||
.pseudocommand bcc_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $93, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bcs __l
|
||||
jmp dst
|
||||
__l:
|
||||
#endif
|
||||
}
|
||||
!macro bcc @dst { !ifdef HAS_OPCODES_65CE02 {
|
||||
lbcc @dst
|
||||
} else {
|
||||
bcs *+5
|
||||
jmp @dst
|
||||
} }
|
||||
|
||||
.pseudocommand beq_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $F3, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bne __l
|
||||
jmp dst
|
||||
__l:
|
||||
#endif
|
||||
}
|
||||
!macro beq @dst { !ifdef HAS_OPCODES_65CE02 {
|
||||
lbeq @dst
|
||||
} else {
|
||||
bne *+5
|
||||
jmp @dst
|
||||
} }
|
||||
|
||||
.pseudocommand bne_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $D3, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
beq __l
|
||||
jmp dst
|
||||
__l:
|
||||
#endif
|
||||
}
|
||||
!macro bne @dst { !ifdef HAS_OPCODES_65CE02 {
|
||||
lbne @dst
|
||||
} else {
|
||||
beq *+5
|
||||
jmp @dst
|
||||
} }
|
||||
|
||||
.pseudocommand bmi_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $33, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bpl __l
|
||||
jmp dst
|
||||
__l:
|
||||
#endif
|
||||
}
|
||||
!macro bmi @dst { !ifdef HAS_OPCODES_65CE02 {
|
||||
lbmi @dst
|
||||
} else {
|
||||
bpl *+5
|
||||
jmp @dst
|
||||
} }
|
||||
|
||||
.pseudocommand bpl_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $13, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bmi __l
|
||||
jmp dst
|
||||
__l:
|
||||
#endif
|
||||
}
|
||||
!macro bpl @dst { !ifdef HAS_OPCODES_65CE02 {
|
||||
lbpl @dst
|
||||
} else {
|
||||
bmi *+5
|
||||
jmp @dst
|
||||
} }
|
||||
|
||||
.pseudocommand bvc_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $53, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bvs __l
|
||||
jmp dst
|
||||
__l:
|
||||
#endif
|
||||
}
|
||||
!macro bvc @dst { !ifdef HAS_OPCODES_65CE02 {
|
||||
lbvc @dst
|
||||
} else {
|
||||
bvs *+5
|
||||
jmp @dst
|
||||
} }
|
||||
|
||||
.pseudocommand bvs_16 dst
|
||||
{
|
||||
#if HAS_OPCODES_65CE02
|
||||
.var offset = mod($10000 + dst.getValue() - *, $10000) -2
|
||||
.byte $73, mod(offset, $100), floor(offset / $100)
|
||||
#else
|
||||
bvc __l
|
||||
jmp dst
|
||||
__l:
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Near jump, on some CPUs can be substituted with shorter instruction
|
||||
//
|
||||
|
||||
.pseudocommand jmp_8 dst
|
||||
{
|
||||
#if HAS_OPCODES_65C02
|
||||
bra dst
|
||||
#else
|
||||
jmp dst
|
||||
#endif
|
||||
}
|
||||
!macro bvs @dst { !ifdef HAS_OPCODES_65CE02 {
|
||||
lbvs @dst
|
||||
} else {
|
||||
bvc *+5
|
||||
jmp @dst
|
||||
} }
|
||||
@@ -1,69 +1,69 @@
|
||||
|
||||
// Error codes for 'panic' pseudocommand
|
||||
; Error codes for 'panic' pseudocommand
|
||||
|
||||
.const P_ERR_NONE = $00
|
||||
.const P_ERR_ROM_MISMATCH = $01 // this value has to be stable as long as possible
|
||||
!set P_ERR_NONE = $00
|
||||
!set P_ERR_ROM_MISMATCH = $01 ; this value has to be stable as long as possible
|
||||
|
||||
|
||||
// Kernal error codes - returned in the A register
|
||||
// Described in 'Commodore 64 Programmer's Reference Guide', page 306
|
||||
; Kernal error codes - returned in the A register
|
||||
; Described in 'Commodore 64 Programmer's Reference Guide', page 306
|
||||
|
||||
.const K_ERR_ROUTINE_TERMINATED = $00
|
||||
.const K_ERR_TOO_MANY_OPEN_FILES = $01
|
||||
.const K_ERR_FILE_ALREADY_OPEN = $02
|
||||
.const K_ERR_FILE_NOT_OPEN = $03
|
||||
.const K_ERR_FILE_NOT_FOUND = $04
|
||||
.const K_ERR_DEVICE_NOT_FOUND = $05
|
||||
.const K_ERR_FILE_NOT_INPUT = $06
|
||||
.const K_ERR_FILE_NOT_OUTPUT = $07
|
||||
.const K_ERR_FILE_NAME_MISSING = $08
|
||||
.const K_ERR_ILLEGAL_DEVICE_NUMBER = $09
|
||||
.const K_ERR_TOP_MEM_RS232 = $F0
|
||||
!set K_ERR_ROUTINE_TERMINATED = $00
|
||||
!set K_ERR_TOO_MANY_OPEN_FILES = $01
|
||||
!set K_ERR_FILE_ALREADY_OPEN = $02
|
||||
!set K_ERR_FILE_NOT_OPEN = $03
|
||||
!set K_ERR_FILE_NOT_FOUND = $04
|
||||
!set K_ERR_DEVICE_NOT_FOUND = $05
|
||||
!set K_ERR_FILE_NOT_INPUT = $06
|
||||
!set K_ERR_FILE_NOT_OUTPUT = $07
|
||||
!set K_ERR_FILE_NAME_MISSING = $08
|
||||
!set K_ERR_ILLEGAL_DEVICE_NUMBER = $09
|
||||
!set K_ERR_TOP_MEM_RS232 = $F0
|
||||
|
||||
// Kernal status codes for READST routine (IOSTATUS)
|
||||
// Described in 'Commodore 64 Programmer's Reference Guide', page 292
|
||||
; Kernal status codes for READST routine (IOSTATUS)
|
||||
; Described in 'Commodore 64 Programmer's Reference Guide', page 292
|
||||
|
||||
// For IEC devices
|
||||
.const K_STS_TIMEOUT_WRITE = $01
|
||||
.const K_STS_TIMEOUT_READ = $02
|
||||
.const K_STS_EOI = $40
|
||||
.const K_STS_DEVICE_NOT_FOUND = $80
|
||||
// For tape deck
|
||||
.const K_STS_SHORT_BLOCK = $04
|
||||
.const K_STS_LONG_BLOCK = $08
|
||||
.const K_STS_READ_ERROR = $10
|
||||
.const K_STS_CHECKSUM_ERROR = $20
|
||||
.const K_STS_END_OF_FILE = $40
|
||||
.const K_STS_END_OF_TAPE = $80
|
||||
; For IEC devices
|
||||
!set K_STS_TIMEOUT_WRITE = $01
|
||||
!set K_STS_TIMEOUT_READ = $02
|
||||
!set K_STS_EOI = $40
|
||||
!set K_STS_DEVICE_NOT_FOUND = $80
|
||||
; For tape deck
|
||||
!set K_STS_SHORT_BLOCK = $04
|
||||
!set K_STS_LONG_BLOCK = $08
|
||||
!set K_STS_READ_ERROR = $10
|
||||
!set K_STS_CHECKSUM_ERROR = $20
|
||||
!set K_STS_END_OF_FILE = $40
|
||||
!set K_STS_END_OF_TAPE = $80
|
||||
|
||||
// BASIC error codes, taken from http://sta.c64.org/cbm64baserr.html
|
||||
.const B_ERR_TOO_MANY_FILES = $01
|
||||
.const B_ERR_FILE_OPEN = $02
|
||||
.const B_ERR_FILE_NOT_OPEN = $03
|
||||
.const B_ERR_FILE_NOT_FOUND = $04
|
||||
.const B_ERR_DEVICE_NOT_PRESENT = $05
|
||||
.const B_ERR_NOT_INPUT_FILE = $06
|
||||
.const B_ERR_NOT_OUTPUT_FILE = $07
|
||||
.const B_ERR_MISSING_FILENAME = $08
|
||||
.const B_ERR_ILLEGAL_DEVICE_NUMBER = $09
|
||||
.const B_ERR_NEXT_WITHOUT_FOR = $0A
|
||||
.const B_ERR_SYNTAX = $0B
|
||||
.const B_ERR_RETURN_WITHOUT_GOSUB = $0C
|
||||
.const B_ERR_OUT_OF_DATA = $0D
|
||||
.const B_ERR_ILLEGAL_QUANTITY = $0E
|
||||
.const B_ERR_OVERFLOW = $0F
|
||||
.const B_ERR_OUT_OF_MEMORY = $10
|
||||
.const B_ERR_UNDEFD_STATEMENT = $11
|
||||
.const B_ERR_BAD_SUBSCRIPT = $12
|
||||
.const B_ERR_REDIMD_ARRAY = $13
|
||||
.const B_ERR_DIVISION_BY_ZERO = $14
|
||||
.const B_ERR_ILLEGAL_DIRECT = $15
|
||||
.const B_ERR_TYPE_MISMATCH = $16
|
||||
.const B_ERR_STRING_TOO_LONG = $17
|
||||
.const B_ERR_FILE_DATA = $18
|
||||
.const B_ERR_FORMULA_TOO_COMPLEX = $19
|
||||
.const B_ERR_CANT_CONTINUE = $1A
|
||||
.const B_ERR_UNDEFD_FUNCTION = $1B
|
||||
.const B_ERR_VERIFY = $1C
|
||||
.const B_ERR_LOAD = $1D
|
||||
.const B_ERR_BREAK = $1E
|
||||
; BASIC error codes, taken from http://sta.c64.org/cbm64baserr.html
|
||||
!set B_ERR_TOO_MANY_FILES = $01
|
||||
!set B_ERR_FILE_OPEN = $02
|
||||
!set B_ERR_FILE_NOT_OPEN = $03
|
||||
!set B_ERR_FILE_NOT_FOUND = $04
|
||||
!set B_ERR_DEVICE_NOT_PRESENT = $05
|
||||
!set B_ERR_NOT_INPUT_FILE = $06
|
||||
!set B_ERR_NOT_OUTPUT_FILE = $07
|
||||
!set B_ERR_MISSING_FILENAME = $08
|
||||
!set B_ERR_ILLEGAL_DEVICE_NUMBER = $09
|
||||
!set B_ERR_NEXT_WITHOUT_FOR = $0A
|
||||
!set B_ERR_SYNTAX = $0B
|
||||
!set B_ERR_RETURN_WITHOUT_GOSUB = $0C
|
||||
!set B_ERR_OUT_OF_DATA = $0D
|
||||
!set B_ERR_ILLEGAL_QUANTITY = $0E
|
||||
!set B_ERR_OVERFLOW = $0F
|
||||
!set B_ERR_OUT_OF_MEMORY = $10
|
||||
!set B_ERR_UNDEFD_STATEMENT = $11
|
||||
!set B_ERR_BAD_SUBSCRIPT = $12
|
||||
!set B_ERR_REDIMD_ARRAY = $13
|
||||
!set B_ERR_DIVISION_BY_ZERO = $14
|
||||
!set B_ERR_ILLEGAL_DIRECT = $15
|
||||
!set B_ERR_TYPE_MISMATCH = $16
|
||||
!set B_ERR_STRING_TOO_LONG = $17
|
||||
!set B_ERR_FILE_DATA = $18
|
||||
!set B_ERR_FORMULA_TOO_COMPLEX = $19
|
||||
!set B_ERR_CANT_CONTINUE = $1A
|
||||
!set B_ERR_UNDEFD_FUNCTION = $1B
|
||||
!set B_ERR_VERIFY = $1C
|
||||
!set B_ERR_LOAD = $1D
|
||||
!set B_ERR_BREAK = $1E
|
||||
+141
-160
@@ -1,198 +1,179 @@
|
||||
|
||||
//
|
||||
// Names of hardware registers - names from C64 Programmer's Reference Guide, sometimes slightly modified
|
||||
//
|
||||
;
|
||||
; Names of hardware registers - names from C64 Programmer's Reference Guide, sometimes slightly modified
|
||||
;
|
||||
|
||||
|
||||
#if CONFIG_PLATFORM_COMMODORE_64
|
||||
!ifdef CONFIG_PLATFORM_COMMODORE_64 {
|
||||
|
||||
// CPU memory registers
|
||||
; CPU memory registers
|
||||
|
||||
.label CPU_D6510 = $00
|
||||
.label CPU_R6510 = $01
|
||||
!addr CPU_D6510 = $00
|
||||
!addr CPU_R6510 = $01
|
||||
|
||||
// VIC-II registers
|
||||
; VIC-II registers
|
||||
|
||||
.label __VIC_BASE = $D000 // base address of the chip
|
||||
!addr __VIC_BASE = $D000 ; base address of the chip
|
||||
|
||||
.label VIC_SP0X = $D000
|
||||
.label VIC_SP0Y = $D001
|
||||
.label VIC_SP1X = $D002
|
||||
.label VIC_SP1Y = $D003
|
||||
.label VIC_SP2X = $D004
|
||||
.label VIC_SP2Y = $D005
|
||||
.label VIC_SP3X = $D006
|
||||
.label VIC_SP3Y = $D007
|
||||
.label VIC_SP4X = $D008
|
||||
.label VIC_SP4Y = $D009
|
||||
.label VIC_SP5X = $D00A
|
||||
.label VIC_SP5Y = $D00B
|
||||
.label VIC_SP6X = $D00C
|
||||
.label VIC_SP6Y = $D00D
|
||||
.label VIC_SP7X = $D00E
|
||||
.label VIC_SP7Y = $D00F
|
||||
!addr VIC_SP0X = $D000
|
||||
!addr VIC_SP0Y = $D001
|
||||
!addr VIC_SP1X = $D002
|
||||
!addr VIC_SP1Y = $D003
|
||||
!addr VIC_SP2X = $D004
|
||||
!addr VIC_SP2Y = $D005
|
||||
!addr VIC_SP3X = $D006
|
||||
!addr VIC_SP3Y = $D007
|
||||
!addr VIC_SP4X = $D008
|
||||
!addr VIC_SP4Y = $D009
|
||||
!addr VIC_SP5X = $D00A
|
||||
!addr VIC_SP5Y = $D00B
|
||||
!addr VIC_SP6X = $D00C
|
||||
!addr VIC_SP6Y = $D00D
|
||||
!addr VIC_SP7X = $D00E
|
||||
!addr VIC_SP7Y = $D00F
|
||||
|
||||
.label VIC_MSIGX = $D010
|
||||
.label VIC_SCROLY = $D011
|
||||
.label VIC_RASTER = $D012
|
||||
.label VIC_LPENX = $D013
|
||||
.label VIC_LPENY = $D014
|
||||
.label VIC_SPENA = $D015
|
||||
.label VIC_SCROLX = $D016
|
||||
.label VIC_YXPAND = $D017
|
||||
.label VIC_YMCSB = $D018
|
||||
.label VIC_IRQ = $D019
|
||||
.label VIC_IRQMSK = $D01A
|
||||
.label VIC_SPBGPR = $D01B
|
||||
.label VIC_SPMC = $D01C
|
||||
.label VIC_XXPAND = $D01D
|
||||
.label VIC_SPSPCL = $D01E
|
||||
.label VIC_SPBGCL = $D01F
|
||||
!addr VIC_MSIGX = $D010
|
||||
!addr VIC_SCROLY = $D011
|
||||
!addr VIC_RASTER = $D012
|
||||
!addr VIC_LPENX = $D013
|
||||
!addr VIC_LPENY = $D014
|
||||
!addr VIC_SPENA = $D015
|
||||
!addr VIC_SCROLX = $D016
|
||||
!addr VIC_YXPAND = $D017
|
||||
!addr VIC_YMCSB = $D018
|
||||
!addr VIC_IRQ = $D019
|
||||
!addr VIC_IRQMSK = $D01A
|
||||
!addr VIC_SPBGPR = $D01B
|
||||
!addr VIC_SPMC = $D01C
|
||||
!addr VIC_XXPAND = $D01D
|
||||
!addr VIC_SPSPCL = $D01E
|
||||
!addr VIC_SPBGCL = $D01F
|
||||
|
||||
.label VIC_EXTCOL = $D020
|
||||
.label VIC_BGCOL0 = $D021
|
||||
.label VIC_BGCOL1 = $D022
|
||||
.label VIC_BGCOL2 = $D023
|
||||
.label VIC_BGCOL3 = $D024
|
||||
.label VIC_SPMC0 = $D025
|
||||
.label VIC_SPMC1 = $D026
|
||||
.label VIC_SP0COL = $D027
|
||||
.label VIC_SP1COL = $D028
|
||||
.label VIC_SP2COL = $D029
|
||||
.label VIC_SP3COL = $D02A
|
||||
.label VIC_SP4COL = $D02B
|
||||
.label VIC_SP5COL = $D02C
|
||||
.label VIC_SP6COL = $D02D
|
||||
.label VIC_SP7COL = $D02E
|
||||
!addr VIC_EXTCOL = $D020
|
||||
!addr VIC_BGCOL0 = $D021
|
||||
!addr VIC_BGCOL1 = $D022
|
||||
!addr VIC_BGCOL2 = $D023
|
||||
!addr VIC_BGCOL3 = $D024
|
||||
!addr VIC_SPMC0 = $D025
|
||||
!addr VIC_SPMC1 = $D026
|
||||
!addr VIC_SP0COL = $D027
|
||||
!addr VIC_SP1COL = $D028
|
||||
!addr VIC_SP2COL = $D029
|
||||
!addr VIC_SP3COL = $D02A
|
||||
!addr VIC_SP4COL = $D02B
|
||||
!addr VIC_SP5COL = $D02C
|
||||
!addr VIC_SP6COL = $D02D
|
||||
!addr VIC_SP7COL = $D02E
|
||||
|
||||
#if !CONFIG_MB_MEGA_65 && !CONFIG_MB_ULTIMATE_64
|
||||
!ifndef CONFIG_MB_M65 { !ifndef CONFIG_MB_U64 {
|
||||
|
||||
.label VIC_XSCAN = $D02F // C128 only
|
||||
.label VIC_CLKRATE = $D030 // C128 only
|
||||
!addr VIC_XSCAN = $D02F ; C128 only
|
||||
!addr VIC_CLKRATE = $D030 ; C128 only
|
||||
} }
|
||||
|
||||
#endif
|
||||
; SID registers
|
||||
|
||||
// SID registers
|
||||
!addr __SID_BASE = $D400 ; base address of the chip
|
||||
|
||||
.label __SID_BASE = $D400 // base address of the chip
|
||||
!addr SID_FRELO1 = $D400
|
||||
!addr SID_FREHI1 = $D401
|
||||
!addr SID_PWLO1 = $D402
|
||||
!addr SID_PWHI1 = $D403
|
||||
!addr SID_VCREG1 = $D404
|
||||
!addr SID_ATDCY1 = $D405
|
||||
!addr SID_SUREL1 = $D406
|
||||
|
||||
#if CONFIG_MB_MEGA_65
|
||||
!addr SID_FRELO2 = $D407
|
||||
!addr SID_FREHI2 = $D408
|
||||
!addr SID_PWLO2 = $D409
|
||||
!addr SID_PWHI2 = $D40A
|
||||
!addr SID_VCREG2 = $D40B
|
||||
!addr SID_ATDCY2 = $D40C
|
||||
!addr SID_SUREL2 = $D40D
|
||||
|
||||
.label __SID_R1_OFFSET = $00 // right SID 1, $D400
|
||||
.label __SID_R2_OFFSET = $20 // right SID 2, $D420
|
||||
.label __SID_L1_OFFSET = $40 // left SID 1, $D440
|
||||
.label __SID_L2_OFFSET = $60 // left SID 2, $D460
|
||||
!addr SID_FRELO3 = $D40E
|
||||
!addr SID_FREHI3 = $D40F
|
||||
!addr SID_PWLO3 = $D410
|
||||
!addr SID_PWHI3 = $D411
|
||||
!addr SID_VCREG3 = $D412
|
||||
!addr SID_ATDCY3 = $D413
|
||||
!addr SID_SUREL3 = $D414
|
||||
|
||||
#endif
|
||||
!addr SID_CUTLO = $D415
|
||||
!addr SID_CUTHI = $D416
|
||||
!addr SID_RESON = $D417
|
||||
!addr SID_SIGVOL = $D418
|
||||
!addr SID_POTX = $D419
|
||||
!addr SID_POTY = $D41A
|
||||
!addr SID_RANDOM = $D41B
|
||||
!addr SID_ENV3 = $D41C
|
||||
|
||||
.label SID_FRELO1 = $D400
|
||||
.label SID_FREHI1 = $D401
|
||||
.label SID_PWLO1 = $D402
|
||||
.label SID_PWHI1 = $D403
|
||||
.label SID_VCREG1 = $D404
|
||||
.label SID_ATDCY1 = $D405
|
||||
.label SID_SUREL1 = $D406
|
||||
; Color COLOR_RAM
|
||||
|
||||
.label SID_FRELO2 = $D407
|
||||
.label SID_FREHI2 = $D408
|
||||
.label SID_PWLO2 = $D409
|
||||
.label SID_PWHI2 = $D40A
|
||||
.label SID_VCREG2 = $D40B
|
||||
.label SID_ATDCY2 = $D40C
|
||||
.label SID_SUREL2 = $D40D
|
||||
!addr COLOR_RAM = $D800
|
||||
|
||||
.label SID_FRELO3 = $D40E
|
||||
.label SID_FREHI3 = $D40F
|
||||
.label SID_PWLO3 = $D410
|
||||
.label SID_PWHI3 = $D411
|
||||
.label SID_VCREG3 = $D412
|
||||
.label SID_ATDCY3 = $D413
|
||||
.label SID_SUREL3 = $D414
|
||||
; CIA #1 registers
|
||||
|
||||
.label SID_CUTLO = $D415
|
||||
.label SID_CUTHI = $D416
|
||||
.label SID_RESON = $D417
|
||||
.label SID_SIGVOL = $D418
|
||||
.label SID_POTX = $D419
|
||||
.label SID_POTY = $D41A
|
||||
.label SID_RANDOM = $D41B
|
||||
.label SID_ENV3 = $D41C
|
||||
!addr __CIA1_BASE = $DC00 ; base address of the chip
|
||||
|
||||
// Color COLOR_RAM
|
||||
!addr CIA1_PRA = $DC00
|
||||
!addr CIA1_PRB = $DC01
|
||||
!addr CIA1_DDRA = $DC02
|
||||
!addr CIA1_DDRB = $DC03
|
||||
|
||||
.label COLOR_RAM = $D800
|
||||
!addr CIA1_TIMALO = $DC04
|
||||
!addr CIA1_TIMAHI = $DC05
|
||||
!addr CIA1_TIMBLO = $DC06
|
||||
!addr CIA1_TIMBHI = $DC07
|
||||
|
||||
// CIA #1 registers
|
||||
!addr CIA1_TODTEN = $DC08
|
||||
!addr CIA1_TODSEC = $DC09
|
||||
!addr CIA1_TODMIN = $DC0A
|
||||
!addr CIA1_TODHRS = $DC0B
|
||||
|
||||
.label __CIA1_BASE = $DC00 // base address of the chip
|
||||
!addr CIA1_SDR = $DC0C
|
||||
!addr CIA1_ICR = $DC0D
|
||||
!addr CIA1_CRA = $DC0E
|
||||
!addr CIA1_CRB = $DC0F
|
||||
|
||||
.label CIA1_PRA = $DC00
|
||||
.label CIA1_PRB = $DC01
|
||||
.label CIA1_DDRA = $DC02
|
||||
.label CIA1_DDRB = $DC03
|
||||
; CIA #2 registers
|
||||
|
||||
.label CIA1_TIMALO = $DC04
|
||||
.label CIA1_TIMAHI = $DC05
|
||||
.label CIA1_TIMBLO = $DC06
|
||||
.label CIA1_TIMBHI = $DC07
|
||||
!addr __CIA2_BASE = $DD00 ; base address of the chip
|
||||
|
||||
.label CIA1_TODTEN = $DC08
|
||||
.label CIA1_TODSEC = $DC09
|
||||
.label CIA1_TODMIN = $DC0A
|
||||
.label CIA1_TODHRS = $DC0B
|
||||
!addr CIA2_PRA = $DD00 ; VIC bank switching and IEC port
|
||||
!addr CIA2_PRB = $DD01
|
||||
!addr CIA2_DDRA = $DD02
|
||||
!addr CIA2_DDRB = $DD03
|
||||
|
||||
.label CIA1_SDR = $DC0C
|
||||
.label CIA1_ICR = $DC0D
|
||||
.label CIA1_CRA = $DC0E
|
||||
.label CIA1_CRB = $DC0F
|
||||
!addr CIA2_TIMALO = $DD04
|
||||
!addr CIA2_TIMAHI = $DD05
|
||||
!addr CIA2_TIMBLO = $DD06
|
||||
!addr CIA2_TIMBHI = $DD07
|
||||
|
||||
// CIA #2 registers
|
||||
!addr CIA2_TODTEN = $DD08
|
||||
!addr CIA2_TODSEC = $DD09
|
||||
!addr CIA2_TODMIN = $DD0A
|
||||
!addr CIA2_TODHRS = $DD0B
|
||||
|
||||
.label __CIA2_BASE = $DD00 // base address of the chip
|
||||
!addr CIA2_SDR = $DD0C
|
||||
!addr CIA2_ICR = $DD0D
|
||||
!addr CIA2_CRA = $DD0E
|
||||
!addr CIA2_CRB = $DD0F
|
||||
|
||||
.label CIA2_PRA = $DD00 // VIC bank switching and IEC port
|
||||
.label CIA2_PRB = $DD01
|
||||
.label CIA2_DDRA = $DD02
|
||||
.label CIA2_DDRB = $DD03
|
||||
|
||||
.label CIA2_TIMALO = $DD04
|
||||
.label CIA2_TIMAHI = $DD05
|
||||
.label CIA2_TIMBLO = $DD06
|
||||
.label CIA2_TIMBHI = $DD07
|
||||
|
||||
.label CIA2_TODTEN = $DD08
|
||||
.label CIA2_TODSEC = $DD09
|
||||
.label CIA2_TODMIN = $DD0A
|
||||
.label CIA2_TODHRS = $DD0B
|
||||
|
||||
.label CIA2_SDR = $DD0C
|
||||
.label CIA2_ICR = $DD0D
|
||||
.label CIA2_CRA = $DD0E
|
||||
.label CIA2_CRB = $DD0F
|
||||
|
||||
// CIA #2 helper bits - IEC bus
|
||||
; CIA #2 helper bits - IEC bus
|
||||
|
||||
.const BIT_CIA2_PRA_ATN_OUT = $08 // 1 - low (pulled), 0 - high (released)
|
||||
.const BIT_CIA2_PRA_CLK_OUT = $10 // 1 - low (pulled), 0 - high (released)
|
||||
.const BIT_CIA2_PRA_DAT_OUT = $20 // 1 - low (pulled), 0 - high (released)
|
||||
.const BIT_CIA2_PRA_CLK_IN = $40 // 0 - low (pulled), 1 - high (released)
|
||||
.const BIT_CIA2_PRA_DAT_IN = $80 // 0 - low (pulled), 1 - high (released)
|
||||
!set BIT_CIA2_PRA_ATN_OUT = $08 ; 1 - low (pulled), 0 - high (released)
|
||||
!set BIT_CIA2_PRA_CLK_OUT = $10 ; 1 - low (pulled), 0 - high (released)
|
||||
!set BIT_CIA2_PRA_DAT_OUT = $20 ; 1 - low (pulled), 0 - high (released)
|
||||
!set BIT_CIA2_PRA_CLK_IN = $40 ; 0 - low (pulled), 1 - high (released)
|
||||
!set BIT_CIA2_PRA_DAT_IN = $80 ; 0 - low (pulled), 1 - high (released)
|
||||
|
||||
#if CONFIG_MB_MEGA_65
|
||||
; SuperCPU registers
|
||||
|
||||
.label C65_EXTKEYS_PR = $D607
|
||||
.label C65_EXTKEYS_DDR = $D608
|
||||
!ifndef CONFIG_MB_M65 {
|
||||
|
||||
#endif
|
||||
!addr SCPU_SPEED_NORMAL = $D07A
|
||||
!addr SCPU_SPEED_TURBO = $D07B
|
||||
}
|
||||
|
||||
#if !CONFIG_MB_MEGA_65
|
||||
|
||||
// SuperCPU registers
|
||||
|
||||
.label SCPU_SPEED_NORMAL = $D07A
|
||||
.label SCPU_SPEED_TURBO = $D07B
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1,73 +1,72 @@
|
||||
|
||||
//
|
||||
// Names of hardware registers
|
||||
//
|
||||
;
|
||||
; Names of hardware registers
|
||||
;
|
||||
|
||||
|
||||
#if CONFIG_PLATFORM_COMMANDER_X16
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
|
||||
// VERA registers
|
||||
; VERA registers
|
||||
|
||||
.label __VERA_BASE = $9F20 // base address of the chip
|
||||
!addr __VERA_BASE = $9F20 ; base address of the chip
|
||||
|
||||
.label VERA_ADDR_LO = $9F20
|
||||
.label VERA_ADDR_MID = $9F21
|
||||
.label VERA_ADDR_HI = $9F22
|
||||
!addr VERA_ADDR_LO = $9F20
|
||||
!addr VERA_ADDR_MID = $9F21
|
||||
!addr VERA_ADDR_HI = $9F22
|
||||
|
||||
.label VERA_DATA0 = $9F23
|
||||
.label VERA_DATA1 = $9F24
|
||||
!addr VERA_DATA0 = $9F23
|
||||
!addr VERA_DATA1 = $9F24
|
||||
|
||||
.label VERA_CTRL = $9F25
|
||||
!addr VERA_CTRL = $9F25
|
||||
|
||||
.label VERA_IEN = $9F26
|
||||
.label VERA_ISR = $9F27
|
||||
!addr VERA_IEN = $9F26
|
||||
!addr VERA_ISR = $9F27
|
||||
|
||||
// VIA #1 registers
|
||||
; VIA #1 registers
|
||||
|
||||
.label __VIA1_BASE = $9F60 // base address of the chip
|
||||
!addr __VIA1_BASE = $9F60 ; base address of the chip
|
||||
|
||||
.label VIA1_PRB = $9F60
|
||||
.label VIA1_PRA = $9F61
|
||||
.label VIA1_DDRB = $9F62
|
||||
.label VIA1_DDRA = $9F63
|
||||
!addr VIA1_PRB = $9F60
|
||||
!addr VIA1_PRA = $9F61
|
||||
!addr VIA1_DDRB = $9F62
|
||||
!addr VIA1_DDRA = $9F63
|
||||
|
||||
.label VIA1_T1C_L = $9F64
|
||||
.label VIA1_T1C_H = $9F65
|
||||
.label VIA1_T1L_L = $9F66
|
||||
.label VIA1_T1L_H = $9F67
|
||||
.label VIA1_T2C_L = $9F68
|
||||
.label VIA1_T2C_H = $9F69
|
||||
!addr VIA1_T1C_L = $9F64
|
||||
!addr VIA1_T1C_H = $9F65
|
||||
!addr VIA1_T1L_L = $9F66
|
||||
!addr VIA1_T1L_H = $9F67
|
||||
!addr VIA1_T2C_L = $9F68
|
||||
!addr VIA1_T2C_H = $9F69
|
||||
|
||||
.label VIA1_SR = $9F6A
|
||||
.label VIA1_ACR = $9F6B
|
||||
.label VIA1_PCR = $9F6C
|
||||
.label VIA1_IFR = $9F6D
|
||||
.label VIA1_IER = $9F6E
|
||||
!addr VIA1_SR = $9F6A
|
||||
!addr VIA1_ACR = $9F6B
|
||||
!addr VIA1_PCR = $9F6C
|
||||
!addr VIA1_IFR = $9F6D
|
||||
!addr VIA1_IER = $9F6E
|
||||
|
||||
.label VIA1_PRA_NH = $9F6F
|
||||
!addr VIA1_PRA_NH = $9F6F
|
||||
|
||||
// VIA #2 registers
|
||||
; VIA #2 registers
|
||||
|
||||
.label __VIA2_BASE = $9F70 // base address of the chip
|
||||
!addr __VIA2_BASE = $9F70 ; base address of the chip
|
||||
|
||||
.label VIA2_PRB = $9F70
|
||||
.label VIA2_PRA = $9F71
|
||||
.label VIA2_DDRB = $9F72
|
||||
.label VIA2_DDRA = $9F73
|
||||
!addr VIA2_PRB = $9F70
|
||||
!addr VIA2_PRA = $9F71
|
||||
!addr VIA2_DDRB = $9F72
|
||||
!addr VIA2_DDRA = $9F73
|
||||
|
||||
.label VIA2_T1C_L = $9F74
|
||||
.label VIA2_T1C_H = $9F75
|
||||
.label VIA2_T1L_L = $9F76
|
||||
.label VIA2_T1L_H = $9F77
|
||||
.label VIA2_T2C_L = $9F78
|
||||
.label VIA2_T2C_H = $9F79
|
||||
!addr VIA2_T1C_L = $9F74
|
||||
!addr VIA2_T1C_H = $9F75
|
||||
!addr VIA2_T1L_L = $9F76
|
||||
!addr VIA2_T1L_H = $9F77
|
||||
!addr VIA2_T2C_L = $9F78
|
||||
!addr VIA2_T2C_H = $9F79
|
||||
|
||||
.label VIA2_SR = $9F7A
|
||||
.label VIA2_ACR = $9F7B
|
||||
.label VIA2_PCR = $9F7C
|
||||
.label VIA2_IFR = $9F7D
|
||||
.label VIA2_IER = $9F7E
|
||||
!addr VIA2_SR = $9F7A
|
||||
!addr VIA2_ACR = $9F7B
|
||||
!addr VIA2_PCR = $9F7C
|
||||
!addr VIA2_IFR = $9F7D
|
||||
!addr VIA2_IER = $9F7E
|
||||
|
||||
.label VIA2_PRA_NH = $9F7F
|
||||
|
||||
#endif
|
||||
!addr VIA2_PRA_NH = $9F7F
|
||||
}
|
||||
@@ -1,45 +1,56 @@
|
||||
|
||||
//
|
||||
// Names of hardware registers
|
||||
//
|
||||
// See https://github.com/MEGA65/mega65-core/blob/master/iomap.txt
|
||||
//
|
||||
;
|
||||
; Names of hardware registers
|
||||
;
|
||||
; See https://github.com/MEGA65/mega65-core/blob/master/iomap.txt
|
||||
;
|
||||
|
||||
|
||||
#if CONFIG_MB_MEGA_65
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
|
||||
// VIC-IV registers
|
||||
; VIC-IV registers
|
||||
|
||||
.label VIC_KEY = $D02F
|
||||
.label VIC_CTRLA = $D030
|
||||
.label VIC_CTRLB = $D031
|
||||
!addr VIC_KEY = $D02F
|
||||
!addr VIC_CTRLA = $D030
|
||||
!addr VIC_CTRLB = $D031
|
||||
|
||||
.label VIC_XPOS = $D050
|
||||
!addr VIC_XPOS = $D050
|
||||
|
||||
.label VIC_CTRLC = $D054
|
||||
!addr VIC_CTRLC = $D054
|
||||
|
||||
.label VIC_CHARSTEP = $D058 // 2 bytes - logical characters per line
|
||||
!addr VIC_CHARSTEP = $D058 ; 2 bytes - logical characters per line
|
||||
|
||||
.label VIC_SRH = $D05D // - various flags, bit 7 = hot registers
|
||||
!addr VIC_SRH = $D05D ; - various flags, bit 7 = hot registers
|
||||
|
||||
.label VIC_SCRNPTR = $D060 // 4 bytes - pointer to start of screen memory
|
||||
.label VIC_COLPTR = $D064 // 2 bytes - pointer to start of color memory
|
||||
!addr VIC_SCRNPTR = $D060 ; 4 bytes - pointer to start of screen memory
|
||||
!addr VIC_COLPTR = $D064 ; 2 bytes - pointer to start of color memory
|
||||
|
||||
.label VIC_CHARPTR = $D068 // 3 bytes - pointer to start of character generator
|
||||
!addr VIC_CHARPTR = $D068 ; 3 bytes - pointer to start of character generator
|
||||
|
||||
// DMAgic
|
||||
; Keyboard
|
||||
|
||||
.label DMA_ADDRLSBTRIG = $D700
|
||||
.label DMA_ADDRMSB = $D701
|
||||
.label DMA_ADDRBANK = $D702
|
||||
.label DMA_EN018B = $D703
|
||||
.label DMA_ADDRMB = $D704
|
||||
.label DMA_ETRIG = $D705
|
||||
.label DMA_ADDRLSB = $D70E
|
||||
!addr C65_EXTKEYS_PR = $D607
|
||||
!addr C65_EXTKEYS_DDR = $D608
|
||||
|
||||
// MISC registers
|
||||
; DMAgic
|
||||
|
||||
.label MISC_BOARDID = $D629 // board identification byte
|
||||
.label MISC_EMU = $D710 // to enable badlines and slow interrupts
|
||||
!addr DMA_ADDRLSBTRIG = $D700
|
||||
!addr DMA_ADDRMSB = $D701
|
||||
!addr DMA_ADDRBANK = $D702
|
||||
!addr DMA_EN018B = $D703
|
||||
!addr DMA_ADDRMB = $D704
|
||||
!addr DMA_ETRIG = $D705
|
||||
!addr DMA_ADDRLSB = $D70E
|
||||
|
||||
#endif
|
||||
; MISC registers
|
||||
|
||||
!addr MISC_BOARDID = $D629 ; board identification byte
|
||||
!addr MISC_EMU = $D710 ; to enable badlines and slow interrupts
|
||||
|
||||
; SID offsets
|
||||
|
||||
!set __SID_R1_OFFSET = $00 ; right SID 1, $D400
|
||||
!set __SID_R2_OFFSET = $20 ; right SID 2, $D420
|
||||
!set __SID_L1_OFFSET = $40 ; left SID 1, $D440
|
||||
!set __SID_L2_OFFSET = $60 ; left SID 2, $D460
|
||||
}
|
||||
@@ -1,176 +1,191 @@
|
||||
|
||||
//
|
||||
// PETSCII codes for all the supported keys, for all the keyboards
|
||||
//
|
||||
// - [CM64] Compute's Mapping the Commodore 64
|
||||
// - [CM128] Compute's Mapping the Commodore 128
|
||||
// - https://github.com/MEGA65/c65-specifications/blob/master/c65manualupdated.txt
|
||||
// - https://en.wikipedia.org/wiki/PETSCII
|
||||
//
|
||||
;
|
||||
; PETSCII codes for all the supported keys, for all the keyboards
|
||||
;
|
||||
; - [CM64] Compute's Mapping the Commodore 64
|
||||
; - [CM128] Compute's Mapping the Commodore 128
|
||||
; - https://github.com/MEGA65/c65-specifications/blob/master/c65manualupdated.txt
|
||||
; - https://en.wikipedia.org/wiki/PETSCII
|
||||
;
|
||||
|
||||
|
||||
|
||||
// Not really PETSCII codes, but bitmask values for SHFLAG variable
|
||||
// [CM64] page 68, [CM128] page 212
|
||||
; First determine what to define
|
||||
|
||||
.const KEY_FLAG_SHIFT = %00000001
|
||||
.const KEY_FLAG_VENDOR = %00000010
|
||||
.const KEY_FLAG_CTRL = %00000100
|
||||
|
||||
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65 || ROM_LAYOUT_M65
|
||||
.const KEY_FLAG_ALT = %00001000
|
||||
#if CONFIG_KEYBOARD_C128_CAPS_LOCK || CONFIG_KEYBOARD_C65_CAPS_LOCK
|
||||
.const KEY_CAPS_LOCK = %00010000
|
||||
#endif
|
||||
.const KEY_FLAG_NO_SCRL = %00100000 // Open ROMs unofficial
|
||||
#endif
|
||||
|
||||
// Note - the following PETSCII codes are currently unassigned, can be used for further extensions: $01, $04, $06, ($80 ?)
|
||||
|
||||
|
||||
.const KEY_NA = $00 // to indicate that no key is presed
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !set _NEED_EXTENDED = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !set _NEED_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !set _NEED_EXTENDED = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !set _NEED_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_MB_M65 { !set _NEED_EXTENDED = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !set _NEED_C65KB = 1 }
|
||||
!ifdef CONFIG_MB_M65 { !set _NEED_C65KB = 1 }
|
||||
|
||||
|
||||
|
||||
// PETSCII codes for our extended screen editor
|
||||
; Not really PETSCII codes, but bitmask values for SHFLAG variable
|
||||
; [CM64] page 68, [CM128] page 212
|
||||
|
||||
.const KEY_C64_TAB_FW = $8F // CTRL+>, TAB - Open ROMs unofficial, original TAB conflicts with C64 PETSCII, XXX remove?
|
||||
.const KEY_C64_TAB_BW = $80 // CTRL+<, SHIFT+TAB - Open ROMs unofficial, original TAB conflicts with C64 PETSCII, XXX remove?
|
||||
!set KEY_FLAG_SHIFT = %00000001
|
||||
!set KEY_FLAG_VENDOR = %00000010
|
||||
!set KEY_FLAG_CTRL = %00000100
|
||||
|
||||
!ifdef _NEED_EXTENDED {
|
||||
!set KEY_FLAG_ALT = %00001000
|
||||
!set KEY_FLAG_NO_SCRL = %00100000
|
||||
}
|
||||
!ifdef _NEED_CAPS_LOCK {
|
||||
!set KEY_CAPS_LOCK = %00010000
|
||||
}
|
||||
|
||||
|
||||
// PETSCII codes for certain C128 and C65 functionalities
|
||||
|
||||
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65 || ROM_LAYOUT_M65
|
||||
.const KEY_BELL = $07 // no key, originally CTRL+G // XXX implement, add to C65 keyboard matrix
|
||||
.const KEY_ESC = $1B
|
||||
#endif
|
||||
|
||||
#if CONFIG_KEYBOARD_C65 || ROM_LAYOUT_M65
|
||||
.const KEY_TAB = $09 // XXX add to C65 keyboard matrix
|
||||
.const KEY_LINE_FEED = $0A // XXX add to C65 keyboard matrix
|
||||
.const KEY_TAB_SET_CLR = $18 // XXX add to C65 keyboard matrix
|
||||
.const KEY_UNDERLINE_ON = $02 // XXX add to C65 keyboard matrix
|
||||
.const KEY_UNDERLINE_OFF = $82 // XXX add to C65 keyboard matrix
|
||||
.const KEY_FLASHING_ON = $0F // XXX add to C65 keyboard matrix
|
||||
.const KEY_FLASHING_OFF = $8F // XXX add to C65 keyboard matrix
|
||||
#endif
|
||||
|
||||
// PETSCII codes for programmable keys
|
||||
|
||||
.const KEY_STOP = $03
|
||||
.const KEY_RUN = $83
|
||||
|
||||
.const KEY_F1 = $85
|
||||
.const KEY_F2 = $89
|
||||
.const KEY_F3 = $86
|
||||
.const KEY_F4 = $8A
|
||||
.const KEY_F5 = $87
|
||||
.const KEY_F6 = $8B
|
||||
.const KEY_F7 = $88
|
||||
.const KEY_F8 = $8C
|
||||
|
||||
#if CONFIG_KEYBOARD_C65 || ROM_LAYOUT_M65
|
||||
.const KEY_F9 = $10
|
||||
.const KEY_F10 = $15
|
||||
.const KEY_F11 = $16
|
||||
.const KEY_F12 = $17
|
||||
.const KEY_F13 = $19
|
||||
.const KEY_F14 = $1A
|
||||
#endif
|
||||
|
||||
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65 || ROM_LAYOUT_M65
|
||||
.const KEY_HELP = $84
|
||||
#endif
|
||||
; Note - the following PETSCII codes are currently unassigned, can be used for further extensions: $01, $04, $06, ($80 ?)
|
||||
|
||||
|
||||
// PETSCII codes for cursor keys
|
||||
|
||||
.const KEY_CRSR_UP = $91
|
||||
.const KEY_CRSR_DOWN = $11
|
||||
.const KEY_CRSR_LEFT = $9D
|
||||
.const KEY_CRSR_RIGHT = $1D
|
||||
!set KEY_NA = $00 ; to indicate that no key is presed
|
||||
|
||||
|
||||
// PETSCII codes for colors
|
||||
; PETSCII codes for our extended screen editor
|
||||
|
||||
.const KEY_RVS_ON = $12 // CTRL+9
|
||||
.const KEY_RVS_OFF = $92 // CTRL+0
|
||||
|
||||
.const KEY_BLACK = $90 // CTRL+1
|
||||
.const KEY_WHITE = $05 // CTRL+2
|
||||
.const KEY_RED = $1C // CTRL+3
|
||||
.const KEY_CYAN = $9F // CTRL+4
|
||||
.const KEY_PURPLE = $9C // CTRL+5
|
||||
.const KEY_GREEN = $1E // CTRL+6
|
||||
.const KEY_BLUE = $1F // CTRL+7
|
||||
.const KEY_YELLOW = $9E // CTRL+8
|
||||
|
||||
.const KEY_ORANGE = $81 // VENDOR+1
|
||||
.const KEY_BROWN = $95 // VENDOR+2
|
||||
.const KEY_LT_RED = $96 // VENDOR+3
|
||||
.const KEY_GREY_1 = $97 // VENDOR+4
|
||||
.const KEY_GREY_2 = $98 // VENDOR+5
|
||||
.const KEY_LT_GREEN = $99 // VENDOR+6
|
||||
.const KEY_LT_BLUE = $9A // VENDOR+7
|
||||
.const KEY_GREY_3 = $9B // VENDOR+8
|
||||
!set KEY_C64_TAB_FW = $8F ; CTRL+>, TAB - Open ROMs unofficial, original TAB conflicts with C64 PETSCII, XXX remove?
|
||||
!set KEY_C64_TAB_BW = $80 ; CTRL+<, SHIFT+TAB - Open ROMs unofficial, original TAB conflicts with C64 PETSCII, XXX remove?
|
||||
|
||||
|
||||
// PETSCII codes for case toggle
|
||||
; PETSCII codes for certain C128 and C65 functionalities
|
||||
|
||||
.const KEY_C64_SHIFT_ON = $09 // no key
|
||||
.const KEY_C64_SHIFT_OFF = $08 // no key
|
||||
#if CONFIG_KEYBOARD_C65 || ROM_LAYOUT_M65
|
||||
.const KEY_C65_SHIFT_OFF = $0B // no key
|
||||
.const KEY_C65_SHIFT_ON = $0C // no key
|
||||
#endif
|
||||
.const KEY_TXT = $0E // no key
|
||||
.const KEY_GFX = $8E // no key
|
||||
!ifdef _NEED_EXTENDED {
|
||||
!set KEY_BELL = $07 ; no key, originally CTRL+G ; XXX implement, add to C65 keyboard matrix
|
||||
!set KEY_ESC = $1B
|
||||
}
|
||||
|
||||
!ifdef _NEED_C65KB {
|
||||
!set KEY_TAB = $09 ; XXX add to C65 keyboard matrix
|
||||
!set KEY_LINE_FEED = $0A ; XXX add to C65 keyboard matrix
|
||||
!set KEY_TAB_SET_CLR = $18 ; XXX add to C65 keyboard matrix
|
||||
!set KEY_UNDERLINE_ON = $02 ; XXX add to C65 keyboard matrix
|
||||
!set KEY_UNDERLINE_OFF = $82 ; XXX add to C65 keyboard matrix
|
||||
!set KEY_FLASHING_ON = $0F ; XXX add to C65 keyboard matrix
|
||||
!set KEY_FLASHING_OFF = $8F ; XXX add to C65 keyboard matrix
|
||||
}
|
||||
|
||||
|
||||
// PETSCII codes for other non-printable characters
|
||||
; PETSCII codes for programmable keys
|
||||
|
||||
.const KEY_RETURN = $0D
|
||||
.const KEY_CLR = $93
|
||||
.const KEY_HOME = $13
|
||||
.const KEY_INS = $94
|
||||
.const KEY_DEL = $14
|
||||
!set KEY_STOP = $03
|
||||
!set KEY_RUN = $83
|
||||
|
||||
!set KEY_F1 = $85
|
||||
!set KEY_F2 = $89
|
||||
!set KEY_F3 = $86
|
||||
!set KEY_F4 = $8A
|
||||
!set KEY_F5 = $87
|
||||
!set KEY_F6 = $8B
|
||||
!set KEY_F7 = $88
|
||||
!set KEY_F8 = $8C
|
||||
|
||||
!ifdef _NEED_C65KB {
|
||||
!set KEY_F9 = $10
|
||||
!set KEY_F10 = $15
|
||||
!set KEY_F11 = $16
|
||||
!set KEY_F12 = $17
|
||||
!set KEY_F13 = $19
|
||||
!set KEY_F14 = $1A
|
||||
}
|
||||
|
||||
!ifdef _NEED_EXTENDED {
|
||||
!set KEY_HELP = $84
|
||||
}
|
||||
|
||||
|
||||
// PETSCII codes for printable characters
|
||||
; PETSCII codes for cursor keys
|
||||
|
||||
.const KEY_SPACE = $20
|
||||
.const KEY_EXCLAMATION = $21
|
||||
.const KEY_QUOTE = $22
|
||||
.const KEY_HASH = $23
|
||||
.const KEY_DOLLAR = $24
|
||||
.const KEY_PERCENT = $25
|
||||
.const KEY_AMPERSAND = $26
|
||||
.const KEY_APOSTROPHE = $27
|
||||
.const KEY_R_BRACKET_L = $28
|
||||
.const KEY_R_BRACKET_R = $29
|
||||
.const KEY_ASTERISK = $2A
|
||||
.const KEY_PLUS = $2B
|
||||
.const KEY_COMA = $2C
|
||||
.const KEY_MINUS = $2D
|
||||
.const KEY_FULLSTOP = $2E
|
||||
.const KEY_SLASH = $2F
|
||||
|
||||
.const KEY_0 = $30
|
||||
.const KEY_1 = $31
|
||||
.const KEY_2 = $32
|
||||
.const KEY_3 = $33
|
||||
.const KEY_4 = $34
|
||||
.const KEY_5 = $35
|
||||
.const KEY_6 = $36
|
||||
.const KEY_7 = $37
|
||||
.const KEY_8 = $38
|
||||
.const KEY_9 = $39
|
||||
.const KEY_COLON = $3A
|
||||
.const KEY_SEMICOLON = $3B
|
||||
.const KEY_LT = $3C
|
||||
.const KEY_EQ = $3D
|
||||
.const KEY_GT = $3E
|
||||
.const KEY_QUESTION = $3F
|
||||
!set KEY_CRSR_UP = $91
|
||||
!set KEY_CRSR_DOWN = $11
|
||||
!set KEY_CRSR_LEFT = $9D
|
||||
!set KEY_CRSR_RIGHT = $1D
|
||||
|
||||
|
||||
// XXX finish this: $4x, $5x, $6x, $7x, $Ax, $Bx, $Cx, $Dx, $Ex, $Fx
|
||||
; PETSCII codes for colors
|
||||
|
||||
!set KEY_RVS_ON = $12 ; CTRL+9
|
||||
!set KEY_RVS_OFF = $92 ; CTRL+0
|
||||
|
||||
!set KEY_BLACK = $90 ; CTRL+1
|
||||
!set KEY_WHITE = $05 ; CTRL+2
|
||||
!set KEY_RED = $1C ; CTRL+3
|
||||
!set KEY_CYAN = $9F ; CTRL+4
|
||||
!set KEY_PURPLE = $9C ; CTRL+5
|
||||
!set KEY_GREEN = $1E ; CTRL+6
|
||||
!set KEY_BLUE = $1F ; CTRL+7
|
||||
!set KEY_YELLOW = $9E ; CTRL+8
|
||||
|
||||
!set KEY_ORANGE = $81 ; VENDOR+1
|
||||
!set KEY_BROWN = $95 ; VENDOR+2
|
||||
!set KEY_LT_RED = $96 ; VENDOR+3
|
||||
!set KEY_GREY_1 = $97 ; VENDOR+4
|
||||
!set KEY_GREY_2 = $98 ; VENDOR+5
|
||||
!set KEY_LT_GREEN = $99 ; VENDOR+6
|
||||
!set KEY_LT_BLUE = $9A ; VENDOR+7
|
||||
!set KEY_GREY_3 = $9B ; VENDOR+8
|
||||
|
||||
|
||||
; PETSCII codes for case toggle
|
||||
|
||||
!set KEY_C64_SHIFT_ON = $09 ; no key
|
||||
!set KEY_C64_SHIFT_OFF = $08 ; no key
|
||||
!ifdef _NEED_C65KB {
|
||||
!set KEY_C65_SHIFT_OFF = $0B ; no key
|
||||
!set KEY_C65_SHIFT_ON = $0C ; no key
|
||||
}
|
||||
!set KEY_TXT = $0E ; no key
|
||||
!set KEY_GFX = $8E ; no key
|
||||
|
||||
|
||||
; PETSCII codes for other non-printable characters
|
||||
|
||||
!set KEY_RETURN = $0D
|
||||
!set KEY_CLR = $93
|
||||
!set KEY_HOME = $13
|
||||
!set KEY_INS = $94
|
||||
!set KEY_DEL = $14
|
||||
|
||||
|
||||
; PETSCII codes for printable characters
|
||||
|
||||
!set KEY_SPACE = $20
|
||||
!set KEY_EXCLAMATION = $21
|
||||
!set KEY_QUOTE = $22
|
||||
!set KEY_HASH = $23
|
||||
!set KEY_DOLLAR = $24
|
||||
!set KEY_PERCENT = $25
|
||||
!set KEY_AMPERSAND = $26
|
||||
!set KEY_APOSTROPHE = $27
|
||||
!set KEY_R_BRACKET_L = $28
|
||||
!set KEY_R_BRACKET_R = $29
|
||||
!set KEY_ASTERISK = $2A
|
||||
!set KEY_PLUS = $2B
|
||||
!set KEY_COMA = $2C
|
||||
!set KEY_MINUS = $2D
|
||||
!set KEY_FULLSTOP = $2E
|
||||
!set KEY_SLASH = $2F
|
||||
|
||||
!set KEY_0 = $30
|
||||
!set KEY_1 = $31
|
||||
!set KEY_2 = $32
|
||||
!set KEY_3 = $33
|
||||
!set KEY_4 = $34
|
||||
!set KEY_5 = $35
|
||||
!set KEY_6 = $36
|
||||
!set KEY_7 = $37
|
||||
!set KEY_8 = $38
|
||||
!set KEY_9 = $39
|
||||
!set KEY_COLON = $3A
|
||||
!set KEY_SEMICOLON = $3B
|
||||
!set KEY_LT = $3C
|
||||
!set KEY_EQ = $3D
|
||||
!set KEY_GT = $3E
|
||||
!set KEY_QUESTION = $3F
|
||||
|
||||
|
||||
; XXX finish this: $4x, $5x, $6x, $7x, $Ax, $Bx, $Cx, $Dx, $Ex, $Fx
|
||||
+287
-290
@@ -1,329 +1,326 @@
|
||||
//
|
||||
// Names of ZP and low memory locations:
|
||||
// - Computes Mapping the Commodore 64
|
||||
// - https://www.c64-wiki.com/wiki/Zeropage
|
||||
// - http://unusedino.de/ec64/technical/project64/memory_maps.html
|
||||
//
|
||||
;
|
||||
; Names of ZP and low memory locations:
|
||||
; - Computes Mapping the Commodore 64
|
||||
; - https://www.c64-wiki.com/wiki/Zeropage
|
||||
; - http://unusedino.de/ec64/technical/project64/memory_maps.html
|
||||
;
|
||||
|
||||
// $00-$01 - 6502 CPU registers are here
|
||||
; $00-$01 - 6502 CPU registers are here
|
||||
|
||||
//
|
||||
// Page 0 - BASIC area ($02-$8F)
|
||||
//
|
||||
;
|
||||
; Page 0 - BASIC area ($02-$8F)
|
||||
;
|
||||
|
||||
// $02 -- UNUSED -- free for user software
|
||||
.label ADRAY1 = $03 // $03-$04
|
||||
.label ADRAY2 = $05 // $05-$06
|
||||
.label CHARAC = $07 // [!] our implementation might be different XXX give more details
|
||||
.label ENDCHR = $08 // [!] our implementation might be different XXX give more details
|
||||
.label TRMPOS = $09 // -- NOT IMPLEMENTED --
|
||||
.label VERCKB = $0A // flag used by BASIC, 0 - LOAD, 1 - VERIFY
|
||||
.label COUNT = $0B // [!] our implementation might be different XXX give more details
|
||||
.label DIMFLG = $0C // [!] our implementation might be different XXX give more details
|
||||
.label VALTYP = $0D // expression eveluation result; $00 - float, $FF - string
|
||||
.label INTFLG = $0E // -- NOT IMPLEMENTED --
|
||||
.label GARBFL = $0F // [!] our implementation might be different XXX give more details
|
||||
.label SUBFLG = $10 // -- NOT IMPLEMENTED --
|
||||
.label INPFLG = $11 // -- NOT IMPLEMENTED --
|
||||
.label TANSGN = $12 // -- NOT IMPLEMENTED --
|
||||
.label CHANNL = $13 // -- NOT IMPLEMENTED --
|
||||
.label LINNUM = $14 // $14-$15 BASIC line number, [!] also used by DOS Wedge
|
||||
.label TEMPPT = $16 // pointer to the first available slot in the temporary string descriptor stack
|
||||
.label LASTPT = $17 // $17-$18 pointer to the last used slot in the temporary string descriptor
|
||||
.label TEMPST = $19 // $19-$21 temporary string stack descriptors
|
||||
.label INDEX = $22 // $22-$25 temporary variables, [!] our usage might be different
|
||||
.label RESHO = $26 // $26-$2A temporary variables, [!] our usage might be different
|
||||
.label TXTTAB = $2B // $2B-$2C start of BASIC code
|
||||
.label VARTAB = $2D // $2D-$2E end of BASIC code, start of variables
|
||||
.label ARYTAB = $2F // $2F-$30 pointer to start of array storage
|
||||
.label STREND = $31 // $31-$32 pointer to start of free RAM
|
||||
.label FRETOP = $33 // $33-$34 pointer to bottom of strings area
|
||||
.label FRESPC = $35 // $35-$36 [!] our implementation uses this as temporary string pointer
|
||||
.label MEMSIZ = $37 // $37-$38 highest address of BASIC memory + 1
|
||||
.label CURLIN = $39 // $39-$3A current BASIC line number
|
||||
.label OLDLIN = $3B // $3B-$3C previous BASIC line number
|
||||
.label OLDTXT = $3D // $3D-$3E current BASIC line pointer
|
||||
.label DATLIN = $3F // $3F-$40 -- NOT IMPLEMENTED --
|
||||
.label DATPTR = $41 // $41-$42 pointer for READ/DATA copmmands
|
||||
.label INPPTR = $43 // $43-$44 -- NOT IMPLEMENTED --
|
||||
.label VARNAM = $45 // $45-$46 current variable name
|
||||
.label VARPNT = $47 // $47-$48 current variable/descriptor pointer
|
||||
.label FORPNT = $49 // $49-$4A -- NOT IMPLEMENTED --
|
||||
.label OPPTR = $4B // $4B-$4C helper variable for expression computation, [!] our usage details are different
|
||||
.label OPMASK = $4D // -- NOT IMPLEMENTED --
|
||||
.label DEFPNT = $4E // $4E-$4F -- NOT IMPLEMENTED --
|
||||
.label DSCPNT = $50 // $50-$52 temporary area fro string handling, [!] our usage might differ
|
||||
.label FOUR6 = $53 // size of variable content (float = 5, integer = 2, string descriptor = 3)
|
||||
.label JMPER = $54 // $54-$56 -- NOT IMPLEMENTED --
|
||||
.label TEMPF1 = $57 // $57-$5B BASIC numeric work area
|
||||
.label TEMPF2 = $5C // $5C-$60 BASIC numeric work area
|
||||
; $02 -- UNUSED -- free for user software
|
||||
!addr ADRAY1 = $03 ; $03-$04
|
||||
!addr ADRAY2 = $05 ; $05-$06
|
||||
!addr CHARAC = $07 ; [!] our implementation might be different XXX give more details
|
||||
!addr ENDCHR = $08 ; [!] our implementation might be different XXX give more details
|
||||
!addr TRMPOS = $09 ; -- NOT IMPLEMENTED --
|
||||
!addr VERCKB = $0A ; flag used by BASIC, 0 - LOAD, 1 - VERIFY
|
||||
!addr COUNT = $0B ; [!] our implementation might be different XXX give more details
|
||||
!addr DIMFLG = $0C ; [!] our implementation might be different XXX give more details
|
||||
!addr VALTYP = $0D ; expression eveluation result; $00 - float, $FF - string
|
||||
!addr INTFLG = $0E ; -- NOT IMPLEMENTED --
|
||||
!addr GARBFL = $0F ; [!] our implementation might be different XXX give more details
|
||||
!addr SUBFLG = $10 ; -- NOT IMPLEMENTED --
|
||||
!addr INPFLG = $11 ; -- NOT IMPLEMENTED --
|
||||
!addr TANSGN = $12 ; -- NOT IMPLEMENTED --
|
||||
!addr CHANNL = $13 ; -- NOT IMPLEMENTED --
|
||||
!addr LINNUM = $14 ; $14-$15 BASIC line number, [!] also used by DOS Wedge
|
||||
!addr TEMPPT = $16 ; pointer to the first available slot in the temporary string descriptor stack
|
||||
!addr LASTPT = $17 ; $17-$18 pointer to the last used slot in the temporary string descriptor
|
||||
!addr TEMPST = $19 ; $19-$21 temporary string stack descriptors
|
||||
!addr INDEX = $22 ; $22-$25 temporary variables, [!] our usage might be different
|
||||
!addr RESHO = $26 ; $26-$2A temporary variables, [!] our usage might be different
|
||||
!addr TXTTAB = $2B ; $2B-$2C start of BASIC code
|
||||
!addr VARTAB = $2D ; $2D-$2E end of BASIC code, start of variables
|
||||
!addr ARYTAB = $2F ; $2F-$30 pointer to start of array storage
|
||||
!addr STREND = $31 ; $31-$32 pointer to start of free RAM
|
||||
!addr FRETOP = $33 ; $33-$34 pointer to bottom of strings area
|
||||
!addr FRESPC = $35 ; $35-$36 [!] our implementation uses this as temporary string pointer
|
||||
!addr MEMSIZ = $37 ; $37-$38 highest address of BASIC memory + 1
|
||||
!addr CURLIN = $39 ; $39-$3A current BASIC line number
|
||||
!addr OLDLIN = $3B ; $3B-$3C previous BASIC line number
|
||||
!addr OLDTXT = $3D ; $3D-$3E current BASIC line pointer
|
||||
!addr DATLIN = $3F ; $3F-$40 -- NOT IMPLEMENTED --
|
||||
!addr DATPTR = $41 ; $41-$42 pointer for READ/DATA copmmands
|
||||
!addr INPPTR = $43 ; $43-$44 -- NOT IMPLEMENTED --
|
||||
!addr VARNAM = $45 ; $45-$46 current variable name
|
||||
!addr VARPNT = $47 ; $47-$48 current variable/descriptor pointer
|
||||
!addr FORPNT = $49 ; $49-$4A -- NOT IMPLEMENTED --
|
||||
!addr OPPTR = $4B ; $4B-$4C helper variable for expression computation, [!] our usage details are different
|
||||
!addr OPMASK = $4D ; -- NOT IMPLEMENTED --
|
||||
!addr DEFPNT = $4E ; $4E-$4F -- NOT IMPLEMENTED --
|
||||
!addr DSCPNT = $50 ; $50-$52 temporary area fro string handling, [!] our usage might differ
|
||||
!addr FOUR6 = $53 ; size of variable content (float = 5, integer = 2, string descriptor = 3)
|
||||
!addr JMPER = $54 ; $54-$56 -- NOT IMPLEMENTED --
|
||||
!addr TEMPF1 = $57 ; $57-$5B BASIC numeric work area
|
||||
!addr TEMPF2 = $5C ; $5C-$60 BASIC numeric work area
|
||||
|
||||
.label __FAC1 = $61 // $61-$66 floating point accumulator 1
|
||||
.label FAC1_exponent = $61
|
||||
.label FAC1_mantissa = $62 // $62 - $65
|
||||
.label FAC1_sign = $66
|
||||
!addr __FAC1 = $61 ; $61-$66 floating point accumulator 1
|
||||
!addr FAC1_exponent = $61
|
||||
!addr FAC1_mantissa = $62 ; $62 - $65
|
||||
!addr FAC1_sign = $66
|
||||
|
||||
.label SGNFLG = $67 // -- NOT IMPLEMENTED --
|
||||
.label BITS = $68 // FAC1 overflow
|
||||
!addr SGNFLG = $67 ; -- NOT IMPLEMENTED --
|
||||
!addr BITS = $68 ; FAC1 overflow
|
||||
|
||||
.label __FAC2 = $69 // $69-$6E floating point accumulator 2 [!] also used for memory move pointers
|
||||
.label FAC2_exponent = $69
|
||||
.label FAC2_mantissa = $6A // $6A - $6D
|
||||
.label FAC2_sign = $6E
|
||||
!addr __FAC2 = $69 ; $69-$6E floating point accumulator 2 [!] also used for memory move pointers
|
||||
!addr FAC2_exponent = $69
|
||||
!addr FAC2_mantissa = $6A ; $6A - $6D
|
||||
!addr FAC2_sign = $6E
|
||||
|
||||
.label ARISGN = $6F // -- NOT IMPLEMENTED --
|
||||
.label FACOV = $70 // FAC1 low order mantissa
|
||||
.label FBUFPT = $71 // $71-$72 -- NOT IMPLEMENTED --
|
||||
.label CHRGET = $73 // $73-$8A -- NOT IMPLEMENTED --
|
||||
.label TXTPTR = $7A // $7A-$7B current BASIC statement pointer
|
||||
.label RNDX = $8B // $8B-$8F random number seed
|
||||
!addr ARISGN = $6F ; -- NOT IMPLEMENTED --
|
||||
!addr FACOV = $70 ; FAC1 low order mantissa
|
||||
!addr FBUFPT = $71 ; $71-$72 -- NOT IMPLEMENTED --
|
||||
!addr CHRGET = $73 ; $73-$8A -- NOT IMPLEMENTED --
|
||||
!addr TXTPTR = $7A ; $7A-$7B current BASIC statement pointer
|
||||
!addr RNDX = $8B ; $8B-$8F random number seed
|
||||
|
||||
//
|
||||
// Page 0 - Kernal area ($90-$FF)
|
||||
//
|
||||
;
|
||||
; Page 0 - Kernal area ($90-$FF)
|
||||
;
|
||||
|
||||
.label IOSTATUS = $90
|
||||
.label STKEY = $91 // keys down clears bits. STOP - bit 7, C= - bit 6, SPACE - bit 4, CTRL - bit 2
|
||||
.label SVXT = $92 // tape reading constant [!] our tape routines use it differently
|
||||
.label VERCKK = $93 // 0 = LOAD, 1 = VERIFY
|
||||
.label C3PO = $94 // flag - is BSOUR content valid
|
||||
.label BSOUR = $95 // serial bus buffered output byte
|
||||
.label SYNO = $96 // temporary tape routines storage, [!] our usage differs
|
||||
.label XSAV = $97 // temporary register storage for ASCII/tape related routines [!] usage details might differ
|
||||
.label LDTND = $98 // number of entries in LAT / FAT / SAT tables
|
||||
.label DFLTN = $99 // default input device
|
||||
.label DFLTO = $9A // default output device
|
||||
.label PRTY = $9B // tape storage for parity/checksum
|
||||
#if !CONFIG_TAPE_NORMAL && !CONFIG_TAPE_TURBO
|
||||
.label DPSW = $9C // -- NOT IMPLEMENTED --
|
||||
#else
|
||||
.label COLSTORE = $9C // [!] screen border storage for tape routines
|
||||
#endif
|
||||
.label MSGFLG = $9D // bit 6 = error messages, bit 7 = control message
|
||||
.label PTR1 = $9E // for tape support, counter of errorneous bytes
|
||||
.label PTR2 = $9F // for tape support, counter for errorneous bytes correction
|
||||
.label TIME = $A0 // $A0-$A2 jiffy clock
|
||||
.label IECPROTO = $A3 // [!] IEC or pseudo-IEC protocol, >= $80 for unknown; originally named TSFCNT
|
||||
.label TBTCNT = $A4 // temporary variable for tape and IEC, [!] our usage probably differs in details
|
||||
.label CNTDN = $A5 // -- NOT IMPLEMENTED --
|
||||
.label BUFPNT = $A6 // -- NOT IMPLEMENTED --
|
||||
.label INBIT = $A7 // temporary storage for tape / RS-232 received bits
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
.label BITCI = $A8 // -- NOT IMPLEMENTED --
|
||||
.label RINONE = $A9 // -- WIP -- (UP9600 only) RS-232 check for start bit flag
|
||||
.label RIDDATA = $AA // -- NOT IMPLEMENTED --
|
||||
.label RIPRTY = $AB // -- WIP -- checksum while reading tape
|
||||
#endif
|
||||
.label SAL = $AC // $AC-$AD -- XXX: describe -- (implemented screen part)
|
||||
.label EAL = $AE // $AE-$AF -- XXX: describe -- [!] used also by screen editor, for temporary color storage when scrolling
|
||||
.label CMP0 = $B0 // $B0-$B1 temporary tape storage, [!] here used for BRK instruction address
|
||||
.label TAPE1 = $B2 // $B2-$B3 tape buffer pointer
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
.label BITTS = $B4 // -- NOT IMPLEMENTED --
|
||||
#endif
|
||||
.label NXTBIT = $B5 // -- NOT IMPLEMENTED --
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
.label RODATA = $B6 // -- NOT IMPLEMENTED --
|
||||
#endif
|
||||
!addr IOSTATUS = $90
|
||||
!addr STKEY = $91 ; keys down clears bits. STOP - bit 7, C= - bit 6, SPACE - bit 4, CTRL - bit 2
|
||||
!addr SVXT = $92 ; tape reading constant [!] our tape routines use it differently
|
||||
!addr VERCKK = $93 ; 0 = LOAD, 1 = VERIFY
|
||||
!addr C3PO = $94 ; flag - is BSOUR content valid
|
||||
!addr BSOUR = $95 ; serial bus buffered output byte
|
||||
!addr SYNO = $96 ; temporary tape routines storage, [!] our usage differs
|
||||
!addr XSAV = $97 ; temporary register storage for ASCII/tape related routines [!] usage details might differ
|
||||
!addr LDTND = $98 ; number of entries in LAT / FAT / SAT tables
|
||||
!addr DFLTN = $99 ; default input device
|
||||
!addr DFLTO = $9A ; default output device
|
||||
!addr PRTY = $9B ; tape storage for parity/checksum
|
||||
!ifndef HAS_TAPE {
|
||||
!addr DPSW = $9C ; -- NOT IMPLEMENTED --
|
||||
} else {
|
||||
!addr COLSTORE = $9C ; [!] screen border storage for tape routines
|
||||
}
|
||||
!addr MSGFLG = $9D ; bit 6 = error messages, bit 7 = control message
|
||||
!addr PTR1 = $9E ; for tape support, counter of errorneous bytes
|
||||
!addr PTR2 = $9F ; for tape support, counter for errorneous bytes correction
|
||||
!addr TIME = $A0 ; $A0-$A2 jiffy clock
|
||||
!addr IECPROTO = $A3 ; [!] IEC or pseudo-IEC protocol, >= $80 for unknown; originally named TSFCNT
|
||||
!addr TBTCNT = $A4 ; temporary variable for tape and IEC, [!] our usage probably differs in details
|
||||
!addr CNTDN = $A5 ; -- NOT IMPLEMENTED --
|
||||
!addr BUFPNT = $A6 ; -- NOT IMPLEMENTED --
|
||||
!addr INBIT = $A7 ; temporary storage for tape / RS-232 received bits
|
||||
!ifndef CONFIG_LEGACY_SCNKEY {
|
||||
!addr BITCI = $A8 ; -- NOT IMPLEMENTED --
|
||||
!addr RINONE = $A9 ; -- WIP -- (UP9600 only) RS-232 check for start bit flag
|
||||
!addr RIDDATA = $AA ; -- NOT IMPLEMENTED --
|
||||
!addr RIPRTY = $AB ; -- WIP -- checksum while reading tape
|
||||
}
|
||||
!addr SAL = $AC ; $AC-$AD -- XXX: describe -- (implemented screen part)
|
||||
!addr EAL = $AE ; $AE-$AF -- XXX: describe -- [!] used also by screen editor, for temporary color storage when scrolling
|
||||
!addr CMP0 = $B0 ; $B0-$B1 temporary tape storage, [!] here used for BRK instruction address
|
||||
!addr TAPE1 = $B2 ; $B2-$B3 tape buffer pointer
|
||||
!ifndef CONFIG_LEGACY_SCNKEY {
|
||||
!addr BITTS = $B4 ; -- NOT IMPLEMENTED --
|
||||
}
|
||||
!addr NXTBIT = $B5 ; -- NOT IMPLEMENTED --
|
||||
!ifndef CONFIG_LEGACY_SCNKEY {
|
||||
!addr RODATA = $B6 ; -- NOT IMPLEMENTED --
|
||||
}
|
||||
!addr FNLEN = $B7 ; current file name length
|
||||
!addr LA = $B8 ; current logical_file number
|
||||
!addr SA = $B9 ; current secondary address
|
||||
!addr FA = $BA ; current device number
|
||||
!addr FNADDR = $BB ; $BB-$BC current file name pointer
|
||||
!addr ROPRTY = $BD ; -- NOT IMPLEMENTED -- tape / RS-232 temporary storage
|
||||
!addr FSBLK = $BE ; -- NOT IMPLEMENTED -- tape / RS-232 temporary storage
|
||||
!addr MYCH = $BF ; -- NOT IMPLEMENTED --
|
||||
!addr CAS1 = $C0 ; tape motor interlock
|
||||
!addr STAL = $C1 ; $C1-$C2 LOAD/SAVE start address
|
||||
!addr MEMUSS = $C3 ; $C3-$C4 temporary address for tape LOAD/SAVE
|
||||
!addr LSTX = $C5 ; last key matrix position [!] our usage probably differs in details
|
||||
!addr NDX = $C6 ; number of chars in keyboard buffer
|
||||
!addr RVS = $C7 ; flag, whether to print reversed characters
|
||||
!addr INDX = $C8 ; end of logical line (column, 0-79)
|
||||
!addr LSXP = $C9 ; $C9-$CA start of input, X/Y position (typo in Mapping the C64, fixed in Mapping the C128)
|
||||
!addr SFDX = $CB ; -- NOT IMPLEMENTED --
|
||||
!addr BLNSW = $CC ; cursor blink disable flag
|
||||
!addr BLNCT = $CD ; cursor blink countdown
|
||||
!addr GDBLN = $CE ; cursor saved character
|
||||
!addr BLNON = $CF ; cursor visibility flag
|
||||
!addr CRSW = $D0 ; whether to input from screen or keyboard (if from screen, stores input offset)
|
||||
!addr PNT = $D1 ; $D1-$D2 pointer to the current screen line
|
||||
!addr PNTR = $D3 ; current screen X position (logical column), 0-79
|
||||
!addr QTSW = $D4 ; quote mode flag
|
||||
!addr LNMX = $D5 ; logical line length, 39 or 79
|
||||
!addr TBLX = $D6 ; current screen Y position (row), 0-24
|
||||
!addr SCHAR = $D7 ; ASCII value of the last printed character
|
||||
!addr INSRT = $D8 ; insert mode flag/counter
|
||||
!addr LDTB1 = $D9 ; $D9-$F2 screen line link table, [!] our usage is different XXX give more details
|
||||
!addr USER = $F3 ; $F3-$F4 pointer to current color RAM location
|
||||
!addr KEYTAB = $F5 ; $F5-$F6 pointer to keyboard lookup table
|
||||
!addr RIBUF = $F7 ; $F7-$F8 -- WIP -- RS-232 receive buffer pointer
|
||||
!addr ROBUF = $F9 ; $F9-$FA -- WIP -- RS-232 send buffer pointer
|
||||
; $FB $FB-$FE -- UNUSED -- free for user software
|
||||
!addr BASZPT = $FF ; -- NOT IMPLEMENTED --
|
||||
|
||||
.label FNLEN = $B7 // current file name length
|
||||
.label LA = $B8 // current logical_file number
|
||||
.label SA = $B9 // current secondary address
|
||||
.label FA = $BA // current device number
|
||||
.label FNADDR = $BB // $BB-$BC current file name pointer
|
||||
.label ROPRTY = $BD // -- NOT IMPLEMENTED -- tape / RS-232 temporary storage
|
||||
.label FSBLK = $BE // -- NOT IMPLEMENTED -- tape / RS-232 temporary storage
|
||||
.label MYCH = $BF // -- NOT IMPLEMENTED --
|
||||
.label CAS1 = $C0 // tape motor interlock
|
||||
.label STAL = $C1 // $C1-$C2 LOAD/SAVE start address
|
||||
.label MEMUSS = $C3 // $C3-$C4 temporary address for tape LOAD/SAVE
|
||||
.label LSTX = $C5 // last key matrix position [!] our usage probably differs in details
|
||||
.label NDX = $C6 // number of chars in keyboard buffer
|
||||
.label RVS = $C7 // flag, whether to print reversed characters
|
||||
.label INDX = $C8 // end of logical line (column, 0-79)
|
||||
.label LSXP = $C9 // $C9-$CA start of input, X/Y position (typo in Mapping the C64, fixed in Mapping the C128)
|
||||
.label SFDX = $CB // -- NOT IMPLEMENTED --
|
||||
.label BLNSW = $CC // cursor blink disable flag
|
||||
.label BLNCT = $CD // cursor blink countdown
|
||||
.label GDBLN = $CE // cursor saved character
|
||||
.label BLNON = $CF // cursor visibility flag
|
||||
.label CRSW = $D0 // whether to input from screen or keyboard (if from screen, stores input offset)
|
||||
.label PNT = $D1 // $D1-$D2 pointer to the current screen line
|
||||
.label PNTR = $D3 // current screen X position (logical column), 0-79
|
||||
.label QTSW = $D4 // quote mode flag
|
||||
.label LNMX = $D5 // logical line length, 39 or 79
|
||||
.label TBLX = $D6 // current screen Y position (row), 0-24
|
||||
.label SCHAR = $D7 // ASCII value of the last printed character
|
||||
.label INSRT = $D8 // insert mode flag/counter
|
||||
.label LDTB1 = $D9 // $D9-$F2 screen line link table, [!] our usage is different XXX give more details
|
||||
.label USER = $F3 // $F3-$F4 pointer to current color RAM location
|
||||
.label KEYTAB = $F5 // $F5-$F6 pointer to keyboard lookup table
|
||||
.label RIBUF = $F7 // $F7-$F8 -- WIP -- RS-232 receive buffer pointer
|
||||
.label ROBUF = $F9 // $F9-$FA -- WIP -- RS-232 send buffer pointer
|
||||
// $FB $FB-$FE -- UNUSED -- free for user software
|
||||
.label BASZPT = $FF // -- NOT IMPLEMENTED --
|
||||
;
|
||||
; Page 1
|
||||
;
|
||||
|
||||
//
|
||||
// Page 1
|
||||
//
|
||||
!addr STACK = $100 ; $100-$1FF, processor stack
|
||||
|
||||
.label STACK = $100 // $100-$1FF, processor stack
|
||||
|
||||
//
|
||||
// Pages 2 & 3
|
||||
//
|
||||
;
|
||||
; Pages 2 & 3
|
||||
;
|
||||
|
||||
.label BUF = $200 // $200-$250, BASIC line editor input buffer (81 bytes)
|
||||
!addr BUF = $200 ; $200-$250, BASIC line editor input buffer (81 bytes)
|
||||
|
||||
// $250-$258 is the 81st - 88th characters in BASIC input, a carry over from VIC-20
|
||||
// and not used on C64 - they are used if CONFIG_LEGACY_SCNKEY is enabled.
|
||||
; $250-$258 is the 81st - 88th characters in BASIC input, a carry over from VIC-20
|
||||
; and not used on C64 - they are used if CONFIG_LEGACY_SCNKEY is enabled.
|
||||
|
||||
// [!] XXX document $251-$258 usage
|
||||
.label LAT = $259 // $259-$262, logical file numbers (table, 10 bytes)
|
||||
.label FAT = $263 // $263-$26C, device numbers (table, 10 bytes)
|
||||
.label SAT = $26D // $26D-$276, secondary addresses (table, 10 bytes)
|
||||
.label KEYD = $277 // $277-$280, keyboard buffer
|
||||
.label MEMSTR = $281 // $281-$282, start of BASIC memory
|
||||
.label MEMSIZK = $283 // $283-$284, NOTE: Mapping the 64 erroneously has the hex as $282 (DEC is correct)
|
||||
.label TIMOUT = $285 // IEEE-488 timeout
|
||||
.label COLOR = $286 // current text foreground color
|
||||
.label GDCOL = $287 // color of character under cursor
|
||||
.label HIBASE = $288 // high byte of start of screen
|
||||
.label XMAX = $289 // max keyboard buffer size
|
||||
.label RPTFLG = $28A // whether to repeat keys (highest bit set = repeat)
|
||||
.label KOUNT = $28B // key repeat counter
|
||||
.label DELAY = $28C // -- NOT IMPLEMENTED --
|
||||
.label SHFLAG = $28D // bucky keys (SHIFT/CTRL/C=) flags
|
||||
.label LSTSHF = $28E // last bucky key flags
|
||||
.label KEYLOG = $28F // $28F-$290 routine to setup keyboard decoding
|
||||
.label MODE = $291 // flag, is case switch allowed
|
||||
.label AUTODN = $292 // -- NOT IMPLEMENTED -- screen scroll disable
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
.label M51CRT = $293 // -- NOT IMPLEMENTED -- mock 6551
|
||||
.label M51CDR = $294 // -- NOT IMPLEMENTED -- mock 6551
|
||||
.label M51AJB = $295 // $295-$296 -- NOT IMPLEMENTED -- mock 6551
|
||||
.label RSSTAT = $297 // -- WIP -- (UP9600 only) mock 6551, RS-232 status
|
||||
.label BITNUM = $298 // -- NOT IMPLEMENTED --
|
||||
.label BAUDOF = $299 // $299-$29A -- NOT IMPLEMENTED --
|
||||
#endif
|
||||
.label RIDBE = $29B // -- WIP -- write pointer into RS-232 receive buffer
|
||||
.label RIDBS = $29C // -- WIP -- read pointer into RS-232 receive buffer
|
||||
.label RODBS = $29D // -- WIP -- read pointer into RS-232 send buffer
|
||||
.label RODBE = $29E // -- WIP -- write pointer into RS-232 send buffer
|
||||
.label IRQTMP = $29F // $29F-$2A0 temporary IRQ vector storage [!] we use it for tape speed calibration instead
|
||||
.label ENABL = $2A1 // -- NOT IMPLEMENTED --
|
||||
.label TODSNS = $2A2 // -- NOT IMPLEMENTED --
|
||||
.label TRDTMP = $2A3 // -- NOT IMPLEMENTED --
|
||||
.label TD1IRQ = $2A4 // -- NOT IMPLEMENTED --
|
||||
.label TLNIDX = $2A5 // -- NOT IMPLEMENTED --
|
||||
.label TVSFLG = $2A6 // 0 = NTSC, 1 = PAL
|
||||
; [!] XXX document $251-$258 usage
|
||||
!addr LAT = $259 ; $259-$262, logical file numbers (table, 10 bytes)
|
||||
!addr FAT = $263 ; $263-$26C, device numbers (table, 10 bytes)
|
||||
!addr SAT = $26D ; $26D-$276, secondary addresses (table, 10 bytes)
|
||||
!addr KEYD = $277 ; $277-$280, keyboard buffer
|
||||
!addr MEMSTR = $281 ; $281-$282, start of BASIC memory
|
||||
!addr MEMSIZK = $283 ; $283-$284, NOTE: Mapping the 64 erroneously has the hex as $282 (DEC is correct)
|
||||
!addr TIMOUT = $285 ; IEEE-488 timeout
|
||||
!addr COLOR = $286 ; current text foreground color
|
||||
!addr GDCOL = $287 ; color of character under cursor
|
||||
!addr HIBASE = $288 ; high byte of start of screen
|
||||
!addr XMAX = $289 ; max keyboard buffer size
|
||||
!addr RPTFLG = $28A ; whether to repeat keys (highest bit set = repeat)
|
||||
!addr KOUNT = $28B ; key repeat counter
|
||||
!addr DELAY = $28C ; -- NOT IMPLEMENTED --
|
||||
!addr SHFLAG = $28D ; bucky keys (SHIFT/CTRL/C=) flags
|
||||
!addr LSTSHF = $28E ; last bucky key flags
|
||||
!addr KEYLOG = $28F ; $28F-$290 routine to setup keyboard decoding
|
||||
!addr MODE = $291 ; flag, is case switch allowed
|
||||
!addr AUTODN = $292 ; -- NOT IMPLEMENTED -- screen scroll disable
|
||||
!ifndef CONFIG_LEGACY_SCNKEY {
|
||||
!addr M51CRT = $293 ; -- NOT IMPLEMENTED -- mock 6551
|
||||
!addr M51CDR = $294 ; -- NOT IMPLEMENTED -- mock 6551
|
||||
!addr M51AJB = $295 ; $295-$296 -- NOT IMPLEMENTED -- mock 6551
|
||||
!addr RSSTAT = $297 ; -- WIP -- (UP9600 only) mock 6551, RS-232 status
|
||||
!addr BITNUM = $298 ; -- NOT IMPLEMENTED --
|
||||
!addr BAUDOF = $299 ; $299-$29A -- NOT IMPLEMENTED --
|
||||
}
|
||||
!addr RIDBE = $29B ; -- WIP -- write pointer into RS-232 receive buffer
|
||||
!addr RIDBS = $29C ; -- WIP -- read pointer into RS-232 receive buffer
|
||||
!addr RODBS = $29D ; -- WIP -- read pointer into RS-232 send buffer
|
||||
!addr RODBE = $29E ; -- WIP -- write pointer into RS-232 send buffer
|
||||
!addr IRQTMP = $29F ; $29F-$2A0 temporary IRQ vector storage [!] we use it for tape speed calibration instead
|
||||
!addr ENABL = $2A1 ; -- NOT IMPLEMENTED --
|
||||
!addr TODSNS = $2A2 ; -- NOT IMPLEMENTED --
|
||||
!addr TRDTMP = $2A3 ; -- NOT IMPLEMENTED --
|
||||
!addr TD1IRQ = $2A4 ; -- NOT IMPLEMENTED --
|
||||
!addr TLNIDX = $2A5 ; -- NOT IMPLEMENTED --
|
||||
!addr TVSFLG = $2A6 ; 0 = NTSC, 1 = PAL
|
||||
|
||||
// [!] $2A7-$2FF is normally free, but in our case some extra functionality uses it
|
||||
; [!] $2A7-$2FF is normally free, but in our case some extra functionality uses it
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
!ifdef CONFIG_MEMORY_MODEL_60K {
|
||||
|
||||
// IRQs are disabled when doing such accesses, and a default NMI handler only increments
|
||||
// a counter, so that if an NMI occurs, it does not crash the machine, but can be captured.
|
||||
; IRQs are disabled when doing such accesses, and a default NMI handler only increments
|
||||
; a counter, so that if an NMI occurs, it does not crash the machine, but can be captured.
|
||||
|
||||
.label missed_nmi_flag = $2A7
|
||||
.label tiny_nmi_handler = $2A8
|
||||
.label peek_under_roms = tiny_nmi_handler + peek_under_roms_routine - tiny_nmi_handler_routine
|
||||
.label poke_under_roms = tiny_nmi_handler + poke_under_roms_routine - tiny_nmi_handler_routine
|
||||
.label memmap_allram = tiny_nmi_handler + memmap_allram_routine - tiny_nmi_handler_routine
|
||||
.label memmap_normal = tiny_nmi_handler + memmap_normal_routine - tiny_nmi_handler_routine
|
||||
#if SEGMENT_BASIC
|
||||
.label shift_mem_up_internal = tiny_nmi_handler + shift_mem_up_routine - tiny_nmi_handler_routine
|
||||
.label shift_mem_down_internal = tiny_nmi_handler + shift_mem_down_routine - tiny_nmi_handler_routine
|
||||
#endif
|
||||
!addr missed_nmi_flag = $2A7
|
||||
!addr tiny_nmi_handler = $2A8
|
||||
!addr peek_under_roms = tiny_nmi_handler + peek_under_roms_routine - tiny_nmi_handler_routine
|
||||
!addr poke_under_roms = tiny_nmi_handler + poke_under_roms_routine - tiny_nmi_handler_routine
|
||||
!addr memmap_allram = tiny_nmi_handler + memmap_allram_routine - tiny_nmi_handler_routine
|
||||
!addr memmap_normal = tiny_nmi_handler + memmap_normal_routine - tiny_nmi_handler_routine
|
||||
!ifdef SEGMENT_BASIC {
|
||||
!addr shift_mem_up_internal = tiny_nmi_handler + shift_mem_up_routine - tiny_nmi_handler_routine
|
||||
!addr shift_mem_down_internal = tiny_nmi_handler + shift_mem_down_routine - tiny_nmi_handler_routine
|
||||
}
|
||||
|
||||
#endif // CONFIG_MEMORY_MODEL_60K
|
||||
} ; CONFIG_MEMORY_MODEL_60K
|
||||
|
||||
// BASIC vectors
|
||||
.label IERROR = $300 // $300-$301
|
||||
.label IMAIN = $302 // $302-$303
|
||||
.label ICRNCH = $304 // $304-$305
|
||||
.label IQPLOP = $306 // $306-$307
|
||||
.label IGONE = $308 // $308-$309
|
||||
.label IEVAL = $30A // $30A-$30B
|
||||
; BASIC vectors
|
||||
!addr IERROR = $300 ; $300-$301
|
||||
!addr IMAIN = $302 ; $302-$303
|
||||
!addr ICRNCH = $304 ; $304-$305
|
||||
!addr IQPLOP = $306 ; $306-$307
|
||||
!addr IGONE = $308 ; $308-$309
|
||||
!addr IEVAL = $30A ; $30A-$30B
|
||||
|
||||
.label SAREG = $30C // .A storage, for SYS call
|
||||
.label SXREG = $30D // .X storage, for SYS call
|
||||
.label SYREG = $30E // .Y storage, for SYS call
|
||||
.label SPREG = $30F // .P storage, for SYS call
|
||||
!addr SAREG = $30C ; .A storage, for SYS call
|
||||
!addr SXREG = $30D ; .X storage, for SYS call
|
||||
!addr SYREG = $30E ; .Y storage, for SYS call
|
||||
!addr SPREG = $30F ; .P storage, for SYS call
|
||||
|
||||
.label USRPOK = $310 // -- NOT IMPLEMENTED -- JMP instruction
|
||||
.label USRADD = $311 // $311-$312 -- NOT IMPLEMENTED --
|
||||
// $313 -- UNUSED -- free for user software
|
||||
!addr USRPOK = $310 ; -- NOT IMPLEMENTED -- JMP instruction
|
||||
!addr USRADD = $311 ; $311-$312 -- NOT IMPLEMENTED --
|
||||
; $313 -- UNUSED -- free for user software
|
||||
|
||||
// Kernal vectors - interrupts
|
||||
.label CINV = $314 // $314-$315
|
||||
.label CBINV = $316 // $316-$317
|
||||
.label NMINV = $318 // $318-$319
|
||||
; Kernal vectors - interrupts
|
||||
!addr CINV = $314 ; $314-$315
|
||||
!addr CBINV = $316 ; $316-$317
|
||||
!addr NMINV = $318 ; $318-$319
|
||||
|
||||
// Kernal vectors - routines
|
||||
.label IOPEN = $31A // $31A-$31B
|
||||
.label ICLOSE = $31C // $31C-$31D
|
||||
.label ICHKIN = $31E // $31E-$31F
|
||||
.label ICKOUT = $320 // $320-$321
|
||||
.label ICLRCH = $322 // $322-$323
|
||||
.label IBASIN = $324 // $324-$325
|
||||
.label IBSOUT = $326 // $326-$327
|
||||
.label ISTOP = $328 // $328-$329
|
||||
.label IGETIN = $32A // $32A-$32B
|
||||
.label ICLALL = $32C // $32C-$32D
|
||||
.label USRCMD = $32E // $32E-$32F
|
||||
.label ILOAD = $330 // $330-$331
|
||||
.label ISAVE = $332 // $332-$333
|
||||
; Kernal vectors - routines
|
||||
!addr IOPEN = $31A ; $31A-$31B
|
||||
!addr ICLOSE = $31C ; $31C-$31D
|
||||
!addr ICHKIN = $31E ; $31E-$31F
|
||||
!addr ICKOUT = $320 ; $320-$321
|
||||
!addr ICLRCH = $322 ; $322-$323
|
||||
!addr IBASIN = $324 ; $324-$325
|
||||
!addr IBSOUT = $326 ; $326-$327
|
||||
!addr ISTOP = $328 ; $328-$329
|
||||
!addr IGETIN = $32A ; $32A-$32B
|
||||
!addr ICLALL = $32C ; $32C-$32D
|
||||
!addr USRCMD = $32E ; $32E-$32F
|
||||
!addr ILOAD = $330 ; $330-$331
|
||||
!addr ISAVE = $332 ; $332-$333
|
||||
|
||||
// $314 $334-$33B -- UNUSED -- free for user software
|
||||
; $314 $334-$33B -- UNUSED -- free for user software
|
||||
|
||||
#if !CONFIG_RS232_UP9600
|
||||
.label TBUFFR = $33C // $33C-$3FB [!] tape buffer, our usage details differ
|
||||
#else
|
||||
.label REVTAB = $37C // $37C-$3FB -- WIP -- [!] RS-232 precalculated data
|
||||
#endif
|
||||
!ifndef CONFIG_RS232_UP9600 {
|
||||
!addr TBUFFR = $33C ; $33C-$3FB [!] tape buffer, our usage details differ
|
||||
} else {
|
||||
!addr REVTAB = $37C ; $37C-$3FB -- WIP -- [!] RS-232 precalculated data
|
||||
}
|
||||
|
||||
// $3FC $3FC-$3FF -- UNUSED -- free for user software
|
||||
; $3FC $3FC-$3FF -- UNUSED -- free for user software
|
||||
|
||||
|
||||
//
|
||||
// Definitions for extended IEC functionality
|
||||
//
|
||||
;
|
||||
; Definitions for extended IEC functionality
|
||||
;
|
||||
|
||||
.const IEC_NORMAL = 0 // has to be 0, always!
|
||||
#if CONFIG_IEC_JIFFYDOS
|
||||
.const IEC_JIFFY = 1 // has to be 1, always!
|
||||
#endif
|
||||
#if CONFIG_IEC_DOLPHINDOS
|
||||
.const IEC_DOLPHIN = 2
|
||||
#endif
|
||||
#if CONFIG_IEC_BURST_CIA1 || CONFIG_IEC_BURST_CIA2 || ROM_LAYOUT_M65
|
||||
.const IEC_BURST = 3
|
||||
#endif
|
||||
#if ROM_LAYOUT_M65
|
||||
.const IEC_ROMDOS = 4
|
||||
#endif
|
||||
!set IEC_NORMAL = 0 ; has to be 0, always!
|
||||
!ifdef CONFIG_IEC_JIFFYDOS {
|
||||
!set IEC_JIFFY = 1 ; has to be 1, always!
|
||||
}
|
||||
!ifdef CONFIG_IEC_DOLPHINDOS {
|
||||
!set IEC_DOLPHIN = 2
|
||||
}
|
||||
!ifdef HAS_IEC_BURST {
|
||||
!set IEC_BURST = 3
|
||||
}
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
!set IEC_ROMDOS = 4
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Definitions for tape functionality
|
||||
//
|
||||
;
|
||||
; Definitions for tape functionality
|
||||
;
|
||||
|
||||
#if CONFIG_TAPE_NORMAL || CONFIG_TAPE_TURBO
|
||||
!ifdef HAS_TAPE {
|
||||
|
||||
.label __normal_time_S = IRQTMP+0 // duration of the short pulse
|
||||
.label __normal_time_M = IRQTMP+1 // duration of the medium pulse
|
||||
!addr __normal_time_S = IRQTMP+0 ; duration of the short pulse
|
||||
!addr __normal_time_M = IRQTMP+1 ; duration of the medium pulse
|
||||
|
||||
.label __turbo_half_S = IRQTMP+0 // half-duration of the short pulse
|
||||
.label __turbo_half_L = IRQTMP+1 // half-duration of the long pulse
|
||||
!addr __turbo_half_S = IRQTMP+0 ; half-duration of the short pulse
|
||||
!addr __turbo_half_L = IRQTMP+1 ; half-duration of the long pulse
|
||||
|
||||
.label __pulse_threshold = SVXT // pulse classification threshold
|
||||
.label __pulse_threshold_ML = SYNO // M/L pulse classification threshold, for normal only
|
||||
!addr __pulse_threshold = SVXT ; pulse classification threshold
|
||||
!addr __pulse_threshold_ML = SYNO ; M/L pulse classification threshold, for normal only
|
||||
}
|
||||
|
||||
#endif
|
||||
!ifdef CONFIG_TAPE_TURBO {
|
||||
|
||||
#if CONFIG_TAPE_TURBO
|
||||
|
||||
.label __tape_turbo_bytestore = STACK // location of byte storage helper routine
|
||||
|
||||
#endif
|
||||
!addr __tape_turbo_bytestore = STACK ; location of byte storage helper routine
|
||||
}
|
||||
@@ -1,76 +1,76 @@
|
||||
// #LAYOUT# M65 * #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Names of ZP and low memory locations for the native MEGA65 mode
|
||||
//
|
||||
;
|
||||
; Names of ZP and low memory locations for the native MEGA65 mode
|
||||
;
|
||||
|
||||
|
||||
//
|
||||
// Page 0 - reused LDTB1 and USER
|
||||
//
|
||||
;
|
||||
; Page 0 - reused LDTB1 and USER
|
||||
;
|
||||
|
||||
.label M65_TMP__K1 = $D9 // $D9 -- UNUSED -- temporary value for various Kernal routines
|
||||
.label M65_LPNT_BAS1 = $DA // $DA-$DD 4-byte pointer for temporary usage within BASIC
|
||||
.label M65_LPNT_BAS2 = $DE // $DE-$E1 4-byte pointer for temporary usage within BASIC
|
||||
.label M65_LPNT_SCR = $E2 // $E2-$E5 4-byte pointer for temporary usage within BASIC and screen editor
|
||||
// E6 reserved for BASIC error handling routines, also in native mode
|
||||
.label M65_MAGICSTR = $E7 // $E7-$E9 if equals 'M65' it means we are in native mode
|
||||
// EA reserved for BASIC error handling routines, also in native mode
|
||||
.label M65_LPNT_IRQ = $EB // $EB-$EE 4-byte pointer for temporary usage within interrupts
|
||||
.label M65_LPNT_KERN = $EF // $EF-$F3 4-byte pointer for temporary usage by KERNAL
|
||||
.label M65_TMP__K2 = $F4 // $F4 -- UNUSED -- temporary value for various Kernal routines
|
||||
!addr M65_TMP__K1 = $D9 ; $D9 -- UNUSED -- temporary value for various Kernal routines
|
||||
!addr M65_LPNT_BAS1 = $DA ; $DA-$DD 4-byte pointer for temporary usage within BASIC
|
||||
!addr M65_LPNT_BAS2 = $DE ; $DE-$E1 4-byte pointer for temporary usage within BASIC
|
||||
!addr M65_LPNT_SCR = $E2 ; $E2-$E5 4-byte pointer for temporary usage within BASIC and screen editor
|
||||
; E6 reserved for BASIC error handling routines, also in native mode
|
||||
!addr M65_MAGICSTR = $E7 ; $E7-$E9 if equals 'M65' it means we are in native mode
|
||||
; EA reserved for BASIC error handling routines, also in native mode
|
||||
!addr M65_LPNT_IRQ = $EB ; $EB-$EE 4-byte pointer for temporary usage within interrupts
|
||||
!addr M65_LPNT_KERN = $EF ; $EF-$F3 4-byte pointer for temporary usage by KERNAL
|
||||
!addr M65_TMP__K2 = $F4 ; $F4 -- UNUSED -- temporary value for various Kernal routines
|
||||
|
||||
//
|
||||
// Page 0 - other reused values
|
||||
//
|
||||
;
|
||||
; Page 0 - other reused values
|
||||
;
|
||||
|
||||
.label M65__TXTROW = TBLX // screen row
|
||||
.label M65__TXTCOL = PNTR // screen column
|
||||
.label M65__SCRINPUT = LSXP // pointer to the screen input, within the screen segment
|
||||
!addr M65__TXTROW = TBLX ; screen row
|
||||
!addr M65__TXTCOL = PNTR ; screen column
|
||||
!addr M65__SCRINPUT = LSXP ; pointer to the screen input, within the screen segment
|
||||
|
||||
//
|
||||
// Pages 4-7 - reused screen memory
|
||||
//
|
||||
;
|
||||
; Pages 4-7 - reused screen memory
|
||||
;
|
||||
|
||||
// $400-$57F - reserved for BASIC
|
||||
; $400-$57F - reserved for BASIC
|
||||
|
||||
// $400-$57F -- UNUSED -- reserved for BASIC
|
||||
; $400-$57F -- UNUSED -- reserved for BASIC
|
||||
|
||||
// $580-$5FF - reserved for KERNAL
|
||||
; $580-$5FF - reserved for KERNAL
|
||||
|
||||
.label M65_SCRSEG = $580 // $580-$581 segment address (2 higher bytes) of the screen memory
|
||||
.label M65_SCRBASE = $582 // $582-$583 first byte of screen memory
|
||||
.label M65_SCRGUARD = $584 // $584-$585 last byte of screen memory + 1 XXX is it needed?
|
||||
.label M65_COLGUARD = $586 // $586-$587 last byte of colour memory + 1
|
||||
.label M65_COLVIEW = $588 // $588-$589 first byte of color memory viewport
|
||||
.label M65_COLVIEWMAX = $58A // $58A-$58B largest allowed value of M65_COLVIEW
|
||||
.label M65_SCRMODE = $58C // 0 = 40x25, 1 = 80x25, 2 = 80x50
|
||||
.label M65_SCRWINMODE = $58D // $00 = normal mode, $FF = window enabled
|
||||
.label M65_TXTWIN_X0 = $58E // text window - top-left X coordinate, starting from 0
|
||||
.label M65_TXTWIN_Y0 = $58F // text window - top-left Y coordinate, starting from 0
|
||||
.label M65_TXTWIN_X1 = $590 // text window - bottom-right X coordinate + 1
|
||||
.label M65_TXTWIN_Y1 = $591 // text window - bottom-right Y coordinate + 1
|
||||
.label M65_TXTROW_OFF = $592 // $592-$593 offset to the current text row from the viewport start
|
||||
.label M65_SCRCOLMAX = $594 // maximum allowed column
|
||||
// $595-$5EB -- UNUSED --
|
||||
.label M65_DMAGIC_LIST = $5EF // $5EF-$5FF reserved for DMAgic list, 17 bytes
|
||||
.label M65_RS232_INBUF = $600 // $600-$6FF -- reserved for RS-232 input buffer --
|
||||
.label M65_RS232_OUTBUF = $700 // $700-$7FF -- reserved for RS-232 output buffer --
|
||||
!addr M65_SCRSEG = $580 ; $580-$581 segment address (2 higher bytes) of the screen memory
|
||||
!addr M65_SCRBASE = $582 ; $582-$583 first byte of screen memory
|
||||
!addr M65_SCRGUARD = $584 ; $584-$585 last byte of screen memory + 1 XXX is it needed?
|
||||
!addr M65_COLGUARD = $586 ; $586-$587 last byte of colour memory + 1
|
||||
!addr M65_COLVIEW = $588 ; $588-$589 first byte of color memory viewport
|
||||
!addr M65_COLVIEWMAX = $58A ; $58A-$58B largest allowed value of M65_COLVIEW
|
||||
!addr M65_SCRMODE = $58C ; 0 = 40x25, 1 = 80x25, 2 = 80x50
|
||||
!addr M65_SCRWINMODE = $58D ; $00 = normal mode, $FF = window enabled
|
||||
!addr M65_TXTWIN_X0 = $58E ; text window - top-left X coordinate, starting from 0
|
||||
!addr M65_TXTWIN_Y0 = $58F ; text window - top-left Y coordinate, starting from 0
|
||||
!addr M65_TXTWIN_X1 = $590 ; text window - bottom-right X coordinate + 1
|
||||
!addr M65_TXTWIN_Y1 = $591 ; text window - bottom-right Y coordinate + 1
|
||||
!addr M65_TXTROW_OFF = $592 ; $592-$593 offset to the current text row from the viewport start
|
||||
!addr M65_SCRCOLMAX = $594 ; maximum allowed column
|
||||
; $595-$5EB -- UNUSED --
|
||||
!addr M65_DMAGIC_LIST = $5EF ; $5EF-$5FF reserved for DMAgic list, 17 bytes
|
||||
!addr M65_RS232_INBUF = $600 ; $600-$6FF -- reserved for RS-232 input buffer --
|
||||
!addr M65_RS232_OUTBUF = $700 ; $700-$7FF -- reserved for RS-232 output buffer --
|
||||
|
||||
//
|
||||
// Addresses for configuring the DMA job
|
||||
//
|
||||
;
|
||||
; Addresses for configuring the DMA job
|
||||
;
|
||||
|
||||
.label M65_DMAJOB_SIZE_0 = M65_DMAGIC_LIST + 7
|
||||
.label M65_DMAJOB_SIZE_1 = M65_DMAGIC_LIST + 8
|
||||
!addr M65_DMAJOB_SIZE_0 = M65_DMAGIC_LIST + 7
|
||||
!addr M65_DMAJOB_SIZE_1 = M65_DMAGIC_LIST + 8
|
||||
|
||||
.label M65_DMAJOB_SRC_0 = M65_DMAGIC_LIST + 9
|
||||
.label M65_DMAJOB_SRC_1 = M65_DMAGIC_LIST + 10
|
||||
.label M65_DMAJOB_SRC_2 = M65_DMAGIC_LIST + 11
|
||||
.label M65_DMAJOB_SRC_3 = M65_DMAGIC_LIST + 2
|
||||
!addr M65_DMAJOB_SRC_0 = M65_DMAGIC_LIST + 9
|
||||
!addr M65_DMAJOB_SRC_1 = M65_DMAGIC_LIST + 10
|
||||
!addr M65_DMAJOB_SRC_2 = M65_DMAGIC_LIST + 11
|
||||
!addr M65_DMAJOB_SRC_3 = M65_DMAGIC_LIST + 2
|
||||
|
||||
.label M65_DMAJOB_DST_0 = M65_DMAGIC_LIST + 12
|
||||
.label M65_DMAJOB_DST_1 = M65_DMAGIC_LIST + 13
|
||||
.label M65_DMAJOB_DST_2 = M65_DMAGIC_LIST + 14
|
||||
.label M65_DMAJOB_DST_3 = M65_DMAGIC_LIST + 4
|
||||
!addr M65_DMAJOB_DST_0 = M65_DMAGIC_LIST + 12
|
||||
!addr M65_DMAJOB_DST_1 = M65_DMAGIC_LIST + 13
|
||||
!addr M65_DMAJOB_DST_2 = M65_DMAGIC_LIST + 14
|
||||
!addr M65_DMAJOB_DST_3 = M65_DMAGIC_LIST + 4
|
||||
@@ -1,24 +1,24 @@
|
||||
// #LAYOUT# M65 * #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 * #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX target High RAM memory map concept - TODO: update current code
|
||||
; XXX target High RAM memory map concept - TODO: update current code
|
||||
|
||||
// $10000-$17FFF (32KB) - reserved for DOS
|
||||
// $18000-$18FFF (4KB) - chargen copied to RAM, to allow character redefinition
|
||||
; $10000-$17FFF (32KB) - reserved for DOS
|
||||
; $18000-$18FFF (4KB) - chargen copied to RAM, to allow character redefinition
|
||||
|
||||
.const MEMCONF_CHRBASE = $8000
|
||||
!set MEMCONF_CHRBASE = $8000
|
||||
|
||||
// $19000-$1B7FF (10KB) - reserved for virtual text screen, 80x128
|
||||
; $19000-$1B7FF (10KB) - reserved for virtual text screen, 80x128
|
||||
|
||||
.const MEMCONF_SCRBASE = $9000
|
||||
.const MEMCONF_SCRROWS = 128
|
||||
!set MEMCONF_SCRBASE = $9000
|
||||
!set MEMCONF_SCRROWS = 128
|
||||
|
||||
// $1B800-$1DFFF (10KB) - reserved for a color RAM backup when switchin between text/graphics modes
|
||||
// (4KB) - reserved for sprites
|
||||
// (2KB) - reserved for future use
|
||||
// (2KB) - color RAM mirror, not useable
|
||||
// $20000-$2FFFF (64KB) - ROM, the essential part
|
||||
// $30000-$4FFFF (64KB) - ROM, additions
|
||||
// $50000-$57FFF (32KB) - reserved for graphics screen
|
||||
// $58000-... - extended BASIC variables, RAM disk, etc.
|
||||
; $1B800-$1DFFF (10KB) - reserved for a color RAM backup when switchin between text/graphics modes
|
||||
; (4KB) - reserved for sprites
|
||||
; (2KB) - reserved for future use
|
||||
; (2KB) - color RAM mirror, not useable
|
||||
; $20000-$2FFFF (64KB) - ROM, the essential part
|
||||
; $30000-$4FFFF (64KB) - ROM, additions
|
||||
; $50000-$57FFF (32KB) - reserved for graphics screen
|
||||
; $58000-... - extended BASIC variables, RAM disk, etc.
|
||||
@@ -1,15 +1,14 @@
|
||||
|
||||
// BASIC startup vectors
|
||||
; BASIC startup vectors
|
||||
|
||||
|
||||
#if ROM_LAYOUT_X16
|
||||
!ifdef CONFIG_PLATFORM_COMMANDER_X16 {
|
||||
|
||||
.label IBASIC_COLD_START = $C000
|
||||
.label IBASIC_WARM_START = $C002
|
||||
!addr IBASIC_COLD_START = $C000
|
||||
!addr IBASIC_WARM_START = $C002
|
||||
|
||||
#else
|
||||
} else {
|
||||
|
||||
.label IBASIC_COLD_START = $A000
|
||||
.label IBASIC_WARM_START = $A002
|
||||
|
||||
#endif
|
||||
!addr IBASIC_COLD_START = $A000
|
||||
!addr IBASIC_WARM_START = $A002
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
#if CONFIG_PLATFORM_COMMODORE_64
|
||||
!ifdef CONFIG_PLATFORM_COMMODORE_64 {
|
||||
|
||||
// Cartridge ROM locations
|
||||
; Cartridge ROM locations
|
||||
|
||||
.label ICART_COLD_START = $8000 // $8000-$8001, cartridge cold start vector
|
||||
.label ICART_WARM_START = $8002 // $8002-$8003, cartridge warm start vector (RESTORE key)
|
||||
.label CART_SIG = $8004 // $8004-$8008, signature for cartridge detection
|
||||
|
||||
#endif
|
||||
!addr ICART_COLD_START = $8000 ; $8000-$8001, cartridge cold start vector
|
||||
!addr ICART_WARM_START = $8002 ; $8002-$8003, cartridge warm start vector (RESTORE key)
|
||||
!addr CART_SIG = $8004 ; $8004-$8008, signature for cartridge detection
|
||||
}
|
||||
@@ -1,44 +1,44 @@
|
||||
// #LAYOUT# * BASIC_1 #IGNORE
|
||||
// #LAYOUT# * * #TAKE
|
||||
;; #LAYOUT# * BASIC_1 #IGNORE
|
||||
;; #LAYOUT# * * #TAKE
|
||||
|
||||
// Kernal jump table
|
||||
; Kernal jump table
|
||||
|
||||
.label JCINT = $FF81
|
||||
.label JIOINIT = $FF84
|
||||
.label JRAMTAS = $FF87
|
||||
.label JRESTOR = $FF8A
|
||||
.label JVECTOR = $FF8D
|
||||
.label JSETMSG = $FF90
|
||||
.label JSECOND = $FF93
|
||||
.label JTKSA = $FF96
|
||||
.label JMEMTOP = $FF99
|
||||
.label JMEMBOT = $FF9C
|
||||
.label JSCNKEY = $FF9F
|
||||
.label JSETTMO = $FFA2
|
||||
.label JACPTR = $FFA5
|
||||
.label JCIOUT = $FFA8
|
||||
.label JUNTLK = $FFAB
|
||||
.label JUNLSN = $FFAE
|
||||
.label JLISTEN = $FFB1
|
||||
.label JTALK = $FFB4
|
||||
.label JREADST = $FFB7
|
||||
.label JSETFLS = $FFBA
|
||||
.label JSETNAM = $FFBD
|
||||
.label JOPEN = $FFC0
|
||||
.label JCLOSE = $FFC3
|
||||
.label JCHKIN = $FFC6
|
||||
.label JCKOUT = $FFC9
|
||||
.label JCLRCHN = $FFCC
|
||||
.label JCHRIN = $FFCF
|
||||
.label JCHROUT = $FFD2
|
||||
.label JLOAD = $FFD5
|
||||
.label JSAVE = $FFD8
|
||||
.label JSETTIM = $FFDB
|
||||
.label JRDTIM = $FFDE
|
||||
.label JSTOP = $FFE1
|
||||
.label JGETIN = $FFE4
|
||||
.label JCLALL = $FFE7
|
||||
.label JUDTIM = $FFEA
|
||||
.label JSCREEN = $FFED
|
||||
.label JPLOT = $FFF0
|
||||
.label JIOBASE = $FFF3
|
||||
!addr JCINT = $FF81
|
||||
!addr JIOINIT = $FF84
|
||||
!addr JRAMTAS = $FF87
|
||||
!addr JRESTOR = $FF8A
|
||||
!addr JVECTOR = $FF8D
|
||||
!addr JSETMSG = $FF90
|
||||
!addr JSECOND = $FF93
|
||||
!addr JTKSA = $FF96
|
||||
!addr JMEMTOP = $FF99
|
||||
!addr JMEMBOT = $FF9C
|
||||
!addr JSCNKEY = $FF9F
|
||||
!addr JSETTMO = $FFA2
|
||||
!addr JACPTR = $FFA5
|
||||
!addr JCIOUT = $FFA8
|
||||
!addr JUNTLK = $FFAB
|
||||
!addr JUNLSN = $FFAE
|
||||
!addr JLISTEN = $FFB1
|
||||
!addr JTALK = $FFB4
|
||||
!addr JREADST = $FFB7
|
||||
!addr JSETFLS = $FFBA
|
||||
!addr JSETNAM = $FFBD
|
||||
!addr JOPEN = $FFC0
|
||||
!addr JCLOSE = $FFC3
|
||||
!addr JCHKIN = $FFC6
|
||||
!addr JCKOUT = $FFC9
|
||||
!addr JCLRCHN = $FFCC
|
||||
!addr JCHRIN = $FFCF
|
||||
!addr JCHROUT = $FFD2
|
||||
!addr JLOAD = $FFD5
|
||||
!addr JSAVE = $FFD8
|
||||
!addr JSETTIM = $FFDB
|
||||
!addr JRDTIM = $FFDE
|
||||
!addr JSTOP = $FFE1
|
||||
!addr JGETIN = $FFE4
|
||||
!addr JCLALL = $FFE7
|
||||
!addr JUDTIM = $FFEA
|
||||
!addr JSCREEN = $FFED
|
||||
!addr JPLOT = $FFF0
|
||||
!addr JIOBASE = $FFF3
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
//
|
||||
// Helper aliases to make the code more readable
|
||||
// Always use double underscore in label names
|
||||
// to allow automatic VICE label conflict prevention
|
||||
//
|
||||
|
||||
// Temporary variables for various routines
|
||||
.label __tokenise_work1 = $07 // CHARAC
|
||||
.label __tokenise_work2 = $08 // ENDCHR
|
||||
.label __tokenise_work3 = $0B // COUNT
|
||||
.label __tokenise_work4 = $0F // GARBFL
|
||||
.label __tokenise_work5 = $0C // DIMFLG
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
;
|
||||
; Aliases for memory locations for memory block copy routines
|
||||
;
|
||||
|
||||
!addr memmove__src = INDEX+2
|
||||
!addr memmove__dst = RESHO+0
|
||||
!addr memmove__size = RESHO+2
|
||||
!addr memmove__tmp = RESHO+4
|
||||
|
||||
|
||||
|
||||
;
|
||||
; Helper aliases to make the code more readable
|
||||
; Always use double underscore in label names
|
||||
; to allow automatic VICE label conflict prevention
|
||||
;
|
||||
|
||||
!addr __tokenise_work1 = $07 ; CHARAC
|
||||
!addr __tokenise_work2 = $08 ; ENDCHR
|
||||
!addr __tokenise_work3 = $0B ; COUNT
|
||||
!addr __tokenise_work4 = $0F ; GARBFL
|
||||
!addr __tokenise_work5 = $0C ; DIMFLG
|
||||
|
||||
|
||||
|
||||
;
|
||||
; Aliases for the tokeniser - reuse the CPU stack
|
||||
;
|
||||
|
||||
!addr tk__offset = $100 ; offset into string
|
||||
!addr tk__length = __tokenise_work1 ; length of the raw string
|
||||
|
||||
!addr tk__len_unpacked = $101 ; length of unpacked data; it could replace 'tk__nibble_flag', but at the cost of code size/performance
|
||||
!addr tk__shorten_bits = $102 ; 2 bytes for quick shortening of packed candidate
|
||||
!addr tk__nibble_flag = $104 ; $00 = start from new byte, $FF = start from high nibble
|
||||
!addr tk__byte_offset = $105 ; offset of the current byte (to place new data) in tk__packed
|
||||
|
||||
!addr tk__packed = $106 ; packed candidate, 25 bytes is enough for worst case - a 16 byte keyword
|
||||
+27
-51
@@ -1,63 +1,39 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_0 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_0 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;; #IMPORT# KERNAL_0 = KERNAL_combined.sym KERNAL_0_combined.sym
|
||||
|
||||
// Routines imported from Kernal - our private API
|
||||
;
|
||||
; Routines imported from Kernal - our private API
|
||||
;
|
||||
|
||||
#if ROM_LAYOUT_STD
|
||||
#import "KERNAL_combined.sym"
|
||||
#else
|
||||
#import "KERNAL_0_combined.sym"
|
||||
#endif
|
||||
;; #ALIAS# panic = KERNAL_0.panic
|
||||
|
||||
;; #ALIAS# vector_reset = KERNAL_0.vector_reset
|
||||
;; #ALIAS# hw_entry_reset = KERNAL_0.hw_entry_reset
|
||||
|
||||
.function KERNAL()
|
||||
{
|
||||
#if ROM_LAYOUT_STD
|
||||
.return KERNAL
|
||||
#else
|
||||
.return KERNAL_0
|
||||
#endif
|
||||
}
|
||||
;; #ALIAS# clear_screen = KERNAL_0.clear_screen
|
||||
|
||||
;; #ALIAS# printf = KERNAL_0.printf
|
||||
|
||||
#if ROM_LAYOUT_M65
|
||||
.label map_end = KERNAL().map_end
|
||||
.label map_NORMAL = KERNAL().map_NORMAL
|
||||
#endif
|
||||
;; #ALIAS# plot_set = KERNAL_0.plot_set
|
||||
;; #ALIAS# print_hex_byte = KERNAL_0.print_hex_byte
|
||||
;; #ALIAS# print_return = KERNAL_0.print_return
|
||||
;; #ALIAS# print_space = KERNAL_0.print_space
|
||||
|
||||
#if CONFIG_PANIC_SCREEN
|
||||
.label panic = KERNAL().panic
|
||||
#endif
|
||||
;; #ALIAS# tape_head_align = KERNAL_0.tape_head_align
|
||||
|
||||
.label vector_reset = KERNAL().vector_reset
|
||||
.label hw_entry_reset = KERNAL().hw_entry_reset
|
||||
;; #ALIAS# filename_any = KERNAL_0.filename_any
|
||||
|
||||
.label clear_screen = KERNAL().clear_screen
|
||||
;; #ALIAS# SELDEV = KERNAL_0.SELDEV
|
||||
|
||||
#if CONFIG_DBG_PRINTF
|
||||
.label printf = KERNAL().printf
|
||||
#endif
|
||||
;; #ALIAS# map_end = KERNAL_0.map_end
|
||||
;; #ALIAS# map_NORMAL = KERNAL_0.map_NORMAL
|
||||
|
||||
.label plot_set = KERNAL().plot_set
|
||||
.label print_hex_byte = KERNAL().print_hex_byte
|
||||
.label print_return = KERNAL().print_return
|
||||
.label print_space = KERNAL().print_space
|
||||
|
||||
#if CONFIG_TAPE_HEAD_ALIGN
|
||||
.label tape_head_align = KERNAL().tape_head_align
|
||||
#endif
|
||||
|
||||
.label filename_any = KERNAL().filename_any
|
||||
|
||||
.label SELDEV = KERNAL().SELDEV
|
||||
|
||||
#if ROM_LAYOUT_M65
|
||||
.label M65_MODEGET = KERNAL().M65_MODEGET
|
||||
.label M65_MODESET = KERNAL().M65_MODESET
|
||||
.label M65_SLOW = KERNAL().M65_SLOW
|
||||
.label M65_FAST = KERNAL().M65_FAST
|
||||
.label M65_SETWIN_Y = KERNAL().M65_SETWIN_Y
|
||||
#endif
|
||||
;; #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
|
||||
@@ -1,10 +1,11 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
; XXX provide documentation and implementation
|
||||
|
||||
REASON:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,9 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
; XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,16 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
;
|
||||
; Official BASIC routine, described in:
|
||||
;
|
||||
; - [RG64] C64 Programmers Reference Guide - XXX
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
;
|
||||
; CPU registers that has to be preserved (see [RG64]): XXX
|
||||
;
|
||||
|
||||
MAIN:
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
;
|
||||
; Official BASIC routine, described in:
|
||||
;
|
||||
; - [RG64] C64 Programmers Reference Guide - XXX
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
;
|
||||
; CPU registers that has to be preserved (see [RG64]): XXX
|
||||
;
|
||||
|
||||
|
||||
CHRNCH:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,10 +1,11 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and real implementation
|
||||
; XXX provide documentation and real implementation
|
||||
|
||||
new:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,12 +1,13 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
// see: https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
// https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
|
||||
; XXX provide documentation and implementation
|
||||
; see: https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
; https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
|
||||
|
||||
setcharptr:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
;
|
||||
; Official BASIC routine, described in:
|
||||
;
|
||||
; - [RG64] C64 Programmers Reference Guide - XXX
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
;
|
||||
; CPU registers that has to be preserved (see [RG64]): XXX
|
||||
;
|
||||
|
||||
|
||||
QPLOP:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
;
|
||||
; Official BASIC routine, described in:
|
||||
;
|
||||
; - [RG64] C64 Programmers Reference Guide - XXX
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
|
||||
;
|
||||
; CPU registers that has to be preserved (see [RG64]): XXX
|
||||
;
|
||||
|
||||
|
||||
GONE:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
;
|
||||
; Official BASIC routine, described in:
|
||||
;
|
||||
; - [RG64] C64 Programmers Reference Guide - XXX
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
|
||||
;
|
||||
; CPU registers that has to be preserved (see [RG64]): XXX
|
||||
;
|
||||
|
||||
|
||||
EVAL:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,9 +1,10 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
; XXX provide documentation and implementation
|
||||
|
||||
basic_adray1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,8 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
; XXX provide documentation and implementation
|
||||
|
||||
basic_adray2:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,16 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
;
|
||||
; Official BASIC routine, described in:
|
||||
;
|
||||
; - [RG64] C64 Programmers Reference Guide - XXX
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
;
|
||||
; CPU registers that has to be preserved (see [RG64]): XXX
|
||||
;
|
||||
|
||||
|
||||
ERROR:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,9 +1,10 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
; XXX provide documentation and implementation
|
||||
|
||||
INIT:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,9 +1,10 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
; XXX provide documentation and implementation
|
||||
|
||||
RVECT:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,22 +1,22 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - subtract FAC1 to integer in memory
|
||||
//
|
||||
// Output:
|
||||
// - integer pointed by $49/$4A
|
||||
//
|
||||
// See also:
|
||||
// - https://sta.c64.org/cbm64basconv.html
|
||||
// - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
//
|
||||
;
|
||||
; Math package - subtract FAC1 to integer in memory
|
||||
;
|
||||
; Output:
|
||||
; - integer pointed by $49/$4A
|
||||
;
|
||||
; See also:
|
||||
; - https://sta.c64.org/cbm64basconv.html
|
||||
; - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
|
||||
convert_FAC1_to_INT:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,18 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - print FAC1 value
|
||||
//
|
||||
// See also:
|
||||
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
//
|
||||
;
|
||||
; Math package - print FAC1 value
|
||||
;
|
||||
; See also:
|
||||
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
|
||||
print_FAC1:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - compute TI value
|
||||
//
|
||||
// See also:
|
||||
// - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
//
|
||||
;
|
||||
; Math package - compute TI value
|
||||
;
|
||||
; See also:
|
||||
; - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
compute_TI:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,15 +1,15 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - sets mantissa to 00yyxxaa
|
||||
//
|
||||
// See also:
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - sets mantissa to 00yyxxaa
|
||||
;
|
||||
; See also:
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX add name, label, implement, test
|
||||
; XXX add name, label, implement, test
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,15 +1,15 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - set rest of FAC1 and JMP to $b8d2
|
||||
//
|
||||
// See also:
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - set rest of FAC1 and JMP to $b8d2
|
||||
;
|
||||
; See also:
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX add name, label, implement, test
|
||||
; XXX add name, label, implement, test
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - compute ST value
|
||||
//
|
||||
// See also:
|
||||
// - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
//
|
||||
;
|
||||
; Math package - compute ST value
|
||||
;
|
||||
; See also:
|
||||
; - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
compute_ST:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,21 +1,22 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - convert FAC1 to 16-bit signed integer
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 105
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
;
|
||||
; Math package - convert FAC1 to 16-bit signed integer
|
||||
;
|
||||
; Input:
|
||||
; - .A - address low byte
|
||||
; - .Y - address high byte
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 105
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
FACINX:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// See also:
|
||||
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
//
|
||||
;
|
||||
; Math package - XXX
|
||||
;
|
||||
; See also:
|
||||
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
convert_FAC1_to_s16:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,21 +1,22 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - 16-bit signed integer to FAC1
|
||||
//
|
||||
// Output:
|
||||
// - .A - address high byte (XXX really, not the opposite?)
|
||||
// - .Y - address low byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 107
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
;
|
||||
; Math package - 16-bit signed integer to FAC1
|
||||
;
|
||||
; Output:
|
||||
; - .A - address high byte (XXX really, not the opposite?)
|
||||
; - .Y - address low byte
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 107
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
GIVAYF:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,16 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
// - https://sta.c64.org/cbm64basconv.html
|
||||
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
// XXX add name, label, documentation, implement, test
|
||||
;
|
||||
; Math package - XXX
|
||||
;
|
||||
; - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
; - https://sta.c64.org/cbm64basconv.html
|
||||
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
; XXX add name, label, documentation, implement, test
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,13 +1,13 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// - https://sta.c64.org/cbm64basconv.html
|
||||
//
|
||||
// XXX add name, label, documentation, implement, test
|
||||
;
|
||||
; Math package - XXX
|
||||
;
|
||||
; - https://sta.c64.org/cbm64basconv.html
|
||||
;
|
||||
; XXX add name, label, documentation, implement, test
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,20 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - imports string to FAC1 - XXX: what about spaces?
|
||||
//
|
||||
// Input:
|
||||
// - .A needs to be loaded with string length
|
||||
// - string address in $22/$23
|
||||
//
|
||||
// See also:
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
;
|
||||
; Math package - imports string to FAC1 - XXX: what about spaces?
|
||||
;
|
||||
; Input:
|
||||
; - .A needs to be loaded with string length
|
||||
; - string address in $22/$23
|
||||
;
|
||||
; See also:
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
STRVAL:
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,20 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - subtract FAC1 to memory address at $14/$15 and Y/A
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 112
|
||||
// - https://sta.c64.org/cbm64basconv.html
|
||||
// - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
//
|
||||
;
|
||||
; Math package - subtract FAC1 to memory address at $14/$15 and Y/A
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 112
|
||||
; - https://sta.c64.org/cbm64basconv.html
|
||||
; - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
|
||||
convert_FAC1_to_ADDR:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,20 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - invert FAC1 mantissa
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
// - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
// - https://sta.c64.org/cbm64basconv.html
|
||||
//
|
||||
;
|
||||
; Math package - invert FAC1 mantissa
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
; - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
; - https://sta.c64.org/cbm64basconv.html
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
|
||||
inv_FAC1_mantissa:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,19 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - natural logarigthm
|
||||
//
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - natural logarigthm
|
||||
;
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
log_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// See also:
|
||||
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
//
|
||||
;
|
||||
; Math package - XXX
|
||||
;
|
||||
; See also:
|
||||
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
get_FAC2_via_INDEX:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// See also:
|
||||
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
//
|
||||
;
|
||||
; Math package - XXX
|
||||
;
|
||||
; See also:
|
||||
; - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
get_FAC1_via_INDEX:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,21 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - evaluate FAC1 sign, to FAC1
|
||||
//
|
||||
// Output:
|
||||
// - FAC1 - 0 for FAC1 equal 0, 1 for FAC1 > 0, -1 for FAC1 < 0
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - evaluate FAC1 sign, to FAC1
|
||||
;
|
||||
; Output:
|
||||
; - FAC1 - 0 for FAC1 equal 0, 1 for FAC1 > 0, -1 for FAC1 < 0
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
sgn_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,14 +1,14 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// - https://codebase64.org/doku.php?id=base:asm_include_file_for_basic_routines
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
// XXX add name, label, documentation, implement, test
|
||||
;
|
||||
; Math package - XXX
|
||||
;
|
||||
; - https://codebase64.org/doku.php?id=base:asm_include_file_for_basic_routines
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
; XXX add name, label, documentation, implement, test
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,13 +1,13 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
// XXX add name, label, documentation, implement, test
|
||||
;
|
||||
; Math package - XXX
|
||||
;
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
; XXX add name, label, documentation, implement, test
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,18 +1,19 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - absolute value
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - absolute value
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
abs_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,29 +1,30 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - compare FAC1 with RAM location
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// Output:
|
||||
// - .A - $00 for equal, $01 for FAC1 > RAM, $FF for FAC1 < RAM
|
||||
// - flags N/Z, depending on whether FAC1 is 0, positive, or negative
|
||||
//
|
||||
// Notes:
|
||||
// - uses vector at $24, leaves FAC1 and FAC2 unchanged (Codebase64)
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - compare FAC1 with RAM location
|
||||
;
|
||||
; Input:
|
||||
; - .A - address low byte
|
||||
; - .Y - address high byte
|
||||
;
|
||||
; Output:
|
||||
; - .A - $00 for equal, $01 for FAC1 > RAM, $FF for FAC1 < RAM
|
||||
; - flags N/Z, depending on whether FAC1 is 0, positive, or negative
|
||||
;
|
||||
; Notes:
|
||||
; - uses vector at $24, leaves FAC1 and FAC2 unchanged (Codebase64)
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
FCOMP:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,20 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - convert FAC1 to 32 bit signed integer
|
||||
//
|
||||
// Output:
|
||||
// - $62-$65, big-endian order
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
;
|
||||
; Math package - convert FAC1 to 32 bit signed integer
|
||||
;
|
||||
; Output:
|
||||
; - $62-$65, big-endian order
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
QINT:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,18 +1,19 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - rounds away the decimal to make an integer
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - rounds away the decimal to make an integer
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
int_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,24 +1,25 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - imports string to FAC1, ignores spaces
|
||||
//
|
||||
//
|
||||
// Input:
|
||||
// - .A needs to be loaded with first char of the string
|
||||
// - Carry flag must be clear
|
||||
// - string address in $7A/$7B
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - imports string to FAC1, ignores spaces
|
||||
;
|
||||
;
|
||||
; Input:
|
||||
; - .A needs to be loaded with first char of the string
|
||||
; - Carry flag must be clear
|
||||
; - string address in $7A/$7B
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
FIN:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,18 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - add an ASCII digit that has been converted to a signed integer to FAC1
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
//
|
||||
;
|
||||
; Math package - add an ASCII digit that has been converted to a signed integer to FAC1
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
;
|
||||
|
||||
// XXX implement, test
|
||||
; XXX implement, test
|
||||
|
||||
|
||||
FINLOG:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,22 +1,23 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - outputs FAC1 to string at $0100
|
||||
//
|
||||
// Output:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - outputs FAC1 to string at $0100
|
||||
;
|
||||
; Output:
|
||||
; - .A - address low byte
|
||||
; - .Y - address high byte
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
FOUT:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,21 +1,22 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - square root of FAC2
|
||||
//
|
||||
// Note:
|
||||
// - loads .5 into FAC1 and falling through to the exponentiation routine
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - square root of FAC2
|
||||
;
|
||||
; Note:
|
||||
; - loads .5 into FAC1 and falling through to the exponentiation routine
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
sqr_FAC2:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,25 +1,26 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - set FAC1 as FAC2 raised to the power of FAC1
|
||||
//
|
||||
// Input:
|
||||
// - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
|
||||
//
|
||||
// Note:
|
||||
// - load FAC2 after FAC1, or mimic the Kernals sign comparison (XXX do we need it?)
|
||||
// - uses exp(x*log(y)) formula to calculate y^x; slow and inaccurate
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - set FAC1 as FAC2 raised to the power of FAC1
|
||||
;
|
||||
; Input:
|
||||
; - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
|
||||
;
|
||||
; Note:
|
||||
; - load FAC2 after FAC1, or mimic the Kernals sign comparison (XXX do we need it?)
|
||||
; - uses exp(x*log(y)) formula to calculate y^x; slow and inaccurate
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
pwr_FAC2_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,19 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - exponential function, e raised to FAC1 power
|
||||
//
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - exponential function, e raised to FAC1 power
|
||||
;
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
exp_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,27 +1,28 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - evaluate polynomial with odd powers only for FAC1 value
|
||||
//
|
||||
// Input:
|
||||
// - .A - table address low byte
|
||||
// - .Y - table address low byte
|
||||
// - table format:
|
||||
// - polynomial degree (8 bit integer)
|
||||
// - oefficients (floats), starting from highest degree, times 1+degree
|
||||
//
|
||||
// Notes:
|
||||
// - calls POLY2(table, X*X)*X
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 206
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://www.c64-wiki.com/wiki/POLY1
|
||||
//
|
||||
;
|
||||
; Math package - evaluate polynomial with odd powers only for FAC1 value
|
||||
;
|
||||
; Input:
|
||||
; - .A - table address low byte
|
||||
; - .Y - table address low byte
|
||||
; - table format:
|
||||
; - polynomial degree (8 bit integer)
|
||||
; - oefficients (floats), starting from highest degree, times 1+degree
|
||||
;
|
||||
; Notes:
|
||||
; - calls POLY2(table, X*X)*X
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 206
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://www.c64-wiki.com/wiki/POLY1
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
poly1_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,27 +1,28 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - evaluate polynomial with odd and even powers for FAC1 value
|
||||
//
|
||||
// Input:
|
||||
// - .A - table address low byte
|
||||
// - .Y - table address low byte
|
||||
// - table format:
|
||||
// - polynomial degree (8 bit integer)
|
||||
// - oefficients (floats), starting from highest degree, times 1+degree
|
||||
//
|
||||
// Notes:
|
||||
// - uses Horner method
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 207
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://www.c64-wiki.com/wiki/POLY1
|
||||
//
|
||||
;
|
||||
; Math package - evaluate polynomial with odd and even powers for FAC1 value
|
||||
;
|
||||
; Input:
|
||||
; - .A - table address low byte
|
||||
; - .Y - table address low byte
|
||||
; - table format:
|
||||
; - polynomial degree (8 bit integer)
|
||||
; - oefficients (floats), starting from highest degree, times 1+degree
|
||||
;
|
||||
; Notes:
|
||||
; - uses Horner method
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 207
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://www.c64-wiki.com/wiki/POLY1
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
poly2_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - cosine of FAC1 in radians
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 210
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - cosine of FAC1 in radians
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 210
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
COS:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,28 +1,29 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - sine of FAC1 in radians
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 210 - XXX address does not match
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - sine of FAC1 in radians
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 210 - XXX address does not match
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
sin_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
|
||||
poly_sin:
|
||||
|
||||
.byte $05 // series length - 1
|
||||
!byte $05 ; series length - 1
|
||||
|
||||
put_const_POLY_SIN_1()
|
||||
put_const_POLY_SIN_2()
|
||||
put_const_POLY_SIN_3()
|
||||
put_const_POLY_SIN_4()
|
||||
put_const_POLY_SIN_5()
|
||||
put_const_POLY_SIN_6()
|
||||
+PUT_CONST_POLY_SIN_1
|
||||
+PUT_CONST_POLY_SIN_2
|
||||
+PUT_CONST_POLY_SIN_3
|
||||
+PUT_CONST_POLY_SIN_4
|
||||
+PUT_CONST_POLY_SIN_5
|
||||
+PUT_CONST_POLY_SIN_6
|
||||
@@ -1,17 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - tangent of FAC1 in radians
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 210
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - tangent of FAC1 in radians
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 210
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
tan_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
@@ -1,17 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - arc tangent of FAC1
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 211
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
;
|
||||
; Math package - arc tangent of FAC1
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 211
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
;
|
||||
|
||||
// XXX provide implementation
|
||||
; XXX provide implementation
|
||||
|
||||
atn_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
+STUB_IMPLEMENTATION
|
||||
+15
-15
@@ -1,23 +1,23 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 97
|
||||
// - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
// - https://csdb.dk/forums/?roomid=11&topicid=137233
|
||||
//
|
||||
; Well-known BASIC routine, described in:
|
||||
;
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 97
|
||||
; - https://www.c64-wiki.com/wiki/BASIC-ROM
|
||||
; - https://csdb.dk/forums/?roomid=11&topicid=137233
|
||||
;
|
||||
|
||||
// XXX use this routine to initialize TXTPTR
|
||||
; XXX use this routine to initialize TXTPTR
|
||||
|
||||
RUNC:
|
||||
// According to WIKI, we should load $7A/$7B with $2B-1/$2C-1), this does not makes sense.
|
||||
// But CSDB claims, that it should 'set current character pointer to start of basic - 1' - this
|
||||
// looks sane, also checked that the original BASIC routine does this (short test program)
|
||||
; According to WIKI, we should load $7A/$7B with $2B-1/$2C-1), this does not makes sense.
|
||||
; But CSDB claims, that it should 'set current character pointer to start of basic - 1' - this
|
||||
; looks sane, also checked that the original BASIC routine does this (short test program)
|
||||
|
||||
// Lets initialize TXTPTR using TXTTAB
|
||||
; Lets initialize TXTPTR using TXTTAB
|
||||
|
||||
lda TXTTAB+0
|
||||
sec
|
||||
|
||||
+15
-15
@@ -1,22 +1,22 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
// Well-known BASIC routine, described in:
|
||||
//
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 97
|
||||
// - https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
// - https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
|
||||
// - https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image
|
||||
; Well-known BASIC routine, described in:
|
||||
;
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 97
|
||||
; - https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
; - https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
|
||||
; - https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image
|
||||
|
||||
NEWSTT:
|
||||
|
||||
// XXX Real implementation is more complicated, it iss actually a part
|
||||
// of the BASIC main loop. It is, however, often called by various
|
||||
// utilities to simply run the software which was just loaded or
|
||||
// uncompressed.
|
||||
; XXX Real implementation is more complicated, it iss actually a part
|
||||
; of the BASIC main loop. It is, however, often called by various
|
||||
; utilities to simply run the software which was just loaded or
|
||||
; uncompressed.
|
||||
|
||||
// For now, lets cheat a little - this should provide some compatibility:
|
||||
; For now, lets cheat a little - this should provide some compatibility:
|
||||
|
||||
jmp cmd_run
|
||||
+17
-17
@@ -1,31 +1,31 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE-FLOAT
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE-FLOAT
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
// Print string at $YYAA
|
||||
// Computes Mapping the 64 p101
|
||||
; Print string at $YYAA
|
||||
; Computes Mapping the 64 p101
|
||||
|
||||
// print string routine
|
||||
; print string routine
|
||||
|
||||
STROUT:
|
||||
|
||||
// Setup pointer
|
||||
; Setup pointer
|
||||
sty FRESPC+1
|
||||
sta FRESPC+0
|
||||
|
||||
phx_trash_a
|
||||
+phx_trash_a
|
||||
|
||||
// Get offset ready
|
||||
; Get offset ready
|
||||
ldy #$00
|
||||
!:
|
||||
// Save Y in X, since X is preserved by chrout, but Y is not
|
||||
@1:
|
||||
; Save Y in X, since X is preserved by chrout, but Y is not
|
||||
tya
|
||||
tax
|
||||
|
||||
lda (FRESPC),y
|
||||
beq !+
|
||||
beq @2
|
||||
|
||||
jsr JCHROUT
|
||||
|
||||
@@ -33,8 +33,8 @@ STROUT:
|
||||
tay
|
||||
|
||||
iny
|
||||
bne !-
|
||||
!:
|
||||
pla // XXX can we use plx_trash_a here?
|
||||
bne @1
|
||||
@2:
|
||||
pla ; XXX can we use plx_trash_a here?
|
||||
tax
|
||||
rts
|
||||
@@ -1,24 +1,24 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Default values for BASIC vectors - described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - pages 68-70
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 318
|
||||
//
|
||||
;
|
||||
; Default values for BASIC vectors - described in:
|
||||
;
|
||||
; - [RG64] C64 Programmers Reference Guide - pages 68-70
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 318
|
||||
;
|
||||
|
||||
basic_vector_defaults_1:
|
||||
|
||||
.word ERROR // IERROR
|
||||
.word MAIN // IMAIN
|
||||
.word CHRNCH // ICHRNCH
|
||||
.word QPLOP // IQPLOP
|
||||
.word GONE // IGONE
|
||||
.word EVAL // IEVAL
|
||||
!word ERROR ; IERROR
|
||||
!word MAIN ; IMAIN
|
||||
!word CHRNCH ; ICHRNCH
|
||||
!word QPLOP ; IQPLOP
|
||||
!word GONE ; IGONE
|
||||
!word EVAL ; IEVAL
|
||||
|
||||
basic_vector_defaults_2:
|
||||
|
||||
.word basic_adray1 // ADRAY1
|
||||
.word basic_adray2 // ADRAY2
|
||||
!word basic_adray1 ; ADRAY1
|
||||
!word basic_adray2 ; ADRAY2
|
||||
@@ -1,9 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 * #IGNORE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 * #IGNORE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Skip the gap between $C000-$DFFF
|
||||
; Skip the gap between $C000-$DFFF
|
||||
|
||||
.fill $2000, $00
|
||||
!fill $2000, $00
|
||||
@@ -1,9 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
packed_as_1n:
|
||||
|
||||
put_packed_as_1n()
|
||||
+PUT_PACKED_AS_1N
|
||||
@@ -1,9 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
packed_as_3n:
|
||||
|
||||
put_packed_as_3n()
|
||||
+PUT_PACKED_AS_3N
|
||||
@@ -1,13 +1,12 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_COMPRESSION_LVL_2
|
||||
!ifdef CONFIG_COMPRESSION_LVL_2 {
|
||||
|
||||
packed_dictionary:
|
||||
|
||||
put_packed_freq_DICTIONARY()
|
||||
|
||||
#endif
|
||||
+PUT_PACKED_FREQ_dictionary
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_COMPRESSION_LVL_2
|
||||
!ifdef CONFIG_COMPRESSION_LVL_2 {
|
||||
|
||||
packed_dict_errors:
|
||||
|
||||
put_packed_dict_errors()
|
||||
+PUT_PACKED_DICT_errors
|
||||
|
||||
#else
|
||||
} else {
|
||||
|
||||
packed_freq_errors:
|
||||
|
||||
put_packed_freq_errors()
|
||||
+PUT_PACKED_FREQ_errors
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
packed_freq_keywords_V2:
|
||||
|
||||
put_packed_freq_keywords_V2()
|
||||
+PUT_PACKED_FREQ_keywords_V2
|
||||
@@ -1,9 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
packed_freq_keywords_01:
|
||||
|
||||
put_packed_freq_keywords_01()
|
||||
+PUT_PACKED_FREQ_keywords_01
|
||||
@@ -1,12 +1,11 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
#if !HAS_SMALL_BASIC
|
||||
!ifndef HAS_SMALL_BASIC {
|
||||
|
||||
packed_freq_keywords_02:
|
||||
|
||||
put_packed_freq_keywords_02()
|
||||
|
||||
#endif
|
||||
+PUT_PACKED_FREQ_keywords_02
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
#if ROM_LAYOUT_M65
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
|
||||
packed_freq_keywords_03:
|
||||
|
||||
put_packed_freq_keywords_03()
|
||||
+PUT_PACKED_FREQ_keywords_03
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1,19 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
#if CONFIG_COMPRESSION_LVL_2
|
||||
!ifdef CONFIG_COMPRESSION_LVL_2 {
|
||||
|
||||
packed_dict_misc:
|
||||
|
||||
put_packed_dict_misc()
|
||||
+PUT_PACKED_DICT_misc
|
||||
|
||||
#else
|
||||
} else {
|
||||
|
||||
packed_freq_misc:
|
||||
|
||||
put_packed_freq_misc()
|
||||
|
||||
#endif
|
||||
+PUT_PACKED_FREQ_misc
|
||||
}
|
||||
@@ -1,56 +1,52 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Startup banner, to be displayed during cold start
|
||||
//
|
||||
|
||||
.encoding "petscii_upper"
|
||||
;
|
||||
; Startup banner, to be displayed during cold start
|
||||
;
|
||||
|
||||
|
||||
.macro BANNER_TEXT() {
|
||||
!macro BANNER_TEXT {
|
||||
|
||||
#if CONFIG_BRAND_CUSTOM_BUILD
|
||||
.text "OPEN ROMS "
|
||||
.text CONFIG_CUSTOM_BRAND
|
||||
#elif CONFIG_BRAND_GENERIC
|
||||
.text "OPEN ROMS GENERIC BUILD"
|
||||
#elif CONFIG_BRAND_TESTING
|
||||
.text "OPEN ROMS TESTING BUILD"
|
||||
#elif CONFIG_BRAND_ULTIMATE_64
|
||||
.text "OPEN ROMS FOR ULTIMATE 64"
|
||||
#endif
|
||||
!ifdef CONFIG_BRAND_CUSTOM_BUILD {
|
||||
!pet "open roms "
|
||||
+CONFIG_CUSTOM_BRAND
|
||||
} else ifdef CONFIG_BRAND_GENERIC {
|
||||
!pet "open roms generic build"
|
||||
} else ifdef CONFIG_BRAND_TESTING {
|
||||
!pet "open roms testing build"
|
||||
} else ifdef CONFIG_BRAND_ULTIMATE_64 {
|
||||
!pet "open roms for ultimate 64"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
startup_banner:
|
||||
|
||||
#if CONFIG_BANNER_SIMPLE
|
||||
!ifdef CONFIG_BANNER_SIMPLE {
|
||||
|
||||
.text " "
|
||||
BANNER_TEXT()
|
||||
.byte $00
|
||||
!pet " "
|
||||
+BANNER_TEXT
|
||||
!byte $00
|
||||
|
||||
#elif CONFIG_BANNER_FANCY
|
||||
} else ifdef CONFIG_BANNER_FANCY {
|
||||
|
||||
BANNER_TEXT()
|
||||
.byte $00
|
||||
+BANNER_TEXT
|
||||
!byte $00
|
||||
|
||||
rainbow_logo:
|
||||
|
||||
{
|
||||
.var SET_COLOR_0 = $05
|
||||
.var SET_COLOR_1 = $1C
|
||||
.var SET_COLOR_2 = $9E
|
||||
.var SET_COLOR_3 = $1E
|
||||
.var SET_COLOR_4 = $9F
|
||||
!set SET_COLOR_0 = $05
|
||||
!set SET_COLOR_1 = $1C
|
||||
!set SET_COLOR_2 = $9E
|
||||
!set SET_COLOR_3 = $1E
|
||||
!set SET_COLOR_4 = $9F
|
||||
|
||||
!byte SET_COLOR_1, $12, $A4, $A4, $A4, $A4, $A4, $A4, $A4, $0D
|
||||
!byte SET_COLOR_2, $12, $A4, $A4, $A4, $A4, $A4, $A4, $0D
|
||||
!byte SET_COLOR_3, $12, $A4, $A4, $A4, $A4, $A4, $0D
|
||||
!byte SET_COLOR_4, $12, $A4, $A4, $A4, $A4, $92
|
||||
!byte SET_COLOR_0, $00
|
||||
|
||||
.byte SET_COLOR_1, $12, $A4, $A4, $A4, $A4, $A4, $A4, $A4, $0D
|
||||
.byte SET_COLOR_2, $12, $A4, $A4, $A4, $A4, $A4, $A4, $0D
|
||||
.byte SET_COLOR_3, $12, $A4, $A4, $A4, $A4, $A4, $0D
|
||||
.byte SET_COLOR_4, $12, $A4, $A4, $A4, $A4, $92
|
||||
.byte SET_COLOR_0, $00
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,71 +1,66 @@
|
||||
// #LAYOUT# M65 BASIC_1 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Startup banner, to be displayed during cold start
|
||||
//
|
||||
|
||||
.encoding "petscii_upper"
|
||||
;
|
||||
; Startup banner, to be displayed during cold start
|
||||
;
|
||||
|
||||
|
||||
startup_banner:
|
||||
|
||||
// Fancy MEGA65 banner - from Retrofan, slightly tweaked
|
||||
; Fancy MEGA65 banner - from Retrofan, slightly tweaked
|
||||
|
||||
|
||||
// remove unneeded $1F's (blue) and $9A's (light blue)
|
||||
!byte $9A, $12, $20, $20, $7F, $A9, $20, $20, $92, $20, $12, $20, $20, $20, $20, $92
|
||||
!byte $20, $12, $A9, $20, $20, $20, $92, $A1, $20, $12, $A9, $20, $20, $20, $7F, $92
|
||||
!byte $20, $20, $12, $A3, $A3, $A3, $A3, $A3, $A3, $A3
|
||||
!byte $0D
|
||||
!byte $9A, $12, $20, $20, $20, $20, $20
|
||||
!byte $20, $92, $20, $12, $20, $20, $92, $A2, $BB, $92, $20, $12, $20, $20, $92, $AC
|
||||
!byte $A2, $A2, $20, $9A, $12, $20, $20, $92, $20, $12, $20, $20, $92, $20, $20, $12
|
||||
!byte $1E, $A3, $A3, $A3, $A3, $A3, $A3
|
||||
!byte $0D
|
||||
!byte $9A, $12, $20, $20, $92, $7F, $A9, $12, $20, $20, $92, $20, $12, $20, $20, $A2
|
||||
!byte $92, $BE, $92, $20, $12, $20, $20, $92, $BC, $12, $20, $20, $92, $20, $12, $20
|
||||
!byte $20, $20, $20, $20, $92, $20, $20, $12, $9E, $A3, $A3, $A3, $A3, $A3
|
||||
!byte $0D
|
||||
!byte $9A, $12, $20, $20, $92, $20, $20, $12, $20, $20, $92, $20, $12, $20, $20, $20
|
||||
!byte $20, $92, $20, $12, $20, $20, $20, $20, $20, $92, $20, $12, $20, $20, $92, $20
|
||||
!byte $12, $20, $20, $92, $20, $20, $12, $96, $A3, $A3, $A3, $A3, $1F, $92
|
||||
!byte $0D, $0D, $05, $00
|
||||
|
||||
; Fancy MEGA65 banner - from Retrofan
|
||||
;
|
||||
; !byte $9a, $12, $20, $20, $7f, $a9, $20, $20, $1f, $20, $9a, $20, $20, $20
|
||||
; !byte $20, $1f, $20, $9a, $a9, $20, $20, $20, $92, $a1, $1f, $12, $20, $9a, $a9, $20
|
||||
; !byte $20, $20, $7f, $1f, $20, $20, $9a, $a3, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20
|
||||
; !byte $20, $20, $20, $05, $92, $4d, $45, $47, $41, $9a, $12, $20, $20, $20, $20, $20
|
||||
; !byte $20, $1f, $20, $9a, $20, $20, $92, $a2, $bb, $1f, $12, $20, $9a, $20, $20, $92
|
||||
; !byte $ac, $a2, $a2, $1f, $12, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20
|
||||
; !byte $20, $1e, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $42
|
||||
; !byte $41, $53, $49, $43, $9a, $12, $20, $20, $92, $7f, $a9, $12, $20, $20, $1f, $20
|
||||
; !byte $9a, $20, $20, $a2, $92, $be, $1f, $12, $20, $9a, $20, $20, $92, $bc, $12, $20
|
||||
; !byte $20, $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $20, $9e, $a3, $a3, $a3
|
||||
; !byte $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $2d, $2d, $2d, $2d, $2d, $2d, $9a
|
||||
; !byte $12, $20, $20, $1f, $20, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $20, $20
|
||||
; !byte $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20, $9a
|
||||
; !byte $20, $20, $1f, $20, $20, $96, $a3, $a3, $a3, $a3, $1f
|
||||
; !byte $92, $0D, $0D, $05, $00
|
||||
|
||||
.byte $9A, $12, $20, $20, $7F, $A9, $20, $20, $92, $20, $12, $20, $20, $20, $20, $92
|
||||
.byte $20, $12, $A9, $20, $20, $20, $92, $A1, $20, $12, $A9, $20, $20, $20, $7F, $92
|
||||
.byte $20, $20, $12, $A3, $A3, $A3, $A3, $A3, $A3, $A3
|
||||
.byte $0D
|
||||
.byte $9A, $12, $20, $20, $20, $20, $20
|
||||
.byte $20, $92, $20, $12, $20, $20, $92, $A2, $BB, $92, $20, $12, $20, $20, $92, $AC
|
||||
.byte $A2, $A2, $20, $9A, $12, $20, $20, $92, $20, $12, $20, $20, $92, $20, $20, $12
|
||||
.byte $1E, $A3, $A3, $A3, $A3, $A3, $A3
|
||||
.byte $0D
|
||||
.byte $9A, $12, $20, $20, $92, $7F, $A9, $12, $20, $20, $92, $20, $12, $20, $20, $A2
|
||||
.byte $92, $BE, $92, $20, $12, $20, $20, $92, $BC, $12, $20, $20, $92, $20, $12, $20
|
||||
.byte $20, $20, $20, $20, $92, $20, $20, $12, $9E, $A3, $A3, $A3, $A3, $A3
|
||||
.byte $0D
|
||||
.byte $9A, $12, $20, $20, $92, $20, $20, $12, $20, $20, $92, $20, $12, $20, $20, $20
|
||||
.byte $20, $92, $20, $12, $20, $20, $20, $20, $20, $92, $20, $12, $20, $20, $92, $20
|
||||
.byte $12, $20, $20, $92, $20, $20, $12, $96, $A3, $A3, $A3, $A3, $1F, $92
|
||||
.byte $0D, $0D, $05, $00
|
||||
|
||||
// Fancy MEGA65 banner - from Retrofan
|
||||
//
|
||||
// .byte $9a, $12, $20, $20, $7f, $a9, $20, $20, $1f, $20, $9a, $20, $20, $20
|
||||
// .byte $20, $1f, $20, $9a, $a9, $20, $20, $20, $92, $a1, $1f, $12, $20, $9a, $a9, $20
|
||||
// .byte $20, $20, $7f, $1f, $20, $20, $9a, $a3, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20
|
||||
// .byte $20, $20, $20, $05, $92, $4d, $45, $47, $41, $9a, $12, $20, $20, $20, $20, $20
|
||||
// .byte $20, $1f, $20, $9a, $20, $20, $92, $a2, $bb, $1f, $12, $20, $9a, $20, $20, $92
|
||||
// .byte $ac, $a2, $a2, $1f, $12, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20
|
||||
// .byte $20, $1e, $a3, $a3, $a3, $a3, $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $42
|
||||
// .byte $41, $53, $49, $43, $9a, $12, $20, $20, $92, $7f, $a9, $12, $20, $20, $1f, $20
|
||||
// .byte $9a, $20, $20, $a2, $92, $be, $1f, $12, $20, $9a, $20, $20, $92, $bc, $12, $20
|
||||
// .byte $20, $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $20, $9e, $a3, $a3, $a3
|
||||
// .byte $a3, $a3, $1f, $20, $20, $20, $20, $05, $92, $2d, $2d, $2d, $2d, $2d, $2d, $9a
|
||||
// .byte $12, $20, $20, $1f, $20, $20, $9a, $20, $20, $1f, $20, $9a, $20, $20, $20, $20
|
||||
// .byte $1f, $20, $9a, $20, $20, $20, $20, $20, $1f, $20, $9a, $20, $20, $1f, $20, $9a
|
||||
// .byte $20, $20, $1f, $20, $20, $96, $a3, $a3, $a3, $a3, $1f
|
||||
// .byte $92, $0D, $0D, $05, $00
|
||||
|
||||
// Original MEGA65 banner - supplied by Deft
|
||||
//
|
||||
// .byte $9A,$12,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$20,$05,$12,$A0,$A0
|
||||
// .byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9B,$92,$20,$05,$12,$A0,$A0
|
||||
// .byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9A,$92,$20,$05,$20,$20,$20
|
||||
// .byte $4D,$20,$45,$20,$47,$20,$41,$0D,$99,$12,$A3,$A3,$A3,$A3,$A3,$A3
|
||||
// .byte $A3,$DF,$92,$7F,$12,$CD,$CD,$DF,$92,$7F,$12,$DF,$05,$92,$20,$20
|
||||
// .byte $99,$7F,$12,$DF,$05,$92,$20,$20,$99,$7F,$12,$DF,$92,$7F,$12,$DF
|
||||
// .byte $05,$92,$20,$20,$99,$42,$20,$41,$20,$53,$20,$49,$20,$43,$0D,$9E
|
||||
// .byte $12,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$7F,$12,$DF,$92
|
||||
// .byte $7F,$12,$DF,$92,$7F,$12,$CD,$05,$92,$20,$20,$9B,$7F,$12,$CD,$92
|
||||
// .byte $7F,$12,$DF,$92,$7F,$12,$CD,$92,$7F,$12,$DF,$9A,$92,$20,$05,$20
|
||||
// .byte $9A,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$0D,$96,$12,$A3,$A3,$A3,$A3,$A3
|
||||
// .byte $A3,$A3,$A3,$A3,$DF,$9A,$92,$7F,$12,$DF,$92,$7F,$9B,$20,$9A,$7F
|
||||
// .byte $12,$A0,$A0,$9B,$92,$20,$9A,$7F,$12,$A0,$A0,$9B,$92,$20,$9A,$7F
|
||||
// .byte $12,$DF,$92,$7F,$9B,$20,$9A,$20,$9B,"0.2.0.0",$0D
|
||||
// .byte $0D,$05,$92,$00
|
||||
; Original MEGA65 banner - supplied by Deft
|
||||
;
|
||||
; !byte $9A,$12,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$20,$05,$12,$A0,$A0
|
||||
; !byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9B,$92,$20,$05,$12,$A0,$A0
|
||||
; !byte $DF,$9B,$92,$20,$05,$12,$A0,$A0,$DF,$9A,$92,$20,$05,$20,$20,$20
|
||||
; !byte $4D,$20,$45,$20,$47,$20,$41,$0D,$99,$12,$A3,$A3,$A3,$A3,$A3,$A3
|
||||
; !byte $A3,$DF,$92,$7F,$12,$CD,$CD,$DF,$92,$7F,$12,$DF,$05,$92,$20,$20
|
||||
; !byte $99,$7F,$12,$DF,$05,$92,$20,$20,$99,$7F,$12,$DF,$92,$7F,$12,$DF
|
||||
; !byte $05,$92,$20,$20,$99,$42,$20,$41,$20,$53,$20,$49,$20,$43,$0D,$9E
|
||||
; !byte $12,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$A3,$DF,$9B,$92,$7F,$12,$DF,$92
|
||||
; !byte $7F,$12,$DF,$92,$7F,$12,$CD,$05,$92,$20,$20,$9B,$7F,$12,$CD,$92
|
||||
; !byte $7F,$12,$DF,$92,$7F,$12,$CD,$92,$7F,$12,$DF,$9A,$92,$20,$05,$20
|
||||
; !byte $9A,$2D,$2D,$2D,$2D,$2D,$2D,$2D,$0D,$96,$12,$A3,$A3,$A3,$A3,$A3
|
||||
; !byte $A3,$A3,$A3,$A3,$DF,$9A,$92,$7F,$12,$DF,$92,$7F,$9B,$20,$9A,$7F
|
||||
; !byte $12,$A0,$A0,$9B,$92,$20,$9A,$7F,$12,$A0,$A0,$9B,$92,$20,$9A,$7F
|
||||
; !byte $12,$DF,$92,$7F,$9B,$20,$9A,$20,$9B,"0.2.0.0",$0D
|
||||
; !byte $0D,$05,$92,$00
|
||||
@@ -1,9 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
// String - question mark in reverse
|
||||
; String - question mark in reverse
|
||||
|
||||
str_rev_question:
|
||||
|
||||
.byte $12, $3F, $92, $00
|
||||
!byte $12, $3F, $92, $00
|
||||
@@ -1,29 +1,29 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Table to TI$ special variable support
|
||||
//
|
||||
;
|
||||
; Table to TI$ special variable support
|
||||
;
|
||||
|
||||
table_TI_hi:
|
||||
|
||||
#if !CONFIG_RS232_UP9600
|
||||
!ifndef CONFIG_RS232_UP9600 {
|
||||
|
||||
.byte $20 // 10 hours = 2169000 ticks
|
||||
.byte $03 // 1 hour = 216000 ticks
|
||||
.byte $00 // 10 minutes = 36000 ticks
|
||||
.byte $00 // 1 minute = 3600 ticks
|
||||
.byte $00 // 10 seconds = 600 ticks
|
||||
.byte $00 // 1 second = 60 ticks
|
||||
!byte $20 ; 10 hours = 2169000 ticks
|
||||
!byte $03 ; 1 hour = 216000 ticks
|
||||
!byte $00 ; 10 minutes = 36000 ticks
|
||||
!byte $00 ; 1 minute = 3600 ticks
|
||||
!byte $00 ; 10 seconds = 600 ticks
|
||||
!byte $00 ; 1 second = 60 ticks
|
||||
|
||||
#else
|
||||
} else {
|
||||
|
||||
.byte $23 // 10 hours = 2304000 ticks
|
||||
.byte $03 // 1 hour = 230400 ticks
|
||||
.byte $00 // 10 minutes = 38400 ticks
|
||||
.byte $00 // 1 minute = 3840 ticks
|
||||
.byte $00 // 10 seconds = 640 ticks
|
||||
.byte $00 // 1 second = 64 ticks
|
||||
!byte $23 ; 10 hours = 2304000 ticks
|
||||
!byte $03 ; 1 hour = 230400 ticks
|
||||
!byte $00 ; 10 minutes = 38400 ticks
|
||||
!byte $00 ; 1 minute = 3840 ticks
|
||||
!byte $00 ; 10 seconds = 640 ticks
|
||||
!byte $00 ; 1 second = 64 ticks
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1,29 +1,29 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Table to TI$ special variable support
|
||||
//
|
||||
;
|
||||
; Table to TI$ special variable support
|
||||
;
|
||||
|
||||
table_TI_lo:
|
||||
|
||||
#if !CONFIG_RS232_UP9600
|
||||
!ifndef CONFIG_RS232_UP9600 {
|
||||
|
||||
.byte $80 // 10 hours = 2169000 ticks
|
||||
.byte $C0 // 1 hour = 216000 ticks
|
||||
.byte $A0 // 10 minutes = 36000 ticks
|
||||
.byte $10 // 1 minute = 3600 ticks
|
||||
.byte $58 // 10 seconds = 600 ticks
|
||||
.byte $3C // 1 second = 60 ticks
|
||||
!byte $80 ; 10 hours = 2169000 ticks
|
||||
!byte $C0 ; 1 hour = 216000 ticks
|
||||
!byte $A0 ; 10 minutes = 36000 ticks
|
||||
!byte $10 ; 1 minute = 3600 ticks
|
||||
!byte $58 ; 10 seconds = 600 ticks
|
||||
!byte $3C ; 1 second = 60 ticks
|
||||
|
||||
#else
|
||||
} else {
|
||||
|
||||
.byte $00 // 10 hours = 2304000 ticks
|
||||
.byte $00 // 1 hour = 230400 ticks
|
||||
.byte $00 // 10 minutes = 38400 ticks
|
||||
.byte $00 // 1 minute = 3840 ticks
|
||||
.byte $80 // 10 seconds = 640 ticks
|
||||
.byte $40 // 1 second = 64 ticks
|
||||
!byte $00 ; 10 hours = 2304000 ticks
|
||||
!byte $00 ; 1 hour = 230400 ticks
|
||||
!byte $00 ; 10 minutes = 38400 ticks
|
||||
!byte $00 ; 1 minute = 3840 ticks
|
||||
!byte $80 ; 10 seconds = 640 ticks
|
||||
!byte $40 ; 1 second = 64 ticks
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1,29 +1,29 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Table to TI$ special variable support
|
||||
//
|
||||
;
|
||||
; Table to TI$ special variable support
|
||||
;
|
||||
|
||||
table_TI_mid:
|
||||
|
||||
#if !CONFIG_RS232_UP9600
|
||||
!ifndef CONFIG_RS232_UP9600 {
|
||||
|
||||
.byte $F5 // 10 hours = 2169000 ticks
|
||||
.byte $4B // 1 hour = 216000 ticks
|
||||
.byte $8C // 10 minutes = 36000 ticks
|
||||
.byte $0E // 1 minute = 3600 ticks
|
||||
.byte $02 // 10 seconds = 600 ticks
|
||||
.byte $00 // 1 second = 60 ticks
|
||||
!byte $F5 ; 10 hours = 2169000 ticks
|
||||
!byte $4B ; 1 hour = 216000 ticks
|
||||
!byte $8C ; 10 minutes = 36000 ticks
|
||||
!byte $0E ; 1 minute = 3600 ticks
|
||||
!byte $02 ; 10 seconds = 600 ticks
|
||||
!byte $00 ; 1 second = 60 ticks
|
||||
|
||||
#else
|
||||
} else {
|
||||
|
||||
.byte $28 // 10 hours = 2304000 ticks
|
||||
.byte $84 // 1 hour = 230400 ticks
|
||||
.byte $96 // 10 minutes = 38400 ticks
|
||||
.byte $0F // 1 minute = 3840 ticks
|
||||
.byte $02 // 10 seconds = 640 ticks
|
||||
.byte $00 // 1 second = 64 ticks
|
||||
!byte $28 ; 10 hours = 2304000 ticks
|
||||
!byte $84 ; 1 hour = 230400 ticks
|
||||
!byte $96 ; 10 minutes = 38400 ticks
|
||||
!byte $0F ; 1 minute = 3840 ticks
|
||||
!byte $02 ; 10 seconds = 640 ticks
|
||||
!byte $00 ; 1 second = 64 ticks
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1,96 +1,86 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Jumptable for BASIC V2 dialect commands
|
||||
//
|
||||
;
|
||||
; Jumptable for BASIC V2 dialect commands
|
||||
;
|
||||
|
||||
!set ITEM_80 = cmd_end
|
||||
!set ITEM_81 = cmd_for
|
||||
!set ITEM_82 = cmd_next
|
||||
!set ITEM_83 = cmd_data
|
||||
!set ITEM_84 = cmd_inputhash
|
||||
!set ITEM_85 = cmd_input
|
||||
!set ITEM_86 = array_create ; cmd_dim
|
||||
!set ITEM_87 = cmd_read
|
||||
!set ITEM_88 = assign_variable ; cmd_let
|
||||
!set ITEM_89 = cmd_goto
|
||||
!set ITEM_8A = cmd_run
|
||||
!set ITEM_8B = cmd_if
|
||||
!set ITEM_8C = do_restore ; cmd_restore
|
||||
!set ITEM_8D = cmd_gosub
|
||||
!set ITEM_8E = cmd_return
|
||||
!set ITEM_8F = cmd_rem
|
||||
|
||||
.const command_list = List().add(
|
||||
!set ITEM_90 = cmd_stop
|
||||
!set ITEM_91 = cmd_on
|
||||
!set ITEM_92 = cmd_wait
|
||||
!set ITEM_93 = cmd_load
|
||||
!set ITEM_94 = cmd_save
|
||||
!set ITEM_95 = cmd_verify
|
||||
!set ITEM_96 = cmd_def
|
||||
!set ITEM_97 = cmd_poke
|
||||
!set ITEM_98 = cmd_printhash
|
||||
!set ITEM_99 = cmd_print
|
||||
!set ITEM_9A = cmd_cont
|
||||
!set ITEM_9B = cmd_list
|
||||
!set ITEM_9C = do_clr ; cmd_clr
|
||||
!set ITEM_9D = cmd_cmd
|
||||
!set ITEM_9E = cmd_sys
|
||||
!set ITEM_9F = cmd_open
|
||||
|
||||
// $80 - $8F
|
||||
|
||||
cmd_end,
|
||||
cmd_for,
|
||||
cmd_next,
|
||||
cmd_data,
|
||||
cmd_inputhash,
|
||||
cmd_input,
|
||||
array_create, // cmd_dim
|
||||
cmd_read,
|
||||
assign_variable, // cmd_let
|
||||
cmd_goto,
|
||||
cmd_run,
|
||||
cmd_if,
|
||||
do_restore, // cmd_restore
|
||||
cmd_gosub,
|
||||
cmd_return,
|
||||
cmd_rem,
|
||||
|
||||
// $90-$9F
|
||||
|
||||
cmd_stop,
|
||||
cmd_on,
|
||||
cmd_wait,
|
||||
cmd_load,
|
||||
cmd_save,
|
||||
cmd_verify,
|
||||
cmd_def,
|
||||
cmd_poke,
|
||||
cmd_printhash,
|
||||
cmd_print,
|
||||
cmd_cont,
|
||||
cmd_list,
|
||||
do_clr, // cmd_clr
|
||||
cmd_cmd,
|
||||
cmd_sys,
|
||||
cmd_open,
|
||||
|
||||
// $A0-$A6
|
||||
|
||||
cmd_close,
|
||||
cmd_get,
|
||||
cmd_new,
|
||||
cmd_tab, // XXX this token probably does not belong here
|
||||
do_SYNTAX_error, // 'TO' is not a standalone command
|
||||
do_SYNTAX_error, // 'FN' is not a standalone command
|
||||
cmd_spc // XXX this token probably does not belong here
|
||||
!set ITEM_A0 = cmd_close
|
||||
!set ITEM_A1 = cmd_get
|
||||
!set ITEM_A2 = cmd_new
|
||||
!set ITEM_A3 = cmd_tab ; XXX this token probably does not belong here
|
||||
!set ITEM_A4 = do_SYNTAX_error ; 'TO' is not a standalone command
|
||||
!set ITEM_A5 = do_SYNTAX_error ; 'FN' is not a standalone command
|
||||
!set ITEM_A6 = cmd_spc ; XXX this token probably does not belong here
|
||||
|
||||
// 'THEN' ($A7) and 'STEP' ($A9) are not standalone commands
|
||||
// 'NOT' ($A8) is an operator, not a command
|
||||
; 'THEN' ($A7) and 'STEP' ($A9) are not standalone commands
|
||||
; 'NOT' ($A8) is an operator, not a command
|
||||
|
||||
// 'GO' ($CB) is handled separately
|
||||
)
|
||||
; 'GO' ($CB) is handled separately
|
||||
|
||||
|
||||
#if !HAS_OPCODES_65C02
|
||||
|
||||
!ifndef HAS_OPCODES_65C02 {
|
||||
|
||||
command_jumptable_lo:
|
||||
|
||||
put_jumptable_lo(command_list)
|
||||
|
||||
!byte <(ITEM_80-1), <(ITEM_81-1), <(ITEM_82-1), <(ITEM_83-1), <(ITEM_84-1), <(ITEM_85-1), <(ITEM_86-1), <(ITEM_87-1)
|
||||
!byte <(ITEM_88-1), <(ITEM_89-1), <(ITEM_8A-1), <(ITEM_8B-1), <(ITEM_8C-1), <(ITEM_8D-1), <(ITEM_8E-1), <(ITEM_8F-1)
|
||||
!byte <(ITEM_90-1), <(ITEM_91-1), <(ITEM_92-1), <(ITEM_93-1), <(ITEM_94-1), <(ITEM_95-1), <(ITEM_96-1), <(ITEM_97-1)
|
||||
!byte <(ITEM_98-1), <(ITEM_99-1), <(ITEM_9A-1), <(ITEM_9B-1), <(ITEM_9C-1), <(ITEM_9D-1), <(ITEM_9E-1), <(ITEM_9F-1)
|
||||
!byte <(ITEM_A0-1), <(ITEM_A1-1), <(ITEM_A2-1), <(ITEM_A3-1), <(ITEM_A4-1), <(ITEM_A5-1), <(ITEM_A6-1)
|
||||
|
||||
command_jumptable_hi:
|
||||
|
||||
put_jumptable_hi(command_list)
|
||||
!byte >(ITEM_80-1), >(ITEM_81-1), >(ITEM_82-1), >(ITEM_83-1), >(ITEM_84-1), >(ITEM_85-1), >(ITEM_86-1), >(ITEM_87-1)
|
||||
!byte >(ITEM_88-1), >(ITEM_89-1), >(ITEM_8A-1), >(ITEM_8B-1), >(ITEM_8C-1), >(ITEM_8D-1), >(ITEM_8E-1), >(ITEM_8F-1)
|
||||
!byte >(ITEM_90-1), >(ITEM_91-1), >(ITEM_92-1), >(ITEM_93-1), >(ITEM_94-1), >(ITEM_95-1), >(ITEM_96-1), >(ITEM_97-1)
|
||||
!byte >(ITEM_98-1), >(ITEM_99-1), >(ITEM_9A-1), >(ITEM_9B-1), >(ITEM_9C-1), >(ITEM_9D-1), >(ITEM_9E-1), >(ITEM_9F-1)
|
||||
!byte >(ITEM_A0-1), >(ITEM_A1-1), >(ITEM_A2-1), >(ITEM_A3-1), >(ITEM_A4-1), >(ITEM_A5-1), >(ITEM_A6-1)
|
||||
|
||||
|
||||
#else // HAS_OPCODES_65C02
|
||||
|
||||
|
||||
__before_command_jumptable:
|
||||
|
||||
.if (mod(*, $2) == 1) { brk } // align code so that vector never crosses page boundary
|
||||
} else { ; HAS_OPCODES_65C02
|
||||
|
||||
command_jumptable:
|
||||
|
||||
put_jumptable(command_list)
|
||||
; Note: 65C02 has the page boundary vector bug fixed!
|
||||
|
||||
// Make sure routine size is always the same - build system limitation
|
||||
|
||||
.if (__before_command_jumptable == command_jumptable) { brk }
|
||||
|
||||
|
||||
#endif
|
||||
!word ITEM_80, ITEM_81, ITEM_82, ITEM_83, ITEM_84, ITEM_85, ITEM_86, ITEM_87
|
||||
!word ITEM_88, ITEM_89, ITEM_8A, ITEM_8B, ITEM_8C, ITEM_8D, ITEM_8E, ITEM_8F
|
||||
!word ITEM_90, ITEM_91, ITEM_92, ITEM_93, ITEM_94, ITEM_95, ITEM_96, ITEM_97
|
||||
!word ITEM_98, ITEM_99, ITEM_9A, ITEM_9B, ITEM_9C, ITEM_9D, ITEM_9E, ITEM_9F
|
||||
!word ITEM_A0, ITEM_A1, ITEM_A2, ITEM_A3, ITEM_A4, ITEM_A5, ITEM_A6
|
||||
}
|
||||
@@ -1,55 +1,55 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Default handler for all not-yet-implemented commands
|
||||
//
|
||||
// Note: NOPs are here just to make debugging easier (no duplicated labels)!
|
||||
//
|
||||
;
|
||||
; Default handler for all not-yet-implemented commands
|
||||
;
|
||||
; Note: NOPs are here just to make debugging easier (no duplicated labels)!
|
||||
;
|
||||
|
||||
|
||||
cmd_for:
|
||||
nop
|
||||
+nop
|
||||
cmd_next:
|
||||
nop
|
||||
+nop
|
||||
cmd_data:
|
||||
nop
|
||||
+nop
|
||||
cmd_inputhash:
|
||||
nop
|
||||
+nop
|
||||
cmd_input:
|
||||
nop
|
||||
+nop
|
||||
cmd_read:
|
||||
nop
|
||||
+nop
|
||||
cmd_gosub:
|
||||
nop
|
||||
+nop
|
||||
cmd_return:
|
||||
nop
|
||||
+nop
|
||||
cmd_on:
|
||||
nop
|
||||
+nop
|
||||
cmd_wait:
|
||||
nop
|
||||
+nop
|
||||
cmd_def:
|
||||
nop
|
||||
+nop
|
||||
cmd_poke:
|
||||
nop
|
||||
+nop
|
||||
cmd_printhash:
|
||||
nop
|
||||
+nop
|
||||
cmd_cont:
|
||||
nop
|
||||
+nop
|
||||
cmd_cmd:
|
||||
nop
|
||||
+nop
|
||||
cmd_open:
|
||||
nop
|
||||
+nop
|
||||
cmd_close:
|
||||
nop
|
||||
+nop
|
||||
cmd_get:
|
||||
nop
|
||||
+nop
|
||||
cmd_tab:
|
||||
nop
|
||||
+nop
|
||||
cmd_spc:
|
||||
nop
|
||||
+nop
|
||||
|
||||
// Unimplemented tokens
|
||||
; Unimplemented tokens
|
||||
|
||||
jmp do_NOT_IMPLEMENTED_error
|
||||
@@ -1,8 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// PLACEHOLDER for completeness - jumptable contains direct address
|
||||
; PLACEHOLDER for completeness - jumptable contains direct address
|
||||
|
||||
// CLR command does not stop execution (confirmed on a C64)
|
||||
; CLR command does not stop execution (confirmed on a C64)
|
||||
@@ -1,6 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// PLACEHOLDER for completeness - jumptable contains direct address
|
||||
; PLACEHOLDER for completeness - jumptable contains direct address
|
||||
@@ -1,60 +1,60 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_go:
|
||||
|
||||
jsr fetch_character_skip_spaces
|
||||
cmp #$A4 // 'TO' keyword
|
||||
cmp #$A4 ; 'TO' keyword
|
||||
beq cmd_goto
|
||||
|
||||
#if !ROM_LAYOUT_M65
|
||||
!ifndef CONFIG_MB_M65 {
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_go_syntax_error:
|
||||
|
||||
jmp do_SYNTAX_error
|
||||
|
||||
#else
|
||||
} else {
|
||||
|
||||
cmp #$9E // 'SYS' keyword, for 'GO SYS'
|
||||
beq_16 cmd_gosys
|
||||
cmp #$9E ; 'SYS' keyword, for 'GO SYS'
|
||||
+beq cmd_gosys
|
||||
|
||||
dew TXTPTR // unconsume character
|
||||
dew TXTPTR ; unconsume character
|
||||
|
||||
// Fetch desired mode
|
||||
; Fetch desired mode
|
||||
|
||||
jsr fetch_uint8
|
||||
|
||||
cmp #64
|
||||
bne !+
|
||||
bne @1
|
||||
|
||||
// If in native mode - switch to C64 compatibilty
|
||||
; If in native mode - switch to C64 compatibilty
|
||||
|
||||
jsr M65_MODEGET
|
||||
bcs cmd_go_rts
|
||||
|
||||
jsr helper_ask_if_sure
|
||||
bcs_16 cmd_end
|
||||
+bcs cmd_end
|
||||
sec
|
||||
jsr M65_MODESET // Carry set = switch to C64 mode
|
||||
jmp_8 cmd_go_switchmode_clr_banner
|
||||
!:
|
||||
jsr M65_MODESET ; Carry set = switch to C64 mode
|
||||
+bra cmd_go_switchmode_clr_banner
|
||||
@1:
|
||||
cmp #65
|
||||
bne_16 do_ILLEGAL_QUANTITY_error
|
||||
+bne do_ILLEGAL_QUANTITY_error
|
||||
|
||||
// If in C64 compatibility mode - switch to native mode
|
||||
; If in C64 compatibility mode - switch to native mode
|
||||
|
||||
jsr M65_MODEGET
|
||||
bcc cmd_go_rts
|
||||
|
||||
jsr helper_ask_if_sure
|
||||
bcs_16 cmd_end
|
||||
jsr M65_MODESET // Carry clear = switch to M65 mode
|
||||
+bcs cmd_end
|
||||
jsr M65_MODESET ; Carry clear = switch to M65 mode
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_go_switchmode_clr_banner:
|
||||
|
||||
@@ -62,7 +62,7 @@ cmd_go_switchmode_clr_banner:
|
||||
|
||||
ldx CURLIN+1
|
||||
inx
|
||||
beq_16 INITMSG
|
||||
+beq INITMSG
|
||||
|
||||
lda #147
|
||||
jmp JCHROUT
|
||||
@@ -70,90 +70,87 @@ cmd_go_switchmode_clr_banner:
|
||||
cmd_go_rts:
|
||||
|
||||
rts
|
||||
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
cmd_run:
|
||||
|
||||
// RUN clears all variables
|
||||
; RUN clears all variables
|
||||
|
||||
jsr do_clr
|
||||
|
||||
// Initialize OLDTXT pointer, disable Kernal messages
|
||||
; Initialize OLDTXT pointer, disable Kernal messages
|
||||
|
||||
jsr init_oldtxt
|
||||
lda #$00
|
||||
jsr JSETMSG
|
||||
|
||||
// Check if we have any paramenters
|
||||
; Check if we have any paramenters
|
||||
|
||||
jsr is_end_of_statement
|
||||
bcs cmd_run_goto_launch
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_goto:
|
||||
|
||||
// GOTO requires line number
|
||||
// XXX in case of no parameter, go to line 0 - checked with original ROMs
|
||||
|
||||
; GOTO requires line number
|
||||
; XXX in case of no parameter, go to line 0 - checked with original ROMs
|
||||
|
||||
jsr fetch_line_number
|
||||
#if !ROM_LAYOUT_M65
|
||||
!ifndef CONFIG_MB_M65 {
|
||||
bcs cmd_go_syntax_error
|
||||
#else
|
||||
bcs_16 do_SYNTAX_error
|
||||
#endif
|
||||
} else {
|
||||
+bcs do_SYNTAX_error
|
||||
}
|
||||
|
||||
// Check for direct mode
|
||||
; Check for direct mode
|
||||
|
||||
lda CURLIN+1
|
||||
bmi cmd_goto_direct
|
||||
|
||||
// Not a direct mode - compare desired line number (LINNUM) with the current one (CURLIN)
|
||||
; Not a direct mode - compare desired line number (LINNUM) with the current one (CURLIN)
|
||||
|
||||
lda LINNUM+1
|
||||
cmp CURLIN+1
|
||||
bne !+
|
||||
bne @2
|
||||
lda LINNUM+0
|
||||
cmp CURLIN+0
|
||||
!:
|
||||
// If desired line number is lower - search line number from start
|
||||
@2:
|
||||
; If desired line number is lower - search line number from start
|
||||
|
||||
bcc cmd_goto_from_start
|
||||
|
||||
// Else - search from the current line
|
||||
; Else - search from the current line
|
||||
|
||||
jsr find_line_from_current
|
||||
jmp_8 cmd_goto_check
|
||||
+bra cmd_goto_check
|
||||
|
||||
cmd_goto_direct:
|
||||
|
||||
// Disable Kernal messages
|
||||
; Disable Kernal messages
|
||||
|
||||
lda #$00
|
||||
jsr JSETMSG
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_goto_from_start:
|
||||
|
||||
// Direct mode - find the line from the beginning
|
||||
; Direct mode - find the line from the beginning
|
||||
|
||||
jsr find_line_from_start
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_goto_check:
|
||||
|
||||
bcs_16 do_UNDEFD_STATEMENT_error
|
||||
+bcs do_UNDEFD_STATEMENT_error
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_run_goto_launch:
|
||||
|
||||
// Run it!
|
||||
; Run it!
|
||||
|
||||
pha
|
||||
pha
|
||||
|
||||
@@ -1,38 +1,37 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
cmd_if:
|
||||
|
||||
#if ROM_LAYOUT_M65
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
|
||||
jsr helper_if_mega65
|
||||
bcc cmd_if_true
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Calculate expression
|
||||
; Calculate expression
|
||||
|
||||
jsr FRMEVL
|
||||
|
||||
// Check the result - either string size or floating point 0 vs non-0
|
||||
; Check the result - either string size or floating point 0 vs non-0
|
||||
|
||||
lda FAC1_exponent
|
||||
beq_16 cmd_rem
|
||||
+beq cmd_rem
|
||||
|
||||
// FALLTROUGH
|
||||
; FALLTROUGH
|
||||
|
||||
cmd_if_true:
|
||||
|
||||
// Condition fulfilled - look for GOTO or THEN
|
||||
; Condition fulfilled - look for GOTO or THEN
|
||||
|
||||
jsr fetch_character_skip_spaces
|
||||
cmp #$89 // 'GOTO'
|
||||
beq_16 cmd_goto
|
||||
cmp #$89 ; 'GOTO'
|
||||
+beq cmd_goto
|
||||
|
||||
cmp #$A7 // 'THEN'
|
||||
bne_16 do_SYNTAX_error
|
||||
cmp #$A7 ; 'THEN'
|
||||
+bne do_SYNTAX_error
|
||||
|
||||
pla
|
||||
pla
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// PLACEHOLDER for completeness - jumptable contains direct address
|
||||
; PLACEHOLDER for completeness - jumptable contains direct address
|
||||
@@ -1,44 +1,43 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// LIST basic text.
|
||||
// XXX - Does not currently support line number ranges
|
||||
; LIST basic text.
|
||||
; XXX - Does not currently support line number ranges
|
||||
|
||||
cmd_list:
|
||||
|
||||
// Set current line pointer to start of memory
|
||||
; Set current line pointer to start of memory
|
||||
jsr init_oldtxt
|
||||
|
||||
list_loop:
|
||||
|
||||
ldy #1
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
!ifdef CONFIG_MEMORY_MODEL_60K {
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
} else ifdef CONFIG_MEMORY_MODEL_46K_OR_50K {
|
||||
jsr peek_under_roms_via_OLDTXT
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
} else { ; CONFIG_MEMORY_MODEL_38K
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
}
|
||||
|
||||
bne list_more_lines
|
||||
|
||||
// LIST terminates any running program,
|
||||
// because it has fiddled with the current line pointer.
|
||||
// (Confirmed by testing on a C64)
|
||||
; LIST terminates any running program,
|
||||
; because it has fiddled with the current line pointer.
|
||||
; (Confirmed by testing on a C64)
|
||||
jmp end_of_program
|
||||
|
||||
list_more_lines:
|
||||
|
||||
lda STKEY
|
||||
bmi !+
|
||||
jmp cmd_stop
|
||||
!:
|
||||
+bpl cmd_stop
|
||||
|
||||
jsr list_single_line
|
||||
jsr follow_link_to_next_line
|
||||
jmp list_loop
|
||||
Loaded 100 of 685 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user