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

Unify to single source directory #25

Merged
merged 21 commits into from
Jul 18, 2023
Merged

Conversation

mlund
Copy link
Collaborator

@mlund mlund commented Jul 17, 2023

Unify source directories for all compilers. This should make it easier to maintain the library and have common tests.

Some notes:

  • all *.c files and *.h files are now in src/ and include/, respectively. Differences are handled with #ifdefs.
  • compiler specific asm files are in src/cc65/, src/clang/, etc.
  • vbcc directory removed as it's compatible with memory in main code.
  • kickc directory removed as headers are compatible with main code. Assembler code moved to src/kickc.
  • added CI build for cc65 and llvm-mos using Github actions
  • top-level Makefile renamed to Makefile_cc65 and build instructions updated

Closes #18. Closes #22.

@mlund mlund added the enhancement New feature or request label Jul 17, 2023
@mlund mlund self-assigned this Jul 17, 2023
This introduces 16 and 32 bit versions of
POKE/PEEK in order to reduce the number of
ifdefs.
@ki-bo
Copy link
Member

ki-bo commented Jul 17, 2023

Thank you for this! Where is lpoke and lpeek defined? Seems those are missing for clang.

@mlund
Copy link
Collaborator Author

mlund commented Jul 17, 2023

Thank you for this! Where is lpoke and lpeek defined? Seems those are missing for clang.

Hi Robert, I think they got renamed in cc65 in 87ae766 to dma_peek and dma_poke is that right? Perhaps to make room for separate asm implementations now called lpeek and lpoke(?). The two directories started to deviate at that point and I'm not entirely sure if lpeek/poke and dma_peek/poke should both be present. There's also lpeek_debounced().

Update: On non-cc65 compilers, lpeek and lpoke will use dma_peek and dma_poke. Will leave the asm implementation on llvm for another PR.

The restructures so that the root
directory contains `src/` and `include/`.
Compiler specific asm files are in src/cc65
and src/llvm respectively. This required updated
of the builds systems as well as instructions in
the README.
This to allow for other compilers like vbcc and kickc
vbcc can compile src/memory.c to no
need for special dir
Possible kickc specific assembler code
moves to src/kickc. Main headers seem to
be compatible.
@mlund mlund changed the title Unify CC65 and Clang Unify to single source directory Jul 18, 2023
@mlund mlund merged commit 0dcf4c6 into MEGA65:master Jul 18, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify memory operations Unite clang and cc65 libc
2 participants