mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-01-02 04:31:49 +00:00
Do not reset cycle counter on cpu reset
This commit is contained in:
parent
e833d71fad
commit
d45b39b180
@ -44,8 +44,6 @@ func (k *sdlKeyboard) putKey(keyEvent *sdl.KeyboardEvent) {
|
|||||||
10 A=PEEK(49152)
|
10 A=PEEK(49152)
|
||||||
20 PRINT A, A - 128
|
20 PRINT A, A - 128
|
||||||
30 GOTO 10
|
30 GOTO 10
|
||||||
|
|
||||||
Missing Reset button
|
|
||||||
*/
|
*/
|
||||||
if keyEvent.Type != sdl.KEYDOWN {
|
if keyEvent.Type != sdl.KEYDOWN {
|
||||||
// Process only key pushes
|
// Process only key pushes
|
||||||
|
@ -72,10 +72,10 @@ func (s *State) ExecuteInstruction() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset resets the processor state. Moves the program counter to the vector in 0cfffc.
|
// Reset resets the processor. Moves the program counter to the vector in 0cfffc.
|
||||||
func (s *State) Reset() {
|
func (s *State) Reset() {
|
||||||
startAddress := getWord(s.mem, vectorReset)
|
startAddress := getWord(s.mem, vectorReset)
|
||||||
s.cycles = 0
|
s.cycles += 6
|
||||||
s.reg.setPC(startAddress)
|
s.reg.setPC(startAddress)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user