1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus - reset.c *
3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4 * Copyright (C) 2011 CasualJames *
5 * Copyright (C) 2008-2009 Richard Goedeken *
6 * Copyright (C) 2008 Ebenblues Nmn Okaygo Tillin9 *
7 * Hard reset based on code by hacktarux. *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
14 * This program is distributed in the hope that it will be useful, *
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17 * GNU General Public License for more details. *
19 * You should have received a copy of the GNU General Public License *
20 * along with this program; if not, write to the *
21 * Free Software Foundation, Inc., *
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
23 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
25 #include "r4300/reset.h"
26 #include "r4300/r4300.h"
27 #include "r4300/interupt.h"
28 #include "memory/memory.h"
30 int reset_hard_job = 0;
37 last_addr = 0xa4000040;
38 next_interupt = 624999;
40 if(r4300emu != CORE_PURE_INTERPRETER)
43 * The following code *should* work and avoid free_blocks() and init_blocks(),
44 * but it doesn't unless the last line is added (which causes a memory leak).
46 for (i=0; i<0x100000; i++)
48 blocks[0xa4000000>>12]->block = NULL; */
52 generic_jump_to(last_addr);
57 add_interupt_event(HW2_INT, 0); /* Hardware 2 Interrupt immediately */
58 add_interupt_event(NMI_INT, 50000000); /* Non maskable Interrupt after 1/2 second */