Skip to content

Conversation

@User65-87-11
Copy link

@User65-87-11 User65-87-11 commented Dec 15, 2025

when running QEMU and requesting geometry with CYL=1 it would return 0xff instead of 0.
BOCHS returns 0 as expected.
I have put [if] in case it is something important to have at least a zero check condition. But is it that important to have "1 reserverd" in an emulator?

Running bochs:

ata0-master: type=disk, path="\wsl.localhost\Debian\home\user\devel\os64\build\boot.img", cylinders=1, heads=1, spt=26
boot: disk

Running qemu:
qemu-system-x86_64.exe -device ide-hd,bus=ide.0,drive=disk0,cyls=1,heads=1,secs=26,bios-chs-trans=none -drive if=none,format=raw,id=disk0,file=\wsl.localhost\Debian\home\user\devel\os64\build\boot.img

bochs_sn9bJJsxEv brave_SlGHrBIe3j
disk_1308(struct bregs *regs, struct drive_s *drive_fl)
{

else if (regs->dl < EXTSTART_CD) {
        // Hard drive
        count = GET_BDA(hdcount);
        
		//is [nlc--] actually needed in an emulator?
		//when emulated CYL=1 Hard drive then double decrement causes ff to be returned by int 13h ah=08h
			
		// if(nlc > 0) 
        	// nlc--;  
		
    } 

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