title: "SetMemoryConfig" description: TRSE built-in method (from IDE help)
SetMemoryConfig
Systems: C128
Parameters: n,n,n,n,n
C64
On the C64, this method configures the current memory setup.- Parameter 1: Enables/disables IO
- Parameter 2: Enables/disables Kernal
- Parameter 3: Enables/disables BASIC
SetMemoryConfig(1,0,0);
Valid combinations are:
SetMemoryConfig(1,1,1); // IO area visible at $D000-$DFFF, BASIC ROM visible at $A000-$BFFF and KERNAL ROM visible at $E000-$FFFF. This is the default memory configuration on the C64.
SetMemoryConfig(1,1,0); // IO area visible at $D000-$DFFF, RAM visible at $A000-$BFFF (NO BASIC) and KERNAL ROM visible at $E000-$FFFF
SetMemoryConfig(1,0,0); // IO area visible at $D000-$DFFF, RAM visible at $A000-$BFFF (NO BASIC) and RAM visible at $E000-$FFFF (NO KERNAL). This is the typical memory configuration for demo/game development.
SetMemoryConfig(0,0,0); // RAM visible in all three areas: $A000-$BFFF, $D000-$DFFF and $E000-$FFFF
C128
On the C128, this method takes in 5 numerical parameters and changes the C128 MMU ( Memory Management Unit, address $FF00) to enable/disable various parts of the memory to be visible memory or ROM. The parameters are:- Parameter 1: $D000-$DFFF IO (0) or RAM (1)
- Parameter 2: $4000-$7FFF System ROM (0) or RAM (1)
- Parameter 3: $8000-$BFFF System ROM (0) or RAM (1)
- Parameter 4: $C000-$FFFF System ROM (0) or RAM (1)
- Parameter 5: Ram bank 0 (0) or bank 1 (1)
SetMemoryConfig(0,1,1,1,1);