* get this started
* implement DSi RTC commands
* set up RTC clock timer. lay down basic idea of a clock.
* make the date/time registers writable
* move RTC state to its own structure, to make it easier to deal with
* more RTC work
lay base for date/time dialog
* get the bulk of the RTC functionality going
* much simpler design for RTC stuff
* aha, that is what it is
* start working on the RTC IRQ
* implement all types of RTC IRQ
* start refining sleep mode. code still kinda sucks.
* implement keypad IRQ
* refine it some more
* shut the fuck uuuuuupppppppppppppp
* Replace some standard I/O calls with Platform equivalents
- I missed a spot when I submitted that PR a few months ago
* Include <memory> in DSi_NAND.h
- Because it uses unique_ptr
* Split DSi_NAND::ReadHardwareInfo into ReadSerialData and ReadHardwareInfoN
* Add a RegionMask enum
* Move DSi NAND patching to the frontend
* Add DSiSupportedLanguageMask
- Not currently used by the frontend, but I use it in melonDS DS
* Remove some Platform::ConfigEntry values
- The core no longer needs to know about them
- The corresponding Config values are unchanged
* Mark NANDMount's destructor as noexcept
* Slight polish to DMA
- Default-initialize members explicitly
- Mark some methods as const noexcept
- Initialize DMA::MRAMBurstTable to DMATiming::MRAMDummy
- Use the default destructor
* Move DMA_Timings definitions to a source file
- To ensure constant and unique addresses
* Include some extra DMA members in the savestate
* Simplify serializing the DMA table
- Extend the dummy table to 256 bytes (same length as the real ones)
* Revert the type change to DMA::DoSavestate
* Keep the MRAMBurstTable inside the DMA class, instead of using a pointer
- If we use a pointer to an external table, then we can't use it in savestates (else that external table gets overwritten)
* gdbstub beginnings
* gdbstub: finish gdb impl things, next up is integration with melonDS
* holy fuck the gdbstub works
* gdb breakpoints work, but there's a mysterious crash on continue
* fix memory corruption that sometimes happened, and make resetting the console thru gdb work
* remove some gdb debug printing
* fix things in gdbstub
* separate option for enabling gdbstub
* add mode-dependent CPU registers
* C++ize the GDBstub code
* add gdbstub config in emu settings dialog
* make sure gdb is disabled when jit is enabled
* Remove unnecessary compiler flags, mark ARMJIT assembly code as no-execute-stack
This hardens the binary a little bit against common exploitation methods
* add option to wait for debugger attach on startup
* only insert GNU stack notes on linux
* disable gdbstub enable checkbox when jit is enabled
* fix non-linux incompatibilities
* enable gdbstub by default
* fix issues with gdbstub settings disable stuff
* format stuff
* update gdb test code
* Fix segfault when calling StubCallbacks->GetCPU()
C++ overrides are hard. Please I'm just a lowly C programmer.
* fix packet size not being sent correctly
Thanks to @GlowingUmbreon on Github for troubleshooting this
* fix select(2) calls (i should read docs more properly)
* fix GDB command sequencing/parsing issue (hopefully)
* [GDB] implement no-ack mode
* fix sending ack on handshake
* get lldb to work
* Refactor diskio's contents
- Change ff_disk_read_cb/write_cb into a std::function instead of a raw pointer
- Add const specifiers as needed
* Refactor DSi_NAND to manage the file system's mounted lifetime with RAII
* Split NANDMount into NANDMount and NANDImage
- NANDImage is used for information about the NAND that doesn't require decryption or filesystem access
- NANDMount is used to actually access the file system
- Both classes manage their respective resources (the NAND file handle and the NAND's mount) with RAII
- Also split the file loading into another function that I will remove in a later PR
* Make NANDMount immovable
* Remove NAND-loading code that I had sectioned off into a function
- Incomplete copypasta
- I must have gotten distracted
* Tidy up NANDImage's initialization
- Don't unmount the disk image if the constructor fails (that's NANDMount's job now)
- Only assign CurFile if the constructor succeeds
* Add some const-correctness
* Move DSi NAND initialization to the frontend
- The NANDImage is now installed via a unique_ptr in DSi
* Remove Platform::DSi_NANDPath
- Not Config::DSiNANDPath; that can still be configured as usual
- The core no longer needs to care
* Add DSiFirmwareSystemSettings
* Replace DSiFirmwareSystemSettings::TouchCalibration fields with std::arrays
- So assignment can be done in one line
* Make DSiFirmwareSystemSettings a union
- So its bytes can be accessed
* Add a comment
* Use DSiFirmwareSystemSettings instead of raw byte offsets
* Add definitions for DSiSerialData and DSiHardwareInfoN
* Move DSiFirmwareSystemSettings's hash update logic into its own method
* Introduce firmware-related structs
* Fix some indents
* Move the generated firmware identifier to a constant
* Document the WifiAccessPoint constructors
* Add some constants
* Remove a stray comment
* Implement Firmware::UserData
* Add Firmware::Mask
* Document Firmware::Buffer
* Add a Firmware constructor that uses a FileHandle
* Set the default username in UserData
* Update the UserData checksum
* Forgot to include Platform.h
* Remove some redundant assignments in the default Firmware constructor
* const-ify CRC16
* Replace the plain Firmware buffer with a Firmware object
- Remove some functions that were reimplemented in the Firmware constructors
* Fix some crashes due to undefined behavior
* Fix the user data initialization
- Initialize both user data objects to default
- Set both user data objects to the same touch screen calibration
* Follow the DS logic in determining which user data section is current
* Remove an unneeded include
* Remove another unneeded include
* Initialize FirmwareMask in Firmware::Firmware
* Use the DEFAULT_SSID constant
* Add SPI_Firmware::InstallFirmware and SPI_Firmware::RemoveFirmware
* Move a logging call to after the file is written
* Add a SaveManager for the firmware
* Touch up the SPI_Firmware::Firmware declaration
* Move all firmware loading and customization to the frontend
* Call Platform::WriteFirmware when it's time to write the firmware back to disk
* Fix some missing stuff
* Remove the Get* functions from SPI_Firmware in favor of GetFirmware()
* Implement SPI_Firmware::DeInit in terms of RemoveFirmware
* Add Firmware::UpdateChecksums
* Fix an incorrect length
* Update all checksums in the firmware after setting touch screen calibration data
* Use the Firmware object's Position methods
* Remove register fields from the Firmware object
* Install the firmware before seeing if direct boot is necessary
* Install the firmware before calling NDS::Reset in LoadROM
* Slight cleanup in ROMManager
* Fix the default access point name
* Shorten the various getters in Firmware
* Add qualifiers for certain uses of firmware types
- GCC can get picky if -fpermissive isn't defined
* Add an InstallFirmware overload that takes a unique_ptr
* Log when firmware is added or removed
* Don't clear the firmware in SPI_Firmware::Init
- The original code didn't, it just set the pointer to nullptr
* Fix a typo
* Write back the full firmware if it's not generated
* Move the FreeBIOS to an external file
* Load wfcsettings.bin into the correct part of the generated firmware blob
* Load BIOS files in the frontend, not in the core
* Fix logging the firmware ID
* Add some utility functions
* Mark Firmware's constructors as explicit
* Remove obsolete ConfigEntry values
* Include <locale> explicitly in ROMManager
* Fix up some includes
* Add Firmware::IsBootable()
* Add a newline to a log entry
- Whoops
* Log the number of bytes written out in SaveManager
* Mark FirmwareHeader's constructor as explicit
* Clean up GenerateDefaultFirmware and LoadFirmwareFromFile
- Now they return a pair instead of two by-ref values
* Refactor SaveManager a little bit
- Manage its buffers as unique_ptrs to mitigate leaks
- Reallocate the internal buffer if SetPath is asked to reload the file (and the new length is different)
* Remove some stray parens
* Fix some firmware-related bugs I introduced
- Firmware settings are now properly saved to disk (beforehand I misunderstood when the firmware blob was written)
- Firmware is no longer overwritten by contents of wfcsettings.bin
* Slight cleanup
* Make cleanup a little more robust to mitigate undefined behavior
- Add some null checks before cleaning up the GPU3D renderer
- Make sure that all deleted objects are null
- Move cleanup logic out of an assert call
- Note that deleting a null pointer is a no-op, so there's no need to check for null beforehand
- Use RAII for GLCompositor instead of Init/DeInit methods
* Replace a DeInit call that I missed
* Make ARMJIT_Memory less likely to generate errors
- Set FastMem7/9Start to nullptr at the end
- Only close and unmap the file if it's initialized
* Make Renderer3D manage its resources with RAII
* Don't try to deallocate frontend resources that aren't loaded
* Make ARMJIT_Memory::DeInit more robust on the Switch
* Reset MemoryFile on Windows to INVALID_HANDLE_VALUE, not nullptr
- There is a difference
* Don't explicitly store a Valid state in GLCompositor or the 3D renderers
- Instead, create them with static methods while making the actual constructors private
* Make initialization of OpenGL resources fail if OpenGL isn't loaded
* assert that OpenGL is loaded instead of returning failure
CRC32.cpp:
Make table initialization compile time
DSi_NAND.cpp:
Fix file close / unmount / disk close on error
~L427: Remove redundant calls, as they are immediately rendered useless by `rem` being overwritten
NDS.cpp / FreeBIOS.h:
Remove unneeded size values in header
Remove unneeded memset's as they are initialized anyway
sha1.c / sha1.h:
Fix useless warning
Wifi.cpp:
Remove unneeded includes
DSi.cpp:
Reduce ugly casts
Deduplicate code
qt_sdl/main.cpp:
silence clang switch statement warning
qt_sdl/main.h:
fix override warnings
dolphin/BitSet.h:
use msvc extensions only when appropriate, fix broken bit set count under _WIN32
* fix edge fill rules for swapped polygons
also fixes translucent polygons not being always edge filled.
* fix right edge fill rule
* fix right edge fill rule for realsies
* fix a few more glitchy polygons
specifically quads similar to: (-67,40) (64, 160) (192, 160), (8, 111)
* fix one edge case pixel
i hate this so much
* fix "flat bottom" edge fill
* fix regression + apply changes to shadow masks
fix a regression with certain line polygons not rendering; there seems to be an exception made by the ds' gpu in order for these polygons to render properly.
also apply these changes to shadow masks because i forgot to
* forgot to remove a line
---------
Co-authored-by: Arisotura <thetotalworm@gmail.com>
* Make horizontal sprite mosaic (more) accurate
* Vertical sprite mosaic should not extend the sprite's bounding area
* Vertical sprite mosaic should not extend the sprite's bounding area (2)
* OBJIndex is no longer needed
* fix polygons being swapped incorrectly
"borrowed" this from noods
needs verification that the >= and <= signs aren't actually supposed to be > and <
* proper rules for moving vertical right slopes left
* nvm most of that was actually pointless
that's on me for not checking
* fix aa being upside down on swapped y-major slopes
* further improvements to swapped aa
in addition to fixing swapped y-major slope aa, now fixes:
swapped x-major slope aa
swapped vertical slope aa
* use templates instead + style/comment tweaks
should force the compiler to precompile if statements like i want it to do, instead of just hoping it does so on its own
* Anti-Alias All Edges
Changing a bunch of 0x3s to 0xF since I figure if they're checking the left and right edge they wanna be checking the top and bottom too now that they're gonna be aa'd. also copy that if statement over since otherwise there won't be anything to blend with.
* small optimization
its probably a tiny bit faster?
idk id need actual benchmarking tools.
doesn't break anything at least.
* Introduce some Platform calls for managing dynamic libraries
* Add Platform::WriteFATSectors
* Introduce some Platform calls for managing dynamic libraries
* Add Platform::WriteFATSectors
* Change includes of "../types.h" to "types.h"
- Makes it easier to directly include these headers in downstream projects
* Change an include of "../Wifi.h" to "Wifi.h"
* Allow CommonFuncs.cpp to compile on Android
* Tidy up some logging calls
- Use Platform::Log in LAN_Socket.cpp
- Soften some warnings to Debug logs (since they don't necessarily represent problems)
* Add Platform::EnterGBAMode
- Gracefully stop the emulator if trying to enter GBA mode
* Soften some logs that most players won't care about
* Soften some more logs
* Introduce Platform wrappers for file operations
* Fix pointer spacing
* Fix more style nits
* Log the errno when ftruncate fails
* Fix FileSeek offset argument
- With an s32 offset, we couldn't access files larger than 2GB
* Revise Platform::StopEmu to address feedback
- Remove Platform::EnterGBAMode in favor of adding a reason to Platform::StopEmu
- Also rename Platform::StopEmu to Platform::SignalStop
- Add an optional argument to NDS::Stop
- Use the new argument everywhere that the console stops itself
* Rename FileGetString to FileReadLine
- It conveys the meaning better
* Rename FileSeekOrigin::Set to Start
- It conveys the meaning better
* Change definition of FileGetString to FileReadLine
- Oops, almost forgot it
* Rename FlushFile to FileFlush
- To remain consistent with the other File functions
* Add a FileType usage
* Fix line break in FileSeekOrigin
* Document Platform::DeInit
* Clarify that StopReason::Unknown doesn't always mean an error
* Move and document FileType::HostFile
* Remove Platform::OpenDataFile
- Nothing currently uses it
* Refactor Platform::OpenFile and Platform::OpenLocalFile to accept a FileMode enum instead of a string
- The enum is converted to fopen flags under the hood
- The file type is used to decide whether to add the "b" flag
- Some helper functions are exposed for the benefit of consistent behavior among frontends
- Equivalent behavior is maintained
* Fix a tab that should be spaces
* Use Windows' 64-bit implementations of fseek/ftell
* Move Platform::IsBinaryFile to Platform.cpp
- It could vary by frontend
* Remove an unused FileType
* Rename an enum constant
* Document various Platform items
* Use Platform::DynamicLibrary to load libandroid
- And clean it up at the end
* Fix a typo
* Pass the correct filetype to FATStorage
- Since it can be used for DSI NAND images or for SD cards
* Remove Platform::FileType
* Fix Up Y Interp Inputs
* Change Linear Interp Formula
Fixes a handful of pixels.
Still not perfect.
* Cleanup
remove some unnecessary code and parentheses
* DSi: add option to boot the full boot ROMs
added a config option for this so that this can be enabled or disabled
also added IO regs for DSi GPIO, but those don't do anything yet.
* reset GPIO regs on reset
Because of course some compression programs aren't nice enough to tell
you the decompressed size up front in the file, so the other approach
will fail. Things just can't ever be easy and straight forward, can they?
* Add a definition for TMD files
* Wrap TitleMetadata in a namespace
* Add a comment
* Remove TitleMetadataCertificate
- melonDS ignores it anyway
* Refactor the use of title metadata
- Move bitwise operations on the title ID into helper methods
- Use TitleMetadata objects instead of pointers to raw data
* Slight cleanup in DSi_NAND
- Replace some constants with sizeof
- Use an NDSHeader object instead of a raw array of bytes
* Add a DSi_NAND::ImportFile overload that loads a file from memory
* Split most of ImportTitle into InitTitleFileStructure
- It will be reused in the next commit
* Add ability to import title from memory
* Fix another potential issue
* Fix broken DSiWare installation
- The bytes of the title ID/category were being swapped in most places, but not all
* Add some logging calls
* Declare array sizes in DSi_TMD in decimal, not hex
* Add a space after the #endif
- To adhere to the style guide
* Assert the size of TitleMetadataContent
* Change the type of SignatureName
* Don't mark the TMD structs as packed
* Remove extraneous comments
* Cut down some newlines
* Split ROMList into a .cpp file
- Its definition in ROMList.h was causing multiple-definition linker errors
- Introduce ROMListSize, since you can't take a sizeof() of an extern declaration
- Mark ROMList and ROMListSize as const
* Update ReadROMParams to accommodate ROMList changes
* Split parsing and loading of NDS ROMs
- Introduce an NDSCartData class for parsing a ROM file
- Introduce InsertROM for loading a NDS cart
- Refactor LoadROM to use NDSCartData and InsertROM under the hood
* Reset cart state and initialize save memory in the NDSCartData constructor
- Otherwise there's no way to know about SRAM-specific attributes before inserting the game
* Add a comment to NDSCartData
* First crack at splitting parsing and loading for GBACart
* Add some logging calls for encrypting the secure area
* Log the XXH64 hash of the inserted NDS ROM
* Log the XXH64 hash of the secure area after decryption
* Add some logging to Key1_LoadKeyBuf
* Re-encrypt the secure area when inserting the cart, not when parsing it
- This way, constructing a NDSCart doesn't imply a read from the filesystem (as is done in Key1_KeyBuf)
* Load Key1_KeyBuf from memory, not from the file system
- Now that the cart's secure area isn't re-encrypted until insertion, we can expect that the BIOS will be ready at this point
* Add some helper query methods to NDSHeader
* Query the DSi region directly from the header instead of checking the ROM again
* Introduce a CartType enum
- So CartCommon::Type doesn't have to return magic numbers
* Reset the cart in NDSCart::InsertROM instead of the NDSCartData constructor
- That way the constructor doesn't rely on the config or on file I/O when loading homebrew
- This keeps the use of global state closer to one place
* Add non-const getters for the carts
* Add InsertROM overloads that accept unique_ptrs
* Fix a comment
* Rename member functions on NDSCartData and GBACartData to adhere to the convention
* Rename members on NDSCartData and GBACartData to adhere to the convention
* Fix build errors on some platforms
* Add NDSHeader::IsDSiWare
* Add a ROMListEntry parameter to the cart constructors
- To allow for looking up details of SRAM or expected ROM size
* Add some new getters to CartCommon
* Use the Header/Banner members instead of globals
* Make CartCommon abstract
- It's not supposed to be instantiated anyway
* Change the signature of CartCommon::Checksum
- It's neither overridden nor mutating
* Add some clarifying comments to NDSHeader
* Delete CartCommon::ROM in its destructor
- ParseROM copies its input and gives that copy to the cart object, so it's okay
* Add some getters to CartCommon
* Refactor NDSCart
- Get rid of NDSCartData
- Get rid of cart-specific global state within NDSCart (so registers are untouched)
- Refactor uses of removed global variables to use the Cart pointer instead
- Refactor ROMInfoDialog's icon functions to accept const arguments
* Return the cart pointer
- So *that's* why it was crashing. Whoops
- Why is this even allowed?
* Refactor GBACart
- Delete CartGame::ROM in the destructor
- Get rid of GBACartData
- Remove some global state
* Mark NDSCart::CartCommon::Type as const
* Slightly refactor GBACart::CartCommon
- Mark Type as const
- Use enum constants
- Make CartCommon itself abstract
* Mark CRC32's data parameter as const
* Mark GBACart::CartCommon::Checksum as const
* Use assert.h instead of cassert
- As demanded by the style guide
* Fix some includes to adhere to the style guide
* Get the ARM9 entry address directly from the header object
* Use more Header fields directly
* Rename some parameters to match the style guide
* Remove some unused includes
* Slightly change NDS_Header::IsHomebrew for clarity
* Refactor Savestate::Var{8,16,32,64}
- They now delegate to VarArray
- They're declared in the class header so they're likely to be inlined
* First crack at refactoring Savestate to work in-memory
- Well, third, but who's counting?
* Implement Savestate::Finish
* Remove the VersionMajor and VersionMinor fields
- Instead, pull their values directly from the savestate buffer
* Mark a new constructor as explicit
* Rename Reset to Rewind
* Fix a linebreak
* Implement Savestate::Rewind
* Add ROMManager::ClearBackupState
* Refactor ROMManager to use the refactored Savestate
* Capitalize "Least"
- It was driving me nuts
* Add a log call
* Increase default Savestate buffer length to 32MB
* Use C-style file I/O instead of C++-style
- Dumping bytes to a file with C++'s standard library is a MONSTROUS PAIN IN THE ASS
* Quote the savestate's file path for clarity
* Write the savestate's length into the header
* Add some extra logging calls
* Fix section-loading
* Remove the deprecated Savestate constructor
* Convert a char* to a u32 with memcpy, not a cast
* Fix section-handling in loads
* Include <cstring> in Savestate.h
- This was causing a build error on Linux
This is different from the archive support in that the compressed ROMs
are standalone files, rather than archives, making it possible to use
them exactly as if they were regular ROMs, while saving a bunch of space
on disk. This is supported both for DS and GBA ROMs, though given GBA
ROMs' generally small size it's mostly useful for the former.
* Add a clarifying comment
- In case it saves some poor bastard hours of fruitless work
* Expose GBA and NDS save memory
- Add GetSaveMemory and GetSaveMemoryLength functions
- Where unsupported, they return null and zero
* Add Platform::Log and Platform::LogLevel
* Replace most printf calls with Platform::Log calls
* Move a brace down
* Move some log entries to one Log call
- Some implementations of Log may assume a full line
* Log the MAC address as LogLevel::Info
* Remember the last folder for BIOS files
Add .mmc to the list of NAND filename extensions
* Add .sd file extension for SD images
* Fix UI code according to the review
---------
Co-authored-by: yeah-its-serena <32610623+yeah-its-serena@users.noreply.github.com>
* Rebase/recreate my changes and add MIME support
This commit recreates the changes proposed in #1394 on top of the
current master (b069a2acf1).
This also adds support for determining filetypes using the MIME database
provided by `QMimeDatabase`.
* Move member syntax warning to a more appropriate place
* Deduplicate member syntax warning
* Change warning from "vertical bars" to "|"
* Conform brace placement to coding style
* Fix QFileDialog filter when ArchiveExtensions is empty
* Final cleanup and fixes
- Changes the NDS and GBA ROM MIME-Type constants to QStrings.
- Removes a leftover warning message.
- Uses Type() syntax instead of Type{} syntax for temporaries.
* Explain the origin of the supported archive list
Co-authored-by: Jan Felix Langenbach <insert-penguin@protonmail.com>
* 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>