GithubHelp home page GithubHelp logo

Comments (4)

ki-bo avatar ki-bo commented on July 25, 2024 1

This is a very good point. Calling KERNAL routines may either need switching to a temporary 8 bit stack on a separate page, or one could make the use of the soft stack configurable when building the application.

I see uses of the compiler where the ROMs are banked out completely and all I/O routines are written with no dependencies to ROM routines. This will allow to use more RAM, and games will probably make use of that. Having a cpu stack instead of a soft stack should provide some performance gain still.

from llvm-mos.

lgblgblgb avatar lgblgblgb commented on July 25, 2024

@ki-bo This is true, for sure, just I would like to add, that then any KERNAL routine call needs more care since those routines are probably not so much aware of 16 bit stack pointer usage, and there can be cases when this matters.

from llvm-mos.

lgblgblgb avatar lgblgblgb commented on July 25, 2024

Also IRQ handler must aware of this, which is used by the ROM for eg. kbd scanning/etc. But indeed, I think so too, using the CPU capabilities of MEGA65 (or C65) the fact they have 16 bit stack pointer mode and stack relative addressing mode would be a huge gain, not only because of speed/performance, but maybe the code can be smaller as well?

from llvm-mos.

ki-bo avatar ki-bo commented on July 25, 2024

I just checked with a current Mega65 ROM. The IRQ itself seems to be unaffected, as it just doesn't care where the stack actually lives. But I agree that certain ROM routines (eg. ones banking in ROM) will have issues if your stack is actually moved somewhere else. I think, switching to the original stack page at $100 right before the jsr into ROM and then switching it back to the original 16 bit location afterwards might still work, though.

from llvm-mos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.