Cleanups and version bump.

This commit is contained in:
Aaron Giles 2010-07-06 17:30:28 +00:00
parent bcd97e9880
commit 30662dcdef
63 changed files with 811 additions and 811 deletions

View File

@ -409,7 +409,7 @@ void cheat_reload(running_machine *machine)
/* load the cheat file, MESS will load a crc32.xml ( eg. 01234567.xml ) /* load the cheat file, MESS will load a crc32.xml ( eg. 01234567.xml )
and MAME will load gamename.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)) for (bool gotone = machine->m_devicelist.first(image); gotone; gotone = image->next(image))
{ {
if (image->exists()) 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()); cheatinfo->cheatlist = cheat_list_load(machine, machine->basename());
} }

View File

@ -97,7 +97,7 @@ static const options_entry cli_options[] =
{ "listdevices;ld", "0", OPTION_COMMAND, "list available devices" }, { "listdevices;ld", "0", OPTION_COMMAND, "list available devices" },
{ "listmedia;lm", "0", OPTION_COMMAND, "list available media for the system" }, { "listmedia;lm", "0", OPTION_COMMAND, "list available media for the system" },
{ "listsoftware", "0", OPTION_COMMAND, "list known software for the system" }, { "listsoftware", "0", OPTION_COMMAND, "list known software for the system" },
{ NULL } { 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 ); fprintf( out, "\t\t\t<part name=\"%s\"", part->name );
if ( part->interface_ ) if ( part->interface_ )
fprintf( out, " interface=\"%s\"", part->interface_ ); fprintf( out, " interface=\"%s\"", part->interface_ );
// if ( part->feature ) // if ( part->feature )
// fprintf( out, " features=\"%s\"", part->feature ); // fprintf( out, " features=\"%s\"", part->feature );
fprintf( out, ">\n"); fprintf( out, ">\n");
/* TODO: display rom region information */ /* 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 softlist_match_roms - scan for a matching
software ROM by hash software ROM by hash
-------------------------------------------------*/ -------------------------------------------------*/
static void softlist_match_roms(core_options *options, const char *hash, int length, int *found) 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); printf("%-13s%-12s%-8s ", driver_name, name, paren_shortname);
driver_name = " "; driver_name = " ";
astring extensions(src); astring extensions(src);
char *ext = strtok((char*)extensions.cstr(),","); char *ext = strtok((char*)extensions.cstr(),",");
while (ext != NULL) while (ext != NULL)

View File

@ -512,7 +512,7 @@ struct _tms99xx_state
INLINE tms99xx_state *get_safe_token(running_device *device) INLINE tms99xx_state *get_safe_token(running_device *device)
{ {
assert(device != NULL); assert(device != NULL);
// assert(device->type() == TMS99XX_GET_INFO); // assert(device->type() == TMS99XX_GET_INFO);
return (tms99xx_state *)downcast<legacy_cpu_device *>(device)->token(); return (tms99xx_state *)downcast<legacy_cpu_device *>(device)->token();
} }

View File

@ -1529,7 +1529,7 @@ static UINT64 get_cpunum(void *globalref, void *ref)
{ {
running_machine *machine = (running_machine *)globalref; running_machine *machine = (running_machine *)globalref;
device_t *target = machine->debugcpu_data->visiblecpu; device_t *target = machine->debugcpu_data->visiblecpu;
device_execute_interface *exec; device_execute_interface *exec;
int index = 0; int index = 0;
for (bool gotone = machine->m_devicelist.first(exec); gotone; gotone = exec->next(exec)) 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_pc_history, 0, sizeof(m_pc_history));
memset(m_wplist, 0, sizeof(m_wplist)); memset(m_wplist, 0, sizeof(m_wplist));
// find out which interfaces we have to work with // find out which interfaces we have to work with
device.interface(m_exec); device.interface(m_exec);
device.interface(m_memory); 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 // add a global symbol for the current instruction pointer
if (m_exec != NULL) if (m_exec != NULL)
symtable_add_register(m_symtable, "cycles", NULL, get_cycles, NULL); symtable_add_register(m_symtable, "cycles", NULL, get_cycles, NULL);
// add entries to enable/disable unmap reporting for each space // add entries to enable/disable unmap reporting for each space
if (m_memory != NULL) 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_flags = DEBUG_FLAG_OBSERVING | DEBUG_FLAG_HISTORY;
m_opwidth = min_opcode_bytes(); m_opwidth = min_opcode_bytes();
// if no curpc, add one // if no curpc, add one
if (m_state != NULL && symtable_find(m_symtable, "curpc") == NULL) if (m_state != NULL && symtable_find(m_symtable, "curpc") == NULL)
symtable_add_register(m_symtable, "curpc", NULL, get_current_pc, 0); symtable_add_register(m_symtable, "curpc", NULL, get_current_pc, 0);
@ -1632,7 +1632,7 @@ device_debug::~device_debug()
// free the symbol table // free the symbol table
if (m_symtable != NULL) if (m_symtable != NULL)
symtable_free(m_symtable); symtable_free(m_symtable);
// free breakpoints and watchpoints // free breakpoints and watchpoints
breakpoint_clear_all(); breakpoint_clear_all();
watchpoint_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 // 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 // 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 // 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 // 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 // before executing each instruction
//------------------------------------------------- //-------------------------------------------------
@ -1889,8 +1889,8 @@ void device_debug::instruction_hook(offs_t curpc)
//------------------------------------------------- //-------------------------------------------------
// memory_read_hook - the memory system calls // memory_read_hook - the memory system calls
// this hook when watchpoints are enabled and a // this hook when watchpoints are enabled and a
// memory read happens // 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 // memory_write_hook - the memory system calls
// this hook when watchpoints are enabled and a // this hook when watchpoints are enabled and a
// memory write happens // 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 // 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 // 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 // requested number of instructions
//------------------------------------------------- //-------------------------------------------------
void device_debug::single_step(int numsteps) void device_debug::single_step(int numsteps)
{ {
debugcpu_private *global = m_device.machine->debugcpu_data; debugcpu_private *global = m_device.machine->debugcpu_data;
assert(m_exec != NULL); assert(m_exec != NULL);
m_stepsleft = numsteps; 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // returning its index
//------------------------------------------------- //-------------------------------------------------
@ -2187,7 +2187,7 @@ int device_debug::breakpoint_set(offs_t address, parsed_expression *condition, c
// hook it into our list // hook it into our list
bp->m_next = m_bplist; bp->m_next = m_bplist;
m_bplist = bp; m_bplist = bp;
// update the flags and return the index // update the flags and return the index
breakpoint_update_flags(); breakpoint_update_flags();
return bp->m_index; 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 // 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 // hook it into our list
wp->m_next = m_wplist[space.spacenum]; wp->m_next = m_wplist[space.spacenum];
m_wplist[space.spacenum] = wp; m_wplist[space.spacenum] = wp;
// update the flags and return the index // update the flags and return the index
watchpoint_update_flags(wp->m_space); watchpoint_update_flags(wp->m_space);
return wp->m_index; 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 // 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 // memory read access
//------------------------------------------------- //-------------------------------------------------
@ -2836,7 +2836,7 @@ device_debug::breakpoint::breakpoint(int index, offs_t address, parsed_expressio
m_action((action != NULL) ? action : "") m_action((action != NULL) ? action : "")
{ {
} }
//------------------------------------------------- //-------------------------------------------------
// ~breakpoint - destructor // ~breakpoint - destructor
@ -2854,7 +2854,7 @@ device_debug::breakpoint::~breakpoint()
//------------------------------------------------- //-------------------------------------------------
bool device_debug::breakpoint::hit(offs_t pc) bool device_debug::breakpoint::hit(offs_t pc)
{ {
// don't hit if disabled // don't hit if disabled
if (!m_enabled) if (!m_enabled)
return false; return false;
@ -2862,12 +2862,12 @@ bool device_debug::breakpoint::hit(offs_t pc)
// must match our address // must match our address
if (m_address != pc) if (m_address != pc)
return false; return false;
// must satisfy the condition // must satisfy the condition
UINT64 result; UINT64 result;
if (m_condition != NULL && expression_execute(m_condition, &result) == EXPRERR_NONE && result == 0) if (m_condition != NULL && expression_execute(m_condition, &result) == EXPRERR_NONE && result == 0)
return false; return false;
return true; return true;
} }
@ -2893,7 +2893,7 @@ device_debug::watchpoint::watchpoint(int index, const address_space &space, int
m_action((action != NULL) ? action : "") m_action((action != NULL) ? action : "")
{ {
} }
//------------------------------------------------- //-------------------------------------------------
// ~watchpoint - destructor // ~watchpoint - destructor
@ -2915,7 +2915,7 @@ bool device_debug::watchpoint::hit(int type, offs_t address, int size)
// don't hit if disabled // don't hit if disabled
if (!m_enabled) if (!m_enabled)
return false; return false;
// must match the type // must match the type
if ((m_type & type) == 0) if ((m_type & type) == 0)
return false; return false;
@ -2923,12 +2923,12 @@ bool device_debug::watchpoint::hit(int type, offs_t address, int size)
// must match our address // must match our address
if (address + size <= m_address || address >= m_address + m_length) if (address + size <= m_address || address >= m_address + m_length)
return false; return false;
// must satisfy the condition // must satisfy the condition
UINT64 result; UINT64 result;
if (m_condition != NULL && expression_execute(m_condition, &result) == EXPRERR_NONE && result == 0) if (m_condition != NULL && expression_execute(m_condition, &result) == EXPRERR_NONE && result == 0)
return false; return false;
return true; 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 // 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 // file
//------------------------------------------------- //-------------------------------------------------

View File

@ -74,12 +74,12 @@ public:
class breakpoint class breakpoint
{ {
friend class device_debug; friend class device_debug;
public: public:
// construction/destruction // construction/destruction
breakpoint(int index, offs_t address, parsed_expression *condition = NULL, const char *action = NULL); breakpoint(int index, offs_t address, parsed_expression *condition = NULL, const char *action = NULL);
~breakpoint(); ~breakpoint();
// getters // getters
breakpoint *next() const { return m_next; } breakpoint *next() const { return m_next; }
int index() const { return m_index; } int index() const { return m_index; }
@ -87,7 +87,7 @@ public:
offs_t address() const { return m_address; } offs_t address() const { return m_address; }
const char *condition() const { return (m_condition != NULL) ? expression_original_string(m_condition) : NULL; } const char *condition() const { return (m_condition != NULL) ? expression_original_string(m_condition) : NULL; }
const char *action() const { return m_action; } const char *action() const { return m_action; }
private: private:
// internals // internals
bool hit(offs_t pc); bool hit(offs_t pc);
@ -109,7 +109,7 @@ public:
// construction/destruction // 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(int index, const address_space &space, int type, offs_t address, offs_t length, parsed_expression *condition = NULL, const char *action = NULL);
~watchpoint(); ~watchpoint();
// getters // getters
watchpoint *next() const { return m_next; } watchpoint *next() const { return m_next; }
const address_space &space() const { return m_space; } const address_space &space() const { return m_space; }
@ -120,7 +120,7 @@ public:
offs_t length() const { return m_length; } offs_t length() const { return m_length; }
const char *condition() const { return (m_condition != NULL) ? expression_original_string(m_condition) : NULL; } const char *condition() const { return (m_condition != NULL) ? expression_original_string(m_condition) : NULL; }
const char *action() const { return m_action; } const char *action() const { return m_action; }
private: private:
// internals // internals
bool hit(int type, offs_t address, int size); bool hit(int type, offs_t address, int size);
@ -140,7 +140,7 @@ public:
// construction/destruction // construction/destruction
device_debug(device_t &device, symbol_table *globalsyms); device_debug(device_t &device, symbol_table *globalsyms);
~device_debug(); ~device_debug();
// getters // getters
symbol_table *symtable() const { return m_symtable; } 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 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; } 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 start_hook(attotime endtime);
void stop_hook(); void stop_hook();
void interrupt_hook(int irqline); void interrupt_hook(int irqline);
@ -163,7 +163,7 @@ public:
void set_instruction_hook(debug_instruction_hook_func hook); void set_instruction_hook(debug_instruction_hook_func hook);
void set_dasm_override(dasm_override_func dasm_override) { m_dasm_override = dasm_override; } 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); offs_t disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram);
// debugger focus // debugger focus
@ -174,7 +174,7 @@ public:
void single_step(int numsteps = 1); void single_step(int numsteps = 1);
void single_step_over(int numsteps = 1); void single_step_over(int numsteps = 1);
void single_step_out(); void single_step_out();
// execution // execution
void go(offs_t targetpc = ~0); void go(offs_t targetpc = ~0);
void go_vblank(); void go_vblank();
@ -204,7 +204,7 @@ public:
bool hotspot_tracking_enabled() const { return (m_hotspots != NULL); } bool hotspot_tracking_enabled() const { return (m_hotspots != NULL); }
void hotspot_track(int numspots, int threshhold); void hotspot_track(int numspots, int threshhold);
// history // history
offs_t history_pc(int index) const; offs_t history_pc(int index) const;
// tracing // tracing
@ -236,7 +236,7 @@ private:
static void set_logunmap(void *globalref, void *ref, UINT64 value); static void set_logunmap(void *globalref, void *ref, UINT64 value);
static UINT64 get_cpu_reg(void *globalref, void *ref); static UINT64 get_cpu_reg(void *globalref, void *ref);
static void set_state(void *globalref, void *ref, UINT64 value); static void set_state(void *globalref, void *ref, UINT64 value);
// basic device information // basic device information
device_t & m_device; // device we are attached to device_t & m_device; // device we are attached to
device_execute_interface *m_exec; // execute interface, if present device_execute_interface *m_exec; // execute interface, if present
@ -278,11 +278,11 @@ private:
public: public:
tracer(device_debug &debug, FILE &file, bool trace_over, const char *action); tracer(device_debug &debug, FILE &file, bool trace_over, const char *action);
~tracer(); ~tracer();
void update(offs_t pc); void update(offs_t pc);
void vprintf(const char *format, va_list va); void vprintf(const char *format, va_list va);
void flush(); void flush();
private: private:
static const int TRACE_LOOPS = 64; 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_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_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; DEBUG_FLAG_STOP_INTERRUPT | DEBUG_FLAG_STOP_EXCEPTION | DEBUG_FLAG_STOP_VBLANK | DEBUG_FLAG_STOP_TIME;
public: // until comments get folded in public: // until comments get folded in

View File

@ -150,7 +150,7 @@ void debug_view_source_list::reset()
m_head = source->m_next; m_head = source->m_next;
auto_free(&m_machine, source); auto_free(&m_machine, source);
} }
// reset the tail pointer and index // reset the tail pointer and index
m_tail = NULL; m_tail = NULL;
m_count = 0; 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 // 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 // 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 // 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 // rows and columns
//-------------------------------------------------*/ //-------------------------------------------------*/
@ -303,8 +303,8 @@ void debug_view::set_visible_size(debug_view_xy size)
//------------------------------------------------- //-------------------------------------------------
// set_visible_position - set the top left // set_visible_position - set the top left
// position of the visible area in rows and // position of the visible area in rows and
// columns // 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 // 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 // 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 // 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))); return append(auto_alloc(&m_machine, debug_view_log(m_machine, osdupdate, osdprivate)));
case DVT_TIMERS: 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: 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: default:
fatalerror("Attempt to create invalid debug view type %d\n", type); 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 // updates
//------------------------------------------------- //-------------------------------------------------
void debug_view_manager::flush_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(); 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 // 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 // expression
//------------------------------------------------- //-------------------------------------------------

View File

@ -133,19 +133,19 @@ public:
class debug_view_source class debug_view_source
{ {
DISABLE_COPYING(debug_view_source); DISABLE_COPYING(debug_view_source);
friend class debug_view_source_list; friend class debug_view_source_list;
public: public:
// construction/destruction // construction/destruction
debug_view_source(const char *name, device_t *device = NULL); debug_view_source(const char *name, device_t *device = NULL);
virtual ~debug_view_source(); virtual ~debug_view_source();
// getters // getters
const char *name() const { return m_name; } const char *name() const { return m_name; }
debug_view_source *next() const { return m_next; } debug_view_source *next() const { return m_next; }
device_t *device() const { return m_device; } device_t *device() const { return m_device; }
private: private:
// internal state // internal state
debug_view_source * m_next; // link to next item debug_view_source * m_next; // link to next item
@ -163,19 +163,19 @@ public:
// construction/destruction // construction/destruction
debug_view_source_list(running_machine &machine); debug_view_source_list(running_machine &machine);
~debug_view_source_list(); ~debug_view_source_list();
// getters // getters
const debug_view_source *head() const { return m_head; } const debug_view_source *head() const { return m_head; }
int count() const { return m_count; } int count() const { return m_count; }
int index(const debug_view_source &source) const; int index(const debug_view_source &source) const;
const debug_view_source *by_index(int index) const; const debug_view_source *by_index(int index) const;
// operations // operations
void reset(); void reset();
void append(debug_view_source &view_source); void append(debug_view_source &view_source);
const debug_view_source *match_device(device_t *device) const; const debug_view_source *match_device(device_t *device) const;
int match_device_index(device_t *device) const { return index(*match_device(device)); } int match_device_index(device_t *device) const { return index(*match_device(device)); }
private: private:
// internal state // internal state
running_machine & m_machine; // reference to our machine running_machine & m_machine; // reference to our machine
@ -189,7 +189,7 @@ private:
class debug_view class debug_view
{ {
friend class debug_view_manager; friend class debug_view_manager;
protected: protected:
// construction/destruction // construction/destruction
debug_view(running_machine &machine, debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate); 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 running_machine & m_machine; // machine associated with this view
debug_view_type m_type; // type of view debug_view_type m_type; // type of view
const debug_view_source *m_source; // currently selected data source 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 // OSD data
debug_view_osd_update_func m_osdupdate; // callback for the update 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(running_machine &machine);
~debug_view_manager(); ~debug_view_manager();
// view allocation // view allocation
debug_view *alloc_view(debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate); debug_view *alloc_view(debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate);
void free_view(debug_view &view); void free_view(debug_view &view);
@ -299,7 +299,7 @@ public:
// construction/destruction // construction/destruction
debug_view_expression(running_machine &machine); debug_view_expression(running_machine &machine);
~debug_view_expression(); ~debug_view_expression();
// getters // getters
bool dirty() const { return m_dirty; } bool dirty() const { return m_dirty; }
UINT64 last_value() const { return m_result; } UINT64 last_value() const { return m_result; }
@ -307,7 +307,7 @@ public:
const char *string() const { return m_string; } const char *string() const { return m_string; }
symbol_table *context() const { return m_context; } symbol_table *context() const { return m_context; }
// setters // setters
void mark_dirty() { m_dirty = true; } void mark_dirty() { m_dirty = true; }
void set_string(const char *string); void set_string(const char *string);
void set_context(symbol_table *context); void set_context(symbol_table *context);

View File

@ -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 // 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) if (type == VIEW_NOTIFY_CURSOR_CHANGED)
adjust_visible_y_for_cursor(); adjust_visible_y_for_cursor();
else if (type == VIEW_NOTIFY_SOURCE_CHANGED) else if (type == VIEW_NOTIFY_SOURCE_CHANGED)
m_expression.set_context(downcast<const debug_view_disasm_source *>(m_source)->device().debug()->symtable()); 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // currently selected address in the view
//------------------------------------------------- //-------------------------------------------------

View File

@ -66,7 +66,7 @@ enum disasm_right_column
class debug_view_disasm_source : public debug_view_source class debug_view_disasm_source : public debug_view_source
{ {
friend class debug_view_disasm; friend class debug_view_disasm;
// construction/destruction // construction/destruction
debug_view_disasm_source(const char *name, device_t &device); debug_view_disasm_source(const char *name, device_t &device);
@ -92,7 +92,7 @@ class debug_view_disasm : public debug_view
// construction/destruction // construction/destruction
debug_view_disasm(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate); debug_view_disasm(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate);
virtual ~debug_view_disasm(); virtual ~debug_view_disasm();
public: public:
// getters // getters
const char *expression() const { return m_expression.string(); } const char *expression() const { return m_expression.string(); }
@ -100,7 +100,7 @@ public:
UINT32 backward_steps() const { return m_backwards_steps; } UINT32 backward_steps() const { return m_backwards_steps; }
UINT32 disasm_width() const { return m_dasm_width; } UINT32 disasm_width() const { return m_dasm_width; }
offs_t selected_address(); offs_t selected_address();
// setters // setters
void set_expression(const char *expression); void set_expression(const char *expression);
void set_right_column(disasm_right_column contents); void set_right_column(disasm_right_column contents);
@ -135,7 +135,7 @@ private:
debug_view_xy m_allocated; // allocated rows/columns debug_view_xy m_allocated; // allocated rows/columns
offs_t * m_byteaddress; // addresses of the instructions offs_t * m_byteaddress; // addresses of the instructions
char * m_dasm; // disassembled instructions char * m_dasm; // disassembled instructions
// constants // constants
static const int DEFAULT_DASM_LINES = 1000; static const int DEFAULT_DASM_LINES = 1000;
static const int DEFAULT_DASM_WIDTH = 50; static const int DEFAULT_DASM_WIDTH = 50;

View File

@ -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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // 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 // set_physical - specify true if the memory view
// should display physical addresses versus // should display physical addresses versus
// logical addresses // logical addresses
//------------------------------------------------- //-------------------------------------------------

View File

@ -51,7 +51,7 @@
class debug_view_memory_source : public debug_view_source class debug_view_memory_source : public debug_view_source
{ {
friend class debug_view_memory; friend class debug_view_memory;
debug_view_memory_source(const char *name, const address_space &space); debug_view_memory_source(const char *name, const address_space &space);
debug_view_memory_source(const char *name, const region_info &region); debug_view_memory_source(const char *name, const region_info &region);
debug_view_memory_source(const char *name, void *base, int element_size, int num_elements); debug_view_memory_source(const char *name, void *base, int element_size, int num_elements);

View File

@ -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 // 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 // registers view
//------------------------------------------------- //-------------------------------------------------
@ -187,7 +187,7 @@ void debug_view_state::recompute()
maxtaglen = MAX(maxtaglen, item->m_symbol.len()); maxtaglen = MAX(maxtaglen, item->m_symbol.len());
maxvallen = MAX(maxvallen, item->m_vallen); maxvallen = MAX(maxvallen, item->m_vallen);
} }
// set the current divider and total cols // set the current divider and total cols
m_divider = 1 + maxtaglen + 1; m_divider = 1 + maxtaglen + 1;
m_total.x = 1 + maxtaglen + 2 + maxvallen + 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 // register view
//------------------------------------------------- //-------------------------------------------------
@ -228,7 +228,7 @@ void debug_view_state::view_update()
UINT64 total_cycles = 0; UINT64 total_cycles = 0;
if (source.m_execintf != NULL) if (source.m_execintf != NULL)
total_cycles = source.m_execintf->total_cycles(); total_cycles = source.m_execintf->total_cycles();
// find the first entry // find the first entry
state_item *curitem = m_state_list; state_item *curitem = m_state_list;
for (int index = 0; curitem != NULL && index < m_topleft.y; index++) for (int index = 0; curitem != NULL && index < m_topleft.y; index++)
@ -335,7 +335,7 @@ void debug_view_state::view_update()
dest++; dest++;
col++; col++;
} }
// advance to the next item // advance to the next item
curitem = curitem->m_next; curitem = curitem->m_next;
} }

View File

@ -51,7 +51,7 @@
class debug_view_state_source : public debug_view_source class debug_view_state_source : public debug_view_source
{ {
friend class debug_view_state; friend class debug_view_state;
// construction/destruction // construction/destruction
debug_view_state_source(const char *name, device_t &device); debug_view_state_source(const char *name, device_t &device);
@ -76,7 +76,7 @@ class debug_view_state : public debug_view
// construction/destruction // construction/destruction
debug_view_state(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate); debug_view_state(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate);
virtual ~debug_view_state(); virtual ~debug_view_state();
protected: protected:
// view overrides // view overrides
virtual void view_update(); virtual void view_update();
@ -86,7 +86,7 @@ private:
struct state_item struct state_item
{ {
state_item(int index, const char *name, UINT8 valuechars); state_item(int index, const char *name, UINT8 valuechars);
state_item * m_next; // next item state_item * m_next; // next item
UINT64 m_lastval; // last value UINT64 m_lastval; // last value
UINT64 m_currval; // current value UINT64 m_currval; // current value
@ -104,7 +104,7 @@ private:
int m_divider; // dividing column int m_divider; // dividing column
UINT64 m_last_update; // execution counter at last update UINT64 m_last_update; // execution counter at last update
state_item * m_state_list; // state data state_item * m_state_list; // state data
// constants // constants
static const int REG_DIVIDER = -10; static const int REG_DIVIDER = -10;
static const int REG_CYCLES = -11; static const int REG_CYCLES = -11;

View File

@ -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_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)); 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 // set the real name
m_name = get_legacy_config_string(DEVINFO_STR_NAME); m_name = get_legacy_config_string(DEVINFO_STR_NAME);
} }

View File

@ -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)); \ 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)); \ return pool_alloc(machine_get_pool(machine), basename##_device(machine, *this)); \
} \ } \

View File

@ -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 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) image_error_t legacy_image_device_base::load_image_by_path(UINT32 open_flags, const char *path)
{ {
file_error filerr = FILERR_NOT_FOUND; file_error filerr = FILERR_NOT_FOUND;
image_error_t err = IMAGE_ERROR_FILENOTFOUND; image_error_t err = IMAGE_ERROR_FILENOTFOUND;
astring revised_path; astring revised_path;
/* attempt to read the file */ /* 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; return err;
} }
/*------------------------------------------------- /*-------------------------------------------------
determine_open_plan - determines which open determine_open_plan - determines which open
flags to use, and in what order 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 */ /* we are now loading */
m_is_loading = TRUE; m_is_loading = TRUE;
/* record the filename */ /* record the filename */
err = set_image_filename(path); err = set_image_filename(path);
if (err) 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_year = m_software_info_ptr->year;
//m_playable = m_software_info_ptr->supported; //m_playable = m_software_info_ptr->supported;
} }
/* did we fail to find the file? */ /* did we fail to find the file? */
if (!is_loaded()) if (!is_loaded())
{ {
err = IMAGE_ERROR_FILENOTFOUND; err = IMAGE_ERROR_FILENOTFOUND;
goto done; goto done;
} }
/* call device load or create */ /* call device load or create */
m_create_format = create_format; m_create_format = create_format;
m_create_args = create_args; m_create_args = create_args;
@ -462,14 +462,14 @@ void legacy_image_device_base::clear()
{ {
if (m_file) if (m_file)
{ {
core_fclose(m_file); core_fclose(m_file);
m_file = NULL; m_file = NULL;
} }
m_name.reset(); m_name.reset();
m_writeable = FALSE; m_writeable = FALSE;
m_created = FALSE; m_created = FALSE;
m_longname.reset(); m_longname.reset();
m_manufacturer.reset(); m_manufacturer.reset();
m_year.reset(); m_year.reset();
@ -480,7 +480,7 @@ void legacy_image_device_base::clear()
m_full_software_name = NULL; m_full_software_name = NULL;
m_software_info_ptr = 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() 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() 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)); 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); if (func) (*func)(*this);
} }
void *legacy_image_device_base::get_device_specific_call() void *legacy_image_device_base::get_device_specific_call()
{ {
return (void*) m_config.get_legacy_config_fct(DEVINFO_FCT_DEVICE_SPECIFIC); return (void*) m_config.get_legacy_config_fct(DEVINFO_FCT_DEVICE_SPECIFIC);

View File

@ -376,7 +376,7 @@ public:
return true; return true;
return false; return false;
} }
// specialized helpers // specialized helpers
bool interface(device_execute_interface *&intf) { intf = m_execute; return (intf != NULL); } bool interface(device_execute_interface *&intf) { intf = m_execute; return (intf != NULL); }
bool interface(device_memory_interface *&intf) { intf = m_memory; 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); void set_clock_scale(double clockscale);
attotime clocks_to_attotime(UINT64 clocks) const; attotime clocks_to_attotime(UINT64 clocks) const;
UINT64 attotime_to_clocks(attotime duration) const; UINT64 attotime_to_clocks(attotime duration) const;
// debugging // debugging
device_debug *debug() const { return m_debug; } device_debug *debug() const { return m_debug; }
void set_debug(device_debug &debug) { m_debug = &debug; } void set_debug(device_debug &debug) { m_debug = &debug; }
@ -445,7 +445,7 @@ protected:
running_machine & m_machine; running_machine & m_machine;
device_debug * m_debug; device_debug * m_debug;
// for speed // for speed
device_execute_interface *m_execute; device_execute_interface *m_execute;
device_memory_interface *m_memory; device_memory_interface *m_memory;

View File

@ -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); UINT32 configlen = (UINT32)get_legacy_config_int(DEVINFO_INT_INLINE_CONFIG_BYTES);
if (configlen != 0) if (configlen != 0)
m_inline_config = global_alloc_array_clear(UINT8, configlen); m_inline_config = global_alloc_array_clear(UINT8, configlen);
// set the proper name // set the proper name
m_name = get_legacy_config_string(DEVINFO_STR_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)); device_nvram_func nvram_func = reinterpret_cast<device_nvram_func>(m_config.get_legacy_config_fct(DEVINFO_FCT_NVRAM));
(*nvram_func)(this, &file, TRUE); (*nvram_func)(this, &file, TRUE);
} }

View File

@ -613,7 +613,7 @@ protected:
astring m_instance_name; astring m_instance_name;
astring m_brief_instance_name; astring m_brief_instance_name;
astring m_interface_name; astring m_interface_name;
/* creation info */ /* creation info */
const option_guide *m_create_option_guide; const option_guide *m_create_option_guide;
image_device_format *m_formatlist; image_device_format *m_formatlist;
@ -630,8 +630,8 @@ public:
virtual bool load(const char *path); virtual bool load(const char *path);
virtual bool finish_load(); virtual bool finish_load();
virtual void unload(); 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_load();
virtual int call_create(int format_type, option_resolution *format_options); virtual int call_create(int format_type, option_resolution *format_options);
virtual void call_unload(); 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); 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); void determine_open_plan(int is_create, UINT32 *open_plan);
image_error_t load_image_by_path(UINT32 open_flags, const char *path); image_error_t load_image_by_path(UINT32 open_flags, const char *path);
void clear(); void clear();
bool is_loaded(); bool is_loaded();
bool m_is_loading; bool m_is_loading;
}; };

View File

@ -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_image_interface::device_image_interface(running_machine &machine, const device_config &config, device_t &device)
: device_interface(machine, config, 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_file(NULL),
m_full_software_name(NULL), m_full_software_name(NULL),
m_software_info_ptr(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() 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; m_name = filename;
zippath_parent(&m_working_directory, filename); zippath_parent(&m_working_directory, filename);
m_basename = m_name.cpy(m_name); m_basename = m_name.cpy(m_name);
int loc1 = m_name.rchr(0,'\\'); int loc1 = m_name.rchr(0,'\\');
int loc2 = m_name.rchr(0,'/'); int loc2 = m_name.rchr(0,'/');
int loc3 = 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, ...) void device_image_interface::message(const char *format, ...)
{ {
va_list args; va_list args;
char buffer[256]; char buffer[256];
/* format the message */ /* format the message */
va_start(args, format); va_start(args, format);
@ -412,7 +412,7 @@ void device_image_interface::setup_working_directory()
// valid even if not mounted // 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 */ /* check to see if we've never initialized the working directory */
if (m_working_directory.len() == 0) if (m_working_directory.len() == 0)
@ -544,7 +544,7 @@ int device_image_interface::read_hash_config(const char *sysname)
goto done; goto done;
/* copy the relevant entries */ /* 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_manufacturer = info->manufacturer ? astring(info->manufacturer) : "";
m_year = info->year ? astring(info->year) : ""; m_year = info->year ? astring(info->year) : "";
m_playable = info->playable ? astring(info->playable) : ""; m_playable = info->playable ? astring(info->playable) : "";
@ -625,11 +625,11 @@ void device_image_interface::image_checkhash()
return; return;
} }
UINT32 device_image_interface::crc() UINT32 device_image_interface::crc()
{ {
UINT32 crc = 0; UINT32 crc = 0;
image_checkhash(); image_checkhash();
if (m_hash != NULL) if (m_hash != NULL)
crc = hash_data_extract_crc32(m_hash); 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); image_battery_save_by_name(astring_c(fname), buffer, length);
astring_free(fname); astring_free(fname);
} }

View File

@ -170,13 +170,13 @@ public:
virtual bool uses_file_extension(const char *file_extension) const = 0; virtual bool uses_file_extension(const char *file_extension) const = 0;
virtual const option_guide *create_option_guide() const = 0; virtual const option_guide *create_option_guide() const = 0;
virtual image_device_format *formatlist() const = 0; virtual image_device_format *formatlist() const = 0;
static const char *device_typename(iodevice_t type); 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); static iodevice_t device_typeid(const char *name);
virtual device_image_partialhash_func get_partial_hash() const = 0; 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: protected:
static const image_device_type_info *find_device_type(iodevice_t type); static const image_device_type_info *find_device_type(iodevice_t type);
static const image_device_type_info m_device_info_array[]; static const image_device_type_info m_device_info_array[];
@ -198,7 +198,7 @@ public:
virtual bool load(const char *path) = 0; virtual bool load(const char *path) = 0;
virtual bool finish_load() = 0; virtual bool finish_load() = 0;
virtual void unload() = 0; virtual void unload() = 0;
virtual int call_load() = 0; virtual int call_load() = 0;
virtual int call_create(int format_type, option_resolution *format_options) = 0; virtual int call_create(int format_type, option_resolution *format_options) = 0;
virtual void call_unload() = 0; virtual void call_unload() = 0;
@ -206,14 +206,14 @@ public:
virtual device_image_partialhash_func get_partial_hash() = 0; virtual device_image_partialhash_func get_partial_hash() = 0;
virtual void call_get_devices() = 0; virtual void call_get_devices() = 0;
virtual void *get_device_specific_call() = 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_indexed_creatable_format(int index);
virtual const image_device_format *device_get_named_creatable_format(const char *format_name); 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 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; virtual bool create(const char *path, const image_device_format *create_format, option_resolution *create_args) = 0;
const char *error(); const char *error();
void seterror(image_error_t err, const char *message); void seterror(image_error_t err, const char *message);
void message(const char *format, ...); void message(const char *format, ...);
@ -234,34 +234,34 @@ public:
UINT64 ftell() { check_for_file(); return core_ftell(m_file); } UINT64 ftell() { check_for_file(); return core_ftell(m_file); }
int fgetc() { char ch; if (fread(&ch, 1) != 1) ch = '\0'; return ch; } 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); } 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); } int feof() { check_for_file(); return core_feof(m_file); }
void *ptr() {check_for_file(); return (void *) core_fbuffer(m_file); } void *ptr() {check_for_file(); return (void *) core_fbuffer(m_file); }
// configuration access // configuration access
const device_config_image_interface &image_config() const { return m_image_config; } const device_config_image_interface &image_config() const { return m_image_config; }
void set_init_phase() { m_init_phase = TRUE; } void set_init_phase() { m_init_phase = TRUE; }
const char* longname() { return m_longname; } const char* longname() { return m_longname; }
const char* manufacturer() { return m_manufacturer; } const char* manufacturer() { return m_manufacturer; }
const char* year() { return m_year; } const char* year() { return m_year; }
const char* playable() { return m_playable; } const char* playable() { return m_playable; }
const char* pcb() { return m_pcb; } const char* pcb() { return m_pcb; }
const char* extrainfo() { return m_extrainfo; } const char* extrainfo() { return m_extrainfo; }
const software_info *software_entry() { return m_software_info_ptr; } 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 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); UINT8 *get_software_region(const char *tag);
UINT32 get_software_region_length(const char *tag); UINT32 get_software_region_length(const char *tag);
const char *get_feature(const char *feature_name); const char *get_feature(const char *feature_name);
void *image_malloc(size_t size); void *image_malloc(size_t size);
char *image_strdup(const char *src); char *image_strdup(const char *src);
void *image_realloc(void *ptr, size_t size); void *image_realloc(void *ptr, size_t size);
void image_freeptr(void *ptr); void image_freeptr(void *ptr);
UINT32 crc(); UINT32 crc();
void battery_load(void *buffer, int length, int fill); void battery_load(void *buffer, int length, int fill);
@ -270,9 +270,9 @@ protected:
image_error_t set_image_filename(const char *filename); image_error_t set_image_filename(const char *filename);
void clear_error(); void clear_error();
void check_for_file() { assert_always(m_file != NULL, "Illegal operation on unmounted image"); } void check_for_file() { assert_always(m_file != NULL, "Illegal operation on unmounted image"); }
void setup_working_directory(); void setup_working_directory();
bool try_change_working_directory(const char *subdir); bool try_change_working_directory(const char *subdir);
@ -282,22 +282,22 @@ protected:
// derived class overrides // derived class overrides
// configuration // 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 */ /* error related info */
image_error_t m_err; image_error_t m_err;
astring m_err_message; astring m_err_message;
/* variables that are only non-zero when an image is mounted */ /* variables that are only non-zero when an image is mounted */
core_file *m_file; core_file *m_file;
astring m_name; astring m_name;
astring m_basename; astring m_basename;
astring m_basename_noext; astring m_basename_noext;
astring m_filetype; astring m_filetype;
/* working directory; persists across mounts */ /* working directory; persists across mounts */
astring m_working_directory; astring m_working_directory;
/* Software information */ /* Software information */
char *m_full_software_name; char *m_full_software_name;
software_info *m_software_info_ptr; software_info *m_software_info_ptr;
@ -313,15 +313,15 @@ protected:
/* flags */ /* flags */
bool m_writeable; bool m_writeable;
bool m_created; bool m_created;
bool m_init_phase; bool m_init_phase;
/* special - used when creating */ /* special - used when creating */
int m_create_format; int m_create_format;
option_resolution *m_create_args; option_resolution *m_create_args;
object_pool *m_mempool; object_pool *m_mempool;
char *m_hash; char *m_hash;
}; };

View File

@ -68,7 +68,7 @@ static void image_dirs_load(running_machine *machine, int config_type, xml_data_
const char *dev_instance; const char *dev_instance;
const char *working_directory; const char *working_directory;
device_image_interface *image = NULL; device_image_interface *image = NULL;
if ((config_type == CONFIG_TYPE_GAME) && (parentnode != 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")) 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); working_directory = xml_get_attribute_string(node, "directory", NULL);
if (working_directory != NULL) if (working_directory != NULL)
image->set_working_directory(working_directory); 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, "instance", dev_instance);
xml_set_attribute(node, "directory", image->working_directory()); 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 */ /* only extract the device options if we've added them */
if (options_get_bool(machine->options(), OPTION_ADDED_DEVICE_OPTIONS)) { if (options_get_bool(machine->options(), OPTION_ADDED_DEVICE_OPTIONS)) {
int index = 0; int index = 0;
device_image_interface *image = NULL; device_image_interface *image = NULL;
for (bool gotone = machine->m_devicelist.first(image); gotone; gotone = image->next(image)) for (bool gotone = machine->m_devicelist.first(image); gotone; gotone = image->next(image))
{ {
const char *filename = image->filename(); const char *filename = image->filename();
/* and set the option */ /* 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++; index++;
} }
} }
@ -188,7 +188,7 @@ void image_unload_all(running_machine &machine)
{ {
device_image_interface *image = NULL; device_image_interface *image = NULL;
// extract the options // extract the options
image_options_extract(&machine); image_options_extract(&machine);
for (bool gotone = machine.m_devicelist.first(image); gotone; gotone = image->next(image)) 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 */ /* mark init state */
image->set_init_phase(); image->set_init_phase();
/* try to load this image */ /* try to load this image */
bool result = image->load(image_name); 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()); 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(); image->call_get_devices();
} }
} }
@ -434,7 +434,7 @@ astring *image_info_astring(running_machine *machine, astring *string)
else else
{ {
astring_catprintf(string, "%s: ---\n", image->image_config().devconfig().name()); astring_catprintf(string, "%s: ---\n", image->image_config().devconfig().name());
} }
} }
return string; 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 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) 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 image_add_device_with_subdevices - adds
device with parameters sent, and all subdevices device with parameters sent, and all subdevices
from it's machine config devices list from it's machine config devices list
-------------------------------------------------*/ -------------------------------------------------*/
void image_add_device_with_subdevices(device_t *owner, device_type type, const char *tag, UINT32 clock) void image_add_device_with_subdevices(device_t *owner, device_type type, const char *tag, UINT32 clock)
{ {
astring tempstring; 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; machine_config *config = (machine_config *)owner->machine->config;
device_config *devconfig = type(*config, owner->subtag(tempstring,tag), &owner->baseconfig(), clock); 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)); running_device *device = device_list->append(devconfig->tag(), devconfig->alloc_device(*owner->machine));
const machine_config_token *tokens = device->machine_config_tokens(); const machine_config_token *tokens = device->machine_config_tokens();
if (tokens != NULL) if (tokens != NULL)
{ {
config->detokenize(tokens,devconfig); config->detokenize(tokens,devconfig);
for (const device_config *config_dev = config->m_devicelist.first(); config_dev != NULL; config_dev = config_dev->next()) for (const device_config *config_dev = config->m_devicelist.first(); config_dev != NULL; config_dev = config_dev->next())
{ {

View File

@ -79,7 +79,7 @@
- calls debugger_init() [debugger.c] to set up the debugger - calls debugger_init() [debugger.c] to set up the debugger
- calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks
- calls cheat_init() [cheat.c] to initialize the cheat system - 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 config_load_settings() [config.c] to load the configuration file
- calls nvram_load [machine/generic.c] to load NVRAM - calls nvram_load [machine/generic.c] to load NVRAM
@ -313,7 +313,7 @@ void running_machine::start()
// start up the devices // start up the devices
m_devicelist.start_all(); m_devicelist.start_all();
// call the game driver's init function // call the game driver's init function
// this is where decryption is done and memory maps are altered // this is where decryption is done and memory maps are altered
// so this location in the init order is important // 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 // 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 // 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 // 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 // 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 // soon as possible
//------------------------------------------------- //-------------------------------------------------
@ -595,7 +595,7 @@ void running_machine::pause()
if (m_paused) if (m_paused)
return; return;
m_paused = true; m_paused = true;
// call the callbacks // call the callbacks
call_notifiers(MACHINE_NOTIFY_PAUSE); call_notifiers(MACHINE_NOTIFY_PAUSE);
} }
@ -611,7 +611,7 @@ void running_machine::resume()
if (!m_paused) if (!m_paused)
return; return;
m_paused = false; m_paused = false;
// call the callbacks // call the callbacks
call_notifiers(MACHINE_NOTIFY_RESUME); 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) 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!"); 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 // exit notifiers are added to the head, and executed in reverse order
if (event == MACHINE_NOTIFY_EXIT) 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 // system; useful for RTC implementations
//------------------------------------------------- //-------------------------------------------------
@ -737,8 +737,8 @@ void running_machine::base_datetime(system_time &systime)
//------------------------------------------------- //-------------------------------------------------
// current_datetime - retrieve the current time // current_datetime - retrieve the current time
// (offset by the base); useful for RTC // (offset by the base); useful for RTC
// implementations // implementations
//------------------------------------------------- //-------------------------------------------------
@ -790,7 +790,7 @@ void running_machine::handle_saveload()
if (m_saveload_pending_file.len() == 0) if (m_saveload_pending_file.len() == 0)
goto cancel; 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 // because the timers might overwrite data we have loaded
if (timer_count_anonymous(this) > 0) 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 // MAME mame_system_tm structure
//------------------------------------------------- //-------------------------------------------------

View File

@ -183,7 +183,7 @@ public:
endianness_t endianness() const { return ((m_flags & ROMREGION_ENDIANMASK) == ROMREGION_LE) ? ENDIANNESS_LITTLE : ENDIANNESS_BIG; } 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); } UINT8 width() const { return 1 << ((m_flags & ROMREGION_WIDTHMASK) >> 8); }
bool invert() const { return ((m_flags & ROMREGION_INVERTMASK) != 0); } bool invert() const { return ((m_flags & ROMREGION_INVERTMASK) != 0); }
// data access // data access
UINT8 &u8(offs_t offset = 0) const { return m_base.u8[offset]; } UINT8 &u8(offs_t offset = 0) const { return m_base.u8[offset]; }
UINT16 &u16(offs_t offset = 0) const { return m_base.u16[offset]; } UINT16 &u16(offs_t offset = 0) const { return m_base.u16[offset]; }
@ -241,20 +241,20 @@ public:
{ {
void set(struct tm &t); void set(struct tm &t);
UINT8 second; // seconds (0-59) UINT8 second; // seconds (0-59)
UINT8 minute; // minutes (0-59) UINT8 minute; // minutes (0-59)
UINT8 hour; // hours (0-23) UINT8 hour; // hours (0-23)
UINT8 mday; // day of month (1-31) UINT8 mday; // day of month (1-31)
UINT8 month; // month (0-11) UINT8 month; // month (0-11)
INT32 year; // year (1=1 AD) INT32 year; // year (1=1 AD)
UINT8 weekday; // day of week (0-6) UINT8 weekday; // day of week (0-6)
UINT16 day; // day of year (0-365) UINT16 day; // day of year (0-365)
UINT8 is_dst; // is this daylight savings? UINT8 is_dst; // is this daylight savings?
}; };
INT64 time; // number of seconds elapsed since midnight, January 1 1970 UTC INT64 time; // number of seconds elapsed since midnight, January 1 1970 UTC
full_time local_time; // local time full_time local_time; // local time
full_time utc_time; // UTC coordinated time full_time utc_time; // UTC coordinated time
}; };
@ -270,16 +270,16 @@ public:
// construction/destruction // construction/destruction
running_machine(const game_driver &driver, const machine_config &config, core_options &options, bool exit_to_game_select = false); running_machine(const game_driver &driver, const machine_config &config, core_options &options, bool exit_to_game_select = false);
~running_machine(); ~running_machine();
// fetch items by name // fetch items by name
inline device_t *device(const char *tag); inline device_t *device(const char *tag);
template<class T> inline T *device(const char *tag) { return downcast<T *>(device(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 input_port_config *port(const char *tag);
inline const region_info *region(const char *tag); inline const region_info *region(const char *tag);
// configuration helpers // configuration helpers
UINT32 total_colors() const { return m_config.m_total_colors; } UINT32 total_colors() const { return m_config.m_total_colors; }
// getters // getters
const char *basename() const { return m_basename; } const char *basename() const { return m_basename; }
core_options *options() const { return &m_options; } core_options *options() const { return &m_options; }
@ -299,7 +299,7 @@ public:
void add_notifier(machine_notification event, notify_callback callback); void add_notifier(machine_notification event, notify_callback callback);
void call_notifiers(machine_notification which); void call_notifiers(machine_notification which);
void add_logerror_callback(logerror_callback callback); void add_logerror_callback(logerror_callback callback);
// scheduled operations // scheduled operations
void schedule_exit(); void schedule_exit();
void schedule_hard_reset(); void schedule_hard_reset();
@ -311,7 +311,7 @@ public:
// time // time
void base_datetime(system_time &systime); void base_datetime(system_time &systime);
void current_datetime(system_time &systime); void current_datetime(system_time &systime);
// regions // regions
region_info *region_alloc(const char *name, UINT32 length, UINT32 flags); region_info *region_alloc(const char *name, UINT32 length, UINT32 flags);
void region_free(const char *name); void region_free(const char *name);
@ -392,7 +392,7 @@ private:
void set_saveload_filename(const char *filename); void set_saveload_filename(const char *filename);
void fill_systime(system_time &systime, time_t t); void fill_systime(system_time &systime, time_t t);
void handle_saveload(); void handle_saveload();
static TIMER_CALLBACK( static_soft_reset ); static TIMER_CALLBACK( static_soft_reset );
void soft_reset(); void soft_reset();
@ -406,7 +406,7 @@ private:
notify_callback m_func; notify_callback m_func;
}; };
notifier_callback_item *m_notifier_list[MACHINE_NOTIFY_COUNT]; notifier_callback_item *m_notifier_list[MACHINE_NOTIFY_COUNT];
// logerror callbacks // logerror callbacks
struct logerror_callback_item struct logerror_callback_item
{ {
@ -437,7 +437,7 @@ private:
SLS_NONE, SLS_NONE,
SLS_SAVE, SLS_SAVE,
SLS_LOAD SLS_LOAD
}; };
saveload_schedule m_saveload_schedule; saveload_schedule m_saveload_schedule;
attotime m_saveload_schedule_time; attotime m_saveload_schedule_time;
astring m_saveload_pending_file; astring m_saveload_pending_file;

View File

@ -92,7 +92,7 @@ void generic_machine_init(running_machine *machine)
state->coinlockedout[counternum] = 0; 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)); memset(state->interrupt_device, 0, sizeof(state->interrupt_device));
device_execute_interface *exec; device_execute_interface *exec;
int index = 0; int index = 0;

View File

@ -458,7 +458,7 @@ void z80dart_device::dart_channel::start(z80dart_device *device, int index, cons
{ {
m_index = index; m_index = index;
m_device = device; m_device = device;
devcb_resolve_read_line(&m_in_rxd_func, &in_rxd, m_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_txd_func, &out_txd, m_device);
devcb_resolve_write_line(&m_out_dtr_func, &out_dtr, m_device); devcb_resolve_write_line(&m_out_dtr_func, &out_dtr, m_device);

View File

@ -51,7 +51,7 @@
- calls debugger_init() [debugger.c] to set up the debugger - calls debugger_init() [debugger.c] to set up the debugger
- calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks
- calls cheat_init() [cheat.c] to initialize the cheat system - 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 config_load_settings() [config.c] to load the configuration file
- calls nvram_load [machine/generic.c] to load NVRAM - 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); options_revert(options, OPTION_PRIORITY_INI);
mame_parse_ini_files(options, driver); mame_parse_ini_files(options, driver);
} }
// create the machine configuration // create the machine configuration
const machine_config *config = global_alloc(machine_config(driver->machine_config)); 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 // looooong term: remove this
global_machine = machine; global_machine = machine;
// run the machine // run the machine
error = machine->run(firstrun); error = machine->run(firstrun);
firstrun = false; firstrun = false;
// check the state of the machine // check the state of the machine
if (machine->new_driver_pending()) if (machine->new_driver_pending())
{ {

View File

@ -94,7 +94,7 @@ void machine_config::detokenize(const machine_config_token *tokens, const device
{ {
device_config *device = NULL; device_config *device = NULL;
astring tempstring; astring tempstring;
// increase the parse level // increase the parse level
m_parse_level++; m_parse_level++;
@ -278,7 +278,7 @@ void machine_config::detokenize(const machine_config_token *tokens, const device
break; break;
} }
} }
// if we started at parse level 0 (and are thus at level 1), do post-processing // if we started at parse level 0 (and are thus at level 1), do post-processing
if (m_parse_level == 1) 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; devconfig->m_config_complete = true;
} }
} }
// bump down the parse level // bump down the parse level
m_parse_level--; m_parse_level--;
} }

View File

@ -243,11 +243,11 @@ class machine_config
DISABLE_COPYING(machine_config); DISABLE_COPYING(machine_config);
friend class running_machine; friend class running_machine;
public: public:
machine_config(const machine_config_token *tokens); machine_config(const machine_config_token *tokens);
~machine_config(); ~machine_config();
void detokenize(const machine_config_token *tokens, const device_config *owner = NULL); void detokenize(const machine_config_token *tokens, const device_config *owner = NULL);
driver_data_alloc_func m_driver_data_alloc; // allocator for driver data 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_start_func m_machine_start; // one-time machine start callback
machine_reset_func m_machine_reset; // machine reset callback machine_reset_func m_machine_reset; // machine reset callback
nvram_handler_func m_nvram_handler; // NVRAM save/load callback nvram_handler_func m_nvram_handler; // NVRAM save/load callback
memcard_handler_func m_memcard_handler; // memory card save/load callback memcard_handler_func m_memcard_handler; // memory card save/load callback
UINT32 m_video_attributes; // flags describing the video system UINT32 m_video_attributes; // flags describing the video system
const gfx_decode_entry *m_gfxdecodeinfo; // pointer to array of graphics decoding information const gfx_decode_entry *m_gfxdecodeinfo; // pointer to array of graphics decoding information
UINT32 m_total_colors; // total number of colors in the palette UINT32 m_total_colors; // total number of colors in the palette
const char * m_default_layout; // default layout for this machine 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_start_func m_video_start; // one-time video start callback
video_reset_func m_video_reset; // video reset callback video_reset_func m_video_reset; // video reset callback
video_eof_func m_video_eof; // end-of-frame video callback video_eof_func m_video_eof; // end-of-frame video callback

View File

@ -1848,7 +1848,7 @@ static void memory_init_preflight(running_machine *machine)
const region_info *region = machine->region(entry->region); const region_info *region = machine->region(entry->region);
if (region == NULL) 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); 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 */ /* validate the region */
if (entry->rgnoffs + (entry->byteend - entry->bytestart + 1) > region->bytes()) 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()); 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());

View File

@ -995,7 +995,7 @@ bool load_software_part(device_image_interface *image, const char *path, softwar
{ {
if ( swlists ) if ( swlists )
{ {
software_list_config *swlist = (software_list_config *)downcast<const legacy_device_config_base *>(&swlists->baseconfig())->inline_config(); software_list_config *swlist = (software_list_config *)downcast<const legacy_device_config_base *>(&swlists->baseconfig())->inline_config();
UINT32 i = DEVINFO_STR_SWLIST_0; 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; bool haveCompatible = FALSE;
const char *interface = image->image_config().image_interface(); 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()) 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(); 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) { if (strcmp(interface,part->interface_)==0) {
found = TRUE; found = TRUE;
} }
} }
if (found) { if (found) {
ui_menu_item_append(menu, list->description, NULL, 0, swlist->list_name[i]); 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()) 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(); 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) { if (strcmp(interface,part->interface_)==0) {
found = TRUE; found = TRUE;
} }
} }
if (found) { if (found) {
if (!haveCompatible) { if (!haveCompatible) {
ui_menu_item_append(menu, "[compatible lists]", NULL, 0, NULL); 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) void ui_image_menu_software(running_machine *machine, ui_menu *menu, void *parameter, void *state)

View File

@ -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. frame being parsed (which will become the new target frame) is zero.
It is used for determining whether interpolation of the next frame is 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. 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 Interpolation is inhibited (i.e. interpolation at IP frames will not happen
except for IP=0) under the following circumstances: except for IP=0) under the following circumstances:
"P=0" != "OLDP" ("P=0" = 1, and OLDP = 0; OR "P=0" = 0, and OLDP = 1) "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. versa.
"OLDE" = 1 and "E=0" = 0 "OLDE" = 1 and "E=0" = 0
This means the new frame is not silent, and the old frame was silent. This means the new frame is not silent, and the old frame was silent.
****Documentation of chip commands:*** ****Documentation of chip commands:***

View File

@ -1261,8 +1261,8 @@ void ui_paste(running_machine *machine)
} }
/*------------------------------------------------- /*-------------------------------------------------
ui_image_handler_ingame - execute display ui_image_handler_ingame - execute display
callback function for each image device callback function for each image device
-------------------------------------------------*/ -------------------------------------------------*/
void ui_image_handler_ingame(running_machine *machine) void ui_image_handler_ingame(running_machine *machine)

View File

@ -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); ui_menu_item_append(menu, CAPSTARTGAMENOUN " Information", NULL, 0, (void *)menu_game_info);
device_image_interface *image = NULL; device_image_interface *image = NULL;
if (machine->m_devicelist.first(image)) if (machine->m_devicelist.first(image))
{ {
/* add image info menu */ /* add image info menu */
ui_menu_item_append(menu, "Image Information", NULL, 0, (void*)ui_image_menu_image_info); ui_menu_item_append(menu, "Image Information", NULL, 0, (void*)ui_image_menu_image_info);

View File

@ -765,20 +765,20 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
(resumable = 0) an already suspended parser. Some call-backs may (resumable = 0) an already suspended parser. Some call-backs may
still follow because they would otherwise get lost. Examples: still follow because they would otherwise get lost. Examples:
- endElementHandler() for empty elements when stopped in - endElementHandler() for empty elements when stopped in
startElementHandler(), startElementHandler(),
- endNameSpaceDeclHandler() when stopped in endElementHandler(), - endNameSpaceDeclHandler() when stopped in endElementHandler(),
and possibly others. and possibly others.
Can be called from most handlers, including DTD related call-backs, Can be called from most handlers, including DTD related call-backs,
except when parsing an external parameter entity and resumable != 0. except when parsing an external parameter entity and resumable != 0.
Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise. Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise.
Possible error codes: Possible error codes:
- XML_ERROR_SUSPENDED: when suspending an already suspended parser. - XML_ERROR_SUSPENDED: when suspending an already suspended parser.
- XML_ERROR_FINISHED: when the parser has already finished. - XML_ERROR_FINISHED: when the parser has already finished.
- XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE. - XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE.
When resumable != 0 (true) then parsing is suspended, that is, When resumable != 0 (true) then parsing is suspended, that is,
XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED. XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED.
Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer() Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer()
return XML_STATUS_ERROR with error code XML_ERROR_ABORTED. return XML_STATUS_ERROR with error code XML_ERROR_ABORTED.
@ -789,7 +789,7 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
the externalEntityRefHandler() to call XML_StopParser() on the parent the externalEntityRefHandler() to call XML_StopParser() on the parent
parser (recursively), if one wants to stop parsing altogether. parser (recursively), if one wants to stop parsing altogether.
When suspended, parsing can be resumed by calling XML_ResumeParser(). When suspended, parsing can be resumed by calling XML_ResumeParser().
*/ */
XMLPARSEAPI(enum XML_Status) XMLPARSEAPI(enum XML_Status)
XML_StopParser(XML_Parser parser, XML_Bool resumable); XML_StopParser(XML_Parser parser, XML_Bool resumable);
@ -797,7 +797,7 @@ XML_StopParser(XML_Parser parser, XML_Bool resumable);
/* Resumes parsing after it has been suspended with XML_StopParser(). /* Resumes parsing after it has been suspended with XML_StopParser().
Must not be called from within a handler call-back. Returns same Must not be called from within a handler call-back. Returns same
status codes as XML_Parse() or XML_ParseBuffer(). status codes as XML_Parse() or XML_ParseBuffer().
Additional error code XML_ERROR_NOT_SUSPENDED possible. Additional error code XML_ERROR_NOT_SUSPENDED possible.
*Note*: *Note*:
This must be called on the most deeply nested child parser instance This must be called on the most deeply nested child parser instance
@ -898,7 +898,7 @@ XML_GetErrorCode(XML_Parser parser);
be within the relevant markup. When called outside of the callback be within the relevant markup. When called outside of the callback
functions, the position indicated will be just past the last parse functions, the position indicated will be just past the last parse
event (regardless of whether there was an associated callback). event (regardless of whether there was an associated callback).
They may also be called after returning from a call to XML_Parse They may also be called after returning from a call to XML_Parse
or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then or XML_ParseBuffer. If the return value is XML_STATUS_ERROR then
the location is the location of the character at which the error the location is the location of the character at which the error

View File

@ -97,7 +97,7 @@ typedef char XML_LChar;
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ #ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 #if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
typedef __int64 XML_Index; typedef __int64 XML_Index;
typedef unsigned __int64 XML_Size; typedef unsigned __int64 XML_Size;
#else #else
typedef long long XML_Index; typedef long long XML_Index;

View File

@ -317,15 +317,15 @@ processXmlDecl(XML_Parser parser, int isGeneralTextEntity,
static enum XML_Error static enum XML_Error
initializeEncoding(XML_Parser parser); initializeEncoding(XML_Parser parser);
static enum XML_Error static enum XML_Error
doProlog(XML_Parser parser, const ENCODING *enc, const char *s, doProlog(XML_Parser parser, const ENCODING *enc, const char *s,
const char *end, int tok, const char *next, const char **nextPtr, const char *end, int tok, const char *next, const char **nextPtr,
XML_Bool haveMore); XML_Bool haveMore);
static enum XML_Error static enum XML_Error
processInternalEntity(XML_Parser parser, ENTITY *entity, processInternalEntity(XML_Parser parser, ENTITY *entity,
XML_Bool betweenDecl); XML_Bool betweenDecl);
static enum XML_Error static enum XML_Error
doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc, doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
const char *start, const char *end, const char **endPtr, const char *start, const char *end, const char **endPtr,
XML_Bool haveMore); XML_Bool haveMore);
static enum XML_Error static enum XML_Error
doCdataSection(XML_Parser parser, const ENCODING *, const char **startPtr, doCdataSection(XML_Parser parser, const ENCODING *, const char **startPtr,
@ -343,7 +343,7 @@ static enum XML_Error
addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
const XML_Char *uri, BINDING **bindingsPtr); const XML_Char *uri, BINDING **bindingsPtr);
static int static int
defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata, defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *, XML_Bool isCdata,
XML_Bool isId, const XML_Char *dfltValue, XML_Parser parser); XML_Bool isId, const XML_Char *dfltValue, XML_Parser parser);
static enum XML_Error static enum XML_Error
storeAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata, storeAttributeValue(XML_Parser parser, const ENCODING *, XML_Bool isCdata,
@ -660,7 +660,7 @@ XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep)
static const XML_Char implicitContext[] = { static const XML_Char implicitContext[] = {
ASCII_x, ASCII_m, ASCII_l, ASCII_EQUALS, ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_x, ASCII_m, ASCII_l, ASCII_EQUALS, ASCII_h, ASCII_t, ASCII_t, ASCII_p,
ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_w, ASCII_w, ASCII_w,
ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_o, ASCII_r, ASCII_g,
ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9, ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_SLASH, ASCII_1, ASCII_9,
ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e, ASCII_9, ASCII_8, ASCII_SLASH, ASCII_n, ASCII_a, ASCII_m, ASCII_e,
@ -1449,7 +1449,7 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position); XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
positionPtr = bufferPtr; positionPtr = bufferPtr;
return XML_STATUS_SUSPENDED; return XML_STATUS_SUSPENDED;
case XML_INITIALIZED: case XML_INITIALIZED:
case XML_PARSING: case XML_PARSING:
ps_parsing = XML_FINISHED; ps_parsing = XML_FINISHED;
/* fall through */ /* fall through */
@ -1572,7 +1572,7 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
case XML_SUSPENDED: case XML_SUSPENDED:
result = XML_STATUS_SUSPENDED; result = XML_STATUS_SUSPENDED;
break; break;
case XML_INITIALIZED: case XML_INITIALIZED:
case XML_PARSING: case XML_PARSING:
if (isFinal) { if (isFinal) {
ps_parsing = XML_FINISHED; ps_parsing = XML_FINISHED;
@ -1719,7 +1719,7 @@ XML_ResumeParser(XML_Parser parser)
case XML_SUSPENDED: case XML_SUSPENDED:
result = XML_STATUS_SUSPENDED; result = XML_STATUS_SUSPENDED;
break; break;
case XML_INITIALIZED: case XML_INITIALIZED:
case XML_PARSING: case XML_PARSING:
if (ps_finalBuffer) { if (ps_finalBuffer) {
ps_parsing = XML_FINISHED; ps_parsing = XML_FINISHED;
@ -1946,7 +1946,7 @@ XML_GetFeatureList(void)
#endif #endif
#ifdef XML_LARGE_SIZE #ifdef XML_LARGE_SIZE
{XML_FEATURE_LARGE_SIZE, XML_L("XML_LARGE_SIZE"), 0}, {XML_FEATURE_LARGE_SIZE, XML_L("XML_LARGE_SIZE"), 0},
#endif #endif
{XML_FEATURE_END, NULL, 0} {XML_FEATURE_END, NULL, 0}
}; };
@ -2009,7 +2009,7 @@ contentProcessor(XML_Parser parser,
const char *end, const char *end,
const char **endPtr) const char **endPtr)
{ {
enum XML_Error result = doContent(parser, 0, encoding, start, end, enum XML_Error result = doContent(parser, 0, encoding, start, end,
endPtr, (XML_Bool)!ps_finalBuffer); endPtr, (XML_Bool)!ps_finalBuffer);
if (result == XML_ERROR_NONE) { if (result == XML_ERROR_NONE) {
if (!storeRawNames(parser)) if (!storeRawNames(parser))
@ -2091,7 +2091,7 @@ externalEntityInitProcessor3(XML_Parser parser,
if (result != XML_ERROR_NONE) if (result != XML_ERROR_NONE)
return result; return result;
switch (ps_parsing) { switch (ps_parsing) {
case XML_SUSPENDED: case XML_SUSPENDED:
*endPtr = next; *endPtr = next;
return XML_ERROR_NONE; return XML_ERROR_NONE;
case XML_FINISHED: case XML_FINISHED:
@ -2125,7 +2125,7 @@ externalEntityContentProcessor(XML_Parser parser,
const char *end, const char *end,
const char **endPtr) const char **endPtr)
{ {
enum XML_Error result = doContent(parser, 1, encoding, start, end, enum XML_Error result = doContent(parser, 1, encoding, start, end,
endPtr, (XML_Bool)!ps_finalBuffer); endPtr, (XML_Bool)!ps_finalBuffer);
if (result == XML_ERROR_NONE) { if (result == XML_ERROR_NONE) {
if (!storeRawNames(parser)) if (!storeRawNames(parser))
@ -2144,7 +2144,7 @@ doContent(XML_Parser parser,
XML_Bool haveMore) XML_Bool haveMore)
{ {
/* save one level of indirection */ /* save one level of indirection */
DTD * const dtd = _dtd; DTD * const dtd = _dtd;
const char **eventPP; const char **eventPP;
const char **eventEndPP; const char **eventEndPP;
@ -2175,8 +2175,8 @@ doContent(XML_Parser parser,
} }
else if (defaultHandler) else if (defaultHandler)
reportDefault(parser, enc, s, end); reportDefault(parser, enc, s, end);
/* We are at the end of the final buffer, should we check for /* We are at the end of the final buffer, should we check for
XML_SUSPENDED, XML_FINISHED? XML_SUSPENDED, XML_FINISHED?
*/ */
if (startTagLevel == 0) if (startTagLevel == 0)
return XML_ERROR_NO_ELEMENTS; return XML_ERROR_NO_ELEMENTS;
@ -2527,8 +2527,8 @@ doContent(XML_Parser parser,
} }
else if (defaultHandler) else if (defaultHandler)
reportDefault(parser, enc, s, end); reportDefault(parser, enc, s, end);
/* We are at the end of the final buffer, should we check for /* We are at the end of the final buffer, should we check for
XML_SUSPENDED, XML_FINISHED? XML_SUSPENDED, XML_FINISHED?
*/ */
if (startTagLevel == 0) { if (startTagLevel == 0) {
*eventPP = end; *eventPP = end;
@ -2540,7 +2540,7 @@ doContent(XML_Parser parser,
} }
*nextPtr = end; *nextPtr = end;
return XML_ERROR_NONE; return XML_ERROR_NONE;
case XML_TOK_DATA_CHARS: case XML_TOK_DATA_CHARS:
{ {
XML_CharacterDataHandler charDataHandler = characterDataHandler; XML_CharacterDataHandler charDataHandler = characterDataHandler;
if (charDataHandler) { if (charDataHandler) {
@ -2580,7 +2580,7 @@ doContent(XML_Parser parser,
} }
*eventPP = s = next; *eventPP = s = next;
switch (ps_parsing) { switch (ps_parsing) {
case XML_SUSPENDED: case XML_SUSPENDED:
*nextPtr = next; *nextPtr = next;
return XML_ERROR_NONE; return XML_ERROR_NONE;
case XML_FINISHED: case XML_FINISHED:
@ -2939,27 +2939,27 @@ addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
static const XML_Char xmlNamespace[] = { static const XML_Char xmlNamespace[] = {
ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH,
ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD,
ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L, ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_X, ASCII_M, ASCII_L,
ASCII_SLASH, ASCII_1, ASCII_9, ASCII_9, ASCII_8, ASCII_SLASH, ASCII_SLASH, ASCII_1, ASCII_9, ASCII_9, ASCII_8, ASCII_SLASH,
ASCII_n, ASCII_a, ASCII_m, ASCII_e, ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_n, ASCII_a, ASCII_m, ASCII_e, ASCII_s, ASCII_p, ASCII_a, ASCII_c,
ASCII_e, '\0' ASCII_e, '\0'
}; };
static const int xmlLen = static const int xmlLen =
(int)sizeof(xmlNamespace)/sizeof(XML_Char) - 1; (int)sizeof(xmlNamespace)/sizeof(XML_Char) - 1;
static const XML_Char xmlnsNamespace[] = { static const XML_Char xmlnsNamespace[] = {
ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH, ASCII_h, ASCII_t, ASCII_t, ASCII_p, ASCII_COLON, ASCII_SLASH, ASCII_SLASH,
ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD, ASCII_w, ASCII_w, ASCII_w, ASCII_PERIOD, ASCII_w, ASCII_3, ASCII_PERIOD,
ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_2, ASCII_0, ASCII_0, ASCII_o, ASCII_r, ASCII_g, ASCII_SLASH, ASCII_2, ASCII_0, ASCII_0,
ASCII_0, ASCII_SLASH, ASCII_x, ASCII_m, ASCII_l, ASCII_n, ASCII_s, ASCII_0, ASCII_SLASH, ASCII_x, ASCII_m, ASCII_l, ASCII_n, ASCII_s,
ASCII_SLASH, '\0' ASCII_SLASH, '\0'
}; };
static const int xmlnsLen = static const int xmlnsLen =
(int)sizeof(xmlnsNamespace)/sizeof(XML_Char) - 1; (int)sizeof(xmlnsNamespace)/sizeof(XML_Char) - 1;
XML_Bool mustBeXML = XML_FALSE; XML_Bool mustBeXML = XML_FALSE;
XML_Bool isXML = XML_TRUE; XML_Bool isXML = XML_TRUE;
XML_Bool isXMLNS = XML_TRUE; XML_Bool isXMLNS = XML_TRUE;
BINDING *b; BINDING *b;
int len; int len;
@ -2986,7 +2986,7 @@ addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId,
if (isXML && (len > xmlLen || uri[len] != xmlNamespace[len])) if (isXML && (len > xmlLen || uri[len] != xmlNamespace[len]))
isXML = XML_FALSE; isXML = XML_FALSE;
if (!mustBeXML && isXMLNS if (!mustBeXML && isXMLNS
&& (len > xmlnsLen || uri[len] != xmlnsNamespace[len])) && (len > xmlnsLen || uri[len] != xmlnsNamespace[len]))
isXMLNS = XML_FALSE; isXMLNS = XML_FALSE;
} }
@ -3197,7 +3197,7 @@ ignoreSectionProcessor(XML_Parser parser,
const char *end, const char *end,
const char **endPtr) const char **endPtr)
{ {
enum XML_Error result = doIgnoreSection(parser, encoding, &start, end, enum XML_Error result = doIgnoreSection(parser, encoding, &start, end,
endPtr, (XML_Bool)!ps_finalBuffer); endPtr, (XML_Bool)!ps_finalBuffer);
if (result != XML_ERROR_NONE) if (result != XML_ERROR_NONE)
return result; return result;
@ -3479,7 +3479,7 @@ entityValueInitProcessor(XML_Parser parser,
const char *next = start; const char *next = start;
eventPtr = start; eventPtr = start;
for (;;) { for (;;) {
tok = XmlPrologTok(encoding, start, end, &next); tok = XmlPrologTok(encoding, start, end, &next);
eventEndPtr = next; eventEndPtr = next;
if (tok <= 0) { if (tok <= 0) {
@ -3507,7 +3507,7 @@ entityValueInitProcessor(XML_Parser parser,
if (result != XML_ERROR_NONE) if (result != XML_ERROR_NONE)
return result; return result;
switch (ps_parsing) { switch (ps_parsing) {
case XML_SUSPENDED: case XML_SUSPENDED:
*nextPtr = next; *nextPtr = next;
return XML_ERROR_NONE; return XML_ERROR_NONE;
case XML_FINISHED: case XML_FINISHED:
@ -3572,7 +3572,7 @@ externalParEntProcessor(XML_Parser parser,
} }
processor = prologProcessor; processor = prologProcessor;
return doProlog(parser, encoding, s, end, tok, next, return doProlog(parser, encoding, s, end, tok, next,
nextPtr, (XML_Bool)!ps_finalBuffer); nextPtr, (XML_Bool)!ps_finalBuffer);
} }
@ -3622,7 +3622,7 @@ prologProcessor(XML_Parser parser,
{ {
const char *next = s; const char *next = s;
int tok = XmlPrologTok(encoding, s, end, &next); int tok = XmlPrologTok(encoding, s, end, &next);
return doProlog(parser, encoding, s, end, tok, next, return doProlog(parser, encoding, s, end, tok, next,
nextPtr, (XML_Bool)!ps_finalBuffer); nextPtr, (XML_Bool)!ps_finalBuffer);
} }
@ -3639,7 +3639,7 @@ doProlog(XML_Parser parser,
#ifdef XML_DTD #ifdef XML_DTD
static const XML_Char externalSubsetName[] = { ASCII_HASH , '\0' }; static const XML_Char externalSubsetName[] = { ASCII_HASH , '\0' };
#endif /* XML_DTD */ #endif /* XML_DTD */
static const XML_Char atypeCDATA[] = static const XML_Char atypeCDATA[] =
{ ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' }; { ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0' };
static const XML_Char atypeID[] = { ASCII_I, ASCII_D, '\0' }; static const XML_Char atypeID[] = { ASCII_I, ASCII_D, '\0' };
static const XML_Char atypeIDREF[] = static const XML_Char atypeIDREF[] =
@ -3660,7 +3660,7 @@ doProlog(XML_Parser parser,
static const XML_Char enumValueStart[] = { ASCII_LPAREN, '\0' }; static const XML_Char enumValueStart[] = { ASCII_LPAREN, '\0' };
/* save one level of indirection */ /* save one level of indirection */
DTD * const dtd = _dtd; DTD * const dtd = _dtd;
const char **eventPP; const char **eventPP;
const char **eventEndPP; const char **eventEndPP;
@ -3834,8 +3834,8 @@ doProlog(XML_Parser parser,
entity->publicId)) entity->publicId))
return XML_ERROR_EXTERNAL_ENTITY_HANDLING; return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
if (dtd->paramEntityRead) { if (dtd->paramEntityRead) {
if (!dtd->standalone && if (!dtd->standalone &&
notStandaloneHandler && notStandaloneHandler &&
!notStandaloneHandler(handlerArg)) !notStandaloneHandler(handlerArg))
return XML_ERROR_NOT_STANDALONE; return XML_ERROR_NOT_STANDALONE;
} }
@ -4273,7 +4273,7 @@ doProlog(XML_Parser parser,
switch (tok) { switch (tok) {
case XML_TOK_PARAM_ENTITY_REF: case XML_TOK_PARAM_ENTITY_REF:
/* PE references in internal subset are /* PE references in internal subset are
not allowed within declarations. */ not allowed within declarations. */
return XML_ERROR_PARAM_ENTITY_REF; return XML_ERROR_PARAM_ENTITY_REF;
case XML_TOK_XML_DECL: case XML_TOK_XML_DECL:
return XML_ERROR_MISPLACED_XML_PI; return XML_ERROR_MISPLACED_XML_PI;
@ -4394,7 +4394,7 @@ doProlog(XML_Parser parser,
return XML_ERROR_RECURSIVE_ENTITY_REF; return XML_ERROR_RECURSIVE_ENTITY_REF;
if (entity->textPtr) { if (entity->textPtr) {
enum XML_Error result; enum XML_Error result;
XML_Bool betweenDecl = XML_Bool betweenDecl =
(role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE); (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
result = processInternalEntity(parser, entity, betweenDecl); result = processInternalEntity(parser, entity, betweenDecl);
if (result != XML_ERROR_NONE) if (result != XML_ERROR_NONE)
@ -4589,7 +4589,7 @@ doProlog(XML_Parser parser,
reportDefault(parser, enc, s, next); reportDefault(parser, enc, s, next);
switch (ps_parsing) { switch (ps_parsing) {
case XML_SUSPENDED: case XML_SUSPENDED:
*nextPtr = next; *nextPtr = next;
return XML_ERROR_NONE; return XML_ERROR_NONE;
case XML_FINISHED: case XML_FINISHED:
@ -4659,7 +4659,7 @@ epilogProcessor(XML_Parser parser,
} }
eventPtr = s = next; eventPtr = s = next;
switch (ps_parsing) { switch (ps_parsing) {
case XML_SUSPENDED: case XML_SUSPENDED:
*nextPtr = next; *nextPtr = next;
return XML_ERROR_NONE; return XML_ERROR_NONE;
case XML_FINISHED: case XML_FINISHED:
@ -4702,12 +4702,12 @@ processInternalEntity(XML_Parser parser, ENTITY *entity,
#ifdef XML_DTD #ifdef XML_DTD
if (entity->is_param) { if (entity->is_param) {
int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next); int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next);
result = doProlog(parser, internalEncoding, textStart, textEnd, tok, result = doProlog(parser, internalEncoding, textStart, textEnd, tok,
next, &next, XML_FALSE); next, &next, XML_FALSE);
} }
else else
#endif /* XML_DTD */ #endif /* XML_DTD */
result = doContent(parser, tagLevel, internalEncoding, textStart, result = doContent(parser, tagLevel, internalEncoding, textStart,
textEnd, &next, XML_FALSE); textEnd, &next, XML_FALSE);
if (result == XML_ERROR_NONE) { if (result == XML_ERROR_NONE) {
@ -4747,13 +4747,13 @@ internalEntityProcessor(XML_Parser parser,
#ifdef XML_DTD #ifdef XML_DTD
if (entity->is_param) { if (entity->is_param) {
int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next); int tok = XmlPrologTok(internalEncoding, textStart, textEnd, &next);
result = doProlog(parser, internalEncoding, textStart, textEnd, tok, result = doProlog(parser, internalEncoding, textStart, textEnd, tok,
next, &next, XML_FALSE); next, &next, XML_FALSE);
} }
else else
#endif /* XML_DTD */ #endif /* XML_DTD */
result = doContent(parser, openEntity->startTagLevel, internalEncoding, result = doContent(parser, openEntity->startTagLevel, internalEncoding,
textStart, textEnd, &next, XML_FALSE); textStart, textEnd, &next, XML_FALSE);
if (result != XML_ERROR_NONE) if (result != XML_ERROR_NONE)
return result; return result;
@ -4774,7 +4774,7 @@ internalEntityProcessor(XML_Parser parser,
int tok; int tok;
processor = prologProcessor; processor = prologProcessor;
tok = XmlPrologTok(encoding, s, end, &next); tok = XmlPrologTok(encoding, s, end, &next);
return doProlog(parser, encoding, s, end, tok, next, nextPtr, return doProlog(parser, encoding, s, end, tok, next, nextPtr,
(XML_Bool)!ps_finalBuffer); (XML_Bool)!ps_finalBuffer);
} }
else else
@ -4783,8 +4783,8 @@ internalEntityProcessor(XML_Parser parser,
processor = contentProcessor; processor = contentProcessor;
/* see externalEntityContentProcessor vs contentProcessor */ /* see externalEntityContentProcessor vs contentProcessor */
return doContent(parser, parentParser ? 1 : 0, encoding, s, end, return doContent(parser, parentParser ? 1 : 0, encoding, s, end,
nextPtr, (XML_Bool)!ps_finalBuffer); nextPtr, (XML_Bool)!ps_finalBuffer);
} }
} }
static enum XML_Error PTRCALL static enum XML_Error PTRCALL

View File

@ -1333,7 +1333,7 @@ unknown_toUtf16(const ENCODING *enc,
ENCODING * ENCODING *
XmlInitUnknownEncoding(void *mem, XmlInitUnknownEncoding(void *mem,
int *table, int *table,
CONVERTER convert, CONVERTER convert,
void *userData) void *userData)
{ {
int i; int i;
@ -1627,7 +1627,7 @@ initScan(const ENCODING * const *encodingTable,
ENCODING * ENCODING *
XmlInitUnknownEncodingNS(void *mem, XmlInitUnknownEncodingNS(void *mem,
int *table, int *table,
CONVERTER convert, CONVERTER convert,
void *userData) void *userData)
{ {
ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData); ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData);

View File

@ -233,7 +233,7 @@ void astring_free(astring *str)
/*------------------------------------------------- /*-------------------------------------------------
astring_expand - expand an astring to astring_expand - expand an astring to
guarantee the given amount of space guarantee the given amount of space
-------------------------------------------------*/ -------------------------------------------------*/

View File

@ -1059,7 +1059,7 @@ static MACHINE_DRIVER_START( schaser )
/* basic machine hardware */ /* basic machine hardware */
MDRV_IMPORT_FROM(mw8080bw_root) MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_REPLACE("maincpu",I8080,1996800) /* 19.968MHz / 10 */ MDRV_CPU_REPLACE("maincpu",I8080,1996800) /* 19.968MHz / 10 */
MDRV_CPU_PROGRAM_MAP(schaser_map) MDRV_CPU_PROGRAM_MAP(schaser_map)
MDRV_CPU_IO_MAP(schaser_io_map) MDRV_CPU_IO_MAP(schaser_io_map)
MDRV_WATCHDOG_VBLANK_INIT(255) MDRV_WATCHDOG_VBLANK_INIT(255)
@ -1468,7 +1468,7 @@ static MACHINE_DRIVER_START( polaris )
/* basic machine hardware */ /* basic machine hardware */
MDRV_IMPORT_FROM(mw8080bw_root) MDRV_IMPORT_FROM(mw8080bw_root)
MDRV_CPU_REPLACE("maincpu",I8080,1996800) /* 19.968MHz / 10 */ MDRV_CPU_REPLACE("maincpu",I8080,1996800) /* 19.968MHz / 10 */
MDRV_CPU_PROGRAM_MAP(schaser_map) MDRV_CPU_PROGRAM_MAP(schaser_map)
MDRV_CPU_IO_MAP(polaris_io_map) MDRV_CPU_IO_MAP(polaris_io_map)
MDRV_WATCHDOG_VBLANK_INIT(255) MDRV_WATCHDOG_VBLANK_INIT(255)
@ -2235,7 +2235,7 @@ static DRIVER_INIT( vortex )
/* unknown gun game by Model Racing, possibly Gun Champ? /* unknown gun game by Model Racing, possibly Gun Champ?
BOARD 1: BOARD 1:
_________________________________________________________________________________________________________________________________ _________________________________________________________________________________________________________________________________
| 12 13 14 15 16 17 18 19 | | 12 13 14 15 16 17 18 19 |
| _________ _______ ___ ___ ___ ___ ___ ___ ___ ___ | | _________ _______ ___ ___ ___ ___ ___ ___ ___ ___ |
|___ 11 |74LS241N | |74LS159| |AM9| |AM9| |AM9| |AM9| |AM9| |AM9| |AM9| |AM9| | |___ 11 |74LS241N | |74LS159| |AM9| |AM9| |AM9| |AM9| |AM9| |AM9| |AM9| |AM9| |
@ -2292,11 +2292,11 @@ BOARD 1:
|_________________________________________________________________________________________________________________________________| |_________________________________________________________________________________________________________________________________|
XTAL=19,66080MHz XTAL=19,66080MHz
BOARD 2: BOARD 2:
_________________________________________________________________________________________________________________________________ _________________________________________________________________________________________________________________________________
| | | |
| _______ _______ _______ _______ _________ | | _______ _______ _______ _______ _________ |
|___ 11 |74LS175| |74LS151| |74LS151| |74LS153| |74LS244N | Model | |___ 11 |74LS175| |74LS151| |74LS151| |74LS153| |74LS244N | Model |
@ -2311,7 +2311,7 @@ BOARD 2:
| _| _______ _______ _______ _______ ____________ | | _| _______ _______ _______ _______ ____________ |
| _| |74LS174| |74LS151| |74LS151| |74LS153| 9 | | __| | _| |74LS174| |74LS151| |74LS151| |74LS153| 9 | | __|
| _| |_______| |_______| |_______| |_______| | | | | _| |_______| |_______| |_______| |_______| | | |
| _| | | |__ | _| | | |__
| _| | | =| | _| | | =|
| _| _______ _______ _______ _______ | | =| | _| _______ _______ _______ _______ | | =|
| _| |74LS174| |74LS151| |74LS151| |74LS153| 8 | | =| | _| |74LS174| |74LS151| |74LS151| |74LS153| 8 | | =|
@ -2337,7 +2337,7 @@ BOARD 2:
| _| =| | _| =|
| _| _______ _______ ______________ _______ ____ __| | _| _______ _______ ______________ _______ ____ __|
| _| 3 |74LS14N| |74LS74A| | SN76477N | |74LS107| |DIP1| | | _| 3 |74LS14N| |74LS74A| | SN76477N | |74LS107| |DIP1| |
| _| |_______| |_______| | 7923XY | |_______| |____| |__ | _| |_______| |_______| | 7923XY | |_______| |____| |__
| _| | SINGAPORE | | | _| | SINGAPORE | |
| _| |______________| | | _| |______________| |
| _| _______ _______ _______ _______ _______ | | _| _______ _______ _______ _______ _______ |
@ -2359,11 +2359,11 @@ BOARD 2:
// might need custom implementation // might need custom implementation
static ADDRESS_MAP_START( modelr_io_map, ADDRESS_SPACE_IO, 8 ) static ADDRESS_MAP_START( modelr_io_map, ADDRESS_SPACE_IO, 8 )
// AM_RANGE(0x00, 0x00) AM_DEVWRITE("mb14241", mb14241_shift_count_w) // AM_RANGE(0x00, 0x00) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
// AM_RANGE(0x01, 0x01) AM_DEVREAD("mb14241", mb14241_shift_result_r) // AM_RANGE(0x01, 0x01) AM_DEVREAD("mb14241", mb14241_shift_result_r)
AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w) AM_RANGE(0x02, 0x02) AM_DEVWRITE("mb14241", mb14241_shift_data_w)
AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r) AM_RANGE(0x03, 0x03) AM_DEVREAD("mb14241", mb14241_shift_result_r)
// AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_count_w) // AM_RANGE(0x04, 0x04) AM_DEVWRITE("mb14241", mb14241_shift_count_w)
AM_RANGE(0x05, 0x05) AM_WRITE(watchdog_reset_w) AM_RANGE(0x05, 0x05) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END ADDRESS_MAP_END

View File

@ -1,12 +1,12 @@
/* /*
Driver: aristmk4 Driver: aristmk4
Manufacturer: Aristocrat Leisure Industries Manufacturer: Aristocrat Leisure Industries
Platform: Aristocrat 540 Video ( MK 2.5 Video / MK IV ) Platform: Aristocrat 540 Video ( MK 2.5 Video / MK IV )
Driver by Palindrome & FraSher Driver by Palindrome & FraSher
Technical Notes: Technical Notes:
68B09EP Motorola Processor 68B09EP Motorola Processor
R6545AP for CRT video controller R6545AP for CRT video controller
UPD43256BCZ-70LL for 32kb of static ram used for 3 way electronic meters / 3 way memory UPD43256BCZ-70LL for 32kb of static ram used for 3 way electronic meters / 3 way memory
@ -16,59 +16,59 @@
2 x WF19054 = AY3-8910 sound chips driven by the 6522 VIA 2 x WF19054 = AY3-8910 sound chips driven by the 6522 VIA
1 x PML 2852 ( programmable logic ) used as address decoder. 1 x PML 2852 ( programmable logic ) used as address decoder.
1 x PML 2852 programmed as a PIA 1 x PML 2852 programmed as a PIA
PIA provides output signals to six mechanical meters. PIA provides output signals to six mechanical meters.
It also provides the real time clock DS1287 to the CPU. It also provides the real time clock DS1287 to the CPU.
VIA drives the programmable sound generators and generates VIA drives the programmable sound generators and generates
a timing interrupt to the CPU (M6809_FIRQ_LINE) a timing interrupt to the CPU (M6809_FIRQ_LINE)
The VIA uses Port A to write to the D0-D7 on the AY8910s. Port B hooks first 4 bits up to BC1/BC2/BDIR and A9 on AY1 and A8 on AY2 The VIA uses Port A to write to the D0-D7 on the AY8910s. Port B hooks first 4 bits up to BC1/BC2/BDIR and A9 on AY1 and A8 on AY2
The remaining 4 bits are connected to other hardware, read via the VIA. The remaining 4 bits are connected to other hardware, read via the VIA.
The AY8910 named ay1 has writes on PORT B to the ZN434 DA convertor. The AY8910 named ay1 has writes on PORT B to the ZN434 DA convertor.
The AY8910 named ay2 has writes to lamps and the light tower on Port A and B. these are implemented via the layout The AY8910 named ay2 has writes to lamps and the light tower on Port A and B. these are implemented via the layout
************************************************************************************************************* *************************************************************************************************************
27/04/10 - FrasheR 27/04/10 - FrasheR
2 x Sound Chips connected to the 6522 VIA. 2 x Sound Chips connected to the 6522 VIA.
16/05/10 - FrasheR 16/05/10 - FrasheR
Fixed VIA for good. 5010 - 501F. Fixed VIA for good. 5010 - 501F.
Hooked up push button inputs - FrasheR Hooked up push button inputs - FrasheR
Hooked up ports for the PML 2852 U3 - FrasheR Hooked up ports for the PML 2852 U3 - FrasheR
16/05/10 - Palindrome 16/05/10 - Palindrome
Lamp outputs and layout added - Palindrome Lamp outputs and layout added - Palindrome
NVRAM backup - Palindrome NVRAM backup - Palindrome
20/05/10 - Palindrome 20/05/10 - Palindrome
Connected SW7 for BGCOLOUR map select Connected SW7 for BGCOLOUR map select
Added LK13. 3Mhz or 1.5 Mhz CPU speed select Added LK13. 3Mhz or 1.5 Mhz CPU speed select
Added sound sample for mechanical meter pulse ( aristmk4.zip ). Added sound sample for mechanical meter pulse ( aristmk4.zip ).
30/5/10 - Palindrome 30/5/10 - Palindrome
Now using mc146818 rtc driver instead of rtc_get_reg. Now using mc146818 rtc driver instead of rtc_get_reg.
The mc146818 driver is buggy - reported problem to Firewave and issues will be addressed. The mc146818 driver is buggy - reported problem to Firewave and issues will be addressed.
In this driver, the wrong day of the month is shown, wrong hours are shown. In this driver, the wrong day of the month is shown, wrong hours are shown.
rtc causes game to freeze if the game is left in audit mode with continuous writes to 0xA reg - 0x80 data. rtc causes game to freeze if the game is left in audit mode with continuous writes to 0xA reg - 0x80 data.
TODO: TODO:
1.Create layouts for each game ( each game is currently using the generic aristmk4.lay for now ). 1.Create layouts for each game ( each game is currently using the generic aristmk4.lay for now ).
- Games may have different button configuration requirements ( ie.. 9 or 5 lines and different bet values ) - Games may have different button configuration requirements ( ie.. 9 or 5 lines and different bet values )
2.Extend the driver to use the keno keyboard input for keno games. 2.Extend the driver to use the keno keyboard input for keno games.
3.Some with cashcade jackpot systems such as topgear do not work yet. Eforest does not work. 3.Some with cashcade jackpot systems such as topgear do not work yet. Eforest does not work.
5.Add note acceptor support 5.Add note acceptor support
6.Robot test 6.Robot test
***********************************************************************************************************************************************/ ***********************************************************************************************************************************************/
#define MAIN_CLOCK XTAL_12MHz #define MAIN_CLOCK XTAL_12MHz
@ -111,17 +111,17 @@ static VIDEO_START(aristmk4)
int tile; int tile;
for (tile = 0; tile < machine->gfx[0]->total_elements; tile++) for (tile = 0; tile < machine->gfx[0]->total_elements; tile++)
{ {
gfx_element_decode(machine->gfx[0], tile); gfx_element_decode(machine->gfx[0], tile);
} }
} }
INLINE void uBackgroundColour(running_machine *machine) INLINE void uBackgroundColour(running_machine *machine)
{ {
/* SW7 can be set when the main door is open, this allows the colours for the background /* SW7 can be set when the main door is open, this allows the colours for the background
to be adjusted whilst the machine is running. to be adjusted whilst the machine is running.
There are 4 possible combinations for colour select via SW7, colours vary based on software installed. There are 4 possible combinations for colour select via SW7, colours vary based on software installed.
*/ */
switch(input_port_read(machine, "SW7")) switch(input_port_read(machine, "SW7"))
{ {
@ -131,19 +131,19 @@ INLINE void uBackgroundColour(running_machine *machine)
// OE enabled on both shapes // OE enabled on both shapes
break; break;
case 0x01: case 0x01:
// unselect U22 via SW7 . OE on U22 is low. // unselect U22 via SW7 . OE on U22 is low.
memset(&shapeRomPtr[0x4000],0xff,0x2000); // fill unused space with 0xff memset(&shapeRomPtr[0x4000],0xff,0x2000); // fill unused space with 0xff
memcpy(&shapeRomPtr[0xa000],&shapeRom[0xa000], 0x2000); // restore defaults here memcpy(&shapeRomPtr[0xa000],&shapeRom[0xa000], 0x2000); // restore defaults here
break; break;
case 0x02: case 0x02:
// unselect U47 via SW7 . OE on U47 is low. // unselect U47 via SW7 . OE on U47 is low.
memcpy(&shapeRomPtr[0x4000],&shapeRom[0x4000], 0x2000); memcpy(&shapeRomPtr[0x4000],&shapeRom[0x4000], 0x2000);
memset(&shapeRomPtr[0xa000],0xff,0x2000); memset(&shapeRomPtr[0xa000],0xff,0x2000);
break; break;
case 0x03: case 0x03:
// unselect U47 & u22 via SW7. both output enable low. // unselect U47 & u22 via SW7. both output enable low.
memset(&shapeRomPtr[0x4000],0xff,0x2000); memset(&shapeRomPtr[0x4000],0xff,0x2000);
memset(&shapeRomPtr[0xa000],0xff,0x2000); memset(&shapeRomPtr[0xa000],0xff,0x2000);
break; break;
} }
} }
@ -158,7 +158,7 @@ static VIDEO_UPDATE(aristmk4)
int bgtile; int bgtile;
int flipx; int flipx;
int flipy; int flipy;
for (y=27;y--;) for (y=27;y--;)
{ {
for (x=38;x--;) for (x=38;x--;)
@ -191,7 +191,7 @@ static READ8_HANDLER(ldsw)
static READ8_HANDLER(cgdrr) static READ8_HANDLER(cgdrr)
{ {
if(cgdrsw) // is the LC closed if(cgdrsw) // is the LC closed
{ {
return ripple; // return a positive value from the ripple counter return ripple; // return a positive value from the ripple counter
@ -201,9 +201,9 @@ static READ8_HANDLER(cgdrr)
static WRITE8_HANDLER(cgdrw) static WRITE8_HANDLER(cgdrw)
{ {
ripple = data; ripple = data;
} }
static WRITE8_HANDLER(u3_p0) static WRITE8_HANDLER(u3_p0)
@ -224,7 +224,7 @@ static READ8_HANDLER(u3_p2)
output_set_lamp_value(20, (u3_p3_ret >> 2) & 1); //jackpotkey light output_set_lamp_value(20, (u3_p3_ret >> 2) & 1); //jackpotkey light
if (u3_p0_w&0x20) // DOPTE on if (u3_p0_w&0x20) // DOPTE on
{ {
if (u3_p3_ret&0x02) // door closed if (u3_p3_ret&0x02) // door closed
u3_p2_ret = u3_p2_ret^0x08; // DOPTI on u3_p2_ret = u3_p2_ret^0x08; // DOPTI on
} }
@ -266,7 +266,7 @@ PORTB - MECHANICAL METERS
static READ8_HANDLER(mkiv_pia_ina) static READ8_HANDLER(mkiv_pia_ina)
{ {
return mc146818_port_r(space,1); return mc146818_port_r(space,1);
} }
@ -278,15 +278,15 @@ static WRITE8_HANDLER(mkiv_pia_outa)
{ {
mc146818_port_w(space,1,data); mc146818_port_w(space,1,data);
//logerror("rtc protocol write data: %02X\n",data); //logerror("rtc protocol write data: %02X\n",data);
} }
else else
{ {
mc146818_port_w(space,0,data); mc146818_port_w(space,0,data);
//logerror("rtc protocol write address: %02X\n",data); //logerror("rtc protocol write address: %02X\n",data);
} }
} }
//output ca2 //output ca2
@ -316,18 +316,18 @@ static WRITE8_DEVICE_HANDLER(mkiv_pia_outb)
emet[0] = data & 0x01; /* emet1 - bit 1 - PB0 */ emet[0] = data & 0x01; /* emet1 - bit 1 - PB0 */
/* seren1 - bit 2 - PB1 */ /* seren1 - bit 2 - PB1 */
emet[1] = data & 0x04; /* emet3 - bit 3 - PB2 */ emet[1] = data & 0x04; /* emet3 - bit 3 - PB2 */
emet[2] = data & 0x08; /* emet4 - bit 4 - PB3 */ emet[2] = data & 0x08; /* emet4 - bit 4 - PB3 */
emet[3] = data & 0x10; /* emet5 - bit 5 - PB4 */ emet[3] = data & 0x10; /* emet5 - bit 5 - PB4 */
emet[4] = data & 0x20; /* emet6 - bit 6 - PB5 */ emet[4] = data & 0x20; /* emet6 - bit 6 - PB5 */
for(i = 0;i<sizeof(emet);i++) for(i = 0;i<sizeof(emet);i++)
{ {
if(emet[i]) if(emet[i])
{ {
//logerror("Mechanical meter %d pulse: %02d\n",i+1, emet[i]); //logerror("Mechanical meter %d pulse: %02d\n",i+1, emet[i]);
sample_start(samples,i,0, FALSE); // pulse sound for mechanical meters sample_start(samples,i,0, FALSE); // pulse sound for mechanical meters
} }
} }
@ -338,8 +338,8 @@ static WRITE8_DEVICE_HANDLER(mkiv_pia_outb)
static const char *const meter_sample_names[] = static const char *const meter_sample_names[] =
{ {
"*aristmk4", "*aristmk4",
"tick.wav", "tick.wav",
0 0
}; };
static const samples_interface meter_samples_interface = static const samples_interface meter_samples_interface =
@ -426,7 +426,7 @@ static READ8_DEVICE_HANDLER(via_b_r)
break; break;
default: default:
break; //timer will reset the input break; //timer will reset the input
} }
@ -578,7 +578,7 @@ static WRITE8_DEVICE_HANDLER(via_cb2_w)
// as soon as it is 1, HOPCO1 to remain 'ON' // as soon as it is 1, HOPCO1 to remain 'ON'
if (data==0x01) if (data==0x01)
hopper_motor=data; hopper_motor=data;
else if (hopper_motor<0x02) else if (hopper_motor<0x02)
hopper_motor=data; hopper_motor=data;
} }
@ -596,7 +596,7 @@ static WRITE8_DEVICE_HANDLER(pblp_out)
output_set_lamp_value(4, (data >> 5) & 1); output_set_lamp_value(4, (data >> 5) & 1);
output_set_lamp_value(2, (data >> 6) & 1); output_set_lamp_value(2, (data >> 6) & 1);
output_set_lamp_value(10,(data >> 7) & 1); output_set_lamp_value(10,(data >> 7) & 1);
//logerror("Lights port A %02X\n",data); //logerror("Lights port A %02X\n",data);
} }
@ -610,7 +610,7 @@ static WRITE8_DEVICE_HANDLER(pbltlp_out)
output_set_lamp_value(15, (data >> 5) & 1); // light tower output_set_lamp_value(15, (data >> 5) & 1); // light tower
output_set_lamp_value(16, (data >> 6) & 1); // light tower output_set_lamp_value(16, (data >> 6) & 1); // light tower
output_set_lamp_value(17, (data >> 7) & 1); // light tower output_set_lamp_value(17, (data >> 7) & 1); // light tower
//logerror("Lights port B: %02X\n",data); //logerror("Lights port B: %02X\n",data);
@ -641,7 +641,7 @@ static ADDRESS_MAP_START( aristmk4_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x1801, 0x1801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w) AM_RANGE(0x1801, 0x1801) AM_DEVREADWRITE("crtc", mc6845_register_r, mc6845_register_w)
AM_RANGE(0x2000, 0x3fff) AM_ROM // graphics rom map AM_RANGE(0x2000, 0x3fff) AM_ROM // graphics rom map
AM_RANGE(0x4000, 0x4fff) AM_RAMBANK("bank1") AM_BASE_SIZE_GENERIC(nvram) AM_RANGE(0x4000, 0x4fff) AM_RAMBANK("bank1") AM_BASE_SIZE_GENERIC(nvram)
AM_RANGE(0x5000, 0x5000) AM_WRITE(u3_p0) AM_RANGE(0x5000, 0x5000) AM_WRITE(u3_p0)
AM_RANGE(0x5002, 0x5002) AM_READ(u3_p2) AM_RANGE(0x5002, 0x5002) AM_READ(u3_p2)
AM_RANGE(0x5003, 0x5003) AM_READ_PORT("5003") AM_RANGE(0x5003, 0x5003) AM_READ_PORT("5003")
@ -652,7 +652,7 @@ static ADDRESS_MAP_START( aristmk4_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x5010, 0x501f) AM_DEVREADWRITE("via6522_0",via_r,via_w) AM_RANGE(0x5010, 0x501f) AM_DEVREADWRITE("via6522_0",via_r,via_w)
AM_RANGE(0x5200, 0x5200) AM_READ_PORT("5200") AM_RANGE(0x5200, 0x5200) AM_READ_PORT("5200")
AM_RANGE(0x5201, 0x5201) AM_READ_PORT("5201") AM_RANGE(0x5201, 0x5201) AM_READ_PORT("5201")
AM_RANGE(0x527f, 0x5281) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w) AM_RANGE(0x527f, 0x5281) AM_DEVREADWRITE("ppi8255_0", ppi8255_r, ppi8255_w)
AM_RANGE(0x5300, 0x5300) AM_READ_PORT("5300") AM_RANGE(0x5300, 0x5300) AM_READ_PORT("5300")
AM_RANGE(0x5380, 0x5383) AM_DEVREADWRITE("pia6821_0",pia6821_r,pia6821_w) // RTC data - PORT A , mechanical meters - PORTB ?? AM_RANGE(0x5380, 0x5383) AM_DEVREADWRITE("pia6821_0",pia6821_r,pia6821_w) // RTC data - PORT A , mechanical meters - PORTB ??
AM_RANGE(0x5440, 0x5440) AM_WRITE(mlamps) // take win and gamble lamps AM_RANGE(0x5440, 0x5440) AM_WRITE(mlamps) // take win and gamble lamps
@ -663,7 +663,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START(aristmk4) static INPUT_PORTS_START(aristmk4)
/***********************************************************************************************************/ /***********************************************************************************************************/
PORT_START("via_port_b") PORT_START("via_port_b")
PORT_DIPNAME( 0x40, 0x40, "HOPCO1" ) PORT_DIPNAME( 0x40, 0x40, "HOPCO1" )
PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_DIPLOCATION("AY:3") PORT_DIPSETTING( 0x40, DEF_STR( On ) ) PORT_DIPLOCATION("AY:3")
@ -671,16 +671,16 @@ static INPUT_PORTS_START(aristmk4)
PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_DIPLOCATION("AY:4") PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_DIPLOCATION("AY:4")
/************************************************************************************************************ /************************************************************************************************************
5002 5002
************************************************************************************************************/ ************************************************************************************************************/
PORT_START("5002") PORT_START("5002")
PORT_DIPNAME( 0x01, 0x00, "HOPCO2") // coins out hopper 2 , why triggers logic door ? PORT_DIPNAME( 0x01, 0x00, "HOPCO2") // coins out hopper 2 , why triggers logic door ?
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:1") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:1")
PORT_DIPSETTING( 0x01, DEF_STR( On ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, "CBOPT2") // coin in cash box 2 PORT_DIPNAME( 0x02, 0x02, "CBOPT2") // coin in cash box 2
PORT_DIPSETTING( 0x02, DEF_STR( On ) ) PORT_DIPLOCATION("5002:2") PORT_DIPSETTING( 0x02, DEF_STR( On ) ) PORT_DIPLOCATION("5002:2")
PORT_DIPNAME( 0x04, 0x00, "HOPHI2") // hopper 2 full PORT_DIPNAME( 0x04, 0x00, "HOPHI2") // hopper 2 full
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:3") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:3")
@ -688,7 +688,7 @@ static INPUT_PORTS_START(aristmk4)
PORT_DIPNAME( 0x08, 0x00, "DOPTI") // photo optic door PORT_DIPNAME( 0x08, 0x00, "DOPTI") // photo optic door
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("AUDTSW") PORT_TOGGLE PORT_CODE(KEYCODE_K) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("AUDTSW") PORT_TOGGLE PORT_CODE(KEYCODE_K)
PORT_DIPNAME( 0x20, 0x00, "HOPLO1") // hopper 1 low PORT_DIPNAME( 0x20, 0x00, "HOPLO1") // hopper 1 low
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:6") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:6")
PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, "HOPLO2") // hopper 2 low PORT_DIPNAME( 0x40, 0x00, "HOPLO2") // hopper 2 low
@ -698,16 +698,16 @@ static INPUT_PORTS_START(aristmk4)
/************************************************************************************************************ /************************************************************************************************************
5003 5003
************************************************************************************************************/ ************************************************************************************************************/
PORT_START("5003") PORT_START("5003")
PORT_DIPNAME( 0x01, 0x00, "OPTAUI") // opto audit in PORT_DIPNAME( 0x01, 0x00, "OPTAUI") // opto audit in
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:1") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:1")
PORT_DIPSETTING( 0x01, DEF_STR( On ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("DSWDT") PORT_TOGGLE PORT_CODE(KEYCODE_M) // main door switch PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("DSWDT") PORT_TOGGLE PORT_CODE(KEYCODE_M) // main door switch
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("JKPTSW") PORT_TOGGLE PORT_CODE(KEYCODE_J) // jackpot reset switch PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("JKPTSW") PORT_TOGGLE PORT_CODE(KEYCODE_J) // jackpot reset switch
PORT_DIPNAME( 0x08, 0x00, "HOPHI1") // hopper 1 full PORT_DIPNAME( 0x08, 0x00, "HOPHI1") // hopper 1 full
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:4") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:4")
@ -715,7 +715,7 @@ static INPUT_PORTS_START(aristmk4)
PORT_DIPNAME( 0x10, 0x00, "OPTA2") // coin in a2 PORT_DIPNAME( 0x10, 0x00, "OPTA2") // coin in a2
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:5") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:5")
PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) )
PORT_DIPNAME( 0x20, 0x20, "OPTB2") // coin in b2 PORT_DIPNAME( 0x20, 0x20, "OPTB2") // coin in b2
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:6") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:6")
PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, "PTRTAC") // printer taco PORT_DIPNAME( 0x40, 0x00, "PTRTAC") // printer taco
@ -724,13 +724,13 @@ static INPUT_PORTS_START(aristmk4)
PORT_DIPNAME( 0x80, 0x00, "PTRHOM") // printer home PORT_DIPNAME( 0x80, 0x00, "PTRHOM") // printer home
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:8") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5003:8")
PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) )
/************************************************************************************************************ /************************************************************************************************************
5300 5300
************************************************************************************************************/ ************************************************************************************************************/
PORT_START("5300") PORT_START("5300")
PORT_DIPNAME( 0x01, 0x00, "5300-1") PORT_DIPNAME( 0x01, 0x00, "5300-1")
PORT_DIPSETTING( 0X00, DEF_STR( Off ) ) PORT_DIPLOCATION("5300:1") PORT_DIPSETTING( 0X00, DEF_STR( Off ) ) PORT_DIPLOCATION("5300:1")
@ -761,31 +761,31 @@ static INPUT_PORTS_START(aristmk4)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5 CREDITS PER LINE") PORT_CODE(KEYCODE_T) // 5 credits per line PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5 CREDITS PER LINE") PORT_CODE(KEYCODE_T) // 5 credits per line
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("10 CREDITS PER LINE") PORT_CODE(KEYCODE_Y) // 10 credits per line PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("10 CREDITS PER LINE") PORT_CODE(KEYCODE_Y) // 10 credits per line
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("COLLECT") PORT_CODE(KEYCODE_Q) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("COLLECT") PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("RESERVE") PORT_CODE(KEYCODE_A) // reserve PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("RESERVE") PORT_CODE(KEYCODE_A) // reserve
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("GAMBLE") PORT_CODE(KEYCODE_U) // auto gamble & gamble PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("GAMBLE") PORT_CODE(KEYCODE_U) // auto gamble & gamble
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("TAKE WIN") PORT_CODE(KEYCODE_J) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("TAKE WIN") PORT_CODE(KEYCODE_J)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-7") PORT_CODE(KEYCODE_U) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-7") PORT_CODE(KEYCODE_U)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-8") PORT_CODE(KEYCODE_I) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-8") PORT_CODE(KEYCODE_I)
PORT_START("500e") PORT_START("500e")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1 CREDIT PER LINE") PORT_CODE(KEYCODE_W) // 1 credit per line PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1 CREDIT PER LINE") PORT_CODE(KEYCODE_W) // 1 credit per line
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 1") PORT_CODE(KEYCODE_S) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 1") PORT_CODE(KEYCODE_S)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2 CREDITS PER LINE") PORT_CODE(KEYCODE_E) // 2 credits per line PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2 CREDITS PER LINE") PORT_CODE(KEYCODE_E) // 2 credits per line
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 9") PORT_CODE(KEYCODE_H) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 9") PORT_CODE(KEYCODE_H)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3 CREDITS PER LINE") PORT_CODE(KEYCODE_R) // 3 credits per line PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3 CREDITS PER LINE") PORT_CODE(KEYCODE_R) // 3 credits per line
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 7") PORT_CODE(KEYCODE_G) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 7") PORT_CODE(KEYCODE_G)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 5") PORT_CODE(KEYCODE_F) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 5") PORT_CODE(KEYCODE_F)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 3") PORT_CODE(KEYCODE_D) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PLAY 3") PORT_CODE(KEYCODE_D)
PORT_START("500f") PORT_START("500f")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-1") PORT_CODE(KEYCODE_1) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-1") PORT_CODE(KEYCODE_1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-2") PORT_CODE(KEYCODE_2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-2") PORT_CODE(KEYCODE_2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-3") PORT_CODE(KEYCODE_3) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-3") PORT_CODE(KEYCODE_3)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("AUX - PB5") PORT_CODE(KEYCODE_X) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("AUX - PB5") PORT_CODE(KEYCODE_X)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("MEM TEST - PB4") PORT_CODE(KEYCODE_C) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("MEM TEST - PB4") PORT_CODE(KEYCODE_C)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("HOPPER TEST - PB3") PORT_CODE(KEYCODE_V) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("HOPPER TEST - PB3") PORT_CODE(KEYCODE_V)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PRINT DATA - PB2") PORT_CODE(KEYCODE_B) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("PRINT DATA - PB2") PORT_CODE(KEYCODE_B)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("CLOCK INIT - PB1") PORT_CODE(KEYCODE_N) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("CLOCK INIT - PB1") PORT_CODE(KEYCODE_N)
PORT_START("5200") PORT_START("5200")
PORT_DIPNAME( 0x01, 0x00, "5200-1") PORT_DIPNAME( 0x01, 0x00, "5200-1")
@ -843,28 +843,28 @@ static INPUT_PORTS_START(aristmk4)
PORT_START("insertcoin") PORT_START("insertcoin")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Insert Credit") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Insert Credit")
/************************************************************************************************************ /************************************************************************************************************
Logic Door switch Logic Door switch
************************************************************************************************************/ ************************************************************************************************************/
PORT_START("CGDRSW") PORT_START("CGDRSW")
PORT_DIPNAME( 0x10, 0x10, "CGDRSW" ) PORT_DIPLOCATION("CGDRSW:1") /* toggle switch */ PORT_DIPNAME( 0x10, 0x10, "CGDRSW" ) PORT_DIPLOCATION("CGDRSW:1") /* toggle switch */
PORT_DIPSETTING( 0x00, "Open" ) PORT_DIPSETTING( 0x00, "Open" )
PORT_DIPSETTING( 0x10, "Closed" ) PORT_DIPSETTING( 0x10, "Closed" )
/************************************** LINKS ***************************************************************/ /************************************** LINKS ***************************************************************/
PORT_START("LK13") PORT_START("LK13")
PORT_DIPNAME( 0x10, 0x10, "Speed Select" ) PORT_DIPLOCATION("LK13:1") PORT_DIPNAME( 0x10, 0x10, "Speed Select" ) PORT_DIPLOCATION("LK13:1")
PORT_DIPSETTING( 0x00, "3 Mhz" ) PORT_DIPSETTING( 0x00, "3 Mhz" )
PORT_DIPSETTING( 0x10, "1.5 Mhz" ) PORT_DIPSETTING( 0x10, "1.5 Mhz" )
/********************************* Dip switch for background color *************************************************/ /********************************* Dip switch for background color *************************************************/
PORT_START("SW7") PORT_START("SW7")
PORT_DIPNAME( 0x01, 0x01, "SW7 - U22 BG COLOR" ) PORT_DIPNAME( 0x01, 0x01, "SW7 - U22 BG COLOR" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("SW7:1") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("SW7:1")
@ -872,10 +872,10 @@ static INPUT_PORTS_START(aristmk4)
PORT_DIPNAME( 0x02, 0x00, "SW7 - U47 BG COLOR" ) PORT_DIPNAME( 0x02, 0x00, "SW7 - U47 BG COLOR" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("SW7:2") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("SW7:2")
PORT_DIPSETTING( 0x02, DEF_STR( On ) ) PORT_DIPSETTING( 0x02, DEF_STR( On ) )
/********************************* 9 way control rotary switches ***************************************************/ /********************************* 9 way control rotary switches ***************************************************/
PORT_START("SW3") PORT_START("SW3")
PORT_DIPNAME( 0x0f, 0x00, "SW3 - M/C NO" ) PORT_DIPNAME( 0x0f, 0x00, "SW3 - M/C NO" )
PORT_DIPSETTING( 0x00, "0" ) PORT_DIPSETTING( 0x00, "0" )
@ -901,7 +901,7 @@ static INPUT_PORTS_START(aristmk4)
PORT_DIPSETTING( 0x07, "7" ) PORT_DIPSETTING( 0x07, "7" )
PORT_DIPSETTING( 0x08, "8" ) PORT_DIPSETTING( 0x08, "8" )
PORT_DIPSETTING( 0x09, "9" ) PORT_DIPSETTING( 0x09, "9" )
PORT_START("SW5") PORT_START("SW5")
PORT_DIPNAME( 0x0f, 0x00, "SW5 - M/C NO" ) PORT_DIPNAME( 0x0f, 0x00, "SW5 - M/C NO" )
PORT_DIPSETTING( 0x00, "0" ) PORT_DIPSETTING( 0x00, "0" )
@ -914,7 +914,7 @@ static INPUT_PORTS_START(aristmk4)
PORT_DIPSETTING( 0x07, "7" ) PORT_DIPSETTING( 0x07, "7" )
PORT_DIPSETTING( 0x08, "8" ) PORT_DIPSETTING( 0x08, "8" )
PORT_DIPSETTING( 0x09, "9" ) PORT_DIPSETTING( 0x09, "9" )
PORT_START("SW6") PORT_START("SW6")
PORT_DIPNAME( 0x0f, 0x00, "SW6 - M/C NO" ) PORT_DIPNAME( 0x0f, 0x00, "SW6 - M/C NO" )
PORT_DIPSETTING( 0x00, "0" ) PORT_DIPSETTING( 0x00, "0" )
@ -927,9 +927,9 @@ static INPUT_PORTS_START(aristmk4)
PORT_DIPSETTING( 0x07, "7" ) PORT_DIPSETTING( 0x07, "7" )
PORT_DIPSETTING( 0x08, "8" ) PORT_DIPSETTING( 0x08, "8" )
PORT_DIPSETTING( 0x09, "9" ) PORT_DIPSETTING( 0x09, "9" )
/***************** DIP SWITCHES **********************************************************************/ /***************** DIP SWITCHES **********************************************************************/
PORT_START("DSW1") PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, "DSW1 - Maxbet rejection" ) PORT_DIPNAME( 0x01, 0x00, "DSW1 - Maxbet rejection" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("SW1:1")
@ -1135,13 +1135,13 @@ static PALETTE_INIT( aristmk4 )
static DRIVER_INIT( aristmk4 ) static DRIVER_INIT( aristmk4 )
{ {
mc146818_init(machine, MC146818_IGNORE_CENTURY); mc146818_init(machine, MC146818_IGNORE_CENTURY);
shapeRomPtr = (UINT8 *)memory_region(machine, "tile_gfx"); shapeRomPtr = (UINT8 *)memory_region(machine, "tile_gfx");
memcpy(shapeRom,shapeRomPtr,sizeof(shapeRom)); // back up memcpy(shapeRom,shapeRomPtr,sizeof(shapeRom)); // back up
} }
static MACHINE_START( aristmk4 ) static MACHINE_START( aristmk4 )
{ {
samples = devtag_get_device(machine, "samples"); samples = devtag_get_device(machine, "samples");
state_save_register_global_pointer(machine, nvram,0x1000); // nvram state_save_register_global_pointer(machine, nvram,0x1000); // nvram
} }
@ -1204,11 +1204,11 @@ static MACHINE_DRIVER_START( aristmk4 )
MDRV_SOUND_ADD("ay2", AY8910 , MAIN_CLOCK/8) MDRV_SOUND_ADD("ay2", AY8910 , MAIN_CLOCK/8)
MDRV_SOUND_CONFIG(ay8910_config2) MDRV_SOUND_CONFIG(ay8910_config2)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
MDRV_SOUND_ADD("samples", SAMPLES, 0) MDRV_SOUND_ADD("samples", SAMPLES, 0)
MDRV_SOUND_CONFIG(meter_samples_interface) MDRV_SOUND_CONFIG(meter_samples_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05)
MACHINE_DRIVER_END MACHINE_DRIVER_END

View File

@ -360,7 +360,7 @@ static VIDEO_UPDATE(cb2001)
count++; count++;
} }
} }
count = 0x0000; count = 0x0000;
@ -731,7 +731,7 @@ ROM_START( scherrym )
ROM_LOAD16_WORD( "f11.bin", 0x000000, 0x40000, CRC(8967f58d) SHA1(eb01a16b7d108f5fbe5de8f611b4f77869aedbf1) ) ROM_LOAD16_WORD( "f11.bin", 0x000000, 0x40000, CRC(8967f58d) SHA1(eb01a16b7d108f5fbe5de8f611b4f77869aedbf1) )
ROM_REGION( 0x080000, "gfx", ROMREGION_ERASEFF ) ROM_REGION( 0x080000, "gfx", ROMREGION_ERASEFF )
// ROM_LOAD( "12a.bin", 0x000000, 0x80000,NO_DUMP ) // missing on PCB - 2 PCBs have been found this way, it probably uploads the GFX. // ROM_LOAD( "12a.bin", 0x000000, 0x80000,NO_DUMP ) // missing on PCB - 2 PCBs have been found this way, it probably uploads the GFX.
ROM_REGION( 0x400, "proms", 0 ) ROM_REGION( 0x400, "proms", 0 )
ROM_LOAD( "n82s135-1.bin", 0x000, 0x100, CRC(66ed363f) SHA1(65bd37842c441c2e712844b07c0cfe37ef16d0ef) ) ROM_LOAD( "n82s135-1.bin", 0x000, 0x100, CRC(66ed363f) SHA1(65bd37842c441c2e712844b07c0cfe37ef16d0ef) )

View File

@ -814,14 +814,14 @@ ADDRESS_MAP_END
/******************************************************************************/ /******************************************************************************/
/* /*
Gondomania schematics show the following: Gondomania schematics show the following:
Port P0 - attached to 2 * LS374 at location 4C & 1C Port P0 - attached to 2 * LS374 at location 4C & 1C
Port P1 - attached to 2 * LS374 at location 3C & 2C Port P1 - attached to 2 * LS374 at location 3C & 2C
Port P2.2 -> SECIRQ (IRQ to main CPU) Port P2.2 -> SECIRQ (IRQ to main CPU)
Port P2.3 -> 'COUNT' (Enable coin counter - also wired directly to coinage) [not emulated] Port P2.3 -> 'COUNT' (Enable coin counter - also wired directly to coinage) [not emulated]
Port P2.4-7 -> Enable latches 4C, 1C, 3C, 2C Port P2.4-7 -> Enable latches 4C, 1C, 3C, 2C
Port P3.4-7 -> Directly attached to coinage connector (3 coins & service) Port P3.4-7 -> Directly attached to coinage connector (3 coins & service)
*/ */
@ -847,11 +847,11 @@ static READ8_HANDLER( dec8_mcu_from_main_r )
static WRITE8_HANDLER( dec8_mcu_to_main_w ) static WRITE8_HANDLER( dec8_mcu_to_main_w )
{ {
dec8_state *state = (dec8_state *)space->machine->driver_data; dec8_state *state = (dec8_state *)space->machine->driver_data;
// Outputs P0 and P1 are latched // Outputs P0 and P1 are latched
if (offset==0) state->i8751_port0=data; if (offset==0) state->i8751_port0=data;
else if (offset==1) state->i8751_port1=data; else if (offset==1) state->i8751_port1=data;
// P2 - controls latches for main CPU communication // P2 - controls latches for main CPU communication
if (offset==2 && (data&0x10)==0) if (offset==2 && (data&0x10)==0)
state->i8751_port0 = state->i8751_value>>8; state->i8751_port0 = state->i8751_value>>8;
@ -861,7 +861,7 @@ static WRITE8_HANDLER( dec8_mcu_to_main_w )
state->i8751_return = (state->i8751_return & 0xff) | (state->i8751_port0 << 8); state->i8751_return = (state->i8751_return & 0xff) | (state->i8751_port0 << 8);
if (offset==2 && (data&0x80)==0) if (offset==2 && (data&0x80)==0)
state->i8751_return = (state->i8751_return & 0xff00) | state->i8751_port1; state->i8751_return = (state->i8751_return & 0xff00) | state->i8751_port1;
// P2 - IRQ to main CPU // P2 - IRQ to main CPU
if (offset==2 && (data&4)==0) if (offset==2 && (data&4)==0)
cpu_set_input_line(state->maincpu, M6809_IRQ_LINE, ASSERT_LINE); cpu_set_input_line(state->maincpu, M6809_IRQ_LINE, ASSERT_LINE);
@ -1002,7 +1002,7 @@ static INPUT_PORTS_START( ghostb )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("I8751") PORT_START("I8751")
/* Low 4 bits not connected on schematics */ /* Low 4 bits not connected on schematics */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
@ -1056,10 +1056,10 @@ static INPUT_PORTS_START( meikyuh )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
INPUT_PORTS_END INPUT_PORTS_END
static INPUT_PORTS_START( srdarwin ) static INPUT_PORTS_START( srdarwin )
PORT_START("IN0") PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY

View File

@ -118,11 +118,11 @@ Notes:
FI-1.1A - 82S129 Bipolar PROM FI-1.1A - 82S129 Bipolar PROM
FI-2.3B - 82S135 Bipolar PROM FI-2.3B - 82S135 Bipolar PROM
FI-3.4B - 82S129 Bipolar PROM FI-3.4B - 82S129 Bipolar PROM
6502 - clock 1.500MHz [12/8] 6502 - clock 1.500MHz [12/8]
YM3526 - clock 3.000MHz [12/4] YM3526 - clock 3.000MHz [12/4]
M5205 - clock 375kHz [12/32]. Sample rate: Pin 1 High & Pin 2 Low = 0.375/48 = 7.8125kHz M5205 - clock 375kHz [12/32]. Sample rate: Pin 1 High & Pin 2 Low = 0.375/48 = 7.8125kHz
Measurements Measurements
------------ ------------
XTAL1 - 11.9911MHz XTAL1 - 11.9911MHz

View File

@ -572,7 +572,7 @@ static WRITE16_HANDLER( adsp_rombank_w )
static TIMER_DEVICE_CALLBACK( adsp_autobuffer_irq ) static TIMER_DEVICE_CALLBACK( adsp_autobuffer_irq )
{ {
cpu_device *adsp = timer.machine->device<cpu_device>("adsp"); cpu_device *adsp = timer.machine->device<cpu_device>("adsp");
/* get the index register */ /* get the index register */
int reg = adsp->state(ADSP2100_I0 + adsp_ireg); int reg = adsp->state(ADSP2100_I0 + adsp_ireg);

View File

@ -77,7 +77,7 @@ static int paldac_offset = 0;
WRITE16_HANDLER( region4_w ) WRITE16_HANDLER( region4_w )
{ {
COMBINE_DATA(&littlerb_region4[offset]); COMBINE_DATA(&littlerb_region4[offset]);
} }
@ -93,19 +93,19 @@ WRITE16_HANDLER(palette_offset_w)
WRITE16_HANDLER( palette_data_w ) WRITE16_HANDLER( palette_data_w )
{ {
//printf("palette write %04x\n",data); //printf("palette write %04x\n",data);
paldac[paldac_select][paldac_offset] = data; paldac[paldac_select][paldac_offset] = data;
paldac_select++; paldac_select++;
if (paldac_select==3) if (paldac_select==3)
{ {
int r,g,b; int r,g,b;
r = paldac[0][paldac_offset]; r = paldac[0][paldac_offset];
g = paldac[1][paldac_offset]; g = paldac[1][paldac_offset];
b = paldac[2][paldac_offset]; b = paldac[2][paldac_offset];
palette_set_color(space->machine,paldac_offset,MAKE_RGB(r,g,b)); palette_set_color(space->machine,paldac_offset,MAKE_RGB(r,g,b));
paldac_select = 0; paldac_select = 0;
paldac_offset++; paldac_offset++;
paldac_offset&=0x7f; paldac_offset&=0x7f;
@ -114,27 +114,27 @@ WRITE16_HANDLER( palette_data_w )
WRITE16_HANDLER( palette_reset_w ) WRITE16_HANDLER( palette_reset_w )
{ {
// printf("palette reset write %04x\n",data); // printf("palette reset write %04x\n",data);
paldac_select = 0; paldac_select = 0;
paldac_offset = 0; paldac_offset = 0;
} }
/* this map is wrong because our VDP access is wrong! */ /* this map is wrong because our VDP access is wrong! */
static ADDRESS_MAP_START( littlerb_vdp_map8, 0, 16 ) static ADDRESS_MAP_START( littlerb_vdp_map8, 0, 16 )
AM_RANGE(0x00000000, 0x0007ffff) AM_RAM_WRITE(region4_w) AM_RANGE(0x00000000, 0x0007ffff) AM_RAM_WRITE(region4_w)
/* these are definitely written by a non-incrementing access to the VDP */ /* these are definitely written by a non-incrementing access to the VDP */
AM_RANGE(0x00800000, 0x00800001) AM_WRITE(palette_offset_w) AM_RANGE(0x00800000, 0x00800001) AM_WRITE(palette_offset_w)
AM_RANGE(0x00800002 ,0x00800003) AM_WRITE(palette_data_w) AM_RANGE(0x00800002 ,0x00800003) AM_WRITE(palette_data_w)
AM_RANGE(0x00800004 ,0x00800005) AM_WRITE(palette_reset_w) AM_RANGE(0x00800004 ,0x00800005) AM_WRITE(palette_reset_w)
AM_RANGE(0x0ff80000, 0x0fffffff) AM_RAM_WRITE(region4_w) AM_RANGE(0x0ff80000, 0x0fffffff) AM_RAM_WRITE(region4_w)
AM_RANGE(0x1ff80000, 0x1fffffff) AM_RAM_WRITE(region4_w) AM_BASE(&littlerb_region4) AM_RANGE(0x1ff80000, 0x1fffffff) AM_RAM_WRITE(region4_w) AM_BASE(&littlerb_region4)
ADDRESS_MAP_END ADDRESS_MAP_END
@ -166,7 +166,7 @@ public:
{ {
return global_alloc(littlerb_vdp_device_config(mconfig, tag, owner, clock)); return global_alloc(littlerb_vdp_device_config(mconfig, tag, owner, clock));
} }
virtual device_t *alloc_device(running_machine &machine) const virtual device_t *alloc_device(running_machine &machine) const
{ {
return auto_alloc(&machine, littlerb_vdp_device(machine, *this)); return auto_alloc(&machine, littlerb_vdp_device(machine, *this));
@ -177,7 +177,7 @@ protected:
{ {
return (spacenum == 0) ? &m_space_config : NULL; return (spacenum == 0) ? &m_space_config : NULL;
} }
address_space_config m_space_config; address_space_config m_space_config;
}; };
@ -424,7 +424,7 @@ static void draw_sprite(bitmap_t *bitmap, int xsize,int ysize, int offset, int x
UINT16* spritegfx = littlerb_region4; UINT16* spritegfx = littlerb_region4;
int x,y; int x,y;
//int pal = 1; //int pal = 1;
for (y=0;y<ysize;y++) for (y=0;y<ysize;y++)
{ {
for (x=0;x<xsize;x++) for (x=0;x<xsize;x++)
@ -434,7 +434,7 @@ static void draw_sprite(bitmap_t *bitmap, int xsize,int ysize, int offset, int x
UINT8 pix2 = (spritegfx[offset]>>8)&0x0f; UINT8 pix2 = (spritegfx[offset]>>8)&0x0f;
drawxpos = xpos+x*2; drawxpos = xpos+x*2;
drawypos = ypos+y; drawypos = ypos+y;
pix1+=pal*0x10; pix1+=pal*0x10;
pix2+=pal*0x10; pix2+=pal*0x10;
@ -477,11 +477,11 @@ static VIDEO_UPDATE(littlerb)
// e.g ffc010000 // e.g ffc010000
code = (spriteregion[offs+0] & 0xfff0)>>4; code = (spriteregion[offs+0] & 0xfff0)>>4;
code |= (spriteregion[offs+1] & 0x003f)<<12; code |= (spriteregion[offs+1] & 0x003f)<<12;
pal = 0;//(spriteregion[offs+4] & 0xf000)>>13; // where is the colour bit?! pal = 0;//(spriteregion[offs+4] & 0xf000)>>13; // where is the colour bit?!
//if (code!=0) printf("%04x %04x %04x %04x %04x %04x\n", spriteregion[offs+0], spriteregion[offs+1], spriteregion[offs+2], spriteregion[offs+3], spriteregion[offs+4], spriteregion[offs+5]); //if (code!=0) printf("%04x %04x %04x %04x %04x %04x\n", spriteregion[offs+0], spriteregion[offs+1], spriteregion[offs+2], spriteregion[offs+3], spriteregion[offs+4], spriteregion[offs+5]);
draw_sprite(bitmap,xsize,ysize,code,x-8,y-16, pal); draw_sprite(bitmap,xsize,ysize,code,x-8,y-16, pal);
} }

View File

@ -809,7 +809,7 @@ ROM_START( looping )
ROM_LOAD( "loop555.bin", 0x4000, 0x1000, CRC(0ef4c922) SHA1(df6db0897a51aa10e106865a643588d866ef8c4e) ) ROM_LOAD( "loop555.bin", 0x4000, 0x1000, CRC(0ef4c922) SHA1(df6db0897a51aa10e106865a643588d866ef8c4e) )
ROM_LOAD( "loop556.bin", 0x5000, 0x1000, CRC(3419a5d5) SHA1(2b0249c54985ab5e12de17c0e3d62caa0c7575e3) ) ROM_LOAD( "loop556.bin", 0x5000, 0x1000, CRC(3419a5d5) SHA1(2b0249c54985ab5e12de17c0e3d62caa0c7575e3) )
ROM_LOAD( "loop557.bin", 0x6000, 0x1000, CRC(d430e287) SHA1(b0edd25ef4d2468cc1f8c10ac49c545a89d398d7) ) ROM_LOAD( "loop557.bin", 0x6000, 0x1000, CRC(d430e287) SHA1(b0edd25ef4d2468cc1f8c10ac49c545a89d398d7) )
ROM_REGION( 0x3800, "audiocpu", 0 ) /* TMS9980 code */ ROM_REGION( 0x3800, "audiocpu", 0 ) /* TMS9980 code */
ROM_LOAD( "loopc13.bin", 0x0000, 0x1000, CRC(ff9ac4ec) SHA1(9f8df94cd79d86fe4c384df1d5d729b58a7ca7a8) ) ROM_LOAD( "loopc13.bin", 0x0000, 0x1000, CRC(ff9ac4ec) SHA1(9f8df94cd79d86fe4c384df1d5d729b58a7ca7a8) )
ROM_LOAD( "loopa13.bin", 0x0800, 0x1000, CRC(1de29f25) SHA1(535acb132266d6137b0610ee9a9b946459ae44af) ) ROM_LOAD( "loopa13.bin", 0x0800, 0x1000, CRC(1de29f25) SHA1(535acb132266d6137b0610ee9a9b946459ae44af) )

View File

@ -5288,11 +5288,11 @@ INPUT_PORTS_END /* Time Crisis */
static CUSTOM_INPUT( acedrvr_shift_read ) static CUSTOM_INPUT( acedrvr_shift_read )
{ {
int shift = input_port_read(field->port->machine, "SHIFT"); int shift = input_port_read(field->port->machine, "SHIFT");
if (shift > 0 && shift != prev_stick_state) if (shift > 0 && shift != prev_stick_state)
{ {
prev_stick_state = shift; prev_stick_state = shift;
switch (shift) switch (shift)
{ {
case 0x01: case 0x01:
@ -5306,7 +5306,7 @@ static CUSTOM_INPUT( acedrvr_shift_read )
break; break;
} }
} }
return stick_input; return stick_input;
} }

View File

@ -47,11 +47,11 @@ static ADDRESS_MAP_START( janshi_vdp_map8, 0, 8 )
AM_RANGE(0xfc0000, 0xfc1fff) AM_RAM AM_BASE(&janshi_back_vram) // bg tilemap? AM_RANGE(0xfc0000, 0xfc1fff) AM_RAM AM_BASE(&janshi_back_vram) // bg tilemap?
AM_RANGE(0xfc2000, 0xfc2fff) AM_RAM AM_BASE(&janshi_vram1) // xpos, colour, tile number etc. AM_RANGE(0xfc2000, 0xfc2fff) AM_RAM AM_BASE(&janshi_vram1) // xpos, colour, tile number etc.
AM_RANGE(0xfc3700, 0xfc377f) AM_RAM AM_BASE(&janshi_unk1) // ?? height related? AM_RANGE(0xfc3700, 0xfc377f) AM_RAM AM_BASE(&janshi_unk1) // ?? height related?
AM_RANGE(0xfc3780, 0xfc37bf) AM_RAM AM_BASE(&janshi_widthflags) AM_RANGE(0xfc3780, 0xfc37bf) AM_RAM AM_BASE(&janshi_widthflags)
AM_RANGE(0xfc37c0, 0xfc37ff) AM_RAM AM_BASE(&janshi_unk2) // 2x increasing tables 00 10 20 30 etc. AM_RANGE(0xfc37c0, 0xfc37ff) AM_RAM AM_BASE(&janshi_unk2) // 2x increasing tables 00 10 20 30 etc.
AM_RANGE(0xfc3800, 0xfc3fff) AM_RAM AM_BASE(&janshi_vram2) // y pos + unknown AM_RANGE(0xfc3800, 0xfc3fff) AM_RAM AM_BASE(&janshi_vram2) // y pos + unknown
AM_RANGE(0xff0000, 0xff07ff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_split1_w) AM_BASE_GENERIC(paletteram) AM_RANGE(0xff0000, 0xff07ff) AM_RAM_WRITE(paletteram_xBBBBBGGGGGRRRRR_split1_w) AM_BASE_GENERIC(paletteram)
@ -320,7 +320,7 @@ static VIDEO_UPDATE( pinkiri8 )
} }
else if (spr_offs<0x580) else if (spr_offs<0x580)
{ {
// height = 2; // height = 2;
} }
else if (spr_offs<0x880) else if (spr_offs<0x880)
{ {
@ -328,11 +328,11 @@ static VIDEO_UPDATE( pinkiri8 )
} }
else if (spr_offs<0x1000) else if (spr_offs<0x1000)
{ {
// height = 2; // height = 2;
} }
else if (spr_offs<0x1080) else if (spr_offs<0x1080)
{ {
// height = 2; // height = 2;
} }
else if (spr_offs<0x1700) else if (spr_offs<0x1700)
{ {
@ -340,7 +340,7 @@ static VIDEO_UPDATE( pinkiri8 )
} }
else if (spr_offs<0x1730) else if (spr_offs<0x1730)
{ {
// height = 2; // height = 2;
} }
else if (spr_offs<0x1930) else if (spr_offs<0x1930)
{ {

View File

@ -115,7 +115,7 @@ ADDRESS_MAP_END
static UINT8 mux_data; static UINT8 mux_data;
static ADDRESS_MAP_START( rbmk_mcu_mem, ADDRESS_SPACE_PROGRAM, 8 ) static ADDRESS_MAP_START( rbmk_mcu_mem, ADDRESS_SPACE_PROGRAM, 8 )
// AM_RANGE(0x0000, 0x0fff) AM_ROM // AM_RANGE(0x0000, 0x0fff) AM_ROM
ADDRESS_MAP_END ADDRESS_MAP_END
static READ8_HANDLER( rbmk_mcu_io_r ) static READ8_HANDLER( rbmk_mcu_io_r )
@ -547,7 +547,7 @@ static MACHINE_DRIVER_START( rbmk )
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.47) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.47)
MDRV_SOUND_ADD("ymsnd", YM2151, 22000000 / 8) MDRV_SOUND_ADD("ymsnd", YM2151, 22000000 / 8)
// MDRV_SOUND_CONFIG(ym2151_config) // MDRV_SOUND_CONFIG(ym2151_config)
MDRV_SOUND_ROUTE(0, "lspeaker", 0.60) MDRV_SOUND_ROUTE(0, "lspeaker", 0.60)
MDRV_SOUND_ROUTE(1, "rspeaker", 0.60) MDRV_SOUND_ROUTE(1, "rspeaker", 0.60)
MACHINE_DRIVER_END MACHINE_DRIVER_END

View File

@ -626,10 +626,10 @@ static CUSTOM_INPUT( mcu_status_r )
if (!main_sent) if (!main_sent)
res |= 0x01; res |= 0x01;
if (!mcu_sent) if (!mcu_sent)
res |= 0x02; res |= 0x02;
} }
return res; return res;
} }
/********************************************************************************************/ /********************************************************************************************/
@ -710,8 +710,8 @@ static ADDRESS_MAP_START( renegade_mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0004, 0x0004) AM_WRITE(renegade_68705_ddr_a_w) AM_RANGE(0x0004, 0x0004) AM_WRITE(renegade_68705_ddr_a_w)
AM_RANGE(0x0005, 0x0005) AM_WRITE(renegade_68705_ddr_b_w) AM_RANGE(0x0005, 0x0005) AM_WRITE(renegade_68705_ddr_b_w)
AM_RANGE(0x0006, 0x0006) AM_WRITE(renegade_68705_ddr_c_w) AM_RANGE(0x0006, 0x0006) AM_WRITE(renegade_68705_ddr_c_w)
// AM_RANGE(0x0008, 0x0008) AM_READWRITE(m68705_tdr_r, m68705_tdr_w) // AM_RANGE(0x0008, 0x0008) AM_READWRITE(m68705_tdr_r, m68705_tdr_w)
// AM_RANGE(0x0009, 0x0009) AM_READWRITE(m68705_tcr_r, m68705_tcr_w) // AM_RANGE(0x0009, 0x0009) AM_READWRITE(m68705_tcr_r, m68705_tcr_w)
AM_RANGE(0x0010, 0x007f) AM_RAM AM_RANGE(0x0010, 0x007f) AM_RAM
AM_RANGE(0x0080, 0x07ff) AM_ROM AM_RANGE(0x0080, 0x07ff) AM_ROM
ADDRESS_MAP_END ADDRESS_MAP_END
@ -991,7 +991,7 @@ ROM_START( renegade )
ROM_LOAD( "nc-5.bin", 0x0000, 0x8000, CRC(9adfaa5d) SHA1(7bdb7bd4387b49e0489f9539161e1ed9d8f9f6a0) ) ROM_LOAD( "nc-5.bin", 0x0000, 0x8000, CRC(9adfaa5d) SHA1(7bdb7bd4387b49e0489f9539161e1ed9d8f9f6a0) )
ROM_REGION( 0x30000, "tiles", 0 ) ROM_REGION( 0x30000, "tiles", 0 )
ROM_LOAD( "n1-5.ic1", 0x00000, 0x8000, CRC(4a9f47f3) SHA1(01c94bc4c85314f1e0caa3afe91705875d118c13) ) ROM_LOAD( "n1-5.ic1", 0x00000, 0x8000, CRC(4a9f47f3) SHA1(01c94bc4c85314f1e0caa3afe91705875d118c13) )
ROM_LOAD( "n6-5.ic28", 0x08000, 0x8000, CRC(d62a0aa8) SHA1(a0b55cd3eee352fb91d9bb8c6c4f4f55b2df83e9) ) ROM_LOAD( "n6-5.ic28", 0x08000, 0x8000, CRC(d62a0aa8) SHA1(a0b55cd3eee352fb91d9bb8c6c4f4f55b2df83e9) )
ROM_LOAD( "n7-5.ic27", 0x10000, 0x8000, CRC(7ca5a532) SHA1(1110aa1c7562805dd4b298ab2860c66a6cc2685b) ) ROM_LOAD( "n7-5.ic27", 0x10000, 0x8000, CRC(7ca5a532) SHA1(1110aa1c7562805dd4b298ab2860c66a6cc2685b) )
ROM_LOAD( "n2-5.ic14", 0x18000, 0x8000, CRC(8d2e7982) SHA1(72fc85ff7b54be10501a2a24303dadd5f33e5650) ) ROM_LOAD( "n2-5.ic14", 0x18000, 0x8000, CRC(8d2e7982) SHA1(72fc85ff7b54be10501a2a24303dadd5f33e5650) )

View File

@ -1992,11 +1992,11 @@ static READ8_HANDLER( v25s_internal_io_r )
static WRITE8_HANDLER( v25s_internal_io_w ) static WRITE8_HANDLER( v25s_internal_io_w )
{ {
logerror("(PC=%05x) V25S internal I/O write %02x at [%04x]\n",cpu_get_pc(space->cpu),data,offset+0xf00); logerror("(PC=%05x) V25S internal I/O write %02x at [%04x]\n",cpu_get_pc(space->cpu),data,offset+0xf00);
switch (offset) switch (offset)
{ {
/* 0x00 - 0x3f - Ports */ /* 0x00 - 0x3f - Ports */
case 0x00: case 0x00:
logerror("write: Port 0 (P0)\n"); logerror("write: Port 0 (P0)\n");
break; break;
@ -2006,9 +2006,9 @@ static WRITE8_HANDLER( v25s_internal_io_w )
case 0x02: case 0x02:
logerror("write: Port 0 Mode Control Register (PMC0)\n"); logerror("write: Port 0 Mode Control Register (PMC0)\n");
break; break;
case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: INVALID_WRITE break; case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: INVALID_WRITE break;
case 0x08: case 0x08:
logerror("write: Port 1 (P1)\n"); logerror("write: Port 1 (P1)\n");
break; break;
@ -2017,8 +2017,8 @@ static WRITE8_HANDLER( v25s_internal_io_w )
break; break;
case 0x0A: case 0x0A:
logerror("write: Port 1 Mode Control Register (PMC1)\n"); logerror("write: Port 1 Mode Control Register (PMC1)\n");
break; break;
case 0x0B: case 0x0C: case 0x0D: case 0x0E: case 0x0F: INVALID_WRITE break; case 0x0B: case 0x0C: case 0x0D: case 0x0E: case 0x0F: INVALID_WRITE break;
case 0x10: case 0x10:
@ -2030,342 +2030,342 @@ static WRITE8_HANDLER( v25s_internal_io_w )
case 0x12: case 0x12:
logerror("write: Port 2 Mode Control Register (PMC2)\n"); logerror("write: Port 2 Mode Control Register (PMC2)\n");
break; break;
case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: case 0x1A: case 0x1B: case 0x1C: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: case 0x1A: case 0x1B: case 0x1C:
case 0x1D: case 0x1E: case 0x1F: case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x1D: case 0x1E: case 0x1F: case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26:
case 0x27: case 0x28: case 0x29: case 0x2A: case 0x2B: case 0x2C: case 0x2D: case 0x2E: case 0x2F: case 0x30: case 0x27: case 0x28: case 0x29: case 0x2A: case 0x2B: case 0x2C: case 0x2D: case 0x2E: case 0x2F: case 0x30:
case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: INVALID_WRITE break; case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: INVALID_WRITE break;
case 0x38:
logerror("write: invalid (R/O) Port T (PT)\n");
break;
case 0x39: case 0x3a: INVALID_WRITE break;
case 0x3b:
logerror("write: Port T Mode Register(PMT)\n");
break;
case 0x3c: case 0x3d: case 0x3e: case 0x3f: INVALID_WRITE break;
/* 0x40 - 0x4f - Interrupts */
case 0x40:
logerror("write: External Interrupt Mode Register (INTM)\n");
break;
case 0x41: case 0x42: case 0x43: INVALID_WRITE break;
case 0x44: case 0x38:
logerror("write: External Interrupt Macro Service Control Register 0 (EMS0)\n"); logerror("write: invalid (R/O) Port T (PT)\n");
break;
case 0x45:
logerror("write: External Interrupt Macro Service Control Register 1 (EMS1)\n");
break;
case 0x46:
logerror("write: External Interrupt Macro Service Control Register 2 (EMS2)\n");
break;
case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: INVALID_WRITE break;
case 0x4c:
logerror("write: External Interrupt Request Control Register 0 (EXIC0)\n");
break; break;
case 0x4d:
logerror("write: External Interrupt Request Control Register 1 (EXIC1)\n"); case 0x39: case 0x3a: INVALID_WRITE break;
case 0x3b:
logerror("write: Port T Mode Register(PMT)\n");
break; break;
case 0x4e:
case 0x3c: case 0x3d: case 0x3e: case 0x3f: INVALID_WRITE break;
/* 0x40 - 0x4f - Interrupts */
case 0x40:
logerror("write: External Interrupt Mode Register (INTM)\n");
break;
case 0x41: case 0x42: case 0x43: INVALID_WRITE break;
case 0x44:
logerror("write: External Interrupt Macro Service Control Register 0 (EMS0)\n");
break;
case 0x45:
logerror("write: External Interrupt Macro Service Control Register 1 (EMS1)\n");
break;
case 0x46:
logerror("write: External Interrupt Macro Service Control Register 2 (EMS2)\n");
break;
case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: INVALID_WRITE break;
case 0x4c:
logerror("write: External Interrupt Request Control Register 0 (EXIC0)\n");
break;
case 0x4d:
logerror("write: External Interrupt Request Control Register 1 (EXIC1)\n");
break;
case 0x4e:
logerror("write: External Interrupt Request Control Register 2 (EXIC2)\n"); logerror("write: External Interrupt Request Control Register 2 (EXIC2)\n");
break; break;
case 0x4f: case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: case 0x58: case 0x4f: case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: case 0x58:
case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: INVALID_WRITE break; case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: INVALID_WRITE break;
/* 0x60 - 0x6f - Serial Port 0 */ /* 0x60 - 0x6f - Serial Port 0 */
case 0x60: case 0x60:
logerror("write: invalid (R/O) Recieve Buffer Register 0 (RxB0)\n"); logerror("write: invalid (R/O) Recieve Buffer Register 0 (RxB0)\n");
break; break;
case 0x61: INVALID_WRITE break; case 0x61: INVALID_WRITE break;
case 0x62: case 0x62:
logerror("write: Transmit Buffer Register 0 (TxB0)\n"); logerror("write: Transmit Buffer Register 0 (TxB0)\n");
break; break;
case 0x63: case 0x64: INVALID_WRITE break; case 0x63: case 0x64: INVALID_WRITE break;
case 0x65: case 0x65:
logerror("write: Serial Reception Macro Service Control Register 0 (SRMS0)\n"); logerror("write: Serial Reception Macro Service Control Register 0 (SRMS0)\n");
break; break;
case 0x66: case 0x66:
logerror("write: Serial Transmission Macro Service Control Register 0 (STMS0)\n"); logerror("write: Serial Transmission Macro Service Control Register 0 (STMS0)\n");
break; break;
case 0x67: INVALID_WRITE break; case 0x67: INVALID_WRITE break;
case 0x68: case 0x68:
logerror("write: Serial Mode Register 0 (SCM0)\n"); logerror("write: Serial Mode Register 0 (SCM0)\n");
break; break;
case 0x69: case 0x69:
logerror("write: Serial Control Register 0 (SCC0)\n"); logerror("write: Serial Control Register 0 (SCC0)\n");
break; break;
case 0x6a: case 0x6a:
logerror("write: Baud Rate Generator Register 0 (BRG0)\n"); logerror("write: Baud Rate Generator Register 0 (BRG0)\n");
break; break;
case 0x6b: case 0x6b:
logerror("write: invalid (R/O) Serial Status Register 0 (SCS0)\n"); logerror("write: invalid (R/O) Serial Status Register 0 (SCS0)\n");
break; break;
case 0x6c: case 0x6c:
logerror("write: Serial Error Interrupt Request Control Register 0 (SEIC0)\n"); logerror("write: Serial Error Interrupt Request Control Register 0 (SEIC0)\n");
break; break;
case 0x6d: case 0x6d:
logerror("write: Serial Reception Interrupt Request Control Register 0 (SRIC0)\n"); logerror("write: Serial Reception Interrupt Request Control Register 0 (SRIC0)\n");
break; break;
case 0x6e: case 0x6e:
logerror("write: Serial Transmission Interrupt Request Control Register 0 (STIC0)\n"); logerror("write: Serial Transmission Interrupt Request Control Register 0 (STIC0)\n");
break; break;
case 0x6f: INVALID_WRITE break; case 0x6f: INVALID_WRITE break;
/* 0x70 - 0x7f - Serial Port 1 */ /* 0x70 - 0x7f - Serial Port 1 */
case 0x70: case 0x70:
logerror("write: invalid (R/O) Recieve Buffer Register 0 (RxB1)\n"); logerror("write: invalid (R/O) Recieve Buffer Register 0 (RxB1)\n");
break; break;
case 0x71: INVALID_WRITE break; case 0x71: INVALID_WRITE break;
case 0x72: case 0x72:
logerror("write: Transmit Buffer Register 0 (TxB1)\n"); logerror("write: Transmit Buffer Register 0 (TxB1)\n");
break; break;
case 0x73: case 0x74: INVALID_WRITE break; case 0x73: case 0x74: INVALID_WRITE break;
case 0x75: case 0x75:
logerror("write: Serial Reception Macro Service Control Register 0 (SRMS1)\n"); logerror("write: Serial Reception Macro Service Control Register 0 (SRMS1)\n");
break; break;
case 0x76: case 0x76:
logerror("write: Serial Transmission Macro Service Control Register 0 (STMS1)\n"); logerror("write: Serial Transmission Macro Service Control Register 0 (STMS1)\n");
break; break;
case 0x77: INVALID_WRITE break; case 0x77: INVALID_WRITE break;
case 0x78: case 0x78:
logerror("write: Serial Mode Register 0 (SCM1)\n"); logerror("write: Serial Mode Register 0 (SCM1)\n");
break; break;
case 0x79: case 0x79:
logerror("write: Serial Control Register 0 (SCC1)\n"); logerror("write: Serial Control Register 0 (SCC1)\n");
break; break;
case 0x7a: case 0x7a:
logerror("write: Baud Rate Generator Register 0 (BRG1)\n"); logerror("write: Baud Rate Generator Register 0 (BRG1)\n");
break; break;
case 0x7b: case 0x7b:
logerror("write: invalid (R/O) Serial Status Register 0 (SCS1)\n"); logerror("write: invalid (R/O) Serial Status Register 0 (SCS1)\n");
break; break;
case 0x7c: case 0x7c:
logerror("write: Serial Error Interrupt Request Control Register 0 (SEIC1)\n"); logerror("write: Serial Error Interrupt Request Control Register 0 (SEIC1)\n");
break; break;
case 0x7d: case 0x7d:
logerror("write: Serial Reception Interrupt Request Control Register 0 (SRIC1)\n"); logerror("write: Serial Reception Interrupt Request Control Register 0 (SRIC1)\n");
break; break;
case 0x7e: case 0x7e:
logerror("write: Serial Transmission Interrupt Request Control Register 0 (STIC1)\n"); logerror("write: Serial Transmission Interrupt Request Control Register 0 (STIC1)\n");
break; break;
case 0x7f: INVALID_WRITE break; case 0x7f: INVALID_WRITE break;
/* 0x80 - 0x9f - Timers */ /* 0x80 - 0x9f - Timers */
case 0x80: case 0x80:
case 0x81: case 0x81:
logerror("write: Timer Register 0 (16-bit) (TM0)\n"); logerror("write: Timer Register 0 (16-bit) (TM0)\n");
break; break;
case 0x82: case 0x82:
case 0x83: case 0x83:
logerror("write: Modulo/Timer Register 0 (16-bit) (MD0)\n"); logerror("write: Modulo/Timer Register 0 (16-bit) (MD0)\n");
break; break;
case 0x84: case 0x85: case 0x86: case 0x87: INVALID_WRITE break; case 0x84: case 0x85: case 0x86: case 0x87: INVALID_WRITE break;
case 0x88: case 0x88:
case 0x89: case 0x89:
logerror("write: Timer Register 1 (16-bit) (TM1)\n"); logerror("write: Timer Register 1 (16-bit) (TM1)\n");
break; break;
case 0x8a: case 0x8a:
case 0x8b: case 0x8b:
logerror("write: Modulo/Timer Register 1 (16-bit) (MD1)\n"); logerror("write: Modulo/Timer Register 1 (16-bit) (MD1)\n");
break; break;
case 0x8c: case 0x8d: case 0x8e: case 0x8f: INVALID_WRITE break; case 0x8c: case 0x8d: case 0x8e: case 0x8f: INVALID_WRITE break;
case 0x90: case 0x90:
logerror("write: Timer Control Register 0 (TMC0)\n"); logerror("write: Timer Control Register 0 (TMC0)\n");
break; break;
case 0x91: case 0x91:
logerror("write: Timer Control Register 1 (TMC1)\n"); logerror("write: Timer Control Register 1 (TMC1)\n");
break; break;
case 0x92: case 0x93: INVALID_WRITE break; case 0x92: case 0x93: INVALID_WRITE break;
case 0x94: case 0x94:
logerror("write: Timer Unit Macro Service Control Register 0 (TMMS0)\n"); logerror("write: Timer Unit Macro Service Control Register 0 (TMMS0)\n");
break; break;
case 0x95: case 0x95:
logerror("write: Timer Unit Macro Service Control Register 1 (TMMS1)\n"); logerror("write: Timer Unit Macro Service Control Register 1 (TMMS1)\n");
break; break;
case 0x96: case 0x96:
logerror("write: Timer Unit Macro Service Control Register 2 (TMMS2)\n"); logerror("write: Timer Unit Macro Service Control Register 2 (TMMS2)\n");
break; break;
case 0x97: case 0x98: case 0x99: case 0x9a: case 0x9b: INVALID_WRITE break; case 0x97: case 0x98: case 0x99: case 0x9a: case 0x9b: INVALID_WRITE break;
case 0x9c: case 0x9c:
logerror("write: Timer Interrupt Request Control Register 0 (TMIC0)\n"); logerror("write: Timer Interrupt Request Control Register 0 (TMIC0)\n");
break; break;
case 0x9d: case 0x9d:
logerror("write: Timer Interrupt Request Control Register 1 (TMIC1)\n"); logerror("write: Timer Interrupt Request Control Register 1 (TMIC1)\n");
break; break;
case 0x9e: case 0x9e:
logerror("write: Timer Interrupt Request Control Register 2 (TMIC2)\n"); logerror("write: Timer Interrupt Request Control Register 2 (TMIC2)\n");
break; break;
case 0x9f: INVALID_WRITE break; case 0x9f: INVALID_WRITE break;
/* 0xa0 - 0xdf - DMA Regs */ /* 0xa0 - 0xdf - DMA Regs */
case 0xa0: case 0xa0:
logerror("write: DMA Control Register 0 (DMAC0)\n"); logerror("write: DMA Control Register 0 (DMAC0)\n");
break; break;
case 0xa1: case 0xa1:
logerror("write: DMA Mode Register 0 (DMAM0)\n"); logerror("write: DMA Mode Register 0 (DMAM0)\n");
break; break;
case 0xa2: case 0xa2:
logerror("write: DMA Control Register 1 (DMAC1)\n"); logerror("write: DMA Control Register 1 (DMAC1)\n");
break; break;
case 0xa3: case 0xa3:
logerror("write: DMA Mode Register 1 (DMAM1)\n"); logerror("write: DMA Mode Register 1 (DMAM1)\n");
break; break;
case 0xa4: case 0xa5: case 0xa6: case 0xa7: case 0xa8: case 0xa9: case 0xaa: case 0xab: INVALID_WRITE break; case 0xa4: case 0xa5: case 0xa6: case 0xa7: case 0xa8: case 0xa9: case 0xaa: case 0xab: INVALID_WRITE break;
case 0xac: case 0xac:
logerror("write: DMA Interrupt Request Control Register 0 (DIC0)\n"); logerror("write: DMA Interrupt Request Control Register 0 (DIC0)\n");
break; break;
case 0xad: case 0xad:
logerror("write: DMA Interrupt Request Control Register 1 (DIC1)\n"); logerror("write: DMA Interrupt Request Control Register 1 (DIC1)\n");
break; break;
case 0xae: case 0xaf: case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: case 0xae: case 0xaf: case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7:
case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: INVALID_WRITE break; case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: INVALID_WRITE break;
case 0xc0: case 0xc0:
logerror("write: Source Address Pointer 0 (Low) (SAR0L)\n"); logerror("write: Source Address Pointer 0 (Low) (SAR0L)\n");
break; break;
case 0xc1: case 0xc1:
logerror("write: Source Address Pointer 0 (Middle) (SAR0M)\n"); logerror("write: Source Address Pointer 0 (Middle) (SAR0M)\n");
break; break;
case 0xc2: case 0xc2:
logerror("write: Source Address Pointer 0 (High) (SAR0H)\n"); logerror("write: Source Address Pointer 0 (High) (SAR0H)\n");
break; break;
case 0xc3: INVALID_WRITE break; case 0xc3: INVALID_WRITE break;
case 0xc4: case 0xc4:
logerror("write: Destination Address Pointer 0 (Low) (DAR0L)\n"); logerror("write: Destination Address Pointer 0 (Low) (DAR0L)\n");
break; break;
case 0xc5: case 0xc5:
logerror("write: Destination Address Pointer 0 (Middle) (DAR0M)\n"); logerror("write: Destination Address Pointer 0 (Middle) (DAR0M)\n");
break; break;
case 0xc6: case 0xc6:
logerror("write: Destination Address Pointer 0 (High) (DAR0H)\n"); logerror("write: Destination Address Pointer 0 (High) (DAR0H)\n");
break; break;
case 0xc7: INVALID_WRITE break; case 0xc7: INVALID_WRITE break;
case 0xc8: case 0xc8:
logerror("write: Terminal Counter 0 (Low) (TC0L)\n"); logerror("write: Terminal Counter 0 (Low) (TC0L)\n");
break; break;
case 0xc9: case 0xc9:
logerror("write: Terminal Counter 0 (High) (TC0H)\n"); logerror("write: Terminal Counter 0 (High) (TC0H)\n");
break; break;
case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: INVALID_WRITE break; case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: INVALID_WRITE break;
case 0xd0: case 0xd0:
logerror("write: Source Address Pointer 1 (Low) (SAR1L)\n"); logerror("write: Source Address Pointer 1 (Low) (SAR1L)\n");
break; break;
case 0xd1: case 0xd1:
logerror("write: Source Address Pointer 1 (Middle) (SAR1M)\n"); logerror("write: Source Address Pointer 1 (Middle) (SAR1M)\n");
break; break;
case 0xd2: case 0xd2:
logerror("write: Source Address Pointer 1 (High) (SAR1H)\n"); logerror("write: Source Address Pointer 1 (High) (SAR1H)\n");
break; break;
case 0xd3: INVALID_WRITE break; case 0xd3: INVALID_WRITE break;
case 0xd4: case 0xd4:
logerror("write: Destination Address Pointer 1 (Low) (DAR1L)\n"); logerror("write: Destination Address Pointer 1 (Low) (DAR1L)\n");
break; break;
case 0xd5: case 0xd5:
logerror("write: Destination Address Pointer 1 (Middle) (DAR1M)\n"); logerror("write: Destination Address Pointer 1 (Middle) (DAR1M)\n");
break; break;
case 0xd6: case 0xd6:
logerror("write: Destination Address Pointer 1 (High) (DAR1H)\n"); logerror("write: Destination Address Pointer 1 (High) (DAR1H)\n");
break; break;
case 0xd7: INVALID_WRITE break; case 0xd7: INVALID_WRITE break;
case 0xd8: case 0xd8:
logerror("write: Terminal Counter 1 (Low) (TC1L)\n"); logerror("write: Terminal Counter 1 (Low) (TC1L)\n");
break; break;
case 0xd9: case 0xd9:
logerror("write: Terminal Counter 1 (High) (TC1H)\n"); logerror("write: Terminal Counter 1 (High) (TC1H)\n");
break; break;
case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: INVALID_WRITE break; case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: INVALID_WRITE break;
/* 0xe0 - 0xff misc */ /* 0xe0 - 0xff misc */
case 0xe0: case 0xe0:
logerror("write: Standby Control Register (STBC)\n"); logerror("write: Standby Control Register (STBC)\n");
break; break;
case 0xe1: case 0xe1:
logerror("write: Refresh Mode Register (RFM)\n"); logerror("write: Refresh Mode Register (RFM)\n");
break; break;
case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7: INVALID_WRITE break; case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7: INVALID_WRITE break;
case 0xe8: case 0xe8:
case 0xe9: case 0xe9:
logerror("write: Wait Control Register (16-bit) (WTC)\n"); logerror("write: Wait Control Register (16-bit) (WTC)\n");
break; break;
case 0xea: case 0xea:
logerror("write: User Flag Register (FLAG)\n"); logerror("write: User Flag Register (FLAG)\n");
break; break;
case 0xeb: case 0xeb:
logerror("write: Processor Control Register (PRC)\n"); logerror("write: Processor Control Register (PRC)\n");
break; break;
case 0xec: case 0xec:
logerror("write: Time Base Interrupt Request Control Register (TBIC)\n"); logerror("write: Time Base Interrupt Request Control Register (TBIC)\n");
break; break;
case 0xed: case 0xee: INVALID_WRITE break; case 0xed: case 0xee: INVALID_WRITE break;
case 0xef: case 0xef:
logerror("write: invalid (R/O) Interrupt Source Register (IRQS)\n"); logerror("write: invalid (R/O) Interrupt Source Register (IRQS)\n");
break; break;
case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: case 0xf8: case 0xf9: case 0xfa: case 0xfb: INVALID_WRITE break; case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: case 0xf8: case 0xf9: case 0xfa: case 0xfb: INVALID_WRITE break;
case 0xfc: case 0xfc:
logerror("write: invalid (R/O) Interrupt Priority Register (ISPR)\n"); logerror("write: invalid (R/O) Interrupt Priority Register (ISPR)\n");
break; break;
case 0xfd: case 0xfe: INVALID_WRITE break; case 0xfd: case 0xfe: INVALID_WRITE break;
case 0xff: case 0xff:
logerror("write: internal data area base register (IDB)\n"); logerror("write: internal data area base register (IDB)\n");
break; break;
} }
} }

View File

@ -307,9 +307,9 @@ static MACHINE_DRIVER_START( tp84 )
MDRV_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */ MDRV_QUANTUM_TIME(HZ(6000)) /* 100 CPU slices per frame - an high value to ensure proper */
/* synchronization of the CPUs */ /* synchronization of the CPUs */
MDRV_MACHINE_START(tp84) MDRV_MACHINE_START(tp84)
/* video hardware */ /* video hardware */
MDRV_SCREEN_ADD("screen", RASTER) MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60) MDRV_SCREEN_REFRESH_RATE(60)

View File

@ -443,4 +443,4 @@ ROM_END
GAME( 1982, tugboat, 0, tugboat, tugboat, 0, ROT90, "ETM", "Tugboat", GAME_IMPERFECT_GRAPHICS ) GAME( 1982, tugboat, 0, tugboat, tugboat, 0, ROT90, "ETM", "Tugboat", GAME_IMPERFECT_GRAPHICS )
GAME( 1983, noahsark, 0, tugboat, noahsark, 0, ROT90, "Enter-Tech", "Noah's Ark", GAME_IMPERFECT_GRAPHICS ) GAME( 1983, noahsark, 0, tugboat, noahsark, 0, ROT90, "Enter-Tech", "Noah's Ark", GAME_IMPERFECT_GRAPHICS )
GAME( 1984, berenstn, 0, tugboat, noahsark, 0, ROT90, "Enter-Tech", "The Berenstain Bears in Big Paw's Cave", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS ) GAME( 1984, berenstn, 0, tugboat, noahsark, 0, ROT90, "Enter-Tech", "The Berenstain Bears in Big Paw's Cave", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS )

View File

@ -390,7 +390,7 @@ static CUSTOM_INPUT( mcu_status_r )
return 3; return 3;
} }
return res; return res;
} }
READ8_HANDLER( mcu_comm_reset_r ) READ8_HANDLER( mcu_comm_reset_r )
@ -450,8 +450,8 @@ static ADDRESS_MAP_START( mcu_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0004, 0x0004) AM_WRITE(xain_68705_ddr_a_w) AM_RANGE(0x0004, 0x0004) AM_WRITE(xain_68705_ddr_a_w)
AM_RANGE(0x0005, 0x0005) AM_WRITE(xain_68705_ddr_b_w) AM_RANGE(0x0005, 0x0005) AM_WRITE(xain_68705_ddr_b_w)
AM_RANGE(0x0006, 0x0006) AM_WRITE(xain_68705_ddr_c_w) AM_RANGE(0x0006, 0x0006) AM_WRITE(xain_68705_ddr_c_w)
// AM_RANGE(0x0008, 0x0008) AM_READWRITE(m68705_tdr_r, m68705_tdr_w) // AM_RANGE(0x0008, 0x0008) AM_READWRITE(m68705_tdr_r, m68705_tdr_w)
// AM_RANGE(0x0009, 0x0009) AM_READWRITE(m68705_tcr_r, m68705_tcr_w) // AM_RANGE(0x0009, 0x0009) AM_READWRITE(m68705_tcr_r, m68705_tcr_w)
AM_RANGE(0x0010, 0x007f) AM_RAM AM_RANGE(0x0010, 0x007f) AM_RAM
AM_RANGE(0x0080, 0x07ff) AM_ROM AM_RANGE(0x0080, 0x07ff) AM_ROM
ADDRESS_MAP_END ADDRESS_MAP_END

View File

@ -293,37 +293,37 @@ static WRITE16_HANDLER( hippodrm_68000_share_w )
/******************************************************************************/ /******************************************************************************/
/* /*
Heavy Barrel I8751 connections Heavy Barrel I8751 connections
P0.0 - P0.7 <-> 4 * LS374 latches 8B,8C,7B,7C
P1.0 -> MIXFLG1 P0.0 - P0.7 <-> 4 * LS374 latches 8B,8C,7B,7C
P1.1 -> MIXFLG2
P1.2 -> B0FLG
P1.3 -> B1FLG1
P1.4 -> B1FLG2
P1.5 -> SOUNDFLG1
P1.6 -> SOUNDFLG2
P2.0 -> B2FLG 0 P1.0 -> MIXFLG1
P2.1 -> B2FLG 1 P1.1 -> MIXFLG2
P2.2 <- SEL2 P1.2 -> B0FLG
P2.3 -> acknowledge INT1 P1.3 -> B1FLG1
P2.4 -> Enable latch 7B P1.4 -> B1FLG2
P2.5 -> Enable latch 8B P1.5 -> SOUNDFLG1
P2.6 -> Enable latch 8C P1.6 -> SOUNDFLG2
P2.7 -> Enable latch 7C
P2.0 -> B2FLG 0
P3.0 -> CRBACK0 P2.1 -> B2FLG 1
P3.1 -> CRBACK1 P2.2 <- SEL2
P3.2 -> CRBACK2 P2.3 -> acknowledge INT1
P3.3 <- /INT1 P2.4 -> Enable latch 7B
P3.5 <- SEL3 P2.5 -> Enable latch 8B
P3.6 <- SEL4 P2.6 -> Enable latch 8C
P3.7 <- SEL5 P2.7 -> Enable latch 7C
The outputs to the graphics & audio hardware are not directly emulated, but the P3.0 -> CRBACK0
values are not known to change after bootup. P3.1 -> CRBACK1
P3.2 -> CRBACK2
P3.3 <- /INT1
P3.5 <- SEL3
P3.6 <- SEL4
P3.7 <- SEL5
The outputs to the graphics & audio hardware are not directly emulated, but the
values are not known to change after bootup.
*/ */
static UINT8 i8751_ports[4]; static UINT8 i8751_ports[4];
@ -331,7 +331,7 @@ static UINT8 i8751_ports[4];
READ8_HANDLER(dec0_mcu_port_r ) READ8_HANDLER(dec0_mcu_port_r )
{ {
int latchEnable=i8751_ports[2]>>4; int latchEnable=i8751_ports[2]>>4;
// P0 connected to 4 latches // P0 connected to 4 latches
if (offset==0) if (offset==0)
{ {
@ -344,7 +344,7 @@ READ8_HANDLER(dec0_mcu_port_r )
else if ((latchEnable&8)==0) else if ((latchEnable&8)==0)
return i8751_return&0xff; return i8751_return&0xff;
} }
return 0xff; return 0xff;
} }
@ -357,7 +357,7 @@ WRITE8_HANDLER(dec0_mcu_port_w )
if ((data&0x4)==0) if ((data&0x4)==0)
cputag_set_input_line(space->machine, "maincpu", 5, HOLD_LINE); cputag_set_input_line(space->machine, "maincpu", 5, HOLD_LINE);
if ((data&0x8)==0) if ((data&0x8)==0)
cputag_set_input_line(space->machine, "mcu", MCS51_INT1_LINE, CLEAR_LINE); cputag_set_input_line(space->machine, "mcu", MCS51_INT1_LINE, CLEAR_LINE);
if ((data&0x40)==0) if ((data&0x40)==0)
i8751_return=(i8751_return&0xff00)|(i8751_ports[0]); i8751_return=(i8751_return&0xff00)|(i8751_ports[0]);
if ((data&0x80)==0) if ((data&0x80)==0)

View File

@ -602,7 +602,7 @@ WRITE8_HANDLER( namcos1_watchdog_w )
wdog |= 2; wdog |= 2;
else if (space->cpu == space->machine->device("audiocpu")) else if (space->cpu == space->machine->device("audiocpu"))
wdog |= 4; wdog |= 4;
if (wdog == 7 || !namcos1_reset) if (wdog == 7 || !namcos1_reset)
{ {
wdog = 0; wdog = 0;

View File

@ -560,7 +560,7 @@ static void cclimber_draw_sprites(bitmap_t *bitmap, const rectangle *cliprect, c
{ {
int x = cclimber_spriteram[offs + 3] + 1; int x = cclimber_spriteram[offs + 3] + 1;
/* x + 1 is evident in cclimber and ckong. It looks worse, /* x + 1 is evident in cclimber and ckong. It looks worse,
but it has been confirmed on several PCBs. */ but it has been confirmed on several PCBs. */
int y = 240 - cclimber_spriteram[offs + 2]; int y = 240 - cclimber_spriteram[offs + 2];

View File

@ -4027,7 +4027,7 @@ WRITE8_HANDLER( K053247_w )
else else
K053247_ram[offs] = (K053247_ram[offs] & 0x00ff) | (data<<8); K053247_ram[offs] = (K053247_ram[offs] & 0x00ff) | (data<<8);
} }
#endif #endif
// Mystic Warriors hardware games support a non-OBJCHA based ROM readback // Mystic Warriors hardware games support a non-OBJCHA based ROM readback
// write the address to the 246 as usual, but there's a completely separate ROM // write the address to the 246 as usual, but there's a completely separate ROM

View File

@ -329,4 +329,4 @@ static const sega16sp_interface xboard_sega16sp_intf =
extern struct palette_info segaic16_palette; extern struct palette_info segaic16_palette;
extern struct rotate_info segaic16_rotate[SEGAIC16_MAX_ROTATE]; extern struct rotate_info segaic16_rotate[SEGAIC16_MAX_ROTATE];
extern struct road_info segaic16_road[SEGAIC16_MAX_ROADS]; extern struct road_info segaic16_road[SEGAIC16_MAX_ROADS];

View File

@ -2425,7 +2425,7 @@ void console_create_window(running_machine *machine)
// set the view and fetch the width // set the view and fetch the width
info->view[0].view->set_source(*source); info->view[0].view->set_source(*source);
dischars = info->view[0].view->total_size().x; dischars = info->view[0].view->total_size().x;
// compute the preferred width // compute the preferred width
minwidth = EDGE_WIDTH + main_console_regwidth * debug_font_width + vscroll_width + 2 * EDGE_WIDTH + 100 + EDGE_WIDTH; minwidth = EDGE_WIDTH + main_console_regwidth * debug_font_width + vscroll_width + 2 * EDGE_WIDTH + 100 + EDGE_WIDTH;
maxwidth = EDGE_WIDTH + main_console_regwidth * debug_font_width + vscroll_width + 2 * EDGE_WIDTH + MAX(dischars, conchars) * debug_font_width + vscroll_width + EDGE_WIDTH; maxwidth = EDGE_WIDTH + main_console_regwidth * debug_font_width + vscroll_width + 2 * EDGE_WIDTH + MAX(dischars, conchars) * debug_font_width + vscroll_width + EDGE_WIDTH;

View File

@ -105,12 +105,12 @@ public:
// bool to test if the function is NULL or not // bool to test if the function is NULL or not
operator bool() const { return (m_function != NULL); } operator bool() const { return (m_function != NULL); }
// dereference to get the underlying pointer // dereference to get the underlying pointer
func_ptr operator *() const { return m_function; } func_ptr operator *() const { return m_function; }
private: private:
func_ptr m_function; func_ptr m_function;
}; };
@ -118,14 +118,14 @@ class stack_walker
{ {
public: public:
stack_walker(); stack_walker();
FPTR ip() const { return m_stackframe.AddrPC.Offset; } FPTR ip() const { return m_stackframe.AddrPC.Offset; }
FPTR sp() const { return m_stackframe.AddrStack.Offset; } FPTR sp() const { return m_stackframe.AddrStack.Offset; }
FPTR frame() const { return m_stackframe.AddrFrame.Offset; } FPTR frame() const { return m_stackframe.AddrFrame.Offset; }
void reset(CONTEXT &context, HANDLE thread); void reset(CONTEXT &context, HANDLE thread);
bool unwind(); bool unwind();
private: private:
HANDLE m_process; HANDLE m_process;
HANDLE m_thread; HANDLE m_thread;
@ -138,7 +138,7 @@ private:
dynamic_bind<BOOL (WINAPI *)(HANDLE, LPCTSTR, BOOL)> m_sym_initialize; dynamic_bind<BOOL (WINAPI *)(HANDLE, LPCTSTR, BOOL)> m_sym_initialize;
dynamic_bind<PVOID (WINAPI *)(HANDLE, DWORD64)> m_sym_function_table_access_64; dynamic_bind<PVOID (WINAPI *)(HANDLE, DWORD64)> m_sym_function_table_access_64;
dynamic_bind<DWORD64 (WINAPI *)(HANDLE, DWORD64)> m_sym_get_module_base_64; dynamic_bind<DWORD64 (WINAPI *)(HANDLE, DWORD64)> m_sym_get_module_base_64;
static bool s_initialized; static bool s_initialized;
}; };
@ -149,10 +149,10 @@ public:
// construction/destruction // construction/destruction
symbol_manager(const char *argv0); symbol_manager(const char *argv0);
~symbol_manager(); ~symbol_manager();
// getters // getters
FPTR last_base() const { return m_last_base; } FPTR last_base() const { return m_last_base; }
// core symbol lookup // core symbol lookup
const char *symbol_for_address(FPTR address); const char *symbol_for_address(FPTR address);
const char *symbol_for_address(PVOID address) { return symbol_for_address(reinterpret_cast<FPTR>(address)); } const char *symbol_for_address(PVOID address) { return symbol_for_address(reinterpret_cast<FPTR>(address)); }
@ -197,11 +197,11 @@ class sampling_profiler
public: public:
sampling_profiler(UINT32 max_seconds, UINT8 stack_depth); sampling_profiler(UINT32 max_seconds, UINT8 stack_depth);
~sampling_profiler(); ~sampling_profiler();
void start(); void start();
void stop(); void stop();
// void reset(); // void reset();
void print_results(symbol_manager &symbols); void print_results(symbol_manager &symbols);
private: private:
@ -210,7 +210,7 @@ private:
static int CLIB_DECL compare_address(const void *item1, const void *item2); static int CLIB_DECL compare_address(const void *item1, const void *item2);
static int CLIB_DECL compare_frequency(const void *item1, const void *item2); static int CLIB_DECL compare_frequency(const void *item1, const void *item2);
HANDLE m_target_thread; HANDLE m_target_thread;
HANDLE m_thread; HANDLE m_thread;
@ -549,7 +549,7 @@ static void osd_exit(running_machine &machine)
profiler->print_results(*symbols); profiler->print_results(*symbols);
global_free(profiler); global_free(profiler);
} }
// turn off our multimedia tasks // turn off our multimedia tasks
// if (av_revert_mm_thread_characteristics) // if (av_revert_mm_thread_characteristics)
// (*av_revert_mm_thread_characteristics)(mm_task); // (*av_revert_mm_thread_characteristics)(mm_task);
@ -790,7 +790,7 @@ void stack_walker::reset(CONTEXT &initial, HANDLE thread)
m_stackframe.AddrPC.Mode = AddrModeFlat; m_stackframe.AddrPC.Mode = AddrModeFlat;
m_stackframe.AddrFrame.Mode = AddrModeFlat; m_stackframe.AddrFrame.Mode = AddrModeFlat;
m_stackframe.AddrStack.Mode = AddrModeFlat; m_stackframe.AddrStack.Mode = AddrModeFlat;
// pull architecture-specific fields from the context // pull architecture-specific fields from the context
#ifdef PTR64 #ifdef PTR64
m_stackframe.AddrPC.Offset = m_context.Rip; m_stackframe.AddrPC.Offset = m_context.Rip;
@ -855,7 +855,7 @@ symbol_manager::symbol_manager(const char *argv0)
if (extoffs != -1) if (extoffs != -1)
m_mapfile.substr(0, extoffs); m_mapfile.substr(0, extoffs);
m_mapfile.cat(".map"); m_mapfile.cat(".map");
// and the name of the symfile // and the name of the symfile
extoffs = m_symfile.rchr(0, '.'); extoffs = m_symfile.rchr(0, '.');
if (extoffs != -1) if (extoffs != -1)
@ -905,7 +905,7 @@ const char *symbol_manager::symbol_for_address(FPTR address)
// if that fails, scan the cache if we have one // if that fails, scan the cache if we have one
if (m_cache != NULL) if (m_cache != NULL)
scan_cache_for_address(address); scan_cache_for_address(address);
// or else try to open a sym/map file and find it there // or else try to open a sym/map file and find it there
else else
scan_file_for_address(address, false); scan_file_for_address(address, false);
@ -961,13 +961,13 @@ void symbol_manager::scan_file_for_address(FPTR address, bool create_cache)
{ {
bool is_symfile = false; bool is_symfile = false;
FILE *srcfile = NULL; FILE *srcfile = NULL;
#ifdef __GNUC__ #ifdef __GNUC__
// see if we have a symbol file (gcc only) // see if we have a symbol file (gcc only)
srcfile = fopen(m_symfile, "r"); srcfile = fopen(m_symfile, "r");
is_symfile = (srcfile != NULL); is_symfile = (srcfile != NULL);
#endif #endif
// if not, see if we have a map file // if not, see if we have a map file
if (srcfile == NULL) if (srcfile == NULL)
srcfile = fopen(m_mapfile, "r"); srcfile = fopen(m_mapfile, "r");
@ -999,7 +999,7 @@ void symbol_manager::scan_file_for_address(FPTR address, bool create_cache)
best_addr = addr; best_addr = addr;
best_symbol = symbol; best_symbol = symbol;
} }
// also create a cache entry if we can // also create a cache entry if we can
if (create_cache) if (create_cache)
{ {
@ -1008,10 +1008,10 @@ void symbol_manager::scan_file_for_address(FPTR address, bool create_cache)
} }
} }
} }
// close the file // close the file
fclose(srcfile); fclose(srcfile);
// format the symbol and remember the last base // format the symbol and remember the last base
format_symbol(best_symbol, address - best_addr); format_symbol(best_symbol, address - best_addr);
m_last_base = best_addr; m_last_base = best_addr;
@ -1028,17 +1028,17 @@ void symbol_manager::scan_cache_for_address(FPTR address)
// reset the best info // reset the best info
astring best_symbol; astring best_symbol;
FPTR best_addr = 0; FPTR best_addr = 0;
// walk the cache, looking for valid entries // walk the cache, looking for valid entries
for (cache_entry *entry = m_cache; entry != NULL; entry = entry->m_next) for (cache_entry *entry = m_cache; entry != NULL; entry = entry->m_next)
// if this is the best one so far, remember it // if this is the best one so far, remember it
if (entry->m_address <= address && entry->m_address > best_addr) if (entry->m_address <= address && entry->m_address > best_addr)
{ {
best_addr = entry->m_address; best_addr = entry->m_address;
best_symbol = entry->m_name; best_symbol = entry->m_name;
} }
// format the symbol and remember the last base // format the symbol and remember the last base
format_symbol(best_symbol, address - best_addr); format_symbol(best_symbol, address - best_addr);
m_last_base = best_addr; m_last_base = best_addr;
@ -1054,13 +1054,13 @@ bool symbol_manager::parse_sym_line(const char *line, FPTR &address, astring &sy
{ {
#ifdef __GNUC__ #ifdef __GNUC__
/* /*
32-bit gcc symbol line: 32-bit gcc symbol line:
[271778](sec 1)(fl 0x00)(ty 20)(scl 3) (nx 0) 0x007df675 line_to_symbol(char const*, unsigned int&, bool) [271778](sec 1)(fl 0x00)(ty 20)(scl 3) (nx 0) 0x007df675 line_to_symbol(char const*, unsigned int&, bool)
64-bit gcc symbol line: 64-bit gcc symbol line:
[271775](sec 1)(fl 0x00)(ty 20)(scl 3) (nx 0) 0x00000000008dd1e9 line_to_symbol(char const*, unsigned long long&, bool) [271775](sec 1)(fl 0x00)(ty 20)(scl 3) (nx 0) 0x00000000008dd1e9 line_to_symbol(char const*, unsigned long long&, bool)
*/ */
// first look for a (ty) entry // first look for a (ty) entry
const char *type = strstr(line, "(ty 20)"); const char *type = strstr(line, "(ty 20)");
if (type == NULL) if (type == NULL)
@ -1075,7 +1075,7 @@ bool symbol_manager::parse_sym_line(const char *line, FPTR &address, astring &sy
in_parens = true; in_parens = true;
else if (*chptr == ')') else if (*chptr == ')')
in_parens = false; in_parens = false;
// otherwise, look for an 0x address // otherwise, look for an 0x address
else if (!in_parens && *chptr == '0' && chptr[1] == 'x') else if (!in_parens && *chptr == '0' && chptr[1] == 'x')
{ {
@ -1084,11 +1084,11 @@ bool symbol_manager::parse_sym_line(const char *line, FPTR &address, astring &sy
if (sscanf(chptr, "0x%p", &temp) != 1) if (sscanf(chptr, "0x%p", &temp) != 1)
return false; return false;
address = m_text_base + reinterpret_cast<FPTR>(temp); address = m_text_base + reinterpret_cast<FPTR>(temp);
// skip forward until we're past the space // skip forward until we're past the space
while (*chptr != 0 && !isspace(*chptr)) while (*chptr != 0 && !isspace(*chptr))
chptr++; chptr++;
// extract the symbol name // extract the symbol name
symbol.cpy(chptr).trimspace(); symbol.cpy(chptr).trimspace();
return (symbol.len() > 0); return (symbol.len() > 0);
@ -1123,12 +1123,12 @@ bool symbol_manager::parse_map_line(const char *line, FPTR &address, astring &sy
if (sscanf(&line[16], "0x%p", &temp) != 1) if (sscanf(&line[16], "0x%p", &temp) != 1)
return false; return false;
address = reinterpret_cast<FPTR>(temp); address = reinterpret_cast<FPTR>(temp);
// skip forward until we're past the space // skip forward until we're past the space
const char *chptr = &line[16]; const char *chptr = &line[16];
while (*chptr != 0 && !isspace(*chptr)) while (*chptr != 0 && !isspace(*chptr))
chptr++; chptr++;
// extract the symbol name // extract the symbol name
symbol.cpy(chptr).trimspace(); symbol.cpy(chptr).trimspace();
return (symbol.len() > 0); return (symbol.len() > 0);
@ -1143,7 +1143,7 @@ bool symbol_manager::parse_map_line(const char *line, FPTR &address, astring &sy
//------------------------------------------------- //-------------------------------------------------
void symbol_manager::format_symbol(const char *name, UINT32 displacement, const char *filename, int linenumber) void symbol_manager::format_symbol(const char *name, UINT32 displacement, const char *filename, int linenumber)
{ {
// start with the address and offset // start with the address and offset
m_buffer.printf(" (%s", name); m_buffer.printf(" (%s", name);
if (displacement != 0) if (displacement != 0)
@ -1156,7 +1156,7 @@ void symbol_manager::format_symbol(const char *name, UINT32 displacement, const
// close up the string // close up the string
m_buffer.cat(")"); m_buffer.cat(")");
} }
//------------------------------------------------- //-------------------------------------------------
// get_text_section_base - figure out the base // get_text_section_base - figure out the base
@ -1171,20 +1171,20 @@ FPTR symbol_manager::get_text_section_base()
// start with the image base // start with the image base
PVOID base = reinterpret_cast<PVOID>(GetModuleHandle(NULL)); PVOID base = reinterpret_cast<PVOID>(GetModuleHandle(NULL));
assert(base != NULL); assert(base != NULL);
// make sure we have the functions we need // make sure we have the functions we need
if (image_nt_header != NULL && image_rva_to_section != NULL) if (image_nt_header != NULL && image_rva_to_section != NULL)
{ {
// get the NT header // get the NT header
PIMAGE_NT_HEADERS headers = (*image_nt_header)(base); PIMAGE_NT_HEADERS headers = (*image_nt_header)(base);
assert(headers != NULL); assert(headers != NULL);
// look ourself up (assuming we are in the .text section) // look ourself up (assuming we are in the .text section)
PIMAGE_SECTION_HEADER section = (*image_rva_to_section)(headers, base, reinterpret_cast<FPTR>(get_text_section_base) - reinterpret_cast<FPTR>(base)); PIMAGE_SECTION_HEADER section = (*image_rva_to_section)(headers, base, reinterpret_cast<FPTR>(get_text_section_base) - reinterpret_cast<FPTR>(base));
if (section != NULL) if (section != NULL)
return reinterpret_cast<FPTR>(base) + section->VirtualAddress; return reinterpret_cast<FPTR>(base) + section->VirtualAddress;
} }
// fallback to returning the image base (wrong) // fallback to returning the image base (wrong)
return reinterpret_cast<FPTR>(base); return reinterpret_cast<FPTR>(base);
} }
@ -1255,7 +1255,7 @@ void sampling_profiler::stop()
// set the flag and wait a couple of seconds (max) // set the flag and wait a couple of seconds (max)
m_thread_exit = true; m_thread_exit = true;
WaitForSingleObject(m_thread, 2000); WaitForSingleObject(m_thread, 2000);
// regardless, close the handle // regardless, close the handle
CloseHandle(m_thread); CloseHandle(m_thread);
} }
@ -1272,18 +1272,18 @@ int CLIB_DECL sampling_profiler::compare_address(const void *item1, const void *
const FPTR *entry2 = reinterpret_cast<const FPTR *>(item2); const FPTR *entry2 = reinterpret_cast<const FPTR *>(item2);
int mincount = MIN(entry1[0], entry2[0]); int mincount = MIN(entry1[0], entry2[0]);
// sort in order of: bucket, caller, caller's caller, etc. // sort in order of: bucket, caller, caller's caller, etc.
for (int index = 1; index <= mincount; index++) for (int index = 1; index <= mincount; index++)
if (entry1[index] != entry2[index]) if (entry1[index] != entry2[index])
return entry1[index] - entry2[index]; return entry1[index] - entry2[index];
// if we match to the end, sort by the depth of the stack // if we match to the end, sort by the depth of the stack
return entry1[0] - entry2[0]; return entry1[0] - entry2[0];
} }
//------------------------------------------------- //-------------------------------------------------
// compare_frequency - compare two entries by // compare_frequency - compare two entries by
// their frequency of occurrence // their frequency of occurrence
//------------------------------------------------- //-------------------------------------------------
@ -1312,15 +1312,15 @@ void sampling_profiler::print_results(symbol_manager &symbols)
for (FPTR *current = m_buffer; current < m_buffer_ptr; current += m_entry_stride) for (FPTR *current = m_buffer; current < m_buffer_ptr; current += m_entry_stride)
{ {
assert(current[0] >= 1 && current[0] < m_entry_stride); assert(current[0] >= 1 && current[0] < m_entry_stride);
// convert the sampled PC to its function base as a bucket // convert the sampled PC to its function base as a bucket
symbols.symbol_for_address(current[1]); symbols.symbol_for_address(current[1]);
current[1] = symbols.last_base(); current[1] = symbols.last_base();
} }
// step 2: sort the results // step 2: sort the results
qsort(m_buffer, (m_buffer_ptr - m_buffer) / m_entry_stride, m_entry_stride * sizeof(FPTR), compare_address); qsort(m_buffer, (m_buffer_ptr - m_buffer) / m_entry_stride, m_entry_stride * sizeof(FPTR), compare_address);
// step 3: count and collapse unique entries // step 3: count and collapse unique entries
UINT32 total_count = 0; UINT32 total_count = 0;
for (FPTR *current = m_buffer; current < m_buffer_ptr; ) for (FPTR *current = m_buffer; current < m_buffer_ptr; )
@ -1341,7 +1341,7 @@ void sampling_profiler::print_results(symbol_manager &symbols)
// step 4: sort the results again, this time by frequency // step 4: sort the results again, this time by frequency
qsort(m_buffer, (m_buffer_ptr - m_buffer) / m_entry_stride, m_entry_stride * sizeof(FPTR), compare_frequency); qsort(m_buffer, (m_buffer_ptr - m_buffer) / m_entry_stride, m_entry_stride * sizeof(FPTR), compare_frequency);
// step 5: print the results // step 5: print the results
UINT32 num_printed = 0; UINT32 num_printed = 0;
for (FPTR *current = m_buffer; current < m_buffer_ptr && num_printed < 30; current += m_entry_stride) for (FPTR *current = m_buffer; current < m_buffer_ptr && num_printed < 30; current += m_entry_stride)
@ -1349,7 +1349,7 @@ void sampling_profiler::print_results(symbol_manager &symbols)
// once we hit 0 frequency, we're done // once we hit 0 frequency, we're done
if (current[0] == 0) if (current[0] == 0)
break; break;
// output the result // output the result
printf("%4.1f%% - %6d : %p%s\n", (double)current[0] * 100.0 / (double)total_count, (UINT32)current[0], reinterpret_cast<void *>(current[1]), symbols.symbol_for_address(current[1])); printf("%4.1f%% - %6d : %p%s\n", (double)current[0] * 100.0 / (double)total_count, (UINT32)current[0], reinterpret_cast<void *>(current[1]), symbols.symbol_for_address(current[1]));
for (int index = 2; index < m_entry_stride; index++) for (int index = 2; index < m_entry_stride; index++)
@ -1392,11 +1392,11 @@ void sampling_profiler::thread_run()
SuspendThread(m_target_thread); SuspendThread(m_target_thread);
context.ContextFlags = CONTEXT_FULL; context.ContextFlags = CONTEXT_FULL;
GetThreadContext(m_target_thread, &context); GetThreadContext(m_target_thread, &context);
// first entry is a count // first entry is a count
FPTR *count = m_buffer_ptr++; FPTR *count = m_buffer_ptr++;
*count = 0; *count = 0;
// iterate over the frames until we run out or hit an error // iterate over the frames until we run out or hit an error
walker.reset(context, m_target_thread); walker.reset(context, m_target_thread);
int frame; int frame;
@ -1405,11 +1405,11 @@ void sampling_profiler::thread_run()
*m_buffer_ptr++ = walker.ip(); *m_buffer_ptr++ = walker.ip();
*count += 1; *count += 1;
} }
// fill in any missing parts with NULLs // fill in any missing parts with NULLs
for (; frame <= m_stack_depth; frame++) for (; frame <= m_stack_depth; frame++)
*m_buffer_ptr++ = 0; *m_buffer_ptr++ = 0;
// resume the thread // resume the thread
ResumeThread(m_target_thread); ResumeThread(m_target_thread);

View File

@ -10,4 +10,4 @@
***************************************************************************/ ***************************************************************************/
extern const char build_version[]; extern const char build_version[];
const char build_version[] = "0.138u2 ("__DATE__")"; const char build_version[] = "0.138u3 ("__DATE__")";