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

Plan for moving things out of the MMU #92

Open
larsbrinkhoff opened this issue Mar 21, 2016 · 3 comments
Open

Plan for moving things out of the MMU #92

larsbrinkhoff opened this issue Mar 21, 2016 · 3 comments

Comments

@larsbrinkhoff
Copy link
Member

The MMU has a lot of code that probably belongs elsewhere. We should agree on what, and where.

@larsbrinkhoff
Copy link
Member Author

Not very well considered suggestions:

  • Address decoding and chip select → GLUE
  • Bus error → GLUE
  • Address error → CPU
  • Persistent state.
  • Interrupts.

@stefanberndtsson
Copy link
Member

Address decoding and chip select → GLUE

This is probably the way it should technically be, but I'm unsure of a reasonable way to do it nicely.

Take the PSG for example. In reality, there is no ff880x address known to it. GLUE maps that address to the SNDCS which combines with A1 and RW to BC1 and BDIR.

Today this is done by the PSG actually receiving the entire address and reading/writing the 8 bits of the data bus it's connected to.

Maybe a sensible way is to make this into four calls:

psg_nop() - read from ff8800 (does nothing)
psg_read_reg() - read from ff8802
psg_select_reg() - write to ff8800
psg_write_reg() - write to ff8802

Will the memory map still be used, and this only being a source code construct? Should the memory map change into the address decoding done in the GLUE?

Bus error → GLUE

Shouldn't be a problem I guess

Address error → CPU

This should never leave the CPU, so I can't see how it can be handled any other way.

Persistent state.

??

Interrupts.

IPL1/2 are connected to GLUE, so in principle they should be handled that way too.

@larsbrinkhoff
Copy link
Member Author

Take the PSG for example.

I'm only talking about moving code blocks in the files, not redesigning their function.

Persistent state.

??

mmu_state_collect and friends. Oh right, it's not correct to call it persistent.

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

No branches or pull requests

2 participants