# techav-homebrew/wrap030 architecture

> Architecture diagram of the GitHub repository techav-homebrew/wrap030, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/techav-homebrew/wrap030
- Repository: https://github.com/techav-homebrew/wrap030

## Overview

Wrap030 is a homebrew Motorola 68030 computer platform, and this repository contains both the hardware design files and the software ecosystem that runs on it.

1. **Top-level system**
   - The repo is centered on the Wrap030 base machine: a custom 68030-based motherboard plus supporting logic and documentation.
   - Top-level artifacts like `Schematic.pdf`, `Gerbers/`, `Glue/`, `Images/`, and `BillOfMaterials.csv` represent the main hardware platform and its manufacturing package.

2. **Core hardware design flow**
   - The hardware is designed in KiCad (`.kicad_sch`, `.kicad_pcb`, `.kicad_pro`, `.kicad_sym`) and then exported to Gerbers for fabrication.
   - The top-level `Gerbers/` directory contains the finished production outputs for the core board, including copper layers, solder mask/paste, drill files, and board outline.

3. **Glue logic / board control**
   - `Glue/*.sv` contains SystemVerilog modules such as `glue030.sv`, `memcycle.sv`, `buserror.sv`, and `aciacycle.sv`.
   - These files are the hardware control boundary between the 68030 CPU and the rest of the system, likely handling memory timing, bus/error behavior, and serial/ACIA-related cycle logic.

4. **Expansion board family**
   - `ExpansionBoards/` contains a set of add-on boards, each with its own schematic, PCB, and often Gerbers.
   - The named boards suggest distinct peripheral roles: `Memory`, `Video`, `OctoCom`, `QuadCom_8b`, `Exp8b`, `ATX-PSU_8b`, and `Mezzanine`.

5. **Expansion-board logic and interfaces**
   - Several expansion boards have their own logic sources, showing that some peripherals are not purely passive adapters.
   - Examples include `ExpansionBoards/Memory/Logic/Wrap030 Memory Glue.sv`, `ExpansionBoards/Video/Glue-Logic/Video-Board_Glue.sv`, and `ExpansionBoards/OctoCom/Logic/OctoCom_Logic.PLD`.
   - This indicates a layered architecture: PCB design plus programmable glue logic for bus adaptation or peripheral interfacing.

6. **Manufacturing and mechanical artifacts**
   - Many board folders include Gerbers and drill files, making the repo directly production-oriented rather than just design documentation.
   - Some boards also include 3D/package assets such as STEP files and custom footprint libraries (`.pretty`, `.kicad_mod`), which are relevant for connector placement and mechanical fit.

7. **Boot and system software**
   - `Software/Bootloader/` contains a standalone bootloader environment with its own `libc`, `libff` (FatFs), linker script, and subcomponents like `wboot` and `wdisk`.
   - The bootloader is a boundary-crossing subsystem: it talks to hardware through ACIA/serial code and to storage through FatFs-based disk support.

8. **Resident monitor / ROM utilities**
   - `Software/TSMON/` and `Software/ROM128k/` are monitor/firmware-style programs for the machine.
   - These appear to provide low-level system access, ROM-resident functionality, FAT support, and board-specific constants for the 68030 platform.

9. **BASIC runtime stack**
   - Multiple BASIC-related variants exist: `Software/EHBASIC`, `Software/FPU-EHBASIC`, `Software/MultiBasic`, and `Software/AsmMandelbrot` / `Software/Slideshow`.
   - This suggests the machine supports multiple application/runtime configurations, from simple interpreted BASIC demos to more integrated kernel-based multi-BASIC setups and floating-point extensions.

10. **Operating/runtime separation**
   - `Software/MultiBasic/` is the most OS-like subtree: it has a `Kernel/`, its own `EhBASIC/`, `libc`, `libff`, and a `wdisk` layer.
   - That structure implies a layered runtime where kernel services, disk access, and BASIC execution are separated rather than all living in a single monolithic program.

11. **Testing and bring-up**
   - `Software/Test Code/TimerTest/` and the other test programs are for hardware validation and board bring-up.
   - These are important diagram nodes because they represent the validation path used during development, especially for timing and peripheral integration.

12. **Build and load tooling**
   - The repo includes build scripts and linker scripts for 68030 assembly-based software (`.asm`, `.x68`, `.S68`, `.srec`).
   - `Utilities/` provides Python loaders such as `srecLoadRAM*.py`, which likely transfer S-record images into RAM over a host connection during development or bootstrapping.

13. **External dependencies and reused code**
   - `libff` is a vendored FatFs implementation used for disk/file access in the boot and BASIC environments.
   - `libc` provides minimal C runtime support for the C-based tools and utilities inside the firmware tree.

14. **How the pieces connect**
   - At design time: KiCad + SV/PLD sources are turned into Gerbers, drill files, and documentation.
   - At runtime: the 68030 board uses glue logic and expansion boards to reach memory, video, comms, and storage.
   - On the software side: boot/monitor code starts the machine, utilities can load S-record images into RAM, and BASIC/demo programs run on top of the firmware or kernel layers.

If you are drawing an architecture diagram, the clearest split is: **core 68030 system hardware at the center**, **expansion/peripheral boards around it**, **glue logic between them**, and **firmware/boot/BASIC/monitor software stacked above the CPU with disk/serial utilities as support paths**.

Main entry points: [`Glue/glue030.sv`](https://github.com/techav-homebrew/wrap030/blob/main/Glue/glue030.sv) (Glue logic), [`Schematic.pdf`](https://github.com/techav-homebrew/wrap030/blob/main/Schematic.pdf) (Wrap030 board), [`Software/Bootloader/Makefile`](https://github.com/techav-homebrew/wrap030/tree/main/Software/Bootloader/Makefile) (Bootloader), [`Software/MultiBasic/Makefile`](https://github.com/techav-homebrew/wrap030/tree/main/Software/MultiBasic/Makefile) (MultiBasic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_hardware["Core hardware"]
  node_n_board["Wrap030 board<br/>68030 motherboard<br/>[Schematic.pdf]"]
  node_n_gerbers["Gerbers<br/>fab outputs"]
  node_n_bom["BOM<br/>parts list"]
  node_n_glue030["Glue logic<br/>systemverilog<br/>[glue030.sv]"]
  node_n_memcycle["Mem cycles<br/>systemverilog<br/>[memcycle.sv]"]
  node_n_buserror["Bus error<br/>systemverilog<br/>[buserror.sv]"]
  node_n_aciacycle["ACIA cycle<br/>systemverilog<br/>[aciacycle.sv]"]
end

subgraph group_grp_expansion["Expansion boards"]
  node_n_memory["Memory board<br/>expansion pcb<br/>[Wrap030 Memory.sch]"]
  node_n_video["Video board<br/>expansion pcb"]
  node_n_octocom["OctoCom<br/>expansion pcb<br/>[OctoCom.kicad_sch]"]
  node_n_quadcom["QuadCom 8b<br/>expansion pcb"]
  node_n_exp8b["Exp8b<br/>expansion pcb<br/>[Exp8b.kicad_sch]"]
  node_n_atxpsu["ATX PSU<br/>expansion pcb"]
  node_n_mezz["Mezzanine<br/>expansion interface<br/>[README.md]"]
end

subgraph group_grp_firmware["Firmware stack"]
  node_n_bootloader["Bootloader<br/>firmware"]
  node_n_multibasic["MultiBasic<br/>runtime/kernel"]
  node_n_ehbasic["EHBASIC<br/>basic runtime<br/>[EhBasic030.asm]"]
  node_n_fpubasic["FPU BASIC<br/>basic runtime<br/>[FPUBasic030.asm]"]
  node_n_rom128k["ROM128k<br/>rom firmware<br/>[README.md]"]
  node_n_tsmon["TSMON<br/>monitor firmware<br/>[TSMON_68030.X68]"]
  node_n_tests["Test code<br/>bring-up<br/>[testprogram.x68]"]
end

subgraph group_grp_tools["Host tools"]
  node_n_utilities["Load tools<br/>host utilities<br/>[srecLoadRAMlin.py]"]
end

node_n_board -->|"controls"| node_n_glue030
node_n_board -->|"fabricated as"| node_n_gerbers
node_n_board -->|"specified by"| node_n_bom
node_n_glue030 -->|"includes"| node_n_memcycle
node_n_glue030 -->|"includes"| node_n_buserror
node_n_glue030 -->|"includes"| node_n_aciacycle
node_n_memory -->|"interfaces with"| node_n_glue030
node_n_video -->|"interfaces with"| node_n_glue030
node_n_octocom -->|"interfaces with"| node_n_glue030
node_n_quadcom -->|"interfaces with"| node_n_glue030
node_n_exp8b -->|"interfaces with"| node_n_glue030
node_n_atxpsu -->|"powers"| node_n_board
node_n_mezz -->|"adapts"| node_n_board
node_n_bootloader -->|"uses serial"| node_n_aciacycle
node_n_bootloader -.->|"loaded by"| node_n_utilities
node_n_bootloader -->|"boots into"| node_n_rom128k
node_n_multibasic -->|"built on"| node_n_bootloader
node_n_multibasic -->|"contains"| node_n_ehbasic
node_n_multibasic -.->|"loads via"| node_n_utilities
node_n_ehbasic -->|"drives"| node_n_video
node_n_fpubasic -->|"extends"| node_n_rom128k
node_n_rom128k -->|"shares monitor"| node_n_tsmon
node_n_tests -->|"validates"| node_n_glue030
node_n_tests -.->|"loaded by"| node_n_utilities

click node_n_board "https://github.com/techav-homebrew/wrap030/blob/main/Schematic.pdf"
click node_n_gerbers "https://github.com/techav-homebrew/wrap030/tree/main/Gerbers"
click node_n_bom "https://github.com/techav-homebrew/wrap030/blob/main/BillOfMaterials.csv"
click node_n_glue030 "https://github.com/techav-homebrew/wrap030/blob/main/Glue/glue030.sv"
click node_n_memcycle "https://github.com/techav-homebrew/wrap030/blob/main/Glue/memcycle.sv"
click node_n_buserror "https://github.com/techav-homebrew/wrap030/blob/main/Glue/buserror.sv"
click node_n_aciacycle "https://github.com/techav-homebrew/wrap030/blob/main/Glue/aciacycle.sv"
click node_n_memory "https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/Memory/Project/Wrap030 Memory.sch"
click node_n_video "https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/Video/Video-Board_Schematic.pdf"
click node_n_octocom "https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/OctoCom/OctoCom.kicad_sch"
click node_n_quadcom "https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/QuadCom_8b/QuadCom_8b.kicad_sch"
click node_n_exp8b "https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/Exp8b/Exp8b.kicad_sch"
click node_n_atxpsu "https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/ATX-PSU_8b/ATX-PSU_8b.kicad_sch"
click node_n_mezz "https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/Mezzanine/README.md"
click node_n_bootloader "https://github.com/techav-homebrew/wrap030/tree/main/Software/Bootloader/Makefile"
click node_n_multibasic "https://github.com/techav-homebrew/wrap030/tree/main/Software/MultiBasic/Makefile"
click node_n_ehbasic "https://github.com/techav-homebrew/wrap030/blob/main/Software/EHBASIC/EhBasic030.asm"
click node_n_fpubasic "https://github.com/techav-homebrew/wrap030/blob/main/Software/FPU-EHBASIC/FPUBasic030.asm"
click node_n_rom128k "https://github.com/techav-homebrew/wrap030/blob/main/Software/ROM128k/README.md"
click node_n_tsmon "https://github.com/techav-homebrew/wrap030/blob/main/Software/TSMON/TSMON_68030.X68"
click node_n_tests "https://github.com/techav-homebrew/wrap030/blob/main/Software/Test Code/testprogram.x68"
click node_n_utilities "https://github.com/techav-homebrew/wrap030/blob/main/Utilities/srecLoadRAMlin.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_n_board,node_n_gerbers,node_n_bom,node_n_glue030,node_n_memcycle,node_n_buserror,node_n_aciacycle toneBlue
class node_n_memory,node_n_video,node_n_octocom,node_n_quadcom,node_n_exp8b,node_n_atxpsu,node_n_mezz toneAmber
class node_n_bootloader,node_n_multibasic,node_n_ehbasic,node_n_fpubasic,node_n_rom128k,node_n_tsmon,node_n_tests toneMint
class node_n_utilities toneRose
```

## Components

### Core hardware

Base Wrap030 motherboard design and manufacturing outputs.

- [Wrap030 board](https://github.com/techav-homebrew/wrap030/blob/main/Schematic.pdf): 68030 motherboard · Core 68030-based system board and central hardware design. · `Schematic.pdf`
- [Gerbers](https://github.com/techav-homebrew/wrap030/tree/main/Gerbers): fab outputs · Production fabrication package for the main board. · `Gerbers`
- [BOM](https://github.com/techav-homebrew/wrap030/blob/main/BillOfMaterials.csv): parts list · Bill of materials for the main platform. · `BillOfMaterials.csv`
- [Glue logic](https://github.com/techav-homebrew/wrap030/blob/main/Glue/glue030.sv): systemverilog · Main bus and timing control logic for the motherboard. · `Glue/glue030.sv`
- [Mem cycles](https://github.com/techav-homebrew/wrap030/blob/main/Glue/memcycle.sv): systemverilog · Memory-cycle control and timing boundary logic. · `Glue/memcycle.sv`
- [Bus error](https://github.com/techav-homebrew/wrap030/blob/main/Glue/buserror.sv): systemverilog · Bus fault and error handling logic. · `Glue/buserror.sv`
- [ACIA cycle](https://github.com/techav-homebrew/wrap030/blob/main/Glue/aciacycle.sv): systemverilog · Serial/ACIA-related cycle control logic. · `Glue/aciacycle.sv`

### Expansion boards

Peripheral and add-on board family.

- [Memory board](https://github.com/techav-homebrew/wrap030/blob/HEAD/ExpansionBoards/Memory/Project/Wrap030%20Memory.sch): expansion pcb · Memory expansion board with its own glue logic. · `ExpansionBoards/Memory/Project/Wrap030 Memory.sch`
- [Video board](https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/Video/Video-Board_Schematic.pdf): expansion pcb · Video expansion board and glue logic for display interfacing. · `ExpansionBoards/Video/Video-Board_Schematic.pdf`
- [OctoCom](https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/OctoCom/OctoCom.kicad_sch): expansion pcb · Multi-port communications board with programmable logic. · `ExpansionBoards/OctoCom/OctoCom.kicad_sch`
- [QuadCom 8b](https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/QuadCom_8b/QuadCom_8b.kicad_sch): expansion pcb · Eight-bit communications expansion board. · `ExpansionBoards/QuadCom_8b/QuadCom_8b.kicad_sch`
- [Exp8b](https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/Exp8b/Exp8b.kicad_sch): expansion pcb · General 8-bit expansion board with connector-focused mechanics. · `ExpansionBoards/Exp8b/Exp8b.kicad_sch`
- [ATX PSU](https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/ATX-PSU_8b/ATX-PSU_8b.kicad_sch): expansion pcb · ATX power-supply interface board for the platform. · `ExpansionBoards/ATX-PSU_8b/ATX-PSU_8b.kicad_sch`
- [Mezzanine](https://github.com/techav-homebrew/wrap030/blob/main/ExpansionBoards/Mezzanine/README.md): expansion interface · Mezzanine adapter and glue logic for board-level interfacing. · `ExpansionBoards/Mezzanine/README.md`

### Firmware stack

Boot, monitor, ROM, and runtime software.

- [Bootloader](https://github.com/techav-homebrew/wrap030/tree/main/Software/Bootloader/Makefile): firmware · Standalone boot environment with disk and serial support. · `Software/Bootloader/Makefile`
- [MultiBasic](https://github.com/techav-homebrew/wrap030/tree/main/Software/MultiBasic/Makefile): runtime/kernel · Layered kernel plus BASIC runtime and disk access stack. · `Software/MultiBasic/Makefile`
- [EHBASIC](https://github.com/techav-homebrew/wrap030/blob/main/Software/EHBASIC/EhBasic030.asm): basic runtime · Standalone EhBASIC system and demo programs. · `Software/EHBASIC/EhBasic030.asm`
- [FPU BASIC](https://github.com/techav-homebrew/wrap030/blob/main/Software/FPU-EHBASIC/FPUBasic030.asm): basic runtime · Floating-point enabled BASIC variant. · `Software/FPU-EHBASIC/FPUBasic030.asm`
- [ROM128k](https://github.com/techav-homebrew/wrap030/blob/main/Software/ROM128k/README.md): rom firmware · ROM-resident monitor and utility firmware. · `Software/ROM128k/README.md`
- [TSMON](https://github.com/techav-homebrew/wrap030/blob/main/Software/TSMON/TSMON_68030.X68): monitor firmware · Monitor and expROM support for low-level machine control. · `Software/TSMON/TSMON_68030.X68`
- [Test code](https://github.com/techav-homebrew/wrap030/blob/HEAD/Software/Test%20Code/testprogram.x68): bring-up · Hardware validation and timing test programs. · `Software/Test Code/testprogram.x68`

### Host tools

PC-side loaders and support utilities.

- [Load tools](https://github.com/techav-homebrew/wrap030/blob/main/Utilities/srecLoadRAMlin.py): host utilities · PC-side S-record and RAM loading tools. · `Utilities/srecLoadRAMlin.py`

## Connections

- Wrap030 board → Glue logic: controls · Main motherboard depends on glue logic for bus coordination.
- Wrap030 board → Gerbers: fabricated as · Core board is exported into production Gerbers.
- Wrap030 board → BOM: specified by · Bill of materials defines the main hardware build.
- Glue logic → Mem cycles: includes · Core glue is split into specialized cycle controllers.
- Glue logic → Bus error: includes · Core glue includes bus fault handling.
- Glue logic → ACIA cycle: includes · Core glue includes ACIA/serial cycle control.
- Memory board → Glue logic: interfaces with · Memory board uses glue logic to adapt to the system bus.
- Video board → Glue logic: interfaces with · Video board connects through board-specific glue logic.
- OctoCom → Glue logic: interfaces with · Communications expansion uses programmable interface logic.
- QuadCom 8b → Glue logic: interfaces with · Communications expansion attaches to the main bus.
- Exp8b → Glue logic: interfaces with · General expansion board connects through the motherboard boundary.
- ATX PSU → Wrap030 board: powers · ATX PSU board supports system power integration.
- Mezzanine → Wrap030 board: adapts · Mezzanine layer bridges the core platform to add-ons.
- Bootloader → ACIA cycle: uses serial · Bootloader communicates over ACIA/serial paths.
- Bootloader → Load tools: loaded by · Bootloader and test images are transferred with host tools.
- Bootloader → ROM128k: boots into · Bootloader hands off to monitor/ROM environments.
- MultiBasic → Bootloader: built on · MultiBasic sits above boot and low-level services.
- MultiBasic → EHBASIC: contains · MultiBasic embeds an EhBASIC execution environment.
- MultiBasic → Load tools: loads via · Runtime can be populated with host-side loaders.
- EHBASIC → Video board: drives · Basic demos can target the video expansion.
- FPU BASIC → ROM128k: extends · FPU BASIC variant aligns with ROM-resident firmware support.
- ROM128k → TSMON: shares monitor · ROM utilities and monitor code form a low-level firmware stack.
- Test code → Glue logic: validates · Bring-up programs are used to validate timing and board behavior.
- Test code → Load tools: loaded by · Test images are typically transferred from a host via loaders.
