By Aidan Hutchinson, 06/02/2025
A Windows application for detokenizing and deobfuscating BBC BASIC source code files from Acorn/RISC OS systems. Features syntax highlighting similar to Visual Studio's style.
- Detokenization: Converts tokenized BBC BASIC files (
.bas
) back into readable text - Deobfuscation: Intelligently renames variables and procedures to make code more readable
- Syntax Highlighting: Visual Studio-style syntax highlighting for:
- BBC BASIC keywords
- String literals
- Numbers (including hexadecimal)
- Comments
- Procedures and Functions
- SYS calls
- Operators
- Download the latest release from the releases page
- Extract the ZIP file to your desired location
- Run
AcornUnObfuscate.exe
- Click
File -> Open
or pressCtrl+O
- Select a BBC BASIC file (
.bas
extension or All Files to load ,bas file) - The detokenized source code will be displayed with syntax highlighting
- Open a BBC BASIC file
- Click
Deobfuscate -> Deobfuscate
to process the code - The deobfuscated version will appear with:
- Meaningful variable names
- Restructured procedure names
- Preserved functionality
- Use
Deobfuscate -> Revert Changes
to return to the original code
- BBC BASIC V tokenized files (
.bas
) - Files from RISC OS and earlier Acorn systems
The application handles the BBC BASIC V file format which includes:
- Line-based structure with line numbers
- Tokenized keywords
- Special handling for PROC/FN definitions
- SYS call formatting
- REM statement preservation
Variables are renamed based on their:
- Usage context
- Data type (%, $, or no suffix)
- Scope (LOCAL or global)
- Relationship to procedures
Procedures are renamed based on their:
- Functionality
- System call patterns
- Usage context
- Visual Studio 2022
- .NET 8
- Clone the repository:
git clone https://github.com/aidanhutch/AcornUnObfuscate.git
-
Open
AcornBasicDetokenizer.sln
in Visual Studio -
Build the solution:
In Visual Studio press F5 or click green arrow to Build/Run app. Or in Visual Studio Code Terminal window type:
dotnet build
- Clone the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Contact me for review
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the Acorn/RISC OS community for documenting the BBC BASIC file format
- Built on research and documentation about the BBC BASIC tokenization system
- Inspired by the need for modern tools to work with classic Acorn software
Aidan Hutchinson - @aidanhutch
- 1.0.0
- Initial release
- Basic detokenization and syntax highlighting
- 1.1.0
- Added deobfuscation feature
- Improved syntax highlighting
- 1.2.0
- Enhanced Visual Studio-style theme
- Bug fixes for keyword highlighting