summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/apple/v8.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2022-06-16 12:47:52 +0200
committer Olivier Galibert <galibert@pobox.com>2025-04-29 23:06:41 +0200
commit45d4cd52a8194f2ef9e0383cfb2e2a35634af6ff (patch)
tree4e8d8fcb7382a5e9e0bce5ec59939bcfbe67155a /src/mame/apple/v8.cpp
parent5c14bcdfcb4aefb71b5b62387c4ad05dbeb3814e (diff)
full xtal conversionxtal
Diffstat (limited to 'src/mame/apple/v8.cpp')
-rw-r--r--src/mame/apple/v8.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mame/apple/v8.cpp b/src/mame/apple/v8.cpp
index 5be6273afc6..686dbf57b6d 100644
--- a/src/mame/apple/v8.cpp
+++ b/src/mame/apple/v8.cpp
@@ -42,8 +42,8 @@
#define VERBOSE (LOG_RAM)
#include "logmacro.h"
-static constexpr u32 C7M = 7833600;
-static constexpr u32 C15M = (C7M * 2);
+static constexpr XTAL C7M = XTAL::u(7833600);
+static constexpr XTAL C15M = (C7M * 2);
//**************************************************************************
// DEVICE DEFINITIONS
@@ -93,7 +93,7 @@ void v8_device::map(address_map &map)
void v8_device::device_add_mconfig(machine_config &config)
{
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
- m_screen->set_raw(25175000, 800, 0, 640, 525, 0, 480);
+ m_screen->set_raw(XTAL::u(25175000), 800, 0, 640, 525, 0, 480);
m_screen->set_size(1024, 768);
m_screen->set_visarea(0, 640 - 1, 0, 480 - 1);
m_screen->set_screen_update(FUNC(v8_device::screen_update));
@@ -122,12 +122,12 @@ void v8_device::device_add_mconfig(machine_config &config)
// v8_device - constructor
//-------------------------------------------------
-v8_device::v8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
+v8_device::v8_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock) :
v8_device(mconfig, V8, tag, owner, clock)
{
}
-v8_device::v8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) :
+v8_device::v8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, const XTAL &clock) :
device_t(mconfig, type, tag, owner, clock),
m_maincpu(*this, finder_base::DUMMY_TAG),
m_screen(*this, "screen"),
@@ -652,13 +652,13 @@ void v8_device::via_sync()
u64 cycle = m_maincpu->total_cycles();
// Get the number of the cycle the via is in at that time
- u64 via_cycle = cycle * m_via1->clock() / m_maincpu->clock();
+ u64 via_cycle = cycle * m_via1->clock().value() / m_maincpu->clock().value();
// The access is going to start at via_cycle+1 and end at
// via_cycle+1.5, compute what that means in maincpu cycles (the
// +1 rounds up, since the clocks are too different to ever be
// synced).
- u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock() / (2 * m_via1->clock()) + 1;
+ u64 main_cycle = (via_cycle * 2 + 3) * m_maincpu->clock().value() / (2 * m_via1->clock().value()) + 1;
// Finally adjust the main cpu icount as needed.
m_maincpu->adjust_icount(-int(main_cycle - cycle));
@@ -877,7 +877,7 @@ void eagle_device::device_add_mconfig(machine_config &config)
m_asc->irqf_callback().set(FUNC(eagle_device::asc_irq));
}
-eagle_device::eagle_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+eagle_device::eagle_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: v8_device(mconfig, EAGLE, tag, owner, clock)
{
}
@@ -964,7 +964,7 @@ void spice_device::device_add_mconfig(machine_config &config)
applefdintf_device::add_35_nc(config, m_floppy[1]);
}
-spice_device::spice_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+spice_device::spice_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock)
: v8_device(mconfig, SPICE, tag, owner, clock),
m_fdc(*this, "fdc"),
m_floppy(*this, "fdc:%d", 0U),