Commit Graph

769 Commits

Author SHA1 Message Date
Arisotura 5edf40f665 UDP: forward received data 2019-03-09 22:41:56 +01:00
Arisotura d59a52df1f * lay base for UDP
* only handle DNS when it's destined to our internal DNS server
2019-03-09 22:14:34 +01:00
Arisotura 9485a4e8c0 properly close sockets, so that they can be reused 2019-03-09 02:30:05 +01:00
Arisotura 7d2b3bbf76 fix TCP checksum for odd lengths 2019-03-09 02:04:01 +01:00
Arisotura cde1963e63 better TCP sequence numbers 2019-03-09 01:34:57 +01:00
Arisotura f3f4613b4e somewhat better TCP
still not perfect
2019-03-09 00:47:55 +01:00
Arisotura e026574901 receive data, too 2019-03-06 18:21:12 +01:00
Arisotura 012a04021c send shit.
into the void for now.
2019-03-06 17:07:07 +01:00
Arisotura 349322b94c less shitty code.
also, initiating TCP connection!
2019-03-05 15:01:23 +01:00
Arisotura 623b0ea2e0 * begin work on actual socket shito
* move UDP-frame finishing to separate function
2019-03-05 14:06:24 +01:00
Arisotura 950170df6d finish (halfassed) DNS support. 2019-03-05 13:24:42 +01:00
Arisotura a88f0b6792 start work on DNS 2019-03-05 01:09:23 +01:00
Arisotura 909b29042c start making things nicerer 2019-03-05 00:34:30 +01:00
Arisotura cfaf5a0f3f rework wifi settings dialog.
fail gracefully if pcap isn't loaded successfully.
2019-03-04 23:55:39 +01:00
Arisotura 3f82c7dcc1 make melonDS build again 2019-03-04 23:17:03 +01:00
Arisotura 720a5fbea5 fixor Platform.cpp
also remove debug shit that accidentally slipped in
2019-03-04 22:24:28 +01:00
Arisotura 0392f8736b nearly finish the split. 2019-03-04 21:11:25 +01:00
Arisotura 8448e6bea0 take it further 2019-03-04 20:58:13 +01:00
Arisotura 1e108ad7fb start differenciating between direct and indirect LAN modes.
indirect mode will use regular sockets and not pcap.
2019-03-04 20:52:29 +01:00
Arisotura 7a0c1af30b more progress on LANMAGIC 2019-02-24 13:24:42 +01:00
Arisotura 60391a8a1b LANMAGIC: get somewhere.
it works, but fucks up connections on the host.
2019-02-24 11:59:43 +01:00
Arisotura c135670b9c complete DHCP. ARP for the DHCP server. feed in proper DNS settings. 2019-02-23 18:50:58 +01:00
Arisotura 93d51b0cbc start work on non-direct mode. reply to DHCP discover frame. 2019-02-23 13:41:51 +01:00
Arisotura 0550d22833 hook LAN shito. open proper pcap device. etc 2019-02-21 03:44:22 +01:00
Arisotura f9822cdd44 save LAN settings 2019-02-21 03:06:37 +01:00
Arisotura 023a1ba200 list adapters, display their info 2019-02-21 02:45:01 +01:00
Arisotura 616f2b494b make it somewhat functional. move wifi socket bind setting to wifi settings dialog. 2019-02-21 02:12:33 +01:00
Arisotura 81eae0e3ea add base for wifi settings dialog 2019-02-21 01:58:03 +01:00
Arisotura 78c259121b import some sekrit code that was never committed before 2019-02-21 01:47:35 +01:00
Arisotura 2d41291ee9 pack your shit, kids, we're moving 2019-02-21 01:32:28 +01:00
Arisotura 2340be886c oh well. 2019-02-21 01:21:04 +01:00
Arisotura 6743ea0639 start adding LAN interface shito 2019-02-21 01:20:10 +01:00
Arisotura d2d7c20208 fix WAV loading for files with more than one channel (fixes #351) 2019-02-16 04:14:15 +01:00
Arisotura 86b894ca71 change LidCommand to HotkeyMask so we can use it for other hotkeys without needing a billion variables 2019-01-24 21:28:58 +01:00
Arisotura 4bd96207fe standardize way to detect whether a joystick button was just pressed
(paving the way for more hotkeys)
2019-01-24 03:01:47 +01:00
Arisotura b0efde8bf7 also, update copyright name 2019-01-22 15:58:29 +01:00
Arisotura 47a3d2b49a blarg. setting it to 4 breaks Millionaire 2019-01-22 15:47:32 +01:00
StapleButter adc6da5f21 tweak cached memory timings.
fixes things, but needs watching closely for other things that could break.
2019-01-18 20:29:12 +01:00
StapleButter d2701a0401 small optimization: avoid calling InterleaveSprites() if no sprites were drawn. 2019-01-06 23:16:10 +01:00
StapleButter 64ab8302cb pause audio/mic devices when they're not needed.
fixes potential pop when starting emulator (due to playing uninitialized audio buffer).
2019-01-06 14:22:14 +01:00
Zapeth 7630e2d9db Use workaround for GCC incompatibilities with MSVC aggregate returns
Fixes crash on MinGW builds when ID2D1RenderTarget::GetSize() is called
2019-01-06 12:03:01 +01:00
StapleButter 4b6ebd0532 HARK HARK HARK HARK 2019-01-05 13:03:25 +01:00
StapleButter 669247e8c8 redesign main emu loop to use timestamps instead of being a trainwreck
* cleaner code
* faster in some cases
* more accurate (on-demand compensation for timers and GPU)
* less prone to desyncs
* overall betterer
2019-01-05 05:28:58 +01:00
StapleButter 90f2c0834e add PoC ARM9 instruction cache logic. not actually in use, but it's there as a reference (and if we ever need it). 2019-01-04 21:47:06 +01:00
StapleButter 1e35d18ce6 GX: polygon pipeline doesn't get as far if the polygon is rejected by culling/clipping. 2019-01-03 20:30:30 +01:00
StapleButter 4601636788 GX: always latch rendering engine registers even when not flushing (similar to hardware). 2019-01-03 15:29:25 +01:00
StapleButter 172c2eb229 blfdkgg. I'm a derp.
fix potential buffer overflow.
2019-01-03 13:21:21 +01:00
StapleButter b6481a28ac make nocashprint work from ARM code too.
fixes #315
2018-12-31 20:58:58 +01:00
StapleButter eec27ebf69 oops 2018-12-31 14:19:02 +01:00
StapleButter 786abe63cb add support for 128K EEPROM (Pokémon Mystery Dungeon - Explorers of Sky)
fixes #344

also, fix save type for Puzzler World (plain old 8K EEPROM. not sure why the Wood entry was different)
2018-12-31 14:17:58 +01:00
StapleButter a4593a8f58 also, detect bad old romlist.bin and warn the user. 2018-12-31 04:54:17 +01:00
StapleButter f6b979357f ROM list by game code rather than CRC 2018-12-31 04:35:58 +01:00
StapleButter 2fd913aff2 add 'window size' menu to set the window to an integer size 2018-12-30 21:07:09 +01:00
StapleButter 0f0e04bfa3 init savemem to 0xFF instead of 0x00. 2018-12-30 20:57:20 +01:00
StapleButter 52d783e066 might want to update that when hotplugging joysticks, too 2018-12-30 13:43:59 +01:00
StapleButter 15be25085f make it also be a thing under Windows 2018-12-30 01:49:47 +01:00
StapleButter fc3952c981 libui/gtk: center windows 2018-12-30 01:17:50 +01:00
StapleButter f9e143fc69 libui/gtk: add functions to uiWindow for setting/getting minimized/maximized state
remember if main window is maximized, avoid updating the saved size when it is
2018-12-30 01:07:25 +01:00
StapleButter 62704aee31 * make savestate SRAM reloc disabled by default (confusing behavior)
* add config entry for keeping track of whether the main window is maximized
2018-12-30 00:44:07 +01:00
StapleButter 1cf49e0dbe make joystick hotpluggable 2018-12-30 00:27:12 +01:00
StapleButter 65c27c5c28 fix potential crashes in input config dialog when setting joystick buttons, by using uiQueueMain()
how could I not think of this? GTK is not thread safe.
2018-12-29 23:32:58 +01:00
StapleButter 7a949ddd0e 2D: add support for 8bit reads to DISPCNT/BGCNT.
fixes #331
2018-12-21 17:53:48 +01:00
StapleButter 63ae6bf8fb libui/windows: some work on hiDPI shit
still looks derpy but atleast the rendering and touchscreen aren't broken
2018-12-21 05:01:37 +01:00
StapleButter f86fe46035 move the W=0 check, to be sure to check all the vertices 2018-12-20 01:40:32 +01:00
StapleButter f6e6fa05ea some work on extreme/degenerate shit in GPU
* clip against Z then Y then X. apparently, fixes #310. I had also observed hints that the hardware does it this way.
* truncate W to 24 bits before viewport transform.
* mark any polygons that have a W=0 at that point as degenerate. do not render.
2018-12-20 01:31:31 +01:00
StapleButter 0c37824447 2D: fix fade effects to semitransp sprites and 3D layer. fixes #263
(also remove some useless variable. wtf)
2018-12-19 05:54:39 +01:00
StapleButter dd30b417b8 implement proper support for POWCNT1.
fixes #260
2018-12-18 17:04:42 +01:00
StapleButter 71bbb35bbf watch your debug code better, you derp 2018-12-18 02:00:50 +01:00
StapleButter 694d6cafa2 fix STRD_POST (dumbest copypaste bug of the year)
fixes #276
2018-12-18 01:56:21 +01:00
StapleButter 4a36193cab be sure to always reset NormalPipeline 2018-12-17 02:50:36 +01:00
StapleButter 59c715475d fix oversight regarding hotkey joystick buttons. also prevent triggering the lid command a billion times in a row with a joystick button. 2018-12-16 14:41:46 +01:00
StapleButter a99ebf38db prevent crash if mic init fails 2018-12-16 14:18:59 +01:00
StapleButter 3f26fbddc0 HAW HAW HAW HAW 2018-12-16 01:13:14 +01:00
StapleButter 4a47bd6d53 make it even saferer 2018-12-16 00:39:14 +01:00
StapleButter 502d8c3fa0 avoid potential crash with EmuDirectory if we somehow got no argv or an empty path 2018-12-16 00:38:10 +01:00
StapleButter a34d456fcc GX: timing for command 0x50 is more like 325 cycles on average on hardware. (measured 319/325/331)
fixes #297
2018-12-15 13:33:44 +01:00
StapleButter 12c35093aa set GXSTAT busy flag immediately when writing a command to the GXFIFO.
there was a slim chance that a game could send a couple commands and read GXSTAT.busy as zero immediately after. the new timings made that happen in NSMB (not in the USA ROM, oddly), such that the game was reading the clip matrix while matrix commands were running, and getting the first few values wrong.

fixes #295 and probably others in the same vein.
2018-12-15 05:00:25 +01:00
StapleButter 7fb1c0518c
Merge pull request #285 from abcdjdj/limit_fps
Add option to limit framerate from UI
2018-12-15 00:38:35 +01:00
StapleButter d30043bc85
Merge pull request #230 from dogtopus/pcap-libnames-linux
Add linux libpcap names to the pcap library list
2018-12-15 00:30:44 +01:00
StapleButter 56c2160855 attempting to fix some potential input dialog crashes 2018-12-15 00:22:28 +01:00
StapleButter e6c03619a1 libui/gtk: make uiWindowSetFocus() actually work 2018-12-14 22:57:06 +01:00
StapleButter 2077642a92 libui/GTK: remember directory in which the latest loaded ROM was, point file picker to it. behavior under Windows will likely stay unchanged as the Windows file picker already does that. 2018-12-14 22:03:34 +01:00
StapleButter 10ebae42db avoid crash when the mic WAV couldn't be loaded 2018-12-14 14:20:59 +01:00
StapleButter 46bc2dba33 fix possible overflow in wav resampling. now it doesn't shit itself when loading large wavs. 2018-12-14 05:52:36 +01:00
StapleButter c0c115a0ee fix some wav/mic bugs 2018-12-14 05:48:50 +01:00
StapleButter c7433ca664 finalize microphone code (hooked to all settings etc)
also add volume setting
2018-12-14 05:15:57 +01:00
StapleButter 8372edac0c add file picker thing
I guess this part is done
2018-12-14 04:28:57 +01:00
StapleButter 5efb162302 actually save shit 2018-12-14 04:25:39 +01:00
StapleButter fd54abd900 add dialog for audio settings, flesh it out
not functional yet tho
2018-12-14 04:09:51 +01:00
StapleButter a64e59bf99 hook lid close/open to the actual hotkey system 2018-12-14 03:45:27 +01:00
StapleButter ff1e21733d add hotkey config values.
duplicate DlgInputConfig so that it can also do hotkey config.
also prevent from opening those config dialogs a billion times.
2018-12-14 03:32:40 +01:00
StapleButter cb1e6ce750 proof-of-concept code for closing/opening lid. 2018-12-14 02:36:57 +01:00
StapleButter e829c2e4a1 libui/windows: cache ideal size for uiButton.
input dialog isn't abysmally slow anymore.
2018-12-14 01:15:18 +01:00
StapleButter dc2b1219cd b0rp 2018-12-14 00:35:00 +01:00
StapleButter a4eaf7dc19 SPU:
* support channel repeat mode 3, behaves same as mode 1 (loops)
* always clear channel buffers, so if channels 0-7 use format 3, they don't output old data over and over again (fixes #281)
2018-12-14 00:14:06 +01:00
StapleButter 68d5e3c782 3D: in Z-buffering mode, margin for 'equal' depth test mode is +-0x200, not +-0xFF
fixes #274
2018-12-13 22:46:12 +01:00
StapleButter 32392cc8e2 2D: blending cases that bypass the BLDCNT first-target check (semitransp sprite, 3D layer) also bypass the window 'color effect enable' check.
fixes #299
2018-12-13 19:21:03 +01:00
StapleButter eb1289c2fa release audio devices properly 2018-12-13 18:51:01 +01:00
StapleButter aa8c84f040 * correct romlist.bin (Club Penguin Herbert's Revenge EUR uses 4K EEPROM, not 64K)
* support 32bit reads to POWCNT1 (and also POSTFLG)

fixes #300

(insert sparta meme)
2018-12-13 15:03:06 +01:00
StapleButter ef79cc06f3 proof-of-concept code for feeding a WAV to microphone input.
this eventually needs a proper UI.
2018-12-13 14:34:15 +01:00
StapleButter 4d71da04ec start work on NAND shito. 2018-12-12 20:59:08 +01:00
StapleButter 548432c364 add code to support GBA slot reads for later 2018-12-12 19:43:29 +01:00
StapleButter 2c8f674318 add ROM #3159 to romlist.bin 2018-12-12 17:23:54 +01:00
StapleButter 758bed93bc preliminary microphone code. requires an actual microphone. resulting audio is farty and blargy as fuck. 2018-12-12 16:33:40 +01:00
StapleButter 24d6bd2786 send console output to parent process's console.
this way Windows release builds can get console output if run from cmd.exe, just like under Linux
2018-12-12 15:18:43 +01:00
StapleButter affe1c084f can't hurt to fix that, either, I guess 2018-12-12 03:18:14 +01:00
StapleButter a8f2267a18 zarg 2018-12-12 03:09:48 +01:00
StapleButter e7a4fe11ed add nocashPrint type shit 2018-12-12 02:48:37 +01:00
StapleButter d92c7e79df re-blarg. linux doesn't take \ you idiot 2018-12-11 22:17:49 +01:00
StapleButter 1817c15cb0 blarg 2018-12-11 22:14:15 +01:00
StapleButter e84d66dc64 use melon_fopen_local() for romlist.bin.
bump version number up.
2018-12-11 21:52:21 +01:00
StapleButter 3101bd595f add missing shit to savestates. bump the version up. 2018-12-11 21:50:28 +01:00
StapleButter 40f3f91368 move config-file seeking code to its own thing.
look also into the same directory as melonDS. make it the preferred place for storing melonDS.ini.
rewrite WinMain() wrapper.
2018-12-11 21:34:05 +01:00
StapleButter 9a0bf912d9 (finally) axe trainwreck savetype-autodetect code.
pull that from ROM database.
for now, assume EEPROM 64k if not found, or null for homebrew.
2018-12-11 20:39:07 +01:00
StapleButter f03828f7b9 add code that searches into romlist.bin 2018-12-11 19:47:03 +01:00
StapleButter e2f3c29360 blarg.
also, calculate ROM CRC.
2018-12-11 19:16:19 +01:00
StapleButter 0579a1cd2e add CRC32 shit 2018-12-11 19:10:57 +01:00
StapleButter 4aafdee14d more sensible cache timings
(still a big fat hack)
2018-12-11 17:59:52 +01:00
StapleButter e4c6ac55d2 Mario&Sonic doesn't like it when its code is running too fast; dual-screen-3D shits itself big time 2018-12-11 17:28:59 +01:00
StapleButter 91b2f64596 add back faster prefetch for ARM9 2018-12-11 16:41:18 +01:00
StapleButter beb092f93e change where audio/joystick are inited, attempting to fix potential COM initialize issues 2018-12-11 16:24:55 +01:00
StapleButter 3dd8c7b152 finish the work on the main loop. finally fix all cases of desync I could find. also add #ifdef'd debug code to check for desyncs. 2018-12-11 15:56:34 +01:00
StapleButter 78d384a754 temp commit
almost done killing ARM9/ARM7 desync, f
2018-12-11 03:08:46 +01:00
StapleButter aba4610d45 fix bugs
still kinda shitty tho. like, we lost enough timer accuracy to have visible effects (aging cart tests that fail, FMVs that play too slow, etc)
2018-12-09 01:46:10 +01:00
StapleButter b569c03884 make it fasterer 2018-12-09 01:26:51 +01:00
StapleButter 29bca33bc6 take it somewhere.
still need to speed it up a tad.
2018-12-09 01:17:05 +01:00
StapleButter c6fb152d80 start devolving things.
also implement proper DMA timings.

will not build. don't try.
2018-12-08 22:33:41 +01:00
StapleButter 86dae1a25c make this other branch where we're going to actually make it usable
but it'll be a gross hack
2018-12-08 20:27:00 +01:00
StapleButter 0b1c2f9691 begin PU work 2018-12-04 18:32:19 +01:00
StapleButter 9ebcb5f143 axe CP15.h, we don't need it anymore. 2018-12-04 17:55:03 +01:00
StapleButter 172fb4876a begin work on general timing renovation. way shitty because it behaves as if caches were off, so everything will be slow as shit. 2018-12-04 17:54:10 +01:00
StapleButter 808bda9171 do not require dpad mappings for joystick axis to work 2018-12-02 15:11:56 +01:00
StapleButter 5b20f40fad oopsies 2018-11-28 02:45:20 +01:00
StapleButter b1973014d3 add some missing shit to savestates 2018-11-25 22:40:08 +01:00
StapleButter 4b8cea3b38 revise windows to be even closer to hardware.
apparently hardware only ever updates its 'inside/outside window' status when reaching the coordinates. which becomes apparent if you, like, try to invert a window midframe.
2018-11-25 19:13:23 +01:00
StapleButter 2035784f9f on the DS, windows with backward coordinates end up inside-out. revise window code accordingly. fixes #287. 2018-11-25 18:36:47 +01:00
StapleButter 5f1f2a7b4a fix regression in Marvel Nemesis. keep GX cycle counter from drifting absurdly far in the negatives, and fix a few other issues. 2018-11-25 17:39:43 +01:00
StapleButter 3f8befaf4e add support for forced-blank. fixing spurious colors during screen transitions in Picross 3D.
I thought I had already fixed that, but it was stuck in the long-dead jit branch, so, here it is, back from the dead.
2018-11-24 21:10:26 +01:00
StapleButter 46d5a31275 well yeah that's what I thought
GXFIFO stalls don't stall the ARM7
2018-11-24 05:23:35 +01:00
StapleButter 391c8d43b0 drain GX pipelines when there's nothing else running. fixes some weird bugs, apparently. 2018-11-24 04:27:27 +01:00
StapleButter 7b48ce5b75 * fix possible issues with GXFIFO stalling
* rework GPU timings, now almost same as hardware. display lists generally execute faster. not finished. not bad for a start tho.
* Rayman RR2 is still getting sound streaming issues. I don't think GXFIFO stalls are supposed to halt the ARM7. that doesn't make sense and would mess badly with sound since it's also using the ARM7 bus.
2018-11-24 02:29:25 +01:00
StapleButter a9e7f8bc5b add proper support for GXFIFO stalls.
bad games that blast the GXFIFO and overflow it:
* Super Mario 64 DS
* Rayman RR2

latter seems to get its music streaming crapoed.
2018-11-23 22:21:41 +01:00
Madhav Kanbur 78c767b693 Add option to limit framerate from UI
Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>
2018-11-21 11:11:02 +05:30
StapleButter 27e1ca4103 beginning timing renovation.
smarter Reschedule().

gotta start somewhere, I guess.
2018-11-09 14:10:06 +01:00
StapleButter 7ba32ea076 make the ARM clock shift configurable. nothing fancy there, just paving the way for DSi support later. 2018-11-07 18:38:54 +01:00
StapleButter fa4fa164cb * store all 32 matrix stack entries in savestates instead of 31.
* bump savestate version up. will break compatibility, but the alternative would be guessing the missing matrix entries somehow, so blarg.
* avoid relocating the savefile if loading a savestate fails.
2018-11-05 16:14:48 +01:00
StapleButter 9b32418367 3D: fix0r matrix stack handling when stack pointers overflow (it fucking wraps around).
fixes #231 and probably others of the same vein.
2018-11-05 16:05:16 +01:00
StapleButter b4165cc0a9 3D: keep the rasterizer from accidentally going out of bounds when given very flat X-major edge slopes.
this, by a fucking shitshow of butterfly effect, ends up fixing #234. technically, the rasterizer was going out of bounds, which, under certain circumstances, caused interpolation to shit itself and generate Z values that were out of range (but still ended up in the zbuffer). sometimes those values ended up negative, which caused these glitches when polygons had to be drawn over those.

about fucking time.
2018-11-04 23:21:58 +01:00
StapleButter fb284f33ad Merge branch 'master' of https://github.com/StapleButter/melonDS 2018-10-27 14:44:52 +02:00
StapleButter 658856b256 fix implementation of CoTaskMemRealloc, as it can decide to move the buffer elsewhere, we have to account for that 2018-10-27 14:44:39 +02:00
StapleButter 307c26de93
Merge pull request #248 from Dirbaio/master
Two fixes
2018-10-27 14:16:46 +02:00
StapleButter a4339daade oops! don't hardcode a 9 2018-10-27 13:51:40 +02:00
StapleButter f4890137c0 fix configfile loading under Windows, for when it checks AppData
by making it actually, you know, build the complete file path

hopefully that fixes that crash bug, but I couldn't reproduce it after touching the code some. heisenbugs are lots of fun
2018-10-27 13:50:29 +02:00
StapleButter d4d4965b2f remove trainwrecky code that caused issues now. 2018-10-26 22:17:27 +02:00
StapleButter c8d63f2be7 fuck that shit.
I fucking give up.

Windows actually doesn't want to cooperate either, and is being utter shit.

so, I'm going to do it the desmume way.
2018-10-26 20:10:25 +02:00
StapleButter eb67ac9a1b finally come up with a (crummy) solution for those fucking shitty submenus 2018-10-26 20:56:59 +02:00
StapleButter cbe63f8fd5 until we actually get somewhere with the menu crap... fix potential crashes when exiting. 2018-10-26 18:39:41 +02:00
StapleButter c5670a22a5 fix GTK menus asploding upon exit. hopefully. fuck this code 2018-10-26 16:29:46 +02:00
StapleButter 65bba8ff81 call it a release??? 2018-10-24 00:38:35 +02:00
StapleButter 6e1209dd32 misc things 2018-10-24 00:32:31 +02:00
StapleButter 8b4ba2d8b9 separate SRAM setting coded, I guess 2018-10-24 00:24:36 +02:00
StapleButter 1edf2aed3b * code function for relocating the savefile.
* don't bitch at the user when trying to load a savestate file that doesn't exist.
* grey out 'load state' items if there is no file.
2018-10-23 22:54:09 +02:00
StapleButter f60ac42466 pass savefile name to NDS::LoadROM() instead of having the core generate it. 2018-10-23 21:52:41 +02:00
StapleButter a4a9bca5f0 fix more shit 2018-10-23 20:40:57 +02:00
StapleButter 98076f2334 hopefully fix all 3D-related crashes when loading savestates 2018-10-23 20:20:38 +02:00
StapleButter c9a7a0d744 * start coding UI shito for savestates
* change default mapping for L button to the key right next to Shift because we're gonna derp around with it
* still some shito to fix, but hang on, we're getting there
2018-10-23 19:57:01 +02:00
StapleButter 4075dad0a8 3D: attempt at fixing that shadow/AA interaction bug in the MKDS character select screen 2018-10-22 01:36:04 +02:00
StapleButter d191af8690 rewrite how structures are stored to savestates (store individual fields, to avoid compatibility issues)
also fixes stability issues when 3D is involved. turns out we were storing raw pointers to vertices. figures

more crapo code to get around that, but atleast it works without asploding now.
2018-10-21 03:16:41 +02:00
StapleButter cbcecc8cdb don't store BIOS in savestates. no point doing so. 2018-10-19 01:05:19 +02:00
StapleButter 467461fb3d properly initialize shit before attempting to read from the file
fixes load failure when attaching a debugger
2018-10-18 05:14:15 +02:00
StapleButter b5c39680a5 hax, finally making savestates usable
F1 to save, F2 to load. filename hardcoded for now.

shits itself:
* when the 3D engine is used
* when a debugger is used (heh)
2018-10-18 04:00:16 +02:00
StapleButter 20862b7daf aight, wifi done 2018-10-18 03:22:53 +02:00
StapleButter f51e1ec805 I guess that might have malfunctioned 2018-10-18 03:10:17 +02:00
StapleButter 86f5155f72 more procrastinating before actually starting savestatez0ring wifi.
I need to pee
2018-10-18 03:09:03 +02:00
StapleButter 3a54b9178b RTC done. misc shito. 2018-10-18 03:04:39 +02:00
StapleButter cbe5780837 SPI done 2018-10-18 02:54:48 +02:00
StapleButter 7bf62918cd SPU done 2018-10-18 02:45:38 +02:00
StapleButter a2cc7087f7 GPU done 2018-10-18 02:31:01 +02:00
StapleButter 148f4032f1 fix code that would have fucking asploded 2018-10-18 01:38:33 +02:00
StapleButter f4cf54829e a bit moar of it
brick by brick, file by file, we will destroy capitalism

and make savestates work, maybe
2018-10-18 00:54:21 +02:00
StapleButter de91eabf71 savestate shito: fix compile errors.
still far from being finished, so avoid using unless you want to spawn blackholes or some pretty bad shit.
2018-10-18 00:27:55 +02:00
StapleButter 7cbcc6c230 zlarg 2018-09-15 03:41:09 +02:00
StapleButter 60f24a7432 moar progress on it 2018-09-15 03:29:36 +02:00
StapleButter 0bfd019dc0 start implementing actual shito
(also looks like the test bench in libui_sdl/main.cpp snuck in with the copyright update. shit)
2018-09-15 02:47:34 +02:00
StapleButter fea7955675 fixor copyright years. 2018-09-15 02:32:13 +02:00
StapleButter 1d19145983 moar working now. 2018-09-15 02:14:08 +02:00
StapleButter aa59ee257e base for savestate crapo.
I'm not quite settled yet, so before I can get into the real meat, I figured I'd address some 'popular request' items.
2018-09-15 02:04:21 +02:00
Dario Nieuwenhuis d721e098eb Make "unknown IO" messages consistent, all including value and PC. 2018-05-24 01:09:40 +02:00
Dario Nieuwenhuis cb79a5dc14 Make Main RAM size configurable in a single place. 2018-05-24 01:09:23 +02:00
StapleButter 20050fb668 quick attempt at supercard emulation. really ugly 2018-04-27 20:00:53 +02:00
StapleButter 81e98b5e12 direct boot: init cart ID from NDSCart::CartID instead of hardcoding it 2018-04-27 19:26:46 +02:00
StapleButter f0bc364210 init AUXSPICNT to 0x8000.
(guess sloppy DLDI drivers expect that)
2018-04-27 00:20:18 +02:00
StapleButter 39bd94f551 start work on DLDI, with some (very haxy) patching so it can do interesting things 2018-04-27 00:17:05 +02:00
StapleButter aa3fc8be68 fix build under Windows
(fuck that shit)
2018-04-24 23:16:26 +02:00
Dario Nieuwenhuis a2c95f2dc3 Add 32bit IPCSYNC reads and writes. 2018-04-24 22:31:52 +02:00
dogtopus 41b40cd4fa Add linux libpcap names to the pcap library list 2018-02-22 10:39:02 -04:00
StapleButter aab0030137
Merge pull request #224 from hcorion/alternate-loading
Load bios, firmware and melonDS.ini from exe, ~/.config/melonds or AppData
2018-02-19 13:08:34 +01:00
StapleButter 12e33ae872
Merge pull request #222 from dogtopus/master
Fix build on linux, enable build directory support
2018-02-19 12:50:54 +01:00
Zion Nimchuk 52df6be5f8 Load bios, firmware and melonDS.ini from executable or ~/.config/melonds or AppData 2018-01-11 14:38:57 -08:00
StapleButter 981661a36d wifi: implement increment for txheader[4] 2018-01-04 00:10:35 +01:00
StapleButter d50e7e4686 fix SMULWx/SMLAWx. fixes #78, finally 2017-12-29 03:17:32 +01:00
dogtopus 549bcf6d71 Fix build on linux, enable build directory support
Specifically:

- Include stddef.h for missing ptrdiff_t
- Define PCAP_OPENFLAG_PROMISCUOUS if not using WinPcap because it seems to be
  a WinPcap extension
- Make use of CMAKE_CURRENT_{SOURCE,BINARY}_DIR to enable building under a
  directory other than root of the project
2017-12-22 12:29:34 -04:00
StapleButter 9336e15197 avoid crashing when receiving a packet that is too large 2017-12-19 01:00:55 +01:00
StapleButter 5fe30d306f wifi:
* fix BSSID/MAC check when receiving packets
* safeguard AP auth/deauth so local MP doesn't trigger it
2017-12-19 00:33:09 +01:00
StapleButter 141e2a7ab0 clear chipselect when turning SPI off. fixes libnds bugs. 2017-12-19 00:20:36 +01:00
StapleButter 3bdb7a7f2d hook up the LAN (pcap) interface 2017-12-18 23:24:45 +01:00
StapleButter 0ff67d28d3 wifiAP: basic support for probereq/auth/assoc/deauth/deassoc 2017-12-18 22:44:29 +01:00
StapleButter 9632aa4021 start working on melonAP.
it sends beacons!
2017-12-18 21:37:17 +01:00
StapleButter 07685a80a6 add base for wifi AP 2017-12-18 19:53:51 +01:00
StapleButter 4ec2d109f7 wifi: more shit 2017-12-18 19:31:26 +01:00
StapleButter e44bc7743d actually init pcap etc 2017-12-17 23:09:48 +01:00
StapleButter 17087a1ece start work on libpcap shit 2017-12-17 17:21:50 +01:00
StapleButter e4e8d775c0 libui/windows: don't explode if setWindowText() fails. fixes random crash when closing window.
also add extra safety, can't hurt.
2017-12-17 02:11:28 +01:00
StapleButter 2e82a4f26a gtk: add icon 2017-12-16 05:43:34 +01:00
StapleButter ca41ce6efd windows: add icon 2017-12-16 04:10:32 +01:00
StapleButter fff4ca0c95
Merge pull request #216 from bentley/master
Small fixes
2017-12-12 02:34:00 +01:00
StapleButter 904316de60 fix ScreenGap loading, fixes #218 2017-12-12 02:32:11 +01:00
StapleButter 2333b17029 bump version number 2017-12-12 02:28:57 +01:00
StapleButter 73bf4471ee audio: change output rate to 47340Hz, add resampler with small margin to elimiate pops/clicks due to output rate fluctuation
output rate is picked such that 1024 samples at that rate equal exactly 710 samples at the SPU's output rate
2017-12-11 18:41:05 +01:00
StapleButter c639152541 urgl. how could I let something that dumb slip in 2017-12-07 11:17:51 +01:00
Anthony J. Bentley 4519a7ae1f Pass correct number of arguments to printf. 2017-12-06 22:06:15 -07:00
Anthony J. Bentley b603029549 Fix bitwise operation precedence. 2017-12-06 22:02:55 -07:00
StapleButter e4f030149b add option to toggle filtering 2017-12-07 02:50:05 +01:00
StapleButter 18bcefe83b libui: add parameter to uiDrawBitmapDraw() to specify filtering 2017-12-07 02:41:46 +01:00
StapleButter b58a5334fa fix potential memleak 2017-12-07 01:24:39 +01:00
StapleButter a7c7779917 ensure proper minimum window size at all times 2017-12-07 01:13:13 +01:00
StapleButter b5046b9766 comment out some unwanted printf's 2017-12-07 01:04:00 +01:00
StapleButter 10b797e53d libui/GTK: properly clean up menus, so it doesn't crash upon exit 2017-12-05 05:21:11 +01:00
StapleButter 746b4db382 libui/GTK: add area BG color support 2017-12-05 04:20:52 +01:00
StapleButter dd529f0f5c libui/GTK: fix drawmatrix transform order to match Windows. fixes rotation. 2017-12-05 04:12:03 +01:00
StapleButter c5872dab7d libui/GTK: start adding submenu support. cleanup still has to be done. use uiMenuAppendCheckItem() for checkable items. 2017-12-05 03:41:49 +01:00
StapleButter bdf9f56152 libui/GTK: add uiAreaSetBackgroundColor, not hooked up yet 2017-12-05 03:04:17 +01:00
StapleButter 21e204cdea don't pointlessly restrict the window size 2017-11-23 21:22:47 +01:00
StapleButter 85c375cce7 * remember screen rotation/gap/etc settings
* fix menu cleanup to take submenus into account properly, so it doesn't crash when exiting
2017-11-23 21:02:24 +01:00
StapleButter aa4f427ed4 properly resize window when changing display settings, etc
begin polishing things
2017-11-23 20:01:43 +01:00
StapleButter 8e6d834f13 libui: add API for setting a background color for uiArea. (TODO: do for GTK)
make window background black.
2017-11-23 19:28:06 +01:00
StapleButter b96ac8e000 (finally) fix sound
* reset capture position when starting capture
* reorder channel/capture handling
* implement FIFO for channel and capture
2017-11-11 18:46:42 +01:00
StapleButter c3675af538 properly reset IE/IF, fixes some reset issues. 2017-11-09 16:02:37 +01:00
StapleButter 35c3b34a09 make screen rotation configurable. start making it all clean. 2017-11-09 16:02:17 +01:00
StapleButter f2a5be6096 make touchscreen code take rotation into account 2017-11-09 00:15:59 +01:00
StapleButter 34513063ab begin work on rotation 2017-11-09 00:04:01 +01:00
StapleButter bb87a709be cooler screen positioning in horizontal mode 2017-11-08 02:02:15 +01:00
StapleButter e6e5f48748 attempt at horizontal mode, I guess 2017-11-08 01:53:20 +01:00
StapleButter 857ba49759 actually implement screen gap 2017-11-08 01:34:11 +01:00
StapleButter 5bea3cc530 3D: add support for 8bit accesses to GXSTAT (Golden Sun - Dark Dawn) 2017-11-04 15:13:01 +01:00
StapleButter 0a04efc33e attempt at auto-emphasis mode, emphasizing main screen 2017-10-30 05:45:26 +01:00
StapleButter 85d823d4c7 fix more sizing bugs 2017-10-30 05:17:20 +01:00
StapleButter f4e7e2f62a fix aspect ratio code 2017-10-30 05:08:04 +01:00
StapleButter c9082cd50d some attempt at fancypants scaling, I guess 2017-10-30 04:39:50 +01:00
StapleButter b8706c29c7 make it betterer 2017-10-30 03:21:12 +01:00
StapleButter 84a842c6f3 libui/windows: add support for submenus 2017-10-30 03:11:45 +01:00
StapleButter 3881b2615b libui/Windows: allow file pickers to navigate through shortcuts. fixes #199 2017-10-21 22:24:29 +02:00
StapleButter e9798e032b up version number (I forgot) 2017-10-11 04:38:11 +02:00
StapleButter befc5db031 restore FPS counter 2017-10-11 03:06:30 +02:00
StapleButter f9d9aaec11 Merge pull request #112 from bentley/master
Portability fixes
2017-10-11 02:56:06 +02:00
StapleButter 73626e9f45 fix memory leak 2017-10-11 00:40:56 +02:00
StapleButter 273fbe24f4 add fopen wrapper to support UTF8 paths/filenames under Windows. 2017-10-11 00:32:43 +02:00
StapleButter ee1da52d77 fail gracefully when ROM loading fails 2017-10-11 00:01:05 +02:00
Anthony J. Bentley 56bf1ecc13 Treat failed haptics initialization as a warning, not a fatal error. 2017-10-09 03:42:50 -06:00
Anthony J. Bentley df19b93408 Include POSIX headers required for fd_set and INADDR_ANY. 2017-10-09 03:41:17 -06:00
StapleButter a15c395460 GTK: file drop support. adsfgdgfdg 2017-10-05 03:10:14 +02:00
StapleButter 084d9254e3 maybe now the input dialog can stop being dumb 2017-10-05 02:05:23 +02:00
StapleButter d895dfc9fb hopefully fix that shit for good 2017-10-05 01:58:41 +02:00
StapleButter a84caacb03 make window actually resizable below min size. we lose proper client sizing under GTK tho. 2017-10-05 01:35:50 +02:00
StapleButter f714c492b9 GTK: hook SetMinSize. fuck around with gtk_widget_set_size_request() so the window can be resized smaller than the initial size. 2017-10-05 01:22:03 +02:00
StapleButter 5d5311c53c use grids instead of nested boxes for input config dialog. (still lags, needs optimization)
adjust things to make those dialogs sexier.
2017-10-05 01:03:22 +02:00
StapleButter 9d3f13b689 rework things a bit.
also remove some useless variables.
2017-10-05 00:13:22 +02:00
StapleButter 5b71ffceee minor fix 2017-10-04 02:47:49 +02:00
StapleButter 9125620ff1 christ, did I seriously forget to remove that code 2017-10-03 03:28:49 +02:00
StapleButter 012a7d61a7 actually make uiKeyName() work 2017-10-03 02:52:30 +02:00
StapleButter 9527499124 hook up area key events 2017-10-03 02:19:42 +02:00
StapleButter fbe4e4938b finally finish cairo bitmap support. asdsfdfgfsgf 2017-10-03 01:29:35 +02:00
StapleButter 5450c7cc3d hook up Resize event 2017-10-03 00:51:56 +02:00
StapleButter 7f05bf24ad libui/GTK: start catching up. atleast now it runs without exploding (mostly). 2017-10-03 00:28:41 +02:00
StapleButter dad0e6b6e8 add support for non-resizable windows 2017-10-02 23:26:25 +02:00
StapleButter f8b63759f7 save window size 2017-10-02 23:15:39 +02:00
StapleButter 4781bd5671 fix ARM7 BIOSPROT. not that it matters. 2017-10-02 04:57:23 +02:00
StapleButter dbb174c531 implement 8bit reads to div/sqrt registers.
RaymanDS showed some interest for that, so there we go.
RaymanDS still fucks up.
RaymanDS is a pile of shit.
melonDS is bad at timings.
2017-10-02 04:27:50 +02:00
StapleButter d0770596ea re-add basic scaling 2017-10-02 03:34:17 +02:00
StapleButter 09920126dd add support for setting an explicit min size for libui controls. for now only supported by uiArea. 2017-10-02 01:58:09 +02:00
StapleButter ce592a1d80 this TODO item is already done, idiot 2017-10-02 00:55:44 +02:00
StapleButter 1975efaeea fix bugs with SPI shutdown 2017-10-01 03:19:39 +02:00
StapleButter 9ad89d8cb5 fix crash under Windows 10 2017-09-30 23:17:36 +02:00
StapleButter ab9800fbac actual joystick input
also sync keyboard input nicely
2017-09-30 20:05:56 +02:00
StapleButter 9f486de76a allow entering joystick config 2017-09-30 19:27:47 +02:00
StapleButter acc23f47cc actually get the input dialog somewhere 2017-09-30 18:58:13 +02:00
StapleButter cb284fbe2b get the input dialog started 2017-09-26 02:20:28 +02:00
StapleButter 172babe9d0 add general emu settings dialog 2017-09-25 04:26:41 +02:00
StapleButter 69bc06402c change default keyboard mapping 2017-09-23 04:10:25 +02:00
StapleButter f52322ee20 * support for dragdrop
* support for loading ROMs via command line (except it will try to get the BIOS/firmware from where the ROM is. derp)
* re-add missing BIOS/firmware dialog. fix libui to allow dialogs without a parent window.
2017-09-23 03:39:09 +02:00
StapleButter 14b7cf1987 add hooks for when the window gets/loses focus.
properly refocus draw area.
lay base for dragdrop.
2017-09-23 02:58:04 +02:00
StapleButter a9cacb9dd7 make Quit menu item actually work 2017-09-23 02:03:11 +02:00
StapleButter e298d50e76 avoid potential race conditions during reset/etc by waiting till the emu thread got the message to pause 2017-09-22 01:33:18 +02:00
StapleButter 332282c809 oh also, fuck that shit 2017-09-21 21:44:39 +02:00
StapleButter 8e41ed751e change 'pause' menu item to a proper check item. GTK is picky about it. 2017-09-21 21:31:20 +02:00
StapleButter 65b332b152 reenable wifi socket code 2017-09-21 04:42:31 +02:00
StapleButter 2eea801d26 goodbye wx crap. you will not be missed. 2017-09-21 04:35:55 +02:00
StapleButter 76c5451ad9 I'm an idiot 2017-09-21 04:09:09 +02:00
StapleButter 48cf9eb805 make it a menu option while we're at it 2017-09-21 04:08:03 +02:00
StapleButter 495d0ba12d add support for SPI shutdown, btw 2017-09-21 03:59:12 +02:00