Integrating AI with Retro Hardware: A Commodore 64 LLM Module
Konrad Jedrzejczyk, Marek Zmyslowski
Security Fest 2025 · Day 2 · Main Stage
Overview
In a captivating presentation at Security Fest, Konrad Jedrzejczyk and Marek Zmyslowski unveiled an ambitious project that bridges the gap between vintage computing and cutting-edge artificial intelligence. Their talk, "Integrating AI with Retro Hardware: A Commodore 64 LLM Module," detailed the journey of connecting a modern Large Language Model (LLM) to a classic Commodore 64, transforming the iconic 8-bit machine into an interactive AI terminal. This endeavor goes beyond mere novelty, aiming to create a functional "tool, not a toy" that is both historically authentic and genuinely useful for retro computing enthusiasts seeking to tap into a vast knowledge base.

Key moments
- 0:00 Introduction and speaker's Commodore 64 passion
- 3:00 Previous C64 projects, including early LLM connection
- 3:30 Why Commodore 64? Its unique community and capabilities
- 5:50 The challenge: Creating a dedicated AI module for C64
- 6:20 Challenge rules: 80s tech, compatibility, non-intrusive design
- 9:10 Historical C64 machine learning using daisy-chained floppies
Integrating AI with Retro Hardware: A Commodore 64 LLM Module
Speakers: Konrad Jedrzejczyk; Marek Zmyslowski
Conference: Security Fest
YouTube: https://www.youtube.com/watch?v=Znl7TBFAz9E
Overview
In a captivating presentation at Security Fest, Konrad Jedrzejczyk and Marek Zmyslowski unveiled an ambitious project that bridges the gap between vintage computing and cutting-edge artificial intelligence. Their talk, "Integrating AI with Retro Hardware: A Commodore 64 LLM Module," detailed the journey of connecting a modern Large Language Model (LLM) to a classic Commodore 64, transforming the iconic 8-bit machine into an interactive AI terminal. This endeavor goes beyond mere novelty, aiming to create a functional "tool, not a toy" that is both historically authentic and genuinely useful for retro computing enthusiasts seeking to tap into a vast knowledge base.
The motivation behind this unique integration stems from the speakers' deep passion for Commodore computers and a perceived void in the market: while contemporary systems boast dedicated AI modules, no such solution existed for the venerable C64. The challenge was to develop an external AI module that adhered to strict design principles, including compatibility with 1980s technology aesthetics, broad Commodore system compatibility, non-compromised C64 functionality, ease of replication, and practical utility. This article delves into the intricate technical decisions, hardware challenges, and software innovations that brought this extraordinary vision to life.
Background
▶ Watch: Introduction and speaker's Commodore 64 passion (0:00)
Konrad Jedrzejczyk, an experienced cybersecurity researcher and co-author of several books, is an ardent collector and restorer of Commodore computers, boasting over 110 working 8-bit machines. His deep engagement with retro hardware extends to advanced electronics, including building a custom C64 mainboard with meticulously sourced, high-grade components costing over €1,000 to ensure longevity and performance. Jedrzejczyk's past work includes demonstrating penetration testing capabilities with an unexpanded Commodore 64, performing cross-site scripting, open relay abuse, and even exploiting Shellshock, highlighting the unexpected potential of these vintage systems in modern security contexts. He also previously connected a C64 to a locally hosted LLM two years prior, a concept then considered groundbreaking.
The inspiration for the LLM module project arose from the observation that modern computers (Macs, PCs) increasingly feature dedicated AI modules, a capability conspicuously absent for the Commodore 64. Recognizing the C64's unparalleled legacy in fostering the cybersecurity community and its enduring versatility (from Bitcoin mining to ported games and operating systems), the speakers saw an opportunity to push its boundaries further. The project was framed as a challenge with specific rules: the module had to resemble 1980s technology, be compatible with as many Commodore computers as possible, not compromise the C64's core functionality, be easily replicable, and serve as a working tool rather than a mere proof-of-concept. This commitment to authenticity and utility guided every design decision, from interface selection to the underlying AI architecture.
Key Findings
▶ Watch: Why Commodore 64? Its unique community and capabilities (3:30)
The primary key finding of this project is the successful and practical integration of modern Large Language Model (LLM) capabilities with a vintage Commodore 64 computer, achieved through a meticulously designed external hardware module and a sophisticated software approach based on Retrieval Augmented Generation (RAG). The speakers demonstrated that while direct fine-tuning of small LLMs for highly specialized, detailed knowledge (like Commodore documentation) proved ineffective due to model size limitations, a RAG-based system could provide accurate, contextually relevant answers sourced from a proprietary dataset.
Crucially, the team identified the Commodore 64 user port as the optimal interface, satisfying the stringent requirements of preserving C64 functionality and ensuring broad compatibility across various Commodore models (including the VIC-20 and Commodore 128). This choice allowed the integration of a powerful external mini-computer, the Radxa Zero (equipped with 8GB RAM), to handle the compute-intensive AI tasks, effectively offloading the processing burden from the C64's 8-bit CPU. The project successfully delivered a functional terminal experience on the C64, allowing users to query a knowledge base about the computer itself, thereby transforming a retro machine into an interactive, knowledgeable assistant.
Technical Deep Dive
▶ Watch: The challenge: Creating a dedicated AI module for C64 (5:50)
The technical execution of the Commodore 64 LLM module involved a series of deliberate hardware and software design choices, each carefully weighed against the project's stringent rules for authenticity, compatibility, and functionality.
Interface Selection
A critical early decision was selecting the appropriate interface for connecting the external AI module to the Commodore 64. Several options were considered and rejected:
- Expansion Port: While offering extensive control, including the ability to disable the C64's CPU and directly access memory, this was deemed unacceptable as it would compromise the computer's existing functionality and prevent the use of other popular expansion devices like the Chameleon or Ultimate 1541.
- Floppy Drive Port: Konrad's prior experience with daisy-chaining floppy drives for distributed machine learning (using their integrated 6502 CPUs and 2KB memory) made this an attractive option for data transfer. However, many modern external memory solutions also utilize this port, making it difficult to integrate without conflict.
- Tape Port: While controllable, the tape port was rejected primarily because many contemporary C64 peripherals draw power from it, posing compatibility and power delivery issues for an external module.
The chosen interface was the user port. This port, traditionally used for printers, is largely unused by modern C64 peripherals and emulators. This made it an ideal candidate, as it would not interfere with existing functionality or popular expansions, and crucially, the communication scheme and pin voltages were consistent across multiple Commodore models, including the VIC-20, C64 (all versions), and Commodore 128, ensuring broad compatibility.
External Compute and Power Management
To host the LLM and RAG components, a powerful yet compact external computer was required. The team rejected larger solutions like the Raspberry Pi due to their bulk. They ultimately selected the Radxa Zero, a compact single-board computer, specifically the 8GB RAM version. This choice provided sufficient memory to run larger LLM models and associated software.
However, integrating the Radxa Zero presented a significant power challenge. The C64's user port can supply a maximum of 100 milliamps (mA), whereas the Radxa Zero consumes up to 2.5 amps (A). This necessitated an external power supply for the Radxa Zero, ensuring the C64's internal components (like the CIA IC directly connected to the user port) were not overloaded. Furthermore, the Radxa Zero's form factor required custom modification for cooling, as it lacked downward-facing pins for heatsinks and manufacturer support for such modifications. To convert voltage levels for communication between the C64's user port and the Radxa Zero, the team employed a MAX232 IC. This component was a deliberate choice, as it was commonly found in 1980s schematics, adhering to the project's requirement for 80s-similar technology.
Software Delivery and LLM Strategy
Delivering the necessary terminal software to the C64 without compromising its expansion port required an innovative approach. The team opted for a dedicated Magic Desk cartridge. This cartridge, whose PCB design is readily available, was programmed with custom terminal software, allowing the C64 to communicate with the external Radxa Zero. A custom 3D-printed case, created using a bamboo printer acquired specifically for the project, housed the cartridge, further enhancing its retro aesthetic.
The core of the AI component involved a two-stage strategy:
- Initial Fine-tuning Attempt: The initial plan was to fine-tune a small LLM, TinyLlama (specifically the instruct version), with extensive Commodore-specific knowledge. Konrad, with his vast collection of 360 Commodore books in PDF format, provided the dataset. The preprocessing of these books was a significant undertaking: many were old, and some PDFs contained only images, requiring Optical Character Recognition (OCR) to extract text. This extracted data was then sent to ChatGPT API for further preprocessing into an appropriate format for fine-tuning. This process incurred a cost of over $250. However, this attempt ultimately failed. The TinyLlama model, despite its instruction-tuned nature, proved too small to adequately handle the highly technical and detailed knowledge contained within the Commodore books. It was unable to retain the vast amount of specialized information, leading to nonsensical outputs.
- Retrieval Augmented Generation (RAG) Implementation: Recognizing the limitations of direct fine-tuning, the team pivoted to a Retrieval Augmented Generation (RAG) architecture. RAG addresses the problem of LLMs hallucinating or lacking domain-specific knowledge by providing an external, up-to-date knowledge base that the LLM can query. The implementation involved a "naive RAG" setup, comprising:
- An LLM model (still TinyLlama, but now used for processing and generation, not solely for knowledge retention).
- A separate text embedding model (G embedding model was specifically mentioned). This model converts the chunks of the Commodore PDF documents into numerical vector representations, which are then stored in a vector database.
- When a query is received, the embedding model converts it into a vector, which is used to search the vector database for the most relevant document chunks. These chunks are then provided as context to the LLM, enabling it to generate accurate, informed responses.
This RAG approach proved highly effective, allowing the system to provide precise answers about Commodore 64 topics, complete with source references from the original documentation. The RAG management system allowed for easy updates and additions to the knowledge base.
Demo / Proof of Concept
▶ Watch: Challenge rules: 80s tech, compatibility, non-intrusive design (6:20)
The culmination of the project was a live demonstration, meticulously recorded on a DVD recorder to maintain the authentic retro feel, showcasing the module's functionality. The demo commenced with the C64 running the custom terminal program, configured to communicate at 300 baud (a speed chosen for ease of video recording and debugging).
The initial phase of the demo illustrated the failure of the fine-tuning approach. When the C64 queried the TinyLlama model directly (without RAG) about Commodore 64 specifics, the responses were, as described by the speakers, "a bunch of nonsense." This clearly highlighted the model's inability to retain detailed, parametric knowledge about a niche subject.
The demonstration then transitioned to the Retrieval Augmented Generation (RAG) setup. After loading the Commodore 64 PDFs into a vector storage and activating the RAG project, the same question was posed from the C64. This time, the answer was "very precise and after this very proper answer, the chunks of data, the sources, were also displayed." The system effectively retrieved relevant information from the external knowledge base and presented it through the C64's 40-column display (a choice made for better video quality for the audience, despite the C64's capability for software-generated 80-column displays). The demo confirmed that the embedding model had successfully chosen relevant text segments, providing accurate and contextualized information, thereby validating the RAG approach as a viable solution for integrating LLM capabilities with retro hardware for domain-specific queries.
Defensive Implications
▶ Watch: Historical C64 machine learning using daisy-chained floppies (9:10)
While the "Integrating AI with Retro Hardware" talk is primarily a technical showcase of innovation and retro computing passion, its defensive implications, though not explicitly security-focused in the context of vulnerabilities, can be viewed through several lenses related to cybersecurity.
Firstly, the project underscores the unexpected capabilities that can be unlocked by integrating disparate technologies, even those decades apart. The speakers' prior work, such as using an unexpanded Commodore 64 for cross-site scripting and Shellshock exploits, serves as a stark reminder that any connected device, regardless of its vintage, can potentially be weaponized or become a vector in a larger attack surface. Defenders should not dismiss older hardware as inherently secure due to obscurity; rather, they must consider the entire technology stack, including legacy systems, if they are part of a network or system that processes sensitive information.
Secondly, the successful implementation of Retrieval Augmented Generation (RAG) has significant positive implications for defensive security operations. In cybersecurity, access to accurate, up-to-date, and contextually relevant information is paramount. Security analysts often sift through vast amounts of documentation, threat intelligence reports, and internal knowledge bases. A RAG system, like the one demonstrated, can provide a powerful tool for quickly querying and retrieving precise answers, complete with verifiable sources. This capability can enhance incident response, vulnerability research, and compliance auditing by enabling rapid access to critical information, reducing the risk of human error or misinterpretation that might arise from relying solely on an LLM's parametric knowledge, which can sometimes "hallucinate." The ability to display "chunks of data, the sources" directly contributes to explainability and trustworthiness, which are crucial for security decisions.
Finally, the project implicitly highlights the importance of understanding hardware limitations and power management in any integration. The challenges faced with the Radxa Zero's power consumption and cooling, and the need for a MAX232 for voltage conversion, demonstrate that even seemingly minor hardware details can have significant operational and, potentially, security impacts if not properly addressed. In a defensive context, neglecting such foundational elements could lead to system instability, unexpected behavior, or even create new avenues for attack if power or communication interfaces are mishandled.
Key Takeaways
- Successful Retro AI Integration: The project successfully integrated a modern LLM (via RAG) with a vintage Commodore 64, creating a functional AI module that provides accurate, domain-specific information.
- Strategic Interface Selection: The user port proved to be the optimal interface for the C64, ensuring broad compatibility across multiple Commodore models and preserving the computer's existing functionality without compromise.
- RAG Overcomes LLM Limitations: Retrieval Augmented Generation (RAG) was crucial for providing accurate answers to detailed, niche questions about the Commodore 64, overcoming the inability of small LLMs like TinyLlama to retain such vast and specific parametric knowledge through fine-tuning alone.
- Hardware Challenges and Solutions: Integrating modern compute (Radxa Zero) with retro hardware required careful management of power consumption (external supply) and voltage conversion (MAX232 IC), adhering to the 80s technology aesthetic.
- "Tool, Not a Toy" Philosophy: The project's commitment to creating a genuinely usable tool, rather than just a proof-of-concept, resulted in a system capable of providing verifiable, source-backed answers, enhancing the utility of the retro computer.
- Replicability Concerns: While functional, the current design presents challenges for easy replication due to specific component availability (e.g., MAX232 modules with downward-facing pins) and the need for advanced electronics experience.
About the Speaker(s)
Konrad Jedrzejczyk is an experienced cybersecurity researcher and a co-author of several cybersecurity books. Beyond his professional work, he harbors a profound passion for retro computing, particularly the Commodore 64. His extensive collection includes over 110 working 8-bit Commodore computers, and he is known for his advanced electronics hobby, demonstrated by his meticulous custom build of a C64 mainboard using high-grade components. Konrad has a history of pushing the boundaries of retro hardware, including past projects showcasing penetration testing capabilities with unexpanded Commodore 64s and connecting a C64 to a local LLM.
Marek Zmyslowski is also an experienced cybersecurity researcher and co-author, sharing a similar professional background with Konrad. He brings expertise in programming and has prior experience with developing scalable, corporate-type Retrieval Augmented Generation (RAG) software, even from the early days when models accepted only up to 2K tokens at the encoder. His background was instrumental in designing and implementing the RAG architecture for the Commodore 64 LLM module, ensuring the project's success in delivering accurate and reliable AI responses. Both speakers are from Poland.