Skip to content

50Hz light phaser bug #1

Description

@Naarshakta

I was playing with the light phaser library and I figured out that the inlib_pollLightPhaser_position function does not work properly in 50Hz emulicious.
Note that in 60Hz, the function works fine.

From what I was able to dig in Emulicious, it seems to be this code that runs differently depending on the PAL/NTSC emulation :

inlib/src/inlib_phaser.c

Lines 46 to 55 in ea3eae6

wait_th_lowA:
in a, (#0xDD) ; Read port DD and check if bit
and a, #0x40 ; 6 (TH port A) is low.
jp Z, th_lowA ; If it is, light has been sensed!
in a, (#0x7E) ; Read vertical counter port to
cp a, #192 ; check if this frame is complete.
jp C, wait_th_lowA
jp frame_doneA

When I run step-by-step on 50Hz, I never step into the th_lowA function. Ending to fall in the phaser_common_timeout function...

Not sure if this a the core of the problem...

Here you have the code I use to test ( it's basically the same as the test file for phaser ) :

light_phaser_test.c.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions