Repository navigation
Conversation
…VDrive will share The GEOS installer and the TR block device each carry their own image geometry, BAM and directory code, and VDrive brings a third, more complete engine (40-track D64s, error bytes, BAM and directory growth for all three kinds, tested against c1541). Bring VDrive's engine in under Source/Teensy/DiskImage so the other two can move onto it. Nothing uses it yet. The copy differs from teensyrom-vdrive's d64/ only in what the firmware needs: SPDX lines, the placement macros moving into d64.h, and its three constant tables marked D64_FLASH so they land in PROGMEM rather than DTCM. DiskImage.h includes the code once for the single translation unit the firmware and the host harnesses build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X5t9wWXadFkQgKaCnjreF7
wesbiggs
marked this pull request as ready for review
November 4, 2026 05:10
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part 1 of a series of PRs to streamline and consolidate disk image (.d64/.d71/.d81) access, which will then be used to power the VDrive Special IO. This is a big hunk of code by itself, which is why I'm separating it out like this.
Rationale
The GEOS installer and the TR block device each carry their own image geometry, BAM and directory code, and VDrive brings a third, more complete engine (40-track D64s, error bytes, BAM and directory growth for all three kinds, tested against VICE's
c1541). This brings VDrive's engine in underSource/Teensy/DiskImage/so the other two can move onto it.State of affairs after this PR
Nothing uses it yet. The copy differs from teensyrom-vdrive's
d64/(commitb74ce37) only in what the firmware needs: SPDX lines, the placement macros moving intod64.h, and its three constant tables markedD64_FLASHso they land inPROGMEMrather than DTCM.DiskImage.hincludes the code once, for the single translation unit the firmware and the host harnesses build.Follow-up PRs move the block device, then the GEOS installer and boot-file reader, then the TR menu's D64/D71/D81 loading and directory listing onto it.
Memory
VD_COLD, whichDiskImage.hdefines asFLASHMEMon the firmware. None of it is reachable from the PHI2 ISR or an IO handler's cycle path.PROGMEM.mallocand adds no globals: all state lives in structs the caller owns, so it holds nothing in RAM1 or RAM2 between uses.DiskImage.hyet, so this PR doesn't change the TR or TR+ images. The RAM cost will show up in the follow-up PRs that call it, and those will report it.Docs
docs/Architecture/Disk-Images.md: what the engine is, where it came from, how a caller uses it, the size-to-format table, and its tests.docs/Architecture/Overview.md.Testing
Source/Teensy/tests/disk-image.test.js, which builds the engine with the firmware's warning flags as both C and C++. On a blank image of each kind it saves a file and reads it back, and it checks the size-to-format table.npm testpasses, and CI is green on both firmware builds (tr,tr-plus) and the tools job.Compatibility
No change to the remote protocol (
docs/ControlComms.md), the cartridge register map, the EEPROM settings or any timing.License
The engine is my own work from teensyrom-vdrive, which is MIT licensed. The files here carry
SPDX-License-Identifier: MIT.🤖 Generated with Claude Code