![]() |
![]() |
![]() |
![]() |
![]() |
Make 'Ys I & II Eternal Story' playable.
Posted on 2006-01-11 00:00:00 |
Documentation was right about the FDEC command: FB bits must be skipped before reading the 32-bits value. The library keeps the last result of FDEC and returns it when a request to execute this command is issued, rather than returning the result of the current command.
Now it is able to go through the bits of the MPEG-2 sequence header structure and save the values it needs. Then it comes to checking the "load intra quantization matrix" bit, which is set to 0 in the case of this movie, and does a bit of gymnastic to be able to load the default matrix once again... - Since the FIFO already has some data in it, the library can't just write the matrix in the FIFO because it would be stored at the end of the buffer. So what it does is call one of those custom handlers to save the state of the IPU DMA channels and of IPU_CTRL and IPU_BP. - Once that's done, the FIFO buffer is reset and the library DMAs (using normal mode) the matrix and sends the SETIQ command. - Another custom handler is called that restores the state of the IPU saved previously and processing continues "normally". But this process doesn't work properly yet. I've added the normal mode for DMA channel 4, added reading for the missing registers for this channel. Tomorrow I'll be checking on making the values present in IPU_BP accurate to make the library routine able to restore its state properly. |