Skip to content

Phase error detection code safe to alter? #124

Description

@noyen1973

The block of code surrounding line #15308 in src\mp.pas appears to detect phase errors during the the assembly process. How safe is it to change the $120 to $1 so that there is no deviance between the current assembly pass and the previous pass? Is there a possibility Mads could get stuck in an endless loop flip/flopping an address calculation?

asm65(#9'ift (?adr < ?old_adr) && (?old_adr - ?adr < $120)');

I'm trying to output to a PGZ file format but it requires the known length of Mads' final .OBX file to be used in the file header written before the object file. I have all the extra code in place and inserted a new line after the Fastmul detection, line #15042, asm65('F256BINARYSIZE'#9'= * - CODEORIGIN');. However, with the $120 value in line #15308 the value is off by several bytes for my game. Changing the value to $1 resulted in an extra pass and the correct size calculation for a working PGZ file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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