simplified directory structure, updated configuration system

This commit is contained in:
FeralChild64 committed 2019-10-09 20:06:53 +02:00
1 parent 2cc6587b5c
commit 20899a49d9
19 files changed
+281 -177

No files matched your search

+58 -11
View File
@@ -1,26 +1,52 @@
// Various configuration dependent aliases/macros/checks
//
// Various configuration dependent aliases/macros/checks
//
// Check that memory model configuration is correct
// Check that platform configuration is correct
{
.var selected = 0;
#if CONFIG_MEMORY_MODEL_38K
.eval selected++
#endif
#if CONFIG_MEMORY_MODEL_60K
#if CONFIG_PLATFORM_COMMODORE_64
.eval selected++
#endif
.if (selected != 1) .error "Please select exactly one CONFIG_MEMORY_MODEL_* option"
.if (selected != 1) .error "Please select exactly one CONFIG_PLATFORM_* option"
}
// Check that processor configuration is correct
// Check that platform variant configuration is correct
{
.var selected = 0;
#if CONFIG_VARIANT_GENERIC
.eval selected++
#endif
#if CONFIG_VARIANT_MEGA_65
.eval selected++
#endif
#if CONFIG_VARIANT_ULTIMATE_64
.eval selected++
#endif
.if (selected != 1) .error "Please select exactly one CONFIG_VARIANT_* option"
#if !CONFIG_PLATFORM_COMMODORE_64 && CONFIG_VARIANT_MEGA_65 &&
.error "CONFIG_VARIANT_MEGA_65 can only be used with CONFIG_PLATFORM_COMMODORE_64"
#endif
#if !CONFIG_PLATFORM_COMMODORE_64 && CONFIG_VARIANT_ULTIMATE_64 &&
.error "CONFIG_VARIANT_ULTIMATE_64 can only be used with CONFIG_PLATFORM_COMMODORE_64"
#endif
}
// Check that processor configuration is correct
{
.var selected = 0;
@@ -40,7 +66,24 @@
// Handle processor configuration
// Check that memory model configuration is correct
{
.var selected = 0;
#if CONFIG_MEMORY_MODEL_38K
.eval selected++
#endif
#if CONFIG_MEMORY_MODEL_60K
.eval selected++
#endif
.if (selected != 1) .error "Please select exactly one CONFIG_MEMORY_MODEL_* option"
}
// Handle processor configuration
#if CONFIG_CPU_WDC_65C02 || CONFIG_CPU_WDC_65816
@@ -54,13 +97,17 @@
#endif
// Handle misc configuration entrues
// Handle configuration of various features
#if CONFIG_BCD_SAFE_INTERRUPTS
#define HAS_BCD_SAFE_INTERRUPTS
#endif
// Stub configuration
// Handle configuration of debug infrastructure
.macro STUB_IMPLEMENTATION_RTS() {
rts
+6 -1
View File
@@ -1,8 +1,11 @@
//
// Names of hardware registers - slightly modified names from C64 Programmer's Reference Guide
// Names of hardware registers - names from C64 Programmer's Reference Guide, sometimes slightly modified
//
#if CONFIG_PLATFORM_COMMODORE_64
// CPU memory registers
.label CPU_D6510 = $00
@@ -154,3 +157,5 @@
.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)
#endif
+5 -5
View File
@@ -105,7 +105,7 @@
.label BUFPNT = $A6 // -- NOT IMPLEMENTED --
.label INBIT = $A7 // -- NOT IMPLEMENTED --
#if CONFIG_EXTENDED_SCNKEY
#if CONFIG_SCNKEY_TWW_CTR
// Reuse RS232 variables, since they should not be used by other things.
// Carefully avoid $A7 which is used by 64NET
@@ -125,7 +125,7 @@
.label CMP0 = $B0 // $B0-$B1 temporary tape storage, [!] here used for BRK instruction address
.label TAPE1 = $B2 // $B2-$B3 tape buffer pointer
#if CONFIG_EXTENDED_SCNKEY
#if CONFIG_SCNKEY_TWW_CTR
// Reuse RS232 variables, since they should not be used by other things.
// This one should be initialized in cinit to $FF
@@ -139,7 +139,7 @@
.label NXTBIT = $B5 // -- NOT IMPLEMENTED --
#if CONFIG_EXTENDED_SCNKEY
#if CONFIG_SCNKEY_TWW_CTR
// Reuse RS232 variables, since they should not be used by other things.
// Carefully avoiding $A7 which is used by 64NET
@@ -200,7 +200,7 @@
.label BUF = $200 // $200-$250, BASIC line editor input buffer (81 bytes)
#if CONFIG_EXTENDED_SCNKEY
#if CONFIG_SCNKEY_TWW_CTR
// $250-$258 is the 81st - 88th characters in BASIC input, a carry over from VIC-20
// and not used on C64, so safe for us to use, probably.
@@ -229,7 +229,7 @@
.label MODE = $291 // flag, is case switch allowed
.label AUTODN = $292 // -- NOT IMPLEMENTED -- screen scroll disable
#if CONFIG_EXTENDED_SCNKEY
#if CONFIG_SCNKEY_TWW_CTR
// Reuse RS232 variables, since they should not be used by other things.
// This one should be initialized in cinit to $FF