summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-06-11 21:13:21 +1000
committer Vas Crabb <vas@vastheman.com>2018-06-11 21:13:21 +1000
commit529ddf11fae5d96d6956e65dcb12b6e1243e623a (patch)
tree3408a7fefd10ad858536b6a16f3b1c30eadc58cd
parent19b8b995ab95488039af1c2d7b8aea005bc1652b (diff)
fix build, minor cleanup (nw)
-rw-r--r--scripts/target/mame/mess.lua1
-rw-r--r--src/mame/drivers/mediagx.cpp32
-rw-r--r--src/mame/machine/thomflop.cpp8
3 files changed, 18 insertions, 23 deletions
diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua
index 295764be33a..6835d1960f9 100644
--- a/scripts/target/mame/mess.lua
+++ b/scripts/target/mame/mess.lua
@@ -367,6 +367,7 @@ VIDEOS["MB88303"] = true
MACHINES["AKIKO"] = true
MACHINES["AUTOCONFIG"] = true
+MACHINES["BUSMOUSE"] = true
MACHINES["CR511B"] = true
MACHINES["DMAC"] = true
MACHINES["GAYLE"] = true
diff --git a/src/mame/drivers/mediagx.cpp b/src/mame/drivers/mediagx.cpp
index 54b1b18adb5..c5eb14e6c35 100644
--- a/src/mame/drivers/mediagx.cpp
+++ b/src/mame/drivers/mediagx.cpp
@@ -390,19 +390,18 @@ void mediagx_state::draw_framebuffer(bitmap_rgb32 &bitmap, const rectangle &clip
void mediagx_state::draw_cga(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- int i, j;
- gfx_element *gfx = m_gfxdecode->gfx(0);
- uint32_t *cga = m_cga_ram;
+ gfx_element *const gfx = m_gfxdecode->gfx(0);
+ uint32_t const *const cga = m_cga_ram;
int index = 0;
- for (j=0; j < 25; j++)
+ for (int j=0; j < 25; j++)
{
- for (i=0; i < 80; i+=2)
+ for (int i=0; i < 80; i+=2)
{
- int att0 = (cga[index] >> 8) & 0xff;
- int ch0 = (cga[index] >> 0) & 0xff;
- int att1 = (cga[index] >> 24) & 0xff;
- int ch1 = (cga[index] >> 16) & 0xff;
+ int const att0 = (cga[index] >> 8) & 0xff;
+ int const ch0 = (cga[index] >> 0) & 0xff;
+ int const att1 = (cga[index] >> 24) & 0xff;
+ int const ch1 = (cga[index] >> 16) & 0xff;
draw_char(bitmap, cliprect, gfx, ch0, att0, i*8, j*8);
draw_char(bitmap, cliprect, gfx, ch1, att1, (i*8)+8, j*8);
@@ -478,9 +477,8 @@ WRITE32_MEMBER(mediagx_state::memory_ctrl_w)
m_pal[m_pal_index] = data & 0xff;
m_pal_index++;
if (m_pal_index >= 768)
- {
m_pal_index = 0;
- }
+
m_ramdac->pal_w( space, 0, data );
}
}
@@ -692,8 +690,8 @@ void mediagx_state::ad1847_reg_write(int reg, uint8_t data)
m_ad1847_sample_rate = 24576000 / divide_factor[(data >> 1) & 0x7];
}
- m_dmadac[0]->set_frequency(m_ad1847_sample_rate);
- m_dmadac[1]->set_frequency(m_ad1847_sample_rate);
+ m_dmadac[0]->set_frequency(m_ad1847_sample_rate);
+ m_dmadac[1]->set_frequency(m_ad1847_sample_rate);
if (data & 0x20)
{
@@ -964,23 +962,19 @@ const read32_delegate mediagx_state::s_speedup_handlers[]
#ifdef MAME_DEBUG
void mediagx_state::report_speedups()
{
- int i;
-
- for (i = 0; i < m_speedup_count; i++)
+ for (int i = 0; i < m_speedup_count; i++)
printf("Speedup %2d: offs=%06X pc=%06X hits=%d\n", i, m_speedup_table[i].offset, m_speedup_table[i].pc, m_speedup_hits[i]);
}
#endif
void mediagx_state::install_speedups(const speedup_entry *entries, int count)
{
- int i;
-
assert(count < ARRAY_LENGTH(s_speedup_handlers));
m_speedup_table = entries;
m_speedup_count = count;
- for (i = 0; i < count; i++) {
+ for (int i = 0; i < count; i++) {
read32_delegate func = s_speedup_handlers[i];
func.late_bind(*this);
m_maincpu->space(AS_PROGRAM).install_read_handler(entries[i].offset, entries[i].offset + 3, func);
diff --git a/src/mame/machine/thomflop.cpp b/src/mame/machine/thomflop.cpp
index caf8e488bd1..75d3c6d7164 100644
--- a/src/mame/machine/thomflop.cpp
+++ b/src/mame/machine/thomflop.cpp
@@ -932,12 +932,12 @@ int thomson_state::thmfc_floppy_is_qdd ( legacy_floppy_image_device *image )
void thomson_state::thmfc_floppy_index_pulse_cb( int index, int state )
{
- legacy_floppy_image_device *image = m_floppy_image[index];
+ legacy_floppy_image_device *const image = m_floppy_image[index];
if ( image != thmfc_floppy_image())
return;
- if ( thmfc_floppy_is_qdd(m_floppy_image[index]))
+ if ( thmfc_floppy_is_qdd(image) )
{
/* pulse each time the whole-disk spiraling track ends */
image->floppy_drive_set_rpm( 16.92f /* 423/25 */ );
@@ -964,7 +964,7 @@ void thomson_state::thmfc_floppy_index_pulse_cb( int index, int state )
int thomson_state::thmfc_floppy_find_sector( chrn_id* dst )
{
- legacy_floppy_image_device* img = thmfc_floppy_image();
+ legacy_floppy_image_device *const img = thmfc_floppy_image();
chrn_id id;
int r = 0;
@@ -1006,7 +1006,7 @@ void thomson_state::thmfc_floppy_cmd_complete()
if ( thmfc1->op == THMFC1_OP_WRITE_SECT )
{
- legacy_floppy_image_device * img = thmfc_floppy_image();
+ legacy_floppy_image_device *const img = thmfc_floppy_image();
img->floppy_drive_write_sector_data( thmfc1->side, thmfc1->sector_id, thmfc1->data + 3, thmfc1->data_size - 3, 0 );
thom_floppy_active( 1 );
}