Maximum .PRG file size error

I am trying to recompile one Application from github from one watch model to another. When I build it I get this error

ERROR: PRG generated exceeds the memory limit of app type 'watch-app' for device id 'instinct2x': 218282 bytes.

What does it exactly mean? Is it max file size of prg file 218282 bytes or it is bigger than maximum allowed by 218282 bytes or what?

When I build it I get 363980 bytes prg file.

Can I find somewhere the list of max oprg files for each watch?

Also, how can I decrease the size of prg file? Maybe change SDK version or some compiler option?

  • Yeah maybe if it was an Apple Watch, but Garmins are seriously underpowered due to battery life (and cost?) concerns.

    I mean Garmin native code is already slow (just look at the UI of Garmin watches) and Garmin CIQ code is already running in a VM (everyone knows CIQ apps are slower and more battery-hungry than the equivalent native functionality), so it's hard to imagine any kind of emulator running at a decent speed.

    Still, it was a pretty interesting exercise to optimize the code to get it to actually run on an instinct2x. Too bad it's not playable.

  • thank you for trying to fix this, i originally asked Mr zlelik to try to help me to convert the garmingotchi to 2x from 3s code. I guess the only real work around is writing it from scratch, using minimal graphics and memory optimization? 

  • There's plenty of free memory now (relatively speaking) - even on instinct2x - and I don't think that's the bottleneck. The graphics also seem fairly simple.

    The issue is that Garmin watches seem to be too slow to run a tamagotchi ROM emulator. I think my FR955 is just as fast as any newer watch (at least based on a CIQ benchmark), and the emulator runs terribly on it.

    The emulator even runs terribly on a simulated Edge, which should be 2X to 3X as fast as a modern Garmin watch (again based on benchmarks). I haven't tried it on a real Edge, but I don't have high hopes.

    So the solution would not be to try to run a tamagotchiROM emulator on a Garmin platform, unless you can find a way to make it 10 to 20 times as fast as the current version.

    The solution would probably be to rewrite it from scratch - as you said - but that might be extremely complex and time consuming.

    You could also look at porting this "tamagotchi emulator/simulator". Unlike the project discussed in this thread, it doesn't use a ROM, the game logic is reimplemented in java (or python):

    Python: https://www.pygame.org/project/3138 | https://gist.github.com/ryesalvador/e88cb2b4bbe0694d175ef2d7338abd07

    Java: https://gist.github.com/aerospark/80c60e801398fd961e3f

    [So it's more of a simulator than an emulator, as it doesn't literally run the original game ROM]

    I might try porting the python version if I get bored. 

  • Thanks, I don't know enough code myself to port or rewrite anything from scratch....sadly. definitely would be awesome to have some kind of detailed virtual pet/digimon vpet style on the Garmin instinct 2x. There's a super basic one on the store already called Tamawatch but super super basic as a widget. Doesn't update until the app is actually opened. Let us know if u have any luck porting it! My coding skills are limited to qbasic, visual basic and Lua...... So basically no idea how to do any of this stuff myself.... If you also take commission projects, let me know, I would love to have a virtual pet made for the Garmin 2x