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 consisting of a resettable down counter located in the [[NEO-B1]] chip, that resets the system if it underflows. It can be disabled by putting pin {{Sig|DOGE|DOGE}} to ground.
The watchdog is an anti lock-up/protection feature consisting of a resettable counter (what size ?) located in the [[NEO-B1]] chip, that resets the system if it underflows. It can be disabled by putting pin {{Sig|DOGE|DOGE}} to ground.


It must be therefor "kicked" regularly to reset the counter to its highest value. This is done by writing any byte to any odd addresses in the $300000~$31FFFF range. Register {{Reg|REG_DIPSW}} is the most often used. [[68k interrupts|VBlank]] routines often take care of this task.
It must be therefor "kicked" regularly to reset the counter. This is done by writing any byte to any odd addresses in the $300000~$31FFFF range. Register {{Reg|REG_DIPSW}} is the most often used. [[68k interrupts|VBlank]] routines often take care of this task, but care has to be taken to do it regularly when the interrupt is disabled.


A constantly resetting system produces a typical clicking sound, giving a clue for solving boot issues. (Sound file ?)
A constantly resetting system produces a typical clicking sound, giving a clue for solving boot issues. (Sound file ?)


Watchdog can be disabled by shorting J2 jumper.
The watchdog can be disabled by shorting the J2 jumper on some systems.


The NeoGeo CD 2 also has a watchdog timer ?
The NeoGeo CD 2 also has a watchdog timer ?
Line 15: Line 15:
Newer games force a reset using the following code (from KOF99):
Newer games force a reset using the following code (from KOF99):
<syntaxhighlight>
<syntaxhighlight>
(Disable interrupts)
MOVE.L  #$30D40,D0
MOVE.L  #$30D40,D0
SUBQ.L  #1,D0
SUBQ.L  #1,D0
Line 20: Line 21:
</syntaxhighlight>
</syntaxhighlight>


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.
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:Base system]]
[[Category:Base system]]

Revision as of 19:10, 26 January 2013

The watchdog is an anti lock-up/protection feature consisting of a resettable counter (what size ?) located in the NEO-B1 chip, that resets the system if it underflows. It can be disabled by putting pin DOGE to ground.

It must be therefor "kicked" regularly to reset the counter. This is done by writing any byte to any odd addresses in the $300000~$31FFFF range. Register REG_DIPSW is the most often used. VBlank routines often take care of this task, but care has to be taken to do it regularly when the interrupt is disabled.

A constantly resetting system produces a typical clicking sound, giving a clue for solving boot issues. (Sound file ?)

The watchdog can be disabled by shorting the J2 jumper on some systems.

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):

(Disable interrupts)
MOVE.L   #$30D40,D0
SUBQ.L   #1,D0
BCC.S    *-0x2

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.