Commit Graph

552 Commits

Author SHA1 Message Date
simon.kagstrom
a610759cd0 Move ip to str helper to utils, exit menu when selected + various fixes 2010-02-20 14:03:14 +00:00
simon.kagstrom
240c89f783 First round of network refactoring: The network connection will be
stateless. Currently only getting the list of peers will work, but
more is on the way.
2010-02-20 13:01:23 +00:00
simon.kagstrom
5895e06a29 More network stuff. 2010-02-15 19:24:52 +00:00
simon.kagstrom
a9fffcce87 Fix some protocol errors (there are more) 2010-02-15 18:20:37 +00:00
simon.kagstrom
c97ab6801b Correct a few connection bugs 2010-02-14 10:09:46 +00:00
simon.kagstrom
bef194c90e Check for no peers (shouldn't happen, but we never know) 2010-02-14 10:09:31 +00:00
simon.kagstrom
384968da50 Create network 2010-02-14 09:41:14 +00:00
simon.kagstrom
f2d59103a5 Let frodorc be a file 2010-02-14 09:41:01 +00:00
simon.kagstrom
d7c318af18 Use total name as prefs 2010-02-14 09:40:42 +00:00
simon.kagstrom
9375b1bb5f Use quit 2010-02-14 09:38:28 +00:00
simon.kagstrom
0135421daa Export quit function 2010-02-14 09:37:57 +00:00
simon.kagstrom
230208358f Save before quitting and use the prefs path 2010-02-14 09:37:46 +00:00
simon.kagstrom
484b8cc685 Create the data store singleton 2010-02-14 09:30:16 +00:00
simon.kagstrom
a28575b7ce Use status bar messages 2010-02-14 09:24:49 +00:00
simon.kagstrom
7ab4f8f443 Separate server and peer addresses 2010-02-14 08:57:55 +00:00
simon.kagstrom
f2a9185cc0 Rename connection_addr -> peer_addr (thanks again eclipse) 2010-02-14 08:28:40 +00:00
simon.kagstrom
a0fb08b79f Rename peer->network (thank you, eclipse!) 2010-02-14 08:10:11 +00:00
simon.kagstrom
7b3cd3555a Implement peer selection properly (though still untested) 2010-02-14 08:05:08 +00:00
simon.kagstrom
eff65f446c Don't include CmdPipe.h 2010-02-13 07:43:13 +00:00
simon.kagstrom
580a876773 Cleanup 2010-02-13 07:36:11 +00:00
simon.kagstrom
5ae81fc5bf Forgot network user menu header file 2010-02-13 07:34:03 +00:00
simon.kagstrom
a5618a93d7 Redesign the network setup. Untested of course. 2010-02-12 06:35:24 +00:00
simon.kagstrom
530f10f842 Restore arrow key handling 2010-02-11 18:59:48 +00:00
simon.kagstrom
23a2a239ac Delete 2010-02-11 18:57:40 +00:00
simon.kagstrom
fcae69e09e Add and create network user view 2010-02-11 18:57:08 +00:00
simon.kagstrom
1f33a6511f Also remove the define 2010-02-11 18:56:45 +00:00
simon.kagstrom
9513dc9849 Remove GLOBAL_VARS micro optimization 2010-02-11 18:56:10 +00:00
simon.kagstrom
46d0980f50 Add a info box for the network peers. Completely untested, of course. 2010-02-11 06:37:01 +00:00
simon.kagstrom
c5053b8c61 Add a network user selection menu (unfinished, untested) 2010-02-10 18:16:55 +00:00
simon.kagstrom
65de419c34 Remove some unneeded code and gekko stuff 2010-02-10 18:16:31 +00:00
simon.kagstrom
f710bacf73 Add helper in utils to create a SDL_Surface from data 2010-02-10 18:10:31 +00:00
simon.kagstrom
5841aa35a3 Zero number of entries as well to avoid crashes on free 2010-02-10 08:50:25 +00:00
simon.kagstrom
55064b61cf Fix wii build and remove Wii-specific joystick handling 2010-02-10 06:30:08 +00:00
simon.kagstrom
11bb978e49 Move SDL stuff to Display.cpp 2010-02-10 06:15:03 +00:00
simon.kagstrom
bf0d8c5e90 Handle selection of None correctly 2010-02-09 19:08:16 +00:00
simon.kagstrom
171e274b9a Fix memleak 2010-02-09 14:20:08 +00:00
simon.kagstrom
401b93baa9 Init to fix valgrind use-of-uninitialized problem 2010-02-09 12:16:58 +00:00
simon.kagstrom
9b7517fde5 Fix valgrind errors 2010-02-09 11:41:30 +00:00
simon.kagstrom
5bc596f617 Make menu_messages a C file to avoid various C++ problems 2010-02-09 11:33:30 +00:00
simon.kagstrom
e550985aef Correct string allocations (sigh, C++ doesn't behave like an old C
programmer like me expects it to. I'll adapt)
2010-02-09 10:02:05 +00:00
simon.kagstrom
25b25d413c Fix 1541job warnings 2010-02-09 06:16:07 +00:00
simon.kagstrom
6e29c502a4 Tape warning fixes... 2010-02-08 18:53:20 +00:00
simon.kagstrom
bd26a17da3 C64 warning fixes 2010-02-08 18:44:58 +00:00
simon.kagstrom
108de6db83 Fix warnings in 1541 code 2010-02-08 18:40:04 +00:00
simon.kagstrom
5ec3b0ecd0 Fix regression in r659 2010-02-08 18:36:28 +00:00
simon.kagstrom
23a2511e54 VIC_SC.cpp: Warning fix 2010-02-08 18:25:38 +00:00
simon.kagstrom
51aa03ce04 Fix warnings and remove SAM 2010-02-08 18:24:00 +00:00
simon.kagstrom
c5b7b8e539 Warning fixes in CPU emulation 2010-02-08 18:16:38 +00:00
simon.kagstrom
33ac22c693 Remove RiscOS compatibility and fix warnings 2010-02-08 18:02:27 +00:00
simon.kagstrom
e2dcd7475a Don't bail out if the prefs isn't found 2010-02-08 17:56:32 +00:00
simon.kagstrom
80239a0b5d Add warning_if 2010-02-08 17:55:23 +00:00
simon.kagstrom
9e3796d44d Fix sound warnings and remove catweasel support 2010-02-07 17:20:47 +00:00
simon.kagstrom
318a5fcd0d Fix stat check, reorder paths and add . (CWD) 2010-02-07 17:04:27 +00:00
simon.kagstrom
ffe18cf372 Look for frodorc in different paths 2010-02-07 16:15:36 +00:00
simon.kagstrom
1500513de6 Simplify a bit more: Remove main_x/main_wii 2010-02-07 15:14:52 +00:00
simon.kagstrom
25463e5adf Delete unused stuff (not needed for the C64 network) 2010-02-07 14:48:39 +00:00
simon.kagstrom
5dbee35e1c Remove dead platforms 2010-02-07 14:39:43 +00:00
simon.kagstrom
804c7c44c5 More cleanup 2010-02-07 14:36:20 +00:00
simon.kagstrom
89dcf0318d Dead code - remove 2010-02-07 14:34:45 +00:00
simon.kagstrom
b9880faf01 Constify Load/Save 2010-02-07 14:31:24 +00:00
simon.kagstrom
3a83b3f66a 0...1000 is the key range 2010-02-07 14:24:50 +00:00
simon.kagstrom
56c4742f75 Simplifly data registry and reserve 0...1000 as client range 2010-02-07 09:52:36 +00:00
simon.kagstrom
6b4014dfca Handle register data in marshal/demarshal and packet reception 2010-02-07 09:37:21 +00:00
simon.kagstrom
6e3a5d74e0 Rename data packets 2010-02-07 09:22:37 +00:00
simon.kagstrom
1e50aa3c28 Move network broker 2010-02-06 16:25:11 +00:00
simon.kagstrom
c8c231ebb2 New type 2010-02-06 16:22:52 +00:00
simon.kagstrom
43070ad2d9 Remove sysconfig.h dependency for the host as well, and skip it on wii clean 2010-02-06 16:16:43 +00:00
simon.kagstrom
853bed122e Make it build for the Wii again. No, it won't run. 2010-02-06 16:10:09 +00:00
simon.kagstrom
c1a7977ba3 Temporarily new network port 2010-02-06 14:01:22 +00:00
simon.kagstrom
332264abcb Add screenshot to network connect messages (not tested) 2010-02-06 14:00:12 +00:00
simon.kagstrom
3983fbb7d2 Bail out if surf is NULL 2010-02-06 07:37:00 +00:00
simon.kagstrom
fc4eec3d64 Add data store implementation (not used yet) 2010-02-06 07:33:56 +00:00
simon.kagstrom
959483352c CIA_SC.cpp: Fix warnings 2010-01-31 09:01:17 +00:00
simon.kagstrom
1068d40eca Add functionality to setup joystick defaults (for Wii only now) 2010-01-31 08:42:40 +00:00
simon.kagstrom
3ce9066309 Open joystick also for Wii 2010-01-31 08:00:15 +00:00
simon.kagstrom
450260dd59 Add year to the game info 2010-01-31 07:58:48 +00:00
simon.kagstrom
0e441a5ea7 Add flags and bump version of the game info stuff. This is mostly for
testing, but will be good to have in the future.
2010-01-30 20:03:17 +00:00
simon.kagstrom
b8c8b8673c The wii doesn't have network.h 2010-01-30 19:22:04 +00:00
simon.kagstrom
f810670388 Store score in the dump 2010-01-30 19:21:01 +00:00
simon.kagstrom
0f6cc25ae5 Add a score associated with updating the game info 2010-01-30 19:06:18 +00:00
simon.kagstrom
b3a33134aa Set screenshot through a setter 2010-01-30 19:03:10 +00:00
simon.kagstrom
54e41df785 Return to the first selection when reentering the menu 2010-01-30 18:57:24 +00:00
simon.kagstrom
3d072f63c8 Less irrelevant printouts 2010-01-30 18:55:02 +00:00
simon.kagstrom
78da43f300 Switch insert/start (start is most common) 2010-01-30 18:54:41 +00:00
simon.kagstrom
6ff06c0d1f Default to filename for name if name isn't set 2010-01-30 18:52:14 +00:00
simon.kagstrom
94c53ceb22 Timed out objects must be disarmed 2010-01-30 18:43:33 +00:00
simon.kagstrom
d3e4552174 Implement keyboard input handling 2010-01-30 17:59:32 +00:00
simon.kagstrom
c7023f1210 Remove some unneeded printouts 2010-01-30 17:32:07 +00:00
simon.kagstrom
8c5894b7ac select -> escape 2010-01-30 17:31:51 +00:00
simon.kagstrom
1839a8fb82 Fix timer bugs (disarming should not be done on non-armed ones) 2010-01-30 17:25:21 +00:00
simon.kagstrom
d7a8f558df Disarm before tick (can be deleted in tick) 2010-01-30 16:59:46 +00:00
simon.kagstrom
54115df233 Debug message: tell us when we save 2010-01-30 16:55:34 +00:00
simon.kagstrom
01084938ba Exit menu on quit 2010-01-30 16:55:21 +00:00
simon.kagstrom
a94a198424 Add timeout where the game screenshot is saved 2010-01-30 16:49:37 +00:00
simon.kagstrom
5be5211578 Fix free-of-non-alloc 2010-01-30 16:36:02 +00:00
simon.kagstrom
39d2196021 Key binding should be shift-off 2010-01-30 16:31:39 +00:00
simon.kagstrom
f445f4e739 Fix use-warning (and potential bug) 2010-01-30 16:13:39 +00:00
simon.kagstrom
8febd41980 Support page up/down 2010-01-30 16:12:25 +00:00
simon.kagstrom
11e6b3cd54 Longer timeout on hover 2010-01-30 16:12:15 +00:00
simon.kagstrom
3bf759727e Correct storing of filenames as well 2010-01-30 16:04:42 +00:00
simon.kagstrom
187eb13245 Implement backspace support 2010-01-30 15:52:35 +00:00
simon.kagstrom
b7064f58f0 Keyboard fixes: Allow switching shift state via the keyboard, add a
keyboard background image, use flags instead. Shift is default on for
all non-typing stuff.
2010-01-30 15:38:19 +00:00
simon.kagstrom
feb9fdfc10 Fix warnings 2010-01-30 14:53:54 +00:00
simon.kagstrom
87c10403ad Remove dead files 2010-01-30 14:50:35 +00:00
simon.kagstrom
aaf74e28d8 Don't save unknown 2010-01-30 14:47:22 +00:00
simon.kagstrom
89cb44386a Default is unknown 2010-01-30 14:47:14 +00:00
simon.kagstrom
6ad852e2b9 Add file extension 2010-01-30 14:34:24 +00:00
simon.kagstrom
55b605b146 Fix double free 2010-01-30 14:34:04 +00:00
simon.kagstrom
79acb2e1e9 Too small allocation 2010-01-30 14:30:56 +00:00
simon.kagstrom
205a1d8821 Correct size and saving 2010-01-30 13:03:53 +00:00
simon.kagstrom
d884351ba8 author/filename/name should always be set to something 2010-01-30 12:48:47 +00:00
simon.kagstrom
89ba23647c Add support for converting 8-bit SDL_Surfaces. 2010-01-30 12:35:54 +00:00
simon.kagstrom
7ff83399c1 Save game info on menu exit 2010-01-30 11:48:57 +00:00
simon.kagstrom
4bcf907f4e Capture screenshots 2010-01-30 11:31:05 +00:00
simon.kagstrom
7939d53967 Make the screenshot half sized 2010-01-30 09:42:08 +00:00
simon.kagstrom
c718e1aead Store screenshot when game info is edited 2010-01-30 09:34:14 +00:00
simon.kagstrom
8577acdc0c Quit 2010-01-30 09:19:41 +00:00
simon.kagstrom
c10f7972fb Fix the rest of the display warnings 2010-01-30 08:43:37 +00:00
simon.kagstrom
e4a4038720 Fix warnings 2010-01-30 08:42:49 +00:00
simon.kagstrom
5c2d5eaf33 New status bar system instead, skip this 2010-01-30 08:40:43 +00:00
simon.kagstrom
48b98908a8 Don't parse events with the gui active 2010-01-30 08:38:10 +00:00
simon.kagstrom
15023a3649 Init is_active 2010-01-30 08:37:57 +00:00
simon.kagstrom
16eb63dfcd Fix saving of game info 2010-01-30 08:35:29 +00:00
simon.kagstrom
00ee6da738 Dynamic buffers for filenames 2010-01-30 08:17:42 +00:00
simon.kagstrom
fecfac664f Also allow directories for save games 2010-01-30 08:08:11 +00:00
simon.kagstrom
a664d7c884 Refactor the filebrowser to allow nested directories 2010-01-30 08:06:32 +00:00
simon.kagstrom
9d1d6190c8 Rearrange the files a bit: Move timer/utils to Src and fix a few small
issues
2010-01-29 06:35:40 +00:00
simon.kagstrom
7619e36910 Implement joystick swapping 2010-01-25 16:31:20 +00:00
simon.kagstrom
0c5570e64a Correct setting of prefs 2010-01-25 16:31:05 +00:00
simon.kagstrom
40809b7238 Correct gui timing and show status bar messages longer 2010-01-25 15:50:05 +00:00
simon.kagstrom
6016806bd9 Correct CPU reset 2010-01-25 15:46:00 +00:00
simon.kagstrom
7945ba0b26 Remove some dead code 2010-01-25 15:45:46 +00:00
simon.kagstrom
e6b297c573 Correct snapshot loading 2010-01-25 15:28:39 +00:00
simon.kagstrom
756ae88990 Remove dead code 2010-01-25 15:25:01 +00:00
simon.kagstrom
57a47a036d Make it possible to load files 2010-01-25 15:23:00 +00:00
simon.kagstrom
3eca51218f Update prefs on gui pop 2010-01-25 15:11:26 +00:00
simon.kagstrom
dd957bcbff Fix prefs to the new style 2010-01-25 14:25:19 +00:00
simon.kagstrom
db72041d91 Convert images to the display format 2010-01-25 13:49:48 +00:00
simon.kagstrom
d9a1ce3de9 No deactivation, push main view on activation 2010-01-25 13:28:03 +00:00
simon.kagstrom
fcf5d06256 Activate the Gui (basic stuff works!) 2010-01-25 13:23:14 +00:00
simon.kagstrom
0ae643c77e Moved 2010-01-25 13:19:39 +00:00
simon.kagstrom
bd062dfe70 Mocks are no longer needed 2010-01-25 13:12:27 +00:00
simon.kagstrom
328c6db22e Copy in the new GUI code. Builds but will not work now. 2010-01-25 13:01:22 +00:00
simon.kagstrom
4e70ae6205 Removed the first gui try (will never become anything) 2010-01-25 12:08:57 +00:00
simon.kagstrom
a71a5b1870 Refactor the makefile for host builds (completely). This is step 1,
the second is to go through the warnings and ... fix them!
2010-01-22 06:28:46 +00:00
simon.kagstrom
6a3d4a436d Use SDL joystick for input handling. This is partially taken from UAE,
but is currently untested. It does compile though.

It makes the code a lot smaller and simpler, which is good, and also
removes the dependency to Wii.
2010-01-10 17:24:39 +00:00
simon.kagstrom
8a7c6eee24 Try getting DHCP twice 2010-01-10 17:23:27 +00:00
simon.kagstrom
787db07c8a Deps 2010-01-10 17:22:16 +00:00
simon.kagstrom
529a332720 Use the native bit depth instead of hardcoding 8 2010-01-07 20:29:57 +00:00
simon.kagstrom
f02c428969 More fixes (tmp tmp) 2009-11-16 19:00:22 +00:00
simon.kagstrom
b0ca5f88bd ListBox 2009-11-15 15:39:17 +00:00
simon.kagstrom
2cb604b095 List (will this even work???) 2009-11-15 15:31:07 +00:00
simon.kagstrom
59365e831f More gui work. 2009-11-15 15:12:53 +00:00
simon.kagstrom
c483dc63bb Cleanup round 1 2009-11-15 12:31:06 +00:00
simon.kagstrom
5b48ef1baf Build gui 2009-11-15 11:21:32 +00:00
simon.kagstrom
8c01747859 Add some (unused / unfinished) gui stuff 2009-11-15 11:17:26 +00:00
simon.kagstrom
744ab16862 Add gui code (not used yet but builds) 2009-11-10 06:12:10 +00:00
simon.kagstrom
32874b305a Don't reset the master, display message if the peer disconnects 2009-11-10 05:46:21 +00:00
simon.kagstrom
ac52ec73fe Higher lowest kbps 2009-11-10 05:44:10 +00:00
simon.kagstrom
5275eda76b Only wait for 5 tries (15 seconds) for the bandwidth reply 2009-11-10 05:43:43 +00:00
simon.kagstrom
de583835c3 Correct FSM to go to the CONN_CONNECTED state 2009-11-08 16:10:19 +00:00
simon.kagstrom
d554070fc3 Move up ConnectToPeer 2009-11-08 15:59:18 +00:00
simon.kagstrom
78c7473510 Larger limit 2009-11-08 15:51:59 +00:00
simon.kagstrom
a3e4556785 Don't display the bandwidth message 2009-11-08 15:34:47 +00:00
simon.kagstrom
0b0db6875f Reset the C64 instead 2009-11-08 15:29:55 +00:00
simon.kagstrom
0e2bd92a57 Reset linecount on connects, reset the SID when the client disconnects 2009-11-08 15:29:16 +00:00
simon.kagstrom
92c007817d Add printout of network bw, reduce size to 1024 2009-11-08 15:21:53 +00:00
simon.kagstrom
ba7ee22494 Cap at 80kbps and 300kbps 2009-11-08 12:52:54 +00:00
simon.kagstrom
a909b551b2 Add bandwidth testing code 2009-11-08 12:50:56 +00:00
simon.kagstrom
1033f94d24 Check that the network magic is correct 2009-11-08 09:34:00 +00:00
simon.kagstrom
4a183a000e Correct description 2009-11-08 09:16:10 +00:00
simon.kagstrom
2ce92d07e2 Only display network traffic string during connections 2009-11-08 09:12:46 +00:00
simon.kagstrom
3073af1d84 Move network status updates to Network 2009-11-08 09:04:48 +00:00
simon.kagstrom
b469064bc2 Remove printout 2009-11-07 16:04:19 +00:00
simon.kagstrom
ecec8b6134 Move network-related sound stuff to common code (so that it will work
on all platforms)
2009-11-07 14:13:21 +00:00
simon.kagstrom
32a405739b Remove unused var 2009-11-07 14:06:10 +00:00
simon.kagstrom
fef3fd298e Correct disconnections - we are no longer connected then 2009-11-07 14:05:51 +00:00
simon.kagstrom
4d56918c8d Move remove-on-no-ping to the thread instead 2009-11-07 14:01:38 +00:00
simon.kagstrom
914bcd03ba Correct handling of data > 4096 bytes. This is for example sent out as
screenshots when multiple servers are waiting on the frodo network
2009-11-07 13:52:22 +00:00
simon.kagstrom
bb3fbc0fb2 Split packets in 4096 byte chunks 2009-11-07 13:50:53 +00:00
simon.kagstrom
b919f9cf95 No need to run the emulator on the client 2009-11-07 12:37:15 +00:00
simon.kagstrom
334d729bf1 Do sound transfer at the correct time 2009-11-07 12:33:09 +00:00
simon.kagstrom
8607e7827d Move linecount to c64 2009-11-07 10:12:49 +00:00
simon.kagstrom
0209c7eb86 More debugging, allow writes from the client 2009-11-07 10:03:49 +00:00
simon.kagstrom
f1bd3a86f4 More sound fixes 2009-11-07 09:54:51 +00:00
simon.kagstrom
4946f709c3 Remove printout 2009-11-07 09:38:25 +00:00
simon.kagstrom
898d330979 Correct ring buffer copy and marshal iteration 2009-11-07 09:36:01 +00:00
simon.kagstrom
17177212b9 Sigh. don't demarshal flags twice... 2009-11-07 08:52:46 +00:00
simon.kagstrom
67464bc2ac Correct tail setting after send 2009-11-07 08:39:07 +00:00
simon.kagstrom
f4357b88bd Fix sending of the data 2009-11-07 08:32:51 +00:00
simon.kagstrom
1a9c4b8c1d Do sound decoding 2009-11-06 19:57:02 +00:00
simon.kagstrom
22fad7d05b Also handle the client (well, a bit) 2009-11-06 17:16:35 +00:00
simon.kagstrom
6d79aaee12 Demarshal and marshal data, use linecnt for delay 2009-11-06 06:31:06 +00:00
simon.kagstrom
e65c29ed4c More client-side sound implementation (not done yet) 2009-11-06 06:18:22 +00:00
simon.kagstrom
4a7efdbb68 Add function to unqueue the current sound info (for the client).
Still needs code to actually push the data to the client!
2009-11-05 06:24:36 +00:00
simon.kagstrom
441e9f4890 Encode sound buffers, still untested 2009-11-04 20:09:04 +00:00
simon.kagstrom
2ac3409df4 OOps, correct type 2009-11-04 17:43:05 +00:00
simon.kagstrom
977f3042f0 Implement some of the sound stuff (not working) 2009-11-04 17:41:54 +00:00
simon.kagstrom
3a72e6a87c Remove current sound implementation (doesn't work anyway) 2009-11-04 17:12:20 +00:00
simon.kagstrom
3ba94e90c5 delay_cycles in 16 bits 2009-11-04 17:00:56 +00:00