mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
![]() 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 |
||
---|---|---|
docs | ||
src | ||
.gitattributes | ||
makefile |