* Report correct Windows architecture for the build in the manifest
* Output processed .rc/.manifest in the CMake binary dir to prevent
potential issues with the files conflicting if cross compiling melonDS
on the same Windows machine
* Make the original file name actually make sense
This may not work, as I'm not sure why the code originally did as it
did. But this at least lets it compile, we'll need someone with a real
Windows ARM device to test this as I only have a VM with no GPU
acceleration.
* WIP: use Duckstation's context code to directly render into QT Widget from separate thread without two OpenGL contexts
currently only works on Windows
* reenable gay OSD
* add back vsync
* make it atleast a little more thread safe
* linux support
* don't segfault on closing
* reorganise and cleanup build system
it's still not good, but better than before
* macos?
* try to get it working on Ubuntu CI
also update instructions
* let's try this
* ok how about this
* try creating an OGL 4.3 context first
(https://i.kym-cdn.com/photos/images/original/001/264/842/220.png)
* fix Ubuntu
* hm
* try again for Windows
* let's try this
* make the OpenGL renderer work again
that was stupid
* do OGL surface resizing from the mainthread
* Fix small mistake in GL context creation on macOS causing version 3.2 to
be considered invalid
* C stupidness
* cleanup
* don't let the emuthread deinit OGL if there's no OGL
* reset lastScreenWidth/Height when deiniting OpenGL
* disable stencil test while drawing framebuffers
* macOS: Link Cocoa framework explicitly when not building with Qt6
Seems to be needed for the classes used by DuckStation's GL context
code.
* Set ScreenPanelGL's minimum size immediately
Fixes GL context creation for OpenGL display on macOS using the wrong
size as the underlying window was not resized to the correct size by Qt
yet.
* don't emit window updates when OGL display is used
* stuff Arisotura said
Co-authored-by: Nadia Holmquist Pedersen <nadia@nhp.sh>
* attempt at betterer wifi
* add preliminary sync mechanism
* fix gaps in wifi implementation
* move local-MP comm to its own module instead of cramping Platform.cpp
* remove some stupid cruft
* as you wish, Sorer
(starting work on shared-memory system)
* shared-memory IPC that actually works (albeit Windows-only for now)
* shut up logging from NULL writes on ARM7 (ffs Nintendo learn to code)
* get this somewhat good
* leave client sync mode when host deauths. makes download play actually work.
* start implementing MP-comm error handling
* * add MP-reply error counters
* feeble attempt at fixing slowdown/desync/etc problems
* somewhat better exchange/sync method
* * when entering power-saving mode, be sure to finish transferring the current frame first
* fix misc bug due to old cruft leftover
makes for a more stable connection
* remove a bunch of cruft
* set wifi time interval to 34 cycles instead of 33. games seem sensitive to the general timing of wifi vs the rest of the system, and this seems to make things run better, atleast until I rewrite this to use a proper scheduler.
* more graceful handling of disconnects
* deal with FIFO overflow more gracefully
* BAHAHAHAHAHAHAHAHHHH
THE SNEAKY BASTARDS
so, when the DS receives a beacon with the right BSSID
that beacon's timestamp is copied to USCOUNTER
* attempt at making the connection process smoother for weird games
* * begin adding POWCNT2, only applies to wifi for now
* begin work on wifi scheduler
* implement the shitty timers
* add the RF wakeup thing
* begin work on receiving frames. for now it can just receive melonAP beacons, but hey, it's a start.
* add enough TX functionality that online wifi is a possibility again.
* there are problems with this scheduler thing. committing it anyway
* kind of a rollback... we're gonna work out a compromise on this, I guess
* don't transmit shit if RXCNT.bit15 isn't set
* move RX-finish to its own function. more accurate filtering. implement RXFILTER.
* remove some cruft
* fix some of the shittiness when trying to connect more than two players
* fix some more shittiness
* fix more wifi shittiness (mainly don't try to receive shit while sending a frame)
* run wifi every 8µs. improves performance.
* fix IRQ14/IRQ15
* make this work under Linux
* Make it work on macOS, for now using a custom sem_timedwait
implementation.
If anyone knows anything about mach ports and have an idea for how to
make this work using mach IPC, please do let me know.
* 25ms seems like a good timeout
* begin work on proper multiplayer UI shito.
for now, determine a global instance ID, and derivate the system MAC from it. remove 'randomize MAC' option.
* finish removing RandomizeMAC
* lay groundwork for instance-unique config
* work some on the UI... make it not labelled Fart
* more UI work: make it explicit that some things are instance-unique
* separate firmware files for multiplayer instances
* make instances save to different save files, too
* more UI work, make things somewhat less shitty
* lay base for the multiplayer settings dialog
* actually hook up most of that dialog
* actually implement the fun audio settings
* ensure all the wifi shit is properly savestated and reset. properly update timings for the wifi region when wifi is disabled.
* add more fun labels
* * ignore WEP frames if WEP is off
* implement RX_LEN_CROP
* fake enough of WEP processing to make Inazuma Eleven work
* * do not copy more ROM banner data than actually needed
* avoid trying to read out of bounds if the banner offset is bad
* Fix oversight with the preferences action causing the build to fail on macOS
Co-authored-by: Nadia Holmquist Pedersen <nadia@nhp.sh>
Title strings should be null-terminated.
Read the string up until this point instead of reading the full 128 characters.
(Also fix the .ui file of ROMInfoDialog to prevent it from being too wide.)
These changes modernize the CMake build system to (hopefully) match newer best practices
* Library linking is simpler and more automatic because of using imported targets
* Multi-configuration builds should be supported (Ninja Multi-Config, Visual Studio, etc. generators)
* Clean up build options using cmake_dependent_option
* Let CMake do its job in more cases, like finding the math/dl libraries and detecting and enabling LTO support
* Remove platform-specific kludges like the Fedora/flatpak LTO workaround and a bunch of Windows stuff
* Simplify Windows static builds
* Consistent formatting
The DS battery level is configured via the SPI Power Management Device,
and the DSi's is configured via the I2C BPTWL. Add support for changing
these registers and add the "Power Management" dialog in the UI.
* Implement MainRAM management dialog
* Modify RAMInfoDialog
- use emuThread to avoid a race condition.
- replace RAMUpdateThread to QTimer
Co-Authored-By: RSDuck <RSDuck@users.noreply.github.com>
* Update src/frontend/qt_sdl/RAMInfoDialog.cpp
small typo
Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>
* Update src/frontend/qt_sdl/RAMInfoDialog.h
small typo
Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>
* typo errors in RAMInfoDialog
Rrevious->Previous
* add new line to the end of the file
Co-authored-by: Rayyan Ansari <rayyan@ansari.sh>
* enable raminfo when cart is inserted
* Modify that only the 'value' item can be edited in RAMinfoDialog
* fix: function name incorrect error
* fix: function name incorrect error2
* fix: wrong way to get ram value
Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>
Co-authored-by: Rayyan Ansari <rayyan@ansari.sh>
On GNOME, the Group Box's titles don't align with the text in the buttons.
This commit removes the Group Box titles and instead uses Labels to fix this.
also including:
* getting rid of shitty strings
* all new, cleaner ROM handling code
* base for DSi savestates
* GBA slot addons (for now, memory cart)
Qt's default window positioning is somewhat unreliable, and since we
don't currently remember the window position, let's at least make sure
that it's properly centered on open.
Treating the fail of SDL_INIT_JOYSTICK as non-critical, because on some systems that SDL feature can for some reason fail. This leads to the emulator closing with a critical error, even though it would work perfectly fine with just a keyboard.
* non-defined CPU modes are actually possible
* bit4 of all PSRs is forced to one (modes 00-0F aren't possible)
* modes 14/15/16 and 18/19/1A share a SPSR with modes 17 and 1B respectively (but they don't share the register banks)
* modes 10 and 1C/1D/1E don't have a SPSR (MRS returns the CPSR always)
* Generate a simple non-bootable firmware when not provided.
* Expose Username and Language into settings dialog.
* Add firmware overrides for more settings. Also make override optionals when a firmware is provided.
* Refactor firmware settings into separate dialog.
* use usernameLength instead of u16Username.length() (#3)
* Fix curly braces code-style.
* LoadUserSettingsFromConfig: convert from UTF-8 to UTF-16 via wstring_convert
* Fix firmware username capitalization.
* cleanup firmware backup logic
* Put brace where it should be
Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>
Co-authored-by: Filippo Scognamiglio <flscogna@gmail.com>
Co-authored-by: kyandora <71771686+kyandora@users.noreply.github.com>
Co-authored-by: Filippo Scognamiglio <filippo.scognamiglio@felgo.com>
Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
Co-authored-by: Rayyan Ansari <68647953+RayyanAnsari@users.noreply.github.com>
* make timers usable for measurement shito without being assfuckingly unreliable
* bürp
* Arisotura can you ever clean up your goddamn code
also regroup the timer code instead of having it split weirdly
* make the set-timing functions a tad less hacky
* congrats Arisotura you made an ass-enum
* add timing region tables, and separate timings for ARM9 DMA (exempt of 3c penalty)
* temp work on DMA timings, not finished
also, did you know? 'increment/reload' is also a thing for the source address
* begin work
* add some of the GBA slot/wifi timings
* complete it, I guess
* make some progress
* getting somewhere
* sdsdfs
* see, Arisotura, was it that hard? blarg.
* Fix for https://github.com/Arisotura/melonDS/issues/1169
LoadNAND was storing the stage 2 bootloader, while NWRAM access was disabled by Bit25 of SCFG_EXT putting the stage 2 into old shared WRAM, while executing it later with the bit enabled and fetching from an empty NWRAM.
* Fixed bug, where access to the NWRAM Bank A used the wrong page mask for write access
* Remove spaces before comma
Co-authored-by: Tim Seidel <t.seidel@kts-systeme.de>
Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
* SCFG_BIOS now selects between NDS and DSi BIOS
Allowing experimental direct boot.
* - making NWRAM Priorities work as in the HW
- fixed loading DSi stage2 Bootloader when in direct boot (should not be loaded) and might interfere with the image loaded into the (N)WRAM previously
* NWRAM and SCFG Registers are now write-guarded by the corresponding SCFG_EXT7/9 Bits
* removed debugging remainder
* Moved NDSHeader dependent SCFG initialization into the new DSi::SetupDirectBoot function called from NDS::SetupDirectBoot when ConsoleType is DSi
* removed redundant SCFG_BIOS bit checks
* Set of changes from RSDuck's review
* removed a forgotten comment
* - removed the guarded debug outputs for NWRAM
- NWRAM writes to bank and window registers now apply their write masks.
- added comment on an existing TODO within the code describing, why this is OK
- fixed initial NWRAM bank reset just accessing set A
* NWRAM not mapped to 03... range if bit25 in SCFG_EXT is cleared
* removed NWRAM write block on cleared bit25 in SCFG_EXT
* changed type of iterator for MapNWRAM_x functions from s8 to int
* - reduced calculations/comparisons on NWRAM write operations
- changed u8 to unsigned int for an iterator MapNWRAM_x
Co-authored-by: Tim Seidel <t.seidel@kts-systeme.de>
* - added fallback to DSi footer copy at 000FF800h if reading footer at end of file failed. See https://problemkaputt.de/gbatek.htm#dsisdmmcimages
- changed output of ConsoleID to use PRIx64 to be consistent with all other tools working with the consoleID (readability/cosmetic improvement)
* Remove extra space
Co-authored-by: Tim Seidel <t.seidel@kts-systeme.de>
Co-authored-by: RSDuck <RSDuck@users.noreply.github.com>
* Add PoroCYon's DSP code.
* Remove some teakra iles that we dont need.
* make some requested changes.
* move DataMemoryOffset into namespace.
* use deault param.
* ad the switch change
* <Generic> forget about the default parameter
* Implement NO$GBA debug registers.
NO$GBA comes with 4 debug registers that allow a ROM to print text to
the emulator terminal and 2 other status registers, one with the name of the
emulator and the other with the clock cycles count. This commit
implements them for the ARMv5 processor.
Some small things to note:
- `NocashPrint` was changed and now it takes an address to _the string_ instead of the flags before it (those
don't do anything anyways).
- The "Emulation ID" register contains the string "melonDS " followed by version, _not_ "NO$GBA"
* Fix styling issue and improve comment regarding NO$GBA message flags
Turns out my system was affected by a bug with modifier remapping in
macOS causing some of my left/right modifiers to be swapped. This commit
fixes them to be the correct values.