summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/superqix.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-19 19:40:22 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-19 19:40:22 +0000
commitf36fc8641eb9e45c79bc3051d06c2887e82a562f (patch)
tree52f420821fac5adf6df506b8baa9764fab6a6648 /src/mame/drivers/superqix.c
parent42c9aeff3943f2e6779d3d125fc014cd96d16d71 (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/mame/drivers/superqix.c')
-rw-r--r--src/mame/drivers/superqix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/superqix.c b/src/mame/drivers/superqix.c
index 466c85f1ca1..0b9688ecbef 100644
--- a/src/mame/drivers/superqix.c
+++ b/src/mame/drivers/superqix.c
@@ -243,7 +243,7 @@ static WRITE8_HANDLER( mcu_p1_w )
coin_lockout_global_w((data & 1) ^ invert_coin_lockout);
break;
case 4:
- flip_screen_set(data & 1);
+ flip_screen_set(space->machine, data & 1);
break;
case 5:
port1 = data;
@@ -305,7 +305,7 @@ static READ8_HANDLER( bootleg_in0_r )
static WRITE8_HANDLER( bootleg_flipscreen_w )
{
- flip_screen_set(~data & 1);
+ flip_screen_set(space->machine, ~data & 1);
}