Commit Graph

2815 Commits

Author SHA1 Message Date
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
pasky1382 60e267dd91 minor edit in the script. 2012-09-05 02:42:14 +00:00
pasky1382 d6a18f5f12 updated the metroid hitbox viewer script. 2012-09-05 02:35:09 +00:00
adelikat ead2d186cf SNES - hook up movie playback, probably, needs a frame counter to use it 2012-09-05 02:24:03 +00:00
adelikat f1de424aa3 Fix input display that I broke yesterday. Hook up SNES input display and movie recording (but not playback) 2012-09-05 02:07:30 +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
goyuken 9b8e54989c now that i've had a little more time to understand Metaspu, i see quite easily how it can be used in the place of DualSound, so do that. only actual effect of change should be how audio sounds while recording is going on. as an orphan, DualSound will likely be deleted soon. 2012-09-05 00:36:38 +00:00
pasky1382 34da5a0bb1 Added legend of toki hitbox viewer lua script for genesis. 2012-09-04 23:35:59 +00:00
pasky1382 46ccd190dd Added Super Castlevania 4 hitbox viewer lua script. 2012-09-04 22:51:39 +00:00
pasky1382 f5d728bd35 Edited the Super metroid lua, added super mario world hitbox viewer lua script 2012-09-04 21:55:41 +00:00
andres.delikat 71e07d0493 add a null check that could potentially crash the emulator in the HowMany() function I wrote for path and watch functions. No functional change probably. Also clean up the organization of this method 2012-09-04 20:40:39 +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
pasky1382 7d04b60b85 2012-09-04 19:23:23 +00:00
zeromus 9726b75ec4 snes-support layer toggles (needs gui hookups) 2012-09-04 19:12:16 +00:00
zeromus e364353131 add .sfc to fileselector UIs 2012-09-04 18:07:40 +00:00
zeromus 76cfbc47c1 fix loading of non-snes games, and try to make snes core reset a little more reliable by reconstructing more 2012-09-04 18:04:06 +00:00
zeromus c8aa937f4f snes-memorydomains (but not systembus) 2012-09-04 17:29:20 +00:00
zeromus dd6d0a47e1 hexeditor-print "0x100000 addresses" instead of "1048576 addresses" 2012-09-04 17:26:27 +00:00
zeromus ea6c0b9378 snes-enable savestates. dont get your hopes up, its a bit bloated and weird, and we still need to asses the bsnesariffic savestate synchronization issues. but, it works. 2012-09-04 08:21:01 +00:00
brandman211 e51b79e2fa -Flushed log after interrupt.
-Replaced subtraction with adding the 2s complement in instructions. That way, the Overflow Flag is calculated properly.
-Made it so that the masking of a result to 0xFFFF comes after calculating the Carry and Overflow Flags but before the Sign and Zero Flags.
-The CMPX instructions now use the aforementioned masking to properly calculate the Sign and Zero Flags even though the result doesn't actually get stored.

Thanks to this commit, IntelliHawk executes 1711 instructions properly. Next, it's supposed to take an Interrupt, which is bizarre because INTRM appears to be true at that point. This doesn't seem possible unless I am once again logging at the wrong time, hiding that the INTRM gets set to false before immediately switching back to true after taking the interrupt. Will look into this later.
2012-09-04 07:28:36 +00:00
zeromus d02f925e13 snes-support SNES subdirectory for sram and such 2012-09-04 07:14:29 +00:00
zeromus f5c0965045 snes-support save ram 2012-09-04 07:09:00 +00:00
brandman211 ca8b778a52 -Noted interrupts in the log.
-Added and Interrupted flag to make it so that interrupts only trigger once per falling edge.
-For now, interrupts take 28 cycles.
-Made it so that the STIC tracks Pending / Total Executed Cycles just like the CPU.
-Forwarded the cycles executed in the CPU to the STIC's Execute.
-SR1 is now inverted when there are no pending cycles.
--If SR1 is high, 14394 cycles are added to the pending cycles.
--If SR1 is low, 3791 cycles are added to the pending cycles.
2012-09-04 06:26:08 +00:00
zeromus caed262122 snes-try and determine whether game is snes based on libsnes's internal heuristics, and use .SFC for it anyway 2012-09-04 06:08:46 +00:00
beirich 2ef33fbfec gen: fix dumb bug with sprite masking... fixes sprites showing up in WINDOW in many games where theyre not supposed to 2012-09-04 02:56:53 +00:00
goyuken 25e213f157 libsnes sound is functioning. very quick, very dirty 2012-09-04 01:21:14 +00:00
beirich ff8a58a9b7 gen: Implement CRAM read, VSRAM read. Correct sprite coordinate masking, fixing games several games where sprites were missing. 2012-09-04 01:07:03 +00:00
adelikat 2de8e3c346 Ram Watch/Search/Poke - use Watch objects internal domain value, this commit doesn't add functionatility yet (may have even broke something), but will lead to eventually being able to watch multiple domains at once, and some ram search optimizations 2012-09-04 00:33:47 +00:00
zeromus 0cc6bf072e needed another mingw dep 2012-09-04 00:30:40 +00:00
zeromus 83d345c6f7 oops 2012-09-04 00:23:09 +00:00
zeromus 37e6f68370 bsneshawk step 1 of N - compile libsnes, make bsneshawk core, setup interop, support frameadvance, video, gamepad. games are playable, I think. 2012-09-04 00:20:36 +00:00
adelikat 2cd7af1c4c Ram Poke - use a nullable int, -99999999 is now a valid poke/readable number! 2012-09-03 23:45:41 +00:00
adelikat 1f454af2c3 Refactoring of Watch object and related tools, add domain into Watch object. No functionality changes in this commit 2012-09-03 23:42:00 +00:00
beirich 0a60a37705 gen: fix Flavio's DMA test rom. and hopefully something else too. 2012-09-03 22:26:33 +00:00
adelikat a48562bc36 NES Graphics Config - double clicking GB color opens up color selection (same as clicking change), clean up outdated TODO list 2012-09-03 21:52:51 +00:00