Hi all, first post!
I woke up one day and wanted to face a completely new challenge in programming for educational purposes.
The task: Burning an ISO-image to a CD-RW using SPTI. (Which is completely new to me)
I’ve been reading the MMC and SPC documents, and also different threads on this forum to figure out how to command the drive. I’ve come quite far I think but I need some help for my last steps.
This is what I’m doing…
A formatted, blank, CD-RW is mounted in drive.
Not doing any actual checks in my code (media capacity, format, profile etc). I know I’m lazy but I just want to see the CD-image written to the disc by my own commands, nothing more, nothing less.
1. Sending Write parameters mode page
Data block type=8 (2048bytes)
Session format code=00 (00 = CD-DA, or CD-ROM or other data disc)
FP=0(ignored if not packetwriting)
TrackMode=0110 (Data track, recorded uninterrupted, digital copy permitted)
[li]Ignored fields:[/li]Packet Size
Audio Pause Length
Media Catalog Number
2. Sending cue sheet
- [li]Cue sheet:[/li]The ISO image I’m trying to burn here is quite small. Only 00:11:73 in length. And as the 2 second pre-gap seems to be included in ISO images, so I don’t have to compensate for it.
61 00 00 01 00 00 00 00
61 01 00 10 00 00 00 00
61 01 01 10 00 00 02 00
61 aa 01 01 00 00 0b 49
[li]As you can see, I’ve set 4th byte (Data form) to be 01 for both Lead-in and lead-out. This will cause the drive to generate it, right?[/li][li]I’m using 61 for all entries, is this OK?[/li][li]This command fails when I tried to BCD-encode the MSFs. But I shouldn’t, right?[/li][/ul]
3. Writing (using Write(10) )
Starting to write at LBA -150
[li]For the first Write command. The drive fails with:[/li]5 2C 00 COMMAND SEQUENCE ERROR.
Can someone figure out why?
- How many blocks can I transfer with one Write(10) command? A whole CD if I wanted?
- Is it possible to use several Write(10) commands to complete one session/track? Or is that not permitted during “uninterrupted” writing?
4. Sync cache
[li]Not reached this far yet[/li][/ul]
I know it is a lot to ask and a lot of of information for you to analyze. But could could someone please try to answer my questions (greenish) and try to find the cause to the error (brownish)?
And if you see anything else that is completely insane in my procedure, please lecture me :o
Thanks for any help I can get!