Skip to content

Epic 01: Custom GEMDRIVE emulation#1

Merged
diegoparrilla merged 1 commit intomainfrom
epic/01-custom-gemdrive-emulation
Apr 30, 2026
Merged

Epic 01: Custom GEMDRIVE emulation#1
diegoparrilla merged 1 commit intomainfrom
epic/01-custom-gemdrive-emulation

Conversation

@diegoparrilla
Copy link
Copy Markdown
Contributor

Port GEMDRIVE emulation from md-drives-emulator into md-devops, with two deliberate divergences:

  • Default SD subfolder is /devops (was /hd), user-configurable.
  • m68k GEMDRIVE code is fully relocatable to a runtime-chosen RAM address (default screen_base - 8 KB), and the relocated start is adopted as the new _memtop so TOS does not allocate over the resident code. _memtop is also independently overridable.

Atari ST side (target/atarist/src):

  • New gemdrive.s blob placed at cartridge offset 0x0800 (6 KB), PC-relative throughout so it survives relocation.
  • main.s gains gemdrive_init: copies the blob to the configured RAM address at boot and patches _memtop.
  • Linker script renamed userfw.ld -> devops.ld; userfw.s removed.

RP2040 side (rp/src):

  • New gemdrive.c / gemdrive.h implementing the GEMDOS hooks.
  • aconfig adds GEMDRIVE_FOLDER, GEMDRIVE_RELOC_ADDR, DEVOPS_MEMTOP.
  • Menu/setup terminal ported from md-drives-emulator: term command level dispatcher, dual-font OLED strip, ESC p/q reverse-video title, browsable SD-card folder selector (sdcard_loadDirectory + navigate_directory pager), [E]xit wired to DISPLAY_COMMAND_START.

Build: BOOT.BIN at 7112 / 8192 bytes; rp UF2 builds clean.

Port GEMDRIVE emulation from md-drives-emulator into md-devops, with
two deliberate divergences:

- Default SD subfolder is /devops (was /hd), user-configurable.
- m68k GEMDRIVE code is fully relocatable to a runtime-chosen RAM
  address (default screen_base - 8 KB), and the relocated start is
  adopted as the new _memtop so TOS does not allocate over the
  resident code. _memtop is also independently overridable.

Atari ST side (target/atarist/src):
- New gemdrive.s blob placed at cartridge offset 0x0800 (6 KB),
  PC-relative throughout so it survives relocation.
- main.s gains gemdrive_init: copies the blob to the configured RAM
  address at boot and patches _memtop.
- Linker script renamed userfw.ld -> devops.ld; userfw.s removed.

RP2040 side (rp/src):
- New gemdrive.c / gemdrive.h implementing the GEMDOS hooks.
- aconfig adds GEMDRIVE_FOLDER, GEMDRIVE_RELOC_ADDR, DEVOPS_MEMTOP.
- Menu/setup terminal ported from md-drives-emulator: term command
  level dispatcher, dual-font OLED strip, ESC p/q reverse-video
  title, browsable SD-card folder selector (sdcard_loadDirectory +
  navigate_directory pager), [E]xit wired to DISPLAY_COMMAND_START.

Build: BOOT.BIN at 7112 / 8192 bytes; rp UF2 builds clean.
@diegoparrilla diegoparrilla merged commit 0b3e9f2 into main Apr 30, 2026
1 check passed
@diegoparrilla diegoparrilla deleted the epic/01-custom-gemdrive-emulation branch April 30, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant