Watchdog: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
The watchdog is an anti lock-up/protection feature: A resettable down counter located in the [[NEO-B1]] chip resets the system if it underflows.
The watchdog is an anti lock-up/protection feature: A resettable down counter located in the [[NEO-B1]] chip resets the system if it underflows.


It must be therefor "kicked" regularly to reset the counter to its highest value, this is done by writing any byte to register REG_DIPSW ($300001).
It must be therefor "kicked" regularly to reset the counter to its highest value, this is done by writing any byte to register '''REG_DIPSW''' ($300001).
[[68k interrupts|VBlank]] routines often take care of this task.
[[68k interrupts|VBlank]] routines often take care of this task.


Constantly resetting systems produce a typical clicking sound ([[YM3016]] resetting ?), giving a clue for solving boot issues.
Constantly resetting systems produce a typical clicking sound, giving a clue for solving boot issues. (Sound file ?)


The NeoGeo CD 2 has a watchdog timer.
The NeoGeo CD 2 also has a watchdog timer.


(Sound file ?)
Informations from [[MESS]]'s source:
 
The watchdog timer will reset the system after ~0.13 seconds (Clocked by what signal ?).
 
Newer games force a reset using the following code (from KOF99):
<pre>
MOVE.L  #0x30D40,D0
SUBQ.L  #1,D0
BCC.S    *-0x2 [0x9CE0]
</pre>
 
The watchdog is used as a form of protecetion on a number of games, previously this was implemented as a specific hack which locked a single address of [[Battery-backed RAM|SRAM]]. If the game doesn't find valid data in the backup ram it will initialize it, then sit in a loop.  The watchdog should then reset the system.  If the watchdog fails to reset the system the code will continue and set a value in backup ram to indiate that the protection check has failed.


[[Category:Code]]
[[Category:Code]]
[[Category:CPUs]]
[[Category:CPUs]]

Revision as of 20:28, 8 March 2011

The watchdog is an anti lock-up/protection feature: A resettable down counter located in the NEO-B1 chip resets the system if it underflows.

It must be therefor "kicked" regularly to reset the counter to its highest value, this is done by writing any byte to register REG_DIPSW ($300001). VBlank routines often take care of this task.

Constantly resetting systems produce a typical clicking sound, giving a clue for solving boot issues. (Sound file ?)

The NeoGeo CD 2 also has a watchdog timer.

Informations from MESS's source:

The watchdog timer will reset the system after ~0.13 seconds (Clocked by what signal ?).

Newer games force a reset using the following code (from KOF99):

MOVE.L   #0x30D40,D0
SUBQ.L   #1,D0
BCC.S    *-0x2 [0x9CE0]

The watchdog is used as a form of protecetion on a number of games, previously this was implemented as a specific hack which locked a single address of SRAM. If the game doesn't find valid data in the backup ram it will initialize it, then sit in a loop. The watchdog should then reset the system. If the watchdog fails to reset the system the code will continue and set a value in backup ram to indiate that the protection check has failed.