Skip to content

Conversation

briceonk
Copy link
Contributor

@briceonk briceonk commented Sep 9, 2025

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.

@briceonk briceonk changed the title sony/news_38xx.cpp: Get NWS-3800 working sony/news_38xx.cpp: Get NWS-3860 working Sep 9, 2025
@angelosa
Copy link
Member

angelosa commented Sep 9, 2025

This machine is now working, albeit without graphics and sound.

That's a contradiction.

@briceonk
Copy link
Contributor Author

briceonk commented Sep 9, 2025

This machine is now working, albeit without graphics and sound.

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 MACHINE_NOT_WORKING tag back on.

@rb6502
Copy link
Contributor

rb6502 commented Sep 9, 2025

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.

Comment on lines 284 to 290
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;
Copy link
Member

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.

Copy link
Contributor Author

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 :)

Copy link
Contributor Author

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 :)

@briceonk
Copy link
Contributor Author

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.

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.

@briceonk
Copy link
Contributor Author

Just for fun, here is a screenshot from when I was doing final testing after addressing code review feedback :)
image

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

Successfully merging this pull request may close these issues.

4 participants