diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index 9c48789101d..de5cb0f72c8 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -1215,6 +1215,8 @@ void n64_periphs::pi_dma_tick() UINT32 cart_addr = (pi_cart_addr & 0x0fffffff) >> 1; UINT32 dram_addr = (pi_dram_addr & 0x007fffff) >> 1; + cart_addr &= ((machine().region("user2")->bytes() >> 1) - 1); + if(pi_dma_dir == 1) { UINT32 dma_length = pi_wr_len + 1; diff --git a/src/mame/video/n64.c b/src/mame/video/n64.c index 08668350816..d3771aae566 100644 --- a/src/mame/video/n64.c +++ b/src/mame/video/n64.c @@ -118,6 +118,11 @@ void Processor::VideoUpdate16(n64_periphs *n64, bitmap_rgb32 &bitmap) hres = 640; } + if (vres > bitmap.height()) // makes Perfect Dark boot w/o crashing + { + vres = bitmap.height(); + } + UINT32 pixels = 0; if (frame_buffer)