-
Notifications
You must be signed in to change notification settings - Fork 2.2k
sony/news_38xx.cpp: Get NWS-3860 working #14151
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
base: master
Are you sure you want to change the base?
Conversation
That's a contradiction. |
The machine can run perfectly fine without a graphics card or sound module installed using the serial console and network. That said, I can put the |
To clarify: you don't need the NOT_WORKING flag if the machine was sold with no video or audio and was usable that way. (And NOT_WORKING isn't exactly the right flag for something that works, boots an OS, and runs programs anyway). A lot of UNIX servers like the SGI Challenge series had no video or audio capability and were admin'd strictly over serial console. |
src/mame/sony/news_38xx.cpp
Outdated
const std::map<int, std::vector<iop_irq> > iop_irq_line_map; | ||
bool m_scc_irq_state = false; | ||
u32 m_iop_intst = 0; | ||
u32 m_iop_inten = 0; | ||
|
||
// CPU IRQ state | ||
const std::map<int, cpu_irq> cpu_irq_line_map; |
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.
Do you really want std::map
for these? It’s pretty heavy and doesn’t have good locality. Have you considered using constant arrays and looking up elements with std::lower_bound
? It’s more efficient when the content won’t change.
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 will do so. I used map when I was developing because it made it easy to write/debug to my brain, but now is a good time to make it faster :)
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.
Since I had to iterate through all the items every time in irq_check_iop
/irq_check_cpu
, I wasn't 100% sure where std::lower_bound
came into the picture, so I just went ahead and used constexpr
arrays with a basic lookup for CPU, and constexpr
arrays with a mask for IOP.
I apologize for missing what you were alluding to, but if there is a specific algorithm you suggest for checking the active IRQs, I'd be happy to make any adjustments :)
No graphics is a valid config for this machine. The software and firmware can handle missing sound (for example, on the NWS-5000X it is a separate board so it can be easily disconnected and thus can handle that case), but I think that, at least for the 3800 series, it was always included. I'll leave it in place for now, but can remove it too if that is the general consensus. |
This machine is now working, albeit without graphics and sound. This is a really interesting machine because it is a dual-architecture one. #14150 should be merged first, otherwise the NEWS-OS installer won't work. As I mentioned in the TODO section, the only real weirdness I have seen so far is around the format program, everything else has been pretty solid in my testing.