User Tools

Site Tools


base:memory_management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
base:memory_management [2018-05-29 02:38] white_flamebase:memory_management [2022-03-05 11:12] – finally got around to the "with cartridges" section white_flame
Line 8: Line 8:
  
 ^Name ^Bit ^Region ^0 ^1 ^Notes^ ^Name ^Bit ^Region ^0 ^1 ^Notes^
-|LORAM|0|$A000-BFFF|RAM|BASIC|If KERNAL isn't mapped in, then BASIC won't map in either and this area stays as RAM.|+|LORAM|0|$A000-BFFF|RAM|BASIC|If KERNAL isn't mapped in, then BASIC won't map in either and this region stays mapped to RAM.|
 |HIRAM|1|$E000-FFFF|RAM|KERNAL| | |HIRAM|1|$E000-FFFF|RAM|KERNAL| |
-|CHAREN|2|$D000-DFFF|CHARROM|I/O|If HIRAM and LORAM are both set to 0, then this bit is ignored and the area maps to RAM. This allows for 3 mappings of this area: RAM, CHARROM, or I/O.|+|CHAREN|2|$D000-DFFF|CHARROM|I/O|If HIRAM and LORAM are both set to 0, then this bit is ignored and the area also maps to RAM. This allows for 3 mappings of this region: RAM, CHARROM, or I/O.|
  
-  * All other memory locations ($0000-9FFF, $C000-CFFF) always map to RAM. +  * All other memory locations ($0002-9FFF, $C000-CFFF) always map to RAM. 
-  * Writes to a ROM-mapped area affect the underlying RAM at the same address. +  * Writes to a ROM-mapped region are applied to the underlying RAM at the same address
-  * The VIC-II sees always the CHARROM at $1000-1FFF and $9000-9FFF, and RAM everywhere else, regardless of these bits.+  * I/O includes the registers for the VIC-II, SID, and CIA chips; color RAM; and two external I/O pages that reach out the expansion port
 +  * The VIC-II always sees the CHARROM at $1000-1FFF and $9000-9FFF, and RAM everywhere else, regardless of these bits.
  
 The mappings from combining these 3 bits are listed below.  Higher bits of location $01 are used for other purposes and default to %00110xxx. The mappings from combining these 3 bits are listed below.  Higher bits of location $01 are used for other purposes and default to %00110xxx.
Line 29: Line 30:
 |$37 +55 %111 |BASIC |I/O |KERNAL|Default| |$37 +55 %111 |BASIC |I/O |KERNAL|Default|
  
-The cartridge port also has the GAME and EXROM pinswhich meddle with the memory map even further.  See the Programmer's Reference Guide information for that.+====== With Cartridges ====== 
 + 
 +The expansion port has 2 configuration inputs (/EXROM and /GAME), and 4 chip select outputs (/IO1, /IO2, /ROML, /ROMH). 
 + 
 +/IO1 and /IO2 lines are active on both reads & writes, any time that I/O is banked in: 
 +  * /IO1 = $DE00 - $DEFF 
 +  * /IO2 = $DF00 - $DFFF 
 + 
 +/ROML and /ROMH are active on reads depending on how the cartridge sets the configuration inputs.  Normally, ROML sits right before the BASIC ROM at $8000-9FFF, while ROMH replaces BASIC itself.  Writes to these areas still go to internal RAM and do not acivate the external chip select lines.  Ultimax mode has ROMH replacing the KERNAL and unmaps a lot of the internal RAM. 
 + 
 + 
 +===== Cart pulls /EXROM low ===== 
 + 
 +The simplest cartridge configurationonly using ROML.  Any time the BASIC ROM is visible in at $A000, ROML is also visible in the 8kB before it. 
 + 
 +^$01 value ^$8000-9FFF ^$A000-BFFF ^$D000-DFFF ^$E000-FFFF ^Notes^ 
 +|$30 +48 %000 |RAM |RAM |RAM |RAM| 
 +|$31 +49 %001 |RAM |RAM |CHARROM |RAM| 
 +|$32 +50 %010 |RAM |RAM |CHARROM |KERNAL| 
 +|$33 +51 %011 |**__ROML__** |BASIC |CHARROM |KERNAL| 
 +
 +|$34 +52 %100 |RAM |RAM |RAM |RAM| 
 +|$35 +53 %101 |RAM |RAM |I/O |RAM| 
 +|$36 +54 %110 |RAM |RAM |I/O |KERNAL| 
 +|$37 +55 %111 |**__ROML__** |BASIC |I/O |KERNAL|Default| 
 + 
 +===== Cart pulls /EXROM + /GAME low ===== 
 + 
 +ROML is before BASIC, and is swapped out with the LORAM bit in $01; while ROMH replaces BASIC and is swapped out alongside the KERNAL with HIRAM.  There is no KERNAL-only mode in this configuration. 
 + 
 +^$01 value ^$8000-9FFF ^$A000-BFFF ^$D000-DFFF ^$E000-FFFF ^Notes^ 
 +|$30 +48 %000 |RAM |RAM |RAM |RAM| 
 +|$31 +49 %001 |RAM |RAM |CHARROM |RAM| 
 +|$32 +50 %010 |RAM |**__ROMH__** |CHARROM |KERNAL| 
 +|$33 +51 %011 |**__ROML__** |**__ROMH__** |CHARROM |KERNAL| 
 +
 +|$34 +52 %100 |RAM |RAM |RAM |RAM| 
 +|$35 +53 %101 |RAM |RAM |I/O |RAM| 
 +|$36 +54 %110 |RAM |**__ROMH__** |I/O |KERNAL| 
 +|$37 +55 %111 |**__ROML__** |**__ROMH__** |I/O |KERNAL|Default| 
 + 
 +===== Cart pulls only /GAME low (Ultimax mode) ===== 
 + 
 +ROMH replaces the KERNAL at $E000, ROML is still at $8000.  Only the lowest 4kB of internal RAM remains visible, and I/O cannot be swapped out.  None of the bits in $01 affect the banking in this mode. 
 + 
 +^$0000-0FFF ^$1000-7FFF ^$8000-9FFF ^$A000-CFFF ^$D000-DFFF ^$E000-FFFF ^ 
 +|RAM |unmapped |**__ROML__** |unmapped |I/O |**__ROMH__**| 
  
 - White Flame - White Flame
base/memory_management.txt · Last modified: 2022-04-17 05:36 by white_flame