Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Yes, dynamic CHS! (Developers)

posted by RayeR Homepage, CZ, 29.11.2008, 22:20

> The flash disk geometry is not necessarily fixed, BIOS may try to adjust
> it somehow (by looking into Partition Table? or Partition Boot
> Record?)...

Yes you got point, the CHS is not hardcoded but T20 BIOS will asign it according partition table or bootsector BPB. I just tried to make a new image with different CHS=140/16/32 (now any problems in BOCHS) and flashed it with new fw. I load my HDD BIOS info via GROB4DOS and it displayed:

[image]
heads=16, cyls=139, spt=32
drive type=HDD, sectors=0x16000001 (369098753) - bullshit

And for comparison here's output from BOCHS:

  Booting 'FreeDOS kernel 2038'

INT 13h/08h (DH=heads-1, CX15:6=cyls-1, CX5:0=sec/track-1):
F=0206 CS=0000 SS=0000 ES=0000 DS=0000 DI=7C00 SI=0142 BP=1ED8 SP=1E5A
BX=8107 DX=0F01 CX=8A20 AX=0000

INT 13h/15h (AH=type [3=HDD], CX:DX=sectors):
F=0206 CS=0000 SS=0000 ES=0000 DS=0000 DI=7C00 SI=017E BP=1ED8 SP=1E5A
BX=8107 DX=1600 CX=0001 AX=0300

heads=16, cyls=139, spt=32
drive type=HDD, sectors=0x00011600 (71168 = 139*16*32)

As you can see CHS is the same, so T20 BIOS was adapted to new geometry. But there's an obvios bug in functiom 15h where CX:DX is swapped! I don't know if this can confuse FD kernel. But FD krernel (2038cvs) still fails boot and halt after INITDISK. BTW I tried both version compiled by WC and TC and it behaves different. WC version stops with interrupt divide by zero and TC version starts to endlessly flood the screen by missing command interpretter or so.
BTW as I said before, GRUB and NTLDR can read large files (like linux kernel) without any corruption why FD kernels read it different?

---
DOS gives me freedom to unlimited HW access.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 272 users online (0 registered, 272 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum