-
Notifications
You must be signed in to change notification settings - Fork 2.2k
h89bus.cpp: setup io addresses instead of run-time decoding of PROM #13533
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
Conversation
Correct me if I’m missing something, but isn’t this just using hard-coded addresses? Given you know how the PROMs are wired to the chip selects, can’t you decode the content of the PROM image to get the address ranges to install to on start? For example, you know which output selects the floppy controller, so you can scan the PROM contents to find the combination of inputs that activate that output, and then turn that into an address range given you know how the address lines are wired to the PROM inputs. |
There are a few of issues with decoding the PROMs at startup. The first one is related to the MMS floppy controller and how it is selected. Instead of using one of the signals from the bus, it uses a cable connected to a socket on the CPU board to get access to the GPP select line. The MMS PROM selects GPP line for addresses 0x38 - 0x3f (for the floppy controller), and 0xf2 (normal GPP). When GPP is selected, the MMS floppy controller checks the lower 3 address lines (a0-a2) and if that is 0x2, then the GPP is selected instead of the controller. If the value is not 0x2, then the MMS controller is selected. To properly handle the cases above, I think there will still need to be special handling for the MMS PROM. I'm not sure there is generic way to handle all 4 PROMs. Let me know if I need to decode the PROMs at startup, and I'll try to come up with something that works. And does this - https://github.com/mamedev/mame/pull/13533/files#diff-c18528b917f86f6bc2a8b58c889ac0919a61b93edcba82997c6cfe70bfe1e561R703-R714 need get the addresses from the PROM? I had hard-coded it, since all the PROMs are identical for these select lines and the devices are all built into the CPU board. |
@cuavas The code is now using the PROMs to setup the IO addresses for all devices. |
Reverting the change to use address_space_installer, since some cards are not working. |
Comments have been addressed, can I get another review? |
@cuavas Based on your comments from my prior PR - #13363, it seemed that doing runtime decoding of the memory PROM had too much of an impact on performance to be accepted. I closed that PR and going to attempt to use address_maps for the memory decoding. As a first step, this PR changes how the IO decoding works, from using the PROM during runtime to using address maps. If this approach acceptable, I will try to get memory decoding using address maps and working with slots and memory views.