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

osd/osdnet.cpp: Removed dependency from OSD network device to libemu #12058

Merged
merged 3 commits into from
Feb 24, 2024

Conversation

cuavas
Copy link
Member

@cuavas cuavas commented Feb 23, 2024

This is required for #12054 to avoid fatal errors with network devices. This doesn’t completely clean up the interface to OSD network modules (it’s still using free functions and static variables in a really nasty way), but it does clean up a very nasty cross dependency.

There are still issues with the receive polling timer:

  • The interval is set based on the MTU, assuming the rate packets arrive is no more than the theoretical maximum rate that maximal length packets can be serialised. However, smaller packets can arrive much faster, particularly when using jumbo frames (9000 octet MTU).
  • That aside, the code was always based on the incorrect assumption that an emu_timer will synchronise with real time. It doesn’t, so for a system that’s fairly lightweight to emulate (e.g. an Apple II with a Uthernet card), it polls furiously while running the emulation for a frame, then doesn’t poll at all for the majority of the time while it waits for the real world to catch up before updating video and starting the next frame.
  • It probably needs a postload handler to deal with the fact that changing the host network interface isn’t something that can be included in save states.

I realise this wreaks havoc with the macOS netdev PR. I haven’t forgotten. I’ll update that PR to deal with this myself.

@cuavas cuavas merged commit d98993d into mamedev:master Feb 24, 2024
5 checks passed
@cuavas cuavas deleted the netdev branch February 24, 2024 15:29
Mokona pushed a commit to Mokona/mame that referenced this pull request Feb 28, 2024
…mamedev#12058)

* This allows save states to be created and loaded when network interfaces are present.
* device_network_interface may need some more attention to get save states taken while receiving a packet to work properly.
stonedDiscord pushed a commit to stonedDiscord/mame that referenced this pull request Apr 8, 2024
…mamedev#12058)

* This allows save states to be created and loaded when network interfaces are present.
* device_network_interface may need some more attention to get save states taken while receiving a packet to work properly.
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.

None yet

1 participant