notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5275d43
)
z80, fix cz80 CPU reset (most regs not touched by reset)
author
kub
<derkub@gmail.com>
Wed, 23 Jun 2021 17:13:54 +0000
(19:13 +0200)
committer
kub
<derkub@gmail.com>
Wed, 23 Jun 2021 17:13:54 +0000
(19:13 +0200)
cpu/cz80/cz80.c
patch
|
blob
|
blame
|
history
diff --git
a/cpu/cz80/cz80.c
b/cpu/cz80/cz80.c
index
7f432bd
..
82de13f
100644
(file)
--- a/
cpu/cz80/cz80.c
+++ b/
cpu/cz80/cz80.c
@@
-211,7
+211,8
@@
void Cz80_Init(cz80_struc *CPU)
\r
void Cz80_Reset(cz80_struc *CPU)
\r
{
\r
- memset(CPU, 0, (FPTR)&CPU->BasePC - (FPTR)CPU);
\r
+ // I, R, CPU and interrupts logic is reset, registers are untouched
\r
+ memset(&CPU->R, 0, (FPTR)&CPU->BasePC - (FPTR)&CPU->R);
\r
Cz80_Set_Reg(CPU, CZ80_PC, 0);
\r
}
\r
\r