diff options
author | 2008-12-19 19:40:22 +0000 | |
---|---|---|
committer | 2008-12-19 19:40:22 +0000 | |
commit | f36fc8641eb9e45c79bc3051d06c2887e82a562f (patch) | |
tree | 52f420821fac5adf6df506b8baa9764fab6a6648 /src/emu/cpu/v30mz | |
parent | 42c9aeff3943f2e6779d3d125fc014cd96d16d71 (diff) |
This update is the below two patches, plus the remaining changes
necessary to remove 12 of the final 14 references to the global
Machine. The remaining 2 are in fatalerror() and logerror(), which
are both local to mame.c, so Machine is now fully static.
--
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Thursday, December 18, 2008 5:47 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Make Machine static followup
Hi mamedev,
This incremental patch to my last patch undoes the change that caches
the ppu2c0x videorom. I changed the code back to how it behaved
originally, using an existing machine on the chip struct to eliminate
the one troublesome Machine reference.
~aa
--
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Thursday, December 18, 2008 2:54 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Make Machine static!
Hi mamedev,
This large patch completes the removal of the use of Machine
throughout MAME. It does so primarily by adding machine, device or
space to various apis and modifying the callers, but for some
remaining cases it adds a new api, mame_get_running_machine(), which
will be called instead. There are only 14 uses of this api currently,
and that number should drop over time.
There are a few changes of note:
1. 6821pia.c. I attached machine to the 'device' structure. I'm
working on converting this to a proper device, but that change isn't
ready.
2. fddebug.c. I added a proper header so that the apis won't get
accidentally converted to static again.
3. scsi.c. I added a machine to SCSIInstance.
4. system16.c. I modified sys16_patch_code to take an array of
patches.
4. custom.h. I added the owning sound device to the reset/stop
routines as well as the token. Note that passing only the device
would require exposing the internals of custom_sound, as the token
passed is not the device token, but the token returned from the
CUSTOM_START routine. Better ideas here are welcome.
4. ppc2c0x.c. To avoid changing more interfaces, the init routine
saves the videorom location rather than looks it up each time.
I tried to choose what I felt was the natural parameter for an api,
rather than always pass machine, but in some cases I used machine to
limit the number of additional changes. Some additional cleanup here
is probably warranted, I'll look into that later once I'm recovered
from this two-week project.
~aa
Diffstat (limited to 'src/emu/cpu/v30mz')
0 files changed, 0 insertions, 0 deletions