mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
c0c1fe2f74
@ -2,7 +2,6 @@
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
import string
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
@ -2660,7 +2660,6 @@ def _main(argv):
|
||||
|
||||
# Parse command line arguments
|
||||
from optparse import OptionParser
|
||||
import re
|
||||
version = '%prog ' + __version__
|
||||
parser = OptionParser(version=version)
|
||||
parser.set_usage("%prog [options] [imagefile]")
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
def EmitGroup04_Handle_NZ_Flags(f, funcname, opname):
|
||||
print >>f, " if (result & 0x80000000) { STATUS32_SET_N; }"
|
||||
|
@ -1,8 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys
|
||||
import logging
|
||||
import fileinput
|
||||
import re
|
||||
|
||||
# Initial state
|
||||
|
@ -269,7 +269,7 @@ UINT8 barcode_reader_device::read_code()
|
||||
{
|
||||
if (m_byte_count < m_byte_length)
|
||||
{
|
||||
UINT8 val = m_pixel_data[m_byte_count];
|
||||
UINT8 val = m_byte_data[m_byte_count];
|
||||
m_byte_count++;
|
||||
return val;
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ public:
|
||||
barcode_reader_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
void write_code(const char *barcode, int len);
|
||||
int get_pending_code() { return m_new_code; }
|
||||
int get_byte_length() { return m_byte_length; }
|
||||
UINT8 read_code();
|
||||
int read_pixel();
|
||||
|
||||
|
@ -154,10 +154,9 @@ ui_menu_input_specific::ui_menu_input_specific(running_machine &machine, render_
|
||||
void ui_menu_input_specific::populate()
|
||||
{
|
||||
input_item_data *itemlist = NULL;
|
||||
ioport_field *field;
|
||||
ioport_port *port;
|
||||
int suborder[SEQ_TYPE_TOTAL];
|
||||
astring tempstring;
|
||||
int port_count = 0;
|
||||
|
||||
/* create a mini lookup table for sort order based on sequence type */
|
||||
suborder[SEQ_TYPE_STANDARD] = 0;
|
||||
@ -165,8 +164,10 @@ void ui_menu_input_specific::populate()
|
||||
suborder[SEQ_TYPE_INCREMENT] = 2;
|
||||
|
||||
/* iterate over the input ports and add menu items */
|
||||
for (port = machine().ioport().first_port(); port != NULL; port = port->next())
|
||||
for (field = port->first_field(); field != NULL; field = field->next())
|
||||
for (ioport_port *port = machine().ioport().first_port(); port != NULL; port = port->next())
|
||||
{
|
||||
port_count++;
|
||||
for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
|
||||
{
|
||||
const char *name = field->name();
|
||||
|
||||
@ -182,7 +183,7 @@ void ui_menu_input_specific::populate()
|
||||
{
|
||||
sortorder = (field->type() << 2) | (field->player() << 12);
|
||||
if (strcmp(field->device().tag(), ":"))
|
||||
sortorder |= 0x10000;
|
||||
sortorder |= (port_count & 0xfff) * 0x10000;
|
||||
}
|
||||
else
|
||||
sortorder = field->type() | 0xf000;
|
||||
@ -212,6 +213,7 @@ void ui_menu_input_specific::populate()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* sort and populate the menu in a standard fashion */
|
||||
populate_and_sort(itemlist);
|
||||
|
@ -130,11 +130,10 @@ void ui_menu_sliders::handle()
|
||||
|
||||
void ui_menu_sliders::populate()
|
||||
{
|
||||
const slider_state *curslider;
|
||||
astring tempstring;
|
||||
|
||||
/* add all sliders */
|
||||
for (curslider = machine().ui().get_slider_list(); curslider != NULL; curslider = curslider->next)
|
||||
/* add UI sliders */
|
||||
for (const slider_state *curslider = machine().ui().get_slider_list(); curslider != NULL; curslider = curslider->next)
|
||||
{
|
||||
INT32 curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE);
|
||||
UINT32 flags = 0;
|
||||
@ -148,8 +147,8 @@ void ui_menu_sliders::populate()
|
||||
break;
|
||||
}
|
||||
|
||||
/* add all sliders */
|
||||
for (curslider = (slider_state*)machine().osd().get_slider_list(); curslider != NULL; curslider = curslider->next)
|
||||
/* add OSD sliders */
|
||||
for (const slider_state *curslider = (slider_state*)machine().osd().get_slider_list(); curslider != NULL; curslider = curslider->next)
|
||||
{
|
||||
INT32 curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE);
|
||||
UINT32 flags = 0;
|
||||
|
@ -85,6 +85,7 @@ private:
|
||||
emu_timer *timer1;
|
||||
emu_timer *timer2;
|
||||
UINT8 bank_multi;
|
||||
UINT8 *m_cart_ptr;
|
||||
};
|
||||
|
||||
WRITE8_MEMBER( gamate_state::gamate_cart_protection_w )
|
||||
@ -96,7 +97,7 @@ WRITE8_MEMBER( gamate_state::gamate_cart_protection_w )
|
||||
card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0);
|
||||
card_protection.bit_shifter++;
|
||||
if (card_protection.bit_shifter>=8) {
|
||||
card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++];
|
||||
card_protection.cartridge_byte=m_cart_ptr[card_protection.address++];
|
||||
card_protection.bit_shifter=0;
|
||||
}
|
||||
break;
|
||||
@ -107,7 +108,7 @@ READ8_MEMBER( gamate_state::gamate_cart_protection_r )
|
||||
|
||||
UINT8 ret=1;
|
||||
if (card_protection.bit_shifter==7 && card_protection.unprotected) {
|
||||
ret=m_cart->get_rom_base()[bank_multi*0x4000];
|
||||
ret=m_cart_ptr[bank_multi*0x4000];
|
||||
} else {
|
||||
card_protection.bit_shifter++;
|
||||
if (card_protection.bit_shifter==8) {
|
||||
@ -132,7 +133,7 @@ WRITE8_MEMBER( gamate_state::protection_reset )
|
||||
// writes 0x20
|
||||
card_protection.address=0x6005-0x6001;
|
||||
card_protection.bit_shifter=0;
|
||||
card_protection.cartridge_byte=m_cart->get_rom_base()[card_protection.address++];//m_cart_rom[card_protection.address++];
|
||||
card_protection.cartridge_byte=m_cart_ptr[card_protection.address++];//m_cart_rom[card_protection.address++];
|
||||
card_protection.failed=false;
|
||||
card_protection.unprotected=false;
|
||||
}
|
||||
@ -172,12 +173,12 @@ WRITE8_MEMBER( gamate_state::gamate_video_w )
|
||||
WRITE8_MEMBER( gamate_state::cart_bankswitchmulti_w )
|
||||
{
|
||||
bank_multi=data;
|
||||
membank("bankmulti")->set_base(m_cart->get_rom_base()+0x4000*data+1);
|
||||
membank("bankmulti")->set_base(m_cart_ptr+0x4000*data+1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( gamate_state::cart_bankswitch_w )
|
||||
{
|
||||
membank("bank")->set_base(m_cart->get_rom_base()+0x4000*data);
|
||||
membank("bank")->set_base(m_cart_ptr+0x4000*data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( gamate_state::gamate_video_r )
|
||||
@ -329,8 +330,10 @@ DRIVER_INIT_MEMBER(gamate_state,gamate)
|
||||
|
||||
void gamate_state::machine_start()
|
||||
{
|
||||
m_cart_ptr = memregion("maincpu")->base() + 0x6000;
|
||||
if (m_cart->exists()) {
|
||||
// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
|
||||
m_cart_ptr = m_cart->get_rom_base();
|
||||
membank("bankmulti")->set_base(m_cart->get_rom_base()+1);
|
||||
membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user