-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
z80dma.cpp: add derivateves ZILOG, UA858D, SPEC_NEXT #12658
base: master
Are you sure you want to change the base?
Conversation
sinclair/spec128.cpp: configuration option for DMA extension
Is there a good way to avoid wedging SpecNext configuration into the base Z80DMA device? (Perhaps UA858D might also be worth supporting as its own type for East German systems such as |
I was thinking about it too. The problem is that both zx mod and next itself allows switch between two modes. |
Consider using a virtual sub function that gets overridden in the subclasses? |
Not sure it's clear for me. E.g. for Next we have one dma which operates in both modes depending on the port. That means we can init dma in Z80 mode but start in N. |
Yes, and moving this logic from |
I can revert specnext_dma files. |
@ajrhacker @angelosa Better? |
ping |
|
@angelosa Is this OK? We should've merged this about 4 months ago if yes :-) |
@@ -670,7 +673,7 @@ void z80dma_device::write(u8 data) | |||
if (data & 0x10) | |||
m_regs_follow[m_num_follow++] = GET_REGNUM(MATCH_BYTE); | |||
|
|||
if (BIT(data, 6)) | |||
if (BIT(data, 6) && m_dma_mode != dma_mode::UA858D) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not quite convinced that the base z80dma_device
has to know it has children here, perhaps moving this logic to ua858d_device
and make specnext_dma_device
a subclass of that should be the play here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not quite convinced that the base
z80dma_device
has to know it has children here, perhaps moving this logic toua858d_device
and makespecnext_dma_device
a subclass of that should be the play here?
I did this on purpose for Next case. It needs to switch type preserving existing state of registers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, in the context of if somebody else went their own route in subclassing the arch.
Notice that even a // NOTE:
or a // FIXME:
is okay for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Let's assume we keep specnextdma how it was before this commit.
Regarding spectrum which select chip based on mashine config... do I need to add slot for dma now? Or are the other way to do this?
OK I left specnext_dma separated. |
z80dma.cpp: add derivateves ZILOG, UA858D, SPEC_NEXT
sinclair/spec128.cpp: configuration option for DMA extension
details: https://velesoft.speccy.cz/data-gear.htm