summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-08-15 17:55:59 +0200
committer couriersud <couriersud@arcor.de>2015-08-15 17:56:10 +0200
commitfe8e6aca657f202daf91ad83cc1427296b50615e (patch)
treea516d55f859b90bc1ebef65be61ff10cf7040dfa /src/mess/machine
parent55592b6c785b36a9684800e0ccc7111603f958ed (diff)
Added seconds() and attoseconds() to attotime and prefixed members with
m_. Rewrote code accessing members to use seconds() and attoseconds(). The changes were triggered by a test how gcc __int128_t would perform as the internal representation. This test revealed that the current implementation is still faster. (nw)
Diffstat (limited to 'src/mess/machine')
-rw-r--r--src/mess/machine/apple2gs.c2
-rw-r--r--src/mess/machine/mega32x.c4
-rw-r--r--src/mess/machine/orion.c2
-rw-r--r--src/mess/machine/vector06.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/mess/machine/apple2gs.c b/src/mess/machine/apple2gs.c
index 537375b17cc..4f7f64f0f7c 100644
--- a/src/mess/machine/apple2gs.c
+++ b/src/mess/machine/apple2gs.c
@@ -143,7 +143,7 @@ void apple2gs_state::process_clock()
seconds_t current_interval;
/* update clock_curtime */
- current_interval = machine().time().seconds;
+ current_interval = machine().time().seconds();
m_clock_curtime += current_interval - m_clock_curtime_interval;
m_clock_curtime_interval = current_interval;
diff --git a/src/mess/machine/mega32x.c b/src/mess/machine/mega32x.c
index be3c572b53d..8c60160097d 100644
--- a/src/mess/machine/mega32x.c
+++ b/src/mess/machine/mega32x.c
@@ -958,9 +958,9 @@ UINT16 sega_32x_device::get_hposition(void)
time_elapsed_since_megadriv_scanline_timer = machine().device<timer_device>(":md_scan_timer")->time_elapsed();
- if (time_elapsed_since_megadriv_scanline_timer.attoseconds<(ATTOSECONDS_PER_SECOND/m_framerate /m_total_scanlines))
+ if (time_elapsed_since_megadriv_scanline_timer.attoseconds() < (ATTOSECONDS_PER_SECOND/m_framerate /m_total_scanlines))
{
- value4 = (UINT16)(MAX_HPOSITION*((double)(time_elapsed_since_megadriv_scanline_timer.attoseconds) / (double)(ATTOSECONDS_PER_SECOND/m_framerate /m_total_scanlines)));
+ value4 = (UINT16)(MAX_HPOSITION*((double)(time_elapsed_since_megadriv_scanline_timer.attoseconds()) / (double)(ATTOSECONDS_PER_SECOND/m_framerate /m_total_scanlines)));
}
else /* in some cases (probably due to rounding errors) we get some stupid results (the odd huge value where the time elapsed is much higher than the scanline time??!).. hopefully by clamping the result to the maximum we limit errors */
{
diff --git a/src/mess/machine/orion.c b/src/mess/machine/orion.c
index f52a33ccf73..4556778597b 100644
--- a/src/mess/machine/orion.c
+++ b/src/mess/machine/orion.c
@@ -69,7 +69,7 @@ WRITE8_MEMBER(orion_state::orion128_romdisk_w)
void orion_state::orion_set_video_mode(int width)
{
rectangle visarea(0, width-1, 0, 255);
- machine().first_screen()->configure(width, 256, visarea, machine().first_screen()->frame_period().attoseconds);
+ machine().first_screen()->configure(width, 256, visarea, machine().first_screen()->frame_period().attoseconds());
}
WRITE8_MEMBER(orion_state::orion128_video_mode_w)
diff --git a/src/mess/machine/vector06.c b/src/mess/machine/vector06.c
index a2d7d770db4..ba944cef8fd 100644
--- a/src/mess/machine/vector06.c
+++ b/src/mess/machine/vector06.c
@@ -44,7 +44,7 @@ WRITE8_MEMBER( vector06_state::vector06_8255_porta_w )
void vector06_state::vector06_set_video_mode(int width)
{
rectangle visarea(0, width+64-1, 0, 256+64-1);
- machine().first_screen()->configure(width+64, 256+64, visarea, machine().first_screen()->frame_period().attoseconds);
+ machine().first_screen()->configure(width+64, 256+64, visarea, machine().first_screen()->frame_period().attoseconds());
}
WRITE8_MEMBER( vector06_state::vector06_8255_portb_w )