Cleanup & version bump.

This commit is contained in:
Aaron Giles 2010-11-08 09:08:55 +00:00
parent 12111c21d0
commit 92b3dd111f
36 changed files with 782 additions and 782 deletions

View File

@ -173,7 +173,7 @@ cheat_parameter::cheat_parameter(cheat_manager &manager, symbol_table &symbols,
m_minval = number_and_format(xml_get_attribute_int(&paramnode, "min", 0), xml_get_attribute_int_format(&paramnode, "min"));
m_maxval = number_and_format(xml_get_attribute_int(&paramnode, "max", 0), xml_get_attribute_int_format(&paramnode, "max"));
m_stepval = number_and_format(xml_get_attribute_int(&paramnode, "step", 1), xml_get_attribute_int_format(&paramnode, "step"));
// iterate over items
for (xml_data_node *itemnode = xml_get_sibling(paramnode.child, "item"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "item"))
{
@ -184,11 +184,11 @@ cheat_parameter::cheat_parameter(cheat_manager &manager, symbol_table &symbols,
// check for non-existant value
if (xml_get_attribute(itemnode, "value") == NULL)
throw emu_fatalerror("%s.xml(%d): item is value\n", filename, itemnode->line);
// extract the parameters
UINT64 value = xml_get_attribute_int(itemnode, "value", 0);
int format = xml_get_attribute_int_format(itemnode, "value");
// allocate and append a new item
item &curitem = m_itemlist.append(*auto_alloc(&manager.machine(), item(itemnode->value, value, format)));
@ -210,7 +210,7 @@ const char *cheat_parameter::text()
// are we a value cheat?
if (!has_itemlist())
m_curtext.format("%d (0x%X)", UINT32(m_value), UINT32(m_value));
// if not, we're an item cheat
else
{
@ -280,7 +280,7 @@ bool cheat_parameter::set_minimum_state()
bool cheat_parameter::set_prev_state()
{
UINT64 origvalue = m_value;
// are we a value cheat?
if (!has_itemlist())
{
@ -289,7 +289,7 @@ bool cheat_parameter::set_prev_state()
else
m_value -= m_stepval;
}
// if not, we're an item cheat
else
{
@ -300,7 +300,7 @@ bool cheat_parameter::set_prev_state()
if (previtem != NULL)
m_value = previtem->value();
}
return (m_value != origvalue);
}
@ -312,7 +312,7 @@ bool cheat_parameter::set_prev_state()
bool cheat_parameter::set_next_state()
{
UINT64 origvalue = m_value;
// are we a value cheat?
if (!has_itemlist())
{
@ -321,7 +321,7 @@ bool cheat_parameter::set_next_state()
else
m_value += m_stepval;
}
// if not, we're an item cheat
else
{
@ -332,7 +332,7 @@ bool cheat_parameter::set_next_state()
if (curitem != NULL && curitem->next() != NULL)
m_value = curitem->next()->value();
}
return (m_value != origvalue);
}
@ -477,7 +477,7 @@ cheat_script::script_entry::script_entry(cheat_manager &manager, symbol_table &s
for (xml_data_node *argnode = xml_get_sibling(entrynode.child, "argument"); argnode != NULL; argnode = xml_get_sibling(argnode->next, "argument"))
{
output_argument &curarg = m_arglist.append(*auto_alloc(&manager.machine(), output_argument(manager, symbols, filename, *argnode)));
// verify we didn't overrun the argument count
totalargs += curarg.count();
if (totalargs > MAX_ARGUMENTS)
@ -887,7 +887,7 @@ bool cheat_entry::activate()
//-------------------------------------------------
// select_default_state - select the default
// select_default_state - select the default
// state for a cheat, or activate a oneshot cheat
//-------------------------------------------------
@ -908,7 +908,7 @@ bool cheat_entry::select_default_state()
//-------------------------------------------------
// select_previous_state - select the previous
// select_previous_state - select the previous
// state for a cheat
//-------------------------------------------------
@ -947,7 +947,7 @@ bool cheat_entry::select_previous_state()
//-------------------------------------------------
// select_next_state - select the next state for
// select_next_state - select the next state for
// a cheat
//-------------------------------------------------
@ -972,11 +972,11 @@ bool cheat_entry::select_next_state()
changed = set_state(SCRIPT_STATE_RUN);
m_parameter->set_minimum_state();
}
// otherwise, switch to the next state
else
changed = m_parameter->set_next_state();
// if we changed, signal a state change
if (changed && !is_oneshot_parameter())
execute_change_script();
@ -986,7 +986,7 @@ bool cheat_entry::select_next_state()
//-------------------------------------------------
// menu_text - return the text needed to display
// menu_text - return the text needed to display
// this cheat in a menu item
//-------------------------------------------------
@ -1118,7 +1118,7 @@ cheat_manager::cheat_manager(running_machine &machine)
//-------------------------------------------------
// set_enable - globally enable or disable the
// set_enable - globally enable or disable the
// cheat engine
//-------------------------------------------------
@ -1165,7 +1165,7 @@ void cheat_manager::reload()
// free everything
m_cheatlist.reset();
// reset state
m_framecount = 0;
m_numlines = 0;
@ -1213,7 +1213,7 @@ bool cheat_manager::save_all(const char *filename)
// if that failed, return nothing
if (filerr != FILERR_NONE)
return false;
// wrap the rest of catch errors
try
{
@ -1231,7 +1231,7 @@ bool cheat_manager::save_all(const char *filename)
mame_fclose(cheatfile);
return true;
}
// catch errors and cleanup
catch (emu_fatalerror &err)
{
@ -1244,7 +1244,7 @@ bool cheat_manager::save_all(const char *filename)
//-------------------------------------------------
// render_text - called by the UI system to
// render_text - called by the UI system to
// render text
//-------------------------------------------------
@ -1265,7 +1265,7 @@ void cheat_manager::render_text(render_container &container)
//-------------------------------------------------
// get_output_astring - return a reference to
// the given row's string, and set the
// the given row's string, and set the
// justification
//-------------------------------------------------
@ -1277,10 +1277,10 @@ astring &cheat_manager::get_output_astring(int row, int justify)
// remember the last request
m_lastline = row;
// invert if negative
row = (row < 0) ? m_numlines + row : row - 1;
// clamp within range
row = MAX(row, 0);
row = MIN(row, m_numlines - 1);
@ -1398,7 +1398,7 @@ void cheat_manager::frame_update()
//-------------------------------------------------
// load_cheats - load a cheat file into memory
// load_cheats - load a cheat file into memory
// and create the cheat entry list
//-------------------------------------------------
@ -1467,7 +1467,7 @@ void cheat_manager::load_cheats(const char *filename)
filerr = mame_fclose_and_open_next(&cheatfile, fname, OPEN_FLAG_READ);
}
}
// handle errors cleanly
catch (emu_fatalerror &err)
{

View File

@ -83,7 +83,7 @@ public:
// pass-through to look like a regular number
operator UINT64 &() { return m_value; }
operator const UINT64 &() const { return m_value; }
// format the number according to its format
const char *format(astring &string) const;
@ -116,13 +116,13 @@ public:
// actions
void save(mame_file &cheatfile) const;
private:
// a single item in a parameter item list
class item
{
friend class simple_list<item>;
public:
// construction/destruction
item(const char *text, UINT64 value, int valformat)
@ -130,11 +130,11 @@ private:
m_text(text),
m_value(value, valformat) { }
// getters
// getters
item *next() const { return m_next; }
const number_and_format &value() const { return m_value; }
const char *text() const { return m_text; }
private:
// internal state
item * m_next; // next item in list
@ -148,7 +148,7 @@ private:
number_and_format m_stepval; // step value
UINT64 m_value; // live value of the parameter
astring m_curtext; // holding for a value string
simple_list<item> m_itemlist; // list of items
simple_list<item> m_itemlist; // list of items
};
@ -204,11 +204,11 @@ private:
// actions
void save(mame_file &cheatfile) const;
private:
// internal state
output_argument * m_next; // link to next argument
parsed_expression m_expression; // expression for argument
parsed_expression m_expression; // expression for argument
UINT64 m_count; // number of repetitions
};
@ -217,8 +217,8 @@ private:
// internal state
script_entry * m_next; // link to next entry
parsed_expression m_condition; // condition under which this is executed
parsed_expression m_expression; // expression to execute
parsed_expression m_condition; // condition under which this is executed
parsed_expression m_expression; // expression to execute
astring m_format; // string format to print
simple_list<output_argument> m_arglist; // list of arguments
INT8 m_line; // which line to print on
@ -227,7 +227,7 @@ private:
// constants
static const int MAX_ARGUMENTS = 32;
};
// internal state
simple_list<script_entry> m_entrylist; // list of actions to perform
script_state m_state; // which state this script is for
@ -240,12 +240,12 @@ private:
class cheat_entry
{
friend class simple_list<cheat_entry>;
public:
// construction/destruction
cheat_entry(cheat_manager &manager, symbol_table &globaltable, const char *filename, xml_data_node &cheatnode);
~cheat_entry();
// getters
cheat_manager &manager() const { return m_manager; }
cheat_entry *next() const { return m_next; }
@ -283,7 +283,7 @@ public:
// UI helpers
void menu_text(astring &description, astring &state, UINT32 &flags);
// per-frame update
// per-frame update
void frame_update() { if (m_state == SCRIPT_STATE_RUN) execute_run_script(); }
private:
@ -319,20 +319,20 @@ class cheat_manager
public:
// construction/destruction
cheat_manager(running_machine &machine);
// getters
running_machine &machine() const { return m_machine; }
bool enabled() const { return !m_disabled; }
cheat_entry *first() const { return m_cheatlist.first(); }
// setters
void set_enable(bool enable = true);
// actions
void reload();
bool save_all(const char *filename);
void render_text(render_container &container);
// output helpers
astring &get_output_astring(int row, int justify);
@ -346,7 +346,7 @@ private:
static void frame_update_static(running_machine &machine);
void frame_update();
void load_cheats(const char *filename);
// internal state
running_machine & m_machine; // reference to our machine
simple_list<cheat_entry> m_cheatlist; // cheat list
@ -357,7 +357,7 @@ private:
INT8 m_lastline; // last line used for output
bool m_disabled; // true if the cheat engine is disabled
symbol_table m_symtable; // global symbol table
// constants
static const int CHEAT_VERSION = 1;
};

View File

@ -925,7 +925,7 @@ public:
bool decode(const UINT16 word0, const UINT16 word1)
{
/* Note: This is a JJJF limited in the docs, but other opcodes sneak
in before cmp, so the same decode function can be used. */
in before cmp, so the same decode function can be used. */
decode_JJJF_table(BITSn(word0,0x07), BITSn(word0,0x08),
m_source, m_destination);
return true;
@ -950,7 +950,7 @@ public:
bool decode(const UINT16 word0, const UINT16 word1)
{
/* Note: This is a JJJF limited in the docs, but other opcodes sneak
in before cmp, so the same decode function can be used. */
in before cmp, so the same decode function can be used. */
decode_JJJF_table(BITSn(word0,0x07), BITSn(word0,0x08),
m_source, m_destination);
return true;
@ -2676,7 +2676,7 @@ public:
bool decode(const UINT16 word0, const UINT16 word1)
{
/* There are inconsistencies with the S1 & S2 operand ordering in the docs,
but since it's a multiply it doesn't matter */
but since it's a multiply it doesn't matter */
decode_QQQF_table(BITSn(word0,0x07), BITSn(word0,0x08),
m_source, m_source2, m_destination);
@ -2772,7 +2772,7 @@ public:
bool decode(const UINT16 word0, const UINT16 word1)
{
/* There are inconsistencies with the S1 & S2 operand ordering in the docs,
but since it's a multiply it doesn't matter */
but since it's a multiply it doesn't matter */
decode_QQQF_table(BITSn(word0,0x07), BITSn(word0,0x08),
m_source, m_source2, m_destination);

View File

@ -154,7 +154,7 @@ void debug_cpu_init(running_machine *machine)
/* create a global symbol table */
global->symtable = global_alloc(symbol_table(machine));
// configure our base memory accessors
debug_cpu_configure_memory(*machine, *global->symtable);

View File

@ -97,7 +97,7 @@ public:
int m_index; // user reported index
UINT8 m_enabled; // enabled?
offs_t m_address; // execution address
parsed_expression m_condition; // condition
parsed_expression m_condition; // condition
astring m_action; // action
};

View File

@ -581,7 +581,7 @@ debug_view_expression::~debug_view_expression()
void debug_view_expression::set_context(symbol_table *context)
{
m_parsed.set_symbols((context != NULL) ? context : debug_cpu_get_global_symtable(&m_machine));
m_parsed.set_symbols((context != NULL) ? context : debug_cpu_get_global_symtable(&m_machine));
m_dirty = true;
}

View File

@ -1,7 +1,7 @@
/***************************************************************************
express.c
Generic expressions engine.
****************************************************************************
@ -37,24 +37,24 @@
****************************************************************************
Operator precedence
===================
0x0000 ( )
0x0001 ++ (postfix), -- (postfix)
0x0002 ++ (prefix), -- (prefix), ~, !, - (unary), + (unary), b@, w@, d@, q@
0x0003 *, /, %
0x0004 + -
0x0005 << >>
0x0006 < <= > >=
0x0007 == !=
0x0008 &
0x0009 ^
0x000a |
0x000b &&
0x000c ||
0x000d = *= /= %= += -= <<= >>= &= |= ^=
0x000e ,
0x000f func()
Operator precedence
===================
0x0000 ( )
0x0001 ++ (postfix), -- (postfix)
0x0002 ++ (prefix), -- (prefix), ~, !, - (unary), + (unary), b@, w@, d@, q@
0x0003 *, /, %
0x0004 + -
0x0005 << >>
0x0006 < <= > >=
0x0007 == !=
0x0008 &
0x0009 ^
0x000a |
0x000b &&
0x000c ||
0x000d = *= /= %= += -= <<= >>= &= |= ^=
0x000e ,
0x000f func()
***************************************************************************/
@ -155,9 +155,9 @@ private:
static UINT64 internal_getter(symbol_table &table, void *symref);
static void internal_setter(symbol_table &table, void *symref, UINT64 value);
// internal state
symbol_table::getter_func m_getter;
symbol_table::setter_func m_setter;
// internal state
symbol_table::getter_func m_getter;
symbol_table::setter_func m_setter;
UINT64 m_value;
};
@ -191,7 +191,7 @@ private:
//**************************************************************************
//-------------------------------------------------
// code_string - return a friendly string for a
// code_string - return a friendly string for a
// given expression error
//-------------------------------------------------
@ -321,7 +321,7 @@ void integer_symbol_entry::set_value(UINT64 newvalue)
//-------------------------------------------------
// internal_getter - internal helper for
// internal_getter - internal helper for
// returning the value of a variable
//-------------------------------------------------
@ -425,7 +425,7 @@ symbol_table::symbol_table(void *globalref, symbol_table *parent)
//-------------------------------------------------
// add - add a new UINT64 pointer symbol
// add - add a new UINT64 pointer symbol
//-------------------------------------------------
void symbol_table::configure_memory(void *param, valid_func valid, read_func read, write_func write)
@ -438,7 +438,7 @@ void symbol_table::configure_memory(void *param, valid_func valid, read_func rea
//-------------------------------------------------
// add - add a new UINT64 pointer symbol
// add - add a new UINT64 pointer symbol
//-------------------------------------------------
void symbol_table::add(const char *name, read_write rw, UINT64 *ptr)
@ -449,7 +449,7 @@ void symbol_table::add(const char *name, read_write rw, UINT64 *ptr)
//-------------------------------------------------
// add - add a new value symbol
// add - add a new value symbol
//-------------------------------------------------
void symbol_table::add(const char *name, UINT64 value)
@ -460,7 +460,7 @@ void symbol_table::add(const char *name, UINT64 value)
//-------------------------------------------------
// add - add a new register symbol
// add - add a new register symbol
//-------------------------------------------------
void symbol_table::add(const char *name, void *ref, getter_func getter, setter_func setter)
@ -471,7 +471,7 @@ void symbol_table::add(const char *name, void *ref, getter_func getter, setter_f
//-------------------------------------------------
// add - add a new function symbol
// add - add a new function symbol
//-------------------------------------------------
void symbol_table::add(const char *name, void *ref, int minparams, int maxparams, execute_func execute)
@ -500,7 +500,7 @@ symbol_entry *symbol_table::find_deep(const char *symbol)
//-------------------------------------------------
// value - return the value of a symbol
// value - return the value of a symbol
//-------------------------------------------------
UINT64 symbol_table::value(const char *symbol)
@ -511,7 +511,7 @@ UINT64 symbol_table::value(const char *symbol)
//-------------------------------------------------
// set_value - set the value of a symbol
// set_value - set the value of a symbol
//-------------------------------------------------
void symbol_table::set_value(const char *symbol, UINT64 value)
@ -593,7 +593,7 @@ parsed_expression::parsed_expression(symbol_table *symtable, const char *express
// if we got an expression parse it
if (expression != NULL)
parse(expression);
// if we get a result pointer, execute it
if (result != NULL)
*result = execute();
@ -956,7 +956,7 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
// if we have an 0x prefix, we must be a hex value
if (buffer[0] == '0' && buffer[1] == 'x')
return parse_number(token, &buffer[2], 16, expression_error::INVALID_NUMBER);
// if we have a # prefix, we must be a decimal value
if (buffer[0] == '#')
return parse_number(token, &buffer[1], 10, expression_error::INVALID_NUMBER);
@ -964,7 +964,7 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
// if we have a $ prefix, we are a hex value
if (buffer[0] == '$')
return parse_number(token, &buffer[1], 16, expression_error::INVALID_NUMBER);
// check for a symbol match
symbol_entry *symbol = m_symtable->find_deep(buffer);
if (symbol != NULL)
@ -979,7 +979,7 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
}
return;
}
// attempt to parse as a number in the default base
parse_number(token, buffer, DEFAULT_BASE, expression_error::UNKNOWN_SYMBOL);
}
@ -1006,7 +1006,7 @@ void parsed_expression::parse_number(parse_token &token, const char *string, int
int digit = ptr - numbers;
if (digit >= base)
break;
// shift previous digits up and add in new digit
value = (value * (UINT64)base) + digit;
string++;
@ -1223,7 +1223,7 @@ void parsed_expression::normalize_operator(parse_token *prevtoken, parse_token &
if (peek == NULL)
break;
// if we hit an execute function operator, or else a left parenthesis that is
// if we hit an execute function operator, or else a left parenthesis that is
// already tagged, then tag us as well
if (peek->is_operator(TVL_EXECUTEFUNC) || (peek->is_operator(TVL_LPAREN) && peek->is_function_separator()))
{
@ -1252,7 +1252,7 @@ void parsed_expression::infix_to_postfix()
{
// pre-determine our next token
next = token->next();
// if the character is an operand, append it to the result string
if (token->is_number() || token->is_symbol() || token->is_string())
m_tokenlist.append(*token);
@ -1686,7 +1686,7 @@ UINT64 parsed_expression::execute_tokens()
//-------------------------------------------------
parsed_expression::parse_token::parse_token(int offset)
: m_next(NULL),
: m_next(NULL),
m_type(INVALID),
m_offset(offset),
m_value(0),
@ -1726,7 +1726,7 @@ inline void parsed_expression::parse_token::set_lval_value(symbol_table *table,
// set the value of a symbol
if (is_symbol())
m_symbol->set_value(value);
// or set the value via the memory callbacks
else if (is_memory() && table != NULL)
table->set_memory_value(m_string, memory_space(), address(), 1 << memory_size(), value);

View File

@ -114,7 +114,7 @@ public:
// operators
operator error_code() const { return m_code; }
// getters
error_code code() const { return m_code; }
int offset() const { return m_offset; }
@ -134,7 +134,7 @@ class symbol_entry
{
friend class tagged_list<symbol_entry>;
protected:
protected:
// symbol types
enum symbol_type
{
@ -150,10 +150,10 @@ public:
// getters
symbol_entry *next() const { return m_next; }
const char *name() const { return m_name; }
// type checking
bool is_function() const { return (m_type == SMT_FUNCTION); }
// symbol access
virtual bool is_lval() const = 0;
virtual UINT64 value() const = 0;
@ -179,7 +179,7 @@ public:
// callback functions for getting/setting a symbol value
typedef UINT64 (*getter_func)(symbol_table &table, void *symref);
typedef void (*setter_func)(symbol_table &table, void *symref, UINT64 value);
// callback functions for function execution
typedef UINT64 (*execute_func)(symbol_table &table, void *symref, int numparams, const UINT64 *paramlist);
@ -196,15 +196,15 @@ public:
// construction/destruction
symbol_table(void *globalref, symbol_table *parent = NULL);
// getters
symbol_entry *first() const { return m_symlist.first(); }
symbol_table *parent() const { return m_parent; }
void *globalref() const { return m_globalref; }
// setters
void configure_memory(void *param, valid_func valid, read_func read, write_func write);
// symbol access
void add(const char *name, read_write rw, UINT64 *ptr = NULL);
void add(const char *name, UINT64 constvalue);
@ -212,7 +212,7 @@ public:
void add(const char *name, void *ref, int minparams, int maxparams, execute_func execute);
symbol_entry *find(const char *name) { return m_symlist.find(name); }
symbol_entry *find_deep(const char *name);
// value getter/setter
UINT64 value(const char *symbol);
void set_value(const char *symbol, UINT64 value);
@ -253,7 +253,7 @@ public:
const char *original_string() const { return m_original_string; }
symbol_table *symbols() const { return m_symtable; }
// setters
// setters
void set_symbols(symbol_table *symtable) { m_symtable = symtable; }
// execution
@ -265,7 +265,7 @@ private:
class parse_token
{
friend class simple_list<parse_token>;
// operator flags
enum
{
@ -297,7 +297,7 @@ private:
public:
// construction/destruction
parse_token(int offset = 0);
// getters
parse_token *next() const { return m_next; }
int offset() const { return m_offset; }
@ -328,7 +328,7 @@ private:
parse_token &configure_string(const char *string) { m_type = STRING; m_string = string; return *this; }
parse_token &configure_memory(UINT32 address, parse_token &memoryat) { m_type = MEMORY; m_value = address; m_flags = memoryat.m_flags; m_string = memoryat.m_string; return *this; }
parse_token &configure_symbol(symbol_entry &symbol) { m_type = SYMBOL; m_symbol = &symbol; return *this; }
parse_token &configure_operator(UINT8 optype, UINT8 precedence)
parse_token &configure_operator(UINT8 optype, UINT8 precedence)
{ m_type = OPERATOR; m_flags = ((optype << TIN_OPTYPE_SHIFT) & TIN_OPTYPE_MASK) | ((precedence << TIN_PRECEDENCE_SHIFT) & TIN_PRECEDENCE_MASK); return *this; }
parse_token &set_function_separator() { assert(m_type == OPERATOR); m_flags |= TIN_FUNCTION_MASK; return *this; }
@ -336,7 +336,7 @@ private:
parse_token &set_memory_space(expression_space space) { assert(m_type == OPERATOR || m_type == MEMORY); m_flags = (m_flags & ~TIN_MEMORY_SPACE_MASK) | ((space << TIN_MEMORY_SPACE_SHIFT) & TIN_MEMORY_SPACE_MASK); return *this; }
parse_token &set_memory_size(int log2ofbits) { assert(m_type == OPERATOR || m_type == MEMORY); m_flags = (m_flags & ~TIN_MEMORY_SIZE_MASK) | ((log2ofbits << TIN_MEMORY_SIZE_SHIFT) & TIN_MEMORY_SIZE_MASK); return *this; }
parse_token &set_memory_source(const char *string) { assert(m_type == OPERATOR || m_type == MEMORY); m_string = string; return *this; }
// access
UINT64 get_lval_value(symbol_table *symtable);
void set_lval_value(symbol_table *symtable, UINT64 value);
@ -351,22 +351,22 @@ private:
const char * m_string; // associated string
symbol_entry * m_symbol; // symbol pointer
};
// an expression_string holds an indexed string parsed from the expression
class expression_string
{
friend class simple_list<expression_string>;
public:
// construction/destruction
expression_string(const char *string, int length = 0)
: m_next(NULL),
m_string(string, (length == 0) ? strlen(string) : length) { }
// operators
operator const char *() { return m_string; }
operator const char *() const { return m_string; }
private:
// internal state
expression_string * m_next; // next string in list
@ -376,7 +376,7 @@ private:
// internal helpers
void copy(const parsed_expression &src);
void print_tokens(FILE *out);
// parsing helpers
void parse_string_into_tokens();
void parse_symbol_or_number(parse_token &token, const char *&string);

View File

@ -741,7 +741,7 @@ public:
// textures
render_texture *texture_alloc(texture_scaler_func scaler = NULL, void *param = NULL);
void texture_free(render_texture *texture);
// fonts
render_font *font_alloc(const char *filename = NULL);
void font_free(render_font *font);

View File

@ -79,7 +79,7 @@ inline const char *next_line(const char *ptr)
inline render_font::glyph &render_font::get_char(unicode_char chnum)
{
static glyph dummy_glyph;
// grab the table; if none, return the dummy character
glyph *glyphtable = m_glyphs[chnum / 256];
if (glyphtable == NULL && m_format == FF_OSD)
@ -117,7 +117,7 @@ render_font::render_font(render_manager &manager, const char *filename)
m_osdfont(NULL)
{
memset(m_glyphs, 0, sizeof(m_glyphs));
// if this is an OSD font, we're done
if (filename != NULL)
{
@ -129,7 +129,7 @@ render_font::render_font(render_manager &manager, const char *filename)
return;
}
}
// if the filename is 'default' default to 'ui.bdf' for backwards compatibility
if (filename != NULL && mame_stricmp(filename, "default") == 0)
filename = "ui.bdf";
@ -173,7 +173,7 @@ render_font::~render_font()
// free the raw data and the size itself
auto_free(&m_manager.machine(), m_rawdata);
// release the OSD font
if (m_osdfont != NULL)
m_manager.machine().osd().font_close(m_osdfont);
@ -181,7 +181,7 @@ render_font::~render_font()
//-------------------------------------------------
// char_expand - expand the raw data for a
// char_expand - expand the raw data for a
// character into a bitmap
//-------------------------------------------------
@ -193,7 +193,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
// we set bmwidth to -1 if we've previously queried and failed
if (gl.bmwidth == -1)
return;
// attempt to get the font bitmap; if we fail, set bmwidth to -1
gl.bitmap = m_manager.machine().osd().font_get_bitmap(m_osdfont, chnum, gl.width, gl.xoffs, gl.yoffs);
if (gl.bitmap == NULL)
@ -206,7 +206,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
gl.bmwidth = gl.bitmap->width;
gl.bmheight = gl.bitmap->height;
}
// other formats need to parse their data
else
{
@ -282,8 +282,8 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
//-------------------------------------------------
// get_char_texture_and_bounds - return the
// texture for a character and compute the
// get_char_texture_and_bounds - return the
// texture for a character and compute the
// bounds of the final bitmap
//-------------------------------------------------
@ -351,7 +351,7 @@ void render_font::get_scaled_bitmap_and_bounds(bitmap_t &dest, float height, flo
//-------------------------------------------------
// char_width - return the width of a character
// char_width - return the width of a character
// at the given height
//-------------------------------------------------
@ -362,7 +362,7 @@ float render_font::char_width(float height, float aspect, unicode_char ch)
//-------------------------------------------------
// string_width - return the width of a string
// string_width - return the width of a string
// at the given height
//-------------------------------------------------
@ -379,7 +379,7 @@ float render_font::string_width(float height, float aspect, const char *string)
//-------------------------------------------------
// utf8string_width - return the width of a
// utf8string_width - return the width of a
// UTF8-encoded string at the given height
//-------------------------------------------------
@ -406,9 +406,9 @@ float render_font::utf8string_width(float height, float aspect, const char *utf8
//-------------------------------------------------
// load_cached_bdf - attempt to load a cached
// version of the BDF font 'filename'; if that
// fails, fall back on the regular BDF loader
// load_cached_bdf - attempt to load a cached
// version of the BDF font 'filename'; if that
// fails, fall back on the regular BDF loader
// and create a new cached version
//-------------------------------------------------
@ -431,7 +431,7 @@ bool render_font::load_cached_bdf(const char *filename)
mame_fclose(file);
return false;
}
// has the chunk
UINT32 hash = crc32(0, (const UINT8 *)data, bytes) ^ (UINT32)m_rawsize;
@ -456,7 +456,7 @@ bool render_font::load_cached_bdf(const char *filename)
return true;
}
}
// read in the rest of the font
if (bytes < m_rawsize)
{

View File

@ -55,7 +55,7 @@ class render_font
{
friend class render_manager;
friend resource_pool_object<render_font>::~resource_pool_object();
// construction/destruction
render_font(render_manager &manager, const char *filename);
virtual ~render_font();
@ -63,7 +63,7 @@ class render_font
public:
// getters
render_manager &manager() const { return m_manager; }
// size queries
INT32 pixel_height() const { return m_height; }
float char_width(float height, float aspect, unicode_char ch);

View File

@ -4,7 +4,7 @@
Apple Sound Chip (ASC) 344S0063
Enhanced Apple Sound Chip (EASC) 343S1063
Emulation by R. Belmont
Registers:
@ -212,7 +212,7 @@ void asc_device::stream_generate(stream_sample_t **inputs, stream_sample_t **out
m_fifo_a_rdptr &= 0x3ff;
m_fifo_cap_a--;
}
if (m_fifo_cap_b)
{
m_fifo_b_rdptr++;
@ -283,7 +283,7 @@ void asc_device::stream_generate(stream_sample_t **inputs, stream_sample_t **out
INT8 smpl;
mixL = mixR = 0;
// update channel pointers
for (ch = 0; ch < 4; ch++)
{
@ -309,7 +309,7 @@ void asc_device::stream_generate(stream_sample_t **inputs, stream_sample_t **out
break;
}
// printf("rdA %04x rdB %04x wrA %04x wrB %04x (capA %04x B %04x)\n", m_fifo_a_rdptr, m_fifo_b_rdptr, m_fifo_a_wrptr, m_fifo_b_wrptr, m_fifo_cap_a, m_fifo_cap_b);
// printf("rdA %04x rdB %04x wrA %04x wrB %04x (capA %04x B %04x)\n", m_fifo_a_rdptr, m_fifo_b_rdptr, m_fifo_a_wrptr, m_fifo_b_wrptr, m_fifo_cap_a, m_fifo_cap_b);
}
//-------------------------------------------------
@ -320,7 +320,7 @@ READ8_MEMBER( asc_device::read )
{
UINT8 rv;
// printf("ASC: read at %x\n", offset);
// printf("ASC: read at %x\n", offset);
// not sure what actually happens when the CPU reads the FIFO...
if (offset < 0x400)
@ -394,7 +394,7 @@ READ8_MEMBER( asc_device::read )
rv = m_regs[R_FIFOSTAT-0x800];
}
// printf("Read FIFO stat = %02x\n", rv);
// printf("Read FIFO stat = %02x\n", rv);
// reading this register clears all bits
m_regs[R_FIFOSTAT-0x800] = 0;
@ -454,7 +454,7 @@ READ8_MEMBER( asc_device::read )
WRITE8_MEMBER( asc_device::write )
{
// printf("ASC: write %02x to %x\n", data, offset);
// printf("ASC: write %02x to %x\n", data, offset);
if (offset < 0x400)
{
@ -488,7 +488,7 @@ WRITE8_MEMBER( asc_device::write )
}
m_fifo_b_wrptr &= 0x3ff;
}
}
else
{
m_fifo_b[offset-0x400] = data;
@ -496,7 +496,7 @@ WRITE8_MEMBER( asc_device::write )
}
else
{
// printf("ASC: %02x to %x (was %x)\n", data, offset, m_regs[offset-0x800]);
// printf("ASC: %02x to %x (was %x)\n", data, offset, m_regs[offset-0x800]);
stream_update(m_stream);
switch (offset)
@ -531,10 +531,10 @@ WRITE8_MEMBER( asc_device::write )
break;
case R_WTCONTROL:
// printf("One-shot wavetable %02x\n", data);
// printf("One-shot wavetable %02x\n", data);
break;
case 0x811:
case 0x811:
m_phase[0] &= 0x00ffff;
m_phase[0] |= data<<16;
break;
@ -549,7 +549,7 @@ WRITE8_MEMBER( asc_device::write )
m_phase[0] |= data;
break;
case 0x815:
case 0x815:
m_incr[0] &= 0x00ffff;
m_incr[0] |= data<<16;
break;
@ -564,7 +564,7 @@ WRITE8_MEMBER( asc_device::write )
m_incr[0] |= data;
break;
case 0x819:
case 0x819:
m_phase[1] &= 0x00ffff;
m_phase[1] |= data<<16;
break;
@ -579,7 +579,7 @@ WRITE8_MEMBER( asc_device::write )
m_phase[1] |= data;
break;
case 0x81d:
case 0x81d:
m_incr[1] &= 0x00ffff;
m_incr[1] |= data<<16;
break;
@ -594,7 +594,7 @@ WRITE8_MEMBER( asc_device::write )
m_incr[1] |= data;
break;
case 0x821:
case 0x821:
m_phase[2] &= 0x00ffff;
m_phase[2] |= data<<16;
break;
@ -609,7 +609,7 @@ WRITE8_MEMBER( asc_device::write )
m_phase[2] |= data;
break;
case 0x825:
case 0x825:
m_incr[2] &= 0x00ffff;
m_incr[2] |= data<<16;
break;
@ -624,7 +624,7 @@ WRITE8_MEMBER( asc_device::write )
m_incr[2] |= data;
break;
case 0x829:
case 0x829:
m_phase[3] &= 0x00ffff;
m_phase[3] |= data<<16;
break;
@ -639,7 +639,7 @@ WRITE8_MEMBER( asc_device::write )
m_phase[3] |= data;
break;
case 0x82d:
case 0x82d:
m_incr[3] &= 0x00ffff;
m_incr[3] |= data<<16;
break;

View File

@ -547,7 +547,7 @@ DISCRETE_STEP(dsd_555_mstbl)
if (UNEXPECTED(DSD_555_MSTBL__C == 0))
{
/* The trigger voltage goes high because the cap circuit is open.
* and the cap discharges */
* and the cap discharges */
v_cap = info->v_pos; /* needed for cap output type */
context->cap_voltage = 0;

View File

@ -2300,7 +2300,7 @@ DISCRETE_STEP(dst_xtime_and)
//case XTIME__IN0_0__IN1_0__IN0_X__IN1_NOX:
//case XTIME__IN0_0__IN1_1__IN0_NOX__IN1_X:
//case XTIME__IN0_1__IN1_0__IN0_X__IN1_NOX:
// break;
// break;
case XTIME__IN0_1__IN1_1__IN0_NOX__IN1_NOX:
out = 1;
@ -2308,52 +2308,52 @@ DISCRETE_STEP(dst_xtime_and)
case XTIME__IN0_0__IN1_1__IN0_X__IN1_NOX:
/*
* in0 1 ------
* 0 -------
* ...^....^...
*
* in1 1 -------------
* 0
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 ------
* 0 -------
* ...^....^...
*
* in1 1 -------------
* 0
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
x_time = x_time0;
break;
case XTIME__IN0_1__IN1_0__IN0_NOX__IN1_X:
/*
* in0 1 -------------
* 0
* ...^....^...
*
* in1 1 ------
* 0 -------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 -------------
* 0
* ...^....^...
*
* in1 1 ------
* 0 -------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
x_time = x_time1;
break;
case XTIME__IN0_0__IN1_0__IN0_X__IN1_X:
/*
* in0 1 ----- -------
* 0 -------- ------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ------ --------
* ...^....^... ...^....^...
*
* out 1 ----- -----
* 0 ------- -------
* ...^....^... ...^....^...
*/
* in0 1 ----- -------
* 0 -------- ------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ------ --------
* ...^....^... ...^....^...
*
* out 1 ----- -----
* 0 ------- -------
* ...^....^... ...^....^...
*/
// use x_time of input that went to 0 first/longer
if (x_time0 >= x_time1)
x_time = x_time0;
@ -2363,92 +2363,92 @@ DISCRETE_STEP(dst_xtime_and)
case XTIME__IN0_0__IN1_1__IN0_X__IN1_X:
/*
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 --
* 0 ----- ----- ------------
* ...^....^... ...^....^...
*/
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 --
* 0 ----- ----- ------------
* ...^....^... ...^....^...
*/
// may have went high for a bit in this cycle
//if (x_time0 < x_time1)
// x_time = time1 - x_time0;
// x_time = time1 - x_time0;
break;
case XTIME__IN0_1__IN1_0__IN0_X__IN1_X:
/*
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 --
* 0 ----- ----- ------------
* ...^....^... ...^....^...
*/
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 --
* 0 ----- ----- ------------
* ...^....^... ...^....^...
*/
// may have went high for a bit in this cycle
//if (x_time0 > x_time1)
// x_time = x_time0 - x_time1;
// x_time = x_time0 - x_time1;
break;
case XTIME__IN0_1__IN1_1__IN0_NOX__IN1_X:
/*
* in0 1 ------------
* 0
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 ------------
* 0
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
out = 1;
x_time = x_time1;
break;
case XTIME__IN0_1__IN1_1__IN0_X__IN1_NOX:
/*
* in1 0 ------
* 0 ------
* ...^....^...
*
* in1 1 ------------
* 0
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in1 0 ------
* 0 ------
* ...^....^...
*
* in1 1 ------------
* 0
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
out = 1;
x_time = x_time0;
break;
case XTIME__IN0_1__IN1_1__IN0_X__IN1_X:
/*
* in0 1 ------ --------
* 0 ------ ----
* ...^....^... ...^....^...
*
* in1 1 -------- ------
* 0 ---- ------
* ...^....^... ...^....^...
*
* out 1 ------ ------
* 0 ------ ------
* ...^....^... ...^....^...
*/
* in0 1 ------ --------
* 0 ------ ----
* ...^....^... ...^....^...
*
* in1 1 -------- ------
* 0 ---- ------
* ...^....^... ...^....^...
*
* out 1 ------ ------
* 0 ------ ------
* ...^....^... ...^....^...
*/
out = 1;
if (x_time0 < x_time1)
x_time = x_time0;
@ -2520,7 +2520,7 @@ DISCRETE_STEP(dst_xtime_or)
//case XTIME__IN0_0__IN1_1__IN0_X__IN1_NOX:
//case XTIME__IN0_1__IN1_1__IN0_NOX__IN1_X:
//case XTIME__IN0_1__IN1_1__IN0_X__IN1_NOX:
// break;
// break;
case XTIME__IN0_0__IN1_0__IN0_NOX__IN1_NOX:
out = 0;
@ -2528,54 +2528,54 @@ DISCRETE_STEP(dst_xtime_or)
case XTIME__IN0_0__IN1_0__IN0_NOX__IN1_X:
/*
* in0 1
* 0 -------------
* ...^....^...
*
* in1 1 ------
* 0 -------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1
* 0 -------------
* ...^....^...
*
* in1 1 ------
* 0 -------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
out = 0;
x_time = x_time1;
break;
case XTIME__IN0_0__IN1_0__IN0_X__IN1_NOX:
/*
* in0 1 ------
* 0 -------
* ...^....^...
*
* in1 1
* 0 -------------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 ------
* 0 -------
* ...^....^...
*
* in1 1
* 0 -------------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
out = 0;
x_time = x_time0;
break;
case XTIME__IN0_0__IN1_0__IN0_X__IN1_X:
/*
* in0 1 ----- -------
* 0 -------- ------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ------ --------
* ...^....^... ...^....^...
*
* out 1 ------- -------
* 0 ----- -----
* ...^....^... ...^....^...
*/
* in0 1 ----- -------
* 0 -------- ------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ------ --------
* ...^....^... ...^....^...
*
* out 1 ------- -------
* 0 ----- -----
* ...^....^... ...^....^...
*/
out = 0;
// use x_time of input that was 1 last/longer
// this means at 0 for less x_time
@ -2587,94 +2587,94 @@ DISCRETE_STEP(dst_xtime_or)
case XTIME__IN0_0__IN1_1__IN0_NOX__IN1_X:
/*
* in0 1
* 0 ------------
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1
* 0 ------------
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
x_time = x_time1;
break;
case XTIME__IN0_1__IN1_0__IN0_X__IN1_NOX:
/*
* in0 1 ------
* 0 ------
* ...^....^...
*
* in1 1
* 0 ------------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 ------
* 0 ------
* ...^....^...
*
* in1 1
* 0 ------------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
x_time = x_time0;
break;
case XTIME__IN0_0__IN1_1__IN0_X__IN1_X:
/*
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 ------------ ----- -----
* 0 --
* ...^....^... ...^....^...
*/
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 ------------ ----- -----
* 0 --
* ...^....^... ...^....^...
*/
// if (x_time0 > x_time1)
/* Not sure if it is better to use 1
* or the total energy which would smear the switch points together.
* Let's try just using 1 */
* or the total energy which would smear the switch points together.
* Let's try just using 1 */
//x_time = xtime_0 - xtime_1;
break;
case XTIME__IN0_1__IN1_0__IN0_X__IN1_X:
/*
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 ------------ ----- -----
* 0 --
* ...^....^... ...^....^...
*/
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 ------------ ----- -----
* 0 --
* ...^....^... ...^....^...
*/
//if (x_time0 < x_time1)
/* Not sure if it is better to use 1
* or the total energy which would smear the switch points together.
* Let's try just using 1 */
* or the total energy which would smear the switch points together.
* Let's try just using 1 */
//x_time = xtime_1 - xtime_0;
break;
case XTIME__IN0_1__IN1_1__IN0_X__IN1_X:
/*
* in0 1 ------ --------
* 0 ------ ----
* ...^....^... ...^....^...
*
* in1 1 -------- ------
* 0 ---- ------
* ...^....^... ...^....^...
*
* out 1 -------- --------
* 0 ---- ----
* ...^....^... ...^....^...
*/
* in0 1 ------ --------
* 0 ------ ----
* ...^....^... ...^....^...
*
* in1 1 -------- ------
* 0 ---- ------
* ...^....^... ...^....^...
*
* out 1 -------- --------
* 0 ---- ----
* ...^....^... ...^....^...
*/
if (x_time0 > x_time1)
x_time = x_time0;
else
@ -2740,7 +2740,7 @@ DISCRETE_STEP(dst_xtime_xor)
// these are all 1
//case XTIME__IN0_0__IN1_1__IN0_NOX__IN1_NOX:
//case XTIME__IN0_1__IN1_0__IN0_NOX__IN1_NOX:
// break;
// break;
case XTIME__IN0_1__IN1_1__IN0_NOX__IN1_NOX:
case XTIME__IN0_0__IN1_0__IN0_NOX__IN1_NOX:
@ -2749,196 +2749,196 @@ DISCRETE_STEP(dst_xtime_xor)
case XTIME__IN0_1__IN1_0__IN0_X__IN1_NOX:
/*
* in0 1 ------
* 0 ------
* ...^....^...
*
* in1 1
* 0 ------------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 ------
* 0 ------
* ...^....^...
*
* in1 1
* 0 ------------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
case XTIME__IN0_0__IN1_1__IN0_X__IN1_NOX:
/*
* in0 1 ------
* 0 -------
* ...^....^...
*
* in1 1 -------------
* 0
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 ------
* 0 -------
* ...^....^...
*
* in1 1 -------------
* 0
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
x_time = x_time0;
break;
case XTIME__IN0_0__IN1_1__IN0_NOX__IN1_X:
/*
* in0 1
* 0 ------------
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1
* 0 ------------
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
case XTIME__IN0_1__IN1_0__IN0_NOX__IN1_X:
/*
* in0 1 -------------
* 0
* ...^....^...
*
* in1 1 ------
* 0 -------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 -------------
* 0
* ...^....^...
*
* in1 1 ------
* 0 -------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
x_time = x_time1;
break;
case XTIME__IN0_0__IN1_0__IN0_X__IN1_NOX:
/*
* in0 1 ------
* 0 ------
* ...^....^...
*
* in1 1
* 0 ------------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 ------
* 0 ------
* ...^....^...
*
* in1 1
* 0 ------------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
case XTIME__IN0_1__IN1_1__IN0_X__IN1_NOX:
/*
* in1 0 ------
* 0 ------
* ...^....^...
*
* in1 1 ------------
* 0
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in1 0 ------
* 0 ------
* ...^....^...
*
* in1 1 ------------
* 0
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
out = 0;
x_time = x_time0;
break;
case XTIME__IN0_0__IN1_0__IN0_NOX__IN1_X:
/*
* in0 1
* 0 ------------
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1
* 0 ------------
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
case XTIME__IN0_1__IN1_1__IN0_NOX__IN1_X:
/*
* in0 1 ------------
* 0
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
* in0 1 ------------
* 0
* ...^....^...
*
* in1 1 ------
* 0 ------
* ...^....^...
*
* out 1 ------
* 0 ------
* ...^....^...
*/
out = 0;
x_time = x_time1;
break;
case XTIME__IN0_0__IN1_0__IN0_X__IN1_X:
/*
* in0 1 ----- -------
* 0 ------- -----
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 -- --
* 0 ----- ----- ----- -----
* ...^....^... ...^....^...
*/
* in0 1 ----- -------
* 0 ------- -----
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 -- --
* 0 ----- ----- ----- -----
* ...^....^... ...^....^...
*/
case XTIME__IN0_1__IN1_1__IN0_X__IN1_X:
/*
* in0 1 ------ --------
* 0 ------ ----
* ...^....^... ...^....^...
*
* in1 1 -------- ------
* 0 ---- ------
* ...^....^... ...^....^...
*
* out 1 -- --
* 0 ---- ------ ---- ------
* ...^....^... ...^....^...
*/
* in0 1 ------ --------
* 0 ------ ----
* ...^....^... ...^....^...
*
* in1 1 -------- ------
* 0 ---- ------
* ...^....^... ...^....^...
*
* out 1 -- --
* 0 ---- ------ ---- ------
* ...^....^... ...^....^...
*/
out = 0;
/* Not sure if it is better to use 0
* or the total energy which would smear the switch points together.
* Let's try just using 0 */
* or the total energy which would smear the switch points together.
* Let's try just using 0 */
// x_time = abs(x_time0 - x_time1);
break;
case XTIME__IN0_0__IN1_1__IN0_X__IN1_X:
/*
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 ----- ----- ----- -----
* 0 -- --
* ...^....^... ...^....^...
*/
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 ----- ----- ----- -----
* 0 -- --
* ...^....^... ...^....^...
*/
case XTIME__IN0_1__IN1_0__IN0_X__IN1_X:
/*
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 ----- ----- ----- -----
* 0 -- --
* ...^....^... ...^....^...
*/
* in0 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* in1 1 ------- -----
* 0 ----- -------
* ...^....^... ...^....^...
*
* out 1 ----- ----- ----- -----
* 0 -- --
* ...^....^... ...^....^...
*/
/* Not sure if it is better to use 1
* or the total energy which would smear the switch points together.
* Let's try just using 1 */
* or the total energy which would smear the switch points together.
* Let's try just using 1 */
// x_time = 1.0 - abs(x_time0 - x_time1);
break;
}

View File

@ -68,16 +68,16 @@
#define UTF8_MULTIPLY "\xc3\x97" /* multiplication symbol */
#define UTF8_DEGREES "\xc2\xb0" /* degrees symbol */
#define a_RING "\xc3\xa5" /* small a with a ring */
#define a_UMLAUT "\xc3\xa4" /* small a with an umlaut */
#define o_UMLAUT "\xc3\xb6" /* small o with an umlaut */
#define u_UMLAUT "\xc3\xbc" /* small u with an umlaut */
#define a_RING "\xc3\xa5" /* small a with a ring */
#define a_UMLAUT "\xc3\xa4" /* small a with an umlaut */
#define o_UMLAUT "\xc3\xb6" /* small o with an umlaut */
#define u_UMLAUT "\xc3\xbc" /* small u with an umlaut */
#define e_ACUTE "\xc3\xa9" /* small e with an acute */
#define A_RING "\xc3\x85" /* capital A with a ring */
#define A_UMLAUT "\xc3\x84" /* capital A with an umlaut */
#define O_UMLAUT "\xc3\x96" /* capital O with an umlaut */
#define U_UMLAUT "\xc3\x9c" /* capital U with an umlaut */
#define A_RING "\xc3\x85" /* capital A with a ring */
#define A_UMLAUT "\xc3\x84" /* capital A with an umlaut */
#define O_UMLAUT "\xc3\x96" /* capital O with an umlaut */
#define U_UMLAUT "\xc3\x9c" /* capital U with an umlaut */
#define E_ACUTE "\xc3\x89" /* capital E with an acute */
#define UTF8_LEFT "\xe2\x86\x90" /* cursor left */

View File

@ -184,7 +184,7 @@ static const discrete_555_cc_desc copsnrob_motor01_555cc =
DISC_555_OUT_COUNT_R | DISCRETE_555_CC_TO_DISCHARGE_PIN,
5, /* v_pos */
DEFAULT_555_CC_SOURCE,
1, /* v_out_high - ignored */
1, /* v_out_high - ignored */
0.6 /* v_cc_junction */
};
@ -202,7 +202,7 @@ static const discrete_555_cc_desc copsnrob_motor01_555cc =
#define COPSNROB_MOTOR01(_output, _input, _num) \
/* simulate the RC connected to the transistor with a DAC */ \
DISCRETE_DAC_R1(COPSNROB_MOTOR01_NODE(_num, 0), \
_input, 4.2, &copsnrob_motor01_cc_dac) /* DATA; VDATA - TTL with light load */ \
_input, 4.2, &copsnrob_motor01_cc_dac) /* DATA; VDATA - TTL with light load */ \
DISCRETE_555_CC(COPSNROB_MOTOR01_NODE(_num, 1), /* IC F2, pin 10 from IC F3, pin 9 */ \
1, /* RESET - IC F3, pin 10 */ \
COPSNROB_MOTOR01_NODE(_num, 0), /* VIN */ \
@ -222,7 +222,7 @@ static const discrete_555_cc_desc copsnrob_motor01_555cc =
COPSNROB_MOTOR01_NODE(_num, 3), 2, /* INP1, INP2 */ \
"02&2/12*+") /* get bits ready for DAC */\
DISCRETE_DAC_R1(_output, \
COPSNROB_MOTOR01_NODE(_num, 4), 4.2, &copsnrob_motor01_out_dac) /* DATA; VDATA - TTL with light load */
COPSNROB_MOTOR01_NODE(_num, 4), 4.2, &copsnrob_motor01_out_dac) /* DATA; VDATA - TTL with light load */
/************************************************
* MOTOR0/1 Definition Start
@ -235,7 +235,7 @@ static const discrete_555_cc_desc copsnrob_motor01_555cc =
#define COPSNROB_MOTOR23(_output, _input, _num) \
/* simulate the RC connected to the 555 CV pin with a DAC */ \
DISCRETE_DAC_R1(COPSNROB_MOTOR23_NODE(_num, 0), \
_input, 4.2, &copsnrob_motor23_cv_dac) /* DATA; VDATA - TTL with light load */ \
_input, 4.2, &copsnrob_motor23_cv_dac) /* DATA; VDATA - TTL with light load */ \
DISCRETE_555_ASTABLE_CV(COPSNROB_MOTOR23_NODE(_num, 1), /* IC J2, pin 5 */ \
1, /* RESET */ \
COPSNROB_R64, COPSNROB_R42, COPSNROB_C24, \
@ -294,8 +294,8 @@ DISCRETE_STEP(copsnrob_custom_noise)
t_used += node->info->sample_time;
/* This clock will never run faster then the sample rate,
* so we do not bother to check.
*/
* so we do not bother to check.
*/
if (t_used > t1)
{
/* calculate the overshoot time */
@ -403,10 +403,10 @@ DISCRETE_STEP(copsnrob_zings_555_monostable)
/* From testing a real IC */
/* Trigger going low overides everything. It forces the FF/Output high.
* If Threshold is high, the output will still go high as long as trigger is low.
* The output will then go low when trigger rises above it's 1/3VCC value.
* If threshold is below it's 2/3VCC value, the output will remain high.
*/
* If Threshold is high, the output will still go high as long as trigger is low.
* The output will then go low when trigger rises above it's 1/3VCC value.
* If threshold is below it's 2/3VCC value, the output will remain high.
*/
if (ff_set)
{
flip_flop = 1;
@ -550,9 +550,9 @@ DISCRETE_STEP(copsnrob_zings_555_astable)
v_trigger = v_cap1 / 3;
/* This oscillator will never create a frequency greater then 1/2 the sample rate,
* so we won't worry about missing samples */
* so we won't worry about missing samples */
/* No need to optimize the charge circuit. It always charges/discharges to a voltage
* greater then it will ever reach. */
* greater then it will ever reach. */
if (flip_flop)
{
/* charge */
@ -619,15 +619,15 @@ static const discrete_custom_info copsnrob_zings_555_astable =
DISCRETE_SOUND_START(copsnrob)
/************************************************
* Input register mapping
************************************************/
* Input register mapping
************************************************/
DISCRETE_INPUT_LOGIC(COPSNROB_MOTOR0_INV)
DISCRETE_INPUT_LOGIC(COPSNROB_MOTOR1_INV)
DISCRETE_INPUT_LOGIC(COPSNROB_MOTOR2_INV)
DISCRETE_INPUT_LOGIC(COPSNROB_MOTOR3_INV)
/* !! DISABLED UNTIL ADDRESS IS FOUND !! */
// DISCRETE_INPUTX_LOGIC(COPSNROB_ZINGS_INV, 4, 0, 0)
// DISCRETE_INPUT_LOGIC(COPSNROB_FIRES_INV)
// DISCRETE_INPUTX_LOGIC(COPSNROB_ZINGS_INV, 4, 0, 0)
// DISCRETE_INPUT_LOGIC(COPSNROB_FIRES_INV)
DISCRETE_INPUT_NOT(COPSNROB_CRASH_INV) /* inverted for counter use */
DISCRETE_INPUT_LOGIC(COPSNROB_SCREECH_INV)
DISCRETE_INPUT_NOT(COPSNROB_AUDIO_ENABLE) /* IC A1, pins 2 & 12 */
@ -639,20 +639,20 @@ DISCRETE_SOUND_START(copsnrob)
DISCRETE_CONSTANT(COPSNROB_FIRES_INV, 4) /* data bit will be normally high */
/************************************************
* MOTOR0/1
************************************************/
* MOTOR0/1
************************************************/
COPSNROB_MOTOR01(COPSNROB_MOTOR0_SND, COPSNROB_MOTOR0_INV, 0)
COPSNROB_MOTOR01(COPSNROB_MOTOR1_SND, COPSNROB_MOTOR1_INV, 1)
/************************************************
* MOTOR2/3
************************************************/
* MOTOR2/3
************************************************/
COPSNROB_MOTOR23(COPSNROB_MOTOR2_SND, COPSNROB_MOTOR2_INV, 0)
COPSNROB_MOTOR23(COPSNROB_MOTOR3_SND, COPSNROB_MOTOR3_INV, 1)
/************************************************
* CRASH
************************************************/
* CRASH
************************************************/
DISCRETE_CUSTOM1(COPSNROB_NOISE_1, /* IC J2, pin 10 */
COPSNROB_2V, /* CLK */
&copsnrob_custom_noise)
@ -672,13 +672,13 @@ DISCRETE_SOUND_START(copsnrob)
&copsnrob_crash_dac)
/************************************************
* SCREECH
************************************************/
* SCREECH
************************************************/
DISCRETE_CONSTANT(COPSNROB_SCREECH_SND, 0)
/************************************************
* FZ (Fires, Zings)
************************************************/
* FZ (Fires, Zings)
************************************************/
DISCRETE_CUSTOM3(NODE_60, /* IC D3, pin 5 */
/* We can ignore R47 & R48 */
COPSNROB_ZINGS_INV, /* IC D3, pin 6 */
@ -699,8 +699,8 @@ DISCRETE_SOUND_START(copsnrob)
COPSNROB_R73 / COPSNROB_R26)
/************************************************
* MIXER
************************************************/
* MIXER
************************************************/
DISCRETE_MIXER5(NODE_90, /* IC B3, pin 3 */
COPSNROB_AUDIO_ENABLE, /* ENAB */
COPSNROB_MOTOR1_SND, COPSNROB_MOTOR0_SND, COPSNROB_FZ_SND, COPSNROB_SCREECH_SND, COPSNROB_CRASH_SND,

View File

@ -910,18 +910,18 @@ DISCRETE_TASK_START(1)
4.14, 0.151) /* INP0; INP1 (measured) */
/* Breadboarded measurements IC 5K, pin 7
D.R. Oct 2010
V Hz
0.151 3139
0.25 2883
0.5 2820
0.75 3336
1 3805
2 6498
3 9796
4 13440
4.14 13980
*/
D.R. Oct 2010
V Hz
0.151 3139
0.25 2883
0.5 2820
0.75 3336
1 3805
2 6498
3 9796
4 13440
4.14 13980
*/
DISCRETE_74LS624(NODE_113, /* IC 5K, pin 7 */
1, /* ENAB */
@ -942,18 +942,18 @@ DISCRETE_TASK_START(1)
0.135, 4.15) /* measured Low/High */
/* Breadboarded measurements IC 5K, pin 10
D.R. Oct 2010
V Hz
0.135 14450 - measured 74LS04 low
0.25 13320
0.5 12980
0.75 15150
1 17270
2 28230
3 41910
4 56950
4.15 59400 - measured 74LS04 high
*/
D.R. Oct 2010
V Hz
0.135 14450 - measured 74LS04 low
0.25 13320
0.5 12980
0.75 15150
1 17270
2 28230
3 41910
4 56950
4.15 59400 - measured 74LS04 high
*/
DISCRETE_74LS624(NODE_118, /* IC 5K, pin 10 */
1, /* ENAB */
@ -984,18 +984,18 @@ DISCRETE_TASK_START(2)
DISCRETE_MIXER2(NODE_13, 1, NODE_11, NODE_12, &dkongjr_s1_mixer_desc)
/* Breadboarded measurements IC 8L, pin 10
D.R. Oct 2010
V Hz
0.151 313
0.25 288
0.5 275
0.75 324
1 370
2 635
3 965
4 1325
4.14 1378
*/
D.R. Oct 2010
V Hz
0.151 313
0.25 288
0.5 275
0.75 324
1 370
2 635
3 965
4 1325
4.14 1378
*/
DISCRETE_74LS624(NODE_14, /* IC 8L, pin 10 */
1, /* ENAB */
@ -1015,8 +1015,8 @@ DISCRETE_TASK_START(2)
DISCRETE_TASK_END()
/************************************************
* SOUND2 - climbing
************************************************/
* SOUND2 - climbing
************************************************/
DISCRETE_TASK_START(1)
/* the noise source clock is a 74LS629 IC 7P, pin 10.
@ -1048,18 +1048,18 @@ DISCRETE_TASK_START(1)
0.134, 4.16) /* measured Low/High */
/* Breadboarded measurements IC 7P, pin 7
D.R. Oct 2010
V Hz
0.134 570
0.25 538
0.5 489
0.75 560
1 636
2 1003
3 1484
4 2016
4.16 2111
*/
D.R. Oct 2010
V Hz
0.134 570
0.25 538
0.5 489
0.75 560
1 636
2 1003
3 1484
4 2016
4.16 2111
*/
DISCRETE_74LS624(NODE_91, /* IC 7P, pin 7 */
1, /* ENAB */
NODE_90, DK_SUP_V, /* VMOD - IC 7P, pin 2, VRNG */
@ -1072,8 +1072,8 @@ DISCRETE_TASK_START(1)
DISCRETE_TASK_END()
/************************************************
* DAC
************************************************/
* DAC
************************************************/
DISCRETE_TASK_START(1)
DISCRETE_INPUT_BUFFER(DS_DAC, 0)
@ -1094,8 +1094,8 @@ DISCRETE_TASK_START(1)
DISCRETE_TASK_END()
/************************************************
* Amplifier
************************************************/
* Amplifier
************************************************/
DISCRETE_TASK_START(3)
DISCRETE_MIXER5(NODE_288, 1, DS_OUT_SOUND9, DS_OUT_SOUND0, DS_OUT_SOUND2, DS_OUT_SOUND1, DS_OUT_DAC, &dkongjr_mixer_desc)
@ -1106,9 +1106,9 @@ DISCRETE_TASK_START(3)
DISCRETE_CRFILTER(NODE_295, NODE_288, 1000, JR_C13)
/* approx -1.805V to 2.0V when playing, but turn on sound peaks at 2.36V */
/* we will set the full wav range to 1.18V which will cause clipping on the turn on
* sound and explosions. The real game would do this when the volume is turned up too.
* Reducing MAME's master volume to 50% will provide full unclipped volume.
*/
* sound and explosions. The real game would do this when the volume is turned up too.
* Reducing MAME's master volume to 50% will provide full unclipped volume.
*/
DISCRETE_OUTPUT(NODE_295, 32767.0/1.18)
DISCRETE_TASK_END()

View File

@ -145,15 +145,15 @@
static DISCRETE_SOUND_START(mario)
/************************************************
* Input register mapping for mario
************************************************/
* Input register mapping for mario
************************************************/
/* DISCRETE_INPUT_DATA */
DISCRETE_INPUT_NOT(DS_SOUND7_INV) /* IC 7L, pin 8 */
/************************************************
* SOUND0
************************************************/
* SOUND0
************************************************/
DISCRETE_TASK_START(1)
DISCRETE_INPUT_PULSE(DS_SOUND0_INV, 1) /* IC 4C, pin 15 */
@ -164,27 +164,27 @@ static DISCRETE_SOUND_START(mario)
/* Breadboarded measurements IC 1J, pin 10
D.R. Oct 2010
V Hz
0.115 14470
0.250 15190
0.500 14980
0.750 18150
1.000 21690
2.000 38790
3.000 58580
4.000 79890
0.115 14470
0.250 15190
0.500 14980
0.750 18150
1.000 21690
2.000 38790
3.000 58580
4.000 79890
*/
/* Breadboarded measurements IC 2J, pin 10
D.R. Oct 2010
V Hz
0.116 2458
0.250 2593
0.500 2540
0.750 3081
1.000 3676
2.000 6590
3.000 9974
4.000 13620
0.116 2458
0.250 2593
0.500 2540
0.750 3081
1.000 3676
2.000 6590
3.000 9974
4.000 13620
*/
/* covert logic to measured voltage */
@ -214,8 +214,8 @@ static DISCRETE_SOUND_START(mario)
DISCRETE_TASK_END()
/************************************************
* SOUND1
************************************************/
* SOUND1
************************************************/
DISCRETE_TASK_START(1)
DISCRETE_INPUT_PULSE(DS_SOUND1_INV, 1) /* IC 4C, pin 14 */
@ -226,27 +226,27 @@ static DISCRETE_SOUND_START(mario)
/* Breadboarded measurements IC 1J, pin 7
D.R. Oct 2010
V Hz
0.116 1380
0.250 1448
0.500 1419
0.750 1717
1.000 2053
2.000 3677
3.000 5561
4.000 7610
0.116 1380
0.250 1448
0.500 1419
0.750 1717
1.000 2053
2.000 3677
3.000 5561
4.000 7610
*/
/* Breadboarded measurements IC 2J, pin 7
D.R. Oct 2010
V Hz
0.112 8030
0.250 8490
0.500 8326
0.750 10030
1.000 12000
2.000 21460
3.000 32540
4.000 44300
0.112 8030
0.250 8490
0.500 8326
0.750 10030
1.000 12000
2.000 21460
3.000 32540
4.000 44300
*/
/* covert logic to measured voltage */
@ -276,8 +276,8 @@ static DISCRETE_SOUND_START(mario)
DISCRETE_TASK_END()
/************************************************
* SOUND7
************************************************/
* SOUND7
************************************************/
DISCRETE_TASK_START(1)
DISCRETE_COUNTER(NODE_100, /* IC 3H */
@ -349,8 +349,8 @@ static DISCRETE_SOUND_START(mario)
DISCRETE_TASK_END()
/************************************************
* DAC
************************************************/
* DAC
************************************************/
/* following the resistor DAC are two opamps. The first is a 1:1 amplifier, the second
* is a filter circuit. Simulation in LTSPICE shows, that the following is equivalent:
@ -366,14 +366,14 @@ static DISCRETE_SOUND_START(mario)
&mario_dac_amp)
/* This provides a close simulation of the IC 3M, pin 10 filter circuit */
/* The Measured and SPICEd low freq gain is 1, it then has a high frequency
* drop close to the following RC filter. */
* drop close to the following RC filter. */
DISCRETE_RCFILTER_VREF(DS_OUT_DAC, NODE_171, RES_K(750), CAP_P(180), 2.5)
DISCRETE_TASK_END()
/************************************************
* MIXER
************************************************/
* MIXER
************************************************/
DISCRETE_TASK_START(2)
DISCRETE_MIXER4(NODE_297,
@ -382,9 +382,9 @@ static DISCRETE_SOUND_START(mario)
&mario_mixer)
/* approx -0.625V to 0.980V when playing, but turn on sound peaks at 2.38V */
/* we will set the full wav range to 1.19V which will cause clipping on the turn on
* sound. The real game would do this when the volume is turned up too.
* Reducing MAME's master volume to 50% will provide full unclipped volume.
*/
* sound. The real game would do this when the volume is turned up too.
* Reducing MAME's master volume to 50% will provide full unclipped volume.
*/
DISCRETE_OUTPUT(NODE_297, 32767.0/1.19)
DISCRETE_TASK_END()

View File

@ -8,7 +8,7 @@
* Cheese Chase
* Ultimate Tennis
* Stone Ball
* Shooting Star (not emulated)
* Shooting Star (not emulated)
Known bugs:
* measured against a real PCB, the games run slightly too fast
@ -472,17 +472,17 @@ static ADDRESS_MAP_START( shtstar_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x200000, 0x27ffff) AM_RAM
AM_RANGE(0x280000, 0x280fff) AM_RAM AM_SHARE("nvram")
AM_RANGE(0x3c0000, 0x3c0001) AM_READ_PORT("3c0000")
AM_RANGE(0x3c0002, 0x3c0003) AM_READ_PORT("3c0002")
AM_RANGE(0x3c0004, 0x3c0005) AM_READ_PORT("3c0004")
AM_RANGE(0x3c0006, 0x3c0007) AM_READ_PORT("3c0006")
AM_RANGE(0x3c0008, 0x3c0009) AM_READ_PORT("3c0008")
AM_RANGE(0x3c000a, 0x3c000b) AM_READ_PORT("3c000a")
AM_RANGE(0x3c0012, 0x3c0013) AM_READ(unk_r)
AM_RANGE(0x3c0014, 0x3c0015) AM_NOP
AM_RANGE(0x300000, 0x300003) AM_WRITE(control_w) AM_BASE(&control)
AM_RANGE(0x3c0004, 0x3c0007) AM_WRITE(protection_bit_w)
AM_RANGE(0x340000, 0x340001) AM_DEVREADWRITE8_MODERN("oki", okim6295_device, read, write, 0x00ff)
@ -530,12 +530,12 @@ ADDRESS_MAP_END
/*************************************
*
* Extra CPU memory handlers
* Extra CPU memory handlers
* (Shooting Star)
*
*************************************/
/* see adp.c */
/* see adp.c */
static ADDRESS_MAP_START( shtstar_subcpu_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x03ffff) AM_ROM
AM_RANGE(0xffc000, 0xffffff) AM_RAM
@ -900,7 +900,7 @@ static MACHINE_CONFIG_DERIVED( shtstar, artmagic )
/* sub cpu*/
MDRV_CPU_ADD("subcpu", M68000, MASTER_CLOCK_25MHz/2)
MDRV_CPU_PROGRAM_MAP(shtstar_subcpu_map)
/*gun board cpu*/
MDRV_CPU_ADD("guncpu", I80C31, 6000000)
MDRV_CPU_IO_MAP(shtstar_guncpu_io_map)
@ -1028,18 +1028,18 @@ ROM_END
Shooting Star:
- Small pcb "gewehr controller" (gun controller) adp 1994
romless MCU 80c31BH-3 16P philips
27c256 eprom "2207 7b42c5"
LC36648L-10
8 connectors
3X led
osc 12.0000M
romless MCU 80c31BH-3 16P philips
27c256 eprom "2207 7b42c5"
LC36648L-10
8 connectors
3X led
osc 12.0000M
- common adp cpu board adp 1994.12
MC68ec0000FN8
2x 27c1001 eproms
2x mk48t08b-15 timekeeper RAM
MC68ec0000FN8
2x 27c1001 eproms
2x mk48t08b-15 timekeeper RAM
- common adp i/o board (see adp.c ) with MC68681 an YM2149F
- lamp board with triacs
@ -1047,34 +1047,34 @@ Shooting Star:
- a couple of tiny boards with some logic parts
- Art & Magic jamma pcb, 11 connectors (jamma not connected) "am005c0494 0310"
MC68000p12
TMS34010fnl-40
fpga actel a1020a pl84c 16b.u110
cpld xilinx xc7236a 0 25 15b.u111
MC68681p
ramdac adv476kn80e 03-56 os
Oki M6295
25.000mhz
40.000mhz
MC68000p12
TMS34010fnl-40
fpga actel a1020a pl84c 16b.u110
cpld xilinx xc7236a 0 25 15b.u111
MC68681p
ramdac adv476kn80e 03-56 os
Oki M6295
25.000mhz
40.000mhz
13 pals/gals (not dumped) labelled:
a&m005c0494 06a u126
a&m005c0494 03a u125
a&m005c0494 02a u307
a&m005c0494 18a u306
a&m005c0494 17a u305
a&m005c0494 05a u206
a&m005c0494 01a u205
a&m005c0494 04a u601
a&m005c0494 08a u916
a&m005c0494 07a u705
a&m005c0494 10a u917
a&m005c0494 09a u903
a&m005c0494 11a u112
13 pals/gals (not dumped) labelled:
a&m005c0494 06a u126
a&m005c0494 03a u125
a&m005c0494 02a u307
a&m005c0494 18a u306
a&m005c0494 17a u305
a&m005c0494 05a u206
a&m005c0494 01a u205
a&m005c0494 04a u601
a&m005c0494 08a u916
a&m005c0494 07a u705
a&m005c0494 10a u917
a&m005c0494 09a u903
a&m005c0494 11a u112
27c2001 near oki "a&m005c0494 12a"
2x 27c010 68k labelled u101 and u102
2x 27c040 "a&m005c0494 13a" and "a&m005c0494 14a"
27c2001 near oki "a&m005c0494 12a"
2x 27c010 68k labelled u101 and u102
2x 27c040 "a&m005c0494 13a" and "a&m005c0494 14a"
Shooting Star
@ -1090,16 +1090,16 @@ OSC : 40.000MHz, 25.000MHz
ROM_START( shtstar )
ROM_REGION( 0x80000, "maincpu", 0 )
ROM_REGION( 0x80000, "maincpu", 0 )
ROM_LOAD16_BYTE( "rom.u102", 0x00000, 0x20000, CRC(cce9877e) SHA1(3e2b3b29d5dd73bfe0c7faf84309b50adbcded3b) )
ROM_LOAD16_BYTE( "rom.u101", 0x00001, 0x20000, CRC(3a330d9d) SHA1(0f3cd75e9e5483e3cf51f0c4eb4f15b6c3b33b67) )
ROM_REGION( 0x40000, "subcpu", 0 )
ROM_LOAD16_BYTE( "shooting_star_f1_i.u2", 0x00000, 0x20000, CRC(2780d8d6) SHA1(a8db3a9771f6918eb8bb3b94db82ca8ada2aae7d) )
ROM_LOAD16_BYTE( "shooting_star_f1_ii.u7", 0x00001, 0x20000, CRC(0d127d9c) SHA1(e9d209901e55a743a4916c850083caa23c5ebb39) )
/* 80c31 MCU */
ROM_REGION( 0x10000, "guncpu", 0 )
ROM_REGION( 0x10000, "guncpu", 0 )
ROM_LOAD( "2207_7b42c5.u6", 0x00000, 0x8000, CRC(6dd4b4ed) SHA1(b37e9e5ddfb5d88c5412dc79643adfc4362fbb46) )
ROM_REGION16_LE( 0x100000, "gfx1", 0 )
@ -1108,7 +1108,7 @@ ROM_START( shtstar )
ROM_REGION( 0x80000, "oki", 0 )
ROM_LOAD( "a&m005c0494_12a.u151", 0x00000, 0x40000, CRC(2df3db1e) SHA1(d2e588db577de6fd527cd496f5eae9964d557da3) )
ROM_REGION( 0x1a00, "plds", 0 )
ROM_LOAD( "a&m005c0494_06a.u126", 0x0000, 0x0200, NO_DUMP )
ROM_LOAD( "a&m005c0494_03a.u125", 0x0200, 0x0200, NO_DUMP )
@ -1196,7 +1196,7 @@ static DRIVER_INIT( shtstar )
{
/* wrong */
decrypt_ultennis();
artmagic_is_stoneball =0;
artmagic_is_stoneball =0;
protection_handler = stonebal_protection;
}

View File

@ -3919,7 +3919,7 @@ ROM_END
/**** Fun World Quiz ****
Fun World Quiz
Öhlinger Ges.m.b.H.
?hlinger Ges.m.b.H.
Horizontal Display
Currents

View File

@ -89,10 +89,10 @@ TODO:
#include "sound/2203intf.h"
#include "includes/lkage.h"
#define MAIN_CPU_CLOCK (XTAL_12MHz/2)
#define MAIN_CPU_CLOCK (XTAL_12MHz/2)
#define SOUND_CPU_CLOCK (XTAL_8MHz/2)
#define AUDIO_CLOCK (XTAL_8MHz/2)
#define MCU_CLOCK (XTAL_12MHz/4)
#define AUDIO_CLOCK (XTAL_8MHz/2)
#define MCU_CLOCK (XTAL_12MHz/4)
static TIMER_CALLBACK( nmi_callback )
@ -505,7 +505,7 @@ static MACHINE_START( lkage )
state_save_register_global(machine, state->bg_tile_bank);
state_save_register_global(machine, state->fg_tile_bank);
state_save_register_global(machine, state->tx_tile_bank);
state_save_register_global(machine, state->sprite_dx);
state_save_register_global(machine, state->mcu_ready);
@ -807,11 +807,11 @@ ROM_END
Bygone
Taito, 1985?
This is a rare prototype platform game conversion on a Legend Of Kage PCB.
There are some wire mods on the video board.
This is a rare prototype platform game conversion on a Legend Of Kage PCB.
There are some wire mods on the video board.
PCB Layouts
PCB Layouts
-----------
K1100135A
@ -825,7 +825,7 @@ M4300040A (sticker, also matches The Legend Of Kage)
| PC010SA YM3014 YM2203 MB2148 |
| PC030CM MB2148 |
| 8MHz MB2148 |
| 6116 |-|
| 6116 |-|
|2 | |
|2 A53_07.IC54 Z80A | |
|W | |
@ -845,8 +845,8 @@ Notes:
Z80A - clock 4.000MHz [8/2]
Z80B - clock 6.000MHz [12/2]
YM2203 - clock 4.000MHz [8/2]
A51_09 - MC68705P5 microcontroller, clock 3.000MHz [12/4].
It seems to be from Taito game A51, which is unknown?
A51_09 - MC68705P5 microcontroller, clock 3.000MHz [12/4].
It seems to be from Taito game A51, which is unknown?
It was not protected ^_^
A54-14 - PAL16L8
A53* - 27C128 and 27C256 EPROMs
@ -854,7 +854,7 @@ Notes:
6116 - 2k x8 SRAM
2148 - 1k x4 SRAM
DIPs have 8 switches each
K1100136A
J1100058A
@ -866,7 +866,7 @@ VIDEO PCB
| |
| 6116 |
| 6116 |
| 6116 |-|
| 6116 |-|
|1 | |
|8 | |
|W | |
@ -890,9 +890,9 @@ Notes:
6116 - 2k x8 SRAM
93422 - 256b x4 SRAM
A53* - 27C128 EPROMs
*/
ROM_START( bygone )
ROM_REGION( 0x14000, "maincpu", 0 ) /* Z80 code (main CPU) */
ROM_LOAD( "a53_05.ic37", 0x0000, 0x8000, CRC(63a3f08b) SHA1(781539077cb1d3b8eecc8bd3717330c0f281833d) )

View File

@ -5005,7 +5005,7 @@ static TIMER_CALLBACK( segacd_hock_callback )
if(hock_cmd)
{
// segacd_cdd.ctrl &= ~4; // clear HOCK flag
// segacd_cdd.ctrl &= ~4; // clear HOCK flag
segacd_cdd_rx[0] = (segacd_cdd.buffer[0] & 0xf0) >> 4;
segacd_cdd_rx[1] = (segacd_cdd.buffer[0] & 0x0f) >> 0;
@ -5577,7 +5577,7 @@ static void segacd_cdd_seek(running_machine *machine)
track_num = cdrom_get_track(segacd.cd, frame);
segacd.current_frame = frame;
// printf("%02x %02x %02x %02x\n",m,s,f,track_num);
// printf("%02x %02x %02x %02x\n",m,s,f,track_num);
segacd_cdd.ctrl &= 0xfeff;
segacd_cdd.ctrl |= (( segacd.toc->tracks[track_num-1].trktype == CD_TRACK_AUDIO ) ? 0x000 : 0x100);

View File

@ -1712,7 +1712,7 @@ static DRIVER_INIT(megat2)
{ 0xf0, 0xaa, 0x0f, 0x0f, 0x55, 0x55, 0xff, 0xab };
static const UINT8 pitbosmt_ds1204_nvram[16] =
{ 0x00, 0xfe, 0x03, 0x03, 0x08, 0x00, 0xa2, 0x03, 0x4b, 0x07, 0x00, 0xe6, 0x02, 0xd3, 0x05, 0x00 };
{ 0x00, 0xfe, 0x03, 0x03, 0x08, 0x00, 0xa2, 0x03, 0x4b, 0x07, 0x00, 0xe6, 0x02, 0xd3, 0x05, 0x00 };
ds1204_init(machine, pitbosmt_ds1204_key, pitbosmt_ds1204_nvram);

View File

@ -4587,12 +4587,12 @@ ROM_START( zerogu2 )
NAOMI_DEFAULT_EEPROM
ROM_REGION( 0x5800000, "user1", ROMREGION_ERASEFF)
ROM_LOAD( "epr23689.bin", 0x0000000, 0x0400000, CRC(ba42267c) SHA1(e8166e33cc2a4d9b2c57410235f531651b2e7f8a) )
ROM_LOAD( "mpr23684.ic1", 0x0800000, 0x1000000, CRC(035aec98) SHA1(47ea834ca88aca3a72d2e7ef715a64603c40eacd) )
ROM_LOAD( "mpr23685.ic2", 0x1800000, 0x1000000, CRC(d878ff99) SHA1(577be93d43f6113b91cf0967b710c6cf45131713) )
ROM_LOAD( "mpr23686.ic3", 0x2800000, 0x1000000, CRC(a61b4d49) SHA1(842c54ad4e8192e491152ae5bb08daf5dd6b8c6c) )
ROM_LOAD( "mpr23687.ic4", 0x3800000, 0x1000000, CRC(e125439a) SHA1(07e7339f3f53aeb0ebddf7a8ac3eb6d8f3fe9de6) )
ROM_LOAD( "mpr23688.ic5", 0x4800000, 0x1000000, CRC(38412edf) SHA1(9cae06cf46e134531f47e64deedace449664f69a) )
ROM_LOAD( "epr23689.bin", 0x0000000, 0x0400000, CRC(ba42267c) SHA1(e8166e33cc2a4d9b2c57410235f531651b2e7f8a) )
ROM_LOAD( "mpr23684.ic1", 0x0800000, 0x1000000, CRC(035aec98) SHA1(47ea834ca88aca3a72d2e7ef715a64603c40eacd) )
ROM_LOAD( "mpr23685.ic2", 0x1800000, 0x1000000, CRC(d878ff99) SHA1(577be93d43f6113b91cf0967b710c6cf45131713) )
ROM_LOAD( "mpr23686.ic3", 0x2800000, 0x1000000, CRC(a61b4d49) SHA1(842c54ad4e8192e491152ae5bb08daf5dd6b8c6c) )
ROM_LOAD( "mpr23687.ic4", 0x3800000, 0x1000000, CRC(e125439a) SHA1(07e7339f3f53aeb0ebddf7a8ac3eb6d8f3fe9de6) )
ROM_LOAD( "mpr23688.ic5", 0x4800000, 0x1000000, CRC(38412edf) SHA1(9cae06cf46e134531f47e64deedace449664f69a) )
ROM_END
/* GD-ROM titles - a PIC supplies a decryption key
@ -6704,14 +6704,14 @@ ROM_START( ngbc )
AW_BIOS
ROM_REGION( 0xf000000, "user1", ROMREGION_ERASE)
ROM_LOAD( "ax3301p01.fmem1", 0x0000000, 0x0800000, CRC(6dd78275) SHA1(72d4cab58dbcebd666db21aeef190378ef447580) )
ROM_LOAD( "ax3301m01.mrom1", 0x1000000, 0x2000000, CRC(e6013de9) SHA1(ccbc7c2e76153348646d75938d5c008dc80df17d) )
ROM_LOAD( "ax3301m01.mrom2", 0x3000000, 0x2000000, CRC(f7cfef6c) SHA1(c9e6231499a9c9c8650d9e61f34ff1fcce8d442c) )
ROM_LOAD( "ax3301m01.mrom3", 0x5000000, 0x2000000, CRC(0cdf8647) SHA1(0423f96842bef2c2ff454318dc6960b5052c0551) )
ROM_LOAD( "ax3301m01.mrom4", 0x7000000, 0x2000000, CRC(2f031db0) SHA1(3214735f04fadf160137f0585bfc1a27eeecfac6) )
ROM_LOAD( "ax3301m01.mrom5", 0x9000000, 0x2000000, CRC(f6668aaa) SHA1(6a78f8f0c7d7a71854ff87329290d38970cfb476) )
ROM_LOAD( "ax3301m01.mrom6", 0xb000000, 0x2000000, CRC(5cf32fbd) SHA1(b6ae0abe5791b3d6f8db07b8c8ca22219a153801) )
ROM_LOAD( "ax3301m01.mrom7", 0xd000000, 0x2000000, CRC(26d9da53) SHA1(0015b4be670005a451274de68279b4302fc42a97) )
ROM_LOAD( "ax3301p01.fmem1", 0x0000000, 0x0800000, CRC(6dd78275) SHA1(72d4cab58dbcebd666db21aeef190378ef447580) )
ROM_LOAD( "ax3301m01.mrom1", 0x1000000, 0x2000000, CRC(e6013de9) SHA1(ccbc7c2e76153348646d75938d5c008dc80df17d) )
ROM_LOAD( "ax3301m01.mrom2", 0x3000000, 0x2000000, CRC(f7cfef6c) SHA1(c9e6231499a9c9c8650d9e61f34ff1fcce8d442c) )
ROM_LOAD( "ax3301m01.mrom3", 0x5000000, 0x2000000, CRC(0cdf8647) SHA1(0423f96842bef2c2ff454318dc6960b5052c0551) )
ROM_LOAD( "ax3301m01.mrom4", 0x7000000, 0x2000000, CRC(2f031db0) SHA1(3214735f04fadf160137f0585bfc1a27eeecfac6) )
ROM_LOAD( "ax3301m01.mrom5", 0x9000000, 0x2000000, CRC(f6668aaa) SHA1(6a78f8f0c7d7a71854ff87329290d38970cfb476) )
ROM_LOAD( "ax3301m01.mrom6", 0xb000000, 0x2000000, CRC(5cf32fbd) SHA1(b6ae0abe5791b3d6f8db07b8c8ca22219a153801) )
ROM_LOAD( "ax3301m01.mrom7", 0xd000000, 0x2000000, CRC(26d9da53) SHA1(0015b4be670005a451274de68279b4302fc42a97) )
ROM_END
ROM_START( kofnw )
@ -6836,14 +6836,14 @@ ROM_START( kofxi )
AW_BIOS
ROM_REGION( 0xf000000, "user1", ROMREGION_ERASE)
ROM_LOAD( "ax3201p01.fmem1", 0x0000000, 0x0800000, CRC(6dbdd71b) SHA1(cce3897b104f5d923d8136485fc80eb9717ff4b5) )
ROM_LOAD( "ax3201m01.mrom1", 0x1000000, 0x2000000, CRC(7f9d6af9) SHA1(001064ad1b8c3408efe799dc766c2728dc6512a9) )
ROM_LOAD( "ax3202m01.mrom2", 0x3000000, 0x2000000, CRC(1ae40afa) SHA1(9ee7957c86cc3a71e6971ddcd906a82c5b1e16f1) )
ROM_LOAD( "ax3203m01.mrom3", 0x5000000, 0x2000000, CRC(8c5e3bfd) SHA1(b5443e2a1b88642cc57c5287a3122376c2d48de9) )
ROM_LOAD( "ax3204m01.mrom4", 0x7000000, 0x2000000, CRC(ba97f80c) SHA1(36f672fe833e13f0bab036b02c39123066327e20) )
ROM_LOAD( "ax3205m01.mrom5", 0x9000000, 0x2000000, CRC(3c747067) SHA1(54b7ff73d618e2e4e40c125c6cfe99016e69ad1a) )
ROM_LOAD( "ax3206m01.mrom6", 0xb000000, 0x2000000, CRC(cb81e5f5) SHA1(07faee02a58ac9c600ab3cdd525d22c16b35222d) )
ROM_LOAD( "ax3207m01.mrom7", 0xd000000, 0x2000000, CRC(164f6329) SHA1(a72c8cbe4ac7b98edda3d4434f6c81a370b8c39b) )
ROM_LOAD( "ax3201p01.fmem1", 0x0000000, 0x0800000, CRC(6dbdd71b) SHA1(cce3897b104f5d923d8136485fc80eb9717ff4b5) )
ROM_LOAD( "ax3201m01.mrom1", 0x1000000, 0x2000000, CRC(7f9d6af9) SHA1(001064ad1b8c3408efe799dc766c2728dc6512a9) )
ROM_LOAD( "ax3202m01.mrom2", 0x3000000, 0x2000000, CRC(1ae40afa) SHA1(9ee7957c86cc3a71e6971ddcd906a82c5b1e16f1) )
ROM_LOAD( "ax3203m01.mrom3", 0x5000000, 0x2000000, CRC(8c5e3bfd) SHA1(b5443e2a1b88642cc57c5287a3122376c2d48de9) )
ROM_LOAD( "ax3204m01.mrom4", 0x7000000, 0x2000000, CRC(ba97f80c) SHA1(36f672fe833e13f0bab036b02c39123066327e20) )
ROM_LOAD( "ax3205m01.mrom5", 0x9000000, 0x2000000, CRC(3c747067) SHA1(54b7ff73d618e2e4e40c125c6cfe99016e69ad1a) )
ROM_LOAD( "ax3206m01.mrom6", 0xb000000, 0x2000000, CRC(cb81e5f5) SHA1(07faee02a58ac9c600ab3cdd525d22c16b35222d) )
ROM_LOAD( "ax3207m01.mrom7", 0xd000000, 0x2000000, CRC(164f6329) SHA1(a72c8cbe4ac7b98edda3d4434f6c81a370b8c39b) )
ROM_END
/* Atomiswave */

View File

@ -1894,7 +1894,7 @@ static INPUT_PORTS_START( astormbl )
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW1:6" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW1:7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:8" )
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "Start Credit" ) PORT_DIPLOCATION("SW2:1")
PORT_DIPSETTING( 0x01, "1" )

View File

@ -14,7 +14,7 @@ public:
/* video-related */
tilemap_t *bg_tilemap, *fg_tilemap, *tx_tilemap;
UINT8 bg_tile_bank, fg_tile_bank, tx_tile_bank;
int sprite_dx;
/* misc */

View File

@ -4683,7 +4683,7 @@ BOMULEUL CHAJARA SEGA ST-V 1997/04/11
DRIVER( gundmct ) /* 2001.03 Mobile Suit Gundam: Federation vs. Zeon (cartridge) */
/* 2001.04 Shakatto Tambourine Motto Norinori Shinkyoku Tsuika */
DRIVER( dygolf ) /* 2001.04 Dynamic Golf */
DRIVER( zerogu2 ) /* 2001.05 Zero Gunner 2 */
DRIVER( zerogu2 ) /* 2001.05 Zero Gunner 2 */
DRIVER( monkeyba ) /* 2001.05 Monkey Ball */
DRIVER( cvsgd ) /* 2001.06 Capcom vs. SNK Pro */
/* 2001.06 Crackin' DJ Part2 */
@ -8684,7 +8684,7 @@ Other Sun games
DRIVER( cheesech ) /* (c) 1994 */
DRIVER( stonebal ) /* (c) 1994 */
DRIVER( stonebal2 ) /* (c) 1994 */
DRIVER( shtstar ) /* (c) 1994 Nova */
/* Dynamo games */

View File

@ -11,7 +11,7 @@
lkage_scroll[0x05]: background layer vertical scroll
lkage_vreg[0]: 0x00,0x04
0x02: tx tile bank select (bygone only?)
0x02: tx tile bank select (bygone only?)
0x04: fg tile bank select
0x08: ?
@ -109,7 +109,7 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
lkage_state *state = machine->driver_data<lkage_state>();
const UINT8 *source = state->spriteram;
const UINT8 *finish = source + 0x60;
while (source < finish)
{
int attributes = source[2];
@ -181,7 +181,7 @@ VIDEO_UPDATE( lkage )
flip_screen_y_set(screen->machine, ~state->vreg[2] & 0x02);
bank = state->vreg[1] & 0x08;
if (state->bg_tile_bank != bank)
{
state->bg_tile_bank = bank;
@ -194,7 +194,7 @@ VIDEO_UPDATE( lkage )
state->fg_tile_bank = bank;
tilemap_mark_all_tiles_dirty(state->fg_tilemap);
}
bank = state->vreg[0]&0x02;
if (state->tx_tile_bank != bank)
{
@ -227,6 +227,6 @@ VIDEO_UPDATE( lkage )
{
tilemap_draw(bitmap, cliprect, state->tx_tilemap, TILEMAP_DRAW_OPAQUE, 0);
}
return 0;
}

View File

@ -69,28 +69,28 @@ void osd_interface::init(running_machine &machine)
// This function is responsible for initializing the OSD-specific
// video and input functionality, and registering that functionality
// with the MAME core.
//
//
// In terms of video, this function is expected to create one or more
// render_targets that will be used by the MAME core to provide graphics
// data to the system. Although it is possible to do this later, the
// assumption in the MAME core is that the user interface will be
// visible starting at init() time, so you will have some work to
// do to avoid these assumptions.
//
//
// In terms of input, this function is expected to enumerate all input
// devices available and describe them to the MAME core by adding
// input devices and their attached items (buttons/axes) via the input
// system.
//
//
// Beyond these core responsibilities, init() should also initialize
// any other OSD systems that require information about the current
// running_machine.
//
//
// This callback is also the last opportunity to adjust the options
// before they are consumed by the rest of the core.
//
//
// Future work/changes:
//
//
// Audio initialization may eventually move into here as well,
// instead of relying on independent callbacks from each system.
//
@ -141,7 +141,7 @@ void osd_interface::wait_for_debugger(device_t &device, bool firststop)
//
// When implementing an OSD-driver debugger, this method should be
// overridden to wait for input, process it, and return. It will be
// called repeatedly until a command is issued that resumes
// called repeatedly until a command is issued that resumes
// execution.
//
}
@ -169,7 +169,7 @@ void osd_interface::update_audio_stream(const INT16 *buffer, int samples_this_fr
void osd_interface::set_mastervolume(int attenuation)
{
//
// Attenuation is the attenuation in dB (a negative number).
// Attenuation is the attenuation in dB (a negative number).
// To convert from dB to a linear volume scale do the following:
// volume = MAX_VOLUME;
// while (attenuation++ < 0)
@ -222,7 +222,7 @@ void osd_interface::font_close(osd_font font)
//-------------------------------------------------
// font_get_bitmap - allocate and populate a
// BITMAP_FORMAT_ARGB32 bitmap containing the
// pixel values MAKE_ARGB(0xff,0xff,0xff,0xff)
// pixel values MAKE_ARGB(0xff,0xff,0xff,0xff)
// or MAKE_ARGB(0x00,0xff,0xff,0xff) for each
// pixel of a black & white font
//-------------------------------------------------

View File

@ -66,7 +66,7 @@ public:
// construction/destruction
osd_interface();
virtual ~osd_interface();
// getters
running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
@ -77,14 +77,14 @@ public:
// debugger overridables
virtual void init_debugger();
virtual void wait_for_debugger(device_t &device, bool firststop);
// audio overridables
virtual void update_audio_stream(const INT16 *buffer, int samples_this_frame);
virtual void set_mastervolume(int attenuation);
// input overridables
virtual void customize_input_type_list(input_type_desc *typelist);
// font overridables
virtual osd_font font_open(const char *name, int &height);
virtual void font_close(osd_font font);

View File

@ -183,7 +183,7 @@ osd_directory_entry *osd_stat(const char *path)
result->name = (char *)(result + 1);
result->type = ENTTYPE_NONE;
result->size = 0;
FILE *f = fopen(path, "rb");
if (f != NULL)
{

View File

@ -53,22 +53,22 @@ public:
// construction/destruction
mini_osd_interface();
virtual ~mini_osd_interface();
// general overridables
virtual void init(running_machine &machine);
virtual void update(bool skip_redraw);
// debugger overridables
// virtual void init_debugger();
// virtual void wait_for_debugger(device_t &device, bool firststop);
// virtual void init_debugger();
// virtual void wait_for_debugger(device_t &device, bool firststop);
// audio overridables
virtual void update_audio_stream(const INT16 *buffer, int samples_this_frame);
virtual void set_mastervolume(int attenuation);
// input overridables
virtual void customize_input_type_list(input_type_desc *typelist);
private:
static void osd_exit(running_machine &machine);
};

View File

@ -128,7 +128,7 @@ public:
// construction/destruction
sdl_osd_interface();
virtual ~sdl_osd_interface();
// general overridables
virtual void init(running_machine &machine);
virtual void update(bool skip_redraw);
@ -136,14 +136,14 @@ public:
// debugger overridables
virtual void init_debugger();
virtual void wait_for_debugger(device_t &device, bool firststop);
// audio overridables
virtual void update_audio_stream(const INT16 *buffer, int samples_this_frame);
virtual void set_mastervolume(int attenuation);
// input overridables
virtual void customize_input_type_list(input_type_desc *typelist);
private:
static void osd_exit(running_machine &machine);
};

View File

@ -693,13 +693,13 @@ osd_font windows_osd_interface::font_open(const char *_name, int &height)
_tcsncpy(logfont.lfFaceName, face, sizeof(logfont.lfFaceName) / sizeof(TCHAR));
logfont.lfFaceName[sizeof(logfont.lfFaceName) / sizeof(TCHAR) - 1] = 0;
osd_free(face);
// create the font
height = logfont.lfHeight;
osd_font font = reinterpret_cast<osd_font>(CreateFontIndirect(&logfont));
if (font == NULL)
return NULL;
// select it into a temp DC and get the real font name
HDC dummyDC = CreateCompatibleDC(NULL);
HGDIOBJ oldfont = SelectObject(dummyDC, reinterpret_cast<HGDIOBJ>(font));
@ -707,13 +707,13 @@ osd_font windows_osd_interface::font_open(const char *_name, int &height)
GetTextFace(dummyDC, ARRAY_LENGTH(realname), realname);
SelectObject(dummyDC, oldfont);
DeleteDC(dummyDC);
// if it doesn't match our request, fail
char *utf = utf8_from_tstring(realname);
int result = mame_stricmp(utf, name);
osd_free(utf);
// if we didn't match, nuke our font and fall back
// if we didn't match, nuke our font and fall back
if (result != 0)
{
DeleteObject(reinterpret_cast<HFONT>(font));
@ -739,7 +739,7 @@ void windows_osd_interface::font_close(osd_font font)
//-------------------------------------------------
// font_get_bitmap - allocate and populate a
// BITMAP_FORMAT_ARGB32 bitmap containing the
// pixel values MAKE_ARGB(0xff,0xff,0xff,0xff)
// pixel values MAKE_ARGB(0xff,0xff,0xff,0xff)
// or MAKE_ARGB(0x00,0xff,0xff,0xff) for each
// pixel of a black & white font
//-------------------------------------------------
@ -749,7 +749,7 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
// create a dummy DC to work with
HDC dummyDC = CreateCompatibleDC(NULL);
HGDIOBJ oldfont = SelectObject(dummyDC, reinterpret_cast<HGDIOBJ>(font));
// get the text metrics
TEXTMETRIC metrics = { 0 };
GetTextMetrics(dummyDC, &metrics);
@ -763,11 +763,11 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
GetCharWidth32(dummyDC, chnum, chnum, reinterpret_cast<LPINT>(&abc.abcB));
}
width = abc.abcA + abc.abcB + abc.abcC;
// determine desired bitmap size
int bmwidth = (50 + abc.abcA + abc.abcB + abc.abcC + 50 + 31) & ~31;
int bmheight = 50 + metrics.tmHeight + 50;
// describe the bitmap we want
BYTE bitmapinfodata[sizeof(BITMAPINFOHEADER) + 2 * sizeof(RGBQUAD)] = { 0 };
BITMAPINFO &info = *reinterpret_cast<BITMAPINFO *>(bitmapinfodata);
@ -784,7 +784,7 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
info.bmiHeader.biClrImportant = 0;
info.bmiColors[0].rgbBlue = info.bmiColors[0].rgbGreen = info.bmiColors[0].rgbRed = 0x00;
info.bmiColors[1].rgbBlue = info.bmiColors[1].rgbGreen = info.bmiColors[1].rgbRed = 0xff;
// create a DIB to render to
BYTE *bits;
HBITMAP dib = CreateDIBSection(dummyDC, &info, DIB_RGB_COLORS, reinterpret_cast<VOID **>(&bits), NULL, 0);
@ -793,7 +793,7 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
// clear the bitmap
int rowbytes = bmwidth / 8;
memset(bits, 0, rowbytes * bmheight);
// now draw the character
WCHAR tempchar = chnum;
SetTextColor(dummyDC, RGB(0xff,0xff,0xff));
@ -804,7 +804,7 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
rectangle actbounds;
actbounds.min_y = 50;
actbounds.max_y = 50 + metrics.tmHeight - 1;
// determine the actual left of the character
for (actbounds.min_x = 0; actbounds.min_x < rowbytes; actbounds.min_x++)
{
@ -825,7 +825,7 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
break;
}
}
// determine the actual right of the character
for (actbounds.max_x = rowbytes - 1; actbounds.max_x >= 0; actbounds.max_x--)
{
@ -846,7 +846,7 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
break;
}
}
// allocate a new bitmap
bitmap_t *bitmap = NULL;
if (actbounds.max_x >= actbounds.min_x && actbounds.max_y >= actbounds.min_y)
@ -864,7 +864,7 @@ bitmap_t *windows_osd_interface::font_get_bitmap(osd_font font, unicode_char chn
dstrow[x] = ((srcrow[effx / 8] << (effx % 8)) & 0x80) ? MAKE_ARGB(0xff,0xff,0xff,0xff) : MAKE_ARGB(0x00,0xff,0xff,0xff);
}
}
// set the final offset values
xoffs = actbounds.min_x - (50 + abc.abcA);
yoffs = actbounds.max_y - (50 + metrics.tmAscent);

View File

@ -140,30 +140,30 @@ public:
// construction/destruction
windows_osd_interface();
virtual ~windows_osd_interface();
// general overridables
virtual void init(running_machine &machine);
virtual void update(bool skip_redraw);
// debugger overridables
// virtual void init_debugger();
// virtual void init_debugger();
virtual void wait_for_debugger(device_t &device, bool firststop);
// audio overridables
virtual void update_audio_stream(const INT16 *buffer, int samples_this_frame);
virtual void set_mastervolume(int attenuation);
// input overridables
virtual void customize_input_type_list(input_type_desc *typelist);
// font overridables
virtual osd_font font_open(const char *name, int &height);
virtual void font_close(osd_font font);
virtual bitmap_t *font_get_bitmap(osd_font font, unicode_char chnum, INT32 &width, INT32 &xoffs, INT32 &yoffs);
private:
static void osd_exit(running_machine &machine);
static const int DEFAULT_FONT_HEIGHT = 200;
};

View File

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