Commit Graph

190 Commits

Author SHA1 Message Date
parasyte 620c74e56e bsnes: Fix disassembler with compatibility core
- The fake bus map has been extended to read mapped ROM space
2016-08-08 22:11:49 -07:00
MrCheeze ef3c816c2f Fix SNES trace logging to not lose information
Fixed the bug where if a tracelog line contains more than one "[", everything after the second [ will be mistakenly thrown out.
2016-07-27 19:54:48 -04:00
nattthebear 111648cf98 Break a bunch of memory domain stuff with pointless refactoring 2016-04-13 19:50:06 -04:00
zeromus ebad5a8137 remove console spew from snes core 2016-03-27 00:41:05 -05:00
nattthebear eb2ec58b1b Rough in some stuff for better oninputpoll in snes. Not hooked up in looah yet. The idea is that oninputpoll will get called with a core-specific int that signifies what happened.
For snes, we're looking at:
0 = latch goes low
1 = latch goes high
2 = left port strobed
3 = right port strobed
2016-02-29 21:22:30 -05:00
adelikat f5e679fa0d Refactor ITraceable to work on TraceInfo objects that separate Disassembly and Register information. Make Tracelogger two columns. 2016-02-21 17:34:42 -05:00
scrimpeh ef1bc65ce6 IInputPollable - Make IsLagFrame settable 2016-01-26 11:34:42 +01:00
feos c5526a1169 Fix #134 - Option to turn off "savestate every frame" for bsnes
Warning text: "Guarantee deterministic emulation by savestating every frame. Don't TAS without it! Only ~75% of runs sync without it, but speed boost is ~30%."
2015-12-20 11:58:11 +03:00
zeromus 8d955a8703 fix snes gfx debugger scanline CB 2015-11-15 18:04:42 -06:00
zeromus 0ff2a2eb49 fix crashy bugs in snes gfx debugger 2015-11-15 18:02:20 -06:00
zeromus c68fdc511b CDL - fix snes games with no cartram 2015-11-03 23:59:42 -06:00
zeromus f3626b9605 snes CDL 2015-11-03 23:45:57 -06:00
zeromus 817f4360d3 bsnes is a dll once more. this is experimental--it may not work well, so I need to gather data. But I think it might work fine. 2015-10-24 03:06:47 -05:00
zeromus baaa1c3ec2 use proper SNES PAR 2015-10-21 19:38:40 -05:00
zeromus 195197fb70 snes gfx debugger: fix crashes and malfunction in 16x16 tilemaps 2015-10-15 23:12:20 -05:00
zeromus 1e67943b99 snes - fix more bugs in interlaced handling 2015-09-23 20:48:07 -05:00
zeromus f42a585fee snes - handle interlaced modes differently 2015-09-23 20:28:46 -05:00
adelikat ba21484ddd add IRegionable as an emulator service to indicate NTSC vs PAL, etc. Refactor cores that conveyed this information to use this service, fixed cheaty reflection to grab this info to use the service instead, marked some cores as region not applicable where it made sense to me (I'm sure I'm wrong in some cases) 2015-08-05 20:12:09 -04:00
adelikat 3541c9e975 Make the lag counter settable, and expose this functionality in lua 2015-07-09 13:05:30 -04:00
adelikat 5bcdfb5991 IInputPollable - remove the set on LagCount as it is not needed 2015-06-11 01:23:14 +00:00
adelikat 36f4eff0f6 add ByteSize to MemoryDomain with a default of 1, set it to not 1 on appropriate domains (I probably missed some, or got some wrong). Have RamSearch use that instead of SystemInfo, remove ByteSize from SystemInfo since it is no longer needed 2015-02-22 15:19:38 +00:00
zeromus 966edb10ab add 65816 disassembler.. not tested very well tho 2015-01-26 00:20:01 +00:00
adelikat 91ffc17aae Refacotor MemoryDomain.Size to be long instead of int, still some small todos, but it compiles and seems to work 2015-01-18 15:25:47 +00:00
goyuken 82fcd0bc5e refactor IVideoProvider into a service. uses in mainform and friends are still hacky 2015-01-14 22:37:37 +00:00
adelikat fbdb29b64c refactor IMemorydomains to be a domain list instead of having a domain property, refactor cores to register an IMemoryDomains instead of being one 2015-01-14 21:55:48 +00:00
adelikat d62ba4e2b4 Change IMemoryDomains to have an IMemoryDomainList instead of a MemoryDomainList, this is an incremental step into eventually having IMemoryDomains take over the properties of IMemoryDomainList, still todo: reduce the amount of needed functionality in IMemoryDomainList from old and not good code 2015-01-13 22:18:07 +00:00
adelikat 17b4782474 Change "BUS" to "System Bus" in both GBA cores, and the bsnes core, don't account for "BUS" in the CheatDomain property 2015-01-13 00:01:25 +00:00
adelikat 0f2197cec1 Break off ITracer from IDebuggable, rename to ITraceable and make it an IEmulatorService, refactor things accordingly 2014-12-23 01:58:12 +00:00
adelikat ffdeb618f7 IDebugable - add a CanStep() method, and implement it in all IDebuggable implementations 2014-12-20 13:29:57 +00:00
adelikat a8116297a0 Rename Register to RegisterValue 2014-12-20 13:16:15 +00:00
adelikat 7bebb66589 IDebuggable - refactor GetCpuFlagsAndRegisters to be IDictionary<string, Register> where Register is a value and a bitsize 2014-12-20 03:19:33 +00:00
adelikat d08fb39cb8 Refactor IDebuggable StepInto/Over/Out methods into void Step(StepType type); 2014-12-15 22:19:10 +00:00
adelikat 725a8fb092 Add StepInto(), StepOver(), StepOut() to IDebuggable, have all cores implement it with unimplemented dummy functions 2014-12-14 18:58:16 +00:00
adelikat 9fc46f6764 mark cores that would not ever use IDriveLight, a bit silly, but it keeps the feature list clean and that's currently my only source of sanity with keeping up with what needs to be done 2014-12-12 01:58:12 +00:00
adelikat 2d1a43dc65 MemoryCallbackSystem - simplify by having a single Add method with a MemoryCallbackType parameter, and some simplifying of client code as a result 2014-12-07 18:53:56 +00:00
adelikat 0b84beec88 Move MemoryCallbackSystem from CoreComm to IDebuggable and refactor accordingly, Lua - tell the user when memory callbacks are not available for a given core 2014-12-05 01:56:45 +00:00
adelikat 309088211c Move TraceBuffer from CoreComm to IDebugable and refactor accordingly 2014-12-05 00:05:40 +00:00
adelikat d8a204572d Add an IServiceProvider interface and make it a property of IEmulator, the purpose of this provider is to provide IEmulatorServices upon request. Make BasicServiceProvider and have all cores use it for now. BasicServiceProvider will return the core itself if the core itself is the requested type. He will also be able to return nested types (code not finished). Wired this up to the HasSavestates extension method (a method that has minimal value now) as a proof of concept. 2014-12-04 03:38:30 +00:00
adelikat a07263c04e Move InputCallbackSystem from CoreComm to IInputPollable, and refactor all cores accordingly. Lua - OnInputPoll() - log to the user when attemping to add a callback of this type to a core that has not implemented input callbacks. Mark all unmanaged cores' implementations of the InputCallbackSystem as FeatureNotImpleented, won't have any effect on functionality, but will help us keep track of the fact that they still have a bit of work to do. Still todo: ActiveChanged event handler on the base implementation of IInputCallbackSystem 2014-12-04 00:43:12 +00:00
adelikat a83d714c42 Break off IsLagFrame and LagCount from IEmulator and put into its own interface IInputPollable, and refactor cores as necessary. EmuHawk - account for the possibility that a core is not an IInputPollable, and do things like disable the lag counter menu item. Still some front end todos. Also still todo, move the InputCallbackSystem from CoreComm to IInputPollable 2014-11-30 20:29:30 +00:00
adelikat 76148ae111 Break off savestate functionality from IEmulator into IStatable and refactor things accordingly. Still todo (a big todo): EmuHawk should gracefully handle a core that is not an IStatable by disabling functionality dependent upon it (Savestates, Rewind, Tastudio, etc) 2014-11-30 16:42:58 +00:00
adelikat 865795049b Break off saveram methods from IEmulator into a separate ISaveRam interface. Remove the setter for SaveRamModified (every single core was throwing an error on this, and no client code was using it). Remove these methods from cores that don't actually implement this interface 2014-11-30 15:22:08 +00:00
adelikat 0e82fff3ff Clean out ClearSaveRam() calls since they are no longer used 2014-11-24 15:00:54 +00:00
adelikat 9c285e3e3a Put NotImplemented attribute on a bunch of things, and remove IMemoryDomains from a few cores that were implementing it but throwing a NotImplementedException 2014-11-24 01:17:05 +00:00
adelikat 1832894405 IDebuggable - GetCpuFlagsAndRegisters() - refactor to make it an IDictionary instead of Dictionary 2014-11-23 16:22:02 +00:00
adelikat 17c6a2c1f6 Snes - use the compatibility profile override option in the game db, note that it will be a temporary override for the game if detected, the user setting will not be permanently changed. This touched a bunch of things, and many other things had to be considered, there's a reasonable chance that this broke something 2014-11-19 00:32:51 +00:00
adelikat 21dad476a8 LibsnesCore.cs - move ScnalineHookManager to the button of the file, and the constructor of LibsnesCore to the top of the object, so it isn't so annoying to find it 2014-11-18 23:44:42 +00:00
goyuken dc2ca1f010 remove the extra ISettable (non-generic argument) interface and corresponding crud from cores, and replace with a shim class 2014-10-31 15:46:13 +00:00
jlennox a64017366c Create ISettable<T,T2>/ISettable interfaces. This checkin has not been extensively tested. 2014-10-19 01:22:47 +00:00
jlennox 10b6bed056 Add IDebuggable to relevant cores and remove non-implementations of GetCpuFlagsAndRegisters/SetCpuRegister 2014-10-18 22:30:06 +00:00
goyuken 7a25e05189 snes: faker system bus (ram only) for determinstic mode) 2014-09-08 15:43:34 +00:00
zeromus 5d754cf507 change how snes firmware chips survive loadstating, so that loadstate/rewind matches performance from builds earlier in 2014. still kind of slow, but basically OK. 2014-09-02 05:01:51 +00:00
adelikat 5ba74c631c Remove MemoryDomains from IEmulator into a new Interface, IMemoryDomains, Add this interface to existing cores, except null emulator (and removed memory domain related code from it). Refactored EmuHawk for ram tools to use an instance of IMemoryDomains rather than IEmulator, don't expose ram tools unless the core implements IMemoryDomains. Still a few misc todos, and probably some cleanup 2014-09-01 18:43:41 +00:00
goyuken f0c8bd3842 IEmulator: clarify naming and implementations so it's clear that CloneSaveRam() always returns a clone that you can do whatever you want with (but won't modify the underlying) 2014-08-13 17:52:13 +00:00
goyuken 8c2e4d7f76 woops 2014-08-01 15:04:20 +00:00
goyuken 56467334b3 gambatte: throw unsupportedmapperexception when appropriate. libsnes: throw cgbexception when trying to load cgb only game in sgb 2014-08-01 14:56:23 +00:00
adelikat 2190b15099 snes - a sneaky hack to enforce that compatibility profile is ALWAYS in deterministic mode, and that performance profile is NEVER in deterministic mode, this fixes a lot of undefined and bugged behavior when the deterministic flag gets out of whack with the act of loading a savestate 2014-07-21 19:07:21 +00:00
adelikat 26ef424bdf snes - when throwing an exception about profile mismatches, to let the user know what profile the state was from, and what the current one is, and as a bonus clue us in faster, when garbage data is coming out of a hosed state 2014-07-21 03:05:29 +00:00
adelikat fd80c62cdb More Util methods -> extension methods 2014-07-03 19:20:34 +00:00
adelikat 1c0eca190e Remove some unused extensions, Remove Extensions.cs and move methods into better named files with their own namespaces 2014-07-03 18:54:53 +00:00
adelikat 3e3e34c745 SNES - nitpicky change in button orders 2014-06-29 12:55:01 +00:00
adelikat 3bf5b75adc SNES - remove players 3 and 4 from controller definition since they aren't currently used, virtual pad - dynamically generate number of controllers based on controller definition 2014-06-28 22:59:04 +00:00
zeromus 237045fde2 add watchdog timer to bsnes process to make sure they dont accumulate when the frontend terminates oddly 2014-06-17 22:03:08 +00:00
goyuken aee94afe05 snes boardname stuff 2014-06-12 20:46:42 +00:00
adelikat 3917e7c528 Automate the about box 2014-06-01 01:57:22 +00:00
adelikat 51660dd023 Add SetCpuRegister() to IEmulator. Implemented it in Atari 2600, 7800, C64, Neshawk, and technically dual gameboy (passes it to L and R where it will fail). The rest throw NotImplementedExceptions. Lua - add emu.setregister(), catches NotImplementedExceptions and informs the user. 2014-05-31 17:03:21 +00:00
zeromus 80707ebc53 fix supergameboy 2014-05-24 05:37:30 +00:00
zeromus f49c4492f1 fix #177 "SNES Loadstate failure with DSP firmware." by repeatedly loading the rom when resetting the core so that chip roms get a chance to reload after the entire core (hopefully) is memzeroed 2014-05-23 00:13:04 +00:00
adelikat 0e02a78073 update a comment now that accuracy profile is an option 2014-05-18 13:44:58 +00:00
adelikat e51e8dead5 SNES - Make performance core the default 2014-05-14 12:47:36 +00:00
goyuken b0970451aa internal infrastructure for video presentation changes (aspect ratio, apparent size, etc) 2014-04-30 23:48:37 +00:00
adelikat 51be257486 core status bar icon - add yabause and bsnes icons 2014-04-25 21:41:34 +00:00
zeromus 49d8f6c5b9 remove savestate loading hacks for movie header skipping 2014-04-25 02:21:45 +00:00
adelikat de1cb218a6 Add more info to IEmulator CoreAttributes, add status bar icon that gives the name of the current core with a tooltip with additional info, put bizhawk icon on "in house" cores, and the icon of the ported emulator on ported cores. Still todo: icons for ported cores other than quicknes 2014-04-25 01:19:57 +00:00
adelikat c74019a54d Add a CoreAttributes class with a CoreName field, and apply it to all cores, when recording a new movie, add a core header line that captures this name 2014-04-22 00:38:59 +00:00
adelikat a61ff53d9c Change IEmulator.GetCpuFlagsAndRegisters() to a Dictionary, fix a warning, throw NotImplemented exceptions in cores that don't implement this method rather than returning an empty list. Start Debugger UI User Controls 2014-04-19 22:23:13 +00:00
zeromus d0aec59e55 snes-dont malfunction CARTROM memdomain when having a npow2 romsize 2014-02-26 09:33:38 +00:00
zeromus 28521af0b4 snes-fix trace logging (copy/paste error during refactoring) 2014-02-03 09:25:30 +00:00
zeromus cc73af76bd snes-make CARTROM memorydomain actually edit bsnes's sense of the cartrom, instead of the rom[] array that the core now pointlessly holds onto 2014-01-29 21:59:06 +00:00
zeromus 50ef1b19f5 snes-fix bugs caused by breakpoints leaving emulator state unstable (most noticeable when taking savestates) 2013-12-29 02:20:13 +00:00
goyuken 75d39ac60f SNES: connect to new settings system.. everything should work? 2013-12-27 17:59:19 +00:00
goyuken d37796ab1c more new core config framework; this time GAEMBOY 2013-12-23 02:51:41 +00:00
goyuken bd205f47dc update our newtonsoft json.net to version 5.0 release 8. this fixes up abstract class handling so that the CoreSettings can work correctly.
tweak Binding, RecentFiles, and PathEntry to work with the new serializer.  on updating to this revision, you should be able to keep all config.ini settings except for hotkey bindings, path layouts, and recent files list.
start implementation of new CoreSettings and CoreSyncSettings.  at the moment, it's only partially done for NES.
2013-12-22 00:44:39 +00:00
goyuken e95d7b8cd7 fix the mess i made yesterday with IEmuLoadHelper (I did not know at the time, but it's 99% the same as the existing ICoreFileProvider) 2013-12-10 17:58:12 +00:00
goyuken 1d0db18244 update some snes core internal firmware request infrastructure to use the new firmware match system. should be no actual functionality change 2013-12-09 21:41:18 +00:00
goyuken 2a0217e06c refactor a bit of firmware loading code to get some slop out of MainForm.LoadRom() 2013-12-09 20:36:24 +00:00
adelikat 50d4a3307a Rip out UpdateControls() method from IController, also some code cleanup in related files 2013-12-07 00:53:06 +00:00
zeromus 492a99694f fix snes savestates? 2013-11-25 20:51:26 +00:00
zeromus 4c247672fe snes hooking system and GetCpuFlagsAndRegisters now work normally 2013-11-22 09:33:56 +00:00
adelikat 7e45f13282 Change project name BizHawk.Emulation to BizHawk.Emulation.Cores 2013-11-15 14:05:47 +00:00