Commit Graph

1012 Commits

Author SHA1 Message Date
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 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 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
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
beirich 0a60a37705 gen: fix Flavio's DMA test rom. and hopefully something else too. 2012-09-03 22:26:33 +00:00
beirich c9b3f7bedf gen fixes: HINTs shouldnt fire during vblank, some DMA fixes, fix a render priority issue (albeit not the ideal fix), substantial rom compatibility testing 2012-09-03 16:01:56 +00:00
beirich d745b3112b whoops, commit .csproj also for previous change 2012-09-03 00:46:28 +00:00
beirich dd25cc924a Move ICart.cs from directory/namespace for generic interfaces to Intellivision folder/namespace, as it is entirely Intellivision specific. 2012-09-03 00:45:30 +00:00
adelikat 1f128aeda4 Ram Search - small speedup on UpdateValues 2012-09-02 01:52:16 +00:00
adelikat 8c5d8741cb Genesis - add Rom data memory domain 2012-09-02 01:33:12 +00:00
beirich c91c001093 gen: Fix bug with word-reading Z80 bus status; fixes music in Monster World IV, Thunder Force 3 still boots 2012-09-01 21:04:40 +00:00
adelikat 2af24ba9fd Genesis - add system bus memory domain 2012-09-01 19:49:40 +00:00
beirich d586876f40 gen: implement H-ints
gen: implement Vram/Vram DMA copy (badly)
gen: fix dumb sprite rendering bug
gen: fix crash bug with certain WINDOW settings
2012-09-01 18:40:52 +00:00
adelikat 35ec42073f NES - implement address poking on the system bus domain. Anything in the EXP, WRAM, PRG regions is done via the built in cheat system due to being handled by the mappers. This may not be the ideal way to do this but it seems to work well, and I don't know of a more logical way to handle this. 2012-09-01 18:34:31 +00:00
adelikat 9b7404b059 NES - Round 1 of Hook up NES cheats for system bus (i.e. game genie codes now work) 2012-09-01 14:13:36 +00:00
beirich f21429b996 gen: implement WINDOW rendering
gen: initialize VDP registers to power-on values
2012-09-01 05:02:27 +00:00
beirich e24f0962fc gen: fix dumb tile priority bug (primarily affects Ghouls n Ghosts, which use the layers backwards from normal) 2012-08-30 04:29:33 +00:00
beirich c4afd9f393 gen: allow word-reads to query Z80 bus status. now thunder force 3 boots. 2012-08-27 02:59:26 +00:00
beirich 8ad3e72ffa Allow easy swapping of active 68000 core the C# core, or Musashi... As we are likely to be swapping between versions rapidly for some period of time. 2012-08-26 14:39:06 +00:00
beirich 2f73408029 gen: improved memory map and VDP I/O 2012-08-26 03:43:35 +00:00
beirich 58780191de gen: implement raster effects 2012-08-24 04:45:09 +00:00
beirich 9545475455 gen: render priority improved somewhat... still some issues 2012-08-24 02:30:20 +00:00
beirich 575ceb3966 gen: Fix tile VFLIP bug, correcting the most obnoxious of the graphical glitches 2012-08-24 00:37:54 +00:00
pjgat09 78de49c923 Atari: Added an audio object to the TIA, including functions to run the 4 and 5 bit LFSRs. Also added some code for the first 4 audio modes, enough to generate samples for one of the audio channels.
Added a logic simulation of some parts of the TIA, including the audio portion. This requires logisim to run.
2012-08-23 02:04:24 +00:00
adelikat 67822be97c NES - PPU - very minor cleanup 2012-08-23 01:28:33 +00:00
beirich 40a427e68f md: correct hscroll offset calculation. genesis core 10% less embarassing. 2012-08-22 04:54:36 +00:00
adelikat 959e56b71a NES - small (probably unnoticeable) speedup to WriteMemory() 2012-08-19 21:09:48 +00:00
adelikat 6473321100 NES - some optimizations to ReadMemory(), ~1fps speed up 2012-08-19 20:38:20 +00:00
adelikat 70929679d5 NES - don't recalculated the framebuffer constantly, instead only do it once per frame. ~1fps speed up 2012-08-19 20:01:17 +00:00
adelikat 493cff72c4 NES - tiny speedup 2012-08-19 19:21:35 +00:00
goyuken 2a2caa492c add linear resampler (not activated in code). sounds about the same as the other two (ie, no major bugs) on the opening to Golden Axe 2012-08-19 17:46:13 +00:00
beirich 4ba8fcf227 ym2612: Implement detune. Implement a somewhat better resampler, still not a Good One. 2012-08-19 04:41:34 +00:00
brandman211 26b1d06b7a -Simplified the CPU / STIC connection.
-Made FrameAdvance handle the pending cycle loop. During each iteration, it runs one instruction and ticks the STIC accordingly.
2012-08-14 03:58:11 +00:00
brandman211 9100232547 -Made connections between the signal pins on the CP1610 and the STIC.
--Not sure why the STIC has any connection to the SST, but the docs on the SST are virtually non-existent from what I could find.
--I took advantage of Func and Action instead of passing bool references to both devices. I think this makes sense.
-Added reset functions for both devices.

My comparison log for INTRM is still weird because it says it is true initially (Expected) and remains as such after the first instruction (A bit odd). I think this happens because the STIC is supposed to "tick" and shift SR1 to false immediately, but the STIC tick happens after the CPU tick, and the CPU tick is where the logging happens. I need to find a better place to put this logging, and I need to implement the STIC ticking for IntelliHawk. I'm not positive how to approach the latter issue as I assume a tick means one instruction execution, and my executions happen in a loop on the CPU, which has no reference to the STIC, so I'm not sure where this fits into the equation.
2012-08-13 08:10:15 +00:00
brandman211 fd6201c703 Implemented what to do on an interrupt. This seems to be logical as it tries to execute a GSWD instruction, but it takes the interrupt too early because I haven't figured out when to turn INTRM on / off. 2012-08-13 03:47:08 +00:00
adelikat f84a3709c9 Misc code cleanup 2012-08-12 01:09:30 +00:00
brandman211 c6cf18061f Scratchpad RAM, Graphics ROM, and Graphics RAM are apparently all 8-bit. 2012-08-10 20:40:34 +00:00
beirich f42b96ba7d ym2612: fix EG Rate calculation. Fix Attack Rate exponential formulation. 2012-08-10 04:46:29 +00:00
brandman211 5239b4f55b -Separated the STIC and PSG memory map logic into new objects.
-Foreground / Background | Color Stack Mode
--Actually made a boolean for it (FGBG).
--Reading from a write-only STIC alias of $21 does change the STIC into Color Stack mode, but it doesn't actually read.
--Color stack mode is enabled when $21 or its alias is read and it is disabled (FGBG) when written its written, both having to occur during VBlank Period 1.
---This is what I gathered from the wiki, but I'm confused as to why it says that "The STIC stays in this mode until the program accesses location $21 again." I'm assuming this doesn't mean the mode changes on every access because then I don't understand why a read would change to a different mode than a write.
--FGBG is disabled by default. I don't think it matters.
2012-08-08 23:05:55 +00:00
beirich b07008c7e7 Genesis vdp: small loadstate fix 2012-08-08 00:44:08 +00:00
beirich 32bc79be06 ym2612 mothaaaaafukkkkaaaaaaa 2012-08-07 05:48:30 +00:00
brandman211 0d20c133a5 -Moved the reset address to the CP1610 and made RegisterSP/PC private.
-Created helper functions for indirect ops; Indirect_Set will be needed for interrupts.
2012-08-06 15:51:35 +00:00
adelikat 1bce6a724d oops, add Mapper197.cs 2012-08-05 22:28:03 +00:00
adelikat 975d449722 AxROM (Mapper 7) - make all AOROM games not emulate bus conflicts, fixes various Wheel of Fortune games, Double Dare, and Jeopardy 2012-08-05 22:02:58 +00:00
adelikat ea8d47bcc0 Start Mapper 197 (based on MMC3) and sort out the use of this vs Mapper 91. 2012-08-05 21:34:00 +00:00
zeromus 6a63f2f197 nes-work on mapper091 a bit, but its still not right 2012-08-05 20:19:07 +00:00
adelikat 77da639dc6 NES - Fix Mapper 50 2012-08-05 19:20:54 +00:00
brandman211 a19b76e6cc Added Interruptible and assigned it for every op. 2012-08-05 07:04:03 +00:00
brandman211 e9a8980f0c -Throw exceptions for TCI, SIN, and BEXT.
-Added and logged INTRM, BUSRQ, BUSAK, and MSYNC.
2012-08-05 06:47:00 +00:00
brandman211 b83bb1901d -When neither the cartridge nor hardware responds to a read, it now returns 0xFFFF instead of throwing an exception.
-I will now assume that 0x7000 is not mapped for the sake of continuing on. I will need to implement a mapper system shortly though.
--Did the same thing for 0x4800.
-AND@, MOVR, CMP enabled.
-Made the logging separator generate before an instruction instead of after the register states. This is quite petty, but I don't like the separator at the end of the file.

I hit an infinite loop, and I'm very very certain it's happening because I don't have an interrupt system yet. Time to stop avoiding that!
2012-08-05 05:59:55 +00:00
adelikat e8e64bca62 NES - VRC6 sound! 2012-08-05 00:11:32 +00:00
adelikat 33954ddef7 NES - map MAPPER219 to NROM (fixes a version of 3D Block) 2012-08-04 19:22:49 +00:00
adelikat c0706ed0ac NES - add Mapper 120 (not documented by Disch docs), used by Tobidase Daisakusen (FDS Conversion). Mapper implementation based on FCEUX but game freezes before gameplay starts (plays fine in FCEUX) 2012-08-04 19:02:51 +00:00
adelikat a7b847dbe2 NES - some small easy optimizations to the APU (very small) 2012-08-04 02:41:15 +00:00
adelikat b10769ab4a NES - dsiable NESWatch checks in ReadMemory since this feature is not yet used for anything 2012-08-04 01:54:19 +00:00
adelikat fba6e64c58 NES - some small speed optimizations 2012-08-04 01:47:54 +00:00
adelikat 6e8d38fabe NES - disable vrc6 sound for now 2012-08-04 00:57:26 +00:00
andres.delikat 31db5f9d05 NES - better handling of bus conflicts for AOROM board, fixes Wheel of Fortune 2012-08-03 14:12:04 +00:00
adelikat 70f07346b1 NES - start VRC6 sound, currently sounds terrible 2012-08-03 02:08:42 +00:00
andres.delikat 4754889131 NES - mapper 231 - optimize the ReadPRG() method 2012-08-02 21:05:15 +00:00
brandman211 97727ab658 -Fixed the memory mapping. I don't know why I thought I'd be able to just mask addresses to the length of the segment and think it'd work...
-Tried two methods of parsing the ROM file. Neither of them worked.
2012-08-01 17:45:37 +00:00
adelikat accd643fde NES - progress on mappers 90 & 209 2012-08-01 02:55:01 +00:00
andres.delikat eeb0171eda Start mapper 90/209 2012-07-31 22:04:45 +00:00
brandman211 80a0f8f75b -Made Intellicart its own class.
-Separated cartridge logic into a separate ICart named Cartridge.cs.
-Made WriteMemory return a bool to match ICart.Write. It currently returns true if either the cart or the core responded.

TODO: Parse the vanilla Intellivision ROM, which will hopefully include the read / writability of the data segments. adelikat seems to think that I just need to send the bytes to $5000, but I'm not convinced.
2012-07-31 06:54:20 +00:00
adelikat a5262488c7 NES - fix mapper 96 prg mapping. These games are working as well as can be tested without better peripheral support, so I'm considering this mapper complete. 2012-07-31 03:07:38 +00:00
adelikat 4930979940 NES - progress on mapper 96, Oeka Kids - Anpanman no Hiragana Daisuki seems to play (but I can't get passed the title screen without Oeka Kids tablet emulation). Oeka Kids - Anpanman to Oekaki Shiyou!! fails to load (suggesting a PRG mapping problem?) 2012-07-31 02:58:59 +00:00
brandman211 0d768ef710 Finished the Memory Map. I think the cartridge logic needs to be separated. 2012-07-31 01:39:47 +00:00
adelikat c04b750d6a Finish mapper 245 2012-07-31 01:01:15 +00:00
brandman211 f66d92f2a5 Started filling the gaps in the Memory Map, getting up to 0x7FFF. Once complete, a lot of TODOs remain, the most important being the actual mapping of the cartridge. 2012-07-30 22:25:00 +00:00
andres.delikat a34bf45610 Add islag to savestates (now lagframe alert status updates when loading a state) 2012-07-30 14:42:52 +00:00
andres.delikat daff01ad2e Genesis - add lag and frame counts to savestates 2012-07-30 13:43:25 +00:00
brandman211 8306768c76 Enabled SWAP. Works as expected, but the next instruction is an MVI@ that wants to read from 0x7000, which I think is made available to cartridges. Not sure where to go from here. 2012-07-30 02:34:53 +00:00
adelikat 59ba7efdaf NES - start mapper 18 2012-07-29 22:40:57 +00:00
adelikat 31843f3e3a NES - mappers 74, 192, 194 - set VRAM sizes when mapper object is created, this removes the need to set vram in the gamedb. 2012-07-29 18:43:21 +00:00
adelikat d4ac95bd30 NES - implement mappers 74 and 194. Added gamedb entries for the games I could find that correspond to these mappers 2012-07-29 18:35:24 +00:00
adelikat 71865576a7 NES - finish mapper 192 2012-07-29 18:12:37 +00:00
adelikat 7cbee7bde4 NES - mapper 74 - implemented chr-ram behavior, however, it does not work (chinese characters still missing in dialogs, but this checkin causes no regressions) 2012-07-29 17:55:45 +00:00
adelikat 047ed975d1 NES - implement mapper 234 2012-07-29 03:42:05 +00:00
brandman211 b1db1b7a69 -Reversed the double byte data bytes. It now works properly.
-Set the D flag to clear one instruction after it's set; SDBD is a prefix instruction.
2012-07-29 00:02:06 +00:00
adelikat c555e1df40 NES - mapper 52 complete 2012-07-28 18:53:26 +00:00
adelikat 9e96eb9ddc NES - start mapper 52 2012-07-28 18:14:04 +00:00
brandman211 53c0dd5ee0 -Enabled the ops that merely set / clear flags...there's no way I could have messed those up.
-Tested and implemented the MVO op.
-Implemented the other direct ops.

I think my double byte data handling isn't working. Will diagnose.
2012-07-28 17:50:32 +00:00
brandman211 748efbcd20 -Fixed the overflow calculation for ADDR, SUBR, and CMPR.
-Implemented the remaining XXX@ ops.
2012-07-28 17:20:16 +00:00
brandman211 188e5662ca It seems that indirect writes decrement the stack pointer BEFORE reading memory. 2012-07-28 17:06:06 +00:00
adelikat 1fb7d9a8a6 NES - Mapper 45 - oops, add lock_regs flag to savestates 2012-07-28 15:42:57 +00:00
adelikat 678e60815e NES - Mapper 50 - hook up IRQ logic? 2012-07-28 13:19:12 +00:00
adelikat 8d45516811 NES - mapper 50 - fix mirroring 2012-07-28 12:35:51 +00:00
brandman211 0d10eee747 -Implemented branching and tested BNEQ. BEXT not implemented.
-Made it so that the indirect ops other than MVO@ decrement R6 when it's the mem address. Indirect write means writing to a register apparently, so maybe the documentation don't contradict itself.
2012-07-28 04:18:13 +00:00
adelikat 5d521a5132 NES - mapper 50 - some fixes, almost complete 2012-07-28 03:37:06 +00:00
adelikat 7805c460d0 NES - start mapper 50, but it doesn't work 2012-07-28 03:11:39 +00:00
adelikat 10c71da526 NES - implement mapper 45 2012-07-28 01:29:06 +00:00
adelikat 524bc29b43 NES - remove some console logging spam on mapper 49 2012-07-28 01:02:16 +00:00
brandman211 4864aaa291 -Enabled and tested DECR.
-Fixed my disassembly of branch; I wasn't thinking in hexadecimal. >_<
-Subtracted 1 from the negated offset when branching in reverse. The next op is "BNEQ $FFFC".
2012-07-27 04:46:44 +00:00
brandman211 4d1f0114c4 R4-R7 now auto-increment for all of the indirect opcodes. My documentation is inconsistent on whether R6 increments or decrements on right, but in any case, my output now matches my source until the DECR, which hasn't been implemented yet. 2012-07-27 04:07:06 +00:00
brandman211 3a56f65c3f Implemented the XXXR opcodes. As of now, I have Jump, MVO@, MVI@, and XORR enabled and tested. There might be an off by one error with MVO@. 2012-07-27 03:33:24 +00:00
adelikat 9ee133866d NES - complete mapper 205, slight fix to mapper 91 (still not working) 2012-07-27 02:14:18 +00:00
andres.delikat f72905f602 NES - start mapper 96 (prg mapping working) 2012-07-24 14:32:09 +00:00
brandman211 b96e014327 -Reverted disassembly printout as it'll now match up with my comparison.
-Fixed the branching disassembly; the direction just negates the offset and the second parameter only belongs to BEXT. All of my sources contradict each other, but this seems sensible.
2012-07-24 05:29:24 +00:00
brandman211 d469a4e568 -Put the disassembly in parenthesis and put the opcode to the left of it in the logs. This is uglier, but it's initially easier for comparison this way.
-RegisterSP now increments in MVO@ instead of decrements. I'm not sure how this allows the stack to function properly, but it seems to work.
2012-07-24 03:05:57 +00:00
adelikat d774e49cd8 NES - Mapper 245 - do chr-ram logic. The 3 games I found correctly labeled as 245 (Yin He Shi Dai, DQ7, Hyrule Fantasy) all fail to run properly in this implementation, and FCEUX. 2012-07-24 00:12:40 +00:00
andres.delikat b08c2861a4 NES - start mapper 245 prg mapping working (possibly) 2012-07-23 22:15:22 +00:00
adelikat ed16f40529 oops, forgot to add Mapper205.cs 2012-07-22 20:11:55 +00:00
adelikat f45238132e NES - start mapper 205 2012-07-22 18:41:54 +00:00
brandman211 743480e26f -Logging now uses a static StreamWriter instead of building the string and writing on destruction.
-Applied to the old Gameboy core. Why not? It at least fixes that annoying bug from before if we ever care to use it again.
-Both logs are now written to different files.
2012-07-22 18:40:28 +00:00
brandman211 9f2bcf3318 -Fixed logging.
--It now just builds a strings and writes on finalization.
-Fixed up format strings.
-As RegisterPC already increments upon reading the third decle, I now just store PC as the return address for jumping instead of PC + 1.
2012-07-22 18:08:10 +00:00
brandman211 60c5a1ce58 Added logging for the CP1610. Not working for some reason. 2012-07-22 17:18:11 +00:00
adelikat b089f2996c NES - decently support mappers 74 and 192 (games play fine other than missing characters in text boxes)) 2012-07-22 16:57:44 +00:00
adelikat 91be138920 NES - fixes to mapper 91, still fails 2012-07-22 15:35:19 +00:00
adelikat f85b6a017b NES - checkin start of mapper 91 2012-07-22 01:02:18 +00:00
adelikat 225079a843 NES - implement board MLT-ACTION52 (Mapper 228) for both Action-52 and Cheetahmen II 2012-07-21 20:40:10 +00:00
zeromus e66e936567 nes-fix mapper 061 2012-07-21 19:45:16 +00:00
adelikat b8a16f93fa Implement mapper 243 2012-07-21 19:23:05 +00:00
adelikat f16a44d4e6 Start Mapper 243 2012-07-21 18:54:12 +00:00
adelikat 8aeb313381 Fixes to mapper 164, Final Fantasy V has a broken title screen but otherwise playable. Implemented based on Disch's original notes and so not quite complete. 2012-07-21 18:31:41 +00:00
adelikat 544410b4d8 Fix mapper 154 (Devil Man) 2012-07-21 17:51:52 +00:00
adelikat 86e14410b7 NES - mapper 225 finished 2012-07-21 17:19:59 +00:00
brandman211 0a0763966c -Refactored of the executor / disassembler / Intellicart to use more descriptive variable names and types to clear up a lot of confusion.
-Added implementation for NOP (6 cycles of nothing).
-Made SWAP actually store the result (Still disabled).
-Added breaks to the swap / shift / rotate cases (Yikes).

Instruction disassembly:

JSRD R5, $1026
MVI@ R7, R6
JSR R5, $1A83
MVO@ R5, R6
MVO@ R0, R6
MVO@ R1, R6
MVI@ R7, R4
MVI@ R7, R0
JSR R5, $1738
MVO@ R5, R6
XORR R5, R5 <- Needs implementation.
2012-07-21 05:25:52 +00:00
brandman211 259ec356bd -Updated the disassembly based on a more accurate resource.
-Retrieved the double bit from the swap / shift / rotate instructions in a more proper way.

TODO: Use more specific variables; most of them suck, and with these docs, I have better names for them.
2012-07-20 23:06:59 +00:00
andres.delikat 5f4ad218a2 NES - start mapper 225 2012-07-20 21:48:16 +00:00
brandman211 610acf6ad6 -Made MVI@ and ADD@ follow the stack and immediate mode rules for incrementing / decrementing the SP / PC.
-Disabled Intellicart hook for ReadMemory, which seemed to be interfering.
-Implemented MVO@.
-Several instructions are now executed in succession until it hits the unimplemented "XORR R5, R5".

I should probably refactor Disassemble and Execute to label registers as source / destination to avoid further confusion at some point. My disassembly might have the source / destination registers flipped as well.
2012-07-20 07:22:41 +00:00
brandman211 b2323458ba Implemented / tested MVI@ and AND@.
-They both seem to work, but the operands for AND@ are both 0, so this seems fishy.
-I don't know for sure if AND@ executes cycles in the same way that MVI@ as the documentation isn't clear on this, but I assumed it did.

According to my disassembler, the first 5 instructions run on the Executive ROM are:

JSRD R5, $1026
MVI@ R7, R6
ADD@ R6, R1
JSR R5, $1A83
HLT

Considering that I hit a HLT, I figure something is going terribly wrong. Perhaps it has to do with my lack of an interrupt system?
2012-07-20 05:02:26 +00:00
adelikat 96e7d85122 NES - add mapper 61, chr mapping is off somehow 2012-07-20 03:52:14 +00:00
brandman211 ab8e98c41a -Finished the disassembler with the branches.
-Added bytesToAdvance assignments to the relevant opcodes I added yesterday.

TODO: Implement more stuff in Execute and use the Executive ROM as a test case.
2012-07-20 03:30:03 +00:00
zeromus dd504a4960 nes-fix mapper057 2012-07-20 03:19:19 +00:00
adelikat afbde96fe5 NES - fix some chr mapping logic in Mapper 57 2012-07-20 02:57:46 +00:00
andres.delikat 2e71b04de4 Start mapper 57 2012-07-19 18:30:39 +00:00
zeromus 3321c3e2c4 nes-fix mapper226 2012-07-19 18:20:32 +00:00
andres.delikat 77f4eeeac1 NES - implement mapper 58 2012-07-19 16:01:40 +00:00
andres.delikat a9323e0386 NES - Implement mapper 62 2012-07-19 15:51:41 +00:00
andres.delikat 8f95b611a5 BizHawk - implement mapper 201 2012-07-19 15:01:32 +00:00
andres.delikat c256e90a9d NES - add mapper 203, doesn't play the 35-1 properly, but it doesn't run in fceux as well, documentation may be off, or the ROM i used is bad (not a lot of info on good dumps for these types!) 2012-07-19 14:13:45 +00:00
brandman211 10274734f9 -My jumping seems to work, so I enabled it in Execute.
-Finished the disassembler except for branching.
-Merged the XXXI instructions with XXX@ for R7 as the address register as they are redundant.
2012-07-19 06:58:14 +00:00
adelikat 876007c502 NES - fixes to mapper 226 2012-07-19 02:56:43 +00:00
brandman211 e73c48219a -Loaded EROM / GROM.
-Fixed disassembly for JMP:
--Now it uses the parameter pc, not RegisterPC.
--I was loading both the second and third value from the second's address.
--Casting the calculated addresses to bytes when addresses are 16-bit was a bad idea.
--Removed a closing parenthesis I accidentally stuck in the formatting.

It seems that I've gotten far enough to use the Executive ROM as a test case! Now to go instruction by instruction and see if they work as planned and hope this will all eventually make something.
2012-07-19 00:05:08 +00:00
brandman211 198c60af88 -Refactored ReadMemory so that both the core and cart addresses are read.
--Afterwards, the data is reconciled, right now by chucking out the core value if the cart responded.
-WriteMemory now writes to both the core and the cart unconditionally.
--Each case now breaks out of the switch statement in case we want to do more complex things at the end of the function later on.
-All default paths in both functions now throw an exception.
2012-07-18 06:19:03 +00:00
brandman211 1ee1d03aea -Parsed / implemented fine addresses for the Intellicart.
-Implemented the final CRC check.

I didn't get around to implementing bank-switched ranges, but I don't think it's worth worrying about that right now considering that the Intellicart is not marked as readable at the initial PC, so something is either wrong or I need to implement more things before this will work. I think I'll put Intellicarts on hold and try to get a .int / .bin to run in the meantime.
2012-07-18 05:35:10 +00:00
adelikat 188716ab7b Start mapper 226 2012-07-18 04:22:41 +00:00
adelikat ecd3a2dd84 NES - add mapper 233 2012-07-18 04:08:37 +00:00
adelikat 803833d04a Fix Mapper 230 2012-07-18 03:00:52 +00:00
adelikat ea60a2c9f8 Mapper 60 - a more respectable bit logic implementation in ReadPRG 2012-07-17 23:58:53 +00:00
adelikat 2174e9938f Implement mapper 60 2012-07-17 23:52:55 +00:00
andres.delikat 8aea375f9f Mapper 230 - fix mirroring and some prg mapping 2012-07-17 23:05:58 +00:00
andres.delikat d939e66867 NES - Implement a SoftReset function into the board base, Mapper 230 - implement mode switching via soft reset, implement prg mode 0, game select screen now playable, games are not 2012-07-17 15:24:36 +00:00
andres.delikat fa449a5116 NES - add mapper 230, contra mode is working, still todo: implement mode toggling on soft reset 2012-07-17 14:02:56 +00:00
zeromus 5eaf27e510 nes-fix mapper 231 2012-07-17 06:24:36 +00:00
zeromus 309d6b4e64 nes-fix mapper 200 2012-07-17 06:19:03 +00:00
brandman211 0a3a392285 -Attempted to parse out memory attributes.
--In my test case, only a few segments were set to readable and nothing else was set. 0x1000, which is where the PC is initialized to, certainly isn't in a writable page.
--Although I've read that these memory attributes affect the Intellivision and not the Intellicart, I'm pretty sure this has to be implemented in the Intellicart so that my Read/WriteCart functions can choose to respond / not respond depending on these attributes. I very well could be wrong.
-Hooked Read/WriteCart into Read/WriteMemory.
-Implemented memory attributes into Read/WriteCart.
--TODO: Bank-switching.

TODO: Fine address table and memory attribute / fine address checksums.
2012-07-17 05:32:00 +00:00
brandman211 cd5458a5e4 Fixed CRC. Passes! 2012-07-17 04:16:11 +00:00
adelikat bbf5be7d74 NES - add mappers 200 & 231, PRG mapping isn't quite right on either but some games work 2012-07-17 04:06:48 +00:00
adelikat ee5db4cc06 Mapper 112 - Finish implementation of CHR mapping, and misc small cleanups 2012-07-17 02:01:53 +00:00
adelikat 69712a203d Remove compatibility.txt and replace with a link to the wiki page 2012-07-17 01:46:55 +00:00
adelikat 5df5def02d remove NES test status doc that is outdated and obsolete to this page: http://tasvideos.org/EmulatorResources/NESAccuracyTests.html 2012-07-17 01:06:38 +00:00
zeromus ecd58fc96e nes-protect from syncstates which dont call base.SyncState 2012-07-16 22:06:55 +00:00
zeromus 9c2a521c19 nes-fix m112 and some other unnecessary things 2012-07-16 22:01:10 +00:00
andres.delikat ad2e9267e3 NES - Mapper 112 - fix prg bank selection, however, game still fails to run 2012-07-16 21:12:01 +00:00
brandman211 21558eaf11 -Made ReadMemory and WriteMemory for the Intellicart Read/WriteCart and made them return nullable values instead of passing an out value.
-Started parsing data segments.
--CRC check fails. :(
-Added .bin and .rom to the Intellivision associated file extensions in the load ROM dialog.
2012-07-16 05:52:01 +00:00
zeromus cf5c972990 nes-try fixing m207 2012-07-16 03:04:44 +00:00
zeromus 06c44cf040 nes-add NES-JLROM for mr gimmick! (e) - but it doesnt work cos its pal 2012-07-16 02:59:54 +00:00
adelikat 2d89f5485f Implement Mapper 207, Fudou Myouou Den now playable but graphical issues. 2012-07-16 01:51:16 +00:00
adelikat 1751e615d7 Oops, update csproj file with new mapper files, update mapper compat list 2012-07-15 23:58:00 +00:00
adelikat c9128cc78e Start Mappers 154, 112 2012-07-15 23:12:52 +00:00
zeromus 3ae3a52f7a nes-do mapper088 differently 2012-07-15 22:30:25 +00:00
zeromus a33859fc1e nes-fix mapper 088 2012-07-15 22:22:57 +00:00
adelikat f62607dea9 Start mapper 88 2012-07-15 21:45:28 +00:00
brandman211 e82bae007a -Mapped .ROM to Intellivision.
--If a future system uses this extension, the condition:

Rom[0] == 0xA8 && Rom[1] == (0xFF ^ Rom[2])

...can verify if the file is in fact an IntelliCart, though I doubt this is a permanent solution to the more underlying problem.
2012-07-15 09:13:54 +00:00
brandman211 4f9539b73c -Made Executive ROM and Graphics ROM read-only. I still haven't made the memory map accessibility limited by the VBlank Period, but I'm assuming that should come way later.
-Initialized the memory devices with a tentative size that ignores the unofficial ranges.
-Masked addresses to match those sizes (That's my understanding of what the memory map needs to do based on other examples).
-Added the ICart interface.
-Started the Intellicart parser; got far enough to know that the files I'm working with are not Intellicarts. ^_^
2012-07-15 08:38:50 +00:00
beirich d24d3ae932 fix a dumb PAL bug. possibly for the second time. 2012-07-15 07:15:31 +00:00
zeromus a47c70d0ef nes-fix #12 "Strange "White noise" sound during 1943 (USA) intro" as well as a boatload of aesthetic improvements to make the sound output not so embarassing. no speedups whatsoever though. 2012-07-15 00:09:34 +00:00
zeromus 1f588c451f nes-add broken bisq apu. it probably wont be fixed. but its a lot of work, so there it is. also remove spam in SXROM 2012-07-14 18:43:37 +00:00
andres.delikat 0834c63a43 NES - sound config dialog for toggling sound channels 2012-07-12 23:13:22 +00:00
goyuken fd7a0b2fe7 change CoreOutputComm to use exact integers to specify VsyncRate. Helps for AV dumping with formats that require exact integer rates (AVI), and for emulators that aren't exactly 50hz/60hz (none yet). 2012-07-11 21:37:35 +00:00
brandman211 32baa013af -Made the memory map use ushort arrays because the Intellivision is 16-bit.
-Fixed JMP disassembly; I need to return on an invalid opcode because I was breaking out of the inner switch statement, not both that and the outer one.
2012-07-09 23:19:57 +00:00
brandman211 f3ce111c48 Checked in memory map...I need to stop programming and start sleeping. 2012-07-09 19:41:49 +00:00
brandman211 104511c5b7 -Intellivision.cs' constructor initializes the PC to 0x1000.
-Set up the "official" memory map - see http://wiki.intellivision.us/index.php?title=Memory_Map
--Things I didn't do:
---Accessibility.
---Additional Occupied Memory Ranges.
---Addresses Available to Cartridges
---Initialize any of the byte arrays.
--Not sure which of these I need to do, but clearly the byte arrays have to be initialized somewhere to something and there's a lot of gaps in this memory map.
2012-07-09 05:29:45 +00:00
brandman211 9b8a9d93f1 Opcodes up to 0x07F. 2012-07-09 03:27:27 +00:00
brandman211 bb532aa2d9 Opcodes up to 0x5F. 2012-07-08 21:49:09 +00:00
brandman211 61cada6190 -Made HLT throw an exception.
-Made all instructions in the executor, even implemented ones, throw exceptions. I will get rid of the exceptions as I test the instructions.
-Added instructions up to and including 0x57 to disassembly and executor.
2012-07-08 19:52:12 +00:00
brandman211 a4912e66c0 -Wasn't supposed to actually increment the PC in the disassembler.
-Cleaned up the 0x004 (Jump) disassembler.
-Implemented 0x004 in the executor.
2012-07-08 08:42:32 +00:00
brandman211 778274a12d -Set up the disassembly decoder just like the executor.
-Disassembled opcodes up to and including 0x7.
2012-07-08 08:17:07 +00:00
beirich 36ba018ae0 basic wire-up of Intellivision core 2012-07-08 04:20:53 +00:00
brandman211 8d254113c2 Finished the opcode decoder. Over a thousand lines in one day...now just to make them do stuff! 2012-07-08 03:53:12 +00:00
brandman211 1c480c98b4 -Created functions for calculating the flags.
-Implemented ADCR.
-Decoded all opcodes up to 0x23F.

TODO: Try vecna's idea of testing the instructions by running a game and implementing instructions as I need them...but first I'll need to implement loading of an Intellivision game.
2012-07-08 01:58:06 +00:00
brandman211 2457c68ed7 Starting IntelliHawk with the CP1610, using the other processors in BizHawk, BlissJ, and this (http://wiki.intellivision.us/index.php?title=CP1610) page as references.
-Definitions.
--Registers, Flags, TotalExecutedCycles, PendingCycles, ReadMemory, and WriteMemory.
-Execute.
--Implemented opcodes 0x001-0x027 with the exception of 0x004 and 0x005.
2012-07-08 00:36:16 +00:00
adelikat 60640acece NES - Implement Mapper 246 2012-07-06 03:44:34 +00:00
zeromus 1eda5f6d63 nes-express m193 differently, maybe more clearly 2012-07-06 03:12:20 +00:00
zeromus 157c145a46 nes-fix m193 2012-07-06 02:29:42 +00:00
adelikat 7a9d037fed NES - Progress on Mapper 193 2012-07-06 01:36:19 +00:00
zeromus 1d254c3705 nes-fiddle around with board irq signal tracking system. break every NES savestate. fix a desync bug in a bunch of mappers 2012-06-25 06:32:54 +00:00
beirich b599c69c18 Add VirtualWidth to IVideoProvider and the (numerous) implementations. This is just phase 1, client needs to be updated to utilize this information, and some cores (especially PCE) should be updated in a more involved way to provide better TV emulation. 2012-06-25 02:50:34 +00:00
zeromus 7e8752a5b9 nes-sort out some bus conflict flags for CNROM games to fix colorful dragon (unl) (sachen) 2012-06-24 17:39:12 +00:00
zeromus 5b356c5157 nes-support mapper 178 and fix a regression from yesterday that made most roms not loadable 2012-06-23 18:30:27 +00:00
adelikat dcdd98fc03 Fix mapper 116 code so that project compiles 2012-06-23 15:45:58 +00:00
zeromus 50d4564e0e nes-support mapper 116 2012-06-23 08:52:12 +00:00