Commit Graph

40 Commits

Author SHA1 Message Date
Flyinghead 09247b4503 picotcp: use random local UDP port if already in use
Bind to random local UDP port if requested one is in use.
Log to NETWORK instead of MODEM.
Fix get_last_error name conflict with asio.
2025-06-24 16:54:57 +02:00
Flyinghead 5908b1a84a picoppp: send UDP data synchronously
Use send_to instead of async_send_to for UDP sockets. Set socket to
non-blocking and discard data if socket full. Tentative fix for
corrupted Speed Devils Online UDP packets.
Fix uncaught exception if dns server name can't be resolved.
Use lambda instead of std::bind.
2025-04-01 17:16:39 +02:00
Flyinghead 5187258f4b dcnet: BBA support
Stop network service when bba is reset. Start it on first frame out.
dcnet: close connection on dhcp release
picoppp: close all sockets and acceptors when stopping.
2025-02-10 18:12:24 +01:00
Flyinghead 18656f5986 picoppp: terminate MiniUPnP in a background thread 2025-01-21 18:21:47 +01:00
Flyinghead a5a338d408 experimental DCNet cloud service 2025-01-09 18:48:29 +01:00
Flyinghead 45f4378184 network: use asio for modem/bba. DirectPlay4 support
DirectPlay4 support: StarLancer, PBA Bowling
miniupnp: remove unused stuff
2025-01-02 11:27:11 +01:00
Flyinghead fc33002284 network: add Golf Shiyouyo 2 ports 2024-11-09 11:44:58 +01:00
Flyinghead c86ed291cf picotcp: use dns.flyca.st as default dns
Use dns.flyca.st as default dns.
Resolve name when pico network starts.
2024-10-19 17:59:24 +02:00
Flyinghead 4747252187 Merge remote-tracking branch 'origin/dev' 2024-05-23 10:40:57 +02:00
Flyinghead 6cc64c18dd network: add ports for dee dee planet, floigan bros, IGP and tetris 2024-05-21 10:40:01 +02:00
Flyinghead 5755c5b3c6 fix compile warning 2024-05-15 12:33:06 +02:00
Flyinghead 06a6e26588 get rid of os_GetSeconds()
replace it with std::chrono-based getTimeMs()
2024-04-11 15:25:25 +02:00
Flyinghead 42e98e86d0 set thread names
Name all threads to help debugging and improve crash reports (windows
only)
Add ^C handler for clean exit on linux
2024-04-10 17:08:24 +02:00
Flyinghead 0070f9abad network: fix known UDP ports bind regression
introduced by b4e5af6346
Add driving strikers netdemo known port
Issue #1112
2023-06-21 16:31:01 +02:00
Flyinghead dca048981f network: process both inbound and outbound packets for 2k games
DreamPi processes inbound packets on tcp port 5011 (dc2k2) so let's do
both.
Issue #1112
2023-06-18 11:20:40 +02:00
Flyinghead 67a7637b9f network: tentative fix for 2k sport games
Fix port 5011 outbound packets instead of incoming ones for original hw
interop.
Issue #1112
2023-06-16 17:26:39 +02:00
Flyinghead b4e5af6346 picotcp: bind native udp socket to the same local port as the pico one
The Toy Racer server ignores the source udp port so it must match the
dreamcast one. Will not work if the port is in use or well-known, or if
NAT gets in the way.
Issue #1112
2023-06-15 16:04:32 +02:00
Flyinghead 92a1c1891b alienfnt: support for serial modem and worldwide ranking server
Emulate modem on sh4 serial port.
Use picotcp stack to handle ppp protocol.
Include nvmem with network settings (server at alienfront.duckdns.org,
disabled by default).
2023-04-16 15:41:54 +02:00
Flyinghead fb4229c4ae support for daytona usa networking 2023-03-27 16:45:25 +02:00
Flyinghead 5542d6db21 picotcp: full deinit when terminating
New pico_stack_deinit() function to fully deinit picotcp. Need to call
pico_stack_init when restarting.
Get rid of dns client

Tentative fix for MINIDUMP-G6, MINIDUMP-J0, MINIDUMP-HY, MINIDUMP-G5,
MINIDUMP-J0, MINIDUMP-HY, MINIDUMP-FP, MINIDUMP-F7, MINIDUMP-9H,
MINIDUMP-CB, MINIDUMP-CE; MINIDUMP-B3, MINIDUMP-1Y, MINIDUMP-A7,
MINIDUMP-9M
2023-03-13 17:36:32 +01:00
scribam d8137a967c
C++17 (#926)
* cmake: use c++17

* Use std::size

* Use std::make_unique

* Use std::clamp

* Use structured binding

* Use [[fallthrough]]

* Use enable_if_t/is_enum_v/is_integral_v/is_same_v

* Use if constexpr

* Use try_emplace

* Use auto for iterators

* Use inline variables
2023-02-18 13:24:34 +01:00
Flyinghead ee84567c17 naomi: use gameId instead of naomi_game_id to get current game name
naomi_game_id isn't reset if a console game is loaded.
settings.content.gameId should be used instead.

Issue #901
Fixes MINIDUMP-6G
2023-01-30 13:34:06 +01:00
scribam 80cf4406a7 cleanup include headers 2023-01-26 10:06:51 +01:00
Flyinghead 3cf7cf0a7f network: Emulate BBA should not be changed once a game is started
Change UI to disable BBA toggle when game is started.
Refactor UI to use DisabledScope helper.
Make sure the network stack deletes the same device it initialized.

Tentative fix for MINIDUMP-4N
2023-01-20 14:52:27 +01:00
Flyinghead fceb170a2a picotcp: enable multithreading. protect bba input queue with mutex.
tentative fix for MINIDUMP-1Y
2023-01-10 09:46:28 +01:00
scribam f6532ca27a fix some warnings 2022-11-19 12:52:26 +01:00
Flyinghead 6c38295d62 new naomi network protocol. vblank event. initd rumble support
new vblank event, used by cheats, lua and naomi net
new udp net protocol for naomi. rx/tx on vblank on emu thread.
input: rumble power configurable (Issue #158)
ui: rumble intensity slider, enable/disable upnp
aica: hook to consume midi out
decode midi out to simulate rumble for initd
upnp can now be disabled
2022-03-27 15:23:21 +02:00
Flyinghead e5d517dad2 use platform.isConsole(), platform.isNaomi(), ... 2022-01-27 17:52:19 +01:00
flyinghead 3d7455316f linux build fix 2021-11-27 14:39:28 +01:00
flyinghead 4ab3f01867 uwp: external storage support. enable picotcp 2021-11-27 14:30:36 +01:00
Flyinghead 99bf7f77c4 single-threaded mode. refactoring.
single-threaded mode similar to libretro core
stateful Emulator object
disable memory watcher when !gppo
ggpo: poll input as late as possible in !threaded
2021-09-29 10:22:58 +02:00
Flyinghead 458868a634 ggpo: always save delta ram. Disable ff,cheats,savestates when online
ggpo: always save delta ram on save_game_state as frames may be rerun
and resaved
Global network online status (ggpo, naomi, modem, bba)
Disable fast forward, cheats and savestates when online.
2021-09-08 17:18:01 +02:00
Flyinghead a2efde1103 libretro: more switch fixes
combine all static libraries into one
save/restore gl state in !threaded mode
patch libchdr
build fixes
2021-07-13 18:51:40 +02:00
Flyinghead 7dbd79750c WIP libretro core update 2021-07-05 19:44:08 +02:00
Flyinghead c68f3bcc42 network: hide miniupnpc behind a #def. use static buffer for udp data 2021-05-21 12:51:29 +02:00
Flyinghead 72968290bf cheats: support for .CHT cheat files
Issue #167
gui: no need to save background in opengl, use RenderLastFrame instead
disable cheats when online
2021-04-06 11:41:41 +02:00
Flyinghead c3a95594f9 New option system
Fix per-game settings (Issue #115)
Automatic load/save state (Issue #173)
Reload Naomi/AW BIOS after per-game settings are loaded to allow
per-game BIOS region. (Issue #96)
Restrict Soul Reaver widescreen cheat to the EU version (Issue #188)
Disable UI elements for overridden settings
Clean up/simplify legacy Naomi ROM loading
2021-03-01 10:13:40 +01:00
Flyinghead 2c8b5aa7f8 vs2019 build tentative fix 2021-01-04 18:56:15 +01:00
Flyinghead de260b89af net: launch miniupnp async. filter loopbacked broabcast pkts. dhcp reset
ftspeed network support
delete all dhcp negos when destroying dhcp server
filter broadcasted udp packets coming from self
launch miniupnp async since it takes time to complete (2-4s)
fix unit test
2021-01-03 21:25:27 +01:00
Flyinghead 889fc8256d broadband adapter support 2021-01-02 21:19:50 +01:00