Commit Graph

1012 Commits

Author SHA1 Message Date
goyuken 51fc8e695c add 'bool rendersound' to IEmualtor.FrameAdvance()
if false, the emulator is free to gain whatever speedup it can by not doing audio processing (shouldn't change anything sync related, though)
the core should still always call SoundProvider.GetSamples() after each FrameAdvance(), else DRAGONS
at the moment, only test-implemented in gambattehawk
2012-09-20 19:52:47 +00:00
goyuken 1301344d71 neshawk: fix: when paused, toggling "clip left and right 8" in nes graphics config caused garbage to show on screen. 2012-09-20 00:53:21 +00:00
zeromus 1760e9593f nes-probably need to handle the left clipping case too 2012-09-20 00:24:46 +00:00
zeromus e8487b77d8 change lua drawing to use an offset specified by the emulator core, so that drawing in the nes core can have nes-relative coords instead of multiclient-display-relative coords 2012-09-20 00:22:24 +00:00
beirich 18f3da0f55 gen: add missing savestate vars. rewind seems stable now from the games I've tested. 2012-09-18 11:09:05 +00:00
beirich b2e48d8749 gen: savestates work, though they're nes-style brittle savestates for now 2012-09-17 23:28:22 +00:00
beirich b04189b6b1 gen: rewind is working, savestates are not working [yet]. will fix more tomorrow 2012-09-17 05:48:24 +00:00
zeromus c6a14d551c snes-work on graphics tools a tiny bit 2012-09-17 00:16:19 +00:00
zeromus b33fc4982c remove derelict CoreVersion/Introspection stuff 2012-09-16 20:08:36 +00:00
zeromus 4018452f21 add CoreInputComm.CpuTraceEnable and CoreInputComm.CpuTraceStream, and use it in NES; set those appropriately from a gui component and you can effect user-controlled cpu tracing, if its been setup in the core he's interested in. CoreInputComm doesnt reconstruct between emulator instances, so this may not be the best way of hooking it up, but its serviceable. 2012-09-16 19:38:08 +00:00
beirich eea2160df2 didnt meant to commit last time, but guess I should check this in so I dont break the build 2012-09-16 19:06:50 +00:00
beirich 5742d69f6a 2012-09-16 19:03:44 +00:00
zeromus 8cbc3ee2af snes-setup hard and soft resets 2012-09-16 17:15:53 +00:00
goyuken a87a9c1cd5 add "Default CGB" button to gambatte color chooser for default CGB grayscale
if no palette at all is available, the core will internally default to the "bsnes improved" palette
2012-09-16 17:09:52 +00:00
goyuken 727e441bb4 change gameboy control "Reset" virtual button to "Power" virtual button
some consoles have both "Reset" and "Power" notions, so this is to be more consistent
i'm not sure that i got all references...
2012-09-16 16:25:54 +00:00
zeromus 88fab46b21 fix error in snes Select and Start button binding (was using the NES bindings due to copy/paste error) 2012-09-16 16:23:10 +00:00
beirich e208b147ae gen: support save-ram. but not eeprom, yet. 2012-09-16 04:42:14 +00:00
goyuken a7bdd745c6 move ColorChooserForm to the MultiClient
also disable its menu item if the emulator is currently in CGB mode (since it doesn't do anything)
2012-09-15 18:30:11 +00:00
adelikat 644f7415b9 Remove some delete controller images from the .sln file, GB Palette Config - misc dialog tweaks 2012-09-15 17:44:17 +00:00
goyuken cfe73b292d add gambatte boot flags to menu and config. i don't like all that stuff in mainform, but it works anyway...
TODO: these flags must also be added to .chickenfucker file header
2012-09-15 16:14:03 +00:00
goyuken 27b5d29f0c Gambatte: soft resets (all 3 lines of code!)
Internally, Gambatte implements this as a full hard reset of everything except saveram.  There are comments in the code to suggest that this is appropriate real console behavior...
2012-09-15 02:36:19 +00:00
goyuken feaa652986 fix SMS SaveRAM == null in SMS 2012-09-14 23:31:10 +00:00
goyuken 16e831a84c fix BRAM == null case in PCE 2012-09-14 23:18:16 +00:00
goyuken 83e145c36f change the IEmulator saveram interface.
i don't like doing this, but there were already two emus with special bandaid logic in MainForm.cs
i hope this doesn't break something, but if it does i'll fix it
2012-09-14 22:28:38 +00:00
goyuken 4101efb92d implement ClearSaveRam in gambatte core, and fix a bug with using memory domains before any frames have been run 2012-09-14 21:29:35 +00:00
goyuken 1697e77042 gambatte: leave CoreOutputComm strings empty since we have nothing to say (for the moment) 2012-09-14 15:50:35 +00:00
goyuken 6053d1bf89 add ability to save to gambatte-style palette files 2012-09-14 00:35:31 +00:00
goyuken c05c9ebda7 add loading of gambatte-style palette files to the palette selector (includes drag and drop) 2012-09-14 00:02:37 +00:00
goyuken f5d37cf73b the world would end if microsoft ran it 2012-09-13 23:09:03 +00:00
goyuken c72ac19037 gambatte pal editor: use system color picker dialog
... but something about the customcolors isn't working right?
2012-09-13 22:20:05 +00:00
goyuken bf5625655d rename gambatte memory domains per todo list 2012-09-13 21:19:26 +00:00
goyuken 12d06a2c94 add system bus memory domain to gambatte
in order to guarantee correct resolution of mappings and mmio every time, all calls go straight to the core and are not cached
this makes this domain slower in performance than the other ones.  it can also be more difficult to use in some cases because you have to resolve mappings that you may not care about.
there is also the possibility of side-effects on reads, although i do not believe that this actually happens in any situations.  still, use at your own risk.
2012-09-13 21:03:34 +00:00
beirich 2d2af1d143 oops 2012-09-13 04:15:25 +00:00
beirich adee5befa5 Genesis ROM header parsing
and other stuff thats only committed because svn isn't decentralized!
2012-09-13 04:13:49 +00:00
goyuken 76c68bf6d5 add "interpolate" button to dmg color select
idea shamelessly ripped from bgb
2012-09-12 23:45:42 +00:00
goyuken 03caa3b32f gambatte dmg palette editor. blah. 2012-09-12 22:18:51 +00:00
brandman211 ae4dfbc00e -Imported .LSMV buttons.
--Haven't done anything with the flags because I don't know what they are supposed to do yet.
--Speedy Gonzales v2 doesn't sync after being converted, but I don't think that's my fault.
-Flags and other data will be parsed soon.
2012-09-12 05:59:09 +00:00
goyuken 1e6a9415c1 add Sound.Utilities.DCFilter and use it in gambatte
haven't decided yet whether i like the idea; it's mostly about playing nice with other audio mixing (from other applications)
well, it's not bad anyway...
2012-09-11 21:30:50 +00:00
goyuken d57e195e52 gambatte: add oam, hram to memory domain list 2012-09-11 19:05:44 +00:00
goyuken 25c34d2ca6 significant speedup in gambatte MemoryDomains by keeping shadow copy of native memory
not quite sure at the moment what each of the domains actually is, though
2012-09-11 17:37:17 +00:00
goyuken ed2b690f75 add memory domains to gambatte
appears to work, but i don't really have much of anything to test on it
ramwatch is horribly slow
2012-09-11 15:28:38 +00:00
beirich bf504d1220 gen: work on sprite masking/overflow code. substantially improved. Fixes Sonic 1 title screen, Galaxy Force 2 level select, Landstalker sprite masking, and improved nemesis' test rom. Still something amiss in Sonic 2 title screen. 2012-09-11 05:00:45 +00:00
goyuken d84f13275e add IsLagFrame, LagCount, Frame to Snes savestates 2012-09-11 01:50:55 +00:00
goyuken f2ce38851a add IsLagFrame, LagCount, Frame to Gambatte savestates 2012-09-11 01:46:57 +00:00
goyuken 578e247524 add lag counter to LibsnesCore
per ilari, this should work correctly on certain games that poll the input in a particular way.  however, it is completely non-functional on many other games.  core digging is required for anything better.
2012-09-11 01:36:12 +00:00
goyuken 4e35cb566f functioning saveram support for gambatte 2012-09-10 23:40:53 +00:00
andres.delikat 286e5c9b08 SNES - make controllers 2-4 work 2012-09-10 18:40:39 +00:00
goyuken 62f2771a8e gambatte: lagframe stuff is hooked up and appears to be working 2012-09-09 21:57:15 +00:00
zeromus 8e42658702 completing the trifecta: fix the terrible nondeterminisms that made series of snes romloads act wacky 2012-09-09 21:19:54 +00:00
goyuken a6caa8680d fix up rom loading routines for libgambatte to use memory block directly (and not file) 2012-09-09 21:15:54 +00:00
beirich 90d1d12086 gen: fix some vram corruption issues
general: fix some build warnings
2012-09-09 21:15:20 +00:00
zeromus f3b6afa5ad change libco to use an msvc-compiled dll so that it doesnt get wrecked whenever the .net GC process suspends a thread in a coroutine. cant figure out how to get that same code working compiled by mingw32. 2012-09-09 19:02:13 +00:00
goyuken 8cdcae462d gambatte savestates. slightly modifies some parts of the core and the pinvoke hookup to produce memory arrays instead of disk files as savestates.
does not work, for now.  (sorry about the exceptions!)
2012-09-09 18:47:00 +00:00
goyuken a277dfa1e5 wire controls into gambatte. 2012-09-09 14:17:57 +00:00
goyuken 3acc87c013 remove unnecessary extra video buffer in gambatte wrapper, and dispose of resampler properly 2012-09-09 13:35:58 +00:00
goyuken 72260690df r2931 accidentally reverted r2929 2012-09-09 12:23:40 +00:00
beirich a4f8ecc2e0 gen: fix render scroll plane size / window calculation bug. fixes gfx glitches in several games. 2012-09-09 04:22:44 +00:00
beirich 4dbab90b87 gen: remove old, unneeded hack. Fixes Quackshot. 2012-09-09 03:29:40 +00:00
beirich cbe1292e16 fix GB RewireInputChain crash 2012-09-09 02:06:07 +00:00
beirich 6a968003ef derp 2012-09-09 01:54:31 +00:00
beirich 3ed2261cf9 Delete some unused files
Move Nintendo\Docs folder to Nintendo\NES\Docs
2012-09-09 01:53:28 +00:00
beirich 11464a7e03 Move Gambatte files to Nintendo folder
Clean up some missing file links in the csproj file
2012-09-09 01:40:29 +00:00
beirich e8de0327d2 Remove the 2 dead gameboy cores 2012-09-09 01:31:30 +00:00
goyuken 7962c6d2cd change quality parameter for SpeexResampler in Gambatte from 5 to 2. Speedup: 85fps->1500fps 2012-09-09 01:04:39 +00:00
goyuken f18eb2fef2 gambatte now has sound! output from the core is original 2MEGAHURTZ audio, but libspeexdsp handles it fine.
seems to be a lot of DC offset at times; not sure if there's a good way to remove it
2012-09-09 00:41:11 +00:00
goyuken b1568ccc44 add gbc extension to Database so gbc roms can load with gambatte 2012-09-09 00:16:56 +00:00
goyuken d3cb60d833 remove a few notimplemented exceptions, and add .gb, .gbc to the standard open file dialog.
.gbc fails to load because of something else...
2012-09-08 22:01:47 +00:00
goyuken 7b9bbe6b31 libgambatte can now get into game (with recognizable graphics). exceptions everywhere and nothing is hooked up, though. 2012-09-08 21:48:46 +00:00
goyuken 588d6214d5 more gambatte wrapper stuff 2012-09-08 21:36:04 +00:00
goyuken 7fc9dbd22c typos, comments 2012-09-08 20:46:54 +00:00
goyuken 3061abbc4b preliminary C api for libgambatte, plus pinvoke bindings
i'm a bit out of my league on this one, but that's ok
2012-09-08 20:22:07 +00:00
zeromus 285b9581f2 snes-work on graphics tools. can now render typical BGs for mode 1. SLOWLY!!!!! this is definitely getting turned into c++ code 2012-09-08 20:03:04 +00:00
goyuken 408a4d6102 add comment to BufferedAsync explaining its value 2012-09-08 16:02:14 +00:00
goyuken 2a01e01e78 clean up resampler with rest of libsnes 2012-09-08 01:15:16 +00:00
andres.delikat d56c0c354b SNES - oops, hookup setting the frame counter as well 2012-09-07 20:31:05 +00:00
goyuken 71652b25dc cleanup/simplify SpeexResampler 2012-09-07 20:12:47 +00:00
andres.delikat afa27c1a26 SNES - hook up frame counter 2012-09-07 20:06:57 +00:00
goyuken 001b28c60e replace junk and bad license resamplers with libspeexdsp (using p/invoke). MIT licensed, sounds pretty decent.
the p/invoke wrapper class is a hackjob i was using for testing and will be replaced.
2012-09-07 18:49:18 +00:00
brandman211 2a41b8eda7 The EROM / GROM is now expected to be .int or .bin. 2012-09-07 06:36:23 +00:00
zeromus cfe1e749a1 hook up path config for intellivision and change erom and grom to use it. now you need erom.bin and grom.bin in the Intellivision directory by default. 2012-09-07 06:18:58 +00:00
zeromus 8eba3fb37c stop crashing the intellivision core when the emulation menu is opened 2012-09-07 05:41:33 +00:00
zeromus 58c7966449 should probably add this file too 2012-09-06 08:35:45 +00:00
zeromus ad6910fd74 snes-some beginning steps on graphics debugging tools. nothing to see yet, move along 2012-09-06 08:32:25 +00:00
brandman211 fd1560177e -Implemented Colored Squares mode. It looks sensible in one of the improperly loaded ROMs that triggers it.
-Masked the Color Stack registers. This prevents the previously mentioned ROM from throwing an ArgumentException in ColorToRGBA.
2012-09-06 08:02:49 +00:00
brandman211 a6f11a7ade -The STIC now displays the encoded background color when one is provided.
--The only time I've seen this was in a game that used FGBG mode, and it looked messed up.
-Implemented the parsing of the background for Color Stack mode.
--Because the STIC Registers aren't populated, this doesn't do anything. I'm not sure when this is supposed to occur.
-Determined when Colored Squares mode is active. I'll try to implement this mode shortly.
2012-09-06 07:31:25 +00:00
brandman211 8230f63ddf The foreground now shows its true colors. 2012-09-06 06:56:21 +00:00
brandman211 641ef2bcff -Unset pixels when necessary.
-Fixed the loading of a card's rows.
-Corrected the maskings. The top tiles look perfect now, but the text isn't showing up yet.
2012-09-06 06:20:50 +00:00
brandman211 06022c9076 -Added Read/WriteMemory to the STIC so that it can access the RAM it needs to draw the screen.
--Did the same for the PSG because why not.
-Discovered that the Commando HLT happens after the CPU goes idle, so there's no point in further investigating the issue until I emulate that.
-Parsed the BACKTAB cards for the STIC's Draw().
-Attempted to draw the screen using the aforementioned cards.
--I'm only trying to apply color to the foreground.
---Instead of converting the FG color to RGBA, I'm making it all white for now.
--There's clearly some sanity to what's being drawn, so I think each 8x8 card is being drawn in the right place.
--I think the next step is trying to make each individual card draw properly.
--I believe the algorithm for populating the FrameBuffer is VERY inefficient in the way it accesses memory. Will need some suggestions as to how I can rewrite this.
2012-09-06 04:51:17 +00:00
goyuken a85dadcf7d did a bunch of listening tests with libsnes and metaspu. switched to vecna metaspu
it seems to be the most stable when the system is fast enough to maintain approximately 100% speed.

also fixed up metaspu in dumping and switched it to vecna.  i can now have clean audio while running libsnes with lua script and ffmpeg dumping.
2012-09-06 00:07:37 +00:00
goyuken 41e2e5bced orphaned variable from r2898 2012-09-05 23:32:41 +00:00
zeromus ade89fe798 snes-fix bug where loading more than one snes rom would wreck the emulator 2012-09-05 23:16:08 +00:00
goyuken b0e3a332d8 abstract resampling functionality into IStereoResampler for testing purposes
add two example resamplers that implement this: LinearResampler and CubicResampler.  both are very basic and sound like shit compared to libresample4j
ultimately, a single good resampler with a better license than libresample4j should be selected and used
2012-09-05 21:21:35 +00:00
goyuken 0430ec91c8 add resampler based on libresample4j (LGPL)
hook that up to libsnes, so libsnes audio now goes through libresample4j and then metaspu
it sounds ok
2012-09-05 18:52:17 +00:00
brandman211 1a760096bc -Laid out the groundwork for the video provider.
--VirtualHeight / Width will be useful due to how the scanlines are doubled on TVs, but for now, I will just be drawing to scale.
-Enabled XOR@, SAR, and COMR. Advanced Dungeons & Dragons provided more test cases.
-Noticed that Commando, as well as some other games, triggers a HLT. This should be looked into later.
2012-09-05 04:42:49 +00:00
goyuken fd5494a316 libsnes: dumb change to dumb code slightly lessens appearance rate of rice crispies in some situations 2012-09-05 01:30:09 +00:00
zeromus eb67d2b666 fix archive chooser opening issue with zips containing solely one .sfc 2012-09-04 20:29:37 +00:00
zeromus b2b1c8755c snes-apply lsnes patches 2012-09-04 20:23:18 +00:00
brandman211 44e03b1923 -Changed the amount of pending cycles to add when the STIC sets SR1.
--This number is fairly arbitrary, and I don't know why it works, but for now, it does.
--The values of INTRM don't match up exactly, but I think this is mostly a logging issue, though I still need to look into this.
-Fixed the Overflow Flag calculation.
--My original formula didn't compare the signs of the operands.
--It always needs to use the original operands, not the 2s complement one.
--As such, a result parameter has been added.
-Fixed the detection of a double swap, shift, and rotate in the related instructions. Ironically, I shifted one too many bits in my detection.
-Masked the result of left shifts and rotates to 0xFFFF so that the flags are calculated properly.
-Made RSWD (un)set the right flags.
-Enabled GSWD, MVI, SARC, CMP@, ADD, SUB@, INCR, RRC, SLR, SLL, RLC, ADDR, SUBR, SLLC, CMPR, and RSWD.
-COMR, NEGR, ADCR, SAR, ANDR, SUB, AND, XOR, and XOR@ remain disabled as I have yet to hit any test cases for them.

At this point, IntelliHawk is executing instructions indefinitely with what seems to be perfect results! I think I'm ready to hook up the screen.
2012-09-04 19:29:02 +00:00
zeromus 4903ad240c snes-change libsnes color output to 32bpp to avoid having to uncrunch 16bpp pixels, for an indeterminate speedup 2012-09-04 19:25:09 +00:00
zeromus 9726b75ec4 snes-support layer toggles (needs gui hookups) 2012-09-04 19:12:16 +00:00