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

Add platform for Amstrad CPC with standard memory expansion used as ram disk for swap #1138

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ajcasado
Copy link
Contributor

No description provided.

@EtchedPixels
Copy link
Owner

Can you make the docs explain why there are two ports, which to use and what the differences are.
Also why the expansion is used as swap rather than keeping tasks directly in each mapping ?

@ajcasado
Copy link
Contributor Author

I've decided to create a separate port because, given the need to use the swap mechanism, I couldn't find an easy way to compile the code to support both disk and RAM usage. Do you have any suggestions for simplifying this and merging both ports into one?

The only difference between the two is the use of a RAM expansion as swap space.

As for using it as swap rather than directly keeping tasks in the mapping, that's because it doesn't seem feasible with the current mapping model. The expanded memory can only be mapped in 16k blocks starting at address 0x4000, which also removes the common area from the map (this is the mapping I use to implement the RAM disk for swap while executing code in the non-common kernel code area below 0x4000). Alternatively, it can be mapped in 64k blocks, replacing the entire memory space without any common area to rely on. See this references:
https://www.cpcwiki.eu/index.php/Gate_Array#Register_MMR_.28RAM_memory_mapping.29
https://www.cpcwiki.eu/index.php/Standard_Memory_Expansions

I'm currently studying this latter 64k block switching mapping for another port, inspired by how memory is handled in the Cromemco port.

If you find these explanations satisfactory, I'll include them in the documentation.

Regards,

Antonio.

@ajcasado
Copy link
Contributor Author

I've thought it over and I think I can merge both ports into one by properly defining the swap mechanism in the config.h file and using the C preprocessor to select the parts of the code to compile for each case. What do you think?

@ajcasado
Copy link
Contributor Author

Well, the only thing I'm not sure about when it comes to merging both ports is how to conditionally compile the rd_cpcsme.s file based on whether the extended RAM is being used or not.

@EtchedPixels
Copy link
Owner

Its a tiny asm file - any reason for not just linking it anyway at least for now ?

Rest makes sense. I guess CPC ultimately does want the thunked model

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