summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/drcuml.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-12 06:11:15 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-12 06:11:15 +0000
commitb400e7978bb626a14196fae7b45bb89dfeeae249 (patch)
tree454f1b103d0f8e80e719dbf37251b2304c07a91e /src/emu/cpu/drcuml.c
parent9dc496610928a3adee6c2d46f954634fcb83063a (diff)
From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Thursday, December 11, 2008 6:52 PM To: submit@mamedev.org Cc: atariace@hotmail.com Subject: [patch] deprecat.h cpu cleanup Hi mamedev, This patch purges the last few uses of deprecat.h from the cpu cores, plus a handful of other Machine cases elsewhere that were found by script inspection. ~aa -- Hi mamedev, This patch eliminates most uses of deprecat.h in the sound cores by attaching the device to the state object and using it where appropriate. Given that all the cpu objects use this convention, and three sound cores already do this, this seemed an appropriate approach. ~aa
Diffstat (limited to 'src/emu/cpu/drcuml.c')
-rw-r--r--src/emu/cpu/drcuml.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/emu/cpu/drcuml.c b/src/emu/cpu/drcuml.c
index 272d58de4b5..e114103c097 100644
--- a/src/emu/cpu/drcuml.c
+++ b/src/emu/cpu/drcuml.c
@@ -38,7 +38,6 @@
#include "drcuml.h"
#include "drcumlsh.h"
-#include "deprecat.h"
#include "eminline.h"
#include "mame.h"
#include <stdarg.h>
@@ -323,7 +322,7 @@ static void validate_backend(drcuml_state *drcuml);
static void bevalidate_iterate_over_params(drcuml_state *drcuml, drcuml_codehandle **handles, const bevalidate_test *test, drcuml_parameter *paramlist, int pnum);
static void bevalidate_iterate_over_flags(drcuml_state *drcuml, drcuml_codehandle **handles, const bevalidate_test *test, drcuml_parameter *paramlist);
static void bevalidate_execute(drcuml_state *drcuml, drcuml_codehandle **handles, const bevalidate_test *test, const drcuml_parameter *paramlist, UINT8 flagmask);
-static void bevalidate_initialize_random_state(drcuml_block *block, drcuml_machine_state *state);
+static void bevalidate_initialize_random_state(drcuml_state *drcuml, drcuml_block *block, drcuml_machine_state *state);
static int bevalidate_populate_state(drcuml_block *block, drcuml_machine_state *state, const bevalidate_test *test, const drcuml_parameter *paramlist, drcuml_parameter *params, UINT64 *parammem);
static int bevalidate_verify_state(drcuml_state *drcuml, const drcuml_machine_state *istate, drcuml_machine_state *state, const bevalidate_test *test, UINT32 flags, const drcuml_parameter *params, const drcuml_instruction *testinst, drccodeptr codestart, drccodeptr codeend, UINT8 flagmask);
@@ -2188,7 +2187,7 @@ static void bevalidate_execute(drcuml_state *drcuml, drcuml_codehandle **handles
UML_HANDLE(block, handles[0]);
/* set up a random initial state */
- bevalidate_initialize_random_state(block, &istate);
+ bevalidate_initialize_random_state(drcuml, block, &istate);
/* then populate the state with the parameters */
numparams = bevalidate_populate_state(block, &istate, test, paramlist, params, parammem);
@@ -2243,32 +2242,33 @@ static void bevalidate_execute(drcuml_state *drcuml, drcuml_codehandle **handles
initialize the machine state to randomness
-------------------------------------------------*/
-static void bevalidate_initialize_random_state(drcuml_block *block, drcuml_machine_state *state)
+static void bevalidate_initialize_random_state(drcuml_state *drcuml, drcuml_block *block, drcuml_machine_state *state)
{
+ running_machine *machine = drcuml->device->machine;
int regnum;
/* initialize core state to random values */
- state->fmod = mame_rand(Machine) & 0x03;
- state->flags = mame_rand(Machine) & 0x1f;
- state->exp = mame_rand(Machine);
+ state->fmod = mame_rand(machine) & 0x03;
+ state->flags = mame_rand(machine) & 0x1f;
+ state->exp = mame_rand(machine);
/* initialize integer registers to random values */
for (regnum = 0; regnum < ARRAY_LENGTH(state->r); regnum++)
{
- state->r[regnum].w.h = mame_rand(Machine);
- state->r[regnum].w.l = mame_rand(Machine);
+ state->r[regnum].w.h = mame_rand(machine);
+ state->r[regnum].w.l = mame_rand(machine);
}
/* initialize float registers to random values */
for (regnum = 0; regnum < ARRAY_LENGTH(state->f); regnum++)
{
- *(UINT32 *)&state->f[regnum].s.h = mame_rand(Machine);
- *(UINT32 *)&state->f[regnum].s.l = mame_rand(Machine);
+ *(UINT32 *)&state->f[regnum].s.h = mame_rand(machine);
+ *(UINT32 *)&state->f[regnum].s.l = mame_rand(machine);
}
/* initialize map variables to random values */
for (regnum = 0; regnum < DRCUML_MAPVAR_END - DRCUML_MAPVAR_M0; regnum++)
- UML_MAPVAR(block, MVAR(regnum), mame_rand(Machine));
+ UML_MAPVAR(block, MVAR(regnum), mame_rand(machine));
}