Skip to content

Tiger Game.com's SM8521 clock speed is incorrect, instructions have wrong cycle counts too #7303

@simontime

Description

@simontime

MAME currently assumes the clock speed to be 5.5296MHz, however, the actual clock speed appears to be 4.9152MHz precisely, according to various bits of code from the official Game.com SDK floating around the web.

See the speech playback functions, as well as delay20ms (listed below) and Delay200ms which expect a precise number of cycles (and are helpfully commented with the cycle count) to delay for those lengths.

delay20ms:  global  delay20ms
            movw    rr0,#01800h             ;6
d20ms_loop:
            decw    rr0                     ;8
            br      nz,d20ms_loop          ;8

            ret

If the cycle counts written by Tiger are correct—which I assume they are, since Tiger would've been in contact with Sharp who gave them accurate info—then certain instructions implemented in MAME also have an incorrect cycle count too.

Accounting for only the looped segment in this delay function, ((8+8)*0x1800)*50 = precisely 4915200.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions