diff options
| author | 2010-07-06 17:30:28 +0000 | |
|---|---|---|
| committer | 2010-07-06 17:30:28 +0000 | |
| commit | 30662dcdef8997e7c993acdcf557f32cd18d49e1 (patch) | |
| tree | d08d52374a8ee4db0edc3ba0e86bf6ba7dbb73f5 /src/emu | |
| parent | bcd97e988006c46c8c42bb7e2b104e29c205ccf2 (diff) | |
Cleanups and version bump.mame0138u3
Diffstat (limited to 'src/emu')
34 files changed, 278 insertions, 278 deletions
diff --git a/src/emu/cheat.c b/src/emu/cheat.c index f3430dd33b5..1aff6ff2497 100644 --- a/src/emu/cheat.c +++ b/src/emu/cheat.c @@ -409,7 +409,7 @@ void cheat_reload(running_machine *machine) /* load the cheat file, MESS will load a crc32.xml ( eg. 01234567.xml ) and MAME will load gamename.xml */ - device_image_interface *image = NULL; + device_image_interface *image = NULL; for (bool gotone = machine->m_devicelist.first(image); gotone; gotone = image->next(image)) { if (image->exists()) @@ -423,7 +423,7 @@ void cheat_reload(running_machine *machine) } } } - if (cheatinfo->cheatlist == NULL) + if (cheatinfo->cheatlist == NULL) { cheatinfo->cheatlist = cheat_list_load(machine, machine->basename()); } diff --git a/src/emu/clifront.c b/src/emu/clifront.c index 88c588dc74c..219aef2547a 100644 --- a/src/emu/clifront.c +++ b/src/emu/clifront.c @@ -97,7 +97,7 @@ static const options_entry cli_options[] = { "listdevices;ld", "0", OPTION_COMMAND, "list available devices" }, { "listmedia;lm", "0", OPTION_COMMAND, "list available media for the system" }, { "listsoftware", "0", OPTION_COMMAND, "list known software for the system" }, - + { NULL } }; @@ -904,8 +904,8 @@ static int info_listsoftware(core_options *options, const char *gamename) fprintf( out, "\t\t\t<part name=\"%s\"", part->name ); if ( part->interface_ ) fprintf( out, " interface=\"%s\"", part->interface_ ); -// if ( part->feature ) -// fprintf( out, " features=\"%s\"", part->feature ); +// if ( part->feature ) +// fprintf( out, " features=\"%s\"", part->feature ); fprintf( out, ">\n"); /* TODO: display rom region information */ @@ -977,8 +977,8 @@ static int info_listsoftware(core_options *options, const char *gamename) /*------------------------------------------------- - softlist_match_roms - scan for a matching - software ROM by hash + softlist_match_roms - scan for a matching + software ROM by hash -------------------------------------------------*/ static void softlist_match_roms(core_options *options, const char *hash, int length, int *found) { @@ -1073,7 +1073,7 @@ static int info_listmedia(core_options *options, const char *gamename) printf("%-13s%-12s%-8s ", driver_name, name, paren_shortname); driver_name = " "; - + astring extensions(src); char *ext = strtok((char*)extensions.cstr(),","); while (ext != NULL) diff --git a/src/emu/cpu/tms9900/99xxcore.h b/src/emu/cpu/tms9900/99xxcore.h index b7364f0e205..10ece6b3d0e 100644 --- a/src/emu/cpu/tms9900/99xxcore.h +++ b/src/emu/cpu/tms9900/99xxcore.h @@ -512,7 +512,7 @@ struct _tms99xx_state INLINE tms99xx_state *get_safe_token(running_device *device) { assert(device != NULL); -// assert(device->type() == TMS99XX_GET_INFO); +// assert(device->type() == TMS99XX_GET_INFO); return (tms99xx_state *)downcast<legacy_cpu_device *>(device)->token(); } diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index b04a8b2fc72..065e0d8f4b5 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -1529,7 +1529,7 @@ static UINT64 get_cpunum(void *globalref, void *ref) { running_machine *machine = (running_machine *)globalref; device_t *target = machine->debugcpu_data->visiblecpu; - + device_execute_interface *exec; int index = 0; for (bool gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec)) @@ -1579,7 +1579,7 @@ device_debug::device_debug(device_t &device, symbol_table *globalsyms) { memset(m_pc_history, 0, sizeof(m_pc_history)); memset(m_wplist, 0, sizeof(m_wplist)); - + // find out which interfaces we have to work with device.interface(m_exec); device.interface(m_memory); @@ -1592,7 +1592,7 @@ device_debug::device_debug(device_t &device, symbol_table *globalsyms) // add a global symbol for the current instruction pointer if (m_exec != NULL) symtable_add_register(m_symtable, "cycles", NULL, get_cycles, NULL); - + // add entries to enable/disable unmap reporting for each space if (m_memory != NULL) { @@ -1615,7 +1615,7 @@ device_debug::device_debug(device_t &device, symbol_table *globalsyms) { m_flags = DEBUG_FLAG_OBSERVING | DEBUG_FLAG_HISTORY; m_opwidth = min_opcode_bytes(); - + // if no curpc, add one if (m_state != NULL && symtable_find(m_symtable, "curpc") == NULL) symtable_add_register(m_symtable, "curpc", NULL, get_current_pc, 0); @@ -1632,7 +1632,7 @@ device_debug::~device_debug() // free the symbol table if (m_symtable != NULL) symtable_free(m_symtable); - + // free breakpoints and watchpoints breakpoint_clear_all(); watchpoint_clear_all(); @@ -1640,7 +1640,7 @@ device_debug::~device_debug() //------------------------------------------------- -// start_hook - the scheduler calls this hook +// start_hook - the scheduler calls this hook // before beginning execution for the given device //------------------------------------------------- @@ -1699,7 +1699,7 @@ void device_debug::start_hook(attotime endtime) //------------------------------------------------- -// stop_hook - the scheduler calls this hook when +// stop_hook - the scheduler calls this hook when // ending execution for the given device //------------------------------------------------- @@ -1722,7 +1722,7 @@ void device_debug::stop_hook() //------------------------------------------------- -// interrupt_hook - called when an interrupt is +// interrupt_hook - called when an interrupt is // acknowledged //------------------------------------------------- @@ -1741,7 +1741,7 @@ void device_debug::interrupt_hook(int irqline) //------------------------------------------------- -// exception_hook - called when an exception is +// exception_hook - called when an exception is // generated //------------------------------------------------- @@ -1760,7 +1760,7 @@ void device_debug::exception_hook(int exception) //------------------------------------------------- -// instruction_hook - called by the CPU cores +// instruction_hook - called by the CPU cores // before executing each instruction //------------------------------------------------- @@ -1889,8 +1889,8 @@ void device_debug::instruction_hook(offs_t curpc) //------------------------------------------------- -// memory_read_hook - the memory system calls -// this hook when watchpoints are enabled and a +// memory_read_hook - the memory system calls +// this hook when watchpoints are enabled and a // memory read happens //------------------------------------------------- @@ -1906,8 +1906,8 @@ void device_debug::memory_read_hook(const address_space &space, offs_t address, //------------------------------------------------- -// memory_write_hook - the memory system calls -// this hook when watchpoints are enabled and a +// memory_write_hook - the memory system calls +// this hook when watchpoints are enabled and a // memory write happens //------------------------------------------------- @@ -1918,7 +1918,7 @@ void device_debug::memory_write_hook(const address_space &space, offs_t address, //------------------------------------------------- -// set_instruction_hook - set a hook to be +// set_instruction_hook - set a hook to be // called on each instruction for a given device //------------------------------------------------- @@ -1934,7 +1934,7 @@ void device_debug::set_instruction_hook(debug_instruction_hook_func hook) //------------------------------------------------- -// disassemble - disassemble a line at a given +// disassemble - disassemble a line at a given // PC on a given device //------------------------------------------------- @@ -1988,14 +1988,14 @@ void device_debug::ignore(bool ignore) //------------------------------------------------- -// single_step - single step the device past the +// single_step - single step the device past the // requested number of instructions //------------------------------------------------- void device_debug::single_step(int numsteps) { debugcpu_private *global = m_device.machine->debugcpu_data; - + assert(m_exec != NULL); m_stepsleft = numsteps; @@ -2006,7 +2006,7 @@ void device_debug::single_step(int numsteps) //------------------------------------------------- -// single_step_over - single step the device over +// single_step_over - single step the device over // the requested number of instructions //------------------------------------------------- @@ -2024,7 +2024,7 @@ void device_debug::single_step_over(int numsteps) //------------------------------------------------- -// single_step_out - single step the device +// single_step_out - single step the device // out of the current function //------------------------------------------------- @@ -2042,7 +2042,7 @@ void device_debug::single_step_out() //------------------------------------------------- -// go - execute the device until it hits the given +// go - execute the device until it hits the given // address //------------------------------------------------- @@ -2075,7 +2075,7 @@ void device_debug::go_vblank() //------------------------------------------------- -// go_interrupt - execute until the specified +// go_interrupt - execute until the specified // interrupt fires on the device //------------------------------------------------- @@ -2092,7 +2092,7 @@ void device_debug::go_interrupt(int irqline) //------------------------------------------------- -// go_exception - execute until the specified +// go_exception - execute until the specified // exception fires on the visible CPU //------------------------------------------------- @@ -2109,7 +2109,7 @@ void device_debug::go_exception(int exception) //------------------------------------------------- -// go_milliseconds - execute until the specified +// go_milliseconds - execute until the specified // delay elapses //------------------------------------------------- @@ -2126,7 +2126,7 @@ void device_debug::go_milliseconds(UINT64 milliseconds) //------------------------------------------------- -// go_next_device - execute until we hit the next +// go_next_device - execute until we hit the next // device //------------------------------------------------- @@ -2142,7 +2142,7 @@ void device_debug::go_next_device() //------------------------------------------------- -// halt_on_next_instruction - halt in the +// halt_on_next_instruction - halt in the // debugger on the next instruction //------------------------------------------------- @@ -2175,7 +2175,7 @@ void device_debug::halt_on_next_instruction(const char *fmt, ...) //------------------------------------------------- -// breakpoint_set - set a new breakpoint, +// breakpoint_set - set a new breakpoint, // returning its index //------------------------------------------------- @@ -2187,7 +2187,7 @@ int device_debug::breakpoint_set(offs_t address, parsed_expression *condition, c // hook it into our list bp->m_next = m_bplist; m_bplist = bp; - + // update the flags and return the index breakpoint_update_flags(); return bp->m_index; @@ -2264,7 +2264,7 @@ void device_debug::breakpoint_enable_all(bool enable) //------------------------------------------------- -// watchpoint_set - set a new watchpoint, +// watchpoint_set - set a new watchpoint, // returning its index //------------------------------------------------- @@ -2278,7 +2278,7 @@ int device_debug::watchpoint_set(const address_space &space, int type, offs_t ad // hook it into our list wp->m_next = m_wplist[space.spacenum]; m_wplist[space.spacenum] = wp; - + // update the flags and return the index watchpoint_update_flags(wp->m_space); return wp->m_index; @@ -2360,7 +2360,7 @@ void device_debug::watchpoint_enable_all(bool enable) //------------------------------------------------- -// hotspot_track - enable/disable tracking of +// hotspot_track - enable/disable tracking of // hotspots //------------------------------------------------- @@ -2673,7 +2673,7 @@ void device_debug::watchpoint_check(const address_space &space, int type, offs_t //------------------------------------------------- -// hotspot_check - check for hotspots on a +// hotspot_check - check for hotspots on a // memory read access //------------------------------------------------- @@ -2836,7 +2836,7 @@ device_debug::breakpoint::breakpoint(int index, offs_t address, parsed_expressio m_action((action != NULL) ? action : "") { } - + //------------------------------------------------- // ~breakpoint - destructor @@ -2854,7 +2854,7 @@ device_debug::breakpoint::~breakpoint() //------------------------------------------------- bool device_debug::breakpoint::hit(offs_t pc) -{ +{ // don't hit if disabled if (!m_enabled) return false; @@ -2862,12 +2862,12 @@ bool device_debug::breakpoint::hit(offs_t pc) // must match our address if (m_address != pc) return false; - + // must satisfy the condition UINT64 result; if (m_condition != NULL && expression_execute(m_condition, &result) == EXPRERR_NONE && result == 0) return false; - + return true; } @@ -2893,7 +2893,7 @@ device_debug::watchpoint::watchpoint(int index, const address_space &space, int m_action((action != NULL) ? action : "") { } - + //------------------------------------------------- // ~watchpoint - destructor @@ -2915,7 +2915,7 @@ bool device_debug::watchpoint::hit(int type, offs_t address, int size) // don't hit if disabled if (!m_enabled) return false; - + // must match the type if ((m_type & type) == 0) return false; @@ -2923,12 +2923,12 @@ bool device_debug::watchpoint::hit(int type, offs_t address, int size) // must match our address if (address + size <= m_address || address >= m_address + m_length) return false; - + // must satisfy the condition UINT64 result; if (m_condition != NULL && expression_execute(m_condition, &result) == EXPRERR_NONE && result == 0) return false; - + return true; } @@ -2967,7 +2967,7 @@ device_debug::tracer::~tracer() //------------------------------------------------- -// update - log to the tracefile the data for a +// update - log to the tracefile the data for a // given instruction //------------------------------------------------- @@ -3047,7 +3047,7 @@ void device_debug::tracer::vprintf(const char *format, va_list va) //------------------------------------------------- -// flush - flush any pending changes to the trace +// flush - flush any pending changes to the trace // file //------------------------------------------------- diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index b412711bb6e..c25333fa79f 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -74,12 +74,12 @@ public: class breakpoint { friend class device_debug; - + public: // construction/destruction breakpoint(int index, offs_t address, parsed_expression *condition = NULL, const char *action = NULL); ~breakpoint(); - + // getters breakpoint *next() const { return m_next; } int index() const { return m_index; } @@ -87,7 +87,7 @@ public: offs_t address() const { return m_address; } const char *condition() const { return (m_condition != NULL) ? expression_original_string(m_condition) : NULL; } const char *action() const { return m_action; } - + private: // internals bool hit(offs_t pc); @@ -109,7 +109,7 @@ public: // construction/destruction watchpoint(int index, const address_space &space, int type, offs_t address, offs_t length, parsed_expression *condition = NULL, const char *action = NULL); ~watchpoint(); - + // getters watchpoint *next() const { return m_next; } const address_space &space() const { return m_space; } @@ -120,7 +120,7 @@ public: offs_t length() const { return m_length; } const char *condition() const { return (m_condition != NULL) ? expression_original_string(m_condition) : NULL; } const char *action() const { return m_action; } - + private: // internals bool hit(int type, offs_t address, int size); @@ -140,7 +140,7 @@ public: // construction/destruction device_debug(device_t &device, symbol_table *globalsyms); ~device_debug(); - + // getters symbol_table *symtable() const { return m_symtable; } @@ -150,7 +150,7 @@ public: int min_opcode_bytes() const { return (m_disasm != NULL) ? m_disasm->max_opcode_bytes() : 1; } int max_opcode_bytes() const { return (m_disasm != NULL) ? m_disasm->max_opcode_bytes() : 1; } - // hooks used by the rest of the system + // hooks used by the rest of the system void start_hook(attotime endtime); void stop_hook(); void interrupt_hook(int irqline); @@ -163,7 +163,7 @@ public: void set_instruction_hook(debug_instruction_hook_func hook); void set_dasm_override(dasm_override_func dasm_override) { m_dasm_override = dasm_override; } - // disassembly + // disassembly offs_t disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram); // debugger focus @@ -174,7 +174,7 @@ public: void single_step(int numsteps = 1); void single_step_over(int numsteps = 1); void single_step_out(); - + // execution void go(offs_t targetpc = ~0); void go_vblank(); @@ -204,7 +204,7 @@ public: bool hotspot_tracking_enabled() const { return (m_hotspots != NULL); } void hotspot_track(int numspots, int threshhold); - // history + // history offs_t history_pc(int index) const; // tracing @@ -236,7 +236,7 @@ private: static void set_logunmap(void *globalref, void *ref, UINT64 value); static UINT64 get_cpu_reg(void *globalref, void *ref); static void set_state(void *globalref, void *ref, UINT64 value); - + // basic device information device_t & m_device; // device we are attached to device_execute_interface *m_exec; // execute interface, if present @@ -278,11 +278,11 @@ private: public: tracer(device_debug &debug, FILE &file, bool trace_over, const char *action); ~tracer(); - + void update(offs_t pc); void vprintf(const char *format, va_list va); void flush(); - + private: static const int TRACE_LOOPS = 64; @@ -330,7 +330,7 @@ private: static const UINT32 DEBUG_FLAG_STEPPING_ANY = DEBUG_FLAG_STEPPING | DEBUG_FLAG_STEPPING_OVER | DEBUG_FLAG_STEPPING_OUT; static const UINT32 DEBUG_FLAG_TRACING_ANY = DEBUG_FLAG_TRACING | DEBUG_FLAG_TRACING_OVER; - static const UINT32 DEBUG_FLAG_TRANSIENT = DEBUG_FLAG_STEPPING_ANY | DEBUG_FLAG_STOP_PC | DEBUG_FLAG_STOP_CONTEXT | + static const UINT32 DEBUG_FLAG_TRANSIENT = DEBUG_FLAG_STEPPING_ANY | DEBUG_FLAG_STOP_PC | DEBUG_FLAG_STOP_CONTEXT | DEBUG_FLAG_STOP_INTERRUPT | DEBUG_FLAG_STOP_EXCEPTION | DEBUG_FLAG_STOP_VBLANK | DEBUG_FLAG_STOP_TIME; public: // until comments get folded in diff --git a/src/emu/debug/debugvw.c b/src/emu/debug/debugvw.c index 99d624c6ee7..e445ddcd055 100644 --- a/src/emu/debug/debugvw.c +++ b/src/emu/debug/debugvw.c @@ -150,7 +150,7 @@ void debug_view_source_list::reset() m_head = source->m_next; auto_free(&m_machine, source); } - + // reset the tail pointer and index m_tail = NULL; m_count = 0; @@ -158,7 +158,7 @@ void debug_view_source_list::reset() //------------------------------------------------- -// append - add a view_source to the end of the +// append - add a view_source to the end of the // list //------------------------------------------------- @@ -237,7 +237,7 @@ debug_view::~debug_view() //------------------------------------------------- -// end_update - bracket a sequence of changes so +// end_update - bracket a sequence of changes so // that only one update occurs //------------------------------------------------- @@ -272,7 +272,7 @@ void debug_view::end_update() //------------------------------------------------- -// flush_osd_updates - notify the OSD of any +// flush_osd_updates - notify the OSD of any // pending updates //------------------------------------------------- @@ -285,7 +285,7 @@ void debug_view::flush_osd_updates() //------------------------------------------------- -// set_visible_size - set the visible size in +// set_visible_size - set the visible size in // rows and columns //-------------------------------------------------*/ @@ -303,8 +303,8 @@ void debug_view::set_visible_size(debug_view_xy size) //------------------------------------------------- -// set_visible_position - set the top left -// position of the visible area in rows and +// set_visible_position - set the top left +// position of the visible area in rows and // columns //------------------------------------------------- @@ -322,7 +322,7 @@ void debug_view::set_visible_position(debug_view_xy pos) //------------------------------------------------- -// set_cursor_position - set the current cursor +// set_cursor_position - set the current cursor // position as a row and column //------------------------------------------------- @@ -340,7 +340,7 @@ void debug_view::set_cursor_position(debug_view_xy pos) //------------------------------------------------- -// set_cursor_visible - set the visible state of +// set_cursor_visible - set the visible state of // the cursor //------------------------------------------------- @@ -415,7 +415,7 @@ void debug_view::view_notify(debug_view_notification type) //------------------------------------------------- -// view_char - handle a character typed within +// view_char - handle a character typed within // the current view //------------------------------------------------- @@ -480,11 +480,11 @@ debug_view *debug_view_manager::alloc_view(debug_view_type type, debug_view_osd_ return append(auto_alloc(&m_machine, debug_view_log(m_machine, osdupdate, osdprivate))); case DVT_TIMERS: -// return append(auto_alloc(&m_machine, debug_view_timers(m_machine, osdupdate, osdprivate))); +// return append(auto_alloc(&m_machine, debug_view_timers(m_machine, osdupdate, osdprivate))); case DVT_ALLOCS: -// return append(auto_alloc(&m_machine, debug_view_allocs(m_machine, osdupdate, osdprivate))); - +// return append(auto_alloc(&m_machine, debug_view_allocs(m_machine, osdupdate, osdprivate))); + default: fatalerror("Attempt to create invalid debug view type %d\n", type); } @@ -523,13 +523,13 @@ void debug_view_manager::update_all(debug_view_type type) //------------------------------------------------- -// flush_osd_updates - flush all pending OSD +// flush_osd_updates - flush all pending OSD // updates //------------------------------------------------- void debug_view_manager::flush_osd_updates() { - for (debug_view *view = m_viewlist; view != NULL; view = view->m_next) + for (debug_view *view = m_viewlist; view != NULL; view = view->m_next) view->flush_osd_updates(); } @@ -591,7 +591,7 @@ void debug_view_expression::set_string(const char *string) //------------------------------------------------- -// set_context - set the context for the +// set_context - set the context for the // expression //------------------------------------------------- @@ -603,7 +603,7 @@ void debug_view_expression::set_context(symbol_table *context) //------------------------------------------------- -// recompute - recompute the value of an +// recompute - recompute the value of an // expression //------------------------------------------------- diff --git a/src/emu/debug/debugvw.h b/src/emu/debug/debugvw.h index 7d53bba57b4..9f9e143bc0a 100644 --- a/src/emu/debug/debugvw.h +++ b/src/emu/debug/debugvw.h @@ -133,19 +133,19 @@ public: class debug_view_source { DISABLE_COPYING(debug_view_source); - + friend class debug_view_source_list; public: // construction/destruction debug_view_source(const char *name, device_t *device = NULL); virtual ~debug_view_source(); - + // getters const char *name() const { return m_name; } debug_view_source *next() const { return m_next; } device_t *device() const { return m_device; } - + private: // internal state debug_view_source * m_next; // link to next item @@ -163,19 +163,19 @@ public: // construction/destruction debug_view_source_list(running_machine &machine); ~debug_view_source_list(); - + // getters const debug_view_source *head() const { return m_head; } int count() const { return m_count; } int index(const debug_view_source &source) const; const debug_view_source *by_index(int index) const; - + // operations void reset(); void append(debug_view_source &view_source); const debug_view_source *match_device(device_t *device) const; int match_device_index(device_t *device) const { return index(*match_device(device)); } - + private: // internal state running_machine & m_machine; // reference to our machine @@ -189,7 +189,7 @@ private: class debug_view { friend class debug_view_manager; - + protected: // construction/destruction debug_view(running_machine &machine, debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate); @@ -242,7 +242,7 @@ protected: running_machine & m_machine; // machine associated with this view debug_view_type m_type; // type of view const debug_view_source *m_source; // currently selected data source - debug_view_source_list m_source_list; // list of available data sources + debug_view_source_list m_source_list; // list of available data sources // OSD data debug_view_osd_update_func m_osdupdate; // callback for the update @@ -274,7 +274,7 @@ public: debug_view_manager(running_machine &machine); ~debug_view_manager(); - // view allocation + // view allocation debug_view *alloc_view(debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate); void free_view(debug_view &view); @@ -299,7 +299,7 @@ public: // construction/destruction debug_view_expression(running_machine &machine); ~debug_view_expression(); - + // getters bool dirty() const { return m_dirty; } UINT64 last_value() const { return m_result; } @@ -307,7 +307,7 @@ public: const char *string() const { return m_string; } symbol_table *context() const { return m_context; } - // setters + // setters void mark_dirty() { m_dirty = true; } void set_string(const char *string); void set_context(symbol_table *context); diff --git a/src/emu/debug/dvdisasm.c b/src/emu/debug/dvdisasm.c index 6840b2724c7..762f7f81b16 100644 --- a/src/emu/debug/dvdisasm.c +++ b/src/emu/debug/dvdisasm.c @@ -123,7 +123,7 @@ debug_view_disasm::~debug_view_disasm() //------------------------------------------------- -// enumerate_sources - enumerate all possible +// enumerate_sources - enumerate all possible // sources for a disassembly view //------------------------------------------------- @@ -155,14 +155,14 @@ void debug_view_disasm::view_notify(debug_view_notification type) { if (type == VIEW_NOTIFY_CURSOR_CHANGED) adjust_visible_y_for_cursor(); - + else if (type == VIEW_NOTIFY_SOURCE_CHANGED) m_expression.set_context(downcast<const debug_view_disasm_source *>(m_source)->device().debug()->symtable()); } //------------------------------------------------- -// view_char - handle a character typed within +// view_char - handle a character typed within // the current view //------------------------------------------------- @@ -233,7 +233,7 @@ void debug_view_disasm::view_char(int chval) //------------------------------------------------- -// find_pc_backwards - back up the specified +// find_pc_backwards - back up the specified // number of instructions from the given PC //------------------------------------------------- @@ -312,7 +312,7 @@ offs_t debug_view_disasm::find_pc_backwards(offs_t targetpc, int numinstrs) //------------------------------------------------- -// generate_bytes - generate the opcode byte +// generate_bytes - generate the opcode byte // values //------------------------------------------------- @@ -338,7 +338,7 @@ void debug_view_disasm::generate_bytes(offs_t pcbyte, int numbytes, int minbytes //------------------------------------------------- -// recompute - recompute selected info for the +// recompute - recompute selected info for the // disassembly view //------------------------------------------------- @@ -460,7 +460,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines) //------------------------------------------------- -// view_update - update the contents of the +// view_update - update the contents of the // disassembly view //------------------------------------------------- @@ -620,7 +620,7 @@ recompute: //------------------------------------------------- -// selected_address - return the PC of the +// selected_address - return the PC of the // currently selected address in the view //------------------------------------------------- @@ -632,7 +632,7 @@ offs_t debug_view_disasm::selected_address() //------------------------------------------------- -// set_sexpression - set the expression string +// set_sexpression - set the expression string // describing the home address //------------------------------------------------- @@ -646,7 +646,7 @@ void debug_view_disasm::set_expression(const char *expression) //------------------------------------------------- -// set_right_column - set the contents of the +// set_right_column - set the contents of the // right column //------------------------------------------------- @@ -660,7 +660,7 @@ void debug_view_disasm::set_right_column(disasm_right_column contents) //------------------------------------------------- -// set_backward_steps - set the number of +// set_backward_steps - set the number of // instructions displayed before the home address //------------------------------------------------- @@ -674,7 +674,7 @@ void debug_view_disasm::set_backward_steps(UINT32 steps) //------------------------------------------------- -// set_disasm_width - set the width in characters +// set_disasm_width - set the width in characters // of the main disassembly section //------------------------------------------------- @@ -688,7 +688,7 @@ void debug_view_disasm::set_disasm_width(UINT32 width) //------------------------------------------------- -// set_selected_address - set the PC of the +// set_selected_address - set the PC of the // currently selected address in the view //------------------------------------------------- diff --git a/src/emu/debug/dvdisasm.h b/src/emu/debug/dvdisasm.h index b34c0758e4b..aed35f3724b 100644 --- a/src/emu/debug/dvdisasm.h +++ b/src/emu/debug/dvdisasm.h @@ -66,7 +66,7 @@ enum disasm_right_column class debug_view_disasm_source : public debug_view_source { friend class debug_view_disasm; - + // construction/destruction debug_view_disasm_source(const char *name, device_t &device); @@ -92,7 +92,7 @@ class debug_view_disasm : public debug_view // construction/destruction debug_view_disasm(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate); virtual ~debug_view_disasm(); - + public: // getters const char *expression() const { return m_expression.string(); } @@ -100,7 +100,7 @@ public: UINT32 backward_steps() const { return m_backwards_steps; } UINT32 disasm_width() const { return m_dasm_width; } offs_t selected_address(); - + // setters void set_expression(const char *expression); void set_right_column(disasm_right_column contents); @@ -135,7 +135,7 @@ private: debug_view_xy m_allocated; // allocated rows/columns offs_t * m_byteaddress; // addresses of the instructions char * m_dasm; // disassembled instructions - + // constants static const int DEFAULT_DASM_LINES = 1000; static const int DEFAULT_DASM_WIDTH = 50; diff --git a/src/emu/debug/dvmemory.c b/src/emu/debug/dvmemory.c index 497ae247a46..652c98bbb6f 100644 --- a/src/emu/debug/dvmemory.c +++ b/src/emu/debug/dvmemory.c @@ -141,7 +141,7 @@ debug_view_memory::debug_view_memory(running_machine &machine, debug_view_osd_up //------------------------------------------------- -// enumerate_sources - enumerate all possible +// enumerate_sources - enumerate all possible // sources for a memory view //------------------------------------------------- @@ -195,7 +195,7 @@ void debug_view_memory::enumerate_sources() //------------------------------------------------- -// view_notify - handle notification of updates +// view_notify - handle notification of updates // to cursor changes //------------------------------------------------- @@ -308,7 +308,7 @@ void debug_view_memory::view_update() //------------------------------------------------- -// view_char - handle a character typed within +// view_char - handle a character typed within // the current view //------------------------------------------------- @@ -426,7 +426,7 @@ void debug_view_memory::view_char(int chval) //------------------------------------------------- -// recompute - recompute the internal data and +// recompute - recompute the internal data and // structure of the memory view //------------------------------------------------- @@ -502,7 +502,7 @@ void debug_view_memory::recompute() //------------------------------------------------- -// needs_recompute - determine if anything has +// needs_recompute - determine if anything has // changed that requires a recomputation //------------------------------------------------- @@ -535,7 +535,7 @@ bool debug_view_memory::needs_recompute() //------------------------------------------------- -// get_cursor_pos - return the cursor position as +// get_cursor_pos - return the cursor position as // an address and a shift value //------------------------------------------------- @@ -569,7 +569,7 @@ debug_view_memory::cursor_pos debug_view_memory::get_cursor_pos() //------------------------------------------------- -// set_cursor_pos - set the cursor position as a +// set_cursor_pos - set the cursor position as a // function of an address and a shift value //------------------------------------------------- @@ -717,7 +717,7 @@ void debug_view_memory::write(UINT8 size, offs_t offs, UINT64 data) //------------------------------------------------- -// set_expression - set the expression string +// set_expression - set the expression string // describing the home address //------------------------------------------------- @@ -731,7 +731,7 @@ void debug_view_memory::set_expression(const char *expression) //------------------------------------------------- -// set_bytes_per_chunk - specify the number of +// set_bytes_per_chunk - specify the number of // bytes displayed per chunk //------------------------------------------------- @@ -756,7 +756,7 @@ void debug_view_memory::set_bytes_per_chunk(UINT8 chunkbytes) //------------------------------------------------- -// set_chunks_per_row - specify the number of +// set_chunks_per_row - specify the number of // chunks displayed across a row //------------------------------------------------- @@ -773,7 +773,7 @@ void debug_view_memory::set_chunks_per_row(UINT32 rowchunks) //------------------------------------------------- -// set_reverse - specify true if the memory view +// set_reverse - specify true if the memory view // is displayed reverse //------------------------------------------------- @@ -787,7 +787,7 @@ void debug_view_memory::set_reverse(bool reverse) //------------------------------------------------- -// set_ascii - specify TRUE if the memory view +// set_ascii - specify TRUE if the memory view // should display an ASCII representation //------------------------------------------------- @@ -801,8 +801,8 @@ void debug_view_memory::set_ascii(bool ascii) //------------------------------------------------- -// set_physical - specify true if the memory view -// should display physical addresses versus +// set_physical - specify true if the memory view +// should display physical addresses versus // logical addresses //------------------------------------------------- diff --git a/src/emu/debug/dvmemory.h b/src/emu/debug/dvmemory.h index ee1bfa7080d..3775885ff7e 100644 --- a/src/emu/debug/dvmemory.h +++ b/src/emu/debug/dvmemory.h @@ -51,7 +51,7 @@ class debug_view_memory_source : public debug_view_source { friend class debug_view_memory; - + debug_view_memory_source(const char *name, const address_space &space); debug_view_memory_source(const char *name, const region_info ®ion); debug_view_memory_source(const char *name, void *base, int element_size, int num_elements); diff --git a/src/emu/debug/dvstate.c b/src/emu/debug/dvstate.c index b161351837f..571ea4b1200 100644 --- a/src/emu/debug/dvstate.c +++ b/src/emu/debug/dvstate.c @@ -93,7 +93,7 @@ debug_view_state::~debug_view_state() //------------------------------------------------- -// enumerate_sources - enumerate all possible +// enumerate_sources - enumerate all possible // sources for a registers view //------------------------------------------------- @@ -133,7 +133,7 @@ void debug_view_state::reset() //------------------------------------------------- -// recompute - recompute all info for the +// recompute - recompute all info for the // registers view //------------------------------------------------- @@ -187,7 +187,7 @@ void debug_view_state::recompute() maxtaglen = MAX(maxtaglen, item->m_symbol.len()); maxvallen = MAX(maxvallen, item->m_vallen); } - + // set the current divider and total cols m_divider = 1 + maxtaglen + 1; m_total.x = 1 + maxtaglen + 2 + maxvallen + 1; @@ -213,7 +213,7 @@ void debug_view_state::view_notify(debug_view_notification type) //------------------------------------------------- -// view_update - update the contents of the +// view_update - update the contents of the // register view //------------------------------------------------- @@ -228,7 +228,7 @@ void debug_view_state::view_update() UINT64 total_cycles = 0; if (source.m_execintf != NULL) total_cycles = source.m_execintf->total_cycles(); - + // find the first entry state_item *curitem = m_state_list; for (int index = 0; curitem != NULL && index < m_topleft.y; index++) @@ -335,7 +335,7 @@ void debug_view_state::view_update() dest++; col++; } - + // advance to the next item curitem = curitem->m_next; } diff --git a/src/emu/debug/dvstate.h b/src/emu/debug/dvstate.h index b30c973728c..406ce2c35c6 100644 --- a/src/emu/debug/dvstate.h +++ b/src/emu/debug/dvstate.h @@ -51,7 +51,7 @@ class debug_view_state_source : public debug_view_source { friend class debug_view_state; - + // construction/destruction debug_view_state_source(const char *name, device_t &device); @@ -76,7 +76,7 @@ class debug_view_state : public debug_view // construction/destruction debug_view_state(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate); virtual ~debug_view_state(); - + protected: // view overrides virtual void view_update(); @@ -86,7 +86,7 @@ private: struct state_item { state_item(int index, const char *name, UINT8 valuechars); - + state_item * m_next; // next item UINT64 m_lastval; // last value UINT64 m_currval; // current value @@ -104,7 +104,7 @@ private: int m_divider; // dividing column UINT64 m_last_update; // execution counter at last update state_item * m_state_list; // state data - + // constants static const int REG_DIVIDER = -10; static const int REG_CYCLES = -11; diff --git a/src/emu/devcpu.c b/src/emu/devcpu.c index 55ea0991fe5..c8fc44d2ba2 100644 --- a/src/emu/devcpu.c +++ b/src/emu/devcpu.c @@ -82,7 +82,7 @@ legacy_cpu_device_config::legacy_cpu_device_config(const machine_config &mconfig m_space_config[spacenum].m_internal_map = reinterpret_cast<const addrmap_token *>(get_legacy_config_ptr(DEVINFO_PTR_INTERNAL_MEMORY_MAP + spacenum)); m_space_config[spacenum].m_default_map = reinterpret_cast<const addrmap_token *>(get_legacy_config_ptr(DEVINFO_PTR_DEFAULT_MEMORY_MAP + spacenum)); } - + // set the real name m_name = get_legacy_config_string(DEVINFO_STR_NAME); } diff --git a/src/emu/devcpu.h b/src/emu/devcpu.h index a245480abcb..d6eb1203742 100644 --- a/src/emu/devcpu.h +++ b/src/emu/devcpu.h @@ -209,7 +209,7 @@ device_config *basename##_device_config::static_alloc_device_config(const machin return global_alloc(basename##_device_config(mconfig, static_alloc_device_config, tag, owner, clock)); \ } \ \ -device_t *basename##_device_config::alloc_device(running_machine &machine) const \ +device_t *basename##_device_config::alloc_device(running_machine &machine) const \ { \ return pool_alloc(machine_get_pool(machine), basename##_device(machine, *this)); \ } \ diff --git a/src/emu/devimage.c b/src/emu/devimage.c index df10c054b4e..017ae1ccc68 100644 --- a/src/emu/devimage.c +++ b/src/emu/devimage.c @@ -183,7 +183,7 @@ legacy_image_device_config_base::~legacy_image_device_config_base() device_image_partialhash_func legacy_image_device_config_base::get_partial_hash() const { - return reinterpret_cast<device_image_partialhash_func>(get_legacy_config_fct(DEVINFO_FCT_IMAGE_PARTIAL_HASH)); + return reinterpret_cast<device_image_partialhash_func>(get_legacy_config_fct(DEVINFO_FCT_IMAGE_PARTIAL_HASH)); } @@ -225,7 +225,7 @@ bool legacy_image_device_base::is_loaded() image_error_t legacy_image_device_base::load_image_by_path(UINT32 open_flags, const char *path) { file_error filerr = FILERR_NOT_FOUND; - image_error_t err = IMAGE_ERROR_FILENOTFOUND; + image_error_t err = IMAGE_ERROR_FILENOTFOUND; astring revised_path; /* attempt to read the file */ @@ -272,7 +272,7 @@ image_error_t legacy_image_device_base::load_image_by_path(UINT32 open_flags, co return err; } - + /*------------------------------------------------- determine_open_plan - determines which open flags to use, and in what order @@ -312,7 +312,7 @@ bool legacy_image_device_base::load_internal(const char *path, bool is_create, i /* we are now loading */ m_is_loading = TRUE; - + /* record the filename */ err = set_image_filename(path); if (err) @@ -342,14 +342,14 @@ bool legacy_image_device_base::load_internal(const char *path, bool is_create, i m_year = m_software_info_ptr->year; //m_playable = m_software_info_ptr->supported; } - + /* did we fail to find the file? */ if (!is_loaded()) { err = IMAGE_ERROR_FILENOTFOUND; goto done; } - + /* call device load or create */ m_create_format = create_format; m_create_args = create_args; @@ -462,14 +462,14 @@ void legacy_image_device_base::clear() { if (m_file) { - core_fclose(m_file); + core_fclose(m_file); m_file = NULL; } m_name.reset(); m_writeable = FALSE; m_created = FALSE; - + m_longname.reset(); m_manufacturer.reset(); m_year.reset(); @@ -480,7 +480,7 @@ void legacy_image_device_base::clear() m_full_software_name = NULL; m_software_info_ptr = NULL; - m_software_part_ptr = NULL; + m_software_part_ptr = NULL; } /*------------------------------------------------- @@ -526,7 +526,7 @@ void legacy_image_device_base::call_display() device_image_partialhash_func legacy_image_device_base::get_partial_hash() { - return reinterpret_cast<device_image_partialhash_func>(m_config.get_legacy_config_fct(DEVINFO_FCT_IMAGE_PARTIAL_HASH)); + return reinterpret_cast<device_image_partialhash_func>(m_config.get_legacy_config_fct(DEVINFO_FCT_IMAGE_PARTIAL_HASH)); } void legacy_image_device_base::call_get_devices() @@ -534,7 +534,7 @@ void legacy_image_device_base::call_get_devices() device_image_get_devices_func func = reinterpret_cast<device_image_get_devices_func>(m_config.get_legacy_config_fct(DEVINFO_FCT_IMAGE_GET_DEVICES)); if (func) (*func)(*this); } - + void *legacy_image_device_base::get_device_specific_call() { return (void*) m_config.get_legacy_config_fct(DEVINFO_FCT_DEVICE_SPECIFIC); diff --git a/src/emu/devintrf.h b/src/emu/devintrf.h index ad7bd078c90..bad67836d9f 100644 --- a/src/emu/devintrf.h +++ b/src/emu/devintrf.h @@ -376,7 +376,7 @@ public: return true; return false; } - + // specialized helpers bool interface(device_execute_interface *&intf) { intf = m_execute; return (intf != NULL); } bool interface(device_memory_interface *&intf) { intf = m_memory; return (intf != NULL); } @@ -405,7 +405,7 @@ public: void set_clock_scale(double clockscale); attotime clocks_to_attotime(UINT64 clocks) const; UINT64 attotime_to_clocks(attotime duration) const; - + // debugging device_debug *debug() const { return m_debug; } void set_debug(device_debug &debug) { m_debug = &debug; } @@ -445,7 +445,7 @@ protected: running_machine & m_machine; device_debug * m_debug; - + // for speed device_execute_interface *m_execute; device_memory_interface *m_memory; diff --git a/src/emu/devlegcy.c b/src/emu/devlegcy.c index 14dcf130aec..d55412c17b2 100644 --- a/src/emu/devlegcy.c +++ b/src/emu/devlegcy.c @@ -58,7 +58,7 @@ legacy_device_config_base::legacy_device_config_base(const machine_config &mconf UINT32 configlen = (UINT32)get_legacy_config_int(DEVINFO_INT_INLINE_CONFIG_BYTES); if (configlen != 0) m_inline_config = global_alloc_array_clear(UINT8, configlen); - + // set the proper name m_name = get_legacy_config_string(DEVINFO_STR_NAME); } @@ -346,4 +346,4 @@ void legacy_nvram_device_base::nvram_write(mame_file &file) { device_nvram_func nvram_func = reinterpret_cast<device_nvram_func>(m_config.get_legacy_config_fct(DEVINFO_FCT_NVRAM)); (*nvram_func)(this, &file, TRUE); -}
\ No newline at end of file +} diff --git a/src/emu/devlegcy.h b/src/emu/devlegcy.h index 17dd462730a..7f5288be919 100644 --- a/src/emu/devlegcy.h +++ b/src/emu/devlegcy.h @@ -613,7 +613,7 @@ protected: astring m_instance_name; astring m_brief_instance_name; astring m_interface_name; - + /* creation info */ const option_guide *m_create_option_guide; image_device_format *m_formatlist; @@ -630,8 +630,8 @@ public: virtual bool load(const char *path); virtual bool finish_load(); virtual void unload(); - virtual bool create(const char *path, const image_device_format *create_format, option_resolution *create_args); - + virtual bool create(const char *path, const image_device_format *create_format, option_resolution *create_args); + virtual int call_load(); virtual int call_create(int format_type, option_resolution *format_options); virtual void call_unload(); @@ -646,9 +646,9 @@ protected: bool load_internal(const char *path, bool is_create, int create_format, option_resolution *create_args); void determine_open_plan(int is_create, UINT32 *open_plan); image_error_t load_image_by_path(UINT32 open_flags, const char *path); - void clear(); + void clear(); bool is_loaded(); - + bool m_is_loading; }; diff --git a/src/emu/diimage.c b/src/emu/diimage.c index d2aa51b879f..fa50ccf7703 100644 --- a/src/emu/diimage.c +++ b/src/emu/diimage.c @@ -175,7 +175,7 @@ static void memory_error(const char *message) device_image_interface::device_image_interface(running_machine &machine, const device_config &config, device_t &device) : device_interface(machine, config, device), - m_image_config(dynamic_cast<const device_config_image_interface &>(config)), + m_image_config(dynamic_cast<const device_config_image_interface &>(config)), m_file(NULL), m_full_software_name(NULL), m_software_info_ptr(NULL), @@ -192,7 +192,7 @@ device_image_interface::device_image_interface(running_machine &machine, const d device_image_interface::~device_image_interface() { - pool_free_lib(m_mempool); + pool_free_lib(m_mempool); } /*------------------------------------------------- @@ -205,7 +205,7 @@ image_error_t device_image_interface::set_image_filename(const char *filename) m_name = filename; zippath_parent(&m_working_directory, filename); m_basename = m_name.cpy(m_name); - + int loc1 = m_name.rchr(0,'\\'); int loc2 = m_name.rchr(0,'/'); int loc3 = m_name.rchr(0,':'); @@ -328,7 +328,7 @@ void device_image_interface::seterror(image_error_t err, const char *message) void device_image_interface::message(const char *format, ...) { va_list args; - char buffer[256]; + char buffer[256]; /* format the message */ va_start(args, format); @@ -412,7 +412,7 @@ void device_image_interface::setup_working_directory() // valid even if not mounted //------------------------------------------------- -const char * device_image_interface::working_directory() +const char * device_image_interface::working_directory() { /* check to see if we've never initialized the working directory */ if (m_working_directory.len() == 0) @@ -544,7 +544,7 @@ int device_image_interface::read_hash_config(const char *sysname) goto done; /* copy the relevant entries */ - m_longname = info->longname ? astring(info->longname) : ""; + m_longname = info->longname ? astring(info->longname) : ""; m_manufacturer = info->manufacturer ? astring(info->manufacturer) : ""; m_year = info->year ? astring(info->year) : ""; m_playable = info->playable ? astring(info->playable) : ""; @@ -625,11 +625,11 @@ void device_image_interface::image_checkhash() return; } -UINT32 device_image_interface::crc() -{ +UINT32 device_image_interface::crc() +{ UINT32 crc = 0; - image_checkhash(); + image_checkhash(); if (m_hash != NULL) crc = hash_data_extract_crc32(m_hash); @@ -671,4 +671,4 @@ void device_image_interface::battery_save(const void *buffer, int length) image_battery_save_by_name(astring_c(fname), buffer, length); astring_free(fname); } -
\ No newline at end of file + diff --git a/src/emu/diimage.h b/src/emu/diimage.h index c5e530cc479..cab1a0713af 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -170,13 +170,13 @@ public: virtual bool uses_file_extension(const char *file_extension) const = 0; virtual const option_guide *create_option_guide() const = 0; virtual image_device_format *formatlist() const = 0; - + static const char *device_typename(iodevice_t type); - static const char *device_brieftypename(iodevice_t type); + static const char *device_brieftypename(iodevice_t type); static iodevice_t device_typeid(const char *name); virtual device_image_partialhash_func get_partial_hash() const = 0; - virtual void device_compute_hash(char *dest, const void *data, size_t length, unsigned int functions) const; + virtual void device_compute_hash(char *dest, const void *data, size_t length, unsigned int functions) const; protected: static const image_device_type_info *find_device_type(iodevice_t type); static const image_device_type_info m_device_info_array[]; @@ -198,7 +198,7 @@ public: virtual bool load(const char *path) = 0; virtual bool finish_load() = 0; virtual void unload() = 0; - + virtual int call_load() = 0; virtual int call_create(int format_type, option_resolution *format_options) = 0; virtual void call_unload() = 0; @@ -206,14 +206,14 @@ public: virtual device_image_partialhash_func get_partial_hash() = 0; virtual void call_get_devices() = 0; virtual void *get_device_specific_call() = 0; - + virtual const image_device_format *device_get_indexed_creatable_format(int index); virtual const image_device_format *device_get_named_creatable_format(const char *format_name); const option_guide *device_get_creation_option_guide() { return m_image_config.create_option_guide(); } - const image_device_format *device_get_creatable_formats() { return m_image_config.formatlist(); } + const image_device_format *device_get_creatable_formats() { return m_image_config.formatlist(); } virtual bool create(const char *path, const image_device_format *create_format, option_resolution *create_args) = 0; - + const char *error(); void seterror(image_error_t err, const char *message); void message(const char *format, ...); @@ -234,34 +234,34 @@ public: UINT64 ftell() { check_for_file(); return core_ftell(m_file); } int fgetc() { char ch; if (fread(&ch, 1) != 1) ch = '\0'; return ch; } char *fgets(char *buffer, UINT32 length) { check_for_file(); return core_fgets(buffer, length, m_file); } - int feof() { check_for_file(); return core_feof(m_file); } - void *ptr() {check_for_file(); return (void *) core_fbuffer(m_file); } + int feof() { check_for_file(); return core_feof(m_file); } + void *ptr() {check_for_file(); return (void *) core_fbuffer(m_file); } // configuration access const device_config_image_interface &image_config() const { return m_image_config; } - + void set_init_phase() { m_init_phase = TRUE; } - + const char* longname() { return m_longname; } const char* manufacturer() { return m_manufacturer; } const char* year() { return m_year; } const char* playable() { return m_playable; } const char* pcb() { return m_pcb; } const char* extrainfo() { return m_extrainfo; } - + const software_info *software_entry() { return m_software_info_ptr; } - + virtual void set_working_directory(const char *working_directory) { m_working_directory = working_directory; } - virtual const char * working_directory(); - + virtual const char * working_directory(); + UINT8 *get_software_region(const char *tag); UINT32 get_software_region_length(const char *tag); const char *get_feature(const char *feature_name); - + void *image_malloc(size_t size); char *image_strdup(const char *src); void *image_realloc(void *ptr, size_t size); void image_freeptr(void *ptr); - + UINT32 crc(); void battery_load(void *buffer, int length, int fill); @@ -270,9 +270,9 @@ protected: image_error_t set_image_filename(const char *filename); void clear_error(); - + void check_for_file() { assert_always(m_file != NULL, "Illegal operation on unmounted image"); } - + void setup_working_directory(); bool try_change_working_directory(const char *subdir); @@ -282,22 +282,22 @@ protected: // derived class overrides // configuration - const device_config_image_interface &m_image_config; // reference to our device_config_execute_interface + const device_config_image_interface &m_image_config; // reference to our device_config_execute_interface /* error related info */ image_error_t m_err; - astring m_err_message; - + astring m_err_message; + /* variables that are only non-zero when an image is mounted */ - core_file *m_file; - astring m_name; + core_file *m_file; + astring m_name; astring m_basename; astring m_basename_noext; astring m_filetype; /* working directory; persists across mounts */ astring m_working_directory; - + /* Software information */ char *m_full_software_name; software_info *m_software_info_ptr; @@ -313,15 +313,15 @@ protected: /* flags */ bool m_writeable; - bool m_created; + bool m_created; bool m_init_phase; - + /* special - used when creating */ int m_create_format; option_resolution *m_create_args; - + object_pool *m_mempool; - + char *m_hash; }; diff --git a/src/emu/image.c b/src/emu/image.c index 67f48a23d77..12267c78c3b 100644 --- a/src/emu/image.c +++ b/src/emu/image.c @@ -68,7 +68,7 @@ static void image_dirs_load(running_machine *machine, int config_type, xml_data_ const char *dev_instance; const char *working_directory; device_image_interface *image = NULL; - + if ((config_type == CONFIG_TYPE_GAME) && (parentnode != NULL)) { for (node = xml_get_sibling(parentnode->child, "device"); node; node = xml_get_sibling(node->next, "device")) @@ -83,7 +83,7 @@ static void image_dirs_load(running_machine *machine, int config_type, xml_data_ working_directory = xml_get_attribute_string(node, "directory", NULL); if (working_directory != NULL) image->set_working_directory(working_directory); - } + } } } } @@ -115,7 +115,7 @@ static void image_dirs_save(running_machine *machine, int config_type, xml_data_ { xml_set_attribute(node, "instance", dev_instance); xml_set_attribute(node, "directory", image->working_directory()); - } + } } } } @@ -160,16 +160,16 @@ static void image_options_extract(running_machine *machine) { /* only extract the device options if we've added them */ if (options_get_bool(machine->options(), OPTION_ADDED_DEVICE_OPTIONS)) { - int index = 0; + int index = 0; device_image_interface *image = NULL; for (bool gotone = machine->m_devicelist.first(image); gotone; gotone = image->next(image)) - { + { const char *filename = image->filename(); /* and set the option */ - options_set_string(machine->options(), image->image_config().instance_name() , filename ? filename : "", OPTION_PRIORITY_CMDLINE); - + options_set_string(machine->options(), image->image_config().instance_name() , filename ? filename : "", OPTION_PRIORITY_CMDLINE); + index++; } } @@ -188,7 +188,7 @@ void image_unload_all(running_machine &machine) { device_image_interface *image = NULL; - // extract the options + // extract the options image_options_extract(&machine); for (bool gotone = machine.m_devicelist.first(image); gotone; gotone = image->next(image)) @@ -217,7 +217,7 @@ void image_device_init(running_machine *machine) { /* mark init state */ image->set_init_phase(); - + /* try to load this image */ bool result = image->load(image_name); @@ -245,7 +245,7 @@ void image_device_init(running_machine *machine) fatalerror_exitcode(machine, MAMERR_DEVICE, "Driver requires that device \"%s\" must have an image to load", image->image_config().instance_name()); } } - + image->call_get_devices(); } } @@ -434,7 +434,7 @@ astring *image_info_astring(running_machine *machine, astring *string) else { astring_catprintf(string, "%s: ---\n", image->image_config().devconfig().name()); - } + } } return string; } @@ -489,7 +489,7 @@ void image_battery_save_by_name(const char *filename, const void *buffer, int le /*------------------------------------------------- image_from_absolute_index - retreives index number - of image in device list + of image in device list -------------------------------------------------*/ device_image_interface *image_from_absolute_index(running_machine *machine, int absolute_index) { @@ -506,21 +506,21 @@ device_image_interface *image_from_absolute_index(running_machine *machine, int /*------------------------------------------------- image_add_device_with_subdevices - adds - device with parameters sent, and all subdevices - from it's machine config devices list + device with parameters sent, and all subdevices + from it's machine config devices list -------------------------------------------------*/ void image_add_device_with_subdevices(device_t *owner, device_type type, const char *tag, UINT32 clock) { astring tempstring; - device_list *device_list = &owner->machine->m_devicelist; + device_list *device_list = &owner->machine->m_devicelist; machine_config *config = (machine_config *)owner->machine->config; - + device_config *devconfig = type(*config, owner->subtag(tempstring,tag), &owner->baseconfig(), clock); running_device *device = device_list->append(devconfig->tag(), devconfig->alloc_device(*owner->machine)); - + const machine_config_token *tokens = device->machine_config_tokens(); - if (tokens != NULL) - { + if (tokens != NULL) + { config->detokenize(tokens,devconfig); for (const device_config *config_dev = config->m_devicelist.first(); config_dev != NULL; config_dev = config_dev->next()) { diff --git a/src/emu/machine.c b/src/emu/machine.c index 7d4a3fce979..bb570ca7452 100644 --- a/src/emu/machine.c +++ b/src/emu/machine.c @@ -79,7 +79,7 @@ - calls debugger_init() [debugger.c] to set up the debugger - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks - calls cheat_init() [cheat.c] to initialize the cheat system - - calls image_init() [image.c] to initialize the image system + - calls image_init() [image.c] to initialize the image system - calls config_load_settings() [config.c] to load the configuration file - calls nvram_load [machine/generic.c] to load NVRAM @@ -313,7 +313,7 @@ void running_machine::start() // start up the devices m_devicelist.start_all(); - + // call the game driver's init function // this is where decryption is done and memory maps are altered // so this location in the init order is important @@ -481,7 +481,7 @@ void running_machine::schedule_exit() //------------------------------------------------- -// schedule_hard_reset - schedule a hard-reset of +// schedule_hard_reset - schedule a hard-reset of // the machine //------------------------------------------------- @@ -495,7 +495,7 @@ void running_machine::schedule_hard_reset() //------------------------------------------------- -// schedule_soft_reset - schedule a soft-reset of +// schedule_soft_reset - schedule a soft-reset of // the system //------------------------------------------------- @@ -512,7 +512,7 @@ void running_machine::schedule_soft_reset() //------------------------------------------------- -// schedule_new_driver - schedule a new game to +// schedule_new_driver - schedule a new game to // be loaded //------------------------------------------------- @@ -548,7 +548,7 @@ void running_machine::set_saveload_filename(const char *filename) //------------------------------------------------- -// schedule_save - schedule a save to occur as +// schedule_save - schedule a save to occur as // soon as possible //------------------------------------------------- @@ -567,7 +567,7 @@ void running_machine::schedule_save(const char *filename) //------------------------------------------------- -// schedule_load - schedule a load to occur as +// schedule_load - schedule a load to occur as // soon as possible //------------------------------------------------- @@ -595,7 +595,7 @@ void running_machine::pause() if (m_paused) return; m_paused = true; - + // call the callbacks call_notifiers(MACHINE_NOTIFY_PAUSE); } @@ -611,7 +611,7 @@ void running_machine::resume() if (!m_paused) return; m_paused = false; - + // call the callbacks call_notifiers(MACHINE_NOTIFY_RESUME); } @@ -651,7 +651,7 @@ void running_machine::region_free(const char *name) void running_machine::add_notifier(machine_notification event, notify_callback callback) { assert_always(m_current_phase == MACHINE_PHASE_INIT, "Can only call add_notifier at init time!"); - + // exit notifiers are added to the head, and executed in reverse order if (event == MACHINE_NOTIFY_EXIT) { @@ -726,7 +726,7 @@ void CLIB_DECL running_machine::vlogerror(const char *format, va_list args) //------------------------------------------------- -// base_datetime - retrieve the time of the host +// base_datetime - retrieve the time of the host // system; useful for RTC implementations //------------------------------------------------- @@ -737,8 +737,8 @@ void running_machine::base_datetime(system_time &systime) //------------------------------------------------- -// current_datetime - retrieve the current time -// (offset by the base); useful for RTC +// current_datetime - retrieve the current time +// (offset by the base); useful for RTC // implementations //------------------------------------------------- @@ -790,7 +790,7 @@ void running_machine::handle_saveload() if (m_saveload_pending_file.len() == 0) goto cancel; - // if there are anonymous timers, we can't save just yet, and we can't load yet either + // if there are anonymous timers, we can't save just yet, and we can't load yet either // because the timers might overwrite data we have loaded if (timer_count_anonymous(this) > 0) { @@ -990,7 +990,7 @@ void system_time::set(time_t t) //------------------------------------------------- -// get_tm_time - converts a tm struction to a +// get_tm_time - converts a tm struction to a // MAME mame_system_tm structure //------------------------------------------------- diff --git a/src/emu/machine.h b/src/emu/machine.h index 25e4666b012..158ce49257e 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -183,7 +183,7 @@ public: endianness_t endianness() const { return ((m_flags & ROMREGION_ENDIANMASK) == ROMREGION_LE) ? ENDIANNESS_LITTLE : ENDIANNESS_BIG; } UINT8 width() const { return 1 << ((m_flags & ROMREGION_WIDTHMASK) >> 8); } bool invert() const { return ((m_flags & ROMREGION_INVERTMASK) != 0); } - + // data access UINT8 &u8(offs_t offset = 0) const { return m_base.u8[offset]; } UINT16 &u16(offs_t offset = 0) const { return m_base.u16[offset]; } @@ -241,20 +241,20 @@ public: { void set(struct tm &t); - UINT8 second; // seconds (0-59) - UINT8 minute; // minutes (0-59) - UINT8 hour; // hours (0-23) - UINT8 mday; // day of month (1-31) - UINT8 month; // month (0-11) - INT32 year; // year (1=1 AD) - UINT8 weekday; // day of week (0-6) - UINT16 day; // day of year (0-365) - UINT8 is_dst; // is this daylight savings? + UINT8 second; // seconds (0-59) + UINT8 minute; // minutes (0-59) + UINT8 hour; // hours (0-23) + UINT8 mday; // day of month (1-31) + UINT8 month; // month (0-11) + INT32 year; // year (1=1 AD) + UINT8 weekday; // day of week (0-6) + UINT16 day; // day of year (0-365) + UINT8 is_dst; // is this daylight savings? }; - INT64 time; // number of seconds elapsed since midnight, January 1 1970 UTC - full_time local_time; // local time - full_time utc_time; // UTC coordinated time + INT64 time; // number of seconds elapsed since midnight, January 1 1970 UTC + full_time local_time; // local time + full_time utc_time; // UTC coordinated time }; @@ -270,16 +270,16 @@ public: // construction/destruction running_machine(const game_driver &driver, const machine_config &config, core_options &options, bool exit_to_game_select = false); ~running_machine(); - + // fetch items by name inline device_t *device(const char *tag); template<class T> inline T *device(const char *tag) { return downcast<T *>(device(tag)); } inline const input_port_config *port(const char *tag); inline const region_info *region(const char *tag); - + // configuration helpers UINT32 total_colors() const { return m_config.m_total_colors; } - + // getters const char *basename() const { return m_basename; } core_options *options() const { return &m_options; } @@ -299,7 +299,7 @@ public: void add_notifier(machine_notification event, notify_callback callback); void call_notifiers(machine_notification which); void add_logerror_callback(logerror_callback callback); - + // scheduled operations void schedule_exit(); void schedule_hard_reset(); @@ -311,7 +311,7 @@ public: // time void base_datetime(system_time &systime); void current_datetime(system_time &systime); - + // regions region_info *region_alloc(const char *name, UINT32 length, UINT32 flags); void region_free(const char *name); @@ -392,7 +392,7 @@ private: void set_saveload_filename(const char *filename); void fill_systime(system_time &systime, time_t t); void handle_saveload(); - + static TIMER_CALLBACK( static_soft_reset ); void soft_reset(); @@ -406,7 +406,7 @@ private: notify_callback m_func; }; notifier_callback_item *m_notifier_list[MACHINE_NOTIFY_COUNT]; - + // logerror callbacks struct logerror_callback_item { @@ -437,7 +437,7 @@ private: SLS_NONE, SLS_SAVE, SLS_LOAD - }; + }; saveload_schedule m_saveload_schedule; attotime m_saveload_schedule_time; astring m_saveload_pending_file; diff --git a/src/emu/machine/generic.c b/src/emu/machine/generic.c index c2e5282abdc..633ebe8f6a5 100644 --- a/src/emu/machine/generic.c +++ b/src/emu/machine/generic.c @@ -92,7 +92,7 @@ void generic_machine_init(running_machine *machine) state->coinlockedout[counternum] = 0; } - // map devices to the interrupt state + // map devices to the interrupt state memset(state->interrupt_device, 0, sizeof(state->interrupt_device)); device_execute_interface *exec; int index = 0; diff --git a/src/emu/machine/z80dart.c b/src/emu/machine/z80dart.c index 86e2162cf6d..834a32dd1b8 100644 --- a/src/emu/machine/z80dart.c +++ b/src/emu/machine/z80dart.c @@ -458,7 +458,7 @@ void z80dart_device::dart_channel::start(z80dart_device *device, int index, cons { m_index = index; m_device = device; - + devcb_resolve_read_line(&m_in_rxd_func, &in_rxd, m_device); devcb_resolve_write_line(&m_out_txd_func, &out_txd, m_device); devcb_resolve_write_line(&m_out_dtr_func, &out_dtr, m_device); diff --git a/src/emu/mame.c b/src/emu/mame.c index d20b1f83720..22defdd68b2 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -51,7 +51,7 @@ - calls debugger_init() [debugger.c] to set up the debugger - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks - calls cheat_init() [cheat.c] to initialize the cheat system - - calls image_init() [image.c] to initialize the image system + - calls image_init() [image.c] to initialize the image system - calls config_load_settings() [config.c] to load the configuration file - calls nvram_load [machine/generic.c] to load NVRAM @@ -187,7 +187,7 @@ int mame_execute(core_options *options) options_revert(options, OPTION_PRIORITY_INI); mame_parse_ini_files(options, driver); } - + // create the machine configuration const machine_config *config = global_alloc(machine_config(driver->machine_config)); @@ -196,11 +196,11 @@ int mame_execute(core_options *options) // looooong term: remove this global_machine = machine; - + // run the machine error = machine->run(firstrun); firstrun = false; - + // check the state of the machine if (machine->new_driver_pending()) { diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c index cdae9af9cb3..22d47fd31b2 100644 --- a/src/emu/mconfig.c +++ b/src/emu/mconfig.c @@ -94,7 +94,7 @@ void machine_config::detokenize(const machine_config_token *tokens, const device { device_config *device = NULL; astring tempstring; - + // increase the parse level m_parse_level++; @@ -278,7 +278,7 @@ void machine_config::detokenize(const machine_config_token *tokens, const device break; } } - + // if we started at parse level 0 (and are thus at level 1), do post-processing if (m_parse_level == 1) { @@ -299,7 +299,7 @@ void machine_config::detokenize(const machine_config_token *tokens, const device devconfig->m_config_complete = true; } } - + // bump down the parse level m_parse_level--; } diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h index 254caa707d3..0d00cb5c9ee 100644 --- a/src/emu/mconfig.h +++ b/src/emu/mconfig.h @@ -243,11 +243,11 @@ class machine_config DISABLE_COPYING(machine_config); friend class running_machine; - + public: machine_config(const machine_config_token *tokens); ~machine_config(); - + void detokenize(const machine_config_token *tokens, const device_config *owner = NULL); driver_data_alloc_func m_driver_data_alloc; // allocator for driver data @@ -260,15 +260,15 @@ public: machine_start_func m_machine_start; // one-time machine start callback machine_reset_func m_machine_reset; // machine reset callback - nvram_handler_func m_nvram_handler; // NVRAM save/load callback - memcard_handler_func m_memcard_handler; // memory card save/load callback + nvram_handler_func m_nvram_handler; // NVRAM save/load callback + memcard_handler_func m_memcard_handler; // memory card save/load callback UINT32 m_video_attributes; // flags describing the video system const gfx_decode_entry *m_gfxdecodeinfo; // pointer to array of graphics decoding information UINT32 m_total_colors; // total number of colors in the palette const char * m_default_layout; // default layout for this machine - palette_init_func m_init_palette; // one-time palette init callback + palette_init_func m_init_palette; // one-time palette init callback video_start_func m_video_start; // one-time video start callback video_reset_func m_video_reset; // video reset callback video_eof_func m_video_eof; // end-of-frame video callback diff --git a/src/emu/memory.c b/src/emu/memory.c index 74949e30546..9550c79a8b6 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -1848,7 +1848,7 @@ static void memory_init_preflight(running_machine *machine) const region_info *region = machine->region(entry->region); if (region == NULL) fatalerror("Error: device '%s' %s space memory map entry %X-%X references non-existant region \"%s\"", space->cpu->tag(), space->name, entry->addrstart, entry->addrend, entry->region); - + /* validate the region */ if (entry->rgnoffs + (entry->byteend - entry->bytestart + 1) > region->bytes()) fatalerror("Error: device '%s' %s space memory map entry %X-%X extends beyond region \"%s\" size (%X)", space->cpu->tag(), space->name, entry->addrstart, entry->addrend, entry->region, region->bytes()); diff --git a/src/emu/softlist.c b/src/emu/softlist.c index b2b12755897..f1306f91e25 100644 --- a/src/emu/softlist.c +++ b/src/emu/softlist.c @@ -995,7 +995,7 @@ bool load_software_part(device_image_interface *image, const char *path, softwar { if ( swlists ) { - + software_list_config *swlist = (software_list_config *)downcast<const legacy_device_config_base *>(&swlists->baseconfig())->inline_config(); UINT32 i = DEVINFO_STR_SWLIST_0; @@ -1378,7 +1378,7 @@ static void ui_mess_menu_populate_software_list(running_machine *machine, ui_men { bool haveCompatible = FALSE; const char *interface = image->image_config().image_interface(); - + for (const device_config *dev = machine->config->m_devicelist.first(SOFTWARE_LIST); dev != NULL; dev = dev->typenext()) { software_list_config *swlist = (software_list_config *)downcast<const legacy_device_config_base *>(dev)->inline_config(); @@ -1398,7 +1398,7 @@ static void ui_mess_menu_populate_software_list(running_machine *machine, ui_men if (strcmp(interface,part->interface_)==0) { found = TRUE; } - } + } if (found) { ui_menu_item_append(menu, list->description, NULL, 0, swlist->list_name[i]); } @@ -1408,7 +1408,7 @@ static void ui_mess_menu_populate_software_list(running_machine *machine, ui_men } } } - + for (const device_config *dev = machine->config->m_devicelist.first(SOFTWARE_LIST); dev != NULL; dev = dev->typenext()) { software_list_config *swlist = (software_list_config *)downcast<const legacy_device_config_base *>(dev)->inline_config(); @@ -1428,7 +1428,7 @@ static void ui_mess_menu_populate_software_list(running_machine *machine, ui_men if (strcmp(interface,part->interface_)==0) { found = TRUE; } - } + } if (found) { if (!haveCompatible) { ui_menu_item_append(menu, "[compatible lists]", NULL, 0, NULL); @@ -1442,7 +1442,7 @@ static void ui_mess_menu_populate_software_list(running_machine *machine, ui_men } } } - + } void ui_image_menu_software(running_machine *machine, ui_menu *menu, void *parameter, void *state) diff --git a/src/emu/sound/tms5220.c b/src/emu/sound/tms5220.c index 89ff8e894ca..958fe22a00d 100644 --- a/src/emu/sound/tms5220.c +++ b/src/emu/sound/tms5220.c @@ -142,7 +142,7 @@ OLDE is a status flag which is only used for determining whether frame being parsed (which will become the new target frame) is zero. It is used for determining whether interpolation of the next frame is inhibited or not. It is updated at IP=0 PC=0 T=16. See next section. - + Interpolation is inhibited (i.e. interpolation at IP frames will not happen except for IP=0) under the following circumstances: "P=0" != "OLDP" ("P=0" = 1, and OLDP = 0; OR "P=0" = 0, and OLDP = 1) @@ -150,7 +150,7 @@ Interpolation is inhibited (i.e. interpolation at IP frames will not happen versa. "OLDE" = 1 and "E=0" = 0 This means the new frame is not silent, and the old frame was silent. - + ****Documentation of chip commands:*** diff --git a/src/emu/ui.c b/src/emu/ui.c index 22f412daefd..4d7bee73518 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -1261,8 +1261,8 @@ void ui_paste(running_machine *machine) } /*------------------------------------------------- - ui_image_handler_ingame - execute display - callback function for each image device + ui_image_handler_ingame - execute display + callback function for each image device -------------------------------------------------*/ void ui_image_handler_ingame(running_machine *machine) diff --git a/src/emu/uimenu.c b/src/emu/uimenu.c index 9e46dd8bd9d..a75703b61fd 100644 --- a/src/emu/uimenu.c +++ b/src/emu/uimenu.c @@ -1537,7 +1537,7 @@ static void menu_main_populate(running_machine *machine, ui_menu *menu, void *st ui_menu_item_append(menu, CAPSTARTGAMENOUN " Information", NULL, 0, (void *)menu_game_info); device_image_interface *image = NULL; - if (machine->m_devicelist.first(image)) + if (machine->m_devicelist.first(image)) { /* add image info menu */ ui_menu_item_append(menu, "Image Information", NULL, 0, (void*)ui_image_menu_image_info); |
