I took a look at that demo as well as http://plus4world.powweb.com/software/Sweet_DFLI_C16 (which also doesn't work, but gets about half the screen right including the part where DFLI is happening) and then fills the bottom of the screen with garbage instead. I think what is happening is that the core FLI effect (involving FF06 and FF14) actually works, but we are mishandling writes to FF1C through FF1E. Wonderland writes to FF1E, while Sweet DFLI C16 does not. Both write the 9-bit value in FF1C-D.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If someone understands the underlying problem it would be great as I have no clue. The register values seems good compared to yape, same 1C/1D writes:
Raster change old 002, new 0ca
Raster change old 0fa, new 016
Raster change old 016, new 116
Raster change old 023, new 0cb
Raster change old 0cb, new 078
As for Wonderland the $FF1E write is not implemented so it's no wonder (pun intended :P) it doesn't work. Reading from $1E is based on the cpu clock but there really should be a dot counter variable that holds the horizontal position and can be changed by register writes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FLI image
I took a look at that demo as well as http://plus4world.powweb.com/software/Sweet_DFLI_C16 (which also doesn't work, but gets about half the screen right including the part where DFLI is happening) and then fills the bottom of the screen with garbage instead. I think what is happening is that the core FLI effect (involving FF06 and FF14) actually works, but we are mishandling writes to FF1C through FF1E. Wonderland writes to FF1E, while Sweet DFLI C16 does not. Both write the 9-bit value in FF1C-D.
This random change fixes Sweet DFLI, so it looks like a timing problem (works only with values 8 or 9):
If someone understands the underlying problem it would be great as I have no clue. The register values seems good compared to yape, same 1C/1D writes:
As for Wonderland the $FF1E write is not implemented so it's no wonder (pun intended :P) it doesn't work. Reading from $1E is based on the cpu clock but there really should be a dot counter variable that holds the horizontal position and can be changed by register writes.
Alpharay in game is broken too.
It writes to $FF1E but there is also something else wrong in the bottom half of the screen.