Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor stubs for calling trampoline functions #27

Open
MirrorPusher opened this issue Nov 13, 2021 · 2 comments
Open

Refactor stubs for calling trampoline functions #27

MirrorPusher opened this issue Nov 13, 2021 · 2 comments
Labels

Comments

@MirrorPusher
Copy link
Collaborator

Each bank currently has an individual stub file with routines that are needed in the bank, but are located in other banks, e.g. in bank 1 there is the following stub

**************************************************************
* Stub for "edb.clear.sams"
* bank5 vec.1
********|*****|*********************|**************************
edb.clear.sams:
        mov   @edb.clear.sams.vector,@trmpvector
        jmp   _trampoline.bank5.ret ; Longjump
edb.clear.sams.vector:
        data  vec.1

The point is, that this snippet is located in the file rom.stubs.bank1.asm which is copied in stevie_b1.asm

I think this logic should be changed in such way, that all functions that are exported in a bank (have vector) should have a corresponding stubs file.
For the above example it means that the stub should be in the file rom.stubs.bank5.asm which is then copied in stevie_b1.asm

If the stubs can be compressed far enough by shorter code then we can have a single stub file that is included in all banks.

Also thinking about increasing number of vectors per bank from 32 to perhaps 96 or 128.
That would only need 256 bytes of ROM space.

@MirrorPusher
Copy link
Collaborator Author

Changing the stub files as described will make it a lot easier moving forward.

@MirrorPusher MirrorPusher added the enhancement New feature or request label Nov 13, 2021
@MirrorPusher MirrorPusher added refactor and removed enhancement New feature or request labels Dec 7, 2021
@FilipVanVooren
Copy link
Owner

Refactored vector tables in Stevie 1.4F
Relocated and increased in size from 32 vectors to 96 vectors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants