Merge pull request #5636 from MoochMcGee/master

Fix M6502 reset procedure. Fixes MT6486 at the very least. [Melissa G…
This commit is contained in:
R. Belmont 2019-09-14 22:39:54 -04:00 committed by GitHub
commit 9def59d2ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,7 @@ void m6502_device::init()
X = 0x80;
Y = 0x00;
P = 0x36;
SP = 0x01bd;
SP = 0x0100;
TMP = 0x0000;
TMP2 = 0x00;
IR = 0x00;

View File

@ -1218,6 +1218,9 @@ tya_imp
# exceptions
reset
read_arg(SP); SP = 0x1ff;
read_arg(SP); SP--;
read_arg(SP); SP--;
P |= F_I; PC = read_arg(0xfffc);
PC = set_h(PC, read_arg(0xfffd));
prefetch();