Skip to content

Refactor stack popping with macros and scratchpad ram #70

@MirrorPusher

Description

@MirrorPusher

Goals:

  1. Stack popping should be replaced by macro(s) in source code in Stevie.
  2. Spectra2 should contain code for putting register pop instructions into scratch PAD RAM for reducing wait state. >8342 - >8352 seem to be good location as they are still empty.
  3. With (1) and (2) implemented, macros can be rewritten so they branch to scratch pad. This should be made optional so we can fallback to original behaviour for trouble-shooting.

Macro's should be smart enough so that branching to scratchpad ram only happens if there's speed and code size benefit, otherwise just inline.

With (1), (2) and (3) in place, we're freeing up quite some space in ROM bank 1 due to the high amount of routines. Also speed could be improved, but need to confirm. Didn't do the necessary calculations yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions