home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,914 of 4,255   
   mutazilah@gmail.com to All   
   Re: ISO CD image   
   28 Oct 21 12:36:26   
   
   From: muta...@gmail.com   
      
   On Thursday, October 28, 2021 at 9:52:12 PM UTC+11, JJ wrote:   
      
   > > 1. Is the TOC also comprised of 2352-byte sectors?   
      
   > CD-ROM TOC uses the same sectors, the they're not part of normal user data   
   > sectors.   
      
   I didn't quite understand this sentence. Did you mean to   
   say "same SIZED sectors BUT they're not part"?   
      
   > There are special area for TOC only. Same goes to the CD-ROM ID   
   > sector which contains the media capacity, manufacturer, and dye type. The   
   > ATAPI command for accessing the TOC and ID are all different than the one   
   > used to access user data sectors.   
      
   Ok, a challenge! So if my BIOS does an fseek which positions   
   10 bytes before the end of the TOC, and then there is a BIOS   
   call to do an fread for 25 bytes, the BIOS will need to keep   
   track of how many bytes there are in the TOC, and then use   
   one ATAPI command to read a 2352-byte TOC sector, copy   
   the last 10 bytes, read the first 2352-byte data sector with a   
   different ATAPI command, copy the first 15 bytes.   
      
   So this implies the BIOS needs an fopen("0x81", "r+b") or   
   whatever to open the CDROM, and the BIOS will immediately   
   need to scan the CDROM to find out the size of the TOC, and   
   have a toc_size variable in its FILE structure.   
      
   I guess ideally if I then start doing fgetc() I will end up with an   
   ISO image.   
      
   All doable?   
      
   > The 2352 sector size is the raw size. It doesn't include sector   
   > synchromization, time address, sector mode, and error correction code. Only   
   > 2048 bytes is used for user data. Kind of like raw floppy sectors which   
   > include index, ID, and various types of gap; aside from user data.   
      
   I know I don't need those things for a floppy disk image.   
   Just a sequence of 512-byte blocks gives me everything   
   I need.   
      
   As far as I can tell, I don't need them for a CDROM either.   
      
   Thanks. Paul.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca