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

Support FIELDs and addressable logic #1

Open
nrivard opened this issue Oct 8, 2020 · 1 comment
Open

Support FIELDs and addressable logic #1

nrivard opened this issue Oct 8, 2020 · 1 comment

Comments

@nrivard
Copy link

nrivard commented Oct 8, 2020

Does galette support the FIELD nomenclature found in WinCUPL? Great example on this blog post: https://hackaday.io/project/174128-db6502/log/183434-address-decoding-and-how-to-get-it-right

But essentially, for things like address decoding, you'd write:

// pins and names
Pin 4  =  A15;
Pin 5  =  A14;
Pin 6  =  A13;
Pin 7  =  A12;
Pin 8  =  A11;
Pin 9  =  A10;
Pin 10 =  A9;
Pin 11 =  A8;

// bundling named pins into a FIELD
FIELD Address = [A15..A00]; 

// now let compiler figure out the actual pin logic states for this address mapping
ZP_STACK       = Address:[0000..01FF];
IO_SHADOW      = Address:[0200..02FF];
RAM            = Address:[0300...7FFF]; 
ROM            = Address:[8000..FFFF];

This scheme translates to:

ROM = A15
IO_SHADOW = /A15 & /A14 & /A13 & /A12 & /A11 & /A10 & /A9 & /A8
@simon-frankau
Copy link
Owner

Sorry for my slow response - work has left little time for side projects.

Galette doesn't support FIELD - I've only tried for GALasm compatibility, and not looked at WinCUPL. However, now you've mentioned it, this looks like an excellent addition. I doubt I will work on it soon, so don't hold your breath, but I'd like to add this.

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

No branches or pull requests

2 participants