Go to file
Aaron Giles 9b63c42203 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] .data removals to fix reset/multisession bugs

Hi mamedev,

One nice artifact of properly constifying data structures in MAME is
that it makes it relatively easy to spot a class of reset/multisession
bugs, namely that almost any object in .data is probably in error.
Unless the value is properly initialized in a reset routine the
initial non-zero value can't be relied upon, so there's no need to
have a non-zero value to begin with.

With that in mind, here's a patch to move more items out of .data by
either applying const, removing the non-zero initializer (if its
overwritten by init/reset) or by adding appropriate initialization
code.  In most cases I tried to add initialization code to a reset
routine, but in some cases I chose an init routine, possibly leaving a
reset bug intact.

Some interesting bits:
1.  tms9900 core.  The use of .data to initialize the irq_level wasn't
correct in some cases as the layout of the structure was core
dependent.
2.  bfcobra.c.  By introducing a VIDEO_START routine a hack in
VIDEO_UPDATE could be removed.

~aa
2008-07-24 06:18:01 +00:00
docs Update docs a bit. Turn off debugger by default. 2008-06-26 16:51:19 +00:00
src From: Atari Ace [mailto:atari_ace@verizon.net] 2008-07-24 06:18:01 +00:00
.gitattributes Missed file from last checkin. 2008-07-24 03:49:38 +00:00
makefile Removed DEBUGGER flag from makefile and ENABLE_DEBUGGER 2008-06-26 14:51:23 +00:00