Hi, Can someone help me with the CD-ROM pathtable structure? There must be some sort of structure in it!
I've included one example of a pathtable. Hoping someone can help me. Greetz, Martijn Groen
You may read the pathtable from SAM Basic: 10 LET adr=81920 20 READ *0,0,16,0,adr (B-DOS command only!) This will read the Primary Volume Descriptor sector from CD-ROM. 30 LET size=DPEEK (adr+132) (size of pathtable) 40 LET a=PEEK (adr+142), b=PEEK (adr+143) 50 LET c=PEEK (adr+140), d=PEEK (adr+141) 60 READ *a,b,c,d,adr This will read the pathtable at adr. Variable c will usually be 18,19 or 20 Variables a,b,c & d specify the 32-bit sector address a = 32-bit high, LSB b = 32-bit high, MSB c = 32-bit low, LSB d = 32-bit low, MSB READ *a,b,c,d,adr,sectors may also be used. This will read multiple sectors from CD-ROM. Note that each CD-ROM sector will be 2048 bytes. That's four times bigger than standard floppy & harddisk sectors. CD-ROM's can have a maximum of 8 branches. Pathtable example: Heretic II Branch1 Branch2 Branch3 Branch4 ROOT BIN (1) HELP ---- IMAGES (1) (3) SETUP ---- BASE ---- VIDEO (1) (4) (6) ---- DIRECTX ---- DRIVERS ---- ENG (11) (4) (7) ---- FRN (11) ---- GER (11) ---- ITN (11) ---- SPA (11) ---- GAMESPY (4) ---- TOOLKIT (4) Pathtable at adr: Notice that I'v not included the 4-byte startsector in each entry. 1,0 1,0 - Root entry (not important) 0,0 3,0 - length of dir. name 1,0 - some sort of code BIN - dir. name 0 - belongs to this or next entry? 4,0 1,0 HELP 5,0 1,0 SETUP 0 6,0 3,0 IMAGES 4,0 4,0 BASE 7,0 4,0 DIRECTX 0 7,0 4,0 GAMESPY 0 7,0 4,0 TOOLKIT 0 5,0 6,0 VIDEO 0 7,0 7,0 DRIVERS 0 3,0 11,0 ENG 0 3,0 11,0 FRN 0 3,0 11,0 GER 0 3,0 11,0 ITN 0 3,0 11,0 SPA 0