Commit Graph

767 Commits

Author SHA1 Message Date
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