Skip to content

Commodetto/Poco use is broken for the simulator #1579

@HipsterBrown

Description

@HipsterBrown

Build environment: macOS
Moddable SDK version: >= v7
Target device: desktop simulator

Description
Attempting to run any program using Poco ("commodetto/Poco" module) in the simulator results in an error:

Break: SyntaxError: C: xsArg(1): invalid index (in @screen_begin)!

It will run fine on a device, i.e. Moddable Six, but not the simulator version.

Steps to Reproduce

  1. cd $MODDABLE/example/commodetto/text
  2. mcconfig -d -m -p sim/moddable_six

Expected behavior
Simulator starts with the demo text appearing on the screen

Images
Image

Other information
I've debugged this down to the ECMA-419 display support being added in v7 of the SDK. The manifest_commodetto.json defaults to defining ECMA419.display: 1 which should use that branch of logic when rendering graphics with Poco. When I set that flag to 0, then the example runs successfully. This leads me to believe the screen module for the simulators wasn't updated to match the expected logic for the ECMA-419 Display implementation, starting with somewhere in the screen_begin method: https://github.com/Moddable-OpenSource/moddable/blob/public/build/simulators/modules/screen.c#L625

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