summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-02-01 18:37:59 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-02-01 18:38:08 -0500
commit1464dc5111e570b61aac7d18e386378380394a8f (patch)
tree91522554867a2e1cbb5719c0944065c94e2772b8
parentb4bc32f938277b40e609895bd098548a4df0d7cb (diff)
machine/xbox.cpp: Clean up some unnecessary machine-relative accesses (nw)
-rw-r--r--src/mame/includes/xbox.h6
-rw-r--r--src/mame/machine/xbox.cpp28
2 files changed, 17 insertions, 17 deletions
diff --git a/src/mame/includes/xbox.h b/src/mame/includes/xbox.h
index 50d1aeac3e5..047fb82e0f2 100644
--- a/src/mame/includes/xbox.h
+++ b/src/mame/includes/xbox.h
@@ -90,9 +90,9 @@ private:
void vprogdis_command(int ref, const std::vector<std::string> &params);
void help_command(int ref, const std::vector<std::string> &params);
void xbox_debug_commands(int ref, const std::vector<std::string> &params);
- int find_bios_index(running_machine &mach);
- bool find_bios_hash(running_machine &mach, int bios, uint32_t &crc32);
- void find_debug_params(running_machine &mach);
+ int find_bios_index();
+ bool find_bios_hash(int bios, uint32_t &crc32);
+ void find_debug_params();
};
ADDRESS_MAP_EXTERN(xbox_base_map, 32);
diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp
index f75437d15d9..96b9eac091e 100644
--- a/src/mame/machine/xbox.cpp
+++ b/src/mame/machine/xbox.cpp
@@ -19,16 +19,16 @@ const xbox_base_state::debugger_constants xbox_base_state::debugp[] = {
{ 0x49d8055a, {0x8003aae0, 0x5c, 0x1c, 0x28, 0x210, 8, 0x28, 0x1c} }
};
-int xbox_base_state::find_bios_index(running_machine &mach)
+int xbox_base_state::find_bios_index()
{
- u8 sb = mach.driver_data()->system_bios();
+ u8 sb = system_bios();
return sb;
}
-bool xbox_base_state::find_bios_hash(running_machine &mach, int bios, uint32_t &crc32)
+bool xbox_base_state::find_bios_hash(int bios, uint32_t &crc32)
{
uint32_t crc = 0;
- const std::vector<rom_entry> &rev = mach.root_device().rom_region_vector();
+ const std::vector<rom_entry> &rev = rom_region_vector();
for (rom_entry const &re : rev)
{
@@ -49,14 +49,14 @@ bool xbox_base_state::find_bios_hash(running_machine &mach, int bios, uint32_t &
return false;
}
-void xbox_base_state::find_debug_params(running_machine &mach)
+void xbox_base_state::find_debug_params()
{
uint32_t crc;
int sb;
- sb = (int)find_bios_index(machine());
+ sb = (int)find_bios_index();
debugc_bios = debugp;
- if (find_bios_hash(machine(), sb - 1, crc) == true)
+ if (find_bios_hash(sb - 1, crc) == true)
{
for (int n = 0; n < 2; n++)
if (debugp[n].id == crc)
@@ -773,8 +773,8 @@ WRITE8_MEMBER(xbox_base_state::superiors232_write)
void xbox_base_state::machine_start()
{
- find_debug_params(machine());
- nvidia_nv2a = machine().device<nv2a_gpu_device>(":pci:1e.0:00.0")->debug_get_renderer();
+ find_debug_params();
+ nvidia_nv2a = subdevice<nv2a_gpu_device>("pci:1e.0:00.0")->debug_get_renderer();
memset(pic16lc_buffer, 0, sizeof(pic16lc_buffer));
pic16lc_buffer[0] = 'B';
pic16lc_buffer[4] = 0; // A/V connector, 0=scart 2=vga 4=svideo 7=none
@@ -783,7 +783,7 @@ void xbox_base_state::machine_start()
pic16lc_buffer[0x1d] = 0x0d;
pic16lc_buffer[0x1e] = 0x0e;
pic16lc_buffer[0x1f] = 0x0f;
- mcpx_smbus_device *smbus = machine().device<mcpx_smbus_device>(":pci:01.1");
+ mcpx_smbus_device *smbus = subdevice<mcpx_smbus_device>("pci:01.1");
smbus->register_device(0x10,
[&](int command, int rw, int data)
{
@@ -802,15 +802,15 @@ void xbox_base_state::machine_start()
return smbus_eeprom(command, rw, data);
}
);
- xbox_base_devs.pic8259_1 = machine().device<pic8259_device>("pic8259_1");
- xbox_base_devs.pic8259_2 = machine().device<pic8259_device>("pic8259_2");
- xbox_base_devs.ide = machine().device<bus_master_ide_controller_device>("ide");
+ xbox_base_devs.pic8259_1 = subdevice<pic8259_device>("pic8259_1");
+ xbox_base_devs.pic8259_2 = subdevice<pic8259_device>("pic8259_2");
+ xbox_base_devs.ide = subdevice<bus_master_ide_controller_device>("ide");
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
{
using namespace std::placeholders;
machine().debugger().console().register_command("xbox", CMDFLAG_NONE, 0, 1, 4, std::bind(&xbox_base_state::xbox_debug_commands, this, _1, _2));
}
- machine().device<mcpx_ohci_device>(":pci:02.0")->set_hack_callback(
+ subdevice<mcpx_ohci_device>("pci:02.0")->set_hack_callback(
[&](void)
{
hack_usb();