mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
z80, fix cz80 CPU reset (most regs not touched by reset)
This commit is contained in:
parent
5275d43aaa
commit
ca8b001b7f
1 changed files with 2 additions and 1 deletions
|
@ -211,7 +211,8 @@ void Cz80_Init(cz80_struc *CPU)
|
|||
|
||||
void Cz80_Reset(cz80_struc *CPU)
|
||||
{
|
||||
memset(CPU, 0, (FPTR)&CPU->BasePC - (FPTR)CPU);
|
||||
// I, R, CPU and interrupts logic is reset, registers are untouched
|
||||
memset(&CPU->R, 0, (FPTR)&CPU->BasePC - (FPTR)&CPU->R);
|
||||
Cz80_Set_Reg(CPU, CZ80_PC, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue