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,920 of 4,255   
   JJ to muta...@gmail.com   
   Re: ISO CD image   
   29 Oct 21 20:25:40   
   
   From: jj4public@gmail.com   
      
   On Thu, 28 Oct 2021 12:36:26 -0700 (PDT), muta...@gmail.com wrote:   
   >   
   > I didn't quite understand this sentence. Did you mean to   
   > say "same SIZED sectors BUT they're not part"?   
      
   All information are stored in sectors. In a CD/DVD, there are user data   
   sectors where we normally store data like files; and special sectors for TOC   
   and ID which are outside of the user data sectors which requires different   
   command to access.   
      
   > 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.   
      
   Yes. If you want the TOC to be like a file, the BIOS would need to be aware   
   of the TOC data structure, in order to know the size of the TOC data. Though   
   IMO, TOC is kind of low level file system that deals with tracks rather than   
   directory/file. So in a sense, the BIOS needs to be aware of that low level   
   file system.   
      
   > I guess ideally if I then start doing fgetc() I will end up with an   
   > ISO image.   
   >   
   > All doable?   
      
   Yes, assuming what the `fgetc()` does is to read the user data sectors in   
   non raw mode. Because the ISO file format (i.e. the *.iso) is only for one   
   track non raw sector data (2048 bytes sector) excluding track pre-gap. It   
   doesn't contain any TOC. TOC is usually saved as *.cue file.   
      
   > 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.   
      
   Then you just need to make sure your'e reading the sectors in non raw mode.   
   i.e. as 2048 bytes sectors.   
      
   --- 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