Skip to content

Getrez() + 2 is an unreliable way how to detect resolution #1

@mikrosk

Description

@mikrosk

As discussed in our email conversation, there are at least two scenarios where I got vdi_vd.ttp crash in Falcon's 640x480@256c:

  • if not using NVDI without AES (i.e. AUTO folder or FreeMiNT console), work_in[0] = Getrez() + 2 doesn't really work on Falcon. Getrez() produces a wrong number, leading VDI to believe that 640x480x8 is 640x400x1 in fact (in its work_out fields).
  • if using NVDI without AES, you can't really write into the screen address. For some reason it seems the screen buffer is smaller than the actual resolution (perhaps related to off-screen bitmaps?). Try to boot into FreeMiNT console and run your vdi_vd.ttp - it will crash, badly (at least in 640x480x8)

In both cases, replacing work_in[0] = Getrez() + 2; with work_in[0] = 1; fixes the issue.

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