====== Accessing the outside world ====== Programming a CPU is cool, but at some point you need the help from other devices to do something useful! The 6809E CPU can communicate with other chips on the computer motherboard (and expansions) using a "bus". This is just a set of wires which can be in two states (high or low), and each represent a binary digit (0 or 1). The bus is made of: * 16 address lines that allows the CPUto tells who it wants to communicate with, * 8 data lines, where the CPU can send or receive data, * Several control lines, allowing the CPU to tells which data direction it expects, and a few other things. Unlike the z80 and chips from Intel x86 family, the 6809E doesn't have a dedicated address space for I/O devices. Instead, they share the same space as memory. Thus, the devices are "memory mapped". This allows removing a few instructions from the instruction set and simplifies the hardware interfacing. ====== Memory map ====== This is the place where TO and MO machines differ the most. ===== MO machines ===== ^Address range^Mappings^^^ |0000-1FFF|Pixel RAM |Attribute RAM | | |2000-20FF|[[documentation:monitor:directpage|Monitor direct-page]]| || |2100-21FF|BASIC direct-page | || |2200-9FFF|User RAM | || |A000-A7BF|Floppy ROM | || |A7C0-A7FF|[[#i/o.page|I/O Page]] | || |A800-AFFF|Custom page | || |B000-BFFF|Cartridge |RAM expansion| | |C000-EFFF|::: |::: |BASIC ROM | |F000-FFFF|Monitor ROM | || Notes: * Screen: 2 8KiB pages. The last 1536 bytes are not visible on screen and can be used as a buffer.| * Custom page: Unused by standard peripherals. Available as pre-decoded line on expansion port, and an extra ROM slot on MO5 revision 2 motherboard. ===== TO machines ===== ^Address range^Mappings^^^ |0000-3FFF|Cartridge|RAM banks (pages 0 to 31)|Internal ROMs (up to 8 pages) | |4000-5FFF|Pixel RAM (page 0) |Attribute RAM (page 0) | | |6000-60FF|[[documentation:monitor:directpage|Monitor direct-page]] | || |6100-61FF|BASIC direct-page | || |6200-9FFF|User RAM (page 1, not remappable) | || |A000-DFFF|legacy RAM expansion (pages 2 to 8)|RAM banks (pages 0 to 31) | | |E000-E7AF|Floppy controller ROM | || |E7B0-E7BF|Unused (free for custom expansions) | || |E7C0-E7FF|[[#i/o.page|I/O Page]] | || |E800-FFFF|Monitor ROM | || ====== I/O page ====== All the internal peripherals, and most external ones, are mapped in the I/0 page. ===== MO machines ===== ^Address range^Device^ |A7C0-A7C3 |[[documentations:devices:6821#mo_system_pia|System PIA]]| |A7CB |Memory extension control register| |A7CC-A7CF |[[documentations:devices:6821#sound_and_games_pia|"Sound and Game" PIA]]| |A7D0-A7D7 |Floppy disk controller| |A7D8 |Expansion port control| |A7E0-A7E3 |Printer and serial port PIA| |A7E4-A7E7 |Gate array| |A7E8-A7EB |RF57-232 6551 ACIA| ===== TO machines ===== ^Address range^Device ^TO7^TO7/70^TO9^TO8^TO9+^TO8D^ |E7C0-E7C7 |[[documentations:devices:6846|System 6846 PIA]] |@#AFA:Yes|||||| |E7C8-E7CB |System 6821 PIA |@#AFA:Yes|||||| |E7CC-E7CF |"Sound and Game" PIA |Exp||@#AFA:Yes|||| |E7D0-E7DF |Floppy controller |Exp||[[documentations:devices:wd177x|WD2793]]|[[documentations:devices:thmfc1|THMFC1]]||| |E7DA-E7DB |[[documentations:devices:ef9369|EF9369]] Color Palette |@#FAA:No||@#AFA:Yes|||| |E7DC-E7DD |Gate Array ([[documentations:devices:gate.arrays#video_generation|Video configuration]]) |@#FAA:No||@#AFA:Yes|||| |E7DE-E7DF |[[documentations:devices:6850|6850 ACIA]] (keyboard controller) |@#FAA:No||@#AFA:Yes|@#FAA:No|@#AFA:Yes|@#FAA:No| |E7E0-E7E3 |CC90 communication controller |Exp||@#FAA:No|||| |E7E4-E7E7 |Gate Array (RAM Management) |@#FAA:No||@#AFA:Yes|||| |E7E8-E7EB |RF57-232 serial controller 6551 ACIA |Exp|||||| |E7EC-E7EF |Digitalization expansion (?) |@#FAA:No|||Exp||| |E7F0-E7F7 |IEEE expansion (?) |Exp|||||| |E7F8-E7FF |Modem |Exp||||@#AFA:Yes|Exp|