Menu

#191 xplus4 does not support FLI

v2.4.x
open
None
TED
2 days ago
2011-03-10
MagerValp
No

A completely distorted image is displayed instead of the pretty picture from http://plus4world.powweb.com/software/Wonderland

Discussion

  • MagerValp

    MagerValp - 2011-03-10

    FLI image

     
  • Michael Martin

    Michael Martin - 2019-02-25

    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.

     
  • gpz

    gpz - 2019-09-01
    • assigned_to: Michael Martin
     
  • gpz

    gpz - 2021-10-26
    • Category: xplus4 --> TED
     
  • Leandro Nini

    Leandro Nini - 3 days ago

    This random change fixes Sweet DFLI, so it looks like a timing problem (works only with values 8 or 9):

    --- a/src/plus4/ted-mem.c
    +++ b/src/plus4/ted-mem.c
    @@ -720,7 +720,7 @@ inline static void ted1c1d_store(uint16_t addr, uint8_t value)
             } else {
                 diff = ted.screen_height - new_raster;
             }
    
    -        ted.fetch_clk = ted.last_emulate_line_clk + TED_FETCH_CYCLE + diff * ted.cycles_per_line;
    +        ted.fetch_clk = ted.last_emulate_line_clk + TED_FETCH_CYCLE + diff * ted.cycles_per_line + 8;
    
             alarm_set(ted.raster_fetch_alarm, ted.fetch_clk);
         }
    

    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.

     
  • Leandro Nini

    Leandro Nini - 2 days ago

    Alpharay in game is broken too.
    It writes to $FF1E but there is also something else wrong in the bottom half of the screen.

     

Log in to post a comment.