Commit graph

36 commits

Author SHA1 Message Date
Jason Benaim
72c778c3bf Fix segfault when DMAing past the end of cart ROM.
When a game triggers a DMA from the cart ROM area to RDRAM, part or all of the
DMA'd area is not covered by the currently-loaded ROM, cen64 treats it as a
series of reads from open-bus. A bug in the code that handles this case was
causing segfaults.
Hat-tip to cen64 user Grim who provided a test rom that triggered this bug. His
test ROM was less than (1 MB + 4 KB) in size, which was causing the initial 1MB
DMA to trigger this bug.
2018-05-23 23:23:45 -04:00
Mike Ryan
8d0e7bb627 pi: add support for IS Viewer 64
When -is-viewer is passed on the command line, create an IS Viewer
object that intercepts writes at 0x13FF0000. This is used by Ocarina of
Time Master Quest Debug to log debug messages.

The messages are encoded in EUC-JP, so we bring in iconv to convert that
to UTF-8 so the messages can be printed to modern consoles.

Props to jrra (@jkbenaim) and spinout for reverse engineering the
interface and documenting it: http://wiki.spinout182.com/w/IS64
2017-02-28 19:55:55 -08:00
Tyler J. Stachecki
3900be4776 bus: Perform open bus reads for unmapped addresses.
Fixes F-Zero X (cartridge version).
2016-07-17 20:47:07 -04:00
Tyler J. Stachecki
3288229a50 Start fixing MSVC builds.
Conflicts:
	rdp/n64video.c
2016-06-26 17:19:17 -04:00
Mike Ryan
73f4420a4c fix all build warnings, does not affect functionality 2016-06-16 20:40:51 -07:00
Tyler J. Stachecki
bb41f7208e Implement mapped SRAM accesses. 2016-03-20 15:18:17 -04:00
Tyler J. Stachecki
e0c3fdd47f Fix PI/DD bugs that broke some carts.
Readjust PI DMA delay timing slightly (until we get some
more accurate timing information or simulation to replace
it altogether).
2016-01-30 19:39:10 -05:00
Mike Ryan
4fc80b7e8b dd: functional N64 DD implementation
Does not handle disk writes. Expect disks in MAME format.
2016-01-30 16:28:00 -05:00
Mike Ryan
71f405ea40 pi: adjust DMA delay to work with 64dd 2016-01-30 16:27:45 -05:00
Mike Ryan
a0840f1e04 pi: return 0 for mapped read of non-present cart 2016-01-30 16:27:41 -05:00
Tyler J. Stachecki
e2e72821e2 Try to reduce component cycle overheads.
Oftentimes, many of our countrollers are just doing a
simple countdown and don't perform any real work for the
cycle. Pull those parts out into headers so that the
compiler can 'see' that and optimize accordingly.
2016-01-30 14:58:31 -05:00
Tyler J. Stachecki
63b2709dc0 Bad implementation of PI delay. 2016-01-30 14:58:31 -05:00
Mike Ryan
683fcc39a0 flashram: do not segfault on writes if FlashRAM is not present 2016-01-28 00:42:35 -05:00
Mike Ryan
e48d982023 flashram: implement FlashRAM in PI, with mapped reads 2016-01-25 20:09:46 -08:00
Mike Ryan
782b8cb826 flashram: take command line option and pass into PI 2016-01-25 20:09:46 -08:00
Mike Ryan
b07994687f sram: do not memcpy to NULL buffer 2016-01-24 14:20:27 -08:00
Mike Ryan
21d588c6ed sram: copy data between RDRAM and SRAM 2016-01-24 14:18:18 -08:00
Mike Ryan
3ba39b536d sram: load on command line and stuff into PI 2016-01-24 14:18:18 -08:00
Mike Ryan
4e8f3d3406 pi: correct memory ranges for SRAM and DD modem 2016-01-24 14:18:18 -08:00
Derek "Turtle" Roe
8b89df2fdc See long description
Replaced all references to simulation with emulation
Updated copyright year
Updated .gitignore to reduce chances of random files being uploaded to
the repo
Added .gitattributes to normalize all text files, and to ignore binary
files (which includes the logo and the NEC PDF)
2015-07-01 18:44:21 -05:00
Tyler Stachecki
28d4b7e122 Give DDIPL a lower priority than carts. 2015-01-17 11:51:29 -05:00
Tyler Stachecki
e073637d33 Add some temporary hacks to the PI and UB fixes. 2015-01-13 18:01:49 -05:00
Tyler Stachecki
3e299ed764 Allow PI DMAs past 32MiB cart range. 2015-01-09 12:23:39 -05:00
Tyler Stachecki
67fca6c47f Add -ddrom to the command line. 2015-01-08 12:17:17 -05:00
Tyler Stachecki
10fc81d7a3 Start filling in lots of 64DD implementation.
Also, fix a few bugs in the past two commits.
2015-01-06 22:21:00 -05:00
Tyler Stachecki
fd74a5eb55 Update README and prepare for GitHub push. 2015-01-01 15:01:46 -05:00
Tyler Stachecki
e89f054674 Optimize extremely aggressively.
Tell GCC to optimize cold functions for size and stash them away in
a separate part of the binary. Put the simulate core, meanwhile, on
the hot path. Also, bump optimization to -O3 as we can now "afford"
to do so.
2014-11-05 08:39:47 -05:00
Tyler Stachecki
e6bc8ebe64 Add more TLB support, verify things. 2014-08-23 20:06:45 -04:00
Tyler Stachecki
8d7afe3d4c Do a better job of emulating the PI. 2014-07-13 21:22:36 -04:00
Tyler Stachecki
454033499d Start integrating OpenGL (GLFW) and friends. 2014-04-19 17:14:45 -04:00
Tyler Stachecki
b951f9ccf5 Start integrating interrupt support. 2014-04-18 22:59:48 -04:00
Tyler Stachecki
9127d539f8 Add support for PI DMAs, correctly initialize RDRAM. 2014-04-18 21:15:38 -04:00
Tyler Stachecki
3a126249c9 Allow PI to perform cartridge ROM reads. 2014-04-18 17:18:12 -04:00
Tyler Stachecki
25a6ae8431 Mask bus writes to requested type, etc. 2014-04-18 13:34:23 -04:00
Tyler Stachecki
d114038a2b Add option for debugging MMIO register access. 2014-04-18 12:44:57 -04:00
Tyler Stachecki
4560adf7a7 Populate with interfaces and devices. 2014-04-18 11:24:43 -04:00