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
14 KiB
Configuring the build
It's not possible to provide ROM builds that suit everyone needs - therefore configuration files were introduced, few predefined configurations are provided with sane defaults:
src/,,config_custom.ssrc/,,config_generic.ssrc/,,config_mega65.ssrc/,,config_ultimate64.ssrc/,,config_testing.s
Just edit them and recompile the project. To enable particular option - uncomment it by removing leading // from before #define directive (as you probably guessed, commenting out disables it). Some options are followed by constants - you can change them too to further fine-tune the build.
Note however, that features do not came for free - enabling them needs some additional ROM space (in BASIC segment, in KERNAL segment, or in both), which is VERY limited on the target machines. Some options might be unavailable for speecific targets - read the comments in the configuration files. Some options might also carry compatibility and/or performance hit - so choose wisely.
Hardware platform
CONFIG_PLATFORM_COMMODORE_64
Commodore 64 is the only hardware platform available now - and the main one, as the Open ROMs API is meant to be compatible with the Commodore 64.
Since Open ROMs is highly modular, it should be possible to add other platforms in the future (like 8-bit Atari computers or Commander X16), if they share the following common characteristics:
- MOS 6502 CPU or compatible
- 8KB ROM area
$A000-$BFFF - 8KB ROM area
$E000-$FFFF
CONFIG_MB_M65, CONFIG_MB_U64
Select if the ROM is going to be used exclusively on the specified motherboard. It prevents from enabling options not having sense, skips initialization of C128-only registers, and enables motherboard-specific features.
Brand
Branding is only allowed for C64 platform, if no motherboard is specified.
CONFIG_BRAND_CUSTOM
Intended for custom builds, for private purposes. Allows to configure branding with CONFIG_CUSTOM_BRAND macro.
CONFIG_BRAND_GENERIC
If you don't know which variant to choose - select this one.
CONFIG_BRAND_TESTING
Use this one for any kind of testing/experimental build.
Processor instruction set
Processor type should be set only for C64 platform, if no motherboard is specified. Otherwise, it will be selected automatically. Setting proper CPU allows to enable various size/performance optimizations.
CONFIG_CPU_MOS_6502
Choose if your CPU only supports the original MOS Technology 6502 instruction set, like:
- MOS 6510 - used in the Commodore 64
- MOS 8500 - used in the Commodore 64C
- MOS 8502 - used in the Commodore 128
If unsure - select this one.
CONFIG_CPU_DTV_6502
Choose if your CPU only supports extended C64 DTV instruction set.
CONFIG_CPU_RCW_65C02
Choose if your CPU supports the Rockwell 65C02 instruction set.
CONFIG_CPU_WDC_65C02
Choose if your CPU supports the Western Design Center 65C02 instruction set, like:
- WDC 65C02 - used in the Turbo Master accelerator
CONFIG_CPU_WDC_65816
Choose if your CPU supports the 16-bit Western Design Center 65816 instruction set, like:
- WDC 65C816 - used in the Flash 8 accelerator
- WDC 65C816S - used in the SuperCPU accelerator
CONFIG_CPU_CSG_65CE02
Choose if your CPU supports the Commodore Semiconductor Group 65CE02 instruction set, like:
- CSG 65CE02
- CSG 4510 - microcontroller used in the Commodore 65 prototypes
Memory model
Different layouts of memory are possible - but they can be selected at compile time only.
CONFIG_MEMORY_MODEL_38K
Memory model the original machine uses - memory available for BASIC ends at $9FFF, just before the first block of ROM. The fastest and the most compatible, but gives the least memory for BASIC. If unsure - select this one.
CONFIG_MEMORY_MODEL_46K and CONFIG_MEMORY_MODEL_50K
These models additionaly use RAM under BASIC, and the 50K additionally takes over $C000-$CFFF range. They should still be highly compatible (no additional RAM for helper routines is needed), and the performance penalty should be much lower than 60K model.
CONFIG_MEMORY_MODEL_60K
Uses RAM under BASIC, I/O and KERNAL, takes over $C000-$CFFF area requires special helper routines installed in $2A7-$2FF area (normally unused and free for the user). Gives the most free memory for BASIC programs, but it's the slowest (for example, forces disabling optimized LOAD loop for JiffyDOS) and the least compatible model.
It is currently not compatible with MEGA65 extended ROMs.
Comparing to standard memory model, it needs about 180 bytes in BASIC segment and 80 bytes in KERNAL segment - at the moment of doing the test, these values are expected to change often.
IEC bus
IEC bus, also known as Serial Port, is a standard interface to connect disk drives, printers, SD2IEC device, etc.
CONFIG_IEC
Adds support for the IEEC bus - for serial printers, disk drives, etc.
Needs over 1000 bytes in KERNAL segment. If unsure - enable.
CONFIG_IEC_DOLPHINDOS
Adds support for DolphinDOS fast protocol to the IEC bus, using UserPort cable.
Needs about 160 bytes in KERNAL segment. If unsure - enable.
CONFIG_IEC_DOLPHINDOS_FAST
Faster LOAD loop implementation for DolphinDOS protocol.
Needs 20 more bytes in KERNAL segment.
CONFIG_IEC_JIFFYDOS
Adds support for JiffyDOS fast protocol to the IEC bus.
Needs about 430 bytes in KERNAL segment. If unsure - enable.
CONFIG_IEC_JIFFYDOS_BLANK
Causes screen blanking during JiffyDOS file loading to increase performance.
Tape deck
Note: for MEGA65 most of the tape support code is placed in it's extended ROM; very little of the (tiny) KERNAL segment is used.
CONFIG_TAPE_NORMAL
Adds a minimal normal (standard Commodore format) tape support - just LOAD command.
Needs about 1050 bytes in KERNAL segment (if both normal and turbo are enabled, about 900 bytes are needed, as they share some code). If unsure - enable.
CONFIG_TAPE_TURBO
Adds a minimal turbo tape support - just LOAD command (device 7, like on Action Replay and Final cartridges), up to 250 blocks
Needs about 700 bytes in KERNAL segment (if both normal and turbo are enabled, about 1300 bytes are needed, as they share some code). If unsure - enable.
CONFIG_TAPE_AUTODETECT
Tape format (normal/turbo) is always autodetected.
Needs about 100 more bytes in KERNAL segment.
CONFIG_TAPE_NO_KEY_SENSE
Enable this option if you are using a tape interface adapter with some audio signal source connected. These adapters lack key sense functionality, so the computer is unable to tell whether Play got pressed or not - this option changes the ROM behaviour, so that it can detect Play pressed when impulses start arriving from the tape.
CONFIG_TAPE_NO_MOTOR_CONTROL
Enable this option if you are using a tape interface adapter lacking tape motor control (most likely every adapter currently being sold) - this will eliminate the need to quickly press space when the program header information gets displayed. Note: if you are using a cassette player with REM port, and your adapter is connected to this port too, than you do not need this option.
Sound support
The original Commodore 64 had one SID sound chip installed. However, mods exists to add more of them for improved sound capabilities. Emulators and FPGA machines typically allow to simulate more than one too. Unfortunately, there is no standard regarding how these additional chips are visible in the processor address space, and there is no sane way to detect it - thus, it has to be configurable.
The SID support in the ROM is very limited - it only disables the sound during startup or warm restart (when STOP+RESTORE is pressed or BRK assembler instruction is executed).
CONFIG_SID_2ND_ADDRESS and CONFIG_SID_3RD_ADDRESS
Each of them add support for one additional SID - addresses should be given as parameter, respectively. Do not use when CONFIG_MB_M65 is selected - the motherboard support code already knows the SID locations.
Each of these options needs 3 bytes in KERNAL segment.
CONFIG_SID_D4XX and CONFIG_SID_D5XX
Cause the system to support SIDs in $D4xx and $D5xx ranges, respectively.
Each of them needs a couple of bytes in KERNAL segment - but they can share some code, and $D4xx range support replaces the standard $D400 address handling, so exact amount depends on the exact configuration. Do not use when CONFIG_MB_M65 is selected - the motherboard support code already knows the SID locations.
Keyboard
Original keyboard support routine is just horrible. It does nothing to prevent ghosting - press A+S+D at the same time - it prints F. Try to use joystick connected to control port 1 - it outputs phantom characters. The Open ROMs provides much more sophisticated routines to prevent such problems.
CONFIG_LEGACY_SCNKEY
Uses old Open ROMs keyboard scanning routine, which is basically the example routine by TWW/CTR, hacked to work within Kernal. It's greatest advantage is multi-key rollover, it's disadvantages - it's much less compatible (uses several bytes of memory which are normally free for user software - thus, it is considered legacy for now), does not support all the system variables (RPTFLG and KEYLOG are unsupported), and ignores the configuration options - this can be changed, but it requires some effort.
Needs 30-250 more space in KERNAL segment (depending on the features enabled for current default routine). If unsure - disable.
CONFIG_KEYBOARD_C128
Allows to use additional keys found on the C128 keyboard.
Needs about 130 bytes more space in KERNAL segment. If unsure - disable.
CONFIG_KEYBOARD_C128_CAPS_LOCK
Allows to use CAPS LOCK key on the C128 keyboard, this is independent from CONFIG_KEYBOARD_C128. Support is C64-safe (there is a protection against false-positive reading on the C64).
Needs about 50 bytes more space in KERNAL segment. If unsure - disable.
CONFIG_KEYBOARD_C65, CONFIG_KEYBOARD_C65_CAPS_LOCK
Similar, but for C65 keyboard. Please note - the C65 keyboard support is (as of yet) completely untested!
CONFIG_KEY_REPEAT_DEFAULT
Enables key repetition by default during the startup (sets RPTFLG).
Needs 5 bytes more space in KERNAL segment.
CONFIG_KEY_REPEAT_ALWAYS
Enables the key repetition and ignores RPTFLG.
Saves 22 bytes from KERNAL segment.
CONFIG_KEY_FAST_SCAN
Performs somee speed optimizations in the keyboard scanning routine, at the expense of some more ROM space.
Needs 13 bytes more space in KERNAL segment. Only disable if you are running out of ROM space.
CONFIG_JOY1_CURSOR and CONFIG_JOY2_CURSOR
Joystick movement also moves the cursor.
Needs about 65 bytes of ROM space in KERNAL segment to handle both joysticks.
CONFIG_PROGRAMMABLE_KEYS
Allows to assign commands to any function key, RUN key and HELP key (if selected keybaord has one) - just fill-in appropriate CONFIG_KEYCMD_* variable(s). Keys not present on the selected keyboard are ignored.
Needs 25 bytes more space in KERNAL segment for the code. In addition, each configured key takes 3 bytes + length of the command.
Screen editor
CONFIG_EDIT_STOPQUOTE
If enabled, STOP key terminates insert/quote mode (like on some Black Box cartridges).
Feature needs 12 bytes in KERNAL segment. If unsure - enable.
CONFIG_EDIT_TABULATORS
If enabled, allows use of TAB (or CTRL+>) and SHIFT+TAB (or CTRL+<) to switch between predefined tabulator positions.
Feature needs 35-45 bytes in KERNAL segment. If unsure - enable.
Software features
CONFIG_PANIC_SCREEN
If enabled, certain fatal errors will produce a nice bluescreen instead of just resetting the machine.
Feature needs over 100 bytes in KERNAL segment. If unsure - enable.
CONFIG_DOS_WEDGE
If enabled, a simple DOS wedge is available from the direct mode - supports @<drive_number>, @<command>, @$, @$<params> and @ commands.
Feature needs about 330 bytes in BASIC segment. If unsure - enable.
CONFIG_TAPE_WEDGE
If enabled, a simple DOS wedge is available from the direct mode for tape loading - supports ←L (for LOAD) and ←M (for MERGE), optionally with a file name.
Feature needs several bytes in BASIC segment. If unsure - enable.
CONFIG_TAPE_HEAD_ALIGN
If enabled, embeds a tape head align tool into the ROM, it can be started with ←H. Requires CONFIG_TAPE_WEDGE.
Feature needs about 800 bytes in KERNAL segment. Only recomended for machines with extended ROM, like MEGA65.
CONFIG_BCD_SAFE_INTERRUPTS
On the most widespread CPUs the D flag is not cleared upon entering interrupts. Since the original Kernal does not clear it either, it's not safe to use BCD processor mode without disabling the interrupts first. This option makes sure the D flag is disabled at the start of the interrupt - this allows some optimizations in the code.
Feature needs 2 bytes in KERNAL segmment (for CPUs needing the patch), but at the same time allows optimizations allowing to gain some more bytes. If unsure - enable.
Eye candy
CONFIG_COLORS_BRAND
Tries to adjust the color scheme to the selected brand. Some brands might not support this.
CONFIG_BANNER_SIMPLE, CONFIG_BANNER_FANCY
Select startup banner - either a simple one, or with some colorful elements.
Richer banners need more BASIC segment, varies between brands.
CONFIG_SHOW_FEATURES
If enabled, shows the most important compiled-in features on the startup screen. Also shows the video system (PAL/NTSC).
It is recommended to keep it enabled for informational purposes.
Debug options
Options in this section are for debug purposes only. If unsure - disable.
CONFIG_DBG_STUBS_BRK
Replaces RTS stubbed routines implementation with one causing a break.
CONFIG_DBG_PRINTF
Makes printf routine available.
Other options
CONFIG_COMPRESSION_LVL_2
Adds additional step in compressing BASIC interpreter strings - a dictionary compression. Not tested extensively - and for now it won't bring any improvement (it will even increase the code/data size) as we do not have enough strings yet to make this method useful. Do not use!