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

coco3: optimisations & fixes #1149

Merged
merged 5 commits into from
Feb 4, 2025
Merged

Conversation

six809
Copy link

@six809 six809 commented Feb 3, 2025

Couple of build tweaks.

More optimisations, space where it doesn't affect speed. On top of the 6809 generic ones, visualize6809 even shows a difference...

Ciaran Anscomb added 2 commits February 3, 2025 10:32
No behavioural change, but saves some (albeit discarded) space if CCPT
support omitted.
@six809 six809 changed the title CoCo 3 optimisations & fixes coco3: optimisations & fixes Feb 3, 2025
Ciaran Anscomb added 3 commits February 3, 2025 16:10
Split kernel build from disk image construction.

Split SRCS lists up into optional (added to DRIVERS by config options)
and non-optional.  Only depend on specified, but clean all.

Instead of rebuilding objects built in Kernel/ with different options,
add new rules.mk to override flags for the earlier compile for:

	mm/bank16k.o
	timer.o
	usermem.o

NOTE: Kernel/mm/bank16k.o is actually compiled to Kernel/bank16k.o.
Along with several other dependencies, this happens due to the way
targets are built in Kernel/Makefile (which also means they get rebuilt
every time).
In copy_mmu, shuffling register use allows combining stack ops.

In switchin(), merged a couple of sequential STA/STB paids into STD.

In dofork(), when the register isn't actually required, LEAS 2,S is
slightly quicker than PULS X.

Only care about top 8 bits of process size when figuring how much to
copy.

Don't need to stash D in Y if we use BITA to test the remainder instead
of ANDA.

Use BSR for calls to adjacent copybank.
Slightly optimise init_hardware.  Somewhat optimise user process
mapping:

 - Merge map_proc_2 into map_proc_always.
 - Use quicker 5-bit indexes instead of postinc.
 - Fetch two pages at a time.

Note: map_proc is not currently used, but keeping around as I don't
know if there's an intention to use it.

Merge tail calls JSR, RTS -> JMP in a couple of places.
@EtchedPixels EtchedPixels merged commit 80b0db9 into EtchedPixels:master Feb 4, 2025
13 checks passed
@six809 six809 deleted the opt-coco3 branch February 4, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants