Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
Clean-ups and version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
micko committed May 21, 2012
1 parent ec4d970 commit 80c459a
Show file tree
Hide file tree
Showing 67 changed files with 814 additions and 1,813 deletions.
8 changes: 4 additions & 4 deletions src/emu/cpu/i386/i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static void i386_set_descriptor_accessed(i386_state *cpustate, UINT16 selector)
UINT8 rights;
if(!(selector & ~3))
return;

if ( selector & 0x4 )
base = cpustate->ldtr.base;
else
Expand Down Expand Up @@ -458,8 +458,8 @@ static void i386_sreg_load(i386_state *cpustate, UINT16 selector, UINT8 reg, boo
i386_load_segment_descriptor(cpustate, reg);
if(fault) *fault = false;
return;
}
}

if(fault) *fault = true;
if(reg == SS)
{
Expand Down Expand Up @@ -1030,7 +1030,7 @@ static void i286_task_switch(i386_state *cpustate, UINT16 selector, UINT8 nested
WRITE16(cpustate,tss+0x28,cpustate->sreg[DS].selector);

old_task = cpustate->task.segment;

/* Load task register with the selector of the incoming task */
cpustate->task.segment = selector;
memset(&seg, 0, sizeof(seg));
Expand Down
2 changes: 1 addition & 1 deletion src/emu/cpu/powerpc/ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct _powerpc_config
{
UINT32 bus_frequency;
read32_device_func dcr_read_func;
write32_device_func dcr_write_func;
write32_device_func dcr_write_func;
};


Expand Down
2 changes: 1 addition & 1 deletion src/emu/cpu/powerpc/ppccom.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ struct _powerpc_state
ppcimp_state * impstate;

read32_device_func dcr_read_func;
write32_device_func dcr_write_func;
write32_device_func dcr_write_func;
};


Expand Down
4 changes: 2 additions & 2 deletions src/emu/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ class device_t::shared_ptr_array_finder

protected:
// internal state
shared_ptr_type *m_array[_Count];
astring m_tag[_Count];
shared_ptr_type *m_array[_Count+1];
astring m_tag[_Count+1];
};

// optional shared pointer array finder
Expand Down
14 changes: 7 additions & 7 deletions src/emu/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,18 +690,18 @@ void info_xml_creator::output_display(device_t &device, const char *root_tag)
{
astring newtag(screendev->tag()), oldtag(":");
newtag.substr(newtag.find(oldtag.cat(root_tag)) + oldtag.len());

fprintf(m_output, "\t\t<display");
fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag));

switch (screendev->screen_type())
{
case SCREEN_TYPE_RASTER: fprintf(m_output, " type=\"raster\""); break;
case SCREEN_TYPE_VECTOR: fprintf(m_output, " type=\"vector\""); break;
case SCREEN_TYPE_LCD: fprintf(m_output, " type=\"lcd\""); break;
default: fprintf(m_output, " type=\"unknown\""); break;
}

// output the orientation as a string
switch (m_drivlist.driver().flags & ORIENTATION_MASK)
{
Expand Down Expand Up @@ -730,24 +730,24 @@ void info_xml_creator::output_display(device_t &device, const char *root_tag)
fprintf(m_output, " rotate=\"0\"");
break;
}

// output width and height only for games that are not vector
if (screendev->screen_type() != SCREEN_TYPE_VECTOR)
{
const rectangle &visarea = screendev->visible_area();
fprintf(m_output, " width=\"%d\"", visarea.width());
fprintf(m_output, " height=\"%d\"", visarea.height());
}

// output refresh rate
fprintf(m_output, " refresh=\"%f\"", ATTOSECONDS_TO_HZ(screendev->refresh_attoseconds()));

// output raw video parameters only for games that are not vector
// and had raw parameters specified
if (screendev->screen_type() != SCREEN_TYPE_VECTOR && !screendev->oldstyle_vblank_supplied())
{
int pixclock = screendev->width() * screendev->height() * ATTOSECONDS_TO_HZ(screendev->refresh_attoseconds());

fprintf(m_output, " pixclock=\"%d\"", pixclock);
fprintf(m_output, " htotal=\"%d\"", screendev->width());
fprintf(m_output, " hbend=\"%d\"", screendev->visible_area().min_x);
Expand Down
12 changes: 6 additions & 6 deletions src/emu/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ natural_keyboard::natural_keyboard(running_machine &machine)
m_timer(NULL),
m_current_rate(attotime::zero)
{
m_queue_chars = ioport_queue_chars_delegate();
m_queue_chars = ioport_queue_chars_delegate();
m_accept_char = ioport_accept_char_delegate();
m_charqueue_empty = ioport_charqueue_empty_delegate();

Expand Down Expand Up @@ -1833,10 +1833,10 @@ ioport_type_class ioport_field::type_class() const
unicode_char ioport_field::keyboard_code(int which) const
{
unicode_char ch;

if (which >= ARRAY_LENGTH(m_chars))
throw emu_fatalerror("Tried to access keyboard_code with out-of-range index %d\n", which);

ch = m_chars[which];

// special hack to allow for PORT_CODE('\xA3')
Expand Down Expand Up @@ -3849,8 +3849,8 @@ void ioport_configurer::field_add_char(unicode_char ch)
m_curfield->m_chars[index] = ch;
return;
}
throw emu_fatalerror("PORT_CHAR(%d) could not be added - maximum amount exceeded\n", ch);

throw emu_fatalerror("PORT_CHAR(%d) could not be added - maximum amount exceeded\n", ch);
}


Expand All @@ -3875,7 +3875,7 @@ void ioport_configurer::setting_alloc(ioport_value value, const char *name)
throw emu_fatalerror("alloc_setting called with no active field (value=%X name=%s)\n", value, name);

m_cursetting = global_alloc(ioport_setting(*m_curfield, value & m_curfield->mask(), string_from_token(name)));
// append a new setting
// append a new setting
m_curfield->m_settinglist.append(*m_cursetting);
}

Expand Down
2 changes: 1 addition & 1 deletion src/emu/ioport.h
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ class natural_keyboard
natural_keyboard(running_machine &machine);

void initialize();

// getters and queries
running_machine &machine() const { return m_machine; }
bool empty() const { return (m_bufbegin == m_bufend); }
Expand Down
2 changes: 1 addition & 1 deletion src/emu/machine/68681.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ WRITE8_DEVICE_HANDLER(duart68681_w)
rate = attotime::from_hz(2*device->clock()/(2*16*16*0x10000));
}
}

//hz = ATTOSECONDS_TO_HZ(rate.attoseconds);

duart68681->duart_timer->adjust(rate, 0, rate);
Expand Down
2 changes: 1 addition & 1 deletion src/emu/rendlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ void layout_element::component::draw(running_machine &machine, bitmap_argb32 &de
case CTYPE_DOTMATRIXDOT:
draw_dotmatrix(1, dest, bounds, state);
break;

case CTYPE_SIMPLECOUNTER:
draw_simplecounter(machine, dest, bounds, state);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/emu/rendlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class layout_element
CTYPE_LED16SEGSC,
CTYPE_DOTMATRIX,
CTYPE_DOTMATRIX5DOT,
CTYPE_DOTMATRIXDOT,
CTYPE_DOTMATRIXDOT,
CTYPE_SIMPLECOUNTER,
CTYPE_REEL,
CTYPE_MAX
Expand Down
Loading

0 comments on commit 80c459a

Please sign in to comment.