Acorn Atom Memory Map ===================== Overview -------- 0000-03FF Low RAM 0400-0FFF I/O devices 1000-1FFF I/O devices 2000-7FFF Main RAM 8000-97FF Screen memory 9800-9FFF Default RAM A000-AFFF Econet/Extension ROM B000-BFFF I/O C000-CFFF BASIC ROM D000-DFFF Floating point ROM E000-EFFF DOS/Econet ROM F000-FFFF Kernal ROM Details ------- 0000-00FF Zero page 0000-0097 User workspace 0098-00AF DOS workspace 00B0-00FF MOS workspace 00FE Printer ignore character 00FF Interupt TEMPA 0100-01FF OSCLI buffer, input buffer and 6502 stack 0100 upwards: OSCLI buffer, input buffer 01FF downwards: 6502 stack 0200-02FF Vectors 0200/1 NMIVEC NMI service routine 0202/3 BRKVEC BRK service routine 0204/5 IRQVEC IRQ service routine 0206/7 COMVEC Command Line Interpreter 0208/9 WRCVEC Write character 020A/B RDCVEC Read character 020C/D LODVEC Load file 020E/F SAVVEC Save file 0210/1 RDRVEC Read open file info 0212/3 STRVEC Write open file info 0214/5 BGTVEC Get byte from open file 0216/7 BPTVEC Put byte to open file 0218/9 FNDVEC Open a file 021A/B SHTVEC Close a file 021C/D IN1VEC Used by Econet 021E/F IN2VEC 0220-023F Econet workspace 0240-02FF User workspace 0300-03FF User workspace 0400-07FF Teletext screen RAM 0800-08FF Teletext 6845 controller 0800 6845 Register 0801 6845 Data 0900-09FF 0A00-0AFF 8271 floppy disk controller 0A00 8271 Command/Status 0A01 8271 Parameter/Result 0A02 8271 Reset 0A03 8271 do not use 0A04 8271 Data 1000-1FFF Peripherals space 2000-21FF DOS Catalogue buffer 2200-27FF DOS Sequential File buffers 2800-28FF BASIC floating point variables 2900 Default BASIC text space 3C00-3FFF Off-board Extension RAM 4000-7FFF Extension RAM 8000-81FF MODE 0 screen (512 bytes text) 8000-83FF MODE 1 screen (1K graphics) 8000-85FF MODE 2 screen (1.5K graphics) 8000-8BFF MODE 3 screen (3K graphics) 8000-97FF MODE 4 screen (6K graphics) 9800-9DFF VDU-HI font and workspace 9800-9BFF ScreenROM workspace and font 9C00-9FFF BBC BASIC workspace A000 Optional Utility ROM/Econet ROM B000 PPIA I/O Device &B000 b7-b4: 6847 video mode &B000 b3-b0: keyboard matix row, defaults to 0 so &B001 reads Escape. Setting &B000 to 10 (or anything larger than 9) "disables" background escape checking. &B001 - keyboard matrix column: ~b0 : SPC [ \ ] ^ LCK <-> ^-v Lft Rgt ~b1 : Dwn Up CLR ENT CPY DEL 0 1 2 3 ~b2 : 4 5 6 7 8 9 : ; < = ~b3 : > ? @ A B C D E F G ~b4 : H I J K L M N O P Q ~b5 : R S T U V W X Y Z ESC ~b6 : Ctrl ~b7 : Shift 9 8 7 6 5 4 3 2 1 0 &B002 - various I/O ~b0 -> CASOUT ~b1 -> CASOUT ~b2 -> Speaker ~b3 -> VDU CSS ~b4 <- CAS ~b5 <- CASIN ~b6 <- REPEAT key ~b7 <- VSync B800 Optional VIA I/O Device for Printer Interface C000 ATOM BASIC Interpreter 4KB ROM D000 Optional Extension ROM E000 Optional Disk Operating System F000-F7FF Assembler and graphics commands F800-FFFF COS, VDU, MOS 1000-17FF High-res screen RAM 1800-18FF High-res 6845 controller 1840 6845 Register 1841 6845 Data 1900-1FFF 1940 6854 ALDC register 1 1941 6854 ALDC register 2 1942 6854 ALDC register 3 1943 6854 ALDC data register 1944 Station number 2000-DFFF System/Program/User memory 2000-27FF DOS workspace 2800-xxxx User memory A000-DFFF BBC BASIC C000-CFFF Atom BASIC ROM D000-DFFF Atom BASIC floating point ROM E000-EFFF DOS/Econet ROM E000 DOS/Econet: Initialise and select filing system E003 Econet: Initialise networking primitives only F000-FFFF OS/COS/Monitor ROM FFC0-FFFF OS entry points FFCB OSSHUT JMP (SHTVEC) ; Close a file FFCE OSFIND JMP (FNDVEC) ; Open a file FFD1 OSBPUT JMP (BPTVEC) ; Put a byte to open file FFD4 OSBGET JMP (BGTVEC) ; Get a byte from open file FFD7 OSSTAR JMP (STRVEC) ; Write open file info FFDA OSRDAR JMP (RDRVEC) ; Read open file info FFDD OSSAVE JMP (SAVVEC) ; Save a file FFE0 OSLOAD JMP (LODVEC) ; Load a file FFE3 OSRDCH JMP (RDCVEC) ; Read character FFE6 OSECHO JSR OSRDCH ; Read character and echo FFE9 OSASCI CMP #&0D ; Write ASCII sequence FFEB BNE OSWRCH FFED OSCRLF LDA #&0A ; Write LF-CR Newline sequence FFEF JSR OSWRCH FFF2 OSWRCR LDA #&0D ; Write CR FFF4 OSWRCH JMP (WRCVEC) ; Write a character FFF7 OSCLI JMP (COMVEC) ; Command Line Interpreter FFFA NMIV EQUW NMI ; Hardware NMI vector FFFC RESETV EQUW RESET ; Hardware Reset vector FFFE IRQV EQUW IRQ ; Hardware IRQ/BRK vector Workspace RAM usage =================== AtomDOS uses: 2000-27FF workspace 3C00-3FFF user RAM on disk card E000-EFFF DOS ROM System Universal Interface Card: Card address configurable in blocks of 128 bytes between &0000 and &7F80. Device addresses decoded as: 6522: base+&00 6850: base+&20 8255: base+&40 unused: base+&60 Floppy Disk Controller Card address decoded as block of 128 bytes at &0A0x F000 Assembler 4 KB ROM Cassette Operating System E000 Optional Disk Operating System D000 Optional Extension ROM C000 ATOM BASIC Interpreter 4KB ROM B800 Optional VIA I/O Device for Printer Interface B000 PPIA I/O Device A000 Optional Utility ROM 9800 8000 8000-97FF for mode 4 (6 KB graphics) 8000 8000-8BFF for mode 3 (3 KB graphics) 8000 8000-85FF for mode 2 (1.5 KB graphics) 8000 8000-83FF for mode 1 (1 KB graphics) 8000 8000-01FF for mode 0 (512 bytes text) Video and BASIC RAM 6KB max. 3C00 Off-board Extension RAM 2900 Extension Text space RAM 2800 Floating point variables Internal RAM 5KB max. 2200 Sequential File buffers 2000 Catalogue buffer 1000 Peripherals space 0A80 0A00 Optional FDC 0900 0800 VDG CRT Controller 0400 Teletext VDG RAM 0000 Block Zero RAM 1KB RAM The default (minimum) ATOM had the following memory map (hex numbers are proceeded with an '#': #F000-#FFFF ROM MM52164 IC20 OS ROM #C000-#CFFF ROM MM52164 IC20 Basic ROM #B000-#B3FF PPI INS8255 IC25 Keyboard, Tape I/O, Speaker #8000-#83FF RAM 2114 ICs 42&43 Graphics and Basic RAM #0000-#03FF RAM 2114 ICs 51&52 Stack and scratch RAM Extensions: #D000-#DFFF ROM MM52132 IC21 Floating point ROM #E000-#EFFF ROM MN52132 Disk Operating System ROM #B800-#BBFF VIA 6522 IC1 Printer Interface #B400-#B7FF Extension PL8 Econet Interface #A000-#AFFF ROM MN52132 IC24 Utilities ROM #9400-#97FF RAM 2114 ICs 32&33 Graphics RAM #9000-#93FF RAM 2114 ICs 34&35 Graphics RAM #8C00-#8FFF RAM 2114 ICs 36&37 Graphics RAM #8800-#8BFF RAM 2114 ICs 38&39 Graphics RAM #8400-#87FF RAM 2114 ICs 40&41 Graphics RAM #3C00-#7FFF Extension PL6/7 Reserved for external RAM #3800-#3BFF RAM 2114 ICs 18&19 Basic RAM #3400-#37FF RAM 2114 ICs 16&17 Basic RAM #3000-#33FF RAM 2114 ICs 14&15 Basic RAM #2C00-#2FFF RAM 2114 ICs 12&13 Basic RAM (FP?) #2800-#2BFF RAM 2114 ICs 10&11 Basic RAM #0400-#27FF Extension PL6/7 Reserved for Eurocards When RAM is placed at #2800 and up, the Basic text is placed there, leaving the #8000 and up region for graphics. The Disk Operating System expansion card added the following to the memory map: #Exxx ROM #0A00-#0A7F 8271 FDC #0400-#09FF RAM Non-Acorn modifications: ROM SWITCHING A single utility ROM was not enough, as many ROMs were devised, so a switching card was created, which could map one of several ROMs on the #A000-#AFFF location. The OS ROM at #F000-#FFFF was changed, allowing automatic paging looking for the command to be executed. This mechanism is similar to the BBC ROM switching. The switching is done with port #BFFF. CMOS RAM The 2114 RAM ICs were not very economic in power consumption, which could lead to power supply problems in extended Atoms. This led to the development of CMOS RAM cards. Initially these cards supplemented the standard memory with a new block from #4000 to #7FFF. Per 2 kByte chip a battery backup and/or write protect could be used. With the falling RAM prices and increasing capacities, eventually the complete lower 32K region was covered. As the PL6/7 buffer assumed the memory ranges #0400-#27FF, #3C00-#7FFF and #Exxx were external, some modification to the mainboard was needed. Graphics RAM in CMOS. The graphics region spanned #84xx-#97xx, or 5 kByte. A 8 kByte CMOS RAM chip replacing the 2114s reduced power consumption and supply additional RAM space, not used by the OS. The covered memory would run from #8000 to #9FFF. More disk capacity, CP/M The original 8271 Floppy Disk Controller chip supported only single density, and the operating system only single sided, 40 track disks. And the chip is unavalilable from the original sources. As an alternative to upgrading the FDC and patch the DOS, the decision was made to combine the project with support for a popular OS of the time: CP/M. A board containing a Z80 CPU, 64 kByte RAM, WD1793, and a interface Z80 PIO was designed. With a small change in the Atom DOS ROM and some basic intelligence in the Z80 boot ROM, both Atom FDC emulation and CP/M support was archieved. Adding an 80 colomn VDU card completed the CP/M configuration. The communication between the Atom and the Z80/FDC card was done via an VIA card. This card implemented an extra 6522 VIA, two 4 kByte ROM sockets and a 2 kByte RAM socket at #0400. The ROM sockets could be mapped from #9xxx to #Fxxx. The primary purpose was to provide a DOS ROM at #Exxx. Mapping #Axxx and #BC00-#BFFF outside the bus This was done with a simple modification called "daktuin" (roof garden). schema daktuin. The signal used to switch #Exxx to the outside of the bus, is now modified to switch #Axxx and #BC00-#BFFF too. When placed in the context, the "daktuin" looks as follows: Atom incorporating daktuin Summary ------- 0000-03FF Low RAM 0000-00FF Zero page 0100-01FF OSCLI buffer, input buffer and 6502 stack 0200-02FF Vectors, user workspace 0300-03FF User workspace 0400-0FFF I/O devices 0400-07FF Teletext screen RAM 0800-08FF Teletext 6845 controller 0900-09FF 0A00-0AFF 8271 floppy disk controller 0B00-0BFF 0C00-0CFF Universal Interface card - 6522 VIA, 6850 ACIA, 8255 PIO 0D00-0DFF 0E00-0EFF 8154 PIO/RAM 1 0F00-0FFF 8154 PIO/RAM 2 2000-7FFF System/Program/User memory 8000-81FF Screen memory 8000-87FF Screen memory 8000-8FFF Screen memory 8000-97FF Screen memory -9FFF User memory A000-AFFF Extension ROM B000-BFFF I/O devices C000-CFFF Atom BASIC D000-DFFF Floating Point E000-EFFF DOS/Econet ROM F000-FFFF OS/COS/Monitor ROM FFC0-FFFF OS entry points