diff options
Diffstat (limited to 'src')
475 files changed, 41824 insertions, 21926 deletions
diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp index f47f964f192..c16ee6f2140 100644 --- a/src/devices/bus/a2bus/a2pic.cpp +++ b/src/devices/bus/a2bus/a2pic.cpp @@ -49,11 +49,11 @@ static INPUT_PORTS_START( pic ) PORT_DIPSETTING( 0x06, "13 microseconds" ) PORT_DIPSETTING( 0x07, "15 microseconds" ) - PORT_DIPNAME( 0x08, 0x00, "Strobe polarity (SW4)" ) + PORT_DIPNAME( 0x08, 0x08, "Strobe polarity (SW4)" ) PORT_DIPSETTING( 0x00, "Positive" ) PORT_DIPSETTING( 0x08, "Negative" ) - PORT_DIPNAME( 0x10, 0x00, "Acknowledge polarity (SW5)" ) + PORT_DIPNAME( 0x10, 0x10, "Acknowledge polarity (SW5)" ) PORT_DIPSETTING( 0x00, "Positive" ) PORT_DIPSETTING( 0x10, "Negative" ) @@ -181,13 +181,27 @@ UINT8 a2bus_pic_device::read_cnxx(address_space &space, UINT8 offset) UINT8 a2bus_pic_device::read_c0nx(address_space &space, UINT8 offset) { + UINT8 rv = 0; + switch (offset) { case 3: return m_ctx_data_in->read(); case 4: - return m_ack; + rv = m_ack; + + // clear flip-flop + if (m_dsw1->read() & 0x10) // negative polarity + { + m_ack |= 0x80; + } + else + { + m_ack &= ~0x80; + } + + return rv; case 6: // does reading this really work? m_irqenable = true; diff --git a/src/devices/bus/abcbus/lux10828.cpp b/src/devices/bus/abcbus/lux10828.cpp index 32bc5e619bc..e14bdf9a20e 100644 --- a/src/devices/bus/abcbus/lux10828.cpp +++ b/src/devices/bus/abcbus/lux10828.cpp @@ -310,14 +310,14 @@ WRITE_LINE_MEMBER( luxor_55_10828_device::fdc_intrq_w ) m_fdc_irq = state; m_pio->port_b_write(state << 7); - if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE); + if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, CLEAR_LINE); } WRITE_LINE_MEMBER( luxor_55_10828_device::fdc_drq_w ) { m_fdc_drq = state; - if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE); + if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, CLEAR_LINE); } @@ -654,7 +654,7 @@ READ8_MEMBER( luxor_55_10828_device::fdc_r ) { logerror("Z80 WAIT not supported by MAME core\n"); - m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE); } return m_fdc->gen_r(offset); @@ -671,7 +671,7 @@ WRITE8_MEMBER( luxor_55_10828_device::fdc_w ) { logerror("Z80 WAIT not supported by MAME core\n"); - m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE); } m_fdc->gen_w(offset, data); diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h index fb14b7f09ca..7a37e334ada 100644 --- a/src/devices/bus/amiga/zorro/zorro.h +++ b/src/devices/bus/amiga/zorro/zorro.h @@ -166,8 +166,10 @@ #define MCFG_EXPANSION_SLOT_ADD(_cputag, _slot_intf, _def_slot) \ MCFG_DEVICE_ADD(EXP_SLOT_TAG, EXP_SLOT, 0) \ + device_t *temp = device; \ zorro_device::set_cputag(*device, _cputag); \ - MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot) + MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot) \ + device = temp; // callbacks #define MCFG_EXPANSION_SLOT_OVR_HANDLER(_devcb) \ diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp index fc7d557d928..77a130b26bf 100644 --- a/src/devices/bus/centronics/epson_lx810l.cpp +++ b/src/devices/bus/centronics/epson_lx810l.cpp @@ -26,7 +26,7 @@ */ #include "epson_lx810l.h" -extern const char layout_lx800[]; /* use layout from lx800 */ +//extern const char layout_lx800[]; /* use layout from lx800 */ //#define LX810LDEBUG #ifdef LX810LDEBUG @@ -132,7 +132,7 @@ static MACHINE_CONFIG_FRAGMENT( epson_lx810l ) MCFG_UPD7810_CO0(WRITELINE(epson_lx810l_t, co0_w)) MCFG_UPD7810_CO1(WRITELINE(epson_lx810l_t, co1_w)) - MCFG_DEFAULT_LAYOUT(layout_lx800) +// MCFG_DEFAULT_LAYOUT(layout_lx800) /* video hardware (simulates paper) */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp index 2cb640e91d5..371526d29ee 100644 --- a/src/devices/bus/isa/3c505.cpp +++ b/src/devices/bus/isa/3c505.cpp @@ -26,8 +26,6 @@ static int verbose = VERBOSE; #define LOG1(d,x) { if (verbose > 0) LOG(d,x)} #define LOG2(d,x) { if (verbose > 1) LOG(d,x)} -#define MAINCPU "maincpu" - #ifdef LSB_FIRST static UINT16 uint16_to_le(UINT16 value) { @@ -424,7 +422,7 @@ const char *threecom3c505_device::cpu_context() { static char statebuf[64]; /* string buffer containing state description */ - device_t *cpu = machine().device(MAINCPU); + device_t *cpu = machine().firstcpu; osd_ticks_t t = osd_ticks(); int s = t / osd_ticks_per_second(); int ms = (t % osd_ticks_per_second()) / 1000; @@ -442,6 +440,18 @@ const char *threecom3c505_device::cpu_context() return statebuf; } +/*------------------------------------------------- + logerror - log an error message (w/o device tags) + -------------------------------------------------*/ + +void threecom3c505_device::logerror(const char *format, ...) const +{ + va_list arg; + va_start(arg, format); + machine().vlogerror(format, arg); + va_end(arg); +} + //************************************************************************** // data_buffer //************************************************************************** @@ -855,8 +865,8 @@ void threecom3c505_device::do_receive_command() void threecom3c505_device::set_command_pending(int state) { - LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d%s", - m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending, state ? "" :"\n")); + LOG2(this,("set_command_pending %d -> %d m_wait_for_ack=%d m_wait_for_nak=%d m_rx_pending=%d", + m_command_pending, state, m_wait_for_ack, m_wait_for_nak, m_rx_pending)); //- verbose = onoff ? 1 : 2; @@ -1657,7 +1667,7 @@ void threecom3c505_device::set_verbose(int on_off) int threecom3c505_device::tx_data(device_t *device, const UINT8 data[], int length) { - LOG1(device,("threecom3c505_device::tx_data length=%d", length)); + LOG1(this,("threecom3c505_device::tx_data length=%d", length)); return 1; } diff --git a/src/devices/bus/isa/3c505.h b/src/devices/bus/isa/3c505.h index e31317792da..80cdd496a03 100644 --- a/src/devices/bus/isa/3c505.h +++ b/src/devices/bus/isa/3c505.h @@ -143,6 +143,7 @@ protected: virtual int setfilter(device_t *, int); const char *cpu_context(); + void logerror(const char *format, ...) const; // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp index 5f42c31200b..a1379bc229d 100644 --- a/src/devices/bus/isa/omti8621.cpp +++ b/src/devices/bus/isa/omti8621.cpp @@ -73,6 +73,10 @@ protected: virtual void device_reset() override; void omti_disk_config(UINT16 disk_type); + +private: + void logerror(const char *format, ...) const; + public: UINT16 m_type; UINT16 m_cylinders; @@ -685,6 +689,18 @@ void omti8621_device::set_esdi_defect_list(UINT8 lun, UINT8 head) memset(disk->m_esdi_defect_list+6, 0xff, 5); // end of defect list } +/*------------------------------------------------- + logerror - log an error message (w/o device tags) + -------------------------------------------------*/ + +void omti8621_device::logerror(const char *format, ...) const +{ + va_list arg; + va_start(arg, format); + machine().vlogerror(format, arg); + va_end(arg); +} + /*************************************************************************** log_command - log command from a command descriptor block ***************************************************************************/ @@ -693,83 +709,80 @@ void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length) { if (verbose > 0) { int i; - char sb[100]; - std::string text(cpu_context(this)); - text += ": OMTI command "; + logerror("%s: OMTI command ", cpu_context(this)); switch (cdb[0]) { case OMTI_CMD_TEST_DRIVE_READY: // 0x00 - text += "Test Drive Ready"; + logerror("Test Drive Ready"); break; case OMTI_CMD_RECALIBRATE: // 0x01 - text += "Recalibrate"; + logerror("Recalibrate"); break; case OMTI_CMD_REQUEST_SENSE: // 0x03 - text += "Request Sense"; + logerror("Request Sense"); break; case OMTI_CMD_READ_VERIFY: // 0x05 - text += "Read Verify"; + logerror("Read Verify"); break; case OMTI_CMD_FORMAT_TRACK: // 0x06 - text += "Format Track"; + logerror("Format Track"); break; case OMTI_CMD_FORMAT_BAD_TRACK: // 0x07 - text += "Format Bad Track"; + logerror("Format Bad Track"); break; case OMTI_CMD_READ: // 0x08 - text += "Read"; + logerror("Read"); break; case OMTI_CMD_WRITE: // 0x0A - text += "Write"; + logerror("Write"); break; case OMTI_CMD_SEEK: // 0x0B - text += "Seek"; + logerror("Seek"); break; case OMTI_CMD_READ_SECTOR_BUFFER: // 0x0E - text += "Read Sector Buffer"; + logerror("Read Sector Buffer"); break; case OMTI_CMD_WRITE_SECTOR_BUFFER: // 0x0F - text += "Write Sector Buffer"; + logerror("Write Sector Buffer"); break; case OMTI_CMD_ASSIGN_ALTERNATE_TRACK: // 0x11 - text += "Assign Alternate Track"; + logerror("Assign Alternate Track"); break; case OMTI_CMD_READ_DATA_TO_BUFFER: // 0x1E - text += "Read Data to Buffer"; + logerror("Read Data to Buffer"); break; case OMTI_CMD_WRITE_DATA_FROM_BUFFER: // 0x1F - text += "Write Data from Buffer"; + logerror("Write Data from Buffer"); break; case OMTI_CMD_COPY: // 0x20 - text += "Copy"; + logerror("Copy"); break; case OMTI_CMD_READ_ESDI_DEFECT_LIST: // 0x37 - text += "Read ESDI Defect List"; + logerror("Read ESDI Defect List"); break; case OMTI_CMD_RAM_DIAGNOSTICS: // 0xE0 - text += "RAM. Diagnostic"; + logerror("RAM. Diagnostic"); break; case OMTI_CMD_CONTROLLER_INT_DIAGNOSTIC: // 0xE4 - text += "Controller Int. Diagnostic"; + logerror("Controller Int. Diagnostic"); break; case OMTI_CMD_READ_LONG: // 0xE5 - text += "Read Long"; + logerror("Read Long"); break; case OMTI_CMD_WRITE_LONG: // 0xE6 - text += "Write Long"; + logerror("Write Long"); break; case OMTI_CMD_READ_CONFIGURATION: // 0xEC - text += "Read Configuration"; + logerror("Read Configuration"); break; case OMTI_CMD_INVALID_COMMAND: // 0xFF - text += "Invalid Command"; + logerror("Invalid Command"); break; default: - text += "!!! Unexpected Command !!!"; + logerror("!!! Unexpected Command !!!"); } // logerror(" (%02x, length=%02x)", cdb[0], cdb_length); for (i = 0; i < cdb_length; i++) { - sprintf(sb, " %02x", cdb[i]); - text += sb; + logerror(" %02x", cdb[i]); } switch (cdb[0]) { @@ -780,12 +793,10 @@ void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length) case OMTI_CMD_READ_DATA_TO_BUFFER: // 0x1E case OMTI_CMD_WRITE_DATA_FROM_BUFFER: // 0x1F case OMTI_CMD_COPY: // 0x20 - sprintf(sb, " (diskaddr=%x count=%x)", get_disk_address(cdb), cdb[4]); - text += sb; + logerror(" (diskaddr=%x count=%x)", get_disk_address(cdb), cdb[4]); break; } - text += "\n"; - logerror(text.c_str()); + logerror("\n"); } } @@ -795,25 +806,18 @@ void omti8621_device::log_command(const UINT8 cdb[], const UINT16 cdb_length) void omti8621_device::log_data() { - if (verbose > 0) - { + if (verbose > 0) { int i; - char sb[100]; - sprintf(sb, "%s: OMTI data (length=%02x)", cpu_context(this), + logerror("%s: OMTI data (length=%02x)", cpu_context(this), data_length); - std::string text(sb); - for (i = 0; i < data_length && i < OMTI_DISK_SECTOR_SIZE; i++) - { - sprintf(sb, " %02x", data_buffer[i]); - text += sb; + for (i = 0; i < data_length && i < OMTI_DISK_SECTOR_SIZE; i++) { + logerror(" %02x", data_buffer[i]); } - if (i < data_length) - { - text += " ..."; + if (i < data_length) { + logerror(" ..."); } - text += "\n"; - logerror(text.c_str()); + logerror("\n"); } } @@ -1351,6 +1355,18 @@ void omti_disk_image_device::omti_disk_config(UINT16 disk_type) } /*------------------------------------------------- + logerror - log an error message (w/o device tags) + -------------------------------------------------*/ + +void omti_disk_image_device::logerror(const char *format, ...) const +{ + va_list arg; + va_start(arg, format); + machine().vlogerror(format, arg); + va_end(arg); +} + +/*------------------------------------------------- device start callback -------------------------------------------------*/ diff --git a/src/devices/bus/isa/omti8621.h b/src/devices/bus/isa/omti8621.h index 04dff836316..7554df8ddf6 100644 --- a/src/devices/bus/isa/omti8621.h +++ b/src/devices/bus/isa/omti8621.h @@ -114,6 +114,9 @@ private: void copy_sectors(INT32 dst_addr, INT32 src_addr, UINT8 count, UINT8 lun); void format_track(const UINT8 * cdb); void set_esdi_defect_list(UINT8 lun, UINT8 head); + + void logerror(const char *format, ...) const; + void log_command(const UINT8 cdb[], const UINT16 cdb_length); void log_data(); void do_command(const UINT8 cdb[], const UINT16 cdb_length); diff --git a/src/devices/bus/isa/sc499.cpp b/src/devices/bus/isa/sc499.cpp index 4effacb3394..3d94caa2b2c 100644 --- a/src/devices/bus/isa/sc499.cpp +++ b/src/devices/bus/isa/sc499.cpp @@ -409,16 +409,37 @@ const char *sc499_device::cpu_context() { static char statebuf[64]; /* string buffer containing state description */ + device_t *cpu = machine().firstcpu; osd_ticks_t t = osd_ticks(); int s = t / osd_ticks_per_second(); int ms = (t % osd_ticks_per_second()) / 1000; - sprintf(statebuf, "%d.%03d%s:", s, ms, tag()); - + /* if we have an executing CPU, output data */ + if (cpu != nullptr) + { + sprintf(statebuf, "%d.%03d %s pc=%08x - %s", s, ms, cpu->tag(), + cpu->safe_pcbase(), tag()); + } + else + { + sprintf(statebuf, "%d.%03d", s, ms); + } return statebuf; } /*------------------------------------------------- + logerror - log an error message (w/o device tags) + -------------------------------------------------*/ + +void sc499_device::logerror(const char *format, ...) const +{ + va_list arg; + va_start(arg, format); + machine().vlogerror(format, arg); + va_end(arg); +} + +/*------------------------------------------------- tape_status_clear - clear bits in tape status -------------------------------------------------*/ diff --git a/src/devices/bus/isa/sc499.h b/src/devices/bus/isa/sc499.h index 8c63f810073..2b5b1ddaa6a 100644 --- a/src/devices/bus/isa/sc499.h +++ b/src/devices/bus/isa/sc499.h @@ -80,6 +80,7 @@ private: virtual void eop_w(int state) override; const char *cpu_context(); + void logerror(const char *format, ...) const; void tape_status_clear(UINT16 value); void tape_status_set(UINT16 value); diff --git a/src/devices/bus/m5/rom.cpp b/src/devices/bus/m5/rom.cpp new file mode 100644 index 00000000000..bffd33df541 --- /dev/null +++ b/src/devices/bus/m5/rom.cpp @@ -0,0 +1,63 @@ +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli +/*********************************************************************************************************** + + + M5 cart emulation + + + ***********************************************************************************************************/ + + +#include "emu.h" +#include "rom.h" + + +//------------------------------------------------- +// m5_rom_device - constructor +//------------------------------------------------- + +const device_type M5_ROM_STD = &device_creator<m5_rom_device>; +const device_type M5_ROM_RAM = &device_creator<m5_ram_device>; + + +m5_rom_device::m5_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_m5_cart_interface( mconfig, *this ) +{ +} + +m5_rom_device::m5_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, M5_ROM_STD, "M5 Standard ROM Carts", tag, owner, clock, "m5_rom", __FILE__), + device_m5_cart_interface( mconfig, *this ) +{ +} + + +m5_ram_device::m5_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : m5_rom_device(mconfig, M5_ROM_RAM, "M5 Expansion memory cart", tag, owner, clock, "m5_ram", __FILE__) +{ +} + + +/*------------------------------------------------- + mapper specific handlers + -------------------------------------------------*/ + +READ8_MEMBER(m5_rom_device::read_rom) +{ + if (offset < m_rom_size) + return m_rom[offset]; + else + return 0xff; +} + +READ8_MEMBER(m5_ram_device::read_ram) +{ + return m_ram[offset]; +} + +WRITE8_MEMBER(m5_ram_device::write_ram) +{ + m_ram[offset] = data; +} diff --git a/src/devices/bus/m5/rom.h b/src/devices/bus/m5/rom.h new file mode 100644 index 00000000000..dedd7555f1c --- /dev/null +++ b/src/devices/bus/m5/rom.h @@ -0,0 +1,50 @@ +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli +#ifndef __M5_ROM_H +#define __M5_ROM_H + +#include "slot.h" + + +// ======================> m5_rom_device + +class m5_rom_device : public device_t, + public device_m5_cart_interface +{ +public: + // construction/destruction + m5_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + m5_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start() override {} + virtual void device_reset() override {} + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_rom) override; +}; + +// ======================> m5_ram_device + +class m5_ram_device : public m5_rom_device +{ +public: + // construction/destruction + m5_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start() override {} + virtual void device_reset() override {} + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_ram) override; + virtual DECLARE_WRITE8_MEMBER(write_ram) override; +}; + + +// device type definition +extern const device_type M5_ROM_STD; +extern const device_type M5_ROM_RAM; + + +#endif diff --git a/src/devices/bus/m5/slot.cpp b/src/devices/bus/m5/slot.cpp new file mode 100644 index 00000000000..162d802136e --- /dev/null +++ b/src/devices/bus/m5/slot.cpp @@ -0,0 +1,276 @@ +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli +/*********************************************************************************************************** + + M5 cart emulation + (through slot devices) + + ***********************************************************************************************************/ + + +#include "emu.h" +#include "slot.h" + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +const device_type M5_CART_SLOT = &device_creator<m5_cart_slot_device>; + +//************************************************************************** +// M5 Cartridges Interface +//************************************************************************** + +//------------------------------------------------- +// device_m5_cart_interface - constructor +//------------------------------------------------- + +device_m5_cart_interface::device_m5_cart_interface(const machine_config &mconfig, device_t &device) + : device_slot_card_interface(mconfig, device), + m_rom(NULL), + m_rom_size(0) +{ +} + + +//------------------------------------------------- +// ~device_m5_cart_interface - destructor +//------------------------------------------------- + +device_m5_cart_interface::~device_m5_cart_interface() +{ +} + +//------------------------------------------------- +// rom_alloc - alloc the space for the cart +//------------------------------------------------- + +void device_m5_cart_interface::rom_alloc(UINT32 size, const char *tag) +{ + if (m_rom == NULL) + { + m_rom = device().machine().memory().region_alloc(std::string(tag).append(M5SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom_size = size; + } +} + + +//------------------------------------------------- +// ram_alloc - alloc the space for the ram +//------------------------------------------------- + +void device_m5_cart_interface::ram_alloc(UINT32 size) +{ + m_ram.resize(size); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// m5_cart_slot_device - constructor +//------------------------------------------------- +m5_cart_slot_device::m5_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, M5_CART_SLOT, "M5 Cartridge Slot", tag, owner, clock, "m5_cart_slot", __FILE__), + device_image_interface(mconfig, *this), + device_slot_interface(mconfig, *this), + m_type(M5_STD), m_cart(nullptr) +{ +} + + +//------------------------------------------------- +// m5_cart_slot_device - destructor +//------------------------------------------------- + +m5_cart_slot_device::~m5_cart_slot_device() +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void m5_cart_slot_device::device_start() +{ + m_cart = dynamic_cast<device_m5_cart_interface *>(get_card_device()); +} + +//------------------------------------------------- +// device_config_complete - perform any +// operations now that the configuration is +// complete +//------------------------------------------------- + +void m5_cart_slot_device::device_config_complete() +{ + // set brief and instance name + update_names(); +} + + +//------------------------------------------------- +// M5 PCB +//------------------------------------------------- + +struct m5_slot +{ + int pcb_id; + const char *slot_option; +}; + +// Here, we take the feature attribute from .xml (i.e. the PCB name) and we assign a unique ID to it +static const m5_slot slot_list[] = +{ + {EM_5,"em-5"}, + {MEM64KBI,"64kbi"}, + {MEM64KBF,"64kbf"}, + {MEM64KRX,"64krx"} +}; + +static int m5_get_pcb_id(const char *slot) +{ + for (int i = 0; i < ARRAY_LENGTH(slot_list); i++) + { + if (!core_stricmp(slot_list[i].slot_option, slot)) + return slot_list[i].pcb_id; + } + + return 0; +} + +static const char *m5_get_slot(int type) +{ + for (int i = 0; i < ARRAY_LENGTH(slot_list); i++) + { + if (slot_list[i].pcb_id == type) + return slot_list[i].slot_option; + } + + return "std"; +} + + +/*------------------------------------------------- + call load + -------------------------------------------------*/ + +bool m5_cart_slot_device::call_load() +{ + if (m_cart) + { + m_type=M5_STD; + + if (software_entry() != NULL) + { + const char *pcb_name = get_feature("slot"); + //software_info *name=m_software_info_ptr; + if (pcb_name) //is it ram cart? + m_type = m5_get_pcb_id(m_full_software_name.c_str()); + else + m_type=M5_STD; //standard cart(no feature line in xml) + } + + if (m_type == M5_STD || m_type>2) //carts with roms + { + + UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom"); + + if (size > 0x5000 && m_type == M5_STD) + { + seterror(IMAGE_ERROR_UNSPECIFIED, "Image extends beyond the expected size for an M5 cart"); + return IMAGE_INIT_FAIL; + } + + m_cart->rom_alloc(size, tag()); + + if (software_entry() == NULL) + fread(m_cart->get_rom_base(), size); + else + memcpy(m_cart->get_rom_base(), get_software_region("rom"), size); + + } + if (!M5_STD) + if (get_software_region("ram")) + m_cart->ram_alloc(get_software_region_length("ram")); + + + //printf("Type: %s\n", m5_get_slot(m_type)); + } + + return IMAGE_INIT_PASS; +} + + +/*------------------------------------------------- + call softlist load + -------------------------------------------------*/ + +bool m5_cart_slot_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) +{ + machine().rom_load().load_software_part_region(*this, swlist, swname, start_entry); + return TRUE; +} + + +/*------------------------------------------------- + get default card software + -------------------------------------------------*/ + +std::string m5_cart_slot_device::get_default_card_software() +{ + std::string result; + if (open_image_file(mconfig().options())) + { + const char *slot_string = "std"; + //UINT32 size = core_fsize(m_file); + int type = M5_STD; + + + slot_string = m5_get_slot(type); + + //printf("type: %s\n", slot_string); + clear(); + + result.assign(slot_string); + return result; + } + + return software_get_default_slot("std"); +} + +/*------------------------------------------------- + read + -------------------------------------------------*/ + +READ8_MEMBER(m5_cart_slot_device::read_rom) +{ + if (m_cart) + return m_cart->read_rom(space, offset); + else + return 0xff; +} + +/*------------------------------------------------- + read + -------------------------------------------------*/ + +READ8_MEMBER(m5_cart_slot_device::read_ram) +{ + if (m_cart) + return m_cart->read_ram(space, offset); + else + return 0xff; +} + +/*------------------------------------------------- + write + -------------------------------------------------*/ + +WRITE8_MEMBER(m5_cart_slot_device::write_ram) +{ + if (m_cart) + m_cart->write_ram(space, offset, data); +} diff --git a/src/devices/bus/m5/slot.h b/src/devices/bus/m5/slot.h new file mode 100644 index 00000000000..177977043cf --- /dev/null +++ b/src/devices/bus/m5/slot.h @@ -0,0 +1,118 @@ +// license:BSD-3-Clause +// copyright-holders:Fabio Priuli +#ifndef __M5_SLOT_H +#define __M5_SLOT_H + +/*************************************************************************** + TYPE DEFINITIONS + ***************************************************************************/ + + +/* PCB */ +enum +{ + EM_5 = 1, + MEM64KBI, + MEM64KBF, + MEM64KRX +}; + + +#define M5_STD 0 + + +// ======================> device_m5_cart_interface + +class device_m5_cart_interface : public device_slot_card_interface +{ +public: + // construction/destruction + device_m5_cart_interface(const machine_config &mconfig, device_t &device); + virtual ~device_m5_cart_interface(); + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_rom) { return 0xff; } + virtual DECLARE_READ8_MEMBER(read_ram) { return 0xff; } + virtual DECLARE_WRITE8_MEMBER(write_ram) {} + + void rom_alloc(UINT32 size, const char *tag); + void ram_alloc(UINT32 size); + UINT8* get_rom_base() { return m_rom; } + UINT8* get_ram_base() { return &m_ram[0]; } + UINT32 get_rom_size() { return m_rom_size; } + UINT32 get_ram_size() { return m_ram.size(); } + + void save_ram() { device().save_item(NAME(m_ram)); } + +protected: + // internal state + UINT8 *m_rom; + UINT32 m_rom_size; + dynamic_buffer m_ram; +}; + + +// ======================> m5_cart_slot_device + +class m5_cart_slot_device : public device_t, + public device_image_interface, + public device_slot_interface +{ +public: + // construction/destruction + m5_cart_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + virtual ~m5_cart_slot_device(); + + // device-level overrides + virtual void device_start() override; + virtual void device_config_complete() override; + + // image-level overrides + virtual bool call_load() override; + virtual void call_unload() override {} + virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override; + + int get_type() { return m_type; } + + void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); } + + virtual iodevice_t image_type() const override { return IO_CARTSLOT; } + virtual bool is_readable() const override { return 1; } + virtual bool is_writeable() const override { return 0; } + virtual bool is_creatable() const override { return 0; } + virtual bool must_be_loaded() const override { return 0; } + virtual bool is_reset_on_load() const override { return 1; } + virtual const option_guide *create_option_guide() const override { return NULL; } + virtual const char *image_interface() const override { return "m5_cart"; } + virtual const char *file_extensions() const override { return "bin,rom"; } + + // slot interface overrides + virtual std::string get_default_card_software() override; + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_rom); + virtual DECLARE_READ8_MEMBER(read_ram); + virtual DECLARE_WRITE8_MEMBER(write_ram); + +protected: + + int m_type; + device_m5_cart_interface* m_cart; +}; + + + +// device type definition +extern const device_type M5_CART_SLOT; + + +/*************************************************************************** + DEVICE CONFIGURATION MACROS + ***************************************************************************/ + +#define M5SLOT_ROM_REGION_TAG ":cart:rom" + +#define MCFG_M5_CARTRIDGE_ADD(_tag,_slot_intf,_def_slot) \ + MCFG_DEVICE_ADD(_tag, M5_CART_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) +#endif diff --git a/src/devices/bus/neogeo/bootleg_prot.cpp b/src/devices/bus/neogeo/bootleg_prot.cpp index 8c023f00091..145e17efa0b 100644 --- a/src/devices/bus/neogeo/bootleg_prot.cpp +++ b/src/devices/bus/neogeo/bootleg_prot.cpp @@ -142,8 +142,7 @@ WRITE16_MEMBER( ngbootleg_prot_device::kof10th_custom_w ) //UINT16 *prom = (UINT16*)m_mainrom; COMBINE_DATA(&m_cartridge_ram2[(0x00000/2) + (offset & 0xFFFF)]); } else { // Write S data on-the-fly - UINT8 *srom = m_fixedrom; - srom[offset] = BITSWAP8(data,7,6,0,4,3,2,1,5); + m_fixedrom[offset] = BITSWAP8(data,7,6,0,4,3,2,1,5); } } @@ -173,6 +172,7 @@ void ngbootleg_prot_device::install_kof10th_protection (cpu_device* maincpu, neo maincpu->space(AS_PROGRAM).install_write_handler(0x240000, 0x2fffff, write16_delegate(FUNC(ngbootleg_prot_device::kof10th_bankswitch_w),this)); memcpy(m_cartridge_ram2, cpurom + 0xe0000, 0x20000); + save_pointer(NAME(m_fixedrom), 0x40000); } void ngbootleg_prot_device::decrypt_kof10th(UINT8* cpurom, UINT32 cpurom_size) diff --git a/src/devices/bus/ti99_peb/bwg.cpp b/src/devices/bus/ti99_peb/bwg.cpp index 4085dcfe230..4716ccedf8a 100644 --- a/src/devices/bus/ti99_peb/bwg.cpp +++ b/src/devices/bus/ti99_peb/bwg.cpp @@ -151,7 +151,7 @@ SETADDRESS_DBIN_MEMBER( snug_bwg_device::setaddress_dbin ) && ((state==ASSERT_LINE && ((m_address & 0x1ff8)==0x1ff0)) // read || (state==CLEAR_LINE && ((m_address & 0x1ff8)==0x1ff8))); // write - m_WDsel = m_WDsel0 && ((m_address & 1)==0); + m_WDsel = m_WDsel0 && WORD_ALIGNED(m_address); // Is the RTC selected on the card? (even addr) m_RTCsel = m_inDsrArea && m_rtc_enabled && ((m_address & 0x1fe1)==0x1fe0); diff --git a/src/devices/bus/ti99_peb/hfdc.cpp b/src/devices/bus/ti99_peb/hfdc.cpp index c3e4779c1ef..46ca7a1b819 100644 --- a/src/devices/bus/ti99_peb/hfdc.cpp +++ b/src/devices/bus/ti99_peb/hfdc.cpp @@ -232,7 +232,7 @@ READ8Z_MEMBER(myarc_hfdc_device::readz) if (m_dip == CLEAR_LINE) *value = m_buffer_ram[(m_ram_page[bank]<<10) | (m_address & 0x03ff)]; if (TRACE_RAM) { - if ((m_address & 1)==0) // only show even addresses with words + if (WORD_ALIGNED(m_address)) { int valword = (((*value) << 8) | m_buffer_ram[(m_ram_page[bank]<<10) | ((m_address+1) & 0x03ff)])&0xffff; logerror("%s: %04x[%02x] -> %04x\n", tag(), m_address & 0xffff, m_ram_page[bank], valword); @@ -246,7 +246,7 @@ READ8Z_MEMBER(myarc_hfdc_device::readz) *value = m_dsrrom[(m_rom_page << 12) | (m_address & 0x0fff)]; if (TRACE_ROM) { - if ((m_address & 1)==0) // only show even addresses with words + if (WORD_ALIGNED(m_address)) { int valword = (((*value) << 8) | m_dsrrom[(m_rom_page << 12) | ((m_address + 1) & 0x0fff)])&0xffff; logerror("%s: %04x[%02x] -> %04x\n", tag(), m_address & 0xffff, m_rom_page, valword); diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp index a3538dee290..653f56949e5 100644 --- a/src/devices/cpu/alto2/alto2cpu.cpp +++ b/src/devices/cpu/alto2/alto2cpu.cpp @@ -204,7 +204,9 @@ alto2_cpu_device::alto2_cpu_device(const machine_config& mconfig, const char* ta m_ether_a49(nullptr), m_eth() { - m_is_octal = true; + m_ucode_config.m_is_octal = true; + m_const_config.m_is_octal = true; + m_iomem_config.m_is_octal = true; memset(m_task_mpc, 0x00, sizeof(m_task_mpc)); memset(m_task_next2, 0x00, sizeof(m_task_next2)); memset(m_r, 0x00, sizeof(m_r)); diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp index 41724668f53..34dc1635639 100644 --- a/src/devices/cpu/arm/arm.cpp +++ b/src/devices/cpu/arm/arm.cpp @@ -259,7 +259,7 @@ void arm_cpu_device::cpu_write32( int addr, UINT32 data ) { /* Unaligned writes are treated as normal writes */ m_program->write_dword(addr&ADDRESS_MASK,data); - if (ARM_DEBUG_CORE && addr&3) logerror("%08x: Unaligned write %08x\n",R15,addr); + if (ARM_DEBUG_CORE && !DWORD_ALIGNED(addr)) logerror("%08x: Unaligned write %08x\n",R15,addr); } void arm_cpu_device::cpu_write8( int addr, UINT8 data ) @@ -272,9 +272,9 @@ UINT32 arm_cpu_device::cpu_read32( int addr ) UINT32 result = m_program->read_dword(addr&ADDRESS_MASK); /* Unaligned reads rotate the word, they never combine words */ - if (addr&3) + if (!DWORD_ALIGNED(addr)) { - if (ARM_DEBUG_CORE && addr&1) + if (ARM_DEBUG_CORE && !WORD_ALIGNED(addr)) logerror("%08x: Unaligned byte read %08x\n",R15,addr); if ((addr&3)==1) diff --git a/src/devices/cpu/asap/asap.cpp b/src/devices/cpu/asap/asap.cpp index c22d0cdcee2..b369ab6d07b 100644 --- a/src/devices/cpu/asap/asap.cpp +++ b/src/devices/cpu/asap/asap.cpp @@ -364,7 +364,7 @@ inline UINT8 asap_device::readbyte(offs_t address) inline UINT16 asap_device::readword(offs_t address) { // aligned reads are easy - if (!(address & 1)) + if (WORD_ALIGNED(address)) return m_program->read_word(address); // misaligned reads are tricky @@ -379,7 +379,7 @@ inline UINT16 asap_device::readword(offs_t address) inline UINT32 asap_device::readlong(offs_t address) { // aligned reads are easy - if (!(address & 3)) + if (DWORD_ALIGNED(address)) return m_program->read_dword(address); // misaligned reads are tricky @@ -405,7 +405,7 @@ inline void asap_device::writebyte(offs_t address, UINT8 data) inline void asap_device::writeword(offs_t address, UINT16 data) { // aligned writes are easy - if (!(address & 1)) + if (WORD_ALIGNED(address)) { m_program->write_word(address, data); return; @@ -429,7 +429,7 @@ inline void asap_device::writeword(offs_t address, UINT16 data) inline void asap_device::writelong(offs_t address, UINT32 data) { // aligned writes are easy - if (!(address & 3)) + if (DWORD_ALIGNED(address)) { m_program->write_dword(address, data); return; diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp index f060e81d13c..98640f7d1b4 100644 --- a/src/devices/cpu/dsp32/dsp32.cpp +++ b/src/devices/cpu/dsp32/dsp32.cpp @@ -452,7 +452,8 @@ inline void dsp32c_device::WBYTE(offs_t addr, UINT8 data) inline UINT16 dsp32c_device::RWORD(offs_t addr) { #if DETECT_MISALIGNED_MEMORY - if (addr & 1) fprintf(stderr, "Unaligned word read @ %06X, PC=%06X\n", addr, PC); + if (!WORD_ALIGNED(addr)) + osd_printf_error("Unaligned word read @ %06X, PC=%06X\n", addr, PC); #endif return m_program->read_word(addr); } @@ -460,7 +461,8 @@ inline UINT16 dsp32c_device::RWORD(offs_t addr) inline UINT32 dsp32c_device::RLONG(offs_t addr) { #if DETECT_MISALIGNED_MEMORY - if (addr & 3) fprintf(stderr, "Unaligned long read @ %06X, PC=%06X\n", addr, PC); + if (!DWORD_ALIGNED(addr)) + osd_printf_error("Unaligned long read @ %06X, PC=%06X\n", addr, PC); #endif return m_program->read_dword(addr); } @@ -468,7 +470,8 @@ inline UINT32 dsp32c_device::RLONG(offs_t addr) inline void dsp32c_device::WWORD(offs_t addr, UINT16 data) { #if DETECT_MISALIGNED_MEMORY - if (addr & 1) fprintf(stderr, "Unaligned word write @ %06X, PC=%06X\n", addr, PC); + if (!WORD_ALIGNED(addr)) + osd_printf_error("Unaligned word write @ %06X, PC=%06X\n", addr, PC); #endif m_program->write_word(addr, data); } @@ -476,7 +479,8 @@ inline void dsp32c_device::WWORD(offs_t addr, UINT16 data) inline void dsp32c_device::WLONG(offs_t addr, UINT32 data) { #if DETECT_MISALIGNED_MEMORY - if (addr & 3) fprintf(stderr, "Unaligned long write @ %06X, PC=%06X\n", addr, PC); + if (!DWORD_ALIGNED(addr)) + osd_printf_error("Unaligned long write @ %06X, PC=%06X\n", addr, PC); #endif m_program->write_dword(addr, data); } diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp index bc78626b00b..ba8b853e9ec 100644 --- a/src/devices/cpu/h8/h8.cpp +++ b/src/devices/cpu/h8/h8.cpp @@ -281,7 +281,7 @@ void h8_device::disassemble_am(char *&buffer, int am, offs_t pc, const UINT8 *op "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", }; - static const char *const r32_names[88] = { + static const char *const r32_names[8] = { "er0", "er1", "er2", "er3", "er4", "er5", "er6", "sp", }; diff --git a/src/devices/cpu/hd61700/hd61700.cpp b/src/devices/cpu/hd61700/hd61700.cpp index c786c7235ba..4e8d2c6590d 100644 --- a/src/devices/cpu/hd61700/hd61700.cpp +++ b/src/devices/cpu/hd61700/hd61700.cpp @@ -2654,7 +2654,7 @@ void hd61700_cpu_device::execute_run() } //if is in the internal ROM align the pc - if ((m_fetch_addr&1) && m_pc < INT_ROM) + if (!WORD_ALIGNED(m_fetch_addr) && m_pc < INT_ROM) set_pc((m_fetch_addr+1)>>1); m_icount -= 3; @@ -2871,7 +2871,7 @@ inline void hd61700_cpu_device::check_optional_jr(UINT8 arg) { if (arg & 0x80) { - if (m_pc < INT_ROM && !(m_fetch_addr&1)) read_op(); + if (m_pc < INT_ROM && WORD_ALIGNED(m_fetch_addr)) read_op(); UINT8 arg1 = read_op(); diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp index 052c7058604..71aec796760 100644 --- a/src/devices/cpu/hphybrid/hphybrid.cpp +++ b/src/devices/cpu/hphybrid/hphybrid.cpp @@ -673,12 +673,7 @@ UINT16 hp_hybrid_cpu_device::RM(UINT32 addr) return RIO(CURRENT_PA , addr_wo_bsc - HP_REG_R4_ADDR); case HP_REG_IV_ADDR: - // Correct? - if (!BIT(m_flags , HPHYBRID_IRH_SVC_BIT) && !BIT(m_flags , HPHYBRID_IRL_SVC_BIT)) { - return m_reg_IV; - } else { - return m_reg_IV | CURRENT_PA; - } + return m_reg_IV; case HP_REG_PA_ADDR: return CURRENT_PA; @@ -1021,7 +1016,7 @@ void hp_hybrid_cpu_device::check_for_interrupts(void) // Do a double-indirect JSM IV,I instruction WM(AEC_CASE_C , ++m_reg_R , m_reg_P); - m_reg_P = RM(AEC_CASE_I , RM(HP_REG_IV_ADDR)); + m_reg_P = RM(AEC_CASE_I , m_reg_IV + CURRENT_PA); m_reg_I = fetch(); } diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp index f0d57ada9a0..4f593de3dea 100644 --- a/src/devices/cpu/i386/i386.cpp +++ b/src/devices/cpu/i386/i386.cpp @@ -41,23 +41,31 @@ const device_type PENTIUM4 = &device_creator<pentium4_device>; i386_device::i386_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : cpu_device(mconfig, I386, "I386", tag, owner, clock, "i386", __FILE__) + , device_vtlb_interface(mconfig, *this, AS_PROGRAM) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) , m_io_config("io", ENDIANNESS_LITTLE, 32, 16, 0) , m_smiact(*this) { m_program_config.m_logaddr_width = 32; m_program_config.m_page_shift = 12; + + // 32 unified + set_vtlb_dynamic_entries(32); } i386_device::i386_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, int program_data_width, int program_addr_width, int io_data_width) : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) + , device_vtlb_interface(mconfig, *this, AS_PROGRAM) , m_program_config("program", ENDIANNESS_LITTLE, program_data_width, program_addr_width, 0) , m_io_config("io", ENDIANNESS_LITTLE, io_data_width, 16, 0) , m_smiact(*this) { m_program_config.m_logaddr_width = 32; m_program_config.m_page_shift = 12; + + // 32 unified + set_vtlb_dynamic_entries(32); } i386SX_device::i386SX_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) @@ -73,11 +81,15 @@ i486_device::i486_device(const machine_config &mconfig, const char *tag, device_ pentium_device::pentium_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : i386_device(mconfig, PENTIUM, "PENTIUM", tag, owner, clock, "pentium", __FILE__) { + // 64 dtlb small, 8 dtlb large, 32 itlb + set_vtlb_dynamic_entries(96); } pentium_device::pentium_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : i386_device(mconfig, type, name, tag, owner, clock, shortname, source) { + // 64 dtlb small, 8 dtlb large, 32 itlb + set_vtlb_dynamic_entries(96); } mediagx_device::mediagx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) @@ -93,21 +105,29 @@ pentium_pro_device::pentium_pro_device(const machine_config &mconfig, const char pentium_mmx_device::pentium_mmx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : pentium_device(mconfig, PENTIUM_MMX, "Pentium MMX", tag, owner, clock, "pentium_mmx", __FILE__) { + // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large + set_vtlb_dynamic_entries(96); } pentium2_device::pentium2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : pentium_device(mconfig, PENTIUM2, "Pentium II", tag, owner, clock, "pentium2", __FILE__) { + // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large + set_vtlb_dynamic_entries(96); } pentium3_device::pentium3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : pentium_device(mconfig, PENTIUM3, "Pentium III", tag, owner, clock, "pentium3", __FILE__) { + // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large + set_vtlb_dynamic_entries(96); } pentium4_device::pentium4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : pentium_device(mconfig, PENTIUM4, "Pentium 4", tag, owner, clock, "pentium4", __FILE__) { + // 128 dtlb, 64 itlb + set_vtlb_dynamic_entries(196); } @@ -956,10 +976,10 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level) //logerror("IRQ (%08x): Interrupt during V8086 task\n",m_pc); if(type & 0x08) { - PUSH32(m_sreg[GS].selector & 0xffff); - PUSH32(m_sreg[FS].selector & 0xffff); - PUSH32(m_sreg[DS].selector & 0xffff); - PUSH32(m_sreg[ES].selector & 0xffff); + PUSH32SEG(m_sreg[GS].selector & 0xffff); + PUSH32SEG(m_sreg[FS].selector & 0xffff); + PUSH32SEG(m_sreg[DS].selector & 0xffff); + PUSH32SEG(m_sreg[ES].selector & 0xffff); } else { @@ -981,7 +1001,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level) if(type & 0x08) { // 32-bit gate - PUSH32(oldSS); + PUSH32SEG(oldSS); PUSH32(oldESP); } else @@ -1043,7 +1063,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level) else { PUSH32(oldflags & 0x00ffffff ); - PUSH32(m_sreg[CS].selector ); + PUSH32SEG(m_sreg[CS].selector ); if(irq == 3 || irq == 4 || irq == 9 || irq_gate == 1) PUSH32(m_eip ); else @@ -1306,7 +1326,7 @@ void i386_device::i386_task_switch(UINT16 selector, UINT8 nested) } m_cr[3] = READ32(tss+0x1c); // CR3 (PDBR) if(oldcr3 != m_cr[3]) - vtlb_flush_dynamic(m_vtlb); + vtlb_flush_dynamic(); /* Set the busy bit in the new task's descriptor */ if(selector & 0x0004) @@ -1915,7 +1935,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect, if(operand32 != 0) { - PUSH32(oldSS); + PUSH32SEG(oldSS); PUSH32(oldESP); } else @@ -2049,7 +2069,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect, else { /* 32-bit operand size */ - PUSH32(m_sreg[CS].selector ); + PUSH32SEG(m_sreg[CS].selector ); PUSH32(m_eip ); m_sreg[CS].selector = selector; m_performed_intersegment_jump = 1; @@ -2344,6 +2364,7 @@ void i386_device::i386_protected_mode_iret(int operand32) I386_SREG desc,stack; UINT8 CPL, RPL, DPL; UINT32 newflags; + UINT8 IOPL = m_IOP1 | (m_IOP2 << 1); CPL = m_CPL; UINT32 ea = i386_translate(SS, (STACK_32BIT)?REG32(ESP):REG16(SP), 0); @@ -2363,7 +2384,7 @@ void i386_device::i386_protected_mode_iret(int operand32) if(V8086_MODE) { UINT32 oldflags = get_flags(); - if(!m_IOP1 || !m_IOP2) + if(IOPL != 3) { logerror("IRET (%08x): Is in Virtual 8086 mode and IOPL != 3.\n",m_pc); FAULT(FAULT_GP,0) @@ -2435,6 +2456,8 @@ void i386_device::i386_protected_mode_iret(int operand32) { UINT32 oldflags = get_flags(); newflags = (newflags & ~0x00003000) | (oldflags & 0x00003000); + if(CPL > IOPL) + newflags = (newflags & ~0x200 ) | (oldflags & 0x200); } set_flags(newflags); m_eip = POP32() & 0xffff; // high 16 bits are ignored @@ -2551,7 +2574,7 @@ void i386_device::i386_protected_mode_iret(int operand32) } if((desc.flags & 0x0080) == 0) { - logerror("IRET: Return CS segment is not present.\n"); + logerror("IRET: (%08x) Return CS segment is not present.\n", m_pc); FAULT(FAULT_NP,newCS & ~0x03) } if(newEIP > desc.limit) @@ -2564,6 +2587,8 @@ void i386_device::i386_protected_mode_iret(int operand32) { UINT32 oldflags = get_flags(); newflags = (newflags & ~0x00003000) | (oldflags & 0x00003000); + if(CPL > IOPL) + newflags = (newflags & ~0x200 ) | (oldflags & 0x200); } if(operand32 == 0) @@ -2733,6 +2758,8 @@ void i386_device::i386_protected_mode_iret(int operand32) { UINT32 oldflags = get_flags(); newflags = (newflags & ~0x00003000) | (oldflags & 0x00003000); + if(CPL > IOPL) + newflags = (newflags & ~0x200 ) | (oldflags & 0x200); } if(operand32 == 0) @@ -3178,7 +3205,7 @@ void i386_device::i386_postload() CHANGE_PC(m_eip); } -void i386_device::i386_common_init(int tlbsize) +void i386_device::i386_common_init() { int i, j; static const int regs8[8] = {AL,CL,DL,BL,AH,CH,DH,BH}; @@ -3211,7 +3238,6 @@ void i386_device::i386_common_init(int tlbsize) m_program = &space(AS_PROGRAM); m_direct = &m_program->direct(); m_io = &space(AS_IO); - m_vtlb = vtlb_alloc(this, AS_PROGRAM, 0, tlbsize); m_smi = false; m_debugger_temp = 0; m_lock = false; @@ -3294,7 +3320,7 @@ void i386_device::i386_common_init(int tlbsize) void i386_device::device_start() { - i386_common_init(32); + i386_common_init(); build_opcode_table(OP_I386); m_cycle_table_rm = cycle_table_rm[CPU_CYCLES_I386].get(); @@ -3698,7 +3724,6 @@ void i386_device::zero_state() void i386_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; @@ -3731,6 +3756,7 @@ void i386_device::device_reset() // Family 3 (386), Model 0 (DX), Stepping 8 (D1) REG32(EAX) = 0; REG32(EDX) = (3 << 8) | (0 << 4) | (8); + m_cpu_version = REG32(EDX); m_CPL = 0; @@ -3804,7 +3830,7 @@ void i386_device::pentium_smi() WRITE32(REG32(ESI), smram_state+SMRAM_ESI); WRITE32(REG32(EDI), smram_state+SMRAM_EDI); WRITE32(m_eip, smram_state+SMRAM_EIP); - WRITE32(old_flags, smram_state+SMRAM_EAX); + WRITE32(old_flags, smram_state+SMRAM_EFLAGS); WRITE32(m_cr[3], smram_state+SMRAM_CR3); WRITE32(old_cr0, smram_state+SMRAM_CR0); @@ -3890,7 +3916,7 @@ void i386_device::i386_set_a20_line(int state) m_a20_mask = ~(1 << 20); } // TODO: how does A20M and the tlb interact - vtlb_flush_dynamic(m_vtlb); + vtlb_flush_dynamic(); } void i386_device::execute_run() @@ -3976,7 +4002,7 @@ offs_t i386_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *opr void i486_device::device_start() { - i386_common_init(32); + i386_common_init(); build_opcode_table(OP_I386 | OP_FPU | OP_I486); build_x87_opcode_table(); @@ -3989,7 +4015,6 @@ void i486_device::device_start() void i486_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; @@ -4022,6 +4047,7 @@ void i486_device::device_reset() // Family 4 (486), Model 0/1 (DX), Stepping 3 REG32(EAX) = 0; REG32(EDX) = (4 << 8) | (0 << 4) | (3); + m_cpu_version = REG32(EDX); CHANGE_PC(m_eip); } @@ -4033,8 +4059,7 @@ void i486_device::device_reset() void pentium_device::device_start() { - // 64 dtlb small, 8 dtlb large, 32 itlb - i386_common_init(96); + i386_common_init(); register_state_i386_x87(); build_opcode_table(OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM); @@ -4046,7 +4071,6 @@ void pentium_device::device_start() void pentium_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; @@ -4107,8 +4131,7 @@ void pentium_device::device_reset() void mediagx_device::device_start() { - // probably 32 unified - i386_common_init(32); + i386_common_init(); register_state_i386_x87(); build_x87_opcode_table(); @@ -4120,7 +4143,6 @@ void mediagx_device::device_start() void mediagx_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; @@ -4172,8 +4194,7 @@ void mediagx_device::device_reset() void pentium_pro_device::device_start() { - // 64 dtlb small, 32 itlb - i386_common_init(96); + i386_common_init(); register_state_i386_x87(); build_x87_opcode_table(); @@ -4185,7 +4206,6 @@ void pentium_pro_device::device_start() void pentium_pro_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; @@ -4247,8 +4267,7 @@ void pentium_pro_device::device_reset() void pentium_mmx_device::device_start() { - // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large - i386_common_init(96); + i386_common_init(); register_state_i386_x87(); build_x87_opcode_table(); @@ -4260,7 +4279,6 @@ void pentium_mmx_device::device_start() void pentium_mmx_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; @@ -4320,8 +4338,7 @@ void pentium_mmx_device::device_reset() void pentium2_device::device_start() { - // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large - i386_common_init(96); + i386_common_init(); register_state_i386_x87(); build_x87_opcode_table(); @@ -4333,7 +4350,6 @@ void pentium2_device::device_start() void pentium2_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; @@ -4387,8 +4403,7 @@ void pentium2_device::device_reset() void pentium3_device::device_start() { - // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large - i386_common_init(96); + i386_common_init(); register_state_i386_x87_xmm(); build_x87_opcode_table(); @@ -4400,7 +4415,6 @@ void pentium3_device::device_start() void pentium3_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; @@ -4456,8 +4470,7 @@ void pentium3_device::device_reset() void pentium4_device::device_start() { - // 128 dtlb, 64 itlb - i386_common_init(196); + i386_common_init(); register_state_i386_x87_xmm(); build_x87_opcode_table(); @@ -4469,7 +4482,6 @@ void pentium4_device::device_start() void pentium4_device::device_reset() { zero_state(); - vtlb_flush_dynamic(m_vtlb); m_sreg[CS].selector = 0xf000; m_sreg[CS].base = 0xffff0000; diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h index c9ef38b4280..8e64458f228 100644 --- a/src/devices/cpu/i386/i386.h +++ b/src/devices/cpu/i386/i386.h @@ -8,7 +8,7 @@ #include "softfloat/milieu.h" #include "softfloat/softfloat.h" #include "debug/debugcpu.h" -#include "cpu/vtlb.h" +#include "divtlb.h" #define INPUT_LINE_A20 1 @@ -24,7 +24,7 @@ #define X86_NUM_CPUS 4 -class i386_device : public cpu_device +class i386_device : public cpu_device, public device_vtlb_interface { public: // construction/destruction @@ -270,8 +270,6 @@ struct I386_CALL_GATE UINT8 *m_cycle_table_pm; UINT8 *m_cycle_table_rm; - vtlb_state *m_vtlb; - bool m_smm; bool m_smi; bool m_smi_latched; @@ -335,6 +333,7 @@ struct I386_CALL_GATE inline UINT32 DEC32(UINT32 dst); inline void PUSH16(UINT16 value); inline void PUSH32(UINT32 value); + inline void PUSH32SEG(UINT32 value); inline void PUSH8(UINT8 value); inline UINT8 POP8(); inline UINT16 POP16(); @@ -1411,7 +1410,7 @@ struct I386_CALL_GATE void build_x87_opcode_table_df(); void build_x87_opcode_table(); void i386_postload(); - void i386_common_init(int tlbsize); + void i386_common_init(); void build_opcode_table(UINT32 features); void pentium_smi(); void zero_state(); diff --git a/src/devices/cpu/i386/i386op32.inc b/src/devices/cpu/i386/i386op32.inc index af5358e4bff..89c7bab44b4 100644 --- a/src/devices/cpu/i386/i386op32.inc +++ b/src/devices/cpu/i386/i386op32.inc @@ -475,7 +475,7 @@ void i386_device::i386_call_abs32() // Opcode 0x9a } else { - PUSH32(m_sreg[CS].selector ); + PUSH32SEG(m_sreg[CS].selector ); PUSH32(m_eip ); m_sreg[CS].selector = ptr; m_performed_intersegment_jump = 1; @@ -1717,7 +1717,7 @@ void i386_device::i386_push_cs32() // Opcode 0x0e else offset = (REG16(SP) - 4) & 0xffff; if(i386_limit_check(SS,offset) == 0) - PUSH32(m_sreg[CS].selector ); + PUSH32SEG(m_sreg[CS].selector ); else FAULT(FAULT_SS,0) CYCLES(CYCLES_PUSH_SREG); @@ -1731,7 +1731,7 @@ void i386_device::i386_push_ds32() // Opcode 0x1e else offset = (REG16(SP) - 4) & 0xffff; if(i386_limit_check(SS,offset) == 0) - PUSH32(m_sreg[DS].selector ); + PUSH32SEG(m_sreg[DS].selector ); else FAULT(FAULT_SS,0) CYCLES(CYCLES_PUSH_SREG); @@ -1745,7 +1745,7 @@ void i386_device::i386_push_es32() // Opcode 0x06 else offset = (REG16(SP) - 4) & 0xffff; if(i386_limit_check(SS,offset) == 0) - PUSH32(m_sreg[ES].selector ); + PUSH32SEG(m_sreg[ES].selector ); else FAULT(FAULT_SS,0) CYCLES(CYCLES_PUSH_SREG); @@ -1759,7 +1759,7 @@ void i386_device::i386_push_fs32() // Opcode 0x0f a0 else offset = (REG16(SP) - 4) & 0xffff; if(i386_limit_check(SS,offset) == 0) - PUSH32(m_sreg[FS].selector ); + PUSH32SEG(m_sreg[FS].selector ); else FAULT(FAULT_SS,0) CYCLES(CYCLES_PUSH_SREG); @@ -1773,7 +1773,7 @@ void i386_device::i386_push_gs32() // Opcode 0x0f a8 else offset = (REG16(SP) - 4) & 0xffff; if(i386_limit_check(SS,offset) == 0) - PUSH32(m_sreg[GS].selector ); + PUSH32SEG(m_sreg[GS].selector ); else FAULT(FAULT_SS,0) CYCLES(CYCLES_PUSH_SREG); @@ -1787,7 +1787,7 @@ void i386_device::i386_push_ss32() // Opcode 0x16 else offset = (REG16(SP) - 4) & 0xffff; if(i386_limit_check(SS,offset) == 0) - PUSH32(m_sreg[SS].selector ); + PUSH32SEG(m_sreg[SS].selector ); else FAULT(FAULT_SS,0) CYCLES(CYCLES_PUSH_SREG); @@ -2845,7 +2845,7 @@ void i386_device::i386_groupFF_32() // Opcode 0xff } else { - PUSH32(m_sreg[CS].selector ); + PUSH32SEG(m_sreg[CS].selector ); PUSH32(m_eip ); m_sreg[CS].selector = selector; m_performed_intersegment_jump = 1; diff --git a/src/devices/cpu/i386/i386ops.h b/src/devices/cpu/i386/i386ops.h index 2760b9cf410..ccf89a8720d 100644 --- a/src/devices/cpu/i386/i386ops.h +++ b/src/devices/cpu/i386/i386ops.h @@ -297,6 +297,7 @@ const i386_device::X86_OPCODE i386_device::s_x86_opcode_table[] = { 0x03, OP_2BYTE|OP_I386, &i386_device::i386_lsl_r16_rm16, &i386_device::i386_lsl_r32_rm32, false}, { 0x06, OP_2BYTE|OP_I386, &i386_device::i386_clts, &i386_device::i386_clts, false}, { 0x07, OP_2BYTE|OP_I386, &i386_device::i386_loadall, &i386_device::i386_loadall, false}, + { 0x07, OP_2BYTE|OP_I486, &i386_device::i386_invalid, &i386_device::i386_invalid, false}, { 0x08, OP_2BYTE|OP_I486, &i386_device::i486_invd, &i386_device::i486_invd, false}, { 0x09, OP_2BYTE|OP_I486, &i386_device::i486_wbinvd, &i386_device::i486_wbinvd, false}, { 0x0B, OP_2BYTE|OP_PENTIUM, &i386_device::pentium_ud2, &i386_device::pentium_ud2, false}, diff --git a/src/devices/cpu/i386/i386ops.inc b/src/devices/cpu/i386/i386ops.inc index dc237c98469..2f13445c8be 100644 --- a/src/devices/cpu/i386/i386ops.inc +++ b/src/devices/cpu/i386/i386ops.inc @@ -701,7 +701,7 @@ void i386_device::i386_mov_cr_r32() // Opcode 0x0f 22 case 2: CYCLES(CYCLES_MOV_REG_CR2); break; case 3: CYCLES(CYCLES_MOV_REG_CR3); - vtlb_flush_dynamic(m_vtlb); + vtlb_flush_dynamic(); break; case 4: CYCLES(1); break; // TODO default: @@ -2504,7 +2504,66 @@ void i386_device::i386_mov_tr_r32() // Opcode 0x0f 26 void i386_device::i386_loadall() // Opcode 0x0f 0x07 (0x0f 0x05 on 80286), undocumented { - fatalerror("i386: LOADALL unimplemented at %08X\n", m_pc - 1); + if(PROTECTED_MODE && (m_CPL != 0)) + FAULT(FAULT_GP,0) + UINT32 ea = i386_translate(ES, REG32(EDI), 0); + m_cr[0] = READ32(ea) & 0xfffeffff; // wp not supported on 386 + set_flags(READ32(ea + 0x04)); + m_eip = READ32(ea + 0x08); + REG32(EDI) = READ32(ea + 0x0c); + REG32(ESI) = READ32(ea + 0x10); + REG32(EBP) = READ32(ea + 0x14); + REG32(ESP) = READ32(ea + 0x18); + REG32(EBX) = READ32(ea + 0x1c); + REG32(EDX) = READ32(ea + 0x20); + REG32(ECX) = READ32(ea + 0x24); + REG32(EAX) = READ32(ea + 0x28); + m_dr[6] = READ32(ea + 0x2c); + m_dr[7] = READ32(ea + 0x30); + m_task.segment = READ16(ea + 0x34); + m_ldtr.segment = READ16(ea + 0x38); + m_sreg[GS].selector = READ16(ea + 0x3c); + m_sreg[FS].selector = READ16(ea + 0x40); + m_sreg[DS].selector = READ16(ea + 0x44); + m_sreg[SS].selector = READ16(ea + 0x48); + m_sreg[CS].selector = READ16(ea + 0x4c); + m_sreg[ES].selector = READ16(ea + 0x50); + m_task.flags = READ32(ea + 0x54) >> 8; + m_task.base = READ32(ea + 0x58); + m_task.limit = READ32(ea + 0x5c); + m_idtr.base = READ32(ea + 0x64); + m_idtr.limit = READ32(ea + 0x68); + m_gdtr.base = READ32(ea + 0x70); + m_gdtr.limit = READ32(ea + 0x74); + m_ldtr.flags = READ32(ea + 0x78) >> 8; + m_ldtr.base = READ32(ea + 0x7c); + m_ldtr.limit = READ32(ea + 0x80); + m_sreg[GS].flags = READ32(ea + 0x84) >> 8; + m_sreg[GS].base = READ32(ea + 0x88); + m_sreg[GS].limit = READ32(ea + 0x8c); + m_sreg[FS].flags = READ32(ea + 0x90) >> 8; + m_sreg[FS].base = READ32(ea + 0x94); + m_sreg[FS].limit = READ32(ea + 0x98); + m_sreg[DS].flags = READ32(ea + 0x9c) >> 8; + m_sreg[DS].base = READ32(ea + 0xa0); + m_sreg[DS].limit = READ32(ea + 0xa4); + m_sreg[SS].flags = READ32(ea + 0xa8) >> 8; + m_sreg[SS].base = READ32(ea + 0xac); + m_sreg[SS].limit = READ32(ea + 0xb0); + m_sreg[CS].flags = READ32(ea + 0xb4) >> 8; + m_sreg[CS].base = READ32(ea + 0xb8); + m_sreg[CS].limit = READ32(ea + 0xbc); + m_sreg[ES].flags = READ32(ea + 0xc0) >> 8; + m_sreg[ES].base = READ32(ea + 0xc4); + m_sreg[ES].limit = READ32(ea + 0xc8); + m_CPL = (m_sreg[SS].flags >> 5) & 3; // cpl == dpl of ss + + for(int i = 0; i < GS; i++) + { + m_sreg[i].valid = (m_sreg[i].flags & 0x80) ? true : false; + m_sreg[i].d = (m_sreg[i].flags & 0x4000) ? 1 : 0; + } + CHANGE_PC(m_eip); } void i386_device::i386_invalid() diff --git a/src/devices/cpu/i386/i386priv.h b/src/devices/cpu/i386/i386priv.h index 9913d851fa2..0a471adfe36 100644 --- a/src/devices/cpu/i386/i386priv.h +++ b/src/devices/cpu/i386/i386priv.h @@ -486,7 +486,7 @@ int i386_device::translate_address(int pl, int type, UINT32 *address, UINT32 *er if(!(m_cr[0] & 0x80000000)) // Some (very few) old OS's won't work with this return TRUE; - const vtlb_entry *table = vtlb_table(m_vtlb); + const vtlb_entry *table = vtlb_table(); UINT32 index = *address >> 12; vtlb_entry entry = table[index]; if(type == TRANSLATE_FETCH) @@ -506,7 +506,7 @@ int i386_device::translate_address(int pl, int type, UINT32 *address, UINT32 *er *error |= 1; return FALSE; } - vtlb_dynload(m_vtlb, index, *address, entry); + vtlb_dynload(index, *address, entry); return TRUE; } if(!(entry & (1 << type))) @@ -557,7 +557,7 @@ UINT16 i386_device::FETCH16() UINT16 value; UINT32 address = m_pc, error; - if( address & 0x1 ) { /* Unaligned read */ + if( !WORD_ALIGNED(address) ) { /* Unaligned read */ value = (FETCH() << 0); value |= (FETCH() << 8); } else { @@ -575,7 +575,7 @@ UINT32 i386_device::FETCH32() UINT32 value; UINT32 address = m_pc, error; - if( m_pc & 0x3 ) { /* Unaligned read */ + if( !DWORD_ALIGNED(m_pc) ) { /* Unaligned read */ value = (FETCH() << 0); value |= (FETCH() << 8); value |= (FETCH() << 16); @@ -607,7 +607,7 @@ UINT16 i386_device::READ16(UINT32 ea) UINT16 value; UINT32 address = ea, error; - if( ea & 0x1 ) { /* Unaligned read */ + if( !WORD_ALIGNED(ea) ) { /* Unaligned read */ value = (READ8( address+0 ) << 0); value |= (READ8( address+1 ) << 8); } else { @@ -624,7 +624,7 @@ UINT32 i386_device::READ32(UINT32 ea) UINT32 value; UINT32 address = ea, error; - if( ea & 0x3 ) { /* Unaligned read */ + if( !DWORD_ALIGNED(ea) ) { /* Unaligned read */ value = (READ8( address+0 ) << 0); value |= (READ8( address+1 ) << 8); value |= (READ8( address+2 ) << 16), @@ -644,7 +644,7 @@ UINT64 i386_device::READ64(UINT32 ea) UINT64 value; UINT32 address = ea, error; - if( ea & 0x7 ) { /* Unaligned read */ + if( !QWORD_ALIGNED(ea) ) { /* Unaligned read */ value = (((UINT64) READ8( address+0 )) << 0); value |= (((UINT64) READ8( address+1 )) << 8); value |= (((UINT64) READ8( address+2 )) << 16); @@ -678,7 +678,7 @@ UINT16 i386_device::READ16PL0(UINT32 ea) UINT16 value; UINT32 address = ea, error; - if( ea & 0x1 ) { /* Unaligned read */ + if( !WORD_ALIGNED(ea) ) { /* Unaligned read */ value = (READ8PL0( address+0 ) << 0); value |= (READ8PL0( address+1 ) << 8); } else { @@ -696,7 +696,7 @@ UINT32 i386_device::READ32PL0(UINT32 ea) UINT32 value; UINT32 address = ea, error; - if( ea & 0x3 ) { /* Unaligned read */ + if( !DWORD_ALIGNED(ea) ) { /* Unaligned read */ value = (READ8PL0( address+0 ) << 0); value |= (READ8PL0( address+1 ) << 8); value |= (READ8PL0( address+2 ) << 16); @@ -732,7 +732,7 @@ void i386_device::WRITE16(UINT32 ea, UINT16 value) { UINT32 address = ea, error; - if( ea & 0x1 ) { /* Unaligned write */ + if( !WORD_ALIGNED(ea) ) { /* Unaligned write */ WRITE8( address+0, value & 0xff ); WRITE8( address+1, (value >> 8) & 0xff ); } else { @@ -747,7 +747,7 @@ void i386_device::WRITE32(UINT32 ea, UINT32 value) { UINT32 address = ea, error; - if( ea & 0x3 ) { /* Unaligned write */ + if( !DWORD_ALIGNED(ea) ) { /* Unaligned write */ WRITE8( address+0, value & 0xff ); WRITE8( address+1, (value >> 8) & 0xff ); WRITE8( address+2, (value >> 16) & 0xff ); @@ -765,7 +765,7 @@ void i386_device::WRITE64(UINT32 ea, UINT64 value) { UINT32 address = ea, error; - if( ea & 0x7 ) { /* Unaligned write */ + if( !QWORD_ALIGNED(ea) ) { /* Unaligned write */ WRITE8( address+0, value & 0xff ); WRITE8( address+1, (value >> 8) & 0xff ); WRITE8( address+2, (value >> 16) & 0xff ); @@ -1000,6 +1000,23 @@ void i386_device::PUSH32(UINT32 value) REG16(SP) = new_esp; } } + +void i386_device::PUSH32SEG(UINT32 value) +{ + UINT32 ea, new_esp; + if( STACK_32BIT ) { + new_esp = REG32(ESP) - 4; + ea = i386_translate(SS, new_esp, 1); + ((m_cpu_version & 0xf00) == 0x300) ? WRITE16(ea, value) : WRITE32(ea, value ); // 486 also? + REG32(ESP) = new_esp; + } else { + new_esp = (REG16(SP) - 4) & 0xffff; + ea = i386_translate(SS, new_esp, 1); + ((m_cpu_version & 0xf00) == 0x300) ? WRITE16(ea, value) : WRITE32(ea, value ); + REG16(SP) = new_esp; + } +} + void i386_device::PUSH8(UINT8 value) { if( m_operand_size ) { diff --git a/src/devices/cpu/i386/i486ops.inc b/src/devices/cpu/i386/i486ops.inc index d22f6c079c3..8be406692d4 100644 --- a/src/devices/cpu/i386/i486ops.inc +++ b/src/devices/cpu/i386/i486ops.inc @@ -312,7 +312,7 @@ void i386_device::i486_group0F01_16() // Opcode 0x0f 01 } ea = GetEA(modrm,-1); CYCLES(25); // TODO: add to cycles.h - vtlb_flush_address(m_vtlb, ea); + vtlb_flush_address(ea); break; } default: @@ -430,7 +430,7 @@ void i386_device::i486_group0F01_32() // Opcode 0x0f 01 } ea = GetEA(modrm,-1); CYCLES(25); // TODO: add to cycles.h - vtlb_flush_address(m_vtlb, ea); + vtlb_flush_address(ea); break; } default: @@ -500,12 +500,12 @@ void i386_device::i486_mov_cr_r32() // Opcode 0x0f 22 case 0: CYCLES(CYCLES_MOV_REG_CR0); if((oldcr ^ m_cr[cr]) & 0x80010000) - vtlb_flush_dynamic(m_vtlb); + vtlb_flush_dynamic(); break; case 2: CYCLES(CYCLES_MOV_REG_CR2); break; case 3: CYCLES(CYCLES_MOV_REG_CR3); - vtlb_flush_dynamic(m_vtlb); + vtlb_flush_dynamic(); break; case 4: CYCLES(1); break; // TODO default: diff --git a/src/devices/cpu/i4004/i4004.cpp b/src/devices/cpu/i4004/i4004.cpp index d4ba8891260..371074238c9 100644 --- a/src/devices/cpu/i4004/i4004.cpp +++ b/src/devices/cpu/i4004/i4004.cpp @@ -30,7 +30,9 @@ i4004_cpu_device::i4004_cpu_device(const machine_config &mconfig, const char *ta , m_io_config("io", ENDIANNESS_LITTLE, 8, 6, 0) , m_data_config("data", ENDIANNESS_LITTLE, 8, 12, 0), m_A(0), m_C(0), m_TEST(0), m_flags(0), m_program(nullptr), m_direct(nullptr), m_data(nullptr), m_io(nullptr), m_icount(0), m_pc_pos(0), m_addr_mask(0) { - m_is_octal = true; + m_program_config.m_is_octal = true; + m_io_config.m_is_octal = true; + m_data_config.m_is_octal = true; } diff --git a/src/devices/cpu/i8089/i8089.cpp b/src/devices/cpu/i8089/i8089.cpp index 22494cfdd2f..ade9e4f768b 100644 --- a/src/devices/cpu/i8089/i8089.cpp +++ b/src/devices/cpu/i8089/i8089.cpp @@ -289,7 +289,7 @@ UINT16 i8089_device::read_word(bool space, offs_t address) UINT16 data; address_space *aspace = (space ? m_io : m_mem); - if (sysbus_width() && !(address & 1)) + if (sysbus_width() && WORD_ALIGNED(address)) { data = aspace->read_word(address); } @@ -311,7 +311,7 @@ void i8089_device::write_word(bool space, offs_t address, UINT16 data) { address_space *aspace = (space ? m_io : m_mem); - if (sysbus_width() && !(address & 1)) + if (sysbus_width() && WORD_ALIGNED(address)) { aspace->write_word(address, data); } diff --git a/src/devices/cpu/i86/i86.txt b/src/devices/cpu/i86/i86.txt index 39b54d6a8d0..fb27b8526fe 100644 --- a/src/devices/cpu/i86/i86.txt +++ b/src/devices/cpu/i86/i86.txt @@ -29,6 +29,7 @@ mov sreg, doesnot disable until next operation is executed 8086/8088 --------- "mov cs, " causes unconditional jump! +0xd6 is salc (sbb al,al) as all other intel x86-16 and -32 cpus 80C86/80C88 ----------- @@ -36,9 +37,10 @@ mov sreg, doesnot disable until next operation is executed 80186/80188 ----------- -integrated pic8259, pit8253, dma8253 (but not at standard pc addresses) +integrated pic, timer and dmac entirely incompatible with 8259, 825[3,4] and 82[3,5]7 additional instructions -"mov cs, " ? +#BR/bound/int 5, #UD/illegal instruction/int 6, #NM/coprocessor unavailable/int 7 support +"mov cs, " ignored (likely causes int 6) shift count anded with 0x1f 80188 @@ -52,6 +54,7 @@ although it is based on 80186 instruction set, some behaviours follow 8086 8080 emulation mode "mov cs, " ignored shift count not anded (acts like 8086) +0xd6 is xlat alias NEC 70116 (V30) --------------- @@ -69,11 +72,11 @@ no 8080 emulation mode NEC V40 ------- -pinout, integrated peripherals as 80186 +pinout, integrated peripherals 8259,54,37 clones at nonpc compatible addresses NEC V50 ------- -pinout, integrated peripherals as 80188 +pinout, integrated peripherals as v40 NEC V33? -------- @@ -92,9 +95,9 @@ v30? emulation mode (without 8080 emulation mode) 80286 ----- -80186 with additional instructions +80186 with additional instructions but no peripherals 24 bit address bus, -protected mode +protected mode selector/descriptor 80386 and later --------------- diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp index 224b844387c..f754445379b 100644 --- a/src/devices/cpu/i960/i960.cpp +++ b/src/devices/cpu/i960/i960.cpp @@ -26,7 +26,7 @@ i960_cpu_device::i960_cpu_device(const machine_config &mconfig, const char *tag, UINT32 i960_cpu_device::i960_read_dword_unaligned(UINT32 address) { - if (address & 3) + if (!DWORD_ALIGNED(address)) return m_program->read_byte(address) | m_program->read_byte(address+1)<<8 | m_program->read_byte(address+2)<<16 | m_program->read_byte(address+3)<<24; else return m_program->read_dword(address); @@ -34,7 +34,7 @@ UINT32 i960_cpu_device::i960_read_dword_unaligned(UINT32 address) UINT16 i960_cpu_device::i960_read_word_unaligned(UINT32 address) { - if (address & 1) + if (!WORD_ALIGNED(address)) return m_program->read_byte(address) | m_program->read_byte(address+1)<<8; else return m_program->read_word(address); @@ -42,7 +42,7 @@ UINT16 i960_cpu_device::i960_read_word_unaligned(UINT32 address) void i960_cpu_device::i960_write_dword_unaligned(UINT32 address, UINT32 data) { - if (address & 3) + if (!DWORD_ALIGNED(address)) { m_program->write_byte(address, data & 0xff); m_program->write_byte(address+1, (data>>8)&0xff); @@ -57,7 +57,7 @@ void i960_cpu_device::i960_write_dword_unaligned(UINT32 address, UINT32 data) void i960_cpu_device::i960_write_word_unaligned(UINT32 address, UINT16 data) { - if (address & 1) + if (!WORD_ALIGNED(address)) { m_program->write_byte(address, data & 0xff); m_program->write_byte(address+1, (data>>8)&0xff); diff --git a/src/devices/cpu/m37710/m37710il.h b/src/devices/cpu/m37710/m37710il.h index ffc1aed0a7a..eb79f0fddd6 100644 --- a/src/devices/cpu/m37710/m37710il.h +++ b/src/devices/cpu/m37710/m37710il.h @@ -42,7 +42,7 @@ inline UINT32 m37710_cpu_device::m37710i_read_16_normal(UINT32 address) inline UINT32 m37710_cpu_device::m37710i_read_16_immediate(UINT32 address) { - if (address & 1) + if (!WORD_ALIGNED(address)) return m37710_read_8_immediate(address) | (m37710_read_8_immediate(address+1)<<8); else return m37710_read_16_immediate(address); @@ -65,7 +65,7 @@ inline void m37710_cpu_device::m37710i_write_16_direct(UINT32 address, UINT32 va inline UINT32 m37710_cpu_device::m37710i_read_24_normal(UINT32 address) { - if (address & 1) + if (!WORD_ALIGNED(address)) return m37710_read_8(address) | (m37710_read_16(address+1)<<8); else return m37710_read_16(address) | (m37710_read_8(address+2)<<16); @@ -73,7 +73,7 @@ inline UINT32 m37710_cpu_device::m37710i_read_24_normal(UINT32 address) inline UINT32 m37710_cpu_device::m37710i_read_24_immediate(UINT32 address) { - if (address & 1) + if (!WORD_ALIGNED(address)) return m37710_read_8_immediate(address) | (m37710_read_16_immediate(address+1)<<8); else return m37710_read_16_immediate(address) | (m37710_read_8_immediate(address+2)<<16); @@ -81,7 +81,7 @@ inline UINT32 m37710_cpu_device::m37710i_read_24_immediate(UINT32 address) inline UINT32 m37710_cpu_device::m37710i_read_24_direct(UINT32 address) { - if (address & 1) + if (!WORD_ALIGNED(address)) return m37710_read_8(address) | (m37710_read_16(address+1)<<8); else return m37710_read_16(address) | (m37710_read_8(address+2)<<16); diff --git a/src/devices/cpu/m6800/6800dasm.cpp b/src/devices/cpu/m6800/6800dasm.cpp index 49f908013cd..2e94ef3b62d 100644 --- a/src/devices/cpu/m6800/6800dasm.cpp +++ b/src/devices/cpu/m6800/6800dasm.cpp @@ -52,7 +52,8 @@ enum op_names { rts, sba, sbca, sbcb, sec, sev, sta, stb, _std, sei, sts, stx, suba, subb, subd, swi, wai, tab, tap, tba, tim, tpa, tst, tsta, - tstb, tsx, txs, asx1, asx2, xgdx, addx, adcx + tstb, tsx, txs, asx1, asx2, xgdx, addx, adcx, + bitx }; static const char *const op_name_str[] = { @@ -71,7 +72,8 @@ static const char *const op_name_str[] = { "rts", "sba", "sbca", "sbcb", "sec", "sev", "sta", "stb", "std", "sei", "sts", "stx", "suba", "subb", "subd", "swi", "wai", "tab", "tap", "tba", "tim", "tpa", "tst", "tsta", - "tstb", "tsx", "txs", "asx1", "asx2", "xgdx", "addx", "adcx" + "tstb", "tsx", "txs", "asx1", "asx2", "xgdx", "addx", "adcx", + "bitx" }; /* @@ -82,7 +84,7 @@ static const char *const op_name_str[] = { * 2 invalid opcode for 1:6800/6802/6808, 2:6801/6803, 4:HD63701 */ -static const UINT8 table[0x102][3] = { +static const UINT8 table[0x104][3] = { {ill, inh,7},{nop, inh,0},{ill, inh,7},{ill, inh,7},/* 00 */ {lsrd,inh,1},{asld,inh,1},{tap, inh,0},{tpa, inh,0}, {inx, inh,0},{dex, inh,0},{clv, inh,0},{sev, inh,0}, @@ -151,7 +153,11 @@ static const UINT8 table[0x102][3] = { /* extra instruction $fc for NSC-8105 */ {addx,ext,0}, /* extra instruction $ec for NSC-8105 */ - {adcx,imb,0} + {adcx,imb,0}, + /* extra instruction $bb for NSC-8105 */ + {bitx,imx,0}, + /* extra instruction $b2 for NSC-8105 */ + {stx,imx,0} }; /* some macros to keep things short */ @@ -188,6 +194,8 @@ static unsigned Dasm680x (int subtype, char *buf, unsigned pc, const UINT8 *opro /* and check for extra instruction */ if (code == 0xfc) code = 0x0100; if (code == 0xec) code = 0x0101; + if (code == 0x7b) code = 0x0102; + if (code == 0x71) code = 0x0103; } opcode = table[code][0]; diff --git a/src/devices/cpu/m6800/6800ops.inc b/src/devices/cpu/m6800/6800ops.inc index cf0360c7538..078529d16ab 100644 --- a/src/devices/cpu/m6800/6800ops.inc +++ b/src/devices/cpu/m6800/6800ops.inc @@ -2073,11 +2073,12 @@ OP_HANDLER( ldd_ix ) } /* $ec ADCX immediate -**** NSC8105 only. Flags are a guess - copied from addb_im() */ +// actually this is ADDX, causes garbage in nightgal.cpp otherwise OP_HANDLER( adcx_im ) { UINT16 t,r; IMMBYTE(t); - r = X+t+(CC&0x01); + r = X+t; CLR_HNZVC; SET_FLAGS8(X,t,r); SET_H(X,t,r); @@ -2282,3 +2283,26 @@ OP_HANDLER( stx_ex ) EXTENDED; WM16(EAD,&m_x); } + +/* NSC8105 specific, guessed opcodes (tested by Night Gal Summer) */ +// $bb - $mask & [X + $disp8] +OP_HANDLER( btst_ix ) +{ + UINT8 val; + UINT8 mask = M_RDOP_ARG(PCD); + {EA=X+(M_RDOP_ARG(PCD+1));PC+=2;} + val = RM(EAD) & mask; + CLR_NZVC; SET_NZ8(val); +} + +// $b2 - assuming correct, store first byte to (X + $disp8) +OP_HANDLER( stx_nsc ) +{ + IMM8; + UINT8 val = RM(EAD); + IMM8; + EA = X + RM(EAD); + CLR_NZV; + SET_NZ8(val); + WM(EAD,val); +}
\ No newline at end of file diff --git a/src/devices/cpu/m6800/6800tbl.inc b/src/devices/cpu/m6800/6800tbl.inc index 38376dadd59..10515e54bdc 100644 --- a/src/devices/cpu/m6800/6800tbl.inc +++ b/src/devices/cpu/m6800/6800tbl.inc @@ -105,30 +105,54 @@ const m6800_cpu_device::op_func m6800_cpu_device::hd63701_insn[0x100] = { }; const m6800_cpu_device::op_func m6800_cpu_device::nsc8105_insn[0x100] = { +// 0 &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::nop, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::tap, &m6800_cpu_device::illegal,&m6800_cpu_device::tpa, +// 8 &m6800_cpu_device::inx, &m6800_cpu_device::clv, &m6800_cpu_device::dex, &m6800_cpu_device::sev, &m6800_cpu_device::clc, &m6800_cpu_device::cli, &m6800_cpu_device::sec, &m6800_cpu_device::sei, +// 10 &m6800_cpu_device::sba, &m6800_cpu_device::illegal,&m6800_cpu_device::cba, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::tab, &m6800_cpu_device::illegal,&m6800_cpu_device::tba, +// 18 &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::daa, &m6800_cpu_device::aba, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::illegal, +// 20 &m6800_cpu_device::bra, &m6800_cpu_device::bhi, &m6800_cpu_device::brn, &m6800_cpu_device::bls, &m6800_cpu_device::bcc, &m6800_cpu_device::bne, &m6800_cpu_device::bcs, &m6800_cpu_device::beq, +// 28 &m6800_cpu_device::bvc, &m6800_cpu_device::bpl, &m6800_cpu_device::bvs, &m6800_cpu_device::bmi, &m6800_cpu_device::bge, &m6800_cpu_device::bgt, &m6800_cpu_device::blt, &m6800_cpu_device::ble, +// 30 &m6800_cpu_device::tsx, &m6800_cpu_device::pula, &m6800_cpu_device::ins, &m6800_cpu_device::pulb, &m6800_cpu_device::des, &m6800_cpu_device::psha, &m6800_cpu_device::txs, &m6800_cpu_device::pshb, +// 38 &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::rts, &m6800_cpu_device::rti, &m6800_cpu_device::illegal,&m6800_cpu_device::wai, &m6800_cpu_device::illegal,&m6800_cpu_device::swi, +// 40 &m6800_cpu_device::suba_im,&m6800_cpu_device::sbca_im,&m6800_cpu_device::cmpa_im,&m6800_cpu_device::illegal,&m6800_cpu_device::anda_im,&m6800_cpu_device::lda_im, &m6800_cpu_device::bita_im,&m6800_cpu_device::sta_im, +// 48 &m6800_cpu_device::eora_im,&m6800_cpu_device::ora_im, &m6800_cpu_device::adca_im,&m6800_cpu_device::adda_im,&m6800_cpu_device::cmpx_im,&m6800_cpu_device::lds_im, &m6800_cpu_device::bsr, &m6800_cpu_device::sts_im, +// 50 &m6800_cpu_device::suba_di,&m6800_cpu_device::sbca_di,&m6800_cpu_device::cmpa_di,&m6800_cpu_device::illegal,&m6800_cpu_device::anda_di,&m6800_cpu_device::lda_di, &m6800_cpu_device::bita_di,&m6800_cpu_device::sta_di, +// 58 &m6800_cpu_device::eora_di,&m6800_cpu_device::ora_di, &m6800_cpu_device::adca_di,&m6800_cpu_device::adda_di,&m6800_cpu_device::cmpx_di,&m6800_cpu_device::lds_di, &m6800_cpu_device::jsr_di, &m6800_cpu_device::sts_di, +// 60 &m6800_cpu_device::suba_ix,&m6800_cpu_device::sbca_ix,&m6800_cpu_device::cmpa_ix,&m6800_cpu_device::illegal,&m6800_cpu_device::anda_ix,&m6800_cpu_device::lda_ix, &m6800_cpu_device::bita_ix,&m6800_cpu_device::sta_ix, +// 68 &m6800_cpu_device::eora_ix,&m6800_cpu_device::ora_ix, &m6800_cpu_device::adca_ix,&m6800_cpu_device::adda_ix,&m6800_cpu_device::cmpx_ix,&m6800_cpu_device::lds_ix, &m6800_cpu_device::jsr_ix, &m6800_cpu_device::sts_ix, +// 70 &m6800_cpu_device::suba_ex,&m6800_cpu_device::sbca_ex,&m6800_cpu_device::cmpa_ex,&m6800_cpu_device::illegal,&m6800_cpu_device::anda_ex,&m6800_cpu_device::lda_ex, &m6800_cpu_device::bita_ex,&m6800_cpu_device::sta_ex, +// 78 &m6800_cpu_device::eora_ex,&m6800_cpu_device::ora_ex, &m6800_cpu_device::adca_ex,&m6800_cpu_device::adda_ex,&m6800_cpu_device::cmpx_ex,&m6800_cpu_device::lds_ex, &m6800_cpu_device::jsr_ex, &m6800_cpu_device::sts_ex, +// 80 &m6800_cpu_device::nega, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::coma, &m6800_cpu_device::lsra, &m6800_cpu_device::rora, &m6800_cpu_device::illegal,&m6800_cpu_device::asra, +// 88 &m6800_cpu_device::asla, &m6800_cpu_device::deca, &m6800_cpu_device::rola, &m6800_cpu_device::illegal,&m6800_cpu_device::inca, &m6800_cpu_device::illegal,&m6800_cpu_device::tsta, &m6800_cpu_device::clra, +// 90 &m6800_cpu_device::negb, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::comb, &m6800_cpu_device::lsrb, &m6800_cpu_device::rorb, &m6800_cpu_device::illegal,&m6800_cpu_device::asrb, +// 98 &m6800_cpu_device::aslb, &m6800_cpu_device::decb, &m6800_cpu_device::rolb, &m6800_cpu_device::illegal,&m6800_cpu_device::incb, &m6800_cpu_device::illegal,&m6800_cpu_device::tstb, &m6800_cpu_device::clrb, +// a0 &m6800_cpu_device::neg_ix, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::com_ix, &m6800_cpu_device::lsr_ix, &m6800_cpu_device::ror_ix, &m6800_cpu_device::illegal,&m6800_cpu_device::asr_ix, +// a8 &m6800_cpu_device::asl_ix, &m6800_cpu_device::dec_ix, &m6800_cpu_device::rol_ix, &m6800_cpu_device::illegal,&m6800_cpu_device::inc_ix, &m6800_cpu_device::jmp_ix, &m6800_cpu_device::tst_ix, &m6800_cpu_device::clr_ix, -&m6800_cpu_device::neg_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::illegal,&m6800_cpu_device::com_ex, &m6800_cpu_device::lsr_ex, &m6800_cpu_device::ror_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::asr_ex, -&m6800_cpu_device::asl_ex, &m6800_cpu_device::dec_ex, &m6800_cpu_device::rol_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::inc_ex, &m6800_cpu_device::jmp_ex, &m6800_cpu_device::tst_ex, &m6800_cpu_device::clr_ex, +// b0 +&m6800_cpu_device::neg_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::stx_nsc,&m6800_cpu_device::com_ex, &m6800_cpu_device::lsr_ex, &m6800_cpu_device::ror_ex, &m6800_cpu_device::illegal,&m6800_cpu_device::asr_ex, +// b8 +&m6800_cpu_device::asl_ex, &m6800_cpu_device::dec_ex, &m6800_cpu_device::rol_ex, &m6800_cpu_device::btst_ix,&m6800_cpu_device::inc_ex, &m6800_cpu_device::jmp_ex, &m6800_cpu_device::tst_ex, &m6800_cpu_device::clr_ex, &m6800_cpu_device::subb_im,&m6800_cpu_device::sbcb_im,&m6800_cpu_device::cmpb_im,&m6800_cpu_device::illegal,&m6800_cpu_device::andb_im,&m6800_cpu_device::ldb_im, &m6800_cpu_device::bitb_im,&m6800_cpu_device::stb_im, &m6800_cpu_device::eorb_im,&m6800_cpu_device::orb_im, &m6800_cpu_device::adcb_im,&m6800_cpu_device::addb_im,&m6800_cpu_device::illegal,&m6800_cpu_device::ldx_im, &m6800_cpu_device::illegal,&m6800_cpu_device::stx_im, &m6800_cpu_device::subb_di,&m6800_cpu_device::sbcb_di,&m6800_cpu_device::cmpb_di,&m6800_cpu_device::illegal,&m6800_cpu_device::andb_di,&m6800_cpu_device::ldb_di, &m6800_cpu_device::bitb_di,&m6800_cpu_device::stb_di, diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp index 84d3b8d03e2..730d7a1be4b 100644 --- a/src/devices/cpu/m6800/m6800.cpp +++ b/src/devices/cpu/m6800/m6800.cpp @@ -488,7 +488,7 @@ const UINT8 m6800_cpu_device::cycles_63701[256] = const UINT8 m6800_cpu_device::cycles_nsc8105[256] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ - /*0*/ XX,XX, 2,XX,XX, 2,XX, 2, 4, 2, 4, 2, 2, 2, 2, 2, + /*0*/ 5,XX, 2,XX,XX, 2,XX, 2, 4, 2, 4, 2, 2, 2, 2, 2, /*1*/ 2,XX, 2,XX,XX, 2,XX, 2,XX,XX, 2, 2,XX,XX,XX,XX, /*2*/ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, /*3*/ 4, 4, 4, 4, 4, 4, 4, 4,XX,XX, 5,10,XX, 9,XX,12, @@ -499,7 +499,7 @@ const UINT8 m6800_cpu_device::cycles_nsc8105[256] = /*8*/ 2,XX,XX, 2, 2, 2,XX, 2, 2, 2, 2,XX, 2,XX, 2, 2, /*9*/ 2,XX,XX, 2, 2, 2,XX, 2, 2, 2, 2,XX, 2,XX, 2, 2, /*A*/ 7,XX,XX, 7, 7, 7,XX, 7, 7, 7, 7,XX, 7, 4, 7, 7, - /*B*/ 6,XX,XX, 6, 6, 6,XX, 6, 6, 6, 6,XX, 6, 3, 6, 6, + /*B*/ 6,XX,XX, 6, 6, 6,XX, 6, 6, 6, 6, 5, 6, 3, 6, 6, /*C*/ 2, 2, 2,XX, 2, 2, 2, 3, 2, 2, 2, 2,XX, 3,XX, 4, /*D*/ 3, 3, 3,XX, 3, 3, 3, 4, 3, 3, 3, 3,XX, 4,XX, 5, /*E*/ 5, 5, 5,XX, 5, 5, 5, 6, 5, 5, 5, 5, 5, 6,XX, 7, diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h index bb6055e8ad0..82696a6ee43 100644 --- a/src/devices/cpu/m6800/m6800.h +++ b/src/devices/cpu/m6800/m6800.h @@ -426,6 +426,8 @@ protected: void cpx_im(); void cpx_ix(); void trap(); + void btst_ix(); + void stx_nsc(); }; diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp index dc7e0b14a6f..aaa1db079cf 100644 --- a/src/devices/cpu/m68000/m68kcpu.cpp +++ b/src/devices/cpu/m68000/m68kcpu.cpp @@ -1383,7 +1383,7 @@ UINT16 m68000_base_device::readword_d32_mmu(offs_t address) UINT32 address0 = pmmu_translate_addr(this, address); if (mmu_tmp_buserror_occurred) { return ~0; - } else if (!(address & 1)) { + } else if (WORD_ALIGNED(address)) { return m_space->read_word(address0); } else { UINT32 address1 = pmmu_translate_addr(this, address + 1); @@ -1396,7 +1396,7 @@ UINT16 m68000_base_device::readword_d32_mmu(offs_t address) } } - if (!(address & 1)) + if (WORD_ALIGNED(address)) return m_space->read_word(address); result = m_space->read_byte(address) << 8; return result | m_space->read_byte(address + 1); @@ -1410,7 +1410,7 @@ void m68000_base_device::writeword_d32_mmu(offs_t address, UINT16 data) UINT32 address0 = pmmu_translate_addr(this, address); if (mmu_tmp_buserror_occurred) { return; - } else if (!(address & 1)) { + } else if (WORD_ALIGNED(address)) { m_space->write_word(address0, data); return; } else { @@ -1425,7 +1425,7 @@ void m68000_base_device::writeword_d32_mmu(offs_t address, UINT16 data) } } - if (!(address & 1)) + if (WORD_ALIGNED(address)) { m_space->write_word(address, data); return; @@ -1447,13 +1447,13 @@ UINT32 m68000_base_device::readlong_d32_mmu(offs_t address) } else if ((address +3) & 0xfc) { // not at page boundary; use default code address = address0; - } else if (!(address & 3)) { // 0 + } else if (DWORD_ALIGNED(address)) { // 0 return m_space->read_dword(address0); } else { UINT32 address2 = pmmu_translate_addr(this, address+2); if (mmu_tmp_buserror_occurred) { return ~0; - } else if (!(address & 1)) { // 2 + } else if (WORD_ALIGNED(address)) { // 2 result = m_space->read_word(address0) << 16; return result | m_space->read_word(address2); } else { @@ -1470,9 +1470,9 @@ UINT32 m68000_base_device::readlong_d32_mmu(offs_t address) } } - if (!(address & 3)) + if (DWORD_ALIGNED(address)) return m_space->read_dword(address); - else if (!(address & 1)) + else if (WORD_ALIGNED(address)) { result = m_space->read_word(address) << 16; return result | m_space->read_word(address + 2); @@ -1493,14 +1493,14 @@ void m68000_base_device::writelong_d32_mmu(offs_t address, UINT32 data) } else if ((address +3) & 0xfc) { // not at page boundary; use default code address = address0; - } else if (!(address & 3)) { // 0 + } else if (DWORD_ALIGNED(address)) { // 0 m_space->write_dword(address0, data); return; } else { UINT32 address2 = pmmu_translate_addr(this, address+2); if (mmu_tmp_buserror_occurred) { return; - } else if (!(address & 1)) { // 2 + } else if (WORD_ALIGNED(address)) { // 2 m_space->write_word(address0, data >> 16); m_space->write_word(address2, data); return; @@ -1519,12 +1519,12 @@ void m68000_base_device::writelong_d32_mmu(offs_t address, UINT32 data) } } - if (!(address & 3)) + if (DWORD_ALIGNED(address)) { m_space->write_dword(address, data); return; } - else if (!(address & 1)) + else if (WORD_ALIGNED(address)) { m_space->write_word(address, data >> 16); m_space->write_word(address + 2, data); @@ -1594,7 +1594,7 @@ UINT16 m68000_base_device::readword_d32_hmmu(offs_t address) address = hmmu_translate_addr(this, address); } - if (!(address & 1)) + if (WORD_ALIGNED(address)) return m_space->read_word(address); result = m_space->read_byte(address) << 8; return result | m_space->read_byte(address + 1); @@ -1608,7 +1608,7 @@ void m68000_base_device::writeword_d32_hmmu(offs_t address, UINT16 data) address = hmmu_translate_addr(this, address); } - if (!(address & 1)) + if (WORD_ALIGNED(address)) { m_space->write_word(address, data); return; @@ -1627,9 +1627,9 @@ UINT32 m68000_base_device::readlong_d32_hmmu(offs_t address) address = hmmu_translate_addr(this, address); } - if (!(address & 3)) + if (DWORD_ALIGNED(address)) return m_space->read_dword(address); - else if (!(address & 1)) + else if (WORD_ALIGNED(address)) { result = m_space->read_word(address) << 16; return result | m_space->read_word(address + 2); @@ -1647,12 +1647,12 @@ void m68000_base_device::writelong_d32_hmmu(offs_t address, UINT32 data) address = hmmu_translate_addr(this, address); } - if (!(address & 3)) + if (DWORD_ALIGNED(address)) { m_space->write_dword(address, data); return; } - else if (!(address & 1)) + else if (WORD_ALIGNED(address)) { m_space->write_word(address, data >> 16); m_space->write_word(address + 2, data); diff --git a/src/devices/cpu/m68000/m68kcpu.h b/src/devices/cpu/m68000/m68kcpu.h index 5cec889e002..7860298988f 100644 --- a/src/devices/cpu/m68000/m68kcpu.h +++ b/src/devices/cpu/m68000/m68kcpu.h @@ -626,7 +626,7 @@ static inline unsigned int m68k_read_pcrelative_8(m68000_base_device *m68k, unsi static inline unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, unsigned int address) { - if(address & 1) + if (!WORD_ALIGNED(address)) return (m68k->readimm16(address-1) << 8) | (m68k->readimm16(address+1) >> 8); @@ -638,7 +638,7 @@ static inline unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, uns static inline unsigned int m68k_read_pcrelative_32(m68000_base_device *m68k, unsigned int address) { - if(address & 1) + if (!WORD_ALIGNED(address)) return (m68k->readimm16(address-1) << 24) | (m68k->readimm16(address+1) << 8) | diff --git a/src/devices/cpu/m68000/m68kmake.cpp b/src/devices/cpu/m68000/m68kmake.cpp index f36797d76ba..941ae23f0aa 100644 --- a/src/devices/cpu/m68000/m68kmake.cpp +++ b/src/devices/cpu/m68000/m68kmake.cpp @@ -670,7 +670,7 @@ static opcode_struct* find_opcode(char* name, int size, char* spec_proc, char* s opcode_struct* op; - for(op = g_opcode_input_table;op->name != nullptr;op++) + for(op = g_opcode_input_table;op->name[0] != 0;op++) { if( strcmp(name, op->name) == 0 && (size == op->size) && diff --git a/src/devices/cpu/m68000/m68kops.cpp b/src/devices/cpu/m68000/m68kops.cpp index 0505f863c73..4cbeb42d78c 100644 --- a/src/devices/cpu/m68000/m68kops.cpp +++ b/src/devices/cpu/m68000/m68kops.cpp @@ -34872,3 +34872,5 @@ void m68ki_build_opcode_table(void) /* ======================================================================== */ /* ============================== END OF FILE ============================= */ /* ======================================================================== */ + + diff --git a/src/devices/cpu/m68000/makefile b/src/devices/cpu/m68000/makefile index 12b29fa267a..be25a067a78 100644 --- a/src/devices/cpu/m68000/makefile +++ b/src/devices/cpu/m68000/makefile @@ -8,24 +8,30 @@ ifeq ($(OS),os2) EXE := .exe endif +ifndef verbose + SILENT = @ +endif +CC = gcc +CXX = g++ + .PHONY: all clean -all : m68kmake$(EXE) m68kops.c clean +all : m68kmake$(EXE) m68kops.cpp clean: @echo Cleaning... -@rm -f m68kmake$(EXE) -@rm -f m68kmake.o + -@rm -f m68kops.* -m68kmake.o: m68kmake.c - @echo $(notdir $<) - @gcc -x c++ -std=gnu++98 -o "$@" -c "$<" +m68kmake.o: m68kmake.cpp + $(SILENT) $(CC) -x c++ -std=c++11 -o "$@" -c "$<" m68kmake$(EXE) : m68kmake.o @echo Linking $@... - @g++ -lstdc++ $^ -o $@ + $(SILENT) $(CXX) -lstdc++ $^ -o $@ -m68kops.c: m68kmake$(EXE) m68k_in.c +m68kops.cpp: m68kmake$(EXE) m68k_in.cpp @echo Generating M68K source files... - @m68kmake$(EXE) . m68k_in.c + $(SILENT) ./m68kmake$(EXE) . m68k_in.cpp diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp index f4747b7304c..711b9c3edf4 100644 --- a/src/devices/cpu/mips/mips3.cpp +++ b/src/devices/cpu/mips/mips3.cpp @@ -120,8 +120,10 @@ const device_type RM7000BE = &device_creator<rm7000be_device>; const device_type RM7000LE = &device_creator<rm7000le_device>; +// VR4300 and VR5432 have 4 fewer PFN bits, and only 32 TLB entries mips3_device::mips3_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, mips3_flavor flavor, endianness_t endianness) : cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__) + , device_vtlb_interface(mconfig, *this, AS_PROGRAM) , m_program_config("program", endianness, 32, 32, 0, 32, MIPS3_MIN_PAGE_SHIFT) , m_flavor(flavor) , m_core(nullptr) @@ -134,7 +136,6 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons , m_ll_value(0) , m_lld_value(0) , m_badcop_value(0) - , m_tlb_table(nullptr) , m_lwl(endianness == ENDIANNESS_BIG ? &mips3_device::lwl_be : &mips3_device::lwl_le) , m_lwr(endianness == ENDIANNESS_BIG ? &mips3_device::lwr_be : &mips3_device::lwr_le) , m_swl(endianness == ENDIANNESS_BIG ? &mips3_device::swl_be : &mips3_device::swl_le) @@ -144,14 +145,13 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons , m_sdl(endianness == ENDIANNESS_BIG ? &mips3_device::sdl_be : &mips3_device::sdl_le) , m_sdr(endianness == ENDIANNESS_BIG ? &mips3_device::sdr_be : &mips3_device::sdr_le) , c_system_clock(0) - , m_pfnmask(0) - , m_tlbentries(0) + , m_pfnmask(flavor == MIPS3_TYPE_VR4300 ? 0x000fffff : 0x00ffffff) + , m_tlbentries(flavor == MIPS3_TYPE_VR4300 ? 32 : MIPS3_MAX_TLB_ENTRIES) , m_bigendian(endianness == ENDIANNESS_BIG) , m_byte_xor(m_bigendian ? BYTE4_XOR_BE(0) : BYTE4_XOR_LE(0)) , m_word_xor(m_bigendian ? WORD_XOR_BE(0) : WORD_XOR_LE(0)) , c_icache_size(0) , c_dcache_size(0) - , m_vtlb(nullptr) , m_fastram_select(0) , m_debugger_temp(0) , m_cache(CACHE_SIZE + sizeof(internal_mips3_state)) @@ -190,17 +190,14 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons } memset(m_fastram, 0, sizeof(m_fastram)); memset(m_hotspot, 0, sizeof(m_hotspot)); + + // configure the virtual TLB + set_vtlb_fixed_entries(2 * m_tlbentries + 2); } void mips3_device::device_stop() { - if (m_vtlb != nullptr) - { - vtlb_free(m_vtlb); - m_vtlb = nullptr; - } - if (m_drcfe != nullptr) { m_drcfe = nullptr; @@ -331,28 +328,12 @@ void mips3_device::device_start() m_program = &space(AS_PROGRAM); m_direct = &m_program->direct(); - /* configure flavor-specific parameters */ - m_pfnmask = 0x00ffffff; - m_tlbentries = MIPS3_MAX_TLB_ENTRIES; - - /* VR4300 and VR5432 have 4 fewer PFN bits, and only 32 TLB entries */ - if (m_flavor == MIPS3_TYPE_VR4300) - { - m_pfnmask = 0x000fffff; - m_tlbentries = 32; - } - /* set up the endianness */ m_program->accessors(m_memory); - /* allocate the virtual TLB */ - m_vtlb = vtlb_alloc(this, AS_PROGRAM, 2 * m_tlbentries + 2, 0); - /* allocate a timer for the compare interrupt */ m_compare_int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mips3_device::compare_int_callback), this)); - m_tlb_table = vtlb_table(m_vtlb); - UINT32 flags = 0; /* initialize the UML generator */ m_drcuml = std::make_unique<drcuml_state>(*this, m_cache, flags, 8, 32, 2); @@ -950,13 +931,13 @@ void mips3_device::device_reset() entry->entry_hi = 0xffffffff; entry->entry_lo[0] = 0xfffffff8; entry->entry_lo[1] = 0xfffffff8; - vtlb_load(m_vtlb, 2 * tlbindex + 0, 0, 0, 0); - vtlb_load(m_vtlb, 2 * tlbindex + 1, 0, 0, 0); + vtlb_load(2 * tlbindex + 0, 0, 0, 0); + vtlb_load(2 * tlbindex + 1, 0, 0, 0); } /* load the fixed TLB range */ - vtlb_load(m_vtlb, 2 * m_tlbentries + 0, (0xa0000000 - 0x80000000) >> MIPS3_MIN_PAGE_SHIFT, 0x80000000, 0x00000000 | VTLB_READ_ALLOWED | VTLB_WRITE_ALLOWED | VTLB_FETCH_ALLOWED | VTLB_FLAG_VALID); - vtlb_load(m_vtlb, 2 * m_tlbentries + 1, (0xc0000000 - 0xa0000000) >> MIPS3_MIN_PAGE_SHIFT, 0xa0000000, 0x00000000 | VTLB_READ_ALLOWED | VTLB_WRITE_ALLOWED | VTLB_FETCH_ALLOWED | VTLB_FLAG_VALID); + vtlb_load(2 * m_tlbentries + 0, (0xa0000000 - 0x80000000) >> MIPS3_MIN_PAGE_SHIFT, 0x80000000, 0x00000000 | VTLB_READ_ALLOWED | VTLB_WRITE_ALLOWED | VTLB_FETCH_ALLOWED | VTLB_FLAG_VALID); + vtlb_load(2 * m_tlbentries + 1, (0xc0000000 - 0xa0000000) >> MIPS3_MIN_PAGE_SHIFT, 0xa0000000, 0x00000000 | VTLB_READ_ALLOWED | VTLB_WRITE_ALLOWED | VTLB_FETCH_ALLOWED | VTLB_FLAG_VALID); m_core->mode = (MODE_KERNEL << 1) | 0; m_cache_dirty = TRUE; @@ -969,7 +950,7 @@ bool mips3_device::memory_translate(address_spacenum spacenum, int intention, of /* only applies to the program address space */ if (spacenum == AS_PROGRAM) { - const vtlb_entry *table = vtlb_table(m_vtlb); + const vtlb_entry *table = vtlb_table(); vtlb_entry entry = table[address >> MIPS3_MIN_PAGE_SHIFT]; if ((entry & (1 << (intention & (TRANSLATE_TYPE_MASK | TRANSLATE_USER_MASK)))) == 0) return false; @@ -998,7 +979,7 @@ offs_t mips3_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op inline bool mips3_device::RBYTE(offs_t address, UINT32 *result) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_READ_ALLOWED) { const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff); @@ -1031,7 +1012,7 @@ inline bool mips3_device::RBYTE(offs_t address, UINT32 *result) inline bool mips3_device::RHALF(offs_t address, UINT32 *result) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_READ_ALLOWED) { const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff); @@ -1064,7 +1045,7 @@ inline bool mips3_device::RHALF(offs_t address, UINT32 *result) inline bool mips3_device::RWORD(offs_t address, UINT32 *result) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_READ_ALLOWED) { const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff); @@ -1097,7 +1078,7 @@ inline bool mips3_device::RWORD(offs_t address, UINT32 *result) inline bool mips3_device::RWORD_MASKED(offs_t address, UINT32 *result, UINT32 mem_mask) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_READ_ALLOWED) { *result = (*m_memory.read_dword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), mem_mask); @@ -1120,7 +1101,7 @@ inline bool mips3_device::RWORD_MASKED(offs_t address, UINT32 *result, UINT32 me inline bool mips3_device::RDOUBLE(offs_t address, UINT64 *result) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_READ_ALLOWED) { *result = (*m_memory.read_qword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff)); @@ -1143,7 +1124,7 @@ inline bool mips3_device::RDOUBLE(offs_t address, UINT64 *result) inline bool mips3_device::RDOUBLE_MASKED(offs_t address, UINT64 *result, UINT64 mem_mask) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_READ_ALLOWED) { *result = (*m_memory.read_qword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), mem_mask); @@ -1166,7 +1147,7 @@ inline bool mips3_device::RDOUBLE_MASKED(offs_t address, UINT64 *result, UINT64 inline void mips3_device::WBYTE(offs_t address, UINT8 data) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_WRITE_ALLOWED) { const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff); @@ -1200,7 +1181,7 @@ inline void mips3_device::WBYTE(offs_t address, UINT8 data) inline void mips3_device::WHALF(offs_t address, UINT16 data) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_WRITE_ALLOWED) { const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff); @@ -1234,7 +1215,7 @@ inline void mips3_device::WHALF(offs_t address, UINT16 data) inline void mips3_device::WWORD(offs_t address, UINT32 data) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_WRITE_ALLOWED) { const UINT32 tlbaddress = (tlbval & ~0xfff) | (address & 0xfff); @@ -1268,7 +1249,7 @@ inline void mips3_device::WWORD(offs_t address, UINT32 data) inline void mips3_device::WWORD_MASKED(offs_t address, UINT32 data, UINT32 mem_mask) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_WRITE_ALLOWED) { (*m_memory.write_dword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data, mem_mask); @@ -1292,7 +1273,7 @@ inline void mips3_device::WWORD_MASKED(offs_t address, UINT32 data, UINT32 mem_m inline void mips3_device::WDOUBLE(offs_t address, UINT64 data) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_WRITE_ALLOWED) { (*m_memory.write_qword)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data); @@ -1316,7 +1297,7 @@ inline void mips3_device::WDOUBLE(offs_t address, UINT64 data) inline void mips3_device::WDOUBLE_MASKED(offs_t address, UINT64 data, UINT64 mem_mask) { - const UINT32 tlbval = m_tlb_table[address >> 12]; + const UINT32 tlbval = vtlb_table()[address >> 12]; if (tlbval & VTLB_WRITE_ALLOWED) { (*m_memory.write_qword_masked)(*m_program, (tlbval & ~0xfff) | (address & 0xfff), data, mem_mask); diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h index 9e0de9ed419..1715861bb89 100644 --- a/src/devices/cpu/mips/mips3.h +++ b/src/devices/cpu/mips/mips3.h @@ -15,7 +15,7 @@ #define __MIPS3_H__ -#include "cpu/vtlb.h" +#include "divtlb.h" #include "cpu/drcfe.h" #include "cpu/drcuml.h" #include "cpu/drcumlsh.h" @@ -245,7 +245,7 @@ struct compiler_state class mips3_frontend; -class mips3_device : public cpu_device +class mips3_device : public cpu_device, public device_vtlb_interface { friend class mips3_frontend; @@ -355,7 +355,6 @@ private: UINT32 m_ll_value; UINT64 m_lld_value; UINT32 m_badcop_value; - const vtlb_entry *m_tlb_table; /* endian-dependent load/store */ typedef void (mips3_device::*loadstore_func)(UINT32 op); @@ -389,7 +388,6 @@ private: size_t c_dcache_size; /* MMU */ - vtlb_state * m_vtlb; mips3_tlb_entry m_tlb[MIPS3_MAX_TLB_ENTRIES]; /* fast RAM */ diff --git a/src/devices/cpu/mips/mips3com.cpp b/src/devices/cpu/mips/mips3com.cpp index bcd6f6f349a..2fcf8de1844 100644 --- a/src/devices/cpu/mips/mips3com.cpp +++ b/src/devices/cpu/mips/mips3com.cpp @@ -325,8 +325,8 @@ void mips3_device::tlb_map_entry(int tlbindex) /* the ASID doesn't match the current ASID, and if the page isn't global, unmap it from the TLB */ if (!tlb_entry_matches_asid(entry, current_asid) && !tlb_entry_is_global(entry)) { - vtlb_load(m_vtlb, 2 * tlbindex + 0, 0, 0, 0); - vtlb_load(m_vtlb, 2 * tlbindex + 1, 0, 0, 0); + vtlb_load(2 * tlbindex + 0, 0, 0, 0); + vtlb_load(2 * tlbindex + 1, 0, 0, 0); return; } @@ -334,8 +334,8 @@ void mips3_device::tlb_map_entry(int tlbindex) vpn = ((entry->entry_hi >> 13) & 0x07ffffff) << 1; if (vpn >= (1 << (MIPS3_MAX_PADDR_SHIFT - MIPS3_MIN_PAGE_SHIFT))) { - vtlb_load(m_vtlb, 2 * tlbindex + 0, 0, 0, 0); - vtlb_load(m_vtlb, 2 * tlbindex + 1, 0, 0, 0); + vtlb_load(2 * tlbindex + 0, 0, 0, 0); + vtlb_load(2 * tlbindex + 1, 0, 0, 0); return; } @@ -369,9 +369,9 @@ void mips3_device::tlb_map_entry(int tlbindex) /* load the virtual TLB with the corresponding entries */ if ((effvpn + count) <= (0x80000000 >> MIPS3_MIN_PAGE_SHIFT) || effvpn >= (0xc0000000 >> MIPS3_MIN_PAGE_SHIFT)) - vtlb_load(m_vtlb, 2 * tlbindex + which, count, effvpn << MIPS3_MIN_PAGE_SHIFT, (pfn << MIPS3_MIN_PAGE_SHIFT) | flags); + vtlb_load(2 * tlbindex + which, count, effvpn << MIPS3_MIN_PAGE_SHIFT, (pfn << MIPS3_MIN_PAGE_SHIFT) | flags); else - vtlb_load(m_vtlb, 2 * tlbindex + which, 0, 0, 0); + vtlb_load(2 * tlbindex + which, 0, 0, 0); } } diff --git a/src/devices/cpu/mips/mips3com.h b/src/devices/cpu/mips/mips3com.h index 86d7f0c7a05..20facae78d0 100644 --- a/src/devices/cpu/mips/mips3com.h +++ b/src/devices/cpu/mips/mips3com.h @@ -14,7 +14,6 @@ #define __MIPS3COM_H__ #include "mips3.h" -#include "cpu/vtlb.h" /*************************************************************************** diff --git a/src/devices/cpu/mips/mips3drc.cpp b/src/devices/cpu/mips/mips3drc.cpp index 4e6e9771a38..7b6da3a1626 100644 --- a/src/devices/cpu/mips/mips3drc.cpp +++ b/src/devices/cpu/mips/mips3drc.cpp @@ -667,7 +667,7 @@ void mips3_device::static_generate_tlb_mismatch() UML_RECOVER(block, I0, MAPVAR_PC); // recover i0,PC UML_MOV(block, mem(&m_core->pc), I0); // mov <pc>,i0 UML_SHR(block, I1, I0, 12); // shr i1,i0,12 - UML_LOAD(block, I1, (void *)vtlb_table(m_vtlb), I1, SIZE_DWORD, SCALE_x4);// load i1,[vtlb_table],i1,dword + UML_LOAD(block, I1, (void *)vtlb_table(), I1, SIZE_DWORD, SCALE_x4);// load i1,[vtlb_table],i1,dword if (PRINTF_MMU) { static const char text[] = "TLB mismatch @ %08X (ent=%08X)\n"; @@ -839,7 +839,7 @@ void mips3_device::static_generate_memory_accessor(int mode, int size, int iswri /* general case: assume paging and perform a translation */ UML_SHR(block, I3, I0, 12); // shr i3,i0,12 - UML_LOAD(block, I3, (void *)vtlb_table(m_vtlb), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb_table],i3,dword + UML_LOAD(block, I3, (void *)vtlb_table(), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb_table],i3,dword UML_TEST(block, I3, iswrite ? VTLB_WRITE_ALLOWED : VTLB_READ_ALLOWED);// test i3,iswrite ? VTLB_WRITE_ALLOWED : VTLB_READ_ALLOWED UML_JMPc(block, COND_Z, tlbmiss = label++); // jmp tlbmiss,z UML_ROLINS(block, I0, I3, 0, 0xfffff000); // rolins i0,i3,0,0xfffff000 @@ -1226,7 +1226,7 @@ void mips3_device::generate_sequence_instruction(drcuml_block *block, compiler_s /* validate our TLB entry at this PC; if we fail, we need to handle it */ if ((desc->flags & OPFLAG_VALIDATE_TLB) && (desc->pc < 0x80000000 || desc->pc >= 0xc0000000)) { - const vtlb_entry *tlbtable = vtlb_table(m_vtlb); + const vtlb_entry *tlbtable = vtlb_table(); /* if we currently have a valid TLB read entry, we just verify */ if (tlbtable[desc->pc >> 12] & VTLB_FETCH_ALLOWED) diff --git a/src/devices/cpu/pdp1/pdp1.cpp b/src/devices/cpu/pdp1/pdp1.cpp index cbb43535d7f..d7a9ad008fb 100644 --- a/src/devices/cpu/pdp1/pdp1.cpp +++ b/src/devices/cpu/pdp1/pdp1.cpp @@ -384,7 +384,7 @@ pdp1_device::pdp1_device(const machine_config &mconfig, const char *tag, device_ : cpu_device(mconfig, PDP1, "PDP1", tag, owner, clock, "pdp1_cpu", __FILE__) , m_program_config("program", ENDIANNESS_BIG, 32, 18, 0) { - m_is_octal = true; + m_program_config.m_is_octal = true; } diff --git a/src/devices/cpu/pdp1/tx0.cpp b/src/devices/cpu/pdp1/tx0.cpp index 3a4fd7f1fb1..8e5b41776a0 100644 --- a/src/devices/cpu/pdp1/tx0.cpp +++ b/src/devices/cpu/pdp1/tx0.cpp @@ -61,7 +61,7 @@ tx0_device::tx0_device(const machine_config &mconfig, device_type type, const ch , m_sel_handler(*this) , m_io_reset_callback(*this) { - m_is_octal = true; + m_program_config.m_is_octal = true; } tx0_8kw_device::tx0_8kw_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h index 5e40ee88249..450b4ca2257 100644 --- a/src/devices/cpu/powerpc/ppc.h +++ b/src/devices/cpu/powerpc/ppc.h @@ -14,7 +14,7 @@ #ifndef __PPC_H__ #define __PPC_H__ -#include "cpu/vtlb.h" +#include "divtlb.h" #include "cpu/drcfe.h" #include "cpu/drcuml.h" #include "cpu/drcumlsh.h" @@ -171,7 +171,7 @@ enum class ppc_frontend; -class ppc_device : public cpu_device +class ppc_device : public cpu_device, public device_vtlb_interface { friend class ppc_frontend; @@ -462,9 +462,6 @@ protected: UINT32 m_sebr; UINT32 m_ser; - /* MMU */ - vtlb_state *m_vtlb; - /* architectural distinctions */ powerpc_flavor m_flavor; UINT32 m_cap; diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp index 9036ff2c794..a9a26b29a5c 100644 --- a/src/devices/cpu/powerpc/ppccom.cpp +++ b/src/devices/cpu/powerpc/ppccom.cpp @@ -209,11 +209,11 @@ const device_type PPC405GP = &device_creator<ppc405gp_device>; ppc_device::ppc_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int address_bits, int data_bits, powerpc_flavor flavor, UINT32 cap, UINT32 tb_divisor, address_map_constructor internal_map) : cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__) + , device_vtlb_interface(mconfig, *this, AS_PROGRAM) , m_program_config("program", ENDIANNESS_BIG, data_bits, address_bits, 0, internal_map) , c_bus_frequency(0) , m_core(nullptr) , m_bus_freq_multiplier(1) - , m_vtlb(nullptr) , m_flavor(flavor) , m_cap(cap) , m_tb_divisor(tb_divisor) @@ -224,6 +224,11 @@ ppc_device::ppc_device(const machine_config &mconfig, device_type type, const ch { m_program_config.m_logaddr_width = 32; m_program_config.m_page_shift = POWERPC_MIN_PAGE_SHIFT; + + // configure the virtual TLB + set_vtlb_dynamic_entries(POWERPC_TLB_ENTRIES); + if (m_cap & PPCCAP_603_MMU) + set_vtlb_fixed_entries(PPC603_FIXED_TLB_ENTRIES); } //ppc403_device::ppc403_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) @@ -708,9 +713,6 @@ void ppc_device::device_start() if (!(m_cap & PPCCAP_4XX) && space_config()->m_endianness != ENDIANNESS_NATIVE) m_codexor = 4; - /* allocate the virtual TLB */ - m_vtlb = vtlb_alloc(this, AS_PROGRAM, (m_cap & PPCCAP_603_MMU) ? PPC603_FIXED_TLB_ENTRIES : 0, POWERPC_TLB_ENTRIES); - /* allocate a timer for the compare interrupt */ if ((m_cap & PPCCAP_OEA) && (m_tb_divisor)) m_decrementer_int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ppc_device::decrementer_int_callback), this)); @@ -1148,9 +1150,6 @@ void ppc_device::state_string_export(const device_state_entry &entry, std::strin void ppc_device::device_stop() { - if (m_vtlb != nullptr) - vtlb_free(m_vtlb); - m_vtlb = nullptr; } @@ -1199,12 +1198,11 @@ void ppc_device::device_reset() m_core->irq_pending = 0; /* flush the TLB */ - vtlb_flush_dynamic(m_vtlb); if (m_cap & PPCCAP_603_MMU) { for (int tlbindex = 0; tlbindex < PPC603_FIXED_TLB_ENTRIES; tlbindex++) { - vtlb_load(m_vtlb, tlbindex, 0, 0, 0); + vtlb_load(tlbindex, 0, 0, 0); } } @@ -1385,7 +1383,7 @@ UINT32 ppc_device::ppccom_translate_address_internal(int intention, offs_t &addr /* if we're simulating the 603 MMU, fill in the data and stop here */ if (m_cap & PPCCAP_603_MMU) { - UINT32 entry = vtlb_table(m_vtlb)[address >> 12]; + UINT32 entry = vtlb_table()[address >> 12]; m_core->mmu603_cmp = 0x80000000 | ((segreg & 0xffffff) << 7) | (0 << 6) | ((address >> 22) & 0x3f); m_core->mmu603_hash[0] = hashbase | ((hash << 6) & hashmask); m_core->mmu603_hash[1] = hashbase | ((~hash << 6) & hashmask); @@ -1465,7 +1463,7 @@ bool ppc_device::memory_translate(address_spacenum spacenum, int intention, offs void ppc_device::ppccom_tlb_fill() { - vtlb_fill(m_vtlb, m_core->param0, m_core->param1); + vtlb_fill(m_core->param0, m_core->param1); } @@ -1476,7 +1474,7 @@ void ppc_device::ppccom_tlb_fill() void ppc_device::ppccom_tlb_flush() { - vtlb_flush_dynamic(m_vtlb); + vtlb_flush_dynamic(); } @@ -1492,7 +1490,7 @@ void ppc_device::ppccom_tlb_flush() void ppc_device::ppccom_execute_tlbie() { - vtlb_flush_address(m_vtlb, m_core->param0); + vtlb_flush_address(m_core->param0); } @@ -1503,7 +1501,7 @@ void ppc_device::ppccom_execute_tlbie() void ppc_device::ppccom_execute_tlbia() { - vtlb_flush_dynamic(m_vtlb); + vtlb_flush_dynamic(); } @@ -1530,7 +1528,7 @@ void ppc_device::ppccom_execute_tlbl() flags |= VTLB_FETCH_ALLOWED; /* load the entry */ - vtlb_load(m_vtlb, entrynum, 1, address, (m_core->spr[SPR603_RPA] & 0xfffff000) | flags); + vtlb_load(entrynum, 1, address, (m_core->spr[SPR603_RPA] & 0xfffff000) | flags); } diff --git a/src/devices/cpu/powerpc/ppcdrc.cpp b/src/devices/cpu/powerpc/ppcdrc.cpp index ed502d344de..35b984d240d 100644 --- a/src/devices/cpu/powerpc/ppcdrc.cpp +++ b/src/devices/cpu/powerpc/ppcdrc.cpp @@ -743,11 +743,11 @@ void ppc_device::static_generate_tlb_mismatch() UML_HANDLE(block, *m_tlb_mismatch); // handle tlb_mismatch UML_RECOVER(block, I0, MAPVAR_PC); // recover i0,PC UML_SHR(block, I1, I0, 12); // shr i1,i0,12 - UML_LOAD(block, I2, (void *)vtlb_table(m_vtlb), I1, SIZE_DWORD, SCALE_x4); // load i2,[vtlb],i1,dword + UML_LOAD(block, I2, (void *)vtlb_table(), I1, SIZE_DWORD, SCALE_x4); // load i2,[vtlb],i1,dword UML_MOV(block, mem(&m_core->param0), I0); // mov [param0],i0 UML_MOV(block, mem(&m_core->param1), TRANSLATE_FETCH); // mov [param1],TRANSLATE_FETCH UML_CALLC(block, (c_function)cfunc_ppccom_tlb_fill, this); // callc tlbfill,ppc - UML_LOAD(block, I1, (void *)vtlb_table(m_vtlb), I1, SIZE_DWORD, SCALE_x4); // load i1,[vtlb],i1,dword + UML_LOAD(block, I1, (void *)vtlb_table(), I1, SIZE_DWORD, SCALE_x4); // load i1,[vtlb],i1,dword UML_TEST(block, I1, VTLB_FETCH_ALLOWED); // test i1,VTLB_FETCH_ALLOWED UML_JMPc(block, COND_Z, isi = label++); // jmp isi,z UML_CMP(block, I2, 0); // cmp i2,0 @@ -1021,7 +1021,7 @@ void ppc_device::static_generate_memory_accessor(int mode, int size, int iswrite if (((m_cap & PPCCAP_OEA) && (mode & MODE_DATA_TRANSLATION)) || (iswrite && (m_cap & PPCCAP_4XX) && (mode & MODE_PROTECTION))) { UML_SHR(block, I3, I0, 12); // shr i3,i0,12 - UML_LOAD(block, I3, (void *)vtlb_table(m_vtlb), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb],i3,dword + UML_LOAD(block, I3, (void *)vtlb_table(), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb],i3,dword UML_TEST(block, I3, (UINT64)1 << translate_type); // test i3,1 << translate_type UML_JMPc(block, COND_Z, tlbmiss = label++); // jmp tlbmiss,z UML_LABEL(block, tlbreturn = label++); // tlbreturn: @@ -1338,7 +1338,7 @@ void ppc_device::static_generate_memory_accessor(int mode, int size, int iswrite UML_MOV(block, mem(&m_core->param1), translate_type); // mov [param1],translate_type UML_CALLC(block, (c_function)cfunc_ppccom_tlb_fill, this); // callc tlbfill,ppc UML_SHR(block, I3, I0, 12); // shr i3,i0,12 - UML_LOAD(block, I3, (void *)vtlb_table(m_vtlb), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb],i3,dword + UML_LOAD(block, I3, (void *)vtlb_table(), I3, SIZE_DWORD, SCALE_x4);// load i3,[vtlb],i3,dword UML_TEST(block, I3, (UINT64)1 << translate_type); // test i3,1 << translate_type UML_JMPc(block, COND_NZ, tlbreturn); // jmp tlbreturn,nz @@ -1703,7 +1703,7 @@ void ppc_device::generate_sequence_instruction(drcuml_block *block, compiler_sta /* validate our TLB entry at this PC; if we fail, we need to handle it */ if ((desc->flags & OPFLAG_VALIDATE_TLB) && (m_core->mode & MODE_DATA_TRANSLATION)) { - const vtlb_entry *tlbtable = vtlb_table(m_vtlb); + const vtlb_entry *tlbtable = vtlb_table(); /* if we currently have a valid TLB read entry, we just verify */ if (tlbtable[desc->pc >> 12] != 0) diff --git a/src/devices/cpu/se3208/se3208.cpp b/src/devices/cpu/se3208/se3208.cpp index 011cc103909..45c4c38cc86 100644 --- a/src/devices/cpu/se3208/se3208.cpp +++ b/src/devices/cpu/se3208/se3208.cpp @@ -54,27 +54,22 @@ se3208_device::se3208_device(const machine_config &mconfig, const char *tag, dev UINT32 se3208_device::read_dword_unaligned(address_space &space, UINT32 address) { - switch (address & 3) - { - case 0: + if (DWORD_ALIGNED(address)) return space.read_dword(address); - case 1: - case 2: - case 3: - printf("%08x: dword READ unaligned %08x\n", m_PC, address); + else + { + osd_printf_debug("%08x: dword READ unaligned %08x\n", m_PC, address); #if ALLOW_UNALIGNED_DWORD_ACCESS return space.read_byte(address) | space.read_byte(address + 1) << 8 | space.read_byte(address + 2) << 16 | space.read_byte(address + 3) << 24; #else return 0; #endif } - - return 0; } UINT16 se3208_device::read_word_unaligned(address_space &space, UINT32 address) { - if (address & 1) + if (!WORD_ALIGNED(address)) return space.read_byte(address) | space.read_byte(address+1)<<8; else return space.read_word(address); @@ -82,31 +77,24 @@ UINT16 se3208_device::read_word_unaligned(address_space &space, UINT32 address) void se3208_device::write_dword_unaligned(address_space &space, UINT32 address, UINT32 data) { - switch (address & 3) - { - case 0: + if (DWORD_ALIGNED(address)) space.write_dword(address, data); - break; - - case 1: - case 2: - case 3: + else + { #if ALLOW_UNALIGNED_DWORD_ACCESS space.write_byte(address, data & 0xff); space.write_byte(address + 1, (data >> 8) & 0xff); space.write_byte(address + 2, (data >> 16) & 0xff); space.write_byte(address + 3, (data >> 24) & 0xff); #endif - printf("%08x: dword WRITE unaligned %08x\n", m_PC, address); - - break; + osd_printf_debug("%08x: dword WRITE unaligned %08x\n", m_PC, address); } } void se3208_device::write_word_unaligned(address_space &space, UINT32 address, UINT16 data) { - if (address & 1) + if (!WORD_ALIGNED(address)) { space.write_byte(address, data & 0xff); space.write_byte(address+1, (data>>8)&0xff); diff --git a/src/devices/cpu/t11/t11.cpp b/src/devices/cpu/t11/t11.cpp index 72c2e80c91b..5e32e2081f5 100644 --- a/src/devices/cpu/t11/t11.cpp +++ b/src/devices/cpu/t11/t11.cpp @@ -49,7 +49,7 @@ t11_device::t11_device(const machine_config &mconfig, device_type type, const ch , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0) , c_initial_mode(0) { - m_is_octal = true; + m_program_config.m_is_octal = true; memset(m_reg, 0x00, sizeof(m_reg)); memset(&m_psw, 0x00, sizeof(m_psw)); } @@ -59,7 +59,7 @@ t11_device::t11_device(const machine_config &mconfig, const char *tag, device_t , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0) , c_initial_mode(0) { - m_is_octal = true; + m_program_config.m_is_octal = true; memset(m_reg, 0x00, sizeof(m_reg)); memset(&m_psw, 0x00, sizeof(m_psw)); } diff --git a/src/devices/cpu/vtlb.cpp b/src/devices/cpu/vtlb.cpp deleted file mode 100644 index 4c9a9a2f311..00000000000 --- a/src/devices/cpu/vtlb.cpp +++ /dev/null @@ -1,310 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -/*************************************************************************** - - vtlb.c - - Generic virtual TLB implementation. - -***************************************************************************/ - -#include "emu.h" -#include "vtlb.h" - - - -/*************************************************************************** - DEBUGGING -***************************************************************************/ - -#define PRINTF_TLB (0) - - - -/*************************************************************************** - TYPE DEFINITIONS -***************************************************************************/ - -/* VTLB state */ -struct vtlb_state -{ - cpu_device * cpudevice; /* CPU device */ - address_spacenum space; /* address space */ - int dynamic; /* number of dynamic entries */ - int fixed; /* number of fixed entries */ - int dynindex; /* index of next dynamic entry */ - int pageshift; /* bits to shift to get page index */ - int addrwidth; /* logical address bus width */ - std::vector<offs_t> live; /* array of live entries by table index */ - std::vector<int> fixedpages; /* number of pages each fixed entry covers */ - std::vector<vtlb_entry> table; /* table of entries by address */ -}; - - - -/*************************************************************************** - INITIALIZATION/TEARDOWN -***************************************************************************/ - -/*------------------------------------------------- - vtlb_alloc - allocate a new VTLB for the - given CPU --------------------------------------------------*/ - -vtlb_state *vtlb_alloc(device_t *cpu, address_spacenum space, int fixed_entries, int dynamic_entries) -{ - vtlb_state *vtlb; - - /* allocate memory for the core structure */ - vtlb = auto_alloc_clear(cpu->machine(), <vtlb_state>()); - - /* fill in CPU information */ - vtlb->cpudevice = downcast<cpu_device *>(cpu); - vtlb->space = space; - vtlb->dynamic = dynamic_entries; - vtlb->fixed = fixed_entries; - const address_space_config *spaceconfig = device_get_space_config(*cpu, space); - assert(spaceconfig != nullptr); - vtlb->pageshift = spaceconfig->m_page_shift; - vtlb->addrwidth = spaceconfig->m_logaddr_width; - - /* validate CPU information */ - assert((1 << vtlb->pageshift) > VTLB_FLAGS_MASK); - assert(vtlb->addrwidth > vtlb->pageshift); - - /* allocate the entry array */ - vtlb->live.resize(fixed_entries + dynamic_entries); - memset(&vtlb->live[0], 0, vtlb->live.size()*sizeof(vtlb->live[0])); - cpu->save_item(NAME(vtlb->live)); - - /* allocate the lookup table */ - vtlb->table.resize((size_t) 1 << (vtlb->addrwidth - vtlb->pageshift)); - memset(&vtlb->table[0], 0, vtlb->table.size()*sizeof(vtlb->table[0])); - cpu->save_item(NAME(vtlb->table)); - - /* allocate the fixed page count array */ - if (fixed_entries > 0) - { - vtlb->fixedpages.resize(fixed_entries); - memset(&vtlb->fixedpages[0], 0, fixed_entries*sizeof(vtlb->fixedpages[0])); - cpu->save_item(NAME(vtlb->fixedpages)); - } - return vtlb; -} - - -/*------------------------------------------------- - vtlb_free - free an allocated VTLB --------------------------------------------------*/ - -void vtlb_free(vtlb_state *vtlb) -{ - auto_free(vtlb->cpudevice->machine(), vtlb); -} - - - -/*************************************************************************** - FILLING -***************************************************************************/ - -/*------------------------------------------------- - vtlb_fill - rcalled by the CPU core in - response to an unmapped access --------------------------------------------------*/ - -int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention) -{ - offs_t tableindex = address >> vtlb->pageshift; - vtlb_entry entry = vtlb->table[tableindex]; - offs_t taddress; - - if (PRINTF_TLB) - printf("vtlb_fill: %08X(%X) ... ", address, intention); - - /* should not be called here if the entry is in the table already */ -// assert((entry & (1 << intention)) == 0); - - /* if we have no dynamic entries, we always fail */ - if (vtlb->dynamic == 0) - { - if (PRINTF_TLB) - printf("failed: no dynamic entries\n"); - return FALSE; - } - - /* ask the CPU core to translate for us */ - taddress = address; - if (!vtlb->cpudevice->translate(vtlb->space, intention, taddress)) - { - if (PRINTF_TLB) - printf("failed: no translation\n"); - return FALSE; - } - - /* if this is the first successful translation for this address, allocate a new entry */ - if ((entry & VTLB_FLAGS_MASK) == 0) - { - int liveindex = vtlb->dynindex++ % vtlb->dynamic; - - /* if an entry already exists at this index, free it */ - if (vtlb->live[liveindex] != 0) - vtlb->table[vtlb->live[liveindex] - 1] = 0; - - /* claim this new entry */ - vtlb->live[liveindex] = tableindex + 1; - - /* form a new blank entry */ - entry = (taddress >> vtlb->pageshift) << vtlb->pageshift; - entry |= VTLB_FLAG_VALID; - - if (PRINTF_TLB) - printf("success (%08X), new entry\n", taddress); - } - - /* otherwise, ensure that different intentions do not produce different addresses */ - else - { - assert((entry >> vtlb->pageshift) == (taddress >> vtlb->pageshift)); - assert(entry & VTLB_FLAG_VALID); - - if (PRINTF_TLB) - printf("success (%08X), existing entry\n", taddress); - } - - /* add the intention to the list of valid intentions and store */ - entry |= 1 << (intention & (TRANSLATE_TYPE_MASK | TRANSLATE_USER_MASK)); - vtlb->table[tableindex] = entry; - return TRUE; -} - - -/*------------------------------------------------- - vtlb_load - load a fixed VTLB entry --------------------------------------------------*/ - -void vtlb_load(vtlb_state *vtlb, int entrynum, int numpages, offs_t address, vtlb_entry value) -{ - offs_t tableindex = address >> vtlb->pageshift; - int liveindex = vtlb->dynamic + entrynum; - int pagenum; - - /* must be in range */ - assert(entrynum >= 0 && entrynum < vtlb->fixed); - - if (PRINTF_TLB) - printf("vtlb_load %d for %d pages at %08X == %08X\n", entrynum, numpages, address, value); - - /* if an entry already exists at this index, free it */ - if (vtlb->live[liveindex] != 0) - { - int pagecount = vtlb->fixedpages[entrynum]; - int oldtableindex = vtlb->live[liveindex] - 1; - for (pagenum = 0; pagenum < pagecount; pagenum++) - vtlb->table[oldtableindex + pagenum] = 0; - } - - /* claim this new entry */ - vtlb->live[liveindex] = tableindex + 1; - - /* store the raw value, making sure the "fixed" flag is set */ - value |= VTLB_FLAG_FIXED; - vtlb->fixedpages[entrynum] = numpages; - for (pagenum = 0; pagenum < numpages; pagenum++) - vtlb->table[tableindex + pagenum] = value + (pagenum << vtlb->pageshift); -} - -/*------------------------------------------------- - vtlb_dynload - load a dynamic VTLB entry --------------------------------------------------*/ - -void vtlb_dynload(vtlb_state *vtlb, UINT32 index, offs_t address, vtlb_entry value) -{ - vtlb_entry entry = vtlb->table[index]; - - if (vtlb->dynamic == 0) - { - if (PRINTF_TLB) - printf("failed: no dynamic entries\n"); - return; - } - - int liveindex = vtlb->dynindex++ % vtlb->dynamic; - /* is entry already live? */ - if (!(entry & VTLB_FLAG_VALID)) - { - /* if an entry already exists at this index, free it */ - if (vtlb->live[liveindex] != 0) - vtlb->table[vtlb->live[liveindex] - 1] = 0; - - /* claim this new entry */ - vtlb->live[liveindex] = index + 1; - } - /* form a new blank entry */ - entry = (address >> vtlb->pageshift) << vtlb->pageshift; - entry |= VTLB_FLAG_VALID | value; - - if (PRINTF_TLB) - printf("success (%08X), new entry\n", address); - - vtlb->table[index] = entry; -} - -/*************************************************************************** - FLUSHING -***************************************************************************/ - -/*------------------------------------------------- - vtlb_flush_dynamic - flush all knowledge - from the dynamic part of the VTLB --------------------------------------------------*/ - -void vtlb_flush_dynamic(vtlb_state *vtlb) -{ - int liveindex; - - if (PRINTF_TLB) - printf("vtlb_flush_dynamic\n"); - - /* loop over live entries and release them from the table */ - for (liveindex = 0; liveindex < vtlb->dynamic; liveindex++) - if (vtlb->live[liveindex] != 0) - { - offs_t tableindex = vtlb->live[liveindex] - 1; - vtlb->table[tableindex] = 0; - vtlb->live[liveindex] = 0; - } -} - - -/*------------------------------------------------- - vtlb_flush_address - flush knowledge of a - particular address from the VTLB --------------------------------------------------*/ - -void vtlb_flush_address(vtlb_state *vtlb, offs_t address) -{ - offs_t tableindex = address >> vtlb->pageshift; - - if (PRINTF_TLB) - printf("vtlb_flush_address %08X\n", address); - - /* free the entry in the table; for speed, we leave the entry in the live array */ - vtlb->table[tableindex] = 0; -} - - - -/*************************************************************************** - ACCESSORS -***************************************************************************/ - -/*------------------------------------------------- - vtlb_table - return a pointer to the base of - the linear VTLB lookup table --------------------------------------------------*/ - -const vtlb_entry *vtlb_table(vtlb_state *vtlb) -{ - return &vtlb->table[0]; -} diff --git a/src/devices/cpu/vtlb.h b/src/devices/cpu/vtlb.h deleted file mode 100644 index f63a0ac50f6..00000000000 --- a/src/devices/cpu/vtlb.h +++ /dev/null @@ -1,88 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -/*************************************************************************** - - vtlb.h - - Generic virtual TLB implementation. - -***************************************************************************/ - -#pragma once - -#ifndef __VTLB_H__ -#define __VTLB_H__ - - - -/*************************************************************************** - CONSTANTS -***************************************************************************/ - -#define VTLB_FLAGS_MASK 0xff - -#define VTLB_READ_ALLOWED 0x01 /* (1 << TRANSLATE_READ) */ -#define VTLB_WRITE_ALLOWED 0x02 /* (1 << TRANSLATE_WRITE) */ -#define VTLB_FETCH_ALLOWED 0x04 /* (1 << TRANSLATE_FETCH) */ -#define VTLB_FLAG_VALID 0x08 -#define VTLB_USER_READ_ALLOWED 0x10 /* (1 << TRANSLATE_READ_USER) */ -#define VTLB_USER_WRITE_ALLOWED 0x20 /* (1 << TRANSLATE_WRITE_USER) */ -#define VTLB_USER_FETCH_ALLOWED 0x40 /* (1 << TRANSLATE_FETCH_USER) */ -#define VTLB_FLAG_FIXED 0x80 - - - -/*************************************************************************** - TYPE DEFINITIONS -***************************************************************************/ - -/* represents an entry in the VTLB */ -typedef UINT32 vtlb_entry; - - -/* opaque structure describing VTLB state */ -struct vtlb_state; - - - -/*************************************************************************** - FUNCTION PROTOTYPES -***************************************************************************/ - - -/* ----- initialization/teardown ----- */ - -/* allocate a new VTLB for the given CPU */ -vtlb_state *vtlb_alloc(device_t *cpu, address_spacenum space, int fixed_entries, int dynamic_entries); - -/* free an allocated VTLB */ -void vtlb_free(vtlb_state *vtlb); - - -/* ----- filling ----- */ - -/* called by the CPU core in response to an unmapped access */ -int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention); - -/* load a fixed VTLB entry */ -void vtlb_load(vtlb_state *vtlb, int entrynum, int numpages, offs_t address, vtlb_entry value); - -/* load a dynamic VTLB entry */ -void vtlb_dynload(vtlb_state *vtlb, UINT32 index, offs_t address, vtlb_entry value); - -/* ----- flushing ----- */ - -/* flush all knowledge from the dynamic part of the VTLB */ -void vtlb_flush_dynamic(vtlb_state *vtlb); - -/* flush knowledge of a particular address from the VTLB */ -void vtlb_flush_address(vtlb_state *vtlb, offs_t address); - - -/* ----- accessors ----- */ - -/* return a pointer to the base of the linear VTLB lookup table */ -const vtlb_entry *vtlb_table(vtlb_state *vtlb); - - -#endif /* __VTLB_H__ */ diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp index 345ea4334bf..e798a1153b2 100644 --- a/src/devices/cpu/z80/z80.cpp +++ b/src/devices/cpu/z80/z80.cpp @@ -10,6 +10,7 @@ * - If LD A,I or LD A,R is interrupted, P/V flag gets reset, even if IFF2 * was set before this instruction (implemented, but not enabled: we need * document Z80 types first, see below) + * - WAIT only stalls between instructions now, it should stall immediately. * - Ideally, the tiny differences between Z80 types should be supported, * currently known differences: * - LD A,I/R P/V flag reset glitch is fixed on CMOS Z80 @@ -3124,6 +3125,27 @@ OP(op,fe) { cp(arg()); OP(op,ff) { rst(0x38); } /* RST 7 */ +void z80_device::take_nmi() +{ + /* there isn't a valid previous program counter */ + PRVPC = -1; + + /* Check if processor was halted */ + leave_halt(); + +#if HAS_LDAIR_QUIRK + /* reset parity flag after LD A,I or LD A,R */ + if (m_after_ldair) F &= ~PF; +#endif + + m_iff1 = 0; + push(m_pc); + PCD = 0x0066; + WZ=PCD; + m_icount -= 11; + m_nmi_pending = FALSE; +} + void z80_device::take_interrupt() { int irq_vector; @@ -3206,6 +3228,11 @@ void z80_device::take_interrupt() m_icount -= m_cc_ex[0xff]; } WZ=PCD; + +#if HAS_LDAIR_QUIRK + /* reset parity flag after LD A,I or LD A,R */ + if (m_after_ldair) F &= ~PF; +#endif } void nsc800_device::take_interrupt_nsc800() @@ -3239,6 +3266,11 @@ void nsc800_device::take_interrupt_nsc800() m_icount -= m_cc_op[0xff] + cc_ex[0xff]; WZ=PCD; + +#if HAS_LDAIR_QUIRK + /* reset parity flag after LD A,I or LD A,R */ + if (m_after_ldair) F &= ~PF; +#endif } /**************************************************************************** @@ -3474,44 +3506,25 @@ void nsc800_device::device_reset() } /**************************************************************************** - * Execute 'cycles' T-states. Return number of T-states really executed + * Execute 'cycles' T-states. ****************************************************************************/ void z80_device::execute_run() { - /* check for NMIs on the way in; they can only be set externally */ - /* via timers, and can't be dynamically enabled, so it is safe */ - /* to just check here */ - if (m_nmi_pending) - { - LOG(("Z80 '%s' take NMI\n", tag())); - PRVPC = -1; /* there isn't a valid previous program counter */ - leave_halt(); /* Check if processor was halted */ - -#if HAS_LDAIR_QUIRK - /* reset parity flag after LD A,I or LD A,R */ - if (m_after_ldair) F &= ~PF; -#endif - m_after_ldair = FALSE; - - m_iff1 = 0; - push(m_pc); - PCD = 0x0066; - WZ=PCD; - m_icount -= 11; - m_nmi_pending = FALSE; - } - do { - /* check for IRQs before each instruction */ - if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei) + if (m_wait_state) { -#if HAS_LDAIR_QUIRK - /* reset parity flag after LD A,I or LD A,R */ - if (m_after_ldair) F &= ~PF; -#endif - take_interrupt(); + // stalled + m_icount = 0; + return; } + + // check for interrupts before each instruction + if (m_nmi_pending) + take_nmi(); + else if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei) + take_interrupt(); + m_after_ei = FALSE; m_after_ldair = FALSE; @@ -3524,34 +3537,25 @@ void z80_device::execute_run() void nsc800_device::execute_run() { - /* check for NMIs on the way in; they can only be set externally */ - /* via timers, and can't be dynamically enabled, so it is safe */ - /* to just check here */ - if (m_nmi_pending) - { - LOG(("Z80 '%s' take NMI\n", tag())); - PRVPC = -1; /* there isn't a valid previous program counter */ - leave_halt(); /* Check if processor was halted */ - - m_iff1 = 0; - push(m_pc); - PCD = 0x0066; - WZ=PCD; - m_icount -= 11; - m_nmi_pending = FALSE; - } - do { - /* check for NSC800 IRQs line RSTA, RSTB, RSTC */ - if ((m_nsc800_irq_state[NSC800_RSTA] != CLEAR_LINE || m_nsc800_irq_state[NSC800_RSTB] != CLEAR_LINE || m_nsc800_irq_state[NSC800_RSTC] != CLEAR_LINE) && m_iff1 && !m_after_ei) - take_interrupt_nsc800(); + if (m_wait_state) + { + // stalled + m_icount = 0; + return; + } - /* check for IRQs before each instruction */ - if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei) + // check for interrupts before each instruction + if (m_nmi_pending) + take_nmi(); + else if ((m_nsc800_irq_state[NSC800_RSTA] != CLEAR_LINE || m_nsc800_irq_state[NSC800_RSTB] != CLEAR_LINE || m_nsc800_irq_state[NSC800_RSTC] != CLEAR_LINE) && m_iff1 && !m_after_ei) + take_interrupt_nsc800(); + else if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei) take_interrupt(); m_after_ei = FALSE; + m_after_ldair = FALSE; PRVPC = PCD; debugger_instruction_hook(this, PCD); @@ -3587,6 +3591,9 @@ void z80_device::execute_set_input(int inputnum, int state) case Z80_INPUT_LINE_WAIT: m_wait_state = state; break; + + default: + break; } } @@ -3594,17 +3601,6 @@ void nsc800_device::execute_set_input(int inputnum, int state) { switch (inputnum) { - case Z80_INPUT_LINE_BUSRQ: - m_busrq_state = state; - break; - - case INPUT_LINE_NMI: - /* mark an NMI pending on the rising edge */ - if (m_nmi_state == CLEAR_LINE && state != CLEAR_LINE) - m_nmi_pending = TRUE; - m_nmi_state = state; - break; - case NSC800_RSTA: m_nsc800_irq_state[NSC800_RSTA] = state; break; @@ -3617,17 +3613,8 @@ void nsc800_device::execute_set_input(int inputnum, int state) m_nsc800_irq_state[NSC800_RSTC] = state; break; - case INPUT_LINE_IRQ0: - /* update the IRQ state via the daisy chain */ - m_irq_state = state; - if (m_daisy.present()) - m_irq_state = m_daisy.update_irq_state(); - - /* the main execute loop will take the interrupt */ - break; - - case Z80_INPUT_LINE_WAIT: - m_wait_state = state; + default: + z80_device::execute_set_input(inputnum, state); break; } } @@ -3750,10 +3737,3 @@ nsc800_device::nsc800_device(const machine_config &mconfig, const char *tag, dev } const device_type NSC800 = &device_creator<nsc800_device>; - - - -WRITE_LINE_MEMBER( z80_device::irq_line ) -{ - set_input_line( INPUT_LINE_IRQ0, state ); -} diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h index c523f101a24..38cc207347e 100644 --- a/src/devices/cpu/z80/z80.h +++ b/src/devices/cpu/z80/z80.h @@ -19,6 +19,7 @@ enum NSC800_RSTB, NSC800_RSTC, Z80_INPUT_LINE_WAIT, + Z80_INPUT_LINE_BOGUSWAIT, /* WAIT pin implementation used to be nonexistent, please remove this when all drivers are updated with Z80_INPUT_LINE_WAIT */ Z80_INPUT_LINE_BUSRQ }; @@ -41,8 +42,6 @@ class z80_device : public cpu_device public: z80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - DECLARE_WRITE_LINE_MEMBER( irq_line ); - void z80_set_cycle_tables(const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex); template<class _Object> static devcb_base &set_irqack_cb(device_t &device, _Object object) { return downcast<z80_device &>(device).m_irqack_cb.set_callback(object); } template<class _Object> static devcb_base &set_refresh_cb(device_t &device, _Object object) { return downcast<z80_device &>(device).m_refresh_cb.set_callback(object); } @@ -238,6 +237,7 @@ protected: void ei(); void take_interrupt(); + void take_nmi(); // address spaces const address_space_config m_program_config; diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 2d6eb4d5460..cb7e184f811 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -933,7 +933,7 @@ UINT32 floppy_image_device::get_variant() const ui_menu *floppy_image_device::get_selection_menu(running_machine &machine, render_container *container) { - return auto_alloc_clear(machine, <ui_menu_control_floppy_image>(machine, container, this)); + return global_alloc_clear<ui_menu_control_floppy_image>(machine, container, this); } ui_menu_control_floppy_image::ui_menu_control_floppy_image(running_machine &machine, render_container *container, device_image_interface *_image) : ui_menu_control_device_image(machine, container, _image) @@ -1010,7 +1010,7 @@ void ui_menu_control_floppy_image::hook_load(std::string filename, bool softlist can_in_place = false; } submenu_result = -1; - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_select_rw>(machine(), container, can_in_place, &submenu_result))); + ui_menu::stack_push(global_alloc_clear<ui_menu_select_rw>(machine(), container, can_in_place, &submenu_result)); state = SELECT_RW; } @@ -1036,7 +1036,7 @@ void ui_menu_control_floppy_image::handle() format_array[total_usable++] = i; } submenu_result = -1; - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_select_format>(machine(), container, format_array, ext_match, total_usable, &submenu_result))); + ui_menu::stack_push(global_alloc_clear<ui_menu_select_format>(machine(), container, format_array, ext_match, total_usable, &submenu_result)); state = SELECT_FORMAT; break; @@ -1073,7 +1073,7 @@ void ui_menu_control_floppy_image::handle() break; case ui_menu_select_rw::WRITE_OTHER: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_file_create>(machine(), container, image, current_directory, current_file, &create_ok))); + ui_menu::stack_push(global_alloc_clear<ui_menu_file_create>(machine(), container, image, current_directory, current_file, &create_ok)); state = CHECK_CREATE; break; diff --git a/src/devices/machine/com8116.cpp b/src/devices/machine/com8116.cpp index 46a0ce83986..f5c177fef62 100644 --- a/src/devices/machine/com8116.cpp +++ b/src/devices/machine/com8116.cpp @@ -25,17 +25,59 @@ // device type definition const device_type COM8116 = &device_creator<com8116_device>; +// Parts with T after the number do not have an internal oscillator and require an external clock source +// The SMC/COM 5xxx parts are all dual 5v/12v parts, while the 8xxx parts are 5v only +// SMC/COM5016(T) with no dash, aka 'STD' part on the datasheet +// Also COM8116(T)/8126(T)/8136(T)/8146(T) and Synertek sy2661-3 and GI AY-5-8116(T)-000 and GI AY-5-8136(T)-000 and WD WD-1943-00 (aka WD8136-00) +// SMC/COM8156(T) is the same chip but clocked twice as fast and 32x clocks per baud instead of 16x +// baud rates are 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 19200 const int com8116_device::divisors_16X_5_0688MHz[] = { 6336, 4224, 2880, 2355, 2112, 1056, 528, 264, 176, 158, 132, 88, 66, 44, 33, 16 }; +// SMC/COM8116-003 +// from http://www.vintagecomputer.net/fjkraan/comp/divcomp/doc/SMC_BaudGen.pdf page 283 (pdf page 20) +// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 9600, 19200 +const int com8116_device::divisors_16X_6_01835MHz[] = + { 7523, 5015, 3420, 2797, 2508, 1881, 1254, 627, 313, 209, 188, 157, 104, 78, 39, 20 }; + +// SMC/COM5016(T)-5 and WD WD-1943-05; Synertek SY2661-1 and 2 are NOT the same as this despite using same clock speed, see below +// SMC/COM8156(T)-5 is the same chip but clocked twice as fast and 32x clocks per baud instead of 16x +// baud rates are 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 19200 const int com8116_device::divisors_16X_4_9152MHz[] = { 6144, 4096, 2793, 2284, 2048, 1024, 512, 256, 171, 154, 128, 85, 64, 43, 32, 16 }; +// SMC/COM5016(T)-6 and WD WD-1943-06 +// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 19200 const int com8116_device::divisors_32X_5_0688MHz[] = { 3168, 2112, 1440, 1177, 1056, 792, 528, 264, 132, 88, 66, 44, 33, 22, 16, 8 }; +// SMC/COM5016(T)-013 (from http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/terminal/vt100/EK-VT100-TM-003_VT100_Technical_Manual_Jul82.pdf page 4-27 (pdf page 78)) +// and from http://www.vintagecomputer.net/fjkraan/comp/divcomp/doc/SMC_BaudGen.pdf page 283 (pdf page 20) +// SMC/COM5106-013A is the same chip clocked twice as fast, but with 32x clocks per baud instead of 16x +// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 9600, 19200 +const int com8116_device::divisors_16X_2_7648MHz[] = + { 3456, 2304, 1571, 1285, 1152, 864, 576, 288, 144, 96, 86, 72, 48, 36, 18, 9 }; + +// SMC/COM5026(T)-030 (non-standard serial rates, from http://bitsavers.informatik.uni-stuttgart.de/pdf/standardMicrosystems/_dataBooks/1979_StandardMicrosystems.pdf page 135) +const int com8116_device::divisors_16X_5_0688MHz_030[] = + { 731, 733, 735, 737, 741, 743, 745, 751, 6970, 5569, 5433, 4752, 4269, 1920, 1584, 301 }; + +// SMC/COM5036(T)-080 (from http://bitsavers.informatik.uni-stuttgart.de/pdf/standardMicrosystems/_dataBooks/1979_StandardMicrosystems.pdf page 135) +const int com8116_device::divisors_16X_4_6080MHz[] = + { 5760, 3840, 2618, 2141, 1920, 960, 480, 240, 160, 144, 120, 80, 60, 40, 30, 15 }; + +// COM8046 combines the -6 and STD tables into one device as a 32-entry table + +// Synertek SY2661-1 (from http://bitsavers.informatik.uni-stuttgart.de/pdf/synertek/_dataBooks/Synertek_1981-1982_Data_Catalog.pdf page 3-40 (pdf page 139)) +// baud rates are 50, 75, 110, 134.5, 150, 200, 300, 600, 1050, 1200, 1800, 2000, 2400, 4800, 9600, 19200 +const int com8116_device::divisors_16X_4_9152MHz_SY2661_1[] = + { 6144, 4096, 2793, 2284, 2048, 1536, 1024, 512, 292, 256, 171, 154, 128, 64, 32, 16 }; +// Synertek SY2661-2 (from http://bitsavers.informatik.uni-stuttgart.de/pdf/synertek/_dataBooks/Synertek_1981-1982_Data_Catalog.pdf page 3-40 (pdf page 139)) +// baud rates are 45.5, 50, 75, 110, 134.5, 150, 300, 600, 1200, 1800, 2000, 2400, 4800, 9600, 19200, 38400 +const int com8116_device::divisors_16X_4_9152MHz_SY2661_2[] = + { 6752, 6144, 4096, 2793, 2284, 2048, 1024, 512, 256, 171, 154, 128, 64, 32, 16, 8 }; //************************************************************************** // LIVE DEVICE diff --git a/src/devices/machine/com8116.h b/src/devices/machine/com8116.h index 119f40d4b3d..614be491318 100644 --- a/src/devices/machine/com8116.h +++ b/src/devices/machine/com8116.h @@ -63,8 +63,14 @@ public: DECLARE_WRITE8_MEMBER( stt_w ); static const int divisors_16X_5_0688MHz[]; + static const int divisors_16X_6_01835MHz[]; static const int divisors_16X_4_9152MHz[]; static const int divisors_32X_5_0688MHz[]; + static const int divisors_16X_2_7648MHz[]; + static const int divisors_16X_5_0688MHz_030[]; + static const int divisors_16X_4_6080MHz[]; + static const int divisors_16X_4_9152MHz_SY2661_1[]; + static const int divisors_16X_4_9152MHz_SY2661_2[]; protected: // device-level overrides diff --git a/src/devices/machine/corvushd.cpp b/src/devices/machine/corvushd.cpp index 558851c0b7a..08536344849 100644 --- a/src/devices/machine/corvushd.cpp +++ b/src/devices/machine/corvushd.cpp @@ -874,7 +874,7 @@ UINT8 corvus_hdc_t::corvus_read_firmware_block(UINT8 head, UINT8 sector) { // Status of command // UINT8 corvus_hdc_t::corvus_write_firmware_block(UINT8 head, UINT8 sector, UINT8 *buffer) { - UINT16 relative_sector; // Relative sector on drive for Physical Read + UINT16 relative_sector; // Relative sector on drive for Physical Write UINT8 status; relative_sector = head * m_sectors_per_track + sector; diff --git a/src/devices/machine/dmac.cpp b/src/devices/machine/dmac.cpp index 34992fc4f5c..ba1167eb2d5 100644 --- a/src/devices/machine/dmac.cpp +++ b/src/devices/machine/dmac.cpp @@ -145,6 +145,8 @@ void dmac_device::check_interrupts() // any interrupts pending? if (m_istr & ISTR_INT_MASK) m_istr |= ISTR_INT_P; + else + m_istr &= ~ISTR_INT_P; } else m_istr &= ~ISTR_INT_P; @@ -202,18 +204,19 @@ READ16_MEMBER( dmac_device::register_read ) case 0x48: case 0x49: - case 0x50: - case 0x58: - case 0x59: - case 0x5a: - case 0x5b: - case 0x5c: - case 0x5e: - case 0x5f: data = m_scsi_read_handler(offset); if (VERBOSE) - logerror("%s('%s'): read scsi data @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); + logerror("%s('%s'): read scsi register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); + + break; + + case 0x50: + case 0x51: + case 0x52: + case 0x53: + if (VERBOSE) + logerror("%s('%s'): read xt register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); break; @@ -306,20 +309,20 @@ WRITE16_MEMBER( dmac_device::register_write ) case 0x48: case 0x49: - case 0x50: - case 0x58: - case 0x59: - case 0x5a: - case 0x5b: - case 0x5c: - case 0x5e: - case 0x5f: if (VERBOSE) - logerror("%s('%s'): write scsi data @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); + logerror("%s('%s'): write scsi register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); m_scsi_write_handler(offset, data, 0xff); break; + case 0x50: + case 0x51: + case 0x52: + case 0x53: + if (VERBOSE) + logerror("%s('%s'): write xt register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); + break; + case 0x70: if (VERBOSE) logerror("%s('%s'): write dma start strobe %04x [mask = %04x]\n", shortname(), basetag(), data, mem_mask); diff --git a/src/devices/machine/dmac.h b/src/devices/machine/dmac.h index 2d86c427013..8580b4c86ab 100644 --- a/src/devices/machine/dmac.h +++ b/src/devices/machine/dmac.h @@ -128,7 +128,7 @@ private: ISTR_FE_FLG = 0x001 // fifo-empty flag }; - static const int ISTR_INT_MASK = 0x1fc; + static const int ISTR_INT_MASK = 0x1ec; // callbacks devcb_write_line m_cfgout_handler; diff --git a/src/devices/machine/hp_taco.cpp b/src/devices/machine/hp_taco.cpp new file mode 100644 index 00000000000..76203d31ee3 --- /dev/null +++ b/src/devices/machine/hp_taco.cpp @@ -0,0 +1,1467 @@ +// license:BSD-3-Clause +// copyright-holders:F. Ulivi +/********************************************************************* + + hp_taco.cpp + + HP TApe COntroller (5006-3012) + +*********************************************************************/ + +// This device has been reverse engineered entirely through documents & study of HP software. +// I had no access to the real device to experiment. +// Available documentation on the internal working of TACO chip is close to nothing. The best +// I could find is [1] (see below) where all that's described is a (too) brief summary of registers and little else. +// In other words, no description of the commands that can be issued to TACO chips. +// So, my main source of information was the careful study of HP software, especially the 9845 system test ROM (09845-66520). +// The second half of this ROM holds a comprehensive set of tape drive tests. +// The main shortcomings of my approach are: +// * I could indentify only those TACO commands that are actually used by the software. I managed +// to identify 17 out of 32 possible commands. The purpose of the rest of commands is anyone's guess. +// * I could only guess the behavior of TACO chips in corner cases (especially behavior in various error/abnormal +// conditions) +// +// Documentation I used: +// [1] HP, manual 64940-90905, may 80 rev. - Model 64940A tape control & drive service manual +// [2] US patent 4,075,679 describing HP9825 system (this system had a discrete implementation of tape controller). The +// firmware listing was quite useful in identifying sequences of commands (for example how to find a specific sector etc.). +// [3] http://www.hp9845.net site +// [4] April 1978 issue of HP Journal. There is a one-page summary of TACO chip on page 20. + +// This is an overview of the TACO/CPU interface. +// +// Reg. | R/W | Content +// ===================== +// R4 | R/W | Data register: words read/written to/from tape pass through this register +// R5 | R/W | Command and status register (see below) +// R6 | R/W | Tachometer register. Writing it sets a pulse counter that counts up on either tachometer pulses or IRGs, depending +// | | on command. When the counter rolls over from 0xffff to 0 it typically ends the command. It's not clear to me +// | | what value could be read from this register, if it's just the same value that was written last time or the internal +// | | counter or something else entirely. +// R7 | R | Checksum register. Reading it clears it. +// R7 | W | Timing register. It controls somehow the encoding and decoding of bits. For now I completely ignore it because its +// | | content it's totally unknown to me. It seems safe to do so, anyway. I can see that it's always set to 0x661d before +// | | writing to tape and to 0x0635 before reading. +// +// Format of TACO command/status register (R5) +// Bit R/W Content +// =============== +// 15 RW Tape direction (1 = forward) +// 14..10 RW Command (see the "enum" below) +// 9 RW ? Drive ON according to [1], the actual use seems to be selection of gap length +// 8 RW ? Size of gaps according to [1], N/U in my opinion +// 7 RW Speed of tape (1 = 90 ips, 0 = 22 ips) +// 6 RW Option bit for various commands +// 5 R Current track (1 = B) +// 4 R Gap detected (1) +// 3 R Write protection (1) +// 2 R Servo failure (1) +// 1 R Cartridge out (1) +// 0 R Hole detected (1) + +// Here's a summary of the on-tape format of HP9845 systems. +// * A tape has two independent tracks (A & B). +// * Each track holds 426 sectors. +// * Each sector has an header and 256 bytes of payload (see below) +// * Sectors are separated by gaps of uniform magnetization called IRGs (Inter-Record Gaps) +// * The basic unit of data I/O are 16-bit words +// * Bits are encoded by different distances between magnetic flux reversals +// * The structure of tracks is: +// - Begin of tape holes +// - The deadzone: 350x 0xffff words +// - 1" of IRG +// - Sector #0 (track A) or #426 (track B) +// - 1" of IRG (2.5" on track A) +// - Sector #1 (track A) or #427 (track B) +// - 1" of IRG +// - Sector #2 (track A) or #428 (track B) +// - ...and so on up to sector #425/#851 +// - 6" of final gap +// - Non-recorded tape +// - End of tape holes +// * Sector #0 is not used +// * Sectors #1 and #2 hold the first copy of tape directory +// * Sectors #3 and #4 hold the second/backup copy of tape directory +// * User data are stored starting from sector #5 +// * There is no "fragmentation" map (like file allocation table in FAT filesystem): a file +// spanning more than 1 sector always occupy a single block of contiguous sectors. +// +// A sector is structured like this: +// Word 0: Invisible preamble word (always 0). Preamble comes from 9825, don't know if it's +// actually there in TACO encoding. I assumed it is. +// Word 1: Format/sector in use and other unidentified bits. +// Word 2: Sector number +// Word 3: Sector length and other bits +// Word 4: Checksum (sum of words 1..3) +// Words 5..132: Payload +// Word 133: Checksum (sum of words 5..132) +// +// Physical encoding of words is borrowed from 9825 as I wasn't able +// to gather any info on the actual encoding of TACO chips. +// This is how 9825 encodes words on tape: +// - the unit of encoding are 16-bit words +// - each word is encoded from MSB to LSB +// - each word has an extra invisible "1" encoded at the end +// - tape is read/written at slow speed only (21.98 ips) +// - a 0 is encoded with a distance between flux reversals of 1/35200 s +// (giving a maximum density of about 1600 reversals per inch) +// - a 1 is encoded with a distance that's 1.75 times that of a 0 +// +// This driver is based on the following model of the actual TACO/tape system: +// * Tape immediately reaches working speed (no spin-up time) +// * Inversion of tape direction and change of speed are immediate as well +// * Time & distance to stop the tape are modeled, though. Firmware is upset by +// a tape with null braking time/distance. +// * Speed of tape is exceptionally accurate. Real tape was controlled by a closed loop +// with something like 1% accuracy on speed. +// * Storage is modeled by one "map" data structure per track. Each map maps the tape position +// to the 16-bit word stored at that position. Gaps are modeled by lack of data in the map. +// There is no model of the physical encoding of bits (except to compute how long each word +// is on tape). +// * Read threshold is ignored. Real tapes could be read with either a low or high threshold. +// * "Flag" bit is used as a busy/ready signal in real TACO. Here I assumed the device is +// always ready, so Flag is always active. +// * I tried to fill the (many) gaps on chip behavior with "sensible" solutions. I could only +// validate my solutions by running the original firmware in MAME, though (no real hw at hand). +// +// TODOs/issues: +// * Some code cleanup +// * Handling of tape holes seems to be wrong: test "C" of test ROM only works partially +// * Find out what is read from register R6 +// * Handle device_image_interface::call_display to show state of tape +// * Find more info on TACO chips (does anyone with a working 9845 or access to internal HP docs want to +// help me here, please?) +// +#include "emu.h" +#include "hp_taco.h" + +// Debugging +#define VERBOSE 1 +#define LOG(x) do { if (VERBOSE) logerror x; } while (0) +#define VERBOSE_0 0 +#define LOG_0(x) do { if (VERBOSE_0) logerror x; } while (0) + +// Macros to clear/set single bits +#define BIT_MASK(n) (1U << (n)) +#define BIT_CLR(w , n) ((w) &= ~BIT_MASK(n)) +#define BIT_SET(w , n) ((w) |= BIT_MASK(n)) + +// Timers +enum { + TAPE_TMR_ID, + HOLE_TMR_ID +}; + +// Constants +#define CMD_REG_MASK 0xffc0 // Command register mask +#define STATUS_REG_MASK 0x003f // Status register mask +#define TACH_TICKS_PER_INCH 968 // Tachometer pulses per inch of tape movement +#define TAPE_POS_FRACT 1024 // 10 bits of fractional part in tape_pos_t +#define ONE_INCH_POS (TACH_TICKS_PER_INCH * TAPE_POS_FRACT) // Value in tape_pos_t representing 1 inch of tape +#define TACH_FREQ_SLOW 21276 // Tachometer pulse frequency for slow speed (21.98 ips) +#define TACH_FREQ_FAST 87196 // Tachometer pulse frequency for fast speed (90.08 ips) +#define TAPE_LENGTH ((140 * 12 + 72 * 2) * ONE_INCH_POS) // Tape length: 140 ft of usable tape + 72" of punched tape at either end +#define TAPE_INIT_POS (80 * ONE_INCH_POS) // Initial tape position: 80" from beginning (just past the punched part) +#define ZERO_BIT_LEN 619 // Length of 0 bits at slow tape speed: 1/(35200 Hz) +#define ONE_BIT_LEN 1083 // Length of 1 bits at slow tape speed: 1.75 times ZERO_BIT_LEN +#define QUICK_CMD_USEC 25 // usec for "quick" command execution +#define FAST_BRAKE_MSEC 73 // Braking time from fast speed to stop (2 ips) in msec (deceleration is 1200 in/s^2) +#define SLOW_BRAKE_MSEC 17 // Braking time from slow speed to stop in msec +#define FAST_BRAKE_DIST 3350450 // Braking distance at fast speed (~3.38 in) +#define SLOW_BRAKE_DIST 197883 // Braking distance at slow speed (~0.2 in) +#define PREAMBLE_WORD 0 // Value of preamble word +#define END_GAP_LENGTH (6 * ONE_INCH_POS) // Length of final gap: 6" +#define MIN_IRG_LENGTH ((tape_pos_t)(0.2 * ONE_INCH_POS)) // Minimum length of IRGs: 0.2" (from 9825, not sure about value in TACO) +#define NULL_TAPE_POS ((tape_pos_t)-1) // Special value for invalid/unknown tape position +#define NO_DATA_GAP (17 * ONE_BIT_LEN) // Minimum gap size to detect end of data: length of longest word (0xffff) +#define FILE_MAGIC 0x4f434154 // Magic value at start of image file: "TACO" + +// Parts of command register +#define CMD_CODE(reg) \ + (((reg) >> 10) & 0x1f) +#define DIR_FWD(reg) \ + (BIT(reg , 15)) +#define SPEED_FAST(reg) \ + (BIT(reg , 7)) +#define CMD_OPT(reg) \ + (BIT(reg , 6)) +#define UNKNOWN_B9(reg) \ + (BIT(reg , 9)) +#define DIR_FWD_MASK BIT_MASK(15) // Direction = forward +#define SPEED_FAST_MASK BIT_MASK(7) // Speed = fast + +// Commands +enum { + CMD_INDTA_INGAP, // 00: scan for data first then for gap + CMD_UNK_01, // 01: unknown + CMD_FINAL_GAP, // 02: write final gap + CMD_INIT_WRITE, // 03: write words for tape formatting + CMD_STOP, // 04: stop + CMD_UNK_05, // 05: unknown + CMD_SET_TRACK, // 06: set A/B track + CMD_UNK_07, // 07: unknown + CMD_UNK_08, // 08: unknown + CMD_UNK_09, // 09: unknown + CMD_MOVE, // 0a: move tape + CMD_UNK_0b, // 0b: unknown + CMD_INGAP_MOVE, // 0c: scan for gap then move a bit further (used to gain some margin when inverting tape movement) + CMD_UNK_0d, // 0d: unknown + CMD_CLEAR, // 0e: clear errors/unlatch status bits + CMD_UNK_0f, // 0f: unknown + CMD_NOT_INDTA, // 10: scan for end of data + CMD_UNK_11, // 11: unknown + CMD_UNK_12, // 12: unknown + CMD_UNK_13, // 13: unknown + CMD_UNK_14, // 14: unknown + CMD_UNK_15, // 15: unknown + CMD_WRITE_IRG, // 16: write inter-record gap + CMD_UNK_17, // 17: unknown + CMD_SCAN_RECORDS, // 18: scan records (count IRGs) + CMD_RECORD_WRITE, // 19: write record words + CMD_MOVE_INDTA, // 1a: move then scan for data + CMD_UNK_1b, // 1b: unknown (for now it seems harmless to handle it as NOP) + CMD_DELTA_MOVE_HOLE, // 1c: move tape a given distance, intr at end or first hole found (whichever comes first) + CMD_START_READ, // 1d: start record reading + CMD_DELTA_MOVE_IRG, // 1e: move tape a given distance, detect gaps in parallel + CMD_END_READ // 1f: stop reading +}; + +// Bits of status register +#define STATUS_HOLE_BIT 0 // Hole detected +#define STATUS_CART_OUT_BIT 1 // Cartridge out +#define STATUS_SFAIL_BIT 2 // Servo failure +#define STATUS_WPR_BIT 3 // Write protection +#define STATUS_GAP_BIT 4 // Gap detected +#define STATUS_TRACKB_BIT 5 // Track B selected +#define STATUS_CART_OUT_MASK BIT_MASK(STATUS_CART_OUT_BIT) // Cartridge out +#define STATUS_WPR_MASK BIT_MASK(STATUS_WPR_BIT) // Write protection +#define STATUS_ERR_MASK (STATUS_CART_OUT_MASK) // Mask of errors in status reg. + +// *** Position of tape holes *** +// At beginning of tape: +// *START* +// |<-----24"----->|<---12"--->|<---12"--->|<-----24"----->| +// O O O O O O O +// |<->| |<->| |<->| +// 0.218" 0.218" 0.218" +// At end of tape: +// *END* +// |<-----24"----->|<---12"--->|<---12"--->|<-----24"----->| +// O O O O +// +static const hp_taco_device::tape_pos_t tape_holes[] = { + (hp_taco_device::tape_pos_t)(23.891 * ONE_INCH_POS), // 24 - 0.218 / 2 + (hp_taco_device::tape_pos_t)(24.109 * ONE_INCH_POS), // 24 + 0.218 / 2 + (hp_taco_device::tape_pos_t)(35.891 * ONE_INCH_POS), // 36 - 0.218 / 2 + (hp_taco_device::tape_pos_t)(36.109 * ONE_INCH_POS), // 36 + 0.218 / 2 + (hp_taco_device::tape_pos_t)(47.891 * ONE_INCH_POS), // 48 - 0.218 / 2 + (hp_taco_device::tape_pos_t)(48.109 * ONE_INCH_POS), // 48 + 0.218 / 2 + 72 * ONE_INCH_POS, // 72 + 1752 * ONE_INCH_POS, // 1752 + 1776 * ONE_INCH_POS, // 1776 + 1788 * ONE_INCH_POS, // 1788 + 1800 * ONE_INCH_POS // 1800 +}; + +// Device type definition +const device_type HP_TACO = &device_creator<hp_taco_device>; + +// Constructors +hp_taco_device::hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname) + : device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__), + device_image_interface(mconfig , *this), + m_irq_handler(*this), + m_flg_handler(*this), + m_sts_handler(*this), + m_tape_pos(TAPE_INIT_POS), + m_image_dirty(false) +{ + clear_state(); +} + +hp_taco_device::hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, HP_TACO, "HP TACO", tag, owner, clock, "TACO", __FILE__), + device_image_interface(mconfig , *this), + m_irq_handler(*this), + m_flg_handler(*this), + m_sts_handler(*this), + m_tape_pos(TAPE_INIT_POS), + m_image_dirty(false) +{ + clear_state(); +} + +WRITE16_MEMBER(hp_taco_device::reg_w) +{ + LOG_0(("wr R%u = %04x\n", 4 + offset , data)); + + // Any I/O activity clears IRQ + irq_w(false); + + switch (offset) { + case 0: + // Data register + m_data_reg = data; + m_data_reg_full = true; + break; + + case 1: + // Command register + start_cmd_exec(data & CMD_REG_MASK); + break; + + case 2: + // Tachometer register + m_tach_reg = data; + break; + + case 3: + // Timing register + m_timing_reg = data; + break; + } +} + +READ16_MEMBER(hp_taco_device::reg_r) +{ + UINT16 res = 0; + + // Any I/O activity clears IRQ + irq_w(false); + + switch (offset) { + case 0: + // Data register + res = m_data_reg; + break; + + case 1: + // Command & status register + res = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK); + break; + + case 2: + // Tachometer register + res = m_tach_reg; + break; + + case 3: + // Checksum register: it clears when read + res = m_checksum_reg; + m_checksum_reg = 0; + break; + } + + LOG_0(("rd R%u = %04x\n", 4 + offset , res)); + + return res; +} + +READ_LINE_MEMBER(hp_taco_device::flg_r) +{ + return m_flg; +} + +READ_LINE_MEMBER(hp_taco_device::sts_r) +{ + return m_sts; +} + +// device_config_complete +void hp_taco_device::device_config_complete() +{ + LOG(("device_config_complete")); + update_names(); +} + +// device_start +void hp_taco_device::device_start() +{ + LOG(("device_start")); + m_irq_handler.resolve_safe(); + m_flg_handler.resolve_safe(); + m_sts_handler.resolve_safe(); + + save_item(NAME(m_data_reg)); + save_item(NAME(m_data_reg_full)); + save_item(NAME(m_cmd_reg)); + save_item(NAME(m_cmd_state)); + save_item(NAME(m_status_reg)); + save_item(NAME(m_tach_reg)); + save_item(NAME(m_checksum_reg)); + save_item(NAME(m_timing_reg)); + save_item(NAME(m_irq)); + save_item(NAME(m_flg)); + save_item(NAME(m_sts)); + save_item(NAME(m_tape_pos)); + save_item(NAME(m_start_time)); + save_item(NAME(m_tape_fwd)); + save_item(NAME(m_tape_fast)); + save_item(NAME(m_image_dirty)); + save_item(NAME(m_tape_wr)); + save_item(NAME(m_rw_pos)); + save_item(NAME(m_next_word)); + save_item(NAME(m_rd_it_valid)); + save_item(NAME(m_gap_detect_start)); + + m_tape_timer = timer_alloc(TAPE_TMR_ID); + m_hole_timer = timer_alloc(HOLE_TMR_ID); +} + +// device_stop +void hp_taco_device::device_stop() +{ +} + +// device_reset +void hp_taco_device::device_reset() +{ + LOG(("device_reset")); + clear_state(); + + m_irq = false; + m_flg = true; + + m_irq_handler(false); + m_flg_handler(true); + set_error(false); +} + +void hp_taco_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + if (CMD_CODE(m_cmd_reg) != CMD_STOP) { + update_tape_pos(); + } + + switch (id) { + case TAPE_TMR_ID: + LOG_0(("Tape tmr @%g\n" , machine().time().as_double())); + + tape_pos_t length; + + switch (CMD_CODE(m_cmd_reg)) { + case CMD_INDTA_INGAP: + if (m_cmd_state == 0) { + m_cmd_state = 1; + tape_pos_t target = m_tape_pos; + if (next_n_gap(target, 1, MIN_IRG_LENGTH)) { + m_tape_timer->adjust(time_to_target(target)); + } + return; + } + break; + + case CMD_RECORD_WRITE: + if (m_cmd_state == 0) { + if (m_rd_it->second == PREAMBLE_WORD) { + LOG_0(("Got preamble\n")); + m_cmd_state = 1; + // m_rw_pos already at correct position + m_tape_timer->adjust(fetch_next_wr_word()); + break; + } else { + adv_res_t res = adv_it(m_rd_it); + if (res != ADV_NO_MORE_DATA) { + m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos)); + } + // No IRQ + return; + } + } + // Intentional fall-through + case CMD_INIT_WRITE: + write_word(m_rw_pos , m_next_word , length); + pos_offset(m_rw_pos , length); + // Just to be sure.. + m_tape_pos = m_rw_pos; + m_tape_timer->adjust(fetch_next_wr_word()); + break; + + case CMD_STOP: + move_tape_pos(m_tape_fast ? FAST_BRAKE_DIST : SLOW_BRAKE_DIST); + stop_tape(); + break; + + case CMD_INGAP_MOVE: + if (m_cmd_state == 0) { + m_cmd_state = 1; + m_tape_timer->adjust(time_to_tach_pulses()); + return; + } + break; + + case CMD_FINAL_GAP: + case CMD_WRITE_IRG: + write_gap(m_rw_pos , m_tape_pos); + m_hole_timer->reset(); + break; + + case CMD_SCAN_RECORDS: + if (m_cmd_state == 0) { + m_cmd_state = 1; + tape_pos_t target = m_tape_pos; + if (next_n_gap(target, 0x10000U - m_tach_reg, MIN_IRG_LENGTH)) { + LOG_0(("%u gaps @%d\n" , 0x10000U - m_tach_reg, target)); + m_tape_timer->adjust(time_to_target(target)); + } + return; + } else { + m_hole_timer->reset(); + } + break; + + case CMD_MOVE_INDTA: + if (m_cmd_state == 0) { + if (next_data(m_rd_it , m_tape_pos , true)) { + m_cmd_state = 1; + m_tape_timer->adjust(time_to_target(farthest_end(m_rd_it))); + } + // No IRQ + return; + } + // m_cmd_state == 1 -> IRQ & cmd end + break; + + case CMD_DELTA_MOVE_HOLE: + case CMD_DELTA_MOVE_IRG: + // Interrupt at end of movement + m_hole_timer->reset(); + break; + + case CMD_START_READ: + { + bool set_intr = true; + // Just to be sure.. + m_tape_pos = m_rw_pos; + if (m_cmd_state == 0) { + set_intr = false; + if (m_rd_it->second == PREAMBLE_WORD) { + m_cmd_state = 1; + } + LOG_0(("Got preamble\n")); + } else { + m_data_reg = m_rd_it->second; + m_checksum_reg += m_data_reg; + LOG_0(("RD %04x\n" , m_data_reg)); + } + adv_res_t res = adv_it(m_rd_it); + LOG_0(("adv_it %d\n" , res)); + if (res == ADV_NO_MORE_DATA) { + m_rd_it_valid = false; + } else { + if (res == ADV_DISCONT_DATA) { + // Hit a gap, restart preamble search + m_cmd_state = 0; + } + m_tape_timer->adjust(time_to_rd_next_word(m_rw_pos)); + } + if (!set_intr) { + return; + } + } + break; + + case CMD_END_READ: + { + m_tape_pos = m_rw_pos; + // Note: checksum is not updated + m_data_reg = m_rd_it->second; + LOG_0(("Final RD %04x\n" , m_data_reg)); + adv_res_t res = adv_it(m_rd_it); + if (res == ADV_NO_MORE_DATA) { + m_rd_it_valid = false; + } + m_hole_timer->reset(); + } + break; + + default: + // Other commands: just raise irq + break; + } + irq_w(true); + break; + + case HOLE_TMR_ID: + LOG_0(("Hole tmr @%g\n" , machine().time().as_double())); + + BIT_SET(m_status_reg , STATUS_HOLE_BIT); + + switch (CMD_CODE(m_cmd_reg)) { + case CMD_FINAL_GAP: + case CMD_WRITE_IRG: + write_gap(m_rw_pos , m_tape_pos); + m_rw_pos = m_tape_pos; + break; + + case CMD_SCAN_RECORDS: + case CMD_DELTA_MOVE_HOLE: + // Cmds 18 & 1c are terminated at first hole + m_tape_timer->reset(); + irq_w(true); + // No reloading of hole timer + return; + + case CMD_DELTA_MOVE_IRG: + // TODO: update r6 + m_hole_timer->adjust(time_to_next_hole()); + // No IRQ at holes + return; + + case CMD_START_READ: + case CMD_END_READ: + set_error(true); + break; + + default: + // Other cmds: default processing (update tape pos, set IRQ, schedule timer for next hole) + break; + } + + irq_w(true); + m_hole_timer->adjust(time_to_next_hole()); + break; + + default: + break; + } +} + +void hp_taco_device::clear_state(void) +{ + m_data_reg = 0; + m_data_reg_full = false; + m_cmd_reg = 0; + m_status_reg = 0; + m_tach_reg = 0; + m_checksum_reg = 0; + m_timing_reg = 0; + m_cmd_state = 0; + // m_tape_pos is not reset, tape stays where it is + m_start_time = attotime::never; + m_tape_fwd = false; + m_tape_fast = false; + // m_image_dirty is not touched + m_tape_wr = false; + m_rw_pos = 0; + m_next_word = 0; + m_rd_it_valid = false; + m_gap_detect_start = NULL_TAPE_POS; + + set_tape_present(false); + set_tape_present(is_loaded()); +} + +void hp_taco_device::irq_w(bool state) +{ + if (state != m_irq) { + m_irq = state; + m_irq_handler(state); + LOG_0(("IRQ = %d\n" , state)); + } +} + +void hp_taco_device::set_error(bool state) +{ + m_sts = !state; + m_sts_handler(m_sts); + LOG_0(("error = %d\n" , state)); +} + +unsigned hp_taco_device::speed_to_tick_freq(void) const +{ + return m_tape_fast ? TACH_FREQ_FAST * TAPE_POS_FRACT : TACH_FREQ_SLOW * TAPE_POS_FRACT; +} + +bool hp_taco_device::pos_offset(tape_pos_t& pos , tape_pos_t offset) const +{ + if (offset == 0) { + return true; + } + + if (!m_tape_fwd) { + offset = -offset; + } + + pos += offset; + + // In real life tape would unspool.. + if (pos > TAPE_LENGTH) { + pos = TAPE_LENGTH; + return false; + } else if (pos < 0) { + pos = 0; + return false; + } else { + return true; + } +} + +void hp_taco_device::move_tape_pos(tape_pos_t delta_pos) +{ + tape_pos_t tape_start_pos = m_tape_pos; + if (!pos_offset(m_tape_pos , delta_pos)) { + LOG(("Tape unspooled!\n")); + } + m_start_time = machine().time(); + LOG_0(("Tape pos = %u\n" , m_tape_pos)); + if (any_hole(tape_start_pos , m_tape_pos)) { + // Crossed one or more holes + BIT_SET(m_status_reg , STATUS_HOLE_BIT); + } +} + +void hp_taco_device::update_tape_pos(void) +{ + if (m_start_time.is_never()) { + // Tape not moving + return; + } + + attotime delta_time(machine().time() - m_start_time); + LOG_0(("delta_time = %g\n" , delta_time.as_double())); + // How many tachometer ticks has the tape moved? + tape_pos_t delta_tach = (tape_pos_t)(delta_time.as_ticks(speed_to_tick_freq())); + LOG_0(("delta_tach = %u\n" , delta_tach)); + + move_tape_pos(delta_tach); + + // Gap detection + bool gap_detected = false; + if (m_gap_detect_start != NULL_TAPE_POS && abs(m_gap_detect_start - m_tape_pos) >= MIN_IRG_LENGTH) { + tape_pos_t tmp = m_tape_pos; + pos_offset(tmp , -MIN_IRG_LENGTH); + gap_detected = just_gap(tmp , m_tape_pos); + } + if (gap_detected) { + BIT_SET(m_status_reg, STATUS_GAP_BIT); + } else { + BIT_CLR(m_status_reg, STATUS_GAP_BIT); + } +} + +void hp_taco_device::ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b) +{ + if (a > b) { + // Ensure A always comes before B + tape_pos_t tmp; + tmp = a; + a = b; + b = tmp; + } +} + +// Is there any hole in a given section of tape? +bool hp_taco_device::any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b) +{ + ensure_a_lt_b(tape_pos_a , tape_pos_b); + + for (tape_pos_t hole : tape_holes) { + if (tape_pos_a < hole && tape_pos_b >= hole) { + return true; + } + } + + return false; +} + +// Position of next hole tape will reach in a given direction +hp_taco_device::tape_pos_t hp_taco_device::next_hole(void) const +{ + if (m_tape_fwd) { + for (tape_pos_t hole : tape_holes) { + if (hole > m_tape_pos) { + LOG_0(("next hole fwd @%u = %u\n" , m_tape_pos , hole)); + return hole; + } + } + // No more holes: will hit end of tape + return TAPE_LENGTH; + } else { + for (int i = (sizeof(tape_holes) / sizeof(tape_holes[ 0 ])) - 1; i >= 0; i--) { + if (tape_holes[ i ] < m_tape_pos) { + LOG_0(("next hole rev @%u = %u\n" , m_tape_pos , tape_holes[ i ])); + return tape_holes[ i ]; + } + } + // No more holes: will hit start of tape + return 0; + } +} + +attotime hp_taco_device::time_to_distance(tape_pos_t distance) const +{ + // +1 for rounding + return attotime::from_ticks(distance + 1 , speed_to_tick_freq()); +} + +attotime hp_taco_device::time_to_target(tape_pos_t target) const +{ + return time_to_distance(abs(target - m_tape_pos)); +} + +bool hp_taco_device::start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0) +{ + m_cmd_reg = cmd_reg; + + UINT16 to_be_tested = (m_cmd_reg & CMD_REG_MASK) | (m_status_reg & STATUS_REG_MASK); + // Bits in STATUS_ERR_MASK must always be 0 + must_be_0 |= STATUS_ERR_MASK; + + // It's not an error if the error state is already set (sts false) + if (((to_be_tested & (must_be_1 | must_be_0)) ^ must_be_1) != 0) { + set_error(true); + return false; + } else { + bool prev_tape_wr = m_tape_wr; + bool prev_tape_fwd = m_tape_fwd; + bool prev_tape_fast = m_tape_fast; + bool not_moving = m_start_time.is_never(); + + m_start_time = machine().time(); + m_tape_wr = (must_be_0 & STATUS_WPR_MASK) != 0; + m_tape_fwd = DIR_FWD(m_cmd_reg); + m_tape_fast = SPEED_FAST(m_cmd_reg); + // TODO: remove? + BIT_CLR(m_status_reg, STATUS_HOLE_BIT); + + if (m_tape_wr) { + // Write command: disable gap detector + m_gap_detect_start = NULL_TAPE_POS; + BIT_CLR(m_status_reg, STATUS_GAP_BIT); + m_image_dirty = true; + } else if (not_moving || prev_tape_wr != m_tape_wr || prev_tape_fwd != m_tape_fwd || prev_tape_fast != m_tape_fast) { + // Tape started right now, switched from writing to reading, direction changed or speed changed: (re)start gap detector + m_gap_detect_start = m_tape_pos; + BIT_CLR(m_status_reg, STATUS_GAP_BIT); + } + return true; + } +} + +void hp_taco_device::stop_tape(void) +{ + m_start_time = attotime::never; + m_gap_detect_start = NULL_TAPE_POS; +} + +hp_taco_device::tape_track_t& hp_taco_device::current_track(void) +{ + return m_tracks[ BIT(m_status_reg , STATUS_TRACKB_BIT) ]; +} + +// Return physical length of a 16-bit word on tape +hp_taco_device::tape_pos_t hp_taco_device::word_length(tape_word_t w) +{ + unsigned zeros , ones; + + // pop count of w + ones = (w & 0x5555) + ((w >> 1) & 0x5555); + ones = (ones & 0x3333) + ((ones >> 2) & 0x3333); + ones = (ones & 0x0f0f) + ((ones >> 4) & 0x0f0f); + ones = (ones & 0x00ff) + ((ones >> 8) & 0x00ff); + + zeros = 16 - ones; + + return zeros * ZERO_BIT_LEN + (ones + 1) * ONE_BIT_LEN; +} + +hp_taco_device::tape_pos_t hp_taco_device::word_end_pos(const tape_track_t::iterator& it) +{ + return it->first + word_length(it->second); +} + +void hp_taco_device::adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos) +{ + if (it != track.begin()) { + it--; + if (word_end_pos(it) <= pos) { + it++; + } + } +} + +// Write a word on current tape track +void hp_taco_device::write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length) +{ + tape_track_t& track = current_track(); + tape_track_t::iterator it_low = track.lower_bound(start); + adjust_it(track , it_low , start); + length = word_length(word); + tape_pos_t end_pos = start + length; + tape_track_t::iterator it_high = track.lower_bound(end_pos); + + track.erase(it_low , it_high); + + track.insert(it_high , std::make_pair(start, word)); + LOG_0(("WR %04x @ T%u:%u\n" , word , BIT(m_status_reg , STATUS_TRACKB_BIT) , start)); +} + +// Write a gap on current track +void hp_taco_device::write_gap(tape_pos_t a , tape_pos_t b) +{ + ensure_a_lt_b(a , b); + tape_track_t& track = current_track(); + tape_track_t::iterator it_low = track.lower_bound(a); + adjust_it(track , it_low , a); + tape_track_t::iterator it_high = track.lower_bound(b); + + track.erase(it_low, it_high); + + LOG_0(("GAP on T%u:[%u,%u)\n" , BIT(m_status_reg , STATUS_TRACKB_BIT) , a , b)); +} + +bool hp_taco_device::just_gap(tape_pos_t a , tape_pos_t b) +{ + ensure_a_lt_b(a , b); + tape_track_t& track = current_track(); + tape_track_t::iterator it_low = track.lower_bound(a); + tape_track_t::iterator it_high = track.lower_bound(b); + + adjust_it(track, it_low, a); + + return it_low == it_high; +} + +hp_taco_device::tape_pos_t hp_taco_device::farthest_end(const tape_track_t::iterator& it) const +{ + if (m_tape_fwd) { + return word_end_pos(it); + } else { + return it->first; + } +} + +bool hp_taco_device::next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive) +{ + tape_track_t& track = current_track(); + it = track.lower_bound(pos); + if (m_tape_fwd) { + if (inclusive) { + adjust_it(track, it, pos); + } + return it != track.end(); + } else { + // Never more than 2 iterations + do { + if (it == track.begin()) { + it = track.end(); + return false; + } + it--; + } while (!inclusive && word_end_pos(it) > pos); + return true; + } +} + +hp_taco_device::adv_res_t hp_taco_device::adv_it(tape_track_t::iterator& it) +{ + tape_track_t& track = current_track(); + if (m_tape_fwd) { + tape_pos_t prev_pos = word_end_pos(it); + it++; + if (it == track.end()) { + return ADV_NO_MORE_DATA; + } else { + adv_res_t res = prev_pos == it->first ? ADV_CONT_DATA : ADV_DISCONT_DATA; + return res; + } + } else { + if (it == track.begin()) { + it = track.end(); + return ADV_NO_MORE_DATA; + } else { + tape_pos_t prev_pos = it->first; + it--; + return prev_pos == word_end_pos(it) ? ADV_CONT_DATA : ADV_DISCONT_DATA; + } + } +} + +attotime hp_taco_device::fetch_next_wr_word(void) +{ + if (m_data_reg_full) { + m_next_word = m_data_reg; + m_data_reg_full = false; + LOG_0(("next %04x (DR)\n" , m_next_word)); + } else { + // When data register is empty, write checksum word + m_next_word = m_checksum_reg; + LOG_0(("next %04x (CS)\n" , m_next_word)); + } + // Update checksum with new word + m_checksum_reg += m_next_word; + + return time_to_distance(word_length(m_next_word)); +} + +attotime hp_taco_device::time_to_rd_next_word(tape_pos_t& word_rd_pos) +{ + if (m_rd_it_valid) { + word_rd_pos = farthest_end(m_rd_it); + return time_to_target(word_rd_pos); + } else { + return attotime::never; + } +} + +/** + * Scan for next "n_gaps" gaps + * + * @param[in,out] pos Start position on input, start of gap on output + * @param it Pointer to data word where scan is to start + * @param n_gaps Number of gaps to scan + * @param min_gap Minimum gap size + * + * @return true if n_gaps gaps are found + */ +bool hp_taco_device::next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap) +{ + tape_track_t& track = current_track(); + bool done = false; + tape_track_t::iterator prev_it; + + if (m_tape_fwd) { + tape_pos_t next_pos; + + while (1) { + if (it == track.end()) { + next_pos = TAPE_LENGTH; + done = true; + } else { + next_pos = it->first; + } + if (((next_pos - pos) >= min_gap && --n_gaps == 0) || done) { + break; + } + adv_res_t adv_res; + do { + prev_it = it; + adv_res = adv_it(it); + } while (adv_res == ADV_CONT_DATA); + pos = word_end_pos(prev_it); + } + } else { + tape_pos_t next_pos; + + while (1) { + if (it == track.end()) { + next_pos = 0; + done = true; + } else { + next_pos = word_end_pos(it); + } + if (((pos - next_pos) >= min_gap && --n_gaps == 0) || done) { + break; + } + adv_res_t adv_res; + do { + prev_it = it; + adv_res = adv_it(it); + } while (adv_res == ADV_CONT_DATA); + pos = prev_it->first; + } + } + + // Set "pos" where minimum gap size is met + pos_offset(pos , min_gap); + + return n_gaps == 0; +} + +bool hp_taco_device::next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap) +{ + tape_track_t::iterator it; + // First align with next data + next_data(it, pos, true); + // Then scan for n_gaps + return next_n_gap(pos, it, n_gaps, min_gap); +} + +void hp_taco_device::clear_tape(void) +{ + for (unsigned track_n = 0; track_n < 2; track_n++) { + m_tracks[ track_n ].clear(); + } +} + +void hp_taco_device::dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words) +{ + if (n_words) { + UINT32 tmp32; + UINT16 tmp16; + + tmp32 = n_words; + fwrite(&tmp32 , sizeof(tmp32)); + tmp32 = it_start->first; + fwrite(&tmp32 , sizeof(tmp32)); + + for (unsigned i = 0; i < n_words; i++) { + tmp16 = it_start->second; + fwrite(&tmp16 , sizeof(tmp16)); + it_start++; + } + } +} + +void hp_taco_device::save_tape(void) +{ + UINT32 tmp32; + + fseek(0, SEEK_SET); + + tmp32 = FILE_MAGIC; + fwrite(&tmp32 , sizeof(tmp32)); + + for (unsigned track_n = 0; track_n < 2; track_n++) { + const tape_track_t& track = m_tracks[ track_n ]; + tape_pos_t next_pos = (tape_pos_t)-1; + unsigned n_words = 0; + tape_track_t::const_iterator it_start; + for (tape_track_t::const_iterator it = track.cbegin(); it != track.cend(); it++) { + if (it->first != next_pos) { + dump_sequence(it_start , n_words); + it_start = it; + n_words = 0; + } + next_pos = it->first + word_length(it->second); + n_words++; + } + dump_sequence(it_start , n_words); + // End of track + tmp32 = (UINT32)-1; + fwrite(&tmp32 , sizeof(tmp32)); + } +} + +bool hp_taco_device::load_track(tape_track_t& track) +{ + UINT32 tmp32; + + track.clear(); + + while (1) { + if (fread(&tmp32 , sizeof(tmp32)) != sizeof(tmp32)) { + return false; + } + + if (tmp32 == (UINT32)-1) { + return true; + } + + unsigned n_words = tmp32; + + if (fread(&tmp32 , sizeof(tmp32)) != sizeof(tmp32)) { + return false; + } + + tape_pos_t pos = (tape_pos_t)tmp32; + + for (unsigned i = 0; i < n_words; i++) { + UINT16 tmp16; + + if (fread(&tmp16 , sizeof(tmp16)) != sizeof(tmp16)) { + return false; + } + + track.insert(std::make_pair(pos , tmp16)); + pos += word_length(tmp16); + } + } +} + +bool hp_taco_device::load_tape(void) +{ + UINT32 magic; + + if (fread(&magic , sizeof(magic)) != sizeof(magic) || + magic != FILE_MAGIC) { + return false; + } + + for (unsigned track_n = 0; track_n < 2; track_n++) { + if (!load_track(m_tracks[ track_n ])) { + LOG(("load_tape failed")); + clear_tape(); + return false; + } + } + + LOG(("load_tape done\n")); + return true; +} + +void hp_taco_device::set_tape_present(bool present) +{ + if (present) { + if (is_readonly()) { + BIT_SET(m_status_reg, STATUS_WPR_BIT); + } else { + BIT_CLR(m_status_reg, STATUS_WPR_BIT); + } + // STATUS_CART_OUT_BIT is reset by CMD_CLEAR + } else { + BIT_SET(m_status_reg, STATUS_CART_OUT_BIT); + BIT_SET(m_status_reg, STATUS_WPR_BIT); + } +} + +attotime hp_taco_device::time_to_next_hole(void) const +{ + return time_to_target(next_hole()); +} + +attotime hp_taco_device::time_to_tach_pulses(void) const +{ + return time_to_distance((tape_pos_t)(0x10000U - m_tach_reg) * TAPE_POS_FRACT); +} + +void hp_taco_device::start_cmd_exec(UINT16 new_cmd_reg) +{ + LOG(("Cmd = %02x\n" , CMD_CODE(new_cmd_reg))); + + update_tape_pos(); + + attotime cmd_duration = attotime::never; + attotime time_to_hole = attotime::never; + + unsigned new_cmd_code = CMD_CODE(new_cmd_reg); + + if (new_cmd_code != CMD_START_READ && + new_cmd_code != CMD_END_READ && + new_cmd_code != CMD_CLEAR) { + m_rd_it_valid = false; + } + + switch (new_cmd_code) { + case CMD_INDTA_INGAP: + // Errors: CART OUT,FAST SPEED + if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) { + m_cmd_state = 0; + if (next_data(m_rd_it , m_tape_pos , true)) { + cmd_duration = time_to_target(farthest_end(m_rd_it)); + } + } + break; + + case CMD_FINAL_GAP: + // Errors: WP,CART OUT + if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) { + m_rw_pos = m_tape_pos; + cmd_duration = time_to_distance(END_GAP_LENGTH); + time_to_hole = time_to_next_hole(); + } + break; + + case CMD_CLEAR: + set_error(false); + BIT_CLR(m_status_reg, STATUS_HOLE_BIT); + BIT_CLR(m_status_reg, STATUS_CART_OUT_BIT); + BIT_CLR(m_status_reg, STATUS_WPR_BIT); + set_tape_present(is_loaded()); + // This is a special command: it doesn't raise IRQ at completion and it + // doesn't replace current command + return; + + case CMD_NOT_INDTA: + // Errors: CART OUT,FAST SPEED + if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) { + tape_pos_t target = m_tape_pos; + if (next_n_gap(target, 1, NO_DATA_GAP)) { + LOG_0(("End of data @%d\n" , target)); + cmd_duration = time_to_target(target); + } + // Holes detected? + } + break; + + case CMD_INIT_WRITE: + // Errors: WP,CART OUT,fast speed,reverse + if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) { + m_next_word = PREAMBLE_WORD; + m_rw_pos = m_tape_pos; + cmd_duration = time_to_distance(word_length(m_next_word)); + } + break; + + case CMD_STOP: + if (CMD_CODE(m_cmd_reg) != CMD_STOP) { + if (m_start_time.is_never()) { + // Tape is already stopped + cmd_duration = attotime::from_usec(QUICK_CMD_USEC); + } else { + // Start braking timer + cmd_duration = attotime::from_msec(m_tape_fast ? FAST_BRAKE_MSEC : SLOW_BRAKE_MSEC); + } + m_cmd_reg = new_cmd_reg; + } else { + // TODO: check if ok + return; + } + break; + + case CMD_SET_TRACK: + // Don't know if this command really starts the tape or not (probably it doesn't) + if (start_tape_cmd(new_cmd_reg , 0 , 0)) { + // When b9 is 0, set track A/B + // When b9 is 1, ignore command (in TACO chip it has an unknown purpose) + if (!UNKNOWN_B9(new_cmd_reg)) { + if (CMD_OPT(new_cmd_reg)) { + BIT_SET(m_status_reg, STATUS_TRACKB_BIT); + } else { + BIT_CLR(m_status_reg, STATUS_TRACKB_BIT); + } + } + cmd_duration = attotime::from_usec(QUICK_CMD_USEC); + } + break; + + case CMD_MOVE: + if (start_tape_cmd(new_cmd_reg , 0 , 0)) { + time_to_hole = time_to_next_hole(); + } + break; + + case CMD_INGAP_MOVE: + // Errors: CART OUT,FAST SPEED + if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) { + m_cmd_state = 0; + tape_pos_t target = m_tape_pos; + if (next_n_gap(target, 1, MIN_IRG_LENGTH)) { + LOG_0(("IRG @%d\n" , target)); + cmd_duration = time_to_target(target); + } + // Holes detected? + } + break; + + case CMD_WRITE_IRG: + // Errors: WP,CART OUT + if (start_tape_cmd(new_cmd_reg , 0 , STATUS_WPR_MASK)) { + m_rw_pos = m_tape_pos; + cmd_duration = time_to_tach_pulses(); + time_to_hole = time_to_next_hole(); + } + break; + + case CMD_SCAN_RECORDS: + // Errors: CART OUT + if (start_tape_cmd(new_cmd_reg , 0 , 0)) { + m_cmd_state = 0; + if (next_data(m_rd_it , m_tape_pos , true)) { + cmd_duration = time_to_target(farthest_end(m_rd_it)); + } + time_to_hole = time_to_next_hole(); + } + break; + + case CMD_RECORD_WRITE: + // Errors: WP,CART OUT,fast speed,reverse + if (start_tape_cmd(new_cmd_reg , DIR_FWD_MASK , STATUS_WPR_MASK | SPEED_FAST_MASK)) { + // Search for preamble first + m_cmd_state = 0; + m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false); + cmd_duration = time_to_rd_next_word(m_rw_pos); + // Holes detected? + } + break; + + case CMD_MOVE_INDTA: + // Errors: CART OUT,FAST SPEED + if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) { + m_cmd_state = 0; + cmd_duration = time_to_tach_pulses(); + // Holes detected? + } + break; + + case CMD_UNK_1b: + if (start_tape_cmd(new_cmd_reg , 0 , 0)) { + // Unknown purpose, but make it a NOP (it's used in "T" test of test ROM) + cmd_duration = attotime::from_usec(QUICK_CMD_USEC); + } + break; + + case CMD_DELTA_MOVE_HOLE: + case CMD_DELTA_MOVE_IRG: + if (start_tape_cmd(new_cmd_reg , 0 , 0)) { + cmd_duration = time_to_tach_pulses(); + time_to_hole = time_to_next_hole(); + } + break; + + case CMD_START_READ: + // Yes, you can read tape backwards: test "C" does that! + // Because of this DIR_FWD_MASK is not in the "must be 1" mask. + if (start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) { + // TODO: check anche m_rw_pos sforato + if (!m_rd_it_valid) { + // Search for preamble first + m_cmd_state = 0; + m_rd_it_valid = next_data(m_rd_it , m_tape_pos , false); + } + + cmd_duration = time_to_rd_next_word(m_rw_pos); + time_to_hole = time_to_next_hole(); + } + break; + + case CMD_END_READ: + // This command only makes sense after CMD_START_READ + if (CMD_CODE(m_cmd_reg) == CMD_START_READ && m_cmd_state == 1 && + start_tape_cmd(new_cmd_reg , 0 , SPEED_FAST_MASK)) { + LOG_0(("END_READ %d\n" , m_rd_it_valid)); + cmd_duration = time_to_rd_next_word(m_rw_pos); + time_to_hole = time_to_next_hole(); + } + break; + + default: + LOG(("Unrecognized command\n")); + break; + } + + m_tape_timer->adjust(cmd_duration); + m_hole_timer->adjust(time_to_hole); +} + +bool hp_taco_device::call_load() +{ + LOG(("call_load %d\n" , has_been_created())); + if (has_been_created()) { + clear_tape(); + save_tape(); + } else if (!load_tape()) { + seterror(IMAGE_ERROR_INVALIDIMAGE , "Wrong format"); + set_tape_present(false); + return IMAGE_INIT_FAIL; + } + + m_image_dirty = false; + + set_tape_present(true); + return IMAGE_INIT_PASS; +} + +bool hp_taco_device::call_create(int format_type, option_resolution *format_options) +{ + LOG(("call_create %d\n" , has_been_created())); + return call_load(); +} + +void hp_taco_device::call_unload() +{ + LOG(("call_unload dirty=%d\n" , m_image_dirty)); + if (m_image_dirty) { + save_tape(); + m_image_dirty = false; + } + + clear_tape(); + set_tape_present(false); +} + +const char *hp_taco_device::file_extensions() const +{ + return "hti"; +} diff --git a/src/devices/machine/hp_taco.h b/src/devices/machine/hp_taco.h new file mode 100644 index 00000000000..c8b794c79a2 --- /dev/null +++ b/src/devices/machine/hp_taco.h @@ -0,0 +1,169 @@ +// license:BSD-3-Clause +// copyright-holders:F. Ulivi +/********************************************************************* + + hp_taco.h + + HP TApe COntroller (5006-3012) + +*********************************************************************/ + +#ifndef __HP_TACO_H__ +#define __HP_TACO_H__ + +#include <map> + +#define MCFG_TACO_IRQ_HANDLER(_devcb) \ + devcb = &hp_taco_device::set_irq_handler(*device , DEVCB_##_devcb); + +#define MCFG_TACO_FLG_HANDLER(_devcb) \ + devcb = &hp_taco_device::set_flg_handler(*device , DEVCB_##_devcb); + +#define MCFG_TACO_STS_HANDLER(_devcb) \ + devcb = &hp_taco_device::set_sts_handler(*device , DEVCB_##_devcb); + +class hp_taco_device : public device_t , + public device_image_interface +{ +public: + // construction/destruction + hp_taco_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname); + hp_taco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // static configuration helpers + template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_irq_handler.set_callback(object); } + template<class _Object> static devcb_base &set_flg_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_flg_handler.set_callback(object); } + template<class _Object> static devcb_base &set_sts_handler(device_t &device, _Object object) { return downcast<hp_taco_device &>(device).m_sts_handler.set_callback(object); } + + // Register read/write + DECLARE_WRITE16_MEMBER(reg_w); + DECLARE_READ16_MEMBER(reg_r); + + // Flag & status read + DECLARE_READ_LINE_MEMBER(flg_r); + DECLARE_READ_LINE_MEMBER(sts_r); + + // device_image_interface overrides + virtual bool call_load() override; + virtual bool call_create(int format_type, option_resolution *format_options) override; + virtual void call_unload() override; + virtual iodevice_t image_type() const override { return IO_MAGTAPE; } + virtual bool is_readable() const override { return true; } + virtual bool is_writeable() const override { return true; } + virtual bool is_creatable() const override { return true; } + virtual bool must_be_loaded() const override { return false; } + virtual bool is_reset_on_load() const override { return false; } + virtual const char *file_extensions() const override; + virtual const option_guide *create_option_guide() const override { return nullptr; } + + // Tape position, 1 unit = 1 inch / (968 * 1024) + typedef INT32 tape_pos_t; + + // Words stored on tape + typedef UINT16 tape_word_t; + +protected: + // device-level overrides + virtual void device_config_complete() override; + virtual void device_start() override; + virtual void device_stop() override; + virtual void device_reset() override; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + +private: + // Storage of tracks: mapping from a tape position to word stored there + typedef std::map<tape_pos_t , tape_word_t> tape_track_t; + + devcb_write_line m_irq_handler; + devcb_write_line m_flg_handler; + devcb_write_line m_sts_handler; + + // Registers + UINT16 m_data_reg; + bool m_data_reg_full; + UINT16 m_cmd_reg; + UINT16 m_status_reg; + UINT16 m_tach_reg; + UINT16 m_checksum_reg; + UINT16 m_timing_reg; + + // State + bool m_irq; + bool m_flg; + bool m_sts; + UINT8 m_cmd_state; + + // Tape position & motion + tape_pos_t m_tape_pos; + attotime m_start_time; // Tape moving if != never + bool m_tape_fwd; + bool m_tape_fast; + + // Timers + emu_timer *m_tape_timer; + emu_timer *m_hole_timer; + + // Content of tape tracks + tape_track_t m_tracks[ 2 ]; + bool m_image_dirty; + + // Reading & writing + bool m_tape_wr; + tape_pos_t m_rw_pos; + UINT16 m_next_word; + tape_track_t::iterator m_rd_it; + bool m_rd_it_valid; + + // Gap detection + tape_pos_t m_gap_detect_start; + + typedef enum { + ADV_NO_MORE_DATA, + ADV_CONT_DATA, + ADV_DISCONT_DATA + } adv_res_t; + + void clear_state(void); + void irq_w(bool state); + void set_error(bool state); + unsigned speed_to_tick_freq(void) const; + bool pos_offset(tape_pos_t& pos , tape_pos_t offset) const; + void move_tape_pos(tape_pos_t delta_pos); + void update_tape_pos(void); + static void ensure_a_lt_b(tape_pos_t& a , tape_pos_t& b); + static bool any_hole(tape_pos_t tape_pos_a , tape_pos_t tape_pos_b); + tape_pos_t next_hole(void) const; + attotime time_to_distance(tape_pos_t distance) const; + attotime time_to_target(tape_pos_t target) const; + bool start_tape_cmd(UINT16 cmd_reg , UINT16 must_be_1 , UINT16 must_be_0); + void start_tape(UINT16 cmd_reg); + void stop_tape(void); + tape_track_t& current_track(void); + static tape_pos_t word_length(tape_word_t w); + static tape_pos_t word_end_pos(const tape_track_t::iterator& it); + static void adjust_it(tape_track_t& track , tape_track_t::iterator& it , tape_pos_t pos); + void write_word(tape_pos_t start , tape_word_t word , tape_pos_t& length); + void write_gap(tape_pos_t a , tape_pos_t b); + bool just_gap(tape_pos_t a , tape_pos_t b); + tape_pos_t farthest_end(const tape_track_t::iterator& it) const; + bool next_data(tape_track_t::iterator& it , tape_pos_t pos , bool inclusive); + adv_res_t adv_it(tape_track_t::iterator& it); + attotime fetch_next_wr_word(void); + attotime time_to_rd_next_word(tape_pos_t& word_rd_pos); + bool next_n_gap(tape_pos_t& pos , tape_track_t::iterator it , unsigned n_gaps , tape_pos_t min_gap); + bool next_n_gap(tape_pos_t& pos , unsigned n_gaps , tape_pos_t min_gap); + void clear_tape(void); + void dump_sequence(tape_track_t::const_iterator it_start , unsigned n_words); + void save_tape(void); + bool load_track(tape_track_t& track); + bool load_tape(void); + void set_tape_present(bool present); + attotime time_to_next_hole(void) const; + attotime time_to_tach_pulses(void) const; + void start_cmd_exec(UINT16 new_cmd_reg); +}; + +// device type definition +extern const device_type HP_TACO; + +#endif /* __HP_TACO_H__ */ diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp index cd8c0faf5bf..dfd098a5f82 100644 --- a/src/devices/machine/i8271.cpp +++ b/src/devices/machine/i8271.cpp @@ -88,6 +88,7 @@ void i8271_device::soft_reset() flopi[i].live = false; flopi[i].ready = get_ready(i); } + hdl_cb(false); set_irq(false); set_drq(false); command_pos = 0; @@ -887,6 +888,7 @@ void i8271_device::command_end(floppy_info &fi, bool data_completion) { logerror("%s: command done (%s) - %02x\n", tag(), data_completion ? "data" : "seek", rr); fi.main_state = fi.sub_state = IDLE; + idle_icnt = 0; main_phase = PHASE_RESULT; set_irq(true); } @@ -981,6 +983,7 @@ void i8271_device::seek_continue(floppy_info &fi) void i8271_device::read_data_start(floppy_info &fi) { fi.main_state = READ_DATA; + hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; logerror("%s: command read%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", @@ -1010,6 +1013,7 @@ void i8271_device::read_data_start(floppy_info &fi) void i8271_device::scan_start(floppy_info &fi) { fi.main_state = SCAN_DATA; + hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; logerror("%s: command scan%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", @@ -1041,6 +1045,7 @@ void i8271_device::scan_start(floppy_info &fi) void i8271_device::verify_data_start(floppy_info &fi) { fi.main_state = VERIFY_DATA; + hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; logerror("%s: command verify%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", @@ -1098,6 +1103,7 @@ void i8271_device::read_data_continue(floppy_info &fi) return; case SEEK_WAIT_STEP_TIME_DONE: + hdl_cb(true); do { if(fi.pcn > command[1]) fi.pcn--; @@ -1181,7 +1187,9 @@ void i8271_device::read_data_continue(floppy_info &fi) void i8271_device::write_data_start(floppy_info &fi) { fi.main_state = WRITE_DATA; + hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; + logerror("%s: command write%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", tag(), command[0] & 0x04 ? " deleted" : "", @@ -1238,6 +1246,7 @@ void i8271_device::write_data_continue(floppy_info &fi) return; case SEEK_WAIT_STEP_TIME_DONE: + hdl_cb(true); do { if(fi.pcn > command[1]) fi.pcn--; @@ -1311,6 +1320,7 @@ int i8271_device::calc_sector_size(UINT8 size) void i8271_device::format_track_start(floppy_info &fi) { fi.main_state = FORMAT_TRACK; + hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; logerror("%s: command format track c=%02x n=%02x sc=%02x gap3=%02x gap5=%02x gap1=%02x\n", @@ -1364,6 +1374,7 @@ void i8271_device::format_track_continue(floppy_info &fi) return; case SEEK_WAIT_STEP_TIME_DONE: + hdl_cb(true); do { if(fi.pcn > command[1]) fi.pcn--; @@ -1402,6 +1413,7 @@ void i8271_device::format_track_continue(floppy_info &fi) void i8271_device::read_id_start(floppy_info &fi) { fi.main_state = READ_ID; + hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; logerror("%s: command read id, rate=%d\n", @@ -1457,6 +1469,7 @@ void i8271_device::read_id_continue(floppy_info &fi) return; case SEEK_WAIT_STEP_TIME_DONE: + hdl_cb(true); do { if(fi.pcn > command[1]) fi.pcn--; @@ -1553,6 +1566,13 @@ void i8271_device::index_callback(floppy_image_device *floppy, int state) continue; } + if (fi.main_state == IDLE) { + idle_icnt++; + if (icnt != 0x0f && idle_icnt >= icnt) { + hdl_cb(false); + } + } + switch(fi.sub_state) { case IDLE: case SEEK_MOVE: diff --git a/src/devices/machine/i8271.h b/src/devices/machine/i8271.h index e4409bed389..5c63393a43f 100644 --- a/src/devices/machine/i8271.h +++ b/src/devices/machine/i8271.h @@ -215,6 +215,7 @@ private: UINT8 srate, hset, icnt, hload; int sector_size; int cur_rate; + int idle_icnt; static std::string tts(attotime t); std::string ttsn(); diff --git a/src/devices/machine/k033906.cpp b/src/devices/machine/k033906.cpp index bd32fef29f1..d9953d2864f 100644 --- a/src/devices/machine/k033906.cpp +++ b/src/devices/machine/k033906.cpp @@ -33,7 +33,7 @@ k033906_device::k033906_device(const machine_config &mconfig, const char *tag, d void k033906_device::device_start() { - m_voodoo = machine().device(m_voodoo_tag); + m_voodoo = (voodoo_device*)machine().device(m_voodoo_tag); m_reg_set = 0; @@ -95,7 +95,7 @@ void k033906_device::reg_w(int reg, UINT32 data) case 0x10: // initEnable { - voodoo_set_init_enable(m_voodoo, data); + m_voodoo->voodoo_set_init_enable(data); break; } diff --git a/src/devices/machine/k033906.h b/src/devices/machine/k033906.h index aa2c685df99..438cc5796ab 100644 --- a/src/devices/machine/k033906.h +++ b/src/devices/machine/k033906.h @@ -12,7 +12,7 @@ #define __K033906_H__ #include "emu.h" - +#include "video/voodoo.h" /*************************************************************************** @@ -58,7 +58,7 @@ private: int m_reg_set; // 1 = access reg / 0 = access ram const char *m_voodoo_tag; - device_t *m_voodoo; + voodoo_device *m_voodoo; UINT32 m_reg[256]; UINT32 m_ram[32768]; diff --git a/src/devices/machine/pic8259.cpp b/src/devices/machine/pic8259.cpp index 40fe6fd916c..3064e212850 100644 --- a/src/devices/machine/pic8259.cpp +++ b/src/devices/machine/pic8259.cpp @@ -133,7 +133,10 @@ UINT32 pic8259_device::acknowledge() } } } - return 0; + logerror("Spurious IRQ\n"); + if(m_is_x86) + return m_base + 7; + return 0xcd0000 + (m_vector_addr_high << 8) + m_vector_addr_low + (7 << (3-m_vector_size)); } diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp index 92728b55303..7dd8f9250a4 100644 --- a/src/devices/machine/ram.cpp +++ b/src/devices/machine/ram.cpp @@ -1,5 +1,5 @@ -// license:GPL-2.0+ -// copyright-holders:Dirk Best +// license: BSD-3-Clause +// copyright-holders: Dirk Best /************************************************************************* RAM device @@ -23,8 +23,6 @@ // device type definition const device_type RAM = &device_creator<ram_device>; - - //------------------------------------------------- // ram_device - constructor //------------------------------------------------- @@ -38,8 +36,6 @@ ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t m_default_value = 0xCD; } - - //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- @@ -68,7 +64,6 @@ void ram_device::device_start() save_item(NAME(m_pointer)); } - //------------------------------------------------- // device_validity_check - device-specific validity // checks @@ -171,8 +166,6 @@ void ram_device::device_validity_check(validity_checker &valid) const } } - - //------------------------------------------------- // parse_string - convert a ram string to an // integer value @@ -210,8 +203,6 @@ UINT32 ram_device::parse_string(const char *s) return ram; } - - //------------------------------------------------- // default_size //------------------------------------------------- diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h index 7d3f054895f..5140309f825 100644 --- a/src/devices/machine/ram.h +++ b/src/devices/machine/ram.h @@ -1,5 +1,5 @@ -// license:GPL-2.0+ -// copyright-holders:Dirk Best +// license: BSD-3-Clause +// copyright-holders: Dirk Best /************************************************************************* RAM device diff --git a/src/devices/sound/votrax.h b/src/devices/sound/votrax.h index 540f2b5feb1..471a42873f9 100644 --- a/src/devices/sound/votrax.h +++ b/src/devices/sound/votrax.h @@ -42,7 +42,7 @@ public: // writers DECLARE_WRITE8_MEMBER( write ); DECLARE_WRITE8_MEMBER( inflection_w ); - DECLARE_READ_LINE_MEMBER( request ) { return m_request_state; } + DECLARE_READ_LINE_MEMBER( request ) { m_stream->update(); return m_request_state; } protected: // device-level overrides diff --git a/src/devices/video/ef9364.cpp b/src/devices/video/ef9364.cpp new file mode 100644 index 00000000000..b850f05d531 --- /dev/null +++ b/src/devices/video/ef9364.cpp @@ -0,0 +1,359 @@ +// license:BSD-3-Clause +// copyright-holders:Jean-Francois DEL NERO + +/********************************************************************* + + ef9364.cpp + + Thomson EF9364 / Sescosem SFF96364 video controller emulator code + + This circuit is a simple black and white 8x8 character generator. + It display 64 columns * 16 rows text page. + It is able to do automatic text scrolling, page erase. + The characters font is stored into an external 1KB EPROM. + + To see how to use this driver, have a look to the Goupil machine + driver (goupil.cpp). + If you have any question or remark, don't hesitate to contact me + at the email present on this website : http://hxc2001.free.fr/ + + 01/20/2016 + Jean-Francois DEL NERO +*********************************************************************/ + +#include "emu.h" +#include "ef9364.h" + +// devices +const device_type EF9364 = &device_creator<ef9364_device>; + +//------------------------------------------------- +// default address map +//------------------------------------------------- +static ADDRESS_MAP_START( ef9364, AS_0, 8, ef9364_device ) + AM_RANGE(0x00000, ( ( EF9364_TXTPLANE_MAX_SIZE * EF9364_MAX_TXTPLANES ) - 1 ) ) AM_RAM +ADDRESS_MAP_END + +//------------------------------------------------- +// memory_space_config - return a description of +// any address spaces owned by this device +//------------------------------------------------- + +const address_space_config *ef9364_device::memory_space_config(address_spacenum spacenum) const +{ + return (spacenum == AS_0) ? &m_space_config : NULL; +} + +//************************************************************************** +// INLINE HELPERS +//************************************************************************** + +//************************************************************************** +// live device +//************************************************************************** + +//------------------------------------------------- +// ef9364_device - constructor +//------------------------------------------------- + +ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, EF9364, "EF9364", tag, owner, clock, "ef9364", __FILE__), + device_memory_interface(mconfig, *this), + device_video_interface(mconfig, *this), + m_space_config("textram", ENDIANNESS_LITTLE, 8, 12, 0, nullptr, *ADDRESS_MAP_NAME(ef9364)), + m_palette(*this) +{ + clock_freq = clock; +} + +//------------------------------------------------- +// static_set_palette_tag: Set the tag of the +// palette device +//------------------------------------------------- + +void ef9364_device::static_set_palette_tag(device_t &device, const char *tag) +{ + downcast<ef9364_device &>(device).m_palette.set_tag(tag); +} + +//------------------------------------------------- +// static_set_nb_of_pages: Set the number of hardware pages +//------------------------------------------------- + +void ef9364_device::static_set_nb_of_pages(device_t &device, int nb_of_pages ) +{ + if( nb_of_pages > 0 && nb_of_pages <= 8 ) + { + downcast<ef9364_device &>(device).nb_of_pages = nb_of_pages; + } +} + +//------------------------------------------------- +// set_color_entry: Set the color value +// into the palette +//------------------------------------------------- + +void ef9364_device::set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b ) +{ + if( index < 2 ) + { + palette[index] = rgb_t(r, g, b); + } + else + { + logerror("Invalid EF9364 Palette entry : %02x\n", index); + } +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void ef9364_device::device_start() +{ + m_textram = &space(0); + m_charset = region(); + + bitplane_xres = EF9364_NB_OF_COLUMNS*8; + bitplane_yres = EF9364_NB_OF_ROWS*(8+4); + + vsync_scanline_pos = 250; + + // Default palette : Black and white + palette[0] = rgb_t(0, 0, 0); + palette[1] = rgb_t(255, 255, 255); + + m_screen_out.allocate( bitplane_xres, m_screen->height() ); + + cursor_cnt = 0; + cursor_state = 0; + + save_item(NAME(m_border)); + + save_item(NAME(m_screen_out)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void ef9364_device::device_reset() +{ + int i; + + x_curs_pos = 0; + y_curs_pos = 0; + + char_latch = 0x00; + + for(i=0;i<EF9364_NB_OF_COLUMNS * EF9364_NB_OF_ROWS * nb_of_pages;i++) + { + m_textram->write_byte ( i , 0x7F ); + } + + memset(m_border, 0, sizeof(m_border)); + + m_screen_out.fill(0); + + set_video_mode(); +} + +//------------------------------------------------- +// set_video_mode: Set output screen format +//------------------------------------------------- + +void ef9364_device::set_video_mode(void) +{ + UINT16 new_width = bitplane_xres; + + if (m_screen->width() != new_width) + { + rectangle visarea = m_screen->visible_area(); + visarea.max_x = new_width - 1; + + m_screen->configure(new_width, m_screen->height(), visarea, m_screen->frame_period().attoseconds()); + } + + //border color + memset(m_border, 0, sizeof(m_border)); +} + +//------------------------------------------------- +// draw_border: Draw the left and right borders +// ( No border for the moment ;) ) +//------------------------------------------------- + +void ef9364_device::draw_border(UINT16 line) +{ +} + +//------------------------------------------------- +// screen_update: Framebuffer video ouput +//------------------------------------------------- + +UINT32 ef9364_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + int x,y,r; + unsigned char c; + + for( r = 0 ; r < EF9364_NB_OF_ROWS ; r++ ) + { + for( y = 0 ; y < 8 ; y++ ) + { + for( x = 0 ; x < EF9364_NB_OF_COLUMNS * 8 ; x++ ) + { + if( ( ( x >> 3 ) != x_curs_pos ) || ( r != y_curs_pos ) || !cursor_state) + { + c = m_textram->read_byte( ( r * EF9364_NB_OF_COLUMNS ) + ( x>>3 ) ); + + if( m_charset->u8(((c&0x7F)<<3) + y ) & (0x80>>(x&7)) ) + m_screen_out.pix32((r*12)+y, x) = palette[1]; + else + m_screen_out.pix32((r*12)+y, x) = palette[0]; + } + else + { + if(y != 7) + m_screen_out.pix32((r*12)+y, x) = palette[0]; + else + m_screen_out.pix32((r*12)+y, x) = palette[1]; + } + } + } + } + + cursor_cnt = (cursor_cnt + 1) % 13; + if(!cursor_cnt) + cursor_state ^= 1; + + copybitmap(bitmap, m_screen_out, 0, 0, 0, 0, cliprect); + return 0; +} + +//------------------------------------------------- +// update_scanline: Scanline callback +//------------------------------------------------- + +void ef9364_device::update_scanline(UINT16 scanline) +{ + if (scanline == vsync_scanline_pos) + { + // vsync + } + + if (scanline == 0) + { + draw_border(0); + } +} + +//------------------------------------------------- +// data_w: Registers write access callback +//------------------------------------------------- + +void ef9364_device::command_w(UINT8 cmd) +{ + int x,y,i,j; + + switch( cmd&7 ) + { + case 0x0: // Page Erase & Cursor home + for( y=0 ; y < EF9364_NB_OF_ROWS ; y++ ) + { + for( x=0 ; x < EF9364_NB_OF_COLUMNS ; x++ ) + { + m_textram->write_byte ( y * EF9364_NB_OF_COLUMNS + x , 0x7F ); + } + } + x_curs_pos = 0; + y_curs_pos = 0; + break; + + case 0x1: // Erase to end of the line and return cursor + for( ; x_curs_pos < EF9364_NB_OF_COLUMNS ; x_curs_pos++ ) + { + m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , 0x7F ); + } + x_curs_pos = 0; + break; + + case 0x2: // Line feed + y_curs_pos++; + if( y_curs_pos >= EF9364_NB_OF_ROWS ) + { + // Scroll + for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ ) + { + for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ ) + { + m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i , m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) ); + } + } + // Erase last line + for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ ) + { + m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F ); + } + + y_curs_pos = EF9364_NB_OF_ROWS - 1; + } + break; + + case 0x3: // Nop + + break; + + case 0x4: // Cursor left + if(x_curs_pos) + x_curs_pos--; + break; + + case 0x5: // Erasure of cursor Line. + for( x = 0 ; x < EF9364_NB_OF_COLUMNS ; x++ ) + { + m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x , 0x7F ); + } + break; + + case 0x6: // Cursor up + if(y_curs_pos) + y_curs_pos--; + break; + + case 0x7: // Write char + if(cmd&0x8) + m_textram->write_byte ( y_curs_pos * EF9364_NB_OF_COLUMNS + x_curs_pos , char_latch ); + + x_curs_pos++; + if( x_curs_pos >= EF9364_NB_OF_COLUMNS ) + { + x_curs_pos=0; + y_curs_pos++; + if( y_curs_pos >= EF9364_NB_OF_ROWS ) + { + // Scroll + for( j = 1 ; j < EF9364_NB_OF_ROWS ; j++ ) + { + for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ ) + { + m_textram->write_byte ( (j-1) * EF9364_NB_OF_COLUMNS + i , m_textram->read_byte ( j * EF9364_NB_OF_COLUMNS + i ) ); + } + } + // Erase last line + for( i = 0 ; i < EF9364_NB_OF_COLUMNS ; i++ ) + { + m_textram->write_byte ( ( EF9364_NB_OF_ROWS - 1 ) * EF9364_NB_OF_COLUMNS + i , 0x7F ); + } + + y_curs_pos = EF9364_NB_OF_ROWS - 1; + } + } + break; + + } +} + +void ef9364_device::char_latch_w(UINT8 data) +{ + char_latch = data; +} diff --git a/src/devices/video/ef9364.h b/src/devices/video/ef9364.h new file mode 100644 index 00000000000..1519d817196 --- /dev/null +++ b/src/devices/video/ef9364.h @@ -0,0 +1,104 @@ +// license:BSD-3-Clause +// copyright-holders:Jean-Francois DEL NERO +/********************************************************************* + + ef9364.h + + Thomson EF9364 video controller + +*********************************************************************/ + +#pragma once + +#ifndef __EF9364_H__ +#define __EF9364_H__ + +#define EF9364_NB_OF_COLUMNS 64 +#define EF9364_NB_OF_ROWS 16 + +#define EF9364_TXTPLANE_MAX_SIZE ( EF9364_NB_OF_COLUMNS * EF9364_NB_OF_ROWS ) +#define EF9364_MAX_TXTPLANES 2 + +#define MCFG_EF9364_PALETTE(_palette_tag) \ + ef9364_device::static_set_palette_tag(*device, "^" _palette_tag); + +#define MCFG_EF9364_PAGES_CNT(_pages_number) \ + ef9364_device::static_set_nb_of_pages(*device,_pages_number); + +#define MCFG_EF9364_IRQ_HANDLER(_devcb) \ + devcb = &ef9364_device::set_irq_handler(*device, DEVCB_##_devcb); + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> ef9364_device + +class ef9364_device : public device_t, + public device_memory_interface, + public device_video_interface +{ +public: + // construction/destruction + ef9364_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // static configuration + static void static_set_palette_tag(device_t &device, const char *tag); + static void static_set_nb_of_pages(device_t &device, int nb_bitplanes ); + + // device interface + + void update_scanline(UINT16 scanline); + void set_color_entry( int index, UINT8 r, UINT8 g, UINT8 b ); + + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void char_latch_w(UINT8 data); + void command_w(UINT8 cmd); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + // device_config_memory_interface overrides + virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override; + + // address space configurations + const address_space_config m_space_config; + + // inline helper + +private: + void screen_scanning( int force_clear ); + void set_video_mode(void); + void draw_border(UINT16 line); + + // internal state + + memory_region *m_charset; + address_space *m_textram; + + UINT8 x_curs_pos; + UINT8 y_curs_pos; + UINT8 char_latch; + + UINT8 m_border[80]; //border color + + rgb_t palette[2]; + int nb_of_pages; + int bitplane_xres; + int bitplane_yres; + int vsync_scanline_pos; + int cursor_cnt; + int cursor_state; + + UINT32 clock_freq; + bitmap_rgb32 m_screen_out; + + required_device<palette_device> m_palette; +}; + +// device type definition +extern const device_type EF9364; + +#endif diff --git a/src/devices/video/ef9365.cpp b/src/devices/video/ef9365.cpp index f923cfd0813..5f81d7f45b5 100644 --- a/src/devices/video/ef9365.cpp +++ b/src/devices/video/ef9365.cpp @@ -938,7 +938,7 @@ void ef9365_device::screen_scanning( int force_clear ) void ef9365_device::ef9365_exec(UINT8 cmd) { int tmp_delta_x,tmp_delta_y; - int busy_cycles; + int busy_cycles = 0; m_state = 0; if( ( cmd>>4 ) == 0 ) diff --git a/src/devices/video/i82730.cpp b/src/devices/video/i82730.cpp index d344c7006ef..8cd78863df3 100644 --- a/src/devices/video/i82730.cpp +++ b/src/devices/video/i82730.cpp @@ -128,7 +128,7 @@ UINT16 i82730_device::read_word(offs_t address) { UINT16 data; - if (sysbus_16bit() && !(address & 1)) + if (sysbus_16bit() && WORD_ALIGNED(address)) { data = m_program->read_word(address); } @@ -148,7 +148,7 @@ void i82730_device::write_byte(offs_t address, UINT8 data) void i82730_device::write_word(offs_t address, UINT16 data) { - if (sysbus_16bit() && !(address & 1)) + if (sysbus_16bit() && WORD_ALIGNED(address)) { m_program->write_word(address, data); } diff --git a/src/devices/video/jangou_blitter.cpp b/src/devices/video/jangou_blitter.cpp new file mode 100644 index 00000000000..e2acdb37ca1 --- /dev/null +++ b/src/devices/video/jangou_blitter.cpp @@ -0,0 +1,194 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese +/*************************************************************************** + + Jangou Custom Blitter Chip, codename "???" (name scratched afaik) + + device emulation by Angelo Salese, from original jangou.cpp implementation + by Angelo Salese, David Haywood and Phil Bennett. + + TODO: + - BLTFLIP mechanism; + - clean-ups; + +***************************************************************************/ + +#include "emu.h" +#include "jangou_blitter.h" + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +const device_type JANGOU_BLITTER = &device_creator<jangou_blitter_device>; + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// jangou_blitter_device - constructor +//------------------------------------------------- + +jangou_blitter_device::jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, JANGOU_BLITTER, "Jangou Blitter Custom Chip", tag, owner, clock, "jangou_blitter", __FILE__) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void jangou_blitter_device::device_start() +{ + memory_region *devregion = machine().root_device().memregion("gfx"); + m_gfxrom = devregion->base(); + if (m_gfxrom == nullptr) + fatalerror("JANGOU_BLITTER: \"gfx\" memory base not found"); + m_gfxrommask = devregion->bytes()-1; + + save_item(NAME(m_pen_data)); + save_item(NAME(m_blit_data)); + save_item(NAME(m_blit_buffer)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void jangou_blitter_device::device_reset() +{ + memset(m_blit_data, 0, ARRAY_LENGTH(m_blit_data)); + memset(m_pen_data, 0, ARRAY_LENGTH(m_pen_data)); + m_bltflip = false; +} + + +//************************************************************************** +// READ/WRITE HANDLERS +//************************************************************************** + +// TODO: inline these +UINT8 jangou_blitter_device::gfx_nibble( UINT32 niboffset ) +{ + if (niboffset & 1) + return (m_gfxrom[(niboffset >> 1) & m_gfxrommask] & 0xf0) >> 4; + else + return (m_gfxrom[(niboffset >> 1) & m_gfxrommask] & 0x0f); +} + +void jangou_blitter_device::plot_gfx_pixel( UINT8 pix, int x, int y ) +{ + if (y < 0 || y >= 256) + return; + if (x < 0 || x >= 256) + return; + + if (x & 1) + m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0x0f) | ((pix << 4) & 0xf0); + else + m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0xf0) | (pix & 0x0f); +} + +WRITE8_MEMBER( jangou_blitter_device::process_w ) +{ + int src, x, y, h, w, flipx; + m_blit_data[offset] = data; + + if (offset == 5) + { + int count = 0; + int xcount, ycount; + + w = (m_blit_data[4] & 0xff) + 1; + h = (m_blit_data[5] & 0xff) + 1; + src = ((m_blit_data[1] << 8)|(m_blit_data[0] << 0)); + src |= (m_blit_data[6] & 3) << 16; + x = (m_blit_data[2] & 0xff); + y = (m_blit_data[3] & 0xff); + + #if 0 + if(m_bltflip == true) + { + printf("%02x %02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2],m_blit_data[3], m_blit_data[4], m_blit_data[5],m_blit_data[6]); + printf("=>"); + for(int i=0;i<0x10;i++) + printf("%02x ",m_pen_data[i]); + printf("\n"); + } + #endif + // lowest bit of src controls flipping / draw direction? + flipx = (m_blit_data[0] & 1); + + if (!flipx) + src += (w * h) - 1; + else + src -= (w * h) - 1; + + + for (ycount = 0; ycount < h; ycount++) + { + for(xcount = 0; xcount < w; xcount++) + { + int drawx = (x + xcount) & 0xff; + int drawy = (y + ycount) & 0xff; + UINT8 dat = gfx_nibble(src + count); + UINT8 cur_pen = m_pen_data[dat & 0x0f]; + + //dat = cur_pen_lo | (cur_pen_hi << 4); + + if ((cur_pen & 0xff) != 0) + plot_gfx_pixel(cur_pen, drawx, drawy); + + if (!flipx) + count--; + else + count++; + } + } + + //UINT32 new_src = src + count; + + // update source and height after blitter operation + // TODO: Jangou doesn't agree with this, later HW? + #if 0 + m_blit_data[0] = new_src & 0xfe; + m_blit_data[1] = new_src >> 8; + m_blit_data[5] = 0; + m_blit_data[6] = new_src >> 16; + #endif + m_bltflip = false; + } +} + +// Sexy Gal swaps around upper src address +WRITE8_MEMBER( jangou_blitter_device::alt_process_w ) +{ + const UINT8 translate_addr[7] = { 0, 1, 6, 2, 3, 4, 5 }; + + process_w(space,translate_addr[offset],data); +} + +WRITE8_MEMBER( jangou_blitter_device::vregs_w ) +{ + // bit 5 set by Jangou, left-over? + m_pen_data[offset] = data & 0x0f; +} + +WRITE8_MEMBER( jangou_blitter_device::bltflip_w ) +{ + // TODO: unsure about how this works, Charles says it swaps the nibble but afaik it's used for CPU tiles in Night Gal Summer/Sexy Gal and they seems fine? + // Maybe flipx is actually bltflip for later HW? + m_bltflip = true; +} + +READ_LINE_MEMBER( jangou_blitter_device::status_r ) +{ + return false; +} diff --git a/src/devices/video/jangou_blitter.h b/src/devices/video/jangou_blitter.h new file mode 100644 index 00000000000..7a39172e7ca --- /dev/null +++ b/src/devices/video/jangou_blitter.h @@ -0,0 +1,71 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese +/*************************************************************************** + +Template for skeleton device + +***************************************************************************/ + +#pragma once + +#ifndef __JANGOU_BLITTERDEV_H__ +#define __JANGOU_BLITTERDEV_H__ + + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_JANGOU_BLITTER_ADD(_tag,_freq) \ + MCFG_DEVICE_ADD(_tag, JANGOU_BLITTER, _freq) + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> jangou_blitter_device + +class jangou_blitter_device : public device_t +{ +public: + // construction/destruction + jangou_blitter_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // I/O operations + DECLARE_WRITE8_MEMBER( process_w ); + DECLARE_WRITE8_MEMBER( alt_process_w ); + DECLARE_WRITE8_MEMBER( vregs_w ); + DECLARE_WRITE8_MEMBER( bltflip_w ); + DECLARE_READ_LINE_MEMBER( status_r ); + + UINT8 m_blit_buffer[256 * 256]; + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + +private: + void plot_gfx_pixel( UINT8 pix, int x, int y ); + UINT8 gfx_nibble( UINT32 niboffset ); + UINT8 m_pen_data[0x10]; + UINT8 m_blit_data[7]; + UINT8 *m_gfxrom; + UINT32 m_gfxrommask; + bool m_bltflip; +}; + + +// device type definition +extern const device_type JANGOU_BLITTER; + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + + + +#endif diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp index 57813f574ab..04e7c967869 100644 --- a/src/devices/video/mc6845.cpp +++ b/src/devices/video/mc6845.cpp @@ -553,7 +553,8 @@ void mc6845_device::recompute_parameters(bool postload) m_hsync_off_pos = hsync_off_pos; m_vsync_on_pos = vsync_on_pos; m_vsync_off_pos = vsync_off_pos; - m_line_counter = 0; + if (!postload) // set m_line_counter to 0 on normal operation, but not on postload + m_line_counter = 0; } } diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp index 23548f1ecd7..32d4d2c3c63 100644 --- a/src/devices/video/upd7220.cpp +++ b/src/devices/video/upd7220.cpp @@ -71,7 +71,8 @@ enum COMMAND_LPRD, COMMAND_DMAR, COMMAND_DMAW, - COMMAND_5A + COMMAND_5A, + COMMAND_05 }; enum @@ -93,6 +94,7 @@ enum #define UPD7220_COMMAND_CCHAR 0x4b #define UPD7220_COMMAND_START 0x6b #define UPD7220_COMMAND_BCTRL 0x0c // & 0xfe +#define UPD7220_COMMAND_05 0x05 #define UPD7220_COMMAND_ZOOM 0x46 #define UPD7220_COMMAND_CURS 0x49 #define UPD7220_COMMAND_PRAM 0x70 // & 0xf0 @@ -1049,6 +1051,7 @@ int upd7220_device::translate_command(UINT8 data) case UPD7220_COMMAND_CURD: command = COMMAND_CURD; break; case UPD7220_COMMAND_LPRD: command = COMMAND_LPRD; break; case UPD7220_COMMAND_5A: command = COMMAND_5A; break; + case UPD7220_COMMAND_05: command = COMMAND_05; break; default: switch (data & 0xfe) { @@ -1226,6 +1229,10 @@ void upd7220_device::process_fifo() //LOG(("uPD7220 '%s' DE: 1\n", tag())); break; + case COMMAND_05: + m_de = 0; + break; + case COMMAND_BCTRL: /* display blanking control */ m_de = m_cr & 0x01; diff --git a/src/devices/video/vooddefs.h b/src/devices/video/vooddefs.h index e394946d445..5bef9d4cc8e 100644 --- a/src/devices/video/vooddefs.h +++ b/src/devices/video/vooddefs.h @@ -9,1349 +9,6 @@ ***************************************************************************/ -/************************************* - * - * Misc. constants - * - *************************************/ - -/* enumeration describing reasons we might be stalled */ -enum -{ - NOT_STALLED = 0, - STALLED_UNTIL_FIFO_LWM, - STALLED_UNTIL_FIFO_EMPTY -}; - - - -// Use old table lookup versus straight double divide -#define USE_FAST_RECIP 0 - -/* maximum number of TMUs */ -#define MAX_TMU 2 - -/* accumulate operations less than this number of clocks */ -#define ACCUMULATE_THRESHOLD 0 - -/* number of clocks to set up a triangle (just a guess) */ -#define TRIANGLE_SETUP_CLOCKS 100 - -/* maximum number of rasterizers */ -#define MAX_RASTERIZERS 1024 - -/* size of the rasterizer hash table */ -#define RASTER_HASH_SIZE 97 - -/* flags for LFB writes */ -#define LFB_RGB_PRESENT 1 -#define LFB_ALPHA_PRESENT 2 -#define LFB_DEPTH_PRESENT 4 -#define LFB_DEPTH_PRESENT_MSW 8 - -/* flags for the register access array */ -#define REGISTER_READ 0x01 /* reads are allowed */ -#define REGISTER_WRITE 0x02 /* writes are allowed */ -#define REGISTER_PIPELINED 0x04 /* writes are pipelined */ -#define REGISTER_FIFO 0x08 /* writes go to FIFO */ -#define REGISTER_WRITETHRU 0x10 /* writes are valid even for CMDFIFO */ - -/* shorter combinations to make the table smaller */ -#define REG_R (REGISTER_READ) -#define REG_W (REGISTER_WRITE) -#define REG_WT (REGISTER_WRITE | REGISTER_WRITETHRU) -#define REG_RW (REGISTER_READ | REGISTER_WRITE) -#define REG_RWT (REGISTER_READ | REGISTER_WRITE | REGISTER_WRITETHRU) -#define REG_RP (REGISTER_READ | REGISTER_PIPELINED) -#define REG_WP (REGISTER_WRITE | REGISTER_PIPELINED) -#define REG_RWP (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED) -#define REG_RWPT (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_WRITETHRU) -#define REG_RF (REGISTER_READ | REGISTER_FIFO) -#define REG_WF (REGISTER_WRITE | REGISTER_FIFO) -#define REG_RWF (REGISTER_READ | REGISTER_WRITE | REGISTER_FIFO) -#define REG_RPF (REGISTER_READ | REGISTER_PIPELINED | REGISTER_FIFO) -#define REG_WPF (REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_FIFO) -#define REG_RWPF (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_FIFO) - -/* lookup bits is the log2 of the size of the reciprocal/log table */ -#define RECIPLOG_LOOKUP_BITS 9 - -/* input precision is how many fraction bits the input value has; this is a 64-bit number */ -#define RECIPLOG_INPUT_PREC 32 - -/* lookup precision is how many fraction bits each table entry contains */ -#define RECIPLOG_LOOKUP_PREC 22 - -/* output precision is how many fraction bits the result should have */ -#define RECIP_OUTPUT_PREC 15 -#define LOG_OUTPUT_PREC 8 - - - -/************************************* - * - * Register constants - * - *************************************/ - -/* Codes to the right: - R = readable - W = writeable - P = pipelined - F = goes to FIFO -*/ - -/* 0x000 */ -#define status (0x000/4) /* R P */ -#define intrCtrl (0x004/4) /* RW P -- Voodoo2/Banshee only */ -#define vertexAx (0x008/4) /* W PF */ -#define vertexAy (0x00c/4) /* W PF */ -#define vertexBx (0x010/4) /* W PF */ -#define vertexBy (0x014/4) /* W PF */ -#define vertexCx (0x018/4) /* W PF */ -#define vertexCy (0x01c/4) /* W PF */ -#define startR (0x020/4) /* W PF */ -#define startG (0x024/4) /* W PF */ -#define startB (0x028/4) /* W PF */ -#define startZ (0x02c/4) /* W PF */ -#define startA (0x030/4) /* W PF */ -#define startS (0x034/4) /* W PF */ -#define startT (0x038/4) /* W PF */ -#define startW (0x03c/4) /* W PF */ - -/* 0x040 */ -#define dRdX (0x040/4) /* W PF */ -#define dGdX (0x044/4) /* W PF */ -#define dBdX (0x048/4) /* W PF */ -#define dZdX (0x04c/4) /* W PF */ -#define dAdX (0x050/4) /* W PF */ -#define dSdX (0x054/4) /* W PF */ -#define dTdX (0x058/4) /* W PF */ -#define dWdX (0x05c/4) /* W PF */ -#define dRdY (0x060/4) /* W PF */ -#define dGdY (0x064/4) /* W PF */ -#define dBdY (0x068/4) /* W PF */ -#define dZdY (0x06c/4) /* W PF */ -#define dAdY (0x070/4) /* W PF */ -#define dSdY (0x074/4) /* W PF */ -#define dTdY (0x078/4) /* W PF */ -#define dWdY (0x07c/4) /* W PF */ - -/* 0x080 */ -#define triangleCMD (0x080/4) /* W PF */ -#define fvertexAx (0x088/4) /* W PF */ -#define fvertexAy (0x08c/4) /* W PF */ -#define fvertexBx (0x090/4) /* W PF */ -#define fvertexBy (0x094/4) /* W PF */ -#define fvertexCx (0x098/4) /* W PF */ -#define fvertexCy (0x09c/4) /* W PF */ -#define fstartR (0x0a0/4) /* W PF */ -#define fstartG (0x0a4/4) /* W PF */ -#define fstartB (0x0a8/4) /* W PF */ -#define fstartZ (0x0ac/4) /* W PF */ -#define fstartA (0x0b0/4) /* W PF */ -#define fstartS (0x0b4/4) /* W PF */ -#define fstartT (0x0b8/4) /* W PF */ -#define fstartW (0x0bc/4) /* W PF */ - -/* 0x0c0 */ -#define fdRdX (0x0c0/4) /* W PF */ -#define fdGdX (0x0c4/4) /* W PF */ -#define fdBdX (0x0c8/4) /* W PF */ -#define fdZdX (0x0cc/4) /* W PF */ -#define fdAdX (0x0d0/4) /* W PF */ -#define fdSdX (0x0d4/4) /* W PF */ -#define fdTdX (0x0d8/4) /* W PF */ -#define fdWdX (0x0dc/4) /* W PF */ -#define fdRdY (0x0e0/4) /* W PF */ -#define fdGdY (0x0e4/4) /* W PF */ -#define fdBdY (0x0e8/4) /* W PF */ -#define fdZdY (0x0ec/4) /* W PF */ -#define fdAdY (0x0f0/4) /* W PF */ -#define fdSdY (0x0f4/4) /* W PF */ -#define fdTdY (0x0f8/4) /* W PF */ -#define fdWdY (0x0fc/4) /* W PF */ - -/* 0x100 */ -#define ftriangleCMD (0x100/4) /* W PF */ -#define fbzColorPath (0x104/4) /* RW PF */ -#define fogMode (0x108/4) /* RW PF */ -#define alphaMode (0x10c/4) /* RW PF */ -#define fbzMode (0x110/4) /* RW F */ -#define lfbMode (0x114/4) /* RW F */ -#define clipLeftRight (0x118/4) /* RW F */ -#define clipLowYHighY (0x11c/4) /* RW F */ -#define nopCMD (0x120/4) /* W F */ -#define fastfillCMD (0x124/4) /* W F */ -#define swapbufferCMD (0x128/4) /* W F */ -#define fogColor (0x12c/4) /* W F */ -#define zaColor (0x130/4) /* W F */ -#define chromaKey (0x134/4) /* W F */ -#define chromaRange (0x138/4) /* W F -- Voodoo2/Banshee only */ -#define userIntrCMD (0x13c/4) /* W F -- Voodoo2/Banshee only */ - -/* 0x140 */ -#define stipple (0x140/4) /* RW F */ -#define color0 (0x144/4) /* RW F */ -#define color1 (0x148/4) /* RW F */ -#define fbiPixelsIn (0x14c/4) /* R */ -#define fbiChromaFail (0x150/4) /* R */ -#define fbiZfuncFail (0x154/4) /* R */ -#define fbiAfuncFail (0x158/4) /* R */ -#define fbiPixelsOut (0x15c/4) /* R */ -#define fogTable (0x160/4) /* W F */ - -/* 0x1c0 */ -#define cmdFifoBaseAddr (0x1e0/4) /* RW -- Voodoo2 only */ -#define cmdFifoBump (0x1e4/4) /* RW -- Voodoo2 only */ -#define cmdFifoRdPtr (0x1e8/4) /* RW -- Voodoo2 only */ -#define cmdFifoAMin (0x1ec/4) /* RW -- Voodoo2 only */ -#define colBufferAddr (0x1ec/4) /* RW -- Banshee only */ -#define cmdFifoAMax (0x1f0/4) /* RW -- Voodoo2 only */ -#define colBufferStride (0x1f0/4) /* RW -- Banshee only */ -#define cmdFifoDepth (0x1f4/4) /* RW -- Voodoo2 only */ -#define auxBufferAddr (0x1f4/4) /* RW -- Banshee only */ -#define cmdFifoHoles (0x1f8/4) /* RW -- Voodoo2 only */ -#define auxBufferStride (0x1f8/4) /* RW -- Banshee only */ - -/* 0x200 */ -#define fbiInit4 (0x200/4) /* RW -- Voodoo/Voodoo2 only */ -#define clipLeftRight1 (0x200/4) /* RW -- Banshee only */ -#define vRetrace (0x204/4) /* R -- Voodoo/Voodoo2 only */ -#define clipTopBottom1 (0x204/4) /* RW -- Banshee only */ -#define backPorch (0x208/4) /* RW -- Voodoo/Voodoo2 only */ -#define videoDimensions (0x20c/4) /* RW -- Voodoo/Voodoo2 only */ -#define fbiInit0 (0x210/4) /* RW -- Voodoo/Voodoo2 only */ -#define fbiInit1 (0x214/4) /* RW -- Voodoo/Voodoo2 only */ -#define fbiInit2 (0x218/4) /* RW -- Voodoo/Voodoo2 only */ -#define fbiInit3 (0x21c/4) /* RW -- Voodoo/Voodoo2 only */ -#define hSync (0x220/4) /* W -- Voodoo/Voodoo2 only */ -#define vSync (0x224/4) /* W -- Voodoo/Voodoo2 only */ -#define clutData (0x228/4) /* W F -- Voodoo/Voodoo2 only */ -#define dacData (0x22c/4) /* W -- Voodoo/Voodoo2 only */ -#define maxRgbDelta (0x230/4) /* W -- Voodoo/Voodoo2 only */ -#define hBorder (0x234/4) /* W -- Voodoo2 only */ -#define vBorder (0x238/4) /* W -- Voodoo2 only */ -#define borderColor (0x23c/4) /* W -- Voodoo2 only */ - -/* 0x240 */ -#define hvRetrace (0x240/4) /* R -- Voodoo2 only */ -#define fbiInit5 (0x244/4) /* RW -- Voodoo2 only */ -#define fbiInit6 (0x248/4) /* RW -- Voodoo2 only */ -#define fbiInit7 (0x24c/4) /* RW -- Voodoo2 only */ -#define swapPending (0x24c/4) /* W -- Banshee only */ -#define leftOverlayBuf (0x250/4) /* W -- Banshee only */ -#define rightOverlayBuf (0x254/4) /* W -- Banshee only */ -#define fbiSwapHistory (0x258/4) /* R -- Voodoo2/Banshee only */ -#define fbiTrianglesOut (0x25c/4) /* R -- Voodoo2/Banshee only */ -#define sSetupMode (0x260/4) /* W PF -- Voodoo2/Banshee only */ -#define sVx (0x264/4) /* W PF -- Voodoo2/Banshee only */ -#define sVy (0x268/4) /* W PF -- Voodoo2/Banshee only */ -#define sARGB (0x26c/4) /* W PF -- Voodoo2/Banshee only */ -#define sRed (0x270/4) /* W PF -- Voodoo2/Banshee only */ -#define sGreen (0x274/4) /* W PF -- Voodoo2/Banshee only */ -#define sBlue (0x278/4) /* W PF -- Voodoo2/Banshee only */ -#define sAlpha (0x27c/4) /* W PF -- Voodoo2/Banshee only */ - -/* 0x280 */ -#define sVz (0x280/4) /* W PF -- Voodoo2/Banshee only */ -#define sWb (0x284/4) /* W PF -- Voodoo2/Banshee only */ -#define sWtmu0 (0x288/4) /* W PF -- Voodoo2/Banshee only */ -#define sS_W0 (0x28c/4) /* W PF -- Voodoo2/Banshee only */ -#define sT_W0 (0x290/4) /* W PF -- Voodoo2/Banshee only */ -#define sWtmu1 (0x294/4) /* W PF -- Voodoo2/Banshee only */ -#define sS_Wtmu1 (0x298/4) /* W PF -- Voodoo2/Banshee only */ -#define sT_Wtmu1 (0x29c/4) /* W PF -- Voodoo2/Banshee only */ -#define sDrawTriCMD (0x2a0/4) /* W PF -- Voodoo2/Banshee only */ -#define sBeginTriCMD (0x2a4/4) /* W PF -- Voodoo2/Banshee only */ - -/* 0x2c0 */ -#define bltSrcBaseAddr (0x2c0/4) /* RW PF -- Voodoo2 only */ -#define bltDstBaseAddr (0x2c4/4) /* RW PF -- Voodoo2 only */ -#define bltXYStrides (0x2c8/4) /* RW PF -- Voodoo2 only */ -#define bltSrcChromaRange (0x2cc/4) /* RW PF -- Voodoo2 only */ -#define bltDstChromaRange (0x2d0/4) /* RW PF -- Voodoo2 only */ -#define bltClipX (0x2d4/4) /* RW PF -- Voodoo2 only */ -#define bltClipY (0x2d8/4) /* RW PF -- Voodoo2 only */ -#define bltSrcXY (0x2e0/4) /* RW PF -- Voodoo2 only */ -#define bltDstXY (0x2e4/4) /* RW PF -- Voodoo2 only */ -#define bltSize (0x2e8/4) /* RW PF -- Voodoo2 only */ -#define bltRop (0x2ec/4) /* RW PF -- Voodoo2 only */ -#define bltColor (0x2f0/4) /* RW PF -- Voodoo2 only */ -#define bltCommand (0x2f8/4) /* RW PF -- Voodoo2 only */ -#define bltData (0x2fc/4) /* W PF -- Voodoo2 only */ - -/* 0x300 */ -#define textureMode (0x300/4) /* W PF */ -#define tLOD (0x304/4) /* W PF */ -#define tDetail (0x308/4) /* W PF */ -#define texBaseAddr (0x30c/4) /* W PF */ -#define texBaseAddr_1 (0x310/4) /* W PF */ -#define texBaseAddr_2 (0x314/4) /* W PF */ -#define texBaseAddr_3_8 (0x318/4) /* W PF */ -#define trexInit0 (0x31c/4) /* W F -- Voodoo/Voodoo2 only */ -#define trexInit1 (0x320/4) /* W F */ -#define nccTable (0x324/4) /* W F */ - - - -// 2D registers -#define banshee2D_clip0Min (0x008/4) -#define banshee2D_clip0Max (0x00c/4) -#define banshee2D_dstBaseAddr (0x010/4) -#define banshee2D_dstFormat (0x014/4) -#define banshee2D_srcColorkeyMin (0x018/4) -#define banshee2D_srcColorkeyMax (0x01c/4) -#define banshee2D_dstColorkeyMin (0x020/4) -#define banshee2D_dstColorkeyMax (0x024/4) -#define banshee2D_bresError0 (0x028/4) -#define banshee2D_bresError1 (0x02c/4) -#define banshee2D_rop (0x030/4) -#define banshee2D_srcBaseAddr (0x034/4) -#define banshee2D_commandExtra (0x038/4) -#define banshee2D_lineStipple (0x03c/4) -#define banshee2D_lineStyle (0x040/4) -#define banshee2D_pattern0Alias (0x044/4) -#define banshee2D_pattern1Alias (0x048/4) -#define banshee2D_clip1Min (0x04c/4) -#define banshee2D_clip1Max (0x050/4) -#define banshee2D_srcFormat (0x054/4) -#define banshee2D_srcSize (0x058/4) -#define banshee2D_srcXY (0x05c/4) -#define banshee2D_colorBack (0x060/4) -#define banshee2D_colorFore (0x064/4) -#define banshee2D_dstSize (0x068/4) -#define banshee2D_dstXY (0x06c/4) -#define banshee2D_command (0x070/4) - - -/************************************* - * - * Alias map of the first 64 - * registers when remapped - * - *************************************/ - -static const UINT8 register_alias_map[0x40] = -{ - status, 0x004/4, vertexAx, vertexAy, - vertexBx, vertexBy, vertexCx, vertexCy, - startR, dRdX, dRdY, startG, - dGdX, dGdY, startB, dBdX, - dBdY, startZ, dZdX, dZdY, - startA, dAdX, dAdY, startS, - dSdX, dSdY, startT, dTdX, - dTdY, startW, dWdX, dWdY, - - triangleCMD,0x084/4, fvertexAx, fvertexAy, - fvertexBx, fvertexBy, fvertexCx, fvertexCy, - fstartR, fdRdX, fdRdY, fstartG, - fdGdX, fdGdY, fstartB, fdBdX, - fdBdY, fstartZ, fdZdX, fdZdY, - fstartA, fdAdX, fdAdY, fstartS, - fdSdX, fdSdY, fstartT, fdTdX, - fdTdY, fstartW, fdWdX, fdWdY -}; - - - -/************************************* - * - * Table of per-register access rights - * - *************************************/ - -static const UINT8 voodoo_register_access[0x100] = -{ - /* 0x000 */ - REG_RP, 0, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x040 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x080 */ - REG_WPF, 0, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x0c0 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x100 */ - REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF, - REG_RWF, REG_RWF, REG_RWF, REG_RWF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, 0, 0, - - /* 0x140 */ - REG_RWF, REG_RWF, REG_RWF, REG_R, - REG_R, REG_R, REG_R, REG_R, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x180 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x1c0 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - 0, 0, 0, 0, - 0, 0, 0, 0, - - /* 0x200 */ - REG_RW, REG_R, REG_RW, REG_RW, - REG_RW, REG_RW, REG_RW, REG_RW, - REG_W, REG_W, REG_W, REG_W, - REG_W, 0, 0, 0, - - /* 0x240 */ - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - - /* 0x280 */ - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - - /* 0x2c0 */ - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - - /* 0x300 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x340 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x380 */ - REG_WF -}; - - -static const UINT8 voodoo2_register_access[0x100] = -{ - /* 0x000 */ - REG_RP, REG_RWPT, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x040 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x080 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x0c0 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x100 */ - REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF, - REG_RWF, REG_RWF, REG_RWF, REG_RWF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x140 */ - REG_RWF, REG_RWF, REG_RWF, REG_R, - REG_R, REG_R, REG_R, REG_R, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x180 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x1c0 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_RWT, REG_RWT, REG_RWT, REG_RWT, - REG_RWT, REG_RWT, REG_RWT, REG_RW, - - /* 0x200 */ - REG_RWT, REG_R, REG_RWT, REG_RWT, - REG_RWT, REG_RWT, REG_RWT, REG_RWT, - REG_WT, REG_WT, REG_WF, REG_WT, - REG_WT, REG_WT, REG_WT, REG_WT, - - /* 0x240 */ - REG_R, REG_RWT, REG_RWT, REG_RWT, - 0, 0, REG_R, REG_R, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x280 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, 0, 0, - 0, 0, 0, 0, - - /* 0x2c0 */ - REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF, - REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF, - REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF, - REG_RWPF, REG_RWPF, REG_RWPF, REG_WPF, - - /* 0x300 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x340 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x380 */ - REG_WF -}; - - -static const UINT8 banshee_register_access[0x100] = -{ - /* 0x000 */ - REG_RP, REG_RWPT, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x040 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x080 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x0c0 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x100 */ - REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF, - REG_RWF, REG_RWF, REG_RWF, REG_RWF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x140 */ - REG_RWF, REG_RWF, REG_RWF, REG_R, - REG_R, REG_R, REG_R, REG_R, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x180 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x1c0 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - 0, 0, 0, REG_RWF, - REG_RWF, REG_RWF, REG_RWF, 0, - - /* 0x200 */ - REG_RWF, REG_RWF, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - - /* 0x240 */ - 0, 0, 0, REG_WT, - REG_RWF, REG_RWF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_R, REG_R, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - - /* 0x280 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, 0, 0, - 0, 0, 0, 0, - - /* 0x2c0 */ - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - - /* 0x300 */ - REG_WPF, REG_WPF, REG_WPF, REG_WPF, - REG_WPF, REG_WPF, REG_WPF, 0, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x340 */ - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - REG_WF, REG_WF, REG_WF, REG_WF, - - /* 0x380 */ - REG_WF -}; - - - -/************************************* - * - * Register string table for debug - * - *************************************/ - -static const char *const voodoo_reg_name[] = -{ - /* 0x000 */ - "status", "{intrCtrl}", "vertexAx", "vertexAy", - "vertexBx", "vertexBy", "vertexCx", "vertexCy", - "startR", "startG", "startB", "startZ", - "startA", "startS", "startT", "startW", - /* 0x040 */ - "dRdX", "dGdX", "dBdX", "dZdX", - "dAdX", "dSdX", "dTdX", "dWdX", - "dRdY", "dGdY", "dBdY", "dZdY", - "dAdY", "dSdY", "dTdY", "dWdY", - /* 0x080 */ - "triangleCMD", "reserved084", "fvertexAx", "fvertexAy", - "fvertexBx", "fvertexBy", "fvertexCx", "fvertexCy", - "fstartR", "fstartG", "fstartB", "fstartZ", - "fstartA", "fstartS", "fstartT", "fstartW", - /* 0x0c0 */ - "fdRdX", "fdGdX", "fdBdX", "fdZdX", - "fdAdX", "fdSdX", "fdTdX", "fdWdX", - "fdRdY", "fdGdY", "fdBdY", "fdZdY", - "fdAdY", "fdSdY", "fdTdY", "fdWdY", - /* 0x100 */ - "ftriangleCMD", "fbzColorPath", "fogMode", "alphaMode", - "fbzMode", "lfbMode", "clipLeftRight","clipLowYHighY", - "nopCMD", "fastfillCMD", "swapbufferCMD","fogColor", - "zaColor", "chromaKey", "{chromaRange}","{userIntrCMD}", - /* 0x140 */ - "stipple", "color0", "color1", "fbiPixelsIn", - "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut", - "fogTable160", "fogTable164", "fogTable168", "fogTable16c", - "fogTable170", "fogTable174", "fogTable178", "fogTable17c", - /* 0x180 */ - "fogTable180", "fogTable184", "fogTable188", "fogTable18c", - "fogTable190", "fogTable194", "fogTable198", "fogTable19c", - "fogTable1a0", "fogTable1a4", "fogTable1a8", "fogTable1ac", - "fogTable1b0", "fogTable1b4", "fogTable1b8", "fogTable1bc", - /* 0x1c0 */ - "fogTable1c0", "fogTable1c4", "fogTable1c8", "fogTable1cc", - "fogTable1d0", "fogTable1d4", "fogTable1d8", "fogTable1dc", - "{cmdFifoBaseAddr}","{cmdFifoBump}","{cmdFifoRdPtr}","{cmdFifoAMin}", - "{cmdFifoAMax}","{cmdFifoDepth}","{cmdFifoHoles}","reserved1fc", - /* 0x200 */ - "fbiInit4", "vRetrace", "backPorch", "videoDimensions", - "fbiInit0", "fbiInit1", "fbiInit2", "fbiInit3", - "hSync", "vSync", "clutData", "dacData", - "maxRgbDelta", "{hBorder}", "{vBorder}", "{borderColor}", - /* 0x240 */ - "{hvRetrace}", "{fbiInit5}", "{fbiInit6}", "{fbiInit7}", - "reserved250", "reserved254", "{fbiSwapHistory}","{fbiTrianglesOut}", - "{sSetupMode}", "{sVx}", "{sVy}", "{sARGB}", - "{sRed}", "{sGreen}", "{sBlue}", "{sAlpha}", - /* 0x280 */ - "{sVz}", "{sWb}", "{sWtmu0}", "{sS/Wtmu0}", - "{sT/Wtmu0}", "{sWtmu1}", "{sS/Wtmu1}", "{sT/Wtmu1}", - "{sDrawTriCMD}","{sBeginTriCMD}","reserved2a8", "reserved2ac", - "reserved2b0", "reserved2b4", "reserved2b8", "reserved2bc", - /* 0x2c0 */ - "{bltSrcBaseAddr}","{bltDstBaseAddr}","{bltXYStrides}","{bltSrcChromaRange}", - "{bltDstChromaRange}","{bltClipX}","{bltClipY}","reserved2dc", - "{bltSrcXY}", "{bltDstXY}", "{bltSize}", "{bltRop}", - "{bltColor}", "reserved2f4", "{bltCommand}", "{bltData}", - /* 0x300 */ - "textureMode", "tLOD", "tDetail", "texBaseAddr", - "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","trexInit0", - "trexInit1", "nccTable0.0", "nccTable0.1", "nccTable0.2", - "nccTable0.3", "nccTable0.4", "nccTable0.5", "nccTable0.6", - /* 0x340 */ - "nccTable0.7", "nccTable0.8", "nccTable0.9", "nccTable0.A", - "nccTable0.B", "nccTable1.0", "nccTable1.1", "nccTable1.2", - "nccTable1.3", "nccTable1.4", "nccTable1.5", "nccTable1.6", - "nccTable1.7", "nccTable1.8", "nccTable1.9", "nccTable1.A", - /* 0x380 */ - "nccTable1.B" -}; - - -static const char *const banshee_reg_name[] = -{ - /* 0x000 */ - "status", "intrCtrl", "vertexAx", "vertexAy", - "vertexBx", "vertexBy", "vertexCx", "vertexCy", - "startR", "startG", "startB", "startZ", - "startA", "startS", "startT", "startW", - /* 0x040 */ - "dRdX", "dGdX", "dBdX", "dZdX", - "dAdX", "dSdX", "dTdX", "dWdX", - "dRdY", "dGdY", "dBdY", "dZdY", - "dAdY", "dSdY", "dTdY", "dWdY", - /* 0x080 */ - "triangleCMD", "reserved084", "fvertexAx", "fvertexAy", - "fvertexBx", "fvertexBy", "fvertexCx", "fvertexCy", - "fstartR", "fstartG", "fstartB", "fstartZ", - "fstartA", "fstartS", "fstartT", "fstartW", - /* 0x0c0 */ - "fdRdX", "fdGdX", "fdBdX", "fdZdX", - "fdAdX", "fdSdX", "fdTdX", "fdWdX", - "fdRdY", "fdGdY", "fdBdY", "fdZdY", - "fdAdY", "fdSdY", "fdTdY", "fdWdY", - /* 0x100 */ - "ftriangleCMD", "fbzColorPath", "fogMode", "alphaMode", - "fbzMode", "lfbMode", "clipLeftRight","clipLowYHighY", - "nopCMD", "fastfillCMD", "swapbufferCMD","fogColor", - "zaColor", "chromaKey", "chromaRange", "userIntrCMD", - /* 0x140 */ - "stipple", "color0", "color1", "fbiPixelsIn", - "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut", - "fogTable160", "fogTable164", "fogTable168", "fogTable16c", - "fogTable170", "fogTable174", "fogTable178", "fogTable17c", - /* 0x180 */ - "fogTable180", "fogTable184", "fogTable188", "fogTable18c", - "fogTable190", "fogTable194", "fogTable198", "fogTable19c", - "fogTable1a0", "fogTable1a4", "fogTable1a8", "fogTable1ac", - "fogTable1b0", "fogTable1b4", "fogTable1b8", "fogTable1bc", - /* 0x1c0 */ - "fogTable1c0", "fogTable1c4", "fogTable1c8", "fogTable1cc", - "fogTable1d0", "fogTable1d4", "fogTable1d8", "fogTable1dc", - "reserved1e0", "reserved1e4", "reserved1e8", "colBufferAddr", - "colBufferStride","auxBufferAddr","auxBufferStride","reserved1fc", - /* 0x200 */ - "clipLeftRight1","clipTopBottom1","reserved208","reserved20c", - "reserved210", "reserved214", "reserved218", "reserved21c", - "reserved220", "reserved224", "reserved228", "reserved22c", - "reserved230", "reserved234", "reserved238", "reserved23c", - /* 0x240 */ - "reserved240", "reserved244", "reserved248", "swapPending", - "leftOverlayBuf","rightOverlayBuf","fbiSwapHistory","fbiTrianglesOut", - "sSetupMode", "sVx", "sVy", "sARGB", - "sRed", "sGreen", "sBlue", "sAlpha", - /* 0x280 */ - "sVz", "sWb", "sWtmu0", "sS/Wtmu0", - "sT/Wtmu0", "sWtmu1", "sS/Wtmu1", "sT/Wtmu1", - "sDrawTriCMD", "sBeginTriCMD", "reserved2a8", "reserved2ac", - "reserved2b0", "reserved2b4", "reserved2b8", "reserved2bc", - /* 0x2c0 */ - "reserved2c0", "reserved2c4", "reserved2c8", "reserved2cc", - "reserved2d0", "reserved2d4", "reserved2d8", "reserved2dc", - "reserved2e0", "reserved2e4", "reserved2e8", "reserved2ec", - "reserved2f0", "reserved2f4", "reserved2f8", "reserved2fc", - /* 0x300 */ - "textureMode", "tLOD", "tDetail", "texBaseAddr", - "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","reserved31c", - "trexInit1", "nccTable0.0", "nccTable0.1", "nccTable0.2", - "nccTable0.3", "nccTable0.4", "nccTable0.5", "nccTable0.6", - /* 0x340 */ - "nccTable0.7", "nccTable0.8", "nccTable0.9", "nccTable0.A", - "nccTable0.B", "nccTable1.0", "nccTable1.1", "nccTable1.2", - "nccTable1.3", "nccTable1.4", "nccTable1.5", "nccTable1.6", - "nccTable1.7", "nccTable1.8", "nccTable1.9", "nccTable1.A", - /* 0x380 */ - "nccTable1.B" -}; - - - -/************************************* - * - * Voodoo Banshee I/O space registers - * - *************************************/ - -/* 0x000 */ -#define io_status (0x000/4) /* */ -#define io_pciInit0 (0x004/4) /* */ -#define io_sipMonitor (0x008/4) /* */ -#define io_lfbMemoryConfig (0x00c/4) /* */ -#define io_miscInit0 (0x010/4) /* */ -#define io_miscInit1 (0x014/4) /* */ -#define io_dramInit0 (0x018/4) /* */ -#define io_dramInit1 (0x01c/4) /* */ -#define io_agpInit (0x020/4) /* */ -#define io_tmuGbeInit (0x024/4) /* */ -#define io_vgaInit0 (0x028/4) /* */ -#define io_vgaInit1 (0x02c/4) /* */ -#define io_dramCommand (0x030/4) /* */ -#define io_dramData (0x034/4) /* */ - -/* 0x040 */ -#define io_pllCtrl0 (0x040/4) /* */ -#define io_pllCtrl1 (0x044/4) /* */ -#define io_pllCtrl2 (0x048/4) /* */ -#define io_dacMode (0x04c/4) /* */ -#define io_dacAddr (0x050/4) /* */ -#define io_dacData (0x054/4) /* */ -#define io_rgbMaxDelta (0x058/4) /* */ -#define io_vidProcCfg (0x05c/4) /* */ -#define io_hwCurPatAddr (0x060/4) /* */ -#define io_hwCurLoc (0x064/4) /* */ -#define io_hwCurC0 (0x068/4) /* */ -#define io_hwCurC1 (0x06c/4) /* */ -#define io_vidInFormat (0x070/4) /* */ -#define io_vidInStatus (0x074/4) /* */ -#define io_vidSerialParallelPort (0x078/4) /* */ -#define io_vidInXDecimDeltas (0x07c/4) /* */ - -/* 0x080 */ -#define io_vidInDecimInitErrs (0x080/4) /* */ -#define io_vidInYDecimDeltas (0x084/4) /* */ -#define io_vidPixelBufThold (0x088/4) /* */ -#define io_vidChromaMin (0x08c/4) /* */ -#define io_vidChromaMax (0x090/4) /* */ -#define io_vidCurrentLine (0x094/4) /* */ -#define io_vidScreenSize (0x098/4) /* */ -#define io_vidOverlayStartCoords (0x09c/4) /* */ -#define io_vidOverlayEndScreenCoord (0x0a0/4) /* */ -#define io_vidOverlayDudx (0x0a4/4) /* */ -#define io_vidOverlayDudxOffsetSrcWidth (0x0a8/4) /* */ -#define io_vidOverlayDvdy (0x0ac/4) /* */ -#define io_vgab0 (0x0b0/4) /* */ -#define io_vgab4 (0x0b4/4) /* */ -#define io_vgab8 (0x0b8/4) /* */ -#define io_vgabc (0x0bc/4) /* */ - -/* 0x0c0 */ -#define io_vgac0 (0x0c0/4) /* */ -#define io_vgac4 (0x0c4/4) /* */ -#define io_vgac8 (0x0c8/4) /* */ -#define io_vgacc (0x0cc/4) /* */ -#define io_vgad0 (0x0d0/4) /* */ -#define io_vgad4 (0x0d4/4) /* */ -#define io_vgad8 (0x0d8/4) /* */ -#define io_vgadc (0x0dc/4) /* */ -#define io_vidOverlayDvdyOffset (0x0e0/4) /* */ -#define io_vidDesktopStartAddr (0x0e4/4) /* */ -#define io_vidDesktopOverlayStride (0x0e8/4) /* */ -#define io_vidInAddr0 (0x0ec/4) /* */ -#define io_vidInAddr1 (0x0f0/4) /* */ -#define io_vidInAddr2 (0x0f4/4) /* */ -#define io_vidInStride (0x0f8/4) /* */ -#define io_vidCurrOverlayStartAddr (0x0fc/4) /* */ - - - -/************************************* - * - * Register string table for debug - * - *************************************/ - -static const char *const banshee_io_reg_name[] = -{ - /* 0x000 */ - "status", "pciInit0", "sipMonitor", "lfbMemoryConfig", - "miscInit0", "miscInit1", "dramInit0", "dramInit1", - "agpInit", "tmuGbeInit", "vgaInit0", "vgaInit1", - "dramCommand", "dramData", "reserved38", "reserved3c", - - /* 0x040 */ - "pllCtrl0", "pllCtrl1", "pllCtrl2", "dacMode", - "dacAddr", "dacData", "rgbMaxDelta", "vidProcCfg", - "hwCurPatAddr", "hwCurLoc", "hwCurC0", "hwCurC1", - "vidInFormat", "vidInStatus", "vidSerialParallelPort","vidInXDecimDeltas", - - /* 0x080 */ - "vidInDecimInitErrs","vidInYDecimDeltas","vidPixelBufThold","vidChromaMin", - "vidChromaMax", "vidCurrentLine","vidScreenSize","vidOverlayStartCoords", - "vidOverlayEndScreenCoord","vidOverlayDudx","vidOverlayDudxOffsetSrcWidth","vidOverlayDvdy", - "vga[b0]", "vga[b4]", "vga[b8]", "vga[bc]", - - /* 0x0c0 */ - "vga[c0]", "vga[c4]", "vga[c8]", "vga[cc]", - "vga[d0]", "vga[d4]", "vga[d8]", "vga[dc]", - "vidOverlayDvdyOffset","vidDesktopStartAddr","vidDesktopOverlayStride","vidInAddr0", - "vidInAddr1", "vidInAddr2", "vidInStride", "vidCurrOverlayStartAddr" -}; - - - -/************************************* - * - * Voodoo Banshee AGP space registers - * - *************************************/ - -/* 0x000 */ -#define agpReqSize (0x000/4) /* */ -#define agpHostAddressLow (0x004/4) /* */ -#define agpHostAddressHigh (0x008/4) /* */ -#define agpGraphicsAddress (0x00c/4) /* */ -#define agpGraphicsStride (0x010/4) /* */ -#define agpMoveCMD (0x014/4) /* */ -#define cmdBaseAddr0 (0x020/4) /* */ -#define cmdBaseSize0 (0x024/4) /* */ -#define cmdBump0 (0x028/4) /* */ -#define cmdRdPtrL0 (0x02c/4) /* */ -#define cmdRdPtrH0 (0x030/4) /* */ -#define cmdAMin0 (0x034/4) /* */ -#define cmdAMax0 (0x03c/4) /* */ - -/* 0x040 */ -#define cmdFifoDepth0 (0x044/4) /* */ -#define cmdHoleCnt0 (0x048/4) /* */ -#define cmdBaseAddr1 (0x050/4) /* */ -#define cmdBaseSize1 (0x054/4) /* */ -#define cmdBump1 (0x058/4) /* */ -#define cmdRdPtrL1 (0x05c/4) /* */ -#define cmdRdPtrH1 (0x060/4) /* */ -#define cmdAMin1 (0x064/4) /* */ -#define cmdAMax1 (0x06c/4) /* */ -#define cmdFifoDepth1 (0x074/4) /* */ -#define cmdHoleCnt1 (0x078/4) /* */ - -/* 0x080 */ -#define cmdFifoThresh (0x080/4) /* */ -#define cmdHoleInt (0x084/4) /* */ - -/* 0x100 */ -#define yuvBaseAddress (0x100/4) /* */ -#define yuvStride (0x104/4) /* */ -#define crc1 (0x120/4) /* */ -#define crc2 (0x130/4) /* */ - - - -/************************************* - * - * Register string table for debug - * - *************************************/ - -static const char *const banshee_agp_reg_name[] = -{ - /* 0x000 */ - "agpReqSize", "agpHostAddressLow","agpHostAddressHigh","agpGraphicsAddress", - "agpGraphicsStride","agpMoveCMD","reserved18", "reserved1c", - "cmdBaseAddr0", "cmdBaseSize0", "cmdBump0", "cmdRdPtrL0", - "cmdRdPtrH0", "cmdAMin0", "reserved38", "cmdAMax0", - - /* 0x040 */ - "reserved40", "cmdFifoDepth0","cmdHoleCnt0", "reserved4c", - "cmdBaseAddr1", "cmdBaseSize1", "cmdBump1", "cmdRdPtrL1", - "cmdRdPtrH1", "cmdAMin1", "reserved68", "cmdAMax1", - "reserved70", "cmdFifoDepth1","cmdHoleCnt1", "reserved7c", - - /* 0x080 */ - "cmdFifoThresh","cmdHoleInt", "reserved88", "reserved8c", - "reserved90", "reserved94", "reserved98", "reserved9c", - "reserveda0", "reserveda4", "reserveda8", "reservedac", - "reservedb0", "reservedb4", "reservedb8", "reservedbc", - - /* 0x0c0 */ - "reservedc0", "reservedc4", "reservedc8", "reservedcc", - "reservedd0", "reservedd4", "reservedd8", "reserveddc", - "reservede0", "reservede4", "reservede8", "reservedec", - "reservedf0", "reservedf4", "reservedf8", "reservedfc", - - /* 0x100 */ - "yuvBaseAddress","yuvStride", "reserved108", "reserved10c", - "reserved110", "reserved114", "reserved118", "reserved11c", - "crc1", "reserved124", "reserved128", "reserved12c", - "crc2", "reserved134", "reserved138", "reserved13c" -}; - - - -/************************************* - * - * Dithering tables - * - *************************************/ - -static const UINT8 dither_matrix_4x4[16] = -{ - 0, 8, 2, 10, - 12, 4, 14, 6, - 3, 11, 1, 9, - 15, 7, 13, 5 -}; - -static const UINT8 dither_matrix_2x2[16] = -{ - 2, 10, 2, 10, - 14, 6, 14, 6, - 2, 10, 2, 10, - 14, 6, 14, 6 -}; - - - -/************************************* - * - * Macros for extracting pixels - * - *************************************/ - -#define EXTRACT_565_TO_888(val, a, b, c) \ - (a) = (((val) >> 8) & 0xf8) | (((val) >> 13) & 0x07); \ - (b) = (((val) >> 3) & 0xfc) | (((val) >> 9) & 0x03); \ - (c) = (((val) << 3) & 0xf8) | (((val) >> 2) & 0x07); -#define EXTRACT_x555_TO_888(val, a, b, c) \ - (a) = (((val) >> 7) & 0xf8) | (((val) >> 12) & 0x07); \ - (b) = (((val) >> 2) & 0xf8) | (((val) >> 7) & 0x07); \ - (c) = (((val) << 3) & 0xf8) | (((val) >> 2) & 0x07); -#define EXTRACT_555x_TO_888(val, a, b, c) \ - (a) = (((val) >> 8) & 0xf8) | (((val) >> 13) & 0x07); \ - (b) = (((val) >> 3) & 0xf8) | (((val) >> 8) & 0x07); \ - (c) = (((val) << 2) & 0xf8) | (((val) >> 3) & 0x07); -#define EXTRACT_1555_TO_8888(val, a, b, c, d) \ - (a) = ((INT16)(val) >> 15) & 0xff; \ - EXTRACT_x555_TO_888(val, b, c, d) -#define EXTRACT_5551_TO_8888(val, a, b, c, d) \ - EXTRACT_555x_TO_888(val, a, b, c) \ - (d) = ((val) & 0x0001) ? 0xff : 0x00; -#define EXTRACT_x888_TO_888(val, a, b, c) \ - (a) = ((val) >> 16) & 0xff; \ - (b) = ((val) >> 8) & 0xff; \ - (c) = ((val) >> 0) & 0xff; -#define EXTRACT_888x_TO_888(val, a, b, c) \ - (a) = ((val) >> 24) & 0xff; \ - (b) = ((val) >> 16) & 0xff; \ - (c) = ((val) >> 8) & 0xff; -#define EXTRACT_8888_TO_8888(val, a, b, c, d) \ - (a) = ((val) >> 24) & 0xff; \ - (b) = ((val) >> 16) & 0xff; \ - (c) = ((val) >> 8) & 0xff; \ - (d) = ((val) >> 0) & 0xff; -#define EXTRACT_4444_TO_8888(val, a, b, c, d) \ - (a) = (((val) >> 8) & 0xf0) | (((val) >> 12) & 0x0f); \ - (b) = (((val) >> 4) & 0xf0) | (((val) >> 8) & 0x0f); \ - (c) = (((val) >> 0) & 0xf0) | (((val) >> 4) & 0x0f); \ - (d) = (((val) << 4) & 0xf0) | (((val) >> 0) & 0x0f); -#define EXTRACT_332_TO_888(val, a, b, c) \ - (a) = (((val) >> 0) & 0xe0) | (((val) >> 3) & 0x1c) | (((val) >> 6) & 0x03); \ - (b) = (((val) << 3) & 0xe0) | (((val) >> 0) & 0x1c) | (((val) >> 3) & 0x03); \ - (c) = (((val) << 6) & 0xc0) | (((val) << 4) & 0x30) | (((val) << 2) & 0x0c) | (((val) << 0) & 0x03); - - -/************************************* - * - * Misc. macros - * - *************************************/ - -/* macro for clamping a value between minimum and maximum values */ -#define CLAMP(val,min,max) do { if ((val) < (min)) { (val) = (min); } else if ((val) > (max)) { (val) = (max); } } while (0) - -/* macro to compute the base 2 log for LOD calculations */ -#define LOGB2(x) (log((double)(x)) / log(2.0)) - - - -/************************************* - * - * Macros for extracting bitfields - * - *************************************/ - -#define INITEN_ENABLE_HW_INIT(val) (((val) >> 0) & 1) -#define INITEN_ENABLE_PCI_FIFO(val) (((val) >> 1) & 1) -#define INITEN_REMAP_INIT_TO_DAC(val) (((val) >> 2) & 1) -#define INITEN_ENABLE_SNOOP0(val) (((val) >> 4) & 1) -#define INITEN_SNOOP0_MEMORY_MATCH(val) (((val) >> 5) & 1) -#define INITEN_SNOOP0_READWRITE_MATCH(val) (((val) >> 6) & 1) -#define INITEN_ENABLE_SNOOP1(val) (((val) >> 7) & 1) -#define INITEN_SNOOP1_MEMORY_MATCH(val) (((val) >> 8) & 1) -#define INITEN_SNOOP1_READWRITE_MATCH(val) (((val) >> 9) & 1) -#define INITEN_SLI_BUS_OWNER(val) (((val) >> 10) & 1) -#define INITEN_SLI_ODD_EVEN(val) (((val) >> 11) & 1) -#define INITEN_SECONDARY_REV_ID(val) (((val) >> 12) & 0xf) /* voodoo 2 only */ -#define INITEN_MFCTR_FAB_ID(val) (((val) >> 16) & 0xf) /* voodoo 2 only */ -#define INITEN_ENABLE_PCI_INTERRUPT(val) (((val) >> 20) & 1) /* voodoo 2 only */ -#define INITEN_PCI_INTERRUPT_TIMEOUT(val) (((val) >> 21) & 1) /* voodoo 2 only */ -#define INITEN_ENABLE_NAND_TREE_TEST(val) (((val) >> 22) & 1) /* voodoo 2 only */ -#define INITEN_ENABLE_SLI_ADDRESS_SNOOP(val) (((val) >> 23) & 1) /* voodoo 2 only */ -#define INITEN_SLI_SNOOP_ADDRESS(val) (((val) >> 24) & 0xff) /* voodoo 2 only */ - -#define FBZCP_CC_RGBSELECT(val) (((val) >> 0) & 3) -#define FBZCP_CC_ASELECT(val) (((val) >> 2) & 3) -#define FBZCP_CC_LOCALSELECT(val) (((val) >> 4) & 1) -#define FBZCP_CCA_LOCALSELECT(val) (((val) >> 5) & 3) -#define FBZCP_CC_LOCALSELECT_OVERRIDE(val) (((val) >> 7) & 1) -#define FBZCP_CC_ZERO_OTHER(val) (((val) >> 8) & 1) -#define FBZCP_CC_SUB_CLOCAL(val) (((val) >> 9) & 1) -#define FBZCP_CC_MSELECT(val) (((val) >> 10) & 7) -#define FBZCP_CC_REVERSE_BLEND(val) (((val) >> 13) & 1) -#define FBZCP_CC_ADD_ACLOCAL(val) (((val) >> 14) & 3) -#define FBZCP_CC_INVERT_OUTPUT(val) (((val) >> 16) & 1) -#define FBZCP_CCA_ZERO_OTHER(val) (((val) >> 17) & 1) -#define FBZCP_CCA_SUB_CLOCAL(val) (((val) >> 18) & 1) -#define FBZCP_CCA_MSELECT(val) (((val) >> 19) & 7) -#define FBZCP_CCA_REVERSE_BLEND(val) (((val) >> 22) & 1) -#define FBZCP_CCA_ADD_ACLOCAL(val) (((val) >> 23) & 3) -#define FBZCP_CCA_INVERT_OUTPUT(val) (((val) >> 25) & 1) -#define FBZCP_CCA_SUBPIXEL_ADJUST(val) (((val) >> 26) & 1) -#define FBZCP_TEXTURE_ENABLE(val) (((val) >> 27) & 1) -#define FBZCP_RGBZW_CLAMP(val) (((val) >> 28) & 1) /* voodoo 2 only */ -#define FBZCP_ANTI_ALIAS(val) (((val) >> 29) & 1) /* voodoo 2 only */ - -#define ALPHAMODE_ALPHATEST(val) (((val) >> 0) & 1) -#define ALPHAMODE_ALPHAFUNCTION(val) (((val) >> 1) & 7) -#define ALPHAMODE_ALPHABLEND(val) (((val) >> 4) & 1) -#define ALPHAMODE_ANTIALIAS(val) (((val) >> 5) & 1) -#define ALPHAMODE_SRCRGBBLEND(val) (((val) >> 8) & 15) -#define ALPHAMODE_DSTRGBBLEND(val) (((val) >> 12) & 15) -#define ALPHAMODE_SRCALPHABLEND(val) (((val) >> 16) & 15) -#define ALPHAMODE_DSTALPHABLEND(val) (((val) >> 20) & 15) -#define ALPHAMODE_ALPHAREF(val) (((val) >> 24) & 0xff) - -#define FOGMODE_ENABLE_FOG(val) (((val) >> 0) & 1) -#define FOGMODE_FOG_ADD(val) (((val) >> 1) & 1) -#define FOGMODE_FOG_MULT(val) (((val) >> 2) & 1) -#define FOGMODE_FOG_ZALPHA(val) (((val) >> 3) & 3) -#define FOGMODE_FOG_CONSTANT(val) (((val) >> 5) & 1) -#define FOGMODE_FOG_DITHER(val) (((val) >> 6) & 1) /* voodoo 2 only */ -#define FOGMODE_FOG_ZONES(val) (((val) >> 7) & 1) /* voodoo 2 only */ - -#define FBZMODE_ENABLE_CLIPPING(val) (((val) >> 0) & 1) -#define FBZMODE_ENABLE_CHROMAKEY(val) (((val) >> 1) & 1) -#define FBZMODE_ENABLE_STIPPLE(val) (((val) >> 2) & 1) -#define FBZMODE_WBUFFER_SELECT(val) (((val) >> 3) & 1) -#define FBZMODE_ENABLE_DEPTHBUF(val) (((val) >> 4) & 1) -#define FBZMODE_DEPTH_FUNCTION(val) (((val) >> 5) & 7) -#define FBZMODE_ENABLE_DITHERING(val) (((val) >> 8) & 1) -#define FBZMODE_RGB_BUFFER_MASK(val) (((val) >> 9) & 1) -#define FBZMODE_AUX_BUFFER_MASK(val) (((val) >> 10) & 1) -#define FBZMODE_DITHER_TYPE(val) (((val) >> 11) & 1) -#define FBZMODE_STIPPLE_PATTERN(val) (((val) >> 12) & 1) -#define FBZMODE_ENABLE_ALPHA_MASK(val) (((val) >> 13) & 1) -#define FBZMODE_DRAW_BUFFER(val) (((val) >> 14) & 3) -#define FBZMODE_ENABLE_DEPTH_BIAS(val) (((val) >> 16) & 1) -#define FBZMODE_Y_ORIGIN(val) (((val) >> 17) & 1) -#define FBZMODE_ENABLE_ALPHA_PLANES(val) (((val) >> 18) & 1) -#define FBZMODE_ALPHA_DITHER_SUBTRACT(val) (((val) >> 19) & 1) -#define FBZMODE_DEPTH_SOURCE_COMPARE(val) (((val) >> 20) & 1) -#define FBZMODE_DEPTH_FLOAT_SELECT(val) (((val) >> 21) & 1) /* voodoo 2 only */ - -#define LFBMODE_WRITE_FORMAT(val) (((val) >> 0) & 0xf) -#define LFBMODE_WRITE_BUFFER_SELECT(val) (((val) >> 4) & 3) -#define LFBMODE_READ_BUFFER_SELECT(val) (((val) >> 6) & 3) -#define LFBMODE_ENABLE_PIXEL_PIPELINE(val) (((val) >> 8) & 1) -#define LFBMODE_RGBA_LANES(val) (((val) >> 9) & 3) -#define LFBMODE_WORD_SWAP_WRITES(val) (((val) >> 11) & 1) -#define LFBMODE_BYTE_SWIZZLE_WRITES(val) (((val) >> 12) & 1) -#define LFBMODE_Y_ORIGIN(val) (((val) >> 13) & 1) -#define LFBMODE_WRITE_W_SELECT(val) (((val) >> 14) & 1) -#define LFBMODE_WORD_SWAP_READS(val) (((val) >> 15) & 1) -#define LFBMODE_BYTE_SWIZZLE_READS(val) (((val) >> 16) & 1) - -#define CHROMARANGE_BLUE_EXCLUSIVE(val) (((val) >> 24) & 1) -#define CHROMARANGE_GREEN_EXCLUSIVE(val) (((val) >> 25) & 1) -#define CHROMARANGE_RED_EXCLUSIVE(val) (((val) >> 26) & 1) -#define CHROMARANGE_UNION_MODE(val) (((val) >> 27) & 1) -#define CHROMARANGE_ENABLE(val) (((val) >> 28) & 1) - -#define FBIINIT0_VGA_PASSTHRU(val) (((val) >> 0) & 1) -#define FBIINIT0_GRAPHICS_RESET(val) (((val) >> 1) & 1) -#define FBIINIT0_FIFO_RESET(val) (((val) >> 2) & 1) -#define FBIINIT0_SWIZZLE_REG_WRITES(val) (((val) >> 3) & 1) -#define FBIINIT0_STALL_PCIE_FOR_HWM(val) (((val) >> 4) & 1) -#define FBIINIT0_PCI_FIFO_LWM(val) (((val) >> 6) & 0x1f) -#define FBIINIT0_LFB_TO_MEMORY_FIFO(val) (((val) >> 11) & 1) -#define FBIINIT0_TEXMEM_TO_MEMORY_FIFO(val) (((val) >> 12) & 1) -#define FBIINIT0_ENABLE_MEMORY_FIFO(val) (((val) >> 13) & 1) -#define FBIINIT0_MEMORY_FIFO_HWM(val) (((val) >> 14) & 0x7ff) -#define FBIINIT0_MEMORY_FIFO_BURST(val) (((val) >> 25) & 0x3f) - -#define FBIINIT1_PCI_DEV_FUNCTION(val) (((val) >> 0) & 1) -#define FBIINIT1_PCI_WRITE_WAIT_STATES(val) (((val) >> 1) & 1) -#define FBIINIT1_MULTI_SST1(val) (((val) >> 2) & 1) /* not on voodoo 2 */ -#define FBIINIT1_ENABLE_LFB(val) (((val) >> 3) & 1) -#define FBIINIT1_X_VIDEO_TILES(val) (((val) >> 4) & 0xf) -#define FBIINIT1_VIDEO_TIMING_RESET(val) (((val) >> 8) & 1) -#define FBIINIT1_SOFTWARE_OVERRIDE(val) (((val) >> 9) & 1) -#define FBIINIT1_SOFTWARE_HSYNC(val) (((val) >> 10) & 1) -#define FBIINIT1_SOFTWARE_VSYNC(val) (((val) >> 11) & 1) -#define FBIINIT1_SOFTWARE_BLANK(val) (((val) >> 12) & 1) -#define FBIINIT1_DRIVE_VIDEO_TIMING(val) (((val) >> 13) & 1) -#define FBIINIT1_DRIVE_VIDEO_BLANK(val) (((val) >> 14) & 1) -#define FBIINIT1_DRIVE_VIDEO_SYNC(val) (((val) >> 15) & 1) -#define FBIINIT1_DRIVE_VIDEO_DCLK(val) (((val) >> 16) & 1) -#define FBIINIT1_VIDEO_TIMING_VCLK(val) (((val) >> 17) & 1) -#define FBIINIT1_VIDEO_CLK_2X_DELAY(val) (((val) >> 18) & 3) -#define FBIINIT1_VIDEO_TIMING_SOURCE(val) (((val) >> 20) & 3) -#define FBIINIT1_ENABLE_24BPP_OUTPUT(val) (((val) >> 22) & 1) -#define FBIINIT1_ENABLE_SLI(val) (((val) >> 23) & 1) -#define FBIINIT1_X_VIDEO_TILES_BIT5(val) (((val) >> 24) & 1) /* voodoo 2 only */ -#define FBIINIT1_ENABLE_EDGE_FILTER(val) (((val) >> 25) & 1) -#define FBIINIT1_INVERT_VID_CLK_2X(val) (((val) >> 26) & 1) -#define FBIINIT1_VID_CLK_2X_SEL_DELAY(val) (((val) >> 27) & 3) -#define FBIINIT1_VID_CLK_DELAY(val) (((val) >> 29) & 3) -#define FBIINIT1_DISABLE_FAST_READAHEAD(val) (((val) >> 31) & 1) - -#define FBIINIT2_DISABLE_DITHER_SUB(val) (((val) >> 0) & 1) -#define FBIINIT2_DRAM_BANKING(val) (((val) >> 1) & 1) -#define FBIINIT2_ENABLE_TRIPLE_BUF(val) (((val) >> 4) & 1) -#define FBIINIT2_ENABLE_FAST_RAS_READ(val) (((val) >> 5) & 1) -#define FBIINIT2_ENABLE_GEN_DRAM_OE(val) (((val) >> 6) & 1) -#define FBIINIT2_ENABLE_FAST_READWRITE(val) (((val) >> 7) & 1) -#define FBIINIT2_ENABLE_PASSTHRU_DITHER(val) (((val) >> 8) & 1) -#define FBIINIT2_SWAP_BUFFER_ALGORITHM(val) (((val) >> 9) & 3) -#define FBIINIT2_VIDEO_BUFFER_OFFSET(val) (((val) >> 11) & 0x1ff) -#define FBIINIT2_ENABLE_DRAM_BANKING(val) (((val) >> 20) & 1) -#define FBIINIT2_ENABLE_DRAM_READ_FIFO(val) (((val) >> 21) & 1) -#define FBIINIT2_ENABLE_DRAM_REFRESH(val) (((val) >> 22) & 1) -#define FBIINIT2_REFRESH_LOAD_VALUE(val) (((val) >> 23) & 0x1ff) - -#define FBIINIT3_TRI_REGISTER_REMAP(val) (((val) >> 0) & 1) -#define FBIINIT3_VIDEO_FIFO_THRESH(val) (((val) >> 1) & 0x1f) -#define FBIINIT3_DISABLE_TMUS(val) (((val) >> 6) & 1) -#define FBIINIT3_FBI_MEMORY_TYPE(val) (((val) >> 8) & 7) -#define FBIINIT3_VGA_PASS_RESET_VAL(val) (((val) >> 11) & 1) -#define FBIINIT3_HARDCODE_PCI_BASE(val) (((val) >> 12) & 1) -#define FBIINIT3_FBI2TREX_DELAY(val) (((val) >> 13) & 0xf) -#define FBIINIT3_TREX2FBI_DELAY(val) (((val) >> 17) & 0x1f) -#define FBIINIT3_YORIGIN_SUBTRACT(val) (((val) >> 22) & 0x3ff) - -#define FBIINIT4_PCI_READ_WAITS(val) (((val) >> 0) & 1) -#define FBIINIT4_ENABLE_LFB_READAHEAD(val) (((val) >> 1) & 1) -#define FBIINIT4_MEMORY_FIFO_LWM(val) (((val) >> 2) & 0x3f) -#define FBIINIT4_MEMORY_FIFO_START_ROW(val) (((val) >> 8) & 0x3ff) -#define FBIINIT4_MEMORY_FIFO_STOP_ROW(val) (((val) >> 18) & 0x3ff) -#define FBIINIT4_VIDEO_CLOCKING_DELAY(val) (((val) >> 29) & 7) /* voodoo 2 only */ - -#define FBIINIT5_DISABLE_PCI_STOP(val) (((val) >> 0) & 1) /* voodoo 2 only */ -#define FBIINIT5_PCI_SLAVE_SPEED(val) (((val) >> 1) & 1) /* voodoo 2 only */ -#define FBIINIT5_DAC_DATA_OUTPUT_WIDTH(val) (((val) >> 2) & 1) /* voodoo 2 only */ -#define FBIINIT5_DAC_DATA_17_OUTPUT(val) (((val) >> 3) & 1) /* voodoo 2 only */ -#define FBIINIT5_DAC_DATA_18_OUTPUT(val) (((val) >> 4) & 1) /* voodoo 2 only */ -#define FBIINIT5_GENERIC_STRAPPING(val) (((val) >> 5) & 0xf) /* voodoo 2 only */ -#define FBIINIT5_BUFFER_ALLOCATION(val) (((val) >> 9) & 3) /* voodoo 2 only */ -#define FBIINIT5_DRIVE_VID_CLK_SLAVE(val) (((val) >> 11) & 1) /* voodoo 2 only */ -#define FBIINIT5_DRIVE_DAC_DATA_16(val) (((val) >> 12) & 1) /* voodoo 2 only */ -#define FBIINIT5_VCLK_INPUT_SELECT(val) (((val) >> 13) & 1) /* voodoo 2 only */ -#define FBIINIT5_MULTI_CVG_DETECT(val) (((val) >> 14) & 1) /* voodoo 2 only */ -#define FBIINIT5_SYNC_RETRACE_READS(val) (((val) >> 15) & 1) /* voodoo 2 only */ -#define FBIINIT5_ENABLE_RHBORDER_COLOR(val) (((val) >> 16) & 1) /* voodoo 2 only */ -#define FBIINIT5_ENABLE_LHBORDER_COLOR(val) (((val) >> 17) & 1) /* voodoo 2 only */ -#define FBIINIT5_ENABLE_BVBORDER_COLOR(val) (((val) >> 18) & 1) /* voodoo 2 only */ -#define FBIINIT5_ENABLE_TVBORDER_COLOR(val) (((val) >> 19) & 1) /* voodoo 2 only */ -#define FBIINIT5_DOUBLE_HORIZ(val) (((val) >> 20) & 1) /* voodoo 2 only */ -#define FBIINIT5_DOUBLE_VERT(val) (((val) >> 21) & 1) /* voodoo 2 only */ -#define FBIINIT5_ENABLE_16BIT_GAMMA(val) (((val) >> 22) & 1) /* voodoo 2 only */ -#define FBIINIT5_INVERT_DAC_HSYNC(val) (((val) >> 23) & 1) /* voodoo 2 only */ -#define FBIINIT5_INVERT_DAC_VSYNC(val) (((val) >> 24) & 1) /* voodoo 2 only */ -#define FBIINIT5_ENABLE_24BIT_DACDATA(val) (((val) >> 25) & 1) /* voodoo 2 only */ -#define FBIINIT5_ENABLE_INTERLACING(val) (((val) >> 26) & 1) /* voodoo 2 only */ -#define FBIINIT5_DAC_DATA_18_CONTROL(val) (((val) >> 27) & 1) /* voodoo 2 only */ -#define FBIINIT5_RASTERIZER_UNIT_MODE(val) (((val) >> 30) & 3) /* voodoo 2 only */ - -#define FBIINIT6_WINDOW_ACTIVE_COUNTER(val) (((val) >> 0) & 7) /* voodoo 2 only */ -#define FBIINIT6_WINDOW_DRAG_COUNTER(val) (((val) >> 3) & 0x1f) /* voodoo 2 only */ -#define FBIINIT6_SLI_SYNC_MASTER(val) (((val) >> 8) & 1) /* voodoo 2 only */ -#define FBIINIT6_DAC_DATA_22_OUTPUT(val) (((val) >> 9) & 3) /* voodoo 2 only */ -#define FBIINIT6_DAC_DATA_23_OUTPUT(val) (((val) >> 11) & 3) /* voodoo 2 only */ -#define FBIINIT6_SLI_SYNCIN_OUTPUT(val) (((val) >> 13) & 3) /* voodoo 2 only */ -#define FBIINIT6_SLI_SYNCOUT_OUTPUT(val) (((val) >> 15) & 3) /* voodoo 2 only */ -#define FBIINIT6_DAC_RD_OUTPUT(val) (((val) >> 17) & 3) /* voodoo 2 only */ -#define FBIINIT6_DAC_WR_OUTPUT(val) (((val) >> 19) & 3) /* voodoo 2 only */ -#define FBIINIT6_PCI_FIFO_LWM_RDY(val) (((val) >> 21) & 0x7f) /* voodoo 2 only */ -#define FBIINIT6_VGA_PASS_N_OUTPUT(val) (((val) >> 28) & 3) /* voodoo 2 only */ -#define FBIINIT6_X_VIDEO_TILES_BIT0(val) (((val) >> 30) & 1) /* voodoo 2 only */ - -#define FBIINIT7_GENERIC_STRAPPING(val) (((val) >> 0) & 0xff) /* voodoo 2 only */ -#define FBIINIT7_CMDFIFO_ENABLE(val) (((val) >> 8) & 1) /* voodoo 2 only */ -#define FBIINIT7_CMDFIFO_MEMORY_STORE(val) (((val) >> 9) & 1) /* voodoo 2 only */ -#define FBIINIT7_DISABLE_CMDFIFO_HOLES(val) (((val) >> 10) & 1) /* voodoo 2 only */ -#define FBIINIT7_CMDFIFO_READ_THRESH(val) (((val) >> 11) & 0x1f) /* voodoo 2 only */ -#define FBIINIT7_SYNC_CMDFIFO_WRITES(val) (((val) >> 16) & 1) /* voodoo 2 only */ -#define FBIINIT7_SYNC_CMDFIFO_READS(val) (((val) >> 17) & 1) /* voodoo 2 only */ -#define FBIINIT7_RESET_PCI_PACKER(val) (((val) >> 18) & 1) /* voodoo 2 only */ -#define FBIINIT7_ENABLE_CHROMA_STUFF(val) (((val) >> 19) & 1) /* voodoo 2 only */ -#define FBIINIT7_CMDFIFO_PCI_TIMEOUT(val) (((val) >> 20) & 0x7f) /* voodoo 2 only */ -#define FBIINIT7_ENABLE_TEXTURE_BURST(val) (((val) >> 27) & 1) /* voodoo 2 only */ - -#define TEXMODE_ENABLE_PERSPECTIVE(val) (((val) >> 0) & 1) -#define TEXMODE_MINIFICATION_FILTER(val) (((val) >> 1) & 1) -#define TEXMODE_MAGNIFICATION_FILTER(val) (((val) >> 2) & 1) -#define TEXMODE_CLAMP_NEG_W(val) (((val) >> 3) & 1) -#define TEXMODE_ENABLE_LOD_DITHER(val) (((val) >> 4) & 1) -#define TEXMODE_NCC_TABLE_SELECT(val) (((val) >> 5) & 1) -#define TEXMODE_CLAMP_S(val) (((val) >> 6) & 1) -#define TEXMODE_CLAMP_T(val) (((val) >> 7) & 1) -#define TEXMODE_FORMAT(val) (((val) >> 8) & 0xf) -#define TEXMODE_TC_ZERO_OTHER(val) (((val) >> 12) & 1) -#define TEXMODE_TC_SUB_CLOCAL(val) (((val) >> 13) & 1) -#define TEXMODE_TC_MSELECT(val) (((val) >> 14) & 7) -#define TEXMODE_TC_REVERSE_BLEND(val) (((val) >> 17) & 1) -#define TEXMODE_TC_ADD_ACLOCAL(val) (((val) >> 18) & 3) -#define TEXMODE_TC_INVERT_OUTPUT(val) (((val) >> 20) & 1) -#define TEXMODE_TCA_ZERO_OTHER(val) (((val) >> 21) & 1) -#define TEXMODE_TCA_SUB_CLOCAL(val) (((val) >> 22) & 1) -#define TEXMODE_TCA_MSELECT(val) (((val) >> 23) & 7) -#define TEXMODE_TCA_REVERSE_BLEND(val) (((val) >> 26) & 1) -#define TEXMODE_TCA_ADD_ACLOCAL(val) (((val) >> 27) & 3) -#define TEXMODE_TCA_INVERT_OUTPUT(val) (((val) >> 29) & 1) -#define TEXMODE_TRILINEAR(val) (((val) >> 30) & 1) -#define TEXMODE_SEQ_8_DOWNLD(val) (((val) >> 31) & 1) - -#define TEXLOD_LODMIN(val) (((val) >> 0) & 0x3f) -#define TEXLOD_LODMAX(val) (((val) >> 6) & 0x3f) -#define TEXLOD_LODBIAS(val) (((val) >> 12) & 0x3f) -#define TEXLOD_LOD_ODD(val) (((val) >> 18) & 1) -#define TEXLOD_LOD_TSPLIT(val) (((val) >> 19) & 1) -#define TEXLOD_LOD_S_IS_WIDER(val) (((val) >> 20) & 1) -#define TEXLOD_LOD_ASPECT(val) (((val) >> 21) & 3) -#define TEXLOD_LOD_ZEROFRAC(val) (((val) >> 23) & 1) -#define TEXLOD_TMULTIBASEADDR(val) (((val) >> 24) & 1) -#define TEXLOD_TDATA_SWIZZLE(val) (((val) >> 25) & 1) -#define TEXLOD_TDATA_SWAP(val) (((val) >> 26) & 1) -#define TEXLOD_TDIRECT_WRITE(val) (((val) >> 27) & 1) /* Voodoo 2 only */ - -#define TEXDETAIL_DETAIL_MAX(val) (((val) >> 0) & 0xff) -#define TEXDETAIL_DETAIL_BIAS(val) (((val) >> 8) & 0x3f) -#define TEXDETAIL_DETAIL_SCALE(val) (((val) >> 14) & 7) -#define TEXDETAIL_RGB_MIN_FILTER(val) (((val) >> 17) & 1) /* Voodoo 2 only */ -#define TEXDETAIL_RGB_MAG_FILTER(val) (((val) >> 18) & 1) /* Voodoo 2 only */ -#define TEXDETAIL_ALPHA_MIN_FILTER(val) (((val) >> 19) & 1) /* Voodoo 2 only */ -#define TEXDETAIL_ALPHA_MAG_FILTER(val) (((val) >> 20) & 1) /* Voodoo 2 only */ -#define TEXDETAIL_SEPARATE_RGBA_FILTER(val) (((val) >> 21) & 1) /* Voodoo 2 only */ - -#define TREXINIT_SEND_TMU_CONFIG(val) (((val) >> 18) & 1) /************************************* @@ -1364,377 +21,6 @@ struct voodoo_state; struct poly_extra_data; -struct rgba -{ -#ifdef LSB_FIRST - UINT8 b, g, r, a; -#else - UINT8 a, r, g, b; -#endif -}; - - -union voodoo_reg -{ - INT32 i; - UINT32 u; - float f; - rgba rgb; -}; - - -typedef voodoo_reg rgb_union; - - -struct voodoo_stats -{ - UINT8 lastkey; /* last key state */ - UINT8 display; /* display stats? */ - INT32 swaps; /* total swaps */ - INT32 stalls; /* total stalls */ - INT32 total_triangles; /* total triangles */ - INT32 total_pixels_in; /* total pixels in */ - INT32 total_pixels_out; /* total pixels out */ - INT32 total_chroma_fail; /* total chroma fail */ - INT32 total_zfunc_fail; /* total z func fail */ - INT32 total_afunc_fail; /* total a func fail */ - INT32 total_clipped; /* total clipped */ - INT32 total_stippled; /* total stippled */ - INT32 lfb_writes; /* LFB writes */ - INT32 lfb_reads; /* LFB reads */ - INT32 reg_writes; /* register writes */ - INT32 reg_reads; /* register reads */ - INT32 tex_writes; /* texture writes */ - INT32 texture_mode[16]; /* 16 different texture modes */ - UINT8 render_override; /* render override */ - char buffer[1024]; /* string */ -}; - - -/* note that this structure is an even 64 bytes long */ -struct stats_block -{ - INT32 pixels_in; /* pixels in statistic */ - INT32 pixels_out; /* pixels out statistic */ - INT32 chroma_fail; /* chroma test fail statistic */ - INT32 zfunc_fail; /* z function test fail statistic */ - INT32 afunc_fail; /* alpha function test fail statistic */ - INT32 clip_fail; /* clipping fail statistic */ - INT32 stipple_count; /* stipple statistic */ - INT32 filler[64/4 - 7]; /* pad this structure to 64 bytes */ -}; - - -struct fifo_state -{ - UINT32 * base; /* base of the FIFO */ - INT32 size; /* size of the FIFO */ - INT32 in; /* input pointer */ - INT32 out; /* output pointer */ -}; - - -struct cmdfifo_info -{ - UINT8 enable; /* enabled? */ - UINT8 count_holes; /* count holes? */ - UINT32 base; /* base address in framebuffer RAM */ - UINT32 end; /* end address in framebuffer RAM */ - UINT32 rdptr; /* current read pointer */ - UINT32 amin; /* minimum address */ - UINT32 amax; /* maximum address */ - UINT32 depth; /* current depth */ - UINT32 holes; /* number of holes */ -}; - - -struct pci_state -{ - fifo_state fifo; /* PCI FIFO */ - UINT32 init_enable; /* initEnable value */ - UINT8 stall_state; /* state of the system if we're stalled */ - UINT8 op_pending; /* true if an operation is pending */ - attotime op_end_time; /* time when the pending operation ends */ - emu_timer * continue_timer; /* timer to use to continue processing */ - UINT32 fifo_mem[64*2]; /* memory backing the PCI FIFO */ -}; - - -struct ncc_table -{ - UINT8 dirty; /* is the texel lookup dirty? */ - voodoo_reg * reg; /* pointer to our registers */ - INT32 ir[4], ig[4], ib[4]; /* I values for R,G,B */ - INT32 qr[4], qg[4], qb[4]; /* Q values for R,G,B */ - INT32 y[16]; /* Y values */ - rgb_t * palette; /* pointer to associated RGB palette */ - rgb_t * palettea; /* pointer to associated ARGB palette */ - rgb_t texel[256]; /* texel lookup */ -}; - - -struct tmu_state -{ - UINT8 * ram; /* pointer to our RAM */ - UINT32 mask; /* mask to apply to pointers */ - voodoo_reg * reg; /* pointer to our register base */ - UINT32 regdirty; /* true if the LOD/mode/base registers have changed */ - - UINT32 texaddr_mask; /* mask for texture address */ - UINT8 texaddr_shift; /* shift for texture address */ - - INT64 starts, startt; /* starting S,T (14.18) */ - INT64 startw; /* starting W (2.30) */ - INT64 dsdx, dtdx; /* delta S,T per X */ - INT64 dwdx; /* delta W per X */ - INT64 dsdy, dtdy; /* delta S,T per Y */ - INT64 dwdy; /* delta W per Y */ - - INT32 lodmin, lodmax; /* min, max LOD values */ - INT32 lodbias; /* LOD bias */ - UINT32 lodmask; /* mask of available LODs */ - UINT32 lodoffset[9]; /* offset of texture base for each LOD */ - INT32 detailmax; /* detail clamp */ - INT32 detailbias; /* detail bias */ - UINT8 detailscale; /* detail scale */ - - UINT32 wmask; /* mask for the current texture width */ - UINT32 hmask; /* mask for the current texture height */ - - UINT32 bilinear_mask; /* mask for bilinear resolution (0xf0 for V1, 0xff for V2) */ - - ncc_table ncc[2]; /* two NCC tables */ - - rgb_t * lookup; /* currently selected lookup */ - rgb_t * texel[16]; /* texel lookups for each format */ - - rgb_t palette[256]; /* palette lookup table */ - rgb_t palettea[256]; /* palette+alpha lookup table */ -}; - - -struct tmu_shared_state -{ - rgb_t rgb332[256]; /* RGB 3-3-2 lookup table */ - rgb_t alpha8[256]; /* alpha 8-bit lookup table */ - rgb_t int8[256]; /* intensity 8-bit lookup table */ - rgb_t ai44[256]; /* alpha, intensity 4-4 lookup table */ - - rgb_t rgb565[65536]; /* RGB 5-6-5 lookup table */ - rgb_t argb1555[65536]; /* ARGB 1-5-5-5 lookup table */ - rgb_t argb4444[65536]; /* ARGB 4-4-4-4 lookup table */ -}; - - -struct setup_vertex -{ - float x, y; /* X, Y coordinates */ - float a, r, g, b; /* A, R, G, B values */ - float z, wb; /* Z and broadcast W values */ - float w0, s0, t0; /* W, S, T for TMU 0 */ - float w1, s1, t1; /* W, S, T for TMU 1 */ -}; - - -struct fbi_state -{ - UINT8 * ram; /* pointer to frame buffer RAM */ - UINT32 mask; /* mask to apply to pointers */ - UINT32 rgboffs[3]; /* word offset to 3 RGB buffers */ - UINT32 auxoffs; /* word offset to 1 aux buffer */ - - UINT8 frontbuf; /* front buffer index */ - UINT8 backbuf; /* back buffer index */ - UINT8 swaps_pending; /* number of pending swaps */ - UINT8 video_changed; /* did the frontbuffer video change? */ - - UINT32 yorigin; /* Y origin subtract value */ - UINT32 lfb_base; /* base of LFB in memory */ - UINT8 lfb_stride; /* stride of LFB accesses in bits */ - - UINT32 width; /* width of current frame buffer */ - UINT32 height; /* height of current frame buffer */ - UINT32 xoffs; /* horizontal offset (back porch) */ - UINT32 yoffs; /* vertical offset (back porch) */ - UINT32 vsyncscan; /* vertical sync scanline */ - UINT32 rowpixels; /* pixels per row */ - UINT32 tile_width; /* width of video tiles */ - UINT32 tile_height; /* height of video tiles */ - UINT32 x_tiles; /* number of tiles in the X direction */ - - emu_timer * vblank_timer; /* VBLANK timer */ - UINT8 vblank; /* VBLANK state */ - UINT8 vblank_count; /* number of VBLANKs since last swap */ - UINT8 vblank_swap_pending; /* a swap is pending, waiting for a vblank */ - UINT8 vblank_swap; /* swap when we hit this count */ - UINT8 vblank_dont_swap; /* don't actually swap when we hit this point */ - - /* triangle setup info */ - UINT8 cheating_allowed; /* allow cheating? */ - INT32 sign; /* triangle sign */ - INT16 ax, ay; /* vertex A x,y (12.4) */ - INT16 bx, by; /* vertex B x,y (12.4) */ - INT16 cx, cy; /* vertex C x,y (12.4) */ - INT32 startr, startg, startb, starta; /* starting R,G,B,A (12.12) */ - INT32 startz; /* starting Z (20.12) */ - INT64 startw; /* starting W (16.32) */ - INT32 drdx, dgdx, dbdx, dadx; /* delta R,G,B,A per X */ - INT32 dzdx; /* delta Z per X */ - INT64 dwdx; /* delta W per X */ - INT32 drdy, dgdy, dbdy, dady; /* delta R,G,B,A per Y */ - INT32 dzdy; /* delta Z per Y */ - INT64 dwdy; /* delta W per Y */ - - stats_block lfb_stats; /* LFB-access statistics */ - - UINT8 sverts; /* number of vertices ready */ - setup_vertex svert[3]; /* 3 setup vertices */ - - fifo_state fifo; /* framebuffer memory fifo */ - cmdfifo_info cmdfifo[2]; /* command FIFOs */ - - UINT8 fogblend[64]; /* 64-entry fog table */ - UINT8 fogdelta[64]; /* 64-entry fog table */ - UINT8 fogdelta_mask; /* mask for for delta (0xff for V1, 0xfc for V2) */ - - rgb_t pen[65536]; /* mapping from pixels to pens */ - rgb_t clut[512]; /* clut gamma data */ - UINT8 clut_dirty; /* do we need to recompute? */ -}; - - -struct dac_state -{ - UINT8 reg[8]; /* 8 registers */ - UINT8 read_result; /* pending read result */ -}; - - -struct raster_info -{ - raster_info * next; /* pointer to next entry with the same hash */ - poly_draw_scanline_func callback; /* callback pointer */ - UINT8 is_generic; /* TRUE if this is one of the generic rasterizers */ - UINT8 display; /* display index */ - UINT32 hits; /* how many hits (pixels) we've used this for */ - UINT32 polys; /* how many polys we've used this for */ - UINT32 eff_color_path; /* effective fbzColorPath value */ - UINT32 eff_alpha_mode; /* effective alphaMode value */ - UINT32 eff_fog_mode; /* effective fogMode value */ - UINT32 eff_fbz_mode; /* effective fbzMode value */ - UINT32 eff_tex_mode_0; /* effective textureMode value for TMU #0 */ - UINT32 eff_tex_mode_1; /* effective textureMode value for TMU #1 */ - UINT32 hash; -}; - - -struct poly_extra_data -{ - voodoo_state * state; /* pointer back to the voodoo state */ - raster_info * info; /* pointer to rasterizer information */ - - INT16 ax, ay; /* vertex A x,y (12.4) */ - INT32 startr, startg, startb, starta; /* starting R,G,B,A (12.12) */ - INT32 startz; /* starting Z (20.12) */ - INT64 startw; /* starting W (16.32) */ - INT32 drdx, dgdx, dbdx, dadx; /* delta R,G,B,A per X */ - INT32 dzdx; /* delta Z per X */ - INT64 dwdx; /* delta W per X */ - INT32 drdy, dgdy, dbdy, dady; /* delta R,G,B,A per Y */ - INT32 dzdy; /* delta Z per Y */ - INT64 dwdy; /* delta W per Y */ - - INT64 starts0, startt0; /* starting S,T (14.18) */ - INT64 startw0; /* starting W (2.30) */ - INT64 ds0dx, dt0dx; /* delta S,T per X */ - INT64 dw0dx; /* delta W per X */ - INT64 ds0dy, dt0dy; /* delta S,T per Y */ - INT64 dw0dy; /* delta W per Y */ - INT32 lodbase0; /* used during rasterization */ - - INT64 starts1, startt1; /* starting S,T (14.18) */ - INT64 startw1; /* starting W (2.30) */ - INT64 ds1dx, dt1dx; /* delta S,T per X */ - INT64 dw1dx; /* delta W per X */ - INT64 ds1dy, dt1dy; /* delta S,T per Y */ - INT64 dw1dy; /* delta W per Y */ - INT32 lodbase1; /* used during rasterization */ - - UINT16 dither[16]; /* dither matrix, for fastfill */ -}; - - -struct banshee_info -{ - UINT32 io[0x40]; /* I/O registers */ - UINT32 agp[0x80]; /* AGP registers */ - UINT8 vga[0x20]; /* VGA registers */ - UINT8 crtc[0x27]; /* VGA CRTC registers */ - UINT8 seq[0x05]; /* VGA sequencer registers */ - UINT8 gc[0x05]; /* VGA graphics controller registers */ - UINT8 att[0x15]; /* VGA attribute registers */ - UINT8 attff; /* VGA attribute flip-flop */ - - UINT32 blt_regs[0x20]; /* 2D Blitter registers */ - UINT32 blt_dst_base; - UINT32 blt_dst_x; - UINT32 blt_dst_y; - UINT32 blt_dst_width; - UINT32 blt_dst_height; - UINT32 blt_dst_stride; - UINT32 blt_dst_bpp; - UINT32 blt_cmd; - UINT32 blt_src_base; - UINT32 blt_src_x; - UINT32 blt_src_y; - UINT32 blt_src_width; - UINT32 blt_src_height; - UINT32 blt_src_stride; - UINT32 blt_src_bpp; -}; - - -struct voodoo_state -{ - UINT8 index; /* index of board */ - voodoo_device *device; /* pointer to our containing device */ - screen_device *screen; /* the screen we are acting on */ - device_t *cpu; /* the CPU we interact with */ - UINT8 type; /* type of system */ - UINT8 chipmask; /* mask for which chips are available */ - UINT32 freq; /* operating frequency */ - attoseconds_t attoseconds_per_cycle; /* attoseconds per cycle */ - UINT32 extra_cycles; /* extra cycles not yet accounted for */ - int trigger; /* trigger used for stalling */ - - voodoo_reg reg[0x400]; /* raw registers */ - const UINT8 * regaccess; /* register access array */ - const char *const * regnames; /* register names array */ - UINT8 alt_regmap; /* enable alternate register map? */ - - pci_state pci; /* PCI state */ - dac_state dac; /* DAC state */ - - fbi_state fbi; /* FBI states */ - tmu_state tmu[MAX_TMU]; /* TMU states */ - tmu_shared_state tmushare; /* TMU shared state */ - banshee_info banshee; /* Banshee state */ - - legacy_poly_manager * poly; /* polygon manager */ - stats_block * thread_stats; /* per-thread statistics */ - - voodoo_stats stats; /* internal statistics */ - - offs_t last_status_pc; /* PC of last status description (for logging) */ - UINT32 last_status_value; /* value of last status read (for logging) */ - - int next_rasterizer; /* next rasterizer index */ - raster_info rasterizer[MAX_RASTERIZERS]; /* array of rasterizers */ - raster_info * raster_hash[RASTER_HASH_SIZE]; /* hash table of rasterizers */ - - bool send_config; - UINT32 tmu_config; -}; @@ -2345,16 +631,16 @@ do } \ while (0) -static inline bool ATTR_FORCE_INLINE chromaKeyTest(voodoo_state *v, stats_block *stats, UINT32 fbzModeReg, rgbaint_t rgbaIntColor) +static inline bool ATTR_FORCE_INLINE chromaKeyTest(voodoo_device *vd, stats_block *stats, UINT32 fbzModeReg, rgbaint_t rgbaIntColor) { if (FBZMODE_ENABLE_CHROMAKEY(fbzModeReg)) { rgb_union color; color.u = (rgbaIntColor.get_a()<<24) | (rgbaIntColor.get_r()<<16) | (rgbaIntColor.get_g()<<8) | rgbaIntColor.get_b(); /* non-range version */ - if (!CHROMARANGE_ENABLE(v->reg[chromaRange].u)) + if (!CHROMARANGE_ENABLE(vd->reg[chromaRange].u)) { - if (((color.u ^ v->reg[chromaKey].u) & 0xffffff) == 0) + if (((color.u ^ vd->reg[chromaKey].u) & 0xffffff) == 0) { stats->chroma_fail++; return false; @@ -2368,30 +654,30 @@ static inline bool ATTR_FORCE_INLINE chromaKeyTest(voodoo_state *v, stats_block int results; /* check blue */ - low = v->reg[chromaKey].rgb.b; - high = v->reg[chromaRange].rgb.b; + low = vd->reg[chromaKey].rgb.b; + high = vd->reg[chromaRange].rgb.b; test = color.rgb.b; results = (test >= low && test <= high); - results ^= CHROMARANGE_BLUE_EXCLUSIVE(v->reg[chromaRange].u); + results ^= CHROMARANGE_BLUE_EXCLUSIVE(vd->reg[chromaRange].u); results <<= 1; /* check green */ - low = v->reg[chromaKey].rgb.g; - high = v->reg[chromaRange].rgb.g; + low = vd->reg[chromaKey].rgb.g; + high = vd->reg[chromaRange].rgb.g; test = color.rgb.g; results |= (test >= low && test <= high); - results ^= CHROMARANGE_GREEN_EXCLUSIVE(v->reg[chromaRange].u); + results ^= CHROMARANGE_GREEN_EXCLUSIVE(vd->reg[chromaRange].u); results <<= 1; /* check red */ - low = v->reg[chromaKey].rgb.r; - high = v->reg[chromaRange].rgb.r; + low = vd->reg[chromaKey].rgb.r; + high = vd->reg[chromaRange].rgb.r; test = color.rgb.r; results |= (test >= low && test <= high); - results ^= CHROMARANGE_RED_EXCLUSIVE(v->reg[chromaRange].u); + results ^= CHROMARANGE_RED_EXCLUSIVE(vd->reg[chromaRange].u); /* final result */ - if (CHROMARANGE_UNION_MODE(v->reg[chromaRange].u)) + if (CHROMARANGE_UNION_MODE(vd->reg[chromaRange].u)) { if (results != 0) { @@ -2520,11 +806,11 @@ do } \ while (0) -static inline bool ATTR_FORCE_INLINE alphaTest(voodoo_state *v, stats_block *stats, UINT32 alphaModeReg, UINT8 alpha) +static inline bool ATTR_FORCE_INLINE alphaTest(voodoo_device *vd, stats_block *stats, UINT32 alphaModeReg, UINT8 alpha) { if (ALPHAMODE_ALPHATEST(alphaModeReg)) { - UINT8 alpharef = v->reg[alphaMode].rgb.a; + UINT8 alpharef = vd->reg[alphaMode].rgb.a; switch (ALPHAMODE_ALPHAFUNCTION(alphaModeReg)) { case 0: /* alphaOP = never */ @@ -3067,7 +1353,7 @@ do } \ while (0) -static inline void ATTR_FORCE_INLINE applyFogging(voodoo_state *v, UINT32 fogModeReg, UINT32 fbzCpReg, INT32 x, const UINT8 *dither4, INT32 fogDepth, +static inline void ATTR_FORCE_INLINE applyFogging(voodoo_device *vd, UINT32 fogModeReg, UINT32 fbzCpReg, INT32 x, const UINT8 *dither4, INT32 fogDepth, rgbaint_t &color, INT32 iterz, INT64 iterw, UINT8 itera) { if (FOGMODE_ENABLE_FOG(fogModeReg)) @@ -3075,7 +1361,7 @@ static inline void ATTR_FORCE_INLINE applyFogging(voodoo_state *v, UINT32 fogMod UINT32 color_alpha = color.get_a(); /* constant fog bypasses everything else */ - rgbaint_t fogColorLocal(v->reg[fogColor].u); + rgbaint_t fogColorLocal(vd->reg[fogColor].u); if (FOGMODE_FOG_CONSTANT(fogModeReg)) { @@ -3119,11 +1405,11 @@ static inline void ATTR_FORCE_INLINE applyFogging(voodoo_state *v, UINT32 fogMod { case 0: /* fog table */ { - INT32 delta = v->fbi.fogdelta[fogDepth >> 10]; + INT32 delta = vd->fbi.fogdelta[fogDepth >> 10]; INT32 deltaval; /* perform the multiply against lower 8 bits of wfloat */ - deltaval = (delta & v->fbi.fogdelta_mask) * + deltaval = (delta & vd->fbi.fogdelta_mask) * ((fogDepth >> 2) & 0xff); /* fog zones allow for negating this value */ @@ -3137,7 +1423,7 @@ static inline void ATTR_FORCE_INLINE applyFogging(voodoo_state *v, UINT32 fogMod deltaval >>= 4; /* add to the blending factor */ - fogblend = v->fbi.fogblend[fogDepth >> 10] + deltaval; + fogblend = vd->fbi.fogblend[fogDepth >> 10] + deltaval; break; } @@ -3542,7 +1828,7 @@ while (0) * *************************************/ -#define PIXEL_PIPELINE_BEGIN(VV, STATS, XX, YY, FBZCOLORPATH, FBZMODE, ITERZ, ITERW) \ +#define PIXEL_PIPELINE_BEGIN(vd, STATS, XX, YY, FBZCOLORPATH, FBZMODE, ITERZ, ITERW) \ do \ { \ INT32 depthval, wfloat, fogdepth, biasdepth; \ @@ -3559,10 +1845,10 @@ do /* rotate mode */ \ if (FBZMODE_STIPPLE_PATTERN(FBZMODE) == 0) \ { \ - (VV)->reg[stipple].u = ((VV)->reg[stipple].u << 1) | ((VV)->reg[stipple].u >> 31);\ - if (((VV)->reg[stipple].u & 0x80000000) == 0) \ + vd->reg[stipple].u = (vd->reg[stipple].u << 1) | (vd->reg[stipple].u >> 31);\ + if ((vd->reg[stipple].u & 0x80000000) == 0) \ { \ - (VV)->stats.total_stippled++; \ + vd->stats.total_stippled++; \ goto skipdrawdepth; \ } \ } \ @@ -3571,9 +1857,9 @@ do else \ { \ int stipple_index = (((YY) & 3) << 3) | (~(XX) & 7); \ - if ((((VV)->reg[stipple].u >> stipple_index) & 1) == 0) \ + if (((vd->reg[stipple].u >> stipple_index) & 1) == 0) \ { \ - (VV)->stats.total_stippled++; \ + vd->stats.total_stippled++; \ goto skipdrawdepth; \ } \ } \ @@ -3597,7 +1883,7 @@ do /* add the bias for fog selection*/ \ if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \ { \ - fogdepth += (INT16)(VV)->reg[zaColor].u; \ + fogdepth += (INT16)vd->reg[zaColor].u; \ CLAMP(fogdepth, 0, 0xffff); \ } \ \ @@ -3628,12 +1914,12 @@ do biasdepth = depthval; \ if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \ { \ - biasdepth += (INT16)(VV)->reg[zaColor].u; \ + biasdepth += (INT16)vd->reg[zaColor].u; \ CLAMP(biasdepth, 0, 0xffff); \ } -#define DEPTH_TEST(VV, STATS, XX, FBZMODE) \ +#define DEPTH_TEST(vd, STATS, XX, FBZMODE) \ do \ { \ /* handle depth buffer testing */ \ @@ -3646,7 +1932,7 @@ do if (FBZMODE_DEPTH_SOURCE_COMPARE(FBZMODE) == 0) \ depthsource = biasdepth; \ else \ - depthsource = (UINT16)(VV)->reg[zaColor].u; \ + depthsource = (UINT16)vd->reg[zaColor].u; \ \ /* test against the depth buffer */ \ switch (FBZMODE_DEPTH_FUNCTION(FBZMODE)) \ @@ -3786,11 +2072,11 @@ static inline bool ATTR_FORCE_INLINE depthTest(UINT16 zaColorReg, stats_block *s return true; } -#define PIXEL_PIPELINE_END(VV, STATS, DITHER, DITHER4, DITHER_LOOKUP, XX, dest, depth, FBZMODE, FBZCOLORPATH, ALPHAMODE, FOGMODE, ITERZ, ITERW, ITERAXXX) \ +#define PIXEL_PIPELINE_END(vd, STATS, DITHER, DITHER4, DITHER_LOOKUP, XX, dest, depth, FBZMODE, FBZCOLORPATH, ALPHAMODE, FOGMODE, ITERZ, ITERW, ITERAXXX) \ \ /* perform fogging */ \ preFog.set(color); \ - applyFogging(VV, FOGMODE, FBZCOLORPATH, XX, DITHER4, fogdepth, color, ITERZ, ITERW, ITERAXXX.get_a()); \ + applyFogging(vd, FOGMODE, FBZCOLORPATH, XX, DITHER4, fogdepth, color, ITERZ, ITERW, ITERAXXX.get_a()); \ /* perform alpha blending */ \ alphaBlend(FBZMODE, ALPHAMODE, XX, DITHER, dest[XX], depth, preFog, color); \ a = color.get_a(); r = color.get_r(); g = color.get_g(); b = color.get_b(); \ @@ -4121,7 +2407,7 @@ do } \ while (0) -static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block *STATS, UINT32 FBZCOLORPATH, UINT32 FBZMODE, UINT32 ALPHAMODE, +static inline bool ATTR_FORCE_INLINE combineColor(voodoo_device *vd, stats_block *STATS, UINT32 FBZCOLORPATH, UINT32 FBZMODE, UINT32 ALPHAMODE, rgbaint_t TEXELARGB, INT32 ITERZ, INT64 ITERW, rgbaint_t &srcColor) { rgbaint_t c_other; @@ -4139,7 +2425,7 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block break; case 2: /* color1 RGB */ - c_other.set((VV)->reg[color1].u); + c_other.set(vd->reg[color1].u); break; default: /* reserved - voodoo3 framebufferRGB */ @@ -4148,9 +2434,9 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block } /* handle chroma key */ - if (!chromaKeyTest(VV, STATS, FBZMODE, c_other)) + if (!chromaKeyTest(vd, STATS, FBZMODE, c_other)) return false; - //APPLY_CHROMAKEY(VV, STATS, FBZMODE, c_other); + //APPLY_CHROMAKEY(vd->m_vds, STATS, FBZMODE, c_other); /* compute a_other */ switch (FBZCP_CC_ASELECT(FBZCOLORPATH)) @@ -4164,7 +2450,7 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block break; case 2: /* color1 alpha */ - c_other.set_a((VV)->reg[color1].rgb.a); + c_other.set_a(vd->reg[color1].rgb.a); break; default: /* reserved */ @@ -4175,7 +2461,7 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block /* handle alpha mask */ if (!alphaMaskTest(STATS, FBZMODE, c_other.get_a())) return false; - //APPLY_ALPHAMASK(VV, STATS, FBZMODE, c_other.rgb.a); + //APPLY_ALPHAMASK(vd->m_vds, STATS, FBZMODE, c_other.rgb.a); /* compute c_local */ @@ -4184,14 +2470,14 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block if (FBZCP_CC_LOCALSELECT(FBZCOLORPATH) == 0) /* iterated RGB */ c_local.set(srcColor); else /* color0 RGB */ - c_local.set((VV)->reg[color0].u); + c_local.set(vd->reg[color0].u); } else { if (!(TEXELARGB.get_a() & 0x80)) /* iterated RGB */ c_local.set(srcColor); else /* color0 RGB */ - c_local.set((VV)->reg[color0].u); + c_local.set(vd->reg[color0].u); } /* compute a_local */ @@ -4203,7 +2489,7 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block break; case 1: /* color0 alpha */ - c_local.set_a((VV)->reg[color0].rgb.a); + c_local.set_a(vd->reg[color0].rgb.a); break; case 2: /* clamped iterated Z[27:20] */ @@ -4355,9 +2641,9 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block /* handle alpha test */ - if (!alphaTest(VV, STATS, ALPHAMODE, srcColor.get_a())) + if (!alphaTest(vd, STATS, ALPHAMODE, srcColor.get_a())) return false; - //APPLY_ALPHATEST(VV, STATS, ALPHAMODE, color.rgb.a); + //APPLY_ALPHATEST(vd->m_vds, STATS, ALPHAMODE, color.rgb.a); return true; } @@ -4372,11 +2658,11 @@ static inline bool ATTR_FORCE_INLINE combineColor(voodoo_state *VV, stats_block #define RASTERIZER(name, TMUS, FBZCOLORPATH, FBZMODE, ALPHAMODE, FOGMODE, TEXMODE0, TEXMODE1) \ \ -static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid) \ +void voodoo_device::raster_##name(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid) \ { \ const poly_extra_data *extra = (const poly_extra_data *)extradata; \ - voodoo_state *v = extra->state; \ - stats_block *stats = &v->thread_stats[threadid]; \ + voodoo_device *vd = extra->device; \ + stats_block *stats = &vd->thread_stats[threadid]; \ DECLARE_DITHER_POINTERS; \ INT32 startx = extent->startx; \ INT32 stopx = extent->stopx; \ @@ -4394,7 +2680,7 @@ static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, co /* determine the screen Y */ \ scry = y; \ if (FBZMODE_Y_ORIGIN(FBZMODE)) \ - scry = (v->fbi.yorigin - y) & 0x3ff; \ + scry = (vd->fbi.yorigin - y) & 0x3ff; \ \ /* compute dithering */ \ COMPUTE_DITHER_POINTERS(FBZMODE, y); \ @@ -4405,8 +2691,8 @@ static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, co INT32 tempclip; \ \ /* Y clipping buys us the whole scanline */ \ - if (scry < ((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || \ - scry >= (v->reg[clipLowYHighY].u & 0x3ff)) \ + if (scry < ((vd->reg[clipLowYHighY].u >> 16) & 0x3ff) || \ + scry >= (vd->reg[clipLowYHighY].u & 0x3ff)) \ { \ stats->pixels_in += stopx - startx; \ stats->clip_fail += stopx - startx; \ @@ -4414,25 +2700,25 @@ static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, co } \ \ /* X clipping */ \ - tempclip = (v->reg[clipLeftRight].u >> 16) & 0x3ff; \ + tempclip = (vd->reg[clipLeftRight].u >> 16) & 0x3ff; \ if (startx < tempclip) \ { \ stats->pixels_in += tempclip - startx; \ - v->stats.total_clipped += tempclip - startx; \ + vd->stats.total_clipped += tempclip - startx; \ startx = tempclip; \ } \ - tempclip = v->reg[clipLeftRight].u & 0x3ff; \ + tempclip = vd->reg[clipLeftRight].u & 0x3ff; \ if (stopx >= tempclip) \ { \ stats->pixels_in += stopx - tempclip; \ - v->stats.total_clipped += stopx - tempclip; \ + vd->stats.total_clipped += stopx - tempclip; \ stopx = tempclip - 1; \ } \ } \ \ /* get pointers to the target buffer and depth buffer */ \ - dest = (UINT16 *)destbase + scry * v->fbi.rowpixels; \ - depth = (v->fbi.auxoffs != ~0) ? ((UINT16 *)(v->fbi.ram + v->fbi.auxoffs) + scry * v->fbi.rowpixels) : NULL; \ + dest = (UINT16 *)destbase + scry * vd->fbi.rowpixels; \ + depth = (vd->fbi.auxoffs != ~0) ? ((UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs) + scry * vd->fbi.rowpixels) : NULL; \ \ /* compute the starting parameters */ \ dx = startx - (extra->ax >> 4); \ @@ -4465,46 +2751,46 @@ static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, co rgbaint_t color, preFog; \ \ /* pixel pipeline part 1 handles depth setup and stippling */ \ - PIXEL_PIPELINE_BEGIN(v, stats, x, y, FBZCOLORPATH, FBZMODE, iterz, iterw); \ + PIXEL_PIPELINE_BEGIN(vd, stats, x, y, FBZCOLORPATH, FBZMODE, iterz, iterw); \ /* depth testing */ \ - if (!depthTest((UINT16) v->reg[zaColor].u, stats, depth[x], FBZMODE, biasdepth)) \ + if (!depthTest((UINT16) vd->reg[zaColor].u, stats, depth[x], FBZMODE, biasdepth)) \ goto skipdrawdepth; \ \ /* run the texture pipeline on TMU1 to produce a value in texel */ \ /* note that they set LOD min to 8 to "disable" a TMU */ \ - if (TMUS >= 2 && v->tmu[1].lodmin < (8 << 8)) { \ + if (TMUS >= 2 && vd->tmu[1].lodmin < (8 << 8)) { \ INT32 tmp; \ const rgbaint_t texelZero(0); \ - texel = genTexture(&v->tmu[1], x, dither4, TEXMODE1, v->tmu[1].lookup, extra->lodbase1, \ + texel = genTexture(&vd->tmu[1], x, dither4, TEXMODE1, vd->tmu[1].lookup, extra->lodbase1, \ iters1, itert1, iterw1, tmp); \ - texel = combineTexture(&v->tmu[1], TEXMODE1, texel, texelZero, tmp); \ + texel = combineTexture(&vd->tmu[1], TEXMODE1, texel, texelZero, tmp); \ } \ /* run the texture pipeline on TMU0 to produce a final */ \ /* result in texel */ \ /* note that they set LOD min to 8 to "disable" a TMU */ \ - if (TMUS >= 1 && v->tmu[0].lodmin < (8 << 8)) \ + if (TMUS >= 1 && vd->tmu[0].lodmin < (8 << 8)) \ { \ - if (!v->send_config) \ + if (!vd->send_config) \ { \ INT32 lod0; \ rgbaint_t texelT0; \ - texelT0 = genTexture(&v->tmu[0], x, dither4, TEXMODE0, v->tmu[0].lookup, extra->lodbase0, \ + texelT0 = genTexture(&vd->tmu[0], x, dither4, TEXMODE0, vd->tmu[0].lookup, extra->lodbase0, \ iters0, itert0, iterw0, lod0); \ - texel = combineTexture(&v->tmu[0], TEXMODE0, texelT0, texel, lod0); \ + texel = combineTexture(&vd->tmu[0], TEXMODE0, texelT0, texel, lod0); \ } \ else \ { \ - texel.set(v->tmu_config); \ + texel.set(vd->tmu_config); \ } \ } \ \ /* colorpath pipeline selects source colors and does blending */ \ color = clampARGB(iterargb, FBZCOLORPATH); \ - if (!combineColor(v, stats, FBZCOLORPATH, FBZMODE, ALPHAMODE, texel, iterz, iterw, color)) \ + if (!combineColor(vd, stats, FBZCOLORPATH, FBZMODE, ALPHAMODE, texel, iterz, iterw, color)) \ goto skipdrawdepth; \ \ /* pixel pipeline part 2 handles fog, alpha, and final output */ \ - PIXEL_PIPELINE_END(v, stats, dither, dither4, dither_lookup, x, dest, depth, \ + PIXEL_PIPELINE_END(vd, stats, dither, dither4, dither_lookup, x, dest, depth, \ FBZMODE, FBZCOLORPATH, ALPHAMODE, FOGMODE, \ iterz, iterw, iterargb); \ \ diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp index 4304b5ebf32..7fe0b94a007 100644 --- a/src/devices/video/voodoo.cpp +++ b/src/devices/video/voodoo.cpp @@ -143,7 +143,7 @@ bits(7:4) and bit(24)), X, and Y: #include "emu.h" -#include "video/polylgcy.h" + #include "video/rgbutil.h" #include "voodoo.h" #include "vooddefs.h" @@ -194,50 +194,6 @@ UINT32 voodoo_reciplog[(2 << RECIPLOG_LOOKUP_BITS) + 2]; -/************************************* - * - * Prototypes - * - *************************************/ - -static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem); -static void init_tmu_shared(tmu_shared_state *s); -static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memory, int tmem); -static void soft_reset(voodoo_state *v); -static void recompute_video_memory(voodoo_state *v); -static void check_stalled_cpu(voodoo_state *v, attotime current_time); -static void flush_fifos(voodoo_state *v, attotime current_time); -static TIMER_CALLBACK( stall_cpu_callback ); -static void stall_cpu(voodoo_state *v, int state, attotime current_time); -static TIMER_CALLBACK( vblank_callback ); -static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data); -static INT32 lfb_direct_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask); -static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask); -static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data); -static INT32 banshee_2d_w(voodoo_state *v, offs_t offset, UINT32 data); - -/* command handlers */ -static INT32 fastfill(voodoo_state *v); -static INT32 swapbuffer(voodoo_state *v, UINT32 data); -static INT32 triangle(voodoo_state *v); -static INT32 begin_triangle(voodoo_state *v); -static INT32 draw_triangle(voodoo_state *v); - -/* triangle helpers */ -static INT32 setup_and_draw_triangle(voodoo_state *v); -static INT32 triangle_create_work_item(voodoo_state *v, UINT16 *drawbuf, int texcount); - -/* rasterizer management */ -static raster_info *add_rasterizer(voodoo_state *v, const raster_info *cinfo); -static raster_info *find_rasterizer(voodoo_state *v, int texcount); -static void dump_rasterizer_stats(voodoo_state *v); - -/* generic rasterizers */ -static void raster_fastfill(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); -static void raster_generic_0tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); -static void raster_generic_1tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); -static void raster_generic_2tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); - /************************************* @@ -262,7 +218,7 @@ static void raster_generic_2tmu(void *dest, INT32 scanline, const poly_extent *e *************************************/ #define RASTERIZER_ENTRY(fbzcp, alpha, fog, fbz, tex0, tex1) \ - { NULL, raster_##fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1, FALSE, 0, 0, 0, fbzcp, alpha, fog, fbz, tex0, tex1 }, + { NULL, voodoo_device::raster_##fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1, FALSE, 0, 0, 0, fbzcp, alpha, fog, fbz, tex0, tex1 }, static const raster_info predef_raster_table[] = { @@ -278,100 +234,84 @@ static const raster_info predef_raster_table[] = INLINE FUNCTIONS ***************************************************************************/ -/*------------------------------------------------- - get_safe_token - makes sure that the passed - in device is, in fact, a voodoo device --------------------------------------------------*/ - -static inline voodoo_state *get_safe_token(device_t *device) -{ - assert(device != nullptr); - assert((device->type() == VOODOO_1) || (device->type() == VOODOO_2) || (device->type() == VOODOO_BANSHEE) || (device->type() == VOODOO_3)); - - return (voodoo_state *)downcast<voodoo_device *>(device)->token(); -} - - - /************************************* * * Video update * *************************************/ -int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &cliprect) +int voodoo_device::voodoo_update(bitmap_rgb32 &bitmap, const rectangle &cliprect) { - voodoo_state *v = get_safe_token(device); - int changed = v->fbi.video_changed; - int drawbuf = v->fbi.frontbuf; + int changed = fbi.video_changed; + int drawbuf = fbi.frontbuf; int statskey; int x, y; /* reset the video changed flag */ - v->fbi.video_changed = FALSE; + fbi.video_changed = FALSE; /* if we are blank, just fill with black */ - if (v->type <= TYPE_VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(v->reg[fbiInit1].u)) + if (vd_type <= TYPE_VOODOO_2 && FBIINIT1_SOFTWARE_BLANK(reg[fbiInit1].u)) { bitmap.fill(0, cliprect); return changed; } /* if the CLUT is dirty, recompute the pens array */ - if (v->fbi.clut_dirty) + if (fbi.clut_dirty) { UINT8 rtable[32], gtable[64], btable[32]; /* Voodoo/Voodoo-2 have an internal 33-entry CLUT */ - if (v->type <= TYPE_VOODOO_2) + if (vd_type <= TYPE_VOODOO_2) { /* kludge: some of the Midway games write 0 to the last entry when they obviously mean FF */ - if ((v->fbi.clut[32] & 0xffffff) == 0 && (v->fbi.clut[31] & 0xffffff) != 0) - v->fbi.clut[32] = 0x20ffffff; + if ((fbi.clut[32] & 0xffffff) == 0 && (fbi.clut[31] & 0xffffff) != 0) + fbi.clut[32] = 0x20ffffff; /* compute the R/G/B pens first */ for (x = 0; x < 32; x++) { /* treat X as a 5-bit value, scale up to 8 bits, and linear interpolate for red/blue */ y = (x << 3) | (x >> 2); - rtable[x] = (v->fbi.clut[y >> 3].r() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].r() * (y & 7)) >> 3; - btable[x] = (v->fbi.clut[y >> 3].b() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].b() * (y & 7)) >> 3; + rtable[x] = (fbi.clut[y >> 3].r() * (8 - (y & 7)) + fbi.clut[(y >> 3) + 1].r() * (y & 7)) >> 3; + btable[x] = (fbi.clut[y >> 3].b() * (8 - (y & 7)) + fbi.clut[(y >> 3) + 1].b() * (y & 7)) >> 3; /* treat X as a 6-bit value with LSB=0, scale up to 8 bits, and linear interpolate */ y = (x * 2) + 0; y = (y << 2) | (y >> 4); - gtable[x*2+0] = (v->fbi.clut[y >> 3].g() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3; + gtable[x*2+0] = (fbi.clut[y >> 3].g() * (8 - (y & 7)) + fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3; /* treat X as a 6-bit value with LSB=1, scale up to 8 bits, and linear interpolate */ y = (x * 2) + 1; y = (y << 2) | (y >> 4); - gtable[x*2+1] = (v->fbi.clut[y >> 3].g() * (8 - (y & 7)) + v->fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3; + gtable[x*2+1] = (fbi.clut[y >> 3].g() * (8 - (y & 7)) + fbi.clut[(y >> 3) + 1].g() * (y & 7)) >> 3; } } /* Banshee and later have a 512-entry CLUT that can be bypassed */ else { - int which = (v->banshee.io[io_vidProcCfg] >> 13) & 1; - int bypass = (v->banshee.io[io_vidProcCfg] >> 11) & 1; + int which = (banshee.io[io_vidProcCfg] >> 13) & 1; + int bypass = (banshee.io[io_vidProcCfg] >> 11) & 1; /* compute R/G/B pens first */ for (x = 0; x < 32; x++) { /* treat X as a 5-bit value, scale up to 8 bits */ y = (x << 3) | (x >> 2); - rtable[x] = bypass ? y : v->fbi.clut[which * 256 + y].r(); - btable[x] = bypass ? y : v->fbi.clut[which * 256 + y].b(); + rtable[x] = bypass ? y : fbi.clut[which * 256 + y].r(); + btable[x] = bypass ? y : fbi.clut[which * 256 + y].b(); /* treat X as a 6-bit value with LSB=0, scale up to 8 bits */ y = (x * 2) + 0; y = (y << 2) | (y >> 4); - gtable[x*2+0] = bypass ? y : v->fbi.clut[which * 256 + y].g(); + gtable[x*2+0] = bypass ? y : fbi.clut[which * 256 + y].g(); /* treat X as a 6-bit value with LSB=1, scale up to 8 bits, and linear interpolate */ y = (x * 2) + 1; y = (y << 2) | (y >> 4); - gtable[x*2+1] = bypass ? y : v->fbi.clut[which * 256 + y].g(); + gtable[x*2+1] = bypass ? y : fbi.clut[which * 256 + y].g(); } } @@ -381,45 +321,45 @@ int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &clipr int r = rtable[(x >> 11) & 0x1f]; int g = gtable[(x >> 5) & 0x3f]; int b = btable[x & 0x1f]; - v->fbi.pen[x] = rgb_t(r, g, b); + fbi.pen[x] = rgb_t(r, g, b); } /* no longer dirty */ - v->fbi.clut_dirty = FALSE; + fbi.clut_dirty = FALSE; changed = TRUE; } /* debugging! */ - if (device->machine().input().code_pressed(KEYCODE_L)) - drawbuf = v->fbi.backbuf; + if (machine().input().code_pressed(KEYCODE_L)) + drawbuf = fbi.backbuf; /* copy from the current front buffer */ for (y = cliprect.min_y; y <= cliprect.max_y; y++) - if (y >= v->fbi.yoffs) + if (y >= fbi.yoffs) { - UINT16 *src = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[drawbuf]) + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs; + UINT16 *src = (UINT16 *)(fbi.ram + fbi.rgboffs[drawbuf]) + (y - fbi.yoffs) * fbi.rowpixels - fbi.xoffs; UINT32 *dst = &bitmap.pix32(y); for (x = cliprect.min_x; x <= cliprect.max_x; x++) - dst[x] = v->fbi.pen[src[x]]; + dst[x] = fbi.pen[src[x]]; } /* update stats display */ - statskey = (device->machine().input().code_pressed(KEYCODE_BACKSLASH) != 0); - if (statskey && statskey != v->stats.lastkey) - v->stats.display = !v->stats.display; - v->stats.lastkey = statskey; + statskey = (machine().input().code_pressed(KEYCODE_BACKSLASH) != 0); + if (statskey && statskey != stats.lastkey) + stats.display = !stats.display; + stats.lastkey = statskey; /* display stats */ - if (v->stats.display) - device->popmessage(v->stats.buffer, 0, 0); + if (stats.display) + popmessage(stats.buffer, 0, 0); /* update render override */ - v->stats.render_override = device->machine().input().code_pressed(KEYCODE_ENTER); - if (DEBUG_DEPTH && v->stats.render_override) + stats.render_override = machine().input().code_pressed(KEYCODE_ENTER); + if (DEBUG_DEPTH && stats.render_override) { for (y = cliprect.min_y; y <= cliprect.max_y; y++) { - UINT16 *src = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs) + (y - v->fbi.yoffs) * v->fbi.rowpixels - v->fbi.xoffs; + UINT16 *src = (UINT16 *)(fbi.ram + fbi.auxoffs) + (y - fbi.yoffs) * fbi.rowpixels - fbi.xoffs; UINT32 *dst = &bitmap.pix32(y); for (x = cliprect.min_x; x <= cliprect.max_x; x++) dst[x] = ((src[x] << 8) & 0xff0000) | ((src[x] >> 0) & 0xff00) | ((src[x] >> 8) & 0xff); @@ -436,26 +376,27 @@ int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &clipr * *************************************/ -int voodoo_get_type(device_t *device) + +int voodoo_device::voodoo_get_type() { - voodoo_state *v = get_safe_token(device); - return v->type; + voodoo_device *vd = this; + return vd->vd_type; } -int voodoo_is_stalled(device_t *device) +int voodoo_device::voodoo_is_stalled() { - voodoo_state *v = get_safe_token(device); - return (v->pci.stall_state != NOT_STALLED); + voodoo_device *vd = this; + return (vd->pci.stall_state != NOT_STALLED); } -void voodoo_set_init_enable(device_t *device, UINT32 newval) +void voodoo_device::voodoo_set_init_enable(UINT32 newval) { - voodoo_state *v = get_safe_token(device); - v->pci.init_enable = newval; + voodoo_device *vd = this; + vd->pci.init_enable = newval; if (LOG_REGISTERS) - device->logerror("VOODOO.%d.REG:initEnable write = %08X\n", v->index, newval); + logerror("VOODOO.%d.REG:initEnable write = %08X\n", vd->index, newval); } @@ -466,7 +407,7 @@ void voodoo_set_init_enable(device_t *device, UINT32 newval) * *************************************/ -static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem) +void voodoo_device::init_fbi(voodoo_device* vd,fbi_state *f, void *memory, int fbmem) { int pen; @@ -484,20 +425,20 @@ static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem) /* init the pens */ f->clut_dirty = TRUE; - if (v->type <= TYPE_VOODOO_2) + if (vd->vd_type <= TYPE_VOODOO_2) { for (pen = 0; pen < 32; pen++) - v->fbi.clut[pen] = rgb_t(pen, pal5bit(pen), pal5bit(pen), pal5bit(pen)); - v->fbi.clut[32] = rgb_t(32,0xff,0xff,0xff); + vd->fbi.clut[pen] = rgb_t(pen, pal5bit(pen), pal5bit(pen), pal5bit(pen)); + vd->fbi.clut[32] = rgb_t(32,0xff,0xff,0xff); } else { for (pen = 0; pen < 512; pen++) - v->fbi.clut[pen] = rgb_t(pen,pen,pen); + vd->fbi.clut[pen] = rgb_t(pen,pen,pen); } /* allocate a VBLANK timer */ - f->vblank_timer = v->device->machine().scheduler().timer_alloc(FUNC(vblank_callback), v); + f->vblank_timer = vd->device->machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(voodoo_device::vblank_callback),vd), vd); f->vblank = FALSE; /* initialize the memory FIFO */ @@ -505,11 +446,11 @@ static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem) f->fifo.size = f->fifo.in = f->fifo.out = 0; /* set the fog delta mask */ - f->fogdelta_mask = (v->type < TYPE_VOODOO_2) ? 0xff : 0xfc; + f->fogdelta_mask = (vd->vd_type < TYPE_VOODOO_2) ? 0xff : 0xfc; } -static void init_tmu_shared(tmu_shared_state *s) +void voodoo_device::init_tmu_shared(tmu_shared_state *s) { int val; @@ -554,14 +495,14 @@ static void init_tmu_shared(tmu_shared_state *s) } -static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memory, int tmem) +void voodoo_device::init_tmu(voodoo_device* vd, tmu_state *t, voodoo_reg *reg, void *memory, int tmem) { /* allocate texture RAM */ t->ram = (UINT8 *)memory; t->mask = tmem - 1; t->reg = reg; t->regdirty = TRUE; - t->bilinear_mask = (v->type >= TYPE_VOODOO_2) ? 0xff : 0xf0; + t->bilinear_mask = (vd->vd_type >= TYPE_VOODOO_2) ? 0xff : 0xf0; /* mark the NCC tables dirty and configure their registers */ t->ncc[0].dirty = t->ncc[1].dirty = TRUE; @@ -569,31 +510,31 @@ static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memor t->ncc[1].reg = &t->reg[nccTable+12]; /* create pointers to all the tables */ - t->texel[0] = v->tmushare.rgb332; + t->texel[0] = vd->tmushare.rgb332; t->texel[1] = t->ncc[0].texel; - t->texel[2] = v->tmushare.alpha8; - t->texel[3] = v->tmushare.int8; - t->texel[4] = v->tmushare.ai44; + t->texel[2] = vd->tmushare.alpha8; + t->texel[3] = vd->tmushare.int8; + t->texel[4] = vd->tmushare.ai44; t->texel[5] = t->palette; - t->texel[6] = (v->type >= TYPE_VOODOO_2) ? t->palettea : nullptr; + t->texel[6] = (vd->vd_type >= TYPE_VOODOO_2) ? t->palettea : nullptr; t->texel[7] = nullptr; - t->texel[8] = v->tmushare.rgb332; + t->texel[8] = vd->tmushare.rgb332; t->texel[9] = t->ncc[0].texel; - t->texel[10] = v->tmushare.rgb565; - t->texel[11] = v->tmushare.argb1555; - t->texel[12] = v->tmushare.argb4444; - t->texel[13] = v->tmushare.int8; + t->texel[10] = vd->tmushare.rgb565; + t->texel[11] = vd->tmushare.argb1555; + t->texel[12] = vd->tmushare.argb4444; + t->texel[13] = vd->tmushare.int8; t->texel[14] = t->palette; t->texel[15] = nullptr; t->lookup = t->texel[0]; /* attach the palette to NCC table 0 */ t->ncc[0].palette = t->palette; - if (v->type >= TYPE_VOODOO_2) + if (vd->vd_type >= TYPE_VOODOO_2) t->ncc[0].palettea = t->palettea; /* set up texture address calculations */ - if (v->type <= TYPE_VOODOO_2) + if (vd->vd_type <= TYPE_VOODOO_2) { t->texaddr_mask = 0x0fffff; t->texaddr_shift = 3; @@ -606,181 +547,180 @@ static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memor } -static void voodoo_postload(voodoo_state *v) +void voodoo_device::voodoo_postload(voodoo_device *vd) { int index, subindex; - v->fbi.clut_dirty = TRUE; - for (index = 0; index < ARRAY_LENGTH(v->tmu); index++) + vd->fbi.clut_dirty = TRUE; + for (index = 0; index < ARRAY_LENGTH(vd->tmu); index++) { - v->tmu[index].regdirty = TRUE; - for (subindex = 0; subindex < ARRAY_LENGTH(v->tmu[index].ncc); subindex++) - v->tmu[index].ncc[subindex].dirty = TRUE; + vd->tmu[index].regdirty = TRUE; + for (subindex = 0; subindex < ARRAY_LENGTH(vd->tmu[index].ncc); subindex++) + vd->tmu[index].ncc[subindex].dirty = TRUE; } /* recompute video memory to get the FBI FIFO base recomputed */ - if (v->type <= TYPE_VOODOO_2) - recompute_video_memory(v); + if (vd->vd_type <= TYPE_VOODOO_2) + recompute_video_memory(vd); } -static void init_save_state(device_t *device) +static void init_save_state(voodoo_device *vd) { - voodoo_state *v = get_safe_token(device); int index, subindex; - device->machine().save().register_postload(save_prepost_delegate(FUNC(voodoo_postload), v)); + vd->machine().save().register_postload(save_prepost_delegate(FUNC(voodoo_device::voodoo_postload), vd)); /* register states: core */ - device->save_item(NAME(v->extra_cycles)); - device->save_pointer(NAME(&v->reg[0].u), ARRAY_LENGTH(v->reg)); - device->save_item(NAME(v->alt_regmap)); + vd->save_item(NAME(vd->extra_cycles)); + vd->save_pointer(NAME(&vd->reg[0].u), ARRAY_LENGTH(vd->reg)); + vd->save_item(NAME(vd->alt_regmap)); /* register states: pci */ - device->save_item(NAME(v->pci.fifo.in)); - device->save_item(NAME(v->pci.fifo.out)); - device->save_item(NAME(v->pci.init_enable)); - device->save_item(NAME(v->pci.stall_state)); - device->save_item(NAME(v->pci.op_pending)); - device->save_item(NAME(v->pci.op_end_time)); - device->save_item(NAME(v->pci.fifo_mem)); + vd->save_item(NAME(vd->pci.fifo.in)); + vd->save_item(NAME(vd->pci.fifo.out)); + vd->save_item(NAME(vd->pci.init_enable)); + vd->save_item(NAME(vd->pci.stall_state)); + vd->save_item(NAME(vd->pci.op_pending)); + vd->save_item(NAME(vd->pci.op_end_time)); + vd->save_item(NAME(vd->pci.fifo_mem)); /* register states: dac */ - device->save_item(NAME(v->dac.reg)); - device->save_item(NAME(v->dac.read_result)); + vd->save_item(NAME(vd->dac.reg)); + vd->save_item(NAME(vd->dac.read_result)); /* register states: fbi */ - device->save_pointer(NAME(v->fbi.ram), v->fbi.mask + 1); - device->save_item(NAME(v->fbi.rgboffs)); - device->save_item(NAME(v->fbi.auxoffs)); - device->save_item(NAME(v->fbi.frontbuf)); - device->save_item(NAME(v->fbi.backbuf)); - device->save_item(NAME(v->fbi.swaps_pending)); - device->save_item(NAME(v->fbi.video_changed)); - device->save_item(NAME(v->fbi.yorigin)); - device->save_item(NAME(v->fbi.lfb_base)); - device->save_item(NAME(v->fbi.lfb_stride)); - device->save_item(NAME(v->fbi.width)); - device->save_item(NAME(v->fbi.height)); - device->save_item(NAME(v->fbi.xoffs)); - device->save_item(NAME(v->fbi.yoffs)); - device->save_item(NAME(v->fbi.vsyncscan)); - device->save_item(NAME(v->fbi.rowpixels)); - device->save_item(NAME(v->fbi.vblank)); - device->save_item(NAME(v->fbi.vblank_count)); - device->save_item(NAME(v->fbi.vblank_swap_pending)); - device->save_item(NAME(v->fbi.vblank_swap)); - device->save_item(NAME(v->fbi.vblank_dont_swap)); - device->save_item(NAME(v->fbi.cheating_allowed)); - device->save_item(NAME(v->fbi.sign)); - device->save_item(NAME(v->fbi.ax)); - device->save_item(NAME(v->fbi.ay)); - device->save_item(NAME(v->fbi.bx)); - device->save_item(NAME(v->fbi.by)); - device->save_item(NAME(v->fbi.cx)); - device->save_item(NAME(v->fbi.cy)); - device->save_item(NAME(v->fbi.startr)); - device->save_item(NAME(v->fbi.startg)); - device->save_item(NAME(v->fbi.startb)); - device->save_item(NAME(v->fbi.starta)); - device->save_item(NAME(v->fbi.startz)); - device->save_item(NAME(v->fbi.startw)); - device->save_item(NAME(v->fbi.drdx)); - device->save_item(NAME(v->fbi.dgdx)); - device->save_item(NAME(v->fbi.dbdx)); - device->save_item(NAME(v->fbi.dadx)); - device->save_item(NAME(v->fbi.dzdx)); - device->save_item(NAME(v->fbi.dwdx)); - device->save_item(NAME(v->fbi.drdy)); - device->save_item(NAME(v->fbi.dgdy)); - device->save_item(NAME(v->fbi.dbdy)); - device->save_item(NAME(v->fbi.dady)); - device->save_item(NAME(v->fbi.dzdy)); - device->save_item(NAME(v->fbi.dwdy)); - device->save_item(NAME(v->fbi.lfb_stats.pixels_in)); - device->save_item(NAME(v->fbi.lfb_stats.pixels_out)); - device->save_item(NAME(v->fbi.lfb_stats.chroma_fail)); - device->save_item(NAME(v->fbi.lfb_stats.zfunc_fail)); - device->save_item(NAME(v->fbi.lfb_stats.afunc_fail)); - device->save_item(NAME(v->fbi.lfb_stats.clip_fail)); - device->save_item(NAME(v->fbi.lfb_stats.stipple_count)); - device->save_item(NAME(v->fbi.sverts)); - for (index = 0; index < ARRAY_LENGTH(v->fbi.svert); index++) + vd->save_pointer(NAME(vd->fbi.ram), vd->fbi.mask + 1); + vd->save_item(NAME(vd->fbi.rgboffs)); + vd->save_item(NAME(vd->fbi.auxoffs)); + vd->save_item(NAME(vd->fbi.frontbuf)); + vd->save_item(NAME(vd->fbi.backbuf)); + vd->save_item(NAME(vd->fbi.swaps_pending)); + vd->save_item(NAME(vd->fbi.video_changed)); + vd->save_item(NAME(vd->fbi.yorigin)); + vd->save_item(NAME(vd->fbi.lfb_base)); + vd->save_item(NAME(vd->fbi.lfb_stride)); + vd->save_item(NAME(vd->fbi.width)); + vd->save_item(NAME(vd->fbi.height)); + vd->save_item(NAME(vd->fbi.xoffs)); + vd->save_item(NAME(vd->fbi.yoffs)); + vd->save_item(NAME(vd->fbi.vsyncscan)); + vd->save_item(NAME(vd->fbi.rowpixels)); + vd->save_item(NAME(vd->fbi.vblank)); + vd->save_item(NAME(vd->fbi.vblank_count)); + vd->save_item(NAME(vd->fbi.vblank_swap_pending)); + vd->save_item(NAME(vd->fbi.vblank_swap)); + vd->save_item(NAME(vd->fbi.vblank_dont_swap)); + vd->save_item(NAME(vd->fbi.cheating_allowed)); + vd->save_item(NAME(vd->fbi.sign)); + vd->save_item(NAME(vd->fbi.ax)); + vd->save_item(NAME(vd->fbi.ay)); + vd->save_item(NAME(vd->fbi.bx)); + vd->save_item(NAME(vd->fbi.by)); + vd->save_item(NAME(vd->fbi.cx)); + vd->save_item(NAME(vd->fbi.cy)); + vd->save_item(NAME(vd->fbi.startr)); + vd->save_item(NAME(vd->fbi.startg)); + vd->save_item(NAME(vd->fbi.startb)); + vd->save_item(NAME(vd->fbi.starta)); + vd->save_item(NAME(vd->fbi.startz)); + vd->save_item(NAME(vd->fbi.startw)); + vd->save_item(NAME(vd->fbi.drdx)); + vd->save_item(NAME(vd->fbi.dgdx)); + vd->save_item(NAME(vd->fbi.dbdx)); + vd->save_item(NAME(vd->fbi.dadx)); + vd->save_item(NAME(vd->fbi.dzdx)); + vd->save_item(NAME(vd->fbi.dwdx)); + vd->save_item(NAME(vd->fbi.drdy)); + vd->save_item(NAME(vd->fbi.dgdy)); + vd->save_item(NAME(vd->fbi.dbdy)); + vd->save_item(NAME(vd->fbi.dady)); + vd->save_item(NAME(vd->fbi.dzdy)); + vd->save_item(NAME(vd->fbi.dwdy)); + vd->save_item(NAME(vd->fbi.lfb_stats.pixels_in)); + vd->save_item(NAME(vd->fbi.lfb_stats.pixels_out)); + vd->save_item(NAME(vd->fbi.lfb_stats.chroma_fail)); + vd->save_item(NAME(vd->fbi.lfb_stats.zfunc_fail)); + vd->save_item(NAME(vd->fbi.lfb_stats.afunc_fail)); + vd->save_item(NAME(vd->fbi.lfb_stats.clip_fail)); + vd->save_item(NAME(vd->fbi.lfb_stats.stipple_count)); + vd->save_item(NAME(vd->fbi.sverts)); + for (index = 0; index < ARRAY_LENGTH(vd->fbi.svert); index++) { - device->save_item(NAME(v->fbi.svert[index].x), index); - device->save_item(NAME(v->fbi.svert[index].y), index); - device->save_item(NAME(v->fbi.svert[index].a), index); - device->save_item(NAME(v->fbi.svert[index].r), index); - device->save_item(NAME(v->fbi.svert[index].g), index); - device->save_item(NAME(v->fbi.svert[index].b), index); - device->save_item(NAME(v->fbi.svert[index].z), index); - device->save_item(NAME(v->fbi.svert[index].wb), index); - device->save_item(NAME(v->fbi.svert[index].w0), index); - device->save_item(NAME(v->fbi.svert[index].s0), index); - device->save_item(NAME(v->fbi.svert[index].t0), index); - device->save_item(NAME(v->fbi.svert[index].w1), index); - device->save_item(NAME(v->fbi.svert[index].s1), index); - device->save_item(NAME(v->fbi.svert[index].t1), index); + vd->save_item(NAME(vd->fbi.svert[index].x), index); + vd->save_item(NAME(vd->fbi.svert[index].y), index); + vd->save_item(NAME(vd->fbi.svert[index].a), index); + vd->save_item(NAME(vd->fbi.svert[index].r), index); + vd->save_item(NAME(vd->fbi.svert[index].g), index); + vd->save_item(NAME(vd->fbi.svert[index].b), index); + vd->save_item(NAME(vd->fbi.svert[index].z), index); + vd->save_item(NAME(vd->fbi.svert[index].wb), index); + vd->save_item(NAME(vd->fbi.svert[index].w0), index); + vd->save_item(NAME(vd->fbi.svert[index].s0), index); + vd->save_item(NAME(vd->fbi.svert[index].t0), index); + vd->save_item(NAME(vd->fbi.svert[index].w1), index); + vd->save_item(NAME(vd->fbi.svert[index].s1), index); + vd->save_item(NAME(vd->fbi.svert[index].t1), index); } - device->save_item(NAME(v->fbi.fifo.size)); - device->save_item(NAME(v->fbi.fifo.in)); - device->save_item(NAME(v->fbi.fifo.out)); - for (index = 0; index < ARRAY_LENGTH(v->fbi.cmdfifo); index++) + vd->save_item(NAME(vd->fbi.fifo.size)); + vd->save_item(NAME(vd->fbi.fifo.in)); + vd->save_item(NAME(vd->fbi.fifo.out)); + for (index = 0; index < ARRAY_LENGTH(vd->fbi.cmdfifo); index++) { - device->save_item(NAME(v->fbi.cmdfifo[index].enable), index); - device->save_item(NAME(v->fbi.cmdfifo[index].count_holes), index); - device->save_item(NAME(v->fbi.cmdfifo[index].base), index); - device->save_item(NAME(v->fbi.cmdfifo[index].end), index); - device->save_item(NAME(v->fbi.cmdfifo[index].rdptr), index); - device->save_item(NAME(v->fbi.cmdfifo[index].amin), index); - device->save_item(NAME(v->fbi.cmdfifo[index].amax), index); - device->save_item(NAME(v->fbi.cmdfifo[index].depth), index); - device->save_item(NAME(v->fbi.cmdfifo[index].holes), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].enable), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].count_holes), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].base), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].end), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].rdptr), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].amin), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].amax), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].depth), index); + vd->save_item(NAME(vd->fbi.cmdfifo[index].holes), index); } - device->save_item(NAME(v->fbi.fogblend)); - device->save_item(NAME(v->fbi.fogdelta)); - device->save_item(NAME(v->fbi.clut)); + vd->save_item(NAME(vd->fbi.fogblend)); + vd->save_item(NAME(vd->fbi.fogdelta)); + vd->save_item(NAME(vd->fbi.clut)); /* register states: tmu */ - for (index = 0; index < ARRAY_LENGTH(v->tmu); index++) + for (index = 0; index < ARRAY_LENGTH(vd->tmu); index++) { - tmu_state *tmu = &v->tmu[index]; + tmu_state *tmu = &vd->tmu[index]; if (tmu->ram == nullptr) continue; - if (tmu->ram != v->fbi.ram) - device->save_pointer(NAME(tmu->ram), tmu->mask + 1, index); - device->save_item(NAME(tmu->starts), index); - device->save_item(NAME(tmu->startt), index); - device->save_item(NAME(tmu->startw), index); - device->save_item(NAME(tmu->dsdx), index); - device->save_item(NAME(tmu->dtdx), index); - device->save_item(NAME(tmu->dwdx), index); - device->save_item(NAME(tmu->dsdy), index); - device->save_item(NAME(tmu->dtdy), index); - device->save_item(NAME(tmu->dwdy), index); + if (tmu->ram != vd->fbi.ram) + vd->save_pointer(NAME(tmu->ram), tmu->mask + 1, index); + vd->save_item(NAME(tmu->starts), index); + vd->save_item(NAME(tmu->startt), index); + vd->save_item(NAME(tmu->startw), index); + vd->save_item(NAME(tmu->dsdx), index); + vd->save_item(NAME(tmu->dtdx), index); + vd->save_item(NAME(tmu->dwdx), index); + vd->save_item(NAME(tmu->dsdy), index); + vd->save_item(NAME(tmu->dtdy), index); + vd->save_item(NAME(tmu->dwdy), index); for (subindex = 0; subindex < ARRAY_LENGTH(tmu->ncc); subindex++) { - device->save_item(NAME(tmu->ncc[subindex].ir), index * ARRAY_LENGTH(tmu->ncc) + subindex); - device->save_item(NAME(tmu->ncc[subindex].ig), index * ARRAY_LENGTH(tmu->ncc) + subindex); - device->save_item(NAME(tmu->ncc[subindex].ib), index * ARRAY_LENGTH(tmu->ncc) + subindex); - device->save_item(NAME(tmu->ncc[subindex].qr), index * ARRAY_LENGTH(tmu->ncc) + subindex); - device->save_item(NAME(tmu->ncc[subindex].qg), index * ARRAY_LENGTH(tmu->ncc) + subindex); - device->save_item(NAME(tmu->ncc[subindex].qb), index * ARRAY_LENGTH(tmu->ncc) + subindex); - device->save_item(NAME(tmu->ncc[subindex].y), index * ARRAY_LENGTH(tmu->ncc) + subindex); + vd->save_item(NAME(tmu->ncc[subindex].ir), index * ARRAY_LENGTH(tmu->ncc) + subindex); + vd->save_item(NAME(tmu->ncc[subindex].ig), index * ARRAY_LENGTH(tmu->ncc) + subindex); + vd->save_item(NAME(tmu->ncc[subindex].ib), index * ARRAY_LENGTH(tmu->ncc) + subindex); + vd->save_item(NAME(tmu->ncc[subindex].qr), index * ARRAY_LENGTH(tmu->ncc) + subindex); + vd->save_item(NAME(tmu->ncc[subindex].qg), index * ARRAY_LENGTH(tmu->ncc) + subindex); + vd->save_item(NAME(tmu->ncc[subindex].qb), index * ARRAY_LENGTH(tmu->ncc) + subindex); + vd->save_item(NAME(tmu->ncc[subindex].y), index * ARRAY_LENGTH(tmu->ncc) + subindex); } } /* register states: banshee */ - if (v->type >= TYPE_VOODOO_BANSHEE) + if (vd->vd_type >= TYPE_VOODOO_BANSHEE) { - device->save_item(NAME(v->banshee.io)); - device->save_item(NAME(v->banshee.agp)); - device->save_item(NAME(v->banshee.vga)); - device->save_item(NAME(v->banshee.crtc)); - device->save_item(NAME(v->banshee.seq)); - device->save_item(NAME(v->banshee.gc)); - device->save_item(NAME(v->banshee.att)); - device->save_item(NAME(v->banshee.attff)); + vd->save_item(NAME(vd->banshee.io)); + vd->save_item(NAME(vd->banshee.agp)); + vd->save_item(NAME(vd->banshee.vga)); + vd->save_item(NAME(vd->banshee.crtc)); + vd->save_item(NAME(vd->banshee.seq)); + vd->save_item(NAME(vd->banshee.gc)); + vd->save_item(NAME(vd->banshee.att)); + vd->save_item(NAME(vd->banshee.attff)); } } @@ -792,27 +732,27 @@ static void init_save_state(device_t *device) * *************************************/ -static void accumulate_statistics(voodoo_state *v, const stats_block *stats) +static void accumulate_statistics(voodoo_device *vd, const stats_block *stats) { /* apply internal voodoo statistics */ - v->reg[fbiPixelsIn].u += stats->pixels_in; - v->reg[fbiPixelsOut].u += stats->pixels_out; - v->reg[fbiChromaFail].u += stats->chroma_fail; - v->reg[fbiZfuncFail].u += stats->zfunc_fail; - v->reg[fbiAfuncFail].u += stats->afunc_fail; + vd->reg[fbiPixelsIn].u += stats->pixels_in; + vd->reg[fbiPixelsOut].u += stats->pixels_out; + vd->reg[fbiChromaFail].u += stats->chroma_fail; + vd->reg[fbiZfuncFail].u += stats->zfunc_fail; + vd->reg[fbiAfuncFail].u += stats->afunc_fail; /* apply emulation statistics */ - v->stats.total_pixels_in += stats->pixels_in; - v->stats.total_pixels_out += stats->pixels_out; - v->stats.total_chroma_fail += stats->chroma_fail; - v->stats.total_zfunc_fail += stats->zfunc_fail; - v->stats.total_afunc_fail += stats->afunc_fail; - v->stats.total_clipped += stats->clip_fail; - v->stats.total_stippled += stats->stipple_count; + vd->stats.total_pixels_in += stats->pixels_in; + vd->stats.total_pixels_out += stats->pixels_out; + vd->stats.total_chroma_fail += stats->chroma_fail; + vd->stats.total_zfunc_fail += stats->zfunc_fail; + vd->stats.total_afunc_fail += stats->afunc_fail; + vd->stats.total_clipped += stats->clip_fail; + vd->stats.total_stippled += stats->stipple_count; } -static void update_statistics(voodoo_state *v, int accumulate) +static void update_statistics(voodoo_device *vd, int accumulate) { int threadnum; @@ -820,14 +760,14 @@ static void update_statistics(voodoo_state *v, int accumulate) for (threadnum = 0; threadnum < WORK_MAX_THREADS; threadnum++) { if (accumulate) - accumulate_statistics(v, &v->thread_stats[threadnum]); - memset(&v->thread_stats[threadnum], 0, sizeof(v->thread_stats[threadnum])); + accumulate_statistics(vd, &vd->thread_stats[threadnum]); + memset(&vd->thread_stats[threadnum], 0, sizeof(vd->thread_stats[threadnum])); } /* accumulate/reset statistics from the LFB */ if (accumulate) - accumulate_statistics(v, &v->fbi.lfb_stats); - memset(&v->fbi.lfb_stats, 0, sizeof(v->fbi.lfb_stats)); + accumulate_statistics(vd, &vd->fbi.lfb_stats); + memset(&vd->fbi.lfb_stats, 0, sizeof(vd->fbi.lfb_stats)); } @@ -838,210 +778,208 @@ static void update_statistics(voodoo_state *v, int accumulate) * *************************************/ -static void swap_buffers(voodoo_state *v) +void voodoo_device::swap_buffers(voodoo_device *vd) { int count; - if (LOG_VBLANK_SWAP) v->device->logerror("--- swap_buffers @ %d\n", v->screen->vpos()); + if (LOG_VBLANK_SWAP) vd->device->logerror("--- swap_buffers @ %d\n", vd->screen->vpos()); /* force a partial update */ - v->screen->update_partial(v->screen->vpos()); - v->fbi.video_changed = TRUE; + vd->screen->update_partial(vd->screen->vpos()); + vd->fbi.video_changed = TRUE; /* keep a history of swap intervals */ - count = v->fbi.vblank_count; + count = vd->fbi.vblank_count; if (count > 15) count = 15; - v->reg[fbiSwapHistory].u = (v->reg[fbiSwapHistory].u << 4) | count; + vd->reg[fbiSwapHistory].u = (vd->reg[fbiSwapHistory].u << 4) | count; /* rotate the buffers */ - if (v->type <= TYPE_VOODOO_2) + if (vd->vd_type <= TYPE_VOODOO_2) { - if (v->type < TYPE_VOODOO_2 || !v->fbi.vblank_dont_swap) + if (vd->vd_type < TYPE_VOODOO_2 || !vd->fbi.vblank_dont_swap) { - if (v->fbi.rgboffs[2] == ~0) + if (vd->fbi.rgboffs[2] == ~0) { - v->fbi.frontbuf = 1 - v->fbi.frontbuf; - v->fbi.backbuf = 1 - v->fbi.frontbuf; + vd->fbi.frontbuf = 1 - vd->fbi.frontbuf; + vd->fbi.backbuf = 1 - vd->fbi.frontbuf; } else { - v->fbi.frontbuf = (v->fbi.frontbuf + 1) % 3; - v->fbi.backbuf = (v->fbi.frontbuf + 1) % 3; + vd->fbi.frontbuf = (vd->fbi.frontbuf + 1) % 3; + vd->fbi.backbuf = (vd->fbi.frontbuf + 1) % 3; } } } else - v->fbi.rgboffs[0] = v->reg[leftOverlayBuf].u & v->fbi.mask & ~0x0f; + vd->fbi.rgboffs[0] = vd->reg[leftOverlayBuf].u & vd->fbi.mask & ~0x0f; /* decrement the pending count and reset our state */ - if (v->fbi.swaps_pending) - v->fbi.swaps_pending--; - v->fbi.vblank_count = 0; - v->fbi.vblank_swap_pending = FALSE; + if (vd->fbi.swaps_pending) + vd->fbi.swaps_pending--; + vd->fbi.vblank_count = 0; + vd->fbi.vblank_swap_pending = FALSE; /* reset the last_op_time to now and start processing the next command */ - if (v->pci.op_pending) + if (vd->pci.op_pending) { - v->pci.op_end_time = v->device->machine().time(); - flush_fifos(v, v->pci.op_end_time); + vd->pci.op_end_time = vd->device->machine().time(); + flush_fifos(vd, vd->pci.op_end_time); } /* we may be able to unstall now */ - if (v->pci.stall_state != NOT_STALLED) - check_stalled_cpu(v, v->device->machine().time()); + if (vd->pci.stall_state != NOT_STALLED) + check_stalled_cpu(vd, vd->device->machine().time()); /* periodically log rasterizer info */ - v->stats.swaps++; - if (LOG_RASTERIZERS && v->stats.swaps % 1000 == 0) - dump_rasterizer_stats(v); + vd->stats.swaps++; + if (LOG_RASTERIZERS && vd->stats.swaps % 1000 == 0) + dump_rasterizer_stats(vd); /* update the statistics (debug) */ - if (v->stats.display) + if (vd->stats.display) { - const rectangle &visible_area = v->screen->visible_area(); + const rectangle &visible_area = vd->screen->visible_area(); int screen_area = visible_area.width() * visible_area.height(); - char *statsptr = v->stats.buffer; + char *statsptr = vd->stats.buffer; int pixelcount; int i; - update_statistics(v, TRUE); - pixelcount = v->stats.total_pixels_out; + update_statistics(vd, TRUE); + pixelcount = vd->stats.total_pixels_out; - statsptr += sprintf(statsptr, "Swap:%6d\n", v->stats.swaps); - statsptr += sprintf(statsptr, "Hist:%08X\n", v->reg[fbiSwapHistory].u); - statsptr += sprintf(statsptr, "Stal:%6d\n", v->stats.stalls); + statsptr += sprintf(statsptr, "Swap:%6d\n", vd->stats.swaps); + statsptr += sprintf(statsptr, "Hist:%08X\n", vd->reg[fbiSwapHistory].u); + statsptr += sprintf(statsptr, "Stal:%6d\n", vd->stats.stalls); statsptr += sprintf(statsptr, "Rend:%6d%%\n", pixelcount * 100 / screen_area); - statsptr += sprintf(statsptr, "Poly:%6d\n", v->stats.total_triangles); - statsptr += sprintf(statsptr, "PxIn:%6d\n", v->stats.total_pixels_in); - statsptr += sprintf(statsptr, "POut:%6d\n", v->stats.total_pixels_out); - statsptr += sprintf(statsptr, "Clip:%6d\n", v->stats.total_clipped); - statsptr += sprintf(statsptr, "Stip:%6d\n", v->stats.total_stippled); - statsptr += sprintf(statsptr, "Chro:%6d\n", v->stats.total_chroma_fail); - statsptr += sprintf(statsptr, "ZFun:%6d\n", v->stats.total_zfunc_fail); - statsptr += sprintf(statsptr, "AFun:%6d\n", v->stats.total_afunc_fail); - statsptr += sprintf(statsptr, "RegW:%6d\n", v->stats.reg_writes); - statsptr += sprintf(statsptr, "RegR:%6d\n", v->stats.reg_reads); - statsptr += sprintf(statsptr, "LFBW:%6d\n", v->stats.lfb_writes); - statsptr += sprintf(statsptr, "LFBR:%6d\n", v->stats.lfb_reads); - statsptr += sprintf(statsptr, "TexW:%6d\n", v->stats.tex_writes); + statsptr += sprintf(statsptr, "Poly:%6d\n", vd->stats.total_triangles); + statsptr += sprintf(statsptr, "PxIn:%6d\n", vd->stats.total_pixels_in); + statsptr += sprintf(statsptr, "POut:%6d\n", vd->stats.total_pixels_out); + statsptr += sprintf(statsptr, "Clip:%6d\n", vd->stats.total_clipped); + statsptr += sprintf(statsptr, "Stip:%6d\n", vd->stats.total_stippled); + statsptr += sprintf(statsptr, "Chro:%6d\n", vd->stats.total_chroma_fail); + statsptr += sprintf(statsptr, "ZFun:%6d\n", vd->stats.total_zfunc_fail); + statsptr += sprintf(statsptr, "AFun:%6d\n", vd->stats.total_afunc_fail); + statsptr += sprintf(statsptr, "RegW:%6d\n", vd->stats.reg_writes); + statsptr += sprintf(statsptr, "RegR:%6d\n", vd->stats.reg_reads); + statsptr += sprintf(statsptr, "LFBW:%6d\n", vd->stats.lfb_writes); + statsptr += sprintf(statsptr, "LFBR:%6d\n", vd->stats.lfb_reads); + statsptr += sprintf(statsptr, "TexW:%6d\n", vd->stats.tex_writes); statsptr += sprintf(statsptr, "TexM:"); for (i = 0; i < 16; i++) - if (v->stats.texture_mode[i]) + if (vd->stats.texture_mode[i]) *statsptr++ = "0123456789ABCDEF"[i]; *statsptr = 0; } /* update statistics */ - v->stats.stalls = 0; - v->stats.total_triangles = 0; - v->stats.total_pixels_in = 0; - v->stats.total_pixels_out = 0; - v->stats.total_chroma_fail = 0; - v->stats.total_zfunc_fail = 0; - v->stats.total_afunc_fail = 0; - v->stats.total_clipped = 0; - v->stats.total_stippled = 0; - v->stats.reg_writes = 0; - v->stats.reg_reads = 0; - v->stats.lfb_writes = 0; - v->stats.lfb_reads = 0; - v->stats.tex_writes = 0; - memset(v->stats.texture_mode, 0, sizeof(v->stats.texture_mode)); + vd->stats.stalls = 0; + vd->stats.total_triangles = 0; + vd->stats.total_pixels_in = 0; + vd->stats.total_pixels_out = 0; + vd->stats.total_chroma_fail = 0; + vd->stats.total_zfunc_fail = 0; + vd->stats.total_afunc_fail = 0; + vd->stats.total_clipped = 0; + vd->stats.total_stippled = 0; + vd->stats.reg_writes = 0; + vd->stats.reg_reads = 0; + vd->stats.lfb_writes = 0; + vd->stats.lfb_reads = 0; + vd->stats.tex_writes = 0; + memset(vd->stats.texture_mode, 0, sizeof(vd->stats.texture_mode)); } -static void adjust_vblank_timer(voodoo_state *v) +static void adjust_vblank_timer(voodoo_device *vd) { - attotime vblank_period = v->screen->time_until_pos(v->fbi.vsyncscan); + attotime vblank_period = vd->screen->time_until_pos(vd->fbi.vsyncscan); /* if zero, adjust to next frame, otherwise we may get stuck in an infinite loop */ if (vblank_period == attotime::zero) - vblank_period = v->screen->frame_period(); - v->fbi.vblank_timer->adjust(vblank_period); + vblank_period = vd->screen->frame_period(); + vd->fbi.vblank_timer->adjust(vblank_period); } -static TIMER_CALLBACK( vblank_off_callback ) +TIMER_CALLBACK_MEMBER( voodoo_device::vblank_off_callback ) { - voodoo_state *v = (voodoo_state *)ptr; - - if (LOG_VBLANK_SWAP) v->device->logerror("--- vblank end\n"); + if (LOG_VBLANK_SWAP) device->logerror("--- vblank end\n"); /* set internal state and call the client */ - v->fbi.vblank = FALSE; + fbi.vblank = FALSE; // TODO: Vblank IRQ enable is VOODOO3 only? - if (v->type >= TYPE_VOODOO_3) + if (vd_type >= TYPE_VOODOO_3) { - if (v->reg[intrCtrl].u & 0x8) // call IRQ handler if VSYNC interrupt (falling) is enabled + if (reg[intrCtrl].u & 0x8) // call IRQ handler if VSYNC interrupt (falling) is enabled { - v->reg[intrCtrl].u |= 0x200; // VSYNC int (falling) active + reg[intrCtrl].u |= 0x200; // VSYNC int (falling) active - if (!v->device->m_vblank.isnull()) - v->device->m_vblank(FALSE); + if (!device->m_vblank.isnull()) + device->m_vblank(FALSE); } } else { - if (!v->device->m_vblank.isnull()) - v->device->m_vblank(FALSE); + if (!device->m_vblank.isnull()) + device->m_vblank(FALSE); } /* go to the end of the next frame */ - adjust_vblank_timer(v); + adjust_vblank_timer(this); } -static TIMER_CALLBACK( vblank_callback ) +TIMER_CALLBACK_MEMBER( voodoo_device::vblank_callback ) { - voodoo_state *v = (voodoo_state *)ptr; - - if (LOG_VBLANK_SWAP) v->device->logerror("--- vblank start\n"); + if (LOG_VBLANK_SWAP) device->logerror("--- vblank start\n"); /* flush the pipes */ - if (v->pci.op_pending) + if (pci.op_pending) { - if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank flush begin\n"); - flush_fifos(v, machine.time()); - if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank flush end\n"); + if (LOG_VBLANK_SWAP) device->logerror("---- vblank flush begin\n"); + flush_fifos(this, machine().time()); + if (LOG_VBLANK_SWAP) device->logerror("---- vblank flush end\n"); } /* increment the count */ - v->fbi.vblank_count++; - if (v->fbi.vblank_count > 250) - v->fbi.vblank_count = 250; - if (LOG_VBLANK_SWAP) v->device->logerror("---- vblank count = %d", v->fbi.vblank_count); - if (v->fbi.vblank_swap_pending) - if (LOG_VBLANK_SWAP) v->device->logerror(" (target=%d)", v->fbi.vblank_swap); - if (LOG_VBLANK_SWAP) v->device->logerror("\n"); + fbi.vblank_count++; + if (fbi.vblank_count > 250) + fbi.vblank_count = 250; + if (LOG_VBLANK_SWAP) device->logerror("---- vblank count = %d", fbi.vblank_count); + if (fbi.vblank_swap_pending) + if (LOG_VBLANK_SWAP) device->logerror(" (target=%d)", fbi.vblank_swap); + if (LOG_VBLANK_SWAP) device->logerror("\n"); /* if we're past the swap count, do the swap */ - if (v->fbi.vblank_swap_pending && v->fbi.vblank_count >= v->fbi.vblank_swap) - swap_buffers(v); + if (fbi.vblank_swap_pending && fbi.vblank_count >= fbi.vblank_swap) + swap_buffers(this); /* set a timer for the next off state */ - machine.scheduler().timer_set(v->screen->time_until_pos(0), FUNC(vblank_off_callback), 0, v); + machine().scheduler().timer_set(screen->time_until_pos(0), timer_expired_delegate(FUNC(voodoo_device::vblank_off_callback),this), 0, this); + + /* set internal state and call the client */ - v->fbi.vblank = TRUE; + fbi.vblank = TRUE; // TODO: Vblank IRQ enable is VOODOO3 only? - if (v->type >= TYPE_VOODOO_3) + if (vd_type >= TYPE_VOODOO_3) { - if (v->reg[intrCtrl].u & 0x4) // call IRQ handler if VSYNC interrupt (rising) is enabled + if (reg[intrCtrl].u & 0x4) // call IRQ handler if VSYNC interrupt (rising) is enabled { - v->reg[intrCtrl].u |= 0x100; // VSYNC int (rising) active + reg[intrCtrl].u |= 0x100; // VSYNC int (rising) active - if (!v->device->m_vblank.isnull()) - v->device->m_vblank(TRUE); + if (!device->m_vblank.isnull()) + device->m_vblank(TRUE); } } else { - if (!v->device->m_vblank.isnull()) - v->device->m_vblank(TRUE); + if (!device->m_vblank.isnull()) + device->m_vblank(TRUE); } } @@ -1053,23 +991,23 @@ static TIMER_CALLBACK( vblank_callback ) * *************************************/ -static void reset_counters(voodoo_state *v) +static void reset_counters(voodoo_device *vd) { - update_statistics(v, FALSE); - v->reg[fbiPixelsIn].u = 0; - v->reg[fbiChromaFail].u = 0; - v->reg[fbiZfuncFail].u = 0; - v->reg[fbiAfuncFail].u = 0; - v->reg[fbiPixelsOut].u = 0; + update_statistics(vd, FALSE); + vd->reg[fbiPixelsIn].u = 0; + vd->reg[fbiChromaFail].u = 0; + vd->reg[fbiZfuncFail].u = 0; + vd->reg[fbiAfuncFail].u = 0; + vd->reg[fbiPixelsOut].u = 0; } -static void soft_reset(voodoo_state *v) +void voodoo_device::soft_reset(voodoo_device *vd) { - reset_counters(v); - v->reg[fbiTrianglesOut].u = 0; - fifo_reset(&v->fbi.fifo); - fifo_reset(&v->pci.fifo); + reset_counters(vd); + vd->reg[fbiTrianglesOut].u = 0; + fifo_reset(&vd->fbi.fifo); + fifo_reset(&vd->pci.fifo); } @@ -1080,103 +1018,103 @@ static void soft_reset(voodoo_state *v) * *************************************/ -static void recompute_video_memory(voodoo_state *v) +void voodoo_device::recompute_video_memory(voodoo_device *vd) { - UINT32 buffer_pages = FBIINIT2_VIDEO_BUFFER_OFFSET(v->reg[fbiInit2].u); - UINT32 fifo_start_page = FBIINIT4_MEMORY_FIFO_START_ROW(v->reg[fbiInit4].u); - UINT32 fifo_last_page = FBIINIT4_MEMORY_FIFO_STOP_ROW(v->reg[fbiInit4].u); + UINT32 buffer_pages = FBIINIT2_VIDEO_BUFFER_OFFSET(vd->reg[fbiInit2].u); + UINT32 fifo_start_page = FBIINIT4_MEMORY_FIFO_START_ROW(vd->reg[fbiInit4].u); + UINT32 fifo_last_page = FBIINIT4_MEMORY_FIFO_STOP_ROW(vd->reg[fbiInit4].u); UINT32 memory_config; int buf; /* memory config is determined differently between V1 and V2 */ - memory_config = FBIINIT2_ENABLE_TRIPLE_BUF(v->reg[fbiInit2].u); - if (v->type == TYPE_VOODOO_2 && memory_config == 0) - memory_config = FBIINIT5_BUFFER_ALLOCATION(v->reg[fbiInit5].u); + memory_config = FBIINIT2_ENABLE_TRIPLE_BUF(vd->reg[fbiInit2].u); + if (vd->vd_type == TYPE_VOODOO_2 && memory_config == 0) + memory_config = FBIINIT5_BUFFER_ALLOCATION(vd->reg[fbiInit5].u); /* tiles are 64x16/32; x_tiles specifies how many half-tiles */ - v->fbi.tile_width = (v->type == TYPE_VOODOO_1) ? 64 : 32; - v->fbi.tile_height = (v->type == TYPE_VOODOO_1) ? 16 : 32; - v->fbi.x_tiles = FBIINIT1_X_VIDEO_TILES(v->reg[fbiInit1].u); - if (v->type == TYPE_VOODOO_2) + vd->fbi.tile_width = (vd->vd_type == TYPE_VOODOO_1) ? 64 : 32; + vd->fbi.tile_height = (vd->vd_type == TYPE_VOODOO_1) ? 16 : 32; + vd->fbi.x_tiles = FBIINIT1_X_VIDEO_TILES(vd->reg[fbiInit1].u); + if (vd->vd_type == TYPE_VOODOO_2) { - v->fbi.x_tiles = (v->fbi.x_tiles << 1) | - (FBIINIT1_X_VIDEO_TILES_BIT5(v->reg[fbiInit1].u) << 5) | - (FBIINIT6_X_VIDEO_TILES_BIT0(v->reg[fbiInit6].u)); + vd->fbi.x_tiles = (vd->fbi.x_tiles << 1) | + (FBIINIT1_X_VIDEO_TILES_BIT5(vd->reg[fbiInit1].u) << 5) | + (FBIINIT6_X_VIDEO_TILES_BIT0(vd->reg[fbiInit6].u)); } - v->fbi.rowpixels = v->fbi.tile_width * v->fbi.x_tiles; + vd->fbi.rowpixels = vd->fbi.tile_width * vd->fbi.x_tiles; -// logerror("VOODOO.%d.VIDMEM: buffer_pages=%X fifo=%X-%X tiles=%X rowpix=%d\n", v->index, buffer_pages, fifo_start_page, fifo_last_page, v->fbi.x_tiles, v->fbi.rowpixels); +// logerror("VOODOO.%d.VIDMEM: buffer_pages=%X fifo=%X-%X tiles=%X rowpix=%d\n", vd->index, buffer_pages, fifo_start_page, fifo_last_page, vd->fbi.x_tiles, vd->fbi.rowpixels); /* first RGB buffer always starts at 0 */ - v->fbi.rgboffs[0] = 0; + vd->fbi.rgboffs[0] = 0; /* second RGB buffer starts immediately afterwards */ - v->fbi.rgboffs[1] = buffer_pages * 0x1000; + vd->fbi.rgboffs[1] = buffer_pages * 0x1000; /* remaining buffers are based on the config */ switch (memory_config) { case 3: /* reserved */ - v->device->logerror("VOODOO.%d.ERROR:Unexpected memory configuration in recompute_video_memory!\n", v->index); + vd->device->logerror("VOODOO.%d.ERROR:Unexpected memory configuration in recompute_video_memory!\n", vd->index); case 0: /* 2 color buffers, 1 aux buffer */ - v->fbi.rgboffs[2] = ~0; - v->fbi.auxoffs = 2 * buffer_pages * 0x1000; + vd->fbi.rgboffs[2] = ~0; + vd->fbi.auxoffs = 2 * buffer_pages * 0x1000; break; case 1: /* 3 color buffers, 0 aux buffers */ - v->fbi.rgboffs[2] = 2 * buffer_pages * 0x1000; - v->fbi.auxoffs = ~0; + vd->fbi.rgboffs[2] = 2 * buffer_pages * 0x1000; + vd->fbi.auxoffs = ~0; break; case 2: /* 3 color buffers, 1 aux buffers */ - v->fbi.rgboffs[2] = 2 * buffer_pages * 0x1000; - v->fbi.auxoffs = 3 * buffer_pages * 0x1000; + vd->fbi.rgboffs[2] = 2 * buffer_pages * 0x1000; + vd->fbi.auxoffs = 3 * buffer_pages * 0x1000; break; } /* clamp the RGB buffers to video memory */ for (buf = 0; buf < 3; buf++) - if (v->fbi.rgboffs[buf] != ~0 && v->fbi.rgboffs[buf] > v->fbi.mask) - v->fbi.rgboffs[buf] = v->fbi.mask; + if (vd->fbi.rgboffs[buf] != ~0 && vd->fbi.rgboffs[buf] > vd->fbi.mask) + vd->fbi.rgboffs[buf] = vd->fbi.mask; /* clamp the aux buffer to video memory */ - if (v->fbi.auxoffs != ~0 && v->fbi.auxoffs > v->fbi.mask) - v->fbi.auxoffs = v->fbi.mask; + if (vd->fbi.auxoffs != ~0 && vd->fbi.auxoffs > vd->fbi.mask) + vd->fbi.auxoffs = vd->fbi.mask; /* osd_printf_debug("rgb[0] = %08X rgb[1] = %08X rgb[2] = %08X aux = %08X\n", - v->fbi.rgboffs[0], v->fbi.rgboffs[1], v->fbi.rgboffs[2], v->fbi.auxoffs);*/ + vd->fbi.rgboffs[0], vd->fbi.rgboffs[1], vd->fbi.rgboffs[2], vd->fbi.auxoffs);*/ /* compute the memory FIFO location and size */ - if (fifo_last_page > v->fbi.mask / 0x1000) - fifo_last_page = v->fbi.mask / 0x1000; + if (fifo_last_page > vd->fbi.mask / 0x1000) + fifo_last_page = vd->fbi.mask / 0x1000; /* is it valid and enabled? */ - if (fifo_start_page <= fifo_last_page && FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u)) + if (fifo_start_page <= fifo_last_page && FBIINIT0_ENABLE_MEMORY_FIFO(vd->reg[fbiInit0].u)) { - v->fbi.fifo.base = (UINT32 *)(v->fbi.ram + fifo_start_page * 0x1000); - v->fbi.fifo.size = (fifo_last_page + 1 - fifo_start_page) * 0x1000 / 4; - if (v->fbi.fifo.size > 65536*2) - v->fbi.fifo.size = 65536*2; + vd->fbi.fifo.base = (UINT32 *)(vd->fbi.ram + fifo_start_page * 0x1000); + vd->fbi.fifo.size = (fifo_last_page + 1 - fifo_start_page) * 0x1000 / 4; + if (vd->fbi.fifo.size > 65536*2) + vd->fbi.fifo.size = 65536*2; } /* if not, disable the FIFO */ else { - v->fbi.fifo.base = nullptr; - v->fbi.fifo.size = 0; + vd->fbi.fifo.base = nullptr; + vd->fbi.fifo.size = 0; } /* reset the FIFO */ - fifo_reset(&v->fbi.fifo); + fifo_reset(&vd->fbi.fifo); /* reset our front/back buffers if they are out of range */ - if (v->fbi.rgboffs[2] == ~0) + if (vd->fbi.rgboffs[2] == ~0) { - if (v->fbi.frontbuf == 2) - v->fbi.frontbuf = 0; - if (v->fbi.backbuf == 2) - v->fbi.backbuf = 0; + if (vd->fbi.frontbuf == 2) + vd->fbi.frontbuf = 0; + if (vd->fbi.backbuf == 2) + vd->fbi.backbuf = 0; } } @@ -1476,9 +1414,9 @@ static inline INT32 prepare_tmu(tmu_state *t) * *************************************/ -static int cmdfifo_compute_expected_depth(voodoo_state *v, cmdfifo_info *f) +static int cmdfifo_compute_expected_depth(voodoo_device *vd, cmdfifo_info *f) { - UINT32 *fifobase = (UINT32 *)v->fbi.ram; + UINT32 *fifobase = (UINT32 *)vd->fbi.ram; UINT32 readptr = f->rdptr; UINT32 command = fifobase[readptr / 4]; int i, count = 0; @@ -1616,9 +1554,9 @@ static int cmdfifo_compute_expected_depth(voodoo_state *v, cmdfifo_info *f) * *************************************/ -static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) +UINT32 voodoo_device::cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f) { - UINT32 *fifobase = (UINT32 *)v->fbi.ram; + UINT32 *fifobase = (UINT32 *)vd->fbi.ram; UINT32 readptr = f->rdptr; UINT32 *src = &fifobase[readptr / 4]; UINT32 command = *src++; @@ -1649,26 +1587,26 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) switch ((command >> 3) & 7) { case 0: /* NOP */ - if (LOG_CMDFIFO) v->device->logerror(" NOP\n"); + if (LOG_CMDFIFO) vd->device->logerror(" NOP\n"); break; case 1: /* JSR */ - if (LOG_CMDFIFO) v->device->logerror(" JSR $%06X\n", target); + if (LOG_CMDFIFO) vd->device->logerror(" JSR $%06X\n", target); osd_printf_debug("JSR in CMDFIFO!\n"); src = &fifobase[target / 4]; break; case 2: /* RET */ - if (LOG_CMDFIFO) v->device->logerror(" RET $%06X\n", target); + if (LOG_CMDFIFO) vd->device->logerror(" RET $%06X\n", target); fatalerror("RET in CMDFIFO!\n"); case 3: /* JMP LOCAL FRAME BUFFER */ - if (LOG_CMDFIFO) v->device->logerror(" JMP LOCAL FRAMEBUF $%06X\n", target); + if (LOG_CMDFIFO) vd->device->logerror(" JMP LOCAL FRAMEBUF $%06X\n", target); src = &fifobase[target / 4]; break; case 4: /* JMP AGP */ - if (LOG_CMDFIFO) v->device->logerror(" JMP AGP $%06X\n", target); + if (LOG_CMDFIFO) vd->device->logerror(" JMP AGP $%06X\n", target); fatalerror("JMP AGP in CMDFIFO!\n"); src = &fifobase[target / 4]; break; @@ -1696,16 +1634,16 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) inc = (command >> 15) & 1; target = (command >> 3) & 0xfff; - if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 1: count=%d inc=%d reg=%04X\n", count, inc, target); + if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 1: count=%d inc=%d reg=%04X\n", count, inc, target); - if (v->type >= TYPE_VOODOO_BANSHEE && (target & 0x800)) + if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (target & 0x800)) { // Banshee/Voodoo3 2D register writes /* loop over all registers and write them one at a time */ for (i = 0; i < count; i++, target += inc) { - cycles += banshee_2d_w(v, target & 0xff, *src); + cycles += banshee_2d_w(vd, target & 0xff, *src); //logerror(" 2d reg: %03x = %08X\n", target & 0x7ff, *src); src++; } @@ -1714,7 +1652,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) { /* loop over all registers and write them one at a time */ for (i = 0; i < count; i++, target += inc) - cycles += register_w(v, target, *src++); + cycles += register_w(vd, target, *src++); } break; @@ -1727,12 +1665,12 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) 1 31:0 = Data word */ case 2: - if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 2: mask=%X\n", (command >> 3) & 0x1ffffff); + if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 2: mask=%X\n", (command >> 3) & 0x1ffffff); /* loop over all registers and write them one at a time */ for (i = 3; i <= 31; i++) if (command & (1 << i)) - cycles += register_w(v, banshee2D_clip0Min + (i - 3), *src++); + cycles += register_w(vd, banshee2D_clip0Min + (i - 3), *src++); break; /* @@ -1764,10 +1702,10 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) count = (command >> 6) & 15; code = (command >> 3) & 7; - if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 3: count=%d code=%d mask=%03X smode=%02X pc=%d\n", count, code, (command >> 10) & 0xfff, (command >> 22) & 0x3f, (command >> 28) & 1); + if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 3: count=%d code=%d mask=%03X smode=%02X pc=%d\n", count, code, (command >> 10) & 0xfff, (command >> 22) & 0x3f, (command >> 28) & 1); /* copy relevant bits into the setup mode register */ - v->reg[sSetupMode].u = ((command >> 10) & 0xff) | ((command >> 6) & 0xf0000); + vd->reg[sSetupMode].u = ((command >> 10) & 0xff) | ((command >> 6) & 0xf0000); /* loop over triangles */ for (i = 0; i < count; i++) @@ -1834,8 +1772,8 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) /* for a series of individual triangles, initialize all the verts */ if ((code == 1 && i == 0) || (code == 0 && i % 3 == 0)) { - v->fbi.sverts = 1; - v->fbi.svert[0] = v->fbi.svert[1] = v->fbi.svert[2] = svert; + vd->fbi.sverts = 1; + vd->fbi.svert[0] = vd->fbi.svert[1] = vd->fbi.svert[2] = svert; } /* otherwise, add this to the list */ @@ -1843,15 +1781,15 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) { /* for strip mode, shuffle vertex 1 down to 0 */ if (!(command & (1 << 22))) - v->fbi.svert[0] = v->fbi.svert[1]; + vd->fbi.svert[0] = vd->fbi.svert[1]; /* copy 2 down to 1 and add our new one regardless */ - v->fbi.svert[1] = v->fbi.svert[2]; - v->fbi.svert[2] = svert; + vd->fbi.svert[1] = vd->fbi.svert[2]; + vd->fbi.svert[2] = svert; /* if we have enough, draw */ - if (++v->fbi.sverts >= 3) - cycles += setup_and_draw_triangle(v); + if (++vd->fbi.sverts >= 3) + cycles += setup_and_draw_triangle(vd); } } @@ -1874,9 +1812,9 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) /* extract parameters */ target = (command >> 3) & 0xfff; - if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 4: mask=%X reg=%04X pad=%d\n", (command >> 15) & 0x3fff, target, command >> 29); + if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 4: mask=%X reg=%04X pad=%d\n", (command >> 15) & 0x3fff, target, command >> 29); - if (v->type >= TYPE_VOODOO_BANSHEE && (target & 0x800)) + if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (target & 0x800)) { // Banshee/Voodoo3 2D register writes @@ -1886,7 +1824,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) { if (command & (1 << i)) { - cycles += banshee_2d_w(v, target + (i - 15), *src); + cycles += banshee_2d_w(vd, target + (i - 15), *src); //logerror(" 2d reg: %03x = %08X\n", target & 0x7ff, *src); src++; } @@ -1897,7 +1835,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) /* loop over all registers and write them one at a time */ for (i = 15; i <= 28; i++) if (command & (1 << i)) - cycles += register_w(v, target + (i - 15), *src++); + cycles += register_w(vd, target + (i - 15), *src++); } /* account for the extra dummy words */ @@ -1928,17 +1866,17 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) { case 0: // Linear FB { - if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: FB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); + if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 5: FB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); UINT32 addr = target * 4; for (i=0; i < count; i++) { UINT32 data = *src++; - v->fbi.ram[BYTE_XOR_LE(addr + 0)] = (UINT8)(data); - v->fbi.ram[BYTE_XOR_LE(addr + 1)] = (UINT8)(data >> 8); - v->fbi.ram[BYTE_XOR_LE(addr + 2)] = (UINT8)(data >> 16); - v->fbi.ram[BYTE_XOR_LE(addr + 3)] = (UINT8)(data >> 24); + vd->fbi.ram[BYTE_XOR_LE(addr + 0)] = (UINT8)(data); + vd->fbi.ram[BYTE_XOR_LE(addr + 1)] = (UINT8)(data >> 8); + vd->fbi.ram[BYTE_XOR_LE(addr + 2)] = (UINT8)(data >> 16); + vd->fbi.ram[BYTE_XOR_LE(addr + 3)] = (UINT8)(data >> 24); addr += 4; } @@ -1946,11 +1884,11 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) } case 2: // 3D LFB { - if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: 3D LFB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); + if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 5: 3D LFB count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); /* loop over words */ for (i = 0; i < count; i++) - cycles += lfb_w(v, target++, *src++, 0xffffffff); + cycles += lfb_w(vd, target++, *src++, 0xffffffff); break; } @@ -1971,11 +1909,11 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) case 3: // Texture Port { - if (LOG_CMDFIFO) v->device->logerror(" PACKET TYPE 5: textureRAM count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); + if (LOG_CMDFIFO) vd->device->logerror(" PACKET TYPE 5: textureRAM count=%d dest=%08X bd2=%X bdN=%X\n", count, target, (command >> 26) & 15, (command >> 22) & 15); /* loop over words */ for (i = 0; i < count; i++) - cycles += texture_w(v, target++, *src++); + cycles += texture_w(vd, target++, *src++); break; } @@ -2001,7 +1939,7 @@ static UINT32 cmdfifo_execute(voodoo_state *v, cmdfifo_info *f) * *************************************/ -static INT32 cmdfifo_execute_if_ready(voodoo_state *v, cmdfifo_info *f) +INT32 voodoo_device::cmdfifo_execute_if_ready(voodoo_device* vd, cmdfifo_info *f) { int needed_depth; int cycles; @@ -2011,12 +1949,12 @@ static INT32 cmdfifo_execute_if_ready(voodoo_state *v, cmdfifo_info *f) return -1; /* see if we have enough for the current command */ - needed_depth = cmdfifo_compute_expected_depth(v, f); + needed_depth = cmdfifo_compute_expected_depth(vd, f); if (f->depth < needed_depth) return -1; /* execute */ - cycles = cmdfifo_execute(v, f); + cycles = cmdfifo_execute(vd, f); f->depth -= needed_depth; return cycles; } @@ -2029,12 +1967,12 @@ static INT32 cmdfifo_execute_if_ready(voodoo_state *v, cmdfifo_info *f) * *************************************/ -static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 data) +void voodoo_device::cmdfifo_w(voodoo_device *vd, cmdfifo_info *f, offs_t offset, UINT32 data) { UINT32 addr = f->base + offset * 4; - UINT32 *fifobase = (UINT32 *)v->fbi.ram; + UINT32 *fifobase = (UINT32 *)vd->fbi.ram; - if (LOG_CMDFIFO_VERBOSE) v->device->logerror("CMDFIFO_w(%04X) = %08X\n", offset, data); + if (LOG_CMDFIFO_VERBOSE) vd->device->logerror("CMDFIFO_w(%04X) = %08X\n", offset, data); /* write the data */ if (addr < f->end) @@ -2054,7 +1992,7 @@ static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 da else if (addr < f->amin) { if (f->holes != 0) - v->device->logerror("Unexpected CMDFIFO: AMin=%08X AMax=%08X Holes=%d WroteTo:%08X\n", + vd->device->logerror("Unexpected CMDFIFO: AMin=%08X AMax=%08X Holes=%d WroteTo:%08X\n", f->amin, f->amax, f->holes, addr); //f->amin = f->amax = addr; f->holes += (addr - f->base) / 4; @@ -2084,17 +2022,17 @@ static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 da } /* execute if we can */ - if (!v->pci.op_pending) + if (!vd->pci.op_pending) { - INT32 cycles = cmdfifo_execute_if_ready(v, f); + INT32 cycles = cmdfifo_execute_if_ready(vd, f); if (cycles > 0) { - v->pci.op_pending = TRUE; - v->pci.op_end_time = v->device->machine().time() + attotime(0, (attoseconds_t)cycles * v->attoseconds_per_cycle); + vd->pci.op_pending = TRUE; + vd->pci.op_end_time = vd->device->machine().time() + attotime(0, (attoseconds_t)cycles * vd->attoseconds_per_cycle); - if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", v->index, - v->device->machine().time().seconds(), (UINT32)(v->device->machine().time().attoseconds() >> 32), (UINT32)v->device->machine().time().attoseconds(), - v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds()); + if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", vd->index, + vd->device->machine().time().seconds(), (UINT32)(vd->device->machine().time().attoseconds() >> 32), (UINT32)vd->device->machine().time().attoseconds(), + vd->pci.op_end_time.seconds(), (UINT32)(vd->pci.op_end_time.attoseconds() >> 32), (UINT32)vd->pci.op_end_time.attoseconds()); } } } @@ -2108,83 +2046,83 @@ static void cmdfifo_w(voodoo_state *v, cmdfifo_info *f, offs_t offset, UINT32 da * *************************************/ -static TIMER_CALLBACK( stall_cpu_callback ) +TIMER_CALLBACK_MEMBER( voodoo_device::stall_cpu_callback ) { - check_stalled_cpu((voodoo_state *)ptr, machine.time()); + check_stalled_cpu(this, machine().time()); } -static void check_stalled_cpu(voodoo_state *v, attotime current_time) +void voodoo_device::check_stalled_cpu(voodoo_device* vd, attotime current_time) { int resume = FALSE; /* flush anything we can */ - if (v->pci.op_pending) - flush_fifos(v, current_time); + if (vd->pci.op_pending) + flush_fifos(vd, current_time); /* if we're just stalled until the LWM is passed, see if we're ok now */ - if (v->pci.stall_state == STALLED_UNTIL_FIFO_LWM) + if (vd->pci.stall_state == STALLED_UNTIL_FIFO_LWM) { /* if there's room in the memory FIFO now, we can proceed */ - if (FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u)) + if (FBIINIT0_ENABLE_MEMORY_FIFO(vd->reg[fbiInit0].u)) { - if (fifo_items(&v->fbi.fifo) < 2 * 32 * FBIINIT0_MEMORY_FIFO_HWM(v->reg[fbiInit0].u)) + if (fifo_items(&vd->fbi.fifo) < 2 * 32 * FBIINIT0_MEMORY_FIFO_HWM(vd->reg[fbiInit0].u)) resume = TRUE; } - else if (fifo_space(&v->pci.fifo) > 2 * FBIINIT0_PCI_FIFO_LWM(v->reg[fbiInit0].u)) + else if (fifo_space(&vd->pci.fifo) > 2 * FBIINIT0_PCI_FIFO_LWM(vd->reg[fbiInit0].u)) resume = TRUE; } /* if we're stalled until the FIFOs are empty, check now */ - else if (v->pci.stall_state == STALLED_UNTIL_FIFO_EMPTY) + else if (vd->pci.stall_state == STALLED_UNTIL_FIFO_EMPTY) { - if (FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u)) + if (FBIINIT0_ENABLE_MEMORY_FIFO(vd->reg[fbiInit0].u)) { - if (fifo_empty(&v->fbi.fifo) && fifo_empty(&v->pci.fifo)) + if (fifo_empty(&vd->fbi.fifo) && fifo_empty(&vd->pci.fifo)) resume = TRUE; } - else if (fifo_empty(&v->pci.fifo)) + else if (fifo_empty(&vd->pci.fifo)) resume = TRUE; } /* resume if necessary */ - if (resume || !v->pci.op_pending) + if (resume || !vd->pci.op_pending) { - if (LOG_FIFO) v->device->logerror("VOODOO.%d.FIFO:Stall condition cleared; resuming\n", v->index); - v->pci.stall_state = NOT_STALLED; + if (LOG_FIFO) vd->device->logerror("VOODOO.%d.FIFO:Stall condition cleared; resuming\n", vd->index); + vd->pci.stall_state = NOT_STALLED; /* either call the callback, or trigger the trigger */ - if (!v->device->m_stall.isnull()) - v->device->m_stall(FALSE); + if (!vd->device->m_stall.isnull()) + vd->device->m_stall(FALSE); else - v->device->machine().scheduler().trigger(v->trigger); + vd->device->machine().scheduler().trigger(vd->trigger); } /* if not, set a timer for the next one */ else { - v->pci.continue_timer->adjust(v->pci.op_end_time - current_time); + vd->pci.continue_timer->adjust(vd->pci.op_end_time - current_time); } } -static void stall_cpu(voodoo_state *v, int state, attotime current_time) +void voodoo_device::stall_cpu(voodoo_device *vd, int state, attotime current_time) { /* sanity check */ - if (!v->pci.op_pending) fatalerror("FIFOs not empty, no op pending!\n"); + if (!vd->pci.op_pending) fatalerror("FIFOs not empty, no op pending!\n"); /* set the state and update statistics */ - v->pci.stall_state = state; - v->stats.stalls++; + vd->pci.stall_state = state; + vd->stats.stalls++; /* either call the callback, or spin the CPU */ - if (!v->device->m_stall.isnull()) - v->device->m_stall(TRUE); + if (!vd->device->m_stall.isnull()) + vd->device->m_stall(TRUE); else - v->cpu->execute().spin_until_trigger(v->trigger); + vd->cpu->execute().spin_until_trigger(vd->trigger); /* set a timer to clear the stall */ - v->pci.continue_timer->adjust(v->pci.op_end_time - current_time); + vd->pci.continue_timer->adjust(vd->pci.op_end_time - current_time); } @@ -2195,7 +2133,7 @@ static void stall_cpu(voodoo_state *v, int state, attotime current_time) * *************************************/ -static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) +INT32 voodoo_device::register_w(voodoo_device *vd, offs_t offset, UINT32 data) { UINT32 origdata = data; INT32 cycles = 0; @@ -2204,24 +2142,24 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) UINT8 chips; /* statistics */ - v->stats.reg_writes++; + vd->stats.reg_writes++; /* determine which chips we are addressing */ chips = (offset >> 8) & 0xf; if (chips == 0) chips = 0xf; - chips &= v->chipmask; + chips &= vd->chipmask; /* the first 64 registers can be aliased differently */ - if ((offset & 0x800c0) == 0x80000 && v->alt_regmap) + if ((offset & 0x800c0) == 0x80000 && vd->alt_regmap) regnum = register_alias_map[offset & 0x3f]; else regnum = offset & 0xff; /* first make sure this register is readable */ - if (!(v->regaccess[regnum] & REGISTER_WRITE)) + if (!(vd->regaccess[regnum] & REGISTER_WRITE)) { - v->device->logerror("VOODOO.%d.ERROR:Invalid attempt to write %s\n", v->index, v->regnames[regnum]); + vd->device->logerror("VOODOO.%d.ERROR:Invalid attempt to write %s\n", vd->index, vd->regnames[regnum]); return 0; } @@ -2232,227 +2170,227 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) case fvertexAx: data = float_to_int32(data, 4); case vertexAx: - if (chips & 1) v->fbi.ax = (INT16)data; + if (chips & 1) vd->fbi.ax = (INT16)data; break; case fvertexAy: data = float_to_int32(data, 4); case vertexAy: - if (chips & 1) v->fbi.ay = (INT16)data; + if (chips & 1) vd->fbi.ay = (INT16)data; break; case fvertexBx: data = float_to_int32(data, 4); case vertexBx: - if (chips & 1) v->fbi.bx = (INT16)data; + if (chips & 1) vd->fbi.bx = (INT16)data; break; case fvertexBy: data = float_to_int32(data, 4); case vertexBy: - if (chips & 1) v->fbi.by = (INT16)data; + if (chips & 1) vd->fbi.by = (INT16)data; break; case fvertexCx: data = float_to_int32(data, 4); case vertexCx: - if (chips & 1) v->fbi.cx = (INT16)data; + if (chips & 1) vd->fbi.cx = (INT16)data; break; case fvertexCy: data = float_to_int32(data, 4); case vertexCy: - if (chips & 1) v->fbi.cy = (INT16)data; + if (chips & 1) vd->fbi.cy = (INT16)data; break; /* RGB data is 12.12 formatted fixed point */ case fstartR: data = float_to_int32(data, 12); case startR: - if (chips & 1) v->fbi.startr = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.startr = (INT32)(data << 8) >> 8; break; case fstartG: data = float_to_int32(data, 12); case startG: - if (chips & 1) v->fbi.startg = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.startg = (INT32)(data << 8) >> 8; break; case fstartB: data = float_to_int32(data, 12); case startB: - if (chips & 1) v->fbi.startb = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.startb = (INT32)(data << 8) >> 8; break; case fstartA: data = float_to_int32(data, 12); case startA: - if (chips & 1) v->fbi.starta = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.starta = (INT32)(data << 8) >> 8; break; case fdRdX: data = float_to_int32(data, 12); case dRdX: - if (chips & 1) v->fbi.drdx = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.drdx = (INT32)(data << 8) >> 8; break; case fdGdX: data = float_to_int32(data, 12); case dGdX: - if (chips & 1) v->fbi.dgdx = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.dgdx = (INT32)(data << 8) >> 8; break; case fdBdX: data = float_to_int32(data, 12); case dBdX: - if (chips & 1) v->fbi.dbdx = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.dbdx = (INT32)(data << 8) >> 8; break; case fdAdX: data = float_to_int32(data, 12); case dAdX: - if (chips & 1) v->fbi.dadx = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.dadx = (INT32)(data << 8) >> 8; break; case fdRdY: data = float_to_int32(data, 12); case dRdY: - if (chips & 1) v->fbi.drdy = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.drdy = (INT32)(data << 8) >> 8; break; case fdGdY: data = float_to_int32(data, 12); case dGdY: - if (chips & 1) v->fbi.dgdy = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.dgdy = (INT32)(data << 8) >> 8; break; case fdBdY: data = float_to_int32(data, 12); case dBdY: - if (chips & 1) v->fbi.dbdy = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.dbdy = (INT32)(data << 8) >> 8; break; case fdAdY: data = float_to_int32(data, 12); case dAdY: - if (chips & 1) v->fbi.dady = (INT32)(data << 8) >> 8; + if (chips & 1) vd->fbi.dady = (INT32)(data << 8) >> 8; break; /* Z data is 20.12 formatted fixed point */ case fstartZ: data = float_to_int32(data, 12); case startZ: - if (chips & 1) v->fbi.startz = (INT32)data; + if (chips & 1) vd->fbi.startz = (INT32)data; break; case fdZdX: data = float_to_int32(data, 12); case dZdX: - if (chips & 1) v->fbi.dzdx = (INT32)data; + if (chips & 1) vd->fbi.dzdx = (INT32)data; break; case fdZdY: data = float_to_int32(data, 12); case dZdY: - if (chips & 1) v->fbi.dzdy = (INT32)data; + if (chips & 1) vd->fbi.dzdy = (INT32)data; break; /* S,T data is 14.18 formatted fixed point, converted to 16.32 internally */ case fstartS: data64 = float_to_int64(data, 32); - if (chips & 2) v->tmu[0].starts = data64; - if (chips & 4) v->tmu[1].starts = data64; + if (chips & 2) vd->tmu[0].starts = data64; + if (chips & 4) vd->tmu[1].starts = data64; break; case startS: - if (chips & 2) v->tmu[0].starts = (INT64)(INT32)data << 14; - if (chips & 4) v->tmu[1].starts = (INT64)(INT32)data << 14; + if (chips & 2) vd->tmu[0].starts = (INT64)(INT32)data << 14; + if (chips & 4) vd->tmu[1].starts = (INT64)(INT32)data << 14; break; case fstartT: data64 = float_to_int64(data, 32); - if (chips & 2) v->tmu[0].startt = data64; - if (chips & 4) v->tmu[1].startt = data64; + if (chips & 2) vd->tmu[0].startt = data64; + if (chips & 4) vd->tmu[1].startt = data64; break; case startT: - if (chips & 2) v->tmu[0].startt = (INT64)(INT32)data << 14; - if (chips & 4) v->tmu[1].startt = (INT64)(INT32)data << 14; + if (chips & 2) vd->tmu[0].startt = (INT64)(INT32)data << 14; + if (chips & 4) vd->tmu[1].startt = (INT64)(INT32)data << 14; break; case fdSdX: data64 = float_to_int64(data, 32); - if (chips & 2) v->tmu[0].dsdx = data64; - if (chips & 4) v->tmu[1].dsdx = data64; + if (chips & 2) vd->tmu[0].dsdx = data64; + if (chips & 4) vd->tmu[1].dsdx = data64; break; case dSdX: - if (chips & 2) v->tmu[0].dsdx = (INT64)(INT32)data << 14; - if (chips & 4) v->tmu[1].dsdx = (INT64)(INT32)data << 14; + if (chips & 2) vd->tmu[0].dsdx = (INT64)(INT32)data << 14; + if (chips & 4) vd->tmu[1].dsdx = (INT64)(INT32)data << 14; break; case fdTdX: data64 = float_to_int64(data, 32); - if (chips & 2) v->tmu[0].dtdx = data64; - if (chips & 4) v->tmu[1].dtdx = data64; + if (chips & 2) vd->tmu[0].dtdx = data64; + if (chips & 4) vd->tmu[1].dtdx = data64; break; case dTdX: - if (chips & 2) v->tmu[0].dtdx = (INT64)(INT32)data << 14; - if (chips & 4) v->tmu[1].dtdx = (INT64)(INT32)data << 14; + if (chips & 2) vd->tmu[0].dtdx = (INT64)(INT32)data << 14; + if (chips & 4) vd->tmu[1].dtdx = (INT64)(INT32)data << 14; break; case fdSdY: data64 = float_to_int64(data, 32); - if (chips & 2) v->tmu[0].dsdy = data64; - if (chips & 4) v->tmu[1].dsdy = data64; + if (chips & 2) vd->tmu[0].dsdy = data64; + if (chips & 4) vd->tmu[1].dsdy = data64; break; case dSdY: - if (chips & 2) v->tmu[0].dsdy = (INT64)(INT32)data << 14; - if (chips & 4) v->tmu[1].dsdy = (INT64)(INT32)data << 14; + if (chips & 2) vd->tmu[0].dsdy = (INT64)(INT32)data << 14; + if (chips & 4) vd->tmu[1].dsdy = (INT64)(INT32)data << 14; break; case fdTdY: data64 = float_to_int64(data, 32); - if (chips & 2) v->tmu[0].dtdy = data64; - if (chips & 4) v->tmu[1].dtdy = data64; + if (chips & 2) vd->tmu[0].dtdy = data64; + if (chips & 4) vd->tmu[1].dtdy = data64; break; case dTdY: - if (chips & 2) v->tmu[0].dtdy = (INT64)(INT32)data << 14; - if (chips & 4) v->tmu[1].dtdy = (INT64)(INT32)data << 14; + if (chips & 2) vd->tmu[0].dtdy = (INT64)(INT32)data << 14; + if (chips & 4) vd->tmu[1].dtdy = (INT64)(INT32)data << 14; break; /* W data is 2.30 formatted fixed point, converted to 16.32 internally */ case fstartW: data64 = float_to_int64(data, 32); - if (chips & 1) v->fbi.startw = data64; - if (chips & 2) v->tmu[0].startw = data64; - if (chips & 4) v->tmu[1].startw = data64; + if (chips & 1) vd->fbi.startw = data64; + if (chips & 2) vd->tmu[0].startw = data64; + if (chips & 4) vd->tmu[1].startw = data64; break; case startW: - if (chips & 1) v->fbi.startw = (INT64)(INT32)data << 2; - if (chips & 2) v->tmu[0].startw = (INT64)(INT32)data << 2; - if (chips & 4) v->tmu[1].startw = (INT64)(INT32)data << 2; + if (chips & 1) vd->fbi.startw = (INT64)(INT32)data << 2; + if (chips & 2) vd->tmu[0].startw = (INT64)(INT32)data << 2; + if (chips & 4) vd->tmu[1].startw = (INT64)(INT32)data << 2; break; case fdWdX: data64 = float_to_int64(data, 32); - if (chips & 1) v->fbi.dwdx = data64; - if (chips & 2) v->tmu[0].dwdx = data64; - if (chips & 4) v->tmu[1].dwdx = data64; + if (chips & 1) vd->fbi.dwdx = data64; + if (chips & 2) vd->tmu[0].dwdx = data64; + if (chips & 4) vd->tmu[1].dwdx = data64; break; case dWdX: - if (chips & 1) v->fbi.dwdx = (INT64)(INT32)data << 2; - if (chips & 2) v->tmu[0].dwdx = (INT64)(INT32)data << 2; - if (chips & 4) v->tmu[1].dwdx = (INT64)(INT32)data << 2; + if (chips & 1) vd->fbi.dwdx = (INT64)(INT32)data << 2; + if (chips & 2) vd->tmu[0].dwdx = (INT64)(INT32)data << 2; + if (chips & 4) vd->tmu[1].dwdx = (INT64)(INT32)data << 2; break; case fdWdY: data64 = float_to_int64(data, 32); - if (chips & 1) v->fbi.dwdy = data64; - if (chips & 2) v->tmu[0].dwdy = data64; - if (chips & 4) v->tmu[1].dwdy = data64; + if (chips & 1) vd->fbi.dwdy = data64; + if (chips & 2) vd->tmu[0].dwdy = data64; + if (chips & 4) vd->tmu[1].dwdy = data64; break; case dWdY: - if (chips & 1) v->fbi.dwdy = (INT64)(INT32)data << 2; - if (chips & 2) v->tmu[0].dwdy = (INT64)(INT32)data << 2; - if (chips & 4) v->tmu[1].dwdy = (INT64)(INT32)data << 2; + if (chips & 1) vd->fbi.dwdy = (INT64)(INT32)data << 2; + if (chips & 2) vd->tmu[0].dwdy = (INT64)(INT32)data << 2; + if (chips & 4) vd->tmu[1].dwdy = (INT64)(INT32)data << 2; break; /* setup bits */ @@ -2460,114 +2398,114 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) if (chips & 1) { rgb_t rgbdata(data); - v->reg[sAlpha].f = rgbdata.a(); - v->reg[sRed].f = rgbdata.r(); - v->reg[sGreen].f = rgbdata.g(); - v->reg[sBlue].f = rgbdata.b(); + vd->reg[sAlpha].f = rgbdata.a(); + vd->reg[sRed].f = rgbdata.r(); + vd->reg[sGreen].f = rgbdata.g(); + vd->reg[sBlue].f = rgbdata.b(); } break; /* mask off invalid bits for different cards */ case fbzColorPath: - poly_wait(v->poly, v->regnames[regnum]); - if (v->type < TYPE_VOODOO_2) + poly_wait(vd->poly, vd->regnames[regnum]); + if (vd->vd_type < TYPE_VOODOO_2) data &= 0x0fffffff; - if (chips & 1) v->reg[fbzColorPath].u = data; + if (chips & 1) vd->reg[fbzColorPath].u = data; break; case fbzMode: - poly_wait(v->poly, v->regnames[regnum]); - if (v->type < TYPE_VOODOO_2) + poly_wait(vd->poly, vd->regnames[regnum]); + if (vd->vd_type < TYPE_VOODOO_2) data &= 0x001fffff; - if (chips & 1) v->reg[fbzMode].u = data; + if (chips & 1) vd->reg[fbzMode].u = data; break; case fogMode: - poly_wait(v->poly, v->regnames[regnum]); - if (v->type < TYPE_VOODOO_2) + poly_wait(vd->poly, vd->regnames[regnum]); + if (vd->vd_type < TYPE_VOODOO_2) data &= 0x0000003f; - if (chips & 1) v->reg[fogMode].u = data; + if (chips & 1) vd->reg[fogMode].u = data; break; /* triangle drawing */ case triangleCMD: - v->fbi.cheating_allowed = (v->fbi.ax != 0 || v->fbi.ay != 0 || v->fbi.bx > 50 || v->fbi.by != 0 || v->fbi.cx != 0 || v->fbi.cy > 50); - v->fbi.sign = data; - cycles = triangle(v); + vd->fbi.cheating_allowed = (vd->fbi.ax != 0 || vd->fbi.ay != 0 || vd->fbi.bx > 50 || vd->fbi.by != 0 || vd->fbi.cx != 0 || vd->fbi.cy > 50); + vd->fbi.sign = data; + cycles = triangle(vd); break; case ftriangleCMD: - v->fbi.cheating_allowed = TRUE; - v->fbi.sign = data; - cycles = triangle(v); + vd->fbi.cheating_allowed = TRUE; + vd->fbi.sign = data; + cycles = triangle(vd); break; case sBeginTriCMD: - cycles = begin_triangle(v); + cycles = begin_triangle(vd); break; case sDrawTriCMD: - cycles = draw_triangle(v); + cycles = draw_triangle(vd); break; /* other commands */ case nopCMD: - poly_wait(v->poly, v->regnames[regnum]); + poly_wait(vd->poly, vd->regnames[regnum]); if (data & 1) - reset_counters(v); + reset_counters(vd); if (data & 2) - v->reg[fbiTrianglesOut].u = 0; + vd->reg[fbiTrianglesOut].u = 0; break; case fastfillCMD: - cycles = fastfill(v); + cycles = fastfill(vd); break; case swapbufferCMD: - poly_wait(v->poly, v->regnames[regnum]); - cycles = swapbuffer(v, data); + poly_wait(vd->poly, vd->regnames[regnum]); + cycles = swapbuffer(vd, data); break; case userIntrCMD: - poly_wait(v->poly, v->regnames[regnum]); + poly_wait(vd->poly, vd->regnames[regnum]); //fatalerror("userIntrCMD\n"); - v->reg[intrCtrl].u |= 0x1800; - v->reg[intrCtrl].u &= ~0x80000000; + vd->reg[intrCtrl].u |= 0x1800; + vd->reg[intrCtrl].u &= ~0x80000000; // TODO: rename vblank_client for less confusion? - if (!v->device->m_vblank.isnull()) - v->device->m_vblank(TRUE); + if (!vd->device->m_vblank.isnull()) + vd->device->m_vblank(TRUE); break; /* gamma table access -- Voodoo/Voodoo2 only */ case clutData: - if (v->type <= TYPE_VOODOO_2 && (chips & 1)) + if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1)) { - poly_wait(v->poly, v->regnames[regnum]); - if (!FBIINIT1_VIDEO_TIMING_RESET(v->reg[fbiInit1].u)) + poly_wait(vd->poly, vd->regnames[regnum]); + if (!FBIINIT1_VIDEO_TIMING_RESET(vd->reg[fbiInit1].u)) { int index = data >> 24; if (index <= 32) { - v->fbi.clut[index] = data; - v->fbi.clut_dirty = TRUE; + vd->fbi.clut[index] = data; + vd->fbi.clut_dirty = TRUE; } } else - v->device->logerror("clutData ignored because video timing reset = 1\n"); + vd->device->logerror("clutData ignored because video timing reset = 1\n"); } break; /* external DAC access -- Voodoo/Voodoo2 only */ case dacData: - if (v->type <= TYPE_VOODOO_2 && (chips & 1)) + if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1)) { - poly_wait(v->poly, v->regnames[regnum]); + poly_wait(vd->poly, vd->regnames[regnum]); if (!(data & 0x800)) - dacdata_w(&v->dac, (data >> 8) & 7, data & 0xff); + dacdata_w(&vd->dac, (data >> 8) & 7, data & 0xff); else - dacdata_r(&v->dac, (data >> 8) & 7); + dacdata_r(&vd->dac, (data >> 8) & 7); } break; @@ -2576,35 +2514,35 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) case vSync: case backPorch: case videoDimensions: - if (v->type <= TYPE_VOODOO_2 && (chips & 1)) + if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1)) { - poly_wait(v->poly, v->regnames[regnum]); - v->reg[regnum].u = data; - if (v->reg[hSync].u != 0 && v->reg[vSync].u != 0 && v->reg[videoDimensions].u != 0) + poly_wait(vd->poly, vd->regnames[regnum]); + vd->reg[regnum].u = data; + if (vd->reg[hSync].u != 0 && vd->reg[vSync].u != 0 && vd->reg[videoDimensions].u != 0) { int hvis, vvis, htotal, vtotal, hbp, vbp; - attoseconds_t refresh = v->screen->frame_period().attoseconds(); + attoseconds_t refresh = vd->screen->frame_period().attoseconds(); attoseconds_t stdperiod, medperiod, vgaperiod; attoseconds_t stddiff, meddiff, vgadiff; rectangle visarea; - if (v->type == TYPE_VOODOO_2) + if (vd->vd_type == TYPE_VOODOO_2) { - htotal = ((v->reg[hSync].u >> 16) & 0x7ff) + 1 + (v->reg[hSync].u & 0x1ff) + 1; - vtotal = ((v->reg[vSync].u >> 16) & 0x1fff) + (v->reg[vSync].u & 0x1fff); - hvis = v->reg[videoDimensions].u & 0x7ff; - vvis = (v->reg[videoDimensions].u >> 16) & 0x7ff; - hbp = (v->reg[backPorch].u & 0x1ff) + 2; - vbp = (v->reg[backPorch].u >> 16) & 0x1ff; + htotal = ((vd->reg[hSync].u >> 16) & 0x7ff) + 1 + (vd->reg[hSync].u & 0x1ff) + 1; + vtotal = ((vd->reg[vSync].u >> 16) & 0x1fff) + (vd->reg[vSync].u & 0x1fff); + hvis = vd->reg[videoDimensions].u & 0x7ff; + vvis = (vd->reg[videoDimensions].u >> 16) & 0x7ff; + hbp = (vd->reg[backPorch].u & 0x1ff) + 2; + vbp = (vd->reg[backPorch].u >> 16) & 0x1ff; } else { - htotal = ((v->reg[hSync].u >> 16) & 0x3ff) + 1 + (v->reg[hSync].u & 0xff) + 1; - vtotal = ((v->reg[vSync].u >> 16) & 0xfff) + (v->reg[vSync].u & 0xfff); - hvis = v->reg[videoDimensions].u & 0x3ff; - vvis = (v->reg[videoDimensions].u >> 16) & 0x3ff; - hbp = (v->reg[backPorch].u & 0xff) + 2; - vbp = (v->reg[backPorch].u >> 16) & 0xff; + htotal = ((vd->reg[hSync].u >> 16) & 0x3ff) + 1 + (vd->reg[hSync].u & 0xff) + 1; + vtotal = ((vd->reg[vSync].u >> 16) & 0xfff) + (vd->reg[vSync].u & 0xfff); + hvis = vd->reg[videoDimensions].u & 0x3ff; + vvis = (vd->reg[videoDimensions].u >> 16) & 0x3ff; + hbp = (vd->reg[backPorch].u & 0xff) + 2; + vbp = (vd->reg[backPorch].u >> 16) & 0xff; } /* create a new visarea */ @@ -2628,61 +2566,61 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) if (vgadiff < 0) vgadiff = -vgadiff; osd_printf_debug("hSync=%08X vSync=%08X backPorch=%08X videoDimensions=%08X\n", - v->reg[hSync].u, v->reg[vSync].u, v->reg[backPorch].u, v->reg[videoDimensions].u); + vd->reg[hSync].u, vd->reg[vSync].u, vd->reg[backPorch].u, vd->reg[videoDimensions].u); osd_printf_debug("Horiz: %d-%d (%d total) Vert: %d-%d (%d total) -- ", visarea.min_x, visarea.max_x, htotal, visarea.min_y, visarea.max_y, vtotal); /* configure the screen based on which one matches the closest */ if (stddiff < meddiff && stddiff < vgadiff) { - v->screen->configure(htotal, vtotal, visarea, stdperiod); + vd->screen->configure(htotal, vtotal, visarea, stdperiod); osd_printf_debug("Standard resolution, %f Hz\n", ATTOSECONDS_TO_HZ(stdperiod)); } else if (meddiff < vgadiff) { - v->screen->configure(htotal, vtotal, visarea, medperiod); + vd->screen->configure(htotal, vtotal, visarea, medperiod); osd_printf_debug("Medium resolution, %f Hz\n", ATTOSECONDS_TO_HZ(medperiod)); } else { - v->screen->configure(htotal, vtotal, visarea, vgaperiod); + vd->screen->configure(htotal, vtotal, visarea, vgaperiod); osd_printf_debug("VGA resolution, %f Hz\n", ATTOSECONDS_TO_HZ(vgaperiod)); } /* configure the new framebuffer info */ - v->fbi.width = hvis; - v->fbi.height = vvis; - v->fbi.xoffs = hbp; - v->fbi.yoffs = vbp; - v->fbi.vsyncscan = (v->reg[vSync].u >> 16) & 0xfff; + vd->fbi.width = hvis; + vd->fbi.height = vvis; + vd->fbi.xoffs = hbp; + vd->fbi.yoffs = vbp; + vd->fbi.vsyncscan = (vd->reg[vSync].u >> 16) & 0xfff; /* recompute the time of VBLANK */ - adjust_vblank_timer(v); + adjust_vblank_timer(vd); /* if changing dimensions, update video memory layout */ if (regnum == videoDimensions) - recompute_video_memory(v); + recompute_video_memory(vd); } } break; /* fbiInit0 can only be written if initEnable says we can -- Voodoo/Voodoo2 only */ case fbiInit0: - poly_wait(v->poly, v->regnames[regnum]); - if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable)) + poly_wait(vd->poly, vd->regnames[regnum]); + if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(vd->pci.init_enable)) { - v->reg[fbiInit0].u = data; + vd->reg[fbiInit0].u = data; if (FBIINIT0_GRAPHICS_RESET(data)) - soft_reset(v); + soft_reset(vd); if (FBIINIT0_FIFO_RESET(data)) - fifo_reset(&v->pci.fifo); - recompute_video_memory(v); + fifo_reset(&vd->pci.fifo); + recompute_video_memory(vd); } break; /* fbiInit5-7 are Voodoo 2-only; ignore them on anything else */ case fbiInit5: case fbiInit6: - if (v->type < TYPE_VOODOO_2) + if (vd->vd_type < TYPE_VOODOO_2) break; /* else fall through... */ @@ -2691,94 +2629,94 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) case fbiInit1: case fbiInit2: case fbiInit4: - poly_wait(v->poly, v->regnames[regnum]); - if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable)) + poly_wait(vd->poly, vd->regnames[regnum]); + if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(vd->pci.init_enable)) { - v->reg[regnum].u = data; - recompute_video_memory(v); - v->fbi.video_changed = TRUE; + vd->reg[regnum].u = data; + recompute_video_memory(vd); + vd->fbi.video_changed = TRUE; } break; case fbiInit3: - poly_wait(v->poly, v->regnames[regnum]); - if (v->type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable)) + poly_wait(vd->poly, vd->regnames[regnum]); + if (vd->vd_type <= TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(vd->pci.init_enable)) { - v->reg[regnum].u = data; - v->alt_regmap = FBIINIT3_TRI_REGISTER_REMAP(data); - v->fbi.yorigin = FBIINIT3_YORIGIN_SUBTRACT(v->reg[fbiInit3].u); - recompute_video_memory(v); + vd->reg[regnum].u = data; + vd->alt_regmap = FBIINIT3_TRI_REGISTER_REMAP(data); + vd->fbi.yorigin = FBIINIT3_YORIGIN_SUBTRACT(vd->reg[fbiInit3].u); + recompute_video_memory(vd); } break; case fbiInit7: /* case swapPending: -- Banshee */ - if (v->type == TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable)) + if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(vd->pci.init_enable)) { - poly_wait(v->poly, v->regnames[regnum]); - v->reg[regnum].u = data; - v->fbi.cmdfifo[0].enable = FBIINIT7_CMDFIFO_ENABLE(data); - v->fbi.cmdfifo[0].count_holes = !FBIINIT7_DISABLE_CMDFIFO_HOLES(data); + poly_wait(vd->poly, vd->regnames[regnum]); + vd->reg[regnum].u = data; + vd->fbi.cmdfifo[0].enable = FBIINIT7_CMDFIFO_ENABLE(data); + vd->fbi.cmdfifo[0].count_holes = !FBIINIT7_DISABLE_CMDFIFO_HOLES(data); } - else if (v->type >= TYPE_VOODOO_BANSHEE) - v->fbi.swaps_pending++; + else if (vd->vd_type >= TYPE_VOODOO_BANSHEE) + vd->fbi.swaps_pending++; break; /* cmdFifo -- Voodoo2 only */ case cmdFifoBaseAddr: - if (v->type == TYPE_VOODOO_2 && (chips & 1)) + if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1)) { - poly_wait(v->poly, v->regnames[regnum]); - v->reg[regnum].u = data; - v->fbi.cmdfifo[0].base = (data & 0x3ff) << 12; - v->fbi.cmdfifo[0].end = (((data >> 16) & 0x3ff) + 1) << 12; + poly_wait(vd->poly, vd->regnames[regnum]); + vd->reg[regnum].u = data; + vd->fbi.cmdfifo[0].base = (data & 0x3ff) << 12; + vd->fbi.cmdfifo[0].end = (((data >> 16) & 0x3ff) + 1) << 12; } break; case cmdFifoBump: - if (v->type == TYPE_VOODOO_2 && (chips & 1)) + if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1)) fatalerror("cmdFifoBump\n"); break; case cmdFifoRdPtr: - if (v->type == TYPE_VOODOO_2 && (chips & 1)) - v->fbi.cmdfifo[0].rdptr = data; + if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1)) + vd->fbi.cmdfifo[0].rdptr = data; break; case cmdFifoAMin: /* case colBufferAddr: -- Banshee */ - if (v->type == TYPE_VOODOO_2 && (chips & 1)) - v->fbi.cmdfifo[0].amin = data; - else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1)) - v->fbi.rgboffs[1] = data & v->fbi.mask & ~0x0f; + if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1)) + vd->fbi.cmdfifo[0].amin = data; + else if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (chips & 1)) + vd->fbi.rgboffs[1] = data & vd->fbi.mask & ~0x0f; break; case cmdFifoAMax: /* case colBufferStride: -- Banshee */ - if (v->type == TYPE_VOODOO_2 && (chips & 1)) - v->fbi.cmdfifo[0].amax = data; - else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1)) + if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1)) + vd->fbi.cmdfifo[0].amax = data; + else if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (chips & 1)) { if (data & 0x8000) - v->fbi.rowpixels = (data & 0x7f) << 6; + vd->fbi.rowpixels = (data & 0x7f) << 6; else - v->fbi.rowpixels = (data & 0x3fff) >> 1; + vd->fbi.rowpixels = (data & 0x3fff) >> 1; } break; case cmdFifoDepth: /* case auxBufferAddr: -- Banshee */ - if (v->type == TYPE_VOODOO_2 && (chips & 1)) - v->fbi.cmdfifo[0].depth = data; - else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1)) - v->fbi.auxoffs = data & v->fbi.mask & ~0x0f; + if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1)) + vd->fbi.cmdfifo[0].depth = data; + else if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (chips & 1)) + vd->fbi.auxoffs = data & vd->fbi.mask & ~0x0f; break; case cmdFifoHoles: /* case auxBufferStride: -- Banshee */ - if (v->type == TYPE_VOODOO_2 && (chips & 1)) - v->fbi.cmdfifo[0].holes = data; - else if (v->type >= TYPE_VOODOO_BANSHEE && (chips & 1)) + if (vd->vd_type == TYPE_VOODOO_2 && (chips & 1)) + vd->fbi.cmdfifo[0].holes = data; + else if (vd->vd_type >= TYPE_VOODOO_BANSHEE && (chips & 1)) { int rowpixels; @@ -2786,7 +2724,7 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) rowpixels = (data & 0x7f) << 6; else rowpixels = (data & 0x3fff) >> 1; - if (v->fbi.rowpixels != rowpixels) + if (vd->fbi.rowpixels != rowpixels) fatalerror("aux buffer stride differs from color buffer stride\n"); } break; @@ -2804,9 +2742,9 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) case nccTable+9: case nccTable+10: case nccTable+11: - poly_wait(v->poly, v->regnames[regnum]); - if (chips & 2) ncc_table_write(&v->tmu[0].ncc[0], regnum - nccTable, data); - if (chips & 4) ncc_table_write(&v->tmu[1].ncc[0], regnum - nccTable, data); + poly_wait(vd->poly, vd->regnames[regnum]); + if (chips & 2) ncc_table_write(&vd->tmu[0].ncc[0], regnum - nccTable, data); + if (chips & 4) ncc_table_write(&vd->tmu[1].ncc[0], regnum - nccTable, data); break; case nccTable+12: @@ -2821,9 +2759,9 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) case nccTable+21: case nccTable+22: case nccTable+23: - poly_wait(v->poly, v->regnames[regnum]); - if (chips & 2) ncc_table_write(&v->tmu[0].ncc[1], regnum - (nccTable+12), data); - if (chips & 4) ncc_table_write(&v->tmu[1].ncc[1], regnum - (nccTable+12), data); + poly_wait(vd->poly, vd->regnames[regnum]); + if (chips & 2) ncc_table_write(&vd->tmu[0].ncc[1], regnum - (nccTable+12), data); + if (chips & 4) ncc_table_write(&vd->tmu[1].ncc[1], regnum - (nccTable+12), data); break; /* fogTable entries are processed and expanded immediately */ @@ -2859,14 +2797,14 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) case fogTable+29: case fogTable+30: case fogTable+31: - poly_wait(v->poly, v->regnames[regnum]); + poly_wait(vd->poly, vd->regnames[regnum]); if (chips & 1) { int base = 2 * (regnum - fogTable); - v->fbi.fogdelta[base + 0] = (data >> 0) & 0xff; - v->fbi.fogblend[base + 0] = (data >> 8) & 0xff; - v->fbi.fogdelta[base + 1] = (data >> 16) & 0xff; - v->fbi.fogblend[base + 1] = (data >> 24) & 0xff; + vd->fbi.fogdelta[base + 0] = (data >> 0) & 0xff; + vd->fbi.fogblend[base + 0] = (data >> 8) & 0xff; + vd->fbi.fogdelta[base + 1] = (data >> 16) & 0xff; + vd->fbi.fogblend[base + 1] = (data >> 24) & 0xff; } break; @@ -2878,22 +2816,22 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) case texBaseAddr_1: case texBaseAddr_2: case texBaseAddr_3_8: - poly_wait(v->poly, v->regnames[regnum]); + poly_wait(vd->poly, vd->regnames[regnum]); if (chips & 2) { - v->tmu[0].reg[regnum].u = data; - v->tmu[0].regdirty = TRUE; + vd->tmu[0].reg[regnum].u = data; + vd->tmu[0].regdirty = TRUE; } if (chips & 4) { - v->tmu[1].reg[regnum].u = data; - v->tmu[1].regdirty = TRUE; + vd->tmu[1].reg[regnum].u = data; + vd->tmu[1].regdirty = TRUE; } break; case trexInit1: /* send tmu config data to the frame buffer */ - v->send_config = (TREXINIT_SEND_TMU_CONFIG(data) > 0); + vd->send_config = (TREXINIT_SEND_TMU_CONFIG(data) > 0); goto default_case; /* these registers are referenced in the renderer; we must wait for pending work before changing */ @@ -2907,25 +2845,25 @@ static INT32 register_w(voodoo_state *v, offs_t offset, UINT32 data) case color0: case clipLowYHighY: case clipLeftRight: - poly_wait(v->poly, v->regnames[regnum]); + poly_wait(vd->poly, vd->regnames[regnum]); /* fall through to default implementation */ /* by default, just feed the data to the chips */ default: default_case: - if (chips & 1) v->reg[0x000 + regnum].u = data; - if (chips & 2) v->reg[0x100 + regnum].u = data; - if (chips & 4) v->reg[0x200 + regnum].u = data; - if (chips & 8) v->reg[0x300 + regnum].u = data; + if (chips & 1) vd->reg[0x000 + regnum].u = data; + if (chips & 2) vd->reg[0x100 + regnum].u = data; + if (chips & 4) vd->reg[0x200 + regnum].u = data; + if (chips & 8) vd->reg[0x300 + regnum].u = data; break; } if (LOG_REGISTERS) { if (regnum < fvertexAx || regnum > fdWdY) - v->device->logerror("VOODOO.%d.REG:%s(%d) write = %08X\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, origdata); + vd->device->logerror("VOODOO.%d.REG:%s(%d) write = %08X\n", vd->index, (regnum < 0x384/4) ? vd->regnames[regnum] : "oob", chips, origdata); else - v->device->logerror("VOODOO.%d.REG:%s(%d) write = %f\n", v->index, (regnum < 0x384/4) ? v->regnames[regnum] : "oob", chips, (double) u2f(origdata)); + vd->device->logerror("VOODOO.%d.REG:%s(%d) write = %f\n", vd->index, (regnum < 0x384/4) ? vd->regnames[regnum] : "oob", chips, (double) u2f(origdata)); } return cycles; @@ -2938,25 +2876,25 @@ default_case: * Voodoo LFB writes * *************************************/ -static INT32 lfb_direct_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) -{ +INT32 voodoo_device::lfb_direct_w(voodoo_device *vd, offs_t offset, UINT32 data, UINT32 mem_mask) +{ UINT16 *dest; UINT32 destmax; int x, y; UINT32 bufoffs; /* statistics */ - v->stats.lfb_writes++; + vd->stats.lfb_writes++; /* byte swizzling */ - if (LFBMODE_BYTE_SWIZZLE_WRITES(v->reg[lfbMode].u)) + if (LFBMODE_BYTE_SWIZZLE_WRITES(vd->reg[lfbMode].u)) { data = FLIPENDIAN_INT32(data); mem_mask = FLIPENDIAN_INT32(mem_mask); } /* word swapping */ - if (LFBMODE_WORD_SWAP_WRITES(v->reg[lfbMode].u)) + if (LFBMODE_WORD_SWAP_WRITES(vd->reg[lfbMode].u)) { data = (data << 16) | (data >> 16); mem_mask = (mem_mask << 16) | (mem_mask >> 16); @@ -2966,25 +2904,26 @@ static INT32 lfb_direct_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 me // For direct lfb access just write the data /* compute X,Y */ offset <<= 1; - x = offset & ((1 << v->fbi.lfb_stride) - 1); - y = (offset >> v->fbi.lfb_stride); - dest = (UINT16 *)(v->fbi.ram + v->fbi.lfb_base*4); - destmax = (v->fbi.mask + 1 - v->fbi.lfb_base*4) / 2; - bufoffs = y * v->fbi.rowpixels + x; + x = offset & ((1 << vd->fbi.lfb_stride) - 1); + y = (offset >> vd->fbi.lfb_stride); + dest = (UINT16 *)(vd->fbi.ram + vd->fbi.lfb_base*4); + destmax = (vd->fbi.mask + 1 - vd->fbi.lfb_base*4) / 2; + bufoffs = y * vd->fbi.rowpixels + x; if (bufoffs >= destmax) { - v->device->logerror("lfb_direct_w: Buffer offset out of bounds x=%i y=%i offset=%08X bufoffs=%08X data=%08X\n", x, y, offset, (UINT32) bufoffs, data); + vd->device->logerror("lfb_direct_w: Buffer offset out of bounds x=%i y=%i offset=%08X bufoffs=%08X data=%08X\n", x, y, offset, (UINT32) bufoffs, data); return 0; } if (ACCESSING_BITS_0_15) dest[bufoffs + 0] = data&0xffff; if (ACCESSING_BITS_16_31) dest[bufoffs + 1] = data>>16; - if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write direct (%d,%d) = %08X & %08X\n", v->index, x, y, data, mem_mask); + if (LOG_LFB) vd->device->logerror("VOODOO.%d.LFB:write direct (%d,%d) = %08X & %08X\n", vd->index, x, y, data, mem_mask); return 0; } -static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) +INT32 voodoo_device::lfb_w(voodoo_device* vd, offs_t offset, UINT32 data, UINT32 mem_mask) { + UINT16 *dest, *depth; UINT32 destmax, depthmax; int sr[2], sg[2], sb[2], sa[2], sw[2]; @@ -2992,28 +2931,28 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) int pix, destbuf; /* statistics */ - v->stats.lfb_writes++; + vd->stats.lfb_writes++; /* byte swizzling */ - if (LFBMODE_BYTE_SWIZZLE_WRITES(v->reg[lfbMode].u)) + if (LFBMODE_BYTE_SWIZZLE_WRITES(vd->reg[lfbMode].u)) { data = FLIPENDIAN_INT32(data); mem_mask = FLIPENDIAN_INT32(mem_mask); } /* word swapping */ - if (LFBMODE_WORD_SWAP_WRITES(v->reg[lfbMode].u)) + if (LFBMODE_WORD_SWAP_WRITES(vd->reg[lfbMode].u)) { data = (data << 16) | (data >> 16); mem_mask = (mem_mask << 16) | (mem_mask >> 16); } /* extract default depth and alpha values */ - sw[0] = sw[1] = v->reg[zaColor].u & 0xffff; - sa[0] = sa[1] = v->reg[zaColor].u >> 24; + sw[0] = sw[1] = vd->reg[zaColor].u & 0xffff; + sa[0] = sa[1] = vd->reg[zaColor].u >> 24; /* first extract A,R,G,B from the data */ - switch (LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u) + 16 * LFBMODE_RGBA_LANES(v->reg[lfbMode].u)) + switch (LFBMODE_WRITE_FORMAT(vd->reg[lfbMode].u) + 16 * LFBMODE_RGBA_LANES(vd->reg[lfbMode].u)) { case 16*0 + 0: /* ARGB, 16-bit RGB 5-6-5 */ case 16*2 + 0: /* RGBA, 16-bit RGB 5-6-5 */ @@ -3180,13 +3119,13 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) break; default: /* reserved */ - v->device->logerror("lfb_w: Unknown format\n"); + vd->device->logerror("lfb_w: Unknown format\n"); return 0; } /* compute X,Y */ - x = offset & ((1 << v->fbi.lfb_stride) - 1); - y = (offset >> v->fbi.lfb_stride) & 0x3ff; + x = offset & ((1 << vd->fbi.lfb_stride) - 1); + y = (offset >> vd->fbi.lfb_stride) & 0x3ff; /* adjust the mask based on which half of the data is written */ if (!ACCESSING_BITS_0_15) @@ -3195,47 +3134,47 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) mask &= ~(0xf0 + LFB_DEPTH_PRESENT_MSW); /* select the target buffer */ - destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : LFBMODE_WRITE_BUFFER_SELECT(v->reg[lfbMode].u); + destbuf = (vd->vd_type >= TYPE_VOODOO_BANSHEE) ? 1 : LFBMODE_WRITE_BUFFER_SELECT(vd->reg[lfbMode].u); switch (destbuf) { case 0: /* front buffer */ - dest = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.frontbuf]); - destmax = (v->fbi.mask + 1 - v->fbi.rgboffs[v->fbi.frontbuf]) / 2; - v->fbi.video_changed = TRUE; + dest = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.frontbuf]); + destmax = (vd->fbi.mask + 1 - vd->fbi.rgboffs[vd->fbi.frontbuf]) / 2; + vd->fbi.video_changed = TRUE; break; case 1: /* back buffer */ - dest = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.backbuf]); - destmax = (v->fbi.mask + 1 - v->fbi.rgboffs[v->fbi.backbuf]) / 2; + dest = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.backbuf]); + destmax = (vd->fbi.mask + 1 - vd->fbi.rgboffs[vd->fbi.backbuf]) / 2; break; default: /* reserved */ return 0; } - depth = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs); - depthmax = (v->fbi.mask + 1 - v->fbi.auxoffs) / 2; + depth = (UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs); + depthmax = (vd->fbi.mask + 1 - vd->fbi.auxoffs) / 2; /* simple case: no pipeline */ - if (!LFBMODE_ENABLE_PIXEL_PIPELINE(v->reg[lfbMode].u)) + if (!LFBMODE_ENABLE_PIXEL_PIPELINE(vd->reg[lfbMode].u)) { DECLARE_DITHER_POINTERS_NO_DITHER_VAR; UINT32 bufoffs; - if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write raw mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask); + if (LOG_LFB) vd->device->logerror("VOODOO.%d.LFB:write raw mode %X (%d,%d) = %08X & %08X\n", vd->index, LFBMODE_WRITE_FORMAT(vd->reg[lfbMode].u), x, y, data, mem_mask); /* determine the screen Y */ scry = y; - if (LFBMODE_Y_ORIGIN(v->reg[lfbMode].u)) - scry = (v->fbi.yorigin - y) & 0x3ff; + if (LFBMODE_Y_ORIGIN(vd->reg[lfbMode].u)) + scry = (vd->fbi.yorigin - y) & 0x3ff; /* advance pointers to the proper row */ - bufoffs = scry * v->fbi.rowpixels + x; + bufoffs = scry * vd->fbi.rowpixels + x; /* compute dithering */ - COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(v->reg[fbzMode].u, y); + COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(vd->reg[fbzMode].u, y); /* wait for any outstanding work to finish */ - poly_wait(v->poly, "LFB Write"); + poly_wait(vd->poly, "LFB Write"); /* loop over up to two pixels */ for (pix = 0; mask; pix++) @@ -3247,7 +3186,7 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) if ((mask & LFB_RGB_PRESENT) && bufoffs < destmax) { /* apply dithering and write to the screen */ - APPLY_DITHER(v->reg[fbzMode].u, x, dither_lookup, sr[pix], sg[pix], sb[pix]); + APPLY_DITHER(vd->reg[fbzMode].u, x, dither_lookup, sr[pix], sg[pix], sb[pix]); dest[bufoffs] = (sr[pix] << 11) | (sg[pix] << 5) | sb[pix]; } @@ -3255,16 +3194,16 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) if (depth && bufoffs < depthmax) { /* write to the alpha buffer */ - if ((mask & LFB_ALPHA_PRESENT) && FBZMODE_ENABLE_ALPHA_PLANES(v->reg[fbzMode].u)) + if ((mask & LFB_ALPHA_PRESENT) && FBZMODE_ENABLE_ALPHA_PLANES(vd->reg[fbzMode].u)) depth[bufoffs] = sa[pix]; /* write to the depth buffer */ - if ((mask & (LFB_DEPTH_PRESENT | LFB_DEPTH_PRESENT_MSW)) && !FBZMODE_ENABLE_ALPHA_PLANES(v->reg[fbzMode].u)) + if ((mask & (LFB_DEPTH_PRESENT | LFB_DEPTH_PRESENT_MSW)) && !FBZMODE_ENABLE_ALPHA_PLANES(vd->reg[fbzMode].u)) depth[bufoffs] = sw[pix]; } /* track pixel writes to the frame buffer regardless of mask */ - v->reg[fbiPixelsOut].u++; + vd->reg[fbiPixelsOut].u++; } /* advance our pointers */ @@ -3279,20 +3218,20 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) { DECLARE_DITHER_POINTERS; - if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:write pipelined mode %X (%d,%d) = %08X & %08X\n", v->index, LFBMODE_WRITE_FORMAT(v->reg[lfbMode].u), x, y, data, mem_mask); + if (LOG_LFB) vd->device->logerror("VOODOO.%d.LFB:write pipelined mode %X (%d,%d) = %08X & %08X\n", vd->index, LFBMODE_WRITE_FORMAT(vd->reg[lfbMode].u), x, y, data, mem_mask); /* determine the screen Y */ scry = y; - if (FBZMODE_Y_ORIGIN(v->reg[fbzMode].u)) - scry = (v->fbi.yorigin - y) & 0x3ff; + if (FBZMODE_Y_ORIGIN(vd->reg[fbzMode].u)) + scry = (vd->fbi.yorigin - y) & 0x3ff; /* advance pointers to the proper row */ - dest += scry * v->fbi.rowpixels; + dest += scry * vd->fbi.rowpixels; if (depth) - depth += scry * v->fbi.rowpixels; + depth += scry * vd->fbi.rowpixels; /* compute dithering */ - COMPUTE_DITHER_POINTERS(v->reg[fbzMode].u, y); + COMPUTE_DITHER_POINTERS(vd->reg[fbzMode].u, y); /* loop over up to two pixels */ for (pix = 0; mask; pix++) @@ -3300,10 +3239,10 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) /* make sure we care about this pixel */ if (mask & 0x0f) { - stats_block *stats = &v->fbi.lfb_stats; + stats_block *stats = &vd->fbi.lfb_stats; INT64 iterw; - if (LFBMODE_WRITE_W_SELECT(v->reg[lfbMode].u)) { - iterw = (UINT32) v->reg[zaColor].u << 16; + if (LFBMODE_WRITE_W_SELECT(vd->reg[lfbMode].u)) { + iterw = (UINT32) vd->reg[zaColor].u << 16; } else { // The most significant fractional bits of 16.32 W are set to z iterw = (UINT32) sw[pix] << 16; @@ -3311,12 +3250,12 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) INT32 iterz = sw[pix] << 12; /* apply clipping */ - if (FBZMODE_ENABLE_CLIPPING(v->reg[fbzMode].u)) + if (FBZMODE_ENABLE_CLIPPING(vd->reg[fbzMode].u)) { - if (x < ((v->reg[clipLeftRight].u >> 16) & 0x3ff) || - x >= (v->reg[clipLeftRight].u & 0x3ff) || - scry < ((v->reg[clipLowYHighY].u >> 16) & 0x3ff) || - scry >= (v->reg[clipLowYHighY].u & 0x3ff)) + if (x < ((vd->reg[clipLeftRight].u >> 16) & 0x3ff) || + x >= (vd->reg[clipLeftRight].u & 0x3ff) || + scry < ((vd->reg[clipLowYHighY].u >> 16) & 0x3ff) || + scry >= (vd->reg[clipLowYHighY].u & 0x3ff)) { stats->pixels_in++; stats->clip_fail++; @@ -3329,7 +3268,7 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) /* pixel pipeline part 1 handles depth testing and stippling */ - //PIXEL_PIPELINE_BEGIN(v, stats, x, y, v->reg[fbzColorPath].u, v->reg[fbzMode].u, iterz, iterw); + //PIXEL_PIPELINE_BEGIN(v, stats, x, y, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, iterz, iterw); // Start PIXEL_PIPE_BEGIN copy //#define PIXEL_PIPELINE_BEGIN(VV, STATS, XX, YY, FBZCOLORPATH, FBZMODE, ITERZ, ITERW) INT32 fogdepth, biasdepth; @@ -3341,15 +3280,15 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) /* note that for perf reasons, we assume the caller has done clipping */ /* handle stippling */ - if (FBZMODE_ENABLE_STIPPLE(v->reg[fbzMode].u)) + if (FBZMODE_ENABLE_STIPPLE(vd->reg[fbzMode].u)) { /* rotate mode */ - if (FBZMODE_STIPPLE_PATTERN(v->reg[fbzMode].u) == 0) + if (FBZMODE_STIPPLE_PATTERN(vd->reg[fbzMode].u) == 0) { - v->reg[stipple].u = (v->reg[stipple].u << 1) | (v->reg[stipple].u >> 31); - if ((v->reg[stipple].u & 0x80000000) == 0) + vd->reg[stipple].u = (vd->reg[stipple].u << 1) | (vd->reg[stipple].u >> 31); + if ((vd->reg[stipple].u & 0x80000000) == 0) { - v->stats.total_stippled++; + vd->stats.total_stippled++; goto skipdrawdepth; } } @@ -3358,9 +3297,9 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) else { int stipple_index = ((y & 3) << 3) | (~x & 7); - if (((v->reg[stipple].u >> stipple_index) & 1) == 0) + if (((vd->reg[stipple].u >> stipple_index) & 1) == 0) { - v->stats.total_stippled++; + vd->stats.total_stippled++; goto nextpixel; } } @@ -3372,29 +3311,29 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask) /* Perform depth testing */ - if (!depthTest((UINT16) v->reg[zaColor].u, stats, depth[x], v->reg[fbzMode].u, biasdepth)) + if (!depthTest((UINT16) vd->reg[zaColor].u, stats, depth[x], vd->reg[fbzMode].u, biasdepth)) goto nextpixel; /* use the RGBA we stashed above */ color.set(sa[pix], sr[pix], sg[pix], sb[pix]); /* handle chroma key */ - if (!chromaKeyTest(v, stats, v->reg[fbzMode].u, color)) + if (!chromaKeyTest(vd, stats, vd->reg[fbzMode].u, color)) goto nextpixel; /* handle alpha mask */ - if (!alphaMaskTest(stats, v->reg[fbzMode].u, color.get_a())) + if (!alphaMaskTest(stats, vd->reg[fbzMode].u, color.get_a())) goto nextpixel; /* handle alpha test */ - if (!alphaTest(v, stats, v->reg[alphaMode].u, color.get_a())) + if (!alphaTest(vd, stats, vd->reg[alphaMode].u, color.get_a())) goto nextpixel; /* wait for any outstanding work to finish */ - poly_wait(v->poly, "LFB Write"); + poly_wait(vd->poly, "LFB Write"); /* pixel pipeline part 2 handles color combine, fog, alpha, and final output */ - PIXEL_PIPELINE_END(v, stats, dither, dither4, dither_lookup, x, dest, depth, - v->reg[fbzMode].u, v->reg[fbzColorPath].u, v->reg[alphaMode].u, v->reg[fogMode].u, + PIXEL_PIPELINE_END(vd, stats, dither, dither4, dither_lookup, x, dest, depth, + vd->reg[fbzMode].u, vd->reg[fbzColorPath].u, vd->reg[alphaMode].u, vd->reg[fogMode].u, iterz, iterw, iterargb) {}; nextpixel: /* advance our pointers */ @@ -3414,24 +3353,24 @@ nextpixel: * *************************************/ -static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) +INT32 voodoo_device::texture_w(voodoo_device *vd, offs_t offset, UINT32 data) { int tmunum = (offset >> 19) & 0x03; tmu_state *t; /* statistics */ - v->stats.tex_writes++; + vd->stats.tex_writes++; /* point to the right TMU */ - if (!(v->chipmask & (2 << tmunum))) + if (!(vd->chipmask & (2 << tmunum))) return 0; - t = &v->tmu[tmunum]; + t = &vd->tmu[tmunum]; if (TEXLOD_TDIRECT_WRITE(t->reg[tLOD].u)) fatalerror("Texture direct write!\n"); /* wait for any outstanding work to finish */ - poly_wait(v->poly, "Texture write"); + poly_wait(vd->poly, "Texture write"); /* update texture info if dirty */ if (t->regdirty) @@ -3451,13 +3390,13 @@ static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) UINT8 *dest; /* extract info */ - if (v->type <= TYPE_VOODOO_2) + if (vd->vd_type <= TYPE_VOODOO_2) { lod = (offset >> 15) & 0x0f; tt = (offset >> 7) & 0xff; /* old code has a bit about how this is broken in gauntleg unless we always look at TMU0 */ - if (TEXMODE_SEQ_8_DOWNLD(v->tmu[0].reg/*t->reg*/[textureMode].u)) + if (TEXMODE_SEQ_8_DOWNLD(vd->tmu[0].reg/*t->reg*/[textureMode].u)) ts = (offset << 2) & 0xfc; else ts = (offset << 1) & 0xfc; @@ -3470,13 +3409,13 @@ static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) tbaseaddr = t->lodoffset[lod]; tbaseaddr += tt * ((t->wmask >> lod) + 1) + ts; - if (LOG_TEXTURE_RAM) v->device->logerror("Texture 8-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data); + if (LOG_TEXTURE_RAM) vd->device->logerror("Texture 8-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data); } else { tbaseaddr = t->lodoffset[0] + offset*4; - if (LOG_TEXTURE_RAM) v->device->logerror("Texture 8-bit w: offset=%X data=%08X\n", offset*4, data); + if (LOG_TEXTURE_RAM) vd->device->logerror("Texture 8-bit w: offset=%X data=%08X\n", offset*4, data); } /* write the four bytes in little-endian order */ @@ -3496,7 +3435,7 @@ static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) UINT16 *dest; /* extract info */ - if (v->type <= TYPE_VOODOO_2) + if (vd->vd_type <= TYPE_VOODOO_2) { lod = (offset >> 15) & 0x0f; tt = (offset >> 7) & 0xff; @@ -3510,13 +3449,13 @@ static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) tbaseaddr = t->lodoffset[lod]; tbaseaddr += 2 * (tt * ((t->wmask >> lod) + 1) + ts); - if (LOG_TEXTURE_RAM) v->device->logerror("Texture 16-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data); + if (LOG_TEXTURE_RAM) vd->device->logerror("Texture 16-bit w: lod=%d s=%d t=%d data=%08X\n", lod, ts, tt, data); } else { tbaseaddr = t->lodoffset[0] + offset*4; - if (LOG_TEXTURE_RAM) v->device->logerror("Texture 16-bit w: offset=%X data=%08X\n", offset*4, data); + if (LOG_TEXTURE_RAM) vd->device->logerror("Texture 16-bit w: offset=%X data=%08X\n", offset*4, data); } /* write the two words in little-endian order */ @@ -3538,7 +3477,7 @@ static INT32 texture_w(voodoo_state *v, offs_t offset, UINT32 data) * *************************************/ -static void flush_fifos(voodoo_state *v, attotime current_time) +void voodoo_device::flush_fifos(voodoo_device *vd, attotime current_time) { static UINT8 in_flush; @@ -3547,14 +3486,14 @@ static void flush_fifos(voodoo_state *v, attotime current_time) return; in_flush = TRUE; - if (!v->pci.op_pending) fatalerror("flush_fifos called with no pending operation\n"); + if (!vd->pci.op_pending) fatalerror("flush_fifos called with no pending operation\n"); - if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos start -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index, - v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds(), + if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos start -- pending=%d.%08X%08X cur=%d.%08X%08X\n", vd->index, + vd->pci.op_end_time.seconds(), (UINT32)(vd->pci.op_end_time.attoseconds() >> 32), (UINT32)vd->pci.op_end_time.attoseconds(), current_time.seconds(), (UINT32)(current_time.attoseconds() >> 32), (UINT32)current_time.attoseconds()); /* loop while we still have cycles to burn */ - while (v->pci.op_end_time <= current_time) + while (vd->pci.op_end_time <= current_time) { INT32 extra_cycles = 0; INT32 cycles; @@ -3567,27 +3506,27 @@ static void flush_fifos(voodoo_state *v, attotime current_time) UINT32 data; /* we might be in CMDFIFO mode */ - if (v->fbi.cmdfifo[0].enable) + if (vd->fbi.cmdfifo[0].enable) { /* if we don't have anything to execute, we're done for now */ - cycles = cmdfifo_execute_if_ready(v, &v->fbi.cmdfifo[0]); + cycles = cmdfifo_execute_if_ready(vd, &vd->fbi.cmdfifo[0]); if (cycles == -1) { - v->pci.op_pending = FALSE; + vd->pci.op_pending = FALSE; in_flush = FALSE; - if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", v->index); + if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", vd->index); return; } } - else if (v->fbi.cmdfifo[1].enable) + else if (vd->fbi.cmdfifo[1].enable) { /* if we don't have anything to execute, we're done for now */ - cycles = cmdfifo_execute_if_ready(v, &v->fbi.cmdfifo[1]); + cycles = cmdfifo_execute_if_ready(vd, &vd->fbi.cmdfifo[1]); if (cycles == -1) { - v->pci.op_pending = FALSE; + vd->pci.op_pending = FALSE; in_flush = FALSE; - if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", v->index); + if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- CMDFIFO empty\n", vd->index); return; } } @@ -3596,15 +3535,15 @@ static void flush_fifos(voodoo_state *v, attotime current_time) else { /* choose which FIFO to read from */ - if (!fifo_empty(&v->fbi.fifo)) - fifo = &v->fbi.fifo; - else if (!fifo_empty(&v->pci.fifo)) - fifo = &v->pci.fifo; + if (!fifo_empty(&vd->fbi.fifo)) + fifo = &vd->fbi.fifo; + else if (!fifo_empty(&vd->pci.fifo)) + fifo = &vd->pci.fifo; else { - v->pci.op_pending = FALSE; + vd->pci.op_pending = FALSE; in_flush = FALSE; - if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- FIFOs empty\n", v->index); + if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- FIFOs empty\n", vd->index); return; } @@ -3614,9 +3553,9 @@ static void flush_fifos(voodoo_state *v, attotime current_time) /* target the appropriate location */ if ((address & (0xc00000/4)) == 0) - cycles = register_w(v, address, data); + cycles = register_w(vd, address, data); else if (address & (0x800000/4)) - cycles = texture_w(v, address, data); + cycles = texture_w(vd, address, data); else { UINT32 mem_mask = 0xffffffff; @@ -3628,7 +3567,7 @@ static void flush_fifos(voodoo_state *v, attotime current_time) mem_mask &= 0xffff0000; address &= 0xffffff; - cycles = lfb_w(v, address, data, mem_mask); + cycles = lfb_w(vd, address, data, mem_mask); } } @@ -3645,15 +3584,15 @@ static void flush_fifos(voodoo_state *v, attotime current_time) cycles += extra_cycles; /* account for those cycles */ - v->pci.op_end_time += attotime(0, (attoseconds_t)cycles * v->attoseconds_per_cycle); + vd->pci.op_end_time += attotime(0, (attoseconds_t)cycles * vd->attoseconds_per_cycle); - if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:update -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index, - v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds(), + if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:update -- pending=%d.%08X%08X cur=%d.%08X%08X\n", vd->index, + vd->pci.op_end_time.seconds(), (UINT32)(vd->pci.op_end_time.attoseconds() >> 32), (UINT32)vd->pci.op_end_time.attoseconds(), current_time.seconds(), (UINT32)(current_time.attoseconds() >> 32), (UINT32)current_time.attoseconds()); } - if (LOG_FIFO_VERBOSE) v->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- pending command complete at %d.%08X%08X\n", v->index, - v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds()); + if (LOG_FIFO_VERBOSE) vd->device->logerror("VOODOO.%d.FIFO:flush_fifos end -- pending command complete at %d.%08X%08X\n", vd->index, + vd->pci.op_end_time.seconds(), (UINT32)(vd->pci.op_end_time.attoseconds() >> 32), (UINT32)vd->pci.op_end_time.attoseconds()); in_flush = FALSE; } @@ -3669,18 +3608,17 @@ static void flush_fifos(voodoo_state *v, attotime current_time) WRITE32_MEMBER( voodoo_device::voodoo_w ) { - voodoo_state *v = get_safe_token(this); int stall = FALSE; g_profiler.start(PROFILER_USER1); /* should not be getting accesses while stalled */ - if (v->pci.stall_state != NOT_STALLED) + if (pci.stall_state != NOT_STALLED) logerror("voodoo_w while stalled!\n"); /* if we have something pending, flush the FIFOs up to the current time */ - if (v->pci.op_pending) - flush_fifos(v, machine().time()); + if (pci.op_pending) + flush_fifos(this, machine().time()); /* special handling for registers */ if ((offset & 0xc00000/4) == 0) @@ -3688,10 +3626,10 @@ WRITE32_MEMBER( voodoo_device::voodoo_w ) UINT8 access; /* some special stuff for Voodoo 2 */ - if (v->type >= TYPE_VOODOO_2) + if (vd_type >= TYPE_VOODOO_2) { /* we might be in CMDFIFO mode */ - if (FBIINIT7_CMDFIFO_ENABLE(v->reg[fbiInit7].u)) + if (FBIINIT7_CMDFIFO_ENABLE(reg[fbiInit7].u)) { /* if bit 21 is set, we're writing to the FIFO */ if (offset & 0x200000/4) @@ -3699,20 +3637,20 @@ WRITE32_MEMBER( voodoo_device::voodoo_w ) /* check for byte swizzling (bit 18) */ if (offset & 0x40000/4) data = FLIPENDIAN_INT32(data); - cmdfifo_w(v, &v->fbi.cmdfifo[0], offset & 0xffff, data); + cmdfifo_w(this, &fbi.cmdfifo[0], offset & 0xffff, data); g_profiler.stop(); return; } /* we're a register access; but only certain ones are allowed */ - access = v->regaccess[offset & 0xff]; + access = regaccess[offset & 0xff]; if (!(access & REGISTER_WRITETHRU)) { /* track swap buffers regardless */ if ((offset & 0xff) == swapbufferCMD) - v->fbi.swaps_pending++; + fbi.swaps_pending++; - logerror("Ignoring write to %s in CMDFIFO mode\n", v->regnames[offset & 0xff]); + logerror("Ignoring write to %s in CMDFIFO mode\n", regnames[offset & 0xff]); g_profiler.stop(); return; } @@ -3725,7 +3663,7 @@ WRITE32_MEMBER( voodoo_device::voodoo_w ) /* check the access behavior; note that the table works even if the */ /* alternate mapping is used */ - access = v->regaccess[offset & 0xff]; + access = regaccess[offset & 0xff]; /* ignore if writes aren't allowed */ if (!(access & REGISTER_WRITE)) @@ -3740,31 +3678,31 @@ WRITE32_MEMBER( voodoo_device::voodoo_w ) /* track swap buffers */ if ((offset & 0xff) == swapbufferCMD) - v->fbi.swaps_pending++; + fbi.swaps_pending++; } /* if we don't have anything pending, or if FIFOs are disabled, just execute */ - if (!v->pci.op_pending || !INITEN_ENABLE_PCI_FIFO(v->pci.init_enable)) + if (!pci.op_pending || !INITEN_ENABLE_PCI_FIFO(pci.init_enable)) { int cycles; /* target the appropriate location */ if ((offset & (0xc00000/4)) == 0) - cycles = register_w(v, offset, data); + cycles = register_w(this, offset, data); else if (offset & (0x800000/4)) - cycles = texture_w(v, offset, data); + cycles = texture_w(this, offset, data); else - cycles = lfb_w(v, offset, data, mem_mask); + cycles = lfb_w(this, offset, data, mem_mask); /* if we ended up with cycles, mark the operation pending */ if (cycles) { - v->pci.op_pending = TRUE; - v->pci.op_end_time = machine().time() + attotime(0, (attoseconds_t)cycles * v->attoseconds_per_cycle); + pci.op_pending = TRUE; + pci.op_end_time = machine().time() + attotime(0, (attoseconds_t)cycles * attoseconds_per_cycle); - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", v->index, + if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:direct write start at %d.%08X%08X end at %d.%08X%08X\n", index, machine().time().seconds(), (UINT32)(machine().time().attoseconds() >> 32), (UINT32)machine().time().attoseconds(), - v->pci.op_end_time.seconds(), (UINT32)(v->pci.op_end_time.attoseconds() >> 32), (UINT32)v->pci.op_end_time.attoseconds()); + pci.op_end_time.seconds(), (UINT32)(pci.op_end_time.attoseconds() >> 32), (UINT32)pci.op_end_time.attoseconds()); } g_profiler.stop(); return; @@ -3780,56 +3718,56 @@ WRITE32_MEMBER( voodoo_device::voodoo_w ) } /* if there's room in the PCI FIFO, add there */ - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w adding to PCI FIFO @ %08X=%08X\n", v->index, offset, data); - if (!fifo_full(&v->pci.fifo)) + if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w adding to PCI FIFO @ %08X=%08X\n", this, offset, data); + if (!fifo_full(&pci.fifo)) { - fifo_add(&v->pci.fifo, offset); - fifo_add(&v->pci.fifo, data); + fifo_add(&pci.fifo, offset); + fifo_add(&pci.fifo, data); } else fatalerror("PCI FIFO full\n"); /* handle flushing to the memory FIFO */ - if (FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u) && - fifo_space(&v->pci.fifo) <= 2 * FBIINIT4_MEMORY_FIFO_LWM(v->reg[fbiInit4].u)) + if (FBIINIT0_ENABLE_MEMORY_FIFO(reg[fbiInit0].u) && + fifo_space(&pci.fifo) <= 2 * FBIINIT4_MEMORY_FIFO_LWM(reg[fbiInit4].u)) { UINT8 valid[4]; /* determine which types of data can go to the memory FIFO */ valid[0] = TRUE; - valid[1] = FBIINIT0_LFB_TO_MEMORY_FIFO(v->reg[fbiInit0].u); - valid[2] = valid[3] = FBIINIT0_TEXMEM_TO_MEMORY_FIFO(v->reg[fbiInit0].u); + valid[1] = FBIINIT0_LFB_TO_MEMORY_FIFO(reg[fbiInit0].u); + valid[2] = valid[3] = FBIINIT0_TEXMEM_TO_MEMORY_FIFO(reg[fbiInit0].u); /* flush everything we can */ - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w moving PCI FIFO to memory FIFO\n", v->index); - while (!fifo_empty(&v->pci.fifo) && valid[(fifo_peek(&v->pci.fifo) >> 22) & 3]) + if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w moving PCI FIFO to memory FIFO\n", index); + while (!fifo_empty(&pci.fifo) && valid[(fifo_peek(&pci.fifo) >> 22) & 3]) { - fifo_add(&v->fbi.fifo, fifo_remove(&v->pci.fifo)); - fifo_add(&v->fbi.fifo, fifo_remove(&v->pci.fifo)); + fifo_add(&fbi.fifo, fifo_remove(&pci.fifo)); + fifo_add(&fbi.fifo, fifo_remove(&pci.fifo)); } /* if we're above the HWM as a result, stall */ - if (FBIINIT0_STALL_PCIE_FOR_HWM(v->reg[fbiInit0].u) && - fifo_items(&v->fbi.fifo) >= 2 * 32 * FBIINIT0_MEMORY_FIFO_HWM(v->reg[fbiInit0].u)) + if (FBIINIT0_STALL_PCIE_FOR_HWM(reg[fbiInit0].u) && + fifo_items(&fbi.fifo) >= 2 * 32 * FBIINIT0_MEMORY_FIFO_HWM(reg[fbiInit0].u)) { - if (LOG_FIFO) logerror("VOODOO.%d.FIFO:voodoo_w hit memory FIFO HWM -- stalling\n", v->index); - stall_cpu(v, STALLED_UNTIL_FIFO_LWM, machine().time()); + if (LOG_FIFO) logerror("VOODOO.%d.FIFO:voodoo_w hit memory FIFO HWM -- stalling\n", index); + stall_cpu(this, STALLED_UNTIL_FIFO_LWM, machine().time()); } } /* if we're at the LWM for the PCI FIFO, stall */ - if (FBIINIT0_STALL_PCIE_FOR_HWM(v->reg[fbiInit0].u) && - fifo_space(&v->pci.fifo) <= 2 * FBIINIT0_PCI_FIFO_LWM(v->reg[fbiInit0].u)) + if (FBIINIT0_STALL_PCIE_FOR_HWM(reg[fbiInit0].u) && + fifo_space(&pci.fifo) <= 2 * FBIINIT0_PCI_FIFO_LWM(reg[fbiInit0].u)) { - if (LOG_FIFO) logerror("VOODOO.%d.FIFO:voodoo_w hit PCI FIFO free LWM -- stalling\n", v->index); - stall_cpu(v, STALLED_UNTIL_FIFO_LWM, machine().time()); + if (LOG_FIFO) logerror("VOODOO.%d.FIFO:voodoo_w hit PCI FIFO free LWM -- stalling\n", index); + stall_cpu(this, STALLED_UNTIL_FIFO_LWM, machine().time()); } /* if we weren't ready, and this is a non-FIFO access, stall until the FIFOs are clear */ if (stall) { - if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w wrote non-FIFO register -- stalling until clear\n", v->index); - stall_cpu(v, STALLED_UNTIL_FIFO_EMPTY, machine().time()); + if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:voodoo_w wrote non-FIFO register -- stalling until clear\n", index); + stall_cpu(this, STALLED_UNTIL_FIFO_EMPTY, machine().time()); } g_profiler.stop(); @@ -3843,70 +3781,71 @@ WRITE32_MEMBER( voodoo_device::voodoo_w ) * *************************************/ -static UINT32 register_r(voodoo_state *v, offs_t offset) +static UINT32 register_r(voodoo_device *vd, offs_t offset) { + int regnum = offset & 0xff; UINT32 result; /* statistics */ - v->stats.reg_reads++; + vd->stats.reg_reads++; /* first make sure this register is readable */ - if (!(v->regaccess[regnum] & REGISTER_READ)) + if (!(vd->regaccess[regnum] & REGISTER_READ)) { - v->device->logerror("VOODOO.%d.ERROR:Invalid attempt to read %s\n", v->index, regnum < 225 ? v->regnames[regnum] : "unknown register"); + vd->device->logerror("VOODOO.%d.ERROR:Invalid attempt to read %s\n", vd->index, regnum < 225 ? vd->regnames[regnum] : "unknown register"); return 0xffffffff; } /* default result is the FBI register value */ - result = v->reg[regnum].u; + result = vd->reg[regnum].u; /* some registers are dynamic; compute them */ switch (regnum) { - case status: + case vdstatus: /* start with a blank slate */ result = 0; /* bits 5:0 are the PCI FIFO free space */ - if (fifo_empty(&v->pci.fifo)) + if (fifo_empty(&vd->pci.fifo)) result |= 0x3f << 0; else { - int temp = fifo_space(&v->pci.fifo)/2; + int temp = fifo_space(&vd->pci.fifo)/2; if (temp > 0x3f) temp = 0x3f; result |= temp << 0; } /* bit 6 is the vertical retrace */ - result |= v->fbi.vblank << 6; + result |= vd->fbi.vblank << 6; /* bit 7 is FBI graphics engine busy */ - if (v->pci.op_pending) + if (vd->pci.op_pending) result |= 1 << 7; /* bit 8 is TREX busy */ - if (v->pci.op_pending) + if (vd->pci.op_pending) result |= 1 << 8; /* bit 9 is overall busy */ - if (v->pci.op_pending) + if (vd->pci.op_pending) result |= 1 << 9; /* Banshee is different starting here */ - if (v->type < TYPE_VOODOO_BANSHEE) + if (vd->vd_type < TYPE_VOODOO_BANSHEE) { /* bits 11:10 specifies which buffer is visible */ - result |= v->fbi.frontbuf << 10; + result |= vd->fbi.frontbuf << 10; /* bits 27:12 indicate memory FIFO freespace */ - if (!FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u) || fifo_empty(&v->fbi.fifo)) + if (!FBIINIT0_ENABLE_MEMORY_FIFO(vd->reg[fbiInit0].u) || fifo_empty(&vd->fbi.fifo)) result |= 0xffff << 12; else { - int temp = fifo_space(&v->fbi.fifo)/2; + int temp = fifo_space(&vd->fbi.fifo)/2; if (temp > 0xffff) temp = 0xffff; result |= temp << 12; @@ -3917,38 +3856,38 @@ static UINT32 register_r(voodoo_state *v, offs_t offset) /* bit 10 is 2D busy */ /* bit 11 is cmd FIFO 0 busy */ - if (v->fbi.cmdfifo[0].enable && v->fbi.cmdfifo[0].depth > 0) + if (vd->fbi.cmdfifo[0].enable && vd->fbi.cmdfifo[0].depth > 0) result |= 1 << 11; /* bit 12 is cmd FIFO 1 busy */ - if (v->fbi.cmdfifo[1].enable && v->fbi.cmdfifo[1].depth > 0) + if (vd->fbi.cmdfifo[1].enable && vd->fbi.cmdfifo[1].depth > 0) result |= 1 << 12; } /* bits 30:28 are the number of pending swaps */ - if (v->fbi.swaps_pending > 7) + if (vd->fbi.swaps_pending > 7) result |= 7 << 28; else - result |= v->fbi.swaps_pending << 28; + result |= vd->fbi.swaps_pending << 28; /* bit 31 is not used */ /* eat some cycles since people like polling here */ - if (EAT_CYCLES) v->cpu->execute().eat_cycles(1000); + if (EAT_CYCLES) vd->cpu->execute().eat_cycles(1000); break; /* bit 2 of the initEnable register maps this to dacRead */ case fbiInit2: - if (INITEN_REMAP_INIT_TO_DAC(v->pci.init_enable)) - result = v->dac.read_result; + if (INITEN_REMAP_INIT_TO_DAC(vd->pci.init_enable)) + result = vd->dac.read_result; break; /* return the current scanline for now */ case vRetrace: /* eat some cycles since people like polling here */ - if (EAT_CYCLES) v->cpu->execute().eat_cycles(10); - result = v->screen->vpos(); + if (EAT_CYCLES) vd->cpu->execute().eat_cycles(10); + result = vd->screen->vpos(); break; /* reserved area in the TMU read by the Vegas startup sequence */ @@ -3959,26 +3898,26 @@ static UINT32 register_r(voodoo_state *v, offs_t offset) /* cmdFifo -- Voodoo2 only */ case cmdFifoRdPtr: - result = v->fbi.cmdfifo[0].rdptr; + result = vd->fbi.cmdfifo[0].rdptr; /* eat some cycles since people like polling here */ - if (EAT_CYCLES) v->cpu->execute().eat_cycles(1000); + if (EAT_CYCLES) vd->cpu->execute().eat_cycles(1000); break; case cmdFifoAMin: - result = v->fbi.cmdfifo[0].amin; + result = vd->fbi.cmdfifo[0].amin; break; case cmdFifoAMax: - result = v->fbi.cmdfifo[0].amax; + result = vd->fbi.cmdfifo[0].amax; break; case cmdFifoDepth: - result = v->fbi.cmdfifo[0].depth; + result = vd->fbi.cmdfifo[0].depth; break; case cmdFifoHoles: - result = v->fbi.cmdfifo[0].holes; + result = vd->fbi.cmdfifo[0].holes; break; /* all counters are 24-bit only */ @@ -3987,9 +3926,9 @@ static UINT32 register_r(voodoo_state *v, offs_t offset) case fbiZfuncFail: case fbiAfuncFail: case fbiPixelsOut: - update_statistics(v, TRUE); + update_statistics(vd, TRUE); case fbiTrianglesOut: - result = v->reg[regnum].u & 0xffffff; + result = vd->reg[regnum].u & 0xffffff; break; } @@ -3998,19 +3937,19 @@ static UINT32 register_r(voodoo_state *v, offs_t offset) int logit = TRUE; /* don't log multiple identical status reads from the same address */ - if (regnum == status) + if (regnum == vdstatus) { - offs_t pc = v->cpu->safe_pc(); - if (pc == v->last_status_pc && result == v->last_status_value) + offs_t pc = vd->cpu->safe_pc(); + if (pc == vd->last_status_pc && result == vd->last_status_value) logit = FALSE; - v->last_status_pc = pc; - v->last_status_value = result; + vd->last_status_pc = pc; + vd->last_status_value = result; } if (regnum == cmdFifoRdPtr) logit = FALSE; if (logit) - v->device->logerror("VOODOO.%d.REG:%s read = %08X\n", v->index, v->regnames[regnum], result); + vd->device->logerror("VOODOO.%d.REG:%s read = %08X\n", vd->index, vd->regnames[regnum], result); } return result; @@ -4024,7 +3963,7 @@ static UINT32 register_r(voodoo_state *v, offs_t offset) * *************************************/ -static UINT32 lfb_r(voodoo_state *v, offs_t offset, bool lfb_3d) +static UINT32 lfb_r(voodoo_device *vd, offs_t offset, bool lfb_3d) { UINT16 *buffer; UINT32 bufmax; @@ -4033,34 +3972,34 @@ static UINT32 lfb_r(voodoo_state *v, offs_t offset, bool lfb_3d) int x, y, scry, destbuf; /* statistics */ - v->stats.lfb_reads++; + vd->stats.lfb_reads++; /* compute X,Y */ offset <<= 1; - x = offset & ((1 << v->fbi.lfb_stride) - 1); - y = (offset >> v->fbi.lfb_stride); + x = offset & ((1 << vd->fbi.lfb_stride) - 1); + y = (offset >> vd->fbi.lfb_stride); /* select the target buffer */ if (lfb_3d) { y &= 0x3ff; - destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : LFBMODE_READ_BUFFER_SELECT(v->reg[lfbMode].u); + destbuf = (vd->vd_type >= TYPE_VOODOO_BANSHEE) ? 1 : LFBMODE_READ_BUFFER_SELECT(vd->reg[lfbMode].u); switch (destbuf) { case 0: /* front buffer */ - buffer = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.frontbuf]); - bufmax = (v->fbi.mask + 1 - v->fbi.rgboffs[v->fbi.frontbuf]) / 2; + buffer = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.frontbuf]); + bufmax = (vd->fbi.mask + 1 - vd->fbi.rgboffs[vd->fbi.frontbuf]) / 2; break; case 1: /* back buffer */ - buffer = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.backbuf]); - bufmax = (v->fbi.mask + 1 - v->fbi.rgboffs[v->fbi.backbuf]) / 2; + buffer = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.backbuf]); + bufmax = (vd->fbi.mask + 1 - vd->fbi.rgboffs[vd->fbi.backbuf]) / 2; break; case 2: /* aux buffer */ - if (v->fbi.auxoffs == ~0) + if (vd->fbi.auxoffs == ~0) return 0xffffffff; - buffer = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs); - bufmax = (v->fbi.mask + 1 - v->fbi.auxoffs) / 2; + buffer = (UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs); + bufmax = (vd->fbi.mask + 1 - vd->fbi.auxoffs) / 2; break; default: /* reserved */ @@ -4069,37 +4008,37 @@ static UINT32 lfb_r(voodoo_state *v, offs_t offset, bool lfb_3d) /* determine the screen Y */ scry = y; - if (LFBMODE_Y_ORIGIN(v->reg[lfbMode].u)) - scry = (v->fbi.yorigin - y) & 0x3ff; + if (LFBMODE_Y_ORIGIN(vd->reg[lfbMode].u)) + scry = (vd->fbi.yorigin - y) & 0x3ff; } else { // Direct lfb access - buffer = (UINT16 *)(v->fbi.ram + v->fbi.lfb_base*4); - bufmax = (v->fbi.mask + 1 - v->fbi.lfb_base*4) / 2; + buffer = (UINT16 *)(vd->fbi.ram + vd->fbi.lfb_base*4); + bufmax = (vd->fbi.mask + 1 - vd->fbi.lfb_base*4) / 2; scry = y; } /* advance pointers to the proper row */ - bufoffs = scry * v->fbi.rowpixels + x; + bufoffs = scry * vd->fbi.rowpixels + x; if (bufoffs >= bufmax) { - v->device->logerror("LFB_R: Buffer offset out of bounds x=%i y=%i lfb_3d=%i offset=%08X bufoffs=%08X\n", x, y, lfb_3d, offset, (UINT32) bufoffs); + vd->device->logerror("LFB_R: Buffer offset out of bounds x=%i y=%i lfb_3d=%i offset=%08X bufoffs=%08X\n", x, y, lfb_3d, offset, (UINT32) bufoffs); return 0xffffffff; } /* wait for any outstanding work to finish */ - poly_wait(v->poly, "LFB read"); + poly_wait(vd->poly, "LFB read"); /* compute the data */ data = buffer[bufoffs + 0] | (buffer[bufoffs + 1] << 16); /* word swapping */ - if (LFBMODE_WORD_SWAP_READS(v->reg[lfbMode].u)) + if (LFBMODE_WORD_SWAP_READS(vd->reg[lfbMode].u)) data = (data << 16) | (data >> 16); /* byte swizzling */ - if (LFBMODE_BYTE_SWIZZLE_READS(v->reg[lfbMode].u)) + if (LFBMODE_BYTE_SWIZZLE_READS(vd->reg[lfbMode].u)) data = FLIPENDIAN_INT32(data); - if (LOG_LFB) v->device->logerror("VOODOO.%d.LFB:read (%d,%d) = %08X\n", v->index, x, y, data); + if (LOG_LFB) vd->device->logerror("VOODOO.%d.LFB:read (%d,%d) = %08X\n", vd->index, x, y, data); return data; } @@ -4114,17 +4053,16 @@ static UINT32 lfb_r(voodoo_state *v, offs_t offset, bool lfb_3d) READ32_MEMBER( voodoo_device::voodoo_r ) { - voodoo_state *v = get_safe_token(this); /* if we have something pending, flush the FIFOs up to the current time */ - if (v->pci.op_pending) - flush_fifos(v, machine().time()); + if (pci.op_pending) + flush_fifos(this, machine().time()); /* target the appropriate location */ if (!(offset & (0xc00000/4))) - return register_r(v, offset); + return register_r(this, offset); else if (!(offset & (0x800000/4))) - return lfb_r(v, offset, true); + return lfb_r(this, offset, true); return 0xffffffff; } @@ -4140,7 +4078,6 @@ READ32_MEMBER( voodoo_device::voodoo_r ) READ32_MEMBER( voodoo_banshee_device::banshee_agp_r ) { - voodoo_state *v = get_safe_token(this); UINT32 result; offset &= 0x1ff/4; @@ -4149,64 +4086,63 @@ READ32_MEMBER( voodoo_banshee_device::banshee_agp_r ) switch (offset) { case cmdRdPtrL0: - result = v->fbi.cmdfifo[0].rdptr; + result = fbi.cmdfifo[0].rdptr; break; case cmdAMin0: - result = v->fbi.cmdfifo[0].amin; + result = fbi.cmdfifo[0].amin; break; case cmdAMax0: - result = v->fbi.cmdfifo[0].amax; + result = fbi.cmdfifo[0].amax; break; case cmdFifoDepth0: - result = v->fbi.cmdfifo[0].depth; + result = fbi.cmdfifo[0].depth; break; case cmdHoleCnt0: - result = v->fbi.cmdfifo[0].holes; + result = fbi.cmdfifo[0].holes; break; case cmdRdPtrL1: - result = v->fbi.cmdfifo[1].rdptr; + result = fbi.cmdfifo[1].rdptr; break; case cmdAMin1: - result = v->fbi.cmdfifo[1].amin; + result = fbi.cmdfifo[1].amin; break; case cmdAMax1: - result = v->fbi.cmdfifo[1].amax; + result = fbi.cmdfifo[1].amax; break; case cmdFifoDepth1: - result = v->fbi.cmdfifo[1].depth; + result = fbi.cmdfifo[1].depth; break; case cmdHoleCnt1: - result = v->fbi.cmdfifo[1].holes; + result = fbi.cmdfifo[1].holes; break; default: - result = v->banshee.agp[offset]; + result = banshee.agp[offset]; break; } if (LOG_REGISTERS) - logerror("%s:banshee_r(AGP:%s)\n", v->device->machine().describe_context(), banshee_agp_reg_name[offset]); + logerror("%s:banshee_r(AGP:%s)\n", device->machine().describe_context(), banshee_agp_reg_name[offset]); return result; } READ32_MEMBER( voodoo_banshee_device::banshee_r ) { - voodoo_state *v = get_safe_token(this); UINT32 result = 0xffffffff; /* if we have something pending, flush the FIFOs up to the current time */ - if (v->pci.op_pending) - flush_fifos(v, machine().time()); + if (pci.op_pending) + flush_fifos(this, machine().time()); if (offset < 0x80000/4) result = banshee_io_r(space, offset, mem_mask); @@ -4215,7 +4151,7 @@ READ32_MEMBER( voodoo_banshee_device::banshee_r ) else if (offset < 0x200000/4) logerror("%s:banshee_r(2D:%X)\n", machine().describe_context(), (offset*4) & 0xfffff); else if (offset < 0x600000/4) - result = register_r(v, offset & 0x1fffff/4); + result = register_r(this, offset & 0x1fffff/4); else if (offset < 0x800000/4) logerror("%s:banshee_r(TEX0:%X)\n", machine().describe_context(), (offset*4) & 0x1fffff); else if (offset < 0xa00000/4) @@ -4226,7 +4162,7 @@ READ32_MEMBER( voodoo_banshee_device::banshee_r ) logerror("%s:banshee_r(YUV:%X)\n", machine().describe_context(), (offset*4) & 0x3fffff); else if (offset < 0x2000000/4) { - result = lfb_r(v, offset & 0xffffff/4, true); + result = lfb_r(this, offset & 0xffffff/4, true); } else { logerror("%s:banshee_r(%X) Access out of bounds\n", machine().describe_context(), offset*4); } @@ -4236,27 +4172,26 @@ READ32_MEMBER( voodoo_banshee_device::banshee_r ) READ32_MEMBER( voodoo_banshee_device::banshee_fb_r ) { - voodoo_state *v = get_safe_token(this); UINT32 result = 0xffffffff; /* if we have something pending, flush the FIFOs up to the current time */ - if (v->pci.op_pending) - flush_fifos(v, machine().time()); + if (pci.op_pending) + flush_fifos(this, machine().time()); - if (offset < v->fbi.lfb_base) + if (offset < fbi.lfb_base) { #if LOG_LFB logerror("%s:banshee_fb_r(%X)\n", machine().describe_context(), offset*4); #endif - if (offset*4 <= v->fbi.mask) - result = ((UINT32 *)v->fbi.ram)[offset]; + if (offset*4 <= fbi.mask) + result = ((UINT32 *)fbi.ram)[offset]; else logerror("%s:banshee_fb_r(%X) Access out of bounds\n", machine().describe_context(), offset*4); } else { if (LOG_LFB) - logerror("%s:banshee_fb_r(%X) to lfb_r: %08X lfb_base=%08X\n", machine().describe_context(), offset*4, offset - v->fbi.lfb_base, v->fbi.lfb_base); - result = lfb_r(v, offset - v->fbi.lfb_base, false); + logerror("%s:banshee_fb_r(%X) to lfb_r: %08X lfb_base=%08X\n", machine().describe_context(), offset*4, offset - fbi.lfb_base, fbi.lfb_base); + result = lfb_r(this, offset - fbi.lfb_base, false); } return result; } @@ -4264,7 +4199,6 @@ READ32_MEMBER( voodoo_banshee_device::banshee_fb_r ) READ8_MEMBER( voodoo_banshee_device::banshee_vga_r ) { - voodoo_state *v = get_safe_token(this); UINT8 result = 0xff; offset &= 0x1f; @@ -4274,10 +4208,10 @@ READ8_MEMBER( voodoo_banshee_device::banshee_vga_r ) { /* attribute access */ case 0x3c0: - if (v->banshee.vga[0x3c1 & 0x1f] < ARRAY_LENGTH(v->banshee.att)) - result = v->banshee.att[v->banshee.vga[0x3c1 & 0x1f]]; + if (banshee.vga[0x3c1 & 0x1f] < ARRAY_LENGTH(banshee.att)) + result = banshee.att[banshee.vga[0x3c1 & 0x1f]]; if (LOG_REGISTERS) - logerror("%s:banshee_att_r(%X)\n", machine().describe_context(), v->banshee.vga[0x3c1 & 0x1f]); + logerror("%s:banshee_att_r(%X)\n", machine().describe_context(), banshee.vga[0x3c1 & 0x1f]); break; /* Input status 0 */ @@ -4295,41 +4229,41 @@ READ8_MEMBER( voodoo_banshee_device::banshee_vga_r ) /* Sequencer access */ case 0x3c5: - if (v->banshee.vga[0x3c4 & 0x1f] < ARRAY_LENGTH(v->banshee.seq)) - result = v->banshee.seq[v->banshee.vga[0x3c4 & 0x1f]]; + if (banshee.vga[0x3c4 & 0x1f] < ARRAY_LENGTH(banshee.seq)) + result = banshee.seq[banshee.vga[0x3c4 & 0x1f]]; if (LOG_REGISTERS) - logerror("%s:banshee_seq_r(%X)\n", machine().describe_context(), v->banshee.vga[0x3c4 & 0x1f]); + logerror("%s:banshee_seq_r(%X)\n", machine().describe_context(), banshee.vga[0x3c4 & 0x1f]); break; /* Feature control */ case 0x3ca: - result = v->banshee.vga[0x3da & 0x1f]; - v->banshee.attff = 0; + result = banshee.vga[0x3da & 0x1f]; + banshee.attff = 0; if (LOG_REGISTERS) logerror("%s:banshee_vga_r(%X)\n", machine().describe_context(), 0x300+offset); break; /* Miscellaneous output */ case 0x3cc: - result = v->banshee.vga[0x3c2 & 0x1f]; + result = banshee.vga[0x3c2 & 0x1f]; if (LOG_REGISTERS) logerror("%s:banshee_vga_r(%X)\n", machine().describe_context(), 0x300+offset); break; /* Graphics controller access */ case 0x3cf: - if (v->banshee.vga[0x3ce & 0x1f] < ARRAY_LENGTH(v->banshee.gc)) - result = v->banshee.gc[v->banshee.vga[0x3ce & 0x1f]]; + if (banshee.vga[0x3ce & 0x1f] < ARRAY_LENGTH(banshee.gc)) + result = banshee.gc[banshee.vga[0x3ce & 0x1f]]; if (LOG_REGISTERS) - logerror("%s:banshee_gc_r(%X)\n", machine().describe_context(), v->banshee.vga[0x3ce & 0x1f]); + logerror("%s:banshee_gc_r(%X)\n", machine().describe_context(), banshee.vga[0x3ce & 0x1f]); break; /* CRTC access */ case 0x3d5: - if (v->banshee.vga[0x3d4 & 0x1f] < ARRAY_LENGTH(v->banshee.crtc)) - result = v->banshee.crtc[v->banshee.vga[0x3d4 & 0x1f]]; + if (banshee.vga[0x3d4 & 0x1f] < ARRAY_LENGTH(banshee.crtc)) + result = banshee.crtc[banshee.vga[0x3d4 & 0x1f]]; if (LOG_REGISTERS) - logerror("%s:banshee_crtc_r(%X)\n", machine().describe_context(), v->banshee.vga[0x3d4 & 0x1f]); + logerror("%s:banshee_crtc_r(%X)\n", machine().describe_context(), banshee.vga[0x3d4 & 0x1f]); break; /* Input status 1 */ @@ -4349,7 +4283,7 @@ READ8_MEMBER( voodoo_banshee_device::banshee_vga_r ) break; default: - result = v->banshee.vga[offset]; + result = banshee.vga[offset]; if (LOG_REGISTERS) logerror("%s:banshee_vga_r(%X)\n", machine().describe_context(), 0x300+offset); break; @@ -4360,7 +4294,6 @@ READ8_MEMBER( voodoo_banshee_device::banshee_vga_r ) READ32_MEMBER( voodoo_banshee_device::banshee_io_r ) { - voodoo_state *v = get_safe_token(this); UINT32 result; offset &= 0xff/4; @@ -4369,13 +4302,13 @@ READ32_MEMBER( voodoo_banshee_device::banshee_io_r ) switch (offset) { case io_status: - result = register_r(v, 0); + result = register_r(this, 0); break; case io_dacData: - result = v->fbi.clut[v->banshee.io[io_dacAddr] & 0x1ff] = v->banshee.io[offset]; + result = fbi.clut[banshee.io[io_dacAddr] & 0x1ff] = banshee.io[offset]; if (LOG_REGISTERS) - logerror("%s:banshee_dac_r(%X)\n", machine().describe_context(), v->banshee.io[io_dacAddr] & 0x1ff); + logerror("%s:banshee_dac_r(%X)\n", machine().describe_context(), banshee.io[io_dacAddr] & 0x1ff); break; case io_vgab0: case io_vgab4: case io_vgab8: case io_vgabc: @@ -4393,7 +4326,7 @@ READ32_MEMBER( voodoo_banshee_device::banshee_io_r ) break; default: - result = v->banshee.io[offset]; + result = banshee.io[offset]; if (LOG_REGISTERS) logerror("%s:banshee_io_r(%s)\n", machine().describe_context(), banshee_io_reg_name[offset]); break; @@ -4409,9 +4342,9 @@ READ32_MEMBER( voodoo_banshee_device::banshee_rom_r ) return 0xffffffff; } -static void blit_2d(voodoo_state *v, UINT32 data) +static void blit_2d(voodoo_device *vd, UINT32 data) { - switch (v->banshee.blt_cmd) + switch (vd->banshee.blt_cmd) { case 0: // NOP - wait for idle { @@ -4434,46 +4367,46 @@ static void blit_2d(voodoo_state *v, UINT32 data) case 3: // Host-to-screen blit { - UINT32 addr = v->banshee.blt_dst_base; + UINT32 addr = vd->banshee.blt_dst_base; - addr += (v->banshee.blt_dst_y * v->banshee.blt_dst_stride) + (v->banshee.blt_dst_x * v->banshee.blt_dst_bpp); + addr += (vd->banshee.blt_dst_y * vd->banshee.blt_dst_stride) + (vd->banshee.blt_dst_x * vd->banshee.blt_dst_bpp); #if LOG_BANSHEE_2D - logerror(" blit_2d:host_to_screen: %08x -> %08x, %d, %d\n", data, addr, v->banshee.blt_dst_x, v->banshee.blt_dst_y); + logerror(" blit_2d:host_to_screen: %08x -> %08x, %d, %d\n", data, addr, vd->banshee.blt_dst_x, vd->banshee.blt_dst_y); #endif - switch (v->banshee.blt_dst_bpp) + switch (vd->banshee.blt_dst_bpp) { case 1: - v->fbi.ram[addr+0] = data & 0xff; - v->fbi.ram[addr+1] = (data >> 8) & 0xff; - v->fbi.ram[addr+2] = (data >> 16) & 0xff; - v->fbi.ram[addr+3] = (data >> 24) & 0xff; - v->banshee.blt_dst_x += 4; + vd->fbi.ram[addr+0] = data & 0xff; + vd->fbi.ram[addr+1] = (data >> 8) & 0xff; + vd->fbi.ram[addr+2] = (data >> 16) & 0xff; + vd->fbi.ram[addr+3] = (data >> 24) & 0xff; + vd->banshee.blt_dst_x += 4; break; case 2: - v->fbi.ram[addr+1] = data & 0xff; - v->fbi.ram[addr+0] = (data >> 8) & 0xff; - v->fbi.ram[addr+3] = (data >> 16) & 0xff; - v->fbi.ram[addr+2] = (data >> 24) & 0xff; - v->banshee.blt_dst_x += 2; + vd->fbi.ram[addr+1] = data & 0xff; + vd->fbi.ram[addr+0] = (data >> 8) & 0xff; + vd->fbi.ram[addr+3] = (data >> 16) & 0xff; + vd->fbi.ram[addr+2] = (data >> 24) & 0xff; + vd->banshee.blt_dst_x += 2; break; case 3: - v->banshee.blt_dst_x += 1; + vd->banshee.blt_dst_x += 1; break; case 4: - v->fbi.ram[addr+3] = data & 0xff; - v->fbi.ram[addr+2] = (data >> 8) & 0xff; - v->fbi.ram[addr+1] = (data >> 16) & 0xff; - v->fbi.ram[addr+0] = (data >> 24) & 0xff; - v->banshee.blt_dst_x += 1; + vd->fbi.ram[addr+3] = data & 0xff; + vd->fbi.ram[addr+2] = (data >> 8) & 0xff; + vd->fbi.ram[addr+1] = (data >> 16) & 0xff; + vd->fbi.ram[addr+0] = (data >> 24) & 0xff; + vd->banshee.blt_dst_x += 1; break; } - if (v->banshee.blt_dst_x >= v->banshee.blt_dst_width) + if (vd->banshee.blt_dst_x >= vd->banshee.blt_dst_width) { - v->banshee.blt_dst_x = 0; - v->banshee.blt_dst_y++; + vd->banshee.blt_dst_x = 0; + vd->banshee.blt_dst_y++; } break; } @@ -4500,12 +4433,12 @@ static void blit_2d(voodoo_state *v, UINT32 data) default: { - fatalerror("blit_2d: unknown command %d\n", v->banshee.blt_cmd); + fatalerror("blit_2d: unknown command %d\n", vd->banshee.blt_cmd); } } } -static INT32 banshee_2d_w(voodoo_state *v, offs_t offset, UINT32 data) +INT32 voodoo_device::banshee_2d_w(voodoo_device *vd, offs_t offset, UINT32 data) { switch (offset) { @@ -4514,152 +4447,152 @@ static INT32 banshee_2d_w(voodoo_state *v, offs_t offset, UINT32 data) logerror(" 2D:command: cmd %d, ROP0 %02X\n", data & 0xf, data >> 24); #endif - v->banshee.blt_src_x = v->banshee.blt_regs[banshee2D_srcXY] & 0xfff; - v->banshee.blt_src_y = (v->banshee.blt_regs[banshee2D_srcXY] >> 16) & 0xfff; - v->banshee.blt_src_base = v->banshee.blt_regs[banshee2D_srcBaseAddr] & 0xffffff; - v->banshee.blt_src_stride = v->banshee.blt_regs[banshee2D_srcFormat] & 0x3fff; - v->banshee.blt_src_width = v->banshee.blt_regs[banshee2D_srcSize] & 0xfff; - v->banshee.blt_src_height = (v->banshee.blt_regs[banshee2D_srcSize] >> 16) & 0xfff; + vd->banshee.blt_src_x = vd->banshee.blt_regs[banshee2D_srcXY] & 0xfff; + vd->banshee.blt_src_y = (vd->banshee.blt_regs[banshee2D_srcXY] >> 16) & 0xfff; + vd->banshee.blt_src_base = vd->banshee.blt_regs[banshee2D_srcBaseAddr] & 0xffffff; + vd->banshee.blt_src_stride = vd->banshee.blt_regs[banshee2D_srcFormat] & 0x3fff; + vd->banshee.blt_src_width = vd->banshee.blt_regs[banshee2D_srcSize] & 0xfff; + vd->banshee.blt_src_height = (vd->banshee.blt_regs[banshee2D_srcSize] >> 16) & 0xfff; - switch ((v->banshee.blt_regs[banshee2D_srcFormat] >> 16) & 0xf) + switch ((vd->banshee.blt_regs[banshee2D_srcFormat] >> 16) & 0xf) { - case 1: v->banshee.blt_src_bpp = 1; break; - case 3: v->banshee.blt_src_bpp = 2; break; - case 4: v->banshee.blt_src_bpp = 3; break; - case 5: v->banshee.blt_src_bpp = 4; break; - case 8: v->banshee.blt_src_bpp = 2; break; - case 9: v->banshee.blt_src_bpp = 2; break; - default: v->banshee.blt_src_bpp = 1; break; + case 1: vd->banshee.blt_src_bpp = 1; break; + case 3: vd->banshee.blt_src_bpp = 2; break; + case 4: vd->banshee.blt_src_bpp = 3; break; + case 5: vd->banshee.blt_src_bpp = 4; break; + case 8: vd->banshee.blt_src_bpp = 2; break; + case 9: vd->banshee.blt_src_bpp = 2; break; + default: vd->banshee.blt_src_bpp = 1; break; } - v->banshee.blt_dst_x = v->banshee.blt_regs[banshee2D_dstXY] & 0xfff; - v->banshee.blt_dst_y = (v->banshee.blt_regs[banshee2D_dstXY] >> 16) & 0xfff; - v->banshee.blt_dst_base = v->banshee.blt_regs[banshee2D_dstBaseAddr] & 0xffffff; - v->banshee.blt_dst_stride = v->banshee.blt_regs[banshee2D_dstFormat] & 0x3fff; - v->banshee.blt_dst_width = v->banshee.blt_regs[banshee2D_dstSize] & 0xfff; - v->banshee.blt_dst_height = (v->banshee.blt_regs[banshee2D_dstSize] >> 16) & 0xfff; + vd->banshee.blt_dst_x = vd->banshee.blt_regs[banshee2D_dstXY] & 0xfff; + vd->banshee.blt_dst_y = (vd->banshee.blt_regs[banshee2D_dstXY] >> 16) & 0xfff; + vd->banshee.blt_dst_base = vd->banshee.blt_regs[banshee2D_dstBaseAddr] & 0xffffff; + vd->banshee.blt_dst_stride = vd->banshee.blt_regs[banshee2D_dstFormat] & 0x3fff; + vd->banshee.blt_dst_width = vd->banshee.blt_regs[banshee2D_dstSize] & 0xfff; + vd->banshee.blt_dst_height = (vd->banshee.blt_regs[banshee2D_dstSize] >> 16) & 0xfff; - switch ((v->banshee.blt_regs[banshee2D_dstFormat] >> 16) & 0x7) + switch ((vd->banshee.blt_regs[banshee2D_dstFormat] >> 16) & 0x7) { - case 1: v->banshee.blt_dst_bpp = 1; break; - case 3: v->banshee.blt_dst_bpp = 2; break; - case 4: v->banshee.blt_dst_bpp = 3; break; - case 5: v->banshee.blt_dst_bpp = 4; break; - default: v->banshee.blt_dst_bpp = 1; break; + case 1: vd->banshee.blt_dst_bpp = 1; break; + case 3: vd->banshee.blt_dst_bpp = 2; break; + case 4: vd->banshee.blt_dst_bpp = 3; break; + case 5: vd->banshee.blt_dst_bpp = 4; break; + default: vd->banshee.blt_dst_bpp = 1; break; } - v->banshee.blt_cmd = data & 0xf; + vd->banshee.blt_cmd = data & 0xf; break; case banshee2D_colorBack: #if LOG_BANSHEE_2D logerror(" 2D:colorBack: %08X\n", data); #endif - v->banshee.blt_regs[banshee2D_colorBack] = data; + vd->banshee.blt_regs[banshee2D_colorBack] = data; break; case banshee2D_colorFore: #if LOG_BANSHEE_2D logerror(" 2D:colorFore: %08X\n", data); #endif - v->banshee.blt_regs[banshee2D_colorFore] = data; + vd->banshee.blt_regs[banshee2D_colorFore] = data; break; case banshee2D_srcBaseAddr: #if LOG_BANSHEE_2D logerror(" 2D:srcBaseAddr: %08X, %s\n", data & 0xffffff, data & 0x80000000 ? "tiled" : "non-tiled"); #endif - v->banshee.blt_regs[banshee2D_srcBaseAddr] = data; + vd->banshee.blt_regs[banshee2D_srcBaseAddr] = data; break; case banshee2D_dstBaseAddr: #if LOG_BANSHEE_2D logerror(" 2D:dstBaseAddr: %08X, %s\n", data & 0xffffff, data & 0x80000000 ? "tiled" : "non-tiled"); #endif - v->banshee.blt_regs[banshee2D_dstBaseAddr] = data; + vd->banshee.blt_regs[banshee2D_dstBaseAddr] = data; break; case banshee2D_srcSize: #if LOG_BANSHEE_2D logerror(" 2D:srcSize: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff); #endif - v->banshee.blt_regs[banshee2D_srcSize] = data; + vd->banshee.blt_regs[banshee2D_srcSize] = data; break; case banshee2D_dstSize: #if LOG_BANSHEE_2D logerror(" 2D:dstSize: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff); #endif - v->banshee.blt_regs[banshee2D_dstSize] = data; + vd->banshee.blt_regs[banshee2D_dstSize] = data; break; case banshee2D_srcXY: #if LOG_BANSHEE_2D logerror(" 2D:srcXY: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff); #endif - v->banshee.blt_regs[banshee2D_srcXY] = data; + vd->banshee.blt_regs[banshee2D_srcXY] = data; break; case banshee2D_dstXY: #if LOG_BANSHEE_2D logerror(" 2D:dstXY: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff); #endif - v->banshee.blt_regs[banshee2D_dstXY] = data; + vd->banshee.blt_regs[banshee2D_dstXY] = data; break; case banshee2D_srcFormat: #if LOG_BANSHEE_2D logerror(" 2D:srcFormat: str %d, fmt %d, packing %d\n", data & 0x3fff, (data >> 16) & 0xf, (data >> 22) & 0x3); #endif - v->banshee.blt_regs[banshee2D_srcFormat] = data; + vd->banshee.blt_regs[banshee2D_srcFormat] = data; break; case banshee2D_dstFormat: #if LOG_BANSHEE_2D logerror(" 2D:dstFormat: str %d, fmt %d\n", data & 0x3fff, (data >> 16) & 0xf); #endif - v->banshee.blt_regs[banshee2D_dstFormat] = data; + vd->banshee.blt_regs[banshee2D_dstFormat] = data; break; case banshee2D_clip0Min: #if LOG_BANSHEE_2D logerror(" 2D:clip0Min: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff); #endif - v->banshee.blt_regs[banshee2D_clip0Min] = data; + vd->banshee.blt_regs[banshee2D_clip0Min] = data; break; case banshee2D_clip0Max: #if LOG_BANSHEE_2D logerror(" 2D:clip0Max: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff); #endif - v->banshee.blt_regs[banshee2D_clip0Max] = data; + vd->banshee.blt_regs[banshee2D_clip0Max] = data; break; case banshee2D_clip1Min: #if LOG_BANSHEE_2D logerror(" 2D:clip1Min: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff); #endif - v->banshee.blt_regs[banshee2D_clip1Min] = data; + vd->banshee.blt_regs[banshee2D_clip1Min] = data; break; case banshee2D_clip1Max: #if LOG_BANSHEE_2D logerror(" 2D:clip1Max: %d, %d\n", data & 0xfff, (data >> 16) & 0xfff); #endif - v->banshee.blt_regs[banshee2D_clip1Max] = data; + vd->banshee.blt_regs[banshee2D_clip1Max] = data; break; case banshee2D_rop: #if LOG_BANSHEE_2D logerror(" 2D:rop: %d, %d, %d\n", data & 0xff, (data >> 8) & 0xff, (data >> 16) & 0xff); #endif - v->banshee.blt_regs[banshee2D_rop] = data; + vd->banshee.blt_regs[banshee2D_rop] = data; break; default: if (offset >= 0x20 && offset < 0x40) { - blit_2d(v, data); + blit_2d(vd, data); } else if (offset >= 0x40 && offset < 0x80) { @@ -4677,86 +4610,85 @@ static INT32 banshee_2d_w(voodoo_state *v, offs_t offset, UINT32 data) WRITE32_MEMBER( voodoo_banshee_device::banshee_agp_w ) { - voodoo_state *v = get_safe_token(this); offset &= 0x1ff/4; /* switch off the offset */ switch (offset) { case cmdBaseAddr0: - COMBINE_DATA(&v->banshee.agp[offset]); - v->fbi.cmdfifo[0].base = (data & 0xffffff) << 12; - v->fbi.cmdfifo[0].end = v->fbi.cmdfifo[0].base + (((v->banshee.agp[cmdBaseSize0] & 0xff) + 1) << 12); + COMBINE_DATA(&banshee.agp[offset]); + fbi.cmdfifo[0].base = (data & 0xffffff) << 12; + fbi.cmdfifo[0].end = fbi.cmdfifo[0].base + (((banshee.agp[cmdBaseSize0] & 0xff) + 1) << 12); break; case cmdBaseSize0: - COMBINE_DATA(&v->banshee.agp[offset]); - v->fbi.cmdfifo[0].end = v->fbi.cmdfifo[0].base + (((v->banshee.agp[cmdBaseSize0] & 0xff) + 1) << 12); - v->fbi.cmdfifo[0].enable = (data >> 8) & 1; - v->fbi.cmdfifo[0].count_holes = (~data >> 10) & 1; + COMBINE_DATA(&banshee.agp[offset]); + fbi.cmdfifo[0].end = fbi.cmdfifo[0].base + (((banshee.agp[cmdBaseSize0] & 0xff) + 1) << 12); + fbi.cmdfifo[0].enable = (data >> 8) & 1; + fbi.cmdfifo[0].count_holes = (~data >> 10) & 1; break; case cmdBump0: fatalerror("cmdBump0\n"); case cmdRdPtrL0: - v->fbi.cmdfifo[0].rdptr = data; + fbi.cmdfifo[0].rdptr = data; break; case cmdAMin0: - v->fbi.cmdfifo[0].amin = data; + fbi.cmdfifo[0].amin = data; break; case cmdAMax0: - v->fbi.cmdfifo[0].amax = data; + fbi.cmdfifo[0].amax = data; break; case cmdFifoDepth0: - v->fbi.cmdfifo[0].depth = data; + fbi.cmdfifo[0].depth = data; break; case cmdHoleCnt0: - v->fbi.cmdfifo[0].holes = data; + fbi.cmdfifo[0].holes = data; break; case cmdBaseAddr1: - COMBINE_DATA(&v->banshee.agp[offset]); - v->fbi.cmdfifo[1].base = (data & 0xffffff) << 12; - v->fbi.cmdfifo[1].end = v->fbi.cmdfifo[1].base + (((v->banshee.agp[cmdBaseSize1] & 0xff) + 1) << 12); + COMBINE_DATA(&banshee.agp[offset]); + fbi.cmdfifo[1].base = (data & 0xffffff) << 12; + fbi.cmdfifo[1].end = fbi.cmdfifo[1].base + (((banshee.agp[cmdBaseSize1] & 0xff) + 1) << 12); break; case cmdBaseSize1: - COMBINE_DATA(&v->banshee.agp[offset]); - v->fbi.cmdfifo[1].end = v->fbi.cmdfifo[1].base + (((v->banshee.agp[cmdBaseSize1] & 0xff) + 1) << 12); - v->fbi.cmdfifo[1].enable = (data >> 8) & 1; - v->fbi.cmdfifo[1].count_holes = (~data >> 10) & 1; + COMBINE_DATA(&banshee.agp[offset]); + fbi.cmdfifo[1].end = fbi.cmdfifo[1].base + (((banshee.agp[cmdBaseSize1] & 0xff) + 1) << 12); + fbi.cmdfifo[1].enable = (data >> 8) & 1; + fbi.cmdfifo[1].count_holes = (~data >> 10) & 1; break; case cmdBump1: fatalerror("cmdBump1\n"); case cmdRdPtrL1: - v->fbi.cmdfifo[1].rdptr = data; + fbi.cmdfifo[1].rdptr = data; break; case cmdAMin1: - v->fbi.cmdfifo[1].amin = data; + fbi.cmdfifo[1].amin = data; break; case cmdAMax1: - v->fbi.cmdfifo[1].amax = data; + fbi.cmdfifo[1].amax = data; break; case cmdFifoDepth1: - v->fbi.cmdfifo[1].depth = data; + fbi.cmdfifo[1].depth = data; break; case cmdHoleCnt1: - v->fbi.cmdfifo[1].holes = data; + fbi.cmdfifo[1].holes = data; break; default: - COMBINE_DATA(&v->banshee.agp[offset]); + COMBINE_DATA(&banshee.agp[offset]); break; } @@ -4767,11 +4699,10 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_agp_w ) WRITE32_MEMBER( voodoo_banshee_device::banshee_w ) { - voodoo_state *v = get_safe_token(this); /* if we have something pending, flush the FIFOs up to the current time */ - if (v->pci.op_pending) - flush_fifos(v, machine().time()); + if (pci.op_pending) + flush_fifos(this, machine().time()); if (offset < 0x80000/4) banshee_io_w(space, offset, data, mem_mask); @@ -4780,7 +4711,7 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_w ) else if (offset < 0x200000/4) logerror("%s:banshee_w(2D:%X) = %08X & %08X\n", machine().describe_context(), (offset*4) & 0xfffff, data, mem_mask); else if (offset < 0x600000/4) - register_w(v, offset & 0x1fffff/4, data); + register_w(this, offset & 0x1fffff/4, data); else if (offset < 0x800000/4) logerror("%s:banshee_w(TEX0:%X) = %08X & %08X\n", machine().describe_context(), (offset*4) & 0x1fffff, data, mem_mask); else if (offset < 0xa00000/4) @@ -4791,7 +4722,7 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_w ) logerror("%s:banshee_w(YUV:%X) = %08X & %08X\n", machine().describe_context(), (offset*4) & 0x3fffff, data, mem_mask); else if (offset < 0x2000000/4) { - lfb_w(v, offset & 0xffffff/4, data, mem_mask); + lfb_w(this, offset & 0xffffff/4, data, mem_mask); } else { logerror("%s:banshee_w Address out of range %08X = %08X & %08X\n", machine().describe_context(), (offset*4), data, mem_mask); } @@ -4800,23 +4731,22 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_w ) WRITE32_MEMBER( voodoo_banshee_device::banshee_fb_w ) { - voodoo_state *v = get_safe_token(this); UINT32 addr = offset*4; /* if we have something pending, flush the FIFOs up to the current time */ - if (v->pci.op_pending) - flush_fifos(v, machine().time()); + if (pci.op_pending) + flush_fifos(this, machine().time()); - if (offset < v->fbi.lfb_base) + if (offset < fbi.lfb_base) { - if (v->fbi.cmdfifo[0].enable && addr >= v->fbi.cmdfifo[0].base && addr < v->fbi.cmdfifo[0].end) - cmdfifo_w(v, &v->fbi.cmdfifo[0], (addr - v->fbi.cmdfifo[0].base) / 4, data); - else if (v->fbi.cmdfifo[1].enable && addr >= v->fbi.cmdfifo[1].base && addr < v->fbi.cmdfifo[1].end) - cmdfifo_w(v, &v->fbi.cmdfifo[1], (addr - v->fbi.cmdfifo[1].base) / 4, data); + if (fbi.cmdfifo[0].enable && addr >= fbi.cmdfifo[0].base && addr < fbi.cmdfifo[0].end) + cmdfifo_w(this, &fbi.cmdfifo[0], (addr - fbi.cmdfifo[0].base) / 4, data); + else if (fbi.cmdfifo[1].enable && addr >= fbi.cmdfifo[1].base && addr < fbi.cmdfifo[1].end) + cmdfifo_w(this, &fbi.cmdfifo[1], (addr - fbi.cmdfifo[1].base) / 4, data); else { - if (offset*4 <= v->fbi.mask) - COMBINE_DATA(&((UINT32 *)v->fbi.ram)[offset]); + if (offset*4 <= fbi.mask) + COMBINE_DATA(&((UINT32 *)fbi.ram)[offset]); else logerror("%s:banshee_fb_w Out of bounds (%X) = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); #if LOG_LFB @@ -4825,13 +4755,12 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_fb_w ) } } else - lfb_direct_w(v, offset - v->fbi.lfb_base, data, mem_mask); + lfb_direct_w(this, offset - fbi.lfb_base, data, mem_mask); } WRITE8_MEMBER( voodoo_banshee_device::banshee_vga_w ) { - voodoo_state *v = get_safe_token(this); offset &= 0x1f; /* switch off the offset */ @@ -4840,48 +4769,48 @@ WRITE8_MEMBER( voodoo_banshee_device::banshee_vga_w ) /* attribute access */ case 0x3c0: case 0x3c1: - if (v->banshee.attff == 0) + if (banshee.attff == 0) { - v->banshee.vga[0x3c1 & 0x1f] = data; + banshee.vga[0x3c1 & 0x1f] = data; if (LOG_REGISTERS) logerror("%s:banshee_vga_w(%X) = %02X\n", machine().describe_context(), 0x3c0+offset, data); } else { - if (v->banshee.vga[0x3c1 & 0x1f] < ARRAY_LENGTH(v->banshee.att)) - v->banshee.att[v->banshee.vga[0x3c1 & 0x1f]] = data; + if (banshee.vga[0x3c1 & 0x1f] < ARRAY_LENGTH(banshee.att)) + banshee.att[banshee.vga[0x3c1 & 0x1f]] = data; if (LOG_REGISTERS) - logerror("%s:banshee_att_w(%X) = %02X\n", machine().describe_context(), v->banshee.vga[0x3c1 & 0x1f], data); + logerror("%s:banshee_att_w(%X) = %02X\n", machine().describe_context(), banshee.vga[0x3c1 & 0x1f], data); } - v->banshee.attff ^= 1; + banshee.attff ^= 1; break; /* Sequencer access */ case 0x3c5: - if (v->banshee.vga[0x3c4 & 0x1f] < ARRAY_LENGTH(v->banshee.seq)) - v->banshee.seq[v->banshee.vga[0x3c4 & 0x1f]] = data; + if (banshee.vga[0x3c4 & 0x1f] < ARRAY_LENGTH(banshee.seq)) + banshee.seq[banshee.vga[0x3c4 & 0x1f]] = data; if (LOG_REGISTERS) - logerror("%s:banshee_seq_w(%X) = %02X\n", machine().describe_context(), v->banshee.vga[0x3c4 & 0x1f], data); + logerror("%s:banshee_seq_w(%X) = %02X\n", machine().describe_context(), banshee.vga[0x3c4 & 0x1f], data); break; /* Graphics controller access */ case 0x3cf: - if (v->banshee.vga[0x3ce & 0x1f] < ARRAY_LENGTH(v->banshee.gc)) - v->banshee.gc[v->banshee.vga[0x3ce & 0x1f]] = data; + if (banshee.vga[0x3ce & 0x1f] < ARRAY_LENGTH(banshee.gc)) + banshee.gc[banshee.vga[0x3ce & 0x1f]] = data; if (LOG_REGISTERS) - logerror("%s:banshee_gc_w(%X) = %02X\n", machine().describe_context(), v->banshee.vga[0x3ce & 0x1f], data); + logerror("%s:banshee_gc_w(%X) = %02X\n", machine().describe_context(), banshee.vga[0x3ce & 0x1f], data); break; /* CRTC access */ case 0x3d5: - if (v->banshee.vga[0x3d4 & 0x1f] < ARRAY_LENGTH(v->banshee.crtc)) - v->banshee.crtc[v->banshee.vga[0x3d4 & 0x1f]] = data; + if (banshee.vga[0x3d4 & 0x1f] < ARRAY_LENGTH(banshee.crtc)) + banshee.crtc[banshee.vga[0x3d4 & 0x1f]] = data; if (LOG_REGISTERS) - logerror("%s:banshee_crtc_w(%X) = %02X\n", machine().describe_context(), v->banshee.vga[0x3d4 & 0x1f], data); + logerror("%s:banshee_crtc_w(%X) = %02X\n", machine().describe_context(), banshee.vga[0x3d4 & 0x1f], data); break; default: - v->banshee.vga[offset] = data; + banshee.vga[offset] = data; if (LOG_REGISTERS) logerror("%s:banshee_vga_w(%X) = %02X\n", machine().describe_context(), 0x3c0+offset, data); break; @@ -4891,73 +4820,72 @@ WRITE8_MEMBER( voodoo_banshee_device::banshee_vga_w ) WRITE32_MEMBER( voodoo_banshee_device::banshee_io_w ) { - voodoo_state *v = get_safe_token(this); UINT32 old; offset &= 0xff/4; - old = v->banshee.io[offset]; + old = banshee.io[offset]; /* switch off the offset */ switch (offset) { case io_vidProcCfg: - COMBINE_DATA(&v->banshee.io[offset]); - if ((v->banshee.io[offset] ^ old) & 0x2800) - v->fbi.clut_dirty = TRUE; + COMBINE_DATA(&banshee.io[offset]); + if ((banshee.io[offset] ^ old) & 0x2800) + fbi.clut_dirty = TRUE; if (LOG_REGISTERS) logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask); break; case io_dacData: - COMBINE_DATA(&v->banshee.io[offset]); - if (v->banshee.io[offset] != v->fbi.clut[v->banshee.io[io_dacAddr] & 0x1ff]) + COMBINE_DATA(&banshee.io[offset]); + if (banshee.io[offset] != fbi.clut[banshee.io[io_dacAddr] & 0x1ff]) { - v->fbi.clut[v->banshee.io[io_dacAddr] & 0x1ff] = v->banshee.io[offset]; - v->fbi.clut_dirty = TRUE; + fbi.clut[banshee.io[io_dacAddr] & 0x1ff] = banshee.io[offset]; + fbi.clut_dirty = TRUE; } if (LOG_REGISTERS) - logerror("%s:banshee_dac_w(%X) = %08X & %08X\n", machine().describe_context(), v->banshee.io[io_dacAddr] & 0x1ff, data, mem_mask); + logerror("%s:banshee_dac_w(%X) = %08X & %08X\n", machine().describe_context(), banshee.io[io_dacAddr] & 0x1ff, data, mem_mask); break; case io_miscInit0: - COMBINE_DATA(&v->banshee.io[offset]); - v->fbi.yorigin = (data >> 18) & 0xfff; + COMBINE_DATA(&banshee.io[offset]); + fbi.yorigin = (data >> 18) & 0xfff; if (LOG_REGISTERS) logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask); break; case io_vidScreenSize: if (data & 0xfff) - v->fbi.width = data & 0xfff; + fbi.width = data & 0xfff; if (data & 0xfff000) - v->fbi.height = (data >> 12) & 0xfff; + fbi.height = (data >> 12) & 0xfff; /* fall through */ case io_vidOverlayDudx: case io_vidOverlayDvdy: { /* warning: this is a hack for now! We should really compute the screen size */ /* from the CRTC registers */ - COMBINE_DATA(&v->banshee.io[offset]); + COMBINE_DATA(&banshee.io[offset]); - int width = v->fbi.width; - int height = v->fbi.height; + int width = fbi.width; + int height = fbi.height; - if (v->banshee.io[io_vidOverlayDudx] != 0) - width = (v->fbi.width * v->banshee.io[io_vidOverlayDudx]) / 1048576; - if (v->banshee.io[io_vidOverlayDvdy] != 0) - height = (v->fbi.height * v->banshee.io[io_vidOverlayDvdy]) / 1048576; + if (banshee.io[io_vidOverlayDudx] != 0) + width = (fbi.width * banshee.io[io_vidOverlayDudx]) / 1048576; + if (banshee.io[io_vidOverlayDvdy] != 0) + height = (fbi.height * banshee.io[io_vidOverlayDvdy]) / 1048576; - v->screen->set_visible_area(0, width - 1, 0, height - 1); + screen->set_visible_area(0, width - 1, 0, height - 1); - adjust_vblank_timer(v); + adjust_vblank_timer(this); if (LOG_REGISTERS) logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask); break; } case io_lfbMemoryConfig: - v->fbi.lfb_base = (data & 0x1fff) << (12-2); - v->fbi.lfb_stride = ((data >> 13) & 7) + 9; + fbi.lfb_base = (data & 0x1fff) << (12-2); + fbi.lfb_stride = ((data >> 13) & 7) + 9; if (LOG_REGISTERS) logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask); break; @@ -4976,7 +4904,7 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_io_w ) break; default: - COMBINE_DATA(&v->banshee.io[offset]); + COMBINE_DATA(&banshee.io[offset]); if (LOG_REGISTERS) logerror("%s:banshee_io_w(%s) = %08X & %08X\n", machine().describe_context(), banshee_io_reg_name[offset], data, mem_mask); break; @@ -4995,7 +4923,6 @@ WRITE32_MEMBER( voodoo_banshee_device::banshee_io_w ) void voodoo_device::common_start_voodoo(UINT8 type) { - voodoo_state *v = get_safe_token(this); const raster_info *info; void *fbmem, *tmumem[2]; UINT32 tmumem0, tmumem1; @@ -5007,17 +4934,17 @@ void voodoo_device::common_start_voodoo(UINT8 type) assert(m_fbmem > 0); /* store a pointer back to the device */ - v->device = this; - v->type = type; + device = this; + vd_type = type; /* copy config data */ - v->freq = clock(); - v->device->m_vblank.resolve(); - v->device->m_stall.resolve(); + freq = clock(); + device->m_vblank.resolve(); + device->m_stall.resolve(); /* create a multiprocessor work queue */ - v->poly = poly_alloc(machine(), 64, sizeof(poly_extra_data), 0); - v->thread_stats = auto_alloc_array(machine(), stats_block, WORK_MAX_THREADS); + poly = poly_alloc(machine(), 64, sizeof(poly_extra_data), 0); + thread_stats = auto_alloc_array(machine(), stats_block, WORK_MAX_THREADS); /* create a table of precomputed 1/n and log2(n) values */ /* n ranges from 1.0000 to 2.0000 */ @@ -5048,38 +4975,38 @@ void voodoo_device::common_start_voodoo(UINT8 type) } } - v->tmu_config = 0x11; // revision 1 + tmu_config = 0x11; // revision 1 /* configure type-specific values */ - switch (v->type) + switch (vd_type) { case TYPE_VOODOO_1: - v->regaccess = voodoo_register_access; - v->regnames = voodoo_reg_name; - v->alt_regmap = 0; - v->fbi.lfb_stride = 10; + regaccess = voodoo_register_access; + regnames = voodoo_reg_name; + alt_regmap = 0; + fbi.lfb_stride = 10; break; case TYPE_VOODOO_2: - v->regaccess = voodoo2_register_access; - v->regnames = voodoo_reg_name; - v->alt_regmap = 0; - v->fbi.lfb_stride = 10; - v->tmu_config |= 0x800; + regaccess = voodoo2_register_access; + regnames = voodoo_reg_name; + alt_regmap = 0; + fbi.lfb_stride = 10; + tmu_config |= 0x800; break; case TYPE_VOODOO_BANSHEE: - v->regaccess = banshee_register_access; - v->regnames = banshee_reg_name; - v->alt_regmap = 1; - v->fbi.lfb_stride = 11; + regaccess = banshee_register_access; + regnames = banshee_reg_name; + alt_regmap = 1; + fbi.lfb_stride = 11; break; case TYPE_VOODOO_3: - v->regaccess = banshee_register_access; - v->regnames = banshee_reg_name; - v->alt_regmap = 1; - v->fbi.lfb_stride = 11; + regaccess = banshee_register_access; + regnames = banshee_reg_name; + alt_regmap = 1; + fbi.lfb_stride = 11; break; default: @@ -5088,41 +5015,41 @@ void voodoo_device::common_start_voodoo(UINT8 type) /* set the type, and initialize the chip mask */ device_iterator iter(machine().root_device()); - v->index = 0; + index = 0; for (device_t *scan = iter.first(); scan != nullptr; scan = iter.next()) if (scan->type() == this->type()) { if (scan == this) break; - v->index++; + index++; } - v->screen = downcast<screen_device *>(machine().device(m_screen)); - assert_always(v->screen != nullptr, "Unable to find screen attached to voodoo"); - v->cpu = machine().device(m_cputag); - assert_always(v->cpu != nullptr, "Unable to find CPU attached to voodoo"); + screen = downcast<screen_device *>(machine().device(m_screen)); + assert_always(screen != nullptr, "Unable to find screen attached to voodoo"); + cpu = machine().device(m_cputag); + assert_always(cpu != nullptr, "Unable to find CPU attached to voodoo"); if (m_tmumem1 != 0) - v->tmu_config |= 0xc0; // two TMUs + tmu_config |= 0xc0; // two TMUs - v->chipmask = 0x01; - v->attoseconds_per_cycle = ATTOSECONDS_PER_SECOND / v->freq; - v->trigger = 51324 + v->index; + chipmask = 0x01; + attoseconds_per_cycle = ATTOSECONDS_PER_SECOND / freq; + trigger = 51324 + index; /* build the rasterizer table */ for (info = predef_raster_table; info->callback; info++) - add_rasterizer(v, info); + add_rasterizer(this, info); /* set up the PCI FIFO */ - v->pci.fifo.base = v->pci.fifo_mem; - v->pci.fifo.size = 64*2; - v->pci.fifo.in = v->pci.fifo.out = 0; - v->pci.stall_state = NOT_STALLED; - v->pci.continue_timer = machine().scheduler().timer_alloc(FUNC(stall_cpu_callback), v); - + pci.fifo.base = pci.fifo_mem; + pci.fifo.size = 64*2; + pci.fifo.in = pci.fifo.out = 0; + pci.stall_state = NOT_STALLED; + pci.continue_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(voodoo_device::stall_cpu_callback),this), nullptr); + /* allocate memory */ tmumem0 = m_tmumem0; tmumem1 = m_tmumem1; - if (v->type <= TYPE_VOODOO_2) + if (vd_type <= TYPE_VOODOO_2) { /* separate FB/TMU memory */ fbmem = auto_alloc_array(machine(), UINT8, m_fbmem << 20); @@ -5134,47 +5061,47 @@ void voodoo_device::common_start_voodoo(UINT8 type) /* shared memory */ tmumem[0] = tmumem[1] = fbmem = auto_alloc_array(machine(), UINT8, m_fbmem << 20); tmumem0 = m_fbmem; - if (v->type == TYPE_VOODOO_3) + if (vd_type == TYPE_VOODOO_3) tmumem1 = m_fbmem; } /* set up frame buffer */ - init_fbi(v, &v->fbi, fbmem, m_fbmem << 20); + init_fbi(this, &fbi, fbmem, m_fbmem << 20); /* build shared TMU tables */ - init_tmu_shared(&v->tmushare); + init_tmu_shared(&tmushare); /* set up the TMUs */ - init_tmu(v, &v->tmu[0], &v->reg[0x100], tmumem[0], tmumem0 << 20); - v->chipmask |= 0x02; + init_tmu(this, &tmu[0], ®[0x100], tmumem[0], tmumem0 << 20); + chipmask |= 0x02; if (tmumem1 != 0) { - init_tmu(v, &v->tmu[1], &v->reg[0x200], tmumem[1], tmumem1 << 20); - v->chipmask |= 0x04; - v->tmu_config |= 0x40; + init_tmu(this, &tmu[1], ®[0x200], tmumem[1], tmumem1 << 20); + chipmask |= 0x04; + tmu_config |= 0x40; } /* initialize some registers */ - memset(v->reg, 0, sizeof(v->reg)); - v->pci.init_enable = 0; - v->reg[fbiInit0].u = (1 << 4) | (0x10 << 6); - v->reg[fbiInit1].u = (1 << 1) | (1 << 8) | (1 << 12) | (2 << 20); - v->reg[fbiInit2].u = (1 << 6) | (0x100 << 23); - v->reg[fbiInit3].u = (2 << 13) | (0xf << 17); - v->reg[fbiInit4].u = (1 << 0); + memset(reg, 0, sizeof(reg)); + pci.init_enable = 0; + reg[fbiInit0].u = (1 << 4) | (0x10 << 6); + reg[fbiInit1].u = (1 << 1) | (1 << 8) | (1 << 12) | (2 << 20); + reg[fbiInit2].u = (1 << 6) | (0x100 << 23); + reg[fbiInit3].u = (2 << 13) | (0xf << 17); + reg[fbiInit4].u = (1 << 0); /* initialize banshee registers */ - memset(v->banshee.io, 0, sizeof(v->banshee.io)); - v->banshee.io[io_pciInit0] = 0x01800040; - v->banshee.io[io_sipMonitor] = 0x40000000; - v->banshee.io[io_lfbMemoryConfig] = 0x000a2200; - v->banshee.io[io_dramInit0] = 0x00579d29; - v->banshee.io[io_dramInit0] |= 0x08000000; // Konami Viper expects 16MBit SGRAMs - v->banshee.io[io_dramInit1] = 0x00f02200; - v->banshee.io[io_tmuGbeInit] = 0x00000bfb; + memset(banshee.io, 0, sizeof(banshee.io)); + banshee.io[io_pciInit0] = 0x01800040; + banshee.io[io_sipMonitor] = 0x40000000; + banshee.io[io_lfbMemoryConfig] = 0x000a2200; + banshee.io[io_dramInit0] = 0x00579d29; + banshee.io[io_dramInit0] |= 0x08000000; // Konami Viper expects 16MBit SGRAMs + banshee.io[io_dramInit1] = 0x00f02200; + banshee.io[io_tmuGbeInit] = 0x00000bfb; /* do a soft reset to reset everything else */ - soft_reset(v); + soft_reset(this); /* register for save states */ init_save_state(this); @@ -5191,12 +5118,12 @@ void voodoo_device::common_start_voodoo(UINT8 type) command -------------------------------------------------*/ -static INT32 fastfill(voodoo_state *v) +INT32 voodoo_device::fastfill(voodoo_device *vd) { - int sx = (v->reg[clipLeftRight].u >> 16) & 0x3ff; - int ex = (v->reg[clipLeftRight].u >> 0) & 0x3ff; - int sy = (v->reg[clipLowYHighY].u >> 16) & 0x3ff; - int ey = (v->reg[clipLowYHighY].u >> 0) & 0x3ff; + int sx = (vd->reg[clipLeftRight].u >> 16) & 0x3ff; + int ex = (vd->reg[clipLeftRight].u >> 0) & 0x3ff; + int sy = (vd->reg[clipLowYHighY].u >> 16) & 0x3ff; + int ey = (vd->reg[clipLowYHighY].u >> 0) & 0x3ff; poly_extent extents[64]; UINT16 dithermatrix[16]; UINT16 *drawbuf = nullptr; @@ -5204,22 +5131,22 @@ static INT32 fastfill(voodoo_state *v) int extnum, x, y; /* if we're not clearing either, take no time */ - if (!FBZMODE_RGB_BUFFER_MASK(v->reg[fbzMode].u) && !FBZMODE_AUX_BUFFER_MASK(v->reg[fbzMode].u)) + if (!FBZMODE_RGB_BUFFER_MASK(vd->reg[fbzMode].u) && !FBZMODE_AUX_BUFFER_MASK(vd->reg[fbzMode].u)) return 0; /* are we clearing the RGB buffer? */ - if (FBZMODE_RGB_BUFFER_MASK(v->reg[fbzMode].u)) + if (FBZMODE_RGB_BUFFER_MASK(vd->reg[fbzMode].u)) { /* determine the draw buffer */ - int destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(v->reg[fbzMode].u); + int destbuf = (vd->vd_type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(vd->reg[fbzMode].u); switch (destbuf) { case 0: /* front buffer */ - drawbuf = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.frontbuf]); + drawbuf = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.frontbuf]); break; case 1: /* back buffer */ - drawbuf = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.backbuf]); + drawbuf = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.backbuf]); break; default: /* reserved */ @@ -5230,14 +5157,14 @@ static INT32 fastfill(voodoo_state *v) for (y = 0; y < 4; y++) { DECLARE_DITHER_POINTERS_NO_DITHER_VAR; - COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(v->reg[fbzMode].u, y); + COMPUTE_DITHER_POINTERS_NO_DITHER_VAR(vd->reg[fbzMode].u, y); for (x = 0; x < 4; x++) { - int r = v->reg[color1].rgb.r; - int g = v->reg[color1].rgb.g; - int b = v->reg[color1].rgb.b; + int r = vd->reg[color1].rgb.r; + int g = vd->reg[color1].rgb.g; + int b = vd->reg[color1].rgb.b; - APPLY_DITHER(v->reg[fbzMode].u, x, dither_lookup, r, g, b); + APPLY_DITHER(vd->reg[fbzMode].u, x, dither_lookup, r, g, b); dithermatrix[y*4 + x] = (r << 11) | (g << 5) | b; } } @@ -5252,13 +5179,13 @@ static INT32 fastfill(voodoo_state *v) /* iterate over blocks of extents */ for (y = sy; y < ey; y += ARRAY_LENGTH(extents)) { - poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(v->poly); + poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(vd->poly); int count = MIN(ey - y, ARRAY_LENGTH(extents)); - extra->state = v; + extra->device= vd; memcpy(extra->dither, dithermatrix, sizeof(extra->dither)); - pixels += poly_render_triangle_custom(v->poly, drawbuf, global_cliprect, raster_fastfill, y, count, extents); + pixels += poly_render_triangle_custom(vd->poly, drawbuf, global_cliprect, raster_fastfill, y, count, extents); } /* 2 pixels per clock */ @@ -5271,23 +5198,23 @@ static INT32 fastfill(voodoo_state *v) command -------------------------------------------------*/ -static INT32 swapbuffer(voodoo_state *v, UINT32 data) +INT32 voodoo_device::swapbuffer(voodoo_device* vd, UINT32 data) { /* set the don't swap value for Voodoo 2 */ - v->fbi.vblank_swap_pending = TRUE; - v->fbi.vblank_swap = (data >> 1) & 0xff; - v->fbi.vblank_dont_swap = (data >> 9) & 1; + vd->fbi.vblank_swap_pending = TRUE; + vd->fbi.vblank_swap = (data >> 1) & 0xff; + vd->fbi.vblank_dont_swap = (data >> 9) & 1; /* if we're not syncing to the retrace, process the command immediately */ if (!(data & 1)) { - swap_buffers(v); + swap_buffers(vd); return 0; } /* determine how many cycles to wait; we deliberately overshoot here because */ /* the final count gets updated on the VBLANK */ - return (v->fbi.vblank_swap + 1) * v->freq / 30; + return (vd->fbi.vblank_swap + 1) * vd->freq / 30; } @@ -5296,7 +5223,7 @@ static INT32 swapbuffer(voodoo_state *v, UINT32 data) command -------------------------------------------------*/ -static INT32 triangle(voodoo_state *v) +INT32 voodoo_device::triangle(voodoo_device *vd) { int texcount; UINT16 *drawbuf; @@ -5307,58 +5234,58 @@ static INT32 triangle(voodoo_state *v) /* determine the number of TMUs involved */ texcount = 0; - if (!FBIINIT3_DISABLE_TMUS(v->reg[fbiInit3].u) && FBZCP_TEXTURE_ENABLE(v->reg[fbzColorPath].u)) + if (!FBIINIT3_DISABLE_TMUS(vd->reg[fbiInit3].u) && FBZCP_TEXTURE_ENABLE(vd->reg[fbzColorPath].u)) { texcount = 1; - if (v->chipmask & 0x04) + if (vd->chipmask & 0x04) texcount = 2; } /* perform subpixel adjustments */ - if (FBZCP_CCA_SUBPIXEL_ADJUST(v->reg[fbzColorPath].u)) + if (FBZCP_CCA_SUBPIXEL_ADJUST(vd->reg[fbzColorPath].u)) { - INT32 dx = 8 - (v->fbi.ax & 15); - INT32 dy = 8 - (v->fbi.ay & 15); + INT32 dx = 8 - (vd->fbi.ax & 15); + INT32 dy = 8 - (vd->fbi.ay & 15); /* adjust iterated R,G,B,A and W/Z */ - v->fbi.startr += (dy * v->fbi.drdy + dx * v->fbi.drdx) >> 4; - v->fbi.startg += (dy * v->fbi.dgdy + dx * v->fbi.dgdx) >> 4; - v->fbi.startb += (dy * v->fbi.dbdy + dx * v->fbi.dbdx) >> 4; - v->fbi.starta += (dy * v->fbi.dady + dx * v->fbi.dadx) >> 4; - v->fbi.startw += (dy * v->fbi.dwdy + dx * v->fbi.dwdx) >> 4; - v->fbi.startz += mul_32x32_shift(dy, v->fbi.dzdy, 4) + mul_32x32_shift(dx, v->fbi.dzdx, 4); + vd->fbi.startr += (dy * vd->fbi.drdy + dx * vd->fbi.drdx) >> 4; + vd->fbi.startg += (dy * vd->fbi.dgdy + dx * vd->fbi.dgdx) >> 4; + vd->fbi.startb += (dy * vd->fbi.dbdy + dx * vd->fbi.dbdx) >> 4; + vd->fbi.starta += (dy * vd->fbi.dady + dx * vd->fbi.dadx) >> 4; + vd->fbi.startw += (dy * vd->fbi.dwdy + dx * vd->fbi.dwdx) >> 4; + vd->fbi.startz += mul_32x32_shift(dy, vd->fbi.dzdy, 4) + mul_32x32_shift(dx, vd->fbi.dzdx, 4); /* adjust iterated W/S/T for TMU 0 */ if (texcount >= 1) { - v->tmu[0].startw += (dy * v->tmu[0].dwdy + dx * v->tmu[0].dwdx) >> 4; - v->tmu[0].starts += (dy * v->tmu[0].dsdy + dx * v->tmu[0].dsdx) >> 4; - v->tmu[0].startt += (dy * v->tmu[0].dtdy + dx * v->tmu[0].dtdx) >> 4; + vd->tmu[0].startw += (dy * vd->tmu[0].dwdy + dx * vd->tmu[0].dwdx) >> 4; + vd->tmu[0].starts += (dy * vd->tmu[0].dsdy + dx * vd->tmu[0].dsdx) >> 4; + vd->tmu[0].startt += (dy * vd->tmu[0].dtdy + dx * vd->tmu[0].dtdx) >> 4; /* adjust iterated W/S/T for TMU 1 */ if (texcount >= 2) { - v->tmu[1].startw += (dy * v->tmu[1].dwdy + dx * v->tmu[1].dwdx) >> 4; - v->tmu[1].starts += (dy * v->tmu[1].dsdy + dx * v->tmu[1].dsdx) >> 4; - v->tmu[1].startt += (dy * v->tmu[1].dtdy + dx * v->tmu[1].dtdx) >> 4; + vd->tmu[1].startw += (dy * vd->tmu[1].dwdy + dx * vd->tmu[1].dwdx) >> 4; + vd->tmu[1].starts += (dy * vd->tmu[1].dsdy + dx * vd->tmu[1].dsdx) >> 4; + vd->tmu[1].startt += (dy * vd->tmu[1].dtdy + dx * vd->tmu[1].dtdx) >> 4; } } } /* wait for any outstanding work to finish */ -// poly_wait(v->poly, "triangle"); +// poly_wait(vd->poly, "triangle"); /* determine the draw buffer */ - destbuf = (v->type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(v->reg[fbzMode].u); + destbuf = (vd->vd_type >= TYPE_VOODOO_BANSHEE) ? 1 : FBZMODE_DRAW_BUFFER(vd->reg[fbzMode].u); switch (destbuf) { case 0: /* front buffer */ - drawbuf = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.frontbuf]); - v->fbi.video_changed = TRUE; + drawbuf = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.frontbuf]); + vd->fbi.video_changed = TRUE; break; case 1: /* back buffer */ - drawbuf = (UINT16 *)(v->fbi.ram + v->fbi.rgboffs[v->fbi.backbuf]); + drawbuf = (UINT16 *)(vd->fbi.ram + vd->fbi.rgboffs[vd->fbi.backbuf]); break; default: /* reserved */ @@ -5366,18 +5293,18 @@ static INT32 triangle(voodoo_state *v) } /* find a rasterizer that matches our current state */ - pixels = triangle_create_work_item(v, drawbuf, texcount); + pixels = triangle_create_work_item(vd, drawbuf, texcount); /* update stats */ - v->reg[fbiTrianglesOut].u++; + vd->reg[fbiTrianglesOut].u++; /* update stats */ - v->stats.total_triangles++; + vd->stats.total_triangles++; g_profiler.stop(); /* 1 pixel per clock, plus some setup time */ - if (LOG_REGISTERS) v->device->logerror("cycles = %d\n", TRIANGLE_SETUP_CLOCKS + pixels); + if (LOG_REGISTERS) vd->device->logerror("cycles = %d\n", TRIANGLE_SETUP_CLOCKS + pixels); return TRIANGLE_SETUP_CLOCKS + pixels; } @@ -5387,28 +5314,28 @@ static INT32 triangle(voodoo_state *v) command -------------------------------------------------*/ -static INT32 begin_triangle(voodoo_state *v) +INT32 voodoo_device::begin_triangle(voodoo_device *vd) { - setup_vertex *sv = &v->fbi.svert[2]; + setup_vertex *sv = &vd->fbi.svert[2]; /* extract all the data from registers */ - sv->x = v->reg[sVx].f; - sv->y = v->reg[sVy].f; - sv->wb = v->reg[sWb].f; - sv->w0 = v->reg[sWtmu0].f; - sv->s0 = v->reg[sS_W0].f; - sv->t0 = v->reg[sT_W0].f; - sv->w1 = v->reg[sWtmu1].f; - sv->s1 = v->reg[sS_Wtmu1].f; - sv->t1 = v->reg[sT_Wtmu1].f; - sv->a = v->reg[sAlpha].f; - sv->r = v->reg[sRed].f; - sv->g = v->reg[sGreen].f; - sv->b = v->reg[sBlue].f; + sv->x = vd->reg[sVx].f; + sv->y = vd->reg[sVy].f; + sv->wb = vd->reg[sWb].f; + sv->w0 = vd->reg[sWtmu0].f; + sv->s0 = vd->reg[sS_W0].f; + sv->t0 = vd->reg[sT_W0].f; + sv->w1 = vd->reg[sWtmu1].f; + sv->s1 = vd->reg[sS_Wtmu1].f; + sv->t1 = vd->reg[sT_Wtmu1].f; + sv->a = vd->reg[sAlpha].f; + sv->r = vd->reg[sRed].f; + sv->g = vd->reg[sGreen].f; + sv->b = vd->reg[sBlue].f; /* spread it across all three verts and reset the count */ - v->fbi.svert[0] = v->fbi.svert[1] = v->fbi.svert[2]; - v->fbi.sverts = 1; + vd->fbi.svert[0] = vd->fbi.svert[1] = vd->fbi.svert[2]; + vd->fbi.sverts = 1; return 0; } @@ -5419,36 +5346,36 @@ static INT32 begin_triangle(voodoo_state *v) command -------------------------------------------------*/ -static INT32 draw_triangle(voodoo_state *v) +INT32 voodoo_device::draw_triangle(voodoo_device *vd) { - setup_vertex *sv = &v->fbi.svert[2]; + setup_vertex *sv = &vd->fbi.svert[2]; int cycles = 0; /* for strip mode, shuffle vertex 1 down to 0 */ - if (!(v->reg[sSetupMode].u & (1 << 16))) - v->fbi.svert[0] = v->fbi.svert[1]; + if (!(vd->reg[sSetupMode].u & (1 << 16))) + vd->fbi.svert[0] = vd->fbi.svert[1]; /* copy 2 down to 1 regardless */ - v->fbi.svert[1] = v->fbi.svert[2]; + vd->fbi.svert[1] = vd->fbi.svert[2]; /* extract all the data from registers */ - sv->x = v->reg[sVx].f; - sv->y = v->reg[sVy].f; - sv->wb = v->reg[sWb].f; - sv->w0 = v->reg[sWtmu0].f; - sv->s0 = v->reg[sS_W0].f; - sv->t0 = v->reg[sT_W0].f; - sv->w1 = v->reg[sWtmu1].f; - sv->s1 = v->reg[sS_Wtmu1].f; - sv->t1 = v->reg[sT_Wtmu1].f; - sv->a = v->reg[sAlpha].f; - sv->r = v->reg[sRed].f; - sv->g = v->reg[sGreen].f; - sv->b = v->reg[sBlue].f; + sv->x = vd->reg[sVx].f; + sv->y = vd->reg[sVy].f; + sv->wb = vd->reg[sWb].f; + sv->w0 = vd->reg[sWtmu0].f; + sv->s0 = vd->reg[sS_W0].f; + sv->t0 = vd->reg[sT_W0].f; + sv->w1 = vd->reg[sWtmu1].f; + sv->s1 = vd->reg[sS_Wtmu1].f; + sv->t1 = vd->reg[sT_Wtmu1].f; + sv->a = vd->reg[sAlpha].f; + sv->r = vd->reg[sRed].f; + sv->g = vd->reg[sGreen].f; + sv->b = vd->reg[sBlue].f; /* if we have enough verts, go ahead and draw */ - if (++v->fbi.sverts >= 3) - cycles = setup_and_draw_triangle(v); + if (++vd->fbi.sverts >= 3) + cycles = setup_and_draw_triangle(vd); return cycles; } @@ -5464,32 +5391,32 @@ static INT32 draw_triangle(voodoo_state *v) parameters and render the triangle -------------------------------------------------*/ -static INT32 setup_and_draw_triangle(voodoo_state *v) +INT32 voodoo_device::setup_and_draw_triangle(voodoo_device *vd) { float dx1, dy1, dx2, dy2; float divisor, tdiv; /* grab the X/Ys at least */ - v->fbi.ax = (INT16)(v->fbi.svert[0].x * 16.0f); - v->fbi.ay = (INT16)(v->fbi.svert[0].y * 16.0f); - v->fbi.bx = (INT16)(v->fbi.svert[1].x * 16.0f); - v->fbi.by = (INT16)(v->fbi.svert[1].y * 16.0f); - v->fbi.cx = (INT16)(v->fbi.svert[2].x * 16.0f); - v->fbi.cy = (INT16)(v->fbi.svert[2].y * 16.0f); + vd->fbi.ax = (INT16)(vd->fbi.svert[0].x * 16.0f); + vd->fbi.ay = (INT16)(vd->fbi.svert[0].y * 16.0f); + vd->fbi.bx = (INT16)(vd->fbi.svert[1].x * 16.0f); + vd->fbi.by = (INT16)(vd->fbi.svert[1].y * 16.0f); + vd->fbi.cx = (INT16)(vd->fbi.svert[2].x * 16.0f); + vd->fbi.cy = (INT16)(vd->fbi.svert[2].y * 16.0f); /* compute the divisor */ - divisor = 1.0f / ((v->fbi.svert[0].x - v->fbi.svert[1].x) * (v->fbi.svert[0].y - v->fbi.svert[2].y) - - (v->fbi.svert[0].x - v->fbi.svert[2].x) * (v->fbi.svert[0].y - v->fbi.svert[1].y)); + divisor = 1.0f / ((vd->fbi.svert[0].x - vd->fbi.svert[1].x) * (vd->fbi.svert[0].y - vd->fbi.svert[2].y) - + (vd->fbi.svert[0].x - vd->fbi.svert[2].x) * (vd->fbi.svert[0].y - vd->fbi.svert[1].y)); /* backface culling */ - if (v->reg[sSetupMode].u & 0x20000) + if (vd->reg[sSetupMode].u & 0x20000) { - int culling_sign = (v->reg[sSetupMode].u >> 18) & 1; + int culling_sign = (vd->reg[sSetupMode].u >> 18) & 1; int divisor_sign = (divisor < 0); /* if doing strips and ping pong is enabled, apply the ping pong */ - if ((v->reg[sSetupMode].u & 0x90000) == 0x00000) - culling_sign ^= (v->fbi.sverts - 3) & 1; + if ((vd->reg[sSetupMode].u & 0x90000) == 0x00000) + culling_sign ^= (vd->fbi.sverts - 3) & 1; /* if our sign matches the culling sign, we're done for */ if (divisor_sign == culling_sign) @@ -5497,92 +5424,92 @@ static INT32 setup_and_draw_triangle(voodoo_state *v) } /* compute the dx/dy values */ - dx1 = v->fbi.svert[0].y - v->fbi.svert[2].y; - dx2 = v->fbi.svert[0].y - v->fbi.svert[1].y; - dy1 = v->fbi.svert[0].x - v->fbi.svert[1].x; - dy2 = v->fbi.svert[0].x - v->fbi.svert[2].x; + dx1 = vd->fbi.svert[0].y - vd->fbi.svert[2].y; + dx2 = vd->fbi.svert[0].y - vd->fbi.svert[1].y; + dy1 = vd->fbi.svert[0].x - vd->fbi.svert[1].x; + dy2 = vd->fbi.svert[0].x - vd->fbi.svert[2].x; /* set up R,G,B */ tdiv = divisor * 4096.0f; - if (v->reg[sSetupMode].u & (1 << 0)) + if (vd->reg[sSetupMode].u & (1 << 0)) { - v->fbi.startr = (INT32)(v->fbi.svert[0].r * 4096.0f); - v->fbi.drdx = (INT32)(((v->fbi.svert[0].r - v->fbi.svert[1].r) * dx1 - (v->fbi.svert[0].r - v->fbi.svert[2].r) * dx2) * tdiv); - v->fbi.drdy = (INT32)(((v->fbi.svert[0].r - v->fbi.svert[2].r) * dy1 - (v->fbi.svert[0].r - v->fbi.svert[1].r) * dy2) * tdiv); - v->fbi.startg = (INT32)(v->fbi.svert[0].g * 4096.0f); - v->fbi.dgdx = (INT32)(((v->fbi.svert[0].g - v->fbi.svert[1].g) * dx1 - (v->fbi.svert[0].g - v->fbi.svert[2].g) * dx2) * tdiv); - v->fbi.dgdy = (INT32)(((v->fbi.svert[0].g - v->fbi.svert[2].g) * dy1 - (v->fbi.svert[0].g - v->fbi.svert[1].g) * dy2) * tdiv); - v->fbi.startb = (INT32)(v->fbi.svert[0].b * 4096.0f); - v->fbi.dbdx = (INT32)(((v->fbi.svert[0].b - v->fbi.svert[1].b) * dx1 - (v->fbi.svert[0].b - v->fbi.svert[2].b) * dx2) * tdiv); - v->fbi.dbdy = (INT32)(((v->fbi.svert[0].b - v->fbi.svert[2].b) * dy1 - (v->fbi.svert[0].b - v->fbi.svert[1].b) * dy2) * tdiv); + vd->fbi.startr = (INT32)(vd->fbi.svert[0].r * 4096.0f); + vd->fbi.drdx = (INT32)(((vd->fbi.svert[0].r - vd->fbi.svert[1].r) * dx1 - (vd->fbi.svert[0].r - vd->fbi.svert[2].r) * dx2) * tdiv); + vd->fbi.drdy = (INT32)(((vd->fbi.svert[0].r - vd->fbi.svert[2].r) * dy1 - (vd->fbi.svert[0].r - vd->fbi.svert[1].r) * dy2) * tdiv); + vd->fbi.startg = (INT32)(vd->fbi.svert[0].g * 4096.0f); + vd->fbi.dgdx = (INT32)(((vd->fbi.svert[0].g - vd->fbi.svert[1].g) * dx1 - (vd->fbi.svert[0].g - vd->fbi.svert[2].g) * dx2) * tdiv); + vd->fbi.dgdy = (INT32)(((vd->fbi.svert[0].g - vd->fbi.svert[2].g) * dy1 - (vd->fbi.svert[0].g - vd->fbi.svert[1].g) * dy2) * tdiv); + vd->fbi.startb = (INT32)(vd->fbi.svert[0].b * 4096.0f); + vd->fbi.dbdx = (INT32)(((vd->fbi.svert[0].b - vd->fbi.svert[1].b) * dx1 - (vd->fbi.svert[0].b - vd->fbi.svert[2].b) * dx2) * tdiv); + vd->fbi.dbdy = (INT32)(((vd->fbi.svert[0].b - vd->fbi.svert[2].b) * dy1 - (vd->fbi.svert[0].b - vd->fbi.svert[1].b) * dy2) * tdiv); } /* set up alpha */ - if (v->reg[sSetupMode].u & (1 << 1)) + if (vd->reg[sSetupMode].u & (1 << 1)) { - v->fbi.starta = (INT32)(v->fbi.svert[0].a * 4096.0f); - v->fbi.dadx = (INT32)(((v->fbi.svert[0].a - v->fbi.svert[1].a) * dx1 - (v->fbi.svert[0].a - v->fbi.svert[2].a) * dx2) * tdiv); - v->fbi.dady = (INT32)(((v->fbi.svert[0].a - v->fbi.svert[2].a) * dy1 - (v->fbi.svert[0].a - v->fbi.svert[1].a) * dy2) * tdiv); + vd->fbi.starta = (INT32)(vd->fbi.svert[0].a * 4096.0f); + vd->fbi.dadx = (INT32)(((vd->fbi.svert[0].a - vd->fbi.svert[1].a) * dx1 - (vd->fbi.svert[0].a - vd->fbi.svert[2].a) * dx2) * tdiv); + vd->fbi.dady = (INT32)(((vd->fbi.svert[0].a - vd->fbi.svert[2].a) * dy1 - (vd->fbi.svert[0].a - vd->fbi.svert[1].a) * dy2) * tdiv); } /* set up Z */ - if (v->reg[sSetupMode].u & (1 << 2)) + if (vd->reg[sSetupMode].u & (1 << 2)) { - v->fbi.startz = (INT32)(v->fbi.svert[0].z * 4096.0f); - v->fbi.dzdx = (INT32)(((v->fbi.svert[0].z - v->fbi.svert[1].z) * dx1 - (v->fbi.svert[0].z - v->fbi.svert[2].z) * dx2) * tdiv); - v->fbi.dzdy = (INT32)(((v->fbi.svert[0].z - v->fbi.svert[2].z) * dy1 - (v->fbi.svert[0].z - v->fbi.svert[1].z) * dy2) * tdiv); + vd->fbi.startz = (INT32)(vd->fbi.svert[0].z * 4096.0f); + vd->fbi.dzdx = (INT32)(((vd->fbi.svert[0].z - vd->fbi.svert[1].z) * dx1 - (vd->fbi.svert[0].z - vd->fbi.svert[2].z) * dx2) * tdiv); + vd->fbi.dzdy = (INT32)(((vd->fbi.svert[0].z - vd->fbi.svert[2].z) * dy1 - (vd->fbi.svert[0].z - vd->fbi.svert[1].z) * dy2) * tdiv); } /* set up Wb */ tdiv = divisor * 65536.0f * 65536.0f; - if (v->reg[sSetupMode].u & (1 << 3)) + if (vd->reg[sSetupMode].u & (1 << 3)) { - v->fbi.startw = v->tmu[0].startw = v->tmu[1].startw = (INT64)(v->fbi.svert[0].wb * 65536.0f * 65536.0f); - v->fbi.dwdx = v->tmu[0].dwdx = v->tmu[1].dwdx = ((v->fbi.svert[0].wb - v->fbi.svert[1].wb) * dx1 - (v->fbi.svert[0].wb - v->fbi.svert[2].wb) * dx2) * tdiv; - v->fbi.dwdy = v->tmu[0].dwdy = v->tmu[1].dwdy = ((v->fbi.svert[0].wb - v->fbi.svert[2].wb) * dy1 - (v->fbi.svert[0].wb - v->fbi.svert[1].wb) * dy2) * tdiv; + vd->fbi.startw = vd->tmu[0].startw = vd->tmu[1].startw = (INT64)(vd->fbi.svert[0].wb * 65536.0f * 65536.0f); + vd->fbi.dwdx = vd->tmu[0].dwdx = vd->tmu[1].dwdx = ((vd->fbi.svert[0].wb - vd->fbi.svert[1].wb) * dx1 - (vd->fbi.svert[0].wb - vd->fbi.svert[2].wb) * dx2) * tdiv; + vd->fbi.dwdy = vd->tmu[0].dwdy = vd->tmu[1].dwdy = ((vd->fbi.svert[0].wb - vd->fbi.svert[2].wb) * dy1 - (vd->fbi.svert[0].wb - vd->fbi.svert[1].wb) * dy2) * tdiv; } /* set up W0 */ - if (v->reg[sSetupMode].u & (1 << 4)) + if (vd->reg[sSetupMode].u & (1 << 4)) { - v->tmu[0].startw = v->tmu[1].startw = (INT64)(v->fbi.svert[0].w0 * 65536.0f * 65536.0f); - v->tmu[0].dwdx = v->tmu[1].dwdx = ((v->fbi.svert[0].w0 - v->fbi.svert[1].w0) * dx1 - (v->fbi.svert[0].w0 - v->fbi.svert[2].w0) * dx2) * tdiv; - v->tmu[0].dwdy = v->tmu[1].dwdy = ((v->fbi.svert[0].w0 - v->fbi.svert[2].w0) * dy1 - (v->fbi.svert[0].w0 - v->fbi.svert[1].w0) * dy2) * tdiv; + vd->tmu[0].startw = vd->tmu[1].startw = (INT64)(vd->fbi.svert[0].w0 * 65536.0f * 65536.0f); + vd->tmu[0].dwdx = vd->tmu[1].dwdx = ((vd->fbi.svert[0].w0 - vd->fbi.svert[1].w0) * dx1 - (vd->fbi.svert[0].w0 - vd->fbi.svert[2].w0) * dx2) * tdiv; + vd->tmu[0].dwdy = vd->tmu[1].dwdy = ((vd->fbi.svert[0].w0 - vd->fbi.svert[2].w0) * dy1 - (vd->fbi.svert[0].w0 - vd->fbi.svert[1].w0) * dy2) * tdiv; } /* set up S0,T0 */ - if (v->reg[sSetupMode].u & (1 << 5)) + if (vd->reg[sSetupMode].u & (1 << 5)) { - v->tmu[0].starts = v->tmu[1].starts = (INT64)(v->fbi.svert[0].s0 * 65536.0f * 65536.0f); - v->tmu[0].dsdx = v->tmu[1].dsdx = ((v->fbi.svert[0].s0 - v->fbi.svert[1].s0) * dx1 - (v->fbi.svert[0].s0 - v->fbi.svert[2].s0) * dx2) * tdiv; - v->tmu[0].dsdy = v->tmu[1].dsdy = ((v->fbi.svert[0].s0 - v->fbi.svert[2].s0) * dy1 - (v->fbi.svert[0].s0 - v->fbi.svert[1].s0) * dy2) * tdiv; - v->tmu[0].startt = v->tmu[1].startt = (INT64)(v->fbi.svert[0].t0 * 65536.0f * 65536.0f); - v->tmu[0].dtdx = v->tmu[1].dtdx = ((v->fbi.svert[0].t0 - v->fbi.svert[1].t0) * dx1 - (v->fbi.svert[0].t0 - v->fbi.svert[2].t0) * dx2) * tdiv; - v->tmu[0].dtdy = v->tmu[1].dtdy = ((v->fbi.svert[0].t0 - v->fbi.svert[2].t0) * dy1 - (v->fbi.svert[0].t0 - v->fbi.svert[1].t0) * dy2) * tdiv; + vd->tmu[0].starts = vd->tmu[1].starts = (INT64)(vd->fbi.svert[0].s0 * 65536.0f * 65536.0f); + vd->tmu[0].dsdx = vd->tmu[1].dsdx = ((vd->fbi.svert[0].s0 - vd->fbi.svert[1].s0) * dx1 - (vd->fbi.svert[0].s0 - vd->fbi.svert[2].s0) * dx2) * tdiv; + vd->tmu[0].dsdy = vd->tmu[1].dsdy = ((vd->fbi.svert[0].s0 - vd->fbi.svert[2].s0) * dy1 - (vd->fbi.svert[0].s0 - vd->fbi.svert[1].s0) * dy2) * tdiv; + vd->tmu[0].startt = vd->tmu[1].startt = (INT64)(vd->fbi.svert[0].t0 * 65536.0f * 65536.0f); + vd->tmu[0].dtdx = vd->tmu[1].dtdx = ((vd->fbi.svert[0].t0 - vd->fbi.svert[1].t0) * dx1 - (vd->fbi.svert[0].t0 - vd->fbi.svert[2].t0) * dx2) * tdiv; + vd->tmu[0].dtdy = vd->tmu[1].dtdy = ((vd->fbi.svert[0].t0 - vd->fbi.svert[2].t0) * dy1 - (vd->fbi.svert[0].t0 - vd->fbi.svert[1].t0) * dy2) * tdiv; } /* set up W1 */ - if (v->reg[sSetupMode].u & (1 << 6)) + if (vd->reg[sSetupMode].u & (1 << 6)) { - v->tmu[1].startw = (INT64)(v->fbi.svert[0].w1 * 65536.0f * 65536.0f); - v->tmu[1].dwdx = ((v->fbi.svert[0].w1 - v->fbi.svert[1].w1) * dx1 - (v->fbi.svert[0].w1 - v->fbi.svert[2].w1) * dx2) * tdiv; - v->tmu[1].dwdy = ((v->fbi.svert[0].w1 - v->fbi.svert[2].w1) * dy1 - (v->fbi.svert[0].w1 - v->fbi.svert[1].w1) * dy2) * tdiv; + vd->tmu[1].startw = (INT64)(vd->fbi.svert[0].w1 * 65536.0f * 65536.0f); + vd->tmu[1].dwdx = ((vd->fbi.svert[0].w1 - vd->fbi.svert[1].w1) * dx1 - (vd->fbi.svert[0].w1 - vd->fbi.svert[2].w1) * dx2) * tdiv; + vd->tmu[1].dwdy = ((vd->fbi.svert[0].w1 - vd->fbi.svert[2].w1) * dy1 - (vd->fbi.svert[0].w1 - vd->fbi.svert[1].w1) * dy2) * tdiv; } /* set up S1,T1 */ - if (v->reg[sSetupMode].u & (1 << 7)) + if (vd->reg[sSetupMode].u & (1 << 7)) { - v->tmu[1].starts = (INT64)(v->fbi.svert[0].s1 * 65536.0f * 65536.0f); - v->tmu[1].dsdx = ((v->fbi.svert[0].s1 - v->fbi.svert[1].s1) * dx1 - (v->fbi.svert[0].s1 - v->fbi.svert[2].s1) * dx2) * tdiv; - v->tmu[1].dsdy = ((v->fbi.svert[0].s1 - v->fbi.svert[2].s1) * dy1 - (v->fbi.svert[0].s1 - v->fbi.svert[1].s1) * dy2) * tdiv; - v->tmu[1].startt = (INT64)(v->fbi.svert[0].t1 * 65536.0f * 65536.0f); - v->tmu[1].dtdx = ((v->fbi.svert[0].t1 - v->fbi.svert[1].t1) * dx1 - (v->fbi.svert[0].t1 - v->fbi.svert[2].t1) * dx2) * tdiv; - v->tmu[1].dtdy = ((v->fbi.svert[0].t1 - v->fbi.svert[2].t1) * dy1 - (v->fbi.svert[0].t1 - v->fbi.svert[1].t1) * dy2) * tdiv; + vd->tmu[1].starts = (INT64)(vd->fbi.svert[0].s1 * 65536.0f * 65536.0f); + vd->tmu[1].dsdx = ((vd->fbi.svert[0].s1 - vd->fbi.svert[1].s1) * dx1 - (vd->fbi.svert[0].s1 - vd->fbi.svert[2].s1) * dx2) * tdiv; + vd->tmu[1].dsdy = ((vd->fbi.svert[0].s1 - vd->fbi.svert[2].s1) * dy1 - (vd->fbi.svert[0].s1 - vd->fbi.svert[1].s1) * dy2) * tdiv; + vd->tmu[1].startt = (INT64)(vd->fbi.svert[0].t1 * 65536.0f * 65536.0f); + vd->tmu[1].dtdx = ((vd->fbi.svert[0].t1 - vd->fbi.svert[1].t1) * dx1 - (vd->fbi.svert[0].t1 - vd->fbi.svert[2].t1) * dx2) * tdiv; + vd->tmu[1].dtdy = ((vd->fbi.svert[0].t1 - vd->fbi.svert[2].t1) * dy1 - (vd->fbi.svert[0].t1 - vd->fbi.svert[1].t1) * dy2) * tdiv; } /* draw the triangle */ - v->fbi.cheating_allowed = 1; - return triangle(v); + vd->fbi.cheating_allowed = 1; + return triangle(vd); } @@ -5591,81 +5518,82 @@ static INT32 setup_and_draw_triangle(voodoo_state *v) setup and create the work item -------------------------------------------------*/ -static INT32 triangle_create_work_item(voodoo_state *v, UINT16 *drawbuf, int texcount) +INT32 voodoo_device::triangle_create_work_item(voodoo_device* vd, UINT16 *drawbuf, int texcount) { - poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(v->poly); - raster_info *info = find_rasterizer(v, texcount); + poly_extra_data *extra = (poly_extra_data *)poly_get_extra_data(vd->poly); + + raster_info *info = find_rasterizer(vd, texcount); poly_vertex vert[3]; /* fill in the vertex data */ - vert[0].x = (float)v->fbi.ax * (1.0f / 16.0f); - vert[0].y = (float)v->fbi.ay * (1.0f / 16.0f); - vert[1].x = (float)v->fbi.bx * (1.0f / 16.0f); - vert[1].y = (float)v->fbi.by * (1.0f / 16.0f); - vert[2].x = (float)v->fbi.cx * (1.0f / 16.0f); - vert[2].y = (float)v->fbi.cy * (1.0f / 16.0f); + vert[0].x = (float)vd->fbi.ax * (1.0f / 16.0f); + vert[0].y = (float)vd->fbi.ay * (1.0f / 16.0f); + vert[1].x = (float)vd->fbi.bx * (1.0f / 16.0f); + vert[1].y = (float)vd->fbi.by * (1.0f / 16.0f); + vert[2].x = (float)vd->fbi.cx * (1.0f / 16.0f); + vert[2].y = (float)vd->fbi.cy * (1.0f / 16.0f); /* fill in the extra data */ - extra->state = v; + extra->device = vd; extra->info = info; /* fill in triangle parameters */ - extra->ax = v->fbi.ax; - extra->ay = v->fbi.ay; - extra->startr = v->fbi.startr; - extra->startg = v->fbi.startg; - extra->startb = v->fbi.startb; - extra->starta = v->fbi.starta; - extra->startz = v->fbi.startz; - extra->startw = v->fbi.startw; - extra->drdx = v->fbi.drdx; - extra->dgdx = v->fbi.dgdx; - extra->dbdx = v->fbi.dbdx; - extra->dadx = v->fbi.dadx; - extra->dzdx = v->fbi.dzdx; - extra->dwdx = v->fbi.dwdx; - extra->drdy = v->fbi.drdy; - extra->dgdy = v->fbi.dgdy; - extra->dbdy = v->fbi.dbdy; - extra->dady = v->fbi.dady; - extra->dzdy = v->fbi.dzdy; - extra->dwdy = v->fbi.dwdy; + extra->ax = vd->fbi.ax; + extra->ay = vd->fbi.ay; + extra->startr = vd->fbi.startr; + extra->startg = vd->fbi.startg; + extra->startb = vd->fbi.startb; + extra->starta = vd->fbi.starta; + extra->startz = vd->fbi.startz; + extra->startw = vd->fbi.startw; + extra->drdx = vd->fbi.drdx; + extra->dgdx = vd->fbi.dgdx; + extra->dbdx = vd->fbi.dbdx; + extra->dadx = vd->fbi.dadx; + extra->dzdx = vd->fbi.dzdx; + extra->dwdx = vd->fbi.dwdx; + extra->drdy = vd->fbi.drdy; + extra->dgdy = vd->fbi.dgdy; + extra->dbdy = vd->fbi.dbdy; + extra->dady = vd->fbi.dady; + extra->dzdy = vd->fbi.dzdy; + extra->dwdy = vd->fbi.dwdy; /* fill in texture 0 parameters */ if (texcount > 0) { - extra->starts0 = v->tmu[0].starts; - extra->startt0 = v->tmu[0].startt; - extra->startw0 = v->tmu[0].startw; - extra->ds0dx = v->tmu[0].dsdx; - extra->dt0dx = v->tmu[0].dtdx; - extra->dw0dx = v->tmu[0].dwdx; - extra->ds0dy = v->tmu[0].dsdy; - extra->dt0dy = v->tmu[0].dtdy; - extra->dw0dy = v->tmu[0].dwdy; - extra->lodbase0 = prepare_tmu(&v->tmu[0]); - v->stats.texture_mode[TEXMODE_FORMAT(v->tmu[0].reg[textureMode].u)]++; + extra->starts0 = vd->tmu[0].starts; + extra->startt0 = vd->tmu[0].startt; + extra->startw0 = vd->tmu[0].startw; + extra->ds0dx = vd->tmu[0].dsdx; + extra->dt0dx = vd->tmu[0].dtdx; + extra->dw0dx = vd->tmu[0].dwdx; + extra->ds0dy = vd->tmu[0].dsdy; + extra->dt0dy = vd->tmu[0].dtdy; + extra->dw0dy = vd->tmu[0].dwdy; + extra->lodbase0 = prepare_tmu(&vd->tmu[0]); + vd->stats.texture_mode[TEXMODE_FORMAT(vd->tmu[0].reg[textureMode].u)]++; /* fill in texture 1 parameters */ if (texcount > 1) { - extra->starts1 = v->tmu[1].starts; - extra->startt1 = v->tmu[1].startt; - extra->startw1 = v->tmu[1].startw; - extra->ds1dx = v->tmu[1].dsdx; - extra->dt1dx = v->tmu[1].dtdx; - extra->dw1dx = v->tmu[1].dwdx; - extra->ds1dy = v->tmu[1].dsdy; - extra->dt1dy = v->tmu[1].dtdy; - extra->dw1dy = v->tmu[1].dwdy; - extra->lodbase1 = prepare_tmu(&v->tmu[1]); - v->stats.texture_mode[TEXMODE_FORMAT(v->tmu[1].reg[textureMode].u)]++; + extra->starts1 = vd->tmu[1].starts; + extra->startt1 = vd->tmu[1].startt; + extra->startw1 = vd->tmu[1].startw; + extra->ds1dx = vd->tmu[1].dsdx; + extra->dt1dx = vd->tmu[1].dtdx; + extra->dw1dx = vd->tmu[1].dwdx; + extra->ds1dy = vd->tmu[1].dsdy; + extra->dt1dy = vd->tmu[1].dtdy; + extra->dw1dy = vd->tmu[1].dwdy; + extra->lodbase1 = prepare_tmu(&vd->tmu[1]); + vd->stats.texture_mode[TEXMODE_FORMAT(vd->tmu[1].reg[textureMode].u)]++; } } /* farm the rasterization out to other threads */ info->polys++; - return poly_render_triangle(v->poly, drawbuf, global_cliprect, info->callback, 0, &vert[0], &vert[1], &vert[2]); + return poly_render_triangle(vd->poly, drawbuf, global_cliprect, info->callback, 0, &vert[0], &vert[1], &vert[2]); } @@ -5679,12 +5607,12 @@ static INT32 triangle_create_work_item(voodoo_state *v, UINT16 *drawbuf, int tex hash table -------------------------------------------------*/ -static raster_info *add_rasterizer(voodoo_state *v, const raster_info *cinfo) +raster_info *voodoo_device::add_rasterizer(voodoo_device *vd, const raster_info *cinfo) { - raster_info *info = &v->rasterizer[v->next_rasterizer++]; + raster_info *info = &vd->rasterizer[vd->next_rasterizer++]; int hash = compute_raster_hash(cinfo); - assert_always(v->next_rasterizer <= MAX_RASTERIZERS, "Out of space for new rasterizers!"); + assert_always(vd->next_rasterizer <= MAX_RASTERIZERS, "Out of space for new rasterizers!"); /* make a copy of the info */ *info = *cinfo; @@ -5695,8 +5623,8 @@ static raster_info *add_rasterizer(voodoo_state *v, const raster_info *cinfo) info->hash = hash; /* hook us into the hash table */ - info->next = v->raster_hash[hash]; - v->raster_hash[hash] = info; + info->next = vd->raster_hash[hash]; + vd->raster_hash[hash] = info; if (LOG_RASTERIZERS) printf("Adding rasterizer @ %p : cp=%08X am=%08X %08X fbzM=%08X tm0=%08X tm1=%08X (hash=%d)\n", @@ -5714,25 +5642,25 @@ static raster_info *add_rasterizer(voodoo_state *v, const raster_info *cinfo) it, creating a new one if necessary -------------------------------------------------*/ -static raster_info *find_rasterizer(voodoo_state *v, int texcount) +raster_info *voodoo_device::find_rasterizer(voodoo_device *vd, int texcount) { raster_info *info, *prev = nullptr; raster_info curinfo; int hash; /* build an info struct with all the parameters */ - curinfo.eff_color_path = normalize_color_path(v->reg[fbzColorPath].u); - curinfo.eff_alpha_mode = normalize_alpha_mode(v->reg[alphaMode].u); - curinfo.eff_fog_mode = normalize_fog_mode(v->reg[fogMode].u); - curinfo.eff_fbz_mode = normalize_fbz_mode(v->reg[fbzMode].u); - curinfo.eff_tex_mode_0 = (texcount >= 1) ? normalize_tex_mode(v->tmu[0].reg[textureMode].u) : 0xffffffff; - curinfo.eff_tex_mode_1 = (texcount >= 2) ? normalize_tex_mode(v->tmu[1].reg[textureMode].u) : 0xffffffff; + curinfo.eff_color_path = normalize_color_path(vd->reg[fbzColorPath].u); + curinfo.eff_alpha_mode = normalize_alpha_mode(vd->reg[alphaMode].u); + curinfo.eff_fog_mode = normalize_fog_mode(vd->reg[fogMode].u); + curinfo.eff_fbz_mode = normalize_fbz_mode(vd->reg[fbzMode].u); + curinfo.eff_tex_mode_0 = (texcount >= 1) ? normalize_tex_mode(vd->tmu[0].reg[textureMode].u) : 0xffffffff; + curinfo.eff_tex_mode_1 = (texcount >= 2) ? normalize_tex_mode(vd->tmu[1].reg[textureMode].u) : 0xffffffff; /* compute the hash */ hash = compute_raster_hash(&curinfo); /* find the appropriate hash entry */ - for (info = v->raster_hash[hash]; info; prev = info, info = info->next) + for (info = vd->raster_hash[hash]; info; prev = info, info = info->next) if (info->eff_color_path == curinfo.eff_color_path && info->eff_alpha_mode == curinfo.eff_alpha_mode && info->eff_fog_mode == curinfo.eff_fog_mode && @@ -5744,8 +5672,8 @@ static raster_info *find_rasterizer(voodoo_state *v, int texcount) if (prev) { prev->next = info->next; - info->next = v->raster_hash[hash]; - v->raster_hash[hash] = info; + info->next = vd->raster_hash[hash]; + vd->raster_hash[hash] = info; } /* return the result */ @@ -5761,7 +5689,7 @@ static raster_info *find_rasterizer(voodoo_state *v, int texcount) curinfo.next = nullptr; curinfo.hash = hash; - return add_rasterizer(v, &curinfo); + return add_rasterizer(vd, &curinfo); } @@ -5770,7 +5698,7 @@ static raster_info *find_rasterizer(voodoo_state *v, int texcount) the current rasterizer usage patterns -------------------------------------------------*/ -static void dump_rasterizer_stats(voodoo_state *v) +void voodoo_device::dump_rasterizer_stats(voodoo_device *vd) { static UINT8 display_index; raster_info *cur, *best; @@ -5786,7 +5714,7 @@ static void dump_rasterizer_stats(voodoo_state *v) /* find the highest entry */ for (hash = 0; hash < RASTER_HASH_SIZE; hash++) - for (cur = v->raster_hash[hash]; cur; cur = cur->next) + for (cur = vd->raster_hash[hash]; cur; cur = cur->next) if (cur->display != display_index && (best == nullptr || cur->hits > best->hits)) best = cur; @@ -5822,12 +5750,10 @@ voodoo_device::voodoo_device(const machine_config &mconfig, device_type type, co m_vblank(*this), m_stall(*this) { - m_token = global_alloc_clear<voodoo_state>(); } voodoo_device::~voodoo_device() { - global_free(m_token); } //------------------------------------------------- @@ -5846,8 +5772,7 @@ void voodoo_device::device_config_complete() void voodoo_device::device_reset() { - voodoo_state *v = get_safe_token(this); - soft_reset(v); + soft_reset(this); } //------------------------------------------------- @@ -5856,11 +5781,9 @@ void voodoo_device::device_reset() void voodoo_device::device_stop() { - voodoo_state *v = get_safe_token(this); - /* release the work queue, ensuring all work is finished */ - if (v->poly != nullptr) - poly_free(v->poly); + if (poly != nullptr) + poly_free(poly); } @@ -5947,26 +5870,26 @@ void voodoo_3_device::device_start() implementation of the 'fastfill' command -------------------------------------------------*/ -static void raster_fastfill(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid) +void voodoo_device::raster_fastfill(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid) { const poly_extra_data *extra = (const poly_extra_data *)extradata; - voodoo_state *v = extra->state; - stats_block *stats = &v->thread_stats[threadid]; + voodoo_device* vd = extra->device; + stats_block *stats = &vd->thread_stats[threadid]; INT32 startx = extent->startx; INT32 stopx = extent->stopx; int scry, x; /* determine the screen Y */ scry = y; - if (FBZMODE_Y_ORIGIN(v->reg[fbzMode].u)) - scry = (v->fbi.yorigin - y) & 0x3ff; + if (FBZMODE_Y_ORIGIN(vd->reg[fbzMode].u)) + scry = (vd->fbi.yorigin - y) & 0x3ff; /* fill this RGB row */ - if (FBZMODE_RGB_BUFFER_MASK(v->reg[fbzMode].u)) + if (FBZMODE_RGB_BUFFER_MASK(vd->reg[fbzMode].u)) { const UINT16 *ditherow = &extra->dither[(y & 3) * 4]; UINT64 expanded = *(UINT64 *)ditherow; - UINT16 *dest = (UINT16 *)destbase + scry * v->fbi.rowpixels; + UINT16 *dest = (UINT16 *)destbase + scry * vd->fbi.rowpixels; for (x = startx; x < stopx && (x & 3) != 0; x++) dest[x] = ditherow[x & 3]; @@ -5978,11 +5901,11 @@ static void raster_fastfill(void *destbase, INT32 y, const poly_extent *extent, } /* fill this dest buffer row */ - if (FBZMODE_AUX_BUFFER_MASK(v->reg[fbzMode].u) && v->fbi.auxoffs != ~0) + if (FBZMODE_AUX_BUFFER_MASK(vd->reg[fbzMode].u) && vd->fbi.auxoffs != ~0) { - UINT16 color = v->reg[zaColor].u; + UINT16 color = vd->reg[zaColor].u; UINT64 expanded = ((UINT64)color << 48) | ((UINT64)color << 32) | (color << 16) | color; - UINT16 *dest = (UINT16 *)(v->fbi.ram + v->fbi.auxoffs) + scry * v->fbi.rowpixels; + UINT16 *dest = (UINT16 *)(vd->fbi.ram + vd->fbi.auxoffs) + scry * vd->fbi.rowpixels; for (x = startx; x < stopx && (x & 3) != 0; x++) dest[x] = color; @@ -5998,21 +5921,21 @@ static void raster_fastfill(void *destbase, INT32 y, const poly_extent *extent, generic_0tmu - generic rasterizer for 0 TMUs -------------------------------------------------*/ -RASTERIZER(generic_0tmu, 0, v->reg[fbzColorPath].u, v->reg[fbzMode].u, v->reg[alphaMode].u, - v->reg[fogMode].u, 0, 0) +RASTERIZER(generic_0tmu, 0, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, vd->reg[alphaMode].u, + vd->reg[fogMode].u, 0, 0) /*------------------------------------------------- generic_1tmu - generic rasterizer for 1 TMU -------------------------------------------------*/ -RASTERIZER(generic_1tmu, 1, v->reg[fbzColorPath].u, v->reg[fbzMode].u, v->reg[alphaMode].u, - v->reg[fogMode].u, v->tmu[0].reg[textureMode].u, 0) +RASTERIZER(generic_1tmu, 1, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, vd->reg[alphaMode].u, + vd->reg[fogMode].u, vd->tmu[0].reg[textureMode].u, 0) /*------------------------------------------------- generic_2tmu - generic rasterizer for 2 TMUs -------------------------------------------------*/ -RASTERIZER(generic_2tmu, 2, v->reg[fbzColorPath].u, v->reg[fbzMode].u, v->reg[alphaMode].u, - v->reg[fogMode].u, v->tmu[0].reg[textureMode].u, v->tmu[1].reg[textureMode].u) +RASTERIZER(generic_2tmu, 2, vd->reg[fbzColorPath].u, vd->reg[fbzMode].u, vd->reg[alphaMode].u, + vd->reg[fogMode].u, vd->tmu[0].reg[textureMode].u, vd->tmu[1].reg[textureMode].u) diff --git a/src/devices/video/voodoo.h b/src/devices/video/voodoo.h index 3d92f17f86a..1dc1a4a59ec 100644 --- a/src/devices/video/voodoo.h +++ b/src/devices/video/voodoo.h @@ -11,9 +11,1694 @@ #ifndef __VOODOO_H__ #define __VOODOO_H__ +#include "video/polylgcy.h" + #pragma once +/************************************* + * + * Misc. constants + * + *************************************/ + +/* enumeration describing reasons we might be stalled */ +enum +{ + NOT_STALLED = 0, + STALLED_UNTIL_FIFO_LWM, + STALLED_UNTIL_FIFO_EMPTY +}; + + + +// Use old table lookup versus straight double divide +#define USE_FAST_RECIP 0 + +/* maximum number of TMUs */ +#define MAX_TMU 2 + +/* accumulate operations less than this number of clocks */ +#define ACCUMULATE_THRESHOLD 0 + +/* number of clocks to set up a triangle (just a guess) */ +#define TRIANGLE_SETUP_CLOCKS 100 + +/* maximum number of rasterizers */ +#define MAX_RASTERIZERS 1024 + +/* size of the rasterizer hash table */ +#define RASTER_HASH_SIZE 97 + +/* flags for LFB writes */ +#define LFB_RGB_PRESENT 1 +#define LFB_ALPHA_PRESENT 2 +#define LFB_DEPTH_PRESENT 4 +#define LFB_DEPTH_PRESENT_MSW 8 + +/* flags for the register access array */ +#define REGISTER_READ 0x01 /* reads are allowed */ +#define REGISTER_WRITE 0x02 /* writes are allowed */ +#define REGISTER_PIPELINED 0x04 /* writes are pipelined */ +#define REGISTER_FIFO 0x08 /* writes go to FIFO */ +#define REGISTER_WRITETHRU 0x10 /* writes are valid even for CMDFIFO */ + +/* shorter combinations to make the table smaller */ +#define REG_R (REGISTER_READ) +#define REG_W (REGISTER_WRITE) +#define REG_WT (REGISTER_WRITE | REGISTER_WRITETHRU) +#define REG_RW (REGISTER_READ | REGISTER_WRITE) +#define REG_RWT (REGISTER_READ | REGISTER_WRITE | REGISTER_WRITETHRU) +#define REG_RP (REGISTER_READ | REGISTER_PIPELINED) +#define REG_WP (REGISTER_WRITE | REGISTER_PIPELINED) +#define REG_RWP (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED) +#define REG_RWPT (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_WRITETHRU) +#define REG_RF (REGISTER_READ | REGISTER_FIFO) +#define REG_WF (REGISTER_WRITE | REGISTER_FIFO) +#define REG_RWF (REGISTER_READ | REGISTER_WRITE | REGISTER_FIFO) +#define REG_RPF (REGISTER_READ | REGISTER_PIPELINED | REGISTER_FIFO) +#define REG_WPF (REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_FIFO) +#define REG_RWPF (REGISTER_READ | REGISTER_WRITE | REGISTER_PIPELINED | REGISTER_FIFO) + +/* lookup bits is the log2 of the size of the reciprocal/log table */ +#define RECIPLOG_LOOKUP_BITS 9 + +/* input precision is how many fraction bits the input value has; this is a 64-bit number */ +#define RECIPLOG_INPUT_PREC 32 + +/* lookup precision is how many fraction bits each table entry contains */ +#define RECIPLOG_LOOKUP_PREC 22 + +/* output precision is how many fraction bits the result should have */ +#define RECIP_OUTPUT_PREC 15 +#define LOG_OUTPUT_PREC 8 + + + +/************************************* + * + * Register constants + * + *************************************/ + +/* Codes to the right: + R = readable + W = writeable + P = pipelined + F = goes to FIFO +*/ + +/* 0x000 */ +#define vdstatus (0x000/4) /* R P */ +#define intrCtrl (0x004/4) /* RW P -- Voodoo2/Banshee only */ +#define vertexAx (0x008/4) /* W PF */ +#define vertexAy (0x00c/4) /* W PF */ +#define vertexBx (0x010/4) /* W PF */ +#define vertexBy (0x014/4) /* W PF */ +#define vertexCx (0x018/4) /* W PF */ +#define vertexCy (0x01c/4) /* W PF */ +#define startR (0x020/4) /* W PF */ +#define startG (0x024/4) /* W PF */ +#define startB (0x028/4) /* W PF */ +#define startZ (0x02c/4) /* W PF */ +#define startA (0x030/4) /* W PF */ +#define startS (0x034/4) /* W PF */ +#define startT (0x038/4) /* W PF */ +#define startW (0x03c/4) /* W PF */ + +/* 0x040 */ +#define dRdX (0x040/4) /* W PF */ +#define dGdX (0x044/4) /* W PF */ +#define dBdX (0x048/4) /* W PF */ +#define dZdX (0x04c/4) /* W PF */ +#define dAdX (0x050/4) /* W PF */ +#define dSdX (0x054/4) /* W PF */ +#define dTdX (0x058/4) /* W PF */ +#define dWdX (0x05c/4) /* W PF */ +#define dRdY (0x060/4) /* W PF */ +#define dGdY (0x064/4) /* W PF */ +#define dBdY (0x068/4) /* W PF */ +#define dZdY (0x06c/4) /* W PF */ +#define dAdY (0x070/4) /* W PF */ +#define dSdY (0x074/4) /* W PF */ +#define dTdY (0x078/4) /* W PF */ +#define dWdY (0x07c/4) /* W PF */ + +/* 0x080 */ +#define triangleCMD (0x080/4) /* W PF */ +#define fvertexAx (0x088/4) /* W PF */ +#define fvertexAy (0x08c/4) /* W PF */ +#define fvertexBx (0x090/4) /* W PF */ +#define fvertexBy (0x094/4) /* W PF */ +#define fvertexCx (0x098/4) /* W PF */ +#define fvertexCy (0x09c/4) /* W PF */ +#define fstartR (0x0a0/4) /* W PF */ +#define fstartG (0x0a4/4) /* W PF */ +#define fstartB (0x0a8/4) /* W PF */ +#define fstartZ (0x0ac/4) /* W PF */ +#define fstartA (0x0b0/4) /* W PF */ +#define fstartS (0x0b4/4) /* W PF */ +#define fstartT (0x0b8/4) /* W PF */ +#define fstartW (0x0bc/4) /* W PF */ + +/* 0x0c0 */ +#define fdRdX (0x0c0/4) /* W PF */ +#define fdGdX (0x0c4/4) /* W PF */ +#define fdBdX (0x0c8/4) /* W PF */ +#define fdZdX (0x0cc/4) /* W PF */ +#define fdAdX (0x0d0/4) /* W PF */ +#define fdSdX (0x0d4/4) /* W PF */ +#define fdTdX (0x0d8/4) /* W PF */ +#define fdWdX (0x0dc/4) /* W PF */ +#define fdRdY (0x0e0/4) /* W PF */ +#define fdGdY (0x0e4/4) /* W PF */ +#define fdBdY (0x0e8/4) /* W PF */ +#define fdZdY (0x0ec/4) /* W PF */ +#define fdAdY (0x0f0/4) /* W PF */ +#define fdSdY (0x0f4/4) /* W PF */ +#define fdTdY (0x0f8/4) /* W PF */ +#define fdWdY (0x0fc/4) /* W PF */ + +/* 0x100 */ +#define ftriangleCMD (0x100/4) /* W PF */ +#define fbzColorPath (0x104/4) /* RW PF */ +#define fogMode (0x108/4) /* RW PF */ +#define alphaMode (0x10c/4) /* RW PF */ +#define fbzMode (0x110/4) /* RW F */ +#define lfbMode (0x114/4) /* RW F */ +#define clipLeftRight (0x118/4) /* RW F */ +#define clipLowYHighY (0x11c/4) /* RW F */ +#define nopCMD (0x120/4) /* W F */ +#define fastfillCMD (0x124/4) /* W F */ +#define swapbufferCMD (0x128/4) /* W F */ +#define fogColor (0x12c/4) /* W F */ +#define zaColor (0x130/4) /* W F */ +#define chromaKey (0x134/4) /* W F */ +#define chromaRange (0x138/4) /* W F -- Voodoo2/Banshee only */ +#define userIntrCMD (0x13c/4) /* W F -- Voodoo2/Banshee only */ + +/* 0x140 */ +#define stipple (0x140/4) /* RW F */ +#define color0 (0x144/4) /* RW F */ +#define color1 (0x148/4) /* RW F */ +#define fbiPixelsIn (0x14c/4) /* R */ +#define fbiChromaFail (0x150/4) /* R */ +#define fbiZfuncFail (0x154/4) /* R */ +#define fbiAfuncFail (0x158/4) /* R */ +#define fbiPixelsOut (0x15c/4) /* R */ +#define fogTable (0x160/4) /* W F */ + +/* 0x1c0 */ +#define cmdFifoBaseAddr (0x1e0/4) /* RW -- Voodoo2 only */ +#define cmdFifoBump (0x1e4/4) /* RW -- Voodoo2 only */ +#define cmdFifoRdPtr (0x1e8/4) /* RW -- Voodoo2 only */ +#define cmdFifoAMin (0x1ec/4) /* RW -- Voodoo2 only */ +#define colBufferAddr (0x1ec/4) /* RW -- Banshee only */ +#define cmdFifoAMax (0x1f0/4) /* RW -- Voodoo2 only */ +#define colBufferStride (0x1f0/4) /* RW -- Banshee only */ +#define cmdFifoDepth (0x1f4/4) /* RW -- Voodoo2 only */ +#define auxBufferAddr (0x1f4/4) /* RW -- Banshee only */ +#define cmdFifoHoles (0x1f8/4) /* RW -- Voodoo2 only */ +#define auxBufferStride (0x1f8/4) /* RW -- Banshee only */ + +/* 0x200 */ +#define fbiInit4 (0x200/4) /* RW -- Voodoo/Voodoo2 only */ +#define clipLeftRight1 (0x200/4) /* RW -- Banshee only */ +#define vRetrace (0x204/4) /* R -- Voodoo/Voodoo2 only */ +#define clipTopBottom1 (0x204/4) /* RW -- Banshee only */ +#define backPorch (0x208/4) /* RW -- Voodoo/Voodoo2 only */ +#define videoDimensions (0x20c/4) /* RW -- Voodoo/Voodoo2 only */ +#define fbiInit0 (0x210/4) /* RW -- Voodoo/Voodoo2 only */ +#define fbiInit1 (0x214/4) /* RW -- Voodoo/Voodoo2 only */ +#define fbiInit2 (0x218/4) /* RW -- Voodoo/Voodoo2 only */ +#define fbiInit3 (0x21c/4) /* RW -- Voodoo/Voodoo2 only */ +#define hSync (0x220/4) /* W -- Voodoo/Voodoo2 only */ +#define vSync (0x224/4) /* W -- Voodoo/Voodoo2 only */ +#define clutData (0x228/4) /* W F -- Voodoo/Voodoo2 only */ +#define dacData (0x22c/4) /* W -- Voodoo/Voodoo2 only */ +#define maxRgbDelta (0x230/4) /* W -- Voodoo/Voodoo2 only */ +#define hBorder (0x234/4) /* W -- Voodoo2 only */ +#define vBorder (0x238/4) /* W -- Voodoo2 only */ +#define borderColor (0x23c/4) /* W -- Voodoo2 only */ + +/* 0x240 */ +#define hvRetrace (0x240/4) /* R -- Voodoo2 only */ +#define fbiInit5 (0x244/4) /* RW -- Voodoo2 only */ +#define fbiInit6 (0x248/4) /* RW -- Voodoo2 only */ +#define fbiInit7 (0x24c/4) /* RW -- Voodoo2 only */ +#define swapPending (0x24c/4) /* W -- Banshee only */ +#define leftOverlayBuf (0x250/4) /* W -- Banshee only */ +#define rightOverlayBuf (0x254/4) /* W -- Banshee only */ +#define fbiSwapHistory (0x258/4) /* R -- Voodoo2/Banshee only */ +#define fbiTrianglesOut (0x25c/4) /* R -- Voodoo2/Banshee only */ +#define sSetupMode (0x260/4) /* W PF -- Voodoo2/Banshee only */ +#define sVx (0x264/4) /* W PF -- Voodoo2/Banshee only */ +#define sVy (0x268/4) /* W PF -- Voodoo2/Banshee only */ +#define sARGB (0x26c/4) /* W PF -- Voodoo2/Banshee only */ +#define sRed (0x270/4) /* W PF -- Voodoo2/Banshee only */ +#define sGreen (0x274/4) /* W PF -- Voodoo2/Banshee only */ +#define sBlue (0x278/4) /* W PF -- Voodoo2/Banshee only */ +#define sAlpha (0x27c/4) /* W PF -- Voodoo2/Banshee only */ + +/* 0x280 */ +#define sVz (0x280/4) /* W PF -- Voodoo2/Banshee only */ +#define sWb (0x284/4) /* W PF -- Voodoo2/Banshee only */ +#define sWtmu0 (0x288/4) /* W PF -- Voodoo2/Banshee only */ +#define sS_W0 (0x28c/4) /* W PF -- Voodoo2/Banshee only */ +#define sT_W0 (0x290/4) /* W PF -- Voodoo2/Banshee only */ +#define sWtmu1 (0x294/4) /* W PF -- Voodoo2/Banshee only */ +#define sS_Wtmu1 (0x298/4) /* W PF -- Voodoo2/Banshee only */ +#define sT_Wtmu1 (0x29c/4) /* W PF -- Voodoo2/Banshee only */ +#define sDrawTriCMD (0x2a0/4) /* W PF -- Voodoo2/Banshee only */ +#define sBeginTriCMD (0x2a4/4) /* W PF -- Voodoo2/Banshee only */ + +/* 0x2c0 */ +#define bltSrcBaseAddr (0x2c0/4) /* RW PF -- Voodoo2 only */ +#define bltDstBaseAddr (0x2c4/4) /* RW PF -- Voodoo2 only */ +#define bltXYStrides (0x2c8/4) /* RW PF -- Voodoo2 only */ +#define bltSrcChromaRange (0x2cc/4) /* RW PF -- Voodoo2 only */ +#define bltDstChromaRange (0x2d0/4) /* RW PF -- Voodoo2 only */ +#define bltClipX (0x2d4/4) /* RW PF -- Voodoo2 only */ +#define bltClipY (0x2d8/4) /* RW PF -- Voodoo2 only */ +#define bltSrcXY (0x2e0/4) /* RW PF -- Voodoo2 only */ +#define bltDstXY (0x2e4/4) /* RW PF -- Voodoo2 only */ +#define bltSize (0x2e8/4) /* RW PF -- Voodoo2 only */ +#define bltRop (0x2ec/4) /* RW PF -- Voodoo2 only */ +#define bltColor (0x2f0/4) /* RW PF -- Voodoo2 only */ +#define bltCommand (0x2f8/4) /* RW PF -- Voodoo2 only */ +#define bltData (0x2fc/4) /* W PF -- Voodoo2 only */ + +/* 0x300 */ +#define textureMode (0x300/4) /* W PF */ +#define tLOD (0x304/4) /* W PF */ +#define tDetail (0x308/4) /* W PF */ +#define texBaseAddr (0x30c/4) /* W PF */ +#define texBaseAddr_1 (0x310/4) /* W PF */ +#define texBaseAddr_2 (0x314/4) /* W PF */ +#define texBaseAddr_3_8 (0x318/4) /* W PF */ +#define trexInit0 (0x31c/4) /* W F -- Voodoo/Voodoo2 only */ +#define trexInit1 (0x320/4) /* W F */ +#define nccTable (0x324/4) /* W F */ + + + +// 2D registers +#define banshee2D_clip0Min (0x008/4) +#define banshee2D_clip0Max (0x00c/4) +#define banshee2D_dstBaseAddr (0x010/4) +#define banshee2D_dstFormat (0x014/4) +#define banshee2D_srcColorkeyMin (0x018/4) +#define banshee2D_srcColorkeyMax (0x01c/4) +#define banshee2D_dstColorkeyMin (0x020/4) +#define banshee2D_dstColorkeyMax (0x024/4) +#define banshee2D_bresError0 (0x028/4) +#define banshee2D_bresError1 (0x02c/4) +#define banshee2D_rop (0x030/4) +#define banshee2D_srcBaseAddr (0x034/4) +#define banshee2D_commandExtra (0x038/4) +#define banshee2D_lineStipple (0x03c/4) +#define banshee2D_lineStyle (0x040/4) +#define banshee2D_pattern0Alias (0x044/4) +#define banshee2D_pattern1Alias (0x048/4) +#define banshee2D_clip1Min (0x04c/4) +#define banshee2D_clip1Max (0x050/4) +#define banshee2D_srcFormat (0x054/4) +#define banshee2D_srcSize (0x058/4) +#define banshee2D_srcXY (0x05c/4) +#define banshee2D_colorBack (0x060/4) +#define banshee2D_colorFore (0x064/4) +#define banshee2D_dstSize (0x068/4) +#define banshee2D_dstXY (0x06c/4) +#define banshee2D_command (0x070/4) + + +/************************************* + * + * Alias map of the first 64 + * registers when remapped + * + *************************************/ + +static const UINT8 register_alias_map[0x40] = +{ + vdstatus, 0x004/4, vertexAx, vertexAy, + vertexBx, vertexBy, vertexCx, vertexCy, + startR, dRdX, dRdY, startG, + dGdX, dGdY, startB, dBdX, + dBdY, startZ, dZdX, dZdY, + startA, dAdX, dAdY, startS, + dSdX, dSdY, startT, dTdX, + dTdY, startW, dWdX, dWdY, + + triangleCMD,0x084/4, fvertexAx, fvertexAy, + fvertexBx, fvertexBy, fvertexCx, fvertexCy, + fstartR, fdRdX, fdRdY, fstartG, + fdGdX, fdGdY, fstartB, fdBdX, + fdBdY, fstartZ, fdZdX, fdZdY, + fstartA, fdAdX, fdAdY, fstartS, + fdSdX, fdSdY, fstartT, fdTdX, + fdTdY, fstartW, fdWdX, fdWdY +}; + + + +/************************************* + * + * Table of per-register access rights + * + *************************************/ + +static const UINT8 voodoo_register_access[0x100] = +{ + /* 0x000 */ + REG_RP, 0, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x040 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x080 */ + REG_WPF, 0, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x0c0 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x100 */ + REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF, + REG_RWF, REG_RWF, REG_RWF, REG_RWF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, 0, 0, + + /* 0x140 */ + REG_RWF, REG_RWF, REG_RWF, REG_R, + REG_R, REG_R, REG_R, REG_R, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x180 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x1c0 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + 0, 0, 0, 0, + 0, 0, 0, 0, + + /* 0x200 */ + REG_RW, REG_R, REG_RW, REG_RW, + REG_RW, REG_RW, REG_RW, REG_RW, + REG_W, REG_W, REG_W, REG_W, + REG_W, 0, 0, 0, + + /* 0x240 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + /* 0x280 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + /* 0x2c0 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + /* 0x300 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x340 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x380 */ + REG_WF +}; + + +static const UINT8 voodoo2_register_access[0x100] = +{ + /* 0x000 */ + REG_RP, REG_RWPT, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x040 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x080 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x0c0 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x100 */ + REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF, + REG_RWF, REG_RWF, REG_RWF, REG_RWF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x140 */ + REG_RWF, REG_RWF, REG_RWF, REG_R, + REG_R, REG_R, REG_R, REG_R, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x180 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x1c0 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_RWT, REG_RWT, REG_RWT, REG_RWT, + REG_RWT, REG_RWT, REG_RWT, REG_RW, + + /* 0x200 */ + REG_RWT, REG_R, REG_RWT, REG_RWT, + REG_RWT, REG_RWT, REG_RWT, REG_RWT, + REG_WT, REG_WT, REG_WF, REG_WT, + REG_WT, REG_WT, REG_WT, REG_WT, + + /* 0x240 */ + REG_R, REG_RWT, REG_RWT, REG_RWT, + 0, 0, REG_R, REG_R, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x280 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, 0, 0, + 0, 0, 0, 0, + + /* 0x2c0 */ + REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF, + REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF, + REG_RWPF, REG_RWPF, REG_RWPF, REG_RWPF, + REG_RWPF, REG_RWPF, REG_RWPF, REG_WPF, + + /* 0x300 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x340 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x380 */ + REG_WF +}; + + +static const UINT8 banshee_register_access[0x100] = +{ + /* 0x000 */ + REG_RP, REG_RWPT, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x040 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x080 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x0c0 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x100 */ + REG_WPF, REG_RWPF, REG_RWPF, REG_RWPF, + REG_RWF, REG_RWF, REG_RWF, REG_RWF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x140 */ + REG_RWF, REG_RWF, REG_RWF, REG_R, + REG_R, REG_R, REG_R, REG_R, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x180 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x1c0 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + 0, 0, 0, REG_RWF, + REG_RWF, REG_RWF, REG_RWF, 0, + + /* 0x200 */ + REG_RWF, REG_RWF, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + /* 0x240 */ + 0, 0, 0, REG_WT, + REG_RWF, REG_RWF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_R, REG_R, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + + /* 0x280 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, 0, 0, + 0, 0, 0, 0, + + /* 0x2c0 */ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + + /* 0x300 */ + REG_WPF, REG_WPF, REG_WPF, REG_WPF, + REG_WPF, REG_WPF, REG_WPF, 0, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x340 */ + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + REG_WF, REG_WF, REG_WF, REG_WF, + + /* 0x380 */ + REG_WF +}; + + + +/************************************* + * + * Register string table for debug + * + *************************************/ + +static const char *const voodoo_reg_name[] = +{ + /* 0x000 */ + "status", "{intrCtrl}", "vertexAx", "vertexAy", + "vertexBx", "vertexBy", "vertexCx", "vertexCy", + "startR", "startG", "startB", "startZ", + "startA", "startS", "startT", "startW", + /* 0x040 */ + "dRdX", "dGdX", "dBdX", "dZdX", + "dAdX", "dSdX", "dTdX", "dWdX", + "dRdY", "dGdY", "dBdY", "dZdY", + "dAdY", "dSdY", "dTdY", "dWdY", + /* 0x080 */ + "triangleCMD", "reserved084", "fvertexAx", "fvertexAy", + "fvertexBx", "fvertexBy", "fvertexCx", "fvertexCy", + "fstartR", "fstartG", "fstartB", "fstartZ", + "fstartA", "fstartS", "fstartT", "fstartW", + /* 0x0c0 */ + "fdRdX", "fdGdX", "fdBdX", "fdZdX", + "fdAdX", "fdSdX", "fdTdX", "fdWdX", + "fdRdY", "fdGdY", "fdBdY", "fdZdY", + "fdAdY", "fdSdY", "fdTdY", "fdWdY", + /* 0x100 */ + "ftriangleCMD", "fbzColorPath", "fogMode", "alphaMode", + "fbzMode", "lfbMode", "clipLeftRight","clipLowYHighY", + "nopCMD", "fastfillCMD", "swapbufferCMD","fogColor", + "zaColor", "chromaKey", "{chromaRange}","{userIntrCMD}", + /* 0x140 */ + "stipple", "color0", "color1", "fbiPixelsIn", + "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut", + "fogTable160", "fogTable164", "fogTable168", "fogTable16c", + "fogTable170", "fogTable174", "fogTable178", "fogTable17c", + /* 0x180 */ + "fogTable180", "fogTable184", "fogTable188", "fogTable18c", + "fogTable190", "fogTable194", "fogTable198", "fogTable19c", + "fogTable1a0", "fogTable1a4", "fogTable1a8", "fogTable1ac", + "fogTable1b0", "fogTable1b4", "fogTable1b8", "fogTable1bc", + /* 0x1c0 */ + "fogTable1c0", "fogTable1c4", "fogTable1c8", "fogTable1cc", + "fogTable1d0", "fogTable1d4", "fogTable1d8", "fogTable1dc", + "{cmdFifoBaseAddr}","{cmdFifoBump}","{cmdFifoRdPtr}","{cmdFifoAMin}", + "{cmdFifoAMax}","{cmdFifoDepth}","{cmdFifoHoles}","reserved1fc", + /* 0x200 */ + "fbiInit4", "vRetrace", "backPorch", "videoDimensions", + "fbiInit0", "fbiInit1", "fbiInit2", "fbiInit3", + "hSync", "vSync", "clutData", "dacData", + "maxRgbDelta", "{hBorder}", "{vBorder}", "{borderColor}", + /* 0x240 */ + "{hvRetrace}", "{fbiInit5}", "{fbiInit6}", "{fbiInit7}", + "reserved250", "reserved254", "{fbiSwapHistory}","{fbiTrianglesOut}", + "{sSetupMode}", "{sVx}", "{sVy}", "{sARGB}", + "{sRed}", "{sGreen}", "{sBlue}", "{sAlpha}", + /* 0x280 */ + "{sVz}", "{sWb}", "{sWtmu0}", "{sS/Wtmu0}", + "{sT/Wtmu0}", "{sWtmu1}", "{sS/Wtmu1}", "{sT/Wtmu1}", + "{sDrawTriCMD}","{sBeginTriCMD}","reserved2a8", "reserved2ac", + "reserved2b0", "reserved2b4", "reserved2b8", "reserved2bc", + /* 0x2c0 */ + "{bltSrcBaseAddr}","{bltDstBaseAddr}","{bltXYStrides}","{bltSrcChromaRange}", + "{bltDstChromaRange}","{bltClipX}","{bltClipY}","reserved2dc", + "{bltSrcXY}", "{bltDstXY}", "{bltSize}", "{bltRop}", + "{bltColor}", "reserved2f4", "{bltCommand}", "{bltData}", + /* 0x300 */ + "textureMode", "tLOD", "tDetail", "texBaseAddr", + "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","trexInit0", + "trexInit1", "nccTable0.0", "nccTable0.1", "nccTable0.2", + "nccTable0.3", "nccTable0.4", "nccTable0.5", "nccTable0.6", + /* 0x340 */ + "nccTable0.7", "nccTable0.8", "nccTable0.9", "nccTable0.A", + "nccTable0.B", "nccTable1.0", "nccTable1.1", "nccTable1.2", + "nccTable1.3", "nccTable1.4", "nccTable1.5", "nccTable1.6", + "nccTable1.7", "nccTable1.8", "nccTable1.9", "nccTable1.A", + /* 0x380 */ + "nccTable1.B" +}; + + +static const char *const banshee_reg_name[] = +{ + /* 0x000 */ + "status", "intrCtrl", "vertexAx", "vertexAy", + "vertexBx", "vertexBy", "vertexCx", "vertexCy", + "startR", "startG", "startB", "startZ", + "startA", "startS", "startT", "startW", + /* 0x040 */ + "dRdX", "dGdX", "dBdX", "dZdX", + "dAdX", "dSdX", "dTdX", "dWdX", + "dRdY", "dGdY", "dBdY", "dZdY", + "dAdY", "dSdY", "dTdY", "dWdY", + /* 0x080 */ + "triangleCMD", "reserved084", "fvertexAx", "fvertexAy", + "fvertexBx", "fvertexBy", "fvertexCx", "fvertexCy", + "fstartR", "fstartG", "fstartB", "fstartZ", + "fstartA", "fstartS", "fstartT", "fstartW", + /* 0x0c0 */ + "fdRdX", "fdGdX", "fdBdX", "fdZdX", + "fdAdX", "fdSdX", "fdTdX", "fdWdX", + "fdRdY", "fdGdY", "fdBdY", "fdZdY", + "fdAdY", "fdSdY", "fdTdY", "fdWdY", + /* 0x100 */ + "ftriangleCMD", "fbzColorPath", "fogMode", "alphaMode", + "fbzMode", "lfbMode", "clipLeftRight","clipLowYHighY", + "nopCMD", "fastfillCMD", "swapbufferCMD","fogColor", + "zaColor", "chromaKey", "chromaRange", "userIntrCMD", + /* 0x140 */ + "stipple", "color0", "color1", "fbiPixelsIn", + "fbiChromaFail","fbiZfuncFail", "fbiAfuncFail", "fbiPixelsOut", + "fogTable160", "fogTable164", "fogTable168", "fogTable16c", + "fogTable170", "fogTable174", "fogTable178", "fogTable17c", + /* 0x180 */ + "fogTable180", "fogTable184", "fogTable188", "fogTable18c", + "fogTable190", "fogTable194", "fogTable198", "fogTable19c", + "fogTable1a0", "fogTable1a4", "fogTable1a8", "fogTable1ac", + "fogTable1b0", "fogTable1b4", "fogTable1b8", "fogTable1bc", + /* 0x1c0 */ + "fogTable1c0", "fogTable1c4", "fogTable1c8", "fogTable1cc", + "fogTable1d0", "fogTable1d4", "fogTable1d8", "fogTable1dc", + "reserved1e0", "reserved1e4", "reserved1e8", "colBufferAddr", + "colBufferStride","auxBufferAddr","auxBufferStride","reserved1fc", + /* 0x200 */ + "clipLeftRight1","clipTopBottom1","reserved208","reserved20c", + "reserved210", "reserved214", "reserved218", "reserved21c", + "reserved220", "reserved224", "reserved228", "reserved22c", + "reserved230", "reserved234", "reserved238", "reserved23c", + /* 0x240 */ + "reserved240", "reserved244", "reserved248", "swapPending", + "leftOverlayBuf","rightOverlayBuf","fbiSwapHistory","fbiTrianglesOut", + "sSetupMode", "sVx", "sVy", "sARGB", + "sRed", "sGreen", "sBlue", "sAlpha", + /* 0x280 */ + "sVz", "sWb", "sWtmu0", "sS/Wtmu0", + "sT/Wtmu0", "sWtmu1", "sS/Wtmu1", "sT/Wtmu1", + "sDrawTriCMD", "sBeginTriCMD", "reserved2a8", "reserved2ac", + "reserved2b0", "reserved2b4", "reserved2b8", "reserved2bc", + /* 0x2c0 */ + "reserved2c0", "reserved2c4", "reserved2c8", "reserved2cc", + "reserved2d0", "reserved2d4", "reserved2d8", "reserved2dc", + "reserved2e0", "reserved2e4", "reserved2e8", "reserved2ec", + "reserved2f0", "reserved2f4", "reserved2f8", "reserved2fc", + /* 0x300 */ + "textureMode", "tLOD", "tDetail", "texBaseAddr", + "texBaseAddr_1","texBaseAddr_2","texBaseAddr_3_8","reserved31c", + "trexInit1", "nccTable0.0", "nccTable0.1", "nccTable0.2", + "nccTable0.3", "nccTable0.4", "nccTable0.5", "nccTable0.6", + /* 0x340 */ + "nccTable0.7", "nccTable0.8", "nccTable0.9", "nccTable0.A", + "nccTable0.B", "nccTable1.0", "nccTable1.1", "nccTable1.2", + "nccTable1.3", "nccTable1.4", "nccTable1.5", "nccTable1.6", + "nccTable1.7", "nccTable1.8", "nccTable1.9", "nccTable1.A", + /* 0x380 */ + "nccTable1.B" +}; + + + +/************************************* + * + * Voodoo Banshee I/O space registers + * + *************************************/ + +/* 0x000 */ +#define io_status (0x000/4) /* */ +#define io_pciInit0 (0x004/4) /* */ +#define io_sipMonitor (0x008/4) /* */ +#define io_lfbMemoryConfig (0x00c/4) /* */ +#define io_miscInit0 (0x010/4) /* */ +#define io_miscInit1 (0x014/4) /* */ +#define io_dramInit0 (0x018/4) /* */ +#define io_dramInit1 (0x01c/4) /* */ +#define io_agpInit (0x020/4) /* */ +#define io_tmuGbeInit (0x024/4) /* */ +#define io_vgaInit0 (0x028/4) /* */ +#define io_vgaInit1 (0x02c/4) /* */ +#define io_dramCommand (0x030/4) /* */ +#define io_dramData (0x034/4) /* */ + +/* 0x040 */ +#define io_pllCtrl0 (0x040/4) /* */ +#define io_pllCtrl1 (0x044/4) /* */ +#define io_pllCtrl2 (0x048/4) /* */ +#define io_dacMode (0x04c/4) /* */ +#define io_dacAddr (0x050/4) /* */ +#define io_dacData (0x054/4) /* */ +#define io_rgbMaxDelta (0x058/4) /* */ +#define io_vidProcCfg (0x05c/4) /* */ +#define io_hwCurPatAddr (0x060/4) /* */ +#define io_hwCurLoc (0x064/4) /* */ +#define io_hwCurC0 (0x068/4) /* */ +#define io_hwCurC1 (0x06c/4) /* */ +#define io_vidInFormat (0x070/4) /* */ +#define io_vidInStatus (0x074/4) /* */ +#define io_vidSerialParallelPort (0x078/4) /* */ +#define io_vidInXDecimDeltas (0x07c/4) /* */ + +/* 0x080 */ +#define io_vidInDecimInitErrs (0x080/4) /* */ +#define io_vidInYDecimDeltas (0x084/4) /* */ +#define io_vidPixelBufThold (0x088/4) /* */ +#define io_vidChromaMin (0x08c/4) /* */ +#define io_vidChromaMax (0x090/4) /* */ +#define io_vidCurrentLine (0x094/4) /* */ +#define io_vidScreenSize (0x098/4) /* */ +#define io_vidOverlayStartCoords (0x09c/4) /* */ +#define io_vidOverlayEndScreenCoord (0x0a0/4) /* */ +#define io_vidOverlayDudx (0x0a4/4) /* */ +#define io_vidOverlayDudxOffsetSrcWidth (0x0a8/4) /* */ +#define io_vidOverlayDvdy (0x0ac/4) /* */ +#define io_vgab0 (0x0b0/4) /* */ +#define io_vgab4 (0x0b4/4) /* */ +#define io_vgab8 (0x0b8/4) /* */ +#define io_vgabc (0x0bc/4) /* */ + +/* 0x0c0 */ +#define io_vgac0 (0x0c0/4) /* */ +#define io_vgac4 (0x0c4/4) /* */ +#define io_vgac8 (0x0c8/4) /* */ +#define io_vgacc (0x0cc/4) /* */ +#define io_vgad0 (0x0d0/4) /* */ +#define io_vgad4 (0x0d4/4) /* */ +#define io_vgad8 (0x0d8/4) /* */ +#define io_vgadc (0x0dc/4) /* */ +#define io_vidOverlayDvdyOffset (0x0e0/4) /* */ +#define io_vidDesktopStartAddr (0x0e4/4) /* */ +#define io_vidDesktopOverlayStride (0x0e8/4) /* */ +#define io_vidInAddr0 (0x0ec/4) /* */ +#define io_vidInAddr1 (0x0f0/4) /* */ +#define io_vidInAddr2 (0x0f4/4) /* */ +#define io_vidInStride (0x0f8/4) /* */ +#define io_vidCurrOverlayStartAddr (0x0fc/4) /* */ + + + +/************************************* + * + * Register string table for debug + * + *************************************/ + +static const char *const banshee_io_reg_name[] = +{ + /* 0x000 */ + "status", "pciInit0", "sipMonitor", "lfbMemoryConfig", + "miscInit0", "miscInit1", "dramInit0", "dramInit1", + "agpInit", "tmuGbeInit", "vgaInit0", "vgaInit1", + "dramCommand", "dramData", "reserved38", "reserved3c", + + /* 0x040 */ + "pllCtrl0", "pllCtrl1", "pllCtrl2", "dacMode", + "dacAddr", "dacData", "rgbMaxDelta", "vidProcCfg", + "hwCurPatAddr", "hwCurLoc", "hwCurC0", "hwCurC1", + "vidInFormat", "vidInStatus", "vidSerialParallelPort","vidInXDecimDeltas", + + /* 0x080 */ + "vidInDecimInitErrs","vidInYDecimDeltas","vidPixelBufThold","vidChromaMin", + "vidChromaMax", "vidCurrentLine","vidScreenSize","vidOverlayStartCoords", + "vidOverlayEndScreenCoord","vidOverlayDudx","vidOverlayDudxOffsetSrcWidth","vidOverlayDvdy", + "vga[b0]", "vga[b4]", "vga[b8]", "vga[bc]", + + /* 0x0c0 */ + "vga[c0]", "vga[c4]", "vga[c8]", "vga[cc]", + "vga[d0]", "vga[d4]", "vga[d8]", "vga[dc]", + "vidOverlayDvdyOffset","vidDesktopStartAddr","vidDesktopOverlayStride","vidInAddr0", + "vidInAddr1", "vidInAddr2", "vidInStride", "vidCurrOverlayStartAddr" +}; + + + +/************************************* + * + * Voodoo Banshee AGP space registers + * + *************************************/ + +/* 0x000 */ +#define agpReqSize (0x000/4) /* */ +#define agpHostAddressLow (0x004/4) /* */ +#define agpHostAddressHigh (0x008/4) /* */ +#define agpGraphicsAddress (0x00c/4) /* */ +#define agpGraphicsStride (0x010/4) /* */ +#define agpMoveCMD (0x014/4) /* */ +#define cmdBaseAddr0 (0x020/4) /* */ +#define cmdBaseSize0 (0x024/4) /* */ +#define cmdBump0 (0x028/4) /* */ +#define cmdRdPtrL0 (0x02c/4) /* */ +#define cmdRdPtrH0 (0x030/4) /* */ +#define cmdAMin0 (0x034/4) /* */ +#define cmdAMax0 (0x03c/4) /* */ + +/* 0x040 */ +#define cmdFifoDepth0 (0x044/4) /* */ +#define cmdHoleCnt0 (0x048/4) /* */ +#define cmdBaseAddr1 (0x050/4) /* */ +#define cmdBaseSize1 (0x054/4) /* */ +#define cmdBump1 (0x058/4) /* */ +#define cmdRdPtrL1 (0x05c/4) /* */ +#define cmdRdPtrH1 (0x060/4) /* */ +#define cmdAMin1 (0x064/4) /* */ +#define cmdAMax1 (0x06c/4) /* */ +#define cmdFifoDepth1 (0x074/4) /* */ +#define cmdHoleCnt1 (0x078/4) /* */ + +/* 0x080 */ +#define cmdFifoThresh (0x080/4) /* */ +#define cmdHoleInt (0x084/4) /* */ + +/* 0x100 */ +#define yuvBaseAddress (0x100/4) /* */ +#define yuvStride (0x104/4) /* */ +#define crc1 (0x120/4) /* */ +#define crc2 (0x130/4) /* */ + + + +/************************************* + * + * Register string table for debug + * + *************************************/ + +static const char *const banshee_agp_reg_name[] = +{ + /* 0x000 */ + "agpReqSize", "agpHostAddressLow","agpHostAddressHigh","agpGraphicsAddress", + "agpGraphicsStride","agpMoveCMD","reserved18", "reserved1c", + "cmdBaseAddr0", "cmdBaseSize0", "cmdBump0", "cmdRdPtrL0", + "cmdRdPtrH0", "cmdAMin0", "reserved38", "cmdAMax0", + + /* 0x040 */ + "reserved40", "cmdFifoDepth0","cmdHoleCnt0", "reserved4c", + "cmdBaseAddr1", "cmdBaseSize1", "cmdBump1", "cmdRdPtrL1", + "cmdRdPtrH1", "cmdAMin1", "reserved68", "cmdAMax1", + "reserved70", "cmdFifoDepth1","cmdHoleCnt1", "reserved7c", + + /* 0x080 */ + "cmdFifoThresh","cmdHoleInt", "reserved88", "reserved8c", + "reserved90", "reserved94", "reserved98", "reserved9c", + "reserveda0", "reserveda4", "reserveda8", "reservedac", + "reservedb0", "reservedb4", "reservedb8", "reservedbc", + + /* 0x0c0 */ + "reservedc0", "reservedc4", "reservedc8", "reservedcc", + "reservedd0", "reservedd4", "reservedd8", "reserveddc", + "reservede0", "reservede4", "reservede8", "reservedec", + "reservedf0", "reservedf4", "reservedf8", "reservedfc", + + /* 0x100 */ + "yuvBaseAddress","yuvStride", "reserved108", "reserved10c", + "reserved110", "reserved114", "reserved118", "reserved11c", + "crc1", "reserved124", "reserved128", "reserved12c", + "crc2", "reserved134", "reserved138", "reserved13c" +}; + + + +/************************************* + * + * Dithering tables + * + *************************************/ + +static const UINT8 dither_matrix_4x4[16] = +{ + 0, 8, 2, 10, + 12, 4, 14, 6, + 3, 11, 1, 9, + 15, 7, 13, 5 +}; + +static const UINT8 dither_matrix_2x2[16] = +{ + 2, 10, 2, 10, + 14, 6, 14, 6, + 2, 10, 2, 10, + 14, 6, 14, 6 +}; + + + +/************************************* + * + * Macros for extracting pixels + * + *************************************/ + +#define EXTRACT_565_TO_888(val, a, b, c) \ + (a) = (((val) >> 8) & 0xf8) | (((val) >> 13) & 0x07); \ + (b) = (((val) >> 3) & 0xfc) | (((val) >> 9) & 0x03); \ + (c) = (((val) << 3) & 0xf8) | (((val) >> 2) & 0x07); +#define EXTRACT_x555_TO_888(val, a, b, c) \ + (a) = (((val) >> 7) & 0xf8) | (((val) >> 12) & 0x07); \ + (b) = (((val) >> 2) & 0xf8) | (((val) >> 7) & 0x07); \ + (c) = (((val) << 3) & 0xf8) | (((val) >> 2) & 0x07); +#define EXTRACT_555x_TO_888(val, a, b, c) \ + (a) = (((val) >> 8) & 0xf8) | (((val) >> 13) & 0x07); \ + (b) = (((val) >> 3) & 0xf8) | (((val) >> 8) & 0x07); \ + (c) = (((val) << 2) & 0xf8) | (((val) >> 3) & 0x07); +#define EXTRACT_1555_TO_8888(val, a, b, c, d) \ + (a) = ((INT16)(val) >> 15) & 0xff; \ + EXTRACT_x555_TO_888(val, b, c, d) +#define EXTRACT_5551_TO_8888(val, a, b, c, d) \ + EXTRACT_555x_TO_888(val, a, b, c) \ + (d) = ((val) & 0x0001) ? 0xff : 0x00; +#define EXTRACT_x888_TO_888(val, a, b, c) \ + (a) = ((val) >> 16) & 0xff; \ + (b) = ((val) >> 8) & 0xff; \ + (c) = ((val) >> 0) & 0xff; +#define EXTRACT_888x_TO_888(val, a, b, c) \ + (a) = ((val) >> 24) & 0xff; \ + (b) = ((val) >> 16) & 0xff; \ + (c) = ((val) >> 8) & 0xff; +#define EXTRACT_8888_TO_8888(val, a, b, c, d) \ + (a) = ((val) >> 24) & 0xff; \ + (b) = ((val) >> 16) & 0xff; \ + (c) = ((val) >> 8) & 0xff; \ + (d) = ((val) >> 0) & 0xff; +#define EXTRACT_4444_TO_8888(val, a, b, c, d) \ + (a) = (((val) >> 8) & 0xf0) | (((val) >> 12) & 0x0f); \ + (b) = (((val) >> 4) & 0xf0) | (((val) >> 8) & 0x0f); \ + (c) = (((val) >> 0) & 0xf0) | (((val) >> 4) & 0x0f); \ + (d) = (((val) << 4) & 0xf0) | (((val) >> 0) & 0x0f); +#define EXTRACT_332_TO_888(val, a, b, c) \ + (a) = (((val) >> 0) & 0xe0) | (((val) >> 3) & 0x1c) | (((val) >> 6) & 0x03); \ + (b) = (((val) << 3) & 0xe0) | (((val) >> 0) & 0x1c) | (((val) >> 3) & 0x03); \ + (c) = (((val) << 6) & 0xc0) | (((val) << 4) & 0x30) | (((val) << 2) & 0x0c) | (((val) << 0) & 0x03); + + +/************************************* + * + * Misc. macros + * + *************************************/ + +/* macro for clamping a value between minimum and maximum values */ +#define CLAMP(val,min,max) do { if ((val) < (min)) { (val) = (min); } else if ((val) > (max)) { (val) = (max); } } while (0) + +/* macro to compute the base 2 log for LOD calculations */ +#define LOGB2(x) (log((double)(x)) / log(2.0)) + + + +/************************************* + * + * Macros for extracting bitfields + * + *************************************/ + +#define INITEN_ENABLE_HW_INIT(val) (((val) >> 0) & 1) +#define INITEN_ENABLE_PCI_FIFO(val) (((val) >> 1) & 1) +#define INITEN_REMAP_INIT_TO_DAC(val) (((val) >> 2) & 1) +#define INITEN_ENABLE_SNOOP0(val) (((val) >> 4) & 1) +#define INITEN_SNOOP0_MEMORY_MATCH(val) (((val) >> 5) & 1) +#define INITEN_SNOOP0_READWRITE_MATCH(val) (((val) >> 6) & 1) +#define INITEN_ENABLE_SNOOP1(val) (((val) >> 7) & 1) +#define INITEN_SNOOP1_MEMORY_MATCH(val) (((val) >> 8) & 1) +#define INITEN_SNOOP1_READWRITE_MATCH(val) (((val) >> 9) & 1) +#define INITEN_SLI_BUS_OWNER(val) (((val) >> 10) & 1) +#define INITEN_SLI_ODD_EVEN(val) (((val) >> 11) & 1) +#define INITEN_SECONDARY_REV_ID(val) (((val) >> 12) & 0xf) /* voodoo 2 only */ +#define INITEN_MFCTR_FAB_ID(val) (((val) >> 16) & 0xf) /* voodoo 2 only */ +#define INITEN_ENABLE_PCI_INTERRUPT(val) (((val) >> 20) & 1) /* voodoo 2 only */ +#define INITEN_PCI_INTERRUPT_TIMEOUT(val) (((val) >> 21) & 1) /* voodoo 2 only */ +#define INITEN_ENABLE_NAND_TREE_TEST(val) (((val) >> 22) & 1) /* voodoo 2 only */ +#define INITEN_ENABLE_SLI_ADDRESS_SNOOP(val) (((val) >> 23) & 1) /* voodoo 2 only */ +#define INITEN_SLI_SNOOP_ADDRESS(val) (((val) >> 24) & 0xff) /* voodoo 2 only */ + +#define FBZCP_CC_RGBSELECT(val) (((val) >> 0) & 3) +#define FBZCP_CC_ASELECT(val) (((val) >> 2) & 3) +#define FBZCP_CC_LOCALSELECT(val) (((val) >> 4) & 1) +#define FBZCP_CCA_LOCALSELECT(val) (((val) >> 5) & 3) +#define FBZCP_CC_LOCALSELECT_OVERRIDE(val) (((val) >> 7) & 1) +#define FBZCP_CC_ZERO_OTHER(val) (((val) >> 8) & 1) +#define FBZCP_CC_SUB_CLOCAL(val) (((val) >> 9) & 1) +#define FBZCP_CC_MSELECT(val) (((val) >> 10) & 7) +#define FBZCP_CC_REVERSE_BLEND(val) (((val) >> 13) & 1) +#define FBZCP_CC_ADD_ACLOCAL(val) (((val) >> 14) & 3) +#define FBZCP_CC_INVERT_OUTPUT(val) (((val) >> 16) & 1) +#define FBZCP_CCA_ZERO_OTHER(val) (((val) >> 17) & 1) +#define FBZCP_CCA_SUB_CLOCAL(val) (((val) >> 18) & 1) +#define FBZCP_CCA_MSELECT(val) (((val) >> 19) & 7) +#define FBZCP_CCA_REVERSE_BLEND(val) (((val) >> 22) & 1) +#define FBZCP_CCA_ADD_ACLOCAL(val) (((val) >> 23) & 3) +#define FBZCP_CCA_INVERT_OUTPUT(val) (((val) >> 25) & 1) +#define FBZCP_CCA_SUBPIXEL_ADJUST(val) (((val) >> 26) & 1) +#define FBZCP_TEXTURE_ENABLE(val) (((val) >> 27) & 1) +#define FBZCP_RGBZW_CLAMP(val) (((val) >> 28) & 1) /* voodoo 2 only */ +#define FBZCP_ANTI_ALIAS(val) (((val) >> 29) & 1) /* voodoo 2 only */ + +#define ALPHAMODE_ALPHATEST(val) (((val) >> 0) & 1) +#define ALPHAMODE_ALPHAFUNCTION(val) (((val) >> 1) & 7) +#define ALPHAMODE_ALPHABLEND(val) (((val) >> 4) & 1) +#define ALPHAMODE_ANTIALIAS(val) (((val) >> 5) & 1) +#define ALPHAMODE_SRCRGBBLEND(val) (((val) >> 8) & 15) +#define ALPHAMODE_DSTRGBBLEND(val) (((val) >> 12) & 15) +#define ALPHAMODE_SRCALPHABLEND(val) (((val) >> 16) & 15) +#define ALPHAMODE_DSTALPHABLEND(val) (((val) >> 20) & 15) +#define ALPHAMODE_ALPHAREF(val) (((val) >> 24) & 0xff) + +#define FOGMODE_ENABLE_FOG(val) (((val) >> 0) & 1) +#define FOGMODE_FOG_ADD(val) (((val) >> 1) & 1) +#define FOGMODE_FOG_MULT(val) (((val) >> 2) & 1) +#define FOGMODE_FOG_ZALPHA(val) (((val) >> 3) & 3) +#define FOGMODE_FOG_CONSTANT(val) (((val) >> 5) & 1) +#define FOGMODE_FOG_DITHER(val) (((val) >> 6) & 1) /* voodoo 2 only */ +#define FOGMODE_FOG_ZONES(val) (((val) >> 7) & 1) /* voodoo 2 only */ + +#define FBZMODE_ENABLE_CLIPPING(val) (((val) >> 0) & 1) +#define FBZMODE_ENABLE_CHROMAKEY(val) (((val) >> 1) & 1) +#define FBZMODE_ENABLE_STIPPLE(val) (((val) >> 2) & 1) +#define FBZMODE_WBUFFER_SELECT(val) (((val) >> 3) & 1) +#define FBZMODE_ENABLE_DEPTHBUF(val) (((val) >> 4) & 1) +#define FBZMODE_DEPTH_FUNCTION(val) (((val) >> 5) & 7) +#define FBZMODE_ENABLE_DITHERING(val) (((val) >> 8) & 1) +#define FBZMODE_RGB_BUFFER_MASK(val) (((val) >> 9) & 1) +#define FBZMODE_AUX_BUFFER_MASK(val) (((val) >> 10) & 1) +#define FBZMODE_DITHER_TYPE(val) (((val) >> 11) & 1) +#define FBZMODE_STIPPLE_PATTERN(val) (((val) >> 12) & 1) +#define FBZMODE_ENABLE_ALPHA_MASK(val) (((val) >> 13) & 1) +#define FBZMODE_DRAW_BUFFER(val) (((val) >> 14) & 3) +#define FBZMODE_ENABLE_DEPTH_BIAS(val) (((val) >> 16) & 1) +#define FBZMODE_Y_ORIGIN(val) (((val) >> 17) & 1) +#define FBZMODE_ENABLE_ALPHA_PLANES(val) (((val) >> 18) & 1) +#define FBZMODE_ALPHA_DITHER_SUBTRACT(val) (((val) >> 19) & 1) +#define FBZMODE_DEPTH_SOURCE_COMPARE(val) (((val) >> 20) & 1) +#define FBZMODE_DEPTH_FLOAT_SELECT(val) (((val) >> 21) & 1) /* voodoo 2 only */ + +#define LFBMODE_WRITE_FORMAT(val) (((val) >> 0) & 0xf) +#define LFBMODE_WRITE_BUFFER_SELECT(val) (((val) >> 4) & 3) +#define LFBMODE_READ_BUFFER_SELECT(val) (((val) >> 6) & 3) +#define LFBMODE_ENABLE_PIXEL_PIPELINE(val) (((val) >> 8) & 1) +#define LFBMODE_RGBA_LANES(val) (((val) >> 9) & 3) +#define LFBMODE_WORD_SWAP_WRITES(val) (((val) >> 11) & 1) +#define LFBMODE_BYTE_SWIZZLE_WRITES(val) (((val) >> 12) & 1) +#define LFBMODE_Y_ORIGIN(val) (((val) >> 13) & 1) +#define LFBMODE_WRITE_W_SELECT(val) (((val) >> 14) & 1) +#define LFBMODE_WORD_SWAP_READS(val) (((val) >> 15) & 1) +#define LFBMODE_BYTE_SWIZZLE_READS(val) (((val) >> 16) & 1) + +#define CHROMARANGE_BLUE_EXCLUSIVE(val) (((val) >> 24) & 1) +#define CHROMARANGE_GREEN_EXCLUSIVE(val) (((val) >> 25) & 1) +#define CHROMARANGE_RED_EXCLUSIVE(val) (((val) >> 26) & 1) +#define CHROMARANGE_UNION_MODE(val) (((val) >> 27) & 1) +#define CHROMARANGE_ENABLE(val) (((val) >> 28) & 1) + +#define FBIINIT0_VGA_PASSTHRU(val) (((val) >> 0) & 1) +#define FBIINIT0_GRAPHICS_RESET(val) (((val) >> 1) & 1) +#define FBIINIT0_FIFO_RESET(val) (((val) >> 2) & 1) +#define FBIINIT0_SWIZZLE_REG_WRITES(val) (((val) >> 3) & 1) +#define FBIINIT0_STALL_PCIE_FOR_HWM(val) (((val) >> 4) & 1) +#define FBIINIT0_PCI_FIFO_LWM(val) (((val) >> 6) & 0x1f) +#define FBIINIT0_LFB_TO_MEMORY_FIFO(val) (((val) >> 11) & 1) +#define FBIINIT0_TEXMEM_TO_MEMORY_FIFO(val) (((val) >> 12) & 1) +#define FBIINIT0_ENABLE_MEMORY_FIFO(val) (((val) >> 13) & 1) +#define FBIINIT0_MEMORY_FIFO_HWM(val) (((val) >> 14) & 0x7ff) +#define FBIINIT0_MEMORY_FIFO_BURST(val) (((val) >> 25) & 0x3f) + +#define FBIINIT1_PCI_DEV_FUNCTION(val) (((val) >> 0) & 1) +#define FBIINIT1_PCI_WRITE_WAIT_STATES(val) (((val) >> 1) & 1) +#define FBIINIT1_MULTI_SST1(val) (((val) >> 2) & 1) /* not on voodoo 2 */ +#define FBIINIT1_ENABLE_LFB(val) (((val) >> 3) & 1) +#define FBIINIT1_X_VIDEO_TILES(val) (((val) >> 4) & 0xf) +#define FBIINIT1_VIDEO_TIMING_RESET(val) (((val) >> 8) & 1) +#define FBIINIT1_SOFTWARE_OVERRIDE(val) (((val) >> 9) & 1) +#define FBIINIT1_SOFTWARE_HSYNC(val) (((val) >> 10) & 1) +#define FBIINIT1_SOFTWARE_VSYNC(val) (((val) >> 11) & 1) +#define FBIINIT1_SOFTWARE_BLANK(val) (((val) >> 12) & 1) +#define FBIINIT1_DRIVE_VIDEO_TIMING(val) (((val) >> 13) & 1) +#define FBIINIT1_DRIVE_VIDEO_BLANK(val) (((val) >> 14) & 1) +#define FBIINIT1_DRIVE_VIDEO_SYNC(val) (((val) >> 15) & 1) +#define FBIINIT1_DRIVE_VIDEO_DCLK(val) (((val) >> 16) & 1) +#define FBIINIT1_VIDEO_TIMING_VCLK(val) (((val) >> 17) & 1) +#define FBIINIT1_VIDEO_CLK_2X_DELAY(val) (((val) >> 18) & 3) +#define FBIINIT1_VIDEO_TIMING_SOURCE(val) (((val) >> 20) & 3) +#define FBIINIT1_ENABLE_24BPP_OUTPUT(val) (((val) >> 22) & 1) +#define FBIINIT1_ENABLE_SLI(val) (((val) >> 23) & 1) +#define FBIINIT1_X_VIDEO_TILES_BIT5(val) (((val) >> 24) & 1) /* voodoo 2 only */ +#define FBIINIT1_ENABLE_EDGE_FILTER(val) (((val) >> 25) & 1) +#define FBIINIT1_INVERT_VID_CLK_2X(val) (((val) >> 26) & 1) +#define FBIINIT1_VID_CLK_2X_SEL_DELAY(val) (((val) >> 27) & 3) +#define FBIINIT1_VID_CLK_DELAY(val) (((val) >> 29) & 3) +#define FBIINIT1_DISABLE_FAST_READAHEAD(val) (((val) >> 31) & 1) + +#define FBIINIT2_DISABLE_DITHER_SUB(val) (((val) >> 0) & 1) +#define FBIINIT2_DRAM_BANKING(val) (((val) >> 1) & 1) +#define FBIINIT2_ENABLE_TRIPLE_BUF(val) (((val) >> 4) & 1) +#define FBIINIT2_ENABLE_FAST_RAS_READ(val) (((val) >> 5) & 1) +#define FBIINIT2_ENABLE_GEN_DRAM_OE(val) (((val) >> 6) & 1) +#define FBIINIT2_ENABLE_FAST_READWRITE(val) (((val) >> 7) & 1) +#define FBIINIT2_ENABLE_PASSTHRU_DITHER(val) (((val) >> 8) & 1) +#define FBIINIT2_SWAP_BUFFER_ALGORITHM(val) (((val) >> 9) & 3) +#define FBIINIT2_VIDEO_BUFFER_OFFSET(val) (((val) >> 11) & 0x1ff) +#define FBIINIT2_ENABLE_DRAM_BANKING(val) (((val) >> 20) & 1) +#define FBIINIT2_ENABLE_DRAM_READ_FIFO(val) (((val) >> 21) & 1) +#define FBIINIT2_ENABLE_DRAM_REFRESH(val) (((val) >> 22) & 1) +#define FBIINIT2_REFRESH_LOAD_VALUE(val) (((val) >> 23) & 0x1ff) + +#define FBIINIT3_TRI_REGISTER_REMAP(val) (((val) >> 0) & 1) +#define FBIINIT3_VIDEO_FIFO_THRESH(val) (((val) >> 1) & 0x1f) +#define FBIINIT3_DISABLE_TMUS(val) (((val) >> 6) & 1) +#define FBIINIT3_FBI_MEMORY_TYPE(val) (((val) >> 8) & 7) +#define FBIINIT3_VGA_PASS_RESET_VAL(val) (((val) >> 11) & 1) +#define FBIINIT3_HARDCODE_PCI_BASE(val) (((val) >> 12) & 1) +#define FBIINIT3_FBI2TREX_DELAY(val) (((val) >> 13) & 0xf) +#define FBIINIT3_TREX2FBI_DELAY(val) (((val) >> 17) & 0x1f) +#define FBIINIT3_YORIGIN_SUBTRACT(val) (((val) >> 22) & 0x3ff) + +#define FBIINIT4_PCI_READ_WAITS(val) (((val) >> 0) & 1) +#define FBIINIT4_ENABLE_LFB_READAHEAD(val) (((val) >> 1) & 1) +#define FBIINIT4_MEMORY_FIFO_LWM(val) (((val) >> 2) & 0x3f) +#define FBIINIT4_MEMORY_FIFO_START_ROW(val) (((val) >> 8) & 0x3ff) +#define FBIINIT4_MEMORY_FIFO_STOP_ROW(val) (((val) >> 18) & 0x3ff) +#define FBIINIT4_VIDEO_CLOCKING_DELAY(val) (((val) >> 29) & 7) /* voodoo 2 only */ + +#define FBIINIT5_DISABLE_PCI_STOP(val) (((val) >> 0) & 1) /* voodoo 2 only */ +#define FBIINIT5_PCI_SLAVE_SPEED(val) (((val) >> 1) & 1) /* voodoo 2 only */ +#define FBIINIT5_DAC_DATA_OUTPUT_WIDTH(val) (((val) >> 2) & 1) /* voodoo 2 only */ +#define FBIINIT5_DAC_DATA_17_OUTPUT(val) (((val) >> 3) & 1) /* voodoo 2 only */ +#define FBIINIT5_DAC_DATA_18_OUTPUT(val) (((val) >> 4) & 1) /* voodoo 2 only */ +#define FBIINIT5_GENERIC_STRAPPING(val) (((val) >> 5) & 0xf) /* voodoo 2 only */ +#define FBIINIT5_BUFFER_ALLOCATION(val) (((val) >> 9) & 3) /* voodoo 2 only */ +#define FBIINIT5_DRIVE_VID_CLK_SLAVE(val) (((val) >> 11) & 1) /* voodoo 2 only */ +#define FBIINIT5_DRIVE_DAC_DATA_16(val) (((val) >> 12) & 1) /* voodoo 2 only */ +#define FBIINIT5_VCLK_INPUT_SELECT(val) (((val) >> 13) & 1) /* voodoo 2 only */ +#define FBIINIT5_MULTI_CVG_DETECT(val) (((val) >> 14) & 1) /* voodoo 2 only */ +#define FBIINIT5_SYNC_RETRACE_READS(val) (((val) >> 15) & 1) /* voodoo 2 only */ +#define FBIINIT5_ENABLE_RHBORDER_COLOR(val) (((val) >> 16) & 1) /* voodoo 2 only */ +#define FBIINIT5_ENABLE_LHBORDER_COLOR(val) (((val) >> 17) & 1) /* voodoo 2 only */ +#define FBIINIT5_ENABLE_BVBORDER_COLOR(val) (((val) >> 18) & 1) /* voodoo 2 only */ +#define FBIINIT5_ENABLE_TVBORDER_COLOR(val) (((val) >> 19) & 1) /* voodoo 2 only */ +#define FBIINIT5_DOUBLE_HORIZ(val) (((val) >> 20) & 1) /* voodoo 2 only */ +#define FBIINIT5_DOUBLE_VERT(val) (((val) >> 21) & 1) /* voodoo 2 only */ +#define FBIINIT5_ENABLE_16BIT_GAMMA(val) (((val) >> 22) & 1) /* voodoo 2 only */ +#define FBIINIT5_INVERT_DAC_HSYNC(val) (((val) >> 23) & 1) /* voodoo 2 only */ +#define FBIINIT5_INVERT_DAC_VSYNC(val) (((val) >> 24) & 1) /* voodoo 2 only */ +#define FBIINIT5_ENABLE_24BIT_DACDATA(val) (((val) >> 25) & 1) /* voodoo 2 only */ +#define FBIINIT5_ENABLE_INTERLACING(val) (((val) >> 26) & 1) /* voodoo 2 only */ +#define FBIINIT5_DAC_DATA_18_CONTROL(val) (((val) >> 27) & 1) /* voodoo 2 only */ +#define FBIINIT5_RASTERIZER_UNIT_MODE(val) (((val) >> 30) & 3) /* voodoo 2 only */ + +#define FBIINIT6_WINDOW_ACTIVE_COUNTER(val) (((val) >> 0) & 7) /* voodoo 2 only */ +#define FBIINIT6_WINDOW_DRAG_COUNTER(val) (((val) >> 3) & 0x1f) /* voodoo 2 only */ +#define FBIINIT6_SLI_SYNC_MASTER(val) (((val) >> 8) & 1) /* voodoo 2 only */ +#define FBIINIT6_DAC_DATA_22_OUTPUT(val) (((val) >> 9) & 3) /* voodoo 2 only */ +#define FBIINIT6_DAC_DATA_23_OUTPUT(val) (((val) >> 11) & 3) /* voodoo 2 only */ +#define FBIINIT6_SLI_SYNCIN_OUTPUT(val) (((val) >> 13) & 3) /* voodoo 2 only */ +#define FBIINIT6_SLI_SYNCOUT_OUTPUT(val) (((val) >> 15) & 3) /* voodoo 2 only */ +#define FBIINIT6_DAC_RD_OUTPUT(val) (((val) >> 17) & 3) /* voodoo 2 only */ +#define FBIINIT6_DAC_WR_OUTPUT(val) (((val) >> 19) & 3) /* voodoo 2 only */ +#define FBIINIT6_PCI_FIFO_LWM_RDY(val) (((val) >> 21) & 0x7f) /* voodoo 2 only */ +#define FBIINIT6_VGA_PASS_N_OUTPUT(val) (((val) >> 28) & 3) /* voodoo 2 only */ +#define FBIINIT6_X_VIDEO_TILES_BIT0(val) (((val) >> 30) & 1) /* voodoo 2 only */ + +#define FBIINIT7_GENERIC_STRAPPING(val) (((val) >> 0) & 0xff) /* voodoo 2 only */ +#define FBIINIT7_CMDFIFO_ENABLE(val) (((val) >> 8) & 1) /* voodoo 2 only */ +#define FBIINIT7_CMDFIFO_MEMORY_STORE(val) (((val) >> 9) & 1) /* voodoo 2 only */ +#define FBIINIT7_DISABLE_CMDFIFO_HOLES(val) (((val) >> 10) & 1) /* voodoo 2 only */ +#define FBIINIT7_CMDFIFO_READ_THRESH(val) (((val) >> 11) & 0x1f) /* voodoo 2 only */ +#define FBIINIT7_SYNC_CMDFIFO_WRITES(val) (((val) >> 16) & 1) /* voodoo 2 only */ +#define FBIINIT7_SYNC_CMDFIFO_READS(val) (((val) >> 17) & 1) /* voodoo 2 only */ +#define FBIINIT7_RESET_PCI_PACKER(val) (((val) >> 18) & 1) /* voodoo 2 only */ +#define FBIINIT7_ENABLE_CHROMA_STUFF(val) (((val) >> 19) & 1) /* voodoo 2 only */ +#define FBIINIT7_CMDFIFO_PCI_TIMEOUT(val) (((val) >> 20) & 0x7f) /* voodoo 2 only */ +#define FBIINIT7_ENABLE_TEXTURE_BURST(val) (((val) >> 27) & 1) /* voodoo 2 only */ + +#define TEXMODE_ENABLE_PERSPECTIVE(val) (((val) >> 0) & 1) +#define TEXMODE_MINIFICATION_FILTER(val) (((val) >> 1) & 1) +#define TEXMODE_MAGNIFICATION_FILTER(val) (((val) >> 2) & 1) +#define TEXMODE_CLAMP_NEG_W(val) (((val) >> 3) & 1) +#define TEXMODE_ENABLE_LOD_DITHER(val) (((val) >> 4) & 1) +#define TEXMODE_NCC_TABLE_SELECT(val) (((val) >> 5) & 1) +#define TEXMODE_CLAMP_S(val) (((val) >> 6) & 1) +#define TEXMODE_CLAMP_T(val) (((val) >> 7) & 1) +#define TEXMODE_FORMAT(val) (((val) >> 8) & 0xf) +#define TEXMODE_TC_ZERO_OTHER(val) (((val) >> 12) & 1) +#define TEXMODE_TC_SUB_CLOCAL(val) (((val) >> 13) & 1) +#define TEXMODE_TC_MSELECT(val) (((val) >> 14) & 7) +#define TEXMODE_TC_REVERSE_BLEND(val) (((val) >> 17) & 1) +#define TEXMODE_TC_ADD_ACLOCAL(val) (((val) >> 18) & 3) +#define TEXMODE_TC_INVERT_OUTPUT(val) (((val) >> 20) & 1) +#define TEXMODE_TCA_ZERO_OTHER(val) (((val) >> 21) & 1) +#define TEXMODE_TCA_SUB_CLOCAL(val) (((val) >> 22) & 1) +#define TEXMODE_TCA_MSELECT(val) (((val) >> 23) & 7) +#define TEXMODE_TCA_REVERSE_BLEND(val) (((val) >> 26) & 1) +#define TEXMODE_TCA_ADD_ACLOCAL(val) (((val) >> 27) & 3) +#define TEXMODE_TCA_INVERT_OUTPUT(val) (((val) >> 29) & 1) +#define TEXMODE_TRILINEAR(val) (((val) >> 30) & 1) +#define TEXMODE_SEQ_8_DOWNLD(val) (((val) >> 31) & 1) + +#define TEXLOD_LODMIN(val) (((val) >> 0) & 0x3f) +#define TEXLOD_LODMAX(val) (((val) >> 6) & 0x3f) +#define TEXLOD_LODBIAS(val) (((val) >> 12) & 0x3f) +#define TEXLOD_LOD_ODD(val) (((val) >> 18) & 1) +#define TEXLOD_LOD_TSPLIT(val) (((val) >> 19) & 1) +#define TEXLOD_LOD_S_IS_WIDER(val) (((val) >> 20) & 1) +#define TEXLOD_LOD_ASPECT(val) (((val) >> 21) & 3) +#define TEXLOD_LOD_ZEROFRAC(val) (((val) >> 23) & 1) +#define TEXLOD_TMULTIBASEADDR(val) (((val) >> 24) & 1) +#define TEXLOD_TDATA_SWIZZLE(val) (((val) >> 25) & 1) +#define TEXLOD_TDATA_SWAP(val) (((val) >> 26) & 1) +#define TEXLOD_TDIRECT_WRITE(val) (((val) >> 27) & 1) /* Voodoo 2 only */ + +#define TEXDETAIL_DETAIL_MAX(val) (((val) >> 0) & 0xff) +#define TEXDETAIL_DETAIL_BIAS(val) (((val) >> 8) & 0x3f) +#define TEXDETAIL_DETAIL_SCALE(val) (((val) >> 14) & 7) +#define TEXDETAIL_RGB_MIN_FILTER(val) (((val) >> 17) & 1) /* Voodoo 2 only */ +#define TEXDETAIL_RGB_MAG_FILTER(val) (((val) >> 18) & 1) /* Voodoo 2 only */ +#define TEXDETAIL_ALPHA_MIN_FILTER(val) (((val) >> 19) & 1) /* Voodoo 2 only */ +#define TEXDETAIL_ALPHA_MAG_FILTER(val) (((val) >> 20) & 1) /* Voodoo 2 only */ +#define TEXDETAIL_SEPARATE_RGBA_FILTER(val) (((val) >> 21) & 1) /* Voodoo 2 only */ + +#define TREXINIT_SEND_TMU_CONFIG(val) (((val) >> 18) & 1) + + + +struct voodoo_state; +struct poly_extra_data; +class voodoo_device; + +struct rgba +{ +#ifdef LSB_FIRST + UINT8 b, g, r, a; +#else + UINT8 a, r, g, b; +#endif +}; + + +union voodoo_reg +{ + INT32 i; + UINT32 u; + float f; + rgba rgb; +}; + + + +struct voodoo_stats +{ + UINT8 lastkey; /* last key state */ + UINT8 display; /* display stats? */ + INT32 swaps; /* total swaps */ + INT32 stalls; /* total stalls */ + INT32 total_triangles; /* total triangles */ + INT32 total_pixels_in; /* total pixels in */ + INT32 total_pixels_out; /* total pixels out */ + INT32 total_chroma_fail; /* total chroma fail */ + INT32 total_zfunc_fail; /* total z func fail */ + INT32 total_afunc_fail; /* total a func fail */ + INT32 total_clipped; /* total clipped */ + INT32 total_stippled; /* total stippled */ + INT32 lfb_writes; /* LFB writes */ + INT32 lfb_reads; /* LFB reads */ + INT32 reg_writes; /* register writes */ + INT32 reg_reads; /* register reads */ + INT32 tex_writes; /* texture writes */ + INT32 texture_mode[16]; /* 16 different texture modes */ + UINT8 render_override; /* render override */ + char buffer[1024]; /* string */ +}; + + +/* note that this structure is an even 64 bytes long */ +struct stats_block +{ + INT32 pixels_in; /* pixels in statistic */ + INT32 pixels_out; /* pixels out statistic */ + INT32 chroma_fail; /* chroma test fail statistic */ + INT32 zfunc_fail; /* z function test fail statistic */ + INT32 afunc_fail; /* alpha function test fail statistic */ + INT32 clip_fail; /* clipping fail statistic */ + INT32 stipple_count; /* stipple statistic */ + INT32 filler[64/4 - 7]; /* pad this structure to 64 bytes */ +}; + + +struct fifo_state +{ + UINT32 * base; /* base of the FIFO */ + INT32 size; /* size of the FIFO */ + INT32 in; /* input pointer */ + INT32 out; /* output pointer */ +}; + + +struct cmdfifo_info +{ + UINT8 enable; /* enabled? */ + UINT8 count_holes; /* count holes? */ + UINT32 base; /* base address in framebuffer RAM */ + UINT32 end; /* end address in framebuffer RAM */ + UINT32 rdptr; /* current read pointer */ + UINT32 amin; /* minimum address */ + UINT32 amax; /* maximum address */ + UINT32 depth; /* current depth */ + UINT32 holes; /* number of holes */ +}; + + +struct pci_state +{ + fifo_state fifo; /* PCI FIFO */ + UINT32 init_enable; /* initEnable value */ + UINT8 stall_state; /* state of the system if we're stalled */ + UINT8 op_pending; /* true if an operation is pending */ + attotime op_end_time; /* time when the pending operation ends */ + emu_timer * continue_timer; /* timer to use to continue processing */ + UINT32 fifo_mem[64*2]; /* memory backing the PCI FIFO */ +}; + + +struct ncc_table +{ + UINT8 dirty; /* is the texel lookup dirty? */ + voodoo_reg * reg; /* pointer to our registers */ + INT32 ir[4], ig[4], ib[4]; /* I values for R,G,B */ + INT32 qr[4], qg[4], qb[4]; /* Q values for R,G,B */ + INT32 y[16]; /* Y values */ + rgb_t * palette; /* pointer to associated RGB palette */ + rgb_t * palettea; /* pointer to associated ARGB palette */ + rgb_t texel[256]; /* texel lookup */ +}; + + +struct tmu_state +{ + UINT8 * ram; /* pointer to our RAM */ + UINT32 mask; /* mask to apply to pointers */ + voodoo_reg * reg; /* pointer to our register base */ + UINT32 regdirty; /* true if the LOD/mode/base registers have changed */ + + UINT32 texaddr_mask; /* mask for texture address */ + UINT8 texaddr_shift; /* shift for texture address */ + + INT64 starts, startt; /* starting S,T (14.18) */ + INT64 startw; /* starting W (2.30) */ + INT64 dsdx, dtdx; /* delta S,T per X */ + INT64 dwdx; /* delta W per X */ + INT64 dsdy, dtdy; /* delta S,T per Y */ + INT64 dwdy; /* delta W per Y */ + + INT32 lodmin, lodmax; /* min, max LOD values */ + INT32 lodbias; /* LOD bias */ + UINT32 lodmask; /* mask of available LODs */ + UINT32 lodoffset[9]; /* offset of texture base for each LOD */ + INT32 detailmax; /* detail clamp */ + INT32 detailbias; /* detail bias */ + UINT8 detailscale; /* detail scale */ + + UINT32 wmask; /* mask for the current texture width */ + UINT32 hmask; /* mask for the current texture height */ + + UINT32 bilinear_mask; /* mask for bilinear resolution (0xf0 for V1, 0xff for V2) */ + + ncc_table ncc[2]; /* two NCC tables */ + + rgb_t * lookup; /* currently selected lookup */ + rgb_t * texel[16]; /* texel lookups for each format */ + + rgb_t palette[256]; /* palette lookup table */ + rgb_t palettea[256]; /* palette+alpha lookup table */ +}; + + +struct tmu_shared_state +{ + rgb_t rgb332[256]; /* RGB 3-3-2 lookup table */ + rgb_t alpha8[256]; /* alpha 8-bit lookup table */ + rgb_t int8[256]; /* intensity 8-bit lookup table */ + rgb_t ai44[256]; /* alpha, intensity 4-4 lookup table */ + + rgb_t rgb565[65536]; /* RGB 5-6-5 lookup table */ + rgb_t argb1555[65536]; /* ARGB 1-5-5-5 lookup table */ + rgb_t argb4444[65536]; /* ARGB 4-4-4-4 lookup table */ +}; + + +struct setup_vertex +{ + float x, y; /* X, Y coordinates */ + float a, r, g, b; /* A, R, G, B values */ + float z, wb; /* Z and broadcast W values */ + float w0, s0, t0; /* W, S, T for TMU 0 */ + float w1, s1, t1; /* W, S, T for TMU 1 */ +}; + + +struct fbi_state +{ + UINT8 * ram; /* pointer to frame buffer RAM */ + UINT32 mask; /* mask to apply to pointers */ + UINT32 rgboffs[3]; /* word offset to 3 RGB buffers */ + UINT32 auxoffs; /* word offset to 1 aux buffer */ + + UINT8 frontbuf; /* front buffer index */ + UINT8 backbuf; /* back buffer index */ + UINT8 swaps_pending; /* number of pending swaps */ + UINT8 video_changed; /* did the frontbuffer video change? */ + + UINT32 yorigin; /* Y origin subtract value */ + UINT32 lfb_base; /* base of LFB in memory */ + UINT8 lfb_stride; /* stride of LFB accesses in bits */ + + UINT32 width; /* width of current frame buffer */ + UINT32 height; /* height of current frame buffer */ + UINT32 xoffs; /* horizontal offset (back porch) */ + UINT32 yoffs; /* vertical offset (back porch) */ + UINT32 vsyncscan; /* vertical sync scanline */ + UINT32 rowpixels; /* pixels per row */ + UINT32 tile_width; /* width of video tiles */ + UINT32 tile_height; /* height of video tiles */ + UINT32 x_tiles; /* number of tiles in the X direction */ + + emu_timer * vblank_timer; /* VBLANK timer */ + UINT8 vblank; /* VBLANK state */ + UINT8 vblank_count; /* number of VBLANKs since last swap */ + UINT8 vblank_swap_pending; /* a swap is pending, waiting for a vblank */ + UINT8 vblank_swap; /* swap when we hit this count */ + UINT8 vblank_dont_swap; /* don't actually swap when we hit this point */ + + /* triangle setup info */ + UINT8 cheating_allowed; /* allow cheating? */ + INT32 sign; /* triangle sign */ + INT16 ax, ay; /* vertex A x,y (12.4) */ + INT16 bx, by; /* vertex B x,y (12.4) */ + INT16 cx, cy; /* vertex C x,y (12.4) */ + INT32 startr, startg, startb, starta; /* starting R,G,B,A (12.12) */ + INT32 startz; /* starting Z (20.12) */ + INT64 startw; /* starting W (16.32) */ + INT32 drdx, dgdx, dbdx, dadx; /* delta R,G,B,A per X */ + INT32 dzdx; /* delta Z per X */ + INT64 dwdx; /* delta W per X */ + INT32 drdy, dgdy, dbdy, dady; /* delta R,G,B,A per Y */ + INT32 dzdy; /* delta Z per Y */ + INT64 dwdy; /* delta W per Y */ + + stats_block lfb_stats; /* LFB-access statistics */ + + UINT8 sverts; /* number of vertices ready */ + setup_vertex svert[3]; /* 3 setup vertices */ + + fifo_state fifo; /* framebuffer memory fifo */ + cmdfifo_info cmdfifo[2]; /* command FIFOs */ + + UINT8 fogblend[64]; /* 64-entry fog table */ + UINT8 fogdelta[64]; /* 64-entry fog table */ + UINT8 fogdelta_mask; /* mask for for delta (0xff for V1, 0xfc for V2) */ + + rgb_t pen[65536]; /* mapping from pixels to pens */ + rgb_t clut[512]; /* clut gamma data */ + UINT8 clut_dirty; /* do we need to recompute? */ +}; + + +struct dac_state +{ + UINT8 reg[8]; /* 8 registers */ + UINT8 read_result; /* pending read result */ +}; + + +struct raster_info +{ + raster_info * next; /* pointer to next entry with the same hash */ + poly_draw_scanline_func callback; /* callback pointer */ + UINT8 is_generic; /* TRUE if this is one of the generic rasterizers */ + UINT8 display; /* display index */ + UINT32 hits; /* how many hits (pixels) we've used this for */ + UINT32 polys; /* how many polys we've used this for */ + UINT32 eff_color_path; /* effective fbzColorPath value */ + UINT32 eff_alpha_mode; /* effective alphaMode value */ + UINT32 eff_fog_mode; /* effective fogMode value */ + UINT32 eff_fbz_mode; /* effective fbzMode value */ + UINT32 eff_tex_mode_0; /* effective textureMode value for TMU #0 */ + UINT32 eff_tex_mode_1; /* effective textureMode value for TMU #1 */ + UINT32 hash; +}; + + +struct poly_extra_data +{ + voodoo_device * device; + raster_info * info; /* pointer to rasterizer information */ + + INT16 ax, ay; /* vertex A x,y (12.4) */ + INT32 startr, startg, startb, starta; /* starting R,G,B,A (12.12) */ + INT32 startz; /* starting Z (20.12) */ + INT64 startw; /* starting W (16.32) */ + INT32 drdx, dgdx, dbdx, dadx; /* delta R,G,B,A per X */ + INT32 dzdx; /* delta Z per X */ + INT64 dwdx; /* delta W per X */ + INT32 drdy, dgdy, dbdy, dady; /* delta R,G,B,A per Y */ + INT32 dzdy; /* delta Z per Y */ + INT64 dwdy; /* delta W per Y */ + + INT64 starts0, startt0; /* starting S,T (14.18) */ + INT64 startw0; /* starting W (2.30) */ + INT64 ds0dx, dt0dx; /* delta S,T per X */ + INT64 dw0dx; /* delta W per X */ + INT64 ds0dy, dt0dy; /* delta S,T per Y */ + INT64 dw0dy; /* delta W per Y */ + INT32 lodbase0; /* used during rasterization */ + + INT64 starts1, startt1; /* starting S,T (14.18) */ + INT64 startw1; /* starting W (2.30) */ + INT64 ds1dx, dt1dx; /* delta S,T per X */ + INT64 dw1dx; /* delta W per X */ + INT64 ds1dy, dt1dy; /* delta S,T per Y */ + INT64 dw1dy; /* delta W per Y */ + INT32 lodbase1; /* used during rasterization */ + + UINT16 dither[16]; /* dither matrix, for fastfill */ +}; + + +struct banshee_info +{ + UINT32 io[0x40]; /* I/O registers */ + UINT32 agp[0x80]; /* AGP registers */ + UINT8 vga[0x20]; /* VGA registers */ + UINT8 crtc[0x27]; /* VGA CRTC registers */ + UINT8 seq[0x05]; /* VGA sequencer registers */ + UINT8 gc[0x05]; /* VGA graphics controller registers */ + UINT8 att[0x15]; /* VGA attribute registers */ + UINT8 attff; /* VGA attribute flip-flop */ + + UINT32 blt_regs[0x20]; /* 2D Blitter registers */ + UINT32 blt_dst_base; + UINT32 blt_dst_x; + UINT32 blt_dst_y; + UINT32 blt_dst_width; + UINT32 blt_dst_height; + UINT32 blt_dst_stride; + UINT32 blt_dst_bpp; + UINT32 blt_cmd; + UINT32 blt_src_base; + UINT32 blt_src_x; + UINT32 blt_src_y; + UINT32 blt_src_width; + UINT32 blt_src_height; + UINT32 blt_src_stride; + UINT32 blt_src_bpp; +}; + + +typedef voodoo_reg rgb_union; + + + + /*************************************************************************** CONSTANTS @@ -61,10 +1746,7 @@ enum FUNCTION PROTOTYPES ***************************************************************************/ -int voodoo_update(device_t *device, bitmap_rgb32 &bitmap, const rectangle &cliprect); -int voodoo_get_type(device_t *device); -int voodoo_is_stalled(device_t *device); -void voodoo_set_init_enable(device_t *device, UINT32 newval); +struct stats_block; /* ----- device interface ----- */ @@ -86,7 +1768,6 @@ public: DECLARE_WRITE32_MEMBER( voodoo_w ); // access to legacy token - struct voodoo_state *token() const { assert(m_token != nullptr); return m_token; } void common_start_voodoo(UINT8 type); UINT8 m_fbmem; @@ -96,15 +1777,112 @@ public: const char * m_cputag; devcb_write_line m_vblank; devcb_write_line m_stall; + + TIMER_CALLBACK_MEMBER( vblank_off_callback ); + TIMER_CALLBACK_MEMBER( stall_cpu_callback ); + TIMER_CALLBACK_MEMBER( vblank_callback ); + + static void voodoo_postload(voodoo_device *vd); + + int voodoo_update(bitmap_rgb32 &bitmap, const rectangle &cliprect); + int voodoo_get_type(); + int voodoo_is_stalled(); + void voodoo_set_init_enable(UINT32 newval); + + // not all of these need to be static, review. + + static void check_stalled_cpu(voodoo_device* vd, attotime current_time); + static void flush_fifos( voodoo_device* vd, attotime current_time); + static void init_fbi(voodoo_device *vd, fbi_state *f, void *memory, int fbmem); + static INT32 register_w(voodoo_device *vd, offs_t offset, UINT32 data); + static INT32 swapbuffer(voodoo_device *vd, UINT32 data); + static void init_tmu(voodoo_device *vd, tmu_state *t, voodoo_reg *reg, void *memory, int tmem); + static INT32 lfb_w(voodoo_device *vd, offs_t offset, UINT32 data, UINT32 mem_mask); + static INT32 texture_w(voodoo_device *vd, offs_t offset, UINT32 data); + static INT32 lfb_direct_w(voodoo_device *vd, offs_t offset, UINT32 data, UINT32 mem_mask); + static INT32 banshee_2d_w(voodoo_device *vd, offs_t offset, UINT32 data); + static void stall_cpu(voodoo_device *vd, int state, attotime current_time); + static void soft_reset(voodoo_device *vd); + static void recompute_video_memory(voodoo_device *vd); + static INT32 fastfill(voodoo_device *vd); + static INT32 triangle(voodoo_device *vd); + static INT32 begin_triangle(voodoo_device *vd); + static INT32 draw_triangle(voodoo_device *vd); + static INT32 setup_and_draw_triangle(voodoo_device *vd); + static INT32 triangle_create_work_item(voodoo_device* vd,UINT16 *drawbuf, int texcount); + static raster_info *add_rasterizer(voodoo_device *vd, const raster_info *cinfo); + static raster_info *find_rasterizer(voodoo_device *vd, int texcount); + static void dump_rasterizer_stats(voodoo_device *vd); + static void init_tmu_shared(tmu_shared_state *s); + + static void swap_buffers(voodoo_device *vd); + static UINT32 cmdfifo_execute(voodoo_device *vd, cmdfifo_info *f); + static INT32 cmdfifo_execute_if_ready(voodoo_device* vd, cmdfifo_info *f); + static void cmdfifo_w(voodoo_device *vd, cmdfifo_info *f, offs_t offset, UINT32 data); + + static void raster_fastfill(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); + static void raster_generic_0tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); + static void raster_generic_1tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); + static void raster_generic_2tmu(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid); + +#define RASTERIZER_HEADER(name) \ + static void raster_##name(void *destbase, INT32 y, const poly_extent *extent, const void *extradata, int threadid); \ + +#define RASTERIZER_ENTRY(fbzcp, alpha, fog, fbz, tex0, tex1) \ + RASTERIZER_HEADER(fbzcp##_##alpha##_##fog##_##fbz##_##tex0##_##tex1) \ + +#include "voodoo_rast.inc" + +#undef RASTERIZER_ENTRY + + protected: // device-level overrides virtual void device_config_complete() override; virtual void device_stop() override; virtual void device_reset() override; -private: - // internal state - struct voodoo_state *m_token; +public: + // voodoo_state + UINT8 index; /* index of board */ + voodoo_device *device; /* pointer to our containing device */ + screen_device *screen; /* the screen we are acting on */ + device_t *cpu; /* the CPU we interact with */ + UINT8 vd_type; /* type of system */ + UINT8 chipmask; /* mask for which chips are available */ + UINT32 freq; /* operating frequency */ + attoseconds_t attoseconds_per_cycle; /* attoseconds per cycle */ + UINT32 extra_cycles; /* extra cycles not yet accounted for */ + int trigger; /* trigger used for stalling */ + + voodoo_reg reg[0x400]; /* raw registers */ + const UINT8 * regaccess; /* register access array */ + const char *const * regnames; /* register names array */ + UINT8 alt_regmap; /* enable alternate register map? */ + + pci_state pci; /* PCI state */ + dac_state dac; /* DAC state */ + + fbi_state fbi; /* FBI states */ + tmu_state tmu[MAX_TMU]; /* TMU states */ + tmu_shared_state tmushare; /* TMU shared state */ + banshee_info banshee; /* Banshee state */ + + legacy_poly_manager * poly; /* polygon manager */ + stats_block * thread_stats; /* per-thread statistics */ + + voodoo_stats stats; /* internal statistics */ + + offs_t last_status_pc; /* PC of last status description (for logging) */ + UINT32 last_status_value; /* value of last status read (for logging) */ + + int next_rasterizer; /* next rasterizer index */ + raster_info rasterizer[MAX_RASTERIZERS]; /* array of rasterizers */ + raster_info * raster_hash[RASTER_HASH_SIZE]; /* hash table of rasterizers */ + + bool send_config; + UINT32 tmu_config; + }; class voodoo_1_device : public voodoo_device diff --git a/src/devices/video/voodoo_pci.cpp b/src/devices/video/voodoo_pci.cpp index 7570a007efb..9d34442f08b 100644 --- a/src/devices/video/voodoo_pci.cpp +++ b/src/devices/video/voodoo_pci.cpp @@ -153,7 +153,7 @@ void voodoo_pci_device::map_extra(UINT64 memory_window_start, UINT64 memory_wind UINT32 voodoo_pci_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; + return m_voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; } // PCI bus control @@ -170,7 +170,7 @@ WRITE32_MEMBER (voodoo_pci_device::pcictrl_w) switch (offset) { case 0x0/4: // The address map starts at 0x40 // HW initEnable - voodoo_set_init_enable(m_voodoo, data); + m_voodoo->voodoo_set_init_enable(data); logerror("%06X:voodoo_pci_device pcictrl_w to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask); break; default: diff --git a/src/emu/cheat.cpp b/src/emu/cheat.cpp index 16291063985..c055ba5bdb2 100644 --- a/src/emu/cheat.cpp +++ b/src/emu/cheat.cpp @@ -1043,6 +1043,9 @@ cheat_manager::cheat_manager(running_machine &machine) if (!machine.options().cheat()) return; + m_output.resize(UI_TARGET_FONT_ROWS*2); + m_justify.resize(UI_TARGET_FONT_ROWS*2); + // request a callback machine.add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(cheat_manager::frame_update), this)); @@ -1209,7 +1212,7 @@ bool cheat_manager::save_all(const char *filename) void cheat_manager::render_text(render_container &container) { // render any text and free it along the way - for (int linenum = 0; linenum < ARRAY_LENGTH(m_output); linenum++) + for (int linenum = 0; linenum < m_output.size(); linenum++) if (!m_output[linenum].empty()) { // output the text @@ -1337,7 +1340,7 @@ void cheat_manager::frame_update() // set up for accumulating output m_lastline = 0; m_numlines = floor(1.0f / machine().ui().get_line_height()); - m_numlines = MIN(m_numlines, ARRAY_LENGTH(m_output)); + m_numlines = MIN(m_numlines, m_output.size()); for (auto & elem : m_output) elem.clear(); @@ -1358,7 +1361,14 @@ void cheat_manager::frame_update() void cheat_manager::load_cheats(const char *filename) { xml_data_node *rootnode = nullptr; - emu_file cheatfile(machine().options().cheat_path(), OPEN_FLAG_READ); + std::string searchstr(machine().options().cheat_path()); + path_iterator path(searchstr.c_str()); + std::string curpath; + while (path.next(curpath)) + { + searchstr.append(";").append(curpath).append(PATH_SEPARATOR).append("cheat"); + } + emu_file cheatfile(searchstr.c_str(), OPEN_FLAG_READ); try { // open the file with the proper name diff --git a/src/emu/cheat.h b/src/emu/cheat.h index 8e49a8888bb..6badabd14d6 100644 --- a/src/emu/cheat.h +++ b/src/emu/cheat.h @@ -321,8 +321,8 @@ private: running_machine & m_machine; // reference to our machine simple_list<cheat_entry> m_cheatlist; // cheat list UINT64 m_framecount; // frame count - std::string m_output[UI_TARGET_FONT_ROWS * 2]; // array of output strings - UINT8 m_justify[UI_TARGET_FONT_ROWS*2]; // justification for each string + std::vector<std::string> m_output; // array of output strings + std::vector<UINT8> m_justify; // justification for each string UINT8 m_numlines; // number of lines available for output INT8 m_lastline; // last line used for output bool m_disabled; // true if the cheat engine is disabled diff --git a/src/emu/clifront.cpp b/src/emu/clifront.cpp index 05b0ace6116..2643fd3e5db 100644 --- a/src/emu/clifront.cpp +++ b/src/emu/clifront.cpp @@ -27,6 +27,8 @@ #include "osdepend.h" #include "softlist.h" +#include "ui/moptions.h" + #include <new> #include <ctype.h> @@ -97,6 +99,8 @@ int cli_frontend::execute(int argc, char **argv) { // wrap the core execution in a try/catch to field all fatal errors m_result = MAMERR_NONE; + machine_manager *manager = machine_manager::instance(m_options, m_osd); + try { // first parse options to be able to get software from it @@ -104,6 +108,8 @@ int cli_frontend::execute(int argc, char **argv) m_options.parse_command_line(argc, argv, option_errors); m_options.parse_standard_inis(option_errors); + + manager->start_luaengine(); if (*(m_options.software_name()) != 0) { @@ -148,7 +154,7 @@ int cli_frontend::execute(int argc, char **argv) strprintf(val, "%s:%s:%s", swlistdev->list_name(), m_options.software_name(), swpart->name()); // call this in order to set slot devices according to mounting - m_options.parse_slot_devices(argc, argv, option_errors, image->instance_name(), val.c_str()); + m_options.parse_slot_devices(argc, argv, option_errors, image->instance_name(), val.c_str(), swpart); break; } } @@ -209,9 +215,7 @@ int cli_frontend::execute(int argc, char **argv) throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name()); // otherwise just run the game - machine_manager *manager = machine_manager::instance(m_options, m_osd); m_result = manager->execute(); - global_free(manager); } } @@ -234,7 +238,7 @@ int cli_frontend::execute(int argc, char **argv) // print them out osd_printf_error("\n\"%s\" approximately matches the following\n" - "supported %s (best match first):\n\n", m_options.system_name(),emulator_info::get_gamesnoun()); + "supported machines (best match first):\n\n", m_options.system_name()); for (auto & matche : matches) if (matche != -1) osd_printf_error("%-18s%s\n", drivlist.driver(matche).name, drivlist.driver(matche).description); @@ -262,6 +266,7 @@ int cli_frontend::execute(int argc, char **argv) } _7z_file_cache_clear(); + global_free(manager); return m_result; } @@ -1586,7 +1591,7 @@ void cli_frontend::execute_commands(const char *exename) // showusage? if (strcmp(m_options.command(), CLICOMMAND_SHOWUSAGE) == 0) { - emulator_info::printf_usage(exename, emulator_info::get_gamenoun()); + osd_printf_info("Usage: %s [machine] [media] [software] [options]",exename); osd_printf_info("\n\nOptions:\n%s", m_options.output_help().c_str()); return; } @@ -1618,6 +1623,14 @@ void cli_frontend::execute_commands(const char *exename) // generate the updated INI file.puts(m_options.output_ini().c_str()); + + ui_options ui_opts; + emu_file file_ui(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + if (file_ui.open("ui.ini") != FILERR_NONE) + throw emu_fatalerror("Unable to create file ui.ini\n"); + + // generate the updated INI + file_ui.puts(ui_opts.output_ini().c_str()); return; } @@ -1680,8 +1693,10 @@ void cli_frontend::execute_commands(const char *exename) void cli_frontend::display_help() { osd_printf_info("%s v%s\n%s\n\n", emulator_info::get_appname(),build_version,emulator_info::get_copyright_info()); - osd_printf_info("%s\n", emulator_info::get_disclaimer()); - emulator_info::printf_usage(emulator_info::get_appname(),emulator_info::get_gamenoun()); + osd_printf_info("This software reproduces, more or less faithfully, the behaviour of a wide range\n" + "of machines. But hardware is useless without software, so images of the ROMs and\n" + "other media which run on that hardware are also required.\n\n"); + osd_printf_info("Usage: %s [machine] [media] [software] [options]",emulator_info::get_appname()); osd_printf_info("\n\n" " %s -showusage for a brief list of options\n" " %s -showconfig for a list of configuration options\n" diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index 4558413b2c3..7ad039806ea 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -2381,11 +2381,12 @@ static void execute_find(running_machine &machine, int ref, int params, const ch for (int i = 2; i < params; i++) { const char *pdata = param[i]; + size_t pdatalen = strlen(pdata) - 1; /* check for a string */ - if (pdata[0] == '"' && pdata[strlen(pdata) - 1] == '"') + if (pdata[0] == '"' && pdata[pdatalen] == '"') { - for (j = 1; j < strlen(pdata) - 1; j++) + for (j = 1; j < pdatalen; j++) { data_to_find[data_count] = pdata[j]; data_size[data_count++] = 1; diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index 82c175251fe..c4686c5566f 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -19,6 +19,7 @@ #include "uiinput.h" #include "xmlfile.h" #include "coreutil.h" +#include "luaengine.h" #include <ctype.h> @@ -486,7 +487,7 @@ UINT16 debug_read_word(address_space &space, offs_t address, int apply_translati address &= space.logbytemask(); /* if this is misaligned read, or if there are no word readers, just read two bytes */ - if ((address & 1) != 0) + if (!WORD_ALIGNED(address)) { UINT8 byte0 = debug_read_byte(space, address + 0, apply_translation); UINT8 byte1 = debug_read_byte(space, address + 1, apply_translation); @@ -540,7 +541,7 @@ UINT32 debug_read_dword(address_space &space, offs_t address, int apply_translat address &= space.logbytemask(); /* if this is misaligned read, or if there are no dword readers, just read two words */ - if ((address & 3) != 0) + if (!DWORD_ALIGNED(address)) { UINT16 word0 = debug_read_word(space, address + 0, apply_translation); UINT16 word1 = debug_read_word(space, address + 2, apply_translation); @@ -594,7 +595,7 @@ UINT64 debug_read_qword(address_space &space, offs_t address, int apply_translat address &= space.logbytemask(); /* if this is misaligned read, or if there are no qword readers, just read two dwords */ - if ((address & 7) != 0) + if (!QWORD_ALIGNED(address)) { UINT32 dword0 = debug_read_dword(space, address + 0, apply_translation); UINT32 dword1 = debug_read_dword(space, address + 4, apply_translation); @@ -699,7 +700,7 @@ void debug_write_word(address_space &space, offs_t address, UINT16 data, int app address &= space.logbytemask(); /* if this is a misaligned write, or if there are no word writers, just read two bytes */ - if ((address & 1) != 0) + if (!WORD_ALIGNED(address)) { if (space.endianness() == ENDIANNESS_LITTLE) { @@ -751,7 +752,7 @@ void debug_write_dword(address_space &space, offs_t address, UINT32 data, int ap address &= space.logbytemask(); /* if this is a misaligned write, or if there are no dword writers, just read two words */ - if ((address & 3) != 0) + if (!DWORD_ALIGNED(address)) { if (space.endianness() == ENDIANNESS_LITTLE) { @@ -803,7 +804,7 @@ void debug_write_qword(address_space &space, offs_t address, UINT64 data, int ap address &= space.logbytemask(); /* if this is a misaligned write, or if there are no qword writers, just read two dwords */ - if ((address & 7) != 0) + if (!QWORD_ALIGNED(address)) { if (space.endianness() == ENDIANNESS_LITTLE) { @@ -966,7 +967,7 @@ UINT64 debug_read_opcode(address_space &space, offs_t address, int size) case 2: result = space.direct().read_word(address & ~1, addrxor); - if ((address & 1) != 0) + if (!WORD_ALIGNED(address)) { result2 = space.direct().read_word((address & ~1) + 2, addrxor); if (space.endianness() == ENDIANNESS_LITTLE) @@ -979,7 +980,7 @@ UINT64 debug_read_opcode(address_space &space, offs_t address, int size) case 4: result = space.direct().read_dword(address & ~3, addrxor); - if ((address & 3) != 0) + if (!DWORD_ALIGNED(address)) { result2 = space.direct().read_dword((address & ~3) + 4, addrxor); if (space.endianness() == ENDIANNESS_LITTLE) @@ -992,7 +993,7 @@ UINT64 debug_read_opcode(address_space &space, offs_t address, int size) case 8: result = space.direct().read_qword(address & ~7, addrxor); - if ((address & 7) != 0) + if (!QWORD_ALIGNED(address)) { result2 = space.direct().read_qword((address & ~7) + 8, addrxor); if (space.endianness() == ENDIANNESS_LITTLE) @@ -1928,6 +1929,8 @@ void device_debug::instruction_hook(offs_t curpc) // flush any pending updates before waiting again machine.debug_view().flush_osd_updates(); + machine.manager().lua()->periodic_check(); + // clear the memory modified flag and wait global->memory_modified = false; if (machine.debug_flags & DEBUG_FLAG_OSD_ENABLED) diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp index eea867f3a63..641a31b41f0 100644 --- a/src/emu/debug/debugvw.cpp +++ b/src/emu/debug/debugvw.cpp @@ -33,13 +33,8 @@ debug_view_source::debug_view_source(const char *name, device_t *device) : m_next(nullptr), m_name(name), - m_device(device), - m_is_octal(false) + m_device(device) { - device_execute_interface *intf; - if (device && device->interface(intf)) - m_is_octal = intf->is_octal(); - } @@ -331,7 +326,7 @@ debug_view_manager::~debug_view_manager() { debug_view *oldhead = m_viewlist; m_viewlist = oldhead->m_next; - auto_free(machine(), oldhead); + global_free(oldhead); } } @@ -345,31 +340,31 @@ debug_view *debug_view_manager::alloc_view(debug_view_type type, debug_view_osd_ switch (type) { case DVT_CONSOLE: - return append(auto_alloc(machine(), debug_view_console(machine(), osdupdate, osdprivate))); + return append(global_alloc(debug_view_console(machine(), osdupdate, osdprivate))); case DVT_STATE: - return append(auto_alloc(machine(), debug_view_state(machine(), osdupdate, osdprivate))); + return append(global_alloc(debug_view_state(machine(), osdupdate, osdprivate))); case DVT_DISASSEMBLY: - return append(auto_alloc(machine(), debug_view_disasm(machine(), osdupdate, osdprivate))); + return append(global_alloc(debug_view_disasm(machine(), osdupdate, osdprivate))); case DVT_MEMORY: - return append(auto_alloc(machine(), debug_view_memory(machine(), osdupdate, osdprivate))); + return append(global_alloc(debug_view_memory(machine(), osdupdate, osdprivate))); case DVT_LOG: - return append(auto_alloc(machine(), debug_view_log(machine(), osdupdate, osdprivate))); + return append(global_alloc(debug_view_log(machine(), osdupdate, osdprivate))); case DVT_TIMERS: -// return append(auto_alloc(machine(), debug_view_timers(machine(), osdupdate, osdprivate))); +// return append(global_alloc(debug_view_timers(machine(), osdupdate, osdprivate))); case DVT_ALLOCS: -// return append(auto_alloc(machine(), debug_view_allocs(machine(), osdupdate, osdprivate))); +// return append(global_alloc(debug_view_allocs(machine(), osdupdate, osdprivate))); case DVT_BREAK_POINTS: - return append(auto_alloc(machine(), debug_view_breakpoints(machine(), osdupdate, osdprivate))); + return append(global_alloc(debug_view_breakpoints(machine(), osdupdate, osdprivate))); case DVT_WATCH_POINTS: - return append(auto_alloc(machine(), debug_view_watchpoints(machine(), osdupdate, osdprivate))); + return append(global_alloc(debug_view_watchpoints(machine(), osdupdate, osdprivate))); default: fatalerror("Attempt to create invalid debug view type %d\n", type); @@ -389,7 +384,7 @@ void debug_view_manager::free_view(debug_view &view) if (*viewptr == &view) { *viewptr = view.m_next; - auto_free(machine(), &view); + global_free(&view); break; } } diff --git a/src/emu/debug/debugvw.h b/src/emu/debug/debugvw.h index 437e68d68f6..ab4c986172e 100644 --- a/src/emu/debug/debugvw.h +++ b/src/emu/debug/debugvw.h @@ -124,14 +124,12 @@ public: const char *name() const { return m_name.c_str(); } debug_view_source *next() const { return m_next; } device_t *device() const { return m_device; } - bool is_octal() const { return m_is_octal; } private: // internal state debug_view_source * m_next; // link to next item std::string m_name; // name of the source item device_t * m_device; // associated device (if applicable) - bool m_is_octal; // is view in octal or hex }; diff --git a/src/emu/debug/dvdisasm.cpp b/src/emu/debug/dvdisasm.cpp index e8becd1954d..9b05345b6ff 100644 --- a/src/emu/debug/dvdisasm.cpp +++ b/src/emu/debug/dvdisasm.cpp @@ -308,16 +308,16 @@ offs_t debug_view_disasm::find_pc_backwards(offs_t targetpc, int numinstrs) void debug_view_disasm::generate_bytes(offs_t pcbyte, int numbytes, int minbytes, char *string, int maxchars, bool encrypted) { const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source); - int char_num = source.is_octal() ? 3 : 2; + int char_num = source.m_space.is_octal() ? 3 : 2; // output the first value int offset = 0; if (maxchars >= char_num * minbytes) - offset = sprintf(string, "%s", core_i64_format(debug_read_opcode(source.m_decrypted_space, pcbyte, minbytes), minbytes * char_num, source.is_octal())); + offset = sprintf(string, "%s", core_i64_format(debug_read_opcode(source.m_decrypted_space, pcbyte, minbytes), minbytes * char_num, source.m_space.is_octal())); // output subsequent values int byte; for (byte = minbytes; byte < numbytes && offset + 1 + char_num * minbytes < maxchars; byte += minbytes) - offset += sprintf(&string[offset], " %s", core_i64_format(debug_read_opcode(encrypted ? source.m_space : source.m_decrypted_space, pcbyte + byte, minbytes), minbytes * char_num, source.is_octal())); + offset += sprintf(&string[offset], " %s", core_i64_format(debug_read_opcode(encrypted ? source.m_space : source.m_decrypted_space, pcbyte + byte, minbytes), minbytes * char_num, source.m_space.is_octal())); // if we ran out of room, indicate more string[maxchars - 1] = 0; @@ -335,7 +335,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines) { bool changed = false; const debug_view_disasm_source &source = downcast<const debug_view_disasm_source &>(*m_source); - int char_num = source.is_octal() ? 3 : 2; + int char_num = source.m_space.is_octal() ? 3 : 2; // determine how many characters we need for an address and set the divider m_divider1 = 1 + (source.m_space.logaddrchars()/2*char_num) + 1; @@ -383,7 +383,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines) // convert back and set the address of this instruction m_byteaddress[instr] = pcbyte; - sprintf(&destbuf[0], " %s ", core_i64_format(source.m_space.byte_to_address(pcbyte), source.m_space.logaddrchars()/2*char_num, source.is_octal())); + sprintf(&destbuf[0], " %s ", core_i64_format(source.m_space.byte_to_address(pcbyte), source.m_space.logaddrchars()/2*char_num, source.m_space.is_octal())); // make sure we can translate the address, and then disassemble the result char buffer[100]; diff --git a/src/emu/debug/dvstate.cpp b/src/emu/debug/dvstate.cpp index 578b423725d..d0d741ed21e 100644 --- a/src/emu/debug/dvstate.cpp +++ b/src/emu/debug/dvstate.cpp @@ -98,7 +98,7 @@ void debug_view_state::reset() { state_item *oldhead = m_state_list; m_state_list = oldhead->m_next; - auto_free(machine(), oldhead); + global_free(oldhead); } } @@ -117,39 +117,39 @@ void debug_view_state::recompute() // add a cycles entry: cycles:99999999 state_item **tailptr = &m_state_list; - *tailptr = auto_alloc(machine(), state_item(REG_CYCLES, "cycles", 8)); + *tailptr = global_alloc(state_item(REG_CYCLES, "cycles", 8)); tailptr = &(*tailptr)->m_next; // add a beam entry: beamx:1234 - *tailptr = auto_alloc(machine(), state_item(REG_BEAMX, "beamx", 4)); + *tailptr = global_alloc(state_item(REG_BEAMX, "beamx", 4)); tailptr = &(*tailptr)->m_next; // add a beam entry: beamy:5678 - *tailptr = auto_alloc(machine(), state_item(REG_BEAMY, "beamy", 4)); + *tailptr = global_alloc(state_item(REG_BEAMY, "beamy", 4)); tailptr = &(*tailptr)->m_next; // add a beam entry: frame:123456 - *tailptr = auto_alloc(machine(), state_item(REG_FRAME, "frame", 6)); + *tailptr = global_alloc(state_item(REG_FRAME, "frame", 6)); tailptr = &(*tailptr)->m_next; // add a flags entry: flags:xxxxxxxx - *tailptr = auto_alloc(machine(), state_item(STATE_GENFLAGS, "flags", source.m_stateintf->state_string_max_length(STATE_GENFLAGS))); + *tailptr = global_alloc(state_item(STATE_GENFLAGS, "flags", source.m_stateintf->state_string_max_length(STATE_GENFLAGS))); tailptr = &(*tailptr)->m_next; // add a divider entry - *tailptr = auto_alloc(machine(), state_item(REG_DIVIDER, "", 0)); + *tailptr = global_alloc(state_item(REG_DIVIDER, "", 0)); tailptr = &(*tailptr)->m_next; // add all registers into it for (const device_state_entry *entry = source.m_stateintf->state_first(); entry != nullptr; entry = entry->next()) if (entry->divider()) { - *tailptr = auto_alloc(machine(), state_item(REG_DIVIDER, "", 0)); + *tailptr = global_alloc(state_item(REG_DIVIDER, "", 0)); tailptr = &(*tailptr)->m_next; } else if (entry->visible()) { - *tailptr = auto_alloc(machine(), state_item(entry->index(), entry->symbol(), source.m_stateintf->state_string_max_length(entry->index()))); + *tailptr = global_alloc(state_item(entry->index(), entry->symbol(), source.m_stateintf->state_string_max_length(entry->index()))); tailptr = &(*tailptr)->m_next; } diff --git a/src/emu/debug/textbuf.cpp b/src/emu/debug/textbuf.cpp index e7daf96571a..476fe6e1efc 100644 --- a/src/emu/debug/textbuf.cpp +++ b/src/emu/debug/textbuf.cpp @@ -86,12 +86,12 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines) text_buffer *text; /* allocate memory for the text buffer object */ - text = (text_buffer *)global_alloc(text_buffer); + text = global_alloc_nothrow(text_buffer); if (!text) return nullptr; /* allocate memory for the buffer itself */ - text->buffer = (char *)global_alloc_array(char, bytes); + text->buffer = global_alloc_array_nothrow(char, bytes); if (!text->buffer) { global_free(text); @@ -99,7 +99,7 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines) } /* allocate memory for the lines array */ - text->lineoffs = (INT32 *)global_alloc_array(INT32, lines); + text->lineoffs = global_alloc_array_nothrow(INT32, lines); if (!text->lineoffs) { global_free_array(text->buffer); diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp index 7b4b530f75b..ac72ce768d7 100644 --- a/src/emu/diexec.cpp +++ b/src/emu/diexec.cpp @@ -46,7 +46,6 @@ device_execute_interface::device_execute_interface(const machine_config &mconfig m_disabled(false), m_vblank_interrupt_screen(nullptr), m_timed_interrupt_period(attotime::zero), - m_is_octal(false), m_nextexec(nullptr), m_timedint_timer(nullptr), m_profiler(PROFILER_IDLE), diff --git a/src/emu/diexec.h b/src/emu/diexec.h index 7f9eb41bfcf..3a5cc0405f9 100644 --- a/src/emu/diexec.h +++ b/src/emu/diexec.h @@ -146,7 +146,6 @@ public: UINT64 attotime_to_cycles(const attotime &duration) const { return clocks_to_cycles(device().attotime_to_clocks(duration)); } UINT32 input_lines() const { return execute_input_lines(); } UINT32 default_irq_vector() const { return execute_default_irq_vector(); } - bool is_octal() const { return m_is_octal; } // static inline configuration helpers static void static_set_disable(device_t &device); @@ -260,7 +259,6 @@ protected: const char * m_vblank_interrupt_screen; // the screen that causes the VBLANK interrupt device_interrupt_delegate m_timed_interrupt; // for interrupts not tied to VBLANK attotime m_timed_interrupt_period; // period for periodic interrupts - bool m_is_octal; // to determine if messages/debugger will show octal or hex // execution lists device_execute_interface *m_nextexec; // pointer to the next device to execute, in order diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp index 392da316dbb..6cc9b0fb41a 100644 --- a/src/emu/diimage.cpp +++ b/src/emu/diimage.cpp @@ -161,29 +161,27 @@ image_error_t device_image_interface::set_image_filename(const char *filename) zippath_parent(m_working_directory, filename); m_basename.assign(m_image_name); - int loc1 = m_image_name.find_last_of('\\'); - int loc2 = m_image_name.find_last_of('/'); - int loc3 = m_image_name.find_last_of(':'); - int loc = MAX(loc1,MAX(loc2,loc3)); - if (loc!=-1) { + size_t loc1 = m_image_name.find_last_of('\\'); + size_t loc2 = m_image_name.find_last_of('/'); + size_t loc3 = m_image_name.find_last_of(':'); + size_t loc = MAX(loc1,MAX(loc2, loc3)); + if (loc != -1) { if (loc == loc3) { // temp workaround for softlists now that m_image_name contains the part name too (e.g. list:gamename:cart) m_basename = m_basename.substr(0, loc); - std::string tmpstr = std::string(m_basename); - int tmploc = tmpstr.find_last_of(':'); - m_basename = m_basename.substr(tmploc + 1,loc-tmploc); + size_t tmploc = m_basename.find_last_of(':'); + m_basename = m_basename.substr(tmploc + 1, loc - tmploc); } else - m_basename = m_basename.substr(loc + 1, m_basename.length() - loc); + m_basename = m_basename.substr(loc + 1); } - m_basename_noext = m_basename.assign(m_basename); + m_basename_noext = m_basename; m_filetype = ""; loc = m_basename_noext.find_last_of('.'); - if (loc!=-1) { - m_basename_noext = m_basename_noext.substr(0,loc); - m_filetype = m_basename.assign(m_basename); - m_filetype = m_filetype.substr(loc + 1, m_filetype.length() - loc); + if (loc != -1) { + m_basename_noext = m_basename_noext.substr(0, loc); + m_filetype = m_basename.substr(loc + 1); } return IMAGE_ERROR_SUCCESS; @@ -1381,7 +1379,7 @@ std::string device_image_interface::software_get_default_slot(const char *defaul ui_menu *device_image_interface::get_selection_menu(running_machine &machine, render_container *container) { - return auto_alloc_clear(machine, <ui_menu_control_device_image>(machine, container, this)); + return global_alloc_clear<ui_menu_control_device_image>(machine, container, this); } /* ----------------------------------------------------------------------- */ diff --git a/src/emu/dimemory.cpp b/src/emu/dimemory.cpp index b245d51a0b9..dbe3647ec01 100644 --- a/src/emu/dimemory.cpp +++ b/src/emu/dimemory.cpp @@ -36,6 +36,7 @@ address_space_config::address_space_config() m_addrbus_shift(0), m_logaddr_width(0), m_page_shift(0), + m_is_octal(false), m_internal_map(nullptr), m_default_map(nullptr) { @@ -58,6 +59,7 @@ address_space_config::address_space_config(const char *name, endianness_t endian m_addrbus_shift(addrshift), m_logaddr_width(addrwidth), m_page_shift(0), + m_is_octal(false), m_internal_map(internal), m_default_map(defmap) { @@ -71,6 +73,7 @@ address_space_config::address_space_config(const char *name, endianness_t endian m_addrbus_shift(addrshift), m_logaddr_width(logwidth), m_page_shift(pageshift), + m_is_octal(false), m_internal_map(internal), m_default_map(defmap) { @@ -84,6 +87,7 @@ address_space_config::address_space_config(const char *name, endianness_t endian m_addrbus_shift(addrshift), m_logaddr_width(addrwidth), m_page_shift(0), + m_is_octal(false), m_internal_map(nullptr), m_default_map(nullptr), m_internal_map_delegate(std::move(internal)), @@ -99,6 +103,7 @@ address_space_config::address_space_config(const char *name, endianness_t endian m_addrbus_shift(addrshift), m_logaddr_width(logwidth), m_page_shift(pageshift), + m_is_octal(false), m_internal_map(nullptr), m_default_map(nullptr), m_internal_map_delegate(std::move(internal)), diff --git a/src/emu/dimemory.h b/src/emu/dimemory.h index 66561b5a5cf..0998fd4ae9a 100644 --- a/src/emu/dimemory.h +++ b/src/emu/dimemory.h @@ -131,22 +131,4 @@ typedef device_interface_iterator<device_memory_interface> memory_interface_iter -//************************************************************************** -// INLINE HELPERS -//************************************************************************** - -//------------------------------------------------- -// device_get_space_config - return a pointer -// to sthe given address space's configuration -//------------------------------------------------- - -inline const address_space_config *device_get_space_config(const device_t &device, address_spacenum spacenum = AS_0) -{ - const device_memory_interface *intf; - if (!device.interface(intf)) - throw emu_fatalerror("Device '%s' does not have memory interface", device.tag()); - return intf->space_config(spacenum); -} - - #endif /* __DIMEMORY_H__ */ diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp index c1f4e49f4b6..7134b588963 100644 --- a/src/emu/disound.cpp +++ b/src/emu/disound.cpp @@ -443,7 +443,10 @@ void device_mixer_interface::interface_pre_start() void device_mixer_interface::interface_post_load() { - m_mixer_stream->set_sample_rate(device().machine().sample_rate()); + // Beware that there's not going to be a mixer stream if there was + // no inputs + if (m_mixer_stream) + m_mixer_stream->set_sample_rate(device().machine().sample_rate()); // call our parent device_sound_interface::interface_post_load(); diff --git a/src/emu/divtlb.cpp b/src/emu/divtlb.cpp new file mode 100644 index 00000000000..01be30919cb --- /dev/null +++ b/src/emu/divtlb.cpp @@ -0,0 +1,341 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles +/*************************************************************************** + + divtlb.c + + Device generic virtual TLB interface. + +***************************************************************************/ + +#include "emu.h" +#include "divtlb.h" +#include "validity.h" + + + +//************************************************************************** +// DEBUGGING +//************************************************************************** + +#define PRINTF_TLB (0) + + + +//************************************************************************** +// DEVICE VTLB INTERFACE +//************************************************************************** + +//------------------------------------------------- +// device_vtlb_interface - constructor +//------------------------------------------------- + +device_vtlb_interface::device_vtlb_interface(const machine_config &mconfig, device_t &device, address_spacenum space) + : device_interface(device, "vtlb"), + m_space(space), + m_dynamic(0), + m_fixed(0), + m_dynindex(0), + m_pageshift(0), + m_addrwidth(0) +{ +} + + +//------------------------------------------------- +// device_vtlb_interface - destructor +//------------------------------------------------- + +device_vtlb_interface::~device_vtlb_interface() +{ +} + + +//------------------------------------------------- +// interface_validity_check - validation for a +// device after the configuration has been +// constructed +//------------------------------------------------- + +void device_vtlb_interface::interface_validity_check(validity_checker &valid) const +{ + const device_memory_interface *intf; + if (!device().interface(intf)) + osd_printf_error("Device does not have memory interface\n"); + else + { + // validate CPU information + const address_space_config *spaceconfig = intf->space_config(m_space); + if (spaceconfig == nullptr) + osd_printf_error("No memory address space configuration found for space %d\n", m_space); + else if ((1 << spaceconfig->m_page_shift) <= VTLB_FLAGS_MASK || spaceconfig->m_logaddr_width <= spaceconfig->m_page_shift) + osd_printf_error("Invalid page shift %d for VTLB\n", spaceconfig->m_page_shift); + } +} + + +//------------------------------------------------- +// interface_pre_start - work to be done prior to +// actually starting a device +//------------------------------------------------- + +void device_vtlb_interface::interface_pre_start() +{ + // fill in CPU information + const address_space_config *spaceconfig = device().memory().space_config(m_space); + m_pageshift = spaceconfig->m_page_shift; + m_addrwidth = spaceconfig->m_logaddr_width; + + // allocate the entry array + m_live.resize(m_fixed + m_dynamic); + memset(&m_live[0], 0, m_live.size()*sizeof(m_live[0])); + + // allocate the lookup table + m_table.resize((size_t) 1 << (m_addrwidth - m_pageshift)); + memset(&m_table[0], 0, m_table.size()*sizeof(m_table[0])); + + // allocate the fixed page count array + if (m_fixed > 0) + { + m_fixedpages.resize(m_fixed); + memset(&m_fixedpages[0], 0, m_fixed*sizeof(m_fixedpages[0])); + } +} + + +//------------------------------------------------- +// interface_post_start - work to be done after +// actually starting a device +//------------------------------------------------- + +void device_vtlb_interface::interface_post_start() +{ + device().save_item(NAME(m_live)); + device().save_item(NAME(m_table)); + if (m_fixed > 0) + device().save_item(NAME(m_fixedpages)); +} + + +//------------------------------------------------- +// interface_pre_reset - work to be done prior to +// actually resetting a device +//------------------------------------------------- + +void device_vtlb_interface::interface_pre_reset() +{ + vtlb_flush_dynamic(); +} + + +//************************************************************************** +// FILLING +//************************************************************************** + +//------------------------------------------------- +// vtlb_fill - called by the CPU core in +// response to an unmapped access +//------------------------------------------------- + +int device_vtlb_interface::vtlb_fill(offs_t address, int intention) +{ + offs_t tableindex = address >> m_pageshift; + vtlb_entry entry = m_table[tableindex]; + offs_t taddress; + +#if PRINTF_TLB + osd_printf_debug("vtlb_fill: %08X(%X) ... ", address, intention); +#endif + + // should not be called here if the entry is in the table already +// assert((entry & (1 << intention)) == 0); + + // if we have no dynamic entries, we always fail + if (m_dynamic == 0) + { +#if PRINTF_TLB + osd_printf_debug("failed: no dynamic entries\n"); +#endif + return FALSE; + } + + // ask the CPU core to translate for us + taddress = address; + if (!device().memory().translate(m_space, intention, taddress)) + { +#if PRINTF_TLB + osd_printf_debug("failed: no translation\n"); +#endif + return FALSE; + } + + // if this is the first successful translation for this address, allocate a new entry + if ((entry & VTLB_FLAGS_MASK) == 0) + { + int liveindex = m_dynindex++ % m_dynamic; + + // if an entry already exists at this index, free it + if (m_live[liveindex] != 0) + m_table[m_live[liveindex] - 1] = 0; + + // claim this new entry + m_live[liveindex] = tableindex + 1; + + // form a new blank entry + entry = (taddress >> m_pageshift) << m_pageshift; + entry |= VTLB_FLAG_VALID; + +#if PRINTF_TLB + osd_printf_debug("success (%08X), new entry\n", taddress); +#endif + } + + // otherwise, ensure that different intentions do not produce different addresses + else + { + assert((entry >> m_pageshift) == (taddress >> m_pageshift)); + assert(entry & VTLB_FLAG_VALID); + +#if PRINTF_TLB + osd_printf_debug("success (%08X), existing entry\n", taddress); +#endif + } + + // add the intention to the list of valid intentions and store + entry |= 1 << (intention & (TRANSLATE_TYPE_MASK | TRANSLATE_USER_MASK)); + m_table[tableindex] = entry; + return TRUE; +} + + +//------------------------------------------------- +// vtlb_load - load a fixed VTLB entry +//------------------------------------------------- + +void device_vtlb_interface::vtlb_load(int entrynum, int numpages, offs_t address, vtlb_entry value) +{ + offs_t tableindex = address >> m_pageshift; + int liveindex = m_dynamic + entrynum; + int pagenum; + + // must be in range + assert(entrynum >= 0 && entrynum < m_fixed); + +#if PRINTF_TLB + osd_printf_debug("vtlb_load %d for %d pages at %08X == %08X\n", entrynum, numpages, address, value); +#endif + + // if an entry already exists at this index, free it + if (m_live[liveindex] != 0) + { + int pagecount = m_fixedpages[entrynum]; + int oldtableindex = m_live[liveindex] - 1; + for (pagenum = 0; pagenum < pagecount; pagenum++) + m_table[oldtableindex + pagenum] = 0; + } + + // claim this new entry + m_live[liveindex] = tableindex + 1; + + // store the raw value, making sure the "fixed" flag is set + value |= VTLB_FLAG_FIXED; + m_fixedpages[entrynum] = numpages; + for (pagenum = 0; pagenum < numpages; pagenum++) + m_table[tableindex + pagenum] = value + (pagenum << m_pageshift); +} + +//------------------------------------------------- +// vtlb_dynload - load a dynamic VTLB entry +//------------------------------------------------- + +void device_vtlb_interface::vtlb_dynload(UINT32 index, offs_t address, vtlb_entry value) +{ + vtlb_entry entry = m_table[index]; + + if (m_dynamic == 0) + { +#if PRINTF_TLB + osd_printf_debug("failed: no dynamic entries\n"); +#endif + return; + } + + int liveindex = m_dynindex++ % m_dynamic; + // is entry already live? + if (!(entry & VTLB_FLAG_VALID)) + { + // if an entry already exists at this index, free it + if (m_live[liveindex] != 0) + m_table[m_live[liveindex] - 1] = 0; + + // claim this new entry + m_live[liveindex] = index + 1; + } + // form a new blank entry + entry = (address >> m_pageshift) << m_pageshift; + entry |= VTLB_FLAG_VALID | value; + +#if PRINTF_TLB + osd_printf_debug("success (%08X), new entry\n", address); +#endif + m_table[index] = entry; +} + +//************************************************************************** +// FLUSHING +//************************************************************************** + +//------------------------------------------------- +// vtlb_flush_dynamic - flush all knowledge +// from the dynamic part of the VTLB +//------------------------------------------------- + +void device_vtlb_interface::vtlb_flush_dynamic() +{ +#if PRINTF_TLB + osd_printf_debug("vtlb_flush_dynamic\n"); +#endif + + // loop over live entries and release them from the table + for (int liveindex = 0; liveindex < m_dynamic; liveindex++) + if (m_live[liveindex] != 0) + { + offs_t tableindex = m_live[liveindex] - 1; + m_table[tableindex] = 0; + m_live[liveindex] = 0; + } +} + + +//------------------------------------------------- +// vtlb_flush_address - flush knowledge of a +// particular address from the VTLB +//------------------------------------------------- + +void device_vtlb_interface::vtlb_flush_address(offs_t address) +{ + offs_t tableindex = address >> m_pageshift; + +#if PRINTF_TLB + osd_printf_debug("vtlb_flush_address %08X\n", address); +#endif + + // free the entry in the table; for speed, we leave the entry in the live array + m_table[tableindex] = 0; +} + + + +//************************************************************************** +// ACCESSORS +//************************************************************************** + +//------------------------------------------------- +// vtlb_table - return a pointer to the base of +// the linear VTLB lookup table +//------------------------------------------------- + +const vtlb_entry *device_vtlb_interface::vtlb_table() const +{ + return &m_table[0]; +} diff --git a/src/emu/divtlb.h b/src/emu/divtlb.h new file mode 100644 index 00000000000..eccd2947da3 --- /dev/null +++ b/src/emu/divtlb.h @@ -0,0 +1,89 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles +/*************************************************************************** + + divtlb.h + + Generic virtual TLB implementation. + +***************************************************************************/ + +#pragma once + +#ifndef __DIVTLB_H__ +#define __DIVTLB_H__ + + + +/*************************************************************************** + CONSTANTS +***************************************************************************/ + +#define VTLB_FLAGS_MASK 0xff + +#define VTLB_READ_ALLOWED 0x01 /* (1 << TRANSLATE_READ) */ +#define VTLB_WRITE_ALLOWED 0x02 /* (1 << TRANSLATE_WRITE) */ +#define VTLB_FETCH_ALLOWED 0x04 /* (1 << TRANSLATE_FETCH) */ +#define VTLB_FLAG_VALID 0x08 +#define VTLB_USER_READ_ALLOWED 0x10 /* (1 << TRANSLATE_READ_USER) */ +#define VTLB_USER_WRITE_ALLOWED 0x20 /* (1 << TRANSLATE_WRITE_USER) */ +#define VTLB_USER_FETCH_ALLOWED 0x40 /* (1 << TRANSLATE_FETCH_USER) */ +#define VTLB_FLAG_FIXED 0x80 + + + +/*************************************************************************** + TYPE DEFINITIONS +***************************************************************************/ + +/* represents an entry in the VTLB */ +typedef UINT32 vtlb_entry; + + +// ======================> device_vtlb_interface + +class device_vtlb_interface : public device_interface +{ +public: + // construction/destruction + device_vtlb_interface(const machine_config &mconfig, device_t &device, address_spacenum space); + virtual ~device_vtlb_interface(); + + // configuration helpers + void set_vtlb_dynamic_entries(int entries) { m_dynamic = entries; } + void set_vtlb_fixed_entries(int entries) { m_fixed = entries; } + + // filling + int vtlb_fill(offs_t address, int intention); + void vtlb_load(int entrynum, int numpages, offs_t address, vtlb_entry value); + void vtlb_dynload(UINT32 index, offs_t address, vtlb_entry value); + + // flushing + void vtlb_flush_dynamic(); + void vtlb_flush_address(offs_t address); + + // accessors + const vtlb_entry *vtlb_table() const; + +protected: + // interface-level overrides + virtual void interface_validity_check(validity_checker &valid) const override; + virtual void interface_pre_start() override; + virtual void interface_post_start() override; + virtual void interface_pre_reset() override; + +private: + // private state + address_spacenum m_space; // address space + int m_dynamic; // number of dynamic entries + int m_fixed; // number of fixed entries + int m_dynindex; // index of next dynamic entry + int m_pageshift; // bits to shift to get page index + int m_addrwidth; // logical address bus width + std::vector<offs_t> m_live; // array of live entries by table index + std::vector<int> m_fixedpages; // number of pages each fixed entry covers + std::vector<vtlb_entry> m_table; // table of entries by address +}; + + +#endif /* __VTLB_H__ */ diff --git a/src/emu/drivers/empty.cpp b/src/emu/drivers/empty.cpp index 9c48a6c8b26..be4f53b24a7 100644 --- a/src/emu/drivers/empty.cpp +++ b/src/emu/drivers/empty.cpp @@ -11,6 +11,7 @@ #include "emu.h" #include "render.h" #include "ui/selgame.h" +#include "ui/simpleselgame.h" //************************************************************************** @@ -29,7 +30,11 @@ public: virtual void machine_start() override { // force the UI to show the game select screen - ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container()); + if (strcmp(machine().options().ui(),"simple")==0) { + ui_simple_menu_select_game::force_game_select(machine(), &machine().render().ui_container()); + } else { + ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container()); + } } UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) diff --git a/src/emu/emualloc.cpp b/src/emu/emualloc.cpp index a43faae522c..f424bca39cb 100644 --- a/src/emu/emualloc.cpp +++ b/src/emu/emualloc.cpp @@ -38,7 +38,6 @@ UINT64 resource_pool::s_id = 0; resource_pool::resource_pool(int hash_size) : m_hash_size(hash_size), - m_listlock(osd_lock_alloc()), m_hash(hash_size), m_ordered_head(nullptr), m_ordered_tail(nullptr) @@ -56,8 +55,6 @@ resource_pool::resource_pool(int hash_size) resource_pool::~resource_pool() { clear(); - if (m_listlock != nullptr) - osd_lock_free(m_listlock); } @@ -67,7 +64,7 @@ resource_pool::~resource_pool() void resource_pool::add(resource_pool_item &item, size_t size, const char *type) { - osd_lock_acquire(m_listlock); + std::lock_guard<std::mutex> lock(m_listlock); // insert into hash table int hashval = reinterpret_cast<FPTR>(item.m_ptr) % m_hash_size; @@ -107,8 +104,6 @@ void resource_pool::add(resource_pool_item &item, size_t size, const char *type) item.m_ordered_prev = nullptr; m_ordered_head = &item; } - - osd_lock_release(m_listlock); } @@ -124,7 +119,7 @@ void resource_pool::remove(void *ptr) return; // search for the item - osd_lock_acquire(m_listlock); + std::lock_guard<std::mutex> lock(m_listlock); int hashval = reinterpret_cast<FPTR>(ptr) % m_hash_size; for (resource_pool_item **scanptr = &m_hash[hashval]; *scanptr != nullptr; scanptr = &(*scanptr)->m_next) @@ -152,8 +147,6 @@ void resource_pool::remove(void *ptr) global_free(deleteme); break; } - - osd_lock_release(m_listlock); } @@ -165,7 +158,7 @@ void resource_pool::remove(void *ptr) resource_pool_item *resource_pool::find(void *ptr) { // search for the item - osd_lock_acquire(m_listlock); + std::lock_guard<std::mutex> lock(m_listlock); int hashval = reinterpret_cast<FPTR>(ptr) % m_hash_size; resource_pool_item *item; @@ -173,8 +166,6 @@ resource_pool_item *resource_pool::find(void *ptr) if (item->m_ptr == ptr) break; - osd_lock_release(m_listlock); - return item; } @@ -190,7 +181,7 @@ bool resource_pool::contains(void *_ptrstart, void *_ptrend) UINT8 *ptrend = reinterpret_cast<UINT8 *>(_ptrend); // search for the item - osd_lock_acquire(m_listlock); + std::lock_guard<std::mutex> lock(m_listlock); resource_pool_item *item = nullptr; for (item = m_ordered_head; item != nullptr; item = item->m_ordered_next) @@ -198,13 +189,9 @@ bool resource_pool::contains(void *_ptrstart, void *_ptrend) UINT8 *objstart = reinterpret_cast<UINT8 *>(item->m_ptr); UINT8 *objend = objstart + item->m_size; if (ptrstart >= objstart && ptrend <= objend) - goto found; + return true; } - -found: - osd_lock_release(m_listlock); - - return (item != nullptr); + return false; } @@ -214,12 +201,8 @@ found: void resource_pool::clear() { - osd_lock_acquire(m_listlock); - // important: delete from earliest to latest; this allows objects to clean up after // themselves if they wish while (m_ordered_head != nullptr) remove(m_ordered_head->m_ptr); - - osd_lock_release(m_listlock); } diff --git a/src/emu/emualloc.h b/src/emu/emualloc.h index 4571762054f..37b5c63d860 100644 --- a/src/emu/emualloc.h +++ b/src/emu/emualloc.h @@ -14,6 +14,7 @@ #define __EMUALLOC_H__ #include <new> +#include <mutex> #include "osdcore.h" #include "coretmpl.h" @@ -124,7 +125,7 @@ public: private: int m_hash_size; - osd_lock * m_listlock; + std::mutex m_listlock; std::vector<resource_pool_item *> m_hash; resource_pool_item * m_ordered_head; resource_pool_item * m_ordered_tail; diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index aa1b0482edc..97e107ebb49 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -11,6 +11,7 @@ #include "emu.h" #include "emuopts.h" #include "drivenum.h" +#include "softlist.h" #include <ctype.h> @@ -42,6 +43,7 @@ const options_entry emu_options::s_option_entries[] = { OPTION_FONTPATH, ".", OPTION_STRING, "path to font files" }, { OPTION_CHEATPATH, "cheat", OPTION_STRING, "path to cheat files" }, { OPTION_CROSSHAIRPATH, "crosshair", OPTION_STRING, "path to crosshair files" }, + { OPTION_PLUGINSPATH, "plugins", OPTION_STRING, "path to plugin files" }, // output directory options { nullptr, nullptr, OPTION_HEADER, "CORE OUTPUT DIRECTORY OPTIONS" }, @@ -49,7 +51,7 @@ const options_entry emu_options::s_option_entries[] = { OPTION_NVRAM_DIRECTORY, "nvram", OPTION_STRING, "directory to save nvram contents" }, { OPTION_INPUT_DIRECTORY, "inp", OPTION_STRING, "directory to save input device logs" }, { OPTION_STATE_DIRECTORY, "sta", OPTION_STRING, "directory to save states" }, - { OPTION_SNAPSHOT_DIRECTORY, "snap", OPTION_STRING, "directory to save screenshots" }, + { OPTION_SNAPSHOT_DIRECTORY, "snap", OPTION_STRING, "directory to save/load screenshots" }, { OPTION_DIFF_DIRECTORY, "diff", OPTION_STRING, "directory to save hard drive image difference files" }, { OPTION_COMMENT_DIRECTORY, "comments", OPTION_STRING, "directory to save debugger comments" }, @@ -59,6 +61,9 @@ const options_entry emu_options::s_option_entries[] = { OPTION_AUTOSAVE, "0", OPTION_BOOLEAN, "enable automatic restore at startup, and automatic save at exit time" }, { OPTION_PLAYBACK ";pb", nullptr, OPTION_STRING, "playback an input file" }, { OPTION_RECORD ";rec", nullptr, OPTION_STRING, "record an input file" }, + { OPTION_RECORD_TIMECODE, "0", OPTION_BOOLEAN, "record an input timecode file (requires -record option)" }, + { OPTION_EXIT_AFTER_PLAYBACK, "0", OPTION_BOOLEAN, "close the program at the end of playback" }, + { OPTION_MNGWRITE, nullptr, OPTION_STRING, "optional filename to write a MNG movie of the current session" }, { OPTION_AVIWRITE, nullptr, OPTION_STRING, "optional filename to write an AVI movie of the current session" }, #ifdef MAME_DEBUG @@ -177,11 +182,8 @@ const options_entry emu_options::s_option_entries[] = { OPTION_DRC_LOG_NATIVE, "0", OPTION_BOOLEAN, "write DRC native disassembly log" }, { OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" }, { OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" }, - { OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" }, - { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, + { OPTION_UI, "cabinet", OPTION_STRING, "type of UI (simple|cabinet)" }, { OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" }, - { OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" }, - { OPTION_UI_MOUSE, "0", OPTION_BOOLEAN, "display ui mouse cursor" }, { OPTION_AUTOBOOT_COMMAND ";ab", nullptr, OPTION_STRING, "command to execute after machine boot" }, { OPTION_AUTOBOOT_DELAY, "2", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" }, { OPTION_AUTOBOOT_SCRIPT ";script", nullptr, OPTION_STRING, "lua script to execute after machine boot" }, @@ -205,6 +207,8 @@ emu_options::emu_options() , m_joystick_contradictory(false) , m_sleep(true) , m_refresh_speed(false) +, m_slot_options(0) +, m_device_options(0) { add_entries(emu_options::s_option_entries); } @@ -215,18 +219,17 @@ emu_options::emu_options() // options for the configured system //------------------------------------------------- -bool emu_options::add_slot_options(bool isfirstpass) +bool emu_options::add_slot_options(const software_part *swpart) { // look up the system configured by name; if no match, do nothing const game_driver *cursystem = system(); if (cursystem == nullptr) return false; + + // create the configuration machine_config config(*cursystem, *this); // iterate through all slot devices - bool first = true; - - // create the configuration int starting_count = options_count(); slot_interface_iterator iter(config.root_device()); for (const device_slot_interface *slot = iter.first(); slot != nullptr; slot = iter.next()) @@ -236,9 +239,8 @@ bool emu_options::add_slot_options(bool isfirstpass) continue; // first device? add the header as to be pretty - if (isfirstpass && first) + if (m_slot_options++ == 0) add_entry(nullptr, "SLOT DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE); - first = false; // retrieve info about the device instance const char *name = slot->device().tag() + 1; @@ -255,6 +257,15 @@ bool emu_options::add_slot_options(bool isfirstpass) } add_entry(name, nullptr, flags, defvalue, true); } + + // allow software lists to supply their own defaults + if (swpart != nullptr) + { + std::string featurename = std::string(name).append("_default"); + const char *value = swpart->feature(featurename.c_str()); + if (value != nullptr && (*value == '\0' || slot->option(value) != nullptr)) + set_default_value(name, value); + } } return (options_count() != starting_count); } @@ -265,7 +276,7 @@ bool emu_options::add_slot_options(bool isfirstpass) // depending of image mounted //------------------------------------------------- -void emu_options::update_slot_options() +void emu_options::update_slot_options(const software_part *swpart) { // look up the system configured by name; if no match, do nothing const game_driver *cursystem = system(); @@ -290,8 +301,8 @@ void emu_options::update_slot_options() } } } - while (add_slot_options(false)) { } - add_device_options(false); + while (add_slot_options(swpart)) { } + add_device_options(); } @@ -300,7 +311,7 @@ void emu_options::update_slot_options() // options for the configured system //------------------------------------------------- -void emu_options::add_device_options(bool isfirstpass) +void emu_options::add_device_options() { // look up the system configured by name; if no match, do nothing const game_driver *cursystem = system(); @@ -309,14 +320,12 @@ void emu_options::add_device_options(bool isfirstpass) machine_config config(*cursystem, *this); // iterate through all image devices - bool first = true; image_interface_iterator iter(config.root_device()); for (const device_image_interface *image = iter.first(); image != nullptr; image = iter.next()) { // first device? add the header as to be pretty - if (first && isfirstpass) + if (m_device_options++ == 0) add_entry(nullptr, "IMAGE DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE); - first = false; // retrieve info about the device instance std::string option_name; @@ -348,6 +357,10 @@ void emu_options::remove_device_options() if ((curentry->flags() & OPTION_FLAG_DEVICE) != 0) remove_entry(*curentry); } + + // reset counters + m_slot_options = 0; + m_device_options = 0; } @@ -356,7 +369,7 @@ void emu_options::remove_device_options() // and update slot and image devices //------------------------------------------------- -bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value) +bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value, const software_part *swpart) { // an initial parse to capture the initial set of values bool result; @@ -364,15 +377,13 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_ core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); // keep adding slot options until we stop seeing new stuff - bool isfirstpass = true; - while (add_slot_options(isfirstpass)) - { + m_slot_options = 0; + while (add_slot_options(swpart)) core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); - isfirstpass = false; - } // add device options and reparse - add_device_options(true); + m_device_options = 0; + add_device_options(); if (name != nullptr && exists(name)) set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string); core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); @@ -380,7 +391,7 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_ int num; do { num = options_count(); - update_slot_options(); + update_slot_options(swpart); result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); } while (num != options_count()); @@ -399,7 +410,7 @@ bool emu_options::parse_command_line(int argc, char *argv[], std::string &error_ { // parse as normal core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); - bool result = parse_slot_devices(argc, argv, error_string, nullptr, nullptr); + bool result = parse_slot_devices(argc, argv, error_string); update_cached_options(); return result; } @@ -523,11 +534,10 @@ void emu_options::set_system_name(const char *name) // remove any existing device options and then add them afresh remove_device_options(); - if (add_slot_options(true)) - while (add_slot_options(false)) { } + while (add_slot_options()) { } // then add the options - add_device_options(true); + add_device_options(); int num; do { num = options_count(); diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index 14597d0e67d..c8bbc58435a 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -56,6 +56,7 @@ enum #define OPTION_FONTPATH "fontpath" #define OPTION_CHEATPATH "cheatpath" #define OPTION_CROSSHAIRPATH "crosshairpath" +#define OPTION_PLUGINSPATH "pluginspath" // core directory options #define OPTION_CFG_DIRECTORY "cfg_directory" @@ -71,6 +72,8 @@ enum #define OPTION_AUTOSAVE "autosave" #define OPTION_PLAYBACK "playback" #define OPTION_RECORD "record" +#define OPTION_RECORD_TIMECODE "record_timecode" +#define OPTION_EXIT_AFTER_PLAYBACK "exit_after_playback" #define OPTION_MNGWRITE "mngwrite" #define OPTION_AVIWRITE "aviwrite" #ifdef MAME_DEBUG @@ -172,8 +175,7 @@ enum #define OPTION_DRC_LOG_NATIVE "drc_log_native" #define OPTION_BIOS "bios" #define OPTION_CHEAT "cheat" -#define OPTION_SKIP_GAMEINFO "skip_gameinfo" -#define OPTION_UI_FONT "uifont" +#define OPTION_UI "ui" #define OPTION_RAMSIZE "ramsize" // core comm options @@ -182,9 +184,6 @@ enum #define OPTION_COMM_REMOTE_HOST "comm_remotehost" #define OPTION_COMM_REMOTE_PORT "comm_remoteport" -#define OPTION_CONFIRM_QUIT "confirm_quit" -#define OPTION_UI_MOUSE "ui_mouse" - #define OPTION_AUTOBOOT_COMMAND "autoboot_command" #define OPTION_AUTOBOOT_DELAY "autoboot_delay" #define OPTION_AUTOBOOT_SCRIPT "autoboot_script" @@ -197,6 +196,7 @@ enum // forward references struct game_driver; +class software_part; class emu_options : public core_options @@ -210,7 +210,7 @@ public: // parsing wrappers bool parse_command_line(int argc, char *argv[], std::string &error_string); void parse_standard_inis(std::string &error_string); - bool parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value); + bool parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name = nullptr, const char *value = nullptr, const software_part *swpart = nullptr); // core options const char *system_name() const { return value(OPTION_SYSTEMNAME); } @@ -232,6 +232,7 @@ public: const char *font_path() const { return value(OPTION_FONTPATH); } const char *cheat_path() const { return value(OPTION_CHEATPATH); } const char *crosshair_path() const { return value(OPTION_CROSSHAIRPATH); } + const char *plugins_path() const { return value(OPTION_PLUGINSPATH); } // core directory options const char *cfg_directory() const { return value(OPTION_CFG_DIRECTORY); } @@ -247,6 +248,8 @@ public: bool autosave() const { return bool_value(OPTION_AUTOSAVE); } const char *playback() const { return value(OPTION_PLAYBACK); } const char *record() const { return value(OPTION_RECORD); } + bool record_timecode() const { return bool_value(OPTION_RECORD_TIMECODE); } + bool exit_after_playback() const { return bool_value(OPTION_EXIT_AFTER_PLAYBACK); } const char *mng_write() const { return value(OPTION_MNGWRITE); } const char *avi_write() const { return value(OPTION_AVIWRITE); } #ifdef MAME_DEBUG @@ -346,8 +349,7 @@ public: bool drc_log_native() const { return bool_value(OPTION_DRC_LOG_NATIVE); } const char *bios() const { return value(OPTION_BIOS); } bool cheat() const { return bool_value(OPTION_CHEAT); } - bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); } - const char *ui_font() const { return value(OPTION_UI_FONT); } + const char *ui() const { return value(OPTION_UI); } const char *ram_size() const { return value(OPTION_RAMSIZE); } // core comm options @@ -355,10 +357,7 @@ public: const char *comm_localport() const { return value(OPTION_COMM_LOCAL_PORT); } const char *comm_remotehost() const { return value(OPTION_COMM_REMOTE_HOST); } const char *comm_remoteport() const { return value(OPTION_COMM_REMOTE_PORT); } - - bool confirm_quit() const { return bool_value(OPTION_CONFIRM_QUIT); } - bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); } - + const char *autoboot_command() const { return value(OPTION_AUTOBOOT_COMMAND); } int autoboot_delay() const { return int_value(OPTION_AUTOBOOT_DELAY); } const char *autoboot_script() const { return value(OPTION_AUTOBOOT_SCRIPT); } @@ -370,12 +369,13 @@ public: std::string main_value(const char *option) const; std::string sub_value(const char *name, const char *subname) const; - bool add_slot_options(bool isfirst); + bool add_slot_options(const software_part *swpart = nullptr); + private: // device-specific option handling - void add_device_options(bool isfirst); - void update_slot_options(); + void add_device_options(); + void update_slot_options(const software_part *swpart = nullptr); // INI parsing helper bool parse_one_ini(const char *basename, int priority, std::string *error_string = nullptr); @@ -390,6 +390,8 @@ private: bool m_joystick_contradictory; bool m_sleep; bool m_refresh_speed; + int m_slot_options; + int m_device_options; }; diff --git a/src/emu/info.cpp b/src/emu/info.cpp index 4bae0daf37a..111022ae223 100644 --- a/src/emu/info.cpp +++ b/src/emu/info.cpp @@ -19,6 +19,9 @@ #include <ctype.h> +#define XML_ROOT "mame" +#define XML_TOP "machine" + //************************************************************************** // GLOBAL VARIABLES //************************************************************************** @@ -188,15 +191,15 @@ info_xml_creator::info_xml_creator(driver_enumerator &drivlist) // for all known games //------------------------------------------------- -void info_xml_creator::output(FILE *out) +void info_xml_creator::output(FILE *out, bool nodevices) { m_output = out; // output the DTD fprintf(m_output, "<?xml version=\"1.0\"?>\n"); std::string dtd(s_dtd_string); - strreplace(dtd, "__XML_ROOT__", emulator_info::get_xml_root()); - strreplace(dtd, "__XML_TOP__", emulator_info::get_xml_top()); + strreplace(dtd, "__XML_ROOT__", XML_ROOT); + strreplace(dtd, "__XML_TOP__", XML_TOP); fprintf(m_output, "%s\n\n", dtd.c_str()); @@ -208,7 +211,7 @@ void info_xml_creator::output(FILE *out) "no" #endif "\" mameconfig=\"%d\">\n", - emulator_info::get_xml_root(), + XML_ROOT, xml_normalize_string(build_version), CONFIG_VERSION ); @@ -218,10 +221,11 @@ void info_xml_creator::output(FILE *out) output_one(); // output devices (both devices with roms and slot devices) - output_devices(); + if (!nodevices) + output_devices(); // close the top level tag - fprintf(m_output, "</%s>\n",emulator_info::get_xml_root()); + fprintf(m_output, "</%s>\n",XML_ROOT); } @@ -246,7 +250,7 @@ void info_xml_creator::output_one() portlist.append(*device, errors); // print the header and the game name - fprintf(m_output, "\t<%s",emulator_info::get_xml_top()); + fprintf(m_output, "\t<%s",XML_TOP); fprintf(m_output, " name=\"%s\"", xml_normalize_string(driver.name)); // strip away any path information from the source_file and output it @@ -308,7 +312,7 @@ void info_xml_creator::output_one() output_ramoptions(); // close the topmost tag - fprintf(m_output, "\t</%s>\n",emulator_info::get_xml_top()); + fprintf(m_output, "\t</%s>\n",XML_TOP); } @@ -340,7 +344,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag) } // start to output info - fprintf(m_output, "\t<%s", emulator_info::get_xml_top()); + fprintf(m_output, "\t<%s", XML_TOP); fprintf(m_output, " name=\"%s\"", xml_normalize_string(device.shortname())); std::string src(device.source()); strreplace(src,"../", ""); @@ -367,7 +371,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag) output_adjusters(portlist); output_images(device, devtag); output_slots(device, devtag); - fprintf(m_output, "\t</%s>\n", emulator_info::get_xml_top()); + fprintf(m_output, "\t</%s>\n", XML_TOP); } diff --git a/src/emu/info.h b/src/emu/info.h index 0607acf9d7e..78082ec033b 100644 --- a/src/emu/info.h +++ b/src/emu/info.h @@ -28,7 +28,7 @@ public: info_xml_creator(driver_enumerator &drivlist); // output - void output(FILE *out); + void output(FILE *out, bool nodevices = false); private: // internal helper diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h index 7a07ea777b6..4d711e4d676 100644 --- a/src/emu/inpttype.h +++ b/src/emu/inpttype.h @@ -716,7 +716,8 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_ON_SCREEN_DISPLAY,"On Screen Display", input_seq(KEYCODE_TILDE) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DEBUG_BREAK, "Break in Debugger", input_seq(KEYCODE_TILDE) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_CONFIGURE, "Config Menu", input_seq(KEYCODE_TAB) ) - INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE, "Pause", input_seq(KEYCODE_P) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE, "Pause", input_seq(KEYCODE_P, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_RSHIFT) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAUSE_SINGLE, "Pause - Single Step", input_seq(KEYCODE_P, KEYCODE_LSHIFT, input_seq::or_code, KEYCODE_P, KEYCODE_RSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RESET_MACHINE, "Reset Game", input_seq(KEYCODE_F3, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SOFT_RESET, "Soft Reset", input_seq(KEYCODE_F3, input_seq::not_code, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SHOW_GFX, "Show Gfx", input_seq(KEYCODE_F4) ) @@ -726,12 +727,14 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FAST_FORWARD, "Fast Forward", input_seq(KEYCODE_INSERT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SHOW_FPS, "Show FPS", input_seq(KEYCODE_F11, input_seq::not_code, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_SNAPSHOT, "Save Snapshot", input_seq(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TIMECODE, "Write current timecode", input_seq(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RECORD_MOVIE, "Record Movie", input_seq(KEYCODE_F12, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TOGGLE_CHEAT, "Toggle Cheat", input_seq(KEYCODE_F6) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TOGGLE_AUTOFIRE, "Toggle Autofire", input_seq() ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP, "UI Up", input_seq(KEYCODE_UP, input_seq::or_code, JOYCODE_Y_UP_SWITCH_INDEXED(0)) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN, "UI Down", input_seq(KEYCODE_DOWN, input_seq::or_code, JOYCODE_Y_DOWN_SWITCH_INDEXED(0)) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LEFT, "UI Left", input_seq(KEYCODE_LEFT, input_seq::or_code, JOYCODE_X_LEFT_SWITCH_INDEXED(0)) ) - INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RIGHT, "UI Right", input_seq(KEYCODE_RIGHT, input_seq::or_code, JOYCODE_X_RIGHT_SWITCH_INDEXED(0)) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RIGHT, "UI Right", input_seq(KEYCODE_RIGHT, input_seq::not_code, KEYCODE_LCONTROL, input_seq::or_code, JOYCODE_X_RIGHT_SWITCH_INDEXED(0), input_seq::not_code, KEYCODE_LCONTROL) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_HOME, "UI Home", input_seq(KEYCODE_HOME) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_END, "UI End", input_seq(KEYCODE_END) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_PAGE_UP, "UI Page Up", input_seq(KEYCODE_PGUP) ) @@ -753,6 +756,17 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LOAD_STATE, "Load State", input_seq(KEYCODE_F7, input_seq::not_code, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_START, "UI (First) Tape Start", input_seq(KEYCODE_F2, input_seq::not_code, KEYCODE_LSHIFT) ) INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_TAPE_STOP, "UI (First) Tape Stop", input_seq(KEYCODE_F2, KEYCODE_LSHIFT) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DATS, "UI External DAT View", input_seq(KEYCODE_LALT, KEYCODE_D) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_FAVORITES, "UI Add/Remove favorites",input_seq(KEYCODE_LALT, KEYCODE_F) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP_FILTER, NULL, input_seq() ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN_FILTER, NULL, input_seq() ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_LEFT_PANEL, NULL, input_seq() ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_RIGHT_PANEL, "UI Right switch image/info", input_seq(KEYCODE_RIGHT, KEYCODE_LCONTROL) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_UP_PANEL, NULL, input_seq() ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_DOWN_PANEL, NULL, input_seq() ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_EXPORT, "UI Export list to xml", input_seq(KEYCODE_LALT, KEYCODE_E) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_AUDIT_FAST, "UI Audit Unavailable", input_seq(KEYCODE_F1, input_seq::not_code, KEYCODE_LSHIFT) ) + INPUT_PORT_DIGITAL_TYPE( 0, UI, UI_AUDIT_ALL, "UI Audit All", input_seq(KEYCODE_F1, KEYCODE_LSHIFT) ) } void construct_core_types_OSD(simple_list<input_type_entry> &typelist) diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index 282cc5c256c..a898a10051b 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -1699,6 +1699,7 @@ void ioport_field::get_user_settings(user_settings &settings) else { settings.toggle = m_live->toggle; + settings.autofire = m_live->autofire; } } @@ -1737,6 +1738,7 @@ void ioport_field::set_user_settings(const user_settings &settings) else { m_live->toggle = settings.toggle; + m_live->autofire = settings.autofire; } } @@ -1904,6 +1906,19 @@ void ioport_field::frame_update(ioport_value &result, bool mouse_down) // if the state changed, look for switch down/switch up bool curstate = mouse_down || machine().input().seq_pressed(seq()) || m_digital_value; + if (m_live->autofire && !machine().ioport().get_autofire_toggle()) + { + if (curstate) + { + if (m_live->autopressed > machine().ioport().get_autofire_delay()) + m_live->autopressed = 0; + else if (m_live->autopressed > machine().ioport().get_autofire_delay() / 2) + curstate = false; + m_live->autopressed++; + } + else + m_live->autopressed = 0; + } bool changed = false; if (curstate != m_live->last) { @@ -2156,7 +2171,9 @@ ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog) impulse(0), last(0), toggle(field.toggle()), - joydir(digital_joystick::JOYDIR_COUNT) + joydir(digital_joystick::JOYDIR_COUNT), + autofire(false), + autopressed(0) { // fill in the basic values for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype) @@ -2454,10 +2471,15 @@ ioport_manager::ioport_manager(running_machine &machine) m_playback_file(machine.options().input_directory(), OPEN_FLAG_READ), m_playback_accumulated_speed(0), m_playback_accumulated_frames(0), + m_timecode_file(machine.options().input_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS), + m_timecode_count(0), + m_timecode_last_time(attotime::zero), m_has_configs(false), m_has_analog(false), m_has_dips(false), - m_has_bioses(false) + m_has_bioses(false), + m_autofire_toggle(false), + m_autofire_delay(3) // 1 seems too fast for a bunch of games { memset(m_type_to_entry, 0, sizeof(m_type_to_entry)); } @@ -2564,6 +2586,7 @@ time_t ioport_manager::initialize() // open playback and record files if specified time_t basetime = playback_init(); record_init(); + timecode_init(); return basetime; } @@ -2657,6 +2680,7 @@ void ioport_manager::exit() // close any playback or recording files playback_end(); record_end(); + timecode_end(); } @@ -3400,7 +3424,7 @@ time_t ioport_manager::playback_init() // verify the header against the current game if (memcmp(machine().system().name, header + 0x14, strlen(machine().system().name) + 1) != 0) - osd_printf_info("Input file is for %s '%s', not for current %s '%s'\n", emulator_info::get_gamenoun(), header + 0x14, emulator_info::get_gamenoun(), machine().system().name); + osd_printf_info("Input file is for machine '%s', not for current machine '%s'\n", header + 0x14, machine().system().name); // enable compression m_playback_file.compress(FCOMPRESS_MEDIUM); @@ -3428,6 +3452,12 @@ void ioport_manager::playback_end(const char *message) m_playback_accumulated_speed /= m_playback_accumulated_frames; osd_printf_info("Total playback frames: %d\n", UINT32(m_playback_accumulated_frames)); osd_printf_info("Average recorded speed: %d%%\n", UINT32((m_playback_accumulated_speed * 200 + 1) >> 21)); + + // close the program at the end of inp file playback + if (machine().options().exit_after_playback()) { + osd_printf_info("Exiting MAME now...\n"); + machine().schedule_exit(); + } } } @@ -3510,6 +3540,29 @@ void ioport_manager::record_write<bool>(bool value) record_write(byte); } +template<typename _Type> +void ioport_manager::timecode_write(_Type value) +{ + // protect against NULL handles if previous reads fail + if (!m_timecode_file.is_open()) + return; + + // read the value; if we fail, end playback + if (m_timecode_file.write(&value, sizeof(value)) != sizeof(value)) + timecode_end("Out of space"); +} + +/*template<> +void ioport_manager::timecode_write<bool>(bool value) +{ + UINT8 byte = UINT8(value); + timecode_write(byte); +}*/ +template<> +void ioport_manager::timecode_write<std::string>(std::string value) { + timecode_write(value.c_str()); +} + //------------------------------------------------- // record_init - initialize INP recording @@ -3554,6 +3607,44 @@ void ioport_manager::record_init() } +void ioport_manager::timecode_init() { + // check if option -record_timecode is enabled + if (!machine().options().record_timecode()) { + machine().video().set_timecode_enabled(false); + return; + } + // if no file, nothing to do + const char *record_filename = machine().options().record(); + if (record_filename[0] == 0) { + machine().video().set_timecode_enabled(false); + return; + } + + machine().video().set_timecode_enabled(true); + + // open the record file + std::string filename; + filename.append(record_filename).append(".timecode"); + osd_printf_info("Record input timecode file: %s\n", record_filename); + + file_error filerr = m_timecode_file.open(filename.c_str()); + assert_always(filerr == FILERR_NONE, "Failed to open file for input timecode recording"); + + m_timecode_file.puts(std::string("# ==========================================\n").c_str()); + m_timecode_file.puts(std::string("# TIMECODE FILE FOR VIDEO PREVIEW GENERATION\n").c_str()); + m_timecode_file.puts(std::string("# ==========================================\n").c_str()); + m_timecode_file.puts(std::string("#\n").c_str()); + m_timecode_file.puts(std::string("# VIDEO_PART: code of video timecode\n").c_str()); + m_timecode_file.puts(std::string("# START: start time (hh:mm:ss.mmm)\n").c_str()); + m_timecode_file.puts(std::string("# ELAPSED: elapsed time (hh:mm:ss.mmm)\n").c_str()); + m_timecode_file.puts(std::string("# MSEC_START: start time (milliseconds)\n").c_str()); + m_timecode_file.puts(std::string("# MSEC_ELAPSED: elapsed time (milliseconds)\n").c_str()); + m_timecode_file.puts(std::string("# FRAME_START: start time (frames)\n").c_str()); + m_timecode_file.puts(std::string("# FRAME_ELAPSED: elapsed time (frames)\n").c_str()); + m_timecode_file.puts(std::string("#\n").c_str()); + m_timecode_file.puts(std::string("# VIDEO_PART======= START======= ELAPSED===== MSEC_START===== MSEC_ELAPSED=== FRAME_START==== FRAME_ELAPSED==\n").c_str()); +} + //------------------------------------------------- // record_end - end INP recording //------------------------------------------------- @@ -3573,6 +3664,19 @@ void ioport_manager::record_end(const char *message) } +void ioport_manager::timecode_end(const char *message) +{ + // only applies if we have a live file + if (m_timecode_file.is_open()) { + // close the file + m_timecode_file.close(); + + // pop a message + if (message != nullptr) + machine().popmessage("Recording Timecode Ended\nReason: %s", message); + } +} + //------------------------------------------------- // record_frame - start of frame callback for // recording @@ -3590,6 +3694,114 @@ void ioport_manager::record_frame(const attotime &curtime) // then the current speed record_write(UINT32(machine().video().speed_percent() * double(1 << 20))); } + + if (m_timecode_file.is_open() && machine().video().get_timecode_write()) { + // Display the timecode + std::string current_time_str; + m_timecode_count++; + strcatprintf(current_time_str, "%02d:%02d:%02d.%03d", + (int)curtime.seconds() / (60 * 60), + (curtime.seconds() / 60) % 60, + curtime.seconds() % 60, + (int)(curtime.attoseconds()/ATTOSECONDS_PER_MILLISECOND)); + + // Elapsed from previous timecode + attotime elapsed_time = curtime - m_timecode_last_time; + m_timecode_last_time = curtime; + std::string elapsed_time_str; + strcatprintf(elapsed_time_str, "%02d:%02d:%02d.%03d", + elapsed_time.seconds() / (60 * 60), + (elapsed_time.seconds() / 60) % 60, + elapsed_time.seconds() % 60, + int(elapsed_time.attoseconds()/ATTOSECONDS_PER_MILLISECOND)); + + // Number of ms from beginning of playback + int mseconds_start = curtime.seconds()*1000 + curtime.attoseconds()/ATTOSECONDS_PER_MILLISECOND; + std::string mseconds_start_str; + strcatprintf(mseconds_start_str, "%015d", mseconds_start); + + // Number of ms from previous timecode + int mseconds_elapsed = elapsed_time.seconds()*1000 + elapsed_time.attoseconds()/ATTOSECONDS_PER_MILLISECOND; + std::string mseconds_elapsed_str; + strcatprintf(mseconds_elapsed_str, "%015d", mseconds_elapsed); + + // Number of frames from beginning of playback + int frame_start = mseconds_start * 60 / 1000; + std::string frame_start_str; + strcatprintf(frame_start_str, "%015d", frame_start); + + // Number of frames from previous timecode + int frame_elapsed = mseconds_elapsed * 60 / 1000; + std::string frame_elapsed_str; + strcatprintf(frame_elapsed_str, "%015d", frame_elapsed); + + std::string message; + std::string timecode_text; + std::string timecode_key; + bool show_timecode_counter = false; + if (m_timecode_count==1) { + message += "TIMECODE: Intro started at " + current_time_str; + timecode_key = "INTRO_START"; + timecode_text = "INTRO"; + show_timecode_counter = true; + } + else if (m_timecode_count==2) { + message += "TIMECODE: Intro duration " + elapsed_time_str; + timecode_key = "INTRO_STOP"; + machine().video().add_to_total_time(elapsed_time); + //timecode_text += "INTRO"; + } + else if (m_timecode_count==3) { + message += "TIMECODE: Gameplay started at " + current_time_str; + timecode_key = "GAMEPLAY_START"; + timecode_text += "GAMEPLAY"; + show_timecode_counter = true; + } + else if (m_timecode_count==4) { + message += "TIMECODE: Gameplay duration " + elapsed_time_str; + timecode_key = "GAMEPLAY_STOP"; + machine().video().add_to_total_time(elapsed_time); + //timecode_text += "GAMEPLAY"; + } + else if (m_timecode_count % 2 == 1) { + std::string timecode_count_str; + strcatprintf(timecode_count_str, "%03d", (m_timecode_count-3)/2); + timecode_key = "EXTRA_START_" + timecode_count_str; + timecode_count_str.clear(); + strcatprintf(timecode_count_str, "%d", (m_timecode_count-3)/2); + message += "TIMECODE: Extra " + timecode_count_str + " started at " + current_time_str; + timecode_text += "EXTRA " + timecode_count_str; + show_timecode_counter = true; + } + else { + machine().video().add_to_total_time(elapsed_time); + + std::string timecode_count_str; + strcatprintf(timecode_count_str, "%d", (m_timecode_count-4)/2); + message += "TIMECODE: Extra " + timecode_count_str + " duration " + elapsed_time_str; + + timecode_count_str.clear(); + strcatprintf(timecode_count_str, "%03d", (m_timecode_count-4)/2); + timecode_key = "EXTRA_STOP_" + timecode_count_str; + } + + osd_printf_info("%s \n", message.c_str()); + machine().popmessage("%s \n", message.c_str()); + + std::string line_to_add; + line_to_add.append(timecode_key).append(19-timecode_key.length(), ' '); + line_to_add += + " " + current_time_str + " " + elapsed_time_str + + " " + mseconds_start_str + " " + mseconds_elapsed_str + + " " + frame_start_str + " " + frame_elapsed_str + + "\n"; + m_timecode_file.puts(line_to_add.c_str()); + + machine().video().set_timecode_write(false); + machine().video().set_timecode_text(timecode_text); + machine().video().set_timecode_start(m_timecode_last_time); + machine().ui().set_show_timecode_counter(show_timecode_counter); + } } diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 89bd9e6964e..6d9d941fa4a 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -333,6 +333,7 @@ enum ioport_type IPT_UI_ON_SCREEN_DISPLAY, IPT_UI_DEBUG_BREAK, IPT_UI_PAUSE, + IPT_UI_PAUSE_SINGLE, IPT_UI_RESET_MACHINE, IPT_UI_SOFT_RESET, IPT_UI_SHOW_GFX, @@ -342,6 +343,7 @@ enum ioport_type IPT_UI_FAST_FORWARD, IPT_UI_SHOW_FPS, IPT_UI_SNAPSHOT, + IPT_UI_TIMECODE, IPT_UI_RECORD_MOVIE, IPT_UI_TOGGLE_CHEAT, IPT_UI_UP, @@ -369,6 +371,18 @@ enum ioport_type IPT_UI_LOAD_STATE, IPT_UI_TAPE_START, IPT_UI_TAPE_STOP, + IPT_UI_DATS, + IPT_UI_FAVORITES, + IPT_UI_UP_FILTER, + IPT_UI_DOWN_FILTER, + IPT_UI_LEFT_PANEL, + IPT_UI_RIGHT_PANEL, + IPT_UI_UP_PANEL, + IPT_UI_DOWN_PANEL, + IPT_UI_EXPORT, + IPT_UI_AUDIT_FAST, + IPT_UI_AUDIT_ALL, + IPT_UI_TOGGLE_AUTOFIRE, // additional OSD-specified UI port types (up to 16) IPT_OSD_1, @@ -1082,6 +1096,7 @@ public: struct user_settings { ioport_value value; // for DIP switches + bool autofire; // for autofire settings input_seq seq[SEQ_TYPE_TOTAL]; // sequences of all types INT32 sensitivity; // for analog controls INT32 delta; // for analog controls @@ -1158,6 +1173,8 @@ struct ioport_field_live bool last; // were we pressed last time? bool toggle; // current toggle setting digital_joystick::direction_t joydir; // digital joystick direction index + bool autofire; // autofire + int autopressed; // autofire status std::string name; // overridden name }; @@ -1400,6 +1417,12 @@ public: ioport_type token_to_input_type(const char *string, int &player) const; std::string input_type_to_token(ioport_type type, int player); + // autofire + bool get_autofire_toggle() { return m_autofire_toggle; } + void set_autofire_toggle(bool toggle) { m_autofire_toggle = toggle; } + int get_autofire_delay() { return m_autofire_delay; } + void set_autofire_delay(int delay) { m_autofire_delay = delay; } + private: // internal helpers void init_port_types(); @@ -1436,6 +1459,10 @@ private: void record_frame(const attotime &curtime); void record_port(ioport_port &port); + template<typename _Type> void timecode_write(_Type value); + void timecode_init(); + void timecode_end(const char *message = NULL); + // internal state running_machine & m_machine; // reference to owning machine bool m_safe_to_read; // clear at start; set after state is loaded @@ -1458,12 +1485,19 @@ private: emu_file m_playback_file; // playback file (NULL if not recording) UINT64 m_playback_accumulated_speed; // accumulated speed during playback UINT32 m_playback_accumulated_frames; // accumulated frames during playback + emu_file m_timecode_file; // timecode/frames playback file (NULL if not recording) + int m_timecode_count; + attotime m_timecode_last_time; // has... bool m_has_configs; bool m_has_analog; bool m_has_dips; bool m_has_bioses; + + // autofire + bool m_autofire_toggle; // autofire toggle + int m_autofire_delay; // autofire delay }; diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp index 733c99537c7..990f417eac4 100644 --- a/src/emu/luaengine.cpp +++ b/src/emu/luaengine.cpp @@ -14,9 +14,12 @@ #include "luabridge/Source/LuaBridge/LuaBridge.h" #include <signal.h> #include "emu.h" +#include "cheat.h" #include "drivenum.h" #include "ui/ui.h" #include "luaengine.h" +#include <mutex> +#include "libuv/include/uv.h" //************************************************************************** // LUA ENGINE @@ -45,6 +48,10 @@ lua_engine* lua_engine::luaThis = nullptr; extern "C" { int luaopen_lsqlite3(lua_State *L); + int luaopen_zlib(lua_State *L); + int luaopen_luv(lua_State *L); + int luaopen_lfs(lua_State *L); + uv_loop_t* luv_loop(lua_State* L); } static void lstop(lua_State *L, lua_Debug *ar) @@ -368,6 +375,38 @@ void lua_engine::emu_set_hook(lua_State *L) } //------------------------------------------------- +// options_entry - return table of option entries +// -> manager:options().entries +// -> manager:machine():options().entries +// -> manager:machine():ui():options().entries +//------------------------------------------------- + +template <typename T> +luabridge::LuaRef lua_engine::l_options_get_entries(const T *o) +{ + T *options = const_cast<T *>(o); + lua_State *L = luaThis->m_lua_state; + luabridge::LuaRef entries_table = luabridge::LuaRef::newTable(L); + + int unadorned_index = 0; + for (typename T::entry *curentry = options->first(); curentry != nullptr; curentry = curentry->next()) + { + const char *name = curentry->name(); + bool is_unadorned = false; + // check if it's unadorned + if (name && strlen(name) && !strcmp(name, options->unadorned(unadorned_index))) + { + unadorned_index++; + is_unadorned = true; + } + if (!curentry->is_header() && !curentry->is_command() && !curentry->is_internal() && !is_unadorned) + entries_table[name] = curentry; + } + + return entries_table; +} + +//------------------------------------------------- // machine_get_screens - return table of available screens userdata // -> manager:machine().screens[":screen"] //------------------------------------------------- @@ -404,6 +443,103 @@ luabridge::LuaRef lua_engine::l_machine_get_devices(const running_machine *r) return devs_table; } +//------------------------------------------------- +// machine_cheat_entries - return cheat entries +// -> manager:machine():cheat().entries[0] +//------------------------------------------------- + +luabridge::LuaRef lua_engine::l_cheat_get_entries(const cheat_manager *c) +{ + cheat_manager *cm = const_cast<cheat_manager *>(c); + lua_State *L = luaThis->m_lua_state; + luabridge::LuaRef entry_table = luabridge::LuaRef::newTable(L); + + int cheatnum = 0; + for (cheat_entry *entry = cm->first(); entry != nullptr; entry = entry->next()) { + entry_table[cheatnum++] = entry; + } + + return entry_table; +} + +//------------------------------------------------- +// cheat_entry_state - return cheat entry state +// -> manager:machine():cheat().entries[0]:state() +//------------------------------------------------- + +int lua_engine::lua_cheat_entry::l_get_state(lua_State *L) +{ + cheat_entry *ce = luabridge::Stack<cheat_entry *>::get(L, 1); + + switch (ce->state()) + { + case SCRIPT_STATE_ON: lua_pushliteral(L, "on"); break; + case SCRIPT_STATE_RUN: lua_pushliteral(L, "run"); break; + case SCRIPT_STATE_CHANGE: lua_pushliteral(L, "change"); break; + case SCRIPT_STATE_COUNT: lua_pushliteral(L, "count"); break; + default: lua_pushliteral(L, "off"); break; + } + + return 1; +} + +//------------------------------------------------- +// machine_ioports - return table of ioports +// -> manager:machine():ioport().ports[':P1'] +//------------------------------------------------- + +luabridge::LuaRef lua_engine::l_ioport_get_ports(const ioport_manager *m) +{ + ioport_manager *im = const_cast<ioport_manager *>(m); + lua_State *L = luaThis->m_lua_state; + luabridge::LuaRef port_table = luabridge::LuaRef::newTable(L); + ioport_port *port; + + for (port = im->first_port(); port != nullptr; port = port->next()) { + port_table[port->tag()] = port; + } + + return port_table; +} + +//------------------------------------------------- +// ioport_fields - return table of ioport fields +// -> manager:machine().ioport().ports[':P1'].fields[':'] +//------------------------------------------------- + +luabridge::LuaRef lua_engine::l_ioports_port_get_fields(const ioport_port *i) +{ + ioport_port *p = const_cast<ioport_port *>(i); + lua_State *L = luaThis->m_lua_state; + luabridge::LuaRef f_table = luabridge::LuaRef::newTable(L); + ioport_field *field; + + for (field = p->first_field(); field != nullptr; field = field->next()) { + f_table[field->name()] = field; + } + + return f_table; +} + +//------------------------------------------------- +// render_get_targets - return table of render targets +// -> manager:machine():render().targets[0] +//------------------------------------------------- + +luabridge::LuaRef lua_engine::l_render_get_targets(const render_manager *r) +{ + lua_State *L = luaThis->m_lua_state; + luabridge::LuaRef target_table = luabridge::LuaRef::newTable(L); + + int tc = 0; + for (render_target *curr_rt = r->first_target(); curr_rt != nullptr; curr_rt = curr_rt->next()) + { + target_table[tc++] = curr_rt; + } + + return target_table; +} + // private helper for get_devices - DFS visit all devices in a running machine luabridge::LuaRef lua_engine::devtree_dfs(device_t *root, luabridge::LuaRef devs_table) { @@ -505,21 +641,21 @@ int lua_engine::lua_addr_space::l_mem_read(lua_State *L) mem_content = sp.read_byte(address); break; case 16: - if ((address & 1) == 0) { + if (WORD_ALIGNED(address)) { mem_content = sp.read_word(address); } else { mem_content = sp.read_word_unaligned(address); } break; case 32: - if ((address & 3) == 0) { + if (DWORD_ALIGNED(address)) { mem_content = sp.read_dword(address); } else { mem_content = sp.read_dword_unaligned(address); } break; case 64: - if ((address & 7) == 0) { + if (QWORD_ALIGNED(address)) { mem_content = sp.read_qword(address); } else { mem_content = sp.read_qword_unaligned(address); @@ -558,21 +694,21 @@ int lua_engine::lua_addr_space::l_mem_write(lua_State *L) sp.write_byte(address, val); break; case 16: - if ((address & 1) == 0) { + if (WORD_ALIGNED(address)) { sp.write_word(address, val); } else { sp.read_word_unaligned(address, val); } break; case 32: - if ((address & 3) == 0) { + if (DWORD_ALIGNED(address)) { sp.write_dword(address, val); } else { sp.write_dword_unaligned(address, val); } break; case 64: - if ((address & 7) == 0) { + if (QWORD_ALIGNED(address)) { sp.write_qword(address, val); } else { sp.write_qword_unaligned(address, val); @@ -585,6 +721,98 @@ int lua_engine::lua_addr_space::l_mem_write(lua_State *L) return 0; } +int lua_engine::lua_options_entry::l_entry_value(lua_State *L) +{ + core_options::entry *e = luabridge::Stack<core_options::entry *>::get(L, 1); + if(!e) { + return 0; + } + + luaL_argcheck(L, !lua_isfunction(L, 2), 2, "optional argument: unsupported value"); + + if (!lua_isnone(L, 2)) + { + std::string error; + // FIXME: not working with ui_options::entry + // TODO: optional arg for priority + luaThis->machine().options().set_value(e->name(), + lua_isboolean(L, 2) ? (lua_toboolean(L, 2) ? "1" : "0") : lua_tostring(L, 2), + OPTION_PRIORITY_CMDLINE, error); + + if (!error.empty()) + { + luaL_error(L, "%s", error.c_str()); + } + } + + switch (e->type()) + { + case OPTION_BOOLEAN: + lua_pushboolean(L, (atoi(e->value()) != 0)); + break; + case OPTION_INTEGER: + lua_pushnumber(L, atoi(e->value())); + break; + case OPTION_FLOAT: + lua_pushnumber(L, atof(e->value())); + break; + default: + lua_pushstring(L, e->value()); + break; + } + + return 1; +} + +//------------------------------------------------- +// begin_recording - start avi +// -> manager:machine():video():begin_recording() +//------------------------------------------------- + +int lua_engine::lua_video::l_begin_recording(lua_State *L) +{ + video_manager *vm = luabridge::Stack<video_manager *>::get(L, 1); + if (!vm) { + return 0; + } + + luaL_argcheck(L, lua_isstring(L, 2) || lua_isnone(L, 2), 2, "optional argument: filename, string expected"); + + const char *filename = lua_tostring(L, 2); + if (!lua_isnone(L, 2)) { + std::string vidname(filename); + strreplace(vidname, "/", PATH_SEPARATOR); + strreplace(vidname, "%g", luaThis->machine().basename()); + filename = vidname.c_str(); + } else { + filename = nullptr; + } + vm->begin_recording(filename, video_manager::MF_AVI); + + return 1; +} + +//------------------------------------------------- +// end_recording - start saving avi +// -> manager:machine():video():end_recording() +//------------------------------------------------- + +int lua_engine::lua_video::l_end_recording(lua_State *L) +{ + video_manager *vm = luabridge::Stack<video_manager *>::get(L, 1); + if (!vm) { + return 0; + } + + if (!vm->is_recording()) { + lua_writestringerror("%s", "No active recording to stop"); + return 0; + } + + vm->end_recording(video_manager::MF_AVI); + return 1; +} + //------------------------------------------------- // screen_height - return screen visible height // -> manager:machine().screens[":screen"]:height() @@ -618,6 +846,87 @@ int lua_engine::lua_screen::l_width(lua_State *L) } //------------------------------------------------- +// screen_refresh - return screen refresh rate +// -> manager:machine().screens[":screen"]:refresh() +//------------------------------------------------- + +int lua_engine::lua_screen::l_refresh(lua_State *L) +{ + screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1); + if(!sc) { + return 0; + } + + lua_pushnumber(L, ATTOSECONDS_TO_HZ(sc->refresh_attoseconds())); + return 1; +} + +//------------------------------------------------- +// screen_snapshot - save png bitmap of screen to snapshots folder +// -> manager:machine().screens[":screen"]:snapshot("filename.png") +//------------------------------------------------- + +int lua_engine::lua_screen::l_snapshot(lua_State *L) +{ + screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1); + if(!sc || !sc->machine().render().is_live(*sc)) + { + return 0; + } + + luaL_argcheck(L, lua_isstring(L, 2) || lua_isnone(L, 2), 2, "optional argument: filename, string expected"); + + emu_file file(sc->machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + file_error filerr; + + if (!lua_isnone(L, 2)) { + const char *filename = lua_tostring(L, 2); + std::string snapstr(filename); + strreplace(snapstr, "/", PATH_SEPARATOR); + strreplace(snapstr, "%g", sc->machine().basename()); + filerr = file.open(snapstr.c_str()); + } + else + { + filerr = sc->machine().video().open_next(file, "png"); + } + + if (filerr != FILERR_NONE) + { + luaL_error(L, "file_error=%d", filerr); + return 0; + } + + sc->machine().video().save_snapshot(sc, file); + lua_writestringerror("saved %s", file.fullpath()); + file.close(); + return 1; +} + +//------------------------------------------------- +// screen_type - return human readable screen type +// -> manager:machine().screens[":screen"]:type() +//------------------------------------------------- + +int lua_engine::lua_screen::l_type(lua_State *L) +{ + screen_device *sc = luabridge::Stack<screen_device *>::get(L, 1); + if(!sc) { + return 0; + } + + switch (sc->screen_type()) + { + case SCREEN_TYPE_RASTER: lua_pushliteral(L, "raster"); break; + case SCREEN_TYPE_VECTOR: lua_pushliteral(L, "vector"); break; + case SCREEN_TYPE_LCD: lua_pushliteral(L, "lcd"); break; + default: lua_pushliteral(L, "unknown"); break; + } + + return 1; +} + +//------------------------------------------------- // draw_box - draw a box on a screen container // -> manager:machine().screens[":screen"]:draw_box(x1, y1, x2, y2, bgcolor, linecolor) //------------------------------------------------- @@ -808,7 +1117,7 @@ struct msg { int done; } msg; -osd_lock *lock; +static std::mutex g_mutex; void lua_engine::serve_lua() { @@ -826,37 +1135,39 @@ void lua_engine::serve_lua() fgets(buff, LUA_MAXINPUT, stdin); // Create message - osd_lock_acquire(lock); - if (msg.ready == 0) { - msg.text = oldbuff; - if (oldbuff.length()!=0) msg.text.append("\n"); - msg.text.append(buff); - msg.ready = 1; - msg.done = 0; + { + std::lock_guard<std::mutex> lock(g_mutex); + if (msg.ready == 0) { + msg.text = oldbuff; + if (oldbuff.length() != 0) msg.text.append("\n"); + msg.text.append(buff); + msg.ready = 1; + msg.done = 0; + } } - osd_lock_release(lock); // Wait for response int done; do { osd_sleep(osd_ticks_per_second() / 1000); - osd_lock_acquire(lock); + std::lock_guard<std::mutex> lock(g_mutex); done = msg.done; - osd_lock_release(lock); } while (done==0); // Do action on client side - osd_lock_acquire(lock); - if (msg.status == -1){ - b = LUA_PROMPT2; - oldbuff = msg.response; - } - else { - b = LUA_PROMPT; - oldbuff = ""; + { + std::lock_guard<std::mutex> lock(g_mutex); + + if (msg.status == -1) { + b = LUA_PROMPT2; + oldbuff = msg.response; + } + else { + b = LUA_PROMPT; + oldbuff = ""; + } + msg.done = 0; } - msg.done = 0; - osd_lock_release(lock); } while (1); } @@ -883,15 +1194,30 @@ lua_engine::lua_engine() lua_gc(m_lua_state, LUA_GCSTOP, 0); /* stop collector during initialization */ luaL_openlibs(m_lua_state); /* open libraries */ - luaopen_lsqlite3(m_lua_state); + // Get package.preload so we can store builtins in it. + lua_getglobal(m_lua_state, "package"); + lua_getfield(m_lua_state, -1, "preload"); + lua_remove(m_lua_state, -2); // Remove package + + // Store uv module definition at preload.uv + lua_pushcfunction(m_lua_state, luaopen_luv); + lua_setfield(m_lua_state, -2, "luv"); + + lua_pushcfunction(m_lua_state, luaopen_zlib); + lua_setfield(m_lua_state, -2, "zlib"); + + lua_pushcfunction(m_lua_state, luaopen_lsqlite3); + lua_setfield(m_lua_state, -2, "lsqlite3"); + lua_pushcfunction(m_lua_state, luaopen_lfs); + lua_setfield(m_lua_state, -2, "lfs"); + luaopen_ioport(m_lua_state); lua_gc(m_lua_state, LUA_GCRESTART, 0); msg.ready = 0; msg.status = 0; msg.done = 0; - lock = osd_lock_alloc(); } //------------------------------------------------- @@ -903,6 +1229,98 @@ lua_engine::~lua_engine() close(); } +void lua_engine::execute_function(const char *id) +{ + lua_settop(m_lua_state, 0); + lua_getfield(m_lua_state, LUA_REGISTRYINDEX, id); + + if (lua_istable(m_lua_state, -1)) + { + lua_pushnil(m_lua_state); + while (lua_next(m_lua_state, -2) != 0) + { + if (lua_isfunction(m_lua_state, -1)) + { + lua_pcall(m_lua_state, 0, 0, 0); + } + else + { + lua_pop(m_lua_state, 1); + } + } + } +} + +int lua_engine::register_function(lua_State *L, const char *id) +{ + if (!lua_isnil(L, 1)) + luaL_checktype(L, 1, LUA_TFUNCTION); + lua_settop(L, 1); + lua_getfield(L, LUA_REGISTRYINDEX, id); + if (lua_isnil(L, -1)) + { + lua_newtable(L); + } + luaL_checktype(L, -1, LUA_TTABLE); + int len = lua_rawlen(L, -1); + lua_pushnumber(L, len + 1); + lua_pushvalue(L, 1); + lua_rawset(L, -3); /* Stores the pair in the table */ + + lua_pushvalue(L, -1); + lua_setfield(L, LUA_REGISTRYINDEX, id); + return 1; +} + +int lua_engine::l_emu_register_start(lua_State *L) +{ + return register_function(L, "LUA_ON_START"); +} + +int lua_engine::l_emu_register_stop(lua_State *L) +{ + return register_function(L, "LUA_ON_STOP"); +} + +int lua_engine::l_emu_register_pause(lua_State *L) +{ + return register_function(L, "LUA_ON_PAUSE"); +} + +int lua_engine::l_emu_register_resume(lua_State *L) +{ + return register_function(L, "LUA_ON_RESUME"); +} + +int lua_engine::l_emu_register_frame(lua_State *L) +{ + return register_function(L, "LUA_ON_FRAME"); +} + +void lua_engine::on_machine_start() +{ + execute_function("LUA_ON_START"); +} + +void lua_engine::on_machine_stop() +{ + execute_function("LUA_ON_STOP"); +} + +void lua_engine::on_machine_pause() +{ + execute_function("LUA_ON_PAUSE"); +} + +void lua_engine::on_machine_resume() +{ + execute_function("LUA_ON_RESUME"); +} + +void lua_engine::on_machine_frame() +{ + execute_function("LUA_ON_FRAME"); +} void lua_engine::update_machine() { @@ -922,10 +1340,16 @@ void lua_engine::update_machine() } port = port->next(); } + machine().add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(FUNC(lua_engine::on_machine_start), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(lua_engine::on_machine_stop), this)); + machine().add_notifier(MACHINE_NOTIFY_PAUSE, machine_notify_delegate(FUNC(lua_engine::on_machine_pause), this)); + machine().add_notifier(MACHINE_NOTIFY_RESUME, machine_notify_delegate(FUNC(lua_engine::on_machine_resume), this)); + machine().add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(FUNC(lua_engine::on_machine_frame), this)); } lua_setglobal(m_lua_state, "ioport"); } + //------------------------------------------------- // initialize - initialize lua hookup to emu engine //------------------------------------------------- @@ -948,6 +1372,11 @@ void lua_engine::initialize() .addCFunction ("start", l_emu_start ) .addCFunction ("pause", l_emu_pause ) .addCFunction ("unpause", l_emu_unpause ) + .addCFunction ("register_start", l_emu_register_start ) + .addCFunction ("register_stop", l_emu_register_stop ) + .addCFunction ("register_pause", l_emu_register_pause ) + .addCFunction ("register_resume",l_emu_register_resume ) + .addCFunction ("register_frame", l_emu_register_frame ) .beginClass <machine_manager> ("manager") .addFunction ("machine", &machine_manager::machine) .addFunction ("options", &machine_manager::options) @@ -959,14 +1388,25 @@ void lua_engine::initialize() .addFunction ("save", &running_machine::schedule_save) .addFunction ("load", &running_machine::schedule_load) .addFunction ("system", &running_machine::system) + .addFunction ("video", &running_machine::video) + .addFunction ("ui", &running_machine::ui) + .addFunction ("render", &running_machine::render) + .addFunction ("ioport", &running_machine::ioport) + .addFunction ("parameters", &running_machine::parameters) + .addFunction ("cheat", &running_machine::cheat) + .addFunction ("options", &running_machine::options) .addProperty <luabridge::LuaRef, void> ("devices", &lua_engine::l_machine_get_devices) .addProperty <luabridge::LuaRef, void> ("screens", &lua_engine::l_machine_get_screens) .endClass () .beginClass <game_driver> ("game_driver") + .addData ("source_file", &game_driver::source_file) + .addData ("parent", &game_driver::parent) .addData ("name", &game_driver::name) .addData ("description", &game_driver::description) .addData ("year", &game_driver::year) .addData ("manufacturer", &game_driver::manufacturer) + .addData ("compatible_with", &game_driver::compatible_with) + .addData ("default_layout", &game_driver::default_layout) .endClass () .beginClass <device_t> ("device") .addFunction ("name", &device_t::name) @@ -975,6 +1415,113 @@ void lua_engine::initialize() .addProperty <luabridge::LuaRef, void> ("spaces", &lua_engine::l_dev_get_memspaces) .addProperty <luabridge::LuaRef, void> ("state", &lua_engine::l_dev_get_states) .endClass() + .beginClass <cheat_manager> ("cheat") + .addProperty <bool, bool> ("enabled", &cheat_manager::enabled, &cheat_manager::set_enable) + .addFunction ("reload", &cheat_manager::reload) + .addFunction ("save_all", &cheat_manager::save_all) + .addProperty <luabridge::LuaRef, void> ("entries", &lua_engine::l_cheat_get_entries) + .endClass() + .beginClass <lua_cheat_entry> ("lua_cheat_entry") + .addCFunction ("state", &lua_cheat_entry::l_get_state) + .endClass() + .deriveClass <cheat_entry, lua_cheat_entry> ("cheat_entry") + .addFunction ("description", &cheat_entry::description) + .addFunction ("comment", &cheat_entry::comment) + .addFunction ("has_run_script", &cheat_entry::has_run_script) + .addFunction ("has_on_script", &cheat_entry::has_on_script) + .addFunction ("has_off_script", &cheat_entry::has_off_script) + .addFunction ("has_change_script", &cheat_entry::has_change_script) + .addFunction ("execute_off_script", &cheat_entry::execute_off_script) + .addFunction ("execute_on_script", &cheat_entry::execute_on_script) + .addFunction ("execute_run_script", &cheat_entry::execute_run_script) + .addFunction ("execute_change_script", &cheat_entry::execute_change_script) + .addFunction ("is_text_only", &cheat_entry::is_text_only) + .addFunction ("is_oneshot", &cheat_entry::is_oneshot) + .addFunction ("is_onoff", &cheat_entry::is_onoff) + .addFunction ("is_value_parameter", &cheat_entry::is_value_parameter) + .addFunction ("is_itemlist_parameter", &cheat_entry::is_itemlist_parameter) + .addFunction ("is_oneshot_parameter", &cheat_entry::is_oneshot_parameter) + .addFunction ("activate", &cheat_entry::activate) + .addFunction ("select_default_state", &cheat_entry::select_default_state) + .addFunction ("select_previous_state", &cheat_entry::select_previous_state) + .addFunction ("select_next_state", &cheat_entry::select_next_state) + .endClass() + .beginClass <ioport_manager> ("ioport") + .addFunction ("has_configs", &ioport_manager::has_configs) + .addFunction ("has_analog", &ioport_manager::has_analog) + .addFunction ("has_dips", &ioport_manager::has_dips) + .addFunction ("has_bioses", &ioport_manager::has_bioses) + .addFunction ("has_keyboard", &ioport_manager::has_keyboard) + .addFunction ("count_players", &ioport_manager::count_players) + .addProperty <luabridge::LuaRef, void> ("ports", &lua_engine::l_ioport_get_ports) + .endClass() + .beginClass <ioport_port> ("ioport_port") + .addFunction ("tag", &ioport_port::tag) + .addFunction ("active", &ioport_port::active) + .addFunction ("live", &ioport_port::live) + .addProperty <luabridge::LuaRef, void> ("fields", &lua_engine::l_ioports_port_get_fields) + .endClass() + .beginClass <ioport_field> ("ioport_field") + .addFunction ("set_value", &ioport_field::set_value) + .addProperty ("device", &ioport_field::device) + .addProperty ("name", &ioport_field::name) + .addProperty <UINT8, UINT8> ("player", &ioport_field::player, &ioport_field::set_player) + .addProperty ("mask", &ioport_field::mask) + .addProperty ("defvalue", &ioport_field::defvalue) + .addProperty ("sensitivity", &ioport_field::sensitivity) + .addProperty ("way", &ioport_field::way) + .addProperty ("is_analog", &ioport_field::is_analog) + .addProperty ("is_digitial_joystick", &ioport_field::is_digital_joystick) + .addProperty ("enabled", &ioport_field::enabled) + .addProperty ("unused", &ioport_field::unused) + .addProperty ("cocktail", &ioport_field::cocktail) + .addProperty ("toggle", &ioport_field::toggle) + .addProperty ("rotated", &ioport_field::rotated) + .addProperty ("analog_reverse", &ioport_field::analog_reverse) + .addProperty ("analog_reset", &ioport_field::analog_reset) + .addProperty ("analog_wraps", &ioport_field::analog_wraps) + .addProperty ("analog_invert", &ioport_field::analog_invert) + .addProperty ("impulse", &ioport_field::impulse) + .addProperty <double, double> ("crosshair_scale", &ioport_field::crosshair_scale, &ioport_field::set_crosshair_scale) + .addProperty <double, double> ("crosshair_offset", &ioport_field::crosshair_offset, &ioport_field::set_crosshair_offset) + .endClass() + .beginClass <core_options> ("core_options") + .addFunction ("help", &core_options::output_help) + .addFunction ("command", &core_options::command) + .addProperty <luabridge::LuaRef, void> ("entries", &lua_engine::l_options_get_entries) + .endClass() + .beginClass <lua_options_entry> ("lua_options_entry") + .addCFunction ("value", &lua_options_entry::l_entry_value) + .endClass() + .deriveClass <core_options::entry, lua_options_entry> ("core_options_entry") + .addFunction ("description", &core_options::entry::description) + .addFunction ("default_value", &core_options::entry::default_value) + .addFunction ("minimum", &core_options::entry::minimum) + .addFunction ("maximum", &core_options::entry::maximum) + .addFunction ("has_range", &core_options::entry::has_range) + .endClass() + .deriveClass <emu_options, core_options> ("emu_options") + .endClass() + .deriveClass <ui_options, core_options> ("ui_options") + .endClass() + .beginClass <parameters_manager> ("parameters") + .addFunction ("add", ¶meters_manager::add) + .addFunction ("lookup", ¶meters_manager::lookup) + .endClass() + .beginClass <lua_video> ("lua_video_manager") + .addCFunction ("begin_recording", &lua_video::l_begin_recording) + .addCFunction ("end_recording", &lua_video::l_end_recording) + .endClass() + .deriveClass <video_manager, lua_video> ("video") + .addFunction ("snapshot", &video_manager::save_active_screen_snapshots) + .addFunction ("is_recording", &video_manager::is_recording) + .addFunction ("skip_this_frame", &video_manager::skip_this_frame) + .addFunction ("speed_factor", &video_manager::speed_factor) + .addFunction ("speed_percent", &video_manager::speed_percent) + .addProperty <int, int> ("frameskip", &video_manager::frameskip, &video_manager::set_frameskip) + .addProperty <bool, bool> ("throttled", &video_manager::throttled, &video_manager::set_throttled) + .addProperty <float, float> ("throttle_rate", &video_manager::throttle_rate, &video_manager::set_throttle_rate) + .endClass() .beginClass <lua_addr_space> ("lua_addr_space") .addCFunction ("read_i8", &lua_addr_space::l_mem_read<INT8>) .addCFunction ("read_u8", &lua_addr_space::l_mem_read<UINT8>) @@ -996,18 +1543,61 @@ void lua_engine::initialize() .deriveClass <address_space, lua_addr_space> ("addr_space") .addFunction("name", &address_space::name) .endClass() + .beginClass <render_target> ("target") + .addFunction ("width", &render_target::width) + .addFunction ("height", &render_target::height) + .addFunction ("pixel_aspect", &render_target::pixel_aspect) + .addFunction ("hidden", &render_target::hidden) + .addFunction ("is_ui_target", &render_target::is_ui_target) + .addFunction ("index", &render_target::index) + .addProperty <float, float> ("max_update_rate", &render_target::max_update_rate, &render_target::set_max_update_rate) + .addProperty <int, int> ("view", &render_target::view, &render_target::set_view) + .addProperty <int, int> ("orientation", &render_target::orientation, &render_target::set_orientation) + .addProperty <bool, bool> ("backdrops", &render_target::backdrops_enabled, &render_target::set_backdrops_enabled) + .addProperty <bool, bool> ("overlays", &render_target::overlays_enabled, &render_target::set_overlays_enabled) + .addProperty <bool, bool> ("bezels", &render_target::bezels_enabled, &render_target::set_bezels_enabled) + .addProperty <bool, bool> ("marquees", &render_target::marquees_enabled, &render_target::set_marquees_enabled) + .addProperty <bool, bool> ("screen_overlay", &render_target::screen_overlay_enabled, &render_target::set_screen_overlay_enabled) + .addProperty <bool, bool> ("zoom", &render_target::zoom_to_screen, &render_target::set_zoom_to_screen) + .endClass() + .beginClass <render_container> ("render_container") + .addFunction ("orientation", &render_container::orientation) + .addFunction ("xscale", &render_container::xscale) + .addFunction ("yscale", &render_container::yscale) + .addFunction ("xoffset", &render_container::xoffset) + .addFunction ("yoffset", &render_container::yoffset) + .addFunction ("is_empty", &render_container::is_empty) + .endClass() + .beginClass <render_manager> ("render") + .addFunction ("max_update_rate", &render_manager::max_update_rate) + .addFunction ("ui_target", &render_manager::ui_target) + .addFunction ("ui_container", &render_manager::ui_container) + .addProperty <luabridge::LuaRef, void> ("targets", &lua_engine::l_render_get_targets) + .endClass() + .beginClass <ui_manager> ("ui") + .addFunction ("is_menu_active", &ui_manager::is_menu_active) + .addFunction ("options", &ui_manager::options) + .addProperty <bool, bool> ("show_fps", &ui_manager::show_fps, &ui_manager::set_show_fps) + .addProperty <bool, bool> ("show_profiler", &ui_manager::show_profiler, &ui_manager::set_show_profiler) + .addProperty <bool, bool> ("single_step", &ui_manager::single_step, &ui_manager::set_single_step) + .endClass() .beginClass <lua_screen> ("lua_screen_dev") .addCFunction ("draw_box", &lua_screen::l_draw_box) .addCFunction ("draw_line", &lua_screen::l_draw_line) .addCFunction ("draw_text", &lua_screen::l_draw_text) .addCFunction ("height", &lua_screen::l_height) .addCFunction ("width", &lua_screen::l_width) + .addCFunction ("refresh", &lua_screen::l_refresh) + .addCFunction ("snapshot", &lua_screen::l_snapshot) + .addCFunction ("type", &lua_screen::l_type) .endClass() .deriveClass <screen_device, lua_screen> ("screen_dev") .addFunction ("frame_number", &screen_device::frame_number) .addFunction ("name", &screen_device::name) .addFunction ("shortname", &screen_device::shortname) .addFunction ("tag", &screen_device::tag) + .addFunction ("xscale", &screen_device::xscale) + .addFunction ("yscale", &screen_device::yscale) .endClass() .beginClass <device_state_entry> ("dev_space") .addFunction ("name", &device_state_entry::symbol) @@ -1046,36 +1636,39 @@ bool lua_engine::frame_hook() void lua_engine::periodic_check() { - osd_lock_acquire(lock); + std::lock_guard<std::mutex> lock(g_mutex); if (msg.ready == 1) { - lua_settop(m_lua_state, 0); - int status = luaL_loadbuffer(m_lua_state, msg.text.c_str(), strlen(msg.text.c_str()), "=stdin"); - if (incomplete(status)==0) /* cannot try to add lines? */ - { - if (status == LUA_OK) status = docall(0, LUA_MULTRET); - report(status); - if (status == LUA_OK && lua_gettop(m_lua_state) > 0) /* any result to print? */ + lua_settop(m_lua_state, 0); + int status = luaL_loadbuffer(m_lua_state, msg.text.c_str(), msg.text.length(), "=stdin"); + if (incomplete(status)==0) /* cannot try to add lines? */ { - luaL_checkstack(m_lua_state, LUA_MINSTACK, "too many results to print"); - lua_getglobal(m_lua_state, "print"); - lua_insert(m_lua_state, 1); - if (lua_pcall(m_lua_state, lua_gettop(m_lua_state) - 1, 0, 0) != LUA_OK) - lua_writestringerror("%s\n", lua_pushfstring(m_lua_state, - "error calling " LUA_QL("print") " (%s)", - lua_tostring(m_lua_state, -1))); + if (status == LUA_OK) status = docall(0, LUA_MULTRET); + report(status); + if (status == LUA_OK && lua_gettop(m_lua_state) > 0) /* any result to print? */ + { + luaL_checkstack(m_lua_state, LUA_MINSTACK, "too many results to print"); + lua_getglobal(m_lua_state, "print"); + lua_insert(m_lua_state, 1); + if (lua_pcall(m_lua_state, lua_gettop(m_lua_state) - 1, 0, 0) != LUA_OK) + lua_writestringerror("%s\n", lua_pushfstring(m_lua_state, + "error calling " LUA_QL("print") " (%s)", + lua_tostring(m_lua_state, -1))); + } } + else + { + status = -1; + } + msg.status = status; + msg.response = msg.text; + msg.text = ""; + msg.ready = 0; + msg.done = 1; } - else - { - status = -1; - } - msg.status = status; - msg.response = msg.text; - msg.text = ""; - msg.ready = 0; - msg.done = 1; - } - osd_lock_release(lock); + auto loop = luv_loop(m_lua_state); + if (loop!=nullptr) + uv_run(loop, UV_RUN_NOWAIT); + } //------------------------------------------------- diff --git a/src/emu/luaengine.h b/src/emu/luaengine.h index 9bc6275100e..fca3a564618 100644 --- a/src/emu/luaengine.h +++ b/src/emu/luaengine.h @@ -24,6 +24,8 @@ #undef None #endif +class cheat_manager; + struct lua_State; namespace luabridge { @@ -45,6 +47,7 @@ public: void serve_lua(); void periodic_check(); bool frame_hook(); + void execute_function(const char *id); void resume(lua_State *L, int nparam = 0, lua_State *root = nullptr); void set_machine(running_machine *machine) { m_machine = machine; update_machine(); } @@ -78,6 +81,13 @@ private: running_machine &machine() const { return *m_machine; } void update_machine(); + + void on_machine_start(); + void on_machine_stop(); + void on_machine_pause(); + void on_machine_resume(); + void on_machine_frame(); + void output_notifier(const char *outname, INT32 value); static void s_output_notifier(const char *outname, INT32 value, void *param); @@ -102,9 +112,18 @@ private: static int l_emu_pause(lua_State *L); static int l_emu_unpause(lua_State *L); static int l_emu_set_hook(lua_State *L); + static int l_emu_register_start(lua_State *L); + static int l_emu_register_stop(lua_State *L); + static int l_emu_register_pause(lua_State *L); + static int l_emu_register_resume(lua_State *L); + static int l_emu_register_frame(lua_State *L); + static int register_function(lua_State *L, const char *id); // "emu.machine" namespace static luabridge::LuaRef l_machine_get_devices(const running_machine *r); + static luabridge::LuaRef l_ioport_get_ports(const ioport_manager *i); + static luabridge::LuaRef l_render_get_targets(const render_manager *r); + static luabridge::LuaRef l_ioports_port_get_fields(const ioport_port *i); static luabridge::LuaRef devtree_dfs(device_t *root, luabridge::LuaRef dev_table); static luabridge::LuaRef l_dev_get_states(const device_t *d); static UINT64 l_state_get_value(const device_state_entry *d); @@ -118,11 +137,29 @@ private: struct lua_screen { int l_height(lua_State *L); int l_width(lua_State *L); + int l_refresh(lua_State *L); + int l_type(lua_State *L); + int l_snapshot(lua_State *L); int l_draw_box(lua_State *L); int l_draw_line(lua_State *L); int l_draw_text(lua_State *L); }; + struct lua_video { + int l_begin_recording(lua_State *L); + int l_end_recording(lua_State *L); + }; + + static luabridge::LuaRef l_cheat_get_entries(const cheat_manager *c); + struct lua_cheat_entry { + int l_get_state(lua_State *L); + }; + + template<typename T> static luabridge::LuaRef l_options_get_entries(const T *o); + struct lua_options_entry { + int l_entry_value(lua_State *L); + }; + void resume(void *L, INT32 param); void start(); static int luaopen_ioport(lua_State *L); diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index a80a9c1aa74..5119dec397c 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -2,69 +2,69 @@ // copyright-holders:Aaron Giles /*************************************************************************** - machine.c + machine.c - Controls execution of the core MAME system. + Controls execution of the core MAME system. **************************************************************************** - Since there has been confusion in the past over the order of - initialization and other such things, here it is, all spelled out - as of January, 2008: - - main() - - does platform-specific init - - calls mame_execute() [mame.c] - - mame_execute() [mame.c] - - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers - - begins resource tracking (level 1) - - calls create_machine [mame.c] to initialize the running_machine structure - - calls init_machine() [mame.c] - - init_machine() [mame.c] - - calls fileio_init() [fileio.c] to initialize file I/O info - - calls config_init() [config.c] to initialize configuration system - - calls input_init() [input.c] to initialize the input system - - calls output_init() [output.c] to initialize the output system - - calls state_init() [state.c] to initialize save state system - - calls state_save_allow_registration() [state.c] to allow registrations - - calls palette_init() [palette.c] to initialize palette system - - calls render_init() [render.c] to initialize the rendering system - - calls ui_init() [ui.c] to initialize the user interface - - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures - - calls timer_init() [timer.c] to reset the timer system - - calls osd_init() [osdepend.h] to do platform-specific initialization - - calls input_port_init() [inptport.c] to set up the input ports - - calls rom_init() [romload.c] to load the game's ROMs - - calls memory_init() [memory.c] to process the game's memory maps - - calls the driver's DRIVER_INIT callback - - calls device_list_start() [devintrf.c] to start any devices - - calls video_init() [video.c] to start the video system - - calls tilemap_init() [tilemap.c] to start the tilemap system - - calls crosshair_init() [crsshair.c] to configure the crosshairs - - calls sound_init() [sound.c] to start the audio system - - calls debugger_init() [debugger.c] to set up the debugger - - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks - - calls cheat_init() [cheat.c] to initialize the cheat system - - calls image_init() [image.c] to initialize the image system - - - calls config_load_settings() [config.c] to load the configuration file - - calls nvram_load [machine/generic.c] to load NVRAM - - calls ui_display_startup_screens() [ui.c] to display the startup screens - - begins resource tracking (level 2) - - calls soft_reset() [mame.c] to reset all systems - - -------------------( at this point, we're up and running )---------------------- - - - calls scheduler->timeslice() [schedule.c] over and over until we exit - - ends resource tracking (level 2), freeing all auto_mallocs and timers - - calls the nvram_save() [machine/generic.c] to save NVRAM - - calls config_save_settings() [config.c] to save the game's configuration - - calls all registered exit routines [mame.c] - - ends resource tracking (level 1), freeing all auto_mallocs and timers - - - exits the program + Since there has been confusion in the past over the order of + initialization and other such things, here it is, all spelled out + as of January, 2008: + + main() + - does platform-specific init + - calls mame_execute() [mame.c] + + mame_execute() [mame.c] + - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers + - begins resource tracking (level 1) + - calls create_machine [mame.c] to initialize the running_machine structure + - calls init_machine() [mame.c] + + init_machine() [mame.c] + - calls fileio_init() [fileio.c] to initialize file I/O info + - calls config_init() [config.c] to initialize configuration system + - calls input_init() [input.c] to initialize the input system + - calls output_init() [output.c] to initialize the output system + - calls state_init() [state.c] to initialize save state system + - calls state_save_allow_registration() [state.c] to allow registrations + - calls palette_init() [palette.c] to initialize palette system + - calls render_init() [render.c] to initialize the rendering system + - calls ui_init() [ui.c] to initialize the user interface + - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures + - calls timer_init() [timer.c] to reset the timer system + - calls osd_init() [osdepend.h] to do platform-specific initialization + - calls input_port_init() [inptport.c] to set up the input ports + - calls rom_init() [romload.c] to load the game's ROMs + - calls memory_init() [memory.c] to process the game's memory maps + - calls the driver's DRIVER_INIT callback + - calls device_list_start() [devintrf.c] to start any devices + - calls video_init() [video.c] to start the video system + - calls tilemap_init() [tilemap.c] to start the tilemap system + - calls crosshair_init() [crsshair.c] to configure the crosshairs + - calls sound_init() [sound.c] to start the audio system + - calls debugger_init() [debugger.c] to set up the debugger + - calls the driver's MACHINE_START, SOUND_START, and VIDEO_START callbacks + - calls cheat_init() [cheat.c] to initialize the cheat system + - calls image_init() [image.c] to initialize the image system + + - calls config_load_settings() [config.c] to load the configuration file + - calls nvram_load [machine/generic.c] to load NVRAM + - calls ui_display_startup_screens() [ui.c] to display the startup screens + - begins resource tracking (level 2) + - calls soft_reset() [mame.c] to reset all systems + + -------------------( at this point, we're up and running )---------------------- + + - calls scheduler->timeslice() [schedule.c] over and over until we exit + - ends resource tracking (level 2), freeing all auto_mallocs and timers + - calls the nvram_save() [machine/generic.c] to save NVRAM + - calls config_save_settings() [config.c] to save the game's configuration + - calls all registered exit routines [mame.c] + - ends resource tracking (level 1), freeing all auto_mallocs and timers + + - exits the program ***************************************************************************/ @@ -78,6 +78,8 @@ #include "uiinput.h" #include "crsshair.h" #include "unzip.h" +#include "ui/datfile.h" +#include "ui/inifile.h" #include "debug/debugvw.h" #include "image.h" #include "luaengine.h" @@ -186,7 +188,10 @@ const char *running_machine::describe_context() { cpu_device *cpu = dynamic_cast<cpu_device *>(&executing->device()); if (cpu != nullptr) - strprintf(m_context, "'%s' (%s)", cpu->tag(), core_i64_format(cpu->pc(), cpu->space(AS_PROGRAM).logaddrchars(), cpu->is_octal())); + { + address_space &prg = cpu->space(AS_PROGRAM); + strprintf(m_context, "'%s' (%s)", cpu->tag(), core_i64_format(cpu->pc(), prg.logaddrchars(), prg.is_octal())); + } } else m_context.assign("(no context)"); @@ -232,6 +237,10 @@ void running_machine::start() // create the video manager m_video = std::make_unique<video_manager>(*this); m_ui = std::make_unique<ui_manager>(*this); + m_ui->init(); + + // start the inifile manager + m_inifile = std::make_unique<inifile_manager>(*this); // initialize the base time (needed for doing record/playback) ::time(&m_base_time); @@ -305,6 +314,12 @@ void running_machine::start() // allocate autoboot timer m_autoboot_timer = scheduler().timer_alloc(timer_expired_delegate(FUNC(running_machine::autoboot_callback), this)); + // start datfile manager + m_datfile = std::make_unique<datfile_manager>(*this); + + // start favorite manager + m_favorite = std::make_unique<favorite_manager>(*this); + manager().update_machine(); } @@ -372,8 +387,10 @@ int running_machine::run(bool firstrun) // execute CPUs if not paused if (!m_paused) + { m_scheduler.timeslice(); - + manager().lua()->periodic_check(); + } // otherwise, just pump video updates through else m_video->frame_update(); @@ -1309,12 +1326,12 @@ void system_time::full_time::set(struct tm &t) { second = t.tm_sec; minute = t.tm_min; - hour = t.tm_hour; - mday = t.tm_mday; + hour = t.tm_hour; + mday = t.tm_mday; month = t.tm_mon; - year = t.tm_year + 1900; + year = t.tm_year + 1900; weekday = t.tm_wday; - day = t.tm_yday; + day = t.tm_yday; is_dst = t.tm_isdst; } diff --git a/src/emu/machine.h b/src/emu/machine.h index 24b0840c93d..613e62b505e 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -95,8 +95,10 @@ class image_manager; class rom_load_manager; class debugger_manager; class osd_interface; +class datfile_manager; enum class config_type; - +class inifile_manager; +class favorite_manager; struct debugcpu_private; @@ -165,6 +167,9 @@ public: ioport_manager &ioport() { return m_ioport; } parameters_manager ¶meters() { return m_parameters; } cheat_manager &cheat() const { assert(m_cheat != nullptr); return *m_cheat; } + datfile_manager &datfile() const { assert(m_datfile != nullptr); return *m_datfile; } + inifile_manager &inifile() const { assert(m_inifile != nullptr); return *m_inifile; } + favorite_manager &favorite() const { assert(m_favorite != nullptr); return *m_favorite; } render_manager &render() const { assert(m_render != nullptr); return *m_render; } input_manager &input() const { assert(m_input != nullptr); return *m_input; } sound_manager &sound() const { assert(m_sound != nullptr); return *m_sound; } @@ -363,7 +368,10 @@ private: parameters_manager m_parameters; // parameters manager device_scheduler m_scheduler; // scheduler object emu_timer *m_autoboot_timer; // autoboot timer -}; + std::unique_ptr<datfile_manager> m_datfile; // internal data from datfile.c + std::unique_ptr<inifile_manager> m_inifile; // internal data from inifile.c for INIs + std::unique_ptr<favorite_manager> m_favorite; // internal data from inifile.c for favorites +}; #endif /* __MACHINE_H__ */ diff --git a/src/emu/mame.cpp b/src/emu/mame.cpp index e18e41329ad..813455e0b8d 100644 --- a/src/emu/mame.cpp +++ b/src/emu/mame.cpp @@ -151,6 +151,20 @@ void machine_manager::update_machine() m_lua->set_machine(m_machine); } + +void machine_manager::start_luaengine() +{ + m_lua->initialize(); + { + emu_file file(options().plugins_path(), OPEN_FLAG_READ); + file_error filerr = file.open("boot.lua"); + if (filerr == FILERR_NONE) + { + m_lua->load_script(file.fullpath()); + } + } +} + /*------------------------------------------------- execute - run the core emulation -------------------------------------------------*/ @@ -166,7 +180,6 @@ int machine_manager::execute() bool exit_pending = false; int error = MAMERR_NONE; - m_lua->initialize(); if (m_options.console()) { m_lua->start_console(); } @@ -231,6 +244,25 @@ int machine_manager::execute() m_options.set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string); } firstrun = true; + if (m_options.software_name()) + { + std::string sw_load(m_options.software_name()); + std::string sw_list, sw_name, sw_part, sw_instance, option_errors, error_string; + int left = sw_load.find_first_of(':'); + int middle = sw_load.find_first_of(':', left + 1); + int right = sw_load.find_last_of(':'); + + sw_list = sw_load.substr(0, left - 1); + sw_name = sw_load.substr(left + 1, middle - left - 1); + sw_part = sw_load.substr(middle + 1, right - middle - 1); + sw_instance = sw_load.substr(right + 1); + sw_load.assign(sw_load.substr(0, right)); + + char arg[] = "ume"; + char *argv = &arg[0]; + m_options.set_value(OPTION_SOFTWARENAME, sw_name.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + m_options.parse_slot_devices(1, &argv, option_errors, sw_instance.c_str(), sw_load.c_str()); + } } else { diff --git a/src/emu/mame.h b/src/emu/mame.h index eb2f510c114..bc21d805716 100644 --- a/src/emu/mame.h +++ b/src/emu/mame.h @@ -55,18 +55,8 @@ public: static const char * get_appname(); static const char * get_appname_lower(); static const char * get_configname(); - static const char * get_capgamenoun(); - static const char * get_capstartgamenoun(); - static const char * get_gamenoun(); - static const char * get_gamesnoun(); static const char * get_copyright(); static const char * get_copyright_info(); - static const char * get_disclaimer(); - static const char * get_usage(); - static const char * get_xml_root(); - static const char * get_xml_top(); - static const char * get_state_magic_num(); - static void printf_usage(const char *par1, const char *par2); }; class lua_engine; @@ -96,6 +86,7 @@ public: /* execute as configured by the OPTION_SYSTEMNAME option on the specified options */ int execute(); + void start_luaengine(); void schedule_new_driver(const game_driver &driver); private: osd_interface & m_osd; // reference to OSD system diff --git a/src/emu/memory.cpp b/src/emu/memory.cpp index 598ffab9ac6..aa33faf65cf 100644 --- a/src/emu/memory.cpp +++ b/src/emu/memory.cpp @@ -673,15 +673,10 @@ private: { if (m_space.log_unmap() && !m_space.debugger_access()) { - device_execute_interface *intf; - bool is_octal = false; - if (m_space.device().interface(intf)) - is_octal = intf->is_octal(); - m_space.device().logerror("%s: unmapped %s memory read from %s & %s\n", m_space.machine().describe_context(), m_space.name(), - core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),is_octal), - core_i64_format(mask, 2 * sizeof(_UintType),is_octal)); + core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),m_space.is_octal()), + core_i64_format(mask, 2 * sizeof(_UintType),m_space.is_octal())); } return m_space.unmap(); } @@ -746,16 +741,11 @@ private: { if (m_space.log_unmap() && !m_space.debugger_access()) { - device_execute_interface *intf; - bool is_octal = false; - if (m_space.device().interface(intf)) - is_octal = intf->is_octal(); - m_space.device().logerror("%s: unmapped %s memory write to %s = %s & %s\n", m_space.machine().describe_context(), m_space.name(), - core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),is_octal), - core_i64_format(data, 2 * sizeof(_UintType),is_octal), - core_i64_format(mask, 2 * sizeof(_UintType),is_octal)); + core_i64_format(m_space.byte_to_address(offset * sizeof(_UintType)), m_space.addrchars(),m_space.is_octal()), + core_i64_format(data, 2 * sizeof(_UintType),m_space.is_octal()), + core_i64_format(mask, 2 * sizeof(_UintType),m_space.is_octal())); } } @@ -896,9 +886,9 @@ public: printf(" read_byte = "); printf("%02X\n", result8 = read_byte(address)); assert(result8 == expected8); // validate word accesses (if aligned) - if (address % 2 == 0) { printf(" read_word = "); printf("%04X\n", result16 = read_word(address)); assert(result16 == expected16); } - if (address % 2 == 0) { printf(" read_word (0xff00) = "); printf("%04X\n", result16 = read_word(address, 0xff00)); assert((result16 & 0xff00) == (expected16 & 0xff00)); } - if (address % 2 == 0) { printf(" (0x00ff) = "); printf("%04X\n", result16 = read_word(address, 0x00ff)); assert((result16 & 0x00ff) == (expected16 & 0x00ff)); } + if (WORD_ALIGNED(address)) { printf(" read_word = "); printf("%04X\n", result16 = read_word(address)); assert(result16 == expected16); } + if (WORD_ALIGNED(address)) { printf(" read_word (0xff00) = "); printf("%04X\n", result16 = read_word(address, 0xff00)); assert((result16 & 0xff00) == (expected16 & 0xff00)); } + if (WORD_ALIGNED(address)) { printf(" (0x00ff) = "); printf("%04X\n", result16 = read_word(address, 0x00ff)); assert((result16 & 0x00ff) == (expected16 & 0x00ff)); } // validate unaligned word accesses printf(" read_word_unaligned = "); printf("%04X\n", result16 = read_word_unaligned(address)); assert(result16 == expected16); @@ -906,15 +896,15 @@ public: printf(" (0x00ff) = "); printf("%04X\n", result16 = read_word_unaligned(address, 0x00ff)); assert((result16 & 0x00ff) == (expected16 & 0x00ff)); // validate dword acceses (if aligned) - if (address % 4 == 0) { printf(" read_dword = "); printf("%08X\n", result32 = read_dword(address)); assert(result32 == expected32); } - if (address % 4 == 0) { printf(" read_dword (0xff000000) = "); printf("%08X\n", result32 = read_dword(address, 0xff000000)); assert((result32 & 0xff000000) == (expected32 & 0xff000000)); } - if (address % 4 == 0) { printf(" (0x00ff0000) = "); printf("%08X\n", result32 = read_dword(address, 0x00ff0000)); assert((result32 & 0x00ff0000) == (expected32 & 0x00ff0000)); } - if (address % 4 == 0) { printf(" (0x0000ff00) = "); printf("%08X\n", result32 = read_dword(address, 0x0000ff00)); assert((result32 & 0x0000ff00) == (expected32 & 0x0000ff00)); } - if (address % 4 == 0) { printf(" (0x000000ff) = "); printf("%08X\n", result32 = read_dword(address, 0x000000ff)); assert((result32 & 0x000000ff) == (expected32 & 0x000000ff)); } - if (address % 4 == 0) { printf(" (0xffff0000) = "); printf("%08X\n", result32 = read_dword(address, 0xffff0000)); assert((result32 & 0xffff0000) == (expected32 & 0xffff0000)); } - if (address % 4 == 0) { printf(" (0x0000ffff) = "); printf("%08X\n", result32 = read_dword(address, 0x0000ffff)); assert((result32 & 0x0000ffff) == (expected32 & 0x0000ffff)); } - if (address % 4 == 0) { printf(" (0xffffff00) = "); printf("%08X\n", result32 = read_dword(address, 0xffffff00)); assert((result32 & 0xffffff00) == (expected32 & 0xffffff00)); } - if (address % 4 == 0) { printf(" (0x00ffffff) = "); printf("%08X\n", result32 = read_dword(address, 0x00ffffff)); assert((result32 & 0x00ffffff) == (expected32 & 0x00ffffff)); } + if (DWORD_ALIGNED(address)) { printf(" read_dword = "); printf("%08X\n", result32 = read_dword(address)); assert(result32 == expected32); } + if (DWORD_ALIGNED(address)) { printf(" read_dword (0xff000000) = "); printf("%08X\n", result32 = read_dword(address, 0xff000000)); assert((result32 & 0xff000000) == (expected32 & 0xff000000)); } + if (DWORD_ALIGNED(address)) { printf(" (0x00ff0000) = "); printf("%08X\n", result32 = read_dword(address, 0x00ff0000)); assert((result32 & 0x00ff0000) == (expected32 & 0x00ff0000)); } + if (DWORD_ALIGNED(address)) { printf(" (0x0000ff00) = "); printf("%08X\n", result32 = read_dword(address, 0x0000ff00)); assert((result32 & 0x0000ff00) == (expected32 & 0x0000ff00)); } + if (DWORD_ALIGNED(address)) { printf(" (0x000000ff) = "); printf("%08X\n", result32 = read_dword(address, 0x000000ff)); assert((result32 & 0x000000ff) == (expected32 & 0x000000ff)); } + if (DWORD_ALIGNED(address)) { printf(" (0xffff0000) = "); printf("%08X\n", result32 = read_dword(address, 0xffff0000)); assert((result32 & 0xffff0000) == (expected32 & 0xffff0000)); } + if (DWORD_ALIGNED(address)) { printf(" (0x0000ffff) = "); printf("%08X\n", result32 = read_dword(address, 0x0000ffff)); assert((result32 & 0x0000ffff) == (expected32 & 0x0000ffff)); } + if (DWORD_ALIGNED(address)) { printf(" (0xffffff00) = "); printf("%08X\n", result32 = read_dword(address, 0xffffff00)); assert((result32 & 0xffffff00) == (expected32 & 0xffffff00)); } + if (DWORD_ALIGNED(address)) { printf(" (0x00ffffff) = "); printf("%08X\n", result32 = read_dword(address, 0x00ffffff)); assert((result32 & 0x00ffffff) == (expected32 & 0x00ffffff)); } // validate unaligned dword accesses printf(" read_dword_unaligned = "); printf("%08X\n", result32 = read_dword_unaligned(address)); assert(result32 == expected32); @@ -928,37 +918,37 @@ public: printf(" (0x00ffffff) = "); printf("%08X\n", result32 = read_dword_unaligned(address, 0x00ffffff)); assert((result32 & 0x00ffffff) == (expected32 & 0x00ffffff)); // validate qword acceses (if aligned) - if (address % 8 == 0) { printf(" read_qword = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address), 16)); assert(result64 == expected64); } - if (address % 8 == 0) { printf(" read_qword (0xff00000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xff00000000000000)), 16)); assert((result64 & U64(0xff00000000000000)) == (expected64 & U64(0xff00000000000000))); } - if (address % 8 == 0) { printf(" (0x00ff000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ff000000000000)), 16)); assert((result64 & U64(0x00ff000000000000)) == (expected64 & U64(0x00ff000000000000))); } - if (address % 8 == 0) { printf(" (0x0000ff0000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ff0000000000)), 16)); assert((result64 & U64(0x0000ff0000000000)) == (expected64 & U64(0x0000ff0000000000))); } - if (address % 8 == 0) { printf(" (0x000000ff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ff00000000)), 16)); assert((result64 & U64(0x000000ff00000000)) == (expected64 & U64(0x000000ff00000000))); } - if (address % 8 == 0) { printf(" (0x00000000ff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ff000000)), 16)); assert((result64 & U64(0x00000000ff000000)) == (expected64 & U64(0x00000000ff000000))); } - if (address % 8 == 0) { printf(" (0x0000000000ff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000000000ff0000)), 16)); assert((result64 & U64(0x0000000000ff0000)) == (expected64 & U64(0x0000000000ff0000))); } - if (address % 8 == 0) { printf(" (0x000000000000ff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000000000ff00)), 16)); assert((result64 & U64(0x000000000000ff00)) == (expected64 & U64(0x000000000000ff00))); } - if (address % 8 == 0) { printf(" (0x00000000000000ff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000000000ff)), 16)); assert((result64 & U64(0x00000000000000ff)) == (expected64 & U64(0x00000000000000ff))); } - if (address % 8 == 0) { printf(" (0xffff000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffff000000000000)), 16)); assert((result64 & U64(0xffff000000000000)) == (expected64 & U64(0xffff000000000000))); } - if (address % 8 == 0) { printf(" (0x0000ffff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffff00000000)), 16)); assert((result64 & U64(0x0000ffff00000000)) == (expected64 & U64(0x0000ffff00000000))); } - if (address % 8 == 0) { printf(" (0x00000000ffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ffff0000)), 16)); assert((result64 & U64(0x00000000ffff0000)) == (expected64 & U64(0x00000000ffff0000))); } - if (address % 8 == 0) { printf(" (0x000000000000ffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000000000ffff)), 16)); assert((result64 & U64(0x000000000000ffff)) == (expected64 & U64(0x000000000000ffff))); } - if (address % 8 == 0) { printf(" (0xffffff0000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffff0000000000)), 16)); assert((result64 & U64(0xffffff0000000000)) == (expected64 & U64(0xffffff0000000000))); } - if (address % 8 == 0) { printf(" (0x0000ffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffff000000)), 16)); assert((result64 & U64(0x0000ffffff000000)) == (expected64 & U64(0x0000ffffff000000))); } - if (address % 8 == 0) { printf(" (0x000000ffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffff0000)), 16)); assert((result64 & U64(0x000000ffffff0000)) == (expected64 & U64(0x000000ffffff0000))); } - if (address % 8 == 0) { printf(" (0x0000000000ffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000000000ffffff)), 16)); assert((result64 & U64(0x0000000000ffffff)) == (expected64 & U64(0x0000000000ffffff))); } - if (address % 8 == 0) { printf(" (0xffffffff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffff00000000)), 16)); assert((result64 & U64(0xffffffff00000000)) == (expected64 & U64(0xffffffff00000000))); } - if (address % 8 == 0) { printf(" (0x00ffffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffff000000)), 16)); assert((result64 & U64(0x00ffffffff000000)) == (expected64 & U64(0x00ffffffff000000))); } - if (address % 8 == 0) { printf(" (0x0000ffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffff0000)), 16)); assert((result64 & U64(0x0000ffffffff0000)) == (expected64 & U64(0x0000ffffffff0000))); } - if (address % 8 == 0) { printf(" (0x000000ffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffffff00)), 16)); assert((result64 & U64(0x000000ffffffff00)) == (expected64 & U64(0x000000ffffffff00))); } - if (address % 8 == 0) { printf(" (0x00000000ffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ffffffff)), 16)); assert((result64 & U64(0x00000000ffffffff)) == (expected64 & U64(0x00000000ffffffff))); } - if (address % 8 == 0) { printf(" (0xffffffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffff000000)), 16)); assert((result64 & U64(0xffffffffff000000)) == (expected64 & U64(0xffffffffff000000))); } - if (address % 8 == 0) { printf(" (0x00ffffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffff0000)), 16)); assert((result64 & U64(0x00ffffffffff0000)) == (expected64 & U64(0x00ffffffffff0000))); } - if (address % 8 == 0) { printf(" (0x0000ffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffffff00)), 16)); assert((result64 & U64(0x0000ffffffffff00)) == (expected64 & U64(0x0000ffffffffff00))); } - if (address % 8 == 0) { printf(" (0x000000ffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffffffff)), 16)); assert((result64 & U64(0x000000ffffffffff)) == (expected64 & U64(0x000000ffffffffff))); } - if (address % 8 == 0) { printf(" (0xffffffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffffff0000)), 16)); assert((result64 & U64(0xffffffffffff0000)) == (expected64 & U64(0xffffffffffff0000))); } - if (address % 8 == 0) { printf(" (0x00ffffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffffff00)), 16)); assert((result64 & U64(0x00ffffffffffff00)) == (expected64 & U64(0x00ffffffffffff00))); } - if (address % 8 == 0) { printf(" (0x0000ffffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffffffff)), 16)); assert((result64 & U64(0x0000ffffffffffff)) == (expected64 & U64(0x0000ffffffffffff))); } - if (address % 8 == 0) { printf(" (0xffffffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffffffff00)), 16)); assert((result64 & U64(0xffffffffffffff00)) == (expected64 & U64(0xffffffffffffff00))); } - if (address % 8 == 0) { printf(" (0x00ffffffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffffffff)), 16)); assert((result64 & U64(0x00ffffffffffffff)) == (expected64 & U64(0x00ffffffffffffff))); } + if (QWORD_ALIGNED(address)) { printf(" read_qword = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address), 16)); assert(result64 == expected64); } + if (QWORD_ALIGNED(address)) { printf(" read_qword (0xff00000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xff00000000000000)), 16)); assert((result64 & U64(0xff00000000000000)) == (expected64 & U64(0xff00000000000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00ff000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ff000000000000)), 16)); assert((result64 & U64(0x00ff000000000000)) == (expected64 & U64(0x00ff000000000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x0000ff0000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ff0000000000)), 16)); assert((result64 & U64(0x0000ff0000000000)) == (expected64 & U64(0x0000ff0000000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x000000ff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ff00000000)), 16)); assert((result64 & U64(0x000000ff00000000)) == (expected64 & U64(0x000000ff00000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00000000ff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ff000000)), 16)); assert((result64 & U64(0x00000000ff000000)) == (expected64 & U64(0x00000000ff000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x0000000000ff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000000000ff0000)), 16)); assert((result64 & U64(0x0000000000ff0000)) == (expected64 & U64(0x0000000000ff0000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x000000000000ff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000000000ff00)), 16)); assert((result64 & U64(0x000000000000ff00)) == (expected64 & U64(0x000000000000ff00))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00000000000000ff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000000000ff)), 16)); assert((result64 & U64(0x00000000000000ff)) == (expected64 & U64(0x00000000000000ff))); } + if (QWORD_ALIGNED(address)) { printf(" (0xffff000000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffff000000000000)), 16)); assert((result64 & U64(0xffff000000000000)) == (expected64 & U64(0xffff000000000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x0000ffff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffff00000000)), 16)); assert((result64 & U64(0x0000ffff00000000)) == (expected64 & U64(0x0000ffff00000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00000000ffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ffff0000)), 16)); assert((result64 & U64(0x00000000ffff0000)) == (expected64 & U64(0x00000000ffff0000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x000000000000ffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000000000ffff)), 16)); assert((result64 & U64(0x000000000000ffff)) == (expected64 & U64(0x000000000000ffff))); } + if (QWORD_ALIGNED(address)) { printf(" (0xffffff0000000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffff0000000000)), 16)); assert((result64 & U64(0xffffff0000000000)) == (expected64 & U64(0xffffff0000000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x0000ffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffff000000)), 16)); assert((result64 & U64(0x0000ffffff000000)) == (expected64 & U64(0x0000ffffff000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x000000ffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffff0000)), 16)); assert((result64 & U64(0x000000ffffff0000)) == (expected64 & U64(0x000000ffffff0000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x0000000000ffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000000000ffffff)), 16)); assert((result64 & U64(0x0000000000ffffff)) == (expected64 & U64(0x0000000000ffffff))); } + if (QWORD_ALIGNED(address)) { printf(" (0xffffffff00000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffff00000000)), 16)); assert((result64 & U64(0xffffffff00000000)) == (expected64 & U64(0xffffffff00000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00ffffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffff000000)), 16)); assert((result64 & U64(0x00ffffffff000000)) == (expected64 & U64(0x00ffffffff000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x0000ffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffff0000)), 16)); assert((result64 & U64(0x0000ffffffff0000)) == (expected64 & U64(0x0000ffffffff0000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x000000ffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffffff00)), 16)); assert((result64 & U64(0x000000ffffffff00)) == (expected64 & U64(0x000000ffffffff00))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00000000ffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00000000ffffffff)), 16)); assert((result64 & U64(0x00000000ffffffff)) == (expected64 & U64(0x00000000ffffffff))); } + if (QWORD_ALIGNED(address)) { printf(" (0xffffffffff000000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffff000000)), 16)); assert((result64 & U64(0xffffffffff000000)) == (expected64 & U64(0xffffffffff000000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00ffffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffff0000)), 16)); assert((result64 & U64(0x00ffffffffff0000)) == (expected64 & U64(0x00ffffffffff0000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x0000ffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffffff00)), 16)); assert((result64 & U64(0x0000ffffffffff00)) == (expected64 & U64(0x0000ffffffffff00))); } + if (QWORD_ALIGNED(address)) { printf(" (0x000000ffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x000000ffffffffff)), 16)); assert((result64 & U64(0x000000ffffffffff)) == (expected64 & U64(0x000000ffffffffff))); } + if (QWORD_ALIGNED(address)) { printf(" (0xffffffffffff0000) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffffff0000)), 16)); assert((result64 & U64(0xffffffffffff0000)) == (expected64 & U64(0xffffffffffff0000))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00ffffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffffff00)), 16)); assert((result64 & U64(0x00ffffffffffff00)) == (expected64 & U64(0x00ffffffffffff00))); } + if (QWORD_ALIGNED(address)) { printf(" (0x0000ffffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x0000ffffffffffff)), 16)); assert((result64 & U64(0x0000ffffffffffff)) == (expected64 & U64(0x0000ffffffffffff))); } + if (QWORD_ALIGNED(address)) { printf(" (0xffffffffffffff00) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0xffffffffffffff00)), 16)); assert((result64 & U64(0xffffffffffffff00)) == (expected64 & U64(0xffffffffffffff00))); } + if (QWORD_ALIGNED(address)) { printf(" (0x00ffffffffffffff) = "); printf("%s\n", core_i64_hex_format(result64 = read_qword(address, U64(0x00ffffffffffffff)), 16)); assert((result64 & U64(0x00ffffffffffffff)) == (expected64 & U64(0x00ffffffffffffff))); } // validate unaligned qword accesses printf(" read_qword_unaligned = "); printf("%s\n", core_i64_hex_format(result64 = read_qword_unaligned(address), 16)); assert(result64 == expected64); diff --git a/src/emu/memory.h b/src/emu/memory.h index 3b46ac33449..0b2b493a27d 100644 --- a/src/emu/memory.h +++ b/src/emu/memory.h @@ -239,10 +239,12 @@ public: INT8 m_addrbus_shift; UINT8 m_logaddr_width; UINT8 m_page_shift; + bool m_is_octal; // to determine if messages/debugger will show octal or hex + address_map_constructor m_internal_map; address_map_constructor m_default_map; - address_map_delegate m_internal_map_delegate; - address_map_delegate m_default_map_delegate; + address_map_delegate m_internal_map_delegate; + address_map_delegate m_default_map_delegate; }; @@ -283,6 +285,7 @@ public: int addr_width() const { return m_config.addr_width(); } endianness_t endianness() const { return m_config.endianness(); } UINT64 unmap() const { return m_unmap; } + bool is_octal() const { return m_config.m_is_octal; } offs_t addrmask() const { return m_addrmask; } offs_t bytemask() const { return m_bytemask; } @@ -866,6 +869,12 @@ private: #define DWORD_XOR_LE(a) ((a) ^ NATIVE_ENDIAN_VALUE_LE_BE(0,4)) +// helpers for checking address alignment +#define WORD_ALIGNED(a) (((a) & 1) == 0) +#define DWORD_ALIGNED(a) (((a) & 3) == 0) +#define QWORD_ALIGNED(a) (((a) & 7) == 0) + + //************************************************************************** // INLINE FUNCTIONS diff --git a/src/emu/render.cpp b/src/emu/render.cpp index baa5aa8db1b..3de791eab52 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -227,7 +227,6 @@ void render_primitive::reset() //------------------------------------------------- render_primitive_list::render_primitive_list() - : m_lock(osd_lock_alloc()) { } @@ -239,7 +238,6 @@ render_primitive_list::render_primitive_list() render_primitive_list::~render_primitive_list() { release_all(); - osd_lock_free(m_lock); } @@ -296,10 +294,8 @@ inline render_primitive *render_primitive_list::alloc(render_primitive::primitiv void render_primitive_list::release_all() { // release all the live items while under the lock - acquire_lock(); m_primitive_allocator.reclaim_all(m_primlist); m_reference_allocator.reclaim_all(m_reflist); - release_lock(); } @@ -446,7 +442,7 @@ void render_texture::hq_scale(bitmap_argb32 &dest, bitmap_argb32 &source, const // get_scaled - get a scaled bitmap (if we can) //------------------------------------------------- -void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist) +void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist, UINT32 flags) { // source width/height come from the source bounds int swidth = m_sbounds.width(); @@ -681,7 +677,7 @@ void render_container::add_char(float x0, float y0, float height, float aspect, // add it like a quad item &newitem = add_generic(CONTAINER_ITEM_QUAD, bounds.x0, bounds.y0, bounds.x1, bounds.y1, argb); newitem.m_texture = texture; - newitem.m_flags = PRIMFLAG_TEXORIENT(ROT0) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA); + newitem.m_flags = PRIMFLAG_TEXORIENT(ROT0) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_PACKABLE; newitem.m_internal = INTERNAL_FLAG_CHAR; } @@ -1055,8 +1051,9 @@ int render_target::configured_view(const char *viewname, int targetindex, int nu if (strcmp(viewname, "auto") != 0) { // scan for a matching view name + size_t viewlen = strlen(viewname); for (view = view_by_index(viewindex = 0); view != nullptr; view = view_by_index(++viewindex)) - if (core_strnicmp(view->name(), viewname, strlen(viewname)) == 0) + if (core_strnicmp(view->name(), viewname, viewlen) == 0) break; } @@ -1754,7 +1751,7 @@ void render_target::add_container_primitives(render_primitive_list &list, const width = MIN(width, m_maxtexwidth); height = MIN(height, m_maxtexheight); - curitem->texture()->get_scaled(width, height, prim->texture, list); + curitem->texture()->get_scaled(width, height, prim->texture, list, curitem->flags()); // set the palette prim->texture.palette = curitem->texture()->get_adjusted_palette(container); @@ -1857,7 +1854,7 @@ void render_target::add_element_primitives(render_primitive_list &list, const ob // get the scaled texture and append it - texture->get_scaled(width, height, prim->texture, list); + texture->get_scaled(width, height, prim->texture, list, prim->flags); // compute the clip rect render_bounds cliprect; diff --git a/src/emu/render.h b/src/emu/render.h index df8896b712b..6d55c75ada9 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -49,6 +49,7 @@ //#include "osdepend.h" #include <math.h> +#include <mutex> //************************************************************************** @@ -61,7 +62,9 @@ enum BLENDMODE_NONE = 0, // no blending BLENDMODE_ALPHA, // standard alpha blend BLENDMODE_RGB_MULTIPLY, // apply source alpha to source pix, then multiply RGB values - BLENDMODE_ADD // apply source alpha to source pix, then add to destination + BLENDMODE_ADD, // apply source alpha to source pix, then add to destination + + BLENDMODE_COUNT }; @@ -104,6 +107,9 @@ const UINT32 PRIMFLAG_TYPE_MASK = 3 << PRIMFLAG_TYPE_SHIFT; const UINT32 PRIMFLAG_TYPE_LINE = 0 << PRIMFLAG_TYPE_SHIFT; const UINT32 PRIMFLAG_TYPE_QUAD = 1 << PRIMFLAG_TYPE_SHIFT; +const int PRIMFLAG_PACKABLE_SHIFT = 21; +const UINT32 PRIMFLAG_PACKABLE = 1 << PRIMFLAG_PACKABLE_SHIFT; + //************************************************************************** // MACROS //************************************************************************** @@ -322,6 +328,7 @@ public: // getters render_primitive *next() const { return m_next; } + bool packable(const INT32 pack_size) const { return (flags & PRIMFLAG_PACKABLE) && texture.base != nullptr && texture.width <= pack_size && texture.height <= pack_size; } // reset to prepare for re-use void reset(); @@ -358,8 +365,8 @@ public: render_primitive *first() const { return m_primlist.first(); } // lock management - void acquire_lock() { osd_lock_acquire(m_lock); } - void release_lock() { osd_lock_release(m_lock); } + void acquire_lock() { m_lock.lock(); } + void release_lock() { m_lock.unlock(); } // reference management void add_reference(void *refptr); @@ -388,7 +395,7 @@ private: fixed_allocator<render_primitive> m_primitive_allocator;// allocator for primitives fixed_allocator<reference> m_reference_allocator; // allocator for references - osd_lock * m_lock; // lock to protect list accesses + std::recursive_mutex m_lock; // lock to protect list accesses }; @@ -429,7 +436,7 @@ public: private: // internal helpers - void get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist); + void get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist, UINT32 flags = 0); const rgb_t *get_adjusted_palette(render_container &container); static const int MAX_TEXTURE_SCALES = 16; diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp index 63ff7dc47de..89c174c31bf 100644 --- a/src/emu/rendfont.cpp +++ b/src/emu/rendfont.cpp @@ -16,6 +16,7 @@ #include "osdepend.h" #include "uismall.fh" +#include "ui/cmdrender.h" //************************************************************************** // INLINE FUNCTIONS @@ -55,12 +56,51 @@ inline render_font::glyph &render_font::get_char(unicode_char chnum) if (!m_glyphs[chnum / 256] && m_format == FF_OSD) m_glyphs[chnum / 256] = new glyph[256]; if (!m_glyphs[chnum / 256]) - return dummy_glyph; + { + //mamep: make table for command glyph + if (chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + MAX_GLYPH_FONT) + m_glyphs[chnum / 256] = new glyph[256]; + else + return dummy_glyph; + } // if the character isn't generated yet, do it now glyph &gl = m_glyphs[chnum / 256][chnum % 256]; if (!gl.bitmap.valid()) - char_expand(chnum, gl); + { + //mamep: command glyph support + if (m_height_cmd && chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + MAX_GLYPH_FONT) + { + glyph &glyph_ch = m_glyphs_cmd[chnum / 256][chnum % 256]; + float scale = (float)m_height / (float)m_height_cmd; + if (m_format == FF_OSD) scale *= 0.90f; + + if (!glyph_ch.bitmap.valid()) + char_expand(chnum, glyph_ch); + + //mamep: for color glyph + gl.color = glyph_ch.color; + + gl.width = (int)(glyph_ch.width * scale + 0.5f); + gl.xoffs = (int)(glyph_ch.xoffs * scale + 0.5f); + gl.yoffs = (int)(glyph_ch.yoffs * scale + 0.5f); + gl.bmwidth = (int)(glyph_ch.bmwidth * scale + 0.5f); + gl.bmheight = (int)(glyph_ch.bmheight * scale + 0.5f); + + gl.bitmap.allocate(gl.bmwidth, gl.bmheight); + rectangle clip; + clip.min_x = clip.min_y = 0; + clip.max_x = glyph_ch.bitmap.width() - 1; + clip.max_y = glyph_ch.bitmap.height() - 1; + render_texture::hq_scale(gl.bitmap, glyph_ch.bitmap, clip, nullptr); + + /* wrap a texture around the bitmap */ + gl.texture = m_manager.texture_alloc(render_texture::hq_scale); + gl.texture->set_bitmap(gl.bitmap, gl.bitmap.cliprect(), TEXFORMAT_ARGB32); + } + else + char_expand(chnum, gl); + } // return the resulting character return gl; @@ -83,9 +123,12 @@ render_font::render_font(render_manager &manager, const char *filename) m_yoffs(0), m_scale(1.0f), m_rawsize(0), - m_osdfont(nullptr) + m_osdfont(nullptr), + m_height_cmd(0), + m_yoffs_cmd(0) { memset(m_glyphs, 0, sizeof(m_glyphs)); + memset(m_glyphs_cmd, 0, sizeof(m_glyphs_cmd)); // if this is an OSD font, we're done if (filename != nullptr) @@ -95,10 +138,13 @@ render_font::render_font(render_manager &manager, const char *filename) { if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height)) { - m_scale = 1.0f / (float)m_height; - m_format = FF_OSD; - return; - } + m_scale = 1.0f / (float)m_height; + m_format = FF_OSD; + + //mamep: allocate command glyph font + render_font_command_glyph(); + return; + } global_free(m_osdfont); m_osdfont = nullptr; } @@ -110,13 +156,18 @@ render_font::render_font(render_manager &manager, const char *filename) // attempt to load the cached version of the font first if (filename != nullptr && load_cached_bdf(filename)) - return; + { + //mamep: allocate command glyph font + render_font_command_glyph(); + return; + } // load the raw data instead emu_file ramfile(OPEN_FLAG_READ); file_error filerr = ramfile.open_ram(font_uismall, sizeof(font_uismall)); if (filerr == FILERR_NONE) load_cached(ramfile, 0); + render_font_command_glyph(); } @@ -138,6 +189,17 @@ render_font::~render_font() delete[] elem; } + for (auto & elem : m_glyphs_cmd) + if (elem) + { + for (unsigned int charnum = 0; charnum < 256; charnum++) + { + glyph &gl = elem[charnum]; + m_manager.texture_free(gl.texture); + } + delete[] elem; + } + // release the OSD font if (m_osdfont != nullptr) { @@ -154,8 +216,43 @@ render_font::~render_font() void render_font::char_expand(unicode_char chnum, glyph &gl) { + rgb_t color = rgb_t(0xff,0xff,0xff,0xff); + bool is_cmd = (chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + MAX_GLYPH_FONT); + + if (gl.color) + color = gl.color; + + if (is_cmd) + { + // punt if nothing there + if (gl.bmwidth == 0 || gl.bmheight == 0 || gl.rawdata == nullptr) + return; + + // allocate a new bitmap of the size we need + gl.bitmap.allocate(gl.bmwidth, m_height_cmd); + gl.bitmap.fill(0); + + // extract the data + const char *ptr = gl.rawdata; + UINT8 accum = 0, accumbit = 7; + for (int y = 0; y < gl.bmheight; y++) + { + int desty = y + m_height_cmd + m_yoffs_cmd - gl.yoffs - gl.bmheight; + UINT32 *dest = (desty >= 0 && desty < m_height_cmd) ? &gl.bitmap.pix32(desty, 0) : nullptr; + { + for (int x = 0; x < gl.bmwidth; x++) + { + if (accumbit == 7) + accum = *ptr++; + if (dest != nullptr) + *dest++ = (accum & (1 << accumbit)) ? color : rgb_t(0x00,0xff,0xff,0xff); + accumbit = (accumbit - 1) & 7; + } + } + } + } // if we're an OSD font, query the info - if (m_format == FF_OSD) + else if (m_format == FF_OSD) { // we set bmwidth to -1 if we've previously queried and failed if (gl.bmwidth == -1) @@ -173,7 +270,6 @@ 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 { @@ -216,10 +312,10 @@ void render_font::char_expand(unicode_char chnum, glyph &gl) // expand the four bits if (dest != nullptr) { - *dest++ = (bits & 8) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff); - *dest++ = (bits & 4) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff); - *dest++ = (bits & 2) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff); - *dest++ = (bits & 1) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff); + *dest++ = (bits & 8) ? color : rgb_t(0x00,0xff,0xff,0xff); + *dest++ = (bits & 4) ? color : rgb_t(0x00,0xff,0xff,0xff); + *dest++ = (bits & 2) ? color : rgb_t(0x00,0xff,0xff,0xff); + *dest++ = (bits & 1) ? color : rgb_t(0x00,0xff,0xff,0xff); } } @@ -235,7 +331,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl) if (accumbit == 7) accum = *ptr++; if (dest != nullptr) - *dest++ = (accum & (1 << accumbit)) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff); + *dest++ = (accum & (1 << accumbit)) ? color : rgb_t(0x00,0xff,0xff,0xff); accumbit = (accumbit - 1) & 7; } } diff --git a/src/emu/rendfont.h b/src/emu/rendfont.h index aced202260d..1f05babd789 100644 --- a/src/emu/rendfont.h +++ b/src/emu/rendfont.h @@ -65,6 +65,9 @@ private: const char * rawdata; // pointer to the raw data for this one render_texture * texture; // pointer to a texture for rendering and sizing bitmap_argb32 bitmap; // pointer to the bitmap containing the raw data + + rgb_t color; + }; // internal format @@ -82,8 +85,11 @@ private: bool load_cached_bdf(const char *filename); bool load_bdf(); bool load_cached(emu_file &file, UINT32 hash); + bool load_cached_cmd(emu_file &file, UINT32 hash); bool save_cached(const char *filename, UINT32 hash); + void render_font_command_glyph(); + // internal state render_manager & m_manager; format m_format; // format of font data @@ -93,7 +99,12 @@ private: glyph *m_glyphs[256]; // array of glyph subtables std::vector<char> m_rawdata; // pointer to the raw data for the font UINT64 m_rawsize; // size of the raw font data - osd_font *m_osdfont; // handle to the OSD font + osd_font *m_osdfont; // handle to the OSD font + + int m_height_cmd; // height of the font, from ascent to descent + int m_yoffs_cmd; // y offset from baseline to descent + glyph *m_glyphs_cmd[256]; // array of glyph subtables + std::vector<char> m_rawdata_cmd; // pointer to the raw data for the font // constants static const int CACHED_CHAR_SIZE = 12; @@ -101,5 +112,6 @@ private: static const int CACHED_BDF_HASH_SIZE = 1024; }; +void convert_command_glyph(std::string &s); #endif /* __RENDFONT_H__ */ diff --git a/src/emu/rendutil.cpp b/src/emu/rendutil.cpp index 1a487536455..6d0bde63adb 100644 --- a/src/emu/rendutil.cpp +++ b/src/emu/rendutil.cpp @@ -35,7 +35,7 @@ static bool copy_png_alpha_to_bitmap(bitmap_argb32 &bitmap, const png_info *png) quality resampling of a texture -------------------------------------------------*/ -void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color) +void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color, bool force) { if (dest.width() == 0 || dest.height() == 0) return; @@ -52,7 +52,7 @@ void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, UINT32 dy = (sheight << 12) / dheight; /* if the source is higher res than the target, use full averaging */ - if (dx > 0x1000 || dy > 0x1000) + if (dx > 0x1000 || dy > 0x1000 || force) resample_argb_bitmap_average(&dest.pix(0), dest.rowpixels(), dwidth, dheight, sbase, source.rowpixels(), swidth, sheight, color, dx, dy); else resample_argb_bitmap_bilinear(&dest.pix(0), dest.rowpixels(), dwidth, dheight, sbase, source.rowpixels(), swidth, sheight, color, dx, dy); diff --git a/src/emu/rendutil.h b/src/emu/rendutil.h index d992d35d88c..34a9c2ef75c 100644 --- a/src/emu/rendutil.h +++ b/src/emu/rendutil.h @@ -21,7 +21,7 @@ /* ----- render utilities ----- */ -void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color); +void render_resample_argb_bitmap_hq(bitmap_argb32 &dest, bitmap_argb32 &source, const render_color &color, bool force = false); int render_clip_line(render_bounds *bounds, const render_bounds *clip); int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_quad_texuv *texcoords); void render_line_to_quad(const render_bounds *bounds, float width, render_bounds *bounds0, render_bounds *bounds1); diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp index 28cc994402c..886093edf13 100644 --- a/src/emu/romload.cpp +++ b/src/emu/romload.cpp @@ -302,8 +302,8 @@ void rom_load_manager::determine_bios_rom(device_t *device, const char *specbios /* if we got neither an empty string nor 'default' then warn the user */ if (specbios[0] != 0 && strcmp(specbios, "default") != 0) { - strcatprintf(m_errorstring, "%s: invalid bios\n", specbios); - m_errors++; + strcatprintf(m_errorstring, "%s: invalid bios, reverting to default\n", specbios); + m_warnings++; } /* set to default */ @@ -464,7 +464,7 @@ void rom_load_manager::display_loading_rom_message(const char *name, bool from_l char buffer[200]; if (name != nullptr) - sprintf(buffer, "Loading %s (%d%%)", from_list ? "Software" : emulator_info::get_capstartgamenoun(), (UINT32)(100 * (UINT64)m_romsloadedsize / (UINT64)m_romstotalsize)); + sprintf(buffer, "%s (%d%%)", from_list ? "Loading Software" : "Loading Machine", (UINT32)(100 * (UINT64)m_romsloadedsize / (UINT64)m_romstotalsize)); else sprintf(buffer, "Loading Complete"); @@ -488,15 +488,13 @@ void rom_load_manager::display_rom_load_results(bool from_list) { /* create the error message and exit fatally */ osd_printf_error("%s", m_errorstring.c_str()); - fatalerror_exitcode(machine(), MAMERR_MISSING_FILES, "Required files are missing, the %s cannot be run.",emulator_info::get_gamenoun()); + fatalerror_exitcode(machine(), MAMERR_MISSING_FILES, "Required files are missing, the machine cannot be run."); } /* if we had warnings, output them, but continue */ if ((m_warnings) || (m_knownbad)) { - m_errorstring.append("WARNING: the "); - m_errorstring.append(emulator_info::get_gamenoun()); - m_errorstring.append(" might not run correctly."); + m_errorstring.append("WARNING: the machine might not run correctly."); osd_printf_warning("%s\n", m_errorstring.c_str()); } } diff --git a/src/emu/save.cpp b/src/emu/save.cpp index 4a5b3ef7ebf..89197ab224e 100644 --- a/src/emu/save.cpp +++ b/src/emu/save.cpp @@ -49,6 +49,7 @@ enum SS_MSB_FIRST = 0x02 }; +#define STATE_MAGIC_NUM "MAMESAVE" //************************************************************************** // INITIALIZATION @@ -292,7 +293,7 @@ save_error save_manager::write_file(emu_file &file) // generate the header UINT8 header[HEADER_SIZE]; - memcpy(&header[0], emulator_info::get_state_magic_num(), 8); + memcpy(&header[0], STATE_MAGIC_NUM, 8); header[8] = SAVE_VERSION; header[9] = NATIVE_ENDIAN_VALUE_LE_BE(0, SS_MSB_FIRST); strncpy((char *)&header[0x0a], machine().system().name, 0x1c - 0x0a); @@ -365,7 +366,7 @@ save_error save_manager::validate_header(const UINT8 *header, const char *gamena void (CLIB_DECL *errormsg)(const char *fmt, ...), const char *error_prefix) { // check magic number - if (memcmp(header, emulator_info::get_state_magic_num(), 8)) + if (memcmp(header, STATE_MAGIC_NUM, 8)) { if (errormsg != nullptr) (*errormsg)("%sThis is not a %s save file", error_prefix,emulator_info::get_appname()); diff --git a/src/emu/sound/wavwrite.cpp b/src/emu/sound/wavwrite.cpp index 210b1bcc9d5..173962ea46c 100644 --- a/src/emu/sound/wavwrite.cpp +++ b/src/emu/sound/wavwrite.cpp @@ -18,7 +18,7 @@ wav_file *wav_open(const char *filename, int sample_rate, int channels) UINT16 align, temp16; /* allocate memory for the wav struct */ - wav = (wav_file *) global_alloc(wav_file); + wav = global_alloc_nothrow(wav_file); if (!wav) return nullptr; diff --git a/src/emu/ui/auditmenu.cpp b/src/emu/ui/auditmenu.cpp new file mode 100644 index 00000000000..97d84568118 --- /dev/null +++ b/src/emu/ui/auditmenu.cpp @@ -0,0 +1,200 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/auditmenu.cpp + + Internal UI user interface. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "audit.h" +#include "ui/auditmenu.h" +#include <algorithm> + +extern const char UI_VERSION_TAG[]; + +//------------------------------------------------- +// sort +//------------------------------------------------- + +inline int cs_stricmp(const char *s1, const char *s2) +{ + for (;;) + { + int c1 = tolower((UINT8)*s1++); + int c2 = tolower((UINT8)*s2++); + if (c1 == 0 || c1 != c2) + return c1 - c2; + } +} + +bool sorted_game_list(const game_driver *x, const game_driver *y) +{ + bool clonex = strcmp(x->parent, "0"); + bool cloney = strcmp(y->parent, "0"); + + if (!clonex && !cloney) + return (cs_stricmp(x->description, y->description) < 0); + + int cx = -1, cy = -1; + if (clonex) + { + cx = driver_list::find(x->parent); + if (cx == -1 || (driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0) + clonex = false; + } + + if (cloney) + { + cy = driver_list::find(y->parent); + if (cy == -1 || (driver_list::driver(cy).flags & MACHINE_IS_BIOS_ROOT) != 0) + cloney = false; + } + + if (!clonex && !cloney) + return (cs_stricmp(x->description, y->description) < 0); + else if (clonex && cloney) + { + if (!cs_stricmp(x->parent, y->parent)) + return (cs_stricmp(x->description, y->description) < 0); + else + return (cs_stricmp(driver_list::driver(cx).description, driver_list::driver(cy).description) < 0); + } + else if (!clonex && cloney) + { + if (!cs_stricmp(x->name, y->parent)) + return true; + else + return (cs_stricmp(x->description, driver_list::driver(cy).description) < 0); + } + else + { + if (!cs_stricmp(x->parent, y->name)) + return false; + else + return (cs_stricmp(driver_list::driver(cx).description, y->description) < 0); + } +} + +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- + +ui_menu_audit::ui_menu_audit(running_machine &machine, render_container *container, std::vector<const game_driver *> &availablesorted, std::vector<const game_driver *> &unavailablesorted, int _audit_mode) + : ui_menu(machine, container), m_availablesorted(availablesorted), m_unavailablesorted(unavailablesorted), m_audit_mode(_audit_mode), m_first(true) +{ + if (m_audit_mode == 2) + { + m_availablesorted.clear(); + m_unavailablesorted.clear(); + } +} + +ui_menu_audit::~ui_menu_audit() +{ +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_audit::handle() +{ + process(UI_MENU_PROCESS_CUSTOM_ONLY); + + if (m_first) + { + machine().ui().draw_text_box(container, _("Audit in progress..."), JUSTIFY_CENTER, 0.5f, 0.5f, UI_GREEN_COLOR); + m_first = false; + return; + } + + if (m_audit_mode == 1) + { + std::vector<const game_driver *>::iterator iter = m_unavailablesorted.begin(); + while (iter != m_unavailablesorted.end()) + { + driver_enumerator enumerator(machine().options(), (*iter)->name); + enumerator.next(); + media_auditor auditor(enumerator); + media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); + + // if everything looks good, include the driver + if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + { + m_availablesorted.push_back((*iter)); + iter = m_unavailablesorted.erase(iter); + } + else + ++iter; + } + } + else + { + driver_enumerator enumerator(machine().options()); + media_auditor auditor(enumerator); + while (enumerator.next()) + { + media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); + + // if everything looks good, include the driver + if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + m_availablesorted.push_back(&enumerator.driver()); + else + m_unavailablesorted.push_back(&enumerator.driver()); + } + } + + // sort + std::stable_sort(m_availablesorted.begin(), m_availablesorted.end(), sorted_game_list); + std::stable_sort(m_unavailablesorted.begin(), m_unavailablesorted.end(), sorted_game_list); + save_available_machines(); + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST); + ui_menu::stack_pop(machine()); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_audit::populate() +{ + item_append("Dummy", nullptr, 0, (void *)(FPTR)1); +} + +//------------------------------------------------- +// save drivers infos to file +//------------------------------------------------- + +void ui_menu_audit::save_available_machines() +{ + // attempt to open the output file + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + if (file.open(emulator_info::get_configname(), "_avail.ini") == FILERR_NONE) + { + // generate header + std::string buffer = std::string("#\n").append(UI_VERSION_TAG).append(bare_build_version).append("\n#\n\n"); + strcatprintf(buffer, "%d\n", (int)m_availablesorted.size()); + strcatprintf(buffer, "%d\n", (int)m_unavailablesorted.size()); + + // generate available list + for (size_t x = 0; x < m_availablesorted.size(); ++x) + { + int find = driver_list::find(m_availablesorted[x]->name); + strcatprintf(buffer, "%d\n", find); + } + + // generate unavailable list + for (size_t x = 0; x < m_unavailablesorted.size(); ++x) + { + int find = driver_list::find(m_unavailablesorted[x]->name); + strcatprintf(buffer, "%d\n", find); + } + file.puts(buffer.c_str()); + file.close(); + } +} diff --git a/src/emu/ui/auditmenu.h b/src/emu/ui/auditmenu.h new file mode 100644 index 00000000000..caad05796a6 --- /dev/null +++ b/src/emu/ui/auditmenu.h @@ -0,0 +1,37 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/auditmenu.h + + Internal UI user interface. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_AUDIT_H__ +#define __UI_AUDIT_H__ + +//------------------------------------------------- +// class audit menu +//------------------------------------------------- + +class ui_menu_audit : public ui_menu +{ +public: + ui_menu_audit(running_machine &machine, render_container *container, std::vector<const game_driver *> &availablesorted, std::vector<const game_driver *> &unavailablesorted, int audit_mode); + virtual ~ui_menu_audit(); + virtual void populate() override; + virtual void handle() override; + +private: + std::vector<const game_driver *> &m_availablesorted; + std::vector<const game_driver *> &m_unavailablesorted; + + int m_audit_mode; + void save_available_machines(); + bool m_first; +}; + +#endif /* __UI_AUDIT_H__ */ diff --git a/src/emu/ui/barcode.cpp b/src/emu/ui/barcode.cpp index fece584c641..5b3b15d7ad0 100644 --- a/src/emu/ui/barcode.cpp +++ b/src/emu/ui/barcode.cpp @@ -69,11 +69,11 @@ void ui_menu_barcode_reader::populate() new_barcode = m_barcode_buffer; } - item_append("New Barcode:", new_barcode, 0, ITEMREF_NEW_BARCODE); + item_append(_("New Barcode:"), new_barcode, 0, ITEMREF_NEW_BARCODE); // finish up the menu item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); - item_append("Enter Code", nullptr, 0, ITEMREF_ENTER_BARCODE); + item_append(_("Enter Code"), nullptr, 0, ITEMREF_ENTER_BARCODE); customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; } @@ -115,7 +115,7 @@ void ui_menu_barcode_reader::handle() std::string tmp_file(m_barcode_buffer); //printf("code %s\n", m_barcode_buffer); if (!current_device()->is_valid(tmp_file.length())) - machine().ui().popup_time(5, "Barcode length invalid!"); + machine().ui().popup_time(5, _("Barcode length invalid!")); else { current_device()->write_code(tmp_file.c_str(), tmp_file.length()); diff --git a/src/emu/ui/cheatopt.cpp b/src/emu/ui/cheatopt.cpp index 015ccba6908..1d13f8e8c94 100644 --- a/src/emu/ui/cheatopt.cpp +++ b/src/emu/ui/cheatopt.cpp @@ -24,6 +24,7 @@ void ui_menu_cheat::handle() /* process the menu */ const ui_menu_event *menu_event = process(UI_MENU_PROCESS_LR_REPEAT); + /* handle events */ if (menu_event != nullptr && menu_event->itemref != nullptr) { @@ -33,7 +34,7 @@ void ui_menu_cheat::handle() machine().popmessage(nullptr); /* handle reset all + reset all cheats for reload all option */ - if ((FPTR)menu_event->itemref < 3 && menu_event->iptkey == IPT_UI_SELECT) + if (menu_event->itemref < ITEMREF_CHEATS_FIRST_ITEM && menu_event->iptkey == IPT_UI_SELECT) { for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next()) if (curcheat->select_default_state()) @@ -42,7 +43,7 @@ void ui_menu_cheat::handle() /* handle individual cheats */ - else if ((FPTR)menu_event->itemref > 2) + else if (menu_event->itemref > ITEMREF_CHEATS_FIRST_ITEM) { cheat_entry *curcheat = reinterpret_cast<cheat_entry *>(menu_event->itemref); const char *string; @@ -74,20 +75,26 @@ void ui_menu_cheat::handle() case IPT_UI_DOWN: string = curcheat->comment(); if (string != nullptr && string[0] != 0) - machine().popmessage("Cheat Comment:\n%s", string); + machine().popmessage(_("Cheat Comment:\n%s"), string); break; } } /* handle reload all */ - if ((FPTR)menu_event->itemref == 2 && menu_event->iptkey == IPT_UI_SELECT) + if (menu_event->itemref == ITEMREF_CHEATS_RELOAD_ALL && menu_event->iptkey == IPT_UI_SELECT) { /* re-init cheat engine and thus reload cheats/cheats have already been turned off by here */ machine().cheat().reload(); /* display the reloaded cheats */ reset(UI_MENU_RESET_REMEMBER_REF); - machine().popmessage("All cheats reloaded"); + machine().popmessage(_("All cheats reloaded")); + } + + /* handle autofire menu */ + if (menu_event->itemref == ITEMREF_CHEATS_AUTOFIRE_SETTINGS && menu_event->iptkey == IPT_UI_SELECT) + { + ui_menu::stack_push(global_alloc_clear<ui_menu_autofire>(machine(), container)); } /* if things changed, update */ @@ -110,23 +117,210 @@ void ui_menu_cheat::populate() /* iterate over cheats */ std::string text; std::string subtext; - for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next()) - { - UINT32 flags; - curcheat->menu_text(text, subtext, flags); - item_append(text.c_str(), subtext.c_str(), flags, curcheat); - } + + // add the autofire menu + item_append(_("Autofire Settings"), nullptr, 0, (void *)ITEMREF_CHEATS_AUTOFIRE_SETTINGS); /* add a separator */ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); - /* add a reset all option */ - item_append("Reset All", nullptr, 0, (void *)1); + // add other cheats + if (machine().cheat().first() != nullptr) { + for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next()) + { + UINT32 flags; + curcheat->menu_text(text, subtext, flags); + item_append(text.c_str(), subtext.c_str(), flags, curcheat); + } + + /* add a separator */ + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + /* add a reset all option */ + item_append(_("Reset All"), nullptr, 0, (void *)ITEMREF_CHEATS_RESET_ALL); - /* add a reload all cheats option */ - item_append("Reload All", nullptr, 0, (void *)2); + /* add a reload all cheats option */ + item_append(_("Reload All"), nullptr, 0, (void *)ITEMREF_CHEATS_RELOAD_ALL); + } } ui_menu_cheat::~ui_menu_cheat() { } + + + + + +/*------------------------------------------------- + menu_autofire - handle the autofire settings + menu +-------------------------------------------------*/ + +ui_menu_autofire::ui_menu_autofire(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ + screen_device_iterator iter(machine.root_device()); + const screen_device *screen = iter.first(); + + if (screen == nullptr) + { + refresh = 60.0; + } + else + { + refresh = ATTOSECONDS_TO_HZ(screen->refresh_attoseconds()); + } +} + +ui_menu_autofire::~ui_menu_autofire() +{ +} + +void ui_menu_autofire::handle() +{ + ioport_field *field; + bool changed = false; + + /* process the menu */ + const ui_menu_event *menu_event = process(0); + + /* handle events */ + if (menu_event != nullptr && menu_event->itemref != nullptr) + { + // menu item is changed using left/right keys only + if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT) + { + if (menu_event->itemref == ITEMREF_AUTOFIRE_STATUS) + { + // toggle autofire status + bool autofire_toggle = machine().ioport().get_autofire_toggle(); // (menu_event->iptkey == IPT_UI_LEFT); + machine().ioport().set_autofire_toggle(!autofire_toggle); + changed = true; + } + else if (menu_event->itemref == ITEMREF_AUTOFIRE_DELAY) + { + // change autofire frequency + int autofire_delay = machine().ioport().get_autofire_delay(); + if (menu_event->iptkey == IPT_UI_LEFT) + { + autofire_delay--; + if (autofire_delay < 1) + autofire_delay = 1; + } + else + { + autofire_delay++; + if (autofire_delay > 30) + autofire_delay = 30; + } + machine().ioport().set_autofire_delay(autofire_delay); + changed = true; + } + else + { + // enable autofire on specific button + field = (ioport_field *)menu_event->itemref; + ioport_field::user_settings settings; + field->get_user_settings(settings); + settings.autofire = (menu_event->iptkey == IPT_UI_RIGHT); + field->set_user_settings(settings); + changed = true; + } + } + } + + // if toggle settings changed, redraw menu to reflect new options + if (!changed) + { + changed = (last_toggle != machine().ioport().get_autofire_toggle()); + } + + /* if something changed, rebuild the menu */ + if (changed) + { + reset(UI_MENU_RESET_REMEMBER_REF); + } +} + + +/*------------------------------------------------- + menu_autofire_populate - populate the autofire + menu +-------------------------------------------------*/ + +void ui_menu_autofire::populate() +{ + ioport_field *field; + ioport_port *port; + char temp_text[64]; + + /* add autofire toggle item */ + bool autofire_toggle = machine().ioport().get_autofire_toggle(); + item_append(_("Autofire Status"), (autofire_toggle ? _("Disabled") : _("Enabled")), + (autofire_toggle ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW), (void *)ITEMREF_AUTOFIRE_STATUS); + + /* iterate over the input ports and add autofire toggle items */ + int menu_items = 0; + for (port = machine().ioport().first_port(); port != nullptr; port = port->next()) + { + bool is_first_button = true; + for (field = port->first_field(); field != nullptr; field = field->next()) + { + if ((field->name()) && ((field->type() >= IPT_BUTTON1 && field->type() <= IPT_BUTTON16))) // IPT_BUTTON1 + 15))) + { + menu_items++; + ioport_field::user_settings settings; + field->get_user_settings(settings); + + if (is_first_button) + { + /* add a separator for each player */ + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + is_first_button = false; + } + /* add an autofire item */ + if (!autofire_toggle) + { + // item is enabled and can be switched to values on/off + item_append(field->name(), (settings.autofire ? _("On") : _("Off")), + (settings.autofire ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW), (void *)field); + } + else + { + // item is disabled + item_append(field->name(), (settings.autofire ? _("On") : _("Off")), + MENU_FLAG_DISABLE | MENU_FLAG_INVERT, nullptr); + } + } + } + } + + /* add text item if no buttons found */ + if (menu_items==0) + { + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + item_append(_("No buttons found on this machine!"), nullptr, MENU_FLAG_DISABLE, nullptr); + } + + /* add a separator */ + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + /* add autofire delay item */ + int value = machine().ioport().get_autofire_delay(); + snprintf(temp_text, ARRAY_LENGTH(temp_text), "%d = %.2f Hz", value, (float)refresh/value); + if (!autofire_toggle) + { + item_append(_("Autofire Delay"), temp_text, MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW, (void *)ITEMREF_AUTOFIRE_DELAY); + } + else + { + item_append(_("Autofire Delay"), temp_text, MENU_FLAG_DISABLE | MENU_FLAG_INVERT, nullptr); + } + + /* add a separator */ + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + last_toggle = autofire_toggle; +} + + diff --git a/src/emu/ui/cheatopt.h b/src/emu/ui/cheatopt.h index 0358af493ab..a9321df7304 100644 --- a/src/emu/ui/cheatopt.h +++ b/src/emu/ui/cheatopt.h @@ -13,6 +13,12 @@ #ifndef __UI_CHEATOPT_H__ #define __UI_CHEATOPT_H__ +// itemrefs for key menu items +#define ITEMREF_CHEATS_RESET_ALL ((void *) 0x0001) +#define ITEMREF_CHEATS_RELOAD_ALL ((void *) 0x0002) +#define ITEMREF_CHEATS_AUTOFIRE_SETTINGS ((void *) 0x0003) +#define ITEMREF_CHEATS_FIRST_ITEM ((void *) 0x0004) + class ui_menu_cheat : public ui_menu { public: ui_menu_cheat(running_machine &machine, render_container *container); @@ -21,4 +27,23 @@ public: virtual void handle() override; }; + +// itemrefs for key menu items +#define ITEMREF_AUTOFIRE_STATUS ((void *) 0x0001) +#define ITEMREF_AUTOFIRE_DELAY ((void *) 0x0002) +#define ITEMREF_AUTOFIRE_FIRST_BUTTON ((void *) 0x0003) + +class ui_menu_autofire : public ui_menu { +public: + ui_menu_autofire(running_machine &machine, render_container *container); + virtual ~ui_menu_autofire(); + virtual void populate() override; + virtual void handle() override; + +private: + float refresh; + bool last_toggle; +}; + + #endif /* __UI_CHEATOPT_H__ */ diff --git a/src/emu/ui/cmddata.h b/src/emu/ui/cmddata.h new file mode 100644 index 00000000000..5fa2658d2cb --- /dev/null +++ b/src/emu/ui/cmddata.h @@ -0,0 +1,404 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/cmddata.h + +*********************************************************************/ +#pragma once + +#ifndef __UI_CMDDATA_H__ +#define __UI_CMDDATA_H__ + +#define BUTTON_COLOR_RED rgb_t(255,64,64) +#define BUTTON_COLOR_YELLOW rgb_t(255,238,0) +#define BUTTON_COLOR_GREEN rgb_t(0,255,64) +#define BUTTON_COLOR_BLUE rgb_t(0,170,255) +#define BUTTON_COLOR_PURPLE rgb_t(170,0,255) +#define BUTTON_COLOR_PINK rgb_t(255,0,170) +#define BUTTON_COLOR_AQUA rgb_t(0,255,204) +#define BUTTON_COLOR_SILVER rgb_t(255,0,255) +#define BUTTON_COLOR_NAVY rgb_t(255,160,0) +#define BUTTON_COLOR_LIME rgb_t(190,190,190) + +enum +{ + B_COLOR_RED, + B_COLOR_YELLOW, + B_COLOR_GREEN, + B_COLOR_BLUE, + B_COLOR_PURPLE, + B_COLOR_PINK, + B_COLOR_AQUA, + B_COLOR_SILVER, + B_COLOR_NAVY, + B_COLOR_LIME, + MAX_COLORTABLE +}; + +// command.dat symbols assigned to Unicode PUA U+E000 +#define COMMAND_UNICODE (0xe000) +#define MAX_GLYPH_FONT (150) + +// Define Game Command Font Converting Conditions +#define COMMAND_DEFAULT_TEXT '_' + +// Define Expanded Game Command ShortCut +#define COMMAND_EXPAND_TEXT '^' + +// Define Simple Game Command ShortCut +#define COMMAND_CONVERT_TEXT '@' + +// Defined Game Command Font Color Array +static rgb_t color_table[] = +{ + 0, // dummy + BUTTON_COLOR_RED, // BTN_A + BUTTON_COLOR_YELLOW, // BTN_B + BUTTON_COLOR_GREEN, // BTN_C + BUTTON_COLOR_BLUE, // BTN_D + BUTTON_COLOR_PINK, // BTN_E + BUTTON_COLOR_PURPLE, // BTN_F + BUTTON_COLOR_AQUA, // BTN_G + BUTTON_COLOR_SILVER, // BTN_H + BUTTON_COLOR_NAVY, // BTN_I + BUTTON_COLOR_LIME, // BTN_J + BUTTON_COLOR_RED, // BTN_K + BUTTON_COLOR_YELLOW, // BTN_L + BUTTON_COLOR_GREEN, // BTN_M + BUTTON_COLOR_BLUE, // BTN_N + BUTTON_COLOR_PINK, // BTN_O + BUTTON_COLOR_PURPLE, // BTN_P + BUTTON_COLOR_AQUA, // BTN_Q + BUTTON_COLOR_SILVER, // BTN_R + BUTTON_COLOR_NAVY, // BTN_S + BUTTON_COLOR_LIME, // BTN_T + BUTTON_COLOR_RED, // BTN_U + BUTTON_COLOR_YELLOW, // BTN_V + BUTTON_COLOR_GREEN, // BTN_W + BUTTON_COLOR_BLUE, // BTN_X + BUTTON_COLOR_PINK, // BTN_Y + BUTTON_COLOR_PURPLE, // BTN_Z + BUTTON_COLOR_RED, // BTN_1 + BUTTON_COLOR_YELLOW, // BTN_2 + BUTTON_COLOR_GREEN, // BTN_3 + BUTTON_COLOR_BLUE, // BTN_4 + BUTTON_COLOR_PINK, // BTN_5 + BUTTON_COLOR_PURPLE, // BTN_6 + BUTTON_COLOR_AQUA, // BTN_7 + BUTTON_COLOR_SILVER, // BTN_8 + BUTTON_COLOR_NAVY, // BTN_9 + BUTTON_COLOR_LIME, // BTN_10 + BUTTON_COLOR_BLUE, // BTN_DEC + BUTTON_COLOR_RED, // BTN_INC + 0, // BTN_+ + 0, // DIR_... + 0, // DIR_1 + 0, // DIR_2 + 0, // DIR_3 + 0, // DIR_4 + BUTTON_COLOR_RED, // Joystick Ball + 0, // DIR_6 + 0, // DIR_7 + 0, // DIR_8 + 0, // DIR_9 + 0, // DIR_N + BUTTON_COLOR_RED, // BTN_START + BUTTON_COLOR_YELLOW, // BTN_SELECT + BUTTON_COLOR_PINK, // BTN_PUNCH + BUTTON_COLOR_PURPLE, // BTN_KICK + BUTTON_COLOR_BLUE, // BTN_GUARD + 0, + BUTTON_COLOR_YELLOW, // Light Punch + BUTTON_COLOR_NAVY, // Middle Punch + BUTTON_COLOR_RED, // Strong Punch + BUTTON_COLOR_LIME, // Light Kick + BUTTON_COLOR_AQUA, // Middle Kick + BUTTON_COLOR_BLUE, // Strong Kick + BUTTON_COLOR_PURPLE, // 3 Kick + BUTTON_COLOR_PINK, // 3 Punch + BUTTON_COLOR_PURPLE, // 2 Kick + BUTTON_COLOR_PINK, // 2 Punch + BUTTON_COLOR_RED, // CUSTOM_1 + BUTTON_COLOR_YELLOW, // CUSTOM_2 + BUTTON_COLOR_GREEN, // CUSTOM_3 + BUTTON_COLOR_BLUE, // CUSTOM_4 + BUTTON_COLOR_PINK, // CUSTOM_5 + BUTTON_COLOR_PURPLE, // CUSTOM_6 + BUTTON_COLOR_AQUA, // CUSTOM_7 + BUTTON_COLOR_SILVER, // CUSTOM_8 + BUTTON_COLOR_RED, // (Cursor Up) + BUTTON_COLOR_YELLOW, // (Cursor Down) + BUTTON_COLOR_GREEN, // (Cursor Left) + BUTTON_COLOR_BLUE, // (Cursor Right) + 0, // Non Player Lever + BUTTON_COLOR_LIME, // Gray Color Lever + BUTTON_COLOR_RED, // 1 Player Lever + BUTTON_COLOR_YELLOW, // 2 Player Lever + BUTTON_COLOR_GREEN, // 3 Player Lever + BUTTON_COLOR_BLUE, // 4 Player Lever + BUTTON_COLOR_PINK, // 5 Player Lever + BUTTON_COLOR_PURPLE, // 6 Player Lever + BUTTON_COLOR_AQUA, // 7 Player Lever + BUTTON_COLOR_SILVER // 8 Player Lever +}; + +// for color glyph +#define COLOR_BUTTONS ARRAY_LENGTH(color_table) + +// Follow Varialbe Defined Arraies for Game Command Tag +struct fix_command_t +{ + unsigned char glyph_char; + const int glyph_code; +}; + + +struct fix_strings_t +{ + const char *glyph_str; + const int glyph_code; + int glyph_str_len; +}; + +static fix_command_t default_text[] = +{ + // Alphabetic Buttons (NeoGeo): A~D,H,Z + { 'A', 1 }, // BTN_A + { 'B', 2 }, // BTN_B + { 'C', 3 }, // BTN_C + { 'D', 4 }, // BTN_D + { 'H', 8 }, // BTN_H + { 'Z', 26 }, // BTN_Z + // Numerical Buttons (Capcom): 1~10 + { 'a', 27 }, // BTN_1 + { 'b', 28 }, // BTN_2 + { 'c', 29 }, // BTN_3 + { 'd', 30 }, // BTN_4 + { 'e', 31 }, // BTN_5 + { 'f', 32 }, // BTN_6 + { 'g', 33 }, // BTN_7 + { 'h', 34 }, // BTN_8 + { 'i', 35 }, // BTN_9 + { 'j', 36 }, // BTN_10 + // Directions of Arrow, Joystick Ball + { '+', 39 }, // BTN_+ + { '.', 40 }, // DIR_... + { '1', 41 }, // DIR_1 + { '2', 42 }, // DIR_2 + { '3', 43 }, // DIR_3 + { '4', 44 }, // DIR_4 + { '5', 45 }, // Joystick Ball + { '6', 46 }, // DIR_6 + { '7', 47 }, // DIR_7 + { '8', 48 }, // DIR_8 + { '9', 49 }, // DIR_9 + { 'N', 50 }, // DIR_N + // Special Buttons + { 'S', 51 }, // BTN_START + { 'P', 53 }, // BTN_PUNCH + { 'K', 54 }, // BTN_KICK + { 'G', 55 }, // BTN_GUARD + // Composition of Arrow Directions + { '!', 90 }, // Arrow + { 'k', 100 }, // Half Circle Back + { 'l', 101 }, // Half Circle Front Up + { 'm', 102 }, // Half Circle Front + { 'n', 103 }, // Half Circle Back Up + { 'o', 104 }, // 1/4 Cir For 2 Down + { 'p', 105 }, // 1/4 Cir Down 2 Back + { 'q', 106 }, // 1/4 Cir Back 2 Up + { 'r', 107 }, // 1/4 Cir Up 2 For + { 's', 108 }, // 1/4 Cir Back 2 Down + { 't', 109 }, // 1/4 Cir Down 2 For + { 'u', 110 }, // 1/4 Cir For 2 Up + { 'v', 111 }, // 1/4 Cir Up 2 Back + { 'w', 112 }, // Full Clock Forward + { 'x', 113 }, // Full Clock Back + { 'y', 114 }, // Full Count Forward + { 'z', 115 }, // Full Count Back + { 'L', 116 }, // 2x Forward + { 'M', 117 }, // 2x Back + { 'Q', 118 }, // Dragon Screw Forward + { 'R', 119 }, // Dragon Screw Back + // Big letter Text + { '^', 121 }, // AIR + { '?', 122 }, // DIR + { 'X', 124 }, // TAP + // Condition of Positions + { '|', 125 }, // Jump + { 'O', 126 }, // Hold + { '-', 127 }, // Air + { '=', 128 }, // Squatting + { '~', 131 }, // Charge + // Special Character Text + { '`', 135 }, // Small Dot + { '@', 136 }, // Double Ball + { ')', 137 }, // Single Ball + { '(', 138 }, // Solid Ball + { '*', 139 }, // Star + { '&', 140 }, // Solid star + { '%', 141 }, // Triangle + { '$', 142 }, // Solid Triangle + { '#', 143 }, // Double Square + { ']', 144 }, // Single Square + { '[', 145 }, // Solid Square + { '{', 146 }, // Down Triangle + { '}', 147 }, // Solid Down Triangle + { '<', 148 }, // Diamond + { '>', 149 }, // Solid Diamond + { 0, 0 } // end of array +}; + +static fix_command_t expand_text[] = +{ + // Alphabetic Buttons (NeoGeo): S (Slash Button) + { 's', 19 }, // BTN_S + // Special Buttons + { 'S', 52 }, // BTN_SELECT + // Multiple Punches & Kicks + { 'E', 57 }, // Light Punch + { 'F', 58 }, // Middle Punch + { 'G', 59 }, // Strong Punch + { 'H', 60 }, // Light Kick + { 'I', 61 }, // Middle Kick + { 'J', 62 }, // Strong Kick + { 'T', 63 }, // 3 Kick + { 'U', 64 }, // 3 Punch + { 'V', 65 }, // 2 Kick + { 'W', 66 }, // 2 Pick + // Composition of Arrow Directions + { '!', 91 }, // Continue Arrow + // Charge of Arrow Directions + { '1', 92 }, // Charge DIR_1 + { '2', 93 }, // Charge DIR_2 + { '3', 94 }, // Charge DIR_3 + { '4', 95 }, // Charge DIR_4 + { '6', 96 }, // Charge DIR_6 + { '7', 97 }, // Charge DIR_7 + { '8', 98 }, // Charge DIR_8 + { '9', 99 }, // Charge DIR_9 + // Big letter Text + { 'M', 123 }, // MAX + // Condition of Positions + { '-', 129 }, // Close + { '=', 130 }, // Away + { '*', 132 }, // Serious Tap + { '?', 133 }, // Any Button + { 0, 0 } // end of array +}; + +static fix_strings_t convert_text[] = +{ + // Alphabetic Buttons: A~Z + { "A-button", 1 }, // BTN_A + { "B-button", 2 }, // BTN_B + { "C-button", 3 }, // BTN_C + { "D-button", 4 }, // BTN_D + { "E-button", 5 }, // BTN_E + { "F-button", 6 }, // BTN_F + { "G-button", 7 }, // BTN_G + { "H-button", 8 }, // BTN_H + { "I-button", 9 }, // BTN_I + { "J-button", 10 }, // BTN_J + { "K-button", 11 }, // BTN_K + { "L-button", 12 }, // BTN_L + { "M-button", 13 }, // BTN_M + { "N-button", 14 }, // BTN_N + { "O-button", 15 }, // BTN_O + { "P-button", 16 }, // BTN_P + { "Q-button", 17 }, // BTN_Q + { "R-button", 18 }, // BTN_R + { "S-button", 19 }, // BTN_S + { "T-button", 20 }, // BTN_T + { "U-button", 21 }, // BTN_U + { "V-button", 22 }, // BTN_V + { "W-button", 23 }, // BTN_W + { "X-button", 24 }, // BTN_X + { "Y-button", 25 }, // BTN_Y + { "Z-button", 26 }, // BTN_Z + // Special Moves and Buttons + { "decrease", 37 }, // BTN_DEC + { "increase", 38 }, // BTN_INC + { "BALL", 45 }, // Joystick Ball + { "start", 51 }, // BTN_START + { "select", 52 }, // BTN_SELECT + { "punch", 53 }, // BTN_PUNCH + { "kick", 54 }, // BTN_KICK + { "guard", 55 }, // BTN_GUARD + { "L-punch", 57 }, // Light Punch + { "M-punch", 58 }, // Middle Punch + { "S-punch", 59 }, // Strong Punch + { "L-kick", 60 }, // Light Kick + { "M-kick", 61 }, // Middle Kick + { "S-kick", 62 }, // Strong Kick + { "3-kick", 63 }, // 3 Kick + { "3-punch", 64 }, // 3 Punch + { "2-kick", 65 }, // 2 Kick + { "2-punch", 66 }, // 2 Pick + // Custom Buttons and Cursor Buttons + { "custom1", 67 }, // CUSTOM_1 + { "custom2", 68 }, // CUSTOM_2 + { "custom3", 69 }, // CUSTOM_3 + { "custom4", 70 }, // CUSTOM_4 + { "custom5", 71 }, // CUSTOM_5 + { "custom6", 72 }, // CUSTOM_6 + { "custom7", 73 }, // CUSTOM_7 + { "custom8", 74 }, // CUSTOM_8 + { "up", 75 }, // (Cursor Up) + { "down", 76 }, // (Cursor Down) + { "left", 77 }, // (Cursor Left) + { "right", 78 }, // (Cursor Right) + // Player Lever + { "lever", 79 }, // Non Player Lever + { "nplayer", 80 }, // Gray Color Lever + { "1player", 81 }, // 1 Player Lever + { "2player", 82 }, // 2 Player Lever + { "3player", 83 }, // 3 Player Lever + { "4player", 84 }, // 4 Player Lever + { "5player", 85 }, // 5 Player Lever + { "6player", 86 }, // 6 Player Lever + { "7player", 87 }, // 7 Player Lever + { "8player", 88 }, // 8 Player Lever + // Composition of Arrow Directions + { "-->", 90 }, // Arrow + { "==>", 91 }, // Continue Arrow + { "hcb", 100 }, // Half Circle Back + { "huf", 101 }, // Half Circle Front Up + { "hcf", 102 }, // Half Circle Front + { "hub", 103 }, // Half Circle Back Up + { "qfd", 104 }, // 1/4 Cir For 2 Down + { "qdb", 105 }, // 1/4 Cir Down 2 Back + { "qbu", 106 }, // 1/4 Cir Back 2 Up + { "quf", 107 }, // 1/4 Cir Up 2 For + { "qbd", 108 }, // 1/4 Cir Back 2 Down + { "qdf", 109 }, // 1/4 Cir Down 2 For + { "qfu", 110 }, // 1/4 Cir For 2 Up + { "qub", 111 }, // 1/4 Cir Up 2 Back + { "fdf", 112 }, // Full Clock Forward + { "fub", 113 }, // Full Clock Back + { "fuf", 114 }, // Full Count Forward + { "fdb", 115 }, // Full Count Back + { "xff", 116 }, // 2x Forward + { "xbb", 117 }, // 2x Back + { "dsf", 118 }, // Dragon Screw Forward + { "dsb", 119 }, // Dragon Screw Back + // Big letter Text + { "AIR", 121 }, // AIR + { "DIR", 122 }, // DIR + { "MAX", 123 }, // MAX + { "TAP", 124 }, // TAP + // Condition of Positions + { "jump", 125 }, // Jump + { "hold", 126 }, // Hold + { "air", 127 }, // Air + { "sit", 128 }, // Squatting + { "close", 129 }, // Close + { "away", 130 }, // Away + { "charge", 131 }, // Charge + { "tap", 132 }, // Serious Tap + { "button", 133 }, // Any Button + { 0, 0 } // end of array +}; + +#endif /* __UI_CMDDATA_H__ */ diff --git a/src/emu/ui/cmdrender.h b/src/emu/ui/cmdrender.h new file mode 100644 index 00000000000..d9bf466f1e9 --- /dev/null +++ b/src/emu/ui/cmdrender.h @@ -0,0 +1,151 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/cmdrender.h + + UI rendfont. + +***************************************************************************/ + +#include "ui/uicmd14.fh" +#include "ui/cmddata.h" + +void convert_command_glyph(std::string &str) +{ + int j; + const char *s = str.c_str(); + int len = str.length(); + int buflen = (len + 2) * 2; + char *d = global_alloc_array(char, buflen); + + for (int i = j = 0; i < len;) + { + fix_command_t *fixcmd = nullptr; + unicode_char uchar; + int ucharcount = uchar_from_utf8(&uchar, s + i, len - i); + if (ucharcount == -1) + break; + else if (ucharcount != 1) + goto process_next; + else if (s[i] == '\n') + uchar = '\n'; + else if (s[i] == COMMAND_CONVERT_TEXT) + { + if (s[i] == s[i + 1]) + ++i; + else + { + fix_strings_t *fixtext = convert_text; + for (; fixtext->glyph_code; ++fixtext) + { + if (!fixtext->glyph_str_len) + fixtext->glyph_str_len = strlen(fixtext->glyph_str); + + if (strncmp(fixtext->glyph_str, s + i + 1, fixtext->glyph_str_len) == 0) + { + uchar = fixtext->glyph_code + COMMAND_UNICODE; + i += strlen(fixtext->glyph_str); + break; + } + } + } + } + else if (s[i] == COMMAND_DEFAULT_TEXT) + fixcmd = default_text; + else if (s[i] == COMMAND_EXPAND_TEXT) + fixcmd = expand_text; + + if (fixcmd) + { + if (s[i] == s[i + 1]) + i++; + else + { + for (; fixcmd->glyph_code; ++fixcmd) + if (s[i + 1] == fixcmd->glyph_char) + { + uchar = fixcmd->glyph_code + COMMAND_UNICODE; + ++i; + break; + } + } + } +process_next: + i += ucharcount; + ucharcount = utf8_from_uchar(d + j, buflen - j - 1, uchar); + if (ucharcount == -1) + break; + j += ucharcount; + } + d[j] = '\0'; + str = d; + global_free_array(d); +} + +void render_font::render_font_command_glyph() +{ + emu_file ramfile(OPEN_FLAG_READ); + + if (ramfile.open_ram(font_uicmd14, sizeof(font_uicmd14)) == FILERR_NONE) + load_cached_cmd(ramfile, 0); +} + +bool render_font::load_cached_cmd(emu_file &file, UINT32 hash) +{ + UINT64 filesize = file.size(); + UINT8 header[CACHED_HEADER_SIZE]; + UINT32 bytes_read = file.read(header, CACHED_HEADER_SIZE); + + if (bytes_read != CACHED_HEADER_SIZE) + return false; + + if (header[0] != 'f' || header[1] != 'o' || header[2] != 'n' || header[3] != 't') + return false; + if (header[4] != (UINT8)(hash >> 24) || header[5] != (UINT8)(hash >> 16) || header[6] != (UINT8)(hash >> 8) || header[7] != (UINT8)hash) + return false; + m_height_cmd = (header[8] << 8) | header[9]; + m_yoffs_cmd = (INT16)((header[10] << 8) | header[11]); + UINT32 numchars = (header[12] << 24) | (header[13] << 16) | (header[14] << 8) | header[15]; + if (filesize - CACHED_HEADER_SIZE < numchars * CACHED_CHAR_SIZE) + return false; + + m_rawdata_cmd.resize(filesize - CACHED_HEADER_SIZE); + bytes_read = file.read(&m_rawdata_cmd[0], filesize - CACHED_HEADER_SIZE); + if (bytes_read != filesize - CACHED_HEADER_SIZE) + { + m_rawdata_cmd.clear(); + return false; + } + + UINT64 offset = numchars * CACHED_CHAR_SIZE; + for (int chindex = 0; chindex < numchars; chindex++) + { + const UINT8 *info = reinterpret_cast<UINT8 *>(&m_rawdata_cmd[chindex * CACHED_CHAR_SIZE]); + int chnum = (info[0] << 8) | info[1]; + + if (!m_glyphs_cmd[chnum / 256]) + m_glyphs_cmd[chnum / 256] = new glyph[256]; + + glyph &gl = m_glyphs_cmd[chnum / 256][chnum % 256]; + + if (chnum >= COMMAND_UNICODE && chnum < COMMAND_UNICODE + COLOR_BUTTONS) + gl.color = color_table[chnum - COMMAND_UNICODE]; + + gl.width = (info[2] << 8) | info[3]; + gl.xoffs = (INT16)((info[4] << 8) | info[5]); + gl.yoffs = (INT16)((info[6] << 8) | info[7]); + gl.bmwidth = (info[8] << 8) | info[9]; + gl.bmheight = (info[10] << 8) | info[11]; + gl.rawdata = &m_rawdata_cmd[offset]; + + offset += (gl.bmwidth * gl.bmheight + 7) / 8; + if (offset > filesize - CACHED_HEADER_SIZE) + { + m_rawdata_cmd.clear(); + return false; + } + } + + return true; +} diff --git a/src/emu/ui/ctrlmenu.cpp b/src/emu/ui/ctrlmenu.cpp new file mode 100644 index 00000000000..74b35abd8e3 --- /dev/null +++ b/src/emu/ui/ctrlmenu.cpp @@ -0,0 +1,149 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/ctrlmenu.cpp + + Internal UI user interface. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "ui/ctrlmenu.h" + +const char *ui_menu_controller_mapping::m_device_status[] = { "none", "keyboard", "mouse", "lightgun", "joystick" }; + +ui_menu_controller_mapping::ctrl_option ui_menu_controller_mapping::m_options[] = { + { 0, nullptr, nullptr }, + { 0, "Lightgun Device Assignment", OPTION_LIGHTGUN_DEVICE }, + { 0, "Trackball Device Assignment", OPTION_TRACKBALL_DEVICE }, + { 0, "Pedal Device Assignment", OPTION_PEDAL_DEVICE }, + { 0, "Adstick Device Assignment", OPTION_ADSTICK_DEVICE }, + { 0, "Paddle Device Assignment", OPTION_PADDLE_DEVICE }, + { 0, "Dial Device Assignment", OPTION_DIAL_DEVICE }, + { 0, "Positional Device Assignment", OPTION_POSITIONAL_DEVICE }, + { 0, "Mouse Device Assignment", OPTION_MOUSE_DEVICE } +}; + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_controller_mapping::ui_menu_controller_mapping(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ + for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) + m_options[d].status = check_status(machine.options().value(m_options[d].option), m_options[d].option); +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_controller_mapping::~ui_menu_controller_mapping() +{ + std::string error_string; + for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) + { + if (strcmp(machine().options().value(m_options[d].option),m_device_status[m_options[d].status])!=0) + { + machine().options().set_value(m_options[d].option, m_device_status[m_options[d].status], OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(m_options[d].option); + } + } +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_controller_mapping::handle() +{ + bool changed = false; + + // process the menu + const ui_menu_event *m_event = process(0); + if (m_event != nullptr && m_event->itemref != nullptr) + { + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + changed = true; + FPTR value = (FPTR)m_event->itemref; + (m_event->iptkey == IPT_UI_RIGHT) ? m_options[value].status++ : m_options[value].status--; + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_controller_mapping::populate() +{ + // add options + for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) + { + UINT32 arrow_flags = get_arrow_flags(0, ARRAY_LENGTH(m_device_status) - 1, m_options[d].status); + item_append(m_options[d].description, m_device_status[m_options[d].status], arrow_flags, (void *)(FPTR)d); + } + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_controller_mapping::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width, maxwidth = origx2 - origx1; + ui_manager &mui = machine().ui(); + + mui.draw_text_full(container, _("Device Mapping"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, _("Device Mapping"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + +} + +//------------------------------------------------- +// return current value +//------------------------------------------------- + +int ui_menu_controller_mapping::check_status(const char *status, const char *option) +{ + for (int d = 0; *m_device_status[d]; d++) + if (!strcmp(m_device_status[d], status)) + return d; + + emu_options def_opt; + const char *def_val = def_opt.value(option); + + for (int d = 0; *m_device_status[d]; d++) + if (!strcmp(m_device_status[d], def_val)) + return d; + + return 1; +} diff --git a/src/emu/ui/ctrlmenu.h b/src/emu/ui/ctrlmenu.h new file mode 100644 index 00000000000..4c1325071d6 --- /dev/null +++ b/src/emu/ui/ctrlmenu.h @@ -0,0 +1,41 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/ctrlmenu.h + + Internal UI user interface. + +***************************************************************************/ +#pragma once + +#ifndef __UI_CTRLMENU_H__ +#define __UI_CTRLMENU_H__ + +//------------------------------------------------- +// class controller mapping menu +//------------------------------------------------- + +class ui_menu_controller_mapping : public ui_menu +{ +public: + ui_menu_controller_mapping(running_machine &machine, render_container *container); + virtual ~ui_menu_controller_mapping(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + struct ctrl_option + { + int status; + const char *description; + const char *option; + }; + + static const char *m_device_status[]; + static ctrl_option m_options[]; + int check_status(const char *status, const char *option); +}; + +#endif /* __UI_CTRLMENU_H__ */ diff --git a/src/emu/ui/custmenu.cpp b/src/emu/ui/custmenu.cpp new file mode 100644 index 00000000000..3a50f4bfc03 --- /dev/null +++ b/src/emu/ui/custmenu.cpp @@ -0,0 +1,580 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/custmenu.cpp + + Internal UI user interface. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "ui/custmenu.h" +#include "ui/selector.h" +#include "ui/inifile.h" +#include "rendfont.h" + +/************************************************** + MENU CUSTOM FILTER +**************************************************/ +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- +ui_menu_custom_filter::ui_menu_custom_filter(running_machine &machine, render_container *container, bool _single_menu) : ui_menu(machine, container) +{ + m_single_menu = _single_menu; + m_added = false; +} + +ui_menu_custom_filter::~ui_menu_custom_filter() +{ + if (m_single_menu) + ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST); + save_custom_filters(); +} + +//------------------------------------------------- +// handle +//------------------------------------------------- +void ui_menu_custom_filter::handle() +{ + bool changed = false; + m_added = false; + + // process the menu + const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT); + if (m_event != nullptr && m_event->itemref != nullptr) + { + switch ((FPTR)m_event->itemref) + { + case MAIN_FILTER: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_RIGHT) ? custfltr::main++ : custfltr::main--; + changed = true; + } + break; + + case ADD_FILTER: + if (m_event->iptkey == IPT_UI_SELECT) + { + custfltr::numother++; + custfltr::other[custfltr::numother] = FILTER_UNAVAILABLE + 1; + m_added = true; + } + break; + + case REMOVE_FILTER: + if (m_event->iptkey == IPT_UI_SELECT) + { + custfltr::other[custfltr::numother] = FILTER_UNAVAILABLE + 1; + custfltr::numother--; + changed = true; + } + break; + } + + if ((FPTR)m_event->itemref >= OTHER_FILTER && (FPTR)m_event->itemref < OTHER_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - OTHER_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && custfltr::other[pos] > FILTER_UNAVAILABLE + 1) + { + custfltr::other[pos]--; + for ( ; custfltr::other[pos] > FILTER_UNAVAILABLE && (custfltr::other[pos] == FILTER_CATEGORY + || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]--) ; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::other[pos] < FILTER_LAST - 1) + { + custfltr::other[pos]++; + for ( ; custfltr::other[pos] < FILTER_LAST && (custfltr::other[pos] == FILTER_CATEGORY + || custfltr::other[pos] == FILTER_FAVORITE); custfltr::other[pos]++) ; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + { + size_t total = main_filters::length; + std::vector<std::string> s_sel(total); + for (size_t index = 0; index < total; ++index) + if (index <= FILTER_UNAVAILABLE || index == FILTER_CATEGORY || index == FILTER_FAVORITE || index == FILTER_CUSTOM) + s_sel[index] = "_skip_"; + else + s_sel[index] = main_filters::text[index]; + + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, custfltr::other[pos])); + } + } + else if ((FPTR)m_event->itemref >= YEAR_FILTER && (FPTR)m_event->itemref < YEAR_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - YEAR_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && custfltr::year[pos] > 0) + { + custfltr::year[pos]--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::year[pos] < c_year::ui.size() - 1) + { + custfltr::year[pos]++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_year::ui, custfltr::year[pos])); + } + else if ((FPTR)m_event->itemref >= MNFCT_FILTER && (FPTR)m_event->itemref < MNFCT_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - MNFCT_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && custfltr::mnfct[pos] > 0) + { + custfltr::mnfct[pos]--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && custfltr::mnfct[pos] < c_mnfct::ui.size() - 1) + { + custfltr::mnfct[pos]++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_mnfct::ui, custfltr::mnfct[pos])); + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); + else if (m_added) + reset(UI_MENU_RESET_SELECT_FIRST); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- +void ui_menu_custom_filter::populate() +{ + // add main filter + UINT32 arrow_flags = get_arrow_flags((int)FILTER_ALL, (int)FILTER_UNAVAILABLE, custfltr::main); + item_append(_("Main filter"), main_filters::text[custfltr::main], arrow_flags, (void *)(FPTR)MAIN_FILTER); + + // add other filters + for (int x = 1; x <= custfltr::numother; x++) + { + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + // add filter items + arrow_flags = get_arrow_flags((int)FILTER_UNAVAILABLE + 1, (int)FILTER_LAST - 1, custfltr::other[x]); + item_append(_("Other filter"), main_filters::text[custfltr::other[x]], arrow_flags, (void *)(FPTR)(OTHER_FILTER + x)); + + if (m_added) + selected = item.size() - 2; + + // add manufacturer subitem + if (custfltr::other[x] == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0) + { + arrow_flags = get_arrow_flags(0, c_mnfct::ui.size() - 1, custfltr::mnfct[x]); + std::string fbuff("^!Manufacturer"); + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), c_mnfct::ui[custfltr::mnfct[x]].c_str(), arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x)); + } + + // add year subitem + else if (custfltr::other[x] == FILTER_YEAR && c_year::ui.size() > 0) + { + arrow_flags = get_arrow_flags(0, c_year::ui.size() - 1, custfltr::year[x]); + std::string fbuff("^!Year"); + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), c_year::ui[custfltr::year[x]].c_str(), arrow_flags, (void *)(FPTR)(YEAR_FILTER + x)); + } + } + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + if (custfltr::numother > 0) + item_append(_("Remove last filter"), nullptr, 0, (void *)(FPTR)REMOVE_FILTER); + + if (custfltr::numother < MAX_CUST_FILTER - 2) + item_append(_("Add filter"), nullptr, 0, (void *)(FPTR)ADD_FILTER); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- +void ui_menu_custom_filter::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + + // get the size of the text + mui.draw_text_full(container, _("Select custom filters:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; + float maxwidth = MAX(width, origx2 - origx1); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, _("Select custom filters:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} + +//------------------------------------------------- +// save custom filters info to file +//------------------------------------------------- + +void ui_menu_custom_filter::save_custom_filters() +{ + // attempt to open the output file + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + if (file.open("custom_", emulator_info::get_configname(), "_filter.ini") == FILERR_NONE) + { + // generate custom filters info + std::string cinfo; + strprintf(cinfo, "Total filters = %d\n", (custfltr::numother + 1)); + cinfo.append("Main filter = ").append(main_filters::text[custfltr::main]).append("\n"); + + for (int x = 1; x <= custfltr::numother; x++) + { + cinfo.append("Other filter = ").append(main_filters::text[custfltr::other[x]]).append("\n"); + if (custfltr::other[x] == FILTER_MANUFACTURER) + cinfo.append(" Manufacturer filter = ").append(c_mnfct::ui[custfltr::mnfct[x]]).append("\n"); + else if (custfltr::other[x] == FILTER_YEAR) + cinfo.append(" Year filter = ").append(c_year::ui[custfltr::year[x]]).append("\n"); + } + file.puts(cinfo.c_str()); + file.close(); + } +} + +/************************************************** + MENU CUSTOM SOFTWARE FILTER +**************************************************/ +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- +ui_menu_swcustom_filter::ui_menu_swcustom_filter(running_machine &machine, render_container *container, const game_driver *_driver, s_filter &_filter) : + ui_menu(machine, container), m_added(false), m_filter(_filter), m_driver(_driver) +{ +} + +ui_menu_swcustom_filter::~ui_menu_swcustom_filter() +{ + ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST); + save_sw_custom_filters(); +} + +//------------------------------------------------- +// handle +//------------------------------------------------- +void ui_menu_swcustom_filter::handle() +{ + bool changed = false; + m_added = false; + + // process the menu + const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT); + if (m_event != nullptr && m_event->itemref != nullptr) + { + switch ((FPTR)m_event->itemref) + { + case MAIN_FILTER: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_RIGHT) ? sw_custfltr::main++ : sw_custfltr::main--; + changed = true; + } + break; + + case ADD_FILTER: + if (m_event->iptkey == IPT_UI_SELECT) + { + sw_custfltr::numother++; + sw_custfltr::other[sw_custfltr::numother] = UI_SW_UNAVAILABLE + 1; + m_added = true; + } + break; + + case REMOVE_FILTER: + if (m_event->iptkey == IPT_UI_SELECT) + { + sw_custfltr::other[sw_custfltr::numother] = UI_SW_UNAVAILABLE + 1; + sw_custfltr::numother--; + changed = true; + } + break; + } + + if ((FPTR)m_event->itemref >= OTHER_FILTER && (FPTR)m_event->itemref < OTHER_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - OTHER_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::other[pos] > UI_SW_UNAVAILABLE + 1) + { + sw_custfltr::other[pos]--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::other[pos] < UI_SW_LAST - 1) + { + sw_custfltr::other[pos]++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + { + size_t total = sw_filters::length; + std::vector<std::string> s_sel(total); + for (size_t index = 0; index < total; ++index) + if (index <= UI_SW_UNAVAILABLE|| index == UI_SW_CUSTOM) + s_sel[index] = "_skip_"; + else + s_sel[index] = sw_filters::text[index]; + + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, sw_custfltr::other[pos])); + } + } + else if ((FPTR)m_event->itemref >= YEAR_FILTER && (FPTR)m_event->itemref < YEAR_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - YEAR_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::year[pos] > 0) + { + sw_custfltr::year[pos]--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::year[pos] < m_filter.year.ui.size() - 1) + { + sw_custfltr::year[pos]++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.year.ui, sw_custfltr::year[pos])); + } + else if ((FPTR)m_event->itemref >= TYPE_FILTER && (FPTR)m_event->itemref < TYPE_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - TYPE_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::type[pos] > 0) + { + sw_custfltr::type[pos]--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::type[pos] < m_filter.type.ui.size() - 1) + { + sw_custfltr::type[pos]++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.type.ui, sw_custfltr::type[pos])); + } + else if ((FPTR)m_event->itemref >= MNFCT_FILTER && (FPTR)m_event->itemref < MNFCT_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - MNFCT_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::mnfct[pos] > 0) + { + sw_custfltr::mnfct[pos]--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::mnfct[pos] < m_filter.publisher.ui.size() - 1) + { + sw_custfltr::mnfct[pos]++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.publisher.ui, sw_custfltr::mnfct[pos])); + } + else if ((FPTR)m_event->itemref >= REGION_FILTER && (FPTR)m_event->itemref < REGION_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - REGION_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::region[pos] > 0) + { + sw_custfltr::region[pos]--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::region[pos] < m_filter.region.ui.size() - 1) + { + sw_custfltr::region[pos]++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.region.ui, sw_custfltr::region[pos])); + } + else if ((FPTR)m_event->itemref >= LIST_FILTER && (FPTR)m_event->itemref < LIST_FILTER + MAX_CUST_FILTER) + { + int pos = (int)((FPTR)m_event->itemref - LIST_FILTER); + if (m_event->iptkey == IPT_UI_LEFT && sw_custfltr::list[pos] > 0) + { + sw_custfltr::list[pos]--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT && sw_custfltr::list[pos] < m_filter.swlist.name.size() - 1) + { + sw_custfltr::list[pos]++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.swlist.description, sw_custfltr::list[pos])); + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); + else if (m_added) + reset(UI_MENU_RESET_SELECT_FIRST); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- +void ui_menu_swcustom_filter::populate() +{ + // add main filter + UINT32 arrow_flags = get_arrow_flags((int)UI_SW_ALL, (int)UI_SW_UNAVAILABLE, sw_custfltr::main); + item_append(_("Main filter"), sw_filters::text[sw_custfltr::main], arrow_flags, (void *)(FPTR)MAIN_FILTER); + + // add other filters + for (int x = 1; x <= sw_custfltr::numother; x++) + { + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + // add filter items + arrow_flags = get_arrow_flags((int)UI_SW_UNAVAILABLE + 1, (int)UI_SW_LAST - 1, sw_custfltr::other[x]); + item_append(_("Other filter"), sw_filters::text[sw_custfltr::other[x]], arrow_flags, (void *)(FPTR)(OTHER_FILTER + x)); + + if (m_added) + selected = item.size() - 2; + + // add publisher subitem + if (sw_custfltr::other[x] == UI_SW_PUBLISHERS && m_filter.publisher.ui.size() > 0) + { + arrow_flags = get_arrow_flags(0, m_filter.publisher.ui.size() - 1, sw_custfltr::mnfct[x]); + std::string fbuff("^!Publisher"); + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), m_filter.publisher.ui[sw_custfltr::mnfct[x]].c_str(), arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x)); + } + + // add year subitem + else if (sw_custfltr::other[x] == UI_SW_YEARS && m_filter.year.ui.size() > 0) + { + arrow_flags = get_arrow_flags(0, m_filter.year.ui.size() - 1, sw_custfltr::year[x]); + std::string fbuff("^!Year"); + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), m_filter.year.ui[sw_custfltr::year[x]].c_str(), arrow_flags, (void *)(FPTR)(YEAR_FILTER + x)); + } + + // add year subitem + else if (sw_custfltr::other[x] == UI_SW_LIST && m_filter.swlist.name.size() > 0) + { + arrow_flags = get_arrow_flags(0, m_filter.swlist.name.size() - 1, sw_custfltr::list[x]); + std::string fbuff("^!Software List"); + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), m_filter.swlist.description[sw_custfltr::list[x]].c_str(), arrow_flags, (void *)(FPTR)(LIST_FILTER + x)); + } + + // add device type subitem + else if (sw_custfltr::other[x] == UI_SW_TYPE && m_filter.type.ui.size() > 0) + { + arrow_flags = get_arrow_flags(0, m_filter.type.ui.size() - 1, sw_custfltr::type[x]); + std::string fbuff("^!Device type"); + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), m_filter.type.ui[sw_custfltr::type[x]].c_str(), arrow_flags, (void *)(FPTR)(TYPE_FILTER + x)); + } + + // add region subitem + else if (sw_custfltr::other[x] == UI_SW_REGION && m_filter.region.ui.size() > 0) + { + arrow_flags = get_arrow_flags(0, m_filter.region.ui.size() - 1, sw_custfltr::region[x]); + std::string fbuff("^!Region"); + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), m_filter.region.ui[sw_custfltr::region[x]].c_str(), arrow_flags, (void *)(FPTR)(REGION_FILTER + x)); + } + } + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + if (sw_custfltr::numother > 0) + item_append(_("Remove last filter"), nullptr, 0, (void *)(FPTR)REMOVE_FILTER); + + if (sw_custfltr::numother < MAX_CUST_FILTER - 2) + item_append(_("Add filter"), nullptr, 0, (void *)(FPTR)ADD_FILTER); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- +void ui_menu_swcustom_filter::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + + // get the size of the text + mui.draw_text_full(container, _("Select custom filters:"), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; + float maxwidth = MAX(width, origx2 - origx1); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, _("Select custom filters:"), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} + +//------------------------------------------------- +// save custom filters info to file +//------------------------------------------------- + +void ui_menu_swcustom_filter::save_sw_custom_filters() +{ + // attempt to open the output file + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + if (file.open("custom_", m_driver->name, "_filter.ini") == FILERR_NONE) + { + // generate custom filters info + std::string cinfo; + strprintf(cinfo, "Total filters = %d\n", (sw_custfltr::numother + 1)); + cinfo.append("Main filter = ").append(sw_filters::text[sw_custfltr::main]).append("\n"); + + for (int x = 1; x <= sw_custfltr::numother; x++) + { + cinfo.append("Other filter = ").append(sw_filters::text[sw_custfltr::other[x]]).append("\n"); + if (sw_custfltr::other[x] == UI_SW_PUBLISHERS) + cinfo.append(" Manufacturer filter = ").append(m_filter.publisher.ui[sw_custfltr::mnfct[x]]).append("\n"); + else if (sw_custfltr::other[x] == UI_SW_LIST) + cinfo.append(" Software List filter = ").append(m_filter.swlist.name[sw_custfltr::list[x]]).append("\n"); + else if (sw_custfltr::other[x] == UI_SW_YEARS) + cinfo.append(" Year filter = ").append(m_filter.year.ui[sw_custfltr::year[x]]).append("\n"); + else if (sw_custfltr::other[x] == UI_SW_TYPE) + cinfo.append(" Type filter = ").append(m_filter.type.ui[sw_custfltr::type[x]]).append("\n"); + else if (sw_custfltr::other[x] == UI_SW_REGION) + cinfo.append(" Region filter = ").append(m_filter.region.ui[sw_custfltr::region[x]]).append("\n"); + } + file.puts(cinfo.c_str()); + file.close(); + } +} + diff --git a/src/emu/ui/custmenu.h b/src/emu/ui/custmenu.h new file mode 100644 index 00000000000..d136e911164 --- /dev/null +++ b/src/emu/ui/custmenu.h @@ -0,0 +1,131 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/custmenu.h + + Internal UI user interface. + + +***************************************************************************/ + +#pragma once + +#ifndef __UI_CUSTMENU_H__ +#define __UI_CUSTMENU_H__ + +#include "ui/utils.h" + +// Software region +struct c_sw_region +{ + std::vector<std::string> ui; + UINT16 actual; + void set(std::string &str); + std::string getname(std::string &str); +}; + +// Software publishers +struct c_sw_publisher +{ + std::vector<std::string> ui; + UINT16 actual; + void set(std::string &str); + std::string getname(std::string &str); +}; + +// Software device type +struct c_sw_type +{ + std::vector<std::string> ui; + UINT16 actual; + void set(std::string &str); +}; + +// Software list +struct c_sw_list +{ + std::vector<std::string> name; + std::vector<std::string> description; + UINT16 actual; +}; + +// Software years +struct c_sw_year +{ + std::vector<std::string> ui; + UINT16 actual; + void set(std::string &str); +}; + +struct s_filter +{ + c_sw_region region; + c_sw_publisher publisher; + c_sw_year year; + c_sw_type type; + c_sw_list swlist; +}; + +//------------------------------------------------- +// custom software filter menu class +//------------------------------------------------- +class ui_menu_swcustom_filter : public ui_menu +{ +public: + ui_menu_swcustom_filter(running_machine &machine, render_container *container, const game_driver *_driver, s_filter &_filter); + virtual ~ui_menu_swcustom_filter(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + enum + { + MAIN_FILTER = 1, + ADD_FILTER, + REMOVE_FILTER, + MNFCT_FILTER, + YEAR_FILTER = MNFCT_FILTER + MAX_CUST_FILTER + 1, + REGION_FILTER = YEAR_FILTER + MAX_CUST_FILTER + 1, + TYPE_FILTER = REGION_FILTER + MAX_CUST_FILTER + 1, + LIST_FILTER = TYPE_FILTER + MAX_CUST_FILTER + 1, + OTHER_FILTER = LIST_FILTER + MAX_CUST_FILTER + 1 + }; + + bool m_added; + s_filter &m_filter; + const game_driver *m_driver; + + void save_sw_custom_filters(); +}; + +//------------------------------------------------- +// custom filter menu class +//------------------------------------------------- +class ui_menu_custom_filter : public ui_menu +{ +public: + ui_menu_custom_filter(running_machine &machine, render_container *container, bool _single_menu = false); + virtual ~ui_menu_custom_filter(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + enum + { + MAIN_FILTER = 1, + ADD_FILTER, + REMOVE_FILTER, + MNFCT_FILTER, + YEAR_FILTER = MNFCT_FILTER + MAX_CUST_FILTER + 1, + SCREEN_FILTER = YEAR_FILTER + MAX_CUST_FILTER + 1, + OTHER_FILTER = SCREEN_FILTER + MAX_CUST_FILTER + 1 + }; + + bool m_single_menu, m_added; + void save_custom_filters(); +}; + +#endif /* __UI_CUSTMENU_H__ */ diff --git a/src/emu/ui/custui.cpp b/src/emu/ui/custui.cpp new file mode 100644 index 00000000000..355f486918a --- /dev/null +++ b/src/emu/ui/custui.cpp @@ -0,0 +1,1049 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/custui.cpp + + Internal UI user interface. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "ui/selector.h" +#include "ui/custui.h" +#include "ui/utils.h" +#include <algorithm> + +const char *ui_menu_custom_ui::hide_status[] = { "Show All", "Hide Filters", "Hide Info/Image", "Hide Both" }; + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_custom_ui::ui_menu_custom_ui(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_custom_ui::~ui_menu_custom_ui() +{ + std::string error_string; + machine().ui().options().set_value(OPTION_HIDE_PANELS, ui_globals::panels_status, OPTION_PRIORITY_CMDLINE, error_string); + ui_globals::reset = true; +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_custom_ui::handle() +{ + bool changed = false; + + // process the menu + const ui_menu_event *m_event = process(0); + + if (m_event != nullptr && m_event->itemref != nullptr) + { + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + changed = true; + (m_event->iptkey == IPT_UI_RIGHT) ? ui_globals::panels_status++ : ui_globals::panels_status--; + } + + + else if (m_event->iptkey == IPT_UI_SELECT) + { + switch ((FPTR)m_event->itemref) + { + case FONT_MENU: + ui_menu::stack_push(global_alloc_clear<ui_menu_font_ui>(machine(), container)); + break; + + case COLORS_MENU: + ui_menu::stack_push(global_alloc_clear<ui_menu_colors_ui>(machine(), container)); + break; + case HIDE_MENU: + { + int total = ARRAY_LENGTH(hide_status); + std::vector<std::string> s_sel(total); + for (int index = 0; index < total; ++index) + s_sel[index] = hide_status[index]; + + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, ui_globals::panels_status)); + } + } + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_custom_ui::populate() +{ + item_append("Fonts", nullptr, 0, (void *)(FPTR)FONT_MENU); + item_append("Colors", nullptr, 0, (void *)(FPTR)COLORS_MENU); + + UINT32 arrow_flags = get_arrow_flags(0, (int)HIDE_BOTH, ui_globals::panels_status); + item_append("Filters and Info/Image", hide_status[ui_globals::panels_status], arrow_flags, (void *)(FPTR)HIDE_MENU); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_custom_ui::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + + mui.draw_text_full(container, "Custom UI Settings", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + float maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, "Custom UI Settings", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_font_ui::ui_menu_font_ui(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ + ui_options &moptions = machine.ui().options(); +#ifdef UI_WINDOWS + + std::string name(machine.ui().options().ui_font()); + list(); + + m_bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0); + m_italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0); + m_actual = 0; + + for (size_t index = 0; index < m_fonts.size(); index++) + { + if (m_fonts[index] == name) + { + m_actual = index; + break; + } + } +#endif + + m_info_size = moptions.infos_size(); + m_font_size = moptions.font_rows(); + + for (ui_options::entry *f_entry = moptions.first(); f_entry != nullptr; f_entry = f_entry->next()) + { + const char *name = f_entry->name(); + if (name && strlen(name) && !strcmp(OPTION_INFOS_SIZE, f_entry->name())) + { + m_info_max = atof(f_entry->maximum()); + m_info_min = atof(f_entry->minimum()); + } + else if (name && strlen(name) && !strcmp(OPTION_FONT_ROWS, f_entry->name())) + { + m_font_max = atof(f_entry->maximum()); + m_font_min = atof(f_entry->minimum()); + } + } + +} + +#ifdef UI_WINDOWS +//------------------------------------------------- +// fonts enumerator CALLBACK +//------------------------------------------------- + +int CALLBACK ui_menu_font_ui::EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam) +{ + std::vector<std::string> *lpc = (std::vector<std::string>*)lParam; + std::string utf((char *)lpelfe->lfFaceName); + if (utf[0] != '@') + lpc->push_back(utf); + + return 1; +} + +//------------------------------------------------- +// create fonts list +//------------------------------------------------- + +void ui_menu_font_ui::list() +{ + // create LOGFONT structure + LOGFONT lf; + lf.lfCharSet = ANSI_CHARSET; + lf.lfFaceName[0] = '\0'; + + HDC hDC = GetDC( nullptr ); + EnumFontFamiliesEx( hDC, &lf, (FONTENUMPROC)EnumFontFamiliesExProc, (LPARAM)&m_fonts, 0 ); + ReleaseDC( nullptr, hDC ); + + // sort + std::stable_sort(m_fonts.begin(), m_fonts.end()); + + // add default string to the top of array + m_fonts.insert(m_fonts.begin(), std::string("default")); +} +#endif + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_font_ui::~ui_menu_font_ui() +{ + std::string error_string; + ui_options &moptions = machine().ui().options(); + +#ifdef UI_WINDOWS + std::string name(m_fonts[m_actual]); + if (m_fonts[m_actual] != "default") + { + if (m_italic) + name.insert(0, "[I]"); + if (m_bold) + name.insert(0, "[B]"); + } + moptions.set_value(OPTION_UI_FONT, name.c_str(), OPTION_PRIORITY_CMDLINE, error_string); +#endif + + moptions.set_value(OPTION_INFOS_SIZE, m_info_size, OPTION_PRIORITY_CMDLINE, error_string); + moptions.set_value(OPTION_FONT_ROWS, m_font_size, OPTION_PRIORITY_CMDLINE, error_string); +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_font_ui::handle() +{ + bool changed = false; + + // process the menu + const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT); + + if (m_event != nullptr && m_event->itemref != nullptr) + switch ((FPTR)m_event->itemref) + { + case INFOS_SIZE: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_RIGHT) ? m_info_size += 0.05f : m_info_size -= 0.05f; + changed = true; + } + break; + + case FONT_SIZE: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_RIGHT) ? m_font_size++ : m_font_size--; + changed = true; + } + break; + +#ifdef UI_WINDOWS + + case MUI_FNT: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_RIGHT) ? m_actual++ : m_actual--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + { + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_fonts, m_actual)); + changed = true; + } + break; + + case MUI_BOLD: + case MUI_ITALIC: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT) + { + ((FPTR)m_event->itemref == MUI_BOLD) ? m_bold = !m_bold : m_italic = !m_italic; + changed = true; + } + break; +#endif + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_font_ui::populate() +{ + // set filter arrow + UINT32 arrow_flags; + std::string tmptxt; + +#ifdef UI_WINDOWS + // add fonts option + arrow_flags = get_arrow_flags(0, m_fonts.size() - 1, m_actual); + std::string name(m_fonts[m_actual]); + item_append("UI Font", name.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT); + + if (name != "default") + { + item_append("Bold", m_bold ? "On" : "Off", m_bold ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_BOLD); + item_append("Italic", m_italic ? "On" : "Off", m_italic ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)MUI_ITALIC); + } +#endif + + arrow_flags = get_arrow_flags(m_font_min, m_font_max, m_font_size); + strprintf(tmptxt, "%2d", m_font_size); + item_append("Lines", tmptxt.c_str(), arrow_flags, (void *)(FPTR)FONT_SIZE); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + // add item + tmptxt.clear(); + strprintf(tmptxt, "%3.2f", m_info_size); + arrow_flags = get_arrow_flags(m_info_min, m_info_max, m_info_size); + item_append("Infos text size", tmptxt.c_str(), arrow_flags, (void *)(FPTR)INFOS_SIZE); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_font_ui::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + + // top text + std::string topbuf("UI Fonts Settings"); + + mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + float maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + if ((FPTR)selectedref == INFOS_SIZE) + { + topbuf = "Sample text - Lorem ipsum dolor sit amet, consectetur adipiscing elit."; + + mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr, m_info_size); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = origy2 + UI_BOX_TB_BORDER; + y2 = origy2 + bottom; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, m_info_size); + } +} + +//------------------------------------------------- +// ctor +//------------------------------------------------- +#define SET_COLOR_UI(var, opt) var[M##opt].color = opt; var[M##opt].option = OPTION_##opt + +ui_menu_colors_ui::ui_menu_colors_ui(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ + SET_COLOR_UI(m_color_table, UI_BACKGROUND_COLOR); + SET_COLOR_UI(m_color_table, UI_BORDER_COLOR); + SET_COLOR_UI(m_color_table, UI_CLONE_COLOR); + SET_COLOR_UI(m_color_table, UI_DIPSW_COLOR); + SET_COLOR_UI(m_color_table, UI_GFXVIEWER_BG_COLOR); + SET_COLOR_UI(m_color_table, UI_MOUSEDOWN_BG_COLOR); + SET_COLOR_UI(m_color_table, UI_MOUSEDOWN_COLOR); + SET_COLOR_UI(m_color_table, UI_MOUSEOVER_BG_COLOR); + SET_COLOR_UI(m_color_table, UI_MOUSEOVER_COLOR); + SET_COLOR_UI(m_color_table, UI_SELECTED_BG_COLOR); + SET_COLOR_UI(m_color_table, UI_SELECTED_COLOR); + SET_COLOR_UI(m_color_table, UI_SLIDER_COLOR); + SET_COLOR_UI(m_color_table, UI_SUBITEM_COLOR); + SET_COLOR_UI(m_color_table, UI_TEXT_BG_COLOR); + SET_COLOR_UI(m_color_table, UI_TEXT_COLOR); + SET_COLOR_UI(m_color_table, UI_UNAVAILABLE_COLOR); +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_colors_ui::~ui_menu_colors_ui() +{ + std::string error_string, dec_color; + for (int index = 1; index < MUI_RESTORE; index++) + { + strprintf(dec_color, "%x", (UINT32)m_color_table[index].color); + machine().ui().options().set_value(m_color_table[index].option, dec_color.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + } +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_colors_ui::handle() +{ + bool changed = false; + + // process the menu + const ui_menu_event *m_event = process(0); + + if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT) + { + if ((FPTR)m_event->itemref != MUI_RESTORE) + ui_menu::stack_push(global_alloc_clear<ui_menu_rgb_ui>(machine(), container, &m_color_table[(FPTR)m_event->itemref].color, item[selected].text)); + else + { + changed = true; + restore_colors(); + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_colors_ui::populate() +{ + item_append("Normal text", nullptr, 0, (void *)(FPTR)MUI_TEXT_COLOR); + item_append("Selected color", nullptr, 0, (void *)(FPTR)MUI_SELECTED_COLOR); + item_append("Normal text background", nullptr, 0, (void *)(FPTR)MUI_TEXT_BG_COLOR); + item_append("Selected background color", nullptr, 0, (void *)(FPTR)MUI_SELECTED_BG_COLOR); + item_append("Subitem color", nullptr, 0, (void *)(FPTR)MUI_SUBITEM_COLOR); + item_append("Clone", nullptr, 0, (void *)(FPTR)MUI_CLONE_COLOR); + item_append("Border", nullptr, 0, (void *)(FPTR)MUI_BORDER_COLOR); + item_append("Background", nullptr, 0, (void *)(FPTR)MUI_BACKGROUND_COLOR); + item_append("Dipswitch", nullptr, 0, (void *)(FPTR)MUI_DIPSW_COLOR); + item_append("Unavailable color", nullptr, 0, (void *)(FPTR)MUI_UNAVAILABLE_COLOR); + item_append("Slider color", nullptr, 0, (void *)(FPTR)MUI_SLIDER_COLOR); + item_append("Gfx viewer background", nullptr, 0, (void *)(FPTR)MUI_GFXVIEWER_BG_COLOR); + item_append("Mouse over color", nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_COLOR); + item_append("Mouse over background color", nullptr, 0, (void *)(FPTR)MUI_MOUSEOVER_BG_COLOR); + item_append("Mouse down color", nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_COLOR); + item_append("Mouse down background color", nullptr, 0, (void *)(FPTR)MUI_MOUSEDOWN_BG_COLOR); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + item_append("Restore originals colors", nullptr, 0, (void *)(FPTR)MUI_RESTORE); + + custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_colors_ui::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width, maxwidth = origx2 - origx1; + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + + // top text + std::string topbuf("UI Colors Settings"); + + mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + // bottom text + // get the text for 'UI Select' + std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD)); + topbuf.assign("Double click or press ").append(ui_select_text.c_str()).append(" to change the color value"); + + mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = origy2 + UI_BOX_TB_BORDER; + y2 = origy2 + bottom; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + // compute maxwidth + topbuf = "Menu Preview"; + + mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + maxwidth = width + 2.0f * UI_BOX_LR_BORDER; + + std::string sampletxt[5]; + + sampletxt[0] = "Normal"; + sampletxt[1] = "Subitem"; + sampletxt[2] = "Selected"; + sampletxt[3] = "Mouse Over"; + sampletxt[4] = "Clone"; + + for (auto & elem: sampletxt) + { + mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + } + + // compute our bounds for header + x1 = origx2 + 2.0f * UI_BOX_LR_BORDER; + x2 = x1 + maxwidth; + y1 = origy1; + y2 = y1 + bottom - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + y2 -= UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + // compute our bounds for menu preview + x1 -= UI_BOX_LR_BORDER; + x2 += UI_BOX_LR_BORDER; + y1 = y2 + 2.0f * UI_BOX_TB_BORDER; + y2 = y1 + 5.0f * line_height + 2.0f * UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, m_color_table[MUI_BACKGROUND_COLOR].color); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw normal text + mui.draw_text_full(container, sampletxt[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, m_color_table[MUI_TEXT_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); + y1 += line_height; + + // draw subitem text + mui.draw_text_full(container, sampletxt[1].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, m_color_table[MUI_SUBITEM_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); + y1 += line_height; + + // draw selected text + highlight(container, x1, y1, x2, y1 + line_height, m_color_table[MUI_SELECTED_BG_COLOR].color); + mui.draw_text_full(container, sampletxt[2].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, m_color_table[MUI_SELECTED_COLOR].color, m_color_table[MUI_SELECTED_BG_COLOR].color, nullptr, nullptr); + y1 += line_height; + + // draw mouse over text + highlight(container, x1, y1, x2, y1 + line_height, m_color_table[MUI_MOUSEOVER_BG_COLOR].color); + mui.draw_text_full(container, sampletxt[3].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, m_color_table[MUI_MOUSEOVER_COLOR].color, m_color_table[MUI_MOUSEOVER_BG_COLOR].color, nullptr, nullptr); + y1 += line_height; + + // draw clone text + mui.draw_text_full(container, sampletxt[4].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, m_color_table[MUI_CLONE_COLOR].color, m_color_table[MUI_TEXT_BG_COLOR].color, nullptr, nullptr); + +} + +//------------------------------------------------- +// restore original colors +//------------------------------------------------- + +void ui_menu_colors_ui::restore_colors() +{ + ui_options options; + for (int index = 1; index < MUI_RESTORE; index++) + m_color_table[index].color = rgb_t((UINT32)strtoul(options.value(m_color_table[index].option), nullptr, 16)); +} + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_rgb_ui::ui_menu_rgb_ui(running_machine &machine, render_container *container, rgb_t *_color, std::string _title) : ui_menu(machine, container) +{ + m_color = _color; + m_key_active = false; + m_lock_ref = 0; + m_title = _title; + m_search[0] = '\0'; +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_rgb_ui::~ui_menu_rgb_ui() +{ +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_rgb_ui::handle() +{ + bool changed = false; + + // process the menu + const ui_menu_event *m_event; + + if (!m_key_active) + m_event = process(UI_MENU_PROCESS_LR_REPEAT); + else + m_event = process(UI_MENU_PROCESS_ONLYCHAR); + + if (m_event != nullptr && m_event->itemref != nullptr) + { + switch ((FPTR)m_event->itemref) + { + case RGB_ALPHA: + if (m_event->iptkey == IPT_UI_LEFT && m_color->a() > 1) + { + m_color->set_a(m_color->a() - 1); + changed = true; + } + + else if (m_event->iptkey == IPT_UI_RIGHT && m_color->a() < 255) + { + m_color->set_a(m_color->a() + 1); + changed = true; + } + + else if (m_event->iptkey == IPT_UI_SELECT || m_event->iptkey == IPT_SPECIAL) + { + inkey_special(m_event); + changed = true; + } + + break; + + case RGB_RED: + if (m_event->iptkey == IPT_UI_LEFT && m_color->r() > 1) + { + m_color->set_r(m_color->r() - 1); + changed = true; + } + + else if (m_event->iptkey == IPT_UI_RIGHT && m_color->r() < 255) + { + m_color->set_r(m_color->r() + 1); + changed = true; + } + + else if (m_event->iptkey == IPT_UI_SELECT || m_event->iptkey == IPT_SPECIAL) + { + inkey_special(m_event); + changed = true; + } + + break; + + case RGB_GREEN: + if (m_event->iptkey == IPT_UI_LEFT && m_color->g() > 1) + { + m_color->set_g(m_color->g() - 1); + changed = true; + } + + else if (m_event->iptkey == IPT_UI_RIGHT && m_color->g() < 255) + { + m_color->set_g(m_color->g() + 1); + changed = true; + } + + else if (m_event->iptkey == IPT_UI_SELECT || m_event->iptkey == IPT_SPECIAL) + { + inkey_special(m_event); + changed = true; + } + + break; + + case RGB_BLUE: + if (m_event->iptkey == IPT_UI_LEFT && m_color->b() > 1) + { + m_color->set_b(m_color->b() - 1); + changed = true; + } + + else if (m_event->iptkey == IPT_UI_RIGHT && m_color->b() < 255) + { + m_color->set_b(m_color->b() + 1); + changed = true; + } + + else if (m_event->iptkey == IPT_UI_SELECT || m_event->iptkey == IPT_SPECIAL) + { + inkey_special(m_event); + changed = true; + } + + break; + + case PALETTE_CHOOSE: + if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_palette_sel>(machine(), container, *m_color)); + break; + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_rgb_ui::populate() +{ + // set filter arrow + UINT32 arrow_flags = MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW; + std::string text; + std::string s_text = std::string(m_search).append("_"); + + if (m_lock_ref != RGB_ALPHA) + { + arrow_flags = get_arrow_flags(0, 255, m_color->a()); + strprintf(text, "%3d", m_color->a()); + item_append("Alpha", text.c_str(), arrow_flags, (void *)(FPTR)RGB_ALPHA); + } + else + item_append("Alpha", s_text.c_str(), 0, (void *)(FPTR)RGB_ALPHA); + + if (m_lock_ref != RGB_RED) + { + arrow_flags = get_arrow_flags(0, 255, m_color->r()); + strprintf(text, "%3d", m_color->r()); + item_append("Red", text.c_str(), arrow_flags, (void *)(FPTR)RGB_RED); + } + else + item_append("Red", s_text.c_str(), 0, (void *)(FPTR)RGB_RED); + + if (m_lock_ref != RGB_GREEN) + { + arrow_flags = get_arrow_flags(0, 255, m_color->g()); + strprintf(text, "%3d", m_color->g()); + item_append("Green", text.c_str(), arrow_flags, (void *)(FPTR)RGB_GREEN); + } + else + item_append("Green", s_text.c_str(), 0, (void *)(FPTR)RGB_GREEN); + + if (m_lock_ref != RGB_BLUE) + { + arrow_flags = get_arrow_flags(0, 255, m_color->b()); + strprintf(text, "%3d", m_color->b()); + item_append("Blue", text.c_str(), arrow_flags, (void *)(FPTR)RGB_BLUE); + } + else + item_append("Blue", s_text.c_str(), 0, (void *)(FPTR)RGB_BLUE); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + item_append("Choose from palette", nullptr, 0, (void *)(FPTR)PALETTE_CHOOSE); + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + custombottom = customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_rgb_ui::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width, maxwidth = origx2 - origx1; + ui_manager &mui = machine().ui(); + + // top text + std::string topbuf = std::string(m_title).append(" - ARGB Settings"); + mui.draw_text_full(container, topbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, topbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + std::string sampletxt("Color preview ="); + maxwidth = origx2 - origx1; + mui.draw_text_full(container, sampletxt.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + + // compute our bounds + x1 -= UI_BOX_LR_BORDER; + x2 = x1 + width; + y1 = origy2 + UI_BOX_TB_BORDER; + y2 = origy2 + bottom; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the normal text + mui.draw_text_full(container, sampletxt.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr); + + float t_x2 = x1 - UI_BOX_LR_BORDER + maxwidth; + x1 = x2 + 2.0f * UI_BOX_LR_BORDER; + x2 = t_x2; + y1 -= UI_BOX_TB_BORDER; + + mui.draw_outlined_box(container, x1, y1, x2, y2, *m_color); + +} + +//------------------------------------------------- +// handle special key event +//------------------------------------------------- + +void ui_menu_rgb_ui::inkey_special(const ui_menu_event *m_event) +{ + if (m_event->iptkey == IPT_UI_SELECT) + { + m_key_active = !m_key_active; + m_lock_ref = (FPTR)m_event->itemref; + + if (!m_key_active) + { + int val = atoi(m_search); + val = m_color->clamp(val); + + switch ((FPTR)m_event->itemref) + { + case RGB_ALPHA: + m_color->set_a(val); + break; + + case RGB_RED: + m_color->set_r(val); + break; + + case RGB_GREEN: + m_color->set_g(val); + break; + + case RGB_BLUE: + m_color->set_b(val); + break; + } + + m_search[0] = 0; + m_lock_ref = 0; + return; + } + } + + if (!m_key_active) + { + m_search[0] = 0; + return; + } + + int buflen = strlen(m_search); + + // if it's a backspace and we can handle it, do so + if (((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0)) + *(char *)utf8_previous_char(&m_search[buflen]) = 0; + else if (buflen >= 3) + return; + // if it's any other key and we're not maxed out, update + else if ((m_event->unichar >= '0' && m_event->unichar <= '9')) + buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar); + + m_search[buflen] = 0; +} + +ui_menu_palette_sel::palcolor ui_menu_palette_sel::m_palette[] = { + { "White", "FFFFFFFF" }, + { "Silver", "FFC0C0C0" }, + { "Gray", "FF808080" }, + { "Black", "FF000000" }, + { "Red", "FFFF0000" }, + { "Orange", "FFFFA500" }, + { "Yellow", "FFFFFF00" }, + { "Green", "FF00FF00" }, + { "Blue", "FF0000FF" }, + { "Violet", "FF8F00FF" } +}; + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_palette_sel::ui_menu_palette_sel(running_machine &machine, render_container *container, rgb_t &_color) + : ui_menu(machine, container), m_original(_color) +{ +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_palette_sel::~ui_menu_palette_sel() +{ +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_palette_sel::handle() +{ + // process the menu + const ui_menu_event *m_event = process(MENU_FLAG_UI_PALETTE); + if (m_event != nullptr && m_event->itemref != nullptr) + { + if (m_event->iptkey == IPT_UI_SELECT) + { + m_original = rgb_t((UINT32)strtoul(item[selected].subtext, nullptr, 16)); + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST); + ui_menu::stack_pop(machine()); + } + } +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_palette_sel::populate() +{ + for (int x = 0; x < ARRAY_LENGTH(m_palette); ++x) + item_append(m_palette[x].name, m_palette[x].argb, MENU_FLAG_UI_PALETTE, (void *)(FPTR)(x + 1)); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_palette_sel::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ +} diff --git a/src/emu/ui/custui.h b/src/emu/ui/custui.h new file mode 100644 index 00000000000..79f45cc3a6e --- /dev/null +++ b/src/emu/ui/custui.h @@ -0,0 +1,182 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/custui.h + + Internal UI user interface. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_CUSTUI_H__ +#define __UI_CUSTUI_H__ + +#ifdef UI_WINDOWS +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#endif + +//------------------------------------------------- +// Custom UI menu +//------------------------------------------------- + +class ui_menu_custom_ui : public ui_menu +{ +public: + ui_menu_custom_ui(running_machine &machine, render_container *container); + virtual ~ui_menu_custom_ui(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + enum + { + FONT_MENU = 1, + COLORS_MENU, + HIDE_MENU + }; + static const char *hide_status[]; +}; + +//------------------------------------------------- +// Font UI menu +//------------------------------------------------- + +class ui_menu_font_ui : public ui_menu +{ +public: + ui_menu_font_ui(running_machine &machine, render_container *container); + virtual ~ui_menu_font_ui(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + enum + { + INFOS_SIZE = 1, + FONT_SIZE, + MUI_FNT, + MUI_BOLD, + MUI_ITALIC + }; + +#ifdef UI_WINDOWS + UINT16 m_actual; + std::vector<std::string> m_fonts; + bool m_bold, m_italic; + + void list(); + static int CALLBACK EnumFontFamiliesExProc(const LOGFONT *lpelfe, const TEXTMETRIC *lpntme, DWORD FontType, LPARAM lParam); + +#endif + + float m_info_min, m_info_max, m_info_size; + int m_font_min, m_font_max, m_font_size; +}; + +//------------------------------------------------- +// Colors UI menu +//------------------------------------------------- + +class ui_menu_colors_ui : public ui_menu +{ +public: + ui_menu_colors_ui(running_machine &machine, render_container *container); + virtual ~ui_menu_colors_ui(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + enum + { + MUI_BACKGROUND_COLOR = 1, + MUI_BORDER_COLOR, + MUI_CLONE_COLOR, + MUI_DIPSW_COLOR, + MUI_GFXVIEWER_BG_COLOR, + MUI_MOUSEDOWN_BG_COLOR, + MUI_MOUSEDOWN_COLOR, + MUI_MOUSEOVER_BG_COLOR, + MUI_MOUSEOVER_COLOR, + MUI_SELECTED_BG_COLOR, + MUI_SELECTED_COLOR, + MUI_SLIDER_COLOR, + MUI_SUBITEM_COLOR, + MUI_TEXT_BG_COLOR, + MUI_TEXT_COLOR, + MUI_UNAVAILABLE_COLOR, + MUI_RESTORE + }; + + struct s_color_table + { + rgb_t color; + const char *option; + }; + + s_color_table m_color_table[MUI_RESTORE]; + void restore_colors(); +}; + +//------------------------------------------------- +// ARGB UI menu +//------------------------------------------------- + +class ui_menu_rgb_ui : public ui_menu +{ +public: + ui_menu_rgb_ui(running_machine &machine, render_container *container, rgb_t *_color, std::string _title); + virtual ~ui_menu_rgb_ui(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + rgb_t *m_color; + char m_search[4]; + bool m_key_active; + int m_lock_ref; + std::string m_title; + + enum + { + RGB_ALPHA = 1, + RGB_RED, + RGB_GREEN, + RGB_BLUE, + PALETTE_CHOOSE + }; + + void inkey_special(const ui_menu_event *menu_event); +}; + +//------------------------------------------------- +// Palette UI menu +//------------------------------------------------- + +class ui_menu_palette_sel : public ui_menu +{ +public: + ui_menu_palette_sel(running_machine &machine, render_container *container, rgb_t &_color); + virtual ~ui_menu_palette_sel(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + struct palcolor + { + const char *name; + const char *argb; + }; + + static palcolor m_palette[]; + rgb_t &m_original; +}; + +#endif /* __UI_CUSTUI_H__ */ diff --git a/src/emu/ui/datfile.cpp b/src/emu/ui/datfile.cpp new file mode 100644 index 00000000000..9171242d072 --- /dev/null +++ b/src/emu/ui/datfile.cpp @@ -0,0 +1,650 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/datfile.cpp + + UI DATs manager. + +***************************************************************************/ + +#include "emu.h" +#include "drivenum.h" +#include "ui/ui.h" +#include "ui/datfile.h" +#include "ui/utils.h" + +//------------------------------------------------- +// TAGS +//------------------------------------------------- +static std::string DATAFILE_TAG("$"); +static std::string TAG_BIO("$bio"); +static std::string TAG_INFO("$info"); +static std::string TAG_MAME("$mame"); +static std::string TAG_COMMAND("$cmd"); +static std::string TAG_END("$end"); +static std::string TAG_DRIVER("$drv"); +static std::string TAG_STORY("$story"); +static std::string TAG_HISTORY_R("## REVISION:"); +static std::string TAG_MAMEINFO_R("# MAMEINFO.DAT"); +static std::string TAG_MESSINFO_R("# MESSINFO.DAT"); +static std::string TAG_SYSINFO_R("# This file was generated on"); +static std::string TAG_STORY_R("# version"); +static std::string TAG_COMMAND_SEPARATOR("-----------------------------------------------"); + +//------------------------------------------------- +// Statics +//------------------------------------------------- +datfile_manager::dataindex datfile_manager::m_histidx; +datfile_manager::dataindex datfile_manager::m_mameidx; +datfile_manager::dataindex datfile_manager::m_messidx; +datfile_manager::dataindex datfile_manager::m_cmdidx; +datfile_manager::dataindex datfile_manager::m_sysidx; +datfile_manager::dataindex datfile_manager::m_storyidx; +datfile_manager::drvindex datfile_manager::m_drvidx; +datfile_manager::drvindex datfile_manager::m_messdrvidx; +datfile_manager::drvindex datfile_manager::m_menuidx; +datfile_manager::swindex datfile_manager::m_swindex; +std::string datfile_manager::m_history_rev; +std::string datfile_manager::m_mame_rev; +std::string datfile_manager::m_mess_rev; +std::string datfile_manager::m_sysinfo_rev; +std::string datfile_manager::m_story_rev; +bool datfile_manager::first_run = true; + +//------------------------------------------------- +// ctor +//------------------------------------------------- +datfile_manager::datfile_manager(running_machine &machine) : m_machine(machine) +{ + if (machine.ui().options().enabled_dats() && first_run) + { + first_run = false; + if (parseopen("mameinfo.dat")) + { + init_mameinfo(); + parseclose(); + } + + if (parseopen("command.dat")) + { + init_command(); + parseclose(); + } + + if (parseopen("story.dat")) + { + init_storyinfo(); + parseclose(); + } + + if (parseopen("messinfo.dat")) + { + init_messinfo(); + parseclose(); + } + + if (parseopen("sysinfo.dat")) + { + init_sysinfo(); + parseclose(); + } + + if (parseopen("history.dat")) + { + init_history(); + parseclose(); + } + } +} + +//------------------------------------------------- +// initialize sysinfo.dat index +//------------------------------------------------- +void datfile_manager::init_sysinfo() +{ + int swcount = 0; + int count = index_datafile(m_sysidx, swcount); + osd_printf_verbose("Sysinfo.dat games found = %i\n", count); + osd_printf_verbose("Rev = %s\n", m_sysinfo_rev.c_str()); +} + +//------------------------------------------------- +// initialize story.dat index +//------------------------------------------------- +void datfile_manager::init_storyinfo() +{ + int swcount = 0; + int count = index_datafile(m_storyidx, swcount); + osd_printf_verbose("Story.dat games found = %i\n", count); +} + +//------------------------------------------------- +// initialize history.dat index +//------------------------------------------------- +void datfile_manager::init_history() +{ + int swcount = 0; + int count = index_datafile(m_histidx, swcount); + osd_printf_verbose("History.dat games found = %i\n", count); + osd_printf_verbose("History.dat softwares found = %i\n", swcount); + osd_printf_verbose("Rev = %s\n", m_history_rev.c_str()); +} + +//------------------------------------------------- +// initialize mameinfo.dat index +//------------------------------------------------- +void datfile_manager::init_mameinfo() +{ + int drvcount = 0; + int count = index_mame_mess_info(m_mameidx, m_drvidx, drvcount); + osd_printf_verbose("Mameinfo.dat games found = %i\n", count); + osd_printf_verbose("Mameinfo.dat drivers found = %d\n", drvcount); + osd_printf_verbose("Rev = %s\n", m_mame_rev.c_str()); +} + +//------------------------------------------------- +// initialize messinfo.dat index +//------------------------------------------------- +void datfile_manager::init_messinfo() +{ + int drvcount = 0; + int count = index_mame_mess_info(m_messidx, m_messdrvidx, drvcount); + osd_printf_verbose("Messinfo.dat games found = %i\n", count); + osd_printf_verbose("Messinfo.dat drivers found = %d\n", drvcount); + osd_printf_verbose("Rev = %s\n", m_mess_rev.c_str()); +} + +//------------------------------------------------- +// initialize command.dat index +//------------------------------------------------- +void datfile_manager::init_command() +{ + int swcount = 0; + int count = index_datafile(m_cmdidx, swcount); + osd_printf_verbose("Command.dat games found = %i\n", count); +} + +bool datfile_manager::has_software(std::string &softlist, std::string &softname, std::string &parentname) +{ + // Find software in software list index + if (m_swindex.find(softlist) == m_swindex.end()) + return false; + + m_itemsiter = m_swindex[softlist].find(softname); + if (m_itemsiter == m_swindex[softlist].end() && !parentname.empty()) + m_itemsiter = m_swindex[softlist].find(parentname); + + if (m_itemsiter == m_swindex[softlist].end()) + return false; + + return true; +} +//------------------------------------------------- +// load software info +//------------------------------------------------- +void datfile_manager::load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname) +{ + // Load history text + if (!m_swindex.empty() && parseopen("history.dat")) + { + // Find software in software list index + if (!has_software(softlist, softname, parentname)) + return; + + long s_offset = (*m_itemsiter).second; + char rbuf[64 * 1024]; + fseek(fp, s_offset, SEEK_SET); + std::string readbuf; + while (fgets(rbuf, 64 * 1024, fp) != nullptr) + { + readbuf = chartrimcarriage(rbuf); + + // end entry when a end tag is encountered + if (readbuf == TAG_END) + break; + + // add this string to the buffer + buffer.append(readbuf).append("\n"); + } + parseclose(); + } +} + +//------------------------------------------------- +// load_data_info +//------------------------------------------------- +void datfile_manager::load_data_info(const game_driver *drv, std::string &buffer, int type) +{ + dataindex index_idx; + drvindex driver_idx; + std::string tag; + std::string filename; + + switch (type) + { + case UI_HISTORY_LOAD: + filename = "history.dat"; + tag = TAG_BIO; + index_idx = m_histidx; + break; + case UI_MAMEINFO_LOAD: + filename = "mameinfo.dat"; + tag = TAG_MAME; + index_idx = m_mameidx; + driver_idx = m_drvidx; + break; + case UI_SYSINFO_LOAD: + filename = "sysinfo.dat"; + tag = TAG_BIO; + index_idx = m_sysidx; + break; + case UI_MESSINFO_LOAD: + filename = "messinfo.dat"; + tag = TAG_MAME; + index_idx = m_messidx; + driver_idx = m_messdrvidx; + break; + case UI_STORY_LOAD: + filename = "story.dat"; + tag = TAG_STORY; + index_idx = m_storyidx; + break; + } + + if (parseopen(filename.c_str())) + { + load_data_text(drv, buffer, index_idx, tag); + + // load driver info + if (!driver_idx.empty()) + load_driver_text(drv, buffer, driver_idx, TAG_DRIVER); + + // cleanup mameinfo and sysinfo double line spacing + if (tag == TAG_MAME || type == UI_SYSINFO_LOAD) + strreplace(buffer, "\n\n", "\n"); + + parseclose(); + } +} + +//------------------------------------------------- +// load a game text into the buffer +//------------------------------------------------- +void datfile_manager::load_data_text(const game_driver *drv, std::string &buffer, dataindex &idx, std::string &tag) +{ + dataindex::iterator itemsiter = idx.find(drv); + if (itemsiter == idx.end()) + { + int cloneof = driver_list::non_bios_clone(*drv); + if (cloneof == -1) + return; + else + { + const game_driver *c_drv = &driver_list::driver(cloneof); + itemsiter = idx.find(c_drv); + if (itemsiter == idx.end()) + return; + } + } + + long s_offset = (*itemsiter).second; + fseek(fp, s_offset, SEEK_SET); + char rbuf[64 * 1024]; + std::string readbuf; + while (fgets(rbuf, 64 * 1024, fp) != nullptr) + { + readbuf = chartrimcarriage(rbuf); + + // end entry when a end tag is encountered + if (readbuf == TAG_END) + break; + + // continue if a specific tag is encountered + if (readbuf == tag) + continue; + + // add this string to the buffer + buffer.append(readbuf).append("\n"); + } +} + +//------------------------------------------------- +// load a driver name and offset into an +// indexed array +//------------------------------------------------- +void datfile_manager::load_driver_text(const game_driver *drv, std::string &buffer, drvindex &idx, std::string &tag) +{ + std::string s(core_filename_extract_base(drv->source_file)); + drvindex::const_iterator index = idx.find(s); + + // if driver not found, return + if (index == idx.end()) + return; + + buffer.append("\n--- DRIVER INFO ---\n").append("Driver: ").append(s).append("\n\n"); + long s_offset = (*index).second; + fseek(fp, s_offset, SEEK_SET); + char rbuf[64 * 1024]; + std::string readbuf; + while (fgets(rbuf, 64 * 1024, fp) != nullptr) + { + readbuf = chartrimcarriage(rbuf); + + // end entry when a end tag is encountered + if (readbuf == TAG_END) + break; + + // continue if a specific tag is encountered + if (readbuf == tag) + continue; + + // add this string to the buffer + buffer.append(readbuf).append("\n"); + } +} + +//------------------------------------------------- +// load a game name and offset into an +// indexed array (mameinfo) +//------------------------------------------------- +int datfile_manager::index_mame_mess_info(dataindex &index, drvindex &index_drv, int &drvcount) +{ + std::string name; + size_t foundtag; + size_t t_mame = TAG_MAMEINFO_R.size(); + size_t t_mess = TAG_MESSINFO_R.size(); + size_t t_info = TAG_INFO.size(); + + char rbuf[64 * 1024]; + std::string readbuf, xid; + while (fgets(rbuf, 64 * 1024, fp) != nullptr) + { + readbuf = chartrimcarriage(rbuf); + if (m_mame_rev.empty() && readbuf.compare(0, t_mame, TAG_MAMEINFO_R) == 0) + { + size_t found = readbuf.find(" ", t_mame + 1); + m_mame_rev = readbuf.substr(t_mame + 1, found - t_mame); + } + else if (m_mess_rev.empty() && (foundtag = readbuf.find(TAG_MESSINFO_R)) != std::string::npos) + { + size_t found = readbuf.find(" ", foundtag + t_mess + 1); + m_mess_rev = readbuf.substr(foundtag + t_mess + 1, found - t_mess - foundtag); + } + else if (readbuf.compare(0, t_info, TAG_INFO) == 0) + { + // TAG_INFO + fgets(rbuf, 64 * 1024, fp); + xid = chartrimcarriage(rbuf); + name = readbuf.substr(t_info + 1); + if (xid == TAG_MAME) + { + // validate driver + int game_index = driver_list::find(name.c_str()); + if (game_index != -1) + index.emplace(&driver_list::driver(game_index), ftell(fp)); + } + else if (xid == TAG_DRIVER) + { + index_drv.emplace(name, ftell(fp)); + drvcount++; + } + } + } + return index.size(); +} + +//------------------------------------------------- +// load a game name and offset into an +// indexed array +//------------------------------------------------- +int datfile_manager::index_datafile(dataindex &index, int &swcount) +{ + std::string readbuf, name; + size_t t_hist = TAG_HISTORY_R.size(); + size_t t_story = TAG_STORY_R.size(); + size_t t_sysinfo = TAG_SYSINFO_R.size(); + size_t t_info = TAG_INFO.size(); + size_t t_bio = TAG_BIO.size(); + char rbuf[64 * 1024]; + while (fgets(rbuf, 64 * 1024, fp) != nullptr) + { + readbuf = chartrimcarriage(rbuf); + + if (m_history_rev.empty() && readbuf.compare(0, t_hist, TAG_HISTORY_R) == 0) + { + size_t found = readbuf.find(" ", t_hist + 1); + m_history_rev = readbuf.substr(t_hist + 1, found - t_hist); + } + else if (m_sysinfo_rev.empty() && readbuf.compare(0, t_sysinfo, TAG_SYSINFO_R) == 0) + { + size_t found = readbuf.find(".", t_sysinfo + 1); + m_sysinfo_rev = readbuf.substr(t_sysinfo + 1, found - t_sysinfo); + } + else if (m_story_rev.empty() && readbuf.compare(0, t_story, TAG_STORY_R) == 0) + m_story_rev = readbuf.substr(t_story + 1); + + // TAG_INFO identifies the driver + else if (readbuf.compare(0, t_info, TAG_INFO) == 0) + { + int curpoint = t_info + 1; + int ends = readbuf.size(); + while (curpoint < ends) + { + // search for comma + size_t found = readbuf.find(",", curpoint); + + // found it + if (found != std::string::npos) + { + // copy data and validate driver + name = readbuf.substr(curpoint, found - curpoint); + + // validate driver + int game_index = driver_list::find(name.c_str()); + if (game_index != -1) + index.emplace(&driver_list::driver(game_index), ftell(fp)); + + // update current point + curpoint = ++found; + } + // if comma not found, copy data while until reach the end of string + else if (curpoint < ends) + { + name = readbuf.substr(curpoint); + int game_index = driver_list::find(name.c_str()); + if (game_index != -1) + index.emplace(&driver_list::driver(game_index), ftell(fp)); + + // update current point + curpoint = ends; + } + } + } + // search for software info + else if (!readbuf.empty() && readbuf[0] == DATAFILE_TAG[0]) + { + fgets(rbuf, 64 * 1024, fp); + std::string readbuf_2(chartrimcarriage(rbuf)); + + // TAG_BIO identifies software list + if (readbuf_2.compare(0, t_bio, TAG_BIO) == 0) + { + size_t eq_sign = readbuf.find("="); + std::string s_list(readbuf.substr(1, eq_sign - 1)); + std::string s_roms(readbuf.substr(eq_sign + 1)); + int ends = s_list.size(); + int curpoint = 0; + + while (curpoint < ends) + { + size_t found = s_list.find(",", curpoint); + + // found it + if (found != std::string::npos) + { + name = s_list.substr(curpoint, found - curpoint); + curpoint = ++found; + } + else + { + name = s_list; + curpoint = ends; + } + + // search for a software list in the index, if not found then allocates + std::string lname(name); + int cpoint = 0; + int cends = s_roms.size(); + + while (cpoint < cends) + { + // search for comma + size_t found = s_roms.find(",", cpoint); + + // found it + if (found != std::string::npos) + { + // copy data + name = s_roms.substr(cpoint, found - cpoint); + + // add a SoftwareItem + m_swindex[lname].emplace(name, ftell(fp)); + + // update current point + cpoint = ++found; + swcount++; + } + else + { + // if reach the end, bail out + if (s_roms[cpoint] == '\r' || s_roms[cpoint] == '\n') + break; + + // copy data + name = s_roms.substr(cpoint); + + // add a SoftwareItem + m_swindex[lname].emplace(name, ftell(fp)); + + // update current point + cpoint = cends; + swcount++; + } + } + } + } + } + } + return index.size(); +} + +//--------------------------------------------------------- +// parseopen - Open up file for reading +//--------------------------------------------------------- +bool datfile_manager::parseopen(const char *filename) +{ + // MAME core file parsing functions fail in recognizing UNICODE chars in UTF-8 without BOM, + // so it's better and faster use standard C fileio functions. + + emu_file file(machine().ui().options().history_path(), OPEN_FLAG_READ); + if (file.open(filename) != FILERR_NONE) + return false; + + m_fullpath = file.fullpath(); + file.close(); + fp = fopen(m_fullpath.c_str(), "rb"); + + fgetc(fp); + fseek(fp, 0, SEEK_SET); + return true; +} + +//------------------------------------------------- +// create the menu index +//------------------------------------------------- +void datfile_manager::index_menuidx(const game_driver *drv, dataindex &idx, drvindex &index) +{ + dataindex::iterator itemsiter = idx.find(drv); + if (itemsiter == idx.end()) + { + int cloneof = driver_list::non_bios_clone(*drv); + if (cloneof == -1) + return; + else + { + const game_driver *c_drv = &driver_list::driver(cloneof); + itemsiter = idx.find(c_drv); + if (itemsiter == idx.end()) + return; + } + } + + // seek to correct point in datafile + long s_offset = (*itemsiter).second; + fseek(fp, s_offset, SEEK_SET); + size_t tinfo = TAG_INFO.size(); + char rbuf[64 * 1024]; + std::string readbuf; + while (fgets(rbuf, 64 * 1024, fp) != nullptr) + { + readbuf = chartrimcarriage(rbuf); + + if (!core_strnicmp(TAG_INFO.c_str(), readbuf.c_str(), tinfo)) + break; + + // TAG_COMMAND identifies the driver + if (readbuf == TAG_COMMAND) + { + fgets(rbuf, 64 * 1024, fp); + chartrimcarriage(rbuf); + index.emplace(rbuf, ftell(fp)); + } + } +} + +//------------------------------------------------- +// load command text into the buffer +//------------------------------------------------- +void datfile_manager::load_command_info(std::string &buffer, std::string &sel) +{ + if (parseopen("command.dat")) + { + // open and seek to correct point in datafile + long offset = m_menuidx.at(sel); + fseek(fp, offset, SEEK_SET); + char rbuf[64 * 1024]; + std::string readbuf; + while (fgets(rbuf, 64 * 1024, fp) != nullptr) + { + readbuf = chartrimcarriage(rbuf); + + // skip separator lines + if (readbuf == TAG_COMMAND_SEPARATOR) + continue; + + // end entry when a tag is encountered + if (readbuf == TAG_END) + break; + + // add this string to the buffer + buffer.append(readbuf).append("\n");; + } + parseclose(); + } +} + +//------------------------------------------------- +// load submenu item for command.dat +//------------------------------------------------- +void datfile_manager::command_sub_menu(const game_driver *drv, std::vector<std::string> &menuitems) +{ + if (parseopen("command.dat")) + { + m_menuidx.clear(); + index_menuidx(drv, m_cmdidx, m_menuidx); + for (auto & elem : m_menuidx) + menuitems.push_back(elem.first); + parseclose(); + } +}
\ No newline at end of file diff --git a/src/emu/ui/datfile.h b/src/emu/ui/datfile.h new file mode 100644 index 00000000000..8002a26daf4 --- /dev/null +++ b/src/emu/ui/datfile.h @@ -0,0 +1,92 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/datfile.h + + UI DATs manager. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_DATFILE_H__ +#define __UI_DATFILE_H__ + +//------------------------------------------------- +// Datafile Manager +//------------------------------------------------- +class datfile_manager +{ +public: + // construction/destruction + datfile_manager(running_machine &machine); + + // getters + running_machine &machine() const { return m_machine; } + + // actions + void load_data_info(const game_driver *drv, std::string &buffer, int type); + void load_command_info(std::string &buffer, std::string &sel); + void load_software_info(std::string &softlist, std::string &buffer, std::string &softname, std::string &parentname); + void command_sub_menu(const game_driver *drv, std::vector<std::string> &menuitems); + void reset_run() { first_run = true; } + bool has_software(std::string &softlist, std::string &softname, std::string &parentname); + + std::string rev_history() const { return m_history_rev; } + std::string rev_mameinfo() const { return m_mame_rev; } + std::string rev_messinfo() const { return m_mess_rev; } + std::string rev_sysinfo() const { return m_sysinfo_rev; } + std::string rev_storyinfo() const { return m_story_rev; } + + bool has_history(const game_driver *driver) { return (m_histidx.find(driver) != m_histidx.end()); } + bool has_mameinfo(const game_driver *driver) { return (m_mameidx.find(driver) != m_mameidx.end()); } + bool has_messinfo(const game_driver *driver) { return (m_messidx.find(driver) != m_messidx.end()); } + bool has_command(const game_driver *driver) { return (m_cmdidx.find(driver) != m_cmdidx.end()); } + bool has_sysinfo(const game_driver *driver) { return (m_sysidx.find(driver) != m_sysidx.end()); } + bool has_story(const game_driver *driver) { return (m_storyidx.find(driver) != m_storyidx.end()); } + + bool has_data(const game_driver *d) + { + return (has_history(d) || has_mameinfo(d) || has_messinfo(d) || has_command(d) || has_sysinfo(d) || has_story(d)); + } +private: + using drvindex = std::unordered_map<std::string, long>; + using dataindex = std::unordered_map<const game_driver *, long>; + using swindex = std::unordered_map<std::string, drvindex>; + + // global index + static dataindex m_histidx, m_mameidx, m_messidx, m_cmdidx, m_sysidx, m_storyidx; + static drvindex m_drvidx, m_messdrvidx, m_menuidx; + static swindex m_swindex; + + // internal helpers + void init_history(); + void init_mameinfo(); + void init_messinfo(); + void init_command(); + void init_sysinfo(); + void init_storyinfo(); + + // file open/close/seek + bool parseopen(const char *filename); + void parseclose() { if (fp != nullptr) fclose(fp); } + + int index_mame_mess_info(dataindex &index, drvindex &index_drv, int &drvcount); + int index_datafile(dataindex &index, int &swcount); + void index_menuidx(const game_driver *drv, dataindex &idx, drvindex &index); + drvindex::iterator m_itemsiter; + + void load_data_text(const game_driver *drv, std::string &buffer, dataindex &idx, std::string &tag); + void load_driver_text(const game_driver *drv, std::string &buffer, drvindex &idx, std::string &tag); + + // internal state + running_machine &m_machine; // reference to our machine + std::string m_fullpath; + static std::string m_history_rev, m_mame_rev, m_mess_rev, m_sysinfo_rev, m_story_rev; + FILE *fp = nullptr; + static bool first_run; +}; + + +#endif /* __UI_DATFILE_H__ */ diff --git a/src/emu/ui/datmenu.cpp b/src/emu/ui/datmenu.cpp new file mode 100644 index 00000000000..5e2d574edc0 --- /dev/null +++ b/src/emu/ui/datmenu.cpp @@ -0,0 +1,303 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/datmenu.cpp + + Internal UI user interface. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "drivenum.h" +#include "rendfont.h" +#include "ui/datfile.h" +#include "ui/datmenu.h" +#include "ui/utils.h" +#include "softlist.h" + +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- + +ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container) +{ + image_interface_iterator iter(machine.root_device()); + for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next()) + { + if (image->filename()) + { + m_list = strensure(image->software_list_name()); + m_short = strensure(image->software_entry()->shortname()); + m_long = strensure(image->software_entry()->longname()); + m_parent = strensure(image->software_entry()->parentname()); + } + } + m_driver = (driver == nullptr) ? &machine.system() : driver; + + init_items(); +} + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_dats_view::ui_menu_dats_view(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver) : ui_menu(machine, container) +{ + m_list = swinfo->listname; + m_short = swinfo->shortname; + m_long = swinfo->longname; + m_parent = swinfo->parentname; + m_driver = (driver == nullptr) ? &machine.system() : driver; + m_swinfo = swinfo; + + issoft = true; + + if (machine.datfile().has_software(m_list, m_short, m_parent)) + m_items_list.emplace_back("Software History", UI_HISTORY_LOAD, machine.datfile().rev_history()); + if (swinfo && !swinfo->usage.empty()) + m_items_list.emplace_back("Software Usage", 0, ""); +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_dats_view::~ui_menu_dats_view() +{ +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_dats_view::handle() +{ + const ui_menu_event *m_event = process(MENU_FLAG_UI_DATS); + if (m_event != nullptr) + { + if (m_event->iptkey == IPT_UI_LEFT && actual > 0) + { + actual--; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + if (m_event->iptkey == IPT_UI_RIGHT && actual < m_items_list.size() - 1) + { + actual++; + reset(UI_MENU_RESET_SELECT_FIRST); + } + } +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_dats_view::populate() +{ + machine().pause(); + if (!issoft) + get_data(); + else + get_data_sw(); + + item_append(MENU_SEPARATOR_ITEM, nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), nullptr); + customtop = 2.0f * machine().ui().get_line_height() + 4.0f * UI_BOX_TB_BORDER; + custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; + machine().resume(); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_dats_view::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + ui_manager &mui = machine().ui(); + float maxwidth = origx2 - origx1; + float width; + std::string driver; + + if (issoft) + driver = m_swinfo->longname; + else + driver = m_driver->description; + + mui.draw_text_full(container, driver.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - 2.0f * UI_BOX_TB_BORDER - mui.get_line_height(); + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + mui.draw_text_full(container, driver.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + + // take off the borders + x1 -= UI_BOX_LR_BORDER; + x2 += UI_BOX_LR_BORDER; + y1 -= UI_BOX_TB_BORDER; + + maxwidth = 0; + for (auto & elem : m_items_list) + { + mui.draw_text_full(container, elem.label.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + maxwidth += width; + } + + float space = (1.0f - maxwidth) / (m_items_list.size() * 2); + + // compute our bounds + y1 = y2 + UI_BOX_TB_BORDER; + y2 += mui.get_line_height() + 2.0f * UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // take off the borders + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + int x = 0; + for (auto & elem : m_items_list) + { + x1 += space; + rgb_t fcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0x00) : UI_TEXT_COLOR; + rgb_t bcolor = (actual == x) ? rgb_t(0xff, 0xff, 0xff, 0xff) : UI_TEXT_BG_COLOR; + mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NONE, fcolor, bcolor, &width, nullptr); + if (bcolor != UI_TEXT_BG_COLOR) + mui.draw_textured_box(container, x1 - (space / 2), y1, x1 + width + (space / 2), y2, bcolor, rgb_t(255, 43, 43, 43), + hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + + mui.draw_text_full(container, elem.label.c_str(), x1, y1, 1.0f, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NORMAL, fcolor, bcolor, &width, nullptr); + x1 += width + space; + ++x; + } + + // bottom + std::string revision; + revision.assign("Revision: ").append(m_items_list[actual].revision); + mui.draw_text_full(container, revision.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = origy2 + UI_BOX_TB_BORDER; + y2 = origy2 + bottom; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, revision.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} + +//------------------------------------------------- +// load data from DATs +//------------------------------------------------- + +void ui_menu_dats_view::get_data() +{ + std::vector<int> xstart; + std::vector<int> xend; + std::string buffer; + std::vector<std::string> m_item; + if (m_items_list[actual].option == UI_COMMAND_LOAD) + { + machine().datfile().command_sub_menu(m_driver, m_item); + if (!m_item.empty()) + { + for (size_t x = 0; x < m_item.size(); ++x) + { + std::string t_buffer; + buffer.append(m_item[x]).append("\n"); + machine().datfile().load_command_info(t_buffer, m_item[x]); + if (!t_buffer.empty()) + buffer.append(t_buffer).append("\n"); + } + convert_command_glyph(buffer); + } + } + else + machine().datfile().load_data_info(m_driver, buffer, m_items_list[actual].option); + + int totallines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (4.0f * UI_BOX_LR_BORDER), xstart, xend); + for (int x = 0; x < totallines; ++x) + { + std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x])); + item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1)); + + } +} + +void ui_menu_dats_view::get_data_sw() +{ + std::vector<int> xstart; + std::vector<int> xend; + std::string buffer; + std::vector<std::string> m_item; + if (m_items_list[actual].option == 0) + buffer = m_swinfo->usage; + else + { + if (m_swinfo->startempty == 1) + machine().datfile().load_data_info(m_swinfo->driver, buffer, UI_HISTORY_LOAD); + else + machine().datfile().load_software_info(m_swinfo->listname, buffer, m_swinfo->shortname, m_swinfo->parentname); + } + + int totallines = machine().ui().wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (4.0f * UI_BOX_LR_BORDER), xstart, xend); + for (int x = 0; x < totallines; ++x) + { + std::string tempbuf(buffer.substr(xstart[x], xend[x] - xstart[x])); + item_append(tempbuf.c_str(), nullptr, (MENU_FLAG_UI_DATS | MENU_FLAG_DISABLE), (void *)(FPTR)(x + 1)); + + } +} + +void ui_menu_dats_view::init_items() +{ + datfile_manager &datfile = machine().datfile(); + if (datfile.has_history(m_driver)) + m_items_list.emplace_back("History", UI_HISTORY_LOAD, datfile.rev_history()); + if (datfile.has_mameinfo(m_driver)) + m_items_list.emplace_back("Mameinfo", UI_MAMEINFO_LOAD, datfile.rev_mameinfo()); + if (datfile.has_messinfo(m_driver)) + m_items_list.emplace_back("Messinfo", UI_MESSINFO_LOAD, datfile.rev_messinfo()); + if (datfile.has_sysinfo(m_driver)) + m_items_list.emplace_back("Sysinfo", UI_SYSINFO_LOAD, datfile.rev_sysinfo()); + if (datfile.has_story(m_driver)) + m_items_list.emplace_back("Mamescore", UI_STORY_LOAD, datfile.rev_storyinfo()); + if (datfile.has_command(m_driver)) + m_items_list.emplace_back("Command", UI_COMMAND_LOAD, ""); +} + diff --git a/src/emu/ui/datmenu.h b/src/emu/ui/datmenu.h new file mode 100644 index 00000000000..f799e5fa7d0 --- /dev/null +++ b/src/emu/ui/datmenu.h @@ -0,0 +1,52 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/datmenu.h + + Internal UI user interface. + + +***************************************************************************/ + +#pragma once + +#ifndef __UI_DATMENU_H__ +#define __UI_DATMENU_H__ + +struct ui_software_info; + +//------------------------------------------------- +// class dats menu +//------------------------------------------------- + +class ui_menu_dats_view : public ui_menu +{ +public: + ui_menu_dats_view(running_machine &machine, render_container *container, ui_software_info *swinfo, const game_driver *driver = nullptr); + ui_menu_dats_view(running_machine &machine, render_container *container, const game_driver *driver = nullptr); + virtual ~ui_menu_dats_view(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + int actual; + const game_driver *m_driver; + ui_software_info *m_swinfo; + std::string m_list, m_short, m_long, m_parent; + void get_data(); + void get_data_sw(); + void init_items(); + bool issoft; + struct list_items + { + list_items(std::string l, int i, std::string rev) { label = l; option = i; revision = rev; } + std::string label; + int option; + std::string revision; + }; + std::vector<list_items> m_items_list; +}; + +#endif /* __UI_DATMENU_H__ */ diff --git a/src/emu/ui/defimg.h b/src/emu/ui/defimg.h new file mode 100644 index 00000000000..43b334b8f93 --- /dev/null +++ b/src/emu/ui/defimg.h @@ -0,0 +1,261 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +static const UINT32 no_avail_bmp[] = +{ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x01231f20, 0x04231f20, 0x11231f20, 0x2e231f20, 0x62231f20, 0x8e231f20, 0xb4231f20, 0xd4231f20, 0xe5231f20, 0xf2231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xf2231f20, 0xe5231f20, 0xd4231f20, 0xb4231f20, 0x8e231f20, 0x62231f20, 0x2e231f20, 0x11231f20, 0x04231f20, 0x01231f20, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x06231f20, 0x1c231f20, 0x49231f20, 0x8c231f20, 0xc4231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0xc4231f20, 0x8c231f20, 0x49231f20, 0x1c231f20, 0x06231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x04231f20, 0x32231f20, 0x7b231f20, 0xc2231f20, 0xf3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf3231f20, 0xc2231f20, 0x7b231f20, 0x32231f20, 0x04231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x30231f20, 0x8e231f20, 0xd6231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xd6231f20, 0x8e231f20, 0x30231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0e231f20, 0x73231f20, 0xd8231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0xd8231f20, 0x73231f20, 0x0e231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x29231f20, 0xb6231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0xb6231f20, 0x29231f20, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x03231f20, 0x4f231f20, 0xdd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xdd231f20, 0x4f231f20, 0x03231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x0a231f20, 0x72231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x72231f20, 0x0a231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10231f20, 0x84231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff1e191a, 0xff1e1a1b, 0xff211c1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x84231f20, 0x10231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0a231f20, 0x84231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1c1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff1b1718, 0xff1b1718, 0xff1c1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff393637, 0xff7c7a7a, 0xff827f80, 0xff7d7b7c, 0xff494647, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x84231f20, 0x0a231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x03231f20, 0x74231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3b3839, 0xff585656, 0xff5a5757, 0xff5a5757, 0xff5b5858, 0xff4b4949, 0xff272325, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff464243, 0xff5a5858, 0xff5a5758, 0xff565253, 0xff312d2e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff575355, 0xffececec, 0xfff7f7f7, 0xffededed, 0xff7a7878, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x74231f20, 0x03231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x51231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff807d7e, 0xfff1f1f1, 0xfff6f6f6, 0xfff6f6f6, 0xfff9f9f9, 0xffe1e0e0, 0xff565354, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffa9a7a7, 0xfff6f6f6, 0xfff6f6f6, 0xffe6e6e6, 0xff575455, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x51231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2a231f20, 0xde231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff848283, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa6a4a5, 0xff2c2729, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffedecec, 0xff5a5758, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff595556, 0xfff6f6f6, 0xffffffff, 0xfff6f6f6, 0xff7e7c7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xde231f20, 0x2a231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0e231f20, 0xb5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff524f50, 0xffdbdbdb, 0xffe5e4e5, 0xffdcdbdb, 0xff737071, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xb5231f20, 0x0e231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, + 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x73231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb4b3b4, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2e2b2c, 0xff4f4c4d, 0xff524f50, 0xff504d4e, 0xff363334, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0x73231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, + 0x00000000, 0x00231f20, 0x00000000, 0x30231f20, 0xd8231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfffdfdfd, 0xffededed, 0xfffdfdfd, 0xffffffff, 0xfff9fafa, 0xff646162, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff1e1a1b, 0xff1e1a1b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd8231f20, 0x30231f20, 0x00000000, 0x00231f20, 0x00000000, + 0x00231f20, 0x00000000, 0x05231f20, 0x8e231f20, 0xfa231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xffadacac, 0xffdbdbdb, 0xffffffff, 0xffffffff, 0xffc8c7c7, 0xff2b2628, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1c1718, 0xff1a1617, 0xff1b1718, 0xff1b1718, 0xff1a1617, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1d191a, 0xff1a1617, 0xff1b1718, 0xff1a1617, 0xff1b1718, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1c1819, 0xff1a1517, 0xff1b1718, 0xff1a1517, 0xff1c1719, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1c1819, 0xff191516, 0xff1a1617, 0xff1a1617, 0xff191516, 0xff1b1718, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1c1819, 0xff1a1617, 0xff1b1718, 0xff1a1617, 0xff1a1617, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1d191a, 0xff1a1516, 0xff1a1617, 0xff1b1718, 0xff191516, 0xff1b1718, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfa231f20, 0x8e231f20, 0x05231f20, 0x00000000, 0x00231f20, + 0x00000000, 0x00000000, 0x32231f20, 0xd8231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff7f7f7, 0xff858384, 0xff949393, 0xfffdfefd, 0xffffffff, 0xfffdfdfd, 0xff767475, 0xff1c1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252122, 0xff413e3f, 0xff6e6c6c, 0xff8f8d8d, 0xff9c9b9b, 0xff9b9999, 0xff898787, 0xff646061, 0xff383435, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff292526, 0xff393637, 0xff3b3839, 0xff3a3738, 0xff2c292a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e1f, 0xff2f2b2c, 0xff3a3738, 0xff3b3839, 0xff393536, 0xff282425, 0xff221e1f, 0xff201c1d, 0xff302d2e, 0xff5f5c5d, 0xff8a8788, 0xff9b9a9a, 0xff989797, 0xff7c7a7a, 0xff454243, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff373334, 0xff666465, 0xff8e8c8c, 0xff9b999a, 0xff918f8f, 0xff716f6f, 0xff3b3839, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff231f20, 0xff302c2d, 0xff4e4a4b, 0xff706e6f, 0xff8b898a, 0xff999797, 0xff999797, 0xff8e8c8d, 0xff767374, 0xff494646, 0xff2b2728, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff332f30, 0xff636061, 0xff8d8b8b, 0xff9c9a9b, 0xff989697, 0xff807f7f, 0xff524f4f, 0xff2a2627, 0xff211d1e, 0xff221e1f, 0xff2e2a2b, 0xff3b3738, 0xff3b3839, 0xff383536, 0xff292526, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff393636, 0xff646162, 0xff878485, 0xff989697, 0xff9d9b9b, 0xff908e8e, 0xff716e6e, 0xff423f3f, 0xff252122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd8231f20, 0x32231f20, 0x00000000, 0x00000000, + 0x00000000, 0x06231f20, 0x7c231f20, 0xfc231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7b797a, 0xff4a4647, 0xffdedede, 0xffffffff, 0xffffffff, 0xffd1d0d1, 0xff363233, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252122, 0xff504e4f, 0xffaaa9a9, 0xffececed, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe1e0e1, 0xff949293, 0xff403c3d, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1718, 0xff555253, 0xffe9e9e9, 0xfff4f4f4, 0xffebebeb, 0xff787676, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff8b898a, 0xffeff0f0, 0xfff3f3f3, 0xffdddddd, 0xff4c4a4a, 0xff242021, 0xff716f6f, 0xffd4d2d3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff9c9b9c, 0xff393536, 0xff201c1d, 0xff231f20, 0xff211d1e, 0xff322f30, 0xff848282, 0xffe0dede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff838182, 0xff2f2b2c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2b2728, 0xff605d5e, 0xffa2a1a1, 0xffd8d7d7, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff6f5f5, 0xffc4c3c3, 0xff6c696a, 0xff2d292a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2f2b2c, 0xff7c797a, 0xffd9d8d8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f7f7, 0xffbdbcbc, 0xff5a5757, 0xff1f1a1b, 0xff817e7f, 0xfff2f1f1, 0xfff3f2f2, 0xffdedede, 0xff524e4f, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff474344, 0xff9a9899, 0xffe3e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeeedee, 0xffaaa9a9, 0xff4e4b4b, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfc231f20, 0x7c231f20, 0x06231f20, 0x00000000, + 0x00000000, 0x1c231f20, 0xc3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7e7c7d, 0xff1d181a, 0xff9a9898, 0xfffbfbfb, 0xffffffff, 0xfff9f9f9, 0xff848182, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff272324, 0xff7d7a7b, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfffdfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd4d3d4, 0xff605d5e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff595656, 0xfff7f7f7, 0xffffffff, 0xfff7f7f7, 0xff7e7c7d, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff939191, 0xfffbfbfb, 0xffffffff, 0xffeae9e9, 0xff5d5a5b, 0xff8c8a8a, 0xfff8f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff3b3738, 0xff1b1718, 0xff3c3939, 0xffb3b2b2, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffffefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff959293, 0xff2b2728, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff484445, 0xffe6e6e6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfefe, 0xfffafafa, 0xfffcfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff9d9b9b, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff383435, 0xffa7a6a6, 0xfffefdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfff8f8f8, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff696767, 0xff8b8989, 0xfffcfcfc, 0xffffffff, 0xffeaeaea, 0xff555253, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff262222, 0xff727071, 0xffdedede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff757273, 0xff252122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xc3231f20, 0x1c231f20, 0x00000000, + 0x01231f20, 0x49231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff807d7e, 0xff161213, 0xff474444, 0xffdfdedf, 0xffffffff, 0xffffffff, 0xffd1d0d0, 0xff413d3e, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff828080, 0xfff4f3f3, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffcecdcd, 0xff9c9a9a, 0xff868585, 0xff8a8787, 0xffa6a4a4, 0xffdddcdc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe0dfe0, 0xff5f5c5d, 0xff1f1b1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffececec, 0xffadabac, 0xfff2f2f2, 0xffffffff, 0xffd3d2d2, 0xffa6a4a5, 0xff908e8f, 0xff929191, 0xffb4b3b3, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff959394, 0xff363333, 0xffb0afb0, 0xffffffff, 0xfffafafa, 0xffc9c8c9, 0xffa09e9f, 0xff8f8c8d, 0xff969494, 0xffbdbcbc, 0xfff6f5f6, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff686667, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff4b4949, 0xffefeeef, 0xffffffff, 0xffdddddd, 0xffbab9ba, 0xff9e9c9d, 0xff8b898a, 0xff848182, 0xff868484, 0xff999797, 0xffbebdbe, 0xfff0f0ef, 0xffffffff, 0xffffffff, 0xffffffff, 0xff949293, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2a2b, 0xff9f9d9e, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xffb7b5b6, 0xff8d8b8c, 0xff7f7c7d, 0xff878586, 0xffaaa8a9, 0xffe2e1e2, 0xffffffff, 0xffdbdbdb, 0xffbcbbbb, 0xfffcfcfc, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff221e1f, 0xff807e7e, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xffcac9c9, 0xff9e9c9c, 0xff888686, 0xff858282, 0xff959393, 0xffc0bfbf, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffecebeb, 0xff726f70, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x49231f20, 0x01231f20, + 0x04231f20, 0x8c231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff807d7e, 0xff1b1718, 0xff1e191a, 0xff8f8d8e, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff888687, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d1a1b, 0xff5c5959, 0xffe6e5e5, 0xffffffff, 0xffffffff, 0xfff6f5f6, 0xff979495, 0xff3f3c3c, 0xff272424, 0xff221f20, 0xff221e1f, 0xff2b2728, 0xff4d494a, 0xffb6b5b5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc9c8c8, 0xff3f3b3c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xfffcfcfc, 0xfff9f9f9, 0xfff4f4f4, 0xff918e8f, 0xff413e3f, 0xff2b2728, 0xff242021, 0xff242021, 0xff2d2a2a, 0xff6c6a6a, 0xffeae9e9, 0xffffffff, 0xffffffff, 0xffdcdcdc, 0xffb1afb0, 0xfff7f7f7, 0xffececec, 0xff7b797a, 0xff393536, 0xff292526, 0xff231f20, 0xff262223, 0xff343031, 0xff7f7d7d, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffc1c0c0, 0xff292526, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff454243, 0xffb1afb0, 0xff7e7b7c, 0xff494647, 0xff332f30, 0xff292526, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff272224, 0xff343031, 0xff656263, 0xffd1d0d0, 0xffffffff, 0xffffffff, 0xfff2f2f2, 0xff545152, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff6c6a6b, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff6b6869, 0xff302c2d, 0xff241f20, 0xff221e1f, 0xff221e1f, 0xff2c2829, 0xff565253, 0xffc2c2c2, 0xffffffff, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191b, 0xff666264, 0xffe9e8e9, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff7b7879, 0xff3b3738, 0xff282425, 0xff221e1f, 0xff221e1f, 0xff252122, 0xff353132, 0xff777575, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffd5d4d4, 0xff4a4647, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x8c231f20, 0x04231f20, + 0x11231f20, 0xc4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff1f1b1c, 0xff383535, 0xffdcdbdb, 0xffffffff, 0xffffffff, 0xffd3d3d3, 0xff434041, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2c2829, 0xffb0afaf, 0xfffefefe, 0xffffffff, 0xfffcfcfc, 0xff9e9d9d, 0xff282525, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff383435, 0xffc7c7c7, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff848383, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffffffff, 0xfffaf9f9, 0xff918f8f, 0xff2a2627, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff8a8889, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfffdfdfd, 0xfff6f7f7, 0xff6b6969, 0xff211d1e, 0xff221d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2a2727, 0xffa3a1a1, 0xffffffff, 0xffffffff, 0xfff6f6f6, 0xff4d4a4b, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff282425, 0xff302c2d, 0xff242021, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e1f, 0xff221e1f, 0xff221e1f, 0xff524f4f, 0xffdddddd, 0xffffffff, 0xffffffff, 0xffa5a4a4, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff312d2e, 0xffbfbebe, 0xffffffff, 0xffffffff, 0xfff5f4f5, 0xff625f60, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff4b4849, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff363333, 0xffc1c1c1, 0xffffffff, 0xffffffff, 0xffededed, 0xff666464, 0xff211d1e, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff706e6e, 0xfff9f9f9, 0xffffffff, 0xfffdfdfd, 0xff908e8f, 0xff272223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xc4231f20, 0x11231f20, + 0x2e231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff1c1819, 0xff7d7b7b, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8a8788, 0xff252122, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff535051, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffd9d9d9, 0xff393636, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff5b5859, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff383435, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffcbcacb, 0xff3b3839, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3f3b3c, 0xffeeedee, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa6a5a5, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221f1f, 0xff615e5e, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xff797677, 0xff1b1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff262223, 0xff939191, 0xffffffff, 0xffffffff, 0xffdedede, 0xff2f2b2c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff575354, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffa1a09f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201d1e, 0xff817f81, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1e, 0xff6c696a, 0xffefefef, 0xffffffff, 0xffffffff, 0xff989797, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xffb1b0b0, 0xffffffff, 0xffffffff, 0xffcccbcb, 0xff3b3738, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0x2e231f20, + 0x62231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff211d1e, 0xff2f2c2d, 0xffcdcdcd, 0xffffffff, 0xffffffff, 0xffdddddd, 0xff423f40, 0xff211d1e, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff7d7b7b, 0xfff9f9f9, 0xffffffff, 0xffffffff, 0xff8f8e8e, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffbdbcbd, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff565353, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xfff9f9f9, 0xff918f90, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff282425, 0xffcdcccc, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff5d5b5b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff474444, 0xffdad9d9, 0xffffffff, 0xffffffff, 0xff999898, 0xff1b1618, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff1f1b1c, 0xff696768, 0xfff0f0ef, 0xffffffff, 0xfff5f5f5, 0xff4c494a, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff8a8989, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff454242, 0xffdedede, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2a2627, 0xffa19fa0, 0xffffffff, 0xffffffff, 0xffeeeded, 0xff444040, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff626060, 0xffffffff, 0xffffffff, 0xffeeeeee, 0xff575354, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x62231f20, + 0x8e231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff6e6b6b, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xff959394, 0xff211d1e, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2a2627, 0xffa09f9f, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff535051, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1a1617, 0xff7e7b7c, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff737172, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xfff2f2f1, 0xff686666, 0xff1c1719, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xffb7b5b5, 0xffffffff, 0xffffffff, 0xffdbdbdb, 0xff423f3f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3b3738, 0xffcecdcd, 0xffffffff, 0xffffffff, 0xffa7a6a6, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff2c2729, 0xff3b3839, 0xff4c4849, 0xff575455, 0xff5c595a, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5d5a5b, 0xff8b898a, 0xffefefef, 0xffffffff, 0xfffbfbfb, 0xff646162, 0xff1b1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xffb2b1b2, 0xffffffff, 0xffffffff, 0xffd5d4d4, 0xff373435, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff272324, 0xffbebdbd, 0xfffefefe, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383435, 0xffc7c7c7, 0xffffffff, 0xffffffff, 0xffc3c2c2, 0xff201c1d, 0xff1d191a, 0xff1f1b1c, 0xff1e1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1c1819, 0xff3a3738, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xff706e6e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x8e231f20, + 0xb4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff312e2e, 0xffbcbbbb, 0xffffffff, 0xffffffff, 0xffebebeb, 0xff4a4748, 0xff1e1a1b, 0xff221e1f, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff302d2e, 0xffb9b8b9, 0xffffffff, 0xffffffff, 0xffe6e6e6, 0xff343031, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff565254, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xff8f8c8d, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffededed, 0xff575454, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201d1e, 0xffafadae, 0xffffffff, 0xffffffff, 0xffcac9ca, 0xff373334, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383535, 0xffc9c8c8, 0xffffffff, 0xffffffff, 0xffafadae, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff393536, 0xff777475, 0xffacaaaa, 0xffcccacb, 0xffdddddc, 0xffe5e5e5, 0xffe9e9e9, 0xffebebeb, 0xffebebeb, 0xffebebeb, 0xffebeaeb, 0xfff0f0f0, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xff706d6e, 0xff191516, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2c292a, 0xffcccbcc, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff2b2829, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xffa2a0a0, 0xfffcfcfc, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff484445, 0xffdcdcdc, 0xffffffff, 0xffffffff, 0xffc8c7c8, 0xff716f6f, 0xff747172, 0xff747273, 0xff747273, 0xff757273, 0xff757273, 0xff757273, 0xff767373, 0xff757374, 0xff767374, 0xff757273, 0xff828081, 0xffeeedee, 0xffffffff, 0xffffffff, 0xff858283, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xb4231f20, + 0xd4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff686566, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffabaaaa, 0xff211c1d, 0xff211d1e, 0xff221e1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff343031, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xffd4d4d4, 0xff2a2627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff413e3f, 0xfff6f6f5, 0xffffffff, 0xffffffff, 0xff9f9e9e, 0xff272223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff524e4f, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadabac, 0xffffffff, 0xffffffff, 0xffc4c3c4, 0xff322f30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5d5a5b, 0xffc8c7c8, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff322e2f, 0xffdbdada, 0xffffffff, 0xffffffff, 0xffaeacac, 0xff282425, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff908e8f, 0xfffbfbfb, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff545151, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xfff1f1f1, 0xfff2f1f2, 0xfff2f1f2, 0xfff2f1f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff3f3f3, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xff8d8c8c, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd4231f20, + 0xe5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff322e2f, 0xffb6b5b5, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff5a5858, 0xff1a1617, 0xff221f1f, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373434, 0xffcac9c9, 0xffffffff, 0xffffffff, 0xffcbcacb, 0xff282425, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff3b3738, 0xfff2f1f2, 0xffffffff, 0xffffffff, 0xffa5a4a4, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff565454, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xffd1d0d0, 0xffb3b1b1, 0xffa19f9f, 0xff989696, 0xff939191, 0xff929091, 0xff918f90, 0xffafaeaf, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff322f30, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffa9a7a8, 0xff282425, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1819, 0xff8b8989, 0xfffbfbfb, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff595758, 0xfff0efef, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff929091, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xe5231f20, + 0xf2231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff676566, 0xffececec, 0xffffffff, 0xffffffff, 0xffb9b8b8, 0xff262223, 0xff201c1c, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff353233, 0xffc7c6c7, 0xffffffff, 0xffffffff, 0xffd2d1d1, 0xff2a2627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff3f3b3c, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffa2a0a1, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2a2b, 0xffc2c1c1, 0xffffffff, 0xffffffff, 0xfff5f4f4, 0xff9b9a9a, 0xff464344, 0xff2a2627, 0xff221e1f, 0xff1d191a, 0xff1c1819, 0xff1c1819, 0xff1c1819, 0xff1a1516, 0xff5c595a, 0xffe9e8e9, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff302c2d, 0xffd7d7d7, 0xffffffff, 0xffffffff, 0xffb1b0b0, 0xff292526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e191a, 0xff959393, 0xfffcfcfc, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff585556, 0xffeeedee, 0xffffffff, 0xffffffff, 0xffc1c0c0, 0xff848282, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff898788, 0xff8b898a, 0xff565253, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf2231f20, + 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2c2829, 0xffb6b5b5, 0xfffefefe, 0xffffffff, 0xfff1f1f1, 0xff666364, 0xff1c1819, 0xffafadad, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff312e2f, 0xffbdbcbd, 0xffffffff, 0xffffffff, 0xffe1e0e1, 0xff302c2d, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff4f4b4c, 0xfffaf9f9, 0xffffffff, 0xffffffff, 0xff949292, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff5d5a5b, 0xfffffefe, 0xffffffff, 0xfffefefe, 0xff8c898a, 0xff201c1d, 0xff1d191a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff6a6768, 0xffefefef, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2a2627, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xffc1c0c0, 0xff2e2a2b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xffa9a8a8, 0xfffdfdfd, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff4f4c4d, 0xffe4e4e4, 0xffffffff, 0xffffffff, 0xff999797, 0xff100c0d, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff181415, 0xff171314, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff5f5d5d, 0xffeeeeee, 0xffffffff, 0xfffefefe, 0xffb9b7b8, 0xff302d2e, 0xffacabab, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2c2829, 0xffa8a6a6, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff494647, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff726f70, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7a7878, 0xff241f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff908e8e, 0xffffffff, 0xffffffff, 0xffdcdbdb, 0xff434041, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff7f7c7d, 0xfff9f9f9, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xffa8a6a7, 0xffffffff, 0xffffffff, 0xffe0dfdf, 0xff3f3b3c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2d2a2b, 0xffc8c8c8, 0xfffefefe, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3f3c3d, 0xffd3d2d2, 0xffffffff, 0xffffffff, 0xffc7c5c6, 0xff262223, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242021, 0xffaeacad, 0xffffffff, 0xffffffff, 0xffeeeeee, 0xff6c6a6a, 0xffadabab, 0xfffdfdfd, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242121, 0xff868484, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xff7e7b7c, 0xff191516, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xffacaaab, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff5d595a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xffa7a5a6, 0xffffffff, 0xffffffff, 0xffc6c5c5, 0xff343132, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2b2829, 0xffa9a8a8, 0xffffffff, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff7b7878, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff696667, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff555153, 0xffe6e5e5, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2f2b2c, 0xffb2b1b1, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xff4a4748, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff4e4a4b, 0xffefeeee, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xffc1c0c1, 0xfffcfcfc, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5d5a5b, 0xffe9e8e9, 0xffffffff, 0xffffffff, 0xffc7c6c6, 0xff2b2627, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff464243, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffcfcece, 0xff3e3a3b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xffa8a6a6, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff383435, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4e4b4b, 0xffe3e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff484546, 0xffe8e8e8, 0xffffffff, 0xffffffff, 0xffc3c2c2, 0xff292627, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff9e9c9c, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff7f7c7d, 0xfff8f7f8, 0xffffffff, 0xffffffff, 0xffa3a1a1, 0xff1e1a1c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff9c9a9a, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xfff0f0f0, 0xfffefefe, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff343031, 0xffbfbebe, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff807e7f, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff262223, 0xffafadae, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff949293, 0xff272324, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff949192, 0xffffffff, 0xffffffff, 0xffecebec, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2c2829, 0xffb1afaf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2a2627, 0xffa6a4a5, 0xffffffff, 0xffffffff, 0xffffffff, 0xff939192, 0xff201c1d, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff6c6a6a, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff444041, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff716e6f, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff221e1f, 0xff2d292a, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff403d3e, 0xffe4e4e4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff706d6e, 0xfff0eff0, 0xffffffff, 0xffffffff, 0xffe9e9e9, 0xff706e6f, 0xff282425, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff302c2d, 0xff969494, 0xfffafaf9, 0xffffffff, 0xffffffff, 0xffdad9d9, 0xff4d494a, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xfffdfcfc, 0xffffffff, 0xffffffff, 0xffbbb9b9, 0xff3a3738, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff373334, 0xffa5a3a3, 0xffffffff, 0xfffefefe, 0xfffefefe, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff534f50, 0xffe0dfe0, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffa2a0a1, 0xff433f40, 0xff2a2627, 0xff252122, 0xff282425, 0xff3a3738, 0xff807d7e, 0xffeaeaea, 0xfffefefe, 0xffeeeded, 0xfffefefe, 0xffffffff, 0xffe9e8e8, 0xff555252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1c, 0xff7e7b7c, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffe9e9e9, 0xff7c7a7a, 0xff302c2d, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff242021, 0xff2e2a2b, 0xff4f4c4d, 0xff9f9e9f, 0xff9c9a9b, 0xff2f2b2c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e1f, 0xff1e1b1c, 0xff848282, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xff7f7d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff8b898a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffececec, 0xff595658, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff272425, 0xffa3a1a1, 0xfffafafa, 0xffffffff, 0xffffffff, 0xfff3f2f3, 0xffaaa9a9, 0xff6c6a6a, 0xff585556, 0xff5b5859, 0xff797677, 0xffc2c1c1, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffefeeee, 0xff7b7979, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xfff5f5f5, 0xffffffff, 0xfff5f5f5, 0xff7d7b7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff929090, 0xfffafafa, 0xffffffff, 0xffe9e9e9, 0xff514d4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffadacad, 0xffffffff, 0xffffffff, 0xffc4c3c3, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373435, 0xffc8c7c7, 0xffffffff, 0xffffffff, 0xffb0aeaf, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2a2b, 0xffc4c3c3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcccccc, 0xff7b7878, 0xff575354, 0xff524e4f, 0xff5c595a, 0xff848282, 0xffd2d1d1, 0xffffffff, 0xfff5f5f5, 0xffcbcbcb, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xff777475, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff7c797a, 0xffedeced, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xffbebdbe, 0xffaeadae, 0xffb8b7b7, 0xffdddcdc, 0xffffffff, 0xffffffff, 0xffbfbebf, 0xffa5a3a4, 0xfffbfbfb, 0xffffffff, 0xffe9e8e8, 0xff545252, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff282325, 0xff9e9d9d, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffc6c5c5, 0xff888687, 0xff636161, 0xff585556, 0xff575455, 0xff5e5b5c, 0xff726f70, 0xff959293, 0xffc3c2c2, 0xfff4f3f3, 0xffffffff, 0xffb5b4b4, 0xff2f2b2c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff858383, 0xfff8f7f7, 0xffffffff, 0xfff9f9f9, 0xff807d7e, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3f3c3c, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffededed, 0xff5a5758, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff332f30, 0xffa4a3a3, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfff0f1f1, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeae9e9, 0xff858383, 0xff252222, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585656, 0xfff6f6f6, 0xffffffff, 0xfff6f6f6, 0xff7e7c7c, 0xff201d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff939191, 0xfffbfbfb, 0xffffffff, 0xffeaeaea, 0xff524e4f, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffaeacad, 0xffffffff, 0xffffffff, 0xffc5c4c4, 0xff322e30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383435, 0xffc9c8c9, 0xffffffff, 0xffffffff, 0xffb1afb0, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff585556, 0xffdedddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xffe9e9e9, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xfffafafa, 0xffa4a3a3, 0xff706d6e, 0xffe6e6e6, 0xffffffff, 0xffffffff, 0xff787576, 0xff181415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff272324, 0xff7e7b7d, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffc2c1c1, 0xff494747, 0xff8a8788, 0xfffbfbfb, 0xffffffff, 0xffe7e6e6, 0xff514e4f, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff2c2829, 0xff918f8f, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xfff0f0f0, 0xffefefef, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffadabac, 0xff2e2a2b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff828181, 0xfff5f5f5, 0xfffcfcfc, 0xfff7f7f7, 0xff7e7b7c, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff817f7f, 0xfff8f8f8, 0xfffdfefe, 0xfffcfcfc, 0xfffcfdfc, 0xffebeaeb, 0xff595656, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1d, 0xff2e2a2b, 0xff787575, 0xffcccbcc, 0xfffbfafb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f4f3, 0xffbab9b9, 0xff625e5f, 0xff252122, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585555, 0xfff2f2f2, 0xfffefdfd, 0xfff3f4f4, 0xff7c7a7a, 0xff211c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff908e8f, 0xfff9f8f8, 0xfffcfcfc, 0xffe7e6e6, 0xff504d4e, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1d, 0xffacaaaa, 0xffffffff, 0xffffffff, 0xffc3c2c2, 0xff322e2f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383435, 0xffc7c5c6, 0xffffffff, 0xffffffff, 0xffafadad, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232020, 0xff5b5959, 0xffc0bfbf, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdddcdd, 0xff888686, 0xff302c2d, 0xff5a5657, 0xffe7e7e7, 0xfffefefe, 0xfffffffe, 0xff767475, 0xff191415, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242021, 0xff535051, 0xff9d9b9b, 0xffd2d1d2, 0xffeeeeee, 0xfff9fafa, 0xfff7f7f7, 0xffe7e7e7, 0xffc4c3c4, 0xff858384, 0xff3d3a3b, 0xff1b1819, 0xff989797, 0xfffcfcfc, 0xffffffff, 0xffe1e0e1, 0xff4a4647, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff272324, 0xff5e5b5c, 0xffafadae, 0xffeaeaea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xffd1d1d1, 0xff9f9d9e, 0xff565454, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3b3738, 0xff575455, 0xff585556, 0xff575556, 0xff393637, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff312d2e, 0xff545152, 0xff595657, 0xff585556, 0xff585556, 0xff545152, 0xff302c2d, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff3a3637, 0xff656263, 0xff949292, 0xffb1b0b0, 0xffbdbcbc, 0xffbcbaba, 0xffacabab, 0xff898787, 0xff595656, 0xff322e2f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff302c2d, 0xff565353, 0xff595556, 0xff565454, 0xff393536, 0xff221f1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3e3a3b, 0xff585556, 0xff585556, 0xff535051, 0xff2e2b2b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff454142, 0xff5a5859, 0xff5a5758, 0xff4a4748, 0xff272324, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff282425, 0xff4b4748, 0xff595657, 0xff5a5758, 0xff454243, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff363233, 0xff666464, 0xff9a9798, 0xffb4b3b4, 0xffbdbcbc, 0xffb7b6b6, 0xffa09e9e, 0xff737172, 0xff434041, 0xff262223, 0xff211d1e, 0xff312d2e, 0xff535051, 0xff595656, 0xff595556, 0xff383435, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff292526, 0xff3b3738, 0xff4e4b4c, 0xff565454, 0xff555253, 0xff4a4647, 0xff353132, 0xff252122, 0xff1f1b1c, 0xff231e1f, 0xffb5b4b4, 0xfffefefe, 0xffffffff, 0xffd5d4d4, 0xff3a3738, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff2e2a2b, 0xff4d4a4a, 0xff787676, 0xff9e9c9d, 0xffb5b4b4, 0xffbdbcbd, 0xffbababa, 0xffb1b0b1, 0xff9c9a9b, 0xff7d7b7b, 0xff575455, 0xff3b3838, 0xff292526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff252122, 0xff292526, 0xff272425, 0xff231f20, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211e1f, 0xff211d1e, 0xff221e1f, 0xff221f1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221f1f, 0xff221d1f, 0xff221e1f, 0xff252122, 0xff282425, 0xff262223, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3c393a, 0xffd5d5d5, 0xffffffff, 0xfffefefe, 0xffbebdbe, 0xff272324, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff262223, 0xff292526, 0xff272425, 0xff242021, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff7b7879, 0xfff4f3f3, 0xffffffff, 0xfffbfbfb, 0xff8e8b8c, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff322e2f, 0xff312d2e, 0xff211d1e, 0xff1f1b1c, 0xff201c1d, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff1f1b1c, 0xff221e1f, 0xff555253, 0xffd6d5d5, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff4c484a, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff727070, 0xffafadae, 0xff777475, 0xff494647, 0xff302c2d, 0xff231f20, 0xff221e1f, 0xff211e1f, 0xff2a2627, 0xff434040, 0xff7b7879, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9b9999, 0xff201d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff838181, 0xfffafafa, 0xfff4f3f4, 0xffdbd9da, 0xffc0bfbf, 0xffacabab, 0xffa3a2a2, 0xffa8a6a6, 0xffb8b6b7, 0xffd5d4d4, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbcbbbc, 0xff353133, 0xff201b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff828080, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xfffcfcfc, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfefe, 0xffacaaab, 0xff3c3839, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff434041, 0xff939191, 0xffcdcccd, 0xffedecec, 0xfff7f7f7, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xffebebeb, 0xffbcbbbc, 0xff696666, 0xff2a2627, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1d191a, 0xff272324, 0xff3d3a3b, 0xff5a5758, 0xff6e6c6c, 0xff797677, 0xff7b797a, 0xff737172, 0xff605d5e, 0xff3f3b3b, 0xff231f20, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1e1a1b, 0xff1b1718, 0xff191516, 0xff181415, 0xff181415, 0xff181415, 0xff1b1718, 0xff1f1a1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2d292a, 0xff5e5c5d, 0xff696566, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696666, 0xff696566, 0xff696666, 0xff514e4f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff787576, 0xffe8e7e7, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f3f3, 0xfff4f4f4, 0xffd1d1d1, 0xff464344, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff4b4849, 0xffd6d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffa2a1a1, 0xff292526, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2e2a2b, 0xffaaa8a9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefdfd, 0xfff7f6f7, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff656263, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff737071, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff686566, 0xff423e3f, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff454142, 0xff464344, 0xffa19f9f, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff383435, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff464344, 0xffdedddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdedede, 0xff484546, 0xff1a1617, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1e1a1b, 0xff201c1d, 0xff8d8a8b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff828080, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2b2829, 0xffb4b2b3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff908d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff4b4748, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2e2a2b, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464243, 0xff464244, 0xff423f40, 0xff2b2728, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff868485, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff8f8d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb4b3b3, 0xff272425, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff838181, 0xffdadada, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d8, 0xffd9d8d9, 0xffcfcecf, 0xff676464, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1a1b, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1e1a1b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff585556, 0xffeaeaea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff8f8d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff787677, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff332f30, 0xffd7d5d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa9a7a8, 0xff2b2728, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2b2b, 0xff413d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff423e3f, 0xff383535, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff343132, 0xffc5c3c3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff8f8d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdfdf, 0xff423e3f, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff737072, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdcdbdb, 0xff4a4748, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211e1f, 0xff969394, 0xfffaf9f9, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff2f2f2, 0xfff8f8f8, 0xffcdcccc, 0xff332f30, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252021, 0xff908e8e, 0xfff9f8f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c484a, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff8f8d8d, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffa8a7a7, 0xff262122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2b2728, 0xffbbb9b9, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff7d7b7b, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff312d2e, 0xffd6d5d5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f7f7, 0xff4c494a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff5d5a5b, 0xffe5e5e5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdfdedf, 0xff4c4849, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff8f8d8e, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefeeef, 0xff696667, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff5a5758, 0xffe8e7e8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbfbdbe, 0xff302c2d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff5b5858, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff787676, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff393536, 0xffc0bebf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffededed, 0xff9b999a, 0xff828080, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848283, 0xff848282, 0xff868383, 0xffc1c0c0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc5c3c4, 0xff3c3839, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262323, 0xff9a9999, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff9c9b9a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa8a6a6, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221f1f, 0xff231f20, 0xff908e8e, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffeffff, 0xfffefefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xfffffefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xff8a8889, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff444142, 0xffd4d3d4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9b999a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff312d2e, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdad9da, 0xff2c2829, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff676565, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffebeaea, 0xff585555, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff807e7e, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeae9e9, 0xff3d393a, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff332f30, 0xff777575, 0xff7d7b7c, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7c7a7a, 0xff7e7b7c, 0xff757273, 0xff2b2728, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff767374, 0xffa19f9f, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xff9c9a9b, 0xffa09e9f, 0xff615f60, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272223, 0xff605d5e, 0xff8a8888, 0xff878686, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff878585, 0xff888686, 0xff878485, 0xff3e3a3b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1b1718, 0xff1c1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191a, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1e1a1b, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff1a1617, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff201b1c, 0xff242021, 0xff302c2d, 0xff3e3b3c, 0xff4a4747, 0xff555253, 0xff5e5b5b, 0xff5f5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5f5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5e5c5d, 0xff5f5c5d, 0xff5e5a5b, 0xff555252, 0xff4a4647, 0xff3e3a3b, 0xff2f2b2c, 0xff231f20, 0xff201c1d, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1d191a, 0xff2d2a2b, 0xff575455, 0xff848283, 0xffb4b3b4, 0xffd2d1d2, 0xffdfdede, 0xffeaeaea, 0xfff4f4f4, 0xfff6f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff5f5f5, 0xfff4f3f4, 0xffeaeaea, 0xffdeddde, 0xffd0d0d0, 0xffb2b1b1, 0xff818080, 0xff555253, 0xff2b2829, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191a, 0xff242021, 0xff605d5e, 0xffb5b3b3, 0xffe5e5e5, 0xfffaf9fa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xffe4e3e4, 0xffb0afb0, 0xff5c5959, 0xff231e20, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff3f3b3c, 0xffaaa9a9, 0xffececec, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffebeaea, 0xffa6a4a6, 0xff3c3839, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4e4a4b, 0xffcccacb, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffc8c7c7, 0xff4b4848, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff585556, 0xffdbdadb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd8d7d8, 0xff555253, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1c1c, 0xff484546, 0xffd7d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd4d3d3, 0xff474344, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff383434, 0xffc3c2c2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff373333, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff9c9a9a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9a9898, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff514e4e, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff504c4d, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252122, 0xffaaa9aa, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffaaa9a9, 0xff252122, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff4a4748, 0xffe0dfe0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe0dfdf, 0xff4a4747, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff787676, 0xfff4f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff777575, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2a2627, 0xffa8a6a6, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffa6a5a5, 0xff292526, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff373435, 0xffc5c4c4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc3c2c2, 0xff363333, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff3f3c3d, 0xffd2d1d2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd2d1d1, 0xff3f3b3c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4a4748, 0xffdcdbdb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdcdbdb, 0xff4a4748, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1e, 0xff535052, 0xffe3e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e2e2, 0xff535051, 0xff211c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff555252, 0xffe4e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff555253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfff5f4f5, 0xffececec, 0xffe4e3e4, 0xffdcdbdb, 0xffdbdada, 0xffe3e3e3, 0xffececec, 0xfff5f4f5, 0xfffcfcfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211c1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xffd2d1d1, 0xffafaeae, 0xff8a8889, 0xff6f6d6e, 0xff646162, 0xff5c595a, 0xff555253, 0xff4e4a4b, 0xff464344, 0xff454343, 0xff4d4a4b, 0xff555252, 0xff5c595a, 0xff646263, 0xff706e6f, 0xff898787, 0xffaeadad, 0xffd1d0d0, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e2e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffd0cfd0, 0xff949293, 0xff696667, 0xff474444, 0xff343031, 0xff272324, 0xff242021, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff282324, 0xff343031, 0xff464243, 0xff686566, 0xff929091, 0xffcccbcb, 0xfff9f9f9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545151, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xfff8f7f7, 0xffdddcdc, 0xffa09f9f, 0xff5a5757, 0xff2b2829, 0xff1d191a, 0xff1e1a1b, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff1e1a1b, 0xff1d191a, 0xff2a2627, 0xff575454, 0xff9d9b9c, 0xffdcdadb, 0xfff7f7f7, 0xfffefdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff535051, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffebebeb, 0xffb6b5b5, 0xff6c696a, 0xff353132, 0xff1d191a, 0xff1c1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1d191a, 0xff1c1819, 0xff333030, 0xff6a6767, 0xffb1b0b0, 0xffe9e9e9, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1e, 0xff525050, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xffaeacad, 0xff605d5e, 0xff272324, 0xff1a1617, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1a1617, 0xff252223, 0xff5c595a, 0xffa9a8a8, 0xffe5e5e5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe2e1e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefeeef, 0xffa7a6a6, 0xff5d5a5a, 0xff2c2829, 0xff1e1a1b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1e1a1b, 0xff2b2728, 0xff5a5757, 0xffa3a1a2, 0xffecebeb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcdcccd, 0xff605d5d, 0xff2b2728, 0xff211d1e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221d1e, 0xff211d1e, 0xff2a2627, 0xff595657, 0xffc3c3c3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff999797, 0xff343132, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff332f30, 0xff928f90, 0xfff3f2f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe1e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffd6d5d5, 0xff666464, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff221e1f, 0xff646061, 0xffd3d2d2, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524e4f, 0xffe1e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffaf9fa, 0xffb6b4b5, 0xff423f3f, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1718, 0xff3e3a3b, 0xffb2b0b1, 0xfff9f9f9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff514e4f, 0xffe1e0e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f7f8, 0xffa2a0a1, 0xff353233, 0xff1c191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff302c2d, 0xff9a9899, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504e4e, 0xffe1e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f3f3, 0xff888687, 0xff2d292a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff2a2728, 0xff827f7f, 0xffefefef, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504d4e, 0xffe1e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffecebec, 0xff716e6f, 0xff272324, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272425, 0xff6f6d6e, 0xffe7e7e7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504d4e, 0xffe0e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f0f1, 0xff726f70, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff716f6f, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504d4e, 0xffe0dfe0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff8a8888, 0xff262223, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221d1e, 0xff888686, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504d4d, 0xffe0dfdf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff9f9d9d, 0xff2b2727, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff201c1d, 0xff211d1e, 0xff252222, 0xff2e2a2b, 0xff333031, 0xff363334, 0xff3a3738, 0xff3b3738, 0xff373334, 0xff343031, 0xff2f2b2c, 0xff262223, 0xff211e1f, 0xff1f1b1c, 0xff201b1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff242122, 0xff999797, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504c4d, 0xffe0dfdf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffaeacac, 0xff312d2e, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1d1819, 0xff242021, 0xff3c3839, 0xff5d5b5b, 0xff7b7979, 0xff959393, 0xffafadad, 0xffbebdbd, 0xffc6c5c5, 0xffcdcccc, 0xffcecdcd, 0xffc7c6c6, 0xffbfbebe, 0xffb1afaf, 0xff979595, 0xff7d7a7c, 0xff615d5e, 0xff3e3a3b, 0xff252122, 0xff1d191a, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff2a2728, 0xffa4a2a2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff504c4d, 0xffe0dfdf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff383535, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1c1819, 0xff343031, 0xff6f6c6d, 0xffa6a5a5, 0xffcecdce, 0xffe8e8e8, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xffe9e9e9, 0xffd0d0d0, 0xffa9a8a8, 0xff737070, 0xff363334, 0xff1c1819, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff333031, 0xffbbb9ba, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4f4c4c, 0xffdfdfdf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefefef, 0xff555253, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1b1718, 0xff3b3839, 0xff8b8888, 0xffd2d1d1, 0xfff3f3f3, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfff4f4f4, 0xffd6d5d5, 0xff8f8d8e, 0xff403d3d, 0xff1d1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221d1e, 0xff4e4b4c, 0xffe2e1e1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4f4b4c, 0xffdfdedf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff868384, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2f2b2c, 0xff807d7d, 0xffe0e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffe3e3e3, 0xff858384, 0xff322e2f, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff7f7c7d, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4e4b4c, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff312d2e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272324, 0xff5b5858, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcbcbcb, 0xff5f5c5d, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff332f30, 0xffb5b3b4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff555252, 0xff211c1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff423e3f, 0xffaaa8a9, 0xffc2c1c1, 0xffc0bebf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc0bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfbf, 0xffc1bfc0, 0xffc1bfc0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c0, 0xffc1c0c1, 0xffc1c0c1, 0xffc1c0c1, 0xffc1c0c1, 0xffc1c0c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc2c1c1, 0xffc3c1c2, 0xffc3c1c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c2, 0xffc3c2c3, 0xffc3c2c3, 0xffc3c2c3, 0xffc3c2c3, 0xffc3c2c3, 0xffc3c3c3, 0xffc3c3c3, 0xffc3c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc4c3c3, 0xffc5c3c4, 0xffc5c3c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc5c4c4, 0xffc7c6c6, 0xffbab9ba, 0xff524f50, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff343031, 0xff888686, 0xffeaeaea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff8f8e8e, 0xff383435, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1a1b, 0xff535051, 0xffc0bfc0, 0xffd2d1d1, 0xffd1d1d1, 0xffd1d1d1, 0xffd1d1d1, 0xffd2d1d1, 0xffd2d1d1, 0xffd2d1d1, 0xffd2d1d1, 0xffd2d1d1, 0xffd3d2d2, 0xffd3d2d2, 0xffd3d2d2, 0xffd3d2d2, 0xffd3d2d3, 0xffd3d2d3, 0xffd3d2d3, 0xffd3d3d3, 0xffd3d3d3, 0xffd3d3d3, 0xffd4d3d3, 0xffd4d3d3, 0xffd3d3d3, 0xffd4d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d4, 0xffd5d4d5, 0xffd5d5d5, 0xffd5d5d5, 0xffd6d5d5, 0xffd6d5d6, 0xffd6d6d6, 0xffd6d6d6, 0xffd6d6d6, 0xffd7d6d6, 0xffd7d6d6, 0xffd7d6d6, 0xffd7d6d6, 0xffdad9d9, 0xffc3c2c2, 0xff4b4849, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff2d292a, 0xff2e2b2c, 0xff2f2a2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2b2c, 0xff2f2c2c, 0xff2f2c2c, 0xff2f2c2c, 0xff2f2c2d, 0xff2f2c2d, 0xff2f2c2d, 0xff2f2c2d, 0xff2f2c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302c2d, 0xff302d2e, 0xff302d2e, 0xff302d2e, 0xff302d2e, 0xff302d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312d2e, 0xff312e2f, 0xff312e2f, 0xff312e2f, 0xff312e2f, 0xff312e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322e2f, 0xff322f2f, 0xff322f30, 0xff322f30, 0xff322f30, 0xff322f30, 0xff322f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff332f30, 0xff333030, 0xff333030, 0xff343030, 0xff343031, 0xff2f2c2d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff413e3f, 0xffb2b1b2, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefffe, 0xffbbbaba, 0xff4b4748, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xff373435, 0xff3e3a3b, 0xff3e3a3b, 0xff3e3a3b, 0xff3e3b3b, 0xff3e3b3b, 0xff3f3b3b, 0xff3f3b3c, 0xff3f3b3c, 0xff3f3c3c, 0xff3f3b3c, 0xff3f3b3d, 0xff3f3c3d, 0xff3f3c3d, 0xff403c3d, 0xff403c3d, 0xff403c3d, 0xff403c3d, 0xff403d3d, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff403d3e, 0xff413d3e, 0xff413d3e, 0xff413d3e, 0xff413e3f, 0xff413e3f, 0xff413e3f, 0xff413e3f, 0xff413e3f, 0xff413e3f, 0xff423e3f, 0xff423e3f, 0xff423f3f, 0xff423f40, 0xff423f40, 0xff423f40, 0xff423f40, 0xff423f40, 0xff433f40, 0xff433f40, 0xff433f40, 0xff433f40, 0xff434041, 0xff3f3c3d, 0xff2a2627, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211c1e, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff211c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff211c1d, 0xff231e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff4f4c4d, 0xffcac8c8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcfcece, 0xff585556, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff4f4c4d, 0xffd3d3d3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd9d8d8, 0xff555152, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff454242, 0xffcacaca, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd1d1d1, 0xff464343, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff444041, 0xffa3a1a2, 0xffb6b4b5, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb4b2b3, 0xffb6b4b5, 0xff5b5859, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff373334, 0xffb8b7b7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc4c3c4, 0xff373334, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff464243, 0xffadabab, 0xffb0afaf, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb0aeae, 0xffb1b0b0, 0xffa2a0a1, 0xff474445, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff575454, 0xffeae9ea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xff464344, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff928f90, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa19fa0, 0xff262223, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff383435, 0xffdedddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0efef, 0xff5e5b5c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa6a5a5, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff696667, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff7a7778, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff8d8b8c, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff5c5959, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff585556, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454143, 0xffdeddde, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e2e2, 0xff535050, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff504c4d, 0xffe9e8e9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff5c5959, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc5c5c5, 0xff2c2829, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xffadabab, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffb3b1b1, 0xff2a2627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2f2b2c, 0xffb5b4b4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xff5c5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8e8b8c, 0xff211e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff5a5758, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffebebeb, 0xff636161, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff838182, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff7f7f7, 0xff5b5959, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2a2627, 0xffb2b1b2, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb2b0b0, 0xff312d2e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5c5959, 0xffe9e8e8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd4d4d4, 0xff3c3839, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff5c5a5b, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffecebec, 0xff5d5a5b, 0xff221d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3d393a, 0xffcccbcb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa9a7a8, 0xff2b2728, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252122, 0xff989696, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff979596, 0xff272324, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff282325, 0xffa6a4a4, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff828080, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3d393a, 0xffcccacb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd3d2d2, 0xff3a3637, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1d, 0xff817f80, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff6a6767, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff666364, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff666465, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff656263, 0xffeeeded, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e8, 0xff5b5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e2e2, 0xff545152, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272224, 0xff908e8f, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9b9999, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff4c494a, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e8, 0xff5a5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd2d2d2, 0xff413d3e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2e292a, 0xffb5b4b4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc4c2c3, 0xff292526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff373334, 0xffd1d0d0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e8, 0xff5a5859, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbebdbd, 0xff343031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff3d3a3a, 0xffd7d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeae9e9, 0xff3b3838, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff262223, 0xffbdbcbc, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb1afb0, 0xff2d292a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff514d4e, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfcfc, 0xff5a5758, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xffadabac, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa9a8a8, 0xff292627, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5f5c5d, 0xfffdfefd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff706e6f, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1d, 0xffa2a0a0, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa1a0a0, 0xff252122, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff6c6a6b, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7e7c7d, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff979595, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff999798, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff7b7879, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8d8b8b, 0xff191516, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d1819, 0xff8c8a8b, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xff929191, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff868384, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff989697, 0xff1b1618, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff848182, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff969595, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff827f80, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff949292, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff888687, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff9e9d9d, 0xff241f21, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff777576, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff8a8788, 0xff191516, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff929090, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa5a3a5, 0xff272324, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff6a6768, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7c7a7a, 0xff1b1618, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1a1b, 0xff9b9a9a, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffadabab, 0xff2b2728, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545051, 0xfff7f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff615e5e, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xffa4a3a4, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff5a5757, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb9b8b8, 0xff312e2e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff444243, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xff444142, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xffb5b4b4, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff5a5657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcecdcd, 0xff3d393a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff353132, 0xffc9c7c8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdbdada, 0xff312e2f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2f2b2c, 0xffcbcaca, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdedddd, 0xff4c494a, 0xff211d1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff292526, 0xffa1a0a0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffadacac, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff423f3f, 0xffdbdada, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffececec, 0xff605d5d, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff767374, 0xfffafafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff7a7778, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff565354, 0xffe8e8e8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xff767475, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4e4a4b, 0xffdfdede, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e9e9, 0xff4a4748, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191b, 0xff6f6d6d, 0xfff1f0f0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9c9b9b, 0xff282526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2a2b, 0xffb2b0b1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb5b3b4, 0xff2d292a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff969495, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc6c5c5, 0xff343031, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff797677, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xff777575, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff312e2f, 0xffbbbaba, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e8e9, 0xff4c4849, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3c393a, 0xffd0cfcf, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcfcece, 0xff413e3f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff494646, 0xffdbdada, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff595657, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff716e6f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d1a1b, 0xff878585, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff8a8989, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff6a6768, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e6e6, 0xff585656, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffafadae, 0xff252123, 0xff231e20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff373335, 0xffd2d2d2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd2d2d2, 0xff423e3f, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff282425, 0xff9c9a9a, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e6e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffebebeb, 0xff423f3f, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff686566, 0xfffafbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff797677, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3e3a3b, 0xffd4d3d3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e6e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff838081, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xffa7a5a6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff292525, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff6a6768, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff292627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff393536, 0xffcecdce, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdbdbdb, 0xff434041, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff262223, 0xffaeadad, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xff656264, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff595657, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffececec, 0xff636162, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff4d4a4a, 0xffeeeeee, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e6, 0xff585556, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff292525, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff71706f, 0xffebeaea, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f0f0, 0xff787576, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xffa5a4a4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585555, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff2f2f2, 0xff676465, 0xff1c1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff7e7c7c, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff827f80, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff4d4a4b, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585555, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffb8b7b7, 0xff2b2729, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff797777, 0xfff2f2f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff2f1f2, 0xff807e7f, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1c, 0xffa9a7a7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585555, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefefef, 0xff6d6b6b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff6c696a, 0xffe7e7e7, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffeae9e9, 0xff777475, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff5c595a, 0xfff0efef, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc4c3c4, 0xff3b3839, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1819, 0xff4f4c4d, 0xffc4c3c3, 0xfffbfafb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffcccacb, 0xff585656, 0xff1c1819, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff322e2f, 0xffbebdbd, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff585455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xff858384, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff373435, 0xff929091, 0xffe1e0e0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff999797, 0xff3b3839, 0xff1c1819, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff7d7a7a, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe1e0e0, 0xff4e4b4c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1c, 0xff252122, 0xff565354, 0xffa9a7a8, 0xffededed, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xffaeacad, 0xff5a5758, 0xff272324, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff484546, 0xffd4d3d3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffc1c0c0, 0xff302d2e, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff2d292a, 0xff575354, 0xffa5a4a4, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffefefef, 0xffadabac, 0xff5b5959, 0xff2e2b2c, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2e2b2b, 0xffaeacad, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff9d9b9c, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272324, 0xff444142, 0xff838182, 0xffcac9ca, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f4, 0xffcdcccd, 0xff888686, 0xff474444, 0xff282425, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff838182, 0xfffdfefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9fafa, 0xff747172, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1e191a, 0xff272425, 0xff454243, 0xff767373, 0xffa3a1a2, 0xffc4c3c3, 0xffdddbdc, 0xffe7e6e6, 0xffebebeb, 0xffefefef, 0xffefefef, 0xffecebeb, 0xffe7e7e7, 0xffdedede, 0xffc5c4c5, 0xffa6a4a5, 0xff7a7777, 0xff494546, 0xff292526, 0xff1e1a1b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1a1c, 0xff5c595a, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff5f5c5d, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e191a, 0xff1a1517, 0xff1d191a, 0xff242021, 0xff302c2d, 0xff413d3e, 0xff4a4747, 0xff524f50, 0xff535051, 0xff4b4748, 0xff423e3f, 0xff312e2e, 0xff252122, 0xff1e1a1b, 0xff1a1517, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231e20, 0xff1f1b1b, 0xff4e4c4c, 0xffdddcdc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd7d7d7, 0xff565354, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff1e1a1b, 0xff1d191a, 0xff1c1819, 0xff1c1819, 0xff1d1819, 0xff1e1a1b, 0xff1f1b1c, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff4b4849, 0xffd0d0d0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e5, 0xff575455, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcccccc, 0xff4a4748, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff444041, 0xffc5c4c4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcccbcb, 0xff484546, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff433f40, 0xffc1c0c0, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e5e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdad9d9, 0xff504d4e, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff454243, 0xffcccacb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff5e5c5c, 0xff211e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221d1e, 0xff504d4e, 0xffd6d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e9ea, 0xff7d7b7b, 0xff2e2a2b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2a2627, 0xff726f6f, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff6f5f6, 0xffa4a3a4, 0xff423e3f, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191a, 0xff3c3839, 0xff9b9a9a, 0xfff3f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe5e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffcac9ca, 0xff666464, 0xff231e1f, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff211d1e, 0xff5d5b5b, 0xffc3c2c2, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0efef, 0xffa9a8a9, 0xff433f40, 0xff1c1718, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1b1718, 0xff393637, 0xff9d9c9c, 0xffececec, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffe3e1e1, 0xff7e7b7b, 0xff2f2b2c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1d, 0xff2b2628, 0xff737171, 0xffdcdcdc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcccbcb, 0xff727070, 0xff363233, 0xff241f20, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff332f30, 0xff6b696a, 0xffc5c4c5, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565354, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcac9ca, 0xff7d7a7b, 0xff484445, 0xff2b2728, 0xff201c1d, 0xff1f1b1c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff2a2627, 0xff444142, 0xff767374, 0xffc3c2c2, 0xfffcfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565254, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfcfd, 0xffdad9d9, 0xffa9a7a8, 0xff716e6f, 0xff413d3e, 0xff252122, 0xff1d191a, 0xff1b1718, 0xff1f1b1c, 0xff221d1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff1c1819, 0xff1d1819, 0xff242021, 0xff3d3a3b, 0xff6c6a6b, 0xffa4a2a3, 0xffd6d5d6, 0xfff9fafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565254, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xffd5d3d3, 0xffb0aeaf, 0xff838182, 0xff575455, 0xff322e30, 0xff221d1f, 0xff1c1819, 0xff191516, 0xff1b1718, 0xff1e1a1b, 0xff1f1b1c, 0xff201c1d, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211c1d, 0xff201c1d, 0xff1f1b1c, 0xff1e1a1b, 0xff1b1718, 0xff191516, 0xff1b1718, 0xff201c1d, 0xff302d2d, 0xff545253, 0xff7f7d7d, 0xffadabab, 0xffd2d1d1, 0xffefefef, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff565253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xfff8f8f8, 0xffeeeeee, 0xffd8d7d7, 0xffb7b6b6, 0xff989697, 0xff7a7778, 0xff5d595a, 0xff444041, 0xff363334, 0xff2f2c2d, 0xff2c2829, 0xff2a2526, 0xff292627, 0xff2c2829, 0xff2f2b2c, 0xff363234, 0xff413e3f, 0xff5b5758, 0xff777576, 0xff959494, 0xffb5b4b4, 0xffd5d5d5, 0xffededed, 0xfff8f7f7, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e3, 0xff565253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xfff0f0f0, 0xffececec, 0xffe7e7e7, 0xffdedede, 0xffd4d3d3, 0xffd3d2d2, 0xffdddddc, 0xffe7e6e6, 0xffebebeb, 0xffefefef, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff555253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff555253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff545152, 0xffe3e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff555253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1d, 0xff555252, 0xffe4e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe4e3e4, 0xff565253, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff524f50, 0xffe2e1e2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe2e1e2, 0xff524f50, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff484445, 0xffdad9d9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdad9d9, 0xff474445, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3d3a3b, 0xffd0cfd0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcfcfcf, 0xff3d3a3a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff363233, 0xffc1bfc0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbfbebe, 0xff343132, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272324, 0xff9e9c9d, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff9d9b9b, 0xff272223, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff6d6a6b, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff6c696a, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff403d3e, 0xffd9d8d8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd9d8d8, 0xff403c3d, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff969495, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff959394, 0xff201b1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff3e3a3b, 0xffdedddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffdddcdd, 0xff3d393a, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff807e7f, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xff7e7c7c, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff292526, 0xffa5a3a4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa2a1a1, 0xff282525, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff363233, 0xffb9b8b8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb6b4b5, 0xff343132, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff423e3f, 0xffb8b6b6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb3b2b2, 0xff3f3c3c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff353132, 0xffa4a3a4, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffaf9fa, 0xffa09e9f, 0xff333031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff292526, 0xff7c7979, 0xffd9d9d9, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffd7d5d6, 0xff777474, 0xff272324, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1b1617, 0xff3a3636, 0xff8e8c8d, 0xffd1d0d0, 0xffebebeb, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xffeaeaea, 0xffcecdce, 0xff8a8888, 0xff373333, 0xff1a1617, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1f1a1c, 0xff393536, 0xff625f60, 0xff929090, 0xffb2b0b1, 0xffc2c0c1, 0xffcecece, 0xffd7d6d6, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd8d7d7, 0xffd7d6d6, 0xffcecdcd, 0xffc0bfc0, 0xffb1afb0, 0xff908e8e, 0xff605c5d, 0xff373334, 0xff1e1a1b, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff1e1a1b, 0xff242021, 0xff2e2a2b, 0xff363233, 0xff3d393a, 0xff434041, 0xff454242, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454142, 0xff454242, 0xff434041, 0xff3c393a, 0xff363233, 0xff2e2a2b, 0xff231f20, 0xff1e1a1b, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232020, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232020, 0xff232021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232021, 0xff232021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff252122, 0xff252122, 0xff262223, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff393536, 0xffa1a0a0, 0xffb3b2b3, 0xffb1b0b0, 0xff726f70, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff4c4849, 0xffa9a7a7, 0xffb3b2b2, 0xffb2b0b0, 0xff5b5859, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff787576, 0xffb4b2b2, 0xffb4b2b3, 0xffa09e9f, 0xff312d2e, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff8c8a8b, 0xffb5b3b3, 0xffb4b2b3, 0xff898788, 0xff2e2a2b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff322e2f, 0xff807d7e, 0xff8d8b8c, 0xff8d8b8b, 0xff8e8c8d, 0xff625f60, 0xff262323, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff464343, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffa09e9f, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff646162, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xff7c7a7b, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa9a7a7, 0xffffffff, 0xffffffff, 0xffe8e8e8, 0xff393536, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff252022, 0xffcac9ca, 0xffffffff, 0xffffffff, 0xffc5c4c5, 0xff343132, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff6b6869, 0xfff4f4f4, 0xffffffff, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff3b3839, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c2c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff262223, 0xffacabab, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff6f5f5, 0xff666364, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff464343, 0xffebebea, 0xffffffff, 0xffffffff, 0xffa09e9e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff4a4747, 0xffdddcdc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa6a4a5, 0xff282425, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff393536, 0xffa4a2a3, 0xffb6b4b5, 0xffb4b2b3, 0xff727071, 0xff211e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211e1f, 0xff7e7c7e, 0xfff6f6f6, 0xffffffff, 0xfff8f8f8, 0xffd8d7d7, 0xfffdfdfd, 0xffffffff, 0xffe4e3e3, 0xff413d3e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff242021, 0xff241f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff322e2f, 0xffb8b7b7, 0xffffffff, 0xffffffff, 0xffd7d7d7, 0xff656263, 0xfff0f0f0, 0xffffffff, 0xffffffff, 0xff7c797a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff211d1e, 0xff211c1d, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff555353, 0xffe7e7e6, 0xffffffff, 0xffffffff, 0xff939292, 0xff2c2829, 0xffc3c1c2, 0xffffffff, 0xffffffff, 0xffc7c6c6, 0xff292627, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1d191a, 0xff211d1e, 0xff282425, 0xff343031, 0xff3b3738, 0xff3e3a3b, 0xff3a3738, 0xff353132, 0xff282425, 0xff201b1d, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1e1a1b, 0xff1f1a1b, 0xff242021, 0xff2e2a2b, 0xff383435, 0xff3d393a, 0xff3d393a, 0xff383536, 0xff2f2c2d, 0xff221f20, 0xff1e1a1b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff383535, 0xff1f1a1c, 0xff1f1b1c, 0xff201c1d, 0xff2c282a, 0xff393637, 0xff3e3a3b, 0xff3c3839, 0xff312d2e, 0xff231f20, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1e1a1b, 0xff211d1e, 0xff2c292a, 0xff383535, 0xff3d3a3a, 0xff3e3a3b, 0xff373435, 0xff2b2728, 0xff201c1d, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff8d8b8c, 0xffffffff, 0xffffffff, 0xfff3f4f4, 0xff4d494b, 0xff201c1d, 0xff868485, 0xfffefefe, 0xffffffff, 0xfff9f8f8, 0xff585556, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff454243, 0xff8a8889, 0xff8b8989, 0xff8b898a, 0xff464344, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff565354, 0xff8d8b8c, 0xff8b8a89, 0xff848283, 0xff363233, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1f, 0xff373334, 0xff5f5c5d, 0xff878586, 0xffa8a7a7, 0xffbebcbd, 0xffcbc9ca, 0xffd0d0d0, 0xffcbcaca, 0xffbfbebe, 0xffa6a4a4, 0xff7b7879, 0xff3f3c3d, 0xff1e1a1b, 0xff221d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211c1d, 0xff332f30, 0xff7d7b7c, 0xff8a8888, 0xff898787, 0xff5b5858, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff282425, 0xff4a4647, 0xff727070, 0xff999797, 0xffb3b1b2, 0xffc5c4c4, 0xffcfcece, 0xffcfcdce, 0xffc6c5c5, 0xffb6b4b5, 0xff939292, 0xff5f5d5d, 0xff2b2728, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff373434, 0xff1a1617, 0xff3c3839, 0xff7d7b7b, 0xffaeadad, 0xffc7c6c7, 0xffd1d0d0, 0xffcccbcb, 0xffb9b8b8, 0xff8f8d8e, 0xff4d494a, 0xff1f1b1c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff242021, 0xff514d4e, 0xff8a8788, 0xffb0aeaf, 0xffc5c4c4, 0xffcfcece, 0xffd0cfcf, 0xffc5c4c4, 0xffacabab, 0xff807d7e, 0xff423f40, 0xff1d1a1b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff363233, 0xffcdcccc, 0xffffffff, 0xffffffff, 0xffbdbcbc, 0xff272324, 0xff201c1d, 0xff524f50, 0xffe3e2e3, 0xffffffff, 0xffffffff, 0xffa4a2a2, 0xff1e191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff4e4b4b, 0xffe1e0e0, 0xfffcfcfc, 0xfffefefe, 0xff9d9b9c, 0xff1e1a1b, 0xff231e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff282425, 0xffbab9b9, 0xfffefefe, 0xfffefefe, 0xffcccbcb, 0xff363233, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221d1f, 0xff7e7c7d, 0xffcfcece, 0xffeaeaea, 0xfff7f7f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xfff5f5f5, 0xffd7d7d7, 0xff7c7a7b, 0xff221f20, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191a, 0xff434041, 0xffdfdedf, 0xfff9f8f8, 0xfff5f5f5, 0xff989697, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff413e3e, 0xffabaaaa, 0xffdfdfdf, 0xfff1f1f1, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffebebeb, 0xffb4b3b3, 0xff454142, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff363334, 0xff585556, 0xffcac9c9, 0xfff5f4f5, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffafafa, 0xffdfdede, 0xff858283, 0xff252223, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff393536, 0xff9f9d9d, 0xffe3e2e3, 0xfff9f8f9, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff6f5f6, 0xffd7d6d6, 0xff7c7a7a, 0xff252021, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff625f60, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xff757374, 0xff1f1b1c, 0xff221e1f, 0xff302c2d, 0xffb6b5b5, 0xffffffff, 0xffffffff, 0xffe3e3e3, 0xff3b3738, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff302c2d, 0xffb4b3b3, 0xffffffff, 0xffffffff, 0xffe2e2e2, 0xff363233, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff4d4a4b, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xff929090, 0xff252223, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff231f20, 0xffb7b7b7, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xfff3f3f4, 0xfff2f2f2, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff8f8f8, 0xff949393, 0xff221d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b9a9a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff585556, 0xffe5e4e4, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfff5f6f5, 0xfff2f2f3, 0xfff3f3f3, 0xfffbfafb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd8d7d7, 0xff484445, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e1e1, 0xff6b6869, 0xffdadada, 0xffffffff, 0xffffffff, 0xfff9faf9, 0xfff1f1f1, 0xfff2f2f2, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff5f4f5, 0xff918f90, 0xff262122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff444142, 0xffcdcccd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xfff3f3f3, 0xfff3f3f3, 0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f3f4, 0xff929091, 0xff272324, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xffa9a8a9, 0xffffffff, 0xffffffff, 0xffe0dfdf, 0xff403c3d, 0xff221e1f, 0xff231f20, 0xff201c1d, 0xff7e7c7c, 0xfff5f5f5, 0xffffffff, 0xfffcfcfc, 0xff7b787a, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff797878, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xff747272, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff949293, 0xffffffff, 0xffffffff, 0xffebeaeb, 0xff585455, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff231f20, 0xffb8b6b7, 0xfff7f7f7, 0xffd5d5d5, 0xff9c9b9b, 0xff6f6d6d, 0xff514e4f, 0xff413e3f, 0xff3e3a3b, 0xff4b4849, 0xff726f70, 0xffb6b5b5, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xff6f6c6d, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff595656, 0xffe4e4e4, 0xffedecec, 0xffbbbaba, 0xff848282, 0xff5f5d5d, 0xff484445, 0xff3e3a3b, 0xff423e3f, 0xff5a5758, 0xff8e8c8d, 0xffd8d8d8, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffc5c4c4, 0xff2e2a2b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfff0f0f0, 0xffd7d7d7, 0xffffffff, 0xffeeeded, 0xff9e9c9c, 0xff575354, 0xff3a3738, 0xff3d3a3b, 0xff646061, 0xffb7b5b5, 0xfff7f6f6, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xff716e6f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3c3839, 0xffd1d0d1, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffd7d6d6, 0xff8d8b8b, 0xff575455, 0xff413e3e, 0xff413e3f, 0xff5d5a5b, 0xffa2a0a0, 0xffedecec, 0xffffffff, 0xffffffff, 0xfff2f2f2, 0xff777575, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff403c3d, 0xffe9e9e9, 0xffffffff, 0xffffffff, 0xffa5a4a4, 0xff292525, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff484546, 0xffdedddd, 0xffffffff, 0xfffefefe, 0xffbfbebe, 0xff2a2627, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff494546, 0xffd9d8d8, 0xffffffff, 0xffffffff, 0xffbcbbbc, 0xff242122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff322e2f, 0xffd9dad9, 0xffffffff, 0xffffffff, 0xffbdbcbd, 0xff343132, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262122, 0xff817f7f, 0xff6a6768, 0xff2d292a, 0xff1b1718, 0xff1a1517, 0xff1d191a, 0xff1f1b1c, 0xff1f1b1c, 0xff1e1a1b, 0xff1a1617, 0xff231f20, 0xff767274, 0xffe8e8e8, 0xffffffff, 0xffffffff, 0xffc7c5c6, 0xff332f31, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff494647, 0xff858383, 0xff484546, 0xff231e20, 0xff191516, 0xff1c1819, 0xff1e1a1b, 0xff1f1b1c, 0xff1f1b1c, 0xff1c1819, 0xff1b1718, 0xff3d393a, 0xffb0afaf, 0xfffbfbfb, 0xffffffff, 0xfffdfdfd, 0xff777576, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe2e1e1, 0xff686666, 0xff1f1b1c, 0xff1c1819, 0xff1f1b1c, 0xff1f1b1c, 0xff1a1617, 0xff242021, 0xff8c8a8b, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xffcdcccc, 0xff3f3c3d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff282425, 0xffadabab, 0xffffffff, 0xffffffff, 0xfff8f7f8, 0xffa7a6a6, 0xff393637, 0xff1b1618, 0xff1c1819, 0xff1f1b1c, 0xff1f1b1c, 0xff1b1718, 0xff1b1718, 0xff605d5e, 0xffe0dfe0, 0xffffffff, 0xffffffff, 0xffd4d3d3, 0xff434041, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff838181, 0xffffffff, 0xffffffff, 0xfff5f5f5, 0xff686566, 0xff221f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff252223, 0xffaeadae, 0xfffdfdfd, 0xffffffff, 0xffe8e8e8, 0xff575455, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff282526, 0xffa9a8a8, 0xfffdfdfd, 0xffffffff, 0xffededed, 0xff4f4b4c, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff6b696a, 0xfffcfcfc, 0xffffffff, 0xfff9f9f9, 0xff858283, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff221e1f, 0xff1c1819, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1b1718, 0xff888687, 0xfffbfbfb, 0xffffffff, 0xffecebeb, 0xff625e60, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff241f21, 0xff1e1a1b, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff3e3a3b, 0xffcfcece, 0xffffffff, 0xffffffff, 0xffbebdbe, 0xff272324, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff7e7b7c, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff221e20, 0xffa5a3a3, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff7a7878, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff656262, 0xffeeeeee, 0xffffffff, 0xfffefefe, 0xffb6b4b5, 0xff302d2e, 0xff1d1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1a1516, 0xff686566, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xff807e7f, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff2a2728, 0xffcecdcd, 0xffffffff, 0xffffffff, 0xffcecdcd, 0xff3e3b3b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff6d6b6c, 0xfff6f6f6, 0xffffffff, 0xfffafafa, 0xff939292, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff6d6a6b, 0xfff2f2f2, 0xffffffff, 0xfffbfbfb, 0xff918e8f, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff221e1f, 0xffb4b2b2, 0xffffffff, 0xffffffff, 0xffe0dfdf, 0xff504c4d, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff3a3637, 0xffe6e5e6, 0xffffffff, 0xfff9f9f9, 0xff898788, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1819, 0xff8f8c8d, 0xfffafafa, 0xffffffff, 0xffe0dfdf, 0xff423f40, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfffefefe, 0xffc9c8c9, 0xff343031, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff423e3f, 0xffe7e7e7, 0xffffffff, 0xffffffff, 0xffb9b8b8, 0xff2e2a2b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff282526, 0xffa9a7a7, 0xfffdfdfd, 0xffffffff, 0xffededed, 0xff545152, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff252222, 0xffb5b4b3, 0xffffffff, 0xffffffff, 0xffbcbcbc, 0xff2e2a2b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, + 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff5f5d5d, 0xfff8f8f8, 0xffffffff, 0xfffefefe, 0xff999798, 0xff272324, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff343132, 0xffdad9d9, 0xffffffff, 0xffffffff, 0xffcac9c9, 0xff3b3738, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff383435, 0xffd4d3d4, 0xffffffff, 0xffffffff, 0xffcac9c9, 0xff353132, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff484545, 0xffe5e5e5, 0xffffffff, 0xfffefefe, 0xffb4b2b2, 0xff2b2727, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1d191a, 0xff191516, 0xff191516, 0xff1b1718, 0xff1c1819, 0xff1d191a, 0xff1d191a, 0xff1b1718, 0xff201b1c, 0xffc9c8c9, 0xffffffff, 0xffffffff, 0xffa4a3a3, 0xff292526, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1b1718, 0xff181415, 0xff1a1517, 0xff1c1819, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff130f10, 0xff686566, 0xfff6f6f6, 0xffffffff, 0xffededed, 0xff5d5a5a, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfffbfbfb, 0xff8e8c8d, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xffaba9aa, 0xffffffff, 0xffffffff, 0xffe6e5e5, 0xff413f40, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff413e3f, 0xffd3d2d3, 0xffffffff, 0xffffffff, 0xffbfbebe, 0xff252122, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff757374, 0xffffffff, 0xffffffff, 0xffe4e4e4, 0xff3f3c3d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, + 0xf2231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1c, 0xffa8a7a7, 0xffffffff, 0xffffffff, 0xffeaeaea, 0xff625f60, 0xff201b1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff999898, 0xffffffff, 0xffffffff, 0xffeeeeee, 0xff676466, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff999898, 0xfffdfdfd, 0xffffffff, 0xffebebeb, 0xff636161, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1d191b, 0xff858384, 0xfff8f7f7, 0xffffffff, 0xfff5f5f5, 0xff767475, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff2d292a, 0xff504d4e, 0xff767474, 0xff8e8c8d, 0xff989797, 0xffa09e9f, 0xffa1a0a0, 0xffa1a0a0, 0xffa09f9f, 0xffa1a0a0, 0xffe4e4e4, 0xffffffff, 0xffffffff, 0xffb1afb0, 0xff2e2b2c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1c, 0xff221f20, 0xff3c3839, 0xff636061, 0xff838182, 0xff949292, 0xff9d9c9c, 0xffa1a0a0, 0xffa1a0a0, 0xffa1a0a0, 0xff9d9c9c, 0xffbdbcbc, 0xfffbfbfb, 0xffffffff, 0xfff1f1f1, 0xff6a6768, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfff7f7f7, 0xff636060, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff7b7979, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xff5a5758, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff5c5959, 0xffe7e7e7, 0xffffffff, 0xffffffff, 0xff908e8f, 0xff171213, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff201c1d, 0xff1e1a1b, 0xff555253, 0xfffbfbfb, 0xffffffff, 0xfffafafa, 0xff514e4f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf2231f20, + 0xe5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff403d3e, 0xffdfdfdf, 0xffffffff, 0xffffffff, 0xffc8c7c7, 0xff353233, 0xff201b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff514f4f, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xffa19f9f, 0xff2a2627, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff555153, 0xfff2f1f1, 0xffffffff, 0xfffdfdfd, 0xff9d9b9b, 0xff272324, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff302c2d, 0xffc0bfbf, 0xffffffff, 0xffffffff, 0xffdcdcdc, 0xff3d3a3b, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff373334, 0xff888586, 0xffd3d2d2, 0xfff9f8f8, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbab9b9, 0xff332f30, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff5a5757, 0xffb0afaf, 0xffebeaea, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff3f3f3, 0xff747172, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffebebeb, 0xff494647, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5a5859, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xff737171, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff706e6f, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xffcdcccc, 0xffa6a4a4, 0xffaaa9a9, 0xffaaa8aa, 0xffaaa9a9, 0xffaaa9a9, 0xffaba9a9, 0xffaba9aa, 0xffabaaaa, 0xffababaa, 0xffacabaa, 0xffabaaab, 0xffbdbcbc, 0xfffcfcfc, 0xffffffff, 0xfffefeff, 0xff625e5f, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xe5231f20, + 0xd4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff7d7a7b, 0xfff7f7f7, 0xffffffff, 0xfffafafa, 0xff959393, 0xff242021, 0xff282425, 0xff292526, 0xff292526, 0xff292526, 0xff292526, 0xff292526, 0xff272324, 0xff2b2728, 0xffc7c6c6, 0xffffffff, 0xffffffff, 0xffd9d8d8, 0xff433f40, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff252223, 0xffc5c3c4, 0xffffffff, 0xffffffff, 0xffd0d0d0, 0xff403d3e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff5a5758, 0xffe8e7e7, 0xffffffff, 0xffffffff, 0xffa3a2a2, 0xff1e1a1b, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff565354, 0xffcfcece, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffefefe, 0xfff7f7f7, 0xfff1f1f1, 0xffeeedee, 0xffececec, 0xffecebeb, 0xffecebeb, 0xffecebeb, 0xfffaf9f9, 0xffffffff, 0xffffffff, 0xffbcbbbc, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2f2b2c, 0xff8f8d8d, 0xfff3f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xfff4f4f4, 0xffefefef, 0xffededed, 0xffecebeb, 0xffecebeb, 0xffebeaeb, 0xfff1f1f1, 0xfffefefe, 0xffffffff, 0xfff4f4f4, 0xff787676, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe5e5e5, 0xff3e3b3b, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff4f4c4c, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xff827f80, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff7c7a7a, 0xfffbfafa, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xff686565, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd4231f20, + 0xb4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2e2a2b, 0xffbab8b9, 0xfffefefe, 0xffffffff, 0xfffafafa, 0xffbbb9ba, 0xff979696, 0xff9b9a9a, 0xff9b9a9a, 0xff9b9a9a, 0xff9b9a9a, 0xff9b9a9a, 0xff9b9a9a, 0xff9c9a9a, 0xff979696, 0xffcfcfcf, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff757273, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1717, 0xff7a7778, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff6d6a6b, 0xff231e1f, 0xff231f20, 0xff221e1f, 0xff252122, 0xff918f8f, 0xfffcfbfb, 0xffffffff, 0xfff7f7f7, 0xff5b5859, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff494647, 0xffd3d2d2, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xffcccccc, 0xffa1a0a0, 0xff848383, 0xff726f70, 0xff676465, 0xff625f60, 0xff605d5e, 0xff5f5c5d, 0xff625e5f, 0xffd3d2d2, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272324, 0xff858383, 0xfff8f8f8, 0xffffffff, 0xffffffff, 0xffe8e7e7, 0xffb6b5b5, 0xff929191, 0xff7b7879, 0xff6c6969, 0xff656263, 0xff615e5f, 0xff615e5e, 0xff5a5758, 0xff908e8e, 0xfff8f8f8, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe3e3e3, 0xff3b3838, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221d1e, 0xff4d4a4b, 0xfff6f6f6, 0xffffffff, 0xffffffff, 0xff848182, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff807d7e, 0xfffdfdfd, 0xffffffff, 0xffffffff, 0xffe9e8e8, 0xffdfdede, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe0dfdf, 0xffe1e0e0, 0xffe0e0e0, 0xff5e5b5c, 0xff211c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xb4231f20, + 0x8e231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff565354, 0xffe4e3e3, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffb9b8b8, 0xff2a2627, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff3a3738, 0xffe4e3e4, 0xffffffff, 0xffffffff, 0xffa8a6a7, 0xff2b2728, 0xff231f20, 0xff221e1f, 0xff3a3637, 0xffc7c6c6, 0xffffffff, 0xffffffff, 0xffcbcbcb, 0xff292527, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff272324, 0xff9b9999, 0xfffdfdfd, 0xffffffff, 0xfff9f8f8, 0xff949192, 0xff3d393a, 0xff262223, 0xff201c1d, 0xff1e1a1b, 0xff1e1a1b, 0xff1e191a, 0xff1d191a, 0xff1b1718, 0xff1f1b1c, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff484445, 0xffdadada, 0xffffffff, 0xffffffff, 0xffd4d2d2, 0xff5c595a, 0xff2f2b2c, 0xff221e1f, 0xff1f1b1c, 0xff1e1a1b, 0xff1e1a1b, 0xff1d191a, 0xff1d191a, 0xff140f10, 0xff656363, 0xfff5f5f5, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe7e7e7, 0xff423e3f, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff534f50, 0xfffafbfb, 0xffffffff, 0xffffffff, 0xff7c797a, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff7b7879, 0xfffafafa, 0xffffffff, 0xffffffff, 0xff8c8a8a, 0xff484545, 0xff504d4e, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4d, 0xff504d4e, 0xff504d4e, 0xff312e2e, 0xff221f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x8e231f20, + 0x62231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff8e8b8b, 0xfffcfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff2f1f2, 0xff4d4a4b, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xffa2a1a1, 0xffffffff, 0xffffffff, 0xffe1e0e0, 0xff434041, 0xff221e1f, 0xff221e1f, 0xff625f5f, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xff818080, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3f3b3c, 0xffcfcecf, 0xffffffff, 0xffffffff, 0xffbdbcbc, 0xff292526, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff292627, 0xffd8d7d7, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff232021, 0xff757273, 0xfffdfdfd, 0xffffffff, 0xfffafafa, 0xff5f5d5d, 0xff1e1a1b, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff787676, 0xfff7f7f7, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfff1f1f1, 0xff545152, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff686566, 0xffffffff, 0xffffffff, 0xffffffff, 0xff676566, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff6d6a6b, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xff858384, 0xff171213, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff211d1e, 0xff231e20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x62231f20, + 0x2e231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff393536, 0xffc6c5c5, 0xffffffff, 0xffffffff, 0xfff0f0f0, 0xffa6a4a5, 0xffa2a0a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa3a1a1, 0xffa2a1a2, 0xffb6b4b4, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xff929192, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff5b5758, 0xfff9fafa, 0xffffffff, 0xffffffff, 0xff7a7878, 0xff211d1e, 0xff272324, 0xff9d9b9c, 0xffffffff, 0xffffffff, 0xffebeaea, 0xff3f3c3d, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff535051, 0xffe2e2e2, 0xffffffff, 0xffffffff, 0xff7f7d7d, 0xff1a1517, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffededed, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xff979697, 0xffffffff, 0xffffffff, 0xffd5d5d6, 0xff312d2e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201b1c, 0xff9c9a9b, 0xfffbfbfb, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfff9f9f9, 0xff747272, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1c, 0xff8f8d8e, 0xffffffff, 0xffffffff, 0xfff5f4f4, 0xff4d4a4b, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff555152, 0xffe3e2e2, 0xffffffff, 0xffffffff, 0xffb7b6b6, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0x2e231f20, + 0x11231f20, 0xc4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221f20, 0xff605e5f, 0xfff1f1f1, 0xffffffff, 0xffffffff, 0xffacabab, 0xff1a1718, 0xff1c1819, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff1d191a, 0xff353232, 0xffcccccc, 0xffffffff, 0xffffffff, 0xffdad9da, 0xff322e2f, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff312e2f, 0xffc9c8c8, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff292526, 0xff3c3839, 0xffdad9da, 0xffffffff, 0xffffffff, 0xffaba9aa, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff5e5b5c, 0xffeaeaea, 0xffffffff, 0xffffffff, 0xff6d6b6b, 0xff1b1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1b1718, 0xff7e7c7d, 0xfffefdfe, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252223, 0xffa6a4a5, 0xffffffff, 0xffffffff, 0xffc6c4c4, 0xff2b2829, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff363233, 0xffcacaca, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfffdfdfd, 0xffaaa9aa, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff2c2829, 0xffc9c7c8, 0xffffffff, 0xffffffff, 0xffd1d1d1, 0xff383435, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff383536, 0xffc6c5c6, 0xffffffff, 0xffffffff, 0xffe7e7e7, 0xff464344, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xc4231f20, 0x11231f20, + 0x04231f20, 0x8c231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272324, 0xff9f9d9d, 0xffffffff, 0xffffffff, 0xfffefefe, 0xff646262, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff272324, 0xff959393, 0xffffffff, 0xffffffff, 0xffffffff, 0xff6d6a6b, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff878586, 0xffffffff, 0xffffffff, 0xfff6f6f6, 0xff4d4a4a, 0xff6a6869, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xff656262, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff595657, 0xffe7e7e6, 0xffffffff, 0xffffffff, 0xff858384, 0xff181416, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff393536, 0xffcdcccc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff252122, 0xffa09e9e, 0xffffffff, 0xffffffff, 0xffdad9d9, 0xff332f30, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff201c1d, 0xff777575, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffe0e0e0, 0xff4f4c4d, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff686566, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xff9c9b9b, 0xff272324, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff908f8f, 0xfffafafa, 0xffffffff, 0xfffcfcfc, 0xffa09e9e, 0xff262223, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0x8c231f20, 0x04231f20, + 0x01231f20, 0x49231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff3d3a3b, 0xffdddddd, 0xffffffff, 0xffffffff, 0xffd8d7d7, 0xff322e2f, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221d1e, 0xff605d5e, 0xffececec, 0xffffffff, 0xffffffff, 0xffb9b7b8, 0xff221e20, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff504c4d, 0xffe6e5e5, 0xffffffff, 0xffffffff, 0xff9c9a9b, 0xffb4b2b2, 0xffffffff, 0xffffffff, 0xffd0cfcf, 0xff373334, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff474344, 0xffd8d7d7, 0xffffffff, 0xffffffff, 0xffcbcaca, 0xff322e2f, 0xff1b1718, 0xff211d1e, 0xff221e1f, 0xff221e1f, 0xff211d1e, 0xff1c1819, 0xff2f2b2c, 0xffa09e9f, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff242021, 0xff828081, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xff737171, 0xff1b1617, 0xff1f1b1c, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff575555, 0xffd7d6d6, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffffffff, 0xfffefefe, 0xffafaeaf, 0xff343132, 0xff1d191a, 0xff211d1e, 0xff221e1f, 0xff221e1f, 0xff201c1d, 0xff1a1617, 0xff474344, 0xffd5d4d4, 0xffffffff, 0xffffffff, 0xffebeaea, 0xff5b5858, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff454343, 0xffd9d8d9, 0xffffffff, 0xffffffff, 0xffefefef, 0xff828081, 0xff2a2627, 0xff1c1819, 0xff201c1d, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff201c1d, 0xff1e191b, 0xff1c1819, 0xff272424, 0xff524f50, 0xff4b4848, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x49231f20, 0x01231f20, + 0x00000000, 0x1c231f20, 0xc3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff757273, 0xffffffff, 0xffffffff, 0xffffffff, 0xff969495, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff393537, 0xffc7c6c6, 0xffffffff, 0xffffffff, 0xffececec, 0xff4c4949, 0xff1c1819, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff302c2d, 0xffb4b3b3, 0xffffffff, 0xffffffff, 0xffeeedee, 0xfff3f3f3, 0xffffffff, 0xffffffff, 0xff918f90, 0xff262223, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2d292a, 0xffafadae, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffacabab, 0xff434041, 0xff211d1e, 0xff1d191a, 0xff1e1a1b, 0xff262223, 0xff504d4e, 0xffadabab, 0xfff7f7f7, 0xfffbfbfb, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff555252, 0xffeaeae9, 0xffffffff, 0xffffffff, 0xffe3e2e2, 0xff726f70, 0xff2b2828, 0xff1e1a1b, 0xff1d191a, 0xff201b1c, 0xff332f30, 0xff777475, 0xffd8d7d7, 0xffffffff, 0xfff3f2f2, 0xfffdfdfd, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xfffafafa, 0xfff7f8f8, 0xfffbfbfb, 0xffafaeae, 0xff4c494a, 0xff242021, 0xff1d191a, 0xff1e1a1b, 0xff282425, 0xff615e5f, 0xffcbcacb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffa3a1a2, 0xff2c2829, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c3c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff726f70, 0xfff5f5f5, 0xffffffff, 0xffffffff, 0xfff0efef, 0xffa9a7a7, 0xff5a5757, 0xff2d2a2b, 0xff211c1d, 0xff1e1a1b, 0xff1f1b1c, 0xff211d1e, 0xff2a2627, 0xff434041, 0xff706d6e, 0xffaba9aa, 0xffe1e1e1, 0xff868384, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xc3231f20, 0x1c231f20, 0x00000000, + 0x00000000, 0x06231f20, 0x7c231f20, 0xfc231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xffc0bebf, 0xffffffff, 0xffffffff, 0xfff5f4f4, 0xff575455, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff949293, 0xfffafafa, 0xffffffff, 0xfffbfbfb, 0xff908e8e, 0xff1c1819, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff7a7879, 0xfff6f5f6, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe9e9e9, 0xff595657, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201b1c, 0xff605e5e, 0xffebeaea, 0xffffffff, 0xffffffff, 0xfffbfbfb, 0xffdfdedf, 0xffb4b3b3, 0xff9b9999, 0xffa1a0a0, 0xffc0bfbf, 0xffe6e6e6, 0xfffdfdfd, 0xffffffff, 0xffa5a2a3, 0xffc8c6c7, 0xffffffff, 0xffffffff, 0xffbcbbbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b999a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f5f, 0xffedecec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2d292a, 0xffa3a1a1, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff1f1f1, 0xffcbcbcb, 0xffa4a3a3, 0xff9a9999, 0xffadabac, 0xffd4d3d3, 0xfff3f3f3, 0xffffffff, 0xffdfdfdf, 0xff9e9c9d, 0xfff6f6f6, 0xffffffff, 0xfff4f4f4, 0xff777576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe6e5e5, 0xffa09f9e, 0xfffcfcfc, 0xfffdfdfd, 0xffe4e4e4, 0xffbbbaba, 0xff9f9d9d, 0xffa3a0a2, 0xffc5c4c4, 0xffececec, 0xfffefefe, 0xffffffff, 0xffffffff, 0xffcccbcb, 0xff433f40, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242022, 0xffc4c2c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff333031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff242021, 0xff807e7e, 0xfff9f8f8, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xffececec, 0xffd0d0d0, 0xffb2b0b0, 0xffa4a1a2, 0xffa6a3a5, 0xffb5b3b4, 0xffcdcccd, 0xffe2e1e1, 0xfff3f3f3, 0xfffdfdfd, 0xffffffff, 0xff8b8a8a, 0xff242121, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfc231f20, 0x7c231f20, 0x06231f20, 0x00000000, + 0x00000000, 0x00000000, 0x32231f20, 0xd8231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e191a, 0xff514e4f, 0xfff7f7f7, 0xffffffff, 0xffffffff, 0xffc5c4c5, 0xff332f30, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff5c5a5a, 0xffebebeb, 0xffffffff, 0xffffffff, 0xffcdcdcd, 0xff343032, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff484546, 0xffdbdada, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffbdbcbd, 0xff343132, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff807e7f, 0xfff2f2f2, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffdfdfd, 0xffabaaaa, 0xff363233, 0xffc1bfc0, 0xffffffff, 0xffffffff, 0xffbcbcbb, 0xff343031, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff454142, 0xffe5e5e5, 0xffffffff, 0xfffbfbfb, 0xff9b9a9a, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1d191a, 0xff615f60, 0xffededec, 0xffffffff, 0xfffafafa, 0xff797778, 0xff1a1617, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff3e3b3c, 0xffc0bebf, 0xfffdfdfe, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffe7e6e6, 0xff666364, 0xff656263, 0xfff5f5f5, 0xffffffff, 0xfff4f4f4, 0xff787576, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff232021, 0xffa5a3a3, 0xfffefefe, 0xffffffff, 0xffe2e2e2, 0xff464244, 0xff9e9d9d, 0xfffbfbfb, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffd1cfcf, 0xff4b4849, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242122, 0xffc5c4c4, 0xffffffff, 0xffffffff, 0xffc0bfbf, 0xff343031, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff696767, 0xffdddddd, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfff9f9f9, 0xff7d7b7c, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd8231f20, 0x32231f20, 0x00000000, 0x00000000, + 0x00231f20, 0x00000000, 0x05231f20, 0x8e231f20, 0xfa231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1c1819, 0xff7f7d7d, 0xffe1e0e1, 0xffdbdbdb, 0xffdedede, 0xff7f7d7e, 0xff252122, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff302d2e, 0xffb2b1b1, 0xffdcdbdb, 0xffdbdbdb, 0xffcccccc, 0xff555253, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff282425, 0xff9b9999, 0xffdbdbdb, 0xffdbdbdb, 0xffdbdbdb, 0xffd9d8d9, 0xff7b797a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff656263, 0xffc7c6c7, 0xffeeeeee, 0xfff7f6f6, 0xfff8f8f8, 0xfff8f8f8, 0xfff6f6f6, 0xfff0f0f0, 0xffd4d3d3, 0xff838181, 0xff2b2728, 0xff211d1e, 0xffa7a5a6, 0xffe0dfdf, 0xffdedddd, 0xffa3a2a2, 0xff312d2e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff3f3b3c, 0xffc5c4c4, 0xffdcdcdc, 0xffd9d9d9, 0xff888586, 0xff211d1e, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff575455, 0xffcfcdcf, 0xffdbdbdb, 0xffdbd9da, 0xff6b696a, 0xff1b1718, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff363333, 0xff999797, 0xffe0dfe0, 0xfff5f4f4, 0xfff8f7f7, 0xfff9f8f8, 0xfff8f8f8, 0xfff5f5f5, 0xffe7e6e7, 0xffb6b5b5, 0xff535052, 0xff181415, 0xff595556, 0xffd4d3d3, 0xffdbdbdb, 0xffd4d4d4, 0xff696668, 0xff1e1a1b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff231f20, 0xff8f8d8e, 0xffdcdbdb, 0xffdddcdc, 0xffc3c2c2, 0xff322f30, 0xff272425, 0xff828080, 0xffd6d6d6, 0xfff1f1f1, 0xfff7f7f7, 0xfff9f9f9, 0xfff8f8f8, 0xfff5f5f5, 0xffe3e3e3, 0xff9e9d9d, 0xff393536, 0xff1d191a, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff242021, 0xffaaa8a9, 0xffdedede, 0xffdddcdc, 0xffa6a4a5, 0xff312d2e, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1e1a1b, 0xff3c3839, 0xff918f8f, 0xffd3d2d3, 0xffededed, 0xfff5f5f5, 0xfff8f8f8, 0xfff9f9f9, 0xfff8f8f8, 0xfff7f6f6, 0xfff4f3f3, 0xffe8e8e8, 0xffd0cece, 0xff9e9c9c, 0xff5c5959, 0xff2b2829, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfa231f20, 0x8e231f20, 0x05231f20, 0x00000000, 0x00231f20, + 0x00000000, 0x00231f20, 0x00000000, 0x30231f20, 0xd8231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff322e2f, 0xff373435, 0xff363334, 0xff363334, 0xff292526, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff302b2c, 0xff373334, 0xff363334, 0xff363334, 0xff2c2829, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff2c2829, 0xff363334, 0xff363334, 0xff363334, 0xff353233, 0xff282526, 0xff231e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1c1819, 0xff2b2829, 0xff585556, 0xff7b7878, 0xff8a8888, 0xff8b8989, 0xff7b797a, 0xff5e5b5b, 0xff343132, 0xff1d191a, 0xff201c1d, 0xff231f20, 0xff302d2e, 0xff373335, 0xff373334, 0xff312d2e, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff262223, 0xff343132, 0xff373334, 0xff363334, 0xff2d2a2b, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff292526, 0xff353132, 0xff363334, 0xff363334, 0xff2a2728, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1f1a1b, 0xff403d3e, 0xff6b6869, 0xff848283, 0xff8c8a8a, 0xff868384, 0xff6f6d6d, 0xff4b4748, 0xff242122, 0xff1d191a, 0xff221e1f, 0xff292526, 0xff363233, 0xff373334, 0xff363233, 0xff2a2728, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff2e2a2b, 0xff373334, 0xff373334, 0xff343131, 0xff252122, 0xff201c1d, 0xff1d191a, 0xff373334, 0xff625f60, 0xff807e7e, 0xff8c8a8b, 0xff888686, 0xff6f6c6d, 0xff433f40, 0xff1f1b1c, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff312e2f, 0xff373334, 0xff373334, 0xff312d2e, 0xff242021, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1d191a, 0xff322e2f, 0xff565354, 0xff737172, 0xff878485, 0xff8d8b8b, 0xff888687, 0xff7d7b7c, 0xff676464, 0xff4d494a, 0xff2d292a, 0xff1d191a, 0xff1c1819, 0xff221d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xd8231f20, 0x30231f20, 0x00000000, 0x00231f20, 0x00000000, + 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x73231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1c1819, 0xff1c1819, 0xff1e1a1b, 0xff1e1a1b, 0xff1d181a, 0xff1b1718, 0xff1f1b1c, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff1f1b1c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221d1e, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1e1a1b, 0xff1b1718, 0xff1d191a, 0xff1e1a1b, 0xff1d191a, 0xff1b1718, 0xff1d191a, 0xff211d1e, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff1f1b1c, 0xff1f1b1c, 0xff1f1b1c, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff211d1e, 0xff1f1b1c, 0xff1f1b1c, 0xff201b1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1b1718, 0xff1d191a, 0xff1e1a1b, 0xff1e1a1b, 0xff1c1718, 0xff1d191a, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff201c1d, 0xff1f1b1c, 0xff1f1b1c, 0xff201c1d, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff1f1b1c, 0xff1c1718, 0xff1c1819, 0xff1e191a, 0xff1f1a1b, 0xff1e1a1b, 0xff1d1819, 0xff1b1718, 0xff1d191a, 0xff201c1d, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0x73231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, + 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0e231f20, 0xb5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff221e1f, 0xff221e1f, 0xff221e1f, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xb5231f20, 0x0e231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2a231f20, 0xde231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xde231f20, 0x2a231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x51231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x51231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x03231f20, 0x74231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x74231f20, 0x03231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0a231f20, 0x84231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x84231f20, 0x0a231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10231f20, 0x84231f20, 0xf5231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf5231f20, 0x84231f20, 0x10231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x0a231f20, 0x72231f20, 0xf4231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf4231f20, 0x72231f20, 0x0a231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x03231f20, 0x4f231f20, 0xdd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xdd231f20, 0x4f231f20, 0x03231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x29231f20, 0xb6231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0xb6231f20, 0x29231f20, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x0e231f20, 0x73231f20, 0xd8231f20, 0xfb231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfb231f20, 0xd8231f20, 0x73231f20, 0x0e231f20, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x30231f20, 0x8e231f20, 0xd6231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xd6231f20, 0x8e231f20, 0x30231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x04231f20, 0x32231f20, 0x7b231f20, 0xc2231f20, 0xf3231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf3231f20, 0xc2231f20, 0x7b231f20, 0x32231f20, 0x04231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x06231f20, 0x1c231f20, 0x49231f20, 0x8c231f20, 0xc4231f20, 0xf0231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xf0231f20, 0xc4231f20, 0x8c231f20, 0x49231f20, 0x1c231f20, 0x06231f20, 0x00000000, 0x00000000, 0x00231f20, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x01231f20, 0x04231f20, 0x11231f20, 0x2e231f20, 0x62231f20, 0x8e231f20, 0xb4231f20, 0xd4231f20, 0xe5231f20, 0xf2231f20, 0xfd231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xff231f20, 0xfd231f20, 0xf2231f20, 0xe5231f20, 0xd4231f20, 0xb4231f20, 0x8e231f20, 0x62231f20, 0x2e231f20, 0x11231f20, 0x04231f20, 0x01231f20, 0x00000000, 0x00000000, 0x00000000, 0x00231f20, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}; diff --git a/src/emu/ui/dirmenu.cpp b/src/emu/ui/dirmenu.cpp new file mode 100644 index 00000000000..69c360920dd --- /dev/null +++ b/src/emu/ui/dirmenu.cpp @@ -0,0 +1,691 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/dirmenu.cpp + + Internal UI user interface. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "ui/dirmenu.h" +#include "ui/datfile.h" +#include "ui/utils.h" +#include "ui/optsmenu.h" + +struct folders_entry +{ + const char *name; + const char *option; +}; + +static const folders_entry s_folders_entry[] = +{ + { "ROMs", OPTION_MEDIAPATH }, + { "UI", OPTION_UI_PATH }, + { "Samples", OPTION_SAMPLEPATH }, + { "DATs", OPTION_HISTORY_PATH }, + { "INIs", OPTION_INIPATH }, + { "Extra INIs", OPTION_EXTRAINI_PATH }, + { "Icons", OPTION_ICONS_PATH }, + { "Cheats", OPTION_CHEATPATH }, + { "Snapshots", OPTION_SNAPSHOT_DIRECTORY }, + { "Cabinets", OPTION_CABINETS_PATH }, + { "Flyers", OPTION_FLYERS_PATH }, + { "Titles", OPTION_TITLES_PATH }, + { "Ends", OPTION_ENDS_PATH }, + { "PCBs", OPTION_PCBS_PATH }, + { "Marquees", OPTION_MARQUEES_PATH }, + { "Controls Panels", OPTION_CPANELS_PATH }, + { "Crosshairs", OPTION_CROSSHAIRPATH }, + { "Artworks", OPTION_ARTPATH }, + { "Bosses", OPTION_BOSSES_PATH }, + { "Artworks Preview", OPTION_ARTPREV_PATH }, + { "Select", OPTION_SELECT_PATH }, + { "GameOver", OPTION_GAMEOVER_PATH }, + { "HowTo", OPTION_HOWTO_PATH }, + { "Logos", OPTION_LOGOS_PATH }, + { "Scores", OPTION_SCORES_PATH }, + { "Versus", OPTION_VERSUS_PATH }, + { nullptr } +}; + +/************************************************** + MENU ADD FOLDER +**************************************************/ +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- + +ui_menu_add_change_folder::ui_menu_add_change_folder(running_machine &machine, render_container *container, int ref, bool _change) : ui_menu(machine, container) +{ + m_ref = ref - 1; + m_change = _change; + m_search[0] = '\0'; + + // configure the starting path + char *dst = nullptr; + osd_get_full_path(&dst, "."); + m_current_path = dst; + osd_free(dst); +} + +ui_menu_add_change_folder::~ui_menu_add_change_folder() +{ +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_add_change_folder::handle() +{ + // process the menu + const ui_menu_event *m_event = process(0); + + if (m_event != nullptr && m_event->itemref != nullptr) + { + if (m_event->iptkey == IPT_UI_SELECT) + { + int index = (FPTR)m_event->itemref - 1; + const ui_menu_item &pitem = item[index]; + + // go up to the parent path + if (!strcmp(pitem.text, "..")) + { + size_t first_sep = m_current_path.find_first_of(PATH_SEPARATOR[0]); + size_t last_sep = m_current_path.find_last_of(PATH_SEPARATOR[0]); + if (first_sep != last_sep) + m_current_path.erase(++last_sep); + } + else + { + // if isn't a drive, appends the directory + if (strcmp(pitem.subtext, "[DRIVE]") != 0) + { + if (m_current_path[m_current_path.length() - 1] == PATH_SEPARATOR[0]) + m_current_path.append(pitem.text); + else + m_current_path.append(PATH_SEPARATOR).append(pitem.text); + } + else + m_current_path = pitem.text; + } + + // reset the char buffer also in this case + if (m_search[0] != 0) + m_search[0] = '\0'; + reset(UI_MENU_RESET_SELECT_FIRST); + } + else if (m_event->iptkey == IPT_SPECIAL) + { + int buflen = strlen(m_search); + bool update_selected = FALSE; + + // if it's a backspace and we can handle it, do so + if ((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0) + { + *(char *)utf8_previous_char(&m_search[buflen]) = 0; + update_selected = TRUE; + } + // if it's any other key and we're not maxed out, update + else if (m_event->unichar >= ' ' && m_event->unichar < 0x7f) + { + buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar); + m_search[buflen] = 0; + update_selected = TRUE; + } + // Tab key, save current path + else if (m_event->unichar == 0x09) + { + std::string error_string; + if (m_change) + { + if (machine().ui().options().exists(s_folders_entry[m_ref].option)) + { + machine().ui().options().set_value(s_folders_entry[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + } + else { + if (strcmp(machine().options().value(s_folders_entry[m_ref].option), m_current_path.c_str()) != 0) + { + machine().options().set_value(s_folders_entry[m_ref].option, m_current_path.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(s_folders_entry[m_ref].option); + } + } + machine().datfile().reset_run(); + } + else + { + std::string tmppath; + if (machine().ui().options().exists(s_folders_entry[m_ref].option)) { + tmppath.assign(machine().ui().options().value(s_folders_entry[m_ref].option)).append(";").append(m_current_path.c_str()); + } + else { + tmppath.assign(machine().options().value(s_folders_entry[m_ref].option)).append(";").append(m_current_path.c_str()); + } + + if (machine().ui().options().exists(s_folders_entry[m_ref].option)) + { + machine().ui().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + } + else { + if (strcmp(machine().options().value(s_folders_entry[m_ref].option), tmppath.c_str()) != 0) + { + machine().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(s_folders_entry[m_ref].option); + } + } + } + + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST); + ui_menu::stack_pop(machine()); + } + + // check for entries which matches our search buffer + if (update_selected) + { + const int cur_selected = selected; + int entry, bestmatch = 0; + + // from current item to the end + for (entry = cur_selected; entry < item.size(); entry++) + if (item[entry].ref != nullptr && m_search[0] != 0) + { + int match = 0; + for (int i = 0; i < ARRAY_LENGTH(m_search); i++) + { + if (core_strnicmp(item[entry].text, m_search, i) == 0) + match = i; + } + + if (match > bestmatch) + { + bestmatch = match; + selected = entry; + } + } + + // and from the first item to current one + for (entry = 0; entry < cur_selected; entry++) + { + if (item[entry].ref != nullptr && m_search[0] != 0) + { + int match = 0; + for (int i = 0; i < ARRAY_LENGTH(m_search); i++) + { + if (core_strnicmp(item[entry].text, m_search, i) == 0) + match = i; + } + + if (match > bestmatch) + { + bestmatch = match; + selected = entry; + } + } + } + top_line = selected - (visible_lines / 2); + } + } + else if (m_event->iptkey == IPT_UI_CANCEL) + { + // reset the char buffer also in this case + if (m_search[0] != 0) + m_search[0] = '\0'; + } + } +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_add_change_folder::populate() +{ + // open a path + const char *volume_name; + file_enumerator path(m_current_path.c_str()); + const osd_directory_entry *dirent; + int folders_count = 0; + + // add the drives + for (int i = 0; (volume_name = osd_get_volume_name(i)) != nullptr; i++) + item_append(volume_name, "[DRIVE]", 0, (void *)(FPTR)++folders_count); + + // add the directories + while ((dirent = path.next()) != nullptr) + { + if (dirent->type == ENTTYPE_DIR && strcmp(dirent->name, ".") != 0) + item_append(dirent->name, "[DIR]", 0, (void *)(FPTR)++folders_count); + } + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + // configure the custom rendering + customtop = 2.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; + custombottom = 1.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_add_change_folder::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width, maxwidth = origx2 - origx1; + ui_manager &mui = machine().ui(); + std::string tempbuf[2]; + tempbuf[0] = (m_change) ? "Change" : "Add"; + tempbuf[0].append(" ").append(s_folders_entry[m_ref].name).append(" Folder - Search: ").append(m_search).append("_"); + tempbuf[1] = m_current_path; + + // get the size of the text + for (auto & elem: tempbuf) + { + mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; + maxwidth = MAX(width, maxwidth); + } + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + for (auto & elem : tempbuf) + { + mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + y1 = y1 + mui.get_line_height(); + } + + // bottom text + tempbuf[0] = "Press TAB to set"; + + mui.draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = origy2 + UI_BOX_TB_BORDER; + y2 = origy2 + bottom; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + +} + +/************************************************** + MENU DIRECTORY +**************************************************/ +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- + +ui_menu_directory::ui_menu_directory(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ +} + +ui_menu_directory::~ui_menu_directory() +{ + save_ui_options(machine()); + ui_globals::reset = true; +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_directory::handle() +{ + // process the menu + const ui_menu_event *m_event = process(0); + + if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT) + { + int ref = (FPTR)m_event->itemref; + bool change = (ref == HISTORY_FOLDERS || ref == EXTRAINI_FOLDERS || ref == UI_FOLDERS); + ui_menu::stack_push(global_alloc_clear<ui_menu_display_actual>(machine(), container, ref, change)); + } +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_directory::populate() +{ + item_append("Roms", nullptr, 0, (void *)(FPTR)ROM_FOLDERS); + item_append("UI", nullptr, 0, (void *)(FPTR)UI_FOLDERS); + item_append("Samples", nullptr, 0, (void *)(FPTR)SAMPLE_FOLDERS); + item_append("INIs", nullptr, 0, (void *)(FPTR)INI_FOLDERS); + item_append("Artwork", nullptr, 0, (void *)(FPTR)ARTWORK_FOLDERS); + item_append("DATs (History, Mameinfo, etc...)", nullptr, 0, (void *)(FPTR)HISTORY_FOLDERS); + item_append("Extra INI (Category, etc...)", nullptr, 0, (void *)(FPTR)EXTRAINI_FOLDERS); + item_append("Icons", nullptr, 0, (void *)(FPTR)ICON_FOLDERS); + item_append("Cheats", nullptr, 0, (void *)(FPTR)CHEAT_FOLDERS); + item_append("Snapshots", nullptr, 0, (void *)(FPTR)SNAPSHOT_FOLDERS); + item_append("Cabinets", nullptr, 0, (void *)(FPTR)CABINET_FOLDERS); + item_append("Flyers", nullptr, 0, (void *)(FPTR)FLYER_FOLDERS); + item_append("Titles", nullptr, 0, (void *)(FPTR)TITLE_FOLDERS); + item_append("Ends", nullptr, 0, (void *)(FPTR)ENDS_FOLDERS); + item_append("PCBs", nullptr, 0, (void *)(FPTR)PCB_FOLDERS); + item_append("Marquees", nullptr, 0, (void *)(FPTR)MARQUEES_FOLDERS); + item_append("Control Panels", nullptr, 0, (void *)(FPTR)CPANEL_FOLDERS); + item_append("Bosses", nullptr, 0, (void *)(FPTR)BOSSES_FOLDERS); + item_append("Versus", nullptr, 0, (void *)(FPTR)VERSUS_FOLDERS); + item_append("Game Over", nullptr, 0, (void *)(FPTR)GAMEOVER_FOLDERS); + item_append("How To", nullptr, 0, (void *)(FPTR)HOWTO_FOLDERS); + item_append("Select", nullptr, 0, (void *)(FPTR)SELECT_FOLDERS); + item_append("Artwork Preview", nullptr, 0, (void *)(FPTR)ARTPREV_FOLDERS); + item_append("Scores", nullptr, 0, (void *)(FPTR)SCORES_FOLDERS); + item_append("Logos", nullptr, 0, (void *)(FPTR)LOGO_FOLDERS); + item_append("Crosshairs", nullptr, 0, (void *)(FPTR)CROSSHAIR_FOLDERS); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_directory::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + + // get the size of the text + mui.draw_text_full(container, "Folder Setup", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; + float maxwidth = MAX(width, origx2 - origx1); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, "Folder Setup", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} + +/************************************************** + MENU DISPLAY PATH +**************************************************/ +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- + +ui_menu_display_actual::ui_menu_display_actual(running_machine &machine, render_container *container, int ref, bool _change) : ui_menu(machine, container) +{ + m_ref = ref; + m_change = _change; +} + +ui_menu_display_actual::~ui_menu_display_actual() +{ +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_display_actual::handle() +{ + // process the menu + const ui_menu_event *m_event = process(0); + if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT) + switch ((FPTR)m_event->itemref) + { + case REMOVE_FOLDER: + ui_menu::stack_push(global_alloc_clear<ui_menu_remove_folder>(machine(), container, m_ref)); + break; + + case ADD_FOLDER: + case CHANGE_FOLDER: + ui_menu::stack_push(global_alloc_clear<ui_menu_add_change_folder>(machine(), container, m_ref, m_change)); + break; + } +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_display_actual::populate() +{ + m_tempbuf.assign("Current ").append(s_folders_entry[m_ref - 1].name).append(" Folders"); + if (machine().ui().options().exists(s_folders_entry[m_ref - 1].option)) { + m_searchpath.assign(machine().ui().options().value(s_folders_entry[m_ref - 1].option)); + } + else { + m_searchpath.assign(machine().options().value(s_folders_entry[m_ref - 1].option)); + } + path_iterator path(m_searchpath.c_str()); + std::string curpath; + m_folders.clear(); + while (path.next(curpath, nullptr)) + m_folders.push_back(curpath); + + if (m_change) + item_append("Change Folder", nullptr, 0, (void *)CHANGE_FOLDER); + else + item_append("Add Folder", nullptr, 0, (void *)ADD_FOLDER); + + if (m_folders.size() > 1) + item_append("Remove Folder", nullptr, 0, (void *)REMOVE_FOLDER); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = (m_folders.size() + 1) * machine().ui().get_line_height() + 6.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_display_actual::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width, maxwidth = origx2 - origx1; + ui_manager &mui = machine().ui(); + float lineh = mui.get_line_height(); + + for (auto & elem : m_folders) + { + mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; + maxwidth = MAX(maxwidth, width); + } + + // get the size of the text + mui.draw_text_full(container, m_tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; + maxwidth = MAX(width, maxwidth); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = y1 + lineh + 2.0f * UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, m_tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = y2 + 2.0f * UI_BOX_TB_BORDER; + y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + for (auto & elem : m_folders) + { + mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_LEFT, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + y1 += lineh; + } + +} + +/************************************************** + MENU REMOVE FOLDER +**************************************************/ +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- + +ui_menu_remove_folder::ui_menu_remove_folder(running_machine &machine, render_container *container, int ref) : ui_menu(machine, container) +{ + m_ref = ref - 1; + if (machine.ui().options().exists(s_folders_entry[m_ref].option)) { + m_searchpath.assign(machine.ui().options().value(s_folders_entry[m_ref].option)); + } + else { + m_searchpath.assign(machine.options().value(s_folders_entry[m_ref].option)); + } + +} + +ui_menu_remove_folder::~ui_menu_remove_folder() +{ +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_remove_folder::handle() +{ + // process the menu + const ui_menu_event *m_event = process(0); + if (m_event != nullptr && m_event->itemref != nullptr && m_event->iptkey == IPT_UI_SELECT) + { + int index = (FPTR)m_event->itemref - 1; + std::string tmppath; + for (size_t i = 0; i < item.size() - 2; i++) + if (i != index) + tmppath.append(item[i].text).append(";"); + + tmppath.substr(0, tmppath.size() - 1); + std::string error_string; + if (machine().ui().options().exists(s_folders_entry[m_ref].option)) + { + machine().ui().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + } + else { + if (strcmp(machine().options().value(s_folders_entry[m_ref].option),tmppath.c_str())!=0) + { + machine().options().set_value(s_folders_entry[m_ref].option, tmppath.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(s_folders_entry[m_ref].option); + } + } + + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_REMEMBER_REF); + ui_menu::stack_pop(machine()); + } +} + +//------------------------------------------------- +// populate menu +//------------------------------------------------- + +void ui_menu_remove_folder::populate() +{ + path_iterator path(m_searchpath.c_str()); + std::string curpath; + int folders_count = 0; + + while (path.next(curpath, nullptr)) + item_append(curpath.c_str(), nullptr, 0, (void *)(FPTR)++folders_count); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_remove_folder::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + std::string tempbuf = std::string("Remove ").append(s_folders_entry[m_ref].name).append(" Folder"); + + // get the size of the text + mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; + float maxwidth = MAX(width, origx2 - origx1); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, + UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} diff --git a/src/emu/ui/dirmenu.h b/src/emu/ui/dirmenu.h new file mode 100644 index 00000000000..47734fc6542 --- /dev/null +++ b/src/emu/ui/dirmenu.h @@ -0,0 +1,128 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/dirmenu.h + + Internal UI user interface. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_DIRMENU_H__ +#define __UI_DIRMENU_H__ + +//------------------------------------------------- +// class directory menu +//------------------------------------------------- + +class ui_menu_directory : public ui_menu +{ +public: + ui_menu_directory(running_machine &machine, render_container *container); + virtual ~ui_menu_directory(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + enum + { + ROM_FOLDERS = 1, + UI_FOLDERS, + SAMPLE_FOLDERS, + HISTORY_FOLDERS, + INI_FOLDERS, + EXTRAINI_FOLDERS, + ICON_FOLDERS, + CHEAT_FOLDERS, + SNAPSHOT_FOLDERS, + CABINET_FOLDERS, + FLYER_FOLDERS, + TITLE_FOLDERS, + ENDS_FOLDERS, + PCB_FOLDERS, + MARQUEES_FOLDERS, + CPANEL_FOLDERS, + CROSSHAIR_FOLDERS, + ARTWORK_FOLDERS, + BOSSES_FOLDERS, + ARTPREV_FOLDERS, + SELECT_FOLDERS, + GAMEOVER_FOLDERS, + HOWTO_FOLDERS, + LOGO_FOLDERS, + SCORES_FOLDERS, + VERSUS_FOLDERS + }; +}; + +//------------------------------------------------- +// class directory specific menu +//------------------------------------------------- + +class ui_menu_display_actual : public ui_menu +{ +public: + ui_menu_display_actual(running_machine &machine, render_container *container, int selectedref, bool _change); + virtual ~ui_menu_display_actual(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + std::string m_tempbuf, m_searchpath; + std::vector<std::string> m_folders; + int m_ref; + bool m_change; + + enum + { + ADD_FOLDER = 1, + REMOVE_FOLDER, + CHANGE_FOLDER + }; +}; + +//------------------------------------------------- +// class remove folder menu +//------------------------------------------------- + +class ui_menu_remove_folder : public ui_menu +{ +public: + ui_menu_remove_folder(running_machine &machine, render_container *container, int ref); + virtual ~ui_menu_remove_folder(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + std::string m_searchpath; + int m_ref; +}; + +//------------------------------------------------- +// class add / change folder menu +//------------------------------------------------- + +class ui_menu_add_change_folder : public ui_menu +{ +public: + ui_menu_add_change_folder(running_machine &machine, render_container *container, int ref, bool change); + virtual ~ui_menu_add_change_folder(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + + virtual bool menu_has_search_active() override { return (m_search[0] != 0); } + +private: + int m_ref; + std::string m_current_path; + char m_search[40]; + bool m_change; +}; + +#endif /* __UI_DIRMENU_H__ */ diff --git a/src/emu/ui/dsplmenu.cpp b/src/emu/ui/dsplmenu.cpp new file mode 100644 index 00000000000..01ee9c19578 --- /dev/null +++ b/src/emu/ui/dsplmenu.cpp @@ -0,0 +1,227 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/dsplmenu.cpp + + UI video options menu. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "ui/dsplmenu.h" +#include "ui/selector.h" +#include "ui/utils.h" + +#if defined(UI_WINDOWS) && !defined(UI_SDL) +#include "../osd/windows/winmain.h" +#else +#include "../osd/modules/lib/osdobj_common.h" +#endif + + +ui_menu_display_options::video_modes ui_menu_display_options::m_video = { + { "auto", "Auto" }, + { "opengl", "OpenGL" }, + { "bgfx", "BGFX" }, + { "d3d", "Direct3D" }, + { "gdi", "GDI" }, + { "ddraw", "DirectDraw" }, + { "soft", "Software" }, + { "accel", "SDL2 Accelerated" } +}; + +ui_menu_display_options::dspl_option ui_menu_display_options::m_options[] = { + { 0, nullptr, nullptr }, + { 0, "Video Mode", OSDOPTION_VIDEO }, +#if defined(UI_WINDOWS) && !defined(UI_SDL) + { 0, "Hardware Stretch", WINOPTION_HWSTRETCH }, + { 0, "Triple Buffering", WINOPTION_TRIPLEBUFFER }, + { 0, "HLSL", WINOPTION_HLSL_ENABLE }, +#endif + { 0, "GLSL", OSDOPTION_GL_GLSL }, + { 0, "Bilinear Filtering", OSDOPTION_FILTER }, + { 0, "Bitmap Prescaling", OSDOPTION_PRESCALE }, + { 0, "Multi-Threaded Rendering", OSDOPTION_MULTITHREADING }, + { 0, "Window Mode", OSDOPTION_WINDOW }, + { 0, "Enforce Aspect Ratio", OSDOPTION_KEEPASPECT }, + { 0, "Start Out Maximized", OSDOPTION_MAXIMIZE }, + { 0, "Synchronized Refresh", OSDOPTION_SYNCREFRESH }, + { 0, "Wait Vertical Sync", OSDOPTION_WAITVSYNC } +}; + + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_display_options::ui_menu_display_options(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ + osd_options &options = downcast<osd_options &>(machine.options()); + + for (int d = 2; d < ARRAY_LENGTH(m_options); ++d) + m_options[d].status = options.int_value(m_options[d].option); + + // create video list + m_list.push_back("auto"); + m_list.push_back("opengl"); // TODO: check USE_OPENGL + + std::string descr = options.description(OSDOPTION_VIDEO); + descr.erase(0, descr.find(":") + 2); + std::string delim = ", "; + size_t p1, p2 = 0; + for (;;) + { + p1 = descr.find_first_not_of(delim, p2); + if (p1 == std::string::npos) + break; + p2 = descr.find_first_of(delim, p1 + 1); + if (p2 != std::string::npos) + { + std::string txt(descr.substr(p1, p2 - p1)); + if (txt != "or" && txt != "none") + m_list.push_back(descr.substr(p1, p2 - p1)); + } + else + { + m_list.push_back(descr.substr(p1)); + break; + } + } + + m_options[1].status = 0; + for (int cur = 0; cur < m_list.size(); ++cur) + if (options.video() == m_list[cur]) + { + m_options[1].status = cur; + break; + } +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_display_options::~ui_menu_display_options() +{ + std::string error_string; + for (int d = 2; d < ARRAY_LENGTH(m_options); ++d) + { + if (machine().options().int_value(m_options[d].option) != m_options[d].status) + { + machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(m_options[d].option); + } + } + if (machine().options().value(m_options[1].option) != m_list[m_options[1].status]) + { + machine().options().set_value(m_options[1].option, m_list[m_options[1].status].c_str(), OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(m_options[1].option); + + } + ui_globals::reset = true; +} + + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_display_options::handle() +{ + bool changed = false; + + // process the menu + const ui_menu_event *m_event = process(0); + + if (m_event != nullptr && m_event->itemref != nullptr) + { + int value = (FPTR)m_event->itemref; + if (!strcmp(m_options[value].option, OSDOPTION_VIDEO) || !strcmp(m_options[value].option, OSDOPTION_PRESCALE)) + { + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + changed = true; + (m_event->iptkey == IPT_UI_LEFT) ? m_options[value].status-- : m_options[value].status++; + } + else if (m_event->iptkey == IPT_UI_SELECT && !strcmp(m_options[value].option, OSDOPTION_VIDEO)) + { + int total = m_list.size(); + std::vector<std::string> s_sel(total); + for (int index = 0; index < total; ++index) + s_sel[index] = m_video[m_list[index]]; + + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, m_options[value].status)); + } + } + else if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT) + { + changed = true; + m_options[value].status = !m_options[value].status; + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_display_options::populate() +{ + // add video mode option + std::string v_text(m_video[m_list[m_options[1].status]]); + UINT32 arrow_flags = get_arrow_flags(0, m_list.size() - 1, m_options[1].status); + item_append(m_options[1].description, v_text.c_str(), arrow_flags, (void *)(FPTR)1); + + // add options items + for (int opt = 2; opt < ARRAY_LENGTH(m_options); ++opt) + if (strcmp(m_options[opt].option, OSDOPTION_PRESCALE) != 0) + item_append(m_options[opt].description, m_options[opt].status ? "On" : "Off", + m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt); + else + { + strprintf(v_text, "%d", m_options[opt].status); + arrow_flags = get_arrow_flags(1, 3, m_options[opt].status); + item_append(m_options[opt].description, v_text.c_str(), arrow_flags, (void *)(FPTR)opt); + } + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_display_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + mui.draw_text_full(container, "Display Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, + ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + float maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, "Display Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, + UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} diff --git a/src/emu/ui/dsplmenu.h b/src/emu/ui/dsplmenu.h new file mode 100644 index 00000000000..814304ec6bd --- /dev/null +++ b/src/emu/ui/dsplmenu.h @@ -0,0 +1,44 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/dsplmenu.h + + UI video options menu. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_DSPLMENU_H__ +#define __UI_DSPLMENU_H__ + +//------------------------------------------------- +// class display options menu +//------------------------------------------------- +class ui_menu_display_options : public ui_menu +{ +public: + ui_menu_display_options(running_machine &machine, render_container *container); + virtual ~ui_menu_display_options(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + struct dspl_option + { + UINT16 status; + const char *description; + const char *option; + }; + + using video_modes = std::unordered_map<std::string, std::string>; + + static video_modes m_video; + static dspl_option m_options[]; + + std::vector<std::string> m_list; +}; + +#endif /* __UI_DSPLMENU_H__ */ diff --git a/src/emu/ui/filemngr.cpp b/src/emu/ui/filemngr.cpp index d277d0bd847..cccc92888c4 100644 --- a/src/emu/ui/filemngr.cpp +++ b/src/emu/ui/filemngr.cpp @@ -195,10 +195,10 @@ void ui_menu_file_manager::force_file_manager(running_machine &machine, render_c ui_menu::stack_reset(machine); // add the quit entry followed by the game select entry - ui_menu *quit = auto_alloc_clear(machine, <ui_menu_quit_game>(machine, container)); + ui_menu *quit = global_alloc_clear<ui_menu_quit_game>(machine, container); quit->set_special_main_menu(true); ui_menu::stack_push(quit); - ui_menu::stack_push(auto_alloc_clear(machine, <ui_menu_file_manager>(machine, container, warnings))); + ui_menu::stack_push(global_alloc_clear<ui_menu_file_manager>(machine, container, warnings)); // force the menus on machine.ui().show_menu(); diff --git a/src/emu/ui/filesel.cpp b/src/emu/ui/filesel.cpp index 140bfdd492d..e757f537044 100644 --- a/src/emu/ui/filesel.cpp +++ b/src/emu/ui/filesel.cpp @@ -749,7 +749,10 @@ void ui_menu_file_selector::handle() } if (selected_entry != nullptr && selected_entry != cur_selected) - set_selection((void *) selected_entry); + { + set_selection((void *)selected_entry); + top_line = selected - (visible_lines / 2); + } } } else if (event->iptkey == IPT_UI_CANCEL) diff --git a/src/emu/ui/icorender.h b/src/emu/ui/icorender.h new file mode 100644 index 00000000000..eec52b7e3ed --- /dev/null +++ b/src/emu/ui/icorender.h @@ -0,0 +1,233 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890;Victor Laskin +/*************************************************************************** + + ui/icorender.h + + ICOns file loader. + + Original code by Victor Laskin (victor.laskin@gmail.com) + http://vitiy.info/Code/ico.cpp + +***************************************************************************/ +#pragma once + +#ifndef __UI_ICORENDER_H__ +#define __UI_ICORENDER_H__ + +// These next two structs represent how the icon information is stored +// in an ICO file. +typedef struct +{ + UINT8 bWidth; // Width of the image + UINT8 bHeight; // Height of the image (times 2) + UINT8 bColorCount; // Number of colors in image (0 if >=8bpp) + UINT8 bReserved; // Reserved + UINT16 wPlanes; // Color Planes + UINT16 wBitCount; // Bits per pixel + UINT32 dwBytesInRes; // how many bytes in this resource? + UINT32 dwImageOffset; // where in the file is this image +} ICONDIRENTRY, *LPICONDIRENTRY; + +typedef struct +{ + UINT16 idReserved; // Reserved + UINT16 idType; // resource type (1 for icons) + UINT16 idCount; // how many images? + //ICONDIRENTRY idEntries[1]; // the entries for each image +} ICONDIR, *LPICONDIR; + +// size - 40 bytes +typedef struct { + UINT32 biSize; + UINT32 biWidth; + UINT32 biHeight; // Icon Height (added height of XOR-Bitmap and AND-Bitmap) + UINT16 biPlanes; + UINT16 biBitCount; + UINT32 biCompression; + INT32 biSizeImage; + UINT32 biXPelsPerMeter; + UINT32 biYPelsPerMeter; + UINT32 biClrUsed; + UINT32 biClrImportant; +} s_BITMAPINFOHEADER, *s_PBITMAPINFOHEADER; + +// 46 bytes +typedef struct{ + s_BITMAPINFOHEADER icHeader; // DIB header + UINT32 icColors[1]; // Color table (short 4 bytes) //RGBQUAD + UINT8 icXOR[1]; // DIB bits for XOR mask + UINT8 icAND[1]; // DIB bits for AND mask +} ICONIMAGE, *LPICONIMAGE; + +//------------------------------------------------- +// load an ICO file into a bitmap +//------------------------------------------------- + +void render_load_ico(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, const char *filename) +{ + INT32 width = 0; + INT32 height = 0; + + // deallocate previous bitmap + bitmap.reset(); + + // define file's full name + std::string fname; + + if (!dirname) + fname = filename; + else + fname.assign(dirname).append(PATH_SEPARATOR).append(filename); + + file_error filerr = file.open(fname.c_str()); + + if (filerr != FILERR_NONE) + return; + + // allocates a buffer for the image + UINT64 size = file.size(); + UINT8 *buffer = global_alloc_array(UINT8, size + 1); + + // read data from the file and set them in the buffer + file.read(buffer, size); + + LPICONDIR icoDir = (LPICONDIR)buffer; + int iconsCount = icoDir->idCount; + + if (icoDir->idReserved != 0 || icoDir->idType != 1 || iconsCount == 0 || iconsCount > 20) + { + file.close(); + global_free_array(buffer); + return; + } + + UINT8* cursor = buffer; + cursor += 6; + ICONDIRENTRY* dirEntry = (ICONDIRENTRY*)(cursor); + int maxSize = 0; + int offset = 0; + int maxBitCount = 0; + for (int i = 0; i < iconsCount; i++, ++dirEntry) + { + int w = dirEntry->bWidth; + int h = dirEntry->bHeight; + int bitCount = dirEntry->wBitCount; + if (w * h > maxSize || bitCount > maxBitCount) // we choose icon with max resolution + { + width = w; + height = h; + offset = dirEntry->dwImageOffset; + maxSize = w * h; + } + } + + if (offset == 0) return; + + cursor = buffer; + cursor += offset; + ICONIMAGE* icon = (ICONIMAGE*)(cursor); + int realBitsCount = (int)icon->icHeader.biBitCount; + bool hasAndMask = (realBitsCount < 32) && (height != icon->icHeader.biHeight); + + cursor += 40; + bitmap.allocate(width, height); + + // rgba + vertical swap + if (realBitsCount >= 32) + { + for (int x = 0; x < width; ++x) + for (int y = 0; y < height; ++y) + { + int shift2 = 4 * (x + (height - y - 1) * width); + bitmap.pix32(y, x) = rgb_t(cursor[shift2 + 3], cursor[shift2 + 2], cursor[shift2 + 1], cursor[shift2]); + } + } + else if (realBitsCount == 24) + for (int x = 0; x < width; ++x) + for (int y = 0; y < height; ++y) + { + int shift2 = 3 * (x + (height - y - 1) * width); + bitmap.pix32(y, x) = rgb_t(255, cursor[shift2 + 2], cursor[shift2 + 1], cursor[shift2]); + } + else if (realBitsCount == 8) // 256 colors + { + // 256 color table + UINT8 *colors = cursor; + cursor += 256 * 4; + for (int x = 0; x < width; ++x) + for (int y = 0; y < height; ++y) + { + int shift2 = (x + (height - y - 1) * width); + int index = 4 * cursor[shift2]; + bitmap.pix32(y, x) = rgb_t(255, colors[index + 2], colors[index + 1], colors[index]); + } + } + else if (realBitsCount == 4) // 16 colors + { + // 16 color table + UINT8 *colors = cursor; + cursor += 16 * 4; + for (int x = 0; x < width; ++x) + for (int y = 0; y < height; ++y) + { + int shift2 = (x + (height - y - 1) * width); + UINT8 index = cursor[shift2 / 2]; + if (shift2 % 2 == 0) + index = (index >> 4) & 0xF; + else + index = index & 0xF; + index *= 4; + bitmap.pix32(y, x) = rgb_t(255, colors[index + 2], colors[index + 1], colors[index]); + } + } + else if (realBitsCount == 1) // 2 colors + { + // 2 color table + UINT8 *colors = cursor; + cursor += 2 * 4; + int boundary = width; // !!! 32 bit boundary (http://www.daubnet.com/en/file-format-ico) + while (boundary % 32 != 0) boundary++; + + for (int x = 0; x < width; ++x) + for (int y = 0; y < height; ++y) + { + int shift2 = (x + (height - y - 1) * boundary); + UINT8 index = cursor[shift2 / 8]; + + // select 1 bit only + UINT8 bit = 7 - (x % 8); + index = (index >> bit) & 0x01; + index *= 4; + bitmap.pix32(y, x) = rgb_t(255, colors[index + 2], colors[index + 1], colors[index]); + } + } + + // Read AND mask after base color data - 1 BIT MASK + if (hasAndMask) + { + int boundary = width * realBitsCount; // !!! 32 bit boundary (http://www.daubnet.com/en/file-format-ico) + while (boundary % 32 != 0) boundary++; + cursor += boundary * height / 8; + + boundary = width; + while (boundary % 32 != 0) boundary++; + + for (int y = 0; y < height; ++y) + for (int x = 0; x < width; ++x) + { + UINT8 bit = 7 - (x % 8); + int shift2 = (x + (height - y - 1) * boundary) / 8; + int mask = (0x01 & ((UINT8)cursor[shift2] >> bit)); + rgb_t colors = bitmap.pix32(y, x); + UINT8 alpha = colors.a(); + alpha *= 1 - mask; + colors.set_a(alpha); + bitmap.pix32(y, x) = colors; + } + } + file.close(); + global_free_array(buffer); +} + +#endif /* __UI_ICORENDER_H__ */ diff --git a/src/emu/ui/imgcntrl.cpp b/src/emu/ui/imgcntrl.cpp index 3bb77723726..8f3dbeca75b 100644 --- a/src/emu/ui/imgcntrl.cpp +++ b/src/emu/ui/imgcntrl.cpp @@ -190,20 +190,20 @@ void ui_menu_control_device_image::handle() zippath_closedir(directory); } submenu_result = -1; - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_file_selector>(machine(), container, image, current_directory, current_file, true, image->image_interface()!=nullptr, can_create, &submenu_result))); + ui_menu::stack_push(global_alloc_clear<ui_menu_file_selector>(machine(), container, image, current_directory, current_file, true, image->image_interface()!=nullptr, can_create, &submenu_result)); state = SELECT_FILE; break; } case START_SOFTLIST: sld = nullptr; - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software>(machine(), container, image->image_interface(), &sld))); + ui_menu::stack_push(global_alloc_clear<ui_menu_software>(machine(), container, image->image_interface(), &sld)); state = SELECT_SOFTLIST; break; case START_OTHER_PART: { submenu_result = -1; - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software_parts>(machine(), container, swi, swp->interface(), &swp, true, &submenu_result))); + ui_menu::stack_push(global_alloc_clear<ui_menu_software_parts>(machine(), container, swi, swp->interface(), &swp, true, &submenu_result)); state = SELECT_OTHER_PART; break; } @@ -214,7 +214,7 @@ void ui_menu_control_device_image::handle() break; } software_info_name = ""; - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software_list>(machine(), container, sld, image->image_interface(), software_info_name))); + ui_menu::stack_push(global_alloc_clear<ui_menu_software_list>(machine(), container, sld, image->image_interface(), software_info_name)); state = SELECT_PARTLIST; break; @@ -226,7 +226,7 @@ void ui_menu_control_device_image::handle() { submenu_result = -1; swp = nullptr; - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software_parts>(machine(), container, swi, image->image_interface(), &swp, false, &submenu_result))); + ui_menu::stack_push(global_alloc_clear<ui_menu_software_parts>(machine(), container, swi, image->image_interface(), &swp, false, &submenu_result)); state = SELECT_ONE_PART; } else @@ -290,7 +290,7 @@ void ui_menu_control_device_image::handle() break; case ui_menu_file_selector::R_CREATE: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_file_create>(machine(), container, image, current_directory, current_file, &create_ok))); + ui_menu::stack_push(global_alloc_clear<ui_menu_file_create>(machine(), container, image, current_directory, current_file, &create_ok)); state = CHECK_CREATE; break; @@ -310,7 +310,7 @@ void ui_menu_control_device_image::handle() test_create(can_create, need_confirm); if(can_create) { if(need_confirm) { - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_confirm_save_as>(machine(), container, &create_confirmed))); + ui_menu::stack_push(global_alloc_clear<ui_menu_confirm_save_as>(machine(), container, &create_confirmed)); state = CREATE_CONFIRM; } else { state = DO_CREATE; diff --git a/src/emu/ui/inifile.cpp b/src/emu/ui/inifile.cpp new file mode 100644 index 00000000000..1c92b43a4d6 --- /dev/null +++ b/src/emu/ui/inifile.cpp @@ -0,0 +1,454 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/inifile.cpp + + UI INIs file manager. + +***************************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/inifile.h" +#include "softlist.h" +#include "drivenum.h" +#include <algorithm> + +//------------------------------------------------- +// GLOBAL VARIABLES +//------------------------------------------------- +UINT16 inifile_manager::current_category = 0; +UINT16 inifile_manager::current_file = 0; + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +inifile_manager::inifile_manager(running_machine &machine) + : m_machine(machine) +{ + ini_index.clear(); + directory_scan(); +} + +//------------------------------------------------- +// scan directories and create index +//------------------------------------------------- + +void inifile_manager::directory_scan() +{ + // open extra INIs folder + file_enumerator path(machine().ui().options().extraini_path()); + const osd_directory_entry *dir; + + // loop into folder's file + while ((dir = path.next()) != nullptr) + { + int length = strlen(dir->name); + std::string filename(dir->name); + + // skip ui_favorite file + if (!core_stricmp("ui_favorite.ini", filename.c_str())) + continue; + + // check .ini file ending + if ((length > 4) && dir->name[length - 4] == '.' && tolower((UINT8)dir->name[length - 3]) == 'i' && + tolower((UINT8)dir->name[length - 2]) == 'n' && tolower((UINT8)dir->name[length - 1]) == 'i') + { + // try to open file and indexing + if (parseopen(filename.c_str())) + { + init_category(filename); + parseclose(); + } + } + } +} + +//------------------------------------------------- +// initialize category +//------------------------------------------------- + +void inifile_manager::init_category(std::string &filename) +{ + categoryindex index; + char rbuf[MAX_CHAR_INFO]; + std::string readbuf, name; + while (fgets(rbuf, MAX_CHAR_INFO, fp) != nullptr) + { + readbuf = rbuf; + if (readbuf[0] == '[') + { + size_t found = readbuf.find("]"); + name = readbuf.substr(1, found - 1); + if (name == "FOLDER_SETTINGS" || name == "ROOT_FOLDER") + continue; + else + index.emplace_back(name, ftell(fp)); + } + } + + if (!index.empty()) + ini_index.emplace_back(filename, index); +} + +//------------------------------------------------- +// load and indexing ini files +//------------------------------------------------- + +void inifile_manager::load_ini_category(std::vector<int> &temp_filter) +{ + if (ini_index.empty()) + return; + + bool search_clones = false; + std::string filename(ini_index[current_file].name); + long offset = ini_index[current_file].category[current_category].offset; + + if (!core_stricmp(filename.c_str(), "category.ini") || !core_stricmp(filename.c_str(), "alltime.ini")) + search_clones = true; + + if (parseopen(filename.c_str())) + { + fseek(fp, offset, SEEK_SET); + int num_game = driver_list::total(); + char rbuf[MAX_CHAR_INFO]; + std::string readbuf; + while (fgets(rbuf, MAX_CHAR_INFO, fp) != nullptr) + { + readbuf = chartrimcarriage(rbuf); + + if (readbuf.empty() || readbuf[0] == '[') + break; + + int dfind = driver_list::find(readbuf.c_str()); + if (dfind != -1 && search_clones) + { + temp_filter.push_back(dfind); + int clone_of = driver_list::non_bios_clone(dfind); + if (clone_of == -1) + { + for (int x = 0; x < num_game; x++) + if (readbuf == driver_list::driver(x).parent && readbuf != driver_list::driver(x).name) + temp_filter.push_back(x); + } + } + else if (dfind != -1) + temp_filter.push_back(dfind); + } + parseclose(); + } +} + +//--------------------------------------------------------- +// parseopen - Open up file for reading +//--------------------------------------------------------- + +bool inifile_manager::parseopen(const char *filename) +{ + // MAME core file parsing functions fail in recognizing UNICODE chars in UTF-8 without BOM, + // so it's better and faster use standard C fileio functions. + + emu_file file(machine().ui().options().extraini_path(), OPEN_FLAG_READ); + if (file.open(filename) != FILERR_NONE) + return false; + + m_fullpath = file.fullpath(); + file.close(); + fp = fopen(m_fullpath.c_str(), "r"); + + fgetc(fp); + fseek(fp, 0, SEEK_SET); + return true; +} + +/************************************************************************** + FAVORITE MANAGER +**************************************************************************/ + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +favorite_manager::favorite_manager(running_machine &machine) + : m_machine(machine) +{ + m_current = -1; + parse_favorite(); +} + +//------------------------------------------------- +// add a game +//------------------------------------------------- + +void favorite_manager::add_favorite_game(const game_driver *driver) +{ + m_list.emplace_back(driver->name, driver->description, "", "", "", 0, "", driver, "", "", "", 1, "", "", "", true); + save_favorite_games(); +} + +//------------------------------------------------- +// add a system +//------------------------------------------------- + +void favorite_manager::add_favorite_game(ui_software_info &swinfo) +{ + m_list.push_back(swinfo); + save_favorite_games(); +} + +//------------------------------------------------- +// add a game / system +//------------------------------------------------- + +void favorite_manager::add_favorite_game() +{ + if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0) + { + add_favorite_game(&machine().system()); + return; + } + + bool software_avail = false; + image_interface_iterator iter(machine().root_device()); + for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next()) + { + if (image->exists() && image->software_entry()) + { + const software_info *swinfo = image->software_entry(); + const software_part *part = image->part_entry(); + ui_software_info tmpmatches; + tmpmatches.shortname = strensure(swinfo->shortname()); + tmpmatches.longname = strensure(image->longname()); + tmpmatches.parentname = strensure(swinfo->parentname()); + tmpmatches.year = strensure(image->year()); + tmpmatches.publisher = strensure(image->manufacturer()); + tmpmatches.supported = image->supported(); + tmpmatches.part = strensure(part->name()); + tmpmatches.driver = &machine().system(); + tmpmatches.listname = strensure(image->software_list_name()); + tmpmatches.interface = strensure(part->interface()); + tmpmatches.instance = strensure(image->instance_name()); + tmpmatches.startempty = 0; + tmpmatches.parentlongname.clear(); + if (swinfo->parentname()) + { + software_list_device *swlist = software_list_device::find_by_name(machine().config(), image->software_list_name()); + for (software_info *c_swinfo = swlist->first_software_info(); c_swinfo != nullptr; c_swinfo = c_swinfo->next()) + { + std::string c_parent(c_swinfo->parentname()); + if (!c_parent.empty() && c_parent == swinfo->shortname()) + { + tmpmatches.parentlongname = c_swinfo->longname(); + break; + } + } + } + + tmpmatches.usage.clear(); + for (feature_list_item *flist = swinfo->other_info(); flist != nullptr; flist = flist->next()) + if (!strcmp(flist->name(), "usage")) + tmpmatches.usage = flist->value(); + + tmpmatches.devicetype = strensure(image->image_type_name()); + tmpmatches.available = true; + software_avail = true; + m_list.push_back(tmpmatches); + save_favorite_games(); + } + } + + if (!software_avail) + add_favorite_game(&machine().system()); +} + +//------------------------------------------------- +// remove a favorite from list +//------------------------------------------------- + +void favorite_manager::remove_favorite_game(ui_software_info &swinfo) +{ + m_list.erase(std::remove(m_list.begin(), m_list.end(), swinfo), m_list.end()); + save_favorite_games(); +} + +//------------------------------------------------- +// remove a favorite from list +//------------------------------------------------- + +void favorite_manager::remove_favorite_game() +{ + m_list.erase(m_list.begin() + m_current); + save_favorite_games(); +} + +//------------------------------------------------- +// check if game is already in favorite list +//------------------------------------------------- + +bool favorite_manager::isgame_favorite() +{ + if ((machine().system().flags & MACHINE_TYPE_ARCADE) != 0) + return isgame_favorite(&machine().system()); + + image_interface_iterator iter(machine().root_device()); + bool image_loaded = false; + + for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next()) + { + const software_info *swinfo = image->software_entry(); + if (image->exists() && swinfo != nullptr) + { + image_loaded = true; + for (size_t current = 0; current < m_list.size(); current++) + if (m_list[current].shortname == swinfo->shortname() && + m_list[current].listname == image->software_list_name()) + { + m_current = current; + return true; + } + } + } + + if (!image_loaded) + return isgame_favorite(&machine().system()); + + m_current = -1; + return false; +} + +//------------------------------------------------- +// check if game is already in favorite list +//------------------------------------------------- + +bool favorite_manager::isgame_favorite(const game_driver *driver) +{ + for (size_t x = 0; x < m_list.size(); x++) + if (m_list[x].driver == driver && m_list[x].shortname == driver->name) + { + m_current = x; + return true; + } + + m_current = -1; + return false; +} + +//------------------------------------------------- +// check if game is already in favorite list +//------------------------------------------------- + +bool favorite_manager::isgame_favorite(ui_software_info &swinfo) +{ + for (size_t x = 0; x < m_list.size(); x++) + if (m_list[x] == swinfo) + { + m_current = x; + return true; + } + + m_current = -1; + return false; +} + +//------------------------------------------------- +// parse favorite file +//------------------------------------------------- + +void favorite_manager::parse_favorite() +{ + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ); + if (file.open(favorite_filename) == FILERR_NONE) + { + char readbuf[1024]; + file.gets(readbuf, 1024); + + while (readbuf[0] == '[') + file.gets(readbuf, 1024); + + while (file.gets(readbuf, 1024)) + { + ui_software_info tmpmatches; + tmpmatches.shortname = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.longname = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.parentname = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.year = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.publisher = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.supported = atoi(readbuf); + file.gets(readbuf, 1024); + tmpmatches.part = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + chartrimcarriage(readbuf); + int dx = driver_list::find(readbuf); + if (dx == -1) continue; + tmpmatches.driver = &driver_list::driver(dx); + file.gets(readbuf, 1024); + tmpmatches.listname = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.interface = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.instance = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.startempty = atoi(readbuf); + file.gets(readbuf, 1024); + tmpmatches.parentlongname = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.usage = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.devicetype = chartrimcarriage(readbuf); + file.gets(readbuf, 1024); + tmpmatches.available = atoi(readbuf); + m_list.push_back(tmpmatches); + } + file.close(); + } +} + +//------------------------------------------------- +// save favorite +//------------------------------------------------- + +void favorite_manager::save_favorite_games() +{ + // attempt to open the output file + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + if (file.open(favorite_filename) == FILERR_NONE) + { + if (m_list.empty()) + { + file.remove_on_close(); + file.close(); + return; + } + + // generate the favorite INI + std::string text("[ROOT_FOLDER]\n[Favorite]\n\n"); + for (auto & elem : m_list) + { + text += elem.shortname + "\n"; + text += elem.longname + "\n"; + text += elem.parentname + "\n"; + text += elem.year + "\n"; + text += elem.publisher + "\n"; + strcatprintf(text, "%d\n", elem.supported); + text += elem.part + "\n"; + strcatprintf(text, "%s\n", elem.driver->name); + text += elem.listname + "\n"; + text += elem.interface + "\n"; + text += elem.instance + "\n"; + strcatprintf(text, "%d\n", elem.startempty); + text += elem.parentlongname + "\n"; + text += elem.usage + "\n"; + text += elem.devicetype + "\n"; + strcatprintf(text, "%d\n", elem.available); + } + file.puts(text.c_str()); + file.close(); + } +} diff --git a/src/emu/ui/inifile.h b/src/emu/ui/inifile.h new file mode 100644 index 00000000000..5a90b0d3d83 --- /dev/null +++ b/src/emu/ui/inifile.h @@ -0,0 +1,122 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/inifile.h + + UI INIs file manager. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_INIFILE_H__ +#define __UI_INIFILE_H__ + +#include "ui/utils.h" + +//------------------------------------------------- +// INIFILE MANAGER +//------------------------------------------------- + +class inifile_manager +{ +public: + // category structure + struct IniCategoryIndex + { + IniCategoryIndex(std::string _name, long _offset) { name = _name; offset = _offset; } + std::string name; + long offset; + }; + + using categoryindex = std::vector<IniCategoryIndex>; + + // ini file structure + struct IniFileIndex + { + IniFileIndex(std::string _name, categoryindex _category) { name = _name; category = _category; } + std::string name; + categoryindex category; + }; + + // construction/destruction + inifile_manager(running_machine &machine); + + // getters + running_machine &machine() const { return m_machine; } + + // load games from category + void load_ini_category(std::vector<int> &temp_filter); + + // files indices + std::vector<IniFileIndex> ini_index; + static UINT16 current_file, current_category; + + std::string actual_file() { return ini_index[current_file].name; } + std::string actual_category() { return ini_index[current_file].category[current_category].name; } + +private: + // init category index + void init_category(std::string &filename); + + // init file index + void directory_scan(); + + // file open/close/seek + bool parseopen(const char *filename); + void parseclose() { if (fp != nullptr) fclose(fp); } + + // internal state + running_machine &m_machine; // reference to our machine + std::string m_fullpath; + FILE *fp = nullptr; +}; + +//------------------------------------------------- +// FAVORITE MANAGER +//------------------------------------------------- + +class favorite_manager +{ +public: + // construction/destruction + favorite_manager(running_machine &machine); + + // favorite indices + std::vector<ui_software_info> m_list; + + // getters + running_machine &machine() const { return m_machine; } + + // add + void add_favorite_game(); + void add_favorite_game(const game_driver *driver); + void add_favorite_game(ui_software_info &swinfo); + + // check + bool isgame_favorite(); + bool isgame_favorite(const game_driver *driver); + bool isgame_favorite(ui_software_info &swinfo); + + // save + void save_favorite_games(); + + // remove + void remove_favorite_game(); + void remove_favorite_game(ui_software_info &swinfo); + +private: + const char *favorite_filename = "favorites.ini"; + + // current + int m_current; + + // parse file ui_favorite + void parse_favorite(); + + // internal state + running_machine &m_machine; // reference to our machine +}; + +#endif /* __UI_INIFILE_H__ */ diff --git a/src/emu/ui/inputmap.cpp b/src/emu/ui/inputmap.cpp index 1fc0d046e1f..f3ffe9b0e59 100644 --- a/src/emu/ui/inputmap.cpp +++ b/src/emu/ui/inputmap.cpp @@ -73,7 +73,7 @@ void ui_menu_input_groups::handle() /* process the menu */ const ui_menu_event *menu_event = process(0); if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT) - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_input_general>(machine(), container, int((long long)(menu_event->itemref)-1)))); + ui_menu::stack_push(global_alloc_clear<ui_menu_input_general>(machine(), container, int((long long)(menu_event->itemref)-1))); } diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp index 415ad118811..caf531c41ef 100644 --- a/src/emu/ui/mainmenu.cpp +++ b/src/emu/ui/mainmenu.cpp @@ -23,12 +23,16 @@ #include "ui/mainmenu.h" #include "ui/miscmenu.h" #include "ui/selgame.h" +#include "ui/simpleselgame.h" #include "ui/sliders.h" #include "ui/slotopt.h" #include "ui/tapectrl.h" #include "ui/videoopt.h" #include "imagedev/cassette.h" #include "machine/bcreader.h" +#include "ui/datfile.h" +#include "ui/inifile.h" +#include "ui/datmenu.h" /*************************************************************************** @@ -45,96 +49,106 @@ ui_menu_main::ui_menu_main(running_machine &machine, render_container *container void ui_menu_main::populate() { - std::string menu_text; - /* add input menu items */ - item_append("Input (general)", nullptr, 0, (void *)INPUT_GROUPS); + item_append(_("Input (general)"), nullptr, 0, (void *)INPUT_GROUPS); - strprintf(menu_text, "Input (this %s)", emulator_info::get_capstartgamenoun()); - item_append(menu_text.c_str(), nullptr, 0, (void *)INPUT_SPECIFIC); + item_append(_("Input (this Machine)"), nullptr, 0, (void *)INPUT_SPECIFIC); /* add optional input-related menus */ if (machine().ioport().has_analog()) - item_append("Analog Controls", nullptr, 0, (void *)ANALOG); + item_append(_("Analog Controls"), nullptr, 0, (void *)ANALOG); if (machine().ioport().has_dips()) - item_append("Dip Switches", nullptr, 0, (void *)SETTINGS_DIP_SWITCHES); + item_append(_("Dip Switches"), nullptr, 0, (void *)SETTINGS_DIP_SWITCHES); if (machine().ioport().has_configs()) { - strprintf(menu_text, "%s Configuration", emulator_info::get_capstartgamenoun()); - item_append(menu_text.c_str(), nullptr, 0, (void *)SETTINGS_DRIVER_CONFIG); + item_append(_("Machine Configuration"), nullptr, 0, (void *)SETTINGS_DRIVER_CONFIG); } /* add bookkeeping menu */ - item_append("Bookkeeping Info", nullptr, 0, (void *)BOOKKEEPING); + item_append(_("Bookkeeping Info"), nullptr, 0, (void *)BOOKKEEPING); /* add game info menu */ - strprintf(menu_text, "%s Information", emulator_info::get_capstartgamenoun()); - item_append(menu_text.c_str(), nullptr, 0, (void *)GAME_INFO); + item_append(_("Machine Information"), nullptr, 0, (void *)GAME_INFO); image_interface_iterator imgiter(machine().root_device()); if (imgiter.first() != nullptr) { /* add image info menu */ - item_append("Image Information", nullptr, 0, (void *)IMAGE_MENU_IMAGE_INFO); + item_append(_("Image Information"), nullptr, 0, (void *)IMAGE_MENU_IMAGE_INFO); /* add file manager menu */ - item_append("File Manager", nullptr, 0, (void *)IMAGE_MENU_FILE_MANAGER); + item_append(_("File Manager"), nullptr, 0, (void *)IMAGE_MENU_FILE_MANAGER); /* add tape control menu */ cassette_device_iterator cassiter(machine().root_device()); if (cassiter.first() != nullptr) - item_append("Tape Control", nullptr, 0, (void *)TAPE_CONTROL); + item_append(_("Tape Control"), nullptr, 0, (void *)TAPE_CONTROL); } pty_interface_iterator ptyiter(machine().root_device()); if (ptyiter.first() != nullptr) { - item_append("Pseudo terminals", nullptr, 0, (void *)PTY_INFO); + item_append(_("Pseudo terminals"), nullptr, 0, (void *)PTY_INFO); } if (machine().ioport().has_bioses()) - item_append("Bios Selection", nullptr, 0, (void *)BIOS_SELECTION); + item_append(_("Bios Selection"), nullptr, 0, (void *)BIOS_SELECTION); slot_interface_iterator slotiter(machine().root_device()); if (slotiter.first() != nullptr) { /* add slot info menu */ - item_append("Slot Devices", nullptr, 0, (void *)SLOT_DEVICES); + item_append(_("Slot Devices"), nullptr, 0, (void *)SLOT_DEVICES); } barcode_reader_device_iterator bcriter(machine().root_device()); if (bcriter.first() != nullptr) { /* add slot info menu */ - item_append("Barcode Reader", nullptr, 0, (void *)BARCODE_READ); + item_append(_("Barcode Reader"), nullptr, 0, (void *)BARCODE_READ); } network_interface_iterator netiter(machine().root_device()); if (netiter.first() != nullptr) { /* add image info menu */ - item_append("Network Devices", nullptr, 0, (void*)NETWORK_DEVICES); + item_append(_("Network Devices"), nullptr, 0, (void*)NETWORK_DEVICES); } /* add keyboard mode menu */ if (machine().ioport().has_keyboard() && machine().ioport().natkeyboard().can_post()) - item_append("Keyboard Mode", nullptr, 0, (void *)KEYBOARD_MODE); + item_append(_("Keyboard Mode"), nullptr, 0, (void *)KEYBOARD_MODE); /* add sliders menu */ - item_append("Slider Controls", nullptr, 0, (void *)SLIDERS); + item_append(_("Slider Controls"), nullptr, 0, (void *)SLIDERS); /* add video options menu */ - item_append("Video Options", nullptr, 0, (machine().render().target_by_index(1) != nullptr) ? (void *)VIDEO_TARGETS : (void *)VIDEO_OPTIONS); + item_append(_("Video Options"), nullptr, 0, (machine().render().target_by_index(1) != nullptr) ? (void *)VIDEO_TARGETS : (void *)VIDEO_OPTIONS); /* add crosshair options menu */ if (machine().crosshair().get_usage()) - item_append("Crosshair Options", nullptr, 0, (void *)CROSSHAIR); + item_append(_("Crosshair Options"), nullptr, 0, (void *)CROSSHAIR); /* add cheat menu */ - if (machine().options().cheat() && machine().cheat().first() != nullptr) - item_append("Cheat", nullptr, 0, (void *)CHEAT); + if (machine().options().cheat()) + item_append(_("Cheat"), nullptr, 0, (void *)CHEAT); + + // add dats menu + if (machine().ui().options().enabled_dats() && machine().datfile().has_data(&machine().system())) + item_append(_("External DAT View"), nullptr, 0, (void *)EXTERNAL_DATS); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + /* add favorite menu */ + if (!machine().favorite().isgame_favorite()) + item_append(_("Add To Favorites"), nullptr, 0, (void *)ADD_FAVORITE); + else + item_append(_("Remove From Favorites"), nullptr, 0, (void *)REMOVE_FAVORITE); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + +// item_append(_("Quit from Machine"), nullptr, 0, (void *)QUIT_GAME); /* add reset and exit menus */ - strprintf(menu_text, "Select New %s", emulator_info::get_capstartgamenoun()); - item_append(menu_text.c_str(), nullptr, 0, (void *)SELECT_GAME); + item_append(_("Select New Machine"), nullptr, 0, (void *)SELECT_GAME); } ui_menu_main::~ui_menu_main() @@ -152,91 +166,114 @@ void ui_menu_main::handle() if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT) { switch((long long)(menu_event->itemref)) { case INPUT_GROUPS: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_input_groups>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_input_groups>(machine(), container)); break; case INPUT_SPECIFIC: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_input_specific>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_input_specific>(machine(), container)); break; case SETTINGS_DIP_SWITCHES: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_settings_dip_switches>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_settings_dip_switches>(machine(), container)); break; case SETTINGS_DRIVER_CONFIG: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_settings_driver_config>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_settings_driver_config>(machine(), container)); break; case ANALOG: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_analog>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_analog>(machine(), container)); break; case BOOKKEEPING: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_bookkeeping>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_bookkeeping>(machine(), container)); break; case GAME_INFO: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_game_info>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_game_info>(machine(), container)); break; case IMAGE_MENU_IMAGE_INFO: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_image_info>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_image_info>(machine(), container)); break; case IMAGE_MENU_FILE_MANAGER: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_file_manager>(machine(), container, nullptr))); + ui_menu::stack_push(global_alloc_clear<ui_menu_file_manager>(machine(), container, nullptr)); break; case TAPE_CONTROL: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_tape_control>(machine(), container, nullptr))); + ui_menu::stack_push(global_alloc_clear<ui_menu_tape_control>(machine(), container, nullptr)); break; - case PTY_INFO: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_pty_info>(machine(), container))); + case PTY_INFO: + ui_menu::stack_push(global_alloc_clear<ui_menu_pty_info>(machine(), container)); break; case SLOT_DEVICES: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_slot_devices>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_slot_devices>(machine(), container)); break; case NETWORK_DEVICES: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_network_devices>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_network_devices>(machine(), container)); break; case KEYBOARD_MODE: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_keyboard_mode>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_keyboard_mode>(machine(), container)); break; case SLIDERS: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_sliders>(machine(), container, false))); + ui_menu::stack_push(global_alloc_clear<ui_menu_sliders>(machine(), container, false)); break; case VIDEO_TARGETS: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_video_targets>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_video_targets>(machine(), container)); break; case VIDEO_OPTIONS: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_video_options>(machine(), container, machine().render().first_target()))); + ui_menu::stack_push(global_alloc_clear<ui_menu_video_options>(machine(), container, machine().render().first_target())); break; case CROSSHAIR: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_crosshair>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_crosshair>(machine(), container)); break; case CHEAT: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_cheat>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_cheat>(machine(), container)); break; case SELECT_GAME: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_select_game>(machine(), container, nullptr))); + if (strcmp(machine().options().ui(),"simple")==0) { + ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine(), container, nullptr)); + } else { + ui_menu::stack_push(global_alloc_clear<ui_menu_select_game>(machine(), container, nullptr)); + } break; case BIOS_SELECTION: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_bios_selection>(machine(), container))); + ui_menu::stack_push(global_alloc_clear<ui_menu_bios_selection>(machine(), container)); break; case BARCODE_READ: - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_barcode_reader>(machine(), container, nullptr))); + ui_menu::stack_push(global_alloc_clear<ui_menu_barcode_reader>(machine(), container, nullptr)); + break; + + case EXTERNAL_DATS: + ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container)); + break; + + case ADD_FAVORITE: + machine().favorite().add_favorite_game(); + reset(UI_MENU_RESET_REMEMBER_POSITION); + break; + + case REMOVE_FAVORITE: + machine().favorite().remove_favorite_game(); + reset(UI_MENU_RESET_REMEMBER_POSITION); + break; + + case QUIT_GAME: + ui_menu::stack_pop(machine()); + machine().ui().request_quit(); break; default: diff --git a/src/emu/ui/mainmenu.h b/src/emu/ui/mainmenu.h index 27a810341c3..0684e230ad8 100644 --- a/src/emu/ui/mainmenu.h +++ b/src/emu/ui/mainmenu.h @@ -45,8 +45,14 @@ private: SELECT_GAME, BIOS_SELECTION, BARCODE_READ, - PTY_INFO + PTY_INFO, + EXTERNAL_DATS, + ADD_FAVORITE, + REMOVE_FAVORITE, + QUIT_GAME }; + + //bool submenu; }; #endif /* __UI_MAINMENU_H__ */ diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp index 069b05aa913..547030298bb 100644 --- a/src/emu/ui/menu.cpp +++ b/src/emu/ui/menu.cpp @@ -2,9 +2,9 @@ // copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods /********************************************************************* - ui/menu.c + ui/menu.c - Internal MAME menus for the user interface. + Internal MAME menus for the user interface. *********************************************************************/ @@ -15,18 +15,60 @@ #include "ui/ui.h" #include "ui/menu.h" #include "ui/mainmenu.h" - +#include "ui/utils.h" +#include "ui/defimg.h" +#include "ui/starimg.h" +#include "ui/optsmenu.h" +#include "ui/datfile.h" +#include "rendfont.h" +#include "ui/custmenu.h" +#include "ui/icorender.h" +#include "ui/toolbar.h" /*************************************************************************** - CONSTANTS + CONSTANTS ***************************************************************************/ -#define UI_MENU_POOL_SIZE 65536 -#define UI_MENU_ALLOC_ITEMS 256 +#define UI_MENU_POOL_SIZE 65536 +#define MAX_ICONS_RENDER 40 + +struct ui_arts_info +{ + const char *title, *path, *addpath; +}; + +static const ui_arts_info arts_info[] = +{ + { "Snapshots", OPTION_SNAPSHOT_DIRECTORY, "snap" }, + { "Cabinets", OPTION_CABINETS_PATH, "cabinets;cabdevs" }, + { "Control Panels", OPTION_CPANELS_PATH, "cpanel" }, + { "PCBs", OPTION_PCBS_PATH, "pcb" }, + { "Flyers", OPTION_FLYERS_PATH, "flyers" }, + { "Titles", OPTION_TITLES_PATH, "titles" }, + { "Ends", OPTION_ENDS_PATH, "ends" }, + { "Artwork Preview", OPTION_ARTPREV_PATH, "artwork preview" }, + { "Bosses", OPTION_BOSSES_PATH, "bosses" }, + { "Logos", OPTION_LOGOS_PATH, "logo" }, + { "Versus", OPTION_VERSUS_PATH, "versus" }, + { "Game Over", OPTION_GAMEOVER_PATH, "gameover" }, + { "HowTo", OPTION_HOWTO_PATH, "howto" }, + { "Scores", OPTION_SCORES_PATH, "scores" }, + { "Select", OPTION_SELECT_PATH, "select" }, + { "Marquees", OPTION_MARQUEES_PATH, "marquees" }, + { nullptr } +}; + +static const char *hover_msg[] = { + "Add or remove favorites", + "Export displayed list to file", + "Show DATs view", + "Setup directories", + "Configure options" +}; /*************************************************************************** - GLOBAL VARIABLES + GLOBAL VARIABLES ***************************************************************************/ ui_menu *ui_menu::menu_stack; @@ -34,9 +76,24 @@ ui_menu *ui_menu::menu_free; std::unique_ptr<bitmap_rgb32> ui_menu::hilight_bitmap; render_texture *ui_menu::hilight_texture; render_texture *ui_menu::arrow_texture; +render_texture *ui_menu::snapx_texture; +render_texture *ui_menu::hilight_main_texture; +render_texture *ui_menu::bgrnd_texture; +render_texture *ui_menu::star_texture; +render_texture *ui_menu::toolbar_texture[UI_TOOLBAR_BUTTONS]; +render_texture *ui_menu::sw_toolbar_texture[UI_TOOLBAR_BUTTONS]; +render_texture *ui_menu::icons_texture[MAX_ICONS_RENDER]; +std::unique_ptr<bitmap_argb32> ui_menu::snapx_bitmap; +std::unique_ptr<bitmap_argb32> ui_menu::no_avail_bitmap; +std::unique_ptr<bitmap_argb32> ui_menu::star_bitmap; +std::unique_ptr<bitmap_argb32> ui_menu::bgrnd_bitmap; +bitmap_argb32 *ui_menu::icons_bitmap[MAX_ICONS_RENDER]; +std::unique_ptr<bitmap_rgb32> ui_menu::hilight_main_bitmap; +bitmap_argb32 *ui_menu::toolbar_bitmap[UI_TOOLBAR_BUTTONS]; +bitmap_argb32 *ui_menu::sw_toolbar_bitmap[UI_TOOLBAR_BUTTONS]; /*************************************************************************** - INLINE FUNCTIONS + INLINE FUNCTIONS ***************************************************************************/ //------------------------------------------------- @@ -69,7 +126,7 @@ inline bool ui_menu::exclusive_input_pressed(int key, int repeat) /*************************************************************************** - CORE SYSTEM MANAGEMENT + CORE SYSTEM MANAGEMENT ***************************************************************************/ //------------------------------------------------- @@ -78,14 +135,12 @@ inline bool ui_menu::exclusive_input_pressed(int key, int repeat) void ui_menu::init(running_machine &machine) { - int x; - // initialize the menu stack ui_menu::stack_reset(machine); // create a texture for hilighting items hilight_bitmap = std::make_unique<bitmap_rgb32>(256, 1); - for (x = 0; x < 256; x++) + for (int x = 0; x < 256; x++) { int alpha = 0xff; if (x < 25) alpha = 0xff * x / 25; @@ -98,6 +153,9 @@ void ui_menu::init(running_machine &machine) // create a texture for arrow icons arrow_texture = machine.render().texture_alloc(render_triangle); + // initialize ui + init_ui(machine); + // add an exit callback to free memory machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_menu::exit), &machine)); } @@ -114,14 +172,28 @@ void ui_menu::exit(running_machine &machine) ui_menu::clear_free_list(machine); // free textures - machine.render().texture_free(hilight_texture); - machine.render().texture_free(arrow_texture); + render_manager &mre = machine.render(); + mre.texture_free(hilight_texture); + mre.texture_free(arrow_texture); + mre.texture_free(snapx_texture); + mre.texture_free(hilight_main_texture); + mre.texture_free(bgrnd_texture); + mre.texture_free(star_texture); + + for (auto & elem : icons_texture) + mre.texture_free(elem); + + for (int i = 0; i < UI_TOOLBAR_BUTTONS; i++) + { + mre.texture_free(sw_toolbar_texture[i]); + mre.texture_free(toolbar_texture[i]); + } } /*************************************************************************** - CORE MENU MANAGEMENT + CORE MENU MANAGEMENT ***************************************************************************/ //------------------------------------------------- @@ -134,6 +206,8 @@ ui_menu::ui_menu(running_machine &machine, render_container *_container) : m_mac container = _container; reset(UI_MENU_RESET_SELECT_FIRST); + + top_line = 0; } @@ -148,12 +222,8 @@ ui_menu::~ui_menu() { ui_menu_pool *ppool = pool; pool = pool->next; - auto_free(machine(), ppool); + global_free(ppool); } - - // free the item array - if (item) - auto_free(machine(), item); } @@ -172,14 +242,14 @@ void ui_menu::reset(ui_menu_reset_options options) else if (options == UI_MENU_RESET_REMEMBER_REF) resetref = item[selected].ref; - // reset all the pools and the numitems back to 0 + // reset all the pools and the item.size() back to 0 for (ui_menu_pool *ppool = pool; ppool != nullptr; ppool = ppool->next) ppool->top = (UINT8 *)(ppool + 1); - numitems = 0; + item.clear(); visitems = 0; selected = 0; std::string backtext; - strprintf(backtext, "Return to %s", emulator_info::get_capstartgamenoun()); + strprintf(backtext, "Return to Machine"); // add an item to return if (parent == nullptr) @@ -214,66 +284,42 @@ void ui_menu::set_special_main_menu(bool special) //------------------------------------------------- -// populated - returns true if the menu -// has any non-default items in it -//------------------------------------------------- - -bool ui_menu::populated() -{ - return numitems > 1; -} - - -//------------------------------------------------- // item_append - append a new item to the // end of the menu //------------------------------------------------- void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, void *ref) { - ui_menu_item *pitem; - int index; - // only allow multiline as the first item if ((flags & MENU_FLAG_MULTILINE) != 0) - assert(numitems == 1); + assert(item.size() == 1); // only allow a single multi-line item - else if (numitems >= 2) + else if (item.size() >= 2) assert((item[0].flags & MENU_FLAG_MULTILINE) == 0); - // realloc the item array if necessary - if (numitems >= allocitems) - { - int olditems = allocitems; - allocitems += UI_MENU_ALLOC_ITEMS; - ui_menu_item *newitems = auto_alloc_array(machine(), ui_menu_item, allocitems); - for (int itemnum = 0; itemnum < olditems; itemnum++) - newitems[itemnum] = item[itemnum]; - auto_free(machine(), item); - item = newitems; - } - index = numitems++; - - // copy the previous last item to the next one - if (index != 0) + // allocate a new item and populate it + ui_menu_item pitem; + pitem.text = (text != nullptr) ? pool_strdup(text) : nullptr; + pitem.subtext = (subtext != nullptr) ? pool_strdup(subtext) : nullptr; + pitem.flags = flags; + pitem.ref = ref; + + // append to array + int index = item.size(); + if (!item.empty()) { - index--; - item[index + 1] = item[index]; + item.insert(item.end() - 1, pitem); + --index; } - - // allocate a new item and populate it - pitem = &item[index]; - pitem->text = (text != nullptr) ? pool_strdup(text) : nullptr; - pitem->subtext = (subtext != nullptr) ? pool_strdup(subtext) : nullptr; - pitem->flags = flags; - pitem->ref = ref; + else + item.push_back(pitem); // update the selection if we need to if (resetpos == index || (resetref != nullptr && resetref == ref)) selected = index; - if (resetpos == numitems - 1) - selected = numitems - 1; + if (resetpos == item.size() - 1) + selected = item.size() - 1; } @@ -288,27 +334,42 @@ const ui_menu_event *ui_menu::process(UINT32 flags) menu_event.iptkey = IPT_INVALID; // first make sure our selection is valid - validate_selection(1); +// if (!(flags & UI_MENU_PROCESS_NOINPUT)) + validate_selection(1); // draw the menu - if (numitems > 1 && (item[0].flags & MENU_FLAG_MULTILINE) != 0) + if (item.size() > 1 && (item[0].flags & MENU_FLAG_MULTILINE) != 0) draw_text_box(); + else if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0) + draw_select_game(flags & UI_MENU_PROCESS_NOINPUT); + else if ((item[0].flags & MENU_FLAG_UI_PALETTE ) != 0) + draw_palette_menu(); + else if ((item[0].flags & MENU_FLAG_UI_DATS) != 0) + draw_dats_menu(); else - draw(flags & UI_MENU_PROCESS_CUSTOM_ONLY); + draw(flags & UI_MENU_PROCESS_CUSTOM_ONLY, flags & UI_MENU_PROCESS_NOIMAGE, flags & UI_MENU_PROCESS_NOINPUT); // process input - if (!(flags & UI_MENU_PROCESS_NOKEYS)) + if (!(flags & UI_MENU_PROCESS_NOKEYS) && !(flags & UI_MENU_PROCESS_NOINPUT)) { // read events - handle_events(); + if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0) + handle_main_events(flags); + else + handle_events(flags); // handle the keys if we don't already have an menu_event if (menu_event.iptkey == IPT_INVALID) - handle_keys(flags); + { + if ((item[0].flags & MENU_FLAG_UI ) != 0 || (item[0].flags & MENU_FLAG_UI_SWLIST ) != 0) + handle_main_keys(flags); + else + handle_keys(flags); + } } // update the selected item in the menu_event - if (menu_event.iptkey != IPT_INVALID && selected >= 0 && selected < numitems) + if (menu_event.iptkey != IPT_INVALID && selected >= 0 && selected < item.size()) { menu_event.itemref = item[selected].ref; return &menu_event; @@ -338,7 +399,7 @@ void *ui_menu::m_pool_alloc(size_t size) } // allocate a new pool - ppool = (ui_menu_pool *)auto_alloc_array_clear(machine(), UINT8, sizeof(*ppool) + UI_MENU_POOL_SIZE); + ppool = (ui_menu_pool *)global_alloc_array_clear<UINT8>(sizeof(*ppool) + UI_MENU_POOL_SIZE); // wire it up ppool->next = pool; @@ -367,7 +428,7 @@ const char *ui_menu::pool_strdup(const char *string) void *ui_menu::get_selection() { - return (selected >= 0 && selected < numitems) ? item[selected].ref : nullptr; + return (selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr; } @@ -378,10 +439,8 @@ void *ui_menu::get_selection() void ui_menu::set_selection(void *selected_itemref) { - int itemnum; - selected = -1; - for (itemnum = 0; itemnum < numitems; itemnum++) + for (int itemnum = 0; itemnum < item.size(); itemnum++) if (item[itemnum].ref == selected_itemref) { selected = itemnum; @@ -392,38 +451,39 @@ void ui_menu::set_selection(void *selected_itemref) /*************************************************************************** - INTERNAL MENU PROCESSING + INTERNAL MENU PROCESSING ***************************************************************************/ //------------------------------------------------- // draw - draw a menu //------------------------------------------------- -void ui_menu::draw(bool customonly) +void ui_menu::draw(bool customonly, bool noimage, bool noinput) { + // first draw the FPS counter + if (machine().ui().show_fps_counter()) + { + machine().ui().draw_text_full(container, machine().video().speed_text().c_str(), 0.0f, 0.0f, 1.0f, + JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr); + } + float line_height = machine().ui().get_line_height(); float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); float ud_arrow_width = line_height * machine().render().ui_aspect(); float gutter_width = lr_arrow_width * 1.3f; - float x1, y1, x2, y2; - - float effective_width, effective_left; - float visible_width, visible_main_menu_height; - float visible_extra_menu_height; - float visible_top, visible_left; - int selected_subitem_too_big = FALSE; - int visible_lines; - int top_line; + + bool selected_subitem_too_big = false; int itemnum, linenum; bool mouse_hit, mouse_button; - render_target *mouse_target; - INT32 mouse_target_x, mouse_target_y; float mouse_x = -1, mouse_y = -1; + if (machine().ui().options().use_background_image() && &machine().system() == &GAME_NAME(___empty) && bgrnd_bitmap->valid() && !noimage) + container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + // compute the width and height of the full menu - visible_width = 0; - visible_main_menu_height = 0; - for (itemnum = 0; itemnum < numitems; itemnum++) + float visible_width = 0; + float visible_main_menu_height = 0; + for (itemnum = 0; itemnum < item.size(); itemnum++) { const ui_menu_item &pitem = item[itemnum]; float total_width; @@ -444,7 +504,7 @@ void ui_menu::draw(bool customonly) } // account for extra space at the top and bottom - visible_extra_menu_height = customtop + custombottom; + float visible_extra_menu_height = customtop + custombottom; // add a little bit of slop for rounding visible_width += 0.01f; @@ -462,44 +522,46 @@ void ui_menu::draw(bool customonly) visible_main_menu_height = (float)visible_lines * line_height; // compute top/left of inner menu area by centering - visible_left = (1.0f - visible_width) * 0.5f; - visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f; + float visible_left = (1.0f - visible_width) * 0.5f; + float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f; // if the menu is at the bottom of the extra, adjust visible_top += customtop; // first add us a box - x1 = visible_left - UI_BOX_LR_BORDER; - y1 = visible_top - UI_BOX_TB_BORDER; - x2 = visible_left + visible_width + UI_BOX_LR_BORDER; - y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER; + float x1 = visible_left - UI_BOX_LR_BORDER; + float y1 = visible_top - UI_BOX_TB_BORDER; + float x2 = visible_left + visible_width + UI_BOX_LR_BORDER; + float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER; if (!customonly) machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); // determine the first visible line based on the current selection - top_line = selected - visible_lines / 2; - if (top_line < 0) + if (top_line < 0 || selected == 0) top_line = 0; - if (top_line + visible_lines >= numitems) - top_line = numitems - visible_lines; + if (top_line + visible_lines >= item.size()) + top_line = item.size() - visible_lines; // determine effective positions taking into account the hilighting arrows - effective_width = visible_width - 2.0f * gutter_width; - effective_left = visible_left + gutter_width; + float effective_width = visible_width - 2.0f * gutter_width; + float effective_left = visible_left + gutter_width; // locate mouse mouse_hit = false; mouse_button = false; - if (!customonly) + if (!customonly && !noinput) { - mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button); + INT32 mouse_target_x, mouse_target_y; + render_target *mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button); if (mouse_target != nullptr) if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) mouse_hit = true; } // loop over visible lines - hover = numitems + 1; + hover = item.size() + 1; + float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; + float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; if (!customonly) for (linenum = 0; linenum < visible_lines; linenum++) { @@ -511,9 +573,7 @@ void ui_menu::draw(bool customonly) rgb_t bgcolor = UI_TEXT_BG_COLOR; rgb_t fgcolor2 = UI_SUBITEM_COLOR; rgb_t fgcolor3 = UI_CLONE_COLOR; - float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; float line_y0 = line_y; - float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; float line_y1 = line_y + line_height; // set the hover if this is our item @@ -530,7 +590,7 @@ void ui_menu::draw(bool customonly) } // else if the mouse is over this item, draw with a different background - else if (itemnum == hover) + else if (itemnum == hover && ((linenum == 0 && top_line != 0) || (linenum == visible_lines - 1 && itemnum != item.size() - 1))) { fgcolor = UI_MOUSEOVER_COLOR; bgcolor = UI_MOUSEOVER_BG_COLOR; @@ -545,8 +605,7 @@ void ui_menu::draw(bool customonly) // if we're on the top line, display the up arrow if (linenum == 0 && top_line != 0) { - draw_arrow( - container, + draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height, 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, @@ -554,14 +613,13 @@ void ui_menu::draw(bool customonly) fgcolor, ROT0); if (hover == itemnum) - hover = -2; + hover = HOVER_ARROW_UP; } // if we're on the bottom line, display the down arrow - else if (linenum == visible_lines - 1 && itemnum != numitems - 1) + else if (linenum == visible_lines - 1 && itemnum != item.size() - 1) { - draw_arrow( - container, + draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height, 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, @@ -569,7 +627,7 @@ void ui_menu::draw(bool customonly) fgcolor, ROT0 ^ ORIENTATION_FLIP_Y); if (hover == itemnum) - hover = -1; + hover = HOVER_ARROW_DOWN; } // if we're just a divider, draw a line @@ -579,7 +637,7 @@ void ui_menu::draw(bool customonly) // if we don't have a subitem, just draw the string centered else if (pitem.subtext == nullptr) machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width, - JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); // otherwise, draw the item on the left and the subitem text on the right else @@ -600,9 +658,19 @@ void ui_menu::draw(bool customonly) { subitem_text = "..."; if (itemnum == selected) - selected_subitem_too_big = TRUE; + selected_subitem_too_big = true; } + // customize subitem text color + if (!core_stricmp(subitem_text, "On")) + fgcolor2 = rgb_t(0xff,0x00,0xff,0x00); + + if (!core_stricmp(subitem_text, "Off")) + fgcolor2 = rgb_t(0xff,0xff,0x00,0x00); + + if (!core_stricmp(subitem_text, "Auto")) + fgcolor2 = rgb_t(0xff,0xff,0xff,0x00); + // draw the subitem right-justified machine().ui().draw_text_full(container, subitem_text, effective_left + item_width, line_y, effective_width - item_width, JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, subitem_invert ? fgcolor3 : fgcolor2, bgcolor, &subitem_width, nullptr); @@ -610,8 +678,7 @@ void ui_menu::draw(bool customonly) // apply arrows if (itemnum == selected && (pitem.flags & MENU_FLAG_LEFT_ARROW)) { - draw_arrow( - container, + draw_arrow(container, effective_left + effective_width - subitem_width - gutter_width, line_y + 0.1f * line_height, effective_left + effective_width - subitem_width - gutter_width + lr_arrow_width, @@ -621,8 +688,7 @@ void ui_menu::draw(bool customonly) } if (itemnum == selected && (pitem.flags & MENU_FLAG_RIGHT_ARROW)) { - draw_arrow( - container, + draw_arrow(container, effective_left + effective_width + gutter_width - lr_arrow_width, line_y + 0.1f * line_height, effective_left + effective_width + gutter_width, @@ -645,7 +711,7 @@ void ui_menu::draw(bool customonly) // compute the multi-line target width/height machine().ui().draw_text_full(container, pitem.subtext, 0, 0, visible_width * 0.75f, - JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); + JUSTIFY_RIGHT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); // determine the target location target_x = visible_left + visible_width - target_width - UI_BOX_LR_BORDER; @@ -657,16 +723,19 @@ void ui_menu::draw(bool customonly) machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER, target_y - UI_BOX_TB_BORDER, target_x + target_width + UI_BOX_LR_BORDER, - target_y + target_height + UI_BOX_TB_BORDER, subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR); + target_y + target_height + UI_BOX_TB_BORDER, + subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR); machine().ui().draw_text_full(container, pitem.subtext, target_x, target_y, target_width, JUSTIFY_RIGHT, WRAP_WORD, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr); } // if there is something special to add, do it by calling the virtual method - custom_render((selected >= 0 && selected < numitems) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2); + custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2); // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow - visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != numitems); + visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size()); +// if (history_flag && (top_line + visible_lines >= item.size())) +// selected = item.size() - 1; } void ui_menu::custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) @@ -691,7 +760,7 @@ void ui_menu::draw_text_box() // compute the multi-line target width/height machine().ui().draw_text_full(container, text, 0, 0, 1.0f - 2.0f * UI_BOX_LR_BORDER - 2.0f * gutter_width, - JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); + JUSTIFY_LEFT, WRAP_WORD, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &target_width, &target_height); target_height += 2.0f * line_height; if (target_height > 1.0f - 2.0f * UI_BOX_TB_BORDER) target_height = floorf((1.0f - 2.0f * UI_BOX_TB_BORDER) / line_height) * line_height; @@ -716,25 +785,25 @@ void ui_menu::draw_text_box() // add a box around that machine().ui().draw_outlined_box(container, target_x - UI_BOX_LR_BORDER - gutter_width, - target_y - UI_BOX_TB_BORDER, - target_x + target_width + gutter_width + UI_BOX_LR_BORDER, - target_y + target_height + UI_BOX_TB_BORDER, (item[0].flags & MENU_FLAG_REDTEXT) ? UI_RED_COLOR : UI_BACKGROUND_COLOR); + target_y - UI_BOX_TB_BORDER, + target_x + target_width + gutter_width + UI_BOX_LR_BORDER, + target_y + target_height + UI_BOX_TB_BORDER, + (item[0].flags & MENU_FLAG_REDTEXT) ? UI_RED_COLOR : UI_BACKGROUND_COLOR); machine().ui().draw_text_full(container, text, target_x, target_y, target_width, JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); // draw the "return to prior menu" text with a hilight behind it - highlight( - container, - target_x + 0.5f * UI_LINE_WIDTH, - target_y + target_height - line_height, - target_x + target_width - 0.5f * UI_LINE_WIDTH, - target_y + target_height, - UI_SELECTED_BG_COLOR); + highlight(container, + target_x + 0.5f * UI_LINE_WIDTH, + target_y + target_height - line_height, + target_x + target_width - 0.5f * UI_LINE_WIDTH, + target_y + target_height, + UI_SELECTED_BG_COLOR); machine().ui().draw_text_full(container, backtext, target_x, target_y + target_height - line_height, target_width, JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr); // artificially set the hover to the last item so a double-click exits - hover = numitems - 1; + hover = item.size() - 1; } @@ -743,9 +812,9 @@ void ui_menu::draw_text_box() // input events for a menu //------------------------------------------------- -void ui_menu::handle_events() +void ui_menu::handle_events(UINT32 flags) { - int stop = FALSE; + bool stop = false; ui_event local_menu_event; // loop while we have interesting events @@ -755,35 +824,82 @@ void ui_menu::handle_events() { // if we are hovering over a valid item, select it with a single click case UI_EVENT_MOUSE_DOWN: - if (hover >= 0 && hover < numitems) - selected = hover; - else if (hover == -2) - { - selected -= visitems - 1; - validate_selection(1); - } - else if (hover == -1) + if ((flags & UI_MENU_PROCESS_ONLYCHAR) == 0) { - selected += visitems - 1; - validate_selection(1); + if (hover >= 0 && hover < item.size()) + selected = hover; + else if (hover == HOVER_ARROW_UP) + { + if ((flags & MENU_FLAG_UI_DATS) != 0) + { + top_line -= visitems - (top_line + visible_lines == item.size() - 1); + return; + } + selected -= visitems; + if (selected < 0) + selected = 0; + top_line -= visitems - (top_line + visible_lines == item.size() - 1); + } + else if (hover == HOVER_ARROW_DOWN) + { + if ((flags & MENU_FLAG_UI_DATS) != 0) + { + top_line += visible_lines - 2; + return; + } + selected += visible_lines - 2 + (selected == 0); + if (selected > item.size() - 1) + selected = item.size() - 1; + top_line += visible_lines - 2; + } } break; // if we are hovering over a valid item, fake a UI_SELECT with a double-click case UI_EVENT_MOUSE_DOUBLE_CLICK: - if (hover >= 0 && hover < numitems) + if ((flags & UI_MENU_PROCESS_ONLYCHAR) == 0 && hover >= 0 && hover < item.size()) { selected = hover; - if (local_menu_event.event_type == UI_EVENT_MOUSE_DOUBLE_CLICK) + menu_event.iptkey = IPT_UI_SELECT; + if (selected == item.size() - 1) { - menu_event.iptkey = IPT_UI_SELECT; - if (selected == numitems - 1) + menu_event.iptkey = IPT_UI_CANCEL; + ui_menu::stack_pop(machine()); + } + stop = true; + } + break; + + // caught scroll event + case UI_EVENT_MOUSE_WHEEL: + if ((flags & UI_MENU_PROCESS_ONLYCHAR) == 0) + { + if (local_menu_event.zdelta > 0) + { + if ((flags & MENU_FLAG_UI_DATS) != 0) { - menu_event.iptkey = IPT_UI_CANCEL; - ui_menu::stack_pop(machine()); + top_line -= local_menu_event.num_lines; + return; } + selected -= local_menu_event.num_lines; + validate_selection(-1); + if (selected < top_line + (top_line != 0)) + top_line -= local_menu_event.num_lines; + } + else + { + if ((flags & MENU_FLAG_UI_DATS) != 0) + { + top_line += local_menu_event.num_lines; + return; + } + selected += local_menu_event.num_lines; + validate_selection(1); + if (selected > item.size() - 1) + selected = item.size() - 1; + if (selected >= top_line + visitems + (top_line != 0)) + top_line += local_menu_event.num_lines; } - stop = TRUE; } break; @@ -791,7 +907,7 @@ void ui_menu::handle_events() case UI_EVENT_CHAR: menu_event.iptkey = IPT_SPECIAL; menu_event.unichar = local_menu_event.ch; - stop = TRUE; + stop = true; break; // ignore everything else @@ -809,19 +925,17 @@ void ui_menu::handle_events() void ui_menu::handle_keys(UINT32 flags) { - int ignorepause = ui_menu::stack_has_special_main_menu(); - int ignoreright; - int ignoreleft; + bool ignorepause = ui_menu::stack_has_special_main_menu(); int code; // bail if no items - if (numitems == 0) + if (item.empty()) return; // if we hit select, return TRUE or pop the stack, depending on the item if (exclusive_input_pressed(IPT_UI_SELECT, 0)) { - if (selected == numitems - 1) + if (selected == item.size() - 1) { menu_event.iptkey = IPT_UI_CANCEL; ui_menu::stack_pop(machine()); @@ -829,10 +943,15 @@ void ui_menu::handle_keys(UINT32 flags) return; } + // bail out + if ((flags & UI_MENU_PROCESS_ONLYCHAR) != 0) + return; + // hitting cancel also pops the stack if (exclusive_input_pressed(IPT_UI_CANCEL, 0)) { - ui_menu::stack_pop(machine()); + if (!menu_has_search_active()) + ui_menu::stack_pop(machine()); return; } @@ -840,8 +959,11 @@ void ui_menu::handle_keys(UINT32 flags) validate_selection(1); // swallow left/right keys if they are not appropriate - ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0); - ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0); + bool ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0); + bool ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0); + + if ((item[0].flags & MENU_FLAG_UI_DATS) != 0) + ignoreleft = ignoreright = false; // accept left/right keys as-is with repeat if (!ignoreleft && exclusive_input_pressed(IPT_UI_LEFT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0)) @@ -852,42 +974,60 @@ void ui_menu::handle_keys(UINT32 flags) // up backs up by one item if (exclusive_input_pressed(IPT_UI_UP, 6)) { - selected = (selected + numitems - 1) % numitems; + if ((item[0].flags & MENU_FLAG_UI_DATS) != 0) + { + top_line--; + return; + } + (selected == 0) ? selected = top_line = item.size() - 1 : --selected; validate_selection(-1); + top_line -= (selected == top_line && top_line != 0); } // down advances by one item if (exclusive_input_pressed(IPT_UI_DOWN, 6)) { - selected = (selected + 1) % numitems; - validate_selection(1); + if ((item[0].flags & MENU_FLAG_UI_DATS) != 0) + { + top_line++; + return; + } + (selected == item.size() - 1) ? selected = top_line = 0 : ++selected; + top_line += (selected == top_line + visitems + (top_line != 0)); } // page up backs up by visitems if (exclusive_input_pressed(IPT_UI_PAGE_UP, 6)) { - selected -= visitems - 1; + selected -= visitems; + top_line -= visitems - (top_line + visible_lines == item.size() - 1); + if (selected < 0) + selected = 0; validate_selection(1); } // page down advances by visitems if (exclusive_input_pressed(IPT_UI_PAGE_DOWN, 6)) { - selected += visitems - 1; + selected += visible_lines - 2 + (selected == 0); + top_line += visible_lines - 2; + + if (selected > item.size() - 1) + selected = item.size() - 1; validate_selection(-1); } // home goes to the start if (exclusive_input_pressed(IPT_UI_HOME, 0)) { - selected = 0; + selected = top_line = 0; validate_selection(1); } // end goes to the last if (exclusive_input_pressed(IPT_UI_END, 0)) { - selected = numitems - 1; + selected = top_line = item.size() - 1; validate_selection(-1); } @@ -927,12 +1067,12 @@ void ui_menu::validate_selection(int scandir) // clamp to be in range if (selected < 0) selected = 0; - else if (selected >= numitems) - selected = numitems - 1; + else if (selected >= item.size()) + selected = item.size() - 1; // skip past unselectable items while (!item[selected].is_selectable()) - selected = (selected + numitems + scandir) % numitems; + selected = (selected + item.size() + scandir) % item.size(); } @@ -948,14 +1088,14 @@ void ui_menu::clear_free_list(running_machine &machine) { ui_menu *menu = menu_free; menu_free = menu->parent; - auto_free(machine, menu); + global_free(menu); } } /*************************************************************************** - MENU STACK MANAGEMENT + MENU STACK MANAGEMENT ***************************************************************************/ //------------------------------------------------- @@ -1018,14 +1158,14 @@ bool ui_menu::stack_has_special_main_menu() void ui_menu::do_handle() { - if(!populated()) + if(item.size() < 2) populate(); handle(); } /*************************************************************************** - UI SYSTEM INTERACTION + UI SYSTEM INTERACTION ***************************************************************************/ //------------------------------------------------- @@ -1037,7 +1177,7 @@ UINT32 ui_menu::ui_handler(running_machine &machine, render_container *container { // if we have no menus stacked up, start with the main menu if (menu_stack == nullptr) - stack_push(auto_alloc_clear(machine, <ui_menu_main>(machine, container))); + stack_push(global_alloc_clear<ui_menu_main>(machine, container)); // update the menu state if (menu_stack != nullptr) @@ -1054,7 +1194,7 @@ UINT32 ui_menu::ui_handler(running_machine &machine, render_container *container } /*************************************************************************** - MENU HELPERS + MENU HELPERS ***************************************************************************/ //------------------------------------------------- @@ -1118,8 +1258,7 @@ void ui_menu::render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const void ui_menu::highlight(render_container *container, float x0, float y0, float x1, float y1, rgb_t bgcolor) { - container->add_quad(x0, y0, x1, y1, bgcolor, hilight_texture, - PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + container->add_quad(x0, y0, x1, y1, bgcolor, hilight_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE) | PRIMFLAG_PACKABLE); } @@ -1129,12 +1268,1502 @@ void ui_menu::highlight(render_container *container, float x0, float y0, float x void ui_menu::draw_arrow(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, UINT32 orientation) { - container->add_quad( - x0, - y0, - x1, - y1, - fgcolor, - arrow_texture, - PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(orientation)); + container->add_quad(x0, y0, x1, y1, fgcolor, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(orientation) | PRIMFLAG_PACKABLE); +} + +//------------------------------------------------- +// init - initialize the ui menu system +//------------------------------------------------- + +void ui_menu::init_ui(running_machine &machine) +{ + render_manager &mrender = machine.render(); + // create a texture for hilighting items in main menu + hilight_main_bitmap = std::make_unique<bitmap_rgb32>(1, 26); + int r1 = 0, g1 = 169, b1 = 255; //Any start color + int r2 = 0, g2 = 39, b2 = 130; //Any stop color + for (int y = 0; y < 26; y++) + { + int r = r1 + (y * (r2 - r1) / 26); + int g = g1 + (y * (g2 - g1) / 26); + int b = b1 + (y * (b2 - b1) / 26); + hilight_main_bitmap->pix32(y, 0) = rgb_t(0xff, r, g, b); + } + + hilight_main_texture = mrender.texture_alloc(); + hilight_main_texture->set_bitmap(*hilight_main_bitmap, hilight_main_bitmap->cliprect(), TEXFORMAT_ARGB32); + + // create a texture for snapshot + snapx_bitmap = std::make_unique<bitmap_argb32>(0, 0); + snapx_texture = mrender.texture_alloc(render_texture::hq_scale); + + // allocates and sets the default "no available" image + no_avail_bitmap = std::make_unique<bitmap_argb32>(256, 256); + UINT32 *dst = &no_avail_bitmap->pix32(0); + memcpy(dst, no_avail_bmp, 256 * 256 * sizeof(UINT32)); + + // allocates and sets the favorites star image + star_bitmap = std::make_unique<bitmap_argb32>(32, 32); + dst = &star_bitmap->pix32(0); + memcpy(dst, favorite_star_bmp, 32 * 32 * sizeof(UINT32)); + star_texture = mrender.texture_alloc(); + star_texture->set_bitmap(*star_bitmap, star_bitmap->cliprect(), TEXFORMAT_ARGB32); + + // allocate icons + for (int i = 0; i < MAX_ICONS_RENDER; i++) + { + icons_bitmap[i] = auto_alloc(machine, bitmap_argb32); + icons_texture[i] = mrender.texture_alloc(); + } + + // create a texture for main menu background + bgrnd_bitmap = std::make_unique<bitmap_argb32>(0, 0); + bgrnd_texture = mrender.texture_alloc(render_texture::hq_scale); + + ui_options &mopt = machine.ui().options(); + if (mopt.use_background_image() && &machine.system() == &GAME_NAME(___empty)) + { + emu_file backgroundfile(".", OPEN_FLAG_READ); + render_load_jpeg(*bgrnd_bitmap, backgroundfile, nullptr, "background.jpg"); + + if (!bgrnd_bitmap->valid()) + render_load_png(*bgrnd_bitmap, backgroundfile, nullptr, "background.png"); + + if (bgrnd_bitmap->valid()) + bgrnd_texture->set_bitmap(*bgrnd_bitmap, bgrnd_bitmap->cliprect(), TEXFORMAT_ARGB32); + else + bgrnd_bitmap->reset(); + } + else + bgrnd_bitmap->reset(); + + // create a texture for toolbar + for (int x = 0; x < UI_TOOLBAR_BUTTONS; ++x) + { + toolbar_bitmap[x] = auto_alloc(machine, bitmap_argb32(32, 32)); + sw_toolbar_bitmap[x] = auto_alloc(machine, bitmap_argb32(32, 32)); + toolbar_texture[x] = mrender.texture_alloc(); + sw_toolbar_texture[x] = mrender.texture_alloc(); + UINT32 *dst = &toolbar_bitmap[x]->pix32(0); + memcpy(dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32)); + if (toolbar_bitmap[x]->valid()) + toolbar_texture[x]->set_bitmap(*toolbar_bitmap[x], toolbar_bitmap[x]->cliprect(), TEXFORMAT_ARGB32); + else + toolbar_bitmap[x]->reset(); + + if (x == 0 || x == 2) + { + dst = &sw_toolbar_bitmap[x]->pix32(0); + memcpy(dst, toolbar_bitmap_bmp[x], 32 * 32 * sizeof(UINT32)); + if (sw_toolbar_bitmap[x]->valid()) + sw_toolbar_texture[x]->set_bitmap(*sw_toolbar_bitmap[x], sw_toolbar_bitmap[x]->cliprect(), TEXFORMAT_ARGB32); + else + sw_toolbar_bitmap[x]->reset(); + } + else + sw_toolbar_bitmap[x]->reset(); + + } +} + + +//------------------------------------------------- +// draw main menu +//------------------------------------------------- + +void ui_menu::draw_select_game(bool noinput) +{ + float line_height = machine().ui().get_line_height(); + float ud_arrow_width = line_height * machine().render().ui_aspect(); + float gutter_width = 0.52f * line_height * machine().render().ui_aspect(); + mouse_x = -1, mouse_y = -1; + float right_panel_size = (ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_RIGHT_PANEL) ? 2.0f * UI_BOX_LR_BORDER : 0.3f; + float visible_width = 1.0f - 4.0f * UI_BOX_LR_BORDER; + float primary_left = (1.0f - visible_width) * 0.5f; + float primary_width = visible_width; + bool is_swlist = ((item[0].flags & MENU_FLAG_UI_SWLIST) != 0); + bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0); + ui_manager &mui = machine().ui(); + + // draw background image if available + if (machine().ui().options().use_background_image() && bgrnd_bitmap->valid()) + container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + + hover = item.size() + 1; + visible_items = (is_swlist) ? item.size() - 2 : item.size() - 2 - skip_main_items; + float extra_height = (is_swlist) ? 2.0f * line_height : (2.0f + skip_main_items) * line_height; + float visible_extra_menu_height = customtop + custombottom + extra_height; + + // locate mouse + mouse_hit = false; + mouse_button = false; + if (!noinput) + { + mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button); + if (mouse_target != nullptr) + if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) + mouse_hit = true; + } + + // account for extra space at the top and bottom + float visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height; + visible_lines = floor(visible_main_menu_height / line_height); + visible_main_menu_height = (float)(visible_lines * line_height); + + if (!is_swlist) + ui_globals::visible_main_lines = visible_lines; + else + ui_globals::visible_sw_lines = visible_lines; + + // compute top/left of inner menu area by centering + float visible_left = primary_left; + float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f; + + // if the menu is at the bottom of the extra, adjust + visible_top += customtop; + + // compute left box size + float x1 = visible_left - UI_BOX_LR_BORDER; + float y1 = visible_top - UI_BOX_TB_BORDER; + float x2 = x1 + 2.0f * UI_BOX_LR_BORDER; + float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER + extra_height; + + // add left box + visible_left = draw_left_panel(x1, y1, x2, y2); + visible_width -= right_panel_size + visible_left - 2.0f * UI_BOX_LR_BORDER; + + // compute and add main box + x1 = visible_left - UI_BOX_LR_BORDER; + x2 = visible_left + visible_width + UI_BOX_LR_BORDER; + float line = visible_top + (float)(visible_lines * line_height); + + //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + if (visible_items < visible_lines) + visible_lines = visible_items; + if (top_line < 0 || selected == 0) + top_line = 0; + if (selected < visible_items && top_line + visible_lines >= visible_items) + top_line = visible_items - visible_lines; + + // determine effective positions taking into account the hilighting arrows + float effective_width = visible_width - 2.0f * gutter_width; + float effective_left = visible_left + gutter_width; + + int n_loop = (visible_items >= visible_lines) ? visible_lines : visible_items; + + for (int linenum = 0; linenum < n_loop; linenum++) + { + float line_y = visible_top + (float)linenum * line_height; + int itemnum = top_line + linenum; + const ui_menu_item &pitem = item[itemnum]; + const char *itemtext = pitem.text; + rgb_t fgcolor = UI_TEXT_COLOR; + rgb_t bgcolor = UI_TEXT_BG_COLOR; + rgb_t fgcolor3 = UI_CLONE_COLOR; + float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; + float line_y0 = line_y; + float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; + float line_y1 = line_y + line_height; + + // set the hover if this is our item + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable()) + hover = itemnum; + + // if we're selected, draw with a different background + if (itemnum == selected) + { + fgcolor = rgb_t(0xff, 0xff, 0xff, 0x00); + bgcolor = rgb_t(0xff, 0xff, 0xff, 0xff); + fgcolor3 = rgb_t(0xff, 0xcc, 0xcc, 0x00); + } + // else if the mouse is over this item, draw with a different background + else if (itemnum == hover) + { + fgcolor = fgcolor3 = UI_MOUSEOVER_COLOR; + bgcolor = UI_MOUSEOVER_BG_COLOR; + } + + // if we have some background hilighting to do, add a quad behind everything else + if (bgcolor != UI_TEXT_BG_COLOR) + mui.draw_textured_box(container, line_x0 + 0.01f, line_y0, line_x1 - 0.01f, line_y1, bgcolor, rgb_t(255, 43, 43, 43), + hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + + // if we're on the top line, display the up arrow + if (linenum == 0 && top_line != 0) + { + draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height, + 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0); + + if (hover == itemnum) + hover = HOVER_ARROW_UP; + } + // if we're on the bottom line, display the down arrow + else if (linenum == visible_lines - 1 && itemnum != visible_items - 1) + { + draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height, + 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0 ^ ORIENTATION_FLIP_Y); + + if (hover == itemnum) + hover = HOVER_ARROW_DOWN; + } + // if we're just a divider, draw a line + else if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0) + container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, + UI_LINE_WIDTH, UI_TEXT_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + // draw the item centered + else if (pitem.subtext == nullptr) + { + int item_invert = pitem.flags & MENU_FLAG_INVERT; + float space = 0.0f; + + if (ui_globals::has_icons && !is_swlist) + { + if (is_favorites) + { + ui_software_info *soft = (ui_software_info *)item[itemnum].ref; + if (soft->startempty == 1) + draw_icon(linenum, (void *)soft->driver, effective_left, line_y); + } + else + draw_icon(linenum, item[itemnum].ref, effective_left, line_y); + + space = mui.get_line_height() * container->manager().ui_aspect() * 1.5f; + } + mui.draw_text_full(container, itemtext, effective_left + space, line_y, effective_width - space, JUSTIFY_LEFT, WRAP_TRUNCATE, + DRAW_NORMAL, item_invert ? fgcolor3 : fgcolor, bgcolor, nullptr, nullptr); + } + else + { + int item_invert = pitem.flags & MENU_FLAG_INVERT; + const char *subitem_text = pitem.subtext; + float item_width, subitem_width; + + // compute right space for subitem + mui.draw_text_full(container, subitem_text, effective_left, line_y, machine().ui().get_string_width(pitem.subtext), + JUSTIFY_RIGHT, WRAP_NEVER, DRAW_NONE, item_invert ? fgcolor3 : fgcolor, bgcolor, &subitem_width, nullptr); + subitem_width += gutter_width; + + // draw the item left-justified + mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width - subitem_width, + JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, item_invert ? fgcolor3 : fgcolor, bgcolor, &item_width, nullptr); + + // draw the subitem right-justified + mui.draw_text_full(container, subitem_text, effective_left + item_width, line_y, effective_width - item_width, + JUSTIFY_RIGHT, WRAP_NEVER, DRAW_NORMAL, item_invert ? fgcolor3 : fgcolor, bgcolor, nullptr, nullptr); + } + } + + for (size_t count = visible_items; count < item.size(); count++) + { + const ui_menu_item &pitem = item[count]; + const char *itemtext = pitem.text; + float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; + float line_y0 = line; + float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; + float line_y1 = line + line_height; + rgb_t fgcolor = UI_TEXT_COLOR; + rgb_t bgcolor = UI_TEXT_BG_COLOR; + + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable()) + hover = count; + + // if we're selected, draw with a different background + if (count == selected) + { + fgcolor = rgb_t(0xff, 0xff, 0xff, 0x00); + bgcolor = rgb_t(0xff, 0xff, 0xff, 0xff); + } + // else if the mouse is over this item, draw with a different background + else if (count == hover) + { + fgcolor = UI_MOUSEOVER_COLOR; + bgcolor = UI_MOUSEOVER_BG_COLOR; + } + + // if we have some background hilighting to do, add a quad behind everything else + if (bgcolor != UI_TEXT_BG_COLOR) + mui.draw_textured_box(container, line_x0 + 0.01f, line_y0, line_x1 - 0.01f, line_y1, bgcolor, rgb_t(255, 43, 43, 43), + hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + + if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0) + container->add_line(visible_left, line + 0.5f * line_height, visible_left + visible_width, line + 0.5f * line_height, + UI_LINE_WIDTH, UI_TEXT_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + else + mui.draw_text_full(container, itemtext, effective_left, line, effective_width, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + line += line_height; + } + + x1 = x2; + x2 += right_panel_size; + + draw_right_panel((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, x1, y1, x2, y2); + + x1 = primary_left - UI_BOX_LR_BORDER; + x2 = primary_left + primary_width + UI_BOX_LR_BORDER; + + // if there is something special to add, do it by calling the virtual method + custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2); + + // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow + visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items); + + // reset redraw icon stage + if (!is_swlist) + ui_globals::redraw_icon = false; +} + +//------------------------------------------------- +// get title and search path for right panel +//------------------------------------------------- + +void ui_menu::get_title_search(std::string &snaptext, std::string &searchstr) +{ + // get arts title text + snaptext.assign(arts_info[ui_globals::curimage_view].title); + + // get search path + if (ui_globals::curimage_view == SNAPSHOT_VIEW) + searchstr = machine().options().value(arts_info[ui_globals::curimage_view].path); + else + searchstr = machine().ui().options().value(arts_info[ui_globals::curimage_view].path); + + path_iterator path(searchstr.c_str()); + std::string curpath; + + // iterate over path and add path for zipped formats + while (path.next(curpath)) + { + path_iterator path_iter(arts_info[ui_globals::curimage_view].addpath); + std::string c_path; + while (path_iter.next(c_path)) + searchstr.append(";").append(curpath).append(PATH_SEPARATOR).append(c_path); + } +} + +//------------------------------------------------- +// handle keys for main menu +//------------------------------------------------- + +void ui_menu::handle_main_keys(UINT32 flags) +{ + bool ignorepause = ui_menu::stack_has_special_main_menu(); + + // bail if no items + if (item.size() == 0) + return; + + // if we hit select, return TRUE or pop the stack, depending on the item + if (exclusive_input_pressed(IPT_UI_SELECT, 0)) + { + if (selected == item.size() - 1) + { + menu_event.iptkey = IPT_UI_CANCEL; + ui_menu::stack_pop(machine()); + } + return; + } + + // hitting cancel also pops the stack + if (exclusive_input_pressed(IPT_UI_CANCEL, 0)) + { + if (!menu_has_search_active()) + ui_menu::stack_pop(machine()); + // else if (!ui_error) + // ui_menu::stack_pop(machine()); TODO + return; + } + + // validate the current selection + validate_selection(1); + + // swallow left/right keys if they are not appropriate + bool ignoreleft = ((item[selected].flags & MENU_FLAG_LEFT_ARROW) == 0 || ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_RIGHT_PANEL); + bool ignoreright = ((item[selected].flags & MENU_FLAG_RIGHT_ARROW) == 0 || ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_RIGHT_PANEL); + bool ignoreup = (ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_LEFT_PANEL); + bool ignoredown = (ui_globals::panels_status == HIDE_BOTH || ui_globals::panels_status == HIDE_LEFT_PANEL); + + input_manager &minput = machine().input(); + // accept left/right keys as-is with repeat + if (!ignoreleft && exclusive_input_pressed(IPT_UI_LEFT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0)) + { + // Swap the right panel + if (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1)) + menu_event.iptkey = IPT_UI_LEFT_PANEL; + return; + } + + if (!ignoreright && exclusive_input_pressed(IPT_UI_RIGHT, (flags & UI_MENU_PROCESS_LR_REPEAT) ? 6 : 0)) + return; + + // up backs up by one item + if (exclusive_input_pressed(IPT_UI_UP, 6)) + { + // Filter + if (!ignoreup && (minput.code_pressed(KEYCODE_LALT) || minput.code_pressed(JOYCODE_BUTTON2))) + { + menu_event.iptkey = IPT_UI_UP_FILTER; + return; + } + + // Infos + if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1))) + { + menu_event.iptkey = IPT_UI_UP_PANEL; + topline_datsview--; + return; + } + + if (selected == visible_items + 1 || selected == 0 || ui_error) + return; + + selected--; + + if (selected == top_line && top_line != 0) + top_line--; + } + + // down advances by one item + if (exclusive_input_pressed(IPT_UI_DOWN, 6)) + { + // Filter + if (!ignoredown && (minput.code_pressed(KEYCODE_LALT) || minput.code_pressed(JOYCODE_BUTTON2))) + { + menu_event.iptkey = IPT_UI_DOWN_FILTER; + return; + } + + // Infos + if (!ignoreright && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1))) + { + menu_event.iptkey = IPT_UI_DOWN_PANEL; + topline_datsview++; + return; + } + + if (selected == item.size() - 1 || selected == visible_items - 1 || ui_error) + return; + + selected++; + + if (selected == top_line + visitems + (top_line != 0)) + top_line++; + } + + // page up backs up by visitems + if (exclusive_input_pressed(IPT_UI_PAGE_UP, 6)) + { + // Infos + if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1))) + { + menu_event.iptkey = IPT_UI_DOWN_PANEL; + topline_datsview -= right_visible_lines - 1; + return; + } + + if (selected < visible_items && !ui_error) + { + selected -= visitems; + + if (selected < 0) + selected = 0; + + top_line -= visitems - (top_line + visible_lines == visible_items); + } + } + + // page down advances by visitems + if (exclusive_input_pressed(IPT_UI_PAGE_DOWN, 6)) + { + // Infos + if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1))) + { + menu_event.iptkey = IPT_UI_DOWN_PANEL; + topline_datsview += right_visible_lines - 1; + return; + } + + if (selected < visible_items && !ui_error) + { + selected += visible_lines - 2 + (selected == 0); + + if (selected >= visible_items) + selected = visible_items - 1; + + top_line += visible_lines - 2; + } + } + + // home goes to the start + if (exclusive_input_pressed(IPT_UI_HOME, 0)) + { + // Infos + if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1))) + { + menu_event.iptkey = IPT_UI_DOWN_PANEL; + topline_datsview = 0; + return; + } + + if (selected < visible_items && !ui_error) + { + selected = 0; + top_line = 0; + } + } + + // end goes to the last + if (exclusive_input_pressed(IPT_UI_END, 0)) + { + // Infos + if (!ignoreleft && (minput.code_pressed(KEYCODE_LCONTROL) || minput.code_pressed(JOYCODE_BUTTON1))) + { + menu_event.iptkey = IPT_UI_DOWN_PANEL; + topline_datsview = totallines; + return; + } + + if (selected < visible_items && !ui_error) + selected = top_line = visible_items - 1; + } + + // pause enables/disables pause + if (!ui_error && !ignorepause && exclusive_input_pressed(IPT_UI_PAUSE, 0)) + { + if (machine().paused()) + machine().resume(); + else + machine().pause(); + } + + // handle a toggle cheats request + if (!ui_error && machine().ui_input().pressed_repeat(IPT_UI_TOGGLE_CHEAT, 0)) + machine().cheat().set_enable(!machine().cheat().enabled()); + + // see if any other UI keys are pressed + if (menu_event.iptkey == IPT_INVALID) + for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++) + { + if (ui_error || code == IPT_UI_CONFIGURE || (code == IPT_UI_LEFT && ignoreleft) || (code == IPT_UI_RIGHT && ignoreright) || (code == IPT_UI_PAUSE && ignorepause)) + continue; + + if (exclusive_input_pressed(code, 0)) + break; + } +} + +//------------------------------------------------- +// handle input events for main menu +//------------------------------------------------- + +void ui_menu::handle_main_events(UINT32 flags) +{ + bool stop = false; + ui_event local_menu_event; + + // loop while we have interesting events + while (!stop && machine().ui_input().pop_event(&local_menu_event)) + { + switch (local_menu_event.event_type) + { + // if we are hovering over a valid item, select it with a single click + case UI_EVENT_MOUSE_DOWN: + { + if (ui_error) + { + menu_event.iptkey = IPT_OTHER; + stop = true; + } + else + { + if (hover >= 0 && hover < item.size()) + selected = hover; + else if (hover == HOVER_ARROW_UP) + { + selected -= visitems; + if (selected < 0) + selected = 0; + top_line -= visitems - (top_line + visible_lines == visible_items); + } + else if (hover == HOVER_ARROW_DOWN) + { + selected += visible_lines - 2 + (selected == 0); + if (selected >= visible_items) + selected = visible_items - 1; + top_line += visible_lines - 2; + } + else if (hover == HOVER_UI_RIGHT) + menu_event.iptkey = IPT_UI_RIGHT; + else if (hover == HOVER_UI_LEFT) + menu_event.iptkey = IPT_UI_LEFT; + else if (hover == HOVER_DAT_DOWN) + topline_datsview += right_visible_lines - 1; + else if (hover == HOVER_DAT_UP) + topline_datsview -= right_visible_lines - 1; + else if (hover == HOVER_LPANEL_ARROW) + { + if (ui_globals::panels_status == HIDE_LEFT_PANEL) + ui_globals::panels_status = SHOW_PANELS; + else if (ui_globals::panels_status == HIDE_BOTH) + ui_globals::panels_status = HIDE_RIGHT_PANEL; + else if (ui_globals::panels_status == SHOW_PANELS) + ui_globals::panels_status = HIDE_LEFT_PANEL; + else if (ui_globals::panels_status == HIDE_RIGHT_PANEL) + ui_globals::panels_status = HIDE_BOTH; + } + else if (hover == HOVER_RPANEL_ARROW) + { + if (ui_globals::panels_status == HIDE_RIGHT_PANEL) + ui_globals::panels_status = SHOW_PANELS; + else if (ui_globals::panels_status == HIDE_BOTH) + ui_globals::panels_status = HIDE_LEFT_PANEL; + else if (ui_globals::panels_status == SHOW_PANELS) + ui_globals::panels_status = HIDE_RIGHT_PANEL; + else if (ui_globals::panels_status == HIDE_LEFT_PANEL) + ui_globals::panels_status = HIDE_BOTH; + } + else if (hover == HOVER_B_FAV) + { + menu_event.iptkey = IPT_UI_FAVORITES; + stop = true; + } + else if (hover == HOVER_B_EXPORT) + { + menu_event.iptkey = IPT_UI_EXPORT; + stop = true; + } + else if (hover == HOVER_B_DATS) + { + menu_event.iptkey = IPT_UI_DATS; + stop = true; + } + else if (hover == HOVER_B_SETTINGS) + { + menu_event.iptkey = IPT_UI_SELECT; + selected = visible_items + 1; + stop = true; + } + else if (hover == HOVER_B_FOLDERS) + { + menu_event.iptkey = IPT_UI_SELECT; + selected = visible_items + 2; + stop = true; + } + else if (hover >= HOVER_RP_FIRST && hover <= HOVER_RP_LAST) + { + ui_globals::rpanel = (HOVER_RP_FIRST - hover) * (-1); + stop = true; + } + else if (hover >= HOVER_SW_FILTER_FIRST && hover <= HOVER_SW_FILTER_LAST) + { + l_sw_hover = (HOVER_SW_FILTER_FIRST - hover) * (-1); + menu_event.iptkey = IPT_OTHER; + stop = true; + } + else if (hover >= HOVER_FILTER_FIRST && hover <= HOVER_FILTER_LAST) + { + l_hover = (HOVER_FILTER_FIRST - hover) * (-1); + menu_event.iptkey = IPT_OTHER; + stop = true; + } + } + break; + } + + // if we are hovering over a valid item, fake a UI_SELECT with a double-click + case UI_EVENT_MOUSE_DOUBLE_CLICK: + if (hover >= 0 && hover < item.size()) + { + selected = hover; + menu_event.iptkey = IPT_UI_SELECT; + } + + if (selected == item.size() - 1) + { + menu_event.iptkey = IPT_UI_CANCEL; + ui_menu::stack_pop(machine()); + } + stop = true; + break; + + // caught scroll event + case UI_EVENT_MOUSE_WHEEL: + if (local_menu_event.zdelta > 0) + { + if (selected >= visible_items || selected == 0 || ui_error) + break; + selected -= local_menu_event.num_lines; + if (selected < top_line + (top_line != 0)) + top_line -= local_menu_event.num_lines; + } + else + { + if (selected >= visible_items - 1 || ui_error) + break; + selected += local_menu_event.num_lines; + if (selected > visible_items - 1) + selected = visible_items - 1; + if (selected >= top_line + visitems + (top_line != 0)) + top_line += local_menu_event.num_lines; + } + break; + + // translate CHAR events into specials + case UI_EVENT_CHAR: + menu_event.iptkey = IPT_SPECIAL; + menu_event.unichar = local_menu_event.ch; + stop = true; + break; + + // ignore everything else + default: + break; + } + } +} + +//------------------------------------------------- +// draw right box title +//------------------------------------------------- + +float ui_menu::draw_right_box_title(float x1, float y1, float x2, float y2) +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + float midl = (x2 - x1) * 0.5f; + + // add outlined box for options + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // add separator line + container->add_line(x1 + midl, y1, x1 + midl, y1 + line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + + std::string buffer[RP_LAST + 1]; + buffer[RP_IMAGES].assign("Images"); + buffer[RP_INFOS].assign("Infos"); + + for (int cells = RP_IMAGES; cells <= RP_INFOS; cells++) + { + rgb_t bgcolor = UI_TEXT_BG_COLOR; + rgb_t fgcolor = UI_TEXT_COLOR; + + if (mouse_hit && x1 <= mouse_x && x1 + midl > mouse_x && y1 <= mouse_y && y1 + line_height > mouse_y) + { + if (ui_globals::rpanel != cells) + { + bgcolor = UI_MOUSEOVER_BG_COLOR; + fgcolor = UI_MOUSEOVER_COLOR; + hover = HOVER_RP_FIRST + cells; + } + } + + if (ui_globals::rpanel != cells) + { + container->add_line(x1, y1 + line_height, x1 + midl, y1 + line_height, UI_LINE_WIDTH, + UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + if (fgcolor != UI_MOUSEOVER_COLOR) + fgcolor = UI_CLONE_COLOR; + } + + if (bgcolor != UI_TEXT_BG_COLOR) + container->add_rect(x1 + UI_LINE_WIDTH, y1 + UI_LINE_WIDTH, x1 + midl - UI_LINE_WIDTH, y1 + line_height, + bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + + mui.draw_text_full(container, buffer[cells].c_str(), x1 + UI_LINE_WIDTH, y1, midl - UI_LINE_WIDTH, + JUSTIFY_CENTER, WRAP_NEVER, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + x1 += midl; + } + + return (y1 + line_height + UI_LINE_WIDTH); +} + +//------------------------------------------------- +// common function for images render +//------------------------------------------------- + +std::string ui_menu::arts_render_common(float origx1, float origy1, float origx2, float origy2) +{ + std::string snaptext, searchstr; + get_title_search(snaptext, searchstr); + + // apply title to right panel + float title_size = 0.0f; + float txt_lenght = 0.0f; + + for (int x = FIRST_VIEW; x < LAST_VIEW; x++) + { + machine().ui().draw_text_full(container, arts_info[x].title, origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, + WRAP_TRUNCATE, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr); + txt_lenght += 0.01f; + title_size = MAX(txt_lenght, title_size); + } + + machine().ui().draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curimage_view, FIRST_VIEW, LAST_VIEW, title_size); + + return searchstr; } + +//------------------------------------------------- +// draw favorites star +//------------------------------------------------- + +void ui_menu::draw_star(float x0, float y0) +{ + float y1 = y0 + machine().ui().get_line_height(); + float x1 = x0 + machine().ui().get_line_height() * container->manager().ui_aspect(); + container->add_quad(x0, y0, x1, y1, ARGB_WHITE, star_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_PACKABLE); +} + +//------------------------------------------------- +// draw toolbar +//------------------------------------------------- + +void ui_menu::draw_toolbar(float x1, float y1, float x2, float y2, bool software) +{ + ui_manager &mui = machine().ui(); + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + y2 -= UI_BOX_TB_BORDER; + + render_texture **t_texture = (software) ? sw_toolbar_texture : toolbar_texture; + bitmap_argb32 **t_bitmap = (software) ? sw_toolbar_bitmap : toolbar_bitmap; + + int m_valid = 0; + for (int x = 0; x < UI_TOOLBAR_BUTTONS; ++x) + if (t_bitmap[x]->valid()) + m_valid++; + + float x_pixel = 1.0f / container->manager().ui_target().width(); + int h_len = mui.get_line_height() * container->manager().ui_target().height(); + h_len = (h_len % 2 == 0) ? h_len : h_len - 1; + x1 = (x1 + x2) * 0.5f - x_pixel * (m_valid * ((h_len / 2) + 2)); + + for (int z = 0; z < UI_TOOLBAR_BUTTONS; ++z) + { + if (t_bitmap[z]->valid()) + { + x2 = x1 + x_pixel * h_len; + rgb_t color(0xEFEFEFEF); + if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y) + { + hover = HOVER_B_FAV + z; + color = ARGB_WHITE; + float ypos = y2 + machine().ui().get_line_height() + 2.0f * UI_BOX_TB_BORDER; + mui.draw_text_box(container, hover_msg[z], JUSTIFY_CENTER, 0.5f, ypos, UI_BACKGROUND_COLOR); + } + + container->add_quad(x1, y1, x2, y2, color, t_texture[z], PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + x1 += x_pixel * (h_len + 2); + } + } +} + + +//------------------------------------------------- +// perform rendering of image +//------------------------------------------------- + +void ui_menu::arts_render_images(bitmap_argb32 *tmp_bitmap, float origx1, float origy1, float origx2, float origy2, bool software) +{ + bool no_available = false; + float line_height = machine().ui().get_line_height(); + + // if it fails, use the default image + if (!tmp_bitmap->valid()) + { + tmp_bitmap->allocate(256, 256); + for (int x = 0; x < 256; x++) + for (int y = 0; y < 256; y++) + tmp_bitmap->pix32(y, x) = no_avail_bitmap->pix32(y, x); + no_available = true; + } + + if (tmp_bitmap->valid()) + { + float panel_width = origx2 - origx1 - 0.02f; + float panel_height = origy2 - origy1 - 0.02f - (2.0f * UI_BOX_TB_BORDER) - (2.0f * line_height); + int screen_width = machine().render().ui_target().width(); + int screen_height = machine().render().ui_target().height(); + int panel_width_pixel = panel_width * screen_width; + int panel_height_pixel = panel_height * screen_height; + float ratio = 0.0f; + + // Calculate resize ratios for resizing + float ratioW = (float)panel_width_pixel / tmp_bitmap->width(); + float ratioH = (float)panel_height_pixel / tmp_bitmap->height(); + float ratioI = (float)tmp_bitmap->height() / tmp_bitmap->width(); + int dest_xPixel = tmp_bitmap->width(); + int dest_yPixel = tmp_bitmap->height(); + + // force 4:3 ratio min + if (machine().ui().options().forced_4x3_snapshot() && ratioI < 0.75f && ui_globals::curimage_view == SNAPSHOT_VIEW) + { + // smaller ratio will ensure that the image fits in the view + dest_yPixel = tmp_bitmap->width() * 0.75f; + ratioH = (float)panel_height_pixel / dest_yPixel; + ratio = MIN(ratioW, ratioH); + dest_xPixel = tmp_bitmap->width() * ratio; + dest_yPixel *= ratio; + } + // resize the bitmap if necessary + else if (ratioW < 1 || ratioH < 1 || (machine().ui().options().enlarge_snaps() && !no_available)) + { + // smaller ratio will ensure that the image fits in the view + ratio = MIN(ratioW, ratioH); + dest_xPixel = tmp_bitmap->width() * ratio; + dest_yPixel = tmp_bitmap->height() * ratio; + } + + bitmap_argb32 *dest_bitmap; + + // resample if necessary + if (dest_xPixel != tmp_bitmap->width() || dest_yPixel != tmp_bitmap->height()) + { + dest_bitmap = auto_alloc(machine(), bitmap_argb32); + dest_bitmap->allocate(dest_xPixel, dest_yPixel); + render_color color = { 1.0f, 1.0f, 1.0f, 1.0f }; + render_resample_argb_bitmap_hq(*dest_bitmap, *tmp_bitmap, color, true); + } + else + dest_bitmap = tmp_bitmap; + + snapx_bitmap->allocate(panel_width_pixel, panel_height_pixel); + int x1 = (0.5f * panel_width_pixel) - (0.5f * dest_xPixel); + int y1 = (0.5f * panel_height_pixel) - (0.5f * dest_yPixel); + + for (int x = 0; x < dest_xPixel; x++) + for (int y = 0; y < dest_yPixel; y++) + snapx_bitmap->pix32(y + y1, x + x1) = dest_bitmap->pix32(y, x); + + auto_free(machine(), dest_bitmap); + + // apply bitmap + snapx_texture->set_bitmap(*snapx_bitmap, snapx_bitmap->cliprect(), TEXFORMAT_ARGB32); + } + else + snapx_bitmap->reset(); +} + +//------------------------------------------------- +// draw common arrows +//------------------------------------------------- + +void ui_menu::draw_common_arrow(float origx1, float origy1, float origx2, float origy2, int current, int dmin, int dmax, float title_size) +{ + float line_height = machine().ui().get_line_height(); + float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); + float gutter_width = lr_arrow_width * 1.3f; + + // set left-right arrows dimension + float ar_x0 = 0.5f * (origx2 + origx1) + 0.5f * title_size + gutter_width - lr_arrow_width; + float ar_y0 = origy1 + 0.1f * line_height; + float ar_x1 = 0.5f * (origx2 + origx1) + 0.5f * title_size + gutter_width; + float ar_y1 = origy1 + 0.9f * line_height; + + float al_x0 = 0.5f * (origx2 + origx1) - 0.5f * title_size - gutter_width; + float al_y0 = origy1 + 0.1f * line_height; + float al_x1 = 0.5f * (origx2 + origx1) - 0.5f * title_size - gutter_width + lr_arrow_width; + float al_y1 = origy1 + 0.9f * line_height; + + rgb_t fgcolor_right, fgcolor_left; + fgcolor_right = fgcolor_left = UI_TEXT_COLOR; + + // set hover + if (mouse_hit && ar_x0 <= mouse_x && ar_x1 > mouse_x && ar_y0 <= mouse_y && ar_y1 > mouse_y && current != dmax) + { + machine().ui().draw_textured_box(container, ar_x0 + 0.01f, ar_y0, ar_x1 - 0.01f, ar_y1, UI_MOUSEOVER_BG_COLOR, rgb_t(255, 43, 43, 43), + hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + hover = HOVER_UI_RIGHT; + fgcolor_right = UI_MOUSEOVER_COLOR; + } + else if (mouse_hit && al_x0 <= mouse_x && al_x1 > mouse_x && al_y0 <= mouse_y && al_y1 > mouse_y && current != dmin) + { + machine().ui().draw_textured_box(container, al_x0 + 0.01f, al_y0, al_x1 - 0.01f, al_y1, UI_MOUSEOVER_BG_COLOR, rgb_t(255, 43, 43, 43), + hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + hover = HOVER_UI_LEFT; + fgcolor_left = UI_MOUSEOVER_COLOR; + } + + // apply arrow + if (current == dmin) + container->add_quad(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor_right, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90) | PRIMFLAG_PACKABLE); + else if (current == dmax) + container->add_quad(al_x0, al_y0, al_x1, al_y1, fgcolor_left, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90 ^ ORIENTATION_FLIP_X) | PRIMFLAG_PACKABLE); + else + { + container->add_quad(ar_x0, ar_y0, ar_x1, ar_y1, fgcolor_right, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90) | PRIMFLAG_PACKABLE); + container->add_quad(al_x0, al_y0, al_x1, al_y1, fgcolor_left, arrow_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXORIENT(ROT90 ^ ORIENTATION_FLIP_X) | PRIMFLAG_PACKABLE); + } +} + +//------------------------------------------------- +// draw icons +//------------------------------------------------- + +void ui_menu::draw_icon(int linenum, void *selectedref, float x0, float y0) +{ + static const game_driver *olddriver[MAX_ICONS_RENDER] = { nullptr }; + float x1 = x0 + machine().ui().get_line_height() * container->manager().ui_aspect(container); + float y1 = y0 + machine().ui().get_line_height(); + const game_driver *driver = (const game_driver *)selectedref; + + if (olddriver[linenum] != driver || ui_globals::redraw_icon) + { + olddriver[linenum] = driver; + + // set clone status + bool cloneof = strcmp(driver->parent, "0"); + if (cloneof) + { + int cx = driver_list::find(driver->parent); + if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) + cloneof = false; + } + + // get search path + path_iterator path(machine().ui().options().icons_directory()); + std::string curpath; + std::string searchstr(machine().ui().options().icons_directory()); + + // iterate over path and add path for zipped formats + while (path.next(curpath)) + searchstr.append(";").append(curpath.c_str()).append(PATH_SEPARATOR).append("icons"); + + bitmap_argb32 *tmp = auto_alloc(machine(), bitmap_argb32); + emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ); + std::string fullname = std::string(driver->name).append(".ico"); + render_load_ico(*tmp, snapfile, nullptr, fullname.c_str()); + + if (!tmp->valid() && cloneof) + { + fullname.assign(driver->parent).append(".ico"); + render_load_ico(*tmp, snapfile, nullptr, fullname.c_str()); + } + + if (tmp->valid()) + { + float panel_width = x1 - x0; + float panel_height = y1 - y0; + int screen_width = machine().render().ui_target().width(); + int screen_height = machine().render().ui_target().height(); + int panel_width_pixel = panel_width * screen_width; + int panel_height_pixel = panel_height * screen_height; + + // Calculate resize ratios for resizing + float ratioW = (float)panel_width_pixel / tmp->width(); + float ratioH = (float)panel_height_pixel / tmp->height(); + int dest_xPixel = tmp->width(); + int dest_yPixel = tmp->height(); + + if (ratioW < 1 || ratioH < 1) + { + // smaller ratio will ensure that the image fits in the view + float ratio = MIN(ratioW, ratioH); + dest_xPixel = tmp->width() * ratio; + dest_yPixel = tmp->height() * ratio; + } + + bitmap_argb32 *dest_bitmap; + dest_bitmap = auto_alloc(machine(), bitmap_argb32); + + // resample if necessary + if (dest_xPixel != tmp->width() || dest_yPixel != tmp->height()) + { + dest_bitmap->allocate(dest_xPixel, dest_yPixel); + render_color color = { 1.0f, 1.0f, 1.0f, 1.0f }; + render_resample_argb_bitmap_hq(*dest_bitmap, *tmp, color, true); + } + else + dest_bitmap = tmp; + + icons_bitmap[linenum]->reset(); + icons_bitmap[linenum]->allocate(panel_width_pixel, panel_height_pixel); + + for (int x = 0; x < dest_xPixel; x++) + for (int y = 0; y < dest_yPixel; y++) + icons_bitmap[linenum]->pix32(y, x) = dest_bitmap->pix32(y, x); + + auto_free(machine(), dest_bitmap); + + icons_texture[linenum]->set_bitmap(*icons_bitmap[linenum], icons_bitmap[linenum]->cliprect(), TEXFORMAT_ARGB32); + } + else { + if (icons_bitmap[linenum] != nullptr) + { + icons_bitmap[linenum]->reset(); + } + } + auto_free(machine(), tmp); + } + + if (icons_bitmap[linenum] != nullptr && icons_bitmap[linenum]->valid()) + container->add_quad(x0, y0, x1, y1, ARGB_WHITE, icons_texture[linenum], PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_PACKABLE); +} + +//------------------------------------------------- +// draw info arrow +//------------------------------------------------- + +void ui_menu::info_arrow(int ub, float origx1, float origx2, float oy1, float line_height, float text_size, float ud_arrow_width) +{ + rgb_t fgcolor = UI_TEXT_COLOR; + UINT32 orientation = (!ub) ? ROT0 : ROT0 ^ ORIENTATION_FLIP_Y; + + if (mouse_hit && origx1 <= mouse_x && origx2 > mouse_x && oy1 <= mouse_y && oy1 + (line_height * text_size) > mouse_y) + { + machine().ui().draw_textured_box(container, origx1 + 0.01f, oy1, origx2 - 0.01f, oy1 + (line_height * text_size), UI_MOUSEOVER_BG_COLOR, + rgb_t(255, 43, 43, 43), hilight_main_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + hover = (!ub) ? HOVER_DAT_UP : HOVER_DAT_DOWN; + fgcolor = UI_MOUSEOVER_COLOR; + } + + draw_arrow(container, 0.5f * (origx1 + origx2) - 0.5f * (ud_arrow_width * text_size), oy1 + 0.25f * (line_height * text_size), + 0.5f * (origx1 + origx2) + 0.5f * (ud_arrow_width * text_size), oy1 + 0.75f * (line_height * text_size), fgcolor, orientation); +} + +//------------------------------------------------- +// draw - draw palette menu +//------------------------------------------------- + +void ui_menu::draw_palette_menu() +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); + float ud_arrow_width = line_height * machine().render().ui_aspect(); + float gutter_width = lr_arrow_width * 1.3f; + int itemnum, linenum; + + if (machine().ui().options().use_background_image() && machine().options().system() == nullptr && bgrnd_bitmap->valid()) + container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + + // compute the width and height of the full menu + float visible_width = 0; + float visible_main_menu_height = 0; + for (itemnum = 0; itemnum < item.size(); itemnum++) + { + const ui_menu_item &pitem = item[itemnum]; + + // compute width of left hand side + float total_width = gutter_width + mui.get_string_width(pitem.text) + gutter_width; + + // add in width of right hand side + if (pitem.subtext) + total_width += 2.0f * gutter_width + mui.get_string_width(pitem.subtext); + + // track the maximum + if (total_width > visible_width) + visible_width = total_width; + + // track the height as well + visible_main_menu_height += line_height; + } + + // account for extra space at the top and bottom + float visible_extra_menu_height = customtop + custombottom; + + // add a little bit of slop for rounding + visible_width += 0.01f; + visible_main_menu_height += 0.01f; + + // if we are too wide or too tall, clamp it down + if (visible_width + 2.0f * UI_BOX_LR_BORDER > 1.0f) + visible_width = 1.0f - 2.0f * UI_BOX_LR_BORDER; + + // if the menu and extra menu won't fit, take away part of the regular menu, it will scroll + if (visible_main_menu_height + visible_extra_menu_height + 2.0f * UI_BOX_TB_BORDER > 1.0f) + visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height; + + int visible_lines = floor(visible_main_menu_height / line_height); + visible_main_menu_height = (float)visible_lines * line_height; + + // compute top/left of inner menu area by centering + float visible_left = (1.0f - visible_width) * 0.5f; + float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f; + + // if the menu is at the bottom of the extra, adjust + visible_top += customtop; + + // first add us a box + float x1 = visible_left - UI_BOX_LR_BORDER; + float y1 = visible_top - UI_BOX_TB_BORDER; + float x2 = visible_left + visible_width + UI_BOX_LR_BORDER; + float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER; + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // determine the first visible line based on the current selection + int top_line = selected - visible_lines / 2; + if (top_line < 0) + top_line = 0; + if (top_line + visible_lines >= item.size()) + top_line = item.size() - visible_lines; + + // determine effective positions taking into account the hilighting arrows + float effective_width = visible_width - 2.0f * gutter_width; + float effective_left = visible_left + gutter_width; + + // locate mouse + mouse_hit = false; + mouse_button = false; + mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button); + if (mouse_target != nullptr) + if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) + mouse_hit = true; + + // loop over visible lines + hover = item.size() + 1; + float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; + float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; + + for (linenum = 0; linenum < visible_lines; linenum++) + { + float line_y = visible_top + (float)linenum * line_height; + itemnum = top_line + linenum; + const ui_menu_item &pitem = item[itemnum]; + const char *itemtext = pitem.text; + rgb_t fgcolor = UI_TEXT_COLOR; + rgb_t bgcolor = UI_TEXT_BG_COLOR; + float line_y0 = line_y; + float line_y1 = line_y + line_height; + + // set the hover if this is our item + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable()) + hover = itemnum; + + // if we're selected, draw with a different background + if (itemnum == selected) + { + fgcolor = UI_SELECTED_COLOR; + bgcolor = UI_SELECTED_BG_COLOR; + } + + // else if the mouse is over this item, draw with a different background + else if (itemnum == hover) + { + fgcolor = UI_MOUSEOVER_COLOR; + bgcolor = UI_MOUSEOVER_BG_COLOR; + } + + // if we have some background hilighting to do, add a quad behind everything else + if (bgcolor != UI_TEXT_BG_COLOR) + highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor); + + // if we're on the top line, display the up arrow + if (linenum == 0 && top_line != 0) + { + draw_arrow(container, + 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, + line_y + 0.25f * line_height, + 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, + line_y + 0.75f * line_height, + fgcolor, + ROT0); + if (hover == itemnum) + hover = HOVER_ARROW_UP; + } + + // if we're on the bottom line, display the down arrow + else if (linenum == visible_lines - 1 && itemnum != item.size() - 1) + { + draw_arrow(container, + 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, + line_y + 0.25f * line_height, + 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, + line_y + 0.75f * line_height, + fgcolor, + ROT0 ^ ORIENTATION_FLIP_Y); + if (hover == itemnum) + hover = HOVER_ARROW_DOWN; + } + + // if we're just a divider, draw a line + else if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0) + container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + + // if we don't have a subitem, just draw the string centered + else if (pitem.subtext == nullptr) + mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width, + JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + + // otherwise, draw the item on the left and the subitem text on the right + else + { + const char *subitem_text = pitem.subtext; + rgb_t color = rgb_t((UINT32)strtoul(subitem_text, nullptr, 16)); + + // draw the left-side text + mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width, + JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + + // give 2 spaces worth of padding + float subitem_width = mui.get_string_width("FF00FF00"); + + mui.draw_outlined_box(container, effective_left + effective_width - subitem_width, line_y0, + effective_left + effective_width, line_y1, color); + } + } + + // if there is something special to add, do it by calling the virtual method + custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2); + + // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow + visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != item.size()); +} + +//------------------------------------------------- +// draw - draw dats menu +//------------------------------------------------- + +void ui_menu::draw_dats_menu() +{ + float line_height = machine().ui().get_line_height(); + float ud_arrow_width = line_height * machine().render().ui_aspect(); + float gutter_width = 0.52f * line_height * machine().render().ui_aspect(); + mouse_x = -1, mouse_y = -1; + float visible_width = 1.0f - 2.0f * UI_BOX_LR_BORDER; + float visible_left = (1.0f - visible_width) * 0.5f; + ui_manager &mui = machine().ui(); + + // draw background image if available + if (machine().ui().options().use_background_image() && bgrnd_bitmap->valid()) + container->add_quad(0.0f, 0.0f, 1.0f, 1.0f, ARGB_WHITE, bgrnd_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + + hover = item.size() + 1; + visible_items = item.size() - 2; + float extra_height = 2.0f * line_height; + float visible_extra_menu_height = customtop + custombottom + extra_height; + + // locate mouse + mouse_hit = false; + mouse_button = false; + mouse_target = machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button); + if (mouse_target != nullptr) + if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) + mouse_hit = true; + + // account for extra space at the top and bottom + float visible_main_menu_height = 1.0f - 2.0f * UI_BOX_TB_BORDER - visible_extra_menu_height; + visible_lines = floor(visible_main_menu_height / line_height); + visible_main_menu_height = (float)(visible_lines * line_height); + + // compute top/left of inner menu area by centering + float visible_top = (1.0f - (visible_main_menu_height + visible_extra_menu_height)) * 0.5f; + + // if the menu is at the bottom of the extra, adjust + visible_top += customtop; + + // compute left box size + float x1 = visible_left; + float y1 = visible_top - UI_BOX_TB_BORDER; + float x2 = x1 + visible_width; + float y2 = visible_top + visible_main_menu_height + UI_BOX_TB_BORDER + extra_height; + float line = visible_top + (float)(visible_lines * line_height); + + //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + if (visible_items < visible_lines) + visible_lines = visible_items; + if (top_line < 0) + top_line = 0; + if (top_line + visible_lines >= visible_items) + top_line = visible_items - visible_lines; + + // determine effective positions taking into account the hilighting arrows + float effective_width = visible_width - 2.0f * gutter_width; + float effective_left = visible_left + gutter_width; + + int n_loop = (visible_items >= visible_lines) ? visible_lines : visible_items; + + for (int linenum = 0; linenum < n_loop; linenum++) + { + float line_y = visible_top + (float)linenum * line_height; + int itemnum = top_line + linenum; + const ui_menu_item &pitem = item[itemnum]; + const char *itemtext = pitem.text; + rgb_t fgcolor = UI_TEXT_COLOR; + rgb_t bgcolor = UI_TEXT_BG_COLOR; + float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; + float line_y0 = line_y; + float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; + float line_y1 = line_y + line_height; + + // if we're on the top line, display the up arrow + if (linenum == 0 && top_line != 0) + { + draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height, + 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0); + + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + bgcolor = UI_MOUSEOVER_BG_COLOR; + highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor); + hover = HOVER_ARROW_UP; + } + } + // if we're on the bottom line, display the down arrow + else if (linenum == visible_lines - 1 && itemnum != visible_items - 1) + { + draw_arrow(container, 0.5f * (x1 + x2) - 0.5f * ud_arrow_width, line_y + 0.25f * line_height, + 0.5f * (x1 + x2) + 0.5f * ud_arrow_width, line_y + 0.75f * line_height, fgcolor, ROT0 ^ ORIENTATION_FLIP_Y); + + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + bgcolor = UI_MOUSEOVER_BG_COLOR; + highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor); + hover = HOVER_ARROW_DOWN; + } + } + + // draw dats text + else if (pitem.subtext == nullptr) + { + mui.draw_text_full(container, itemtext, effective_left, line_y, effective_width, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + } + } + + for (size_t count = visible_items; count < item.size(); count++) + { + const ui_menu_item &pitem = item[count]; + const char *itemtext = pitem.text; + float line_x0 = x1 + 0.5f * UI_LINE_WIDTH; + float line_y0 = line; + float line_x1 = x2 - 0.5f * UI_LINE_WIDTH; + float line_y1 = line + line_height; + rgb_t fgcolor = UI_SELECTED_COLOR; + rgb_t bgcolor = UI_SELECTED_BG_COLOR; + + if (mouse_hit && line_x0 <= mouse_x && line_x1 > mouse_x && line_y0 <= mouse_y && line_y1 > mouse_y && pitem.is_selectable()) + hover = count; + + if (strcmp(itemtext, MENU_SEPARATOR_ITEM) == 0) + container->add_line(visible_left, line + 0.5f * line_height, visible_left + visible_width, line + 0.5f * line_height, + UI_LINE_WIDTH, UI_TEXT_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + else + { + highlight(container, line_x0, line_y0, line_x1, line_y1, bgcolor); + mui.draw_text_full(container, itemtext, effective_left, line, effective_width, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr); + } + line += line_height; + } + + // if there is something special to add, do it by calling the virtual method + custom_render((selected >= 0 && selected < item.size()) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2); + + // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow + visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != visible_items); +}
\ No newline at end of file diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h index b52b0f90ff4..d5f5e8a33e6 100644 --- a/src/emu/ui/menu.h +++ b/src/emu/ui/menu.h @@ -2,9 +2,9 @@ // copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods /*************************************************************************** - ui/menu.h + ui/menu.h - Internal MAME menus for the user interface. + Internal MAME menus for the user interface. ***************************************************************************/ @@ -17,7 +17,7 @@ /*************************************************************************** - CONSTANTS + CONSTANTS ***************************************************************************/ // flags for menu items @@ -27,6 +27,11 @@ #define MENU_FLAG_MULTILINE (1 << 3) #define MENU_FLAG_REDTEXT (1 << 4) #define MENU_FLAG_DISABLE (1 << 5) +#define MENU_FLAG_UI (1 << 6) +#define MENU_FLAG_UI_DATS (1 << 7) +#define MENU_FLAG_UI_SWLIST (1 << 8) +#define MENU_FLAG_UI_FAVORITE (1 << 9) +#define MENU_FLAG_UI_PALETTE (1 << 10) // special menu item for separators #define MENU_SEPARATOR_ITEM "---" @@ -35,6 +40,9 @@ #define UI_MENU_PROCESS_NOKEYS 1 #define UI_MENU_PROCESS_LR_REPEAT 2 #define UI_MENU_PROCESS_CUSTOM_ONLY 4 +#define UI_MENU_PROCESS_ONLYCHAR 8 +#define UI_MENU_PROCESS_NOINPUT 16 +#define UI_MENU_PROCESS_NOIMAGE 32 // options for ui_menu_reset enum ui_menu_reset_options @@ -47,32 +55,32 @@ enum ui_menu_reset_options /*************************************************************************** - TYPE DEFINITIONS + TYPE DEFINITIONS ***************************************************************************/ // menu-related events struct ui_menu_event { - void * itemref; // reference for the selected item - int iptkey; // one of the IPT_* values from inptport.h - unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL + void *itemref; // reference for the selected item + int iptkey; // one of the IPT_* values from inptport.h + unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL }; struct ui_menu_pool { - ui_menu_pool * next; // chain to next one - UINT8 * top; // top of the pool - UINT8 * end; // end of the pool + ui_menu_pool *next; // chain to next one + UINT8 *top; // top of the pool + UINT8 *end; // end of the pool }; class ui_menu_item { public: - const char * text; - const char * subtext; - UINT32 flags; - void * ref; + const char *text; + const char *subtext; + UINT32 flags; + void *ref; inline bool is_selectable() const; }; @@ -85,27 +93,22 @@ public: running_machine &machine() const { return m_machine; } - render_container * container; // render_container we render to - ui_menu_event menu_event; // the UI menu_event that occurred - ui_menu * parent; // pointer to parent menu - int resetpos; // reset position - void * resetref; // reset reference - int selected; // which item is selected - int hover; // which item is being hovered over - int visitems; // number of visible items - int numitems; // number of items in the menu - int allocitems; // allocated size of array - ui_menu_item * item; // pointer to array of items - float customtop; // amount of extra height to add at the top - float custombottom; // amount of extra height to add at the bottom - ui_menu_pool * pool; // list of memory pools + render_container *container; // render_container we render to + ui_menu_event menu_event; // the UI menu_event that occurred + ui_menu *parent; // pointer to parent menu + int resetpos; // reset position + void *resetref; // reset reference + int selected; // which item is selected + int hover; // which item is being hovered over + int visitems; // number of visible items + float customtop; // amount of extra height to add at the top + float custombottom; // amount of extra height to add at the bottom + ui_menu_pool *pool; // list of memory pools + std::vector<ui_menu_item> item; // array of items // free all items in the menu, and all memory allocated from the memory pool void reset(ui_menu_reset_options options); - // returns true if the menu has any non-default items in it - bool populated(); - // append a new item to the end of the menu void item_append(const char *text, const char *subtext, UINT32 flags, void *ref); @@ -168,22 +171,117 @@ public: // To be reimplemented in the menu subclass virtual void handle() = 0; + // test if search is active + virtual bool menu_has_search_active() { return false; } + private: static ui_menu *menu_free; static std::unique_ptr<bitmap_rgb32> hilight_bitmap; static render_texture *hilight_texture, *arrow_texture; bool m_special_main_menu; - running_machine & m_machine; // machine we are attached to + running_machine &m_machine; // machine we are attached to - void draw(bool customonly); + void draw(bool customonly, bool noimage, bool noinput); void draw_text_box(); - void handle_events(); + void handle_events(UINT32 flags); void handle_keys(UINT32 flags); inline bool exclusive_input_pressed(int key, int repeat); static void clear_free_list(running_machine &machine); static void render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param); + +public: + int visible_items; + bool ui_error; + + // mouse handling + bool mouse_hit, mouse_button; + render_target *mouse_target; + INT32 mouse_target_x, mouse_target_y; + float mouse_x, mouse_y; + + // draw toolbar + void draw_toolbar(float x1, float y1, float x2, float y2, bool software = false); + + // draw left panel + virtual float draw_left_panel(float x1, float y1, float x2, float y2) { return 0; } + + // draw right panel + virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) { }; + + // draw star + void draw_star(float x0, float y0); + + // Global initialization + static void init_ui(running_machine &machine); + + // get arrows status + template <typename _T1, typename _T2, typename _T3> + UINT32 get_arrow_flags(_T1 min, _T2 max, _T3 actual) + { + if (max == 0) + return 0; + else + return ((actual <= min) ? MENU_FLAG_RIGHT_ARROW : (actual >= max ? MENU_FLAG_LEFT_ARROW : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW))); + } + +protected: + int topline_datsview; // right box top line + int top_line; // main box top line + int l_sw_hover; + int l_hover; + int totallines; + int skip_main_items; + + // draw right box + float draw_right_box_title(float x1, float y1, float x2, float y2); + + // draw arrow + void draw_common_arrow(float origx1, float origy1, float origx2, float origy2, int current, int dmin, int dmax, float title); + void info_arrow(int ub, float origx1, float origx2, float oy1, float line_height, float text_size, float ud_arrow_width); + + // images render + std::string arts_render_common(float origx1, float origy1, float origx2, float origy2); + void arts_render_images(bitmap_argb32 *bitmap, float origx1, float origy1, float origx2, float origy2, bool software); + + int visible_lines; // main box visible lines + int right_visible_lines; // right box lines + + static std::unique_ptr<bitmap_argb32> snapx_bitmap; + static render_texture *snapx_texture; + + static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap; + static render_texture *hilight_main_texture; +private: + static std::unique_ptr<bitmap_argb32> no_avail_bitmap, bgrnd_bitmap, star_bitmap; +// static std::unique_ptr<bitmap_rgb32> hilight_main_bitmap; + static render_texture *bgrnd_texture, *star_texture; + static bitmap_argb32 *icons_bitmap[]; + static render_texture *icons_texture[]; + + // toolbar + static bitmap_argb32 *toolbar_bitmap[], *sw_toolbar_bitmap[]; + static render_texture *toolbar_texture[], *sw_toolbar_texture[]; + + // draw game list + void draw_select_game(bool noinput); + + // draw palette menu + void draw_palette_menu(); + + // draw dats menu + void draw_dats_menu(); + + void get_title_search(std::string &title, std::string &search); + + // handle keys + void handle_main_keys(UINT32 flags); + + // handle mouse + void handle_main_events(UINT32 flags); + + void draw_icon(int linenum, void *selectedref, float x1, float y1); }; #endif // __UI_MENU_H__ diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp index 1eaa9fe1366..0b41eed95bb 100644 --- a/src/emu/ui/miscmenu.cpp +++ b/src/emu/ui/miscmenu.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods +// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods,Dankan1890 /********************************************************************* miscmenu.c @@ -15,7 +15,7 @@ #include "ui/ui.h" #include "ui/menu.h" #include "ui/miscmenu.h" - +#include "ui/utils.h" /*************************************************************************** MENU HANDLERS @@ -434,9 +434,9 @@ void ui_menu_crosshair::populate() file_enumerator path(machine().options().crosshair_path()); const osd_directory_entry *dir; /* reset search flags */ - int using_default = false; - int finished = false; - int found = false; + bool using_default = false; + bool finished = false; + bool found = false; /* if we are using the default, then we just need to find the first in the list */ if (*(settings.name) == 0) @@ -556,3 +556,120 @@ void ui_menu_quit_game::handle() /* reset the menu stack */ ui_menu::stack_reset(machine()); } + +ui_menu_misc_options::misc_option ui_menu_misc_options::m_options[] = { + { 0, nullptr, nullptr }, + { 0, "Re-select last machine played", OPTION_REMEMBER_LAST }, + { 0, "Enlarge images in the right panel", OPTION_ENLARGE_SNAPS }, + { 0, "DATs info", OPTION_DATS_ENABLED }, + { 0, "Cheats", OPTION_CHEAT }, + { 0, "Show mouse pointer", OPTION_UI_MOUSE }, + { 0, "Confirm quit from machines", OPTION_UI_CONFIRM_QUIT }, + { 0, "Skip displaying information's screen at startup", OPTION_UI_SKIP_GAMEINFO }, + { 0, "Force 4:3 appearance for software snapshot", OPTION_FORCED4X3 }, + { 0, "Use image as background", OPTION_USE_BACKGROUND }, + { 0, "Skip bios selection menu", OPTION_SKIP_BIOS_MENU }, + { 0, "Skip software parts selection menu", OPTION_SKIP_PARTS_MENU } +}; + +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- + +ui_menu_misc_options::ui_menu_misc_options(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ + for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) + m_options[d].status = machine.ui().options().bool_value(m_options[d].option); +} + +ui_menu_misc_options::~ui_menu_misc_options() +{ + std::string error_string; + for (int d = 1; d < ARRAY_LENGTH(m_options); ++d) { + if (machine().ui().options().exists(m_options[d].option)) + { + machine().ui().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string); + } + else { + if (machine().options().bool_value(m_options[d].option) != m_options[d].status) + { + machine().options().set_value(m_options[d].option, m_options[d].status, OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(m_options[d].option); + } + } + } + ui_globals::reset = true; +} + +//------------------------------------------------- +// handlethe options menu +//------------------------------------------------- + +void ui_menu_misc_options::handle() +{ + bool changed = false; + + // process the menu + const ui_menu_event *m_event = process(0); + if (m_event != nullptr && m_event->itemref != nullptr) + { + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT) + { + changed = true; + int value = (FPTR)m_event->itemref; + if (!strcmp(m_options[value].option, OPTION_ENLARGE_SNAPS)) + ui_globals::switch_image = true; + m_options[value].status = !m_options[value].status; + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_misc_options::populate() +{ + // add options items + for (int opt = 1; opt < ARRAY_LENGTH(m_options); ++opt) + item_append(m_options[opt].description, m_options[opt].status ? "On" : "Off", m_options[opt].status ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)opt); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_misc_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + + mui.draw_text_full(container, "Miscellaneous Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + float maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, "Miscellaneous Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} diff --git a/src/emu/ui/miscmenu.h b/src/emu/ui/miscmenu.h index ea75897edde..f43c4a6b2ba 100644 --- a/src/emu/ui/miscmenu.h +++ b/src/emu/ui/miscmenu.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods +// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods,Dankan1890 /*************************************************************************** ui/miscmenu.h @@ -85,4 +85,27 @@ public: virtual void handle() override; }; +//------------------------------------------------- +// class miscellaneous options menu +//------------------------------------------------- +class ui_menu_misc_options : public ui_menu +{ +public: + ui_menu_misc_options(running_machine &machine, render_container *container); + virtual ~ui_menu_misc_options(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + struct misc_option + { + bool status; + const char *description; + const char *option; + }; + + static misc_option m_options[]; +}; + #endif /* __UI_MISCMENU_H__ */ diff --git a/src/emu/ui/moptions.cpp b/src/emu/ui/moptions.cpp new file mode 100644 index 00000000000..dd4897749fc --- /dev/null +++ b/src/emu/ui/moptions.cpp @@ -0,0 +1,92 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/moptions.c + + UI main options manager. + +***************************************************************************/ + +#include "emu.h" +#include "ui/moptions.h" + + +//************************************************************************** +// UI EXTRA OPTIONS +//************************************************************************** + +const options_entry ui_options::s_option_entries[] = +{ + // seach path options + { nullptr, nullptr, OPTION_HEADER, "UI SEARCH PATH OPTIONS" }, + { OPTION_HISTORY_PATH, "history;dats;.", OPTION_STRING, "path to history files" }, + { OPTION_EXTRAINI_PATH, "folders", OPTION_STRING, "path to extra ini files" }, + { OPTION_CABINETS_PATH, "cabinets;cabdevs", OPTION_STRING, "path to cabinets / devices image" }, + { OPTION_CPANELS_PATH, "cpanel", OPTION_STRING, "path to control panel image" }, + { OPTION_PCBS_PATH, "pcb", OPTION_STRING, "path to pcbs image" }, + { OPTION_FLYERS_PATH, "flyers", OPTION_STRING, "path to flyers image" }, + { OPTION_TITLES_PATH, "titles", OPTION_STRING, "path to titles image" }, + { OPTION_ENDS_PATH, "ends", OPTION_STRING, "path to ends image" }, + { OPTION_MARQUEES_PATH, "marquees", OPTION_STRING, "path to marquees image" }, + { OPTION_ARTPREV_PATH, "artwork preview", OPTION_STRING, "path to artwork preview image" }, + { OPTION_BOSSES_PATH, "bosses", OPTION_STRING, "path to bosses image" }, + { OPTION_LOGOS_PATH, "logo", OPTION_STRING, "path to logos image" }, + { OPTION_SCORES_PATH, "scores", OPTION_STRING, "path to scores image" }, + { OPTION_VERSUS_PATH, "versus", OPTION_STRING, "path to versus image" }, + { OPTION_GAMEOVER_PATH, "gameover", OPTION_STRING, "path to gameover image" }, + { OPTION_HOWTO_PATH, "howto", OPTION_STRING, "path to howto image" }, + { OPTION_SELECT_PATH, "select", OPTION_STRING, "path to select image" }, + { OPTION_ICONS_PATH, "icons", OPTION_STRING, "path to ICOns image" }, + { OPTION_UI_PATH, "ui", OPTION_STRING, "path to UI files" }, + + // misc options + { nullptr, nullptr, OPTION_HEADER, "UI MISC OPTIONS" }, + { OPTION_DATS_ENABLED, "1", OPTION_BOOLEAN, "enable DATs support" }, + { OPTION_REMEMBER_LAST, "1", OPTION_BOOLEAN, "reselect in main menu last played game" }, + { OPTION_ENLARGE_SNAPS, "1", OPTION_BOOLEAN, "enlarge arts (snapshot, title, etc...) in right panel (keeping aspect ratio)" }, + { OPTION_FORCED4X3, "1", OPTION_BOOLEAN, "force the appearance of the snapshot in the list software to 4:3" }, + { OPTION_USE_BACKGROUND, "1", OPTION_BOOLEAN, "enable background image in main view" }, + { OPTION_SKIP_BIOS_MENU, "0", OPTION_BOOLEAN, "skip bios submenu, start with configured or default" }, + { OPTION_SKIP_PARTS_MENU, "0", OPTION_BOOLEAN, "skip parts submenu, start with first part" }, + { OPTION_LAST_USED_FILTER, "", OPTION_STRING, "latest used filter" }, + { OPTION_LAST_USED_MACHINE, "", OPTION_STRING, "latest used machine" }, + { OPTION_INFO_AUTO_AUDIT, "0", OPTION_BOOLEAN, "enable auto audit in the general info panel" }, + { OPTION_UI_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" }, + { OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" }, + { OPTION_UI_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" }, + { OPTION_UI_MOUSE, "1", OPTION_BOOLEAN, "display ui mouse cursor" }, + + // UI options + { nullptr, nullptr, OPTION_HEADER, "UI OPTIONS" }, + { OPTION_INFOS_SIZE "(0.05-1.00)", "0.75", OPTION_FLOAT, "UI right panel infos text size (0.05 - 1.00)" }, + { OPTION_FONT_ROWS "(25-40)", "30", OPTION_INTEGER, "UI font text size (25 - 40)" }, + { OPTION_HIDE_PANELS "(0-3)", "0", OPTION_INTEGER, "UI hide left/right panel in main view (0 = Show all, 1 = hide left, 2 = hide right, 3 = hide both" }, + { OPTION_UI_BORDER_COLOR, "ffffffff", OPTION_STRING, "UI border color (ARGB)" }, + { OPTION_UI_BACKGROUND_COLOR, "ef101030", OPTION_STRING, "UI background color (ARGB)" }, + { OPTION_UI_CLONE_COLOR, "ff808080", OPTION_STRING, "UI clone color (ARGB)" }, + { OPTION_UI_DIPSW_COLOR, "ffffff00", OPTION_STRING, "UI dipswitch color (ARGB)" }, + { OPTION_UI_GFXVIEWER_BG_COLOR, "ef101030", OPTION_STRING, "UI gfx viewer color (ARGB)" }, + { OPTION_UI_MOUSEDOWN_BG_COLOR, "b0606000", OPTION_STRING, "UI mouse down bg color (ARGB)" }, + { OPTION_UI_MOUSEDOWN_COLOR, "ffffff80", OPTION_STRING, "UI mouse down color (ARGB)" }, + { OPTION_UI_MOUSEOVER_BG_COLOR, "70404000", OPTION_STRING, "UI mouse over bg color (ARGB)" }, + { OPTION_UI_MOUSEOVER_COLOR, "ffffff80", OPTION_STRING, "UI mouse over color (ARGB)" }, + { OPTION_UI_SELECTED_BG_COLOR, "ef808000", OPTION_STRING, "UI selected bg color (ARGB)" }, + { OPTION_UI_SELECTED_COLOR, "ffffff00", OPTION_STRING, "UI selected color (ARGB)" }, + { OPTION_UI_SLIDER_COLOR, "ffffffff", OPTION_STRING, "UI slider color (ARGB)" }, + { OPTION_UI_SUBITEM_COLOR, "ffffffff", OPTION_STRING, "UI subitem color (ARGB)" }, + { OPTION_UI_TEXT_BG_COLOR, "ef000000", OPTION_STRING, "UI text bg color (ARGB)" }, + { OPTION_UI_TEXT_COLOR, "ffffffff", OPTION_STRING, "UI text color (ARGB)" }, + { OPTION_UI_UNAVAILABLE_COLOR, "ff404040", OPTION_STRING, "UI unavailable color (ARGB)" }, + { nullptr } +}; + +//------------------------------------------------- +// ui_options - constructor +//------------------------------------------------- + +ui_options::ui_options() +: core_options() +{ + add_entries(ui_options::s_option_entries); +} diff --git a/src/emu/ui/moptions.h b/src/emu/ui/moptions.h new file mode 100644 index 00000000000..3b1ab8948c0 --- /dev/null +++ b/src/emu/ui/moptions.h @@ -0,0 +1,148 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/moptions.h + + UI main options manager. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_OPTS_H__ +#define __UI_OPTS_H__ + +#include "options.h" + +// core directory options +#define OPTION_HISTORY_PATH "historypath" +#define OPTION_EXTRAINI_PATH "extrainipath" +#define OPTION_CABINETS_PATH "cabinets_directory" +#define OPTION_CPANELS_PATH "cpanels_directory" +#define OPTION_PCBS_PATH "pcbs_directory" +#define OPTION_FLYERS_PATH "flyers_directory" +#define OPTION_TITLES_PATH "titles_directory" +#define OPTION_ENDS_PATH "ends_directory" +#define OPTION_MARQUEES_PATH "marquees_directory" +#define OPTION_ARTPREV_PATH "artwork_preview_directory" +#define OPTION_BOSSES_PATH "bosses_directory" +#define OPTION_LOGOS_PATH "logos_directory" +#define OPTION_SCORES_PATH "scores_directory" +#define OPTION_VERSUS_PATH "versus_directory" +#define OPTION_GAMEOVER_PATH "gameover_directory" +#define OPTION_HOWTO_PATH "howto_directory" +#define OPTION_SELECT_PATH "select_directory" +#define OPTION_ICONS_PATH "icons_directory" +#define OPTION_UI_PATH "ui_path" + +// core misc options +#define OPTION_DATS_ENABLED "dats_enabled" +#define OPTION_REMEMBER_LAST "remember_last" +#define OPTION_ENLARGE_SNAPS "enlarge_snaps" +#define OPTION_FORCED4X3 "forced4x3" +#define OPTION_USE_BACKGROUND "use_background" +#define OPTION_SKIP_BIOS_MENU "skip_biosmenu" +#define OPTION_SKIP_PARTS_MENU "skip_partsmenu" +#define OPTION_LAST_USED_FILTER "last_used_filter" +#define OPTION_LAST_USED_MACHINE "last_used_machine" +#define OPTION_INFO_AUTO_AUDIT "info_audit_enabled" + +// core UI options +#define OPTION_INFOS_SIZE "infos_text_size" +#define OPTION_FONT_ROWS "font_rows" +#define OPTION_HIDE_PANELS "hide_main_panel" + +#define OPTION_UI_BORDER_COLOR "ui_border_color" +#define OPTION_UI_BACKGROUND_COLOR "ui_bg_color" +#define OPTION_UI_GFXVIEWER_BG_COLOR "ui_gfxviewer_color" +#define OPTION_UI_UNAVAILABLE_COLOR "ui_unavail_color" +#define OPTION_UI_TEXT_COLOR "ui_text_color" +#define OPTION_UI_TEXT_BG_COLOR "ui_text_bg_color" +#define OPTION_UI_SUBITEM_COLOR "ui_subitem_color" +#define OPTION_UI_CLONE_COLOR "ui_clone_color" +#define OPTION_UI_SELECTED_COLOR "ui_selected_color" +#define OPTION_UI_SELECTED_BG_COLOR "ui_selected_bg_color" +#define OPTION_UI_MOUSEOVER_COLOR "ui_mouseover_color" +#define OPTION_UI_MOUSEOVER_BG_COLOR "ui_mouseover_bg_color" +#define OPTION_UI_MOUSEDOWN_COLOR "ui_mousedown_color" +#define OPTION_UI_MOUSEDOWN_BG_COLOR "ui_mousedown_bg_color" +#define OPTION_UI_DIPSW_COLOR "ui_dipsw_color" +#define OPTION_UI_SLIDER_COLOR "ui_slider_color" + +#define OPTION_UI_FONT "uifont" +#define OPTION_UI_CONFIRM_QUIT "confirm_quit" +#define OPTION_UI_MOUSE "ui_mouse" +#define OPTION_UI_SKIP_GAMEINFO "skip_gameinfo" + + +class ui_options : public core_options +{ +public: + // construction/destruction + ui_options(); + + // Search path options + const char *history_path() const { return value(OPTION_HISTORY_PATH); } + const char *extraini_path() const { return value(OPTION_EXTRAINI_PATH); } + const char *cabinets_directory() const { return value(OPTION_CABINETS_PATH); } + const char *cpanels_directory() const { return value(OPTION_CPANELS_PATH); } + const char *pcbs_directory() const { return value(OPTION_PCBS_PATH); } + const char *flyers_directory() const { return value(OPTION_FLYERS_PATH); } + const char *titles_directory() const { return value(OPTION_TITLES_PATH); } + const char *ends_directory() const { return value(OPTION_ENDS_PATH); } + const char *marquees_directory() const { return value(OPTION_MARQUEES_PATH); } + const char *artprev_directory() const { return value(OPTION_ARTPREV_PATH); } + const char *bosses_directory() const { return value(OPTION_BOSSES_PATH); } + const char *logos_directory() const { return value(OPTION_LOGOS_PATH); } + const char *scores_directory() const { return value(OPTION_SCORES_PATH); } + const char *versus_directory() const { return value(OPTION_VERSUS_PATH); } + const char *gameover_directory() const { return value(OPTION_GAMEOVER_PATH); } + const char *howto_directory() const { return value(OPTION_HOWTO_PATH); } + const char *select_directory() const { return value(OPTION_SELECT_PATH); } + const char *icons_directory() const { return value(OPTION_ICONS_PATH); } + const char *ui_path() const { return value(OPTION_UI_PATH); } + + // Misc options + bool enabled_dats() const { return bool_value(OPTION_DATS_ENABLED); } + bool remember_last() const { return bool_value(OPTION_REMEMBER_LAST); } + bool enlarge_snaps() const { return bool_value(OPTION_ENLARGE_SNAPS); } + bool forced_4x3_snapshot() const { return bool_value(OPTION_FORCED4X3); } + bool use_background_image() const { return bool_value(OPTION_USE_BACKGROUND); } + bool skip_bios_menu() const { return bool_value(OPTION_SKIP_BIOS_MENU); } + bool skip_parts_menu() const { return bool_value(OPTION_SKIP_PARTS_MENU); } + const char *last_used_machine() const { return value(OPTION_LAST_USED_MACHINE); } + const char *last_used_filter() const { return value(OPTION_LAST_USED_FILTER); } + bool info_audit() const { return bool_value(OPTION_INFO_AUTO_AUDIT); } + + // UI options + float infos_size() const { return float_value(OPTION_INFOS_SIZE); } + int font_rows() const { return int_value(OPTION_FONT_ROWS); } + int hide_panels() const { return int_value(OPTION_HIDE_PANELS); } + + const char *ui_border_color() const { return value(OPTION_UI_BORDER_COLOR); } + const char *ui_bg_color() const { return value(OPTION_UI_BACKGROUND_COLOR); } + const char *ui_gfx_bg_color() const { return value(OPTION_UI_GFXVIEWER_BG_COLOR); } + const char *ui_unavail_color() const { return value(OPTION_UI_UNAVAILABLE_COLOR); } + const char *ui_text_color() const { return value(OPTION_UI_TEXT_COLOR); } + const char *ui_text_bg_color() const { return value(OPTION_UI_TEXT_BG_COLOR); } + const char *ui_subitem_color() const { return value(OPTION_UI_SUBITEM_COLOR); } + const char *ui_clone_color() const { return value(OPTION_UI_CLONE_COLOR); } + const char *ui_selected_color() const { return value(OPTION_UI_SELECTED_COLOR); } + const char *ui_selected_bg_color() const { return value(OPTION_UI_SELECTED_BG_COLOR); } + const char *ui_mouseover_color() const { return value(OPTION_UI_MOUSEOVER_COLOR); } + const char *ui_mouseover_bg_color() const { return value(OPTION_UI_MOUSEOVER_BG_COLOR); } + const char *ui_mousedown_color() const { return value(OPTION_UI_MOUSEDOWN_COLOR); } + const char *ui_mousedown_bg_color() const { return value(OPTION_UI_MOUSEDOWN_BG_COLOR); } + const char *ui_dipsw_color() const { return value(OPTION_UI_DIPSW_COLOR); } + const char *ui_slider_color() const { return value(OPTION_UI_SLIDER_COLOR); } + + bool skip_gameinfo() const { return bool_value(OPTION_UI_SKIP_GAMEINFO); } + const char *ui_font() const { return value(OPTION_UI_FONT); } + bool confirm_quit() const { return bool_value(OPTION_UI_CONFIRM_QUIT); } + bool ui_mouse() const { return bool_value(OPTION_UI_MOUSE); } +private: + static const options_entry s_option_entries[]; +}; + +#endif /* __UI_OPTS_H__ */ diff --git a/src/emu/ui/optsmenu.cpp b/src/emu/ui/optsmenu.cpp new file mode 100644 index 00000000000..44ed9e11a37 --- /dev/null +++ b/src/emu/ui/optsmenu.cpp @@ -0,0 +1,308 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/optsmenu.cpp + + UI main options menu manager. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "ui/datfile.h" +#include "ui/inifile.h" +#include "ui/selector.h" +#include "ui/custui.h" +#include "ui/sndmenu.h" +#include "ui/ctrlmenu.h" +#include "ui/dsplmenu.h" +#include "ui/miscmenu.h" +#include "ui/optsmenu.h" +#include "ui/custmenu.h" +#include "ui/inputmap.h" +#include "rendfont.h" + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_game_options::ui_menu_game_options(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_game_options::~ui_menu_game_options() +{ + ui_menu::menu_stack->reset(UI_MENU_RESET_SELECT_FIRST); + save_ui_options(machine()); + ui_globals::switch_image = true; +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_game_options::handle() +{ + bool changed = false; + + // process the menu +// ui_menu::menu_stack->parent->process(UI_MENU_PROCESS_NOINPUT); +// const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT | UI_MENU_PROCESS_NOIMAGE); + const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT); + + if (m_event != nullptr && m_event->itemref != nullptr) + switch ((FPTR)m_event->itemref) + { + case FILTER_MENU: + { + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_RIGHT) ? ++main_filters::actual : --main_filters::actual; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + { + int total = main_filters::length; + std::vector<std::string> s_sel(total); + for (int index = 0; index < total; ++index) + s_sel[index] = main_filters::text[index]; + + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, main_filters::actual)); + } + break; + } + case FILE_CATEGORY_FILTER: + { + if (m_event->iptkey == IPT_UI_LEFT) + { + machine().inifile().current_file--; + machine().inifile().current_category = 0; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT) + { + machine().inifile().current_file++; + machine().inifile().current_category = 0; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + { + inifile_manager &ifile = machine().inifile(); + int total = ifile.ini_index.size(); + std::vector<std::string> s_sel(total); + machine().inifile().current_category = 0; + for (size_t index = 0; index < total; ++index) + s_sel[index] = ifile.ini_index[index].name; + + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, ifile.current_file, SELECTOR_INIFILE)); + } + break; + } + case CATEGORY_FILTER: + { + if (m_event->iptkey == IPT_UI_LEFT) + { + machine().inifile().current_category--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_RIGHT) + { + machine().inifile().current_category++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + { + inifile_manager &ifile = machine().inifile(); + int cfile = ifile.current_file; + int total = ifile.ini_index[cfile].category.size(); + std::vector<std::string> s_sel(total); + for (int index = 0; index < total; ++index) + s_sel[index] = ifile.ini_index[cfile].category[index].name; + + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, ifile.current_category, SELECTOR_CATEGORY)); + } + break; + } + case MANUFACT_CAT_FILTER: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_RIGHT) ? c_mnfct::actual++ : c_mnfct::actual--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_mnfct::ui, c_mnfct::actual)); + + break; + case YEAR_CAT_FILTER: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_RIGHT) ? c_year::actual++ : c_year::actual--; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_year::ui, c_year::actual)); + + break; + case MISC_MENU: + if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_misc_options>(machine(), container)); + break; + case SOUND_MENU: + if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_sound_options>(machine(), container)); + break; + case DISPLAY_MENU: + if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_display_options>(machine(), container)); + break; + case CUSTOM_MENU: + if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_custom_ui>(machine(), container)); + break; + case CONTROLLER_MENU: + if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_controller_mapping>(machine(), container)); + break; + + case CGI_MENU: + if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_input_groups>(machine(), container)); + break; + + case CUSTOM_FILTER: + if (m_event->iptkey == IPT_UI_SELECT) + ui_menu::stack_push(global_alloc_clear<ui_menu_custom_filter>(machine(), container)); + break; + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_game_options::populate() +{ + if (strcmp(machine().options().ui(),"simple")!=0) + { + // set filter arrow + std::string fbuff; + + // add filter item + UINT32 arrow_flags = get_arrow_flags((int)FILTER_FIRST, (int)FILTER_LAST, main_filters::actual); + item_append("Filter", main_filters::text[main_filters::actual], arrow_flags, (void *)(FPTR)FILTER_MENU); + + // add category subitem + if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty()) + { + inifile_manager &inif = machine().inifile(); + int afile = inif.current_file; + + arrow_flags = get_arrow_flags(0, inif.ini_index.size() - 1, afile); + fbuff = " ^!File"; + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), inif.actual_file().c_str(), arrow_flags, (void *)(FPTR)FILE_CATEGORY_FILTER); + + arrow_flags = get_arrow_flags(0, inif.ini_index[afile].category.size() - 1, inif.current_category); + fbuff = " ^!Category"; + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), inif.actual_category().c_str(), arrow_flags, (void *)(FPTR)CATEGORY_FILTER); + } + // add manufacturer subitem + else if (main_filters::actual == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0) + { + arrow_flags = get_arrow_flags(0, c_mnfct::ui.size() - 1, c_mnfct::actual); + fbuff = "^!Manufacturer"; + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), c_mnfct::ui[c_mnfct::actual].c_str(), arrow_flags, (void *)(FPTR)MANUFACT_CAT_FILTER); + } + // add year subitem + else if (main_filters::actual == FILTER_YEAR && c_year::ui.size() > 0) + { + arrow_flags = get_arrow_flags(0, c_year::ui.size() - 1, c_year::actual); + fbuff.assign("^!Year"); + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), c_year::ui[c_year::actual].c_str(), arrow_flags, (void *)(FPTR)YEAR_CAT_FILTER); + } + // add custom subitem + else if (main_filters::actual == FILTER_CUSTOM) + { + fbuff = "^!Setup custom filter"; + convert_command_glyph(fbuff); + item_append(fbuff.c_str(), nullptr, 0, (void *)(FPTR)CUSTOM_FILTER); + } + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + // add options items + item_append("Customize UI", nullptr, 0, (void *)(FPTR)CUSTOM_MENU); + } + item_append("Display Options", nullptr, 0, (void *)(FPTR)DISPLAY_MENU); + item_append("Sound Options", nullptr, 0, (void *)(FPTR)SOUND_MENU); + item_append("Miscellaneous Options", nullptr, 0, (void *)(FPTR)MISC_MENU); + item_append("Device Mapping", nullptr, 0, (void *)(FPTR)CONTROLLER_MENU); + item_append("General Inputs", nullptr, 0, (void *)(FPTR)CGI_MENU); + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + custombottom = 2.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; + customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_game_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + mui.draw_text_full(container, "Settings", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + float maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, "Settings", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} + +//------------------------------------------------- +// save ui options +//------------------------------------------------- + +void save_ui_options(running_machine &machine) +{ + // attempt to open the output file + emu_file file(machine.options().ini_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + if (file.open("ui.ini") == FILERR_NONE) + { + // generate the updated INI + std::string initext = machine.ui().options().output_ini(); + file.puts(initext.c_str()); + file.close(); + } + else + machine.popmessage("**Error to save ui.ini**", emulator_info::get_configname()); +} diff --git a/src/emu/ui/optsmenu.h b/src/emu/ui/optsmenu.h new file mode 100644 index 00000000000..13e857ec7ba --- /dev/null +++ b/src/emu/ui/optsmenu.h @@ -0,0 +1,47 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/optsmenu.h + + UI main options menu manager. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_OPTSMENU_H__ +#define __UI_OPTSMENU_H__ + +class ui_menu_game_options : public ui_menu +{ +public: + ui_menu_game_options(running_machine &machine, render_container *container); + virtual ~ui_menu_game_options(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + enum + { + FILTER_MENU = 1, + FILE_CATEGORY_FILTER, + MANUFACT_CAT_FILTER, + YEAR_CAT_FILTER, + CATEGORY_FILTER, + MISC_MENU, + DISPLAY_MENU, + CUSTOM_MENU, + SOUND_MENU, + CONTROLLER_MENU, + SAVE_OPTIONS, + CGI_MENU, + CUSTOM_FILTER + }; +}; + +// save options to file +void save_ui_options(running_machine &machine); + +#endif /* __UI_OPTSMENU_H__ */ diff --git a/src/emu/ui/selector.cpp b/src/emu/ui/selector.cpp new file mode 100644 index 00000000000..c9cc3c7b6c0 --- /dev/null +++ b/src/emu/ui/selector.cpp @@ -0,0 +1,244 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/m_selector.cpp + + Internal UI user interface. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "ui/selector.h" +#include "ui/inifile.h" + +//------------------------------------------------- +// ctor / dtor +//------------------------------------------------- + +ui_menu_selector::ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> s_sel, UINT16 &s_actual, int category, int _hover) + : ui_menu(machine, container), m_selector(s_actual) +{ + m_category = category; + m_first_pass = true; + m_hover = _hover; + m_str_items = s_sel; + m_search[0] = '\0'; + m_searchlist[0] = nullptr; +} + +ui_menu_selector::~ui_menu_selector() +{ +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_selector::handle() +{ + // process the menu + const ui_menu_event *m_event = process(0); + + if (m_event != nullptr && m_event->itemref != nullptr) + { + if (m_event->iptkey == IPT_UI_SELECT) + { + for (size_t idx = 0; idx < m_str_items.size(); ++idx) + if ((void*)&m_str_items[idx] == m_event->itemref) + m_selector = idx; + + switch (m_category) + { + case SELECTOR_INIFILE: + machine().inifile().current_file = m_selector; + machine().inifile().current_category = 0; + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_REMEMBER_REF); + break; + + case SELECTOR_CATEGORY: + machine().inifile().current_category = m_selector; + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_REMEMBER_REF); + break; + + case SELECTOR_GAME: + main_filters::actual = m_hover; + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST); + break; + + case SELECTOR_SOFTWARE: + sw_filters::actual = m_hover; + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_SELECT_FIRST); + break; + + default: + ui_menu::menu_stack->parent->reset(UI_MENU_RESET_REMEMBER_REF); + break; + } + + ui_globals::switch_image = true; + ui_menu::stack_pop(machine()); + } + else if (m_event->iptkey == IPT_SPECIAL) + { + int buflen = strlen(m_search); + + // if it's a backspace and we can handle it, do so + if ((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0) + { + *(char *)utf8_previous_char(&m_search[buflen]) = 0; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + // if it's any other key and we're not maxed out, update + else if (m_event->unichar >= ' ' && m_event->unichar < 0x7f) + { + buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar); + m_search[buflen] = 0; + reset(UI_MENU_RESET_SELECT_FIRST); + } + } + + // escape pressed with non-empty text clears the text + else if (m_event->iptkey == IPT_UI_CANCEL && m_search[0] != 0) + { + m_search[0] = '\0'; + reset(UI_MENU_RESET_SELECT_FIRST); + } + } +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_selector::populate() +{ + if (m_search[0] != 0) + { + find_matches(m_search); + + for (int curitem = 0; m_searchlist[curitem]; ++curitem) + item_append(m_searchlist[curitem]->c_str(), nullptr, 0, (void *)m_searchlist[curitem]); + } + else + { + for (size_t index = 0, added = 0; index < m_str_items.size(); ++index) + if (m_str_items[index] != "_skip_") + { + if (m_first_pass && m_selector == index) + selected = added; + + added++; + item_append(m_str_items[index].c_str(), nullptr, 0, (void *)&m_str_items[index]); + } + } + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; + m_first_pass = false; +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_selector::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + std::string tempbuf = std::string("Selection List - Search: ").append(m_search).append("_"); + + // get the size of the text + mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += (2.0f * UI_BOX_LR_BORDER) + 0.01f; + float maxwidth = MAX(width, origx2 - origx1); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + // bottom text + // get the text for 'UI Select' + std::string ui_select_text = machine().input().seq_name(machine().ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD)); + tempbuf.assign("Double click or press ").append(ui_select_text).append(" to select"); + + mui.draw_text_full(container, tempbuf.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = origy2 + UI_BOX_TB_BORDER; + y2 = origy2 + bottom; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_RED_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, tempbuf.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} + +//------------------------------------------------- +// find approximate matches +//------------------------------------------------- + +void ui_menu_selector::find_matches(const char *str) +{ + // allocate memory to track the penalty value + std::vector<int> penalty(VISIBLE_GAMES_IN_SEARCH, 9999); + int index = 0; + + for (; index < m_str_items.size(); ++index) + { + if (m_str_items[index] == "_skip_") + continue; + + // pick the best match between driver name and description + int curpenalty = fuzzy_substring(str, m_str_items[index]); + + // insert into the sorted table of matches + for (int matchnum = VISIBLE_GAMES_IN_SEARCH - 1; matchnum >= 0; --matchnum) + { + // stop if we're worse than the current entry + if (curpenalty >= penalty[matchnum]) + break; + + // as long as this isn't the last entry, bump this one down + if (matchnum < VISIBLE_GAMES_IN_SEARCH - 1) + { + penalty[matchnum + 1] = penalty[matchnum]; + m_searchlist[matchnum + 1] = m_searchlist[matchnum]; + } + + m_searchlist[matchnum] = &m_str_items[index]; + penalty[matchnum] = curpenalty; + } + } + (index < VISIBLE_GAMES_IN_SEARCH) ? m_searchlist[index] = nullptr : m_searchlist[VISIBLE_GAMES_IN_SEARCH] = nullptr; +} diff --git a/src/emu/ui/selector.h b/src/emu/ui/selector.h new file mode 100644 index 00000000000..595ca1f578d --- /dev/null +++ b/src/emu/ui/selector.h @@ -0,0 +1,51 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/selector.h + + Internal UI user interface. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_SELECTOR_H__ +#define __UI_SELECTOR_H__ + +enum +{ + SELECTOR_INIFILE = 1, + SELECTOR_CATEGORY, + SELECTOR_GAME, + SELECTOR_SOFTWARE +}; + +//------------------------------------------------- +// class selector menu +//------------------------------------------------- + +class ui_menu_selector : public ui_menu +{ +public: + ui_menu_selector(running_machine &machine, render_container *container, std::vector<std::string> _sel, UINT16 &_actual, int _category = 0, int _hover = 0); + virtual ~ui_menu_selector(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + + virtual bool menu_has_search_active() override { return (m_search[0] != 0); } + +private: + enum { VISIBLE_GAMES_IN_SEARCH = 200 }; + char m_search[40]; + UINT16 &m_selector; + int m_category, m_hover; + bool m_first_pass; + std::vector<std::string> m_str_items; + std::string *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1]; + + void find_matches(const char *str); +}; + +#endif /* __UI_SELECTOR_H__ */ diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp index 9a080df6655..9614061c6cf 100644 --- a/src/emu/ui/selgame.cpp +++ b/src/emu/ui/selgame.cpp @@ -1,12 +1,12 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods -/*************************************************************************** +// copyright-holders:Dankan1890 +/********************************************************************* - ui/selgame.c + ui/selgame.cpp - Game selector + Main UI menu. -***************************************************************************/ +*********************************************************************/ #include "emu.h" #include "emuopts.h" @@ -14,294 +14,754 @@ #include "ui/menu.h" #include "uiinput.h" #include "ui/selgame.h" -#include "ui/inputmap.h" #include "ui/miscmenu.h" #include "audit.h" -#include <ctype.h> - +#include "ui/datfile.h" +#include "ui/inifile.h" +#include "rendfont.h" +#include "ui/datmenu.h" +#include "ui/dirmenu.h" +#include "ui/optsmenu.h" +#include "ui/selector.h" +#include "ui/selsoft.h" +#include "sound/samples.h" +#include "ui/custmenu.h" +#include "../info.h" +#include "ui/auditmenu.h" +#include "rendutil.h" +#include "softlist.h" +#include <algorithm> + +extern const char UI_VERSION_TAG[]; + +static bool first_start = true; +static const char *dats_info[] = { "General Info", "History", "Mameinfo", "Sysinfo", "Messinfo", "Command", "Mamescore" }; + +std::vector<const game_driver *> ui_menu_select_game::m_sortedlist; +int ui_menu_select_game::m_isabios = 0; //------------------------------------------------- -// ctor +// sort //------------------------------------------------- -ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename) : ui_menu(machine, container), m_driverlist(driver_list::total() + 1) +inline int c_stricmp(const char *s1, const char *s2) { - build_driver_list(); - if(gamename) - strcpy(m_search, gamename); - m_matchlist[0] = -1; + for (;;) + { + int c1 = tolower((UINT8)*s1++); + int c2 = tolower((UINT8)*s2++); + if (c1 == 0 || c1 != c2) + return c1 - c2; + } } +bool sort_game_list(const game_driver *x, const game_driver *y) +{ + bool clonex = strcmp(x->parent, "0"); + bool cloney = strcmp(y->parent, "0"); + + if (!clonex && !cloney) + return (c_stricmp(x->description, y->description) < 0); + + int cx = -1, cy = -1; + if (clonex) + { + cx = driver_list::find(x->parent); + if (cx == -1 || (driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0) + clonex = false; + } + + if (cloney) + { + cy = driver_list::find(y->parent); + if (cy == -1 || (driver_list::driver(cy).flags & MACHINE_IS_BIOS_ROOT) != 0) + cloney = false; + } + + if (!clonex && !cloney) + return (c_stricmp(x->description, y->description) < 0); + + else if (clonex && cloney) + { + if (!c_stricmp(x->parent, y->parent)) + return (c_stricmp(x->description, y->description) < 0); + else + return (c_stricmp(driver_list::driver(cx).description, driver_list::driver(cy).description) < 0); + } + else if (!clonex && cloney) + { + if (!c_stricmp(x->name, y->parent)) + return true; + else + return (c_stricmp(x->description, driver_list::driver(cy).description) < 0); + } + else + { + if (!c_stricmp(x->parent, y->name)) + return false; + else + return (c_stricmp(driver_list::driver(cx).description, y->description) < 0); + } +} //------------------------------------------------- -// dtor +// save main option //------------------------------------------------- -ui_menu_select_game::~ui_menu_select_game() +void save_main_option(running_machine &machine) { -} + // parse the file + std::string error; + emu_options options(machine.options()); // This way we make sure that all OSD parts are in + std::string error_string; + + // attempt to open the main ini file + { + emu_file file(machine.options().ini_path(), OPEN_FLAG_READ); + if (file.open(emulator_info::get_configname(), ".ini") == FILERR_NONE) + { + bool result = options.parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); + if (!result) + { + osd_printf_error("**Error to load %s.ini**", emulator_info::get_configname()); + return; + } + } + } + for (emu_options::entry *f_entry = machine.options().first(); f_entry != nullptr; f_entry = f_entry->next()) + { + if (f_entry->is_changed()) + { + options.set_value(f_entry->name(), f_entry->value(), OPTION_PRIORITY_CMDLINE, error_string); + } + } + // attempt to open the output file + { + emu_file file(machine.options().ini_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + if (file.open(emulator_info::get_configname(), ".ini") == FILERR_NONE) + { + // generate the updated INI + std::string initext = options.output_ini(); + file.puts(initext.c_str()); + file.close(); + } + else { + machine.popmessage("**Error to save %s.ini**", emulator_info::get_configname()); + return; + } + } + machine.ui().popup_time(3, "\n Configuration saved \n\n"); +} //------------------------------------------------- -// build_driver_list - build a list of available -// drivers +// ctor //------------------------------------------------- -void ui_menu_select_game::build_driver_list() +ui_menu_select_game::ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename) : ui_menu(machine, container) { - // start with an empty list - m_drivlist = std::make_unique<driver_enumerator>(machine().options()); - m_drivlist->exclude_all(); + std::string error_string, last_filter, sub_filter; + ui_options &moptions = machine.ui().options(); - // open a path to the ROMs and find them in the array - file_enumerator path(machine().options().media_path()); - const osd_directory_entry *dir; + // load drivers cache + init_sorted_list(); - // iterate while we get new objects + // check if there are available icons + ui_globals::has_icons = false; + file_enumerator path(moptions.icons_directory()); + const osd_directory_entry *dir; while ((dir = path.next()) != nullptr) { - char drivername[50]; - char *dst = drivername; - const char *src; + std::string src(dir->name); + if (src.find(".ico") != std::string::npos || src.find("icons") != std::string::npos) + { + ui_globals::has_icons = true; + break; + } + } - // build a name for it - for (src = dir->name; *src != 0 && *src != '.' && dst < &drivername[ARRAY_LENGTH(drivername) - 1]; src++) - *dst++ = tolower((UINT8)*src); - *dst = 0; + // build drivers list + if (!load_available_machines()) + build_available_list(); + + // load custom filter + load_custom_filters(); + + if (first_start) + { + reselect_last::driver = moptions.last_used_machine(); + std::string tmp(moptions.last_used_filter()); + std::size_t found = tmp.find_first_of(","); + if (found == std::string::npos) + last_filter = tmp; + else + { + last_filter = tmp.substr(0, found); + sub_filter = tmp.substr(found + 1); + } + + main_filters::actual = FILTER_ALL; + for (size_t ind = 0; ind < main_filters::length; ++ind) + if (last_filter == main_filters::text[ind]) + { + main_filters::actual = ind; + break; + } - int drivnum = m_drivlist->find(drivername); - if (drivnum != -1) - m_drivlist->include(drivnum); + if (main_filters::actual == FILTER_CATEGORY) + main_filters::actual = FILTER_ALL; + else if (main_filters::actual == FILTER_MANUFACTURER) + { + for (size_t id = 0; id < c_mnfct::ui.size(); ++id) + if (sub_filter == c_mnfct::ui[id]) + c_mnfct::actual = id; + } + else if (main_filters::actual == FILTER_YEAR) + { + for (size_t id = 0; id < c_year::ui.size(); ++id) + if (sub_filter == c_year::ui[id]) + c_year::actual = id; + } + first_start = false; } - // now build the final list - m_drivlist->reset(); - int listnum = 0; - while (m_drivlist->next()) - m_driverlist[listnum++] = &m_drivlist->driver(); + if (!moptions.remember_last()) + reselect_last::reset(); + + machine.options().set_value(OPTION_SNAPNAME, "%g/%i", OPTION_PRIORITY_CMDLINE, error_string); + machine.options().set_value(OPTION_SOFTWARENAME, "", OPTION_PRIORITY_CMDLINE, error_string); - // NULL-terminate - m_driverlist[listnum] = nullptr; + ui_globals::curimage_view = FIRST_VIEW; + ui_globals::curdats_view = UI_FIRST_LOAD; + ui_globals::switch_image = false; + ui_globals::default_image = true; + ui_globals::panels_status = moptions.hide_panels(); } +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_select_game::~ui_menu_select_game() +{ + std::string error_string, last_driver; + const game_driver *driver = nullptr; + ui_software_info *swinfo = nullptr; + ui_options &mopt = machine().ui().options(); + if (isfavorite()) + swinfo = (selected >= 0 && selected < item.size()) ? (ui_software_info *)item[selected].ref : nullptr; + else + driver = (selected >= 0 && selected < item.size()) ? (const game_driver *)item[selected].ref : nullptr; + + if ((FPTR)driver > 3) + last_driver = driver->name; + + if ((FPTR)swinfo > 3) + last_driver = swinfo->shortname; + std::string filter(main_filters::text[main_filters::actual]); + if (main_filters::actual == FILTER_MANUFACTURER) + filter.append(",").append(c_mnfct::ui[c_mnfct::actual]); + else if (main_filters::actual == FILTER_YEAR) + filter.append(",").append(c_year::ui[c_year::actual]); + + mopt.set_value(OPTION_LAST_USED_FILTER, filter.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + mopt.set_value(OPTION_LAST_USED_MACHINE, last_driver.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + mopt.set_value(OPTION_HIDE_PANELS, ui_globals::panels_status, OPTION_PRIORITY_CMDLINE, error_string); + save_ui_options(machine()); +} //------------------------------------------------- -// handle - handle the game select menu +// handle //------------------------------------------------- void ui_menu_select_game::handle() { + bool check_filter = false; + bool enabled_dats = machine().ui().options().enabled_dats(); + + // if i have to load datfile, performe an hard reset + if (ui_globals::reset) + { + ui_globals::reset = false; + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + return; + } + + // if i have to reselect a software, force software list submenu + if (reselect_last::get()) + { + const game_driver *driver = (const game_driver *)item[selected].ref; + ui_menu::stack_push(global_alloc_clear<ui_menu_select_software>(machine(), container, driver)); + return; + } + // ignore pause keys by swallowing them before we process the menu machine().ui_input().pressed(IPT_UI_PAUSE); // process the menu - const ui_menu_event *menu_event = process(0); - if (menu_event != nullptr && menu_event->itemref != nullptr) + const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT); + if (m_event != nullptr && m_event->itemref != nullptr) { - // reset the error on any future menu_event - if (m_error) - m_error = false; + // reset the error on any future m_event + if (ui_error) + ui_error = false; // handle selections - else + else if (m_event->iptkey == IPT_UI_SELECT) { - switch(menu_event->iptkey) + if (isfavorite()) + inkey_select_favorite(m_event); + else + inkey_select(m_event); + } + + // handle UI_LEFT + else if (m_event->iptkey == IPT_UI_LEFT) + { + // Images + if (ui_globals::rpanel == RP_IMAGES && ui_globals::curimage_view > FIRST_VIEW) { - case IPT_UI_SELECT: - inkey_select(menu_event); - break; - case IPT_UI_CANCEL: - inkey_cancel(menu_event); - break; - case IPT_SPECIAL: - inkey_special(menu_event); - break; + ui_globals::curimage_view--; + ui_globals::switch_image = true; + ui_globals::default_image = false; + } + + // Infos + else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view > UI_FIRST_LOAD) + { + ui_globals::curdats_view--; + topline_datsview = 0; } } - } - // if we're in an error state, overlay an error message - if (m_error) - machine().ui().draw_text_box(container, - "The selected game is missing one or more required ROM or CHD images. " - "Please select a different game.\n\nPress any key to continue.", - JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR); -} + // handle UI_RIGHT + else if (m_event->iptkey == IPT_UI_RIGHT) + { + // Images + if (ui_globals::rpanel == RP_IMAGES && ui_globals::curimage_view < LAST_VIEW) + { + ui_globals::curimage_view++; + ui_globals::switch_image = true; + ui_globals::default_image = false; + } + // Infos + else if (ui_globals::rpanel == RP_INFOS && ui_globals::curdats_view < UI_LAST_LOAD) + { + ui_globals::curdats_view++; + topline_datsview = 0; + } + } -//------------------------------------------------- -// inkey_select -//------------------------------------------------- + // handle UI_UP_FILTER + else if (m_event->iptkey == IPT_UI_UP_FILTER && main_filters::actual > FILTER_FIRST) + { + l_hover = main_filters::actual - 1; + check_filter = true; + } -void ui_menu_select_game::inkey_select(const ui_menu_event *menu_event) -{ - const game_driver *driver = (const game_driver *)menu_event->itemref; + // handle UI_DOWN_FILTER + else if (m_event->iptkey == IPT_UI_DOWN_FILTER && main_filters::actual < FILTER_LAST) + { + l_hover = main_filters::actual + 1; + check_filter = true; + } - // special case for configure inputs - if ((FPTR)driver == 1) - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_input_groups>(machine(), container))); + // handle UI_LEFT_PANEL + else if (m_event->iptkey == IPT_UI_LEFT_PANEL) + ui_globals::rpanel = RP_IMAGES; - // anything else is a driver - else + // handle UI_RIGHT_PANEL + else if (m_event->iptkey == IPT_UI_RIGHT_PANEL) + ui_globals::rpanel = RP_INFOS; + + // escape pressed with non-empty text clears the text + else if (m_event->iptkey == IPT_UI_CANCEL && m_search[0] != 0) + { + m_search[0] = '\0'; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + // handle UI_DATS + else if (m_event->iptkey == IPT_UI_DATS && enabled_dats) + { + if (!isfavorite()) + { + const game_driver *driver = (const game_driver *)m_event->itemref; + if ((FPTR)driver > 3 && machine().datfile().has_data(driver)) + ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, driver)); + } + else + { + ui_software_info *swinfo = (ui_software_info *)m_event->itemref; + if ((FPTR)swinfo > 3 && machine().datfile().has_data(swinfo->driver)) + { + if (swinfo->startempty == 1) + ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, swinfo->driver)); + else + ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, swinfo)); + } + } + } + + // handle UI_FAVORITES + else if (m_event->iptkey == IPT_UI_FAVORITES) + { + if (!isfavorite()) + { + const game_driver *driver = (const game_driver *)m_event->itemref; + if ((FPTR)driver > 3) + { + if (!machine().favorite().isgame_favorite(driver)) + { + machine().favorite().add_favorite_game(driver); + machine().popmessage("%s\n added to favorites list.", driver->description); + } + + else + { + machine().favorite().remove_favorite_game(); + machine().popmessage("%s\n removed from favorites list.", driver->description); + } + } + } + else + { + ui_software_info *swinfo = (ui_software_info *)m_event->itemref; + if ((FPTR)swinfo > 3) + { + machine().popmessage("%s\n removed from favorites list.", swinfo->longname.c_str()); + machine().favorite().remove_favorite_game(*swinfo); + reset(UI_MENU_RESET_SELECT_FIRST); + } + } + } + + // handle UI_EXPORT + else if (m_event->iptkey == IPT_UI_EXPORT) + inkey_export(); + + // handle UI_AUDIT_FAST + else if (m_event->iptkey == IPT_UI_AUDIT_FAST && !m_unavailsortedlist.empty()) + ui_menu::stack_push(global_alloc_clear<ui_menu_audit>(machine(), container, m_availsortedlist, m_unavailsortedlist, 1)); + + // handle UI_AUDIT_ALL + else if (m_event->iptkey == IPT_UI_AUDIT_ALL) + ui_menu::stack_push(global_alloc_clear<ui_menu_audit>(machine(), container, m_availsortedlist, m_unavailsortedlist, 2)); + + // typed characters append to the buffer + else if (m_event->iptkey == IPT_SPECIAL) + inkey_special(m_event); + + else if (m_event->iptkey == IPT_OTHER) + check_filter = true; + } + + if (m_event != nullptr && m_event->itemref == nullptr) { - // audit the game first to see if we're going to work - driver_enumerator enumerator(machine().options(), *driver); - enumerator.next(); - media_auditor auditor(enumerator); - media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); + if (m_event->iptkey == IPT_SPECIAL && m_event->unichar == 0x09) + selected = m_prev_selected; - // if everything looks good, schedule the new driver - if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + // handle UI_UP_FILTER + else if (m_event->iptkey == IPT_UI_UP_FILTER && main_filters::actual > FILTER_FIRST) { - machine().manager().schedule_new_driver(*driver); - machine().schedule_hard_reset(); - ui_menu::stack_reset(machine()); + l_hover = main_filters::actual - 1; + check_filter = true; } - // otherwise, display an error + // handle UI_DOWN_FILTER + else if (m_event->iptkey == IPT_UI_DOWN_FILTER && main_filters::actual < FILTER_LAST) + { + l_hover = main_filters::actual + 1; + check_filter = true; + } + else if (m_event->iptkey == IPT_OTHER) + check_filter = true; + } + + // if we're in an error state, overlay an error message + if (ui_error) + machine().ui().draw_text_box(container, "The selected machine is missing one or more required ROM or CHD images. " + "Please select a different machine.\n\nPress any key (except ESC) to continue.", JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR); + + // handle filters selection from key shortcuts + if (check_filter) + { + m_search[0] = '\0'; + if (l_hover == FILTER_CATEGORY) + { + main_filters::actual = l_hover; + ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(machine(), container)); + } + else if (l_hover == FILTER_CUSTOM) + { + main_filters::actual = l_hover; + ui_menu::stack_push(global_alloc_clear<ui_menu_custom_filter>(machine(), container, true)); + } + else if (l_hover == FILTER_MANUFACTURER) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_mnfct::ui, c_mnfct::actual, SELECTOR_GAME, l_hover)); + else if (l_hover == FILTER_YEAR) + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, c_year::ui, c_year::actual, SELECTOR_GAME, l_hover)); else { - reset(UI_MENU_RESET_REMEMBER_REF); - m_error = true; + if (l_hover >= FILTER_ALL) + main_filters::actual = l_hover; + reset(UI_MENU_RESET_SELECT_FIRST); } } } - //------------------------------------------------- -// inkey_cancel +// populate //------------------------------------------------- -void ui_menu_select_game::inkey_cancel(const ui_menu_event *menu_event) +void ui_menu_select_game::populate() { - // escape pressed with non-empty text clears the text - if (m_search[0] != 0) + ui_globals::redraw_icon = true; + ui_globals::switch_image = true; + int old_item_selected = -1; + + if (!isfavorite()) { - // since we have already been popped, we must recreate ourself from scratch - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_select_game>(machine(), container, nullptr))); - } -} + // if search is not empty, find approximate matches + if (m_search[0] != 0 && !isfavorite()) + populate_search(); + else + { + // reset search string + m_search[0] = '\0'; + m_displaylist.clear(); + m_tmp.clear(); + // if filter is set on category, build category list + switch (main_filters::actual) + { + case FILTER_CATEGORY: + build_category(); + break; + case FILTER_MANUFACTURER: + build_list(m_tmp, c_mnfct::ui[c_mnfct::actual].c_str()); + break; + case FILTER_YEAR: + build_list(m_tmp, c_year::ui[c_year::actual].c_str()); + break; + case FILTER_CUSTOM: + build_custom(); + break; + default: + build_list(m_tmp); + break; + } -//------------------------------------------------- -// inkey_special - typed characters append to the buffer -//------------------------------------------------- + // iterate over entries + for (size_t curitem = 0; curitem < m_displaylist.size(); ++curitem) + { + UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW; + + if (old_item_selected == -1 && m_displaylist[curitem]->name == reselect_last::driver) + old_item_selected = curitem; + + bool cloneof = strcmp(m_displaylist[curitem]->parent, "0"); + if (cloneof) + { + int cx = driver_list::find(m_displaylist[curitem]->parent); + if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) + cloneof = false; + } + if (cloneof) + flags_ui |= MENU_FLAG_INVERT; + + item_append(m_displaylist[curitem]->description, nullptr, flags_ui, (void *)m_displaylist[curitem]); + } + } + } + // populate favorites list + else + { + m_search[0] = '\0'; + int curitem = 0; + // iterate over entries + for (auto & mfavorite : machine().favorite().m_list) + { + UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW | MENU_FLAG_UI_FAVORITE; + if (mfavorite.startempty == 1) + { + if (old_item_selected == -1 && mfavorite.shortname == reselect_last::driver) + old_item_selected = curitem; + + bool cloneof = strcmp(mfavorite.driver->parent, "0"); + if (cloneof) + { + int cx = driver_list::find(mfavorite.driver->parent); + if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) + cloneof = false; + } + if (cloneof) + flags_ui |= MENU_FLAG_INVERT; + + item_append(mfavorite.longname.c_str(), nullptr, flags_ui, (void *)&mfavorite); + } + else + { + if (old_item_selected == -1 && mfavorite.shortname == reselect_last::driver) + old_item_selected = curitem; + item_append(mfavorite.longname.c_str(), mfavorite.devicetype.c_str(), + mfavorite.parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)&mfavorite); + } + curitem++; + } + } -void ui_menu_select_game::inkey_special(const ui_menu_event *menu_event) -{ - // typed characters append to the buffer - int buflen = strlen(m_search); + item_append(MENU_SEPARATOR_ITEM, nullptr, MENU_FLAG_UI, nullptr); - // if it's a backspace and we can handle it, do so - if ((menu_event->unichar == 8 || menu_event->unichar == 0x7f) && buflen > 0) + // add special items + if (ui_menu::stack_has_special_main_menu()) { - *(char *)utf8_previous_char(&m_search[buflen]) = 0; - m_rerandomize = true; - reset(UI_MENU_RESET_SELECT_FIRST); + item_append("Configure Options", nullptr, MENU_FLAG_UI, (void *)(FPTR)1); + item_append("Configure Directories", nullptr, MENU_FLAG_UI, (void *)(FPTR)2); + item_append("Save Configuration", nullptr, MENU_FLAG_UI, (void *)(FPTR)3); + skip_main_items = 3; } + else + skip_main_items = 0; - // if it's any other key and we're not maxed out, update - else if (menu_event->unichar >= ' ' && menu_event->unichar < 0x7f) + // configure the custom rendering + customtop = 3.0f * machine().ui().get_line_height() + 5.0f * UI_BOX_TB_BORDER; + custombottom = 5.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; + + // reselect prior game launched, if any + if (old_item_selected != -1) { - buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, menu_event->unichar); - m_search[buflen] = 0; - reset(UI_MENU_RESET_SELECT_FIRST); + selected = old_item_selected; + if (ui_globals::visible_main_lines == 0) + top_line = (selected != 0) ? selected - 1 : 0; + else + top_line = selected - (ui_globals::visible_main_lines / 2); + + if (reselect_last::software.empty()) + reselect_last::reset(); } + else + reselect_last::reset(); } - //------------------------------------------------- -// populate - populate the game select menu +// build a list of available drivers //------------------------------------------------- -void ui_menu_select_game::populate() +void ui_menu_select_game::build_available_list() { - int matchcount; - int curitem; - - for (curitem = matchcount = 0; m_driverlist[curitem] != nullptr && matchcount < VISIBLE_GAMES_IN_LIST; curitem++) - if (!(m_driverlist[curitem]->flags & MACHINE_NO_STANDALONE)) - matchcount++; - - // if nothing there, add a single multiline item and return - if (matchcount == 0) - { - std::string txt; - strprintf(txt, "No %s found. Please check the rompath specified in the %s.ini file.\n\n" - "If this is your first time using %s, please see the config.txt file in " - "the docs directory for information on configuring %s.", - emulator_info::get_gamesnoun(), - emulator_info::get_configname(), - emulator_info::get_appname(),emulator_info::get_appname() ); - item_append(txt.c_str(), nullptr, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, nullptr); - return; - } + int m_total = driver_list::total(); + std::vector<bool> m_included(m_total, false); - // otherwise, rebuild the match list - assert(m_drivlist != nullptr); - if (m_search[0] != 0 || m_matchlist[0] == -1 || m_rerandomize) - m_drivlist->find_approximate_matches(m_search, matchcount, m_matchlist); - m_rerandomize = false; + // open a path to the ROMs and find them in the array + file_enumerator path(machine().options().media_path()); + const osd_directory_entry *dir; - // iterate over entries - for (curitem = 0; curitem < matchcount; curitem++) + // iterate while we get new objects + while ((dir = path.next()) != nullptr) { - int curmatch = m_matchlist[curitem]; - if (curmatch != -1) + char drivername[50]; + char *dst = drivername; + const char *src; + + // build a name for it + for (src = dir->name; *src != 0 && *src != '.' && dst < &drivername[ARRAY_LENGTH(drivername) - 1]; ++src) + *dst++ = tolower((UINT8) * src); + + *dst = 0; + int drivnum = driver_list::find(drivername); + if (drivnum != -1 && !m_included[drivnum]) { - int cloneof = m_drivlist->non_bios_clone(curmatch); - item_append(m_drivlist->driver(curmatch).name, m_drivlist->driver(curmatch).description, (cloneof == -1) ? 0 : MENU_FLAG_INVERT, (void *)&m_drivlist->driver(curmatch)); + m_availsortedlist.push_back(&driver_list::driver(drivnum)); + m_included[drivnum] = true; } } - // if we're forced into this, allow general input configuration as well - if (ui_menu::stack_has_special_main_menu()) - { - item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); - item_append("Configure General Inputs", nullptr, 0, (void *)1); - } + // now check and include NONE_NEEDED + for (int x = 0; x < m_total; ++x) + if (!m_included[x]) + { + if (&driver_list::driver(x) == &GAME_NAME(___empty)) + continue; - // configure the custom rendering - customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; - custombottom = 4.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; -} + const rom_entry *rom = driver_list::driver(x).rom; + if (ROMENTRY_ISREGION(rom) && ROMENTRY_ISEND(++rom)) + { + m_availsortedlist.push_back(&driver_list::driver(x)); + m_included[x] = true; + } + } + + // sort + std::stable_sort(m_availsortedlist.begin(), m_availsortedlist.end(), sort_game_list); + + // now build the unavailable list + for (int x = 0; x < m_total; ++x) + if (!m_included[x] && &driver_list::driver(x) != &GAME_NAME(___empty)) + m_unavailsortedlist.push_back(&driver_list::driver(x)); + // sort + std::stable_sort(m_unavailsortedlist.begin(), m_unavailsortedlist.end(), sort_game_list); +} //------------------------------------------------- -// custom_render - perform our special rendering +// perform our special rendering //------------------------------------------------- void ui_menu_select_game::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) { - const game_driver *driver; - float width, maxwidth; - float x1, y1, x2, y2; + const game_driver *driver = nullptr; + ui_software_info *swinfo = nullptr; + float width, maxwidth = origx2 - origx1; std::string tempbuf[5]; - rgb_t color; - int line; + rgb_t color = UI_BACKGROUND_COLOR; + bool isstar = false; + ui_manager &mui = machine().ui(); + float tbarspace = mui.get_line_height(); + + strprintf(tempbuf[0], "MAME %s ( %d / %d machines (%d BIOS) )", bare_build_version, visible_items, (driver_list::total() - 1), m_isabios); + std::string filtered; + + if (main_filters::actual == FILTER_CATEGORY && !machine().inifile().ini_index.empty()) + { + std::string s_file(machine().inifile().actual_file()); + std::string s_category(machine().inifile().actual_category()); + filtered.assign(main_filters::text[main_filters::actual]).append(" (").append(s_file).append(" - ").append(s_category).append(") -"); + } + + else if (main_filters::actual == FILTER_MANUFACTURER) + filtered.assign(main_filters::text[main_filters::actual]).append(" (").append(c_mnfct::ui[c_mnfct::actual]).append(") -"); + + else if (main_filters::actual == FILTER_YEAR) + filtered.assign(main_filters::text[main_filters::actual]).append(" (").append(c_year::ui[c_year::actual]).append(") -"); // display the current typeahead - if (m_search[0] != 0) - strprintf(tempbuf[0], "Type name or select: %s_", m_search); + if (isfavorite()) + tempbuf[1].clear(); else - strprintf(tempbuf[0],"Type name or select: (random)"); + tempbuf[1].assign(filtered).append(" Search: ").append(m_search).append("_"); // get the size of the text - machine().ui().draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); - width += 2 * UI_BOX_LR_BORDER; - maxwidth = MAX(width, origx2 - origx1); + for (int line = 0; line < 2; ++line) + { + mui.draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(width, maxwidth); + } // compute our bounds - x1 = 0.5f - 0.5f * maxwidth; - x2 = x1 + maxwidth; - y1 = origy1 - top; - y2 = origy1 - UI_BOX_TB_BORDER; + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - 3.0f * UI_BOX_TB_BORDER - tbarspace; // draw a box - machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); // take off the borders x1 += UI_BOX_LR_BORDER; @@ -309,78 +769,135 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott y1 += UI_BOX_TB_BORDER; // draw the text within it - machine().ui().draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + for (int line = 0; line < 2; ++line) + { + mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + y1 += mui.get_line_height(); + } // determine the text to render below - driver = ((FPTR)selectedref > 1) ? (const game_driver *)selectedref : nullptr; - if ((FPTR)driver > 1) + if (!isfavorite()) + driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr; + else + { + swinfo = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : nullptr; + if (swinfo && swinfo->startempty == 1) + driver = swinfo->driver; + } + + if ((FPTR)driver > 3) { - const char *gfxstat, *soundstat; + isstar = machine().favorite().isgame_favorite(driver); // first line is game name - strprintf(tempbuf[0],"%-.100s", driver->description); + strprintf(tempbuf[0], "Romset: %-.100s", driver->name); // next line is year, manufacturer strprintf(tempbuf[1], "%s, %-.100s", driver->year, driver->manufacturer); - // next line source path - strprintf(tempbuf[2],"Driver: %-.100s", core_filename_extract_base(driver->source_file).c_str()); + // next line is clone/parent status + int cloneof = driver_list::non_bios_clone(*driver); + + if (cloneof != -1) + strprintf(tempbuf[2], "Driver is clone of: %-.100s", driver_list::driver(cloneof).description); + else + tempbuf[2] = "Driver is parent"; // next line is overall driver status if (driver->flags & MACHINE_NOT_WORKING) - tempbuf[3].assign("Overall: NOT WORKING"); + tempbuf[3] = "Overall: NOT WORKING"; else if (driver->flags & MACHINE_UNEMULATED_PROTECTION) - tempbuf[3].assign("Overall: Unemulated Protection"); + tempbuf[3] = "Overall: Unemulated Protection"; else - tempbuf[3].assign("Overall: Working"); + tempbuf[3] = "Overall: Working"; // next line is graphics, sound status if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS)) - gfxstat = "Imperfect"; + tempbuf[4] = "Graphics: Imperfect, "; else - gfxstat = "OK"; + tempbuf[4] = "Graphics: OK, "; if (driver->flags & MACHINE_NO_SOUND) - soundstat = "Unimplemented"; + tempbuf[4].append("Sound: Unimplemented"); else if (driver->flags & MACHINE_IMPERFECT_SOUND) - soundstat = "Imperfect"; + tempbuf[4].append("Sound: Imperfect"); else - soundstat = "OK"; + tempbuf[4].append("Sound: OK"); - strprintf(tempbuf[4], "Gfx: %s, Sound: %s", gfxstat, soundstat); + color = UI_GREEN_COLOR; + + if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS + | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0) + color = UI_YELLOW_COLOR; + + if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0) + color = UI_RED_COLOR; } - else + + else if ((FPTR)swinfo > 3) { - const char *s = emulator_info::get_copyright(); - line = 0; + isstar = machine().favorite().isgame_favorite(*swinfo); - // first line is version string - strprintf(tempbuf[line++], "%s %s", emulator_info::get_appname(), build_version); + // first line is system + strprintf(tempbuf[0], "System: %-.100s", swinfo->driver->description); - // output message - while (line < ARRAY_LENGTH(tempbuf)) - { - if (!(*s == 0 || *s == '\n')) - tempbuf[line].push_back(*s); + // next line is year, publisher + strprintf(tempbuf[1], "%s, %-.100s", swinfo->year.c_str(), swinfo->publisher.c_str()); - if (*s == '\n') - { - line++; - s++; - } else if (*s != 0) - s++; - else - line++; + // next line is parent/clone + if (!swinfo->parentname.empty()) + strprintf(tempbuf[2], "Software is clone of: %-.100s", !swinfo->parentlongname.empty() ? swinfo->parentlongname.c_str() : swinfo->parentname.c_str()); + else + tempbuf[2] = "Software is parent"; + + // next line is supported status + if (swinfo->supported == SOFTWARE_SUPPORTED_NO) + { + tempbuf[3] = "Supported: No"; + color = UI_RED_COLOR; } + else if (swinfo->supported == SOFTWARE_SUPPORTED_PARTIAL) + { + tempbuf[3] = "Supported: Partial"; + color = UI_YELLOW_COLOR; + } + else + { + tempbuf[3] = "Supported: Yes"; + color = UI_GREEN_COLOR; + } + + // last line is romset name + strprintf(tempbuf[4], "romset: %-.100s", swinfo->shortname.c_str()); } + else + { + std::string copyright(emulator_info::get_copyright()); + size_t found = copyright.find("\n"); + tempbuf[0].clear(); + tempbuf[1].assign(emulator_info::get_appname()).append(" ").append(build_version); + tempbuf[2] = copyright.substr(0, found); + tempbuf[3] = copyright.substr(found + 1); + tempbuf[4].clear(); + } + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = y2; + y2 = origy1 - UI_BOX_TB_BORDER; + + // draw toolbar + draw_toolbar(x1, y1, x2, y2); // get the size of the text maxwidth = origx2 - origx1; - for (line = 0; line < 4; line++) + + for (auto & elem : tempbuf) { - machine().ui().draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); width += 2 * UI_BOX_LR_BORDER; maxwidth = MAX(maxwidth, width); } @@ -392,47 +909,41 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott y2 = origy2 + bottom; // draw a box - color = UI_BACKGROUND_COLOR; - if (driver != nullptr) - color = UI_GREEN_COLOR; - if (driver != nullptr && (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0) - color = UI_YELLOW_COLOR; - if (driver != nullptr && (driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0) - color = UI_RED_COLOR; - machine().ui().draw_outlined_box(container, x1, y1, x2, y2, color); + mui.draw_outlined_box(container, x1, y1, x2, y2, color); // take off the borders x1 += UI_BOX_LR_BORDER; x2 -= UI_BOX_LR_BORDER; y1 += UI_BOX_TB_BORDER; + // is favorite? draw the star + if (isstar) + draw_star(x1, y1); + // draw all lines - for (line = 0; line < 4; line++) + for (auto & elem : tempbuf) { - machine().ui().draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, - DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); - y1 += machine().ui().get_line_height(); + mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + y1 += mui.get_line_height(); } } - //------------------------------------------------- -// force_game_select - force the game -// select menu to be visible and inescapable +// force the game select menu to be visible +// and inescapable //------------------------------------------------- void ui_menu_select_game::force_game_select(running_machine &machine, render_container *container) { - char *gamename = (char *)machine.options().system_name(); - // reset the menu stack ui_menu::stack_reset(machine); // add the quit entry followed by the game select entry - ui_menu *quit = auto_alloc_clear(machine, <ui_menu_quit_game>(machine, container)); + ui_menu *quit = global_alloc_clear<ui_menu_quit_game>(machine, container); quit->set_special_main_menu(true); ui_menu::stack_push(quit); - ui_menu::stack_push(auto_alloc_clear(machine, <ui_menu_select_game>(machine, container, gamename))); + ui_menu::stack_push(global_alloc_clear<ui_menu_select_game>(machine, container, nullptr)); // force the menus on machine.ui().show_menu(); @@ -440,3 +951,1421 @@ void ui_menu_select_game::force_game_select(running_machine &machine, render_con // make sure MAME is paused machine.pause(); } + +//------------------------------------------------- +// handle select key event +//------------------------------------------------- + +void ui_menu_select_game::inkey_select(const ui_menu_event *m_event) +{ + const game_driver *driver = (const game_driver *)m_event->itemref; + + // special case for configure options + if ((FPTR)driver == 1) + ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(machine(), container)); + // special case for configure directory + else if ((FPTR)driver == 2) + ui_menu::stack_push(global_alloc_clear<ui_menu_directory>(machine(), container)); + // anything else is a driver + else if ((FPTR)driver == 3) { + save_main_option(machine()); + } + // anything else is a driver + else + { + // audit the game first to see if we're going to work + driver_enumerator enumerator(machine().options(), *driver); + enumerator.next(); + media_auditor auditor(enumerator); + media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); + + // if everything looks good, schedule the new driver + if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + { + if ((driver->flags & MACHINE_TYPE_ARCADE) == 0) + { + software_list_device_iterator iter(enumerator.config().root_device()); + for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next()) + if (swlistdev->first_software_info() != nullptr) + { + ui_menu::stack_push(global_alloc_clear<ui_menu_select_software>(machine(), container, driver)); + return; + } + } + + std::vector<s_bios> biosname; + if (!machine().ui().options().skip_bios_menu() && has_multiple_bios(driver, biosname)) + ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)driver, false, false)); + else + { + reselect_last::driver = driver->name; + reselect_last::software.clear(); + reselect_last::swlist.clear(); + machine().manager().schedule_new_driver(*driver); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } + } + // otherwise, display an error + else + { + reset(UI_MENU_RESET_REMEMBER_REF); + ui_error = true; + } + } +} + +//------------------------------------------------- +// handle select key event for favorites menu +//------------------------------------------------- + +void ui_menu_select_game::inkey_select_favorite(const ui_menu_event *m_event) +{ + ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref; + ui_options &mopt = machine().ui().options(); + + // special case for configure options + if ((FPTR)ui_swinfo == 1) + ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(machine(), container)); + + // special case for configure directory + else if ((FPTR)ui_swinfo == 2) + ui_menu::stack_push(global_alloc_clear<ui_menu_directory>(machine(), container)); + else if ((FPTR)ui_swinfo == 3) + { + save_main_option(machine()); + } + else if (ui_swinfo->startempty == 1) + { + // audit the game first to see if we're going to work + driver_enumerator enumerator(machine().options(), *ui_swinfo->driver); + enumerator.next(); + media_auditor auditor(enumerator); + media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); + + // if everything looks good, schedule the new driver + if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + { + std::vector<s_bios> biosname; + if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname)) + ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo->driver, false, false)); + else + { + reselect_last::driver = ui_swinfo->driver->name; + reselect_last::software.clear(); + reselect_last::swlist.clear(); + reselect_last::set(true); + machine().manager().schedule_new_driver(*ui_swinfo->driver); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } + } + + // otherwise, display an error + else + { + reset(UI_MENU_RESET_REMEMBER_REF); + ui_error = true; + } + } + else + { + // first validate + driver_enumerator drv(machine().options(), *ui_swinfo->driver); + media_auditor auditor(drv); + drv.next(); + software_list_device *swlist = software_list_device::find_by_name(drv.config(), ui_swinfo->listname.c_str()); + software_info *swinfo = swlist->find(ui_swinfo->shortname.c_str()); + media_auditor::summary summary = auditor.audit_software(swlist->list_name(), swinfo, AUDIT_VALIDATE_FAST); + if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + { + std::vector<s_bios> biosname; + if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname)) + { + ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo, true, false)); + return; + } + else if (!mopt.skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str())) + { + std::unordered_map<std::string, std::string> parts; + for (const software_part *swpart = swinfo->first_part(); swpart != nullptr; swpart = swpart->next()) + { + if (swpart->matches_interface(ui_swinfo->interface.c_str())) + { + std::string menu_part_name(swpart->name()); + if (swpart->feature("part_id") != nullptr) + menu_part_name.assign("(").append(swpart->feature("part_id")).append(")"); + parts.emplace(swpart->name(), menu_part_name); + } + } + ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo)); + return; + } + + std::string error_string; + std::string string_list = std::string(ui_swinfo->listname).append(":").append(ui_swinfo->shortname).append(":").append(ui_swinfo->part).append(":").append(ui_swinfo->instance); + mopt.set_value(OPTION_SOFTWARENAME, string_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + std::string snap_list = std::string(ui_swinfo->listname).append(PATH_SEPARATOR).append(ui_swinfo->shortname); + mopt.set_value(OPTION_SNAPNAME, snap_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + reselect_last::driver = drv.driver().name; + reselect_last::software = ui_swinfo->shortname; + reselect_last::swlist = ui_swinfo->listname; + machine().manager().schedule_new_driver(drv.driver()); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } + // otherwise, display an error + else + { + reset(UI_MENU_RESET_REMEMBER_POSITION); + ui_error = true; + } + } +} + +//------------------------------------------------- +// returns if the search can be activated +//------------------------------------------------- + +inline bool ui_menu_select_game::isfavorite() +{ + return (main_filters::actual == FILTER_FAVORITE); +} + +//------------------------------------------------- +// handle special key event +//------------------------------------------------- + +void ui_menu_select_game::inkey_special(const ui_menu_event *m_event) +{ + int buflen = strlen(m_search); + + // if it's a backspace and we can handle it, do so + if (((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0) && !isfavorite()) + { + *(char *)utf8_previous_char(&m_search[buflen]) = 0; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + // if it's any other key and we're not maxed out, update + else if ((m_event->unichar >= ' ' && m_event->unichar < 0x7f) && !isfavorite()) + { + buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar); + m_search[buflen] = 0; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + // Tab key + else if (m_event->unichar == 0x09) + { + // if the selection is in the main screen, save and go to submenu + if (selected <= visible_items) + { + m_prev_selected = selected; + selected = visible_items + 1; + } + + // otherwise, retrieve the previous position + else + selected = m_prev_selected; + } +} + +//------------------------------------------------- +// build list +//------------------------------------------------- + +void ui_menu_select_game::build_list(std::vector<const game_driver *> &s_drivers, const char *filter_text, int filter, bool bioscheck) +{ + int cx = 0; + bool cloneof = false; + + if (s_drivers.empty()) + { + filter = main_filters::actual; + if (filter == FILTER_AVAILABLE) + s_drivers = m_availsortedlist; + else if (filter == FILTER_UNAVAILABLE) + s_drivers = m_unavailsortedlist; + else + s_drivers = m_sortedlist; + } + + for (auto & s_driver : s_drivers) + { + if (!bioscheck && filter != FILTER_BIOS && (s_driver->flags & MACHINE_IS_BIOS_ROOT) != 0) + continue; + + switch (filter) + { + case FILTER_ALL: + case FILTER_AVAILABLE: + case FILTER_UNAVAILABLE: + m_displaylist.push_back(s_driver); + break; + + case FILTER_WORKING: + if (!(s_driver->flags & MACHINE_NOT_WORKING)) + m_displaylist.push_back(s_driver); + break; + + case FILTER_NOT_MECHANICAL: + if (!(s_driver->flags & MACHINE_MECHANICAL)) + m_displaylist.push_back(s_driver); + break; + + case FILTER_BIOS: + if (s_driver->flags & MACHINE_IS_BIOS_ROOT) + m_displaylist.push_back(s_driver); + break; + + case FILTER_PARENT: + case FILTER_CLONES: + cloneof = strcmp(s_driver->parent, "0"); + if (cloneof) + { + cx = driver_list::find(s_driver->parent); + if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) + cloneof = false; + } + + if (filter == FILTER_CLONES && cloneof) + m_displaylist.push_back(s_driver); + else if (filter == FILTER_PARENT && !cloneof) + m_displaylist.push_back(s_driver); + break; + + case FILTER_NOT_WORKING: + if (s_driver->flags & MACHINE_NOT_WORKING) + m_displaylist.push_back(s_driver); + break; + + case FILTER_MECHANICAL: + if (s_driver->flags & MACHINE_MECHANICAL) + m_displaylist.push_back(s_driver); + break; + + case FILTER_SAVE: + if (s_driver->flags & MACHINE_SUPPORTS_SAVE) + m_displaylist.push_back(s_driver); + break; + + case FILTER_NOSAVE: + if (!(s_driver->flags & MACHINE_SUPPORTS_SAVE)) + m_displaylist.push_back(s_driver); + break; + + case FILTER_YEAR: + if (!core_stricmp(filter_text, s_driver->year)) + m_displaylist.push_back(s_driver); + break; + + case FILTER_VERTICAL: + if (s_driver->flags & ORIENTATION_SWAP_XY) + m_displaylist.push_back(s_driver); + break; + + case FILTER_HORIZONTAL: + if (!(s_driver->flags & ORIENTATION_SWAP_XY)) + m_displaylist.push_back(s_driver); + break; + + case FILTER_MANUFACTURER: + { + std::string name = c_mnfct::getname(s_driver->manufacturer); + if (!core_stricmp(filter_text, name.c_str())) + m_displaylist.push_back(s_driver); + break; + } + case FILTER_CHD: + for (const rom_entry *rom = s_driver->rom; !ROMENTRY_ISEND(rom); ++rom) + if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom)) + { + m_displaylist.push_back(s_driver); + break; + } + break; + case FILTER_NOCHD: + { + bool found = false; + for (const rom_entry *rom = s_driver->rom; !ROMENTRY_ISEND(rom); ++rom) + if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom)) + { + found = true; + break; + } + if (!found) + m_displaylist.push_back(s_driver); + break; + } + } + } +} + +//------------------------------------------------- +// build custom display list +//------------------------------------------------- + +void ui_menu_select_game::build_custom() +{ + std::vector<const game_driver *> s_drivers; + bool bioscheck = false; + + if (custfltr::main == FILTER_AVAILABLE) + s_drivers = m_availsortedlist; + else if (custfltr::main == FILTER_UNAVAILABLE) + s_drivers = m_unavailsortedlist; + else + s_drivers = m_sortedlist; + + for (auto & elem : s_drivers) + { + m_displaylist.push_back(elem); + } + + for (int count = 1; count <= custfltr::numother; ++count) + { + int filter = custfltr::other[count]; + if (filter == FILTER_BIOS) + bioscheck = true; + } + + for (int count = 1; count <= custfltr::numother; ++count) + { + int filter = custfltr::other[count]; + s_drivers = m_displaylist; + m_displaylist.clear(); + + switch (filter) + { + case FILTER_YEAR: + build_list(s_drivers, c_year::ui[custfltr::year[count]].c_str(), filter, bioscheck); + break; + case FILTER_MANUFACTURER: + build_list(s_drivers, c_mnfct::ui[custfltr::mnfct[count]].c_str(), filter, bioscheck); + break; + default: + build_list(s_drivers, nullptr, filter, bioscheck); + break; + } + } +} + +//------------------------------------------------- +// build category list +//------------------------------------------------- + +void ui_menu_select_game::build_category() +{ + std::vector<int> temp_filter; + machine().inifile().load_ini_category(temp_filter); + + for (auto actual : temp_filter) + m_tmp.push_back(&driver_list::driver(actual)); + + std::stable_sort(m_tmp.begin(), m_tmp.end(), sort_game_list); + m_displaylist = m_tmp; +} + +//------------------------------------------------- +// populate search list +//------------------------------------------------- + +void ui_menu_select_game::populate_search() +{ + // allocate memory to track the penalty value + std::vector<int> penalty(VISIBLE_GAMES_IN_SEARCH, 9999); + int index = 0; + for (; index < m_displaylist.size(); ++index) + { + // pick the best match between driver name and description + int curpenalty = fuzzy_substring(m_search, m_displaylist[index]->description); + int tmp = fuzzy_substring(m_search, m_displaylist[index]->name); + curpenalty = MIN(curpenalty, tmp); + + // insert into the sorted table of matches + for (int matchnum = VISIBLE_GAMES_IN_SEARCH - 1; matchnum >= 0; --matchnum) + { + // stop if we're worse than the current entry + if (curpenalty >= penalty[matchnum]) + break; + + // as long as this isn't the last entry, bump this one down + if (matchnum < VISIBLE_GAMES_IN_SEARCH - 1) + { + penalty[matchnum + 1] = penalty[matchnum]; + m_searchlist[matchnum + 1] = m_searchlist[matchnum]; + } + + m_searchlist[matchnum] = m_displaylist[index]; + penalty[matchnum] = curpenalty; + } + } + + (index < VISIBLE_GAMES_IN_SEARCH) ? m_searchlist[index] = nullptr : m_searchlist[VISIBLE_GAMES_IN_SEARCH] = nullptr; + UINT32 flags_ui = MENU_FLAG_UI | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW; + for (int curitem = 0; m_searchlist[curitem]; ++curitem) + { + bool cloneof = strcmp(m_searchlist[curitem]->parent, "0"); + if (cloneof) + { + int cx = driver_list::find(m_searchlist[curitem]->parent); + if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) + cloneof = false; + } + item_append(m_searchlist[curitem]->description, nullptr, (!cloneof) ? flags_ui : (MENU_FLAG_INVERT | flags_ui), + (void *)m_searchlist[curitem]); + } +} + +//------------------------------------------------- +// generate general info +//------------------------------------------------- + +void ui_menu_select_game::general_info(const game_driver *driver, std::string &buffer) +{ + strprintf(buffer, "Romset: %-.100s\n", driver->name); + buffer.append("Year: ").append(driver->year).append("\n"); + strcatprintf(buffer, "Manufacturer: %-.100s\n", driver->manufacturer); + + int cloneof = driver_list::non_bios_clone(*driver); + if (cloneof != -1) + strcatprintf(buffer, "Driver is Clone of: %-.100s\n", driver_list::driver(cloneof).description); + else + buffer.append("Driver is Parent\n"); + + if (driver->flags & MACHINE_NOT_WORKING) + buffer.append("Overall: NOT WORKING\n"); + else if (driver->flags & MACHINE_UNEMULATED_PROTECTION) + buffer.append("Overall: Unemulated Protection\n"); + else + buffer.append("Overall: Working\n"); + + if (driver->flags & MACHINE_IMPERFECT_COLORS) + buffer.append("Graphics: Imperfect Colors\n"); + else if (driver->flags & MACHINE_WRONG_COLORS) + buffer.append("Graphics: Wrong Colors\n"); + else if (driver->flags & MACHINE_IMPERFECT_GRAPHICS) + buffer.append("Graphics: Imperfect\n"); + else + buffer.append("Graphics: OK\n"); + + if (driver->flags & MACHINE_NO_SOUND) + buffer.append("Sound: Unimplemented\n"); + else if (driver->flags & MACHINE_IMPERFECT_SOUND) + buffer.append("Sound: Imperfect\n"); + else + buffer.append("Sound: OK\n"); + + strcatprintf(buffer, "Driver is Skeleton: %s\n", ((driver->flags & MACHINE_IS_SKELETON) ? "Yes" : "No")); + strcatprintf(buffer, "Game is Mechanical: %s\n", ((driver->flags & MACHINE_MECHANICAL) ? "Yes" : "No")); + strcatprintf(buffer, "Requires Artwork: %s\n", ((driver->flags & MACHINE_REQUIRES_ARTWORK) ? "Yes" : "No")); + strcatprintf(buffer, "Requires Clickable Artwork: %s\n", ((driver->flags & MACHINE_CLICKABLE_ARTWORK) ? "Yes" : "No")); + strcatprintf(buffer, "Support Cocktail: %s\n", ((driver->flags & MACHINE_NO_COCKTAIL) ? "Yes" : "No")); + strcatprintf(buffer, "Driver is Bios: %s\n", ((driver->flags & MACHINE_IS_BIOS_ROOT) ? "Yes" : "No")); + strcatprintf(buffer, "Support Save: %s\n", ((driver->flags & MACHINE_SUPPORTS_SAVE) ? "Yes" : "No")); + strcatprintf(buffer, "Screen Orentation: %s\n", ((driver->flags & ORIENTATION_SWAP_XY) ? "Vertical" : "Horizontal")); + bool found = false; + for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom) + if (ROMENTRY_ISREGION(rom) && ROMREGION_ISDISKDATA(rom)) + { + found = true; + break; + } + strcatprintf(buffer, "Requires CHD: %s\n", (found ? "Yes" : "No")); + + // audit the game first to see if we're going to work + if (machine().ui().options().info_audit()) + { + driver_enumerator enumerator(machine().options(), *driver); + enumerator.next(); + media_auditor auditor(enumerator); + media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); + media_auditor::summary summary_samples = auditor.audit_samples(); + + // if everything looks good, schedule the new driver + if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + buffer.append("Roms Audit Pass: OK\n"); + else + buffer.append("Roms Audit Pass: BAD\n"); + + if (summary_samples == media_auditor::NONE_NEEDED) + buffer.append("Samples Audit Pass: None Needed\n"); + else if (summary_samples == media_auditor::CORRECT || summary_samples == media_auditor::BEST_AVAILABLE) + buffer.append("Samples Audit Pass: OK\n"); + else + buffer.append("Samples Audit Pass: BAD\n"); + } + else + buffer.append("Roms Audit Pass: Disabled\nSamples Audit Pass: Disabled\n"); +} + +void ui_menu_select_game::inkey_export() +{ + std::string filename("exported"); + emu_file infile(machine().ui().options().ui_path(), OPEN_FLAG_READ); + if (infile.open(filename.c_str(), ".xml") == FILERR_NONE) + for (int seq = 0; ; ++seq) + { + std::string seqtext; + strprintf(seqtext, "%s_%04d", filename.c_str(), seq); + if (infile.open(seqtext.c_str(), ".xml") != FILERR_NONE) + { + filename = seqtext; + break; + } + } + + // attempt to open the output file + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); + if (file.open(filename.c_str(), ".xml") == FILERR_NONE) + { + FILE *pfile; + std::string fullpath(file.fullpath()); + file.close(); + pfile = fopen(fullpath.c_str() , "w"); + driver_enumerator drivlist(machine().options()); + drivlist.exclude_all(); + + if (m_search[0] != 0) + { + for (int curitem = 0; m_searchlist[curitem]; ++curitem) + { + int f = driver_list::find(m_searchlist[curitem]->name); + drivlist.include(f); + } + } + else + { + for (auto & elem : m_displaylist) + { + int f = driver_list::find(elem->name); + drivlist.include(f); + } + } + + // create the XML and save to file + info_xml_creator creator(drivlist); + creator.output(pfile, false); + fclose(pfile); + machine().popmessage("%s.xml saved under ui folder.", filename.c_str()); + } +} + +//------------------------------------------------- +// save drivers infos to file +//------------------------------------------------- + +void ui_menu_select_game::init_sorted_list() +{ + if (!m_sortedlist.empty()) + return; + + // generate full list + for (int x = 0; x < driver_list::total(); ++x) + { + const game_driver *driver = &driver_list::driver(x); + if (driver == &GAME_NAME(___empty)) + continue; + if (driver->flags & MACHINE_IS_BIOS_ROOT) + m_isabios++; + + m_sortedlist.push_back(driver); + c_mnfct::set(driver->manufacturer); + c_year::set(driver->year); + } + + // sort manufacturers - years and driver + std::stable_sort(c_mnfct::ui.begin(), c_mnfct::ui.end()); + std::stable_sort(c_year::ui.begin(), c_year::ui.end()); + std::stable_sort(m_sortedlist.begin(), m_sortedlist.end(), sort_game_list); +} + +//------------------------------------------------- +// load drivers infos from file +//------------------------------------------------- + +bool ui_menu_select_game::load_available_machines() +{ + // try to load available drivers from file + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ); + if (file.open(emulator_info::get_configname(), "_avail.ini") != FILERR_NONE) + return false; + + std::string readbuf; + char rbuf[MAX_CHAR_INFO]; + file.gets(rbuf, MAX_CHAR_INFO); + file.gets(rbuf, MAX_CHAR_INFO); + readbuf = chartrimcarriage(rbuf); + std::string a_rev = std::string(UI_VERSION_TAG).append(bare_build_version); + + // version not matching ? exit + if (a_rev != readbuf) + { + file.close(); + return false; + } + + file.gets(rbuf, MAX_CHAR_INFO); + file.gets(rbuf, MAX_CHAR_INFO); + int avsize = 0, unavsize = 0; + file.gets(rbuf, MAX_CHAR_INFO); + avsize = atoi(rbuf); + file.gets(rbuf, MAX_CHAR_INFO); + unavsize = atoi(rbuf); + + // load available list + for (int x = 0; x < avsize; ++x) + { + file.gets(rbuf, MAX_CHAR_INFO); + int find = atoi(rbuf); + m_availsortedlist.push_back(&driver_list::driver(find)); + } + + // load unavailable list + for (int x = 0; x < unavsize; ++x) + { + file.gets(rbuf, MAX_CHAR_INFO); + int find = atoi(rbuf); + m_unavailsortedlist.push_back(&driver_list::driver(find)); + } + file.close(); + return true; +} + +//------------------------------------------------- +// load custom filters info from file +//------------------------------------------------- + +void ui_menu_select_game::load_custom_filters() +{ + // attempt to open the output file + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ); + if (file.open("custom_", emulator_info::get_configname(), "_filter.ini") == FILERR_NONE) + { + char buffer[MAX_CHAR_INFO]; + + // get number of filters + file.gets(buffer, MAX_CHAR_INFO); + char *pb = strchr(buffer, '='); + custfltr::numother = atoi(++pb) - 1; + + // get main filter + file.gets(buffer, MAX_CHAR_INFO); + pb = strchr(buffer, '=') + 2; + + for (int y = 0; y < main_filters::length; ++y) + if (!strncmp(pb, main_filters::text[y], strlen(main_filters::text[y]))) + { + custfltr::main = y; + break; + } + + for (int x = 1; x <= custfltr::numother; ++x) + { + file.gets(buffer, MAX_CHAR_INFO); + char *cb = strchr(buffer, '=') + 2; + for (int y = 0; y < main_filters::length; ++y) + if (!strncmp(cb, main_filters::text[y], strlen(main_filters::text[y]))) + { + custfltr::other[x] = y; + if (y == FILTER_MANUFACTURER) + { + file.gets(buffer, MAX_CHAR_INFO); + char *ab = strchr(buffer, '=') + 2; + for (size_t z = 0; z < c_mnfct::ui.size(); ++z) + if (!strncmp(ab, c_mnfct::ui[z].c_str(), c_mnfct::ui[z].length())) + custfltr::mnfct[x] = z; + } + else if (y == FILTER_YEAR) + { + file.gets(buffer, MAX_CHAR_INFO); + char *db = strchr(buffer, '=') + 2; + for (size_t z = 0; z < c_year::ui.size(); ++z) + if (!strncmp(db, c_year::ui[z].c_str(), c_year::ui[z].length())) + custfltr::year[x] = z; + } + } + } + file.close(); + } + +} + + +//------------------------------------------------- +// draw left box +//------------------------------------------------- + +float ui_menu_select_game::draw_left_panel(float x1, float y1, float x2, float y2) +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + + if (ui_globals::panels_status == SHOW_PANELS || ui_globals::panels_status == HIDE_RIGHT_PANEL) + { + float origy1 = y1; + float origy2 = y2; + float text_size = 0.75f; + float line_height_max = line_height * text_size; + float left_width = 0.0f; + int text_lenght = main_filters::length; + int afilter = main_filters::actual; + int phover = HOVER_FILTER_FIRST; + const char **text = main_filters::text; + float sc = y2 - y1 - (2.0f * UI_BOX_TB_BORDER); + + if ((text_lenght * line_height_max) > sc) + { + float lm = sc / (text_lenght); + text_size = lm / line_height; + line_height_max = line_height * text_size; + } + + float text_sign = mui.get_string_width_ex("_# ", text_size); + for (int x = 0; x < text_lenght; ++x) + { + float total_width; + + // compute width of left hand side + total_width = mui.get_string_width_ex(text[x], text_size); + total_width += text_sign; + + // track the maximum + if (total_width > left_width) + left_width = total_width; + } + + x2 = x1 + left_width + 2.0f * UI_BOX_LR_BORDER; + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + y2 -= UI_BOX_TB_BORDER; + + for (int filter = 0; filter < text_lenght; ++filter) + { + std::string str(text[filter]); + rgb_t bgcolor = UI_TEXT_BG_COLOR; + rgb_t fgcolor = UI_TEXT_COLOR; + + if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y1 + line_height_max > mouse_y) + { + bgcolor = UI_MOUSEOVER_BG_COLOR; + fgcolor = UI_MOUSEOVER_COLOR; + hover = phover + filter; + } + + if (afilter == filter) + { + bgcolor = UI_SELECTED_BG_COLOR; + fgcolor = UI_SELECTED_COLOR; + } + + if (bgcolor != UI_TEXT_BG_COLOR) + container->add_rect(x1, y1, x2, y1 + line_height_max, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + + float x1t = x1 + text_sign; + if (afilter == FILTER_CUSTOM) + { + if (filter == custfltr::main) + { + str.assign("@custom1 ").append(text[filter]); + x1t -= text_sign; + } + else + { + for (int count = 1; count <= custfltr::numother; ++count) + { + int cfilter = custfltr::other[count]; + if (cfilter == filter) + { + strprintf(str, "@custom%d %s", count + 1, text[filter]); + x1t -= text_sign; + break; + } + } + } + convert_command_glyph(str); + } + + mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size); + y1 += line_height_max; + } + + x1 = x2 + UI_BOX_LR_BORDER; + x2 = x1 + 2.0f * UI_BOX_LR_BORDER; + y1 = origy1; + y2 = origy2; + float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); + rgb_t fgcolor = UI_TEXT_COLOR; + + // set left-right arrows dimension + float ar_x0 = 0.5f * (x2 + x1) - 0.5f * lr_arrow_width; + float ar_y0 = 0.5f * (y2 + y1) + 0.1f * line_height; + float ar_x1 = ar_x0 + lr_arrow_width; + float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height; + + mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + + if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + hover = HOVER_LPANEL_ARROW; + } + + draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X); + return x2 + UI_BOX_LR_BORDER; + } + else + { + float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); + rgb_t fgcolor = UI_TEXT_COLOR; + + // set left-right arrows dimension + float ar_x0 = 0.5f * (x2 + x1) - 0.5f * lr_arrow_width; + float ar_y0 = 0.5f * (y2 + y1) + 0.1f * line_height; + float ar_x1 = ar_x0 + lr_arrow_width; + float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height; + + mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + + if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + hover = HOVER_LPANEL_ARROW; + } + + draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90); + return x2 + UI_BOX_LR_BORDER; + } +} + +//------------------------------------------------- +// draw infos +//------------------------------------------------- + +void ui_menu_select_game::infos_render(void *selectedref, float origx1, float origy1, float origx2, float origy2) +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + static std::string buffer; + std::vector<int> xstart; + std::vector<int> xend; + float text_size = machine().ui().options().infos_size(); + const game_driver *driver = nullptr; + ui_software_info *soft = nullptr; + bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0); + static ui_software_info *oldsoft = nullptr; + static const game_driver *olddriver = nullptr; + static int oldview = -1; + static int old_sw_view = -1; + + if (is_favorites) + { + soft = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : nullptr; + if (soft && soft->startempty == 1) + { + driver = soft->driver; + oldsoft = nullptr; + } + else + olddriver = nullptr; + } + else + { + driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr; + oldsoft = nullptr; + } + + if (driver) + { + float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f; + float ud_arrow_width = line_height * machine().render().ui_aspect(); + float oy1 = origy1 + line_height; + + // MAMESCORE? Full size text + if (ui_globals::curdats_view == UI_STORY_LOAD) + text_size = 1.0f; + + std::string snaptext(dats_info[ui_globals::curdats_view]); + + // apply title to right panel + float title_size = 0.0f; + float txt_lenght = 0.0f; + + for (int x = UI_FIRST_LOAD; x < UI_LAST_LOAD; ++x) + { + mui.draw_text_full(container, dats_info[x], origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, + WRAP_TRUNCATE, DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr); + txt_lenght += 0.01f; + title_size = MAX(txt_lenght, title_size); + } + + mui.draw_text_full(container, snaptext.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, + WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::curdats_view, UI_FIRST_LOAD, UI_LAST_LOAD, title_size); + + if (driver != olddriver || ui_globals::curdats_view != oldview) + { + buffer.clear(); + olddriver = driver; + oldview = ui_globals::curdats_view; + topline_datsview = 0; + totallines = 0; + std::vector<std::string> m_item; + + if (ui_globals::curdats_view == UI_GENERAL_LOAD) + general_info(driver, buffer); + else if (ui_globals::curdats_view != UI_COMMAND_LOAD) + machine().datfile().load_data_info(driver, buffer, ui_globals::curdats_view); + else + machine().datfile().command_sub_menu(driver, m_item); + + if (!m_item.empty() && ui_globals::curdats_view == UI_COMMAND_LOAD) + { + for (size_t x = 0; x < m_item.size(); ++x) + { + std::string t_buffer; + buffer.append(m_item[x]).append("\n"); + machine().datfile().load_command_info(t_buffer, m_item[x]); + if (!t_buffer.empty()) + buffer.append(t_buffer).append("\n"); + } + convert_command_glyph(buffer); + } + } + + if (buffer.empty()) + { + mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER, + WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + return; + } + else if (ui_globals::curdats_view != UI_STORY_LOAD && ui_globals::curdats_view != UI_COMMAND_LOAD) + totallines = mui.wrap_text(container, buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size); + else + totallines = mui.wrap_text(container, buffer.c_str(), 0.0f, 0.0f, 1.0f - (2.0f * gutter_width), xstart, xend, text_size); + + int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size)); + if (totallines < r_visible_lines) + r_visible_lines = totallines; + if (topline_datsview < 0) + topline_datsview = 0; + if (topline_datsview + r_visible_lines >= totallines) + topline_datsview = totallines - r_visible_lines; + + float sc = origx2 - origx1 - (2.0f * UI_BOX_LR_BORDER); + for (int r = 0; r < r_visible_lines; ++r) + { + int itemline = r + topline_datsview; + std::string tempbuf(buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline])); + + // up arrow + if (r == 0 && topline_datsview != 0) + info_arrow(0, origx1, origx2, oy1, line_height, text_size, ud_arrow_width); + // bottom arrow + else if (r == r_visible_lines - 1 && itemline != totallines - 1) + info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width); + // special case for mamescore + else if (ui_globals::curdats_view == UI_STORY_LOAD) + { + // check size + float textlen = mui.get_string_width_ex(tempbuf.c_str(), text_size); + float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size; + + size_t last_underscore = tempbuf.find_last_of("_"); + if (last_underscore == std::string::npos) + { + mui.draw_text_full(container, tempbuf.c_str(), origx1, oy1, origx2 - origx1, JUSTIFY_CENTER, + WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size); + } + else + { + float effective_width = origx2 - origx1 - gutter_width; + float effective_left = origx1 + gutter_width; + std::string last_part(tempbuf.substr(last_underscore + 1)); + std::string first_part(tempbuf.substr(0, tempbuf.find("___"))); + float item_width; + + mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width, + JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &item_width, nullptr, tmp_size); + + mui.draw_text_full(container, last_part.c_str(), effective_left + item_width, oy1, + origx2 - origx1 - 2.0f * gutter_width - item_width, JUSTIFY_RIGHT, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size); + } + } + + // special case for command + else if (ui_globals::curdats_view == UI_COMMAND_LOAD || ui_globals::curdats_view == UI_GENERAL_LOAD) + { + // check size + float textlen = mui.get_string_width_ex(tempbuf.c_str(), text_size); + float tmp_size = (textlen > sc) ? text_size * (sc / textlen) : text_size; + + int first_dspace = (ui_globals::curdats_view == UI_COMMAND_LOAD) ? tempbuf.find(" ") : tempbuf.find(":"); + if (first_dspace > 0) + { + float effective_width = origx2 - origx1 - gutter_width; + float effective_left = origx1 + gutter_width; + std::string first_part(tempbuf.substr(0, first_dspace)); + std::string last_part(tempbuf.substr(first_dspace + 1)); + strtrimspace(last_part); + mui.draw_text_full(container, first_part.c_str(), effective_left, oy1, effective_width, JUSTIFY_LEFT, + WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size); + + mui.draw_text_full(container, last_part.c_str(), effective_left, oy1, origx2 - origx1 - 2.0f * gutter_width, + JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size); + } + else + mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT, + WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, tmp_size); + } + else + mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT, + WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size); + + oy1 += (line_height * text_size); + } + + // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow + right_visible_lines = r_visible_lines - (topline_datsview != 0) - (topline_datsview + r_visible_lines != totallines); + } + else if (soft) + { + float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f; + float ud_arrow_width = line_height * machine().render().ui_aspect(); + float oy1 = origy1 + line_height; + + // apply title to right panel + if (soft->usage.empty()) + { + mui.draw_text_full(container, "History", origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + ui_globals::cur_sw_dats_view = 0; + } + else + { + float title_size = 0.0f; + float txt_lenght = 0.0f; + std::string t_text[2]; + t_text[0] = "History"; + t_text[1] = "Usage"; + + for (auto & elem: t_text) + { + mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr); + txt_lenght += 0.01f; + title_size = MAX(txt_lenght, title_size); + } + + mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1, + JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size); + } + + if (oldsoft != soft || old_sw_view != ui_globals::cur_sw_dats_view) + { + buffer.clear(); + old_sw_view = ui_globals::cur_sw_dats_view; + oldsoft = soft; + if (ui_globals::cur_sw_dats_view == 0) + { + if (soft->startempty == 1) + machine().datfile().load_data_info(soft->driver, buffer, UI_HISTORY_LOAD); + else + machine().datfile().load_software_info(soft->listname, buffer, soft->shortname, soft->parentname); + } + else + buffer = soft->usage; + } + + if (buffer.empty()) + { + mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER, + WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + return; + } + else + totallines = mui.wrap_text(container, buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size); + + int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size)); + if (totallines < r_visible_lines) + r_visible_lines = totallines; + if (topline_datsview < 0) + topline_datsview = 0; + if (topline_datsview + r_visible_lines >= totallines) + topline_datsview = totallines - r_visible_lines; + + for (int r = 0; r < r_visible_lines; ++r) + { + int itemline = r + topline_datsview; + std::string tempbuf(buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline])); + + // up arrow + if (r == 0 && topline_datsview != 0) + info_arrow(0, origx1, origx2, oy1, line_height, text_size, ud_arrow_width); + // bottom arrow + else if (r == r_visible_lines - 1 && itemline != totallines - 1) + info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width); + else + mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, JUSTIFY_LEFT, + WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr, text_size); + oy1 += (line_height * text_size); + } + + // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow + right_visible_lines = r_visible_lines - (topline_datsview != 0) - (topline_datsview + r_visible_lines != totallines); + } +} + +//------------------------------------------------- +// draw right panel +//------------------------------------------------- + +void ui_menu_select_game::draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); + rgb_t fgcolor = UI_TEXT_COLOR; + bool hide = (ui_globals::panels_status == HIDE_RIGHT_PANEL || ui_globals::panels_status == HIDE_BOTH); + float x2 = (hide) ? origx2 : origx1 + 2.0f * UI_BOX_LR_BORDER; + + // set left-right arrows dimension + float ar_x0 = 0.5f * (x2 + origx1) - 0.5f * lr_arrow_width; + float ar_y0 = 0.5f * (origy2 + origy1) + 0.1f * line_height; + float ar_x1 = ar_x0 + lr_arrow_width; + float ar_y1 = 0.5f * (origy2 + origy1) + 0.9f * line_height; + + //machine().ui().draw_outlined_box(container, origx1, origy1, origx2, origy2, UI_BACKGROUND_COLOR); + mui.draw_outlined_box(container, origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + + if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + hover = HOVER_RPANEL_ARROW; + } + + if (hide) + { + draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X); + return; + } + + draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90); + origx1 = x2; + origy1 = draw_right_box_title(origx1, origy1, origx2, origy2); + + if (ui_globals::rpanel == RP_IMAGES) + arts_render(selectedref, origx1, origy1, origx2, origy2); + else + infos_render(selectedref, origx1, origy1, origx2, origy2); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_select_game::arts_render(void *selectedref, float origx1, float origy1, float origx2, float origy2) +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + bool is_favorites = ((item[0].flags & MENU_FLAG_UI_FAVORITE) != 0); + static ui_software_info *oldsoft = nullptr; + static const game_driver *olddriver = nullptr; + const game_driver *driver = nullptr; + ui_software_info *soft = nullptr; + + if (is_favorites) + { + soft = ((FPTR)selectedref > skip_main_items) ? (ui_software_info *)selectedref : nullptr; + if (soft && soft->startempty == 1) + { + driver = soft->driver; + oldsoft = nullptr; + } + else + olddriver = nullptr; + } + else + { + driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr; + oldsoft = nullptr; + } + + if (driver) + { + if (ui_globals::default_image) + ((driver->flags & MACHINE_TYPE_ARCADE) == 0) ? ui_globals::curimage_view = CABINETS_VIEW : ui_globals::curimage_view = SNAPSHOT_VIEW; + + std::string searchstr; + searchstr = arts_render_common(origx1, origy1, origx2, origy2); + + // loads the image if necessary + if (driver != olddriver || !snapx_bitmap->valid() || ui_globals::switch_image) + { + emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ); + bitmap_argb32 *tmp_bitmap; + tmp_bitmap = auto_alloc(machine(), bitmap_argb32); + + // try to load snapshot first from saved "0000.png" file + std::string fullname(driver->name); + render_load_png(*tmp_bitmap, snapfile, fullname.c_str(), "0000.png"); + + if (!tmp_bitmap->valid()) + render_load_jpeg(*tmp_bitmap, snapfile, fullname.c_str(), "0000.jpg"); + + // if fail, attemp to load from standard file + if (!tmp_bitmap->valid()) + { + fullname.assign(driver->name).append(".png"); + render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(driver->name).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + } + } + + // if fail again, attemp to load from parent file + if (!tmp_bitmap->valid()) + { + // set clone status + bool cloneof = strcmp(driver->parent, "0"); + if (cloneof) + { + int cx = driver_list::find(driver->parent); + if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) + cloneof = false; + } + + if (cloneof) + { + fullname.assign(driver->parent).append(".png"); + render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(driver->parent).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + } + } + } + + olddriver = driver; + ui_globals::switch_image = false; + arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2, false); + auto_free(machine(), tmp_bitmap); + } + + // if the image is available, loaded and valid, display it + if (snapx_bitmap->valid()) + { + float x1 = origx1 + 0.01f; + float x2 = origx2 - 0.01f; + float y1 = origy1 + UI_BOX_TB_BORDER + line_height; + float y2 = origy2 - UI_BOX_TB_BORDER - line_height; + + // apply texture + container->add_quad( x1, y1, x2, y2, ARGB_WHITE, snapx_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + } + } + else if (soft) + { + std::string fullname, pathname; + + if (ui_globals::default_image) + (soft->startempty == 0) ? ui_globals::curimage_view = SNAPSHOT_VIEW : ui_globals::curimage_view = CABINETS_VIEW; + + // arts title and searchpath + std::string searchstr; + searchstr = arts_render_common(origx1, origy1, origx2, origy2); + + // loads the image if necessary + if (soft != oldsoft || !snapx_bitmap->valid() || ui_globals::switch_image) + { + emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ); + bitmap_argb32 *tmp_bitmap; + tmp_bitmap = auto_alloc(machine(), bitmap_argb32); + + if (soft->startempty == 1) + { + // Load driver snapshot + fullname.assign(soft->driver->name).append(".png"); + render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(soft->driver->name).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + } + } + else if (ui_globals::curimage_view == TITLES_VIEW) + { + // First attempt from name list + pathname.assign(soft->listname).append("_titles"); + fullname.assign(soft->shortname).append(".png"); + render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(soft->shortname).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + } + } + else + { + // First attempt from name list + pathname = soft->listname; + fullname.assign(soft->shortname).append(".png"); + render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(soft->shortname).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + } + + if (!tmp_bitmap->valid()) + { + // Second attempt from driver name + part name + pathname.assign(soft->driver->name).append(soft->part.c_str()); + fullname.assign(soft->shortname).append(".png"); + render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(soft->shortname).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + } + } + } + + oldsoft = soft; + ui_globals::switch_image = false; + arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2, true); + auto_free(machine(), tmp_bitmap); + } + + // if the image is available, loaded and valid, display it + if (snapx_bitmap->valid()) + { + float x1 = origx1 + 0.01f; + float x2 = origx2 - 0.01f; + float y1 = origy1 + UI_BOX_TB_BORDER + line_height; + float y2 = origy2 - UI_BOX_TB_BORDER - line_height; + + // apply texture + container->add_quad(x1, y1, x2, y2, ARGB_WHITE, snapx_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + } + } +} diff --git a/src/emu/ui/selgame.h b/src/emu/ui/selgame.h index b5e6687c4f3..4c1cf548d60 100644 --- a/src/emu/ui/selgame.h +++ b/src/emu/ui/selgame.h @@ -1,22 +1,23 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods +// copyright-holders:Dankan1890 /*************************************************************************** ui/selgame.h - Game selector + Main UI menu. ***************************************************************************/ #pragma once -#ifndef __UI_SELGAME_H__ -#define __UI_SELGAME_H__ +#ifndef __UI_MAIN_H__ +#define __UI_MAIN_H__ #include "drivenum.h" -#include "menu.h" +#include "ui/menu.h" -class ui_menu_select_game : public ui_menu { +class ui_menu_select_game : public ui_menu +{ public: ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename); virtual ~ui_menu_select_game(); @@ -27,21 +28,52 @@ public: // force game select menu static void force_game_select(running_machine &machine, render_container *container); + virtual bool menu_has_search_active() override { return (m_search[0] != 0); } + + // draw left panel + virtual float draw_left_panel(float x1, float y1, float x2, float y2) override; + + // draw right panel + virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) override; + private: - // internal state - enum { VISIBLE_GAMES_IN_LIST = 15 }; - UINT8 m_error; - UINT8 m_rerandomize; - char m_search[40]; - int m_matchlist[VISIBLE_GAMES_IN_LIST]; - std::vector<const game_driver *> m_driverlist; - std::unique_ptr<driver_enumerator> m_drivlist; + enum { VISIBLE_GAMES_IN_SEARCH = 200 }; + char m_search[40]; + int m_prev_selected; + static int m_isabios; + + static std::vector<const game_driver *> m_sortedlist; + std::vector<const game_driver *> m_availsortedlist; + std::vector<const game_driver *> m_unavailsortedlist; + std::vector<const game_driver *> m_displaylist; + std::vector<const game_driver *> m_tmp; + + const game_driver *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1]; // internal methods - void build_driver_list(); + void build_custom(); + void build_category(); + void build_available_list(); + void build_list(std::vector<const game_driver *> &vec, const char *filter_text = nullptr, int filter = 0, bool bioscheck = false); + + bool isfavorite(); + void populate_search(); + void init_sorted_list(); + bool load_available_machines(); + void load_custom_filters(); + + // General info + void general_info(const game_driver *driver, std::string &buffer); + + void arts_render(void *selectedref, float x1, float y1, float x2, float y2); + void infos_render(void *selectedref, float x1, float y1, float x2, float y2); + + // handlers void inkey_select(const ui_menu_event *menu_event); - void inkey_cancel(const ui_menu_event *menu_event); + void inkey_select_favorite(const ui_menu_event *menu_event); void inkey_special(const ui_menu_event *menu_event); + void inkey_export(); }; -#endif /* __UI_SELGAME_H__ */ + +#endif /* __UI_MAIN_H__ */ diff --git a/src/emu/ui/selsoft.cpp b/src/emu/ui/selsoft.cpp new file mode 100644 index 00000000000..985a7d31bfc --- /dev/null +++ b/src/emu/ui/selsoft.cpp @@ -0,0 +1,1976 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/selsoft.cpp + + UI softwares menu. + +***************************************************************************/ + +#include "emu.h" +#include "emuopts.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "uiinput.h" +#include "audit.h" +#include "ui/selsoft.h" +#include "ui/datmenu.h" +#include "ui/datfile.h" +#include "ui/inifile.h" +#include "ui/selector.h" +#include "rendfont.h" +#include "rendutil.h" +#include "softlist.h" +#include <algorithm> + +std::string reselect_last::driver; +std::string reselect_last::software; +std::string reselect_last::swlist; +bool reselect_last::m_reselect = false; +static const char *region_lists[] = { "arab", "arg", "asia", "aus", "aut", "bel", "blr", "bra", "can", "chi", "chn", "cze", "den", + "ecu", "esp", "euro", "fin", "fra", "gbr", "ger", "gre", "hkg", "hun", "irl", "isr", + "isv", "ita", "jpn", "kaz", "kor", "lat", "lux", "mex", "ned", "nld", "nor", "nzl", + "pol", "rus", "slo", "spa", "sui", "swe", "tha", "tpe", "tw", "uk", "ukr", "usa" }; + +//------------------------------------------------- +// compares two items in the software list and +// sort them by parent-clone +//------------------------------------------------- + +bool compare_software(ui_software_info a, ui_software_info b) +{ + ui_software_info *x = &a; + ui_software_info *y = &b; + + bool clonex = (x->parentname[0] != '\0'); + bool cloney = (y->parentname[0] != '\0'); + + if (!clonex && !cloney) + return (strmakelower(x->longname) < strmakelower(y->longname)); + + std::string cx(x->parentlongname), cy(y->parentlongname); + + if (clonex && cx[0] == '\0') + clonex = false; + + if (cloney && cy[0] == '\0') + cloney = false; + + if (!clonex && !cloney) + return (strmakelower(x->longname) < strmakelower(y->longname)); + else if (clonex && cloney) + { + if (!core_stricmp(x->parentname.c_str(), y->parentname.c_str()) && !core_stricmp(x->instance.c_str(), y->instance.c_str())) + return (strmakelower(x->longname) < strmakelower(y->longname)); + else + return (strmakelower(cx) < strmakelower(cy)); + } + else if (!clonex && cloney) + { + if (!core_stricmp(x->shortname.c_str(), y->parentname.c_str()) && !core_stricmp(x->instance.c_str(), y->instance.c_str())) + return true; + else + return (strmakelower(x->longname) < strmakelower(cy)); + } + else + { + if (!core_stricmp(x->parentname.c_str(), y->shortname.c_str()) && !core_stricmp(x->instance.c_str(), y->instance.c_str())) + return false; + else + return (strmakelower(cx) < strmakelower(y->longname)); + } +} + +//------------------------------------------------- +// get bios count +//------------------------------------------------- + +bool has_multiple_bios(const game_driver *driver, std::vector<s_bios> &biosname) +{ + if (driver->rom == nullptr) + return 0; + + std::string default_name; + for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom) + if (ROMENTRY_ISDEFAULT_BIOS(rom)) + default_name = ROM_GETNAME(rom); + + for (const rom_entry *rom = driver->rom; !ROMENTRY_ISEND(rom); ++rom) + { + if (ROMENTRY_ISSYSTEM_BIOS(rom)) + { + std::string name(ROM_GETHASHDATA(rom)); + std::string bname(ROM_GETNAME(rom)); + int bios_flags = ROM_GETBIOSFLAGS(rom); + + if (bname == default_name) + { + name.append(" (default)"); + biosname.emplace(biosname.begin(), name, bios_flags - 1); + } + else + biosname.emplace_back(name, bios_flags - 1); + } + } + return (biosname.size() > 1); +} + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_select_software::ui_menu_select_software(running_machine &machine, render_container *container, const game_driver *driver) : ui_menu(machine, container) +{ + if (reselect_last::get()) + reselect_last::set(false); + + sw_filters::actual = 0; + + m_driver = driver; + build_software_list(); + load_sw_custom_filters(); + + ui_globals::curimage_view = SNAPSHOT_VIEW; + ui_globals::switch_image = true; + ui_globals::cur_sw_dats_view = UI_FIRST_LOAD; + + std::string error_string; + machine.options().set_value(OPTION_SOFTWARENAME, "", OPTION_PRIORITY_CMDLINE, error_string); +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_select_software::~ui_menu_select_software() +{ + ui_globals::curimage_view = CABINETS_VIEW; + ui_globals::switch_image = true; +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_select_software::handle() +{ + bool check_filter = false; + + // ignore pause keys by swallowing them before we process the menu + machine().ui_input().pressed(IPT_UI_PAUSE); + + // process the menu + const ui_menu_event *m_event = process(UI_MENU_PROCESS_LR_REPEAT); + + if (m_event != nullptr && m_event->itemref != nullptr) + { + // reset the error on any future m_event + if (ui_error) + ui_error = false; + + // handle selections + else if (m_event->iptkey == IPT_UI_SELECT) + inkey_select(m_event); + + // handle UI_LEFT + else if (m_event->iptkey == IPT_UI_LEFT) + { + // Images + if (ui_globals::rpanel == RP_IMAGES && ui_globals::curimage_view > FIRST_VIEW) + { + ui_globals::curimage_view--; + ui_globals::switch_image = true; + ui_globals::default_image = false; + } + + // Infos + else if (ui_globals::rpanel == RP_INFOS && ui_globals::cur_sw_dats_view > 0) + { + ui_globals::cur_sw_dats_view--; + topline_datsview = 0; + } + } + + // handle UI_RIGHT + else if (m_event->iptkey == IPT_UI_RIGHT) + { + // Images + if (ui_globals::rpanel == RP_IMAGES && ui_globals::curimage_view < LAST_VIEW) + { + ui_globals::curimage_view++; + ui_globals::switch_image = true; + ui_globals::default_image = false; + } + + // Infos + else if (ui_globals::rpanel == RP_INFOS && ui_globals::cur_sw_dats_view < 1) + { + ui_globals::cur_sw_dats_view++; + topline_datsview = 0; + } + } + + // handle UI_DATS + else if (m_event->iptkey == IPT_UI_DATS && machine().ui().options().enabled_dats()) + { + ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref; + + if ((FPTR)ui_swinfo > 1 && machine().datfile().has_data(ui_swinfo->driver)) + { + if (ui_swinfo->startempty == 1) + ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, ui_swinfo->driver)); + else + ui_menu::stack_push(global_alloc_clear<ui_menu_dats_view>(machine(), container, ui_swinfo)); + } + } + + // handle UI_UP_FILTER + else if (m_event->iptkey == IPT_UI_UP_FILTER && sw_filters::actual > UI_SW_FIRST) + { + l_sw_hover = sw_filters::actual - 1; + check_filter = true; + } + + // handle UI_DOWN_FILTER + else if (m_event->iptkey == IPT_UI_DOWN_FILTER && sw_filters::actual < UI_SW_LAST) + { + l_sw_hover = sw_filters::actual + 1; + check_filter = true; + } + + // handle UI_LEFT_PANEL + else if (m_event->iptkey == IPT_UI_LEFT_PANEL) + ui_globals::rpanel = RP_IMAGES; + + // handle UI_RIGHT_PANEL + else if (m_event->iptkey == IPT_UI_RIGHT_PANEL) + ui_globals::rpanel = RP_INFOS; + + // escape pressed with non-empty text clears the text + else if (m_event->iptkey == IPT_UI_CANCEL && m_search[0] != 0) + { + m_search[0] = '\0'; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + // handle UI_FAVORITES + else if (m_event->iptkey == IPT_UI_FAVORITES) + { + ui_software_info *swinfo = (ui_software_info *)m_event->itemref; + + if ((FPTR)swinfo > 2) + { + if (!machine().favorite().isgame_favorite(*swinfo)) + { + machine().favorite().add_favorite_game(*swinfo); + machine().popmessage("%s\n added to favorites list.", swinfo->longname.c_str()); + } + + else + { + machine().popmessage("%s\n removed from favorites list.", swinfo->longname.c_str()); + machine().favorite().remove_favorite_game(); + } + } + } + + // typed characters append to the buffer + else if (m_event->iptkey == IPT_SPECIAL) + inkey_special(m_event); + + else if (m_event->iptkey == IPT_OTHER) + check_filter = true; + } + + if (m_event != nullptr && m_event->itemref == nullptr) + { + // reset the error on any future m_event + if (ui_error) + ui_error = false; + + else if (m_event->iptkey == IPT_OTHER) + check_filter = true; + + // handle UI_UP_FILTER + else if (m_event->iptkey == IPT_UI_UP_FILTER && sw_filters::actual > UI_SW_FIRST) + { + l_sw_hover = sw_filters::actual - 1; + check_filter = true; + } + + // handle UI_DOWN_FILTER + else if (m_event->iptkey == IPT_UI_DOWN_FILTER && sw_filters::actual < UI_SW_LAST) + { + l_sw_hover = sw_filters::actual + 1; + check_filter = true; + } + } + + // if we're in an error state, overlay an error message + if (ui_error) + machine().ui().draw_text_box(container, + "The selected software is missing one or more required files. " + "Please select a different software.\n\nPress any key (except ESC) to continue.", + JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR); + + // handle filters selection from key shortcuts + if (check_filter) + { + m_search[0] = '\0'; + + switch (l_sw_hover) + { + case UI_SW_REGION: + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.region.ui, + m_filter.region.actual, SELECTOR_SOFTWARE, l_sw_hover)); + break; + case UI_SW_YEARS: + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.year.ui, + m_filter.year.actual, SELECTOR_SOFTWARE, l_sw_hover)); + break; + case UI_SW_LIST: + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.swlist.description, + m_filter.swlist.actual, SELECTOR_SOFTWARE, l_sw_hover)); + break; + case UI_SW_TYPE: + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.type.ui, + m_filter.type.actual, SELECTOR_SOFTWARE, l_sw_hover)); + break; + case UI_SW_PUBLISHERS: + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, m_filter.publisher.ui, + m_filter.publisher.actual, SELECTOR_SOFTWARE, l_sw_hover)); + break; + case UI_SW_CUSTOM: + sw_filters::actual = l_sw_hover; + ui_menu::stack_push(global_alloc_clear<ui_menu_swcustom_filter>(machine(), container, m_driver, m_filter)); + break; + default: + sw_filters::actual = l_sw_hover; + reset(UI_MENU_RESET_SELECT_FIRST); + break; + } + } +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_select_software::populate() +{ + UINT32 flags_ui = MENU_FLAG_UI_SWLIST | MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW; + m_has_empty_start = true; + int old_software = -1; + + machine_config config(*m_driver, machine().options()); + image_interface_iterator iter(config.root_device()); + + for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next()) + if (image->filename() == nullptr && image->must_be_loaded()) + { + m_has_empty_start = false; + break; + } + + // no active search + if (m_search[0] == 0) + { + // if the device can be loaded empty, add an item + if (m_has_empty_start) + item_append("[Start empty]", nullptr, flags_ui, (void *)&m_swinfo[0]); + + m_displaylist.clear(); + m_tmp.clear(); + + switch (sw_filters::actual) + { + case UI_SW_PUBLISHERS: + build_list(m_tmp, m_filter.publisher.ui[m_filter.publisher.actual].c_str()); + break; + + case UI_SW_LIST: + build_list(m_tmp, m_filter.swlist.name[m_filter.swlist.actual].c_str()); + break; + + case UI_SW_YEARS: + build_list(m_tmp, m_filter.year.ui[m_filter.year.actual].c_str()); + break; + + case UI_SW_TYPE: + build_list(m_tmp, m_filter.type.ui[m_filter.type.actual].c_str()); + break; + + case UI_SW_REGION: + build_list(m_tmp, m_filter.region.ui[m_filter.region.actual].c_str()); + break; + + case UI_SW_CUSTOM: + build_custom(); + break; + + default: + build_list(m_tmp); + break; + } + + // iterate over entries + for (size_t curitem = 0; curitem < m_displaylist.size(); ++curitem) + { + if (reselect_last::software == "[Start empty]" && !reselect_last::driver.empty()) + old_software = 0; + + else if (m_displaylist[curitem]->shortname == reselect_last::software && m_displaylist[curitem]->listname == reselect_last::swlist) + old_software = m_has_empty_start ? curitem + 1 : curitem; + + item_append(m_displaylist[curitem]->longname.c_str(), m_displaylist[curitem]->devicetype.c_str(), + m_displaylist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), (void *)m_displaylist[curitem]); + } + } + + else + { + find_matches(m_search, VISIBLE_GAMES_IN_SEARCH); + + for (int curitem = 0; m_searchlist[curitem] != nullptr; ++curitem) + item_append(m_searchlist[curitem]->longname.c_str(), m_searchlist[curitem]->devicetype.c_str(), + m_searchlist[curitem]->parentname.empty() ? flags_ui : (MENU_FLAG_INVERT | flags_ui), + (void *)m_searchlist[curitem]); + } + + item_append(MENU_SEPARATOR_ITEM, nullptr, flags_ui, nullptr); + + // configure the custom rendering + customtop = 4.0f * machine().ui().get_line_height() + 5.0f * UI_BOX_TB_BORDER; + custombottom = 5.0f * machine().ui().get_line_height() + 4.0f * UI_BOX_TB_BORDER; + + if (old_software != -1) + { + selected = old_software; + top_line = selected - (ui_globals::visible_sw_lines / 2); + } + + reselect_last::reset(); +} + +//------------------------------------------------- +// build a list of softwares +//------------------------------------------------- + +void ui_menu_select_software::build_software_list() +{ + // add start empty item + m_swinfo.emplace_back(m_driver->name, m_driver->description, "", "", "", 0, "", m_driver, "", "", "", 1, "", "", "", true); + + machine_config config(*m_driver, machine().options()); + software_list_device_iterator deviter(config.root_device()); + + // iterate thru all software lists + for (software_list_device *swlist = deviter.first(); swlist != nullptr; swlist = deviter.next()) + { + m_filter.swlist.name.push_back(swlist->list_name()); + m_filter.swlist.description.push_back(swlist->description()); + for (software_info *swinfo = swlist->first_software_info(); swinfo != nullptr; swinfo = swinfo->next()) + { + software_part *part = swinfo->first_part(); + if (part->is_compatible(*swlist)) + { + const char *instance_name = nullptr; + const char *type_name = nullptr; + ui_software_info tmpmatches; + image_interface_iterator imgiter(config.root_device()); + for (device_image_interface *image = imgiter.first(); image != nullptr; image = imgiter.next()) + { + const char *interface = image->image_interface(); + if (interface != nullptr && part->matches_interface(interface)) + { + instance_name = image->instance_name(); + if (instance_name != nullptr) + tmpmatches.instance = image->instance_name(); + + type_name = image->image_type_name(); + if (type_name != nullptr) + tmpmatches.devicetype = type_name; + break; + } + } + + if (instance_name == nullptr || type_name == nullptr) + continue; + + if (swinfo->shortname()) tmpmatches.shortname = swinfo->shortname(); + if (swinfo->longname()) tmpmatches.longname = swinfo->longname(); + if (swinfo->parentname()) tmpmatches.parentname = swinfo->parentname(); + if (swinfo->year()) tmpmatches.year = swinfo->year(); + if (swinfo->publisher()) tmpmatches.publisher = swinfo->publisher(); + tmpmatches.supported = swinfo->supported(); + if (part->name()) tmpmatches.part = part->name(); + tmpmatches.driver = m_driver; + if (swlist->list_name()) tmpmatches.listname = swlist->list_name(); + if (part->interface()) tmpmatches.interface = part->interface(); + tmpmatches.startempty = 0; + tmpmatches.parentlongname.clear(); + tmpmatches.usage.clear(); + tmpmatches.available = false; + + for (feature_list_item *flist = swinfo->other_info(); flist != nullptr; flist = flist->next()) + if (!strcmp(flist->name(), "usage")) + tmpmatches.usage = flist->value(); + + m_swinfo.push_back(tmpmatches); + m_filter.region.set(tmpmatches.longname); + m_filter.publisher.set(tmpmatches.publisher); + m_filter.year.set(tmpmatches.year); + m_filter.type.set(tmpmatches.devicetype); + } + } + } + m_displaylist.resize(m_swinfo.size() + 1); + + // retrieve and set the long name of software for parents + for (size_t y = 1; y < m_swinfo.size(); ++y) + { + if (!m_swinfo[y].parentname.empty()) + { + std::string lparent(m_swinfo[y].parentname); + bool found = false; + + // first scan backward + for (int x = y; x > 0; --x) + if (lparent == m_swinfo[x].shortname && m_swinfo[y].listname == m_swinfo[x].listname) + { + m_swinfo[y].parentlongname = m_swinfo[x].longname; + found = true; + break; + } + + // not found? then scan forward + for (size_t x = y; !found && x < m_swinfo.size(); ++x) + if (lparent == m_swinfo[x].shortname && m_swinfo[y].listname == m_swinfo[x].listname) + { + m_swinfo[y].parentlongname = m_swinfo[x].longname; + break; + } + } + } + + std::string searchstr, curpath; + const osd_directory_entry *dir; + for (auto & elem : m_filter.swlist.name) + { + path_iterator path(machine().options().media_path()); + while (path.next(curpath)) + { + searchstr.assign(curpath).append(PATH_SEPARATOR).append(elem).append(";"); + file_enumerator fpath(searchstr.c_str()); + + // iterate while we get new objects + while ((dir = fpath.next()) != nullptr) + { + std::string name; + if (dir->type == ENTTYPE_FILE) + name = core_filename_extract_base(dir->name, true); + else if (dir->type == ENTTYPE_DIR && strcmp(dir->name, ".") != 0) + name = dir->name; + else + continue; + + strmakelower(name); + for (auto & yelem : m_swinfo) + if (yelem.shortname == name && yelem.listname == elem) + { + yelem.available = true; + break; + } + } + } + } + + // sort array + std::stable_sort(m_swinfo.begin() + 1, m_swinfo.end(), compare_software); + std::stable_sort(m_filter.region.ui.begin(), m_filter.region.ui.end()); + std::stable_sort(m_filter.year.ui.begin(), m_filter.year.ui.end()); + std::stable_sort(m_filter.type.ui.begin(), m_filter.type.ui.end()); + std::stable_sort(m_filter.publisher.ui.begin(), m_filter.publisher.ui.end()); + + for (size_t x = 1; x < m_swinfo.size(); ++x) + m_sortedlist.push_back(&m_swinfo[x]); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_select_software::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + ui_software_info *swinfo = (ui_software_info *)selectedref; + const game_driver *driver = nullptr; + ui_manager &mui = machine().ui(); + float width; + std::string tempbuf[5], filtered; + rgb_t color = UI_BACKGROUND_COLOR; + bool isstar = false; + float tbarspace = mui.get_line_height(); + + // determine the text for the header + int vis_item = (m_search[0] != 0) ? visible_items : (m_has_empty_start ? visible_items - 1 : visible_items); + strprintf(tempbuf[0], "MAME %s ( %d / %d softwares )", bare_build_version, vis_item, (int)m_swinfo.size() - 1); + tempbuf[1].assign("Driver: \"").append(m_driver->description).append("\" software list "); + + if (sw_filters::actual == UI_SW_REGION && m_filter.region.ui.size() != 0) + filtered.assign("Region: ").append(m_filter.region.ui[m_filter.region.actual]).append(" - "); + else if (sw_filters::actual == UI_SW_PUBLISHERS) + filtered.assign("Publisher: ").append(m_filter.publisher.ui[m_filter.publisher.actual]).append(" - "); + else if (sw_filters::actual == UI_SW_YEARS) + filtered.assign("Year: ").append(m_filter.year.ui[m_filter.year.actual]).append(" - "); + else if (sw_filters::actual == UI_SW_LIST) + filtered.assign("Software List: ").append(m_filter.swlist.description[m_filter.swlist.actual]).append(" - "); + else if (sw_filters::actual == UI_SW_TYPE) + filtered.assign("Device type: ").append(m_filter.type.ui[m_filter.type.actual]).append(" - "); + + tempbuf[2].assign(filtered).append("Search: ").append(m_search).append("_"); + + // get the size of the text + float maxwidth = origx2 - origx1; + + for (int line = 0; line < 3; ++line) + { + mui.draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(width, maxwidth); + } + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - 3.0f * UI_BOX_TB_BORDER - tbarspace; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + for (int line = 0; line < 3; ++line) + { + mui.draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + y1 += mui.get_line_height(); + } + + // determine the text to render below + if (swinfo && swinfo->startempty == 1) + driver = swinfo->driver; + + if ((FPTR)driver > 1) + { + isstar = machine().favorite().isgame_favorite(driver); + + // first line is game description + strprintf(tempbuf[0], "%-.100s", driver->description); + + // next line is year, manufacturer + strprintf(tempbuf[1], "%s, %-.100s", driver->year, driver->manufacturer); + + // next line is clone/parent status + int cloneof = driver_list::non_bios_clone(*driver); + + if (cloneof != -1) + strprintf(tempbuf[2], "Driver is clone of: %-.100s", driver_list::driver(cloneof).description); + else + tempbuf[2] = "Driver is parent"; + + // next line is overall driver status + if (driver->flags & MACHINE_NOT_WORKING) + tempbuf[3] = "Overall: NOT WORKING"; + else if (driver->flags & MACHINE_UNEMULATED_PROTECTION) + tempbuf[3] = "Overall: Unemulated Protection"; + else + tempbuf[3] = "Overall: Working"; + + // next line is graphics, sound status + if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS)) + tempbuf[4] = "Graphics: Imperfect, "; + else + tempbuf[4] = "Graphics: OK, "; + + if (driver->flags & MACHINE_NO_SOUND) + tempbuf[4].append("Sound: Unimplemented"); + else if (driver->flags & MACHINE_IMPERFECT_SOUND) + tempbuf[4].append("Sound: Imperfect"); + else + tempbuf[4].append("Sound: OK"); + + color = UI_GREEN_COLOR; + + if ((driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS + | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0) + color = UI_YELLOW_COLOR; + + if ((driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0) + color = UI_RED_COLOR; + + } + + else if ((FPTR)swinfo > 1) + { + isstar = machine().favorite().isgame_favorite(*swinfo); + + // first line is long name + strprintf(tempbuf[0], "%-.100s", swinfo->longname.c_str()); + + // next line is year, publisher + strprintf(tempbuf[1], "%s, %-.100s", swinfo->year.c_str(), swinfo->publisher.c_str()); + + // next line is parent/clone + if (!swinfo->parentname.empty()) + strprintf(tempbuf[2], "Software is clone of: %-.100s", !swinfo->parentlongname.empty() ? swinfo->parentlongname.c_str() : swinfo->parentname.c_str()); + else + tempbuf[2] = "Software is parent"; + + // next line is supported status + if (swinfo->supported == SOFTWARE_SUPPORTED_NO) + { + tempbuf[3] = "Supported: No"; + color = UI_RED_COLOR; + } + else if (swinfo->supported == SOFTWARE_SUPPORTED_PARTIAL) + { + tempbuf[3] = "Supported: Partial"; + color = UI_YELLOW_COLOR; + } + else + { + tempbuf[3] = "Supported: Yes"; + color = UI_GREEN_COLOR; + } + + // last line is romset name + strprintf(tempbuf[4], "romset: %-.100s", swinfo->shortname.c_str()); + } + + else + { + std::string copyright(emulator_info::get_copyright()); + size_t found = copyright.find("\n"); + + tempbuf[0].clear(); + tempbuf[1].assign(emulator_info::get_appname()).append(" ").append(build_version); + tempbuf[2] = copyright.substr(0, found); + tempbuf[3] = copyright.substr(found + 1); + tempbuf[4].clear(); + } + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = y2; + y2 = origy1 - UI_BOX_TB_BORDER; + + // draw toolbar + draw_toolbar(x1, y1, x2, y2, true); + + // get the size of the text + maxwidth = origx2 - origx1; + + for (auto & elem : tempbuf) + { + mui.draw_text_full(container, elem.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + } + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = origy2 + UI_BOX_TB_BORDER; + y2 = origy2 + bottom; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, color); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // is favorite? draw the star + if (isstar) + draw_star(x1, y1); + + // draw all lines + for (auto & elem : tempbuf) + { + mui.draw_text_full(container, elem.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_NEVER, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + y1 += machine().ui().get_line_height(); + } +} + +//------------------------------------------------- +// handle select key event +//------------------------------------------------- + +void ui_menu_select_software::inkey_select(const ui_menu_event *m_event) +{ + ui_software_info *ui_swinfo = (ui_software_info *)m_event->itemref; + ui_options &mopt = machine().ui().options(); + + if (ui_swinfo->startempty == 1) + { + std::vector<s_bios> biosname; + if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname)) + ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo->driver, false, true)); + else + { + reselect_last::driver = ui_swinfo->driver->name; + reselect_last::software = "[Start empty]"; + reselect_last::swlist.clear(); + reselect_last::set(true); + machine().manager().schedule_new_driver(*ui_swinfo->driver); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } + } + + else + { + // first validate + driver_enumerator drivlist(machine().options(), *ui_swinfo->driver); + media_auditor auditor(drivlist); + drivlist.next(); + software_list_device *swlist = software_list_device::find_by_name(drivlist.config(), ui_swinfo->listname.c_str()); + software_info *swinfo = swlist->find(ui_swinfo->shortname.c_str()); + + media_auditor::summary summary = auditor.audit_software(swlist->list_name(), swinfo, AUDIT_VALIDATE_FAST); + + if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + { + std::vector<s_bios> biosname; + if (!mopt.skip_bios_menu() && has_multiple_bios(ui_swinfo->driver, biosname)) + { + ui_menu::stack_push(global_alloc_clear<ui_bios_selection>(machine(), container, biosname, (void *)ui_swinfo, true, false)); + return; + } + else if (!mopt.skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str())) + { + std::unordered_map<std::string, std::string> parts; + for (const software_part *swpart = swinfo->first_part(); swpart != nullptr; swpart = swpart->next()) + { + if (swpart->matches_interface(ui_swinfo->interface.c_str())) + { + std::string menu_part_name(swpart->name()); + if (swpart->feature("part_id") != nullptr) + menu_part_name.assign("(").append(swpart->feature("part_id")).append(")"); + parts.emplace(swpart->name(), menu_part_name); + } + } + ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo)); + return; + } + std::string error_string; + std::string string_list = std::string(ui_swinfo->listname).append(":").append(ui_swinfo->shortname).append(":").append(ui_swinfo->part).append(":").append(ui_swinfo->instance); + machine().options().set_value(OPTION_SOFTWARENAME, string_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + std::string snap_list = std::string(ui_swinfo->listname).append(PATH_SEPARATOR).append(ui_swinfo->shortname); + machine().options().set_value(OPTION_SNAPNAME, snap_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + reselect_last::driver = drivlist.driver().name; + reselect_last::software = ui_swinfo->shortname; + reselect_last::swlist = ui_swinfo->listname; + reselect_last::set(true); + machine().manager().schedule_new_driver(drivlist.driver()); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } + + // otherwise, display an error + else + { + reset(UI_MENU_RESET_REMEMBER_POSITION); + ui_error = true; + } + } +} + +//------------------------------------------------- +// handle special key event +//------------------------------------------------- + +void ui_menu_select_software::inkey_special(const ui_menu_event *m_event) +{ + int buflen = strlen(m_search); + + // if it's a backspace and we can handle it, do so + if ((m_event->unichar == 8 || m_event->unichar == 0x7f) && buflen > 0) + { + *(char *)utf8_previous_char(&m_search[buflen]) = 0; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + // if it's any other key and we're not maxed out, update + else if (m_event->unichar >= ' ' && m_event->unichar < 0x7f) + { + buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, m_event->unichar); + m_search[buflen] = 0; + reset(UI_MENU_RESET_SELECT_FIRST); + } +} + +//------------------------------------------------- +// load custom filters info from file +//------------------------------------------------- + +void ui_menu_select_software::load_sw_custom_filters() +{ + // attempt to open the output file + emu_file file(machine().ui().options().ui_path(), OPEN_FLAG_READ); + if (file.open("custom_", m_driver->name, "_filter.ini") == FILERR_NONE) + { + char buffer[MAX_CHAR_INFO]; + + // get number of filters + file.gets(buffer, MAX_CHAR_INFO); + char *pb = strchr(buffer, '='); + sw_custfltr::numother = atoi(++pb) - 1; + + // get main filter + file.gets(buffer, MAX_CHAR_INFO); + pb = strchr(buffer, '=') + 2; + + for (int y = 0; y < sw_filters::length; ++y) + if (!strncmp(pb, sw_filters::text[y], strlen(sw_filters::text[y]))) + { + sw_custfltr::main = y; + break; + } + + for (int x = 1; x <= sw_custfltr::numother; ++x) + { + file.gets(buffer, MAX_CHAR_INFO); + char *cb = strchr(buffer, '=') + 2; + for (int y = 0; y < sw_filters::length; y++) + { + if (!strncmp(cb, sw_filters::text[y], strlen(sw_filters::text[y]))) + { + sw_custfltr::other[x] = y; + if (y == UI_SW_PUBLISHERS) + { + file.gets(buffer, MAX_CHAR_INFO); + char *ab = strchr(buffer, '=') + 2; + for (size_t z = 0; z < m_filter.publisher.ui.size(); ++z) + if (!strncmp(ab, m_filter.publisher.ui[z].c_str(), m_filter.publisher.ui[z].length())) + sw_custfltr::mnfct[x] = z; + } + else if (y == UI_SW_YEARS) + { + file.gets(buffer, MAX_CHAR_INFO); + char *db = strchr(buffer, '=') + 2; + for (size_t z = 0; z < m_filter.year.ui.size(); ++z) + if (!strncmp(db, m_filter.year.ui[z].c_str(), m_filter.year.ui[z].length())) + sw_custfltr::year[x] = z; + } + else if (y == UI_SW_LIST) + { + file.gets(buffer, MAX_CHAR_INFO); + char *gb = strchr(buffer, '=') + 2; + for (size_t z = 0; z < m_filter.swlist.name.size(); ++z) + if (!strncmp(gb, m_filter.swlist.name[z].c_str(), m_filter.swlist.name[z].length())) + sw_custfltr::list[x] = z; + } + else if (y == UI_SW_TYPE) + { + file.gets(buffer, MAX_CHAR_INFO); + char *fb = strchr(buffer, '=') + 2; + for (size_t z = 0; z < m_filter.type.ui.size(); ++z) + if (!strncmp(fb, m_filter.type.ui[z].c_str(), m_filter.type.ui[z].length())) + sw_custfltr::type[x] = z; + } + else if (y == UI_SW_REGION) + { + file.gets(buffer, MAX_CHAR_INFO); + char *eb = strchr(buffer, '=') + 2; + for (size_t z = 0; z < m_filter.region.ui.size(); ++z) + if (!strncmp(eb, m_filter.region.ui[z].c_str(), m_filter.region.ui[z].length())) + sw_custfltr::region[x] = z; + } + } + } + } + file.close(); + } +} + +//------------------------------------------------- +// set software regions +//------------------------------------------------- + +void c_sw_region::set(std::string &str) +{ + std::string name = getname(str); + if (std::find(ui.begin(), ui.end(), name) != ui.end()) + return; + + ui.push_back(name); +} + +std::string c_sw_region::getname(std::string &str) +{ + std::string fullname(str); + strmakelower(fullname); + size_t found = fullname.find("("); + + if (found != std::string::npos) + { + size_t ends = fullname.find_first_not_of("abcdefghijklmnopqrstuvwxyz", found + 1); + std::string temp(fullname.substr(found + 1, ends - found - 1)); + + for (auto & elem : region_lists) + if (temp == elem) + return (str.substr(found + 1, ends - found - 1)); + } + return std::string("<none>"); +} + +//------------------------------------------------- +// set software device type +//------------------------------------------------- + +void c_sw_type::set(std::string &str) +{ + if (std::find(ui.begin(), ui.end(), str) != ui.end()) + return; + + ui.push_back(str); +} + +//------------------------------------------------- +// set software years +//------------------------------------------------- + +void c_sw_year::set(std::string &str) +{ + if (std::find(ui.begin(), ui.end(), str) != ui.end()) + return; + + ui.push_back(str); +} + +//------------------------------------------------- +// set software publishers +//------------------------------------------------- + +void c_sw_publisher::set(std::string &str) +{ + std::string name = getname(str); + if (std::find(ui.begin(), ui.end(), name) != ui.end()) + return; + + ui.push_back(name); +} + +std::string c_sw_publisher::getname(std::string &str) +{ + size_t found = str.find("("); + + if (found != std::string::npos) + return (str.substr(0, found - 1)); + else + return str; +} + +//------------------------------------------------- +// build display list +//------------------------------------------------- +void ui_menu_select_software::build_list(std::vector<ui_software_info *> &s_drivers, const char *filter_text, int filter) +{ + + if (s_drivers.empty() && filter == -1) + { + filter = sw_filters::actual; + s_drivers = m_sortedlist; + } + + // iterate over entries + for (auto & s_driver : s_drivers) + { + switch (filter) + { + case UI_SW_PARENTS: + if (s_driver->parentname.empty()) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_CLONES: + if (!s_driver->parentname.empty()) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_AVAILABLE: + if (s_driver->available) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_UNAVAILABLE: + if (!s_driver->available) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_SUPPORTED: + if (s_driver->supported == SOFTWARE_SUPPORTED_YES) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_PARTIAL_SUPPORTED: + if (s_driver->supported == SOFTWARE_SUPPORTED_PARTIAL) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_UNSUPPORTED: + if (s_driver->supported == SOFTWARE_SUPPORTED_NO) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_REGION: + { + std::string name = m_filter.region.getname(s_driver->longname); + + if(!name.empty() && name == filter_text) + m_displaylist.push_back(s_driver); + break; + } + + case UI_SW_PUBLISHERS: + { + std::string name = m_filter.publisher.getname(s_driver->publisher); + + if(!name.empty() && name == filter_text) + m_displaylist.push_back(s_driver); + break; + } + + case UI_SW_YEARS: + if(s_driver->year == filter_text) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_LIST: + if(s_driver->listname == filter_text) + m_displaylist.push_back(s_driver); + break; + + case UI_SW_TYPE: + if(s_driver->devicetype == filter_text) + m_displaylist.push_back(s_driver); + break; + + default: + m_displaylist.push_back(s_driver); + break; + } + } +} + +//------------------------------------------------- +// find approximate matches +//------------------------------------------------- + +void ui_menu_select_software::find_matches(const char *str, int count) +{ + // allocate memory to track the penalty value + std::vector<int> penalty(count, 9999); + int index = 0; + + for (; m_displaylist[index]; ++index) + { + // pick the best match between driver name and description + int curpenalty = fuzzy_substring(str, m_displaylist[index]->longname); + int tmp = fuzzy_substring(str, m_displaylist[index]->shortname); + curpenalty = MIN(curpenalty, tmp); + + // insert into the sorted table of matches + for (int matchnum = count - 1; matchnum >= 0; --matchnum) + { + // stop if we're worse than the current entry + if (curpenalty >= penalty[matchnum]) + break; + + // as long as this isn't the last entry, bump this one down + if (matchnum < count - 1) + { + penalty[matchnum + 1] = penalty[matchnum]; + m_searchlist[matchnum + 1] = m_searchlist[matchnum]; + } + + m_searchlist[matchnum] = m_displaylist[index]; + penalty[matchnum] = curpenalty; + } + } + (index < count) ? m_searchlist[index] = nullptr : m_searchlist[count] = nullptr; +} + +//------------------------------------------------- +// build custom display list +//------------------------------------------------- + +void ui_menu_select_software::build_custom() +{ + std::vector<ui_software_info *> s_drivers; + + build_list(m_sortedlist, nullptr, sw_custfltr::main); + + for (int count = 1; count <= sw_custfltr::numother; ++count) + { + int filter = sw_custfltr::other[count]; + s_drivers = m_displaylist; + m_displaylist.clear(); + + switch (filter) + { + case UI_SW_YEARS: + build_list(s_drivers, m_filter.year.ui[sw_custfltr::year[count]].c_str(), filter); + break; + case UI_SW_LIST: + build_list(s_drivers, m_filter.swlist.name[sw_custfltr::list[count]].c_str(), filter); + break; + case UI_SW_TYPE: + build_list(s_drivers, m_filter.type.ui[sw_custfltr::type[count]].c_str(), filter); + break; + case UI_SW_PUBLISHERS: + build_list(s_drivers, m_filter.publisher.ui[sw_custfltr::mnfct[count]].c_str(), filter); + break; + case UI_SW_REGION: + build_list(s_drivers, m_filter.region.ui[sw_custfltr::region[count]].c_str(), filter); + break; + default: + build_list(s_drivers, nullptr, filter); + break; + } + } +} + +//------------------------------------------------- +// draw left box +//------------------------------------------------- + +float ui_menu_select_software::draw_left_panel(float x1, float y1, float x2, float y2) +{ + ui_manager &mui = machine().ui(); + + if (ui_globals::panels_status == SHOW_PANELS || ui_globals::panels_status == HIDE_RIGHT_PANEL) + { + float origy1 = y1; + float origy2 = y2; + float text_size = 0.75f; + float l_height = mui.get_line_height(); + float line_height = l_height * text_size; + float left_width = 0.0f; + int text_lenght = sw_filters::length; + int afilter = sw_filters::actual; + int phover = HOVER_SW_FILTER_FIRST; + const char **text = sw_filters::text; + float sc = y2 - y1 - (2.0f * UI_BOX_TB_BORDER); + + if ((text_lenght * line_height) > sc) + { + float lm = sc / (text_lenght); + text_size = lm / l_height; + line_height = l_height * text_size; + } + + float text_sign = mui.get_string_width_ex("_# ", text_size); + for (int x = 0; x < text_lenght; ++x) + { + float total_width; + + // compute width of left hand side + total_width = mui.get_string_width_ex(text[x], text_size); + total_width += text_sign; + + // track the maximum + if (total_width > left_width) + left_width = total_width; + } + + x2 = x1 + left_width + 2.0f * UI_BOX_LR_BORDER; + //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + y2 -= UI_BOX_TB_BORDER; + + for (int filter = 0; filter < text_lenght; ++filter) + { + std::string str(text[filter]); + rgb_t bgcolor = UI_TEXT_BG_COLOR; + rgb_t fgcolor = UI_TEXT_COLOR; + + if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y1 + line_height > mouse_y) + { + bgcolor = UI_MOUSEOVER_BG_COLOR; + fgcolor = UI_MOUSEOVER_COLOR; + hover = phover + filter; + } + + if (afilter == filter) + { + bgcolor = UI_SELECTED_BG_COLOR; + fgcolor = UI_SELECTED_COLOR; + } + + if (bgcolor != UI_TEXT_BG_COLOR) + container->add_rect(x1, y1, x2, y1 + line_height, bgcolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA) | PRIMFLAG_TEXWRAP(TRUE)); + + float x1t = x1 + text_sign; + if (afilter == UI_SW_CUSTOM) + { + if (filter == sw_custfltr::main) + { + str.assign("@custom1 ").append(text[filter]); + x1t -= text_sign; + } + else + { + for (int count = 1; count <= sw_custfltr::numother; ++count) + { + int cfilter = sw_custfltr::other[count]; + if (cfilter == filter) + { + strprintf(str, "@custom%d %s", count + 1, text[filter]); + x1t -= text_sign; + break; + } + } + } + convert_command_glyph(str); + } + + mui.draw_text_full(container, str.c_str(), x1t, y1, x2 - x1, JUSTIFY_LEFT, WRAP_NEVER, + DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr, text_size); + y1 += line_height; + } + + x1 = x2 + UI_BOX_LR_BORDER; + x2 = x1 + 2.0f * UI_BOX_LR_BORDER; + y1 = origy1; + y2 = origy2; + line_height = mui.get_line_height(); + float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); + rgb_t fgcolor = UI_TEXT_COLOR; + + // set left-right arrows dimension + float ar_x0 = 0.5f * (x2 + x1) - 0.5f * lr_arrow_width; + float ar_y0 = 0.5f * (y2 + y1) + 0.1f * line_height; + float ar_x1 = ar_x0 + lr_arrow_width; + float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height; + + //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + + if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + hover = HOVER_LPANEL_ARROW; + } + + draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X); + return x2 + UI_BOX_LR_BORDER; + } + else + { + float line_height = mui.get_line_height(); + float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); + rgb_t fgcolor = UI_TEXT_COLOR; + + // set left-right arrows dimension + float ar_x0 = 0.5f * (x2 + x1) - 0.5f * lr_arrow_width; + float ar_y0 = 0.5f * (y2 + y1) + 0.1f * line_height; + float ar_x1 = ar_x0 + lr_arrow_width; + float ar_y1 = 0.5f * (y2 + y1) + 0.9f * line_height; + + //machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + mui.draw_outlined_box(container, x1, y1, x2, y2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + + if (mouse_hit && x1 <= mouse_x && x2 > mouse_x && y1 <= mouse_y && y2 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + hover = HOVER_LPANEL_ARROW; + } + + draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90); + return x2 + UI_BOX_LR_BORDER; + } +} + +//------------------------------------------------- +// draw infos +//------------------------------------------------- + +void ui_menu_select_software::infos_render(void *selectedref, float origx1, float origy1, float origx2, float origy2) +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + static std::string buffer; + std::vector<int> xstart; + std::vector<int> xend; + float text_size = machine().ui().options().infos_size(); + ui_software_info *soft = (ui_software_info *)selectedref; + static ui_software_info *oldsoft = nullptr; + static int old_sw_view = -1; + + float gutter_width = 0.4f * line_height * machine().render().ui_aspect() * 1.3f; + float ud_arrow_width = line_height * machine().render().ui_aspect(); + float oy1 = origy1 + line_height; + + // apply title to right panel + if (soft && soft->usage.empty()) + { + mui.draw_text_full(container, "History", origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + ui_globals::cur_sw_dats_view = 0; + } + else + { + float title_size = 0.0f; + float txt_lenght = 0.0f; + std::string t_text[2]; + t_text[0] = "History"; + t_text[1] = "Usage"; + + for (auto & elem : t_text) + { + mui.draw_text_full(container, elem.c_str(), origx1, origy1, origx2 - origx1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, &txt_lenght, nullptr); + txt_lenght += 0.01f; + title_size = MAX(txt_lenght, title_size); + } + + mui.draw_text_full(container, t_text[ui_globals::cur_sw_dats_view].c_str(), origx1, origy1, origx2 - origx1, + JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, + nullptr, nullptr); + + draw_common_arrow(origx1, origy1, origx2, origy2, ui_globals::cur_sw_dats_view, 0, 1, title_size); + } + + if (oldsoft != soft || old_sw_view != ui_globals::cur_sw_dats_view) + { + buffer.clear(); + old_sw_view = ui_globals::cur_sw_dats_view; + oldsoft = soft; + if (ui_globals::cur_sw_dats_view == 0) + { + if (soft->startempty == 1) + machine().datfile().load_data_info(soft->driver, buffer, UI_HISTORY_LOAD); + else + machine().datfile().load_software_info(soft->listname, buffer, soft->shortname, soft->parentname); + } + else + buffer = soft->usage; + } + + if (buffer.empty()) + { + mui.draw_text_full(container, "No Infos Available", origx1, (origy2 + origy1) * 0.5f, origx2 - origx1, JUSTIFY_CENTER, + WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + return; + } + else + totallines = mui.wrap_text(container, buffer.c_str(), origx1, origy1, origx2 - origx1 - (2.0f * gutter_width), xstart, xend, text_size); + + int r_visible_lines = floor((origy2 - oy1) / (line_height * text_size)); + if (totallines < r_visible_lines) + r_visible_lines = totallines; + if (topline_datsview < 0) + topline_datsview = 0; + if (topline_datsview + r_visible_lines >= totallines) + topline_datsview = totallines - r_visible_lines; + + for (int r = 0; r < r_visible_lines; ++r) + { + int itemline = r + topline_datsview; + std::string tempbuf; + tempbuf.assign(buffer.substr(xstart[itemline], xend[itemline] - xstart[itemline])); + + // up arrow + if (r == 0 && topline_datsview != 0) + info_arrow(0, origx1, origx2, oy1, line_height, text_size, ud_arrow_width); + // bottom arrow + else if (r == r_visible_lines - 1 && itemline != totallines - 1) + info_arrow(1, origx1, origx2, oy1, line_height, text_size, ud_arrow_width); + else + mui.draw_text_full(container, tempbuf.c_str(), origx1 + gutter_width, oy1, origx2 - origx1, + JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, + nullptr, nullptr, text_size); + oy1 += (line_height * text_size); + } + + // return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow + right_visible_lines = r_visible_lines - (topline_datsview != 0) - (topline_datsview + r_visible_lines != totallines); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_select_software::arts_render(void *selectedref, float origx1, float origy1, float origx2, float origy2) +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + static ui_software_info *oldsoft = nullptr; + static const game_driver *olddriver = nullptr; + const game_driver *driver = nullptr; + ui_software_info *soft = (ui_software_info *)selectedref; + + if (soft && soft->startempty == 1) + { + driver = soft->driver; + oldsoft = nullptr; + } + else + olddriver = nullptr; + + if (driver) + { + if (ui_globals::default_image) + ((driver->flags & MACHINE_TYPE_ARCADE) == 0) ? ui_globals::curimage_view = CABINETS_VIEW : ui_globals::curimage_view = SNAPSHOT_VIEW; + + std::string searchstr; + searchstr = arts_render_common(origx1, origy1, origx2, origy2); + + // loads the image if necessary + if (driver != olddriver || !snapx_bitmap->valid() || ui_globals::switch_image) + { + emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ); + bitmap_argb32 *tmp_bitmap; + tmp_bitmap = auto_alloc(machine(), bitmap_argb32); + + // try to load snapshot first from saved "0000.png" file + std::string fullname(driver->name); + render_load_png(*tmp_bitmap, snapfile, fullname.c_str(), "0000.png"); + + if (!tmp_bitmap->valid()) + render_load_jpeg(*tmp_bitmap, snapfile, fullname.c_str(), "0000.jpg"); + + // if fail, attemp to load from standard file + if (!tmp_bitmap->valid()) + { + fullname.assign(driver->name).append(".png"); + render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(driver->name).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + } + } + + // if fail again, attemp to load from parent file + if (!tmp_bitmap->valid()) + { + // set clone status + bool cloneof = strcmp(driver->parent, "0"); + if (cloneof) + { + int cx = driver_list::find(driver->parent); + if (cx != -1 && ((driver_list::driver(cx).flags & MACHINE_IS_BIOS_ROOT) != 0)) + cloneof = false; + } + + if (cloneof) + { + fullname.assign(driver->parent).append(".png"); + render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(driver->parent).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + } + } + } + + olddriver = driver; + ui_globals::switch_image = false; + arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2, false); + auto_free(machine(), tmp_bitmap); + } + + // if the image is available, loaded and valid, display it + if (snapx_bitmap->valid()) + { + float x1 = origx1 + 0.01f; + float x2 = origx2 - 0.01f; + float y1 = origy1 + UI_BOX_TB_BORDER + line_height; + float y2 = origy2 - UI_BOX_TB_BORDER - line_height; + + // apply texture + container->add_quad( x1, y1, x2, y2, ARGB_WHITE, snapx_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + } + } + else if (soft) + { + std::string fullname, pathname; + if (ui_globals::default_image) + (soft->startempty == 0) ? ui_globals::curimage_view = SNAPSHOT_VIEW : ui_globals::curimage_view = CABINETS_VIEW; + + // arts title and searchpath + std::string searchstr; + searchstr = arts_render_common(origx1, origy1, origx2, origy2); + + // loads the image if necessary + if (soft != oldsoft || !snapx_bitmap->valid() || ui_globals::switch_image) + { + emu_file snapfile(searchstr.c_str(), OPEN_FLAG_READ); + bitmap_argb32 *tmp_bitmap; + tmp_bitmap = auto_alloc(machine(), bitmap_argb32); + + if (soft->startempty == 1) + { + // Load driver snapshot + fullname.assign(soft->driver->name).append(".png"); + render_load_png(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(soft->driver->name).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, nullptr, fullname.c_str()); + } + } + else if (ui_globals::curimage_view == TITLES_VIEW) + { + // First attempt from name list + pathname.assign(soft->listname).append("_titles"); + fullname.assign(soft->shortname).append(".png"); + render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(soft->shortname).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + } + } + else + { + // First attempt from name list + pathname = soft->listname; + fullname.assign(soft->shortname).append(".png"); + render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(soft->shortname).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + } + + if (!tmp_bitmap->valid()) + { + // Second attempt from driver name + part name + pathname.assign(soft->driver->name).append(soft->part); + fullname.assign(soft->shortname).append(".png"); + render_load_png(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + + if (!tmp_bitmap->valid()) + { + fullname.assign(soft->shortname).append(".jpg"); + render_load_jpeg(*tmp_bitmap, snapfile, pathname.c_str(), fullname.c_str()); + } + } + } + + oldsoft = soft; + ui_globals::switch_image = false; + arts_render_images(tmp_bitmap, origx1, origy1, origx2, origy2, true); + auto_free(machine(), tmp_bitmap); + } + + // if the image is available, loaded and valid, display it + if (snapx_bitmap->valid()) + { + float x1 = origx1 + 0.01f; + float x2 = origx2 - 0.01f; + float y1 = origy1 + UI_BOX_TB_BORDER + line_height; + float y2 = origy2 - UI_BOX_TB_BORDER - line_height; + + // apply texture + container->add_quad(x1, y1, x2, y2, ARGB_WHITE, snapx_texture, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + } + } +} + +void ui_menu_select_software::draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) +{ + ui_manager &mui = machine().ui(); + float line_height = mui.get_line_height(); + float lr_arrow_width = 0.4f * line_height * machine().render().ui_aspect(); + rgb_t fgcolor = UI_TEXT_COLOR; + bool hide = (ui_globals::panels_status == HIDE_RIGHT_PANEL || ui_globals::panels_status == HIDE_BOTH); + float x2 = (hide) ? origx2 : origx1 + 2.0f * UI_BOX_LR_BORDER; + + // set left-right arrows dimension + float ar_x0 = 0.5f * (x2 + origx1) - 0.5f * lr_arrow_width; + float ar_y0 = 0.5f * (origy2 + origy1) + 0.1f * line_height; + float ar_x1 = ar_x0 + lr_arrow_width; + float ar_y1 = 0.5f * (origy2 + origy1) + 0.9f * line_height; + + //machine().ui().draw_outlined_box(container, origx1, origy1, origx2, origy2, UI_BACKGROUND_COLOR); + mui.draw_outlined_box(container, origx1, origy1, origx2, origy2, rgb_t(0xEF, 0x12, 0x47, 0x7B)); + + if (mouse_hit && origx1 <= mouse_x && x2 > mouse_x && origy1 <= mouse_y && origy2 > mouse_y) + { + fgcolor = UI_MOUSEOVER_COLOR; + hover = HOVER_RPANEL_ARROW; + } + + if (hide) + { + draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90 ^ ORIENTATION_FLIP_X); + return; + } + + draw_arrow(container, ar_x0, ar_y0, ar_x1, ar_y1, fgcolor, ROT90); + origx1 = x2; + origy1 = draw_right_box_title(origx1, origy1, origx2, origy2); + + if (ui_globals::rpanel == RP_IMAGES) + arts_render(selectedref, origx1, origy1, origx2, origy2); + else + infos_render(selectedref, origx1, origy1, origx2, origy2); +} + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_software_parts::ui_software_parts(running_machine &machine, render_container *container, std::unordered_map<std::string, std::string> parts, ui_software_info *ui_info) : ui_menu(machine, container) +{ + m_parts = parts; + m_uiinfo = ui_info; +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_software_parts::~ui_software_parts() +{ +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_software_parts::populate() +{ + for (auto & elem : m_parts) + item_append(elem.first.c_str(), elem.second.c_str(), 0, (void *)&elem); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER); +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_software_parts::handle() +{ + // process the menu + const ui_menu_event *event = process(0); + if (event != nullptr && event->iptkey == IPT_UI_SELECT && event->itemref != nullptr) + for (auto & elem : m_parts) + if ((void*)&elem == event->itemref) + { + std::string error_string; + std::string string_list = std::string(m_uiinfo->listname).append(":").append(m_uiinfo->shortname).append(":").append(elem.first).append(":").append(m_uiinfo->instance); + machine().options().set_value(OPTION_SOFTWARENAME, string_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + + reselect_last::driver = m_uiinfo->driver->name; + reselect_last::software = m_uiinfo->shortname; + reselect_last::swlist = m_uiinfo->listname; + reselect_last::set(true); + + std::string snap_list = std::string(m_uiinfo->listname).append("/").append(m_uiinfo->shortname); + machine().options().set_value(OPTION_SNAPNAME, snap_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + + machine().manager().schedule_new_driver(*m_uiinfo->driver); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_software_parts::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + mui.draw_text_full(container, "Software part selection:", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + float maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, "Software part selection:", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_bios_selection::ui_bios_selection(running_machine &machine, render_container *container, std::vector<s_bios> biosname, void *_driver, bool _software, bool _inlist) : ui_menu(machine, container) +{ + m_bios = biosname; + m_driver = _driver; + m_software = _software; + m_inlist = _inlist; +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_bios_selection::~ui_bios_selection() +{ +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_bios_selection::populate() +{ + for (auto & elem : m_bios) + item_append(elem.name.c_str(), nullptr, 0, (void *)&elem.name); + + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER); +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_bios_selection::handle() +{ + // process the menu + const ui_menu_event *event = process(0); + ui_options &moptions = machine().ui().options(); + if (event != nullptr && event->iptkey == IPT_UI_SELECT && event->itemref != nullptr) + for (auto & elem : m_bios) + if ((void*)&elem.name == event->itemref) + { + if (!m_software) + { + const game_driver *s_driver = (const game_driver *)m_driver; + reselect_last::driver = s_driver->name; + if (m_inlist) + reselect_last::software = "[Start empty]"; + else + { + reselect_last::software.clear(); + reselect_last::swlist.clear(); + reselect_last::set(true); + } + + std::string error; + moptions.set_value("bios", elem.id, OPTION_PRIORITY_CMDLINE, error); + machine().manager().schedule_new_driver(*s_driver); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } + else + { + ui_software_info *ui_swinfo = (ui_software_info *)m_driver; + std::string error; + machine().options().set_value("bios", elem.id, OPTION_PRIORITY_CMDLINE, error); + driver_enumerator drivlist(machine().options(), *ui_swinfo->driver); + drivlist.next(); + software_list_device *swlist = software_list_device::find_by_name(drivlist.config(), ui_swinfo->listname.c_str()); + software_info *swinfo = swlist->find(ui_swinfo->shortname.c_str()); + if (!moptions.skip_parts_menu() && swinfo->has_multiple_parts(ui_swinfo->interface.c_str())) + { + std::unordered_map<std::string, std::string> parts; + for (const software_part *swpart = swinfo->first_part(); swpart != nullptr; swpart = swpart->next()) + { + if (swpart->matches_interface(ui_swinfo->interface.c_str())) + { + std::string menu_part_name(swpart->name()); + if (swpart->feature("part_id") != nullptr) + menu_part_name.assign("(").append(swpart->feature("part_id")).append(")"); + parts.emplace(swpart->name(), menu_part_name); + } + } + ui_menu::stack_push(global_alloc_clear<ui_software_parts>(machine(), container, parts, ui_swinfo)); + return; + } + std::string error_string; + std::string string_list = std::string(ui_swinfo->listname).append(":").append(ui_swinfo->shortname).append(":").append(ui_swinfo->part).append(":").append(ui_swinfo->instance); + moptions.set_value(OPTION_SOFTWARENAME, string_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + std::string snap_list = std::string(ui_swinfo->listname).append(PATH_SEPARATOR).append(ui_swinfo->shortname); + moptions.set_value(OPTION_SNAPNAME, snap_list.c_str(), OPTION_PRIORITY_CMDLINE, error_string); + reselect_last::driver = drivlist.driver().name; + reselect_last::software = ui_swinfo->shortname; + reselect_last::swlist = ui_swinfo->listname; + reselect_last::set(true); + machine().manager().schedule_new_driver(drivlist.driver()); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } + } +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_bios_selection::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + mui.draw_text_full(container, "Bios selection:", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + float maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, "Bios selection:", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} diff --git a/src/emu/ui/selsoft.h b/src/emu/ui/selsoft.h new file mode 100644 index 00000000000..8f7e6d413c8 --- /dev/null +++ b/src/emu/ui/selsoft.h @@ -0,0 +1,112 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/selsoft.h + + UI softwares menu. + +***************************************************************************/ +#pragma once + +#ifndef __UI_SELSOFT_H__ +#define __UI_SELSOFT_H__ + +#include "ui/custmenu.h" + +struct s_bios +{ + s_bios(std::string _name, int _id) { name = _name; id = _id; } + std::string name; + int id; +}; + +// Menu Class +class ui_menu_select_software : public ui_menu +{ +public: + ui_menu_select_software(running_machine &machine, render_container *container, const game_driver *driver); + virtual ~ui_menu_select_software(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + + virtual bool menu_has_search_active() override { return (m_search[0] != 0); } + + // draw left panel + virtual float draw_left_panel(float x1, float y1, float x2, float y2) override; + + // draw right panel + virtual void draw_right_panel(void *selectedref, float origx1, float origy1, float origx2, float origy2) override; + +private: + enum { VISIBLE_GAMES_IN_SEARCH = 200 }; + char m_search[40]; + const game_driver *m_driver; + bool m_has_empty_start; + s_filter m_filter; + + ui_software_info *m_searchlist[VISIBLE_GAMES_IN_SEARCH + 1]; + std::vector<ui_software_info *> m_displaylist, m_tmp, m_sortedlist; + std::vector<ui_software_info> m_swinfo; + + void build_software_list(); + void build_list(std::vector<ui_software_info *> &vec, const char *filter_text = nullptr, int filter = -1); + void build_custom(); + void find_matches(const char *str, int count); + void load_sw_custom_filters(); + + void arts_render(void *selectedref, float x1, float y1, float x2, float y2); + void infos_render(void *selectedref, float x1, float y1, float x2, float y2); + + // handlers + void inkey_select(const ui_menu_event *menu_event); + void inkey_special(const ui_menu_event *menu_event); +}; + +class ui_software_parts : public ui_menu +{ +public: + ui_software_parts(running_machine &machine, render_container *container, std::unordered_map<std::string, std::string> parts, ui_software_info *ui_info); + virtual ~ui_software_parts(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + ui_software_info *m_uiinfo; + std::unordered_map<std::string, std::string> m_parts; +}; + +class ui_bios_selection : public ui_menu +{ +public: + ui_bios_selection(running_machine &machine, render_container *container, std::vector<s_bios> biosname, void *driver, bool software, bool inlist); + virtual ~ui_bios_selection(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + + void *m_driver; + bool m_software, m_inlist; + std::vector<s_bios> m_bios; +}; + +struct reselect_last +{ + static std::string driver, software, swlist; + static void set(bool value) { m_reselect = value; } + static bool get() { return m_reselect; } + static void reset() { driver.clear(); software.clear(); swlist.clear(); set(false); } + +private: + static bool m_reselect; +}; + +// Getter +bool has_multiple_bios(const game_driver *driver, std::vector<s_bios> &biosname); + + +#endif /* __UI_SELSOFT_H__ */ diff --git a/src/emu/ui/simpleselgame.cpp b/src/emu/ui/simpleselgame.cpp new file mode 100644 index 00000000000..a0cf9412f6b --- /dev/null +++ b/src/emu/ui/simpleselgame.cpp @@ -0,0 +1,445 @@ +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods +/*************************************************************************** + + ui/simpleselgame.c + + Game selector + +***************************************************************************/ + +#include "emu.h" +#include "emuopts.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "uiinput.h" +#include "ui/simpleselgame.h" +#include "ui/inputmap.h" +#include "ui/miscmenu.h" +#include "ui/optsmenu.h" +#include "audit.h" +#include <ctype.h> + + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_simple_menu_select_game::ui_simple_menu_select_game(running_machine &machine, render_container *container, const char *gamename) : ui_menu(machine, container), m_driverlist(driver_list::total() + 1) +{ + build_driver_list(); + if(gamename) + strcpy(m_search, gamename); + m_matchlist[0] = -1; +} + + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_simple_menu_select_game::~ui_simple_menu_select_game() +{ +} + + + +//------------------------------------------------- +// build_driver_list - build a list of available +// drivers +//------------------------------------------------- + +void ui_simple_menu_select_game::build_driver_list() +{ + // start with an empty list + m_drivlist = std::make_unique<driver_enumerator>(machine().options()); + m_drivlist->exclude_all(); + + // open a path to the ROMs and find them in the array + file_enumerator path(machine().options().media_path()); + const osd_directory_entry *dir; + + // iterate while we get new objects + while ((dir = path.next()) != nullptr) + { + char drivername[50]; + char *dst = drivername; + const char *src; + + // build a name for it + for (src = dir->name; *src != 0 && *src != '.' && dst < &drivername[ARRAY_LENGTH(drivername) - 1]; src++) + *dst++ = tolower((UINT8)*src); + *dst = 0; + + int drivnum = m_drivlist->find(drivername); + if (drivnum != -1) + m_drivlist->include(drivnum); + } + + // now build the final list + m_drivlist->reset(); + int listnum = 0; + while (m_drivlist->next()) + m_driverlist[listnum++] = &m_drivlist->driver(); + + // NULL-terminate + m_driverlist[listnum] = nullptr; +} + + + +//------------------------------------------------- +// handle - handle the game select menu +//------------------------------------------------- + +void ui_simple_menu_select_game::handle() +{ + // ignore pause keys by swallowing them before we process the menu + machine().ui_input().pressed(IPT_UI_PAUSE); + + // process the menu + const ui_menu_event *menu_event = process(0); + if (menu_event != nullptr && menu_event->itemref != nullptr) + { + // reset the error on any future menu_event + if (m_error) + m_error = false; + + // handle selections + else + { + switch(menu_event->iptkey) + { + case IPT_UI_SELECT: + inkey_select(menu_event); + break; + case IPT_UI_CANCEL: + inkey_cancel(menu_event); + break; + case IPT_SPECIAL: + inkey_special(menu_event); + break; + } + } + } + + // if we're in an error state, overlay an error message + if (m_error) + machine().ui().draw_text_box(container, + "The selected game is missing one or more required ROM or CHD images. " + "Please select a different game.\n\nPress any key to continue.", + JUSTIFY_CENTER, 0.5f, 0.5f, UI_RED_COLOR); +} + + +//------------------------------------------------- +// inkey_select +//------------------------------------------------- +extern void save_main_option(running_machine &machine); +void ui_simple_menu_select_game::inkey_select(const ui_menu_event *menu_event) +{ + const game_driver *driver = (const game_driver *)menu_event->itemref; + + // special case for configure inputs + if ((FPTR)driver == 1) + ui_menu::stack_push(global_alloc_clear<ui_menu_game_options>(machine(), container)); + else if ((FPTR)driver == 2) + save_main_option(machine()); + // anything else is a driver + else + { + // audit the game first to see if we're going to work + driver_enumerator enumerator(machine().options(), *driver); + enumerator.next(); + media_auditor auditor(enumerator); + media_auditor::summary summary = auditor.audit_media(AUDIT_VALIDATE_FAST); + + // if everything looks good, schedule the new driver + if (summary == media_auditor::CORRECT || summary == media_auditor::BEST_AVAILABLE || summary == media_auditor::NONE_NEEDED) + { + machine().manager().schedule_new_driver(*driver); + machine().schedule_hard_reset(); + ui_menu::stack_reset(machine()); + } + + // otherwise, display an error + else + { + reset(UI_MENU_RESET_REMEMBER_REF); + m_error = true; + } + } +} + + +//------------------------------------------------- +// inkey_cancel +//------------------------------------------------- + +void ui_simple_menu_select_game::inkey_cancel(const ui_menu_event *menu_event) +{ + // escape pressed with non-empty text clears the text + if (m_search[0] != 0) + { + m_search[0] = '\0'; + reset(UI_MENU_RESET_SELECT_FIRST); + } +} + + +//------------------------------------------------- +// inkey_special - typed characters append to the buffer +//------------------------------------------------- + +void ui_simple_menu_select_game::inkey_special(const ui_menu_event *menu_event) +{ + // typed characters append to the buffer + int buflen = strlen(m_search); + + // if it's a backspace and we can handle it, do so + if ((menu_event->unichar == 8 || menu_event->unichar == 0x7f) && buflen > 0) + { + *(char *)utf8_previous_char(&m_search[buflen]) = 0; + m_rerandomize = true; + reset(UI_MENU_RESET_SELECT_FIRST); + } + + // if it's any other key and we're not maxed out, update + else if (menu_event->unichar >= ' ' && menu_event->unichar < 0x7f) + { + buflen += utf8_from_uchar(&m_search[buflen], ARRAY_LENGTH(m_search) - buflen, menu_event->unichar); + m_search[buflen] = 0; + reset(UI_MENU_RESET_SELECT_FIRST); + } +} + + +//------------------------------------------------- +// populate - populate the game select menu +//------------------------------------------------- + +void ui_simple_menu_select_game::populate() +{ + int matchcount; + int curitem; + + for (curitem = matchcount = 0; m_driverlist[curitem] != nullptr && matchcount < VISIBLE_GAMES_IN_LIST; curitem++) + if (!(m_driverlist[curitem]->flags & MACHINE_NO_STANDALONE)) + matchcount++; + + // if nothing there, add a single multiline item and return + if (matchcount == 0) + { + std::string txt; + strprintf(txt, "No machines found. Please check the rompath specified in the %s.ini file.\n\n" + "If this is your first time using %s, please see the config.txt file in " + "the docs directory for information on configuring %s.", + emulator_info::get_configname(), + emulator_info::get_appname(),emulator_info::get_appname() ); + item_append(txt.c_str(), nullptr, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, nullptr); + return; + } + + // otherwise, rebuild the match list + assert(m_drivlist != nullptr); + if (m_search[0] != 0 || m_matchlist[0] == -1 || m_rerandomize) + m_drivlist->find_approximate_matches(m_search, matchcount, m_matchlist); + m_rerandomize = false; + + // iterate over entries + for (curitem = 0; curitem < matchcount; curitem++) + { + int curmatch = m_matchlist[curitem]; + if (curmatch != -1) + { + int cloneof = m_drivlist->non_bios_clone(curmatch); + item_append(m_drivlist->driver(curmatch).name, m_drivlist->driver(curmatch).description, (cloneof == -1) ? 0 : MENU_FLAG_INVERT, (void *)&m_drivlist->driver(curmatch)); + } + } + + // if we're forced into this, allow general input configuration as well + if (ui_menu::stack_has_special_main_menu()) + { + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + item_append("Configure Options", nullptr, 0, (void *)1); + item_append("Save Configuration", nullptr, 0, (void *)2); + skip_main_items = 2; + } + + // configure the custom rendering + customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; + custombottom = 4.0f * machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER; +} + + +//------------------------------------------------- +// custom_render - perform our special rendering +//------------------------------------------------- + +void ui_simple_menu_select_game::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + const game_driver *driver; + float width, maxwidth; + float x1, y1, x2, y2; + std::string tempbuf[5]; + rgb_t color; + int line; + + // display the current typeahead + if (m_search[0] != 0) + strprintf(tempbuf[0], "Type name or select: %s_", m_search); + else + strprintf(tempbuf[0],"Type name or select: (random)"); + + // get the size of the text + machine().ui().draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(width, origx2 - origx1); + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = origy1 - top; + y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + machine().ui().draw_outlined_box(container, x1, y1, x2, y2, UI_BACKGROUND_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + machine().ui().draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + + // determine the text to render below + driver = ((FPTR)selectedref > skip_main_items) ? (const game_driver *)selectedref : nullptr; + if (driver != nullptr) + { + const char *gfxstat, *soundstat; + + // first line is game name + strprintf(tempbuf[0],"%-.100s", driver->description); + + // next line is year, manufacturer + strprintf(tempbuf[1], "%s, %-.100s", driver->year, driver->manufacturer); + + // next line source path + strprintf(tempbuf[2],"Driver: %-.100s", core_filename_extract_base(driver->source_file).c_str()); + + // next line is overall driver status + if (driver->flags & MACHINE_NOT_WORKING) + tempbuf[3].assign("Overall: NOT WORKING"); + else if (driver->flags & MACHINE_UNEMULATED_PROTECTION) + tempbuf[3].assign("Overall: Unemulated Protection"); + else + tempbuf[3].assign("Overall: Working"); + + // next line is graphics, sound status + if (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS)) + gfxstat = "Imperfect"; + else + gfxstat = "OK"; + + if (driver->flags & MACHINE_NO_SOUND) + soundstat = "Unimplemented"; + else if (driver->flags & MACHINE_IMPERFECT_SOUND) + soundstat = "Imperfect"; + else + soundstat = "OK"; + + strprintf(tempbuf[4], "Gfx: %s, Sound: %s", gfxstat, soundstat); + } + else + { + const char *s = emulator_info::get_copyright(); + line = 0; + + // first line is version string + strprintf(tempbuf[line++], "%s %s", emulator_info::get_appname(), build_version); + + // output message + while (line < ARRAY_LENGTH(tempbuf)) + { + if (!(*s == 0 || *s == '\n')) + tempbuf[line].push_back(*s); + + if (*s == '\n') + { + line++; + s++; + } else if (*s != 0) + s++; + else + line++; + } + } + + // get the size of the text + maxwidth = origx2 - origx1; + for (line = 0; line < 4; line++) + { + machine().ui().draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + maxwidth = MAX(maxwidth, width); + } + + // compute our bounds + x1 = 0.5f - 0.5f * maxwidth; + x2 = x1 + maxwidth; + y1 = origy2 + UI_BOX_TB_BORDER; + y2 = origy2 + bottom; + + // draw a box + color = UI_BACKGROUND_COLOR; + if (driver != nullptr) + color = UI_GREEN_COLOR; + if (driver != nullptr && (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0) + color = UI_YELLOW_COLOR; + if (driver != nullptr && (driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0) + color = UI_RED_COLOR; + machine().ui().draw_outlined_box(container, x1, y1, x2, y2, color); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw all lines + for (line = 0; line < 4; line++) + { + machine().ui().draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); + y1 += machine().ui().get_line_height(); + } +} + + +//------------------------------------------------- +// force_game_select - force the game +// select menu to be visible and inescapable +//------------------------------------------------- + +void ui_simple_menu_select_game::force_game_select(running_machine &machine, render_container *container) +{ + char *gamename = (char *)machine.options().system_name(); + + // reset the menu stack + ui_menu::stack_reset(machine); + + // add the quit entry followed by the game select entry + ui_menu *quit = global_alloc_clear<ui_menu_quit_game>(machine, container); + quit->set_special_main_menu(true); + ui_menu::stack_push(quit); + ui_menu::stack_push(global_alloc_clear<ui_simple_menu_select_game>(machine, container, gamename)); + + // force the menus on + machine.ui().show_menu(); + + // make sure MAME is paused + machine.pause(); +} diff --git a/src/emu/ui/simpleselgame.h b/src/emu/ui/simpleselgame.h new file mode 100644 index 00000000000..316e3747b2f --- /dev/null +++ b/src/emu/ui/simpleselgame.h @@ -0,0 +1,48 @@ +// license:BSD-3-Clause +// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods +/*************************************************************************** + + ui/selgame.h + + Game selector + +***************************************************************************/ + +#pragma once + +#ifndef __UI_SIMPLESELGAME_H__ +#define __UI_SIMPLESELGAME_H__ + +#include "drivenum.h" +#include "menu.h" + +class ui_simple_menu_select_game : public ui_menu { +public: + ui_simple_menu_select_game(running_machine &machine, render_container *container, const char *gamename); + virtual ~ui_simple_menu_select_game(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + + // force game select menu + static void force_game_select(running_machine &machine, render_container *container); + + virtual bool menu_has_search_active() override { return (m_search[0] != 0); } +private: + // internal state + enum { VISIBLE_GAMES_IN_LIST = 15 }; + UINT8 m_error; + bool m_rerandomize; + char m_search[40]; + int m_matchlist[VISIBLE_GAMES_IN_LIST]; + std::vector<const game_driver *> m_driverlist; + std::unique_ptr<driver_enumerator> m_drivlist; + + // internal methods + void build_driver_list(); + void inkey_select(const ui_menu_event *menu_event); + void inkey_cancel(const ui_menu_event *menu_event); + void inkey_special(const ui_menu_event *menu_event); +}; + +#endif /* __UI_SELGAME_H__ */ diff --git a/src/emu/ui/sliders.cpp b/src/emu/ui/sliders.cpp index 26da6327202..e494213aa1b 100644 --- a/src/emu/ui/sliders.cpp +++ b/src/emu/ui/sliders.cpp @@ -108,14 +108,14 @@ void ui_menu_sliders::handle() /* if we got here via up or page up, select the previous item */ if (menu_event->iptkey == IPT_UI_UP || menu_event->iptkey == IPT_UI_PAGE_UP) { - selected = (selected + numitems - 1) % numitems; + selected = (selected + item.size() - 1) % item.size(); validate_selection(-1); } /* otherwise select the next item */ else if (menu_event->iptkey == IPT_UI_DOWN || menu_event->iptkey == IPT_UI_PAGE_DOWN) { - selected = (selected + 1) % numitems; + selected = (selected + 1) % item.size(); validate_selection(1); } } @@ -242,7 +242,7 @@ UINT32 ui_menu_sliders::ui_handler(running_machine &machine, render_container *c /* if this is the first call, push the sliders menu */ if (state) - ui_menu::stack_push(auto_alloc_clear(machine, <ui_menu_sliders>(machine, container, true))); + ui_menu::stack_push(global_alloc_clear<ui_menu_sliders>(machine, container, true)); /* handle standard menus */ result = ui_menu::ui_handler(machine, container, state); diff --git a/src/emu/ui/slotopt.cpp b/src/emu/ui/slotopt.cpp index cce17353532..959fef74adc 100644 --- a/src/emu/ui/slotopt.cpp +++ b/src/emu/ui/slotopt.cpp @@ -189,7 +189,7 @@ void ui_menu_slot_devices::handle() { if ((FPTR)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT) { - machine().options().add_slot_options(false); + machine().options().add_slot_options(); machine().schedule_hard_reset(); } else if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT) @@ -204,7 +204,7 @@ void ui_menu_slot_devices::handle() device_slot_interface *slot = (device_slot_interface *)menu_event->itemref; device_slot_option *option = slot_get_current_option(slot); if (option) - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_device_config>(machine(), container, slot, option))); + ui_menu::stack_push(global_alloc_clear<ui_menu_device_config>(machine(), container, slot, option)); } } } diff --git a/src/emu/ui/sndmenu.cpp b/src/emu/ui/sndmenu.cpp new file mode 100644 index 00000000000..06563c661b3 --- /dev/null +++ b/src/emu/ui/sndmenu.cpp @@ -0,0 +1,174 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/********************************************************************* + + ui/sndmenu.cpp + + Internal UI user interface. + +*********************************************************************/ + +#include "emu.h" +#include "ui/ui.h" +#include "ui/menu.h" +#include "ui/sndmenu.h" +#include "ui/selector.h" +#include "cliopts.h" +#include "../osd/modules/lib/osdobj_common.h" // TODO: remove + +const int ui_menu_sound_options::m_sound_rate[] = { 11025, 22050, 44100, 48000 }; + +//------------------------------------------------- +// ctor +//------------------------------------------------- + +ui_menu_sound_options::ui_menu_sound_options(running_machine &machine, render_container *container) : ui_menu(machine, container) +{ + osd_options &options = downcast<osd_options &>(machine.options()); + + m_sample_rate = machine.options().sample_rate(); + m_sound = (strcmp(options.sound(), OSDOPTVAL_NONE) && strcmp(options.sound(), "0")); + m_samples = machine.options().samples(); + + int total = ARRAY_LENGTH(m_sound_rate); + + for (m_cur_rates = 0; m_cur_rates < total; m_cur_rates++) + if (m_sample_rate == m_sound_rate[m_cur_rates]) + break; + + if (m_cur_rates == total) + m_cur_rates = 2; +} + +//------------------------------------------------- +// dtor +//------------------------------------------------- + +ui_menu_sound_options::~ui_menu_sound_options() +{ + std::string error_string; + emu_options &moptions = machine().options(); + + if (strcmp(moptions.value(OSDOPTION_SOUND),m_sound ? OSDOPTVAL_AUTO : OSDOPTVAL_NONE)!=0) + { + moptions.set_value(OSDOPTION_SOUND, m_sound ? OSDOPTVAL_AUTO : OSDOPTVAL_NONE, OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(OSDOPTION_SOUND); + } + if (moptions.int_value(OPTION_SAMPLERATE)!=m_sound_rate[m_cur_rates]) + { + moptions.set_value(OPTION_SAMPLERATE, m_sound_rate[m_cur_rates], OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(OPTION_SAMPLERATE); + } + if (moptions.bool_value(OPTION_SAMPLES)!=m_samples) + { + moptions.set_value(OPTION_SAMPLES, m_samples, OPTION_PRIORITY_CMDLINE, error_string); + machine().options().mark_changed(OPTION_SAMPLES); + } +} + +//------------------------------------------------- +// handle +//------------------------------------------------- + +void ui_menu_sound_options::handle() +{ + bool changed = false; + + // process the menu + const ui_menu_event *m_event = process(0); + + if (m_event != nullptr && m_event->itemref != nullptr) + { + switch ((FPTR)m_event->itemref) + { + case ENABLE_SOUND: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT) + { + m_sound = !m_sound; + changed = true; + } + break; + + case SAMPLE_RATE: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT) + { + (m_event->iptkey == IPT_UI_LEFT) ? m_cur_rates-- : m_cur_rates++; + changed = true; + } + else if (m_event->iptkey == IPT_UI_SELECT) + { + int total = ARRAY_LENGTH(m_sound_rate); + std::vector<std::string> s_sel(total); + for (int index = 0; index < total; index++) + s_sel[index] = std::to_string(m_sound_rate[index]); + + ui_menu::stack_push(global_alloc_clear<ui_menu_selector>(machine(), container, s_sel, m_cur_rates)); + } + break; + + case ENABLE_SAMPLES: + if (m_event->iptkey == IPT_UI_LEFT || m_event->iptkey == IPT_UI_RIGHT || m_event->iptkey == IPT_UI_SELECT) + { + m_samples = !m_samples; + changed = true; + } + break; + } + } + + if (changed) + reset(UI_MENU_RESET_REMEMBER_REF); + +} + +//------------------------------------------------- +// populate +//------------------------------------------------- + +void ui_menu_sound_options::populate() +{ + UINT32 arrow_flags = get_arrow_flags(0, ARRAY_LENGTH(m_sound_rate) - 1, m_cur_rates); + m_sample_rate = m_sound_rate[m_cur_rates]; + std::string s_text; + strprintf(s_text, "%d", m_sample_rate); + + // add options items + item_append("Sound", m_sound ? "On" : "Off", m_sound ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SOUND); + item_append("Sample Rate", s_text.c_str(), arrow_flags, (void *)(FPTR)SAMPLE_RATE); + item_append("Use External Samples", m_samples ? "On" : "Off", m_samples ? MENU_FLAG_RIGHT_ARROW : MENU_FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SAMPLES); + item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); + + customtop = machine().ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER); +} + +//------------------------------------------------- +// perform our special rendering +//------------------------------------------------- + +void ui_menu_sound_options::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) +{ + float width; + ui_manager &mui = machine().ui(); + mui.draw_text_full(container, "Sound Options", 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr); + width += 2 * UI_BOX_LR_BORDER; + float maxwidth = MAX(origx2 - origx1, width); + + // compute our bounds + float x1 = 0.5f - 0.5f * maxwidth; + float x2 = x1 + maxwidth; + float y1 = origy1 - top; + float y2 = origy1 - UI_BOX_TB_BORDER; + + // draw a box + mui.draw_outlined_box(container, x1, y1, x2, y2, UI_GREEN_COLOR); + + // take off the borders + x1 += UI_BOX_LR_BORDER; + x2 -= UI_BOX_LR_BORDER; + y1 += UI_BOX_TB_BORDER; + + // draw the text within it + mui.draw_text_full(container, "Sound Options", x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE, + DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr); +} diff --git a/src/emu/ui/sndmenu.h b/src/emu/ui/sndmenu.h new file mode 100644 index 00000000000..8b13b38ea88 --- /dev/null +++ b/src/emu/ui/sndmenu.h @@ -0,0 +1,42 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/sndmenu.h + + Internal UI user interface. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_SNDMENU_H__ +#define __UI_SNDMENU_H__ + +//------------------------------------------------- +// class sound options menu +//------------------------------------------------- +class ui_menu_sound_options : public ui_menu +{ +public: + ui_menu_sound_options(running_machine &machine, render_container *container); + virtual ~ui_menu_sound_options(); + virtual void populate() override; + virtual void handle() override; + virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override; + +private: + enum + { + ENABLE_SOUND = 1, + SAMPLE_RATE, + ENABLE_SAMPLES + }; + + UINT16 m_cur_rates; + static const int m_sound_rate[]; + int m_sample_rate; + bool m_samples, m_sound; +}; + +#endif /* __UI_SNDMENU_H__ */ diff --git a/src/emu/ui/starimg.h b/src/emu/ui/starimg.h new file mode 100644 index 00000000000..2704e486e5b --- /dev/null +++ b/src/emu/ui/starimg.h @@ -0,0 +1,37 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +static const UINT32 favorite_star_bmp[] = +{ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02D07A00, 0x15D07A00, 0x0FD07A00, 0x00D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x76D27F04, 0xBFDA9714, 0xB9D78F0E, 0x4DD17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3BD07A00, 0xFFE8B228, 0xFFFDEB50, 0xFFFBE34A, 0xD0E1A11C, 0x13D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0BD07A00, 0xA0D48306, 0xFFFACE42, 0xFFFBCE45, 0xFFFCD146, 0xFFF2BD34, 0x67D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x49D27E03, 0xE9EAAB26, 0xFFFDD044, 0xFFF9C741, 0xFFFAC942, 0xFFFED245, 0xD1DF9716, 0x27D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA2DB8D0F, 0xFFF6C236, 0xFFFAC740, 0xFFF8C53F, 0xFFF8C53F, 0xFFFDCB41, 0xF7F0B62E, 0x71D68308, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x31D07A00, 0xFFE7A420, 0xFFFDCA3F, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFFCC83D, 0xE0E19818, 0x11D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x08D07A00, 0x99D38004, 0xFFF9C237, 0xFFFAC43C, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFFBC53C, 0xFFF1B32B, 0x63D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x15D07A00, 0x24D07A00, 0x39D07A00, 0x4AD07A00, 0x79D48205, 0xE6E9A820, 0xFFFDC539, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF9BD37, 0xFFFEC63A, 0xD8DF9613, 0x64D17C01, 0x3FD07A00, 0x2FD07A00, 0x1CD07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x04D07A00, 0x3BD07A00, 0x8BD07A00, 0xA5D17B01, 0xBFDA940F, 0xCEE1A317, 0xE2E7B622, 0xF4EDC229, 0xFFF1C62D, 0xFFFAC735, 0xFFFABC35, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFFCBF36, 0xFFF7C733, 0xFCEFC52C, 0xE9EABB24, 0xD8E4AE1D, 0xC6DD9C13, 0xB4D58608, 0x99D07A00, 0x75D07A00, 0x20D07A00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x01D07A00, 0xBBD78608, 0xFFE9AE1F, 0xFFF9D133, 0xFFFCD839, 0xFFFCD338, 0xFFFCCC36, 0xFFFCC333, 0xFFFCBB32, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFFAB831, 0xFFFCC033, 0xFFFCC735, 0xFFFCD037, 0xFFFCD739, 0xFFFBD536, 0xFFF5C92F, 0xE8E4A318, 0x55D78507, 0x00000000, 0x00000000, + 0x00000000, 0x13D07A00, 0xFFDF9212, 0xFFFABC2F, 0xFFF9B72F, 0xFFF8B32E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B32D, 0xFFF9B52E, 0xFFF9B92F, 0xFFF6B52A, 0xC1DB8B0D, 0x00000000, 0x00000000, + 0x00000000, 0x07D07A00, 0xE6DC8B0E, 0xFFF4AB27, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFEFA421, 0xAAD9860A, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x5ED58005, 0xE8E39213, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF4A925, 0xE2DC890C, 0x45D27C02, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0xE7E18F11, 0xFFF3A420, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFEFA11D, 0xE0DB880A, 0x35D07A00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5DD47E03, 0xE6E08D0D, 0xFFF5A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF3A11D, 0xDFDB8609, 0x4FD27C01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xE6E08A0C, 0xFFF29D19, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFEE9917, 0xDDDA8407, 0x30D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5BD37D02, 0xE6DF880A, 0xFFF59C18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF29A16, 0xDCD98306, 0x49D17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7BD07A00, 0xFFEF9311, 0xFFF69A15, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF69915, 0xFFE2890A, 0x3BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0xA2D17B00, 0xFFF59612, 0xFFF69713, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF79712, 0xFFE98D0B, 0x4BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x14D07A00, 0xBED87F03, 0xFFF6940E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF7940E, 0xFFF1900B, 0x7ED07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27D07A00, 0xD1DE8205, 0xFFF8920C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF6910C, 0xFFF5910C, 0xA5D27B01, 0x03D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xEAE48505, 0xFFFA9009, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF78E09, 0xC1D97F02, 0x17D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x57D17B00, 0xFBE88504, 0xFFF78D06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF38B06, 0xFFEC8705, 0xFFF18A06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF88E06, 0xD6DF8102, 0x2CD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x83D67D01, 0xFFED8503, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF28804, 0xFFEA8503, 0xCDDC7F02, 0x79D17B00, 0xA1D47C01, 0xEFE18102, 0xFFEE8604, 0xFFF38804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF88B04, 0xEFE58203, 0x46D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA0D87D01, 0xFFED8401, 0xFFF48602, 0xFFF48602, 0xFFF48602, 0xFFEF8501, 0xE9DE7F01, 0x8FD67D00, 0x23D07A00, 0x04D07A00, 0x0DD07A00, 0x46D07A00, 0xC3D97D01, 0xFFE28001, 0xFFF38602, 0xFFF48602, 0xFFF48602, 0xFFF58702, 0xFDE88201, 0x59D17A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5FD47B00, 0xF3E58000, 0xFFF18400, 0xFFED8200, 0xDEE07F01, 0x90D37B00, 0x1FD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x3BD07A00, 0xBDD67C00, 0xF2E48000, 0xFFEF8300, 0xFFF08300, 0xDEDF7E01, 0x34D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10D07A00, 0x71D57C00, 0xD2DB7D00, 0x9AD87C00, 0x34D07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x13D07A00, 0x52D27B00, 0xBBD97D00, 0xCBDA7D00, 0x5DD27B00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}; diff --git a/src/emu/ui/swlist.cpp b/src/emu/ui/swlist.cpp index 64eb5109fae..1a3ce5fe736 100644 --- a/src/emu/ui/swlist.cpp +++ b/src/emu/ui/swlist.cpp @@ -355,7 +355,10 @@ void ui_menu_software_list::handle() } if (selected_entry != nullptr && selected_entry != cur_selected) - set_selection((void *) selected_entry); + { + set_selection((void *)selected_entry); + top_line = selected - (visible_lines / 2); + } } } else if (event->iptkey == IPT_UI_CANCEL) @@ -448,7 +451,7 @@ void ui_menu_software::handle() const ui_menu_event *event = process(0); if (event != nullptr && event->iptkey == IPT_UI_SELECT) { - // ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_software_list>(machine(), container, (software_list_config *)event->itemref, image))); + // ui_menu::stack_push(global_alloc_clear<ui_menu_software_list>(machine(), container, (software_list_config *)event->itemref, image)); *m_result = (software_list_device *)event->itemref; ui_menu::stack_pop(machine()); } diff --git a/src/emu/ui/toolbar.h b/src/emu/ui/toolbar.h new file mode 100644 index 00000000000..095aa0e3cdd --- /dev/null +++ b/src/emu/ui/toolbar.h @@ -0,0 +1,181 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +static const UINT32 toolbar_bitmap_bmp[][1024] = { +{ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02D07A00, 0x15D07A00, 0x0FD07A00, 0x00D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x76D27F04, 0xBFDA9714, 0xB9D78F0E, 0x4DD17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3BD07A00, 0xFFE8B228, 0xFFFDEB50, 0xFFFBE34A, 0xD0E1A11C, 0x13D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0BD07A00, 0xA0D48306, 0xFFFACE42, 0xFFFBCE45, 0xFFFCD146, 0xFFF2BD34, 0x67D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x49D27E03, 0xE9EAAB26, 0xFFFDD044, 0xFFF9C741, 0xFFFAC942, 0xFFFED245, 0xD1DF9716, 0x27D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA2DB8D0F, 0xFFF6C236, 0xFFFAC740, 0xFFF8C53F, 0xFFF8C53F, 0xFFFDCB41, 0xF7F0B62E, 0x71D68308, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x31D07A00, 0xFFE7A420, 0xFFFDCA3F, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFF8C23D, 0xFFFCC83D, 0xE0E19818, 0x11D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x08D07A00, 0x99D38004, 0xFFF9C237, 0xFFFAC43C, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFF8BF3A, 0xFFFBC53C, 0xFFF1B32B, 0x63D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x15D07A00, 0x24D07A00, 0x39D07A00, 0x4AD07A00, 0x79D48205, 0xE6E9A820, 0xFFFDC539, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF8BC37, 0xFFF9BD37, 0xFFFEC63A, 0xD8DF9613, 0x64D17C01, 0x3FD07A00, 0x2FD07A00, 0x1CD07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x04D07A00, 0x3BD07A00, 0x8BD07A00, 0xA5D17B01, 0xBFDA940F, 0xCEE1A317, 0xE2E7B622, 0xF4EDC229, 0xFFF1C62D, 0xFFFAC735, 0xFFFABC35, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFF8B934, 0xFFFCBF36, 0xFFF7C733, 0xFCEFC52C, 0xE9EABB24, 0xD8E4AE1D, 0xC6DD9C13, 0xB4D58608, 0x99D07A00, 0x75D07A00, 0x20D07A00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x01D07A00, 0xBBD78608, 0xFFE9AE1F, 0xFFF9D133, 0xFFFCD839, 0xFFFCD338, 0xFFFCCC36, 0xFFFCC333, 0xFFFCBB32, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFF7B630, 0xFFFAB831, 0xFFFCC033, 0xFFFCC735, 0xFFFCD037, 0xFFFCD739, 0xFFFBD536, 0xFFF5C92F, 0xE8E4A318, 0x55D78507, 0x00000000, 0x00000000, + 0x00000000, 0x13D07A00, 0xFFDF9212, 0xFFFABC2F, 0xFFF9B72F, 0xFFF8B32E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B32D, 0xFFF9B52E, 0xFFF9B92F, 0xFFF6B52A, 0xC1DB8B0D, 0x00000000, 0x00000000, + 0x00000000, 0x07D07A00, 0xE6DC8B0E, 0xFFF4AB27, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFEFA421, 0xAAD9860A, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x5ED58005, 0xE8E39213, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF4A925, 0xE2DC890C, 0x45D27C02, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0xE7E18F11, 0xFFF3A420, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFEFA11D, 0xE0DB880A, 0x35D07A00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5DD47E03, 0xE6E08D0D, 0xFFF5A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFF3A11D, 0xDFDB8609, 0x4FD27C01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xE6E08A0C, 0xFFF29D19, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFF6A01C, 0xFFEE9917, 0xDDDA8407, 0x30D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5BD37D02, 0xE6DF880A, 0xFFF59C18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFF29A16, 0xDCD98306, 0x49D17B01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7BD07A00, 0xFFEF9311, 0xFFF69A15, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF59915, 0xFFF69915, 0xFFE2890A, 0x3BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0xA2D17B00, 0xFFF59612, 0xFFF69713, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF59612, 0xFFF79712, 0xFFE98D0B, 0x4BD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x14D07A00, 0xBED87F03, 0xFFF6940E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF5930E, 0xFFF7940E, 0xFFF1900B, 0x7ED07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27D07A00, 0xD1DE8205, 0xFFF8920C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFF6910C, 0xFFF5910C, 0xA5D27B01, 0x03D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40D07A00, 0xEAE48505, 0xFFFA9009, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF58D09, 0xFFF78E09, 0xC1D97F02, 0x17D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x57D17B00, 0xFBE88504, 0xFFF78D06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF38B06, 0xFFEC8705, 0xFFF18A06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF48B06, 0xFFF88E06, 0xD6DF8102, 0x2CD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x83D67D01, 0xFFED8503, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF28804, 0xFFEA8503, 0xCDDC7F02, 0x79D17B00, 0xA1D47C01, 0xEFE18102, 0xFFEE8604, 0xFFF38804, 0xFFF48804, 0xFFF48804, 0xFFF48804, 0xFFF88B04, 0xEFE58203, 0x46D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xA0D87D01, 0xFFED8401, 0xFFF48602, 0xFFF48602, 0xFFF48602, 0xFFEF8501, 0xE9DE7F01, 0x8FD67D00, 0x23D07A00, 0x04D07A00, 0x0DD07A00, 0x46D07A00, 0xC3D97D01, 0xFFE28001, 0xFFF38602, 0xFFF48602, 0xFFF48602, 0xFFF58702, 0xFDE88201, 0x59D17A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x5FD47B00, 0xF3E58000, 0xFFF18400, 0xFFED8200, 0xDEE07F01, 0x90D37B00, 0x1FD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01D07A00, 0x3BD07A00, 0xBDD67C00, 0xF2E48000, 0xFFEF8300, 0xFFF08300, 0xDEDF7E01, 0x34D07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10D07A00, 0x71D57C00, 0xD2DB7D00, 0x9AD87C00, 0x34D07A00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x13D07A00, 0x52D27B00, 0xBBD97D00, 0xCBDA7D00, 0x5DD27B00, 0x0AD07A00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}, + +{ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x41D07A00, 0x8BD07A00, 0xAAD07A00, 0xAAD07A00, 0xAAC48715, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAACA810B, 0xAAD07A00, 0xA4D07A00, 0x7DD07A00, 0x1CD07A00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x07D07A00, 0x7BD38206, 0xFFE8B82B, 0xFFF9E24B, 0xFFFEEE55, 0xFFFDEE55, 0xFFCBA95F, 0xFFEBEBEB, 0xFFF1F1F1, 0xFFF3F3F3, 0xFFF7F7F7, 0xFFF9F9F9, 0xFFFCFCFC, 0xFFFEFEFE, 0xFFFEFEFE, 0xFFFEFEFE, 0xFFFCFCFC, 0xFFFAFAFA, 0xFFF7F7F7, 0xFFF5F5F5, 0xFFF2F2F2, 0xFFE9E9E9, 0xFFD4AC2F, 0xFFFDEE55, 0xFFFDEC53, 0xFFF6DE47, 0xE4DE9E19, 0x49D38105, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x2DD07A00, 0xD7E39E1C, 0xFFFDDC4A, 0xFFFBD047, 0xFFFACC45, 0xFFF9CB45, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFF0E5CC, 0xFFD4B167, 0xFFD2B066, 0xFFD0AE64, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A12A, 0xFFF9CB45, 0xFFFACD46, 0xFFFBD348, 0xFFF7CD3E, 0xB2DB9112, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x52D07A00, 0xFCEBAD2C, 0xFFFCCC44, 0xFFF9C943, 0xFFF9C943, 0xFFF9C943, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE6B437, 0xFFF9C943, 0xFFD3A02A, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A02A, 0xFFF9C943, 0xFFF9C943, 0xFFF9C943, 0xFFFBCB44, 0xFADD9416, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEBAD2B, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE6B335, 0xFFF9C741, 0xFFD3A029, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD3A029, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFF9C741, 0xFFDD9416, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAAB2A, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE5B133, 0xFFF8C43F, 0xFFD29F28, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD29F28, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFF8C43F, 0xFFDD9315, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAAA28, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFC4A258, 0xFFD0D0D0, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFE5B032, 0xFFF8C23C, 0xFFD29E27, 0xFFE9E9E9, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD2D2D2, 0xFFD29E27, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFF8C23C, 0xFFDD9214, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA826, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFC9A352, 0xFFCFCDC7, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFE9D8B3, 0xFFD8A329, 0xFFE5AE30, 0xFFCC9723, 0xFFECECEC, 0xFFE1E1E1, 0xFFD8D8D8, 0xFFD0CCC2, 0xFFD8A128, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFF8BF39, 0xFFDD9113, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA624, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFD7A63B, 0xFFCCBFA3, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFE6E6E6, 0xFFEEEEEE, 0xFFF6F6F6, 0xFFFBFBFB, 0xFFF8F2E6, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFF5F5F5, 0xFFE1E1E1, 0xFFD8D7D5, 0xFFCBB280, 0xFFE9AF2F, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFF8BC36, 0xFFDD9012, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA422, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF1B430, 0xFFD6A02D, 0xFFD0B57B, 0xFFD3C099, 0xFFD9C8A3, 0xFFDFCDA8, 0xFFE4D3AE, 0xFFE7D6B1, 0xFFE9D8B3, 0xFFE8D7B2, 0xFFE5D3AE, 0xFFE1CFAA, 0xFFDBCAA5, 0xFFD5C298, 0xFFD0AB5D, 0xFFDDA42C, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFF8B933, 0xFFDD8F11, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEAA120, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF4B32F, 0xFFE9AB2B, 0xFFE5A72A, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE4A729, 0xFFE5A82A, 0xFFEDAE2D, 0xFFF5B430, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFF7B530, 0xFFDD8E10, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9F1E, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFF7B22D, 0xFFDD8D0F, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9D1C, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFF7AF2A, 0xFFDD8B0E, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFEA9A19, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF0A725, 0xFFE8A324, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE4A123, 0xFFE5A124, 0xFFE9A424, 0xFFF4AA26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFF7AB26, 0xFFDD8A0D, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99917, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFE9A122, 0xFFD7A84A, 0xFFE5CC98, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFEAD8B3, 0xFFE9D6AE, 0xFFE4C78C, 0xFFD89C2A, 0xFFF0A522, 0xFFF6A823, 0xFFF6A823, 0xFFF6A823, 0xFFDD890B, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99614, 0xFFF6A41F, 0xFFF6A41F, 0xFFEFA11F, 0xFFD7A94D, 0xFFFBF9F6, 0xFFF7F7F7, 0xFFEFEFEF, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFF2F2F2, 0xFFF8F8F8, 0xFFEEE1C5, 0xFFDBA136, 0xFFF6A41F, 0xFFF6A41F, 0xFFF6A41F, 0xFFDC880A, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99413, 0xFFF6A11C, 0xFFF6A11C, 0xFFE79B1C, 0xFFDDC594, 0xFFF3F3F3, 0xFFEDEDED, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFEDEDED, 0xFFF2EFEA, 0xFFD2AA59, 0xFFF6A11C, 0xFFF6A11C, 0xFFF6A11C, 0xFFDC8709, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE99110, 0xFFF69D18, 0xFFF69D18, 0xFFE49719, 0xFFDCCAA5, 0xFFE9E9E9, 0xFFE2E2E2, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFE6E6E6, 0xFFEAEAEA, 0xFFCEAB61, 0xFFF69D18, 0xFFF69D18, 0xFFF69D18, 0xFFDC8608, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88F0E, 0xFFF59A15, 0xFFF59A15, 0xFFE39518, 0xFFDAC9A4, 0xFFE7E7E7, 0xFFE0E0E0, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFE4E4E4, 0xFFE7E7E7, 0xFFCDAA60, 0xFFF59A15, 0xFFF59A15, 0xFFF59A15, 0xFFDC8507, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88D0C, 0xFFF59712, 0xFFF59712, 0xFFE39315, 0xFFD8C6A1, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCCA95F, 0xFFF59712, 0xFFF59712, 0xFFF59712, 0xFFDC8406, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88B0A, 0xFFF5930F, 0xFFF5930F, 0xFFE39114, 0xFFD5C49F, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFCBA85E, 0xFFF5930F, 0xFFF5930F, 0xFFF5930F, 0xFFDC8205, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88808, 0xFFF5900C, 0xFFF5900C, 0xFFE38E11, 0xFFD3C29D, 0xFFDCDCDC, 0xFFCECECE, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFC7C7C7, 0xFFD6D6D6, 0xFFDDDDDD, 0xFFCAA75D, 0xFFF5900C, 0xFFF5900C, 0xFFF5900C, 0xFFDC8104, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88706, 0xFFF58E09, 0xFFF58E09, 0xFFE38D10, 0xFFD1C09B, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFC8A65C, 0xFFF58E09, 0xFFF58E09, 0xFFF58E09, 0xFFDC8103, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x55D07A00, 0xFFE88504, 0xFFF48B07, 0xFFF48B07, 0xFFE38B0E, 0xFFCEBD98, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFD6D6D6, 0xFFC7A55B, 0xFFF48B07, 0xFFF48B07, 0xFFF48B07, 0xFFDC8002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x52D07A00, 0xFCE78404, 0xFFF48905, 0xFFF48905, 0xFFE28A0D, 0xFFCDBC97, 0xFFD3D3D3, 0xFFC6C6C6, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFBFBFBF, 0xFFCDCDCD, 0xFFD4D4D4, 0xFFC7A45A, 0xFFF48905, 0xFFF48905, 0xFFF38905, 0xFADC7F02, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x2ED07A00, 0xD8DF7F01, 0xFFF38602, 0xFFF48602, 0xFFE2880B, 0xFFCBBA95, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFC6A359, 0xFFF48602, 0xFFF48602, 0xFFED8402, 0xB2D97D01, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x08D07A00, 0x7BD37B00, 0xFFE27F00, 0xFFF08401, 0xFFE2870A, 0xFFCAB893, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFC5A258, 0xFFF38501, 0xFFEE8301, 0xE4DB7D00, 0x49D27B00, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x43D07A00, 0x8DD07A00, 0xAACD7D05, 0xAAC28919, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC08C1D, 0xAAC48715, 0xA5D07A00, 0x7FD07A00, 0x1DD07A00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}, + +{ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0E999999, 0x59999999, 0x9E999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0xAA999999, 0x8B999999, 0x41999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0F999999, 0xC8AEAEAE, 0xFFDADADA, 0xFFF7F7F7, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFF1F1F1, 0xFFCDCDCD, 0x7BA1A1A1, 0x08999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x5B999999, 0xFFDADADA, 0xFFF8F8F8, 0xFFF2F2F2, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF0F0F0, 0xFFF3F3F3, 0xFFFAFAFA, 0xD8BFBFBF, 0x2E999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xA3999999, 0xFFEEEEEE, 0xFFF0F0F0, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF2F2F2, 0xFCD1D1D1, 0x53999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFB5B5B5, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD3D3D3, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFDADADA, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFD1D1D1, 0xFFE4E4E4, 0xFFEDEDED, 0xFFEDEDED, 0xFFD1D1D1, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFECECEC, 0xFFD0D0D0, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFD8D8D8, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFE1E1E1, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFCFCFCF, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFB4B4B4, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFD0D0D0, 0xFFE9E9E9, 0xFFE9E9E9, 0xFFCECECE, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFE7E7E7, 0xFFCDCDCD, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFCCCCCC, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFB2B2B2, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF999999, 0xFF9A9A9A, 0xFFCCCCCC, 0xFFE4E4E4, 0xFFE4E4E4, 0xFFCBCBCB, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFD2D2D2, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFCACACA, 0xFFB0BABD, 0xFFAEB9BC, 0xFFDADBDB, 0xFFABC1C8, 0xFFD9DDDE, 0xFFCACACA, 0x55999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFE2E2E2, 0xFFDEE0E0, 0xFFBECFD4, 0xFFC5D1D4, 0xFF6CADC1, 0xFF53B4CE, 0xFF89B6C4, 0xFF35AAC8, 0xFFA8C3CC, 0xFFA6B9BE, 0x59758F96, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFD2D7D9, 0xFF5CABC4, 0xFF4AB6D1, 0xFF35ACD0, 0xFF2ABAE5, 0xFF25B0D9, 0xFF28B6E3, 0xFF49ACC8, 0xFF3AACCB, 0x632385A4, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFDEDFDF, 0xFFA7C0C9, 0xFF79B4C5, 0xFF3CA1C0, 0xFF29B3E0, 0xFF25B0DC, 0xFF5DC2E3, 0xFFB1E2F2, 0xFF59C2E3, 0xFF26B3DE, 0xFF26A8D2, 0xA41C8CAD, 0x661783A4, 0x180E6784, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFC0C0C0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFDEDEDE, 0xFF87AEBA, 0xFF24A7D1, 0xFF25ABD5, 0xFF25A8D1, 0xFF1EA4CF, 0xFF9BD7EA, 0xFFFFFFFF, 0xFF91D3E8, 0xFF23A6D0, 0xFF25A9D2, 0xFD26ACD4, 0xD11E94B8, 0x280D647F, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFBFBFBF, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFB0B0B0, 0xFFBFCCD1, 0xFF85B3C2, 0xFF1F96BC, 0xFF229FC7, 0xFF229FC6, 0xFF1B9BC5, 0xFF95D1E4, 0xFFFFFFFF, 0xFF8DCDE2, 0xFF219DC6, 0xFF229FC6, 0xFF22A0C8, 0xBE1986A9, 0x46137696, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFF77A5B4, 0xFF2795B9, 0xFF2099C0, 0xFF2097BD, 0xFF2097BD, 0xFF1A95BC, 0xFF8BC9DD, 0xFFFEFEFF, 0xFF7CC2D8, 0xFF1D96BC, 0xFF2097BD, 0xFF2097BE, 0xFB219BC1, 0xDE1780A1, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFDCDCDC, 0xFFCBD2D3, 0xFF5293A8, 0xFF1D8FB3, 0xFF1C8EB1, 0xFF1C8EB1, 0xFF198CB0, 0xFF77BAD0, 0xFFFCFDFE, 0xFF64B1CA, 0xFF178BAF, 0xFF1C8EB1, 0xFF1C8EB2, 0xF21984A6, 0x5E0F6884, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFF85ABB8, 0xFF2789AA, 0xFF1B87A9, 0xFF1A85A7, 0xFF1A85A7, 0xFF1884A6, 0xFF69AEC5, 0xFFF9FCFD, 0xFF51A2BC, 0xFF1683A5, 0xFF1A85A7, 0xFF1A85A7, 0xFB1B88AB, 0xC0147695, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFAFC0C6, 0xFF5F95A6, 0xFF177998, 0xFF187C9D, 0xFF187C9C, 0xFF177B9C, 0xFF2C87A4, 0xFF75B0C3, 0xFF1E7F9F, 0xFF177B9C, 0xFF187C9C, 0xFF177D9D, 0xD7147190, 0x7C0F6682, + 0x00000000, 0x00000000, 0x00000000, 0xAA999999, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFF94B1B9, 0xFF167695, 0xFF167695, 0xFF157593, 0xFF137492, 0xFF4E97AE, 0xFFA3CAD6, 0xFF4390A9, 0xFF147492, 0xFF157593, 0xFF177796, 0xBD126D8B, 0x190B5B75, + 0x00000000, 0x00000000, 0x00000000, 0x91999999, 0xFFD2D2D2, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD6D7D8, 0xFF7FA4B0, 0xFF4D899B, 0xFF21718B, 0xFF136D8A, 0xFF0C6986, 0xFF7FB0BF, 0xFFE5EFF2, 0xFF78ABBB, 0xFF116C89, 0xFC136C88, 0xCA106682, 0x990F6580, 0x240B5E78, + 0x00000000, 0x00000000, 0x00000000, 0x45999999, 0xFFBCBCBC, 0xFFD8D8D8, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD3D6D6, 0xFFBFC9CC, 0xFF3D7E93, 0xFF126681, 0xFF116682, 0xFF22728B, 0xFF44889D, 0xFF1F6F89, 0xF90F6480, 0xFC116681, 0x620D607A, 0x0A0A5A74, 0x020A5B75, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7B9C9C9C, 0xD7B1B1B1, 0xFAC1C1C1, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFBDBFC0, 0xFF819BA4, 0xFF96A8AD, 0xFF467C8E, 0xF220687F, 0xCB276A7F, 0xE90E607A, 0x520B5D77, 0x5F0B5D77, 0x2B0B5D77, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x2D999999, 0x50999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x55999999, 0x72407283, 0x6626687D, 0x22467584, 0x800B5C76, 0x1A0A5B75, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}, + + +{ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x03B5B5B5, 0x48B6B6B6, 0xC2C9C9C9, 0xF9CDCDCD, 0xFFCDCDCD, 0xFFCDCDCD, 0xFFCDCDCD, 0xFFCDCDCD, 0xFFCDCDCD, 0xFBCDCDCD, 0xAEC5C5C5, 0x3BB7B7B7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x21B5B5B5, 0xCBCBCBCB, 0xFFF5F5F5, 0xFFF9F9F9, 0xFFF7F7F7, 0xFFF7F7F7, 0xFFF7F7F7, 0xFFF7F7F7, 0xFFF7F7F7, 0xFFF9F9F9, 0xFFECECEC, 0xB4C6C6C6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x51B5B5B5, 0xFADDDDDD, 0xFFF6F6F6, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF7F7F7, 0xFFD1D1D1, 0x63B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x55B5B5B5, 0x52B5B5B5, 0x37B5B5B5, 0x06B5B5B5, 0x00000000, 0x00000000, 0x00000000, + 0x55B5B5B5, 0xFFDEDEDE, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF3F3F3, 0xFFF7F7F7, 0xFFF1F1F1, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFFE6E6E6, 0xFCE5E5E5, 0xE1D9D9D9, 0x7EB6B6B6, 0x07B5B5B5, 0x00000000, 0x00000000, + 0x55B5B5B5, 0xFFDEDEDE, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF2F2F2, 0xFFF0F0EE, 0xFFEADFCF, 0xFFE4CEB1, 0xFFE3CEB0, 0xFFE3CEB0, 0xFFE3CEB0, 0xFFE5D0B2, 0xFFEAD5B7, 0xE4CEB696, 0x58C0965D, 0x06C4842A, 0x00000000, + 0x55B5B5B5, 0xFFDDDDDD, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFF1F1F1, 0xFFDEC7A8, 0xFFE7A054, 0xFFC4B778, 0xFFBAB97E, 0xFFBAB97E, 0xFFBAB97E, 0xFFBAB97E, 0xFFBAB97E, 0xFFC4B475, 0xE4E89A43, 0x7EC7842A, 0x07C4842A, + 0x55B5B5B5, 0xFFDCDCDC, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFEDEDEC, 0xFFE3A34E, 0xFFFBC160, 0xFFFFBE5A, 0xFFFFBA57, 0xFFFFBA57, 0xFFFFBA57, 0xFFFFBA57, 0xFFFFBA57, 0xFFFFBE5B, 0xFFFAC668, 0xE2F09F37, 0x38C4842A, + 0x55B5B5B5, 0xFFDBDBDB, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFE5E3DF, 0xFFE99B32, 0xFFFFBA55, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFB853, 0xFFFFBA56, 0xFDECA644, 0x53C4842A, + 0x55B5B5B5, 0xFFDBDBDB, 0xFFEEEEEE, 0xFFECECEB, 0xFFE5D7C4, 0xFFE2CCAF, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFE0CBAD, 0xFFD9C2A0, 0xFFEC9C30, 0xFFFFB751, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFFFB64F, 0xFFEBA543, 0x55C4842A, + 0x55B5B5B5, 0xFFDADADA, 0xFFEAEAE9, 0xFFD7B98F, 0xFFF0A750, 0xFFDDB262, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD5B56A, 0xFFD8B367, 0xFFFAB952, 0xFFFFB64F, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFFFB24B, 0xFFEBA340, 0x55C4842A, + 0x55B5B5B5, 0xFFDADADA, 0xFFE3D5C1, 0xFFF0A544, 0xFFFFB753, 0xFFFFB048, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFFFAE44, 0xFFEBA03B, 0x55C4842A, + 0x55B5B5B5, 0xFFD9D9D9, 0xFFDFC9AC, 0xFFEC9F38, 0xFFFFAE42, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFFFAC40, 0xFFEB9E39, 0x55C4842A, + 0x55B5B5B5, 0xFFD9D9D9, 0xFFDEC8AA, 0xFFEB9C34, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFFFA739, 0xFFEB9C34, 0x55C4842A, + 0x55B5B5B5, 0xFFD8D8D8, 0xFFDDC8AA, 0xFFEB9A30, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFFFA533, 0xFFEB9A30, 0x55C4842A, + 0x55B5B5B5, 0xFFD7D7D7, 0xFFDCC7A9, 0xFFEB972B, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFFFA12C, 0xFFEB972B, 0x55C4842A, + 0x55B5B5B5, 0xFFD7D7D7, 0xFFDCC6A8, 0xFFEB9627, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFFF9F26, 0xFFEB9627, 0x55C4842A, + 0x55B5B5B5, 0xFFD7D7D7, 0xFFDCC6A8, 0xFFEB9423, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFFF9C1F, 0xFFEB9423, 0x55C4842A, + 0x55B5B5B5, 0xFFD5D5D5, 0xFFDAC5A7, 0xFFEA9320, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFFD9A1B, 0xFFEA9320, 0x55C4842A, + 0x55B5B5B5, 0xFFD5D5D5, 0xFFDAC5A7, 0xFFE38F21, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFF3951D, 0xFFE38F21, 0x55C4842A, + 0x55B5B5B5, 0xFFD4D4D4, 0xFFD9C4A6, 0xFFDE8D22, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFEC921F, 0xFFDE8D22, 0x55C4842A, + 0x55B5B5B5, 0xFFD4D4D4, 0xFFD9C4A6, 0xFFD88A24, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFE28E21, 0xFFD88A24, 0x55C4842A, + 0x51B5B5B5, 0xFAD3D3D3, 0xFFD8C3A5, 0xFFD38926, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFDB8C25, 0xFFD38926, 0x55C4842A, + 0x21B5B5B5, 0xCBC3C3C3, 0xFFD6C4AC, 0xFFCE8B34, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xFFD38827, 0xEDCC8628, 0x43C4842A, + 0x03B5B5B5, 0x4CB6B6B6, 0xC8BFB9B1, 0xFAC3924D, 0xFFCA8629, 0xFFCD8829, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8929, 0xFFCD8829, 0xFFCA8629, 0xC1C6852A, 0x17C4842A, + 0x00000000, 0x00000000, 0x00000000, 0x10C4842A, 0x72C4842A, 0xA5C4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xAAC4842A, 0xA5C4842A, 0x72C4842A, 0x10C4842A, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +}, + +{ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x27999999, 0x8E999999, 0xAA999999, 0xAA999999, 0x8E999999, 0x27999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x10999999, 0xBAAAAAAA, 0xFFF2F2F2, 0xFFFAFAFA, 0xFFFAFAFA, 0xFFF2F2F2, 0xBAA9A9A9, 0x10999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x37999999, 0xE1C4C4C4, 0xFFF6F6F6, 0xFFF0F0F0, 0xFFF0F0F0, 0xFFF5F5F5, 0xDAC0C0C0, 0x30999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x49A1A1A1, 0x99B0B0B0, 0x69A7A7A7, 0x23999999, 0x00000000, 0x00000000, 0x659D9D9D, 0xF8D4D4D4, 0xFFF1F1F1, 0xFFEFEFEF, 0xFFEFEFEF, 0xFFF3F3F3, 0xF4D3D3D3, 0x619D9D9D, 0x00000000, 0x00000000, 0x23999999, 0x69A7A7A7, 0x99B0B0B0, 0x49A1A1A1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x43999999, 0xE8C7C7C7, 0xFFEAEAEA, 0xF6DEDEDE, 0xCDAFAFAF, 0x58999999, 0x80999999, 0xDDC0C0C0, 0xFFF0F0F0, 0xFFEFEFEF, 0xFFEEEEEE, 0xFFEEEEEE, 0xFFEFEFEF, 0xFFF1F1F1, 0xDDC0C0C0, 0x7E999999, 0x56999999, 0xCDAFAFAF, 0xF6DEDEDE, 0xFFEAEAEA, 0xE8C7C7C7, 0x43999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x4CA3A3A3, 0xE8C7C7C7, 0xFFFBFBFB, 0xFFF0F0F0, 0xFFF4F4F4, 0xFFF9F9F9, 0xFFDADADA, 0xFFECECEC, 0xFFFAFAFA, 0xFFF3F3F3, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFF3F3F3, 0xFFFAFAFA, 0xFFEBEBEB, 0xFFD9D9D9, 0xFFF9F9F9, 0xFFF4F4F4, 0xFFF0F0F0, 0xFFFBFBFB, 0xE8C7C7C7, 0x4CA3A3A3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x9DADADAD, 0xFFE1E1E1, 0xFFF0F0F0, 0xFFEDEDED, 0xFFEDEDED, 0xFFF0F0F0, 0xFFF3F3F3, 0xFFF2F2F2, 0xFFEEEEEE, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEDEDED, 0xFFEEEEEE, 0xFFF2F2F2, 0xFFF3F3F3, 0xFFF0F0F0, 0xFFEDEDED, 0xFFEDEDED, 0xFFF0F0F0, 0xFFE1E1E1, 0x9DADADAD, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x7AA7A7A7, 0xFAD5D5D5, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFE6E6E6, 0xFFDEDEDE, 0xFFDADADA, 0xFFDADADA, 0xFFDEDEDE, 0xFFE6E6E6, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xF8D4D4D4, 0x79A7A7A7, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2E999999, 0xD8B0B0B0, 0xFFE8E8E8, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEAEAEA, 0xFFD4D4D4, 0xFFC2C2C2, 0xFFB9B9B9, 0xFFB6B6B6, 0xFFB6B6B6, 0xFFB9B9B9, 0xFFC2C2C2, 0xFFD4D4D4, 0xFFEAEAEA, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFEBEBEB, 0xFFE8E8E8, 0xD3AFAFAF, 0x29999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60999999, 0xFFD3D3D3, 0xFFEBEBEB, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFE2E2E2, 0xFFC5C5C5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFB5B5B5, 0xFFC5C5C5, 0xFFE2E2E2, 0xFFEAEAEA, 0xFFEAEAEA, 0xFFEBEBEB, 0xFFD3D3D3, 0x60999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8A999999, 0xFFE6E6E6, 0xFFECECEC, 0xFFE9E9E9, 0xFFE8E8E8, 0xFFC6C6C6, 0xFFB8B8B8, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB7B7B7, 0xFFB8B8B8, 0xFFC6C6C6, 0xFFE8E8E8, 0xFFE9E9E9, 0xFFECECEC, 0xFFE2E2E2, 0x83999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0E999999, 0x2E999999, 0x619D9D9D, 0xDDC1C1C1, 0xFFF0F0F0, 0xFFE8E8E8, 0xFFE8E8E8, 0xFFD4D4D4, 0xFFB9B9B9, 0xFFB9B9B9, 0xFFB9B9B9, 0xFFBABABA, 0xD8B9B9B9, 0xB9B9B9B9, 0xB9B9B9B9, 0xD8B9B9B9, 0xFFBABABA, 0xFFB9B9B9, 0xFFB9B9B9, 0xFFB9B9B9, 0xFFD4D4D4, 0xFFE8E8E8, 0xFFE9E9E9, 0xFFF2F2F2, 0xDDBFBFBF, 0x619D9D9D, 0x2E999999, 0x0E999999, 0x00000000, 0x00000000, + 0x00000000, 0x27999999, 0xB8A8A8A8, 0xD8C4C4C4, 0xF4D9D9D9, 0xFFEFEFEF, 0xFFECECEC, 0xFFE7E7E7, 0xFFE3E3E3, 0xFFC7C7C7, 0xFFBCBCBC, 0xFFBCBCBC, 0xFFBCBCBC, 0xC6BCBCBC, 0x2EBBBBBB, 0x0FBBBBBB, 0x0FBBBBBB, 0x2EBBBBBB, 0xC6BCBCBC, 0xFFBCBCBC, 0xFFBCBCBC, 0xFFBCBCBC, 0xFFC7C7C7, 0xFFE3E3E3, 0xFFE7E7E7, 0xFFECECEC, 0xFFEFEFEF, 0xF4D9D9D9, 0xD8C4C4C4, 0xB8A8A8A8, 0x27999999, 0x00000000, + 0x04999999, 0x919D9D9D, 0xFFECECEC, 0xFFF6F6F6, 0xFFEBEBEB, 0xFFE6E6E6, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFDCDCDC, 0xFFC2C2C2, 0xFFBEBEBE, 0xFFBEBEBE, 0xD8BEBEBE, 0x2EBEBEBE, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2EBEBEBE, 0xD8BEBEBE, 0xFFBEBEBE, 0xFFBEBEBE, 0xFFC2C2C2, 0xFFDBDBDB, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE6E6E6, 0xFFEBEBEB, 0xFFF6F6F6, 0xFFEBEBEB, 0x8E999999, 0x00000000, + 0x12999999, 0xBCA8A8A8, 0xFFE6E6E6, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFDADADA, 0xFFC2C2C2, 0xFFC1C1C1, 0xFFC1C1C1, 0xB9C1C1C1, 0x0FC1C1C1, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0FC1C1C1, 0xB9C1C1C1, 0xFFC1C1C1, 0xFFC1C1C1, 0xFFC1C1C1, 0xFFD9D9D9, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xFFE5E5E5, 0xAA999999, 0x00000000, + 0x14999999, 0xBEA8A8A8, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFDCDCDC, 0xFFC4C4C4, 0xFFC3C3C3, 0xFFC3C3C3, 0xB9C4C4C4, 0x0FC4C4C4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0FC4C4C4, 0xB9C4C4C4, 0xFFC3C3C3, 0xFFC3C3C3, 0xFFC4C4C4, 0xFFDDDDDD, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xAA999999, 0x00000000, + 0x05999999, 0x9A9E9E9E, 0xFFDCDCDC, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFDEDEDE, 0xFFC8C8C8, 0xFFC5C5C5, 0xFFC5C5C5, 0xD8C6C6C6, 0x2EC6C6C6, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2EC6C6C6, 0xD8C6C6C6, 0xFFC5C5C5, 0xFFC5C5C5, 0xFFC8C8C8, 0xFFDDDDDD, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFE3E3E3, 0xFFDCDCDC, 0x95999999, 0x00000000, + 0x00000000, 0x2D999999, 0xC3A8A8A8, 0xE5BEBEBE, 0xFCCACACA, 0xFFDADADA, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE2E2E2, 0xFFD2D2D2, 0xFFC8C8C8, 0xFFC8C8C8, 0xFFC8C8C8, 0xC6C9C9C9, 0x2ECACACA, 0x0FCACACA, 0x0FCACACA, 0x2ECACACA, 0xC6C9C9C9, 0xFFC8C8C8, 0xFFC8C8C8, 0xFFC8C8C8, 0xFFD1D1D1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFD9D9D9, 0xFCCACACA, 0xE5BEBEBE, 0xC3A8A8A8, 0x2D999999, 0x00000000, + 0x00000000, 0x00000000, 0x19999999, 0x3B999999, 0x709D9D9D, 0xE4B9B9B9, 0xFFE0E0E0, 0xFFE0E0E0, 0xFFE2E2E2, 0xFFDDDDDD, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFCBCBCB, 0xD8CCCCCC, 0xB9CCCCCC, 0xB9CCCCCC, 0xD8CCCCCC, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFCBCBCB, 0xFFDDDDDD, 0xFFE2E2E2, 0xFFE0E0E0, 0xFFE0E0E0, 0xE1B8B8B8, 0x6C9D9D9D, 0x3B999999, 0x19999999, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x04999999, 0x959C9C9C, 0xFFD7D7D7, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFE4E4E4, 0xFFD8D8D8, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFCECECE, 0xFFD8D8D8, 0xFFE4E4E4, 0xFFDFDFDF, 0xFFDFDFDF, 0xFFD7D7D7, 0x8A999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x60999999, 0xFFCBCBCB, 0xFFDFDFDF, 0xFFDEDEDE, 0xFFDFDFDF, 0xFFE3E3E3, 0xFFDADADA, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFCFCFCF, 0xFFDADADA, 0xFFE3E3E3, 0xFFDEDEDE, 0xFFDEDEDE, 0xFFDFDFDF, 0xFFC9C9C9, 0x5C999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x23999999, 0xCDACACAC, 0xFFE8E8E8, 0xFFDFDFDF, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDEDEDE, 0xFFE3E3E3, 0xFFE1E1E1, 0xFFDADADA, 0xFFD5D5D5, 0xFFD2D2D2, 0xFFD2D2D2, 0xFFD5D5D5, 0xFFD9D9D9, 0xFFE1E1E1, 0xFFE3E3E3, 0xFFDEDEDE, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFE0E0E0, 0xFFE9E9E9, 0xCDACACAC, 0x23999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x69A3A3A3, 0xF6CECECE, 0xFFE4E4E4, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDFDFDF, 0xFFE1E1E1, 0xFFDFDFDF, 0xFFE1E1E1, 0xFFE1E1E1, 0xFFDFDFDF, 0xFFE1E1E1, 0xFFDFDFDF, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFDDDDDD, 0xFFE4E4E4, 0xF6CECECE, 0x69A3A3A3, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x9DA8A8A8, 0xFFCFCFCF, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFCFCFCF, 0x9DA8A8A8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x4E9F9F9F, 0xEABFBFBF, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFD9D9D9, 0xFFC7C7C7, 0xFFD2D2D2, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFD2D2D2, 0xFFC7C7C7, 0xFFD9D9D9, 0xFFDBDBDB, 0xFFDBDBDB, 0xFFDBDBDB, 0xE8B7B7B7, 0x4C9F9F9F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0C999999, 0x5F999999, 0xEABFBFBF, 0xFFCECECE, 0xFAC8C8C8, 0xD8ABABAB, 0x60999999, 0x959C9C9C, 0xE4B5B5B5, 0xFFD3D3D3, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFDADADA, 0xFFD2D2D2, 0xE1B4B4B4, 0x959C9C9C, 0x60999999, 0xD8ADADAD, 0xFAC8C8C8, 0xFFCECECE, 0xE8B7B7B7, 0x43999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0C999999, 0x52A0A0A0, 0xA0A8A8A8, 0x7AA4A4A4, 0x2E999999, 0x00000000, 0x04999999, 0x709C9C9C, 0xFCC4C4C4, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xF4C1C1C1, 0x659B9B9B, 0x04999999, 0x00000000, 0x2E999999, 0x7AA4A4A4, 0xA0A8A8A8, 0x50A0A0A0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x39999999, 0xE3B9B9B9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xFFD9D9D9, 0xDAB5B5B5, 0x30999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x14999999, 0xBEA5A5A5, 0xFFD3D3D3, 0xFFD8D8D8, 0xFFD8D8D8, 0xFFD3D3D3, 0xBAA4A4A4, 0x10999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x2D999999, 0x9C9F9F9F, 0xC0A7A7A7, 0xBEA6A6A6, 0x9A9E9E9E, 0x2D999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07999999, 0x16999999, 0x14999999, 0x05999999, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 +} +}; + +#define UI_TOOLBAR_BUTTONS ARRAY_LENGTH(toolbar_bitmap_bmp) diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index 3f2d252c107..b002560382c 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -37,6 +37,8 @@ enum LOADSAVE_SAVE }; +#define MAX_SAVED_STATE_JOYSTICK 4 + /*************************************************************************** LOCAL VARIABLES @@ -86,6 +88,25 @@ static const input_item_id non_char_keys[] = ITEM_ID_CANCEL }; +static const char *s_color_list[] = { + OPTION_UI_BORDER_COLOR, + OPTION_UI_BACKGROUND_COLOR, + OPTION_UI_GFXVIEWER_BG_COLOR, + OPTION_UI_UNAVAILABLE_COLOR, + OPTION_UI_TEXT_COLOR, + OPTION_UI_TEXT_BG_COLOR, + OPTION_UI_SUBITEM_COLOR, + OPTION_UI_CLONE_COLOR, + OPTION_UI_SELECTED_COLOR, + OPTION_UI_SELECTED_BG_COLOR, + OPTION_UI_MOUSEOVER_COLOR, + OPTION_UI_MOUSEOVER_BG_COLOR, + OPTION_UI_MOUSEDOWN_COLOR, + OPTION_UI_MOUSEDOWN_BG_COLOR, + OPTION_UI_DIPSW_COLOR, + OPTION_UI_SLIDER_COLOR +}; + /*************************************************************************** GLOBAL VARIABLES ***************************************************************************/ @@ -139,6 +160,24 @@ static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string ***************************************************************************/ //------------------------------------------------- +// load ui options +//------------------------------------------------- + +static void load_ui_options(running_machine &machine) +{ + // parse the file + std::string error; + // attempt to open the output file + emu_file file(machine.options().ini_path(), OPEN_FLAG_READ); + if (file.open("ui.ini") == FILERR_NONE) + { + bool result = machine.ui().options().parse_ini_file((core_file&)file, OPTION_PRIORITY_MAME_INI, OPTION_PRIORITY_DRIVER_INI, error); + if (!result) + osd_printf_error("**Error to load ui.ini**"); + } +} + +//------------------------------------------------- // is_breakable_char - is a given unicode // character a possible line break? //------------------------------------------------- @@ -183,7 +222,8 @@ static inline int is_breakable_char(unicode_char ch) CORE IMPLEMENTATION ***************************************************************************/ -static const UINT32 mouse_bitmap[] = { +static const UINT32 mouse_bitmap[32*32] = +{ 0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff, 0x09a46f30,0x81ac7c43,0x24af8049,0x00ad7d45,0x00a8753a,0x00a46f30,0x009f6725,0x009b611c,0x00985b14,0x0095560d,0x00935308,0x00915004,0x00904e02,0x008f4e01,0x008f4d00,0x008f4d00,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff, 0x00a16a29,0xa2aa783d,0xffbb864a,0xc0b0824c,0x5aaf7f48,0x09ac7b42,0x00a9773c,0x00a67134,0x00a26b2b,0x009e6522,0x009a5e19,0x00965911,0x0094550b,0x00925207,0x00915004,0x008f4e01,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff,0x00ffffff, @@ -226,9 +266,14 @@ static const UINT32 mouse_bitmap[] = { ui_manager::ui_manager(running_machine &machine) : m_machine(machine) { +} + +void ui_manager::init() +{ + load_ui_options(machine()); // initialize the other UI bits - ui_menu::init(machine); - ui_gfx_init(machine); + ui_menu::init(machine()); + ui_gfx_init(machine()); // reset instance variables m_font = nullptr; @@ -236,26 +281,32 @@ ui_manager::ui_manager(running_machine &machine) m_handler_param = 0; m_single_step = false; m_showfps = false; - m_showfps_end = false; + m_showfps_end = 0; m_show_profiler = false; m_popup_text_end = 0; m_use_natural_keyboard = false; m_mouse_arrow_texture = nullptr; + m_show_timecode_counter = false; + m_show_timecode_total = false; + m_load_save_hold = false; + + get_font_rows(&machine()); + decode_ui_color(0, &machine()); // more initialization set_handler(handler_messagebox, 0); m_non_char_keys_down = std::make_unique<UINT8[]>((ARRAY_LENGTH(non_char_keys) + 7) / 8); - m_mouse_show = machine.system().flags & MACHINE_CLICKABLE_ARTWORK ? true : false; + m_mouse_show = machine().system().flags & MACHINE_CLICKABLE_ARTWORK ? true : false; // request a callback upon exiting - machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_manager::exit), this)); + machine().add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ui_manager::exit), this)); // retrieve options - m_use_natural_keyboard = machine.options().natural_keyboard(); - bitmap_argb32 *ui_mouse_bitmap = auto_alloc(machine, bitmap_argb32(32, 32)); + m_use_natural_keyboard = machine().options().natural_keyboard(); + bitmap_argb32 *ui_mouse_bitmap = auto_alloc(machine(), bitmap_argb32(32, 32)); UINT32 *dst = &ui_mouse_bitmap->pix32(0); memcpy(dst,mouse_bitmap,32*32*sizeof(UINT32)); - m_mouse_arrow_texture = machine.render().texture_alloc(); + m_mouse_arrow_texture = machine().render().texture_alloc(); m_mouse_arrow_texture->set_bitmap(*ui_mouse_bitmap, ui_mouse_bitmap->cliprect(), TEXFORMAT_ARGB32); } @@ -312,7 +363,7 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) { const int maxstate = 4; int str = machine().options().seconds_to_run(); - bool show_gameinfo = !machine().options().skip_gameinfo(); + bool show_gameinfo = !machine().ui().options().skip_gameinfo(); bool show_warnings = true, show_mandatory_fileman = true; int state; @@ -447,7 +498,8 @@ void ui_manager::update_and_render(render_container *container) else m_popup_text_end = 0; - if (m_mouse_show || (is_menu_active() && machine().options().ui_mouse())) + // display the internal mouse cursor + if (m_mouse_show || (is_menu_active() && machine().ui().options().ui_mouse())) { INT32 mouse_target_x, mouse_target_y; bool mouse_button; @@ -456,8 +508,10 @@ void ui_manager::update_and_render(render_container *container) if (mouse_target != nullptr) { float mouse_y=-1,mouse_x=-1; - if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) { - container->add_quad(mouse_x,mouse_y,mouse_x + 0.05f*container->manager().ui_aspect(container),mouse_y + 0.05f,UI_TEXT_COLOR,m_mouse_arrow_texture,PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) + { + const float cursor_size = 0.6 * machine().ui().get_line_height(); + container->add_quad(mouse_x, mouse_y, mouse_x + cursor_size*container->manager().ui_aspect(container), mouse_y + cursor_size, UI_TEXT_COLOR, m_mouse_arrow_texture, PRIMFLAG_ANTIALIAS(1) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); } } } @@ -476,7 +530,7 @@ render_font *ui_manager::get_font() { // allocate the font and messagebox string if (m_font == nullptr) - m_font = machine().render().font_alloc(machine().options().ui_font()); + m_font = machine().render().font_alloc(machine().ui().options().ui_font()); return m_font; } @@ -592,9 +646,9 @@ void ui_manager::draw_text(render_container *container, const char *buf, float x // and full size computation //------------------------------------------------- -void ui_manager::draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth, float *totalheight) +void ui_manager::draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth, float *totalheight, float text_size) { - float lineheight = get_line_height(); + float lineheight = get_line_height() * text_size; const char *ends = origs + strlen(origs); float wrapwidth = origwrapwidth; const char *s = origs; @@ -983,6 +1037,16 @@ bool ui_manager::is_menu_active(void) } +bool ui_manager::show_timecode_counter() +{ + return m_show_timecode_counter; +} +bool ui_manager::show_timecode_total() +{ + return m_show_timecode_total; +} + + /*************************************************************************** TEXT GENERATORS @@ -1032,11 +1096,7 @@ std::string &ui_manager::warnings_string(std::string &str) // add a warning if any ROMs were loaded with warnings if (machine().rom_load().warnings() > 0) { - str.append("One or more ROMs/CHDs for this "); - str.append(emulator_info::get_gamenoun()); - str.append(" are incorrect. The "); - str.append(emulator_info::get_gamenoun()); - str.append(" may not run correctly.\n"); + str.append("One or more ROMs/CHDs for this machine are incorrect. The machine may not run correctly.\n"); if (machine().system().flags & WARNING_FLAGS) str.append("\n"); } @@ -1049,15 +1109,11 @@ std::string &ui_manager::warnings_string(std::string &str) // if we have at least one warning flag, print the general header if ((machine().system().flags & WARNING_FLAGS) || machine().rom_load().knownbad() > 0) { - str.append("There are known problems with this "); - str.append(emulator_info::get_gamenoun()); - str.append("\n\n"); + str.append("There are known problems with this machine\n\n"); // add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP if (machine().rom_load().knownbad() > 0) { - str.append("One or more ROMs/CHDs for this "); - str.append(emulator_info::get_gamenoun()); - str.append(" have not been correctly dumped.\n"); + str.append("One or more ROMs/CHDs for this machine have not been correctly dumped.\n"); } // add one line per warning flag if (machine().system().flags & MACHINE_IMPERFECT_KEYBOARD) @@ -1071,32 +1127,24 @@ std::string &ui_manager::warnings_string(std::string &str) if (machine().system().flags & MACHINE_IMPERFECT_SOUND) str.append("The sound emulation isn't 100% accurate.\n"); if (machine().system().flags & MACHINE_NO_SOUND) { - str.append("The "); - str.append(emulator_info::get_gamenoun()); - str.append(" lacks sound.\n"); + str.append("The machine lacks sound.\n"); } if (machine().system().flags & MACHINE_NO_COCKTAIL) str.append("Screen flipping in cocktail mode is not supported.\n"); // check if external artwork is present before displaying this warning? if (machine().system().flags & MACHINE_REQUIRES_ARTWORK) { - str.append("The "); - str.append(emulator_info::get_gamenoun()); - str.append(" requires external artwork files\n"); + str.append("The machine requires external artwork files\n"); } if (machine().system().flags & MACHINE_IS_INCOMPLETE ) { - str.append("This "); - str.append(emulator_info::get_gamenoun()); - str.append(" was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n"); + str.append("This machine was never completed. It may exhibit strange behavior or missing elements that are not bugs in the emulation.\n"); } if (machine().system().flags & MACHINE_NO_SOUND_HW ) { - str.append("This "); - str.append(emulator_info::get_gamenoun()); - str.append(" has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n"); + str.append("This machine has no sound hardware, MAME will produce no sounds, this is expected behaviour.\n"); } // if there's a NOT WORKING, UNEMULATED PROTECTION or GAME MECHANICAL warning, make it stronger @@ -1104,25 +1152,15 @@ std::string &ui_manager::warnings_string(std::string &str) { // add the strings for these warnings if (machine().system().flags & MACHINE_UNEMULATED_PROTECTION) { - str.append("The "); - str.append(emulator_info::get_gamenoun()); - str.append(" has protection which isn't fully emulated.\n"); + str.append("The machine has protection which isn't fully emulated.\n"); } if (machine().system().flags & MACHINE_NOT_WORKING) { - str.append("\nTHIS "); - str.append(emulator_info::get_capgamenoun()); - str.append(" DOESN'T WORK. The emulation for this "); - str.append(emulator_info::get_gamenoun()); - str.append(" is not yet complete. " + str.append("\nTHIS MACHINE DOESN'T WORK. The emulation for this machine is not yet complete. " "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n"); } if (machine().system().flags & MACHINE_MECHANICAL) { - str.append("\nCertain elements of this "); - str.append(emulator_info::get_gamenoun()); - str.append(" cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " - "It is not possible to fully play this "); - str.append(emulator_info::get_gamenoun()); - str.append(".\n"); + str.append("\nCertain elements of this machine cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " + "It is not possible to fully play this machine.\n"); } // find the parent of this driver @@ -1140,9 +1178,7 @@ std::string &ui_manager::warnings_string(std::string &str) { // this one works, add a header and display the name of the clone if (!foundworking) { - str.append("\n\nThere are working clones of this "); - str.append(emulator_info::get_gamenoun()); - str.append(": "); + str.append("\n\nThere are working clones of this machine: "); } else str.append(", "); @@ -1503,11 +1539,24 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co // first draw the FPS counter if (machine.ui().show_fps_counter()) { - std::string tempstring; machine.ui().draw_text_full(container, machine.video().speed_text().c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr); } + // Show the duration of current part (intro or gameplay or extra) + if (machine.ui().show_timecode_counter()) { + std::string tempstring; + machine.ui().draw_text_full(container, machine.video().timecode_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f, + JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0xf0,0x10,0x10), ARGB_BLACK, NULL, NULL); + } + // Show the total time elapsed for the video preview (all parts intro, gameplay, extras) + if (machine.ui().show_timecode_total()) { + std::string tempstring; + machine.ui().draw_text_full(container, machine.video().timecode_total_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f, + JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, rgb_t(0xf0,0x10,0xf0,0x10), ARGB_BLACK, NULL, NULL); + } + + // draw the profiler if visible if (machine.ui().show_profiler()) { @@ -1571,6 +1620,10 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co machine.ui().image_handler_ingame(); + // handle a save input timecode request + if (machine.ui_input().pressed(IPT_UI_TIMECODE)) + machine.video().save_input_timecode(); + if (ui_disabled) return ui_disabled; if (machine.ui_input().pressed(IPT_UI_CANCEL)) @@ -1625,6 +1678,7 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co if (machine.ui_input().pressed(IPT_UI_SAVE_STATE)) { machine.pause(); + machine.ui().m_load_save_hold = true; return machine.ui().set_handler(handler_load_save, LOADSAVE_SAVE); } @@ -1632,6 +1686,7 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co if (machine.ui_input().pressed(IPT_UI_LOAD_STATE)) { machine.pause(); + machine.ui().m_load_save_hold = true; return machine.ui().set_handler(handler_load_save, LOADSAVE_LOAD); } @@ -1643,15 +1698,21 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co if (machine.ui_input().pressed(IPT_UI_PAUSE)) { // with a shift key, it is single step - if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT))) - { - machine.ui().set_single_step(true); - machine.resume(); - } - else +// if (is_paused && (machine.input().code_pressed(KEYCODE_LSHIFT) || machine.input().code_pressed(KEYCODE_RSHIFT))) +// { +// machine.ui().set_single_step(true); +// machine.resume(); +// } +// else machine.toggle_pause(); } + if (machine.ui_input().pressed(IPT_UI_PAUSE_SINGLE)) + { + machine.ui().set_single_step(true); + machine.resume(); + } + // handle a toggle cheats request if (machine.ui_input().pressed(IPT_UI_TOGGLE_CHEAT)) machine.cheat().set_enable(!machine.cheat().enabled()); @@ -1680,6 +1741,21 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co if (machine.ui_input().pressed(IPT_UI_THROTTLE)) machine.video().toggle_throttle(); + // toggle autofire + if (machine.ui_input().pressed(IPT_UI_TOGGLE_AUTOFIRE)) + { + if (!machine.options().cheat()) + { + machine.popmessage("Autofire can't be enabled"); + } + else + { + bool autofire_toggle = machine.ioport().get_autofire_toggle(); + machine.ioport().set_autofire_toggle(!autofire_toggle); + machine.popmessage("Autofire %s", autofire_toggle ? "Enabled" : "Disabled"); + } + } + // check for fast forward if (machine.ioport().type_pressed(IPT_UI_FAST_FORWARD)) { @@ -1713,6 +1789,23 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container else machine.ui().draw_message_window(container, "Select position to load from"); + // if load/save state sequence is still being pressed, do not read the filename yet + if (machine.ui().m_load_save_hold) { + bool seq_in_progress = false; + const input_seq &load_save_seq = state == LOADSAVE_SAVE ? + machine.ioport().type_seq(IPT_UI_SAVE_STATE) : + machine.ioport().type_seq(IPT_UI_LOAD_STATE); + + for (int i = 0; i < load_save_seq.length(); i++) + if (machine.input().code_pressed_once(load_save_seq[i])) + seq_in_progress = true; + + if (seq_in_progress) + return state; + else + machine.ui().m_load_save_hold = false; + } + // check for cancel key if (machine.ui_input().pressed(IPT_UI_CANCEL)) { @@ -1740,21 +1833,41 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container if (machine.input().code_pressed_once(input_code(DEVICE_CLASS_KEYBOARD, 0, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id))) file = id - ITEM_ID_0_PAD + '0'; if (file == 0) - return state; + { + bool found = false; + + for (int joy_index = 0; joy_index <= MAX_SAVED_STATE_JOYSTICK; joy_index++) + for (input_item_id id = ITEM_ID_BUTTON1; id <= ITEM_ID_BUTTON32; ++id) + if (machine.input().code_pressed_once(input_code(DEVICE_CLASS_JOYSTICK, joy_index, ITEM_CLASS_SWITCH, ITEM_MODIFIER_NONE, id))) + { + snprintf(filename, sizeof(filename), "joy%i-%i", joy_index, id - ITEM_ID_BUTTON1 + 1); + found = true; + break; + } + + if (!found) + return state; + } + else + { + sprintf(filename, "%c", file); + } // display a popup indicating that the save will proceed - sprintf(filename, "%c", file); if (state == LOADSAVE_SAVE) { - machine.popmessage("Save to position %c", file); + machine.popmessage("Save to position %s", filename); machine.schedule_save(filename); } else { - machine.popmessage("Load from position %c", file); + machine.popmessage("Load from position %s", filename); machine.schedule_load(filename); } + // avoid handling the name of the save state slot as a seperate input + machine.ui_input().mark_all_as_pressed(); + // remove the pause and reset the state machine.resume(); return UI_HANDLER_CANCEL; @@ -1767,7 +1880,7 @@ UINT32 ui_manager::handler_load_save(running_machine &machine, render_container void ui_manager::request_quit() { - if (!machine().options().confirm_quit()) + if (!machine().ui().options().confirm_quit()) machine().schedule_exit(); else set_handler(handler_confirm_quit, 0); @@ -2490,3 +2603,194 @@ void ui_manager::set_use_natural_keyboard(bool use_natural_keyboard) machine().options().set_value(OPTION_NATURAL_KEYBOARD, use_natural_keyboard, OPTION_PRIORITY_CMDLINE, error); assert(error.empty()); } + +//------------------------------------------------- +// wrap_text +//------------------------------------------------- + +int ui_manager::wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, std::vector<int> &xstart, std::vector<int> &xend, float text_size) +{ + float lineheight = get_line_height() * text_size; + const char *ends = origs + strlen(origs); + float wrapwidth = origwrapwidth; + const char *s = origs; + const char *linestart; + float maxwidth = 0; + float aspect = machine().render().ui_aspect(container); + int count = 0; + + // loop over lines + while (*s != 0) + { + const char *lastbreak = nullptr; + unicode_char schar; + int scharcount; + float lastbreak_width = 0; + float curwidth = 0; + + // get the current character + scharcount = uchar_from_utf8(&schar, s, ends - s); + if (scharcount == -1) + break; + + // remember the starting position of the line + linestart = s; + + // loop while we have characters and are less than the wrapwidth + while (*s != 0 && curwidth <= wrapwidth) + { + float chwidth; + + // get the current chcaracter + scharcount = uchar_from_utf8(&schar, s, ends - s); + if (scharcount == -1) + break; + + // if we hit a newline, stop immediately + if (schar == '\n') + break; + + // get the width of this character + chwidth = get_font()->char_width(lineheight, aspect, schar); + + // if we hit a space, remember the location and width *without* the space + if (schar == ' ') + { + lastbreak = s; + lastbreak_width = curwidth; + } + + // add the width of this character and advance + curwidth += chwidth; + s += scharcount; + + // if we hit any non-space breakable character, remember the location and width + // *with* the breakable character + if (schar != ' ' && is_breakable_char(schar) && curwidth <= wrapwidth) + { + lastbreak = s; + lastbreak_width = curwidth; + } + } + + // if we accumulated too much for the current width, we need to back off + if (curwidth > wrapwidth) + { + // if we hit a break, back up to there with the appropriate width + if (lastbreak != nullptr) + { + s = lastbreak; + curwidth = lastbreak_width; + } + + // if we didn't hit a break, back up one character + else if (s > linestart) + { + // get the previous character + s = (const char *)utf8_previous_char(s); + scharcount = uchar_from_utf8(&schar, s, ends - s); + if (scharcount == -1) + break; + + curwidth -= get_font()->char_width(lineheight, aspect, schar); + } + } + + // track the maximum width of any given line + if (curwidth > maxwidth) + maxwidth = curwidth; + + xstart.push_back(linestart - origs); + xend.push_back(s - origs); + + // loop from the line start and add the characters + while (linestart < s) + { + // get the current character + unicode_char linechar; + int linecharcount = uchar_from_utf8(&linechar, linestart, ends - linestart); + if (linecharcount == -1) + break; + linestart += linecharcount; + } + + // advance by a row + count++; + + // skip past any spaces at the beginning of the next line + scharcount = uchar_from_utf8(&schar, s, ends - s); + if (scharcount == -1) + break; + + if (schar == '\n') + s += scharcount; + else + while (*s && isspace(schar)) + { + s += scharcount; + scharcount = uchar_from_utf8(&schar, s, ends - s); + if (scharcount == -1) + break; + } + } + return count; +} + +//------------------------------------------------- +// draw_textured_box - add primitives to +// draw an outlined box with the given +// textured background and line color +//------------------------------------------------- + +void ui_manager::draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture, UINT32 flags) +{ + container->add_quad(x0, y0, x1, y1, backcolor, texture, flags); + container->add_line(x0, y0, x1, y0, UI_LINE_WIDTH, linecolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + container->add_line(x1, y0, x1, y1, UI_LINE_WIDTH, linecolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + container->add_line(x1, y1, x0, y1, UI_LINE_WIDTH, linecolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + container->add_line(x0, y1, x0, y0, UI_LINE_WIDTH, linecolor, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); +} + +//------------------------------------------------- +// get_string_width_ex - return the width of a +// character string with given text size +//------------------------------------------------- + +float ui_manager::get_string_width_ex(const char *s, float text_size) +{ + return get_font()->utf8string_width(get_line_height() * text_size, machine().render().ui_aspect(), s); +} + +//------------------------------------------------- +// decode UI color options +//------------------------------------------------- + +rgb_t decode_ui_color(int id, running_machine *machine) +{ + static rgb_t color[ARRAY_LENGTH(s_color_list)]; + + if (machine != nullptr) { + ui_options option; + for (int x = 0; x < ARRAY_LENGTH(s_color_list); x++) { + const char *o_default = option.value(s_color_list[x]); + const char *s_option = machine->ui().options().value(s_color_list[x]); + int len = strlen(s_option); + if (len != 8) + color[x] = rgb_t((UINT32)strtoul(o_default, nullptr, 16)); + else + color[x] = rgb_t((UINT32)strtoul(s_option, nullptr, 16)); + } + } + return color[id]; +} + +//------------------------------------------------- +// get font rows from options +//------------------------------------------------- + +int get_font_rows(running_machine *machine) +{ + static int value; + + return ((machine != nullptr) ? value = machine->ui().options().font_rows() : value); +} diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h index ac68a2fb773..31f52b46134 100644 --- a/src/emu/ui/ui.h +++ b/src/emu/ui/ui.h @@ -14,14 +14,15 @@ #define __USRINTRF_H__ #include "render.h" - +#include "moptions.h" /*************************************************************************** CONSTANTS ***************************************************************************/ /* preferred font height; use ui_get_line_height() to get actual height */ -#define UI_TARGET_FONT_ROWS (25) +#define UI_TARGET_FONT_ROWS get_font_rows() + #define UI_TARGET_FONT_HEIGHT (1.0f / (float)UI_TARGET_FONT_ROWS) #define UI_MAX_FONT_HEIGHT (1.0f / 15.0f) @@ -35,25 +36,25 @@ /* handy colors */ #define ARGB_WHITE rgb_t(0xff,0xff,0xff,0xff) #define ARGB_BLACK rgb_t(0xff,0x00,0x00,0x00) -#define UI_BORDER_COLOR rgb_t(0xff,0xff,0xff,0xff) -#define UI_BACKGROUND_COLOR rgb_t(0xef,0x10,0x10,0x30) -#define UI_GFXVIEWER_BG_COLOR rgb_t(0xef,0x10,0x10,0x30) #define UI_GREEN_COLOR rgb_t(0xef,0x10,0x60,0x10) #define UI_YELLOW_COLOR rgb_t(0xef,0x60,0x60,0x10) #define UI_RED_COLOR rgb_t(0xf0,0x60,0x10,0x10) -#define UI_UNAVAILABLE_COLOR rgb_t(0xff,0x40,0x40,0x40) -#define UI_TEXT_COLOR rgb_t(0xff,0xff,0xff,0xff) -#define UI_TEXT_BG_COLOR rgb_t(0xef,0x00,0x00,0x00) -#define UI_SUBITEM_COLOR rgb_t(0xff,0xff,0xff,0xff) -#define UI_CLONE_COLOR rgb_t(0xff,0x80,0x80,0x80) -#define UI_SELECTED_COLOR rgb_t(0xff,0xff,0xff,0x00) -#define UI_SELECTED_BG_COLOR rgb_t(0xef,0x80,0x80,0x00) -#define UI_MOUSEOVER_COLOR rgb_t(0xff,0xff,0xff,0x80) -#define UI_MOUSEOVER_BG_COLOR rgb_t(0x70,0x40,0x40,0x00) -#define UI_MOUSEDOWN_COLOR rgb_t(0xff,0xff,0xff,0x80) -#define UI_MOUSEDOWN_BG_COLOR rgb_t(0xb0,0x60,0x60,0x00) -#define UI_DIPSW_COLOR rgb_t(0xff,0xff,0xff,0x00) -#define UI_SLIDER_COLOR rgb_t(0xff,0xff,0xff,0xff) +#define UI_BORDER_COLOR decode_ui_color(0) +#define UI_BACKGROUND_COLOR decode_ui_color(1) +#define UI_GFXVIEWER_BG_COLOR decode_ui_color(2) +#define UI_UNAVAILABLE_COLOR decode_ui_color(3) +#define UI_TEXT_COLOR decode_ui_color(4) +#define UI_TEXT_BG_COLOR decode_ui_color(5) +#define UI_SUBITEM_COLOR decode_ui_color(6) +#define UI_CLONE_COLOR decode_ui_color(7) +#define UI_SELECTED_COLOR decode_ui_color(8) +#define UI_SELECTED_BG_COLOR decode_ui_color(9) +#define UI_MOUSEOVER_COLOR decode_ui_color(10) +#define UI_MOUSEOVER_BG_COLOR decode_ui_color(11) +#define UI_MOUSEDOWN_COLOR decode_ui_color(12) +#define UI_MOUSEDOWN_BG_COLOR decode_ui_color(13) +#define UI_DIPSW_COLOR decode_ui_color(14) +#define UI_SLIDER_COLOR decode_ui_color(15) /* cancel return value for a UI handler */ #define UI_HANDLER_CANCEL ((UINT32)~0) @@ -84,7 +85,10 @@ enum #define SLIDER_NOCHANGE 0x12345678 - +/*************************************************************************** + FOR FUTURE LOCALIZATION +***************************************************************************/ +#define _(param) param /*************************************************************************** TYPE DEFINITIONS @@ -112,96 +116,117 @@ struct slider_state class ui_manager { public: - // construction/destruction - ui_manager(running_machine &machine); - - // getters - running_machine &machine() const { return m_machine; } - bool single_step() const { return m_single_step; } - - // setters - void set_single_step(bool single_step) { m_single_step = single_step; } - - // methods - void initialize(running_machine &machine); - UINT32 set_handler(ui_callback callback, UINT32 param); - void display_startup_screens(bool first_time, bool show_disclaimer); - void set_startup_text(const char *text, bool force); - void update_and_render(render_container *container); - render_font *get_font(); - float get_line_height(); - float get_char_width(unicode_char ch); - float get_string_width(const char *s); - void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor); - void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor); - void draw_text(render_container *container, const char *buf, float x, float y); - void draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth = nullptr, float *totalheight = nullptr); + // construction/destruction + ui_manager(running_machine &machine); + + void init(); + + // getters + running_machine &machine() const { return m_machine; } + bool single_step() const { return m_single_step; } + ui_options &options() { return m_ui_options; } + + // setters + void set_single_step(bool single_step) { m_single_step = single_step; } + + // methods + void initialize(running_machine &machine); + UINT32 set_handler(ui_callback callback, UINT32 param); + void display_startup_screens(bool first_time, bool show_disclaimer); + void set_startup_text(const char *text, bool force); + void update_and_render(render_container *container); + render_font *get_font(); + float get_line_height(); + float get_char_width(unicode_char ch); + float get_string_width(const char *s); + void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor); + void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor); + void draw_text(render_container *container, const char *buf, float x, float y); + void draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth = nullptr, float *totalheight = nullptr, float text_size = 1.0f); void draw_text_box(render_container *container, const char *text, int justify, float xpos, float ypos, rgb_t backcolor); - void draw_message_window(render_container *container, const char *text); - - void CLIB_DECL popup_time(int seconds, const char *text, ...) ATTR_PRINTF(3,4); - void show_fps_temp(double seconds); - void set_show_fps(bool show); - bool show_fps() const; - bool show_fps_counter(); - void set_show_profiler(bool show); - bool show_profiler() const; - void show_menu(); - void show_mouse(bool status); - bool is_menu_active(); - bool can_paste(); - void paste(); - bool use_natural_keyboard() const; - void set_use_natural_keyboard(bool use_natural_keyboard); - void image_handler_ingame(); - void increase_frameskip(); - void decrease_frameskip(); - void request_quit(); - - // print the game info string into a buffer - std::string &game_info_astring(std::string &str); - - // slider controls - const slider_state *get_slider_list(void); - - // other - void process_natural_keyboard(); + void draw_message_window(render_container *container, const char *text); + + void CLIB_DECL popup_time(int seconds, const char *text, ...) ATTR_PRINTF(3,4); + void show_fps_temp(double seconds); + void set_show_fps(bool show); + bool show_fps() const; + bool show_fps_counter(); + void set_show_profiler(bool show); + bool show_profiler() const; + void show_menu(); + void show_mouse(bool status); + bool is_menu_active(); + bool can_paste(); + void paste(); + bool use_natural_keyboard() const; + void set_use_natural_keyboard(bool use_natural_keyboard); + void image_handler_ingame(); + void increase_frameskip(); + void decrease_frameskip(); + void request_quit(); + + // print the game info string into a buffer + std::string &game_info_astring(std::string &str); + + // slider controls + const slider_state *get_slider_list(void); + + // other + void process_natural_keyboard(); + + void set_show_timecode_counter(bool value) { m_show_timecode_counter = value; m_show_timecode_total = true; } + bool show_timecode_counter(); + bool show_timecode_total(); + + // word wrap + int wrap_text(render_container *container, const char *origs, float x, float y, float origwrapwidth, std::vector<int> &xstart, std::vector<int> &xend, float text_size = 1.0f); + + // draw an outlined box with given line color and filled with a texture + void draw_textured_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor, rgb_t linecolor, render_texture *texture = nullptr, UINT32 flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA)); + + // return text string width with given text size + float get_string_width_ex(const char *s, float text_size); private: - // instance variables - running_machine & m_machine; - render_font * m_font; - ui_callback m_handler_callback; - UINT32 m_handler_param; - bool m_single_step; - bool m_showfps; - osd_ticks_t m_showfps_end; - bool m_show_profiler; - osd_ticks_t m_popup_text_end; - bool m_use_natural_keyboard; + // instance variables + running_machine & m_machine; + render_font * m_font; + ui_callback m_handler_callback; + UINT32 m_handler_param; + bool m_single_step; + bool m_showfps; + osd_ticks_t m_showfps_end; + bool m_show_profiler; + osd_ticks_t m_popup_text_end; + bool m_use_natural_keyboard; std::unique_ptr<UINT8[]> m_non_char_keys_down; - render_texture * m_mouse_arrow_texture; - bool m_mouse_show; - - // text generators - std::string &disclaimer_string(std::string &buffer); - std::string &warnings_string(std::string &buffer); - - // UI handlers - static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state); - static UINT32 handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state); - - // private methods - void exit(); + render_texture * m_mouse_arrow_texture; + bool m_mouse_show; + bool m_show_timecode_counter; + bool m_show_timecode_total; + bool m_load_save_hold; + ui_options m_ui_options; + + // text generators + std::string &disclaimer_string(std::string &buffer); + std::string &warnings_string(std::string &buffer); + + // UI handlers + static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_messagebox_ok(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_messagebox_anykey(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_ingame(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_load_save(running_machine &machine, render_container *container, UINT32 state); + static UINT32 handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state); + + // private methods + void exit(); }; /*************************************************************************** FUNCTION PROTOTYPES ***************************************************************************/ - +rgb_t decode_ui_color(int id, running_machine *machine = nullptr); +int get_font_rows(running_machine *machine = NULL); #endif /* __USRINTRF_H__ */ diff --git a/src/emu/ui/uicmd14.png b/src/emu/ui/uicmd14.png Binary files differnew file mode 100644 index 00000000000..d3cae952cac --- /dev/null +++ b/src/emu/ui/uicmd14.png diff --git a/src/emu/ui/utils.cpp b/src/emu/ui/utils.cpp new file mode 100644 index 00000000000..7ac94d5e050 --- /dev/null +++ b/src/emu/ui/utils.cpp @@ -0,0 +1,173 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/utils.cpp + + Internal UI user interface. + +***************************************************************************/ + +#include "emu.h" +#include "ui/utils.h" +#include <algorithm> + +extern const char UI_VERSION_TAG[]; +const char UI_VERSION_TAG[] = "# UI INFO "; + +// Years index +UINT16 c_year::actual = 0; +std::vector<std::string> c_year::ui; + +// Manufacturers index +UINT16 c_mnfct::actual = 0; +std::vector<std::string> c_mnfct::ui; + +// Main filters +UINT16 main_filters::actual = 0; +const char *main_filters::text[] = { "All", "Available", "Unavailable", "Working", "Not Working", "Mechanical", "Not Mechanical", + "Category", "Favorites", "BIOS", "Originals", "Clones", "Manufacturers", "Years", "Support Save", + "Not Support Save", "CHD", "No CHD", "Vertical", "Horizontal", "Custom" }; +size_t main_filters::length = ARRAY_LENGTH(main_filters::text); + +// Software filters +UINT16 sw_filters::actual = 0; +const char *sw_filters::text[] = { "All", "Available", "Unavailable", "Originals", "Clones", "Years", "Publishers", "Supported", + "Partial Supported", "Unsupported", "Region", "Device Type", "Software List", "Custom" }; +size_t sw_filters::length = ARRAY_LENGTH(sw_filters::text); + +// Globals +UINT8 ui_globals::rpanel = 0; +UINT8 ui_globals::curimage_view = 0; +UINT8 ui_globals::curdats_view = 0; +UINT8 ui_globals::cur_sw_dats_view = 0; +bool ui_globals::switch_image = false; +bool ui_globals::default_image = true; +bool ui_globals::reset = false; +bool ui_globals::redraw_icon = false; +int ui_globals::visible_main_lines = 0; +int ui_globals::visible_sw_lines = 0; +UINT16 ui_globals::panels_status = 0; +bool ui_globals::has_icons = false; + +// Custom filter +UINT16 custfltr::main = 0; +UINT16 custfltr::numother = 0; +UINT16 custfltr::other[MAX_CUST_FILTER]; +UINT16 custfltr::mnfct[MAX_CUST_FILTER]; +UINT16 custfltr::year[MAX_CUST_FILTER]; +UINT16 custfltr::screen[MAX_CUST_FILTER]; + +// Custom filter +UINT16 sw_custfltr::main = 0; +UINT16 sw_custfltr::numother = 0; +UINT16 sw_custfltr::other[MAX_CUST_FILTER]; +UINT16 sw_custfltr::mnfct[MAX_CUST_FILTER]; +UINT16 sw_custfltr::year[MAX_CUST_FILTER]; +UINT16 sw_custfltr::region[MAX_CUST_FILTER]; +UINT16 sw_custfltr::type[MAX_CUST_FILTER]; +UINT16 sw_custfltr::list[MAX_CUST_FILTER]; + +char* chartrimcarriage(char str[]) +{ + char *pstr = strrchr(str, '\n'); + if (pstr) + str[pstr - str] = '\0'; + pstr = strrchr(str, '\r'); + if (pstr) + str[pstr - str] = '\0'; + return str; +} + +const char* strensure(const char* s) +{ + return s == nullptr ? "" : s; +} + +//------------------------------------------------- +// search a substring with even partial matching +//------------------------------------------------- + +int fuzzy_substring(std::string s_needle, std::string s_haystack) +{ + if (s_needle.empty()) + return s_haystack.size(); + if (s_haystack.empty()) + return s_needle.size(); + + strmakelower(s_needle); + strmakelower(s_haystack); + + if (s_needle == s_haystack) + return 0; + if (s_haystack.find(s_needle) != std::string::npos) + return 0; + + auto *row1 = global_alloc_array_clear<int>(s_haystack.size() + 2); + auto *row2 = global_alloc_array_clear<int>(s_haystack.size() + 2); + + for (int i = 0; i < s_needle.size(); ++i) + { + row2[0] = i + 1; + for (int j = 0; j < s_haystack.size(); ++j) + { + int cost = (s_needle[i] == s_haystack[j]) ? 0 : 1; + row2[j + 1] = MIN(row1[j + 1] + 1, MIN(row2[j] + 1, row1[j] + cost)); + } + + int *tmp = row1; + row1 = row2; + row2 = tmp; + } + + int *first, *smallest; + first = smallest = row1; + int *last = row1 + s_haystack.size(); + + while (++first != last) + if (*first < *smallest) + smallest = first; + + int rv = *smallest; + global_free_array(row1); + global_free_array(row2); + + return rv; +} + +//------------------------------------------------- +// set manufacturers +//------------------------------------------------- + +void c_mnfct::set(const char *str) +{ + std::string name = getname(str); + if (std::find(ui.begin(), ui.end(), name) != ui.end()) + return; + + ui.push_back(name); +} + +std::string c_mnfct::getname(const char *str) +{ + std::string name(str); + size_t found = name.find("("); + + if (found != std::string::npos) + return (name.substr(0, found - 1)); + else + return name; +} + +//------------------------------------------------- +// set years +//------------------------------------------------- + +void c_year::set(const char *str) +{ + std::string name(str); + if (std::find(ui.begin(), ui.end(), name) != ui.end()) + return; + + ui.push_back(name); +} diff --git a/src/emu/ui/utils.h b/src/emu/ui/utils.h new file mode 100644 index 00000000000..3c8da8ab16e --- /dev/null +++ b/src/emu/ui/utils.h @@ -0,0 +1,345 @@ +// license:BSD-3-Clause +// copyright-holders:Dankan1890 +/*************************************************************************** + + ui/utils.h + + Internal UI user interface. + +***************************************************************************/ + +#pragma once + +#ifndef __UI_UTILS_H__ +#define __UI_UTILS_H__ + +#include "osdepend.h" +#include "render.h" +#include "libjpeg/jpeglib.h" + +#define MAX_CHAR_INFO 256 +#define MAX_CUST_FILTER 8 + +// GLOBAL ENUMERATORS +enum +{ + FILTER_FIRST = 0, + FILTER_ALL = FILTER_FIRST, + FILTER_AVAILABLE, + FILTER_UNAVAILABLE, + FILTER_WORKING, + FILTER_NOT_WORKING, + FILTER_MECHANICAL, + FILTER_NOT_MECHANICAL, + FILTER_CATEGORY, + FILTER_FAVORITE, + FILTER_BIOS, + FILTER_PARENT, + FILTER_CLONES, + FILTER_MANUFACTURER, + FILTER_YEAR, + FILTER_SAVE, + FILTER_NOSAVE, + FILTER_CHD, + FILTER_NOCHD, + FILTER_VERTICAL, + FILTER_HORIZONTAL, + FILTER_CUSTOM, + FILTER_LAST = FILTER_CUSTOM +}; + +enum +{ + FIRST_VIEW = 0, + SNAPSHOT_VIEW = FIRST_VIEW, + CABINETS_VIEW, + CPANELS_VIEW, + PCBS_VIEW, + FLYERS_VIEW, + TITLES_VIEW, + ENDS_VIEW, + ARTPREV_VIEW, + BOSSES_VIEW, + LOGOS_VIEW, + VERSUS_VIEW, + GAMEOVER_VIEW, + HOWTO_VIEW, + SCORES_VIEW, + SELECT_VIEW, + MARQUEES_VIEW, + LAST_VIEW = MARQUEES_VIEW +}; + +enum +{ + RP_FIRST = 0, + RP_IMAGES = RP_FIRST, + RP_INFOS, + RP_LAST = RP_INFOS +}; + +enum +{ + SHOW_PANELS = 0, + HIDE_LEFT_PANEL, + HIDE_RIGHT_PANEL, + HIDE_BOTH +}; + +enum +{ + UI_FIRST_LOAD = 0, + UI_GENERAL_LOAD = UI_FIRST_LOAD, + UI_HISTORY_LOAD, + UI_MAMEINFO_LOAD, + UI_SYSINFO_LOAD, + UI_MESSINFO_LOAD, + UI_COMMAND_LOAD, + UI_STORY_LOAD, + UI_LAST_LOAD = UI_STORY_LOAD +}; + +enum +{ + UI_SW_FIRST = 0, + UI_SW_ALL = UI_SW_FIRST, + UI_SW_AVAILABLE, + UI_SW_UNAVAILABLE, + UI_SW_PARENTS, + UI_SW_CLONES, + UI_SW_YEARS, + UI_SW_PUBLISHERS, + UI_SW_SUPPORTED, + UI_SW_PARTIAL_SUPPORTED, + UI_SW_UNSUPPORTED, + UI_SW_REGION, + UI_SW_TYPE, + UI_SW_LIST, + UI_SW_CUSTOM, + UI_SW_LAST = UI_SW_CUSTOM +}; + +enum +{ + HOVER_DAT_UP = -1000, + HOVER_DAT_DOWN, + HOVER_UI_LEFT, + HOVER_UI_RIGHT, + HOVER_ARROW_UP, + HOVER_ARROW_DOWN, + HOVER_B_FAV, + HOVER_B_EXPORT, + HOVER_B_DATS, + HOVER_B_FOLDERS, + HOVER_B_SETTINGS, + HOVER_RPANEL_ARROW, + HOVER_LPANEL_ARROW, + HOVER_FILTER_FIRST, + HOVER_FILTER_LAST = (HOVER_FILTER_FIRST) + 1 + FILTER_LAST, + HOVER_SW_FILTER_FIRST, + HOVER_SW_FILTER_LAST = (HOVER_SW_FILTER_FIRST) + 1 + UI_SW_LAST, + HOVER_RP_FIRST, + HOVER_RP_LAST = (HOVER_RP_FIRST) + 1 + RP_LAST +}; + +// GLOBAL STRUCTURES +struct ui_software_info +{ + ui_software_info() {} + ui_software_info(std::string sname, std::string lname, std::string pname, std::string y, std::string pub, + UINT8 s, std::string pa, const game_driver *d, std::string li, std::string i, std::string is, UINT8 em, + std::string plong, std::string u, std::string de, bool av) + { + shortname = sname; longname = lname; parentname = pname; year = y; publisher = pub; + supported = s; part = pa; driver = d; listname = li; interface = i; instance = is; startempty = em; + parentlongname = plong; usage = u; devicetype = de; available = av; + } + std::string shortname; + std::string longname; + std::string parentname; + std::string year; + std::string publisher; + UINT8 supported = 0; + std::string part; + const game_driver *driver; + std::string listname; + std::string interface; + std::string instance; + UINT8 startempty = 0; + std::string parentlongname; + std::string usage; + std::string devicetype; + bool available = false; + + bool operator==(const ui_software_info& r) + { + if (shortname == r.shortname && longname == r.longname && parentname == r.parentname + && year == r.year && publisher == r.publisher && supported == r.supported + && part == r.part && driver == r.driver && listname == r.listname + && interface == r.interface && instance == r.instance && startempty == r.startempty + && parentlongname == r.parentlongname && usage == r.usage && devicetype == r.devicetype) + return true; + + return false; + } +}; + +// Manufacturers +struct c_mnfct +{ + static void set(const char *str); + static std::string getname(const char *str); + static std::vector<std::string> ui; + static UINT16 actual; +}; + +// Years +struct c_year +{ + static void set(const char *str); + static std::vector<std::string> ui; + static UINT16 actual; +}; + +// GLOBAL CLASS +struct ui_globals +{ + static UINT8 curimage_view, curdats_view, cur_sw_dats_view, rpanel; + static bool switch_image, redraw_icon, default_image, reset; + static int visible_main_lines, visible_sw_lines; + static UINT16 panels_status; + static bool has_icons; +}; + +#define main_struct(name) \ +struct name##_filters \ +{ \ + static UINT16 actual; \ + static const char *text[]; \ + static size_t length; \ +}; + +main_struct(main); +main_struct(sw); + +// Custom filter +struct custfltr +{ + static UINT16 main; + static UINT16 numother; + static UINT16 other[MAX_CUST_FILTER]; + static UINT16 mnfct[MAX_CUST_FILTER]; + static UINT16 screen[MAX_CUST_FILTER]; + static UINT16 year[MAX_CUST_FILTER]; +}; + +// Software custom filter +struct sw_custfltr +{ + static UINT16 main; + static UINT16 numother; + static UINT16 other[MAX_CUST_FILTER]; + static UINT16 mnfct[MAX_CUST_FILTER]; + static UINT16 year[MAX_CUST_FILTER]; + static UINT16 region[MAX_CUST_FILTER]; + static UINT16 type[MAX_CUST_FILTER]; + static UINT16 list[MAX_CUST_FILTER]; +}; + +// GLOBAL FUNCTIONS + +// advanced search function +int fuzzy_substring(std::string needle, std::string haystack); + +// trim carriage return +char* chartrimcarriage(char str[]); + +const char* strensure(const char* s); + +// jpeg loader +template <typename _T> +void render_load_jpeg(_T &bitmap, emu_file &file, const char *dirname, const char *filename) +{ + // deallocate previous bitmap + bitmap.reset(); + + bitmap_format format = bitmap.format(); + + // define file's full name + std::string fname; + + if (dirname == nullptr) + fname = filename; + else + fname.assign(dirname).append(PATH_SEPARATOR).append(filename); + + file_error filerr = file.open(fname.c_str()); + + if (filerr != FILERR_NONE) + return; + + // define standard JPEG structures + jpeg_decompress_struct cinfo; + jpeg_error_mgr jerr; + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_decompress(&cinfo); + + // allocates a buffer for the image + UINT64 jpg_size = file.size(); + unsigned char *jpg_buffer = global_alloc_array(unsigned char, jpg_size + 100); + + // read data from the file and set them in the buffer + file.read(jpg_buffer, jpg_size); + jpeg_mem_src(&cinfo, jpg_buffer, jpg_size); + + // read JPEG header and start decompression + jpeg_read_header(&cinfo, TRUE); + jpeg_start_decompress(&cinfo); + + // allocates the destination bitmap + int w = cinfo.output_width; + int h = cinfo.output_height; + int s = cinfo.output_components; + bitmap.allocate(w, h); + + // allocates a buffer to receive the information and copy them into the bitmap + int row_stride = cinfo.output_width * cinfo.output_components; + JSAMPARRAY buffer = (JSAMPARRAY)malloc(sizeof(JSAMPROW)); + buffer[0] = (JSAMPROW)malloc(sizeof(JSAMPLE) * row_stride); + + while ( cinfo.output_scanline < cinfo.output_height ) + { + int j = cinfo.output_scanline; + jpeg_read_scanlines(&cinfo, buffer, 1); + + if (s == 1) + for (int i = 0; i < w; ++i) + if (format == BITMAP_FORMAT_ARGB32) + bitmap.pix32(j, i) = rgb_t(0xFF, buffer[0][i], buffer[0][i], buffer[0][i]); + else + bitmap.pix32(j, i) = rgb_t(buffer[0][i], buffer[0][i], buffer[0][i]); + + else if (s == 3) + for (int i = 0; i < w; ++i) + if (format == BITMAP_FORMAT_ARGB32) + bitmap.pix32(j, i) = rgb_t(0xFF, buffer[0][i * s], buffer[0][i * s + 1], buffer[0][i * s + 2]); + else + bitmap.pix32(j, i) = rgb_t(buffer[0][i * s], buffer[0][i * s + 1], buffer[0][i * s + 2]); + + else + { + osd_printf_info("Error! Cannot read JPEG data from %s file.\n", fname.c_str()); + break; + } + } + + // finish decompression and frees the memory + jpeg_finish_decompress(&cinfo); + jpeg_destroy_decompress(&cinfo); + file.close(); + free(buffer[0]); + free(buffer); + global_free_array(jpg_buffer); +} + +#endif /* __UI_UTILS_H__ */ diff --git a/src/emu/ui/videoopt.cpp b/src/emu/ui/videoopt.cpp index e76c27305c8..aa3bc21dd5f 100644 --- a/src/emu/ui/videoopt.cpp +++ b/src/emu/ui/videoopt.cpp @@ -24,7 +24,7 @@ void ui_menu_video_targets::handle() /* process the menu */ const ui_menu_event *menu_event = process(0); if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT) - ui_menu::stack_push(auto_alloc_clear(machine(), <ui_menu_video_options>(machine(), container, static_cast<render_target *>(menu_event->itemref)))); + ui_menu::stack_push(global_alloc_clear<ui_menu_video_options>(machine(), container, static_cast<render_target *>(menu_event->itemref))); } diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp index 6b26bb323b5..c55038d3065 100644 --- a/src/emu/uiinput.cpp +++ b/src/emu/uiinput.cpp @@ -324,3 +324,30 @@ void ui_input_manager::push_char_event(render_target* target, unicode_char ch) event.ch = ch; push_event(event); } + +/*------------------------------------------------- + push_mouse_wheel_event - pushes a mouse + wheel event to the specified render_target +-------------------------------------------------*/ + +void ui_input_manager::push_mouse_wheel_event(render_target *target, INT32 x, INT32 y, short delta, int ucNumLines) +{ + ui_event event = { UI_EVENT_NONE }; + event.event_type = UI_EVENT_MOUSE_WHEEL; + event.target = target; + event.mouse_x = x; + event.mouse_y = y; + event.zdelta = delta; + event.num_lines = ucNumLines; + push_event(event); +} + +/*------------------------------------------------- + mark_all_as_pressed - marks all buttons + as if they were already pressed once +-------------------------------------------------*/ +void ui_input_manager::mark_all_as_pressed() +{ + for (int code = IPT_UI_FIRST + 1; code < IPT_UI_LAST; code++) + m_next_repeat[code] = osd_ticks(); +}
\ No newline at end of file diff --git a/src/emu/uiinput.h b/src/emu/uiinput.h index 2e89a0c413a..fecc61c0c1a 100644 --- a/src/emu/uiinput.h +++ b/src/emu/uiinput.h @@ -33,6 +33,7 @@ enum ui_event_type UI_EVENT_MOUSE_DOWN, UI_EVENT_MOUSE_UP, UI_EVENT_MOUSE_DOUBLE_CLICK, + UI_EVENT_MOUSE_WHEEL, UI_EVENT_CHAR }; @@ -44,6 +45,8 @@ struct ui_event INT32 mouse_y; input_item_id key; unicode_char ch; + short zdelta; + int num_lines; }; // ======================> ui_input_manager @@ -85,6 +88,9 @@ public: void push_mouse_up_event(render_target* target, INT32 x, INT32 y); void push_mouse_double_click_event(render_target* target, INT32 x, INT32 y); void push_char_event(render_target* target, unicode_char ch); + void push_mouse_wheel_event(render_target *target, INT32 x, INT32 y, short delta, int ucNumLines); + + void mark_all_as_pressed(); private: diff --git a/src/emu/video.cpp b/src/emu/video.cpp index 41fb5e1726e..7dc9470d54a 100644 --- a/src/emu/video.cpp +++ b/src/emu/video.cpp @@ -108,7 +108,13 @@ video_manager::video_manager(running_machine &machine) m_avi_frame_period(attotime::zero), m_avi_next_frame_time(attotime::zero), m_avi_frame(0), - m_dummy_recording(false) + m_dummy_recording(false), + m_timecode_enabled(false), + m_timecode_write(false), + m_timecode_text(""), + m_timecode_start(attotime::zero), + m_timecode_total(attotime::zero) + { // request a callback upon exiting machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(video_manager::exit), this)); @@ -362,6 +368,63 @@ void video_manager::save_active_screen_snapshots() //------------------------------------------------- +// save_input_timecode - add a line of current +// timestamp to inp.timecode file +//------------------------------------------------- + +void video_manager::save_input_timecode() +{ + // if record timecode input is not active, do nothing + if (!m_timecode_enabled) { + return; + } + m_timecode_write = true; +} + +std::string &video_manager::timecode_text(std::string &str) { + str.clear(); + str += " "; + + if (!m_timecode_text.empty()) { + str += m_timecode_text + " "; + } + + attotime elapsed_time = machine().time() - m_timecode_start; + std::string elapsed_time_str; + strcatprintf(elapsed_time_str, "%02d:%02d", + (elapsed_time.m_seconds / 60) % 60, + elapsed_time.m_seconds % 60); + str += elapsed_time_str; + + bool paused = machine().paused(); + if (paused) { + str.append(" [paused]"); + } + + str += " "; + + return str; +} + +std::string &video_manager::timecode_total_text(std::string &str) { + str.clear(); + str += " TOTAL "; + + attotime elapsed_time = m_timecode_total; + if (machine().ui().show_timecode_counter()) { + elapsed_time += machine().time() - m_timecode_start; + } + std::string elapsed_time_str; + strcatprintf(elapsed_time_str, "%02d:%02d", + (elapsed_time.m_seconds / 60) % 60, + elapsed_time.m_seconds % 60); + str += elapsed_time_str + " "; + return str; +} + + + +//------------------------------------------------- // begin_recording - begin recording of a movie //------------------------------------------------- @@ -584,7 +647,7 @@ void video_manager::postload() // forward //------------------------------------------------- -inline int video_manager::effective_autoframeskip() const +inline bool video_manager::effective_autoframeskip() const { // if we're fast forwarding or paused, autoframeskip is disabled if (m_fastforward || machine().paused()) @@ -621,7 +684,7 @@ inline int video_manager::effective_frameskip() const inline bool video_manager::effective_throttle() const { // if we're paused, or if the UI is active, we always throttle - if (machine().paused() || machine().ui().is_menu_active()) + if (machine().paused()) //|| machine().ui().is_menu_active()) return true; // if we're fast forwarding, we don't throttle diff --git a/src/emu/video.h b/src/emu/video.h index 4938cf67f34..7a1808ad095 100644 --- a/src/emu/video.h +++ b/src/emu/video.h @@ -76,6 +76,7 @@ public: // misc void toggle_throttle(); void toggle_record_movie(); + file_error open_next(emu_file &file, const char *extension); // render a frame void frame_update(bool debug = false); @@ -87,11 +88,23 @@ public: // snapshots void save_snapshot(screen_device *screen, emu_file &file); void save_active_screen_snapshots(); + void save_input_timecode(); // movies void begin_recording(const char *name, movie_format format); void end_recording(movie_format format); void add_sound_to_recording(const INT16 *sound, int numsamples); + + void set_timecode_enabled(bool value) { m_timecode_enabled = value; } + bool get_timecode_enabled() { return m_timecode_enabled; } + bool get_timecode_write() { return m_timecode_write; } + void set_timecode_write(bool value) { m_timecode_write = value; } + void set_timecode_text(std::string &str) { m_timecode_text = str; } + void set_timecode_start(attotime time) { m_timecode_start = time; } + void add_to_total_time(attotime time) { m_timecode_total += time; } + std::string &timecode_text(std::string &str); + std::string &timecode_total_text(std::string &str); + private: // internal helpers @@ -100,7 +113,7 @@ private: void postload(); // effective value helpers - int effective_autoframeskip() const; + bool effective_autoframeskip() const; int effective_frameskip() const; bool effective_throttle() const; @@ -115,7 +128,6 @@ private: // snapshot/movie helpers void create_snapshot_bitmap(screen_device *screen); - file_error open_next(emu_file &file, const char *extension); void record_frame(); // internal state @@ -184,6 +196,13 @@ private: static const attoseconds_t ATTOSECONDS_PER_SPEED_UPDATE = ATTOSECONDS_PER_SECOND / 4; static const int PAUSED_REFRESH_RATE = 30; + + bool m_timecode_enabled; // inp.timecode record enabled + bool m_timecode_write; // Show/hide timer at right (partial time) + std::string m_timecode_text; // Message for that video part (intro, gameplay, extra) + attotime m_timecode_start; // Starting timer for that video part (intro, gameplay, extra) + attotime m_timecode_total; // Show/hide timer at left (total elapsed on resulting video preview) + }; #endif /* __VIDEO_H__ */ diff --git a/src/ldplayer/ldplayer.cpp b/src/ldplayer/ldplayer.cpp index bbd309dd0b9..4f16ba130b8 100644 --- a/src/ldplayer/ldplayer.cpp +++ b/src/ldplayer/ldplayer.cpp @@ -22,40 +22,14 @@ #define APPNAME "MAME" #define APPNAME_LOWER "mame" #define CONFIGNAME "mame" -#define CAPGAMENOUN "GAME" -#define CAPSTARTGAMENOUN "Game" -#define GAMENOUN "game" -#define GAMESNOUN "games" #define COPYRIGHT "Copyright Nicola Salmoria\nand the MAME team\nhttp://mamedev.org" #define COPYRIGHT_INFO "Copyright Nicola Salmoria and the MAME team" -#define DISCLAIMER "MAME is an emulator: it reproduces, more or less faithfully, the behaviour of\n" \ - "several arcade machines. But hardware is useless without software, so an image\n" \ - "of the ROMs which run on that hardware is required. Such ROMs, like any other\n" \ - "commercial software, are copyrighted material and it is therefore illegal to\n" \ - "use them if you don't own the original arcade machine. Needless to say, ROMs\n" \ - "are not distributed together with MAME. Distribution of MAME together with ROM\n" \ - "images is a violation of copyright law and should be promptly reported to the\n" \ - "authors so that appropriate legal action can be taken.\n" -#define USAGE "Usage: %s [%s] [options]" -#define XML_ROOT "mame" -#define XML_TOP "game" -#define STATE_MAGIC_NUM "MAMESAVE" const char * emulator_info::get_appname() { return APPNAME;} const char * emulator_info::get_appname_lower() { return APPNAME_LOWER;} const char * emulator_info::get_configname() { return CONFIGNAME;} -const char * emulator_info::get_capgamenoun() { return CAPGAMENOUN;} -const char * emulator_info::get_capstartgamenoun() { return CAPSTARTGAMENOUN;} -const char * emulator_info::get_gamenoun() { return GAMENOUN;} -const char * emulator_info::get_gamesnoun() { return GAMESNOUN;} const char * emulator_info::get_copyright() { return COPYRIGHT;} const char * emulator_info::get_copyright_info() { return COPYRIGHT_INFO;} -const char * emulator_info::get_disclaimer() { return DISCLAIMER;} -const char * emulator_info::get_usage() { return USAGE;} -const char * emulator_info::get_xml_root() { return XML_ROOT;} -const char * emulator_info::get_xml_top() { return XML_TOP;} -const char * emulator_info::get_state_magic_num() { return STATE_MAGIC_NUM;} -void emulator_info::printf_usage(const char *par1, const char *par2) { osd_printf_info(USAGE, par1, par2); } /************************************* * diff --git a/src/lib/netlist/devices/net_lib.cpp b/src/lib/netlist/devices/net_lib.cpp index 3b8edc8ac84..4df6811dddc 100644 --- a/src/lib/netlist/devices/net_lib.cpp +++ b/src/lib/netlist/devices/net_lib.cpp @@ -41,8 +41,9 @@ NETLIST_START(bjt_models) NET_MODEL("2N5190 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)") NET_MODEL("2SC945 NPN(IS=3.577E-14 BF=2.382E+02 NF=1.01 VAF=1.206E+02 IKF=3.332E-01 ISE=3.038E-16 NE=1.205 BR=1.289E+01 NR=1.015 VAR=1.533E+01 IKR=2.037E-01 ISC=3.972E-14 NC=1.115 RB=3.680E+01 IRB=1.004E-04 RBM=1 RE=8.338E-01 RC=1.557E+00 CJE=1.877E-11 VJE=7.211E-01 MJE=3.486E-01 TF=4.149E-10 XTF=1.000E+02 VTF=9.956 ITF=5.118E-01 PTF=0 CJC=6.876p VJC=3.645E-01 MJC=3.074E-01 TR=5.145E-08 XTB=1.5 EG=1.11 XTI=3 FC=0.5 Vceo=50 Icrating=100m MFG=NEC)") - NET_MODEL("BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45V ICRATING=100M MFG=ZETEX)") + NET_MODEL("BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45 ICRATING=100M MFG=ZETEX)") NET_MODEL("BC556B PNP(IS=3.83E-14 NF=1.008 ISE=1.22E-14 NE=1.528 BF=344.4 IKF=0.08039 VAF=21.11 NR=1.005 ISC=2.85E-13 NC=1.28 BR=14.84 IKR=0.047 VAR=32.02 RB=1 IRB=1.00E-06 RBM=1 RE=0.6202 RC=0.5713 XTB=0 EG=1.11 XTI=3 CJE=1.23E-11 VJE=0.6106 MJE=0.378 TF=5.60E-10 XTF=3.414 VTF=5.23 ITF=0.1483 PTF=0 CJC=1.08E-11 VJC=0.1022 MJC=0.3563 XCJC=0.6288 TR=1.00E-32 CJS=0 VJS=0.75 MJS=0.333 FC=0.8027 Vceo=65 Icrating=100m mfg=Philips)") + NET_MODEL("BC548C NPN(IS=1.95E-14 ISE=1.31E-15 ISC=1.0E-13 XTI=3 BF=466 BR=2.42 IKF=0.18 IKR=1 XTB=1.5 VAF=91.7 VAR=24.7 VJE=0.632 VJC=0.339 RE=1 RC=1.73 RB=26.5 RBM=10 IRB=10 CJE=1.33E-11 CJC=5.17E-12 XCJC=1 FC=0.9 NF=0.993 NR=1.2 NE=1.32 NC=2.00 MJE=0.326 MJC=0.319 TF=6.52E-10 TR=0 PTF=0 ITF=1.03 VTF=1.65 XTF=100 EG=1.11 KF=1E-9 AF=1 VCEO=40 ICrating=800M MFG=Siemens)") NET_MODEL("BC817-25 NPN(IS=9.198E-14 NF=1.003 ISE=4.468E-16 NE=1.65 BF=338.8 IKF=0.4913 VAF=107.9 NR=1.002 ISC=5.109E-15 NC=1.071 BR=29.48 IKR=0.193 VAR=25 RB=1 IRB=1000 RBM=1 RE=0.2126 RC=0.143 XTB=0 EG=1.11 XTI=3 CJE=3.825E-11 VJE=0.7004 MJE=0.364 TF=5.229E-10 XTF=219.7 VTF=3.502 ITF=7.257 PTF=0 CJC=1.27E-11 VJC=0.4431 MJC=0.3983 XCJC=0.4555 TR=7E-11 CJS=0 VJS=0.75 MJS=0.333 FC=0.905 Vceo=45 Icrating=500m mfg=Philips)") NETLIST_END() diff --git a/src/lib/util/aviio.cpp b/src/lib/util/aviio.cpp index 90918c06673..a448128070b 100644 --- a/src/lib/util/aviio.cpp +++ b/src/lib/util/aviio.cpp @@ -1297,7 +1297,7 @@ avi_error avi_read_sound_samples(avi_file *file, int channel, UINT32 firstsample UINT32 bytes_per_sample; file_error filerr; avi_stream *stream; - int offset; + int offset = 0; /* get the audio stream */ stream = get_audio_stream(file, channel, &offset); diff --git a/src/lib/util/corealloc.h b/src/lib/util/corealloc.h index 4f0b961eb59..2c1df6dd46c 100644 --- a/src/lib/util/corealloc.h +++ b/src/lib/util/corealloc.h @@ -27,7 +27,9 @@ // global allocation helpers -- use these instead of new and delete #define global_alloc(_type) new _type +#define global_alloc_nothrow(_type) new (std::nothrow) _type #define global_alloc_array(_type, _num) new _type[_num] +#define global_alloc_array_nothrow(_type, _num) new (std::nothrow) _type[_num] #define global_free(_ptr) do { delete _ptr; } while (0) #define global_free_array(_ptr) do { delete[] _ptr; } while (0) diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp index d7ab454d063..830721127ac 100644 --- a/src/lib/util/options.cpp +++ b/src/lib/util/options.cpp @@ -58,7 +58,8 @@ core_options::entry::entry(const char *name, const char *description, UINT32 fla m_seqid(0), m_error_reported(false), m_priority(OPTION_PRIORITY_DEFAULT), - m_description(description) + m_description(description), + m_changed(false) { // copy in the name(s) as appropriate if (name != nullptr) @@ -615,6 +616,16 @@ bool core_options::exists(const char *name) const } //------------------------------------------------- +// is_changed - return if option have been marked +// changed +//------------------------------------------------- + +bool core_options::is_changed(const char *name) const +{ + auto curentry = m_entrymap.find(name); + return (curentry != m_entrymap.end()) ? curentry->second->is_changed() : false; +} +//------------------------------------------------- // set_value - set the raw option value //------------------------------------------------- @@ -656,6 +667,16 @@ void core_options::set_flag(const char *name, UINT32 mask, UINT32 flag) curentry->second->set_flag(mask, flag); } +void core_options::mark_changed(const char* name) +{ + // find the entry first + auto curentry = m_entrymap.find(name); + if (curentry == m_entrymap.end()) + { + return; + } + curentry->second->mark_changed(); +} //------------------------------------------------- // reset - reset the options state, removing diff --git a/src/lib/util/options.h b/src/lib/util/options.h index 1df89bed6c7..5edf64a9fcd 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -89,12 +89,14 @@ public: bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; } bool has_range() const { return (!m_minimum.empty() && !m_maximum.empty()); } int priority() const { return m_priority; } + bool is_changed() const { return m_changed; } // setters void set_value(const char *newvalue, int priority); void set_default_value(const char *defvalue); void set_description(const char *description); void set_flag(UINT32 mask, UINT32 flag); + void mark_changed() { m_changed = true; } void revert(int priority); private: @@ -110,6 +112,7 @@ public: std::string m_defdata; // default data for this item std::string m_minimum; // minimum value std::string m_maximum; // maximum value + bool m_changed; // changed flag }; // construction/destruction @@ -157,6 +160,7 @@ public: float float_value(const char *name) const { return atof(value(name)); } UINT32 seqid(const char *name) const; bool exists(const char *name) const; + bool is_changed(const char *name) const; // setting void set_command(const char *command); @@ -164,6 +168,7 @@ public: bool set_value(const char *name, int value, int priority, std::string &error_string); bool set_value(const char *name, float value, int priority, std::string &error_string); void set_flag(const char *name, UINT32 mask, UINT32 flags); + void mark_changed(const char *name); // misc static const char *unadorned(int x = 0) { return s_option_unadorned[MIN(x, MAX_UNADORNED_OPTIONS)]; } diff --git a/src/mame/arcade.lst b/src/mame/arcade.lst index 90ab4bd4d2d..76a780960b3 100644 --- a/src/mame/arcade.lst +++ b/src/mame/arcade.lst @@ -382,6 +382,7 @@ hustlerb4 // bootleg frogger // GX392 (c) 1981 Konami froggers1 // (c) 1981 Sega froggers2 // 834-0068 (c) 1981 Sega +froggers3 // froggermc // 800-3110 (c) 1981 Sega amidar // GX337 (c) 1982 Konami amidar1 // GX337 (c) 1981 Konami @@ -1106,6 +1107,7 @@ tekken4 tekken4a tekken4b tekken4c +wanganmr prdgp03 timecrs3 timecrs3e @@ -2106,6 +2108,7 @@ sboblbobl // bootleg sboblbobla // bootleg sboblboblb // bootleg sboblboblc // bootleg +sboblbobld // bootleg bublboblb // bootleg bub68705 // bootleg dland // bootleg @@ -3090,6 +3093,7 @@ supduck // (c) Comad 1943j // 6/1987 (c) 1987 (Japan) Rev B 1943ja // 6/1987 (c) 1987 (Japan) 1943b // bootleg +1943bj // bootleg blktiger // 8/1987 (c) 1987 (US) blktigera // 8/1987 (c) 1987 (US) blktigerb1 // bootleg @@ -4130,17 +4134,23 @@ p911 // 2001 p911uc // 2001 p911kc // 2001 p911e // 2001 +p911ea // 2001 p911j // 2001 p9112 // 2001 popn9 // 2003 sscopex // 2001 sogeki // 2001 +sscopefh // 2002 thrild2 // 2001 thrild2a // 2001 +thrild2ab // 2001 +thrild2ac // 2001 thrild2c // 2001 tsurugi // 2001 +tsurugie // 2001 tsurugij // 2001 wcombat // 2002 +wcombatb // 2002 wcombatk // 2002 wcombatj // 2002 wcombatu // 2002 @@ -4176,9 +4186,10 @@ marukin // 17/10/1990 (c) 1990 Yuga (Japan) qtono1 // 25/12/1990 (QUIZ 3) (c) 1991 Capcom (Japan) // 4/1991 Ashita Tenki ni Naare (golf) qsangoku // 07/06/1991 (QUIZ 4) (c) 1991 Capcom (Japan) -block // 10/09/1991 (c) 1991 Capcom (World) +block // 19/12/1991 (c) 1991 Capcom (World) (Joystick version) +blockr1 // 06/11/1991 (c) 1991 Capcom (World) (Joystick version) +blockr2 // 10/09/1991 (c) 1991 Capcom (World) blockj // 10/09/1991 (c) 1991 Capcom (Japan) -blockjoy // 06/11/1991 (c) 1991 Capcom (World) (Joystick version, bad dump?) blockbl // bootleg // Incredible Technologies games @@ -5143,15 +5154,27 @@ shienryu // 1997.02 Shienryu (Warashi) vmahjong // 1997.02 Virtual Mahjong (Micronet) pclub2kc // 1997.02 Print Club Kome Kome Club pclub2fc // 1997.04 Print Club 2 Felix The Cat +pclub2pe // +pclub2wb // +pclub2pf // +pclub26w // +pclub27s // +pclubyo2 // groovef // 1997.05 Groove on Fight (Atlus) nclubv3 // 1997.07 Name Club Ver. 3 +nclubv2 // +nameclub // pclb2elk // 1997.07 Print Club Custom pclub2 // 1997.09 Print Club 2 thunt // 1997.09 Puzzle & Action Treasure Hunt (Sega (Deniam License)) thuntk winterht // 1997.10 Winter Heat (Data East) -pclb297w // 1997.10 Print Club 2 '97 Winter Ver -pclub298 // 1997.10 Print Club 2 '98 Spring Ver +prc297wi // 1997.10 Print Club 2 '97 Winter Ver +prc297wia // +prc298sp // 1997.10 Print Club 2 '98 Spring Ver +prc298su // +pclove // +pclove2 // cotton2 // 1997.11 Cotton 2 (Success) hanagumi // 1997.11 Sakura Taisen Hanagumi Taisen Columns findlove // 1997.12 Find Love (Daiki / FCF) @@ -5168,7 +5191,7 @@ astrass // 1998.06 Astra Super Stars (Sunsoft) myfairld // 1998.07 My Fair Lady (Micronet) othellos // 1998.07 Othello Shiyouyo (Success) pclubol // 1998.07 Print Club Olive -pclb298a // 1998.08 Print Club 2 '98 Autumn Ver +prc298au // 1998.08 Print Club 2 '98 Autumn Ver cottonbm // 1998.09 Cotton Boomerang (Success) stress // 1998.10 Stress Busters elandore // 1998.11 Touryuu Densetsu Elandore (Sai-Mate) @@ -5662,7 +5685,7 @@ shootpl // 2003.?? Shootout Pool The Medal / Shootout Pool Prize (Rev A) cfield // 2004.06 Chaos Field tetkiwam // 2004.06 Tetris Kiwamemichi (Arcade TV Game List - P.88, Right, 11 from bottom) trizeal // 2004.09 Trizeal - // 2004.?? Dragon Treasure 2 +dragntr2 // 2004.?? Dragon Treasure 2 (Rev A) kick4csh // 2004.?? Kick '4' Cash shootplm // 2004.?? Shootout Pool The Medal Ver. B / Shootout Pool Prize Ver. B // 2004.?? The Quiz Show @@ -5903,8 +5926,8 @@ mj2c // 2004.12 Sega Network Taisen Mahjong MJ 2 (Rev C) // 2004.12 Sega Network Taisen Mahjong MJ 2 (Rev D) ghostsqu // 2004.12.09 Ghost Squad (Rev A) // 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev E) -mj2 // 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev F) -mj2g // 2005.02.02 Sega Network Taisen Mahjong MJ 2 (Rev G) +mj2f // 2005.02 Sega Network Taisen Mahjong MJ 2 (Rev F) +mj2 // 2005.02.02 Sega Network Taisen Mahjong MJ 2 (Rev G) // 2005.03 Sangokushi Taisen gundamos // 2005.03 Gundam Battle Operating Simulator // 2005.04 Quest of D Ver.1.20 @@ -6355,6 +6378,7 @@ charlien // MBR (c) 1994 Mitchell // MBV ?? // MBW ?? wcvol95 // MBX (c) 1993 Data East +wcvol95x // ? // MBY ?? backfire // MBZ (c) 1995 backfirea // MBZ (c) 1995 @@ -7204,6 +7228,7 @@ asteroid // 035127-035145 (c) 1979 asteroid2 // 035127-035145 (c) 1979 asteroid1 // 035127-035145 no copyright notice asteroidb // (bootleg) +spcrocks // J.Estevez (c) 1981 aerolitos // Rodmar Elec. bootleg asterock // Sidam bootleg (c) 1979 asterockv // Videotron bootleg(c) 1979 @@ -7681,6 +7706,7 @@ tnk3j // A5001 (c) 1985 athena // 'UP' (c) 1986 fitegolf // 'GU' (c) 1988 fitegolfu // 'GU' (c) 1988 +fitegolf2 // countryc // A7004 'CC' (c) 1988 ikari // A5004 'IW' (c) 1986 ikaria // A5004 'IW' (c) 1986 @@ -8411,6 +8437,7 @@ mk2chal // hack jdreddp // (c) 1993 Midway nbajam // (c) 1993 Midway nbajamr2 // (c) 1993 Midway +nbajamr1 // (c) 1993 Midway nbajamte // (c) 1994 Midway nbajamte1 // (c) 1994 Midway nbajamte2 // (c) 1994 Midway @@ -8795,6 +8822,7 @@ rdft2a // (c) 1997 Seibu Kaihatsu (Metrotainment license) rdft2aa // (c) 1997 Seibu Kaihatsu (Dream Island license) rdft2j // (c) 1997 Seibu Kaihatsu rdft2ja // (c) 1997 Seibu Kaihatsu +rdft2it // (c) 1997 Seibu Kaihatsu rdft2t // (c) 1997 Seibu Kaihatsu rdft2u // (c) 1997 Seibu Kaihatsu (Fabtek license) rdft2us // (c) 1997 Seibu Kaihatsu (Fabtek license) @@ -8943,6 +8971,7 @@ edfu // (c) 1991 (North America) edfbl // (c) 1991 64street // (c) 1991 64streetj // (c) 1991 (Japan) +64streetja // (c) 1991 (Japan) soldam // (c) 1992 soldamj // (c) 1992 (Japan) bigstrik // (c) 1992 @@ -9161,7 +9190,8 @@ thoop // (c) 1992 - Ref 922804/1 squash // (c) 1992 - Ref 922804/2 wrally // (c) 1993 - Ref 930705 wrallya // (c) 1993 - Ref 930705 -wrallyb // (c) 1993 - Ref 930217 +wrallyb // (c) 1993 - Ref 930217 +wrallyat // (c) 1993 - Ref 930217 glass // (c) 1993 - Ref 931021 glass10 // (c) 1993 - Ref 931021 glass10a // (c) 1993 - Ref 931021 shows "Break Edition" on a real PCB @@ -9270,6 +9300,8 @@ oedfight // (c) 1994 Kaneko bonkadv // (c) 1994 Kaneko gtmr // (c) 1994 Kaneko gtmra // (c) 1994 Kaneko +gtmrb // (c) 1994 Kaneko +gtmro // (c) 1994 Kaneko gtmre // (c) 1994 Kaneko gtmrusa // (c) 1994 Kaneko (US) gtmr2 // (c) 1995 Kaneko @@ -9851,8 +9883,9 @@ spec2kh // (c) 2000 Yonatech // ESD games // http://www.esdgame.co.kr/english/ -multchmp // (c) 1998 (World) +multchmp // (c) 1999 (World) multchmpk // (c) 1998 (Korea) +multchmpa // (c) 1998 (World) mchampdx // (c) 1999 ESD mchampdxa // (c) 1999 ESD mchampdxb // (c) 1999 ESD @@ -10047,8 +10080,12 @@ haekaka // (c) 2001 Sammy goldstar // (c) 198? IGS goldstbl // (c) 198? IGS moonlght // bootleg +moonlghta // bootleg +moonlghtb // bootleg +moonlghtc // bootleg chry10 // bootleg chrygld // bootleg +chryglda // bootleg goldfrui // bootleg wcherry // bootleg super9 // (c) 2001 Playmark @@ -10527,6 +10564,7 @@ fastdraw_130 // (c) 1995 aplatoon // (c) 199? Nova? zortonbr // (c) 1993 Web Picmatic +crospuzl // // Crystal System crysbios crysking // 2001 Brezzasoft. Crystal of the kings @@ -10729,6 +10767,7 @@ coolpool // (c) 1992 Catalina Games 9ballsht3 // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games" 9ballshtc // (c) 1993 E-Scape EnterMedia + "marketed by Bundra Games" megaphx // (c) 1991 Dinamic / Inder +flagrall // ? gumbo // (c) 1994 Min Corp. mspuzzleg // (c) 1994 Min Corp. mspuzzle // (c) 1994 Min Corp. @@ -10858,6 +10897,7 @@ strvmstr // (c) 1986 Enerdyne Technologies Inc dorachan // (c) 1980 Craul Denshi ladyfrog // (c) 1990 Mondial Games toucheme +touchemea rabbit // (c) 1997 Electronic Arts tmmjprd // (c) 1997 Media / Sonnet tmpdoki // (c) 1998 Media Syouji @@ -10899,7 +10939,7 @@ stuntair // (c) 1983 Nuova Videotron // Success tonton // (c) 199? Success / Taiyo Jidoki. -kurukuru // (c) 199? Success / Taiyo Jidoki. +kurukuru // (c) 1990 Success / Taiyo Jidoki. ppj // (c) 199? Success / Taiyo Jidoki. othello // (c) 1984 Success. sothello // (c) 1986 Success / Fujiwara. @@ -10957,7 +10997,8 @@ phrcrazea // (c) 1986 Merit phrcrazeb // (c) 1986 Merit phrcrazec // (c) 1986 Merit phrcrazev // (c) 1986 Merit -bigappg // (c) 1986 Merit +bigappg // (c) 1986 Merit / Big Apple Games +misdraw // (c) 1986 Merit / Big Apple Games riviera // (c) 1987 Merit rivieraa // (c) 1986 Merit rivierab // (c) 1986 Merit @@ -11953,6 +11994,7 @@ pexmp030 // (c) 1997 IGT - International Game Technology pexmp030a // (c) 1997 IGT - International Game Technology // IGT Game King +ms72c gkigt4 gkigt4ms gkigt43 @@ -12248,6 +12290,8 @@ cmasterbv // (c) 1991 Dyna Electronics / Gerald Duhamel? cmasterd // (c) 1991 Dyna Electronics cmastere // (c) 1991 Dyna Electronics cmasterf // (c) 1991 Dyna Electronics +cmasterg // (c) 1991 Dyna Electronics +cmasterh // (c) 1991 Dyna Electronics cmast91 // (c) 1991 Dyna Electronics cmast92 // (c) 1992 Dyna Electronics cmast97 // (c) 1996 Dyna Electronics @@ -12388,10 +12432,12 @@ excitbj // (c) 1992 Wing Co. Ltd carb2002 // bootleg carb2003 // bootleg nfm // bootleg +scmaster // 1994, unknown unkch1 // bootleg unkch2 // bootleg unkch3 // bootleg unkch4 // bootleg +cherry96 // bootleg ns8lines // unknown ns8linew // unknown ladylinr // (c) 198? TAB Austria @@ -12411,6 +12457,7 @@ schery97a // (c) 1998 Amcoe roypok96 // (c) 1996 Amcoe roypok96a // (c) 1996 Amcoe roypok96b // (c) 1996 Amcoe +roypok96c // (c) 1996 Amcoe pokonl97 // (c) 1997 Amcoe nc96 // (c) 1996 Amcoe nc96a // (c) 1996 Amcoe @@ -32680,3 +32727,6 @@ clowndwn // Elwood Clown Roll Down fi6845 fi8275 + +l9nibble // unknown Nibble game. +
\ No newline at end of file diff --git a/src/mame/audio/laserbat.cpp b/src/mame/audio/laserbat.cpp index 5e8ee062b45..963f3aa7f76 100644 --- a/src/mame/audio/laserbat.cpp +++ b/src/mame/audio/laserbat.cpp @@ -230,7 +230,9 @@ WRITE8_MEMBER(laserbat_state::csound2_w) The Cat and Mouse sound board has a 6802 processor with three ROMs, a 6821 PIA, two AY-3-8910 PSGs, and some other logic and analog circuitry. Unfortunately we lack a schematic, so all knowledge of - this board is based on tracing the sound program. + this board is based on tracing the sound program, examining PCB + photos and cross-referencing with the schematic for the 1B11142 + schematic. The 6821 PIA is mapped at addresses $005C..$005F. The known PIA signal assignments are as follows: @@ -282,7 +284,7 @@ WRITE8_MEMBER(laserbat_state::csound2_w) | 6 | SOUND 5 | PIA CA1 | | 7 | | | | 8 | | | - | 9 | | | + | 9 | | 14L A11 | | 10 | | | | 11 | | | | 12 | | | @@ -292,6 +294,10 @@ WRITE8_MEMBER(laserbat_state::csound2_w) | 16 | RESET | Unknown | +-----+----------+-------------+ + Bit 9 is used to select the sprite ROM bank. There's a wire visible + on the component side of the PCB connecting it to the high address + bit (A11) of the sprite ROM at 14L. + There could well be other connections on the sound board - these are just what can be deduced by tracing the sound program. @@ -302,87 +308,18 @@ WRITE8_MEMBER(laserbat_state::csound2_w) WRITE8_MEMBER(catnmous_state::csound1_w) { - m_pia->ca1_w((data & 0x20) ? 1 : 0); + m_audiopcb->sound_w(space, offset, data); + m_csound1 = data; } WRITE8_MEMBER(catnmous_state::csound2_w) { - // the top bit is called RESET on the wiring diagram - assume it resets the sound CPU - m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x80) ? ASSERT_LINE : CLEAR_LINE); - m_csound2 = data; -} - -READ8_MEMBER(catnmous_state::pia_porta_r) -{ - UINT8 const control = m_pia->b_output(); - UINT8 data = 0xff; - - if (0x01 == (control & 0x03)) - data &= m_psg1->data_r(space, 0); - - if (0x04 == (control & 0x0c)) - data &= m_psg2->data_r(space, 0); - - return data; -} - -WRITE8_MEMBER(catnmous_state::pia_porta_w) -{ - UINT8 const control = m_pia->b_output(); - - if (control & 0x02) - m_psg1->data_address_w(space, (control >> 0) & 0x01, data); - - if (control & 0x08) - m_psg2->data_address_w(space, (control >> 2) & 0x01, data); -} - -WRITE8_MEMBER(catnmous_state::pia_portb_w) -{ - if (data & 0x02) - m_psg1->data_address_w(space, (data >> 0) & 0x01, m_pia->a_output()); - - if (data & 0x08) - m_psg2->data_address_w(space, (data >> 2) & 0x01, m_pia->a_output()); -} - -WRITE_LINE_MEMBER(catnmous_state::pia_irqa) -{ - m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); -} - -WRITE_LINE_MEMBER(catnmous_state::pia_irqb) -{ - m_audiocpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE); -} - -WRITE8_MEMBER(catnmous_state::psg1_porta_w) -{ - // similar to zaccaria.c since we have no clue how this board really works - // this code could be completely wrong/inappropriate for this game for all we know - static double const table[8] = { - RES_K(8.2), - RES_R(820), - RES_K(3.3), - RES_R(150), - RES_K(5.6), - RES_R(390), - RES_K(1.5), - RES_R(47) }; - RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07]); - m_psg2->set_volume(1, 150 * RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07])); -} + // the bottom bit is used for sprite banking, of all things + m_gfx2 = memregion("gfx2")->base() + ((data & 0x01) ? 0x0800 : 0x0000); -READ8_MEMBER(catnmous_state::psg1_portb_r) -{ - // the sound program masks out the three most significant bits - // assume they're not connected and read high from the internal pull-ups - return m_csound1 | 0xe0; -} + // the top bit is called RESET on the wiring diagram + m_audiopcb->reset_w((data & 0x80) ? 1 : 0); -INTERRUPT_GEN_MEMBER(catnmous_state::cb1_toggle) -{ - m_cb1 = !m_cb1; - m_pia->cb1_w(m_cb1 ? 1 : 0); + m_csound2 = data; } diff --git a/src/mame/audio/zaccaria.cpp b/src/mame/audio/zaccaria.cpp new file mode 100644 index 00000000000..0df34d1d626 --- /dev/null +++ b/src/mame/audio/zaccaria.cpp @@ -0,0 +1,466 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +#include "emu.h" +#include "audio/zaccaria.h" + +#include "cpu/m6800/m6800.h" +#include "machine/clock.h" +#include "machine/rescap.h" +#include "sound/dac.h" + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +device_type const ZACCARIA_1B11107 = &device_creator<zac1b11107_audio_device>; +device_type const ZACCARIA_1B11142 = &device_creator<zac1b11142_audio_device>; + + + +//************************************************************************** +// MEMORY MAPS +//************************************************************************** + +/* + base melody/SFX generator CPU map + 1B11107 and 1B11142 both have a 6802 with internal RAM and a PIA accessed at 0x500c +*/ +static ADDRESS_MAP_START(zac1b111xx_melody_base_map, AS_PROGRAM, 8, zac1b111xx_melody_base) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM + AM_RANGE(0x400c, 0x400f) AM_MIRROR(0x1ff0) AM_DEVREADWRITE("melodypia", pia6821_device, read, write) +ADDRESS_MAP_END + + +/* + 1B11107 sound CPU, produces music and sound effects + mapping (from tracing sound program and cross-referencing 1B1142 schematic): + A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00 + 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram + 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap RAM) + 0 0 1 x x x x x x x x x x x x x Open bus + 0 1 0 x x x x x x x x x 0 0 x x Open bus + 0 1 0 x x x x x x x x x 0 1 x x Open bus + 0 1 0 x x x x x x x x x 1 0 x x Open bus + 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 1G + 0 1 1 x x x x x x x x x x x x x Open bus + 1 0 x x x x x x x x x x x x x x Open bus + 1 1 0 0 * * * * * * * * * * * * R Enable ROM @ 1F + 1 1 0 1 * * * * * * * * * * * * Open bus + 1 1 1 0 * * * * * * * * * * * * R Enable ROM @ 1D + 1 1 1 1 * * * * * * * * * * * * R Enable ROM @ 1E + + 6821 PIA: + * CA1 comes from the SOUND 5 line on the input (which may also be connected to an input on the AY chip at 1H) + * CB1 comes from the 6802's clock divided by 4096*2 (about 437Hz) + * PA0-7 connect to the data busses of the AY-3-8910 chips + * PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 1H + * PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 1I +*/ +static ADDRESS_MAP_START(zac1b11107_melody_map, AS_PROGRAM, 8, zac1b11107_audio_device) + AM_IMPORT_FROM(zac1b111xx_melody_base_map) + AM_RANGE(0xc000, 0xcfff) AM_ROM // ROM @ 1F + AM_RANGE(0xe000, 0xffff) AM_ROM // ROM @ 1D, 1E +ADDRESS_MAP_END + + +/* + 1B11142 slave sound CPU, produces music and sound effects + mapping: + A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00 + 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram + 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap RAM) + 0 0 1 x x x x x x x x x x x x x Open bus + 0 1 0 x x x x x x x x x 0 0 x x Open bus + 0 1 0 x x x x x x x x x 0 1 x x Open bus + 0 1 0 x x x x x x x x x 1 0 x x Open bus + 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I + 0 1 1 x x x x x x x x x x x x x Open bus + 1 0 % % * * * * * * * * * * * * R /CS4A: Enable ROM 13 + 1 1 % % * * * * * * * * * * * * R /CS5A: Enable ROM 9 + note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms + monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care + hence for actual chips used, the mem map is: + 1 0 x * * * * * * * * * * * * * R /CS4A: Enable ROM 13 + 1 1 x * * * * * * * * * * * * * R /CS5A: Enable ROM 9 + + 6821 PIA: + * CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1) + * CB1 comes from the 6802's clock divided by 4096*2 (about 437Hz) + * CA2 and CB2 are not connected + * PA0-7 connect to the data busses of the AY-3-8910 chips + * PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G + * PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H +*/ +static ADDRESS_MAP_START(zac1b11142_melody_map, AS_PROGRAM, 8, zac1b11142_audio_device) + AM_IMPORT_FROM(zac1b111xx_melody_base_map) + AM_RANGE(0x8000, 0x9fff) AM_MIRROR(0x2000) AM_ROM // ROM 13 + AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM // ROM 9 +ADDRESS_MAP_END + + +/* + 1B11142 master sound CPU, controls DAC and speech directly + mapping: + A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00 + 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram + x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here) + x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I + x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC + x x 0 1 0 1 x x x x x x x x x x W Command to slave melody cpu + x x 0 1 1 0 x x x x x x x x x x R Command read latch from z80 + x x 0 1 1 1 x x x x x x x x x x Open bus + % % 1 0 * * * * * * * * * * * * R /CS1A: Enable ROM 8 + % % 1 1 * * * * * * * * * * * * R /CS0A: Enable ROM 7 + note that the % bits go to pins 2 (6802 A14) and 26 (6802 A15) of the roms + monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care + hence for actual chips used, the mem map is: + x * 1 0 * * * * * * * * * * * * R /CS1A: Enable ROM 8 + x * 1 1 * * * * * * * * * * * * R /CS0A: Enable ROM 7 + + 6821 PIA: + PA0-7, PB0-1, CA2 and CB1 connect to the TMS5200 + CA1 and CB2 are not connected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4) + PB3 connects to 'ACS' which goes to the Z80 +*/ +static ADDRESS_MAP_START(zac1b11142_audio_map, AS_PROGRAM, 8, zac1b11142_audio_device) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x007f) AM_RAM // 6802 internal RAM + AM_RANGE(0x0090, 0x0093) AM_MIRROR(0x8f6c) AM_DEVREADWRITE("pia_1i", pia6821_device, read, write) + AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x83ff) AM_DEVWRITE("dac_1f", dac_device, write_unsigned8) // MC1408 + AM_RANGE(0x1400, 0x1400) AM_MIRROR(0xc3ff) AM_WRITE(melody_command_w) + AM_RANGE(0x1800, 0x1800) AM_MIRROR(0xc3ff) AM_READ(host_command_r) + AM_RANGE(0x2000, 0x2fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 low + AM_RANGE(0x3000, 0x3fff) AM_MIRROR(0x8000) AM_ROM // ROM 7 with A12 low + AM_RANGE(0x6000, 0x6fff) AM_MIRROR(0x8000) AM_ROM // ROM 8 with A12 high + AM_RANGE(0x7000, 0x7fff) AM_MIRROR(0x8000) AM_ROM // ROM 7 with A12 high +ADDRESS_MAP_END + + + +//************************************************************************** +// MACHINE FRAGMENTS +//************************************************************************** + +MACHINE_CONFIG_FRAGMENT(zac1b111xx_base_config) + MCFG_CPU_ADD("melodycpu", M6802, XTAL_3_579545MHz) // verified on pcb + MCFG_CPU_PROGRAM_MAP(zac1b111xx_melody_base_map) + + MCFG_DEVICE_ADD("timebase", CLOCK, XTAL_3_579545MHz/4096/2) // CPU clock divided using 4040 and half of 74LS74 + MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("melodypia", pia6821_device, cb1_w)) + + MCFG_DEVICE_ADD("melodypia", PIA6821, 0) + MCFG_PIA_READPA_HANDLER(READ8(zac1b111xx_melody_base, melodypia_porta_r)) + MCFG_PIA_WRITEPA_HANDLER(WRITE8(zac1b111xx_melody_base, melodypia_porta_w)) + MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b111xx_melody_base, melodypia_portb_w)) + MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("melodycpu", m6802_cpu_device, nmi_line)) + MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("melodycpu", m6802_cpu_device, irq_line)) + + MCFG_SOUND_ADD("melodypsg1", AY8910, XTAL_3_579545MHz/2) // CPU clock divided using 4040 + MCFG_AY8910_PORT_B_READ_CB(READ8(zac1b111xx_melody_base, melodypsg1_portb_r)) + + MCFG_SOUND_ADD("melodypsg2", AY8910, XTAL_3_579545MHz/2) // CPU clock divided using 4040 +MACHINE_CONFIG_END + + +MACHINE_CONFIG_DERIVED(zac1b11107_config, zac1b111xx_base_config) + MCFG_CPU_MODIFY("melodycpu") + MCFG_CPU_PROGRAM_MAP(zac1b11107_melody_map) + + MCFG_DEVICE_MODIFY("melodypsg1") + MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11107_audio_device, melodypsg1_porta_w)) + MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5, 0) + + MCFG_DEVICE_MODIFY("melodypsg2") + MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11107_audio_device, melodypsg2_porta_w)) + MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5, 0) +MACHINE_CONFIG_END + + +MACHINE_CONFIG_DERIVED(zac1b11142_config, zac1b111xx_base_config) + MCFG_CPU_MODIFY("melodycpu") + MCFG_CPU_PROGRAM_MAP(zac1b11142_melody_map) + + MCFG_DEVICE_MODIFY("melodypsg1") + MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4g_porta_w)) + MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15, 0) + + MCFG_DEVICE_MODIFY("melodypsg2") + MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4h_porta_w)) + MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(zac1b11142_audio_device, ay_4h_portb_w)) + MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.15, 0) + + MCFG_CPU_ADD("audiocpu", M6802, XTAL_3_579545MHz) // verified on pcb + MCFG_CPU_PROGRAM_MAP(zac1b11142_audio_map) + MCFG_CPU_PERIODIC_INT_DRIVER(zac1b11142_audio_device, input_poll, 60) + + MCFG_DEVICE_ADD("pia_1i", PIA6821, 0) + MCFG_PIA_READPA_HANDLER(DEVREAD8("speech", tms5220_device, status_r)) + MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("speech", tms5220_device, data_w)) + MCFG_PIA_WRITEPB_HANDLER(WRITE8(zac1b11142_audio_device, pia_1i_portb_w)) + + MCFG_DAC_ADD("dac_1f") + MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80, 0) + + // There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF) + // 162kHz measured on pin 3 20 minutes after power on, clock would then be 162.3*4=649.2kHz + MCFG_SOUND_ADD("speech", TMS5200, 649200) // ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that) + MCFG_TMS52XX_IRQ_HANDLER(DEVWRITELINE("pia_1i", pia6821_device, cb1_w)) + MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE("pia_1i", pia6821_device, ca2_w)) + MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.80, 0) +MACHINE_CONFIG_END + + + +//************************************************************************** +// I/O PORT DEFINITIONS +//************************************************************************** + +INPUT_PORTS_START(zac1b11142_ioports) + PORT_START("1B11142") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("P1") // test button? generates NMI on master CPU +INPUT_PORTS_END + + + +//************************************************************************** +// BASE MELODY GENERATOR DEVICE CLASS +//************************************************************************** + +zac1b111xx_melody_base::zac1b111xx_melody_base( + machine_config const &mconfig, + device_type devtype, + char const *name, + char const *tag, + device_t *owner, + UINT32 clock, + char const *shortname, + char const *source) + : device_t(mconfig, devtype, name, tag, owner, clock, shortname, source) + , device_mixer_interface(mconfig, *this, 1) + , m_melodycpu(*this, "melodycpu") + , m_melodypia(*this, "melodypia") + , m_melodypsg1(*this, "melodypsg1") + , m_melodypsg2(*this, "melodypsg2") + , m_melody_command(0) +{ +} + +READ8_MEMBER(zac1b111xx_melody_base::melodypia_porta_r) +{ + UINT8 const control = m_melodypia->b_output(); + UINT8 data = 0xff; + + if (0x01 == (control & 0x03)) + data &= m_melodypsg1->data_r(space, 0); + + if (0x04 == (control & 0x0c)) + data &= m_melodypsg2->data_r(space, 0); + + return data; +} + +WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_porta_w) +{ + UINT8 const control = m_melodypia->b_output(); + + if (control & 0x02) + m_melodypsg1->data_address_w(space, (control >> 0) & 0x01, data); + + if (control & 0x08) + m_melodypsg2->data_address_w(space, (control >> 2) & 0x01, data); +} + +WRITE8_MEMBER(zac1b111xx_melody_base::melodypia_portb_w) +{ + if (data & 0x02) + m_melodypsg1->data_address_w(space, (data >> 0) & 0x01, m_melodypia->a_output()); + + if (data & 0x08) + m_melodypsg2->data_address_w(space, (data >> 2) & 0x01, m_melodypia->a_output()); +} + +READ8_MEMBER(zac1b111xx_melody_base::melodypsg1_portb_r) +{ + return m_melody_command; +} + +void zac1b111xx_melody_base::device_start() +{ + save_item(NAME(m_melody_command)); +} + +void zac1b111xx_melody_base::device_reset() +{ + m_melody_command = 0; +} + + + +//************************************************************************** +// 1B11107-SPECIFIC IMPLEMENTATION +//************************************************************************** + +zac1b11107_audio_device::zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock) + : zac1b111xx_melody_base(mconfig, ZACCARIA_1B11107, "Zaccaria 1B11107 Sound Board", tag, owner, clock, "zac1b11107", __FILE__) +{ +} + +WRITE8_MEMBER(zac1b11107_audio_device::sound_w) +{ + // the sound program masks out the three most significant bits + // assume the top two bits are not connected and read high from the internal pull-ups + m_melodypia->ca1_w((data >> 5) & 0x01); + m_melody_command = data | 0xc0; +} + +WRITE_LINE_MEMBER(zac1b11107_audio_device::reset_w) +{ + // TODO: there is a pulse-stretching network attached that should be simulated + m_melodycpu->set_input_line(INPUT_LINE_RESET, state); + // TODO: holds the reset line of m_melodypia - can't implement this in MAME at this time + // TODO: holds the reset line of m_melodypsg1 - can't implement this in MAME at this time + // TODO: holds the reset line of m_melodypsg2 - can't implement this in MAME at this time +} + +WRITE8_MEMBER(zac1b11107_audio_device::melodypsg1_porta_w) +{ + // similar to 1B11142 + // TODO: move this to netlist audio where it belongs, along with the rest of the filtering + static double const table[8] = { + RES_K(8.2), + RES_R(820), + RES_K(3.3), + RES_R(150), + RES_K(5.6), + RES_R(390), + RES_K(1.5), + RES_R(47) }; + m_melodypsg2->set_volume(1, 150 * RES_VOLTAGE_DIVIDER(RES_K(4.7), table[data & 0x07])); +} + +WRITE8_MEMBER(zac1b11107_audio_device::melodypsg2_porta_w) +{ + // TODO: assume LEVELT is controlled here as is the case for 1B11142? +} + +machine_config_constructor zac1b11107_audio_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME(zac1b11107_config); +} + + + +//************************************************************************** +// 1B11142-SPECIFIC IMPLEMENTATION +//************************************************************************** + +zac1b11142_audio_device::zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock) + : zac1b111xx_melody_base(mconfig, ZACCARIA_1B11142, "Zaccaria 1B11142 Sound Board", tag, owner, clock, "zac1b11142", __FILE__) + , m_acs_cb(*this) + , m_audiocpu(*this, "audiocpu") + , m_pia_1i(*this, "pia_1i") + , m_speech(*this, "speech") + , m_inputs(*this, "1B11142") + , m_host_command(0) +{ +} + +WRITE8_MEMBER(zac1b11142_audio_device::hs_w) +{ + m_host_command = data; + m_audiocpu->set_input_line(INPUT_LINE_IRQ0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); +} + +READ_LINE_MEMBER(zac1b11142_audio_device::acs_r) +{ + return (~m_pia_1i->b_output() >> 3) & 0x01; +} + +WRITE_LINE_MEMBER(zac1b11142_audio_device::ressound_w) +{ + // TODO: there is a pulse-stretching network attached that should be simulated + m_melodycpu->set_input_line(INPUT_LINE_RESET, state); + // TODO: holds the reset line of m_melodypia - can't implement this in MAME at this time + // TODO: holds the reset line of m_melodypsg1 - can't implement this in MAME at this time + // TODO: holds the reset line of m_melodypsg2 - can't implement this in MAME at this time + m_audiocpu->set_input_line(INPUT_LINE_RESET, state); + // TODO: holds the reset line of m_pia_1i - can't implement this in MAME at this time + // TODO: does some funky stuff with the VDD and VSS lines on the speech chip +} + +WRITE8_MEMBER(zac1b11142_audio_device::ay_4g_porta_w) +{ + // TODO: (data & 0x07) controls tromba mix volume + // TODO: (data & 0x08) controls cassa gate + // TODO: (data & 0x10) controls rullante gate +} + +WRITE8_MEMBER(zac1b11142_audio_device::ay_4h_porta_w) +{ + // TODO: data & 0x01 controls LEVEL + // TODO: data & 0x02 controls LEVELT +} + +WRITE8_MEMBER(zac1b11142_audio_device::ay_4h_portb_w) +{ + // TODO: data & 0x01 controls ANAL3 filter +} + +READ8_MEMBER(zac1b11142_audio_device::host_command_r) +{ + return m_host_command; +} + +WRITE8_MEMBER(zac1b11142_audio_device::melody_command_w) +{ + m_melodypia->ca1_w((data >> 7) & 0x01); + m_melody_command = data; +} + +WRITE8_MEMBER(zac1b11142_audio_device::pia_1i_portb_w) +{ + m_speech->rsq_w((data >> 0) & 0x01); + m_speech->wsq_w((data >> 1) & 0x01); + m_acs_cb((~data >> 3) & 0x01); + // TODO: a LED output().set_led_value(0, (data >> 4) & 0x01); +} + +INTERRUPT_GEN_MEMBER(zac1b11142_audio_device::input_poll) +{ + m_audiocpu->set_input_line(INPUT_LINE_NMI, (m_inputs->read() & 0x80) ? CLEAR_LINE : ASSERT_LINE); +} + +machine_config_constructor zac1b11142_audio_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME(zac1b11142_config); +} + +ioport_constructor zac1b11142_audio_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(zac1b11142_ioports); +} + +void zac1b11142_audio_device::device_start() +{ + zac1b111xx_melody_base::device_start(); + + m_acs_cb.resolve_safe(); + + save_item(NAME(m_host_command)); +} + +void zac1b11142_audio_device::device_reset() +{ + zac1b111xx_melody_base::device_reset(); + + m_host_command = 0; +} diff --git a/src/mame/audio/zaccaria.h b/src/mame/audio/zaccaria.h new file mode 100644 index 00000000000..1414b9d2959 --- /dev/null +++ b/src/mame/audio/zaccaria.h @@ -0,0 +1,135 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +#pragma once + +#ifndef __AUDIO_ZACCARIA_H__ +#define __AUDIO_ZACCARIA_H__ + +#include "emu.h" +#include "machine/6821pia.h" +#include "machine/netlist.h" +#include "sound/ay8910.h" +#include "sound/tms5220.h" + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +extern device_type const ZACCARIA_1B11107; +extern device_type const ZACCARIA_1B11142; + + + +//************************************************************************** +// DEVICE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_ZACCARIA_1B11107(_tag) \ + MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11107, 0) + +#define MCFG_ZACCARIA_1B11142(_tag) \ + MCFG_DEVICE_ADD(_tag, ZACCARIA_1B11142, 0) + +#define MCFG_ZACCARIA_1B11142_SET_ACS_CALLBACK(_devcb) \ + devcb = &zac1b11142_audio_device::static_set_acs_cb(*device, DEVCB_##_devcb); + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class zac1b111xx_melody_base : public device_t, public device_mixer_interface +{ +public: + zac1b111xx_melody_base( + machine_config const &mconfig, + device_type devtype, + char const *name, + char const *tag, + device_t *owner, + UINT32 clock, + char const *shortname, + char const *source); + + DECLARE_READ8_MEMBER(melodypia_porta_r); + DECLARE_WRITE8_MEMBER(melodypia_porta_w); + DECLARE_WRITE8_MEMBER(melodypia_portb_w); + DECLARE_READ8_MEMBER(melodypsg1_portb_r); + +protected: + virtual void device_start() override; + virtual void device_reset() override; + + required_device<cpu_device> m_melodycpu; + required_device<pia6821_device> m_melodypia; + required_device<ay8910_device> m_melodypsg1; + required_device<ay8910_device> m_melodypsg2; + + UINT8 m_melody_command; +}; + + +class zac1b11107_audio_device : public zac1b111xx_melody_base +{ +public: + zac1b11107_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock); + + // host interface + DECLARE_WRITE8_MEMBER(sound_w); + DECLARE_WRITE_LINE_MEMBER(reset_w); + + // PSG output handlers + DECLARE_WRITE8_MEMBER(melodypsg1_porta_w); + DECLARE_WRITE8_MEMBER(melodypsg2_porta_w); + +protected: + virtual machine_config_constructor device_mconfig_additions() const override; +}; + + +class zac1b11142_audio_device : public zac1b111xx_melody_base +{ +public: + template<class _Object> static devcb_base &static_set_acs_cb(device_t &device, _Object object) + { return downcast<zac1b11142_audio_device &>(device).m_acs_cb.set_callback(object); } + + zac1b11142_audio_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock); + + // host interface + DECLARE_WRITE8_MEMBER(hs_w); + DECLARE_READ_LINE_MEMBER(acs_r); + DECLARE_WRITE_LINE_MEMBER(ressound_w); + + // melody section handlers + DECLARE_WRITE8_MEMBER(ay_4g_porta_w); + DECLARE_WRITE8_MEMBER(ay_4h_porta_w); + DECLARE_WRITE8_MEMBER(ay_4h_portb_w); + + // master audio section handlers + DECLARE_READ8_MEMBER(host_command_r); + DECLARE_WRITE8_MEMBER(melody_command_w); + DECLARE_WRITE8_MEMBER(pia_1i_portb_w); + + // input ports don't push + INTERRUPT_GEN_MEMBER(input_poll); + +protected: + virtual machine_config_constructor device_mconfig_additions() const override; + virtual ioport_constructor device_input_ports() const override; + virtual void device_start() override; + virtual void device_reset() override; + + devcb_write_line m_acs_cb; + + required_device<cpu_device> m_audiocpu; + required_device<pia6821_device> m_pia_1i; + required_device<tms5220_device> m_speech; + + required_ioport m_inputs; + + UINT8 m_host_command; +}; + +#endif // __AUDIO_ZACCARIA_H__
\ No newline at end of file diff --git a/src/mame/drivers/1943.cpp b/src/mame/drivers/1943.cpp index c91260a9b63..4b64f9dae53 100644 --- a/src/mame/drivers/1943.cpp +++ b/src/mame/drivers/1943.cpp @@ -694,7 +694,6 @@ ROM_START( 1943kai ) ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */ ROM_END - ROM_START( 1943b ) ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for the banked ROMs images */ ROM_LOAD( "1.12d", 0x00000, 0x08000, CRC(9a2d70ab) SHA1(6f84e906656f132ffcb63022f6d067580d261431) ) // protection patched out, disclaimer patched out @@ -746,6 +745,64 @@ ROM_START( 1943b ) ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */ ROM_END +ROM_START( 1943bj ) + ROM_REGION( 0x30000, "maincpu", 0 ) /* 64k for code + 128k for the banked ROMs images */ + ROM_LOAD( "mkb03.12d", 0x00000, 0x08000, CRC(b3b7c7cd) SHA1(6197023f4384fd2ac72b686c26a6ff2877345b61) ) // protection patched out + ROM_LOAD( "bm02.13d", 0x10000, 0x10000, CRC(af971575) SHA1(af1d8ce73e8671b7b41248ce6486c9b5aaf6a233) ) + ROM_LOAD( "bm03.14d", 0x20000, 0x10000, CRC(300ec713) SHA1(f66d2356b413a418c887b4085a5315475c7a8bba) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "bm04.5h", 0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) ) + + ROM_REGION( 0x8000, "gfx1", 0 ) + ROM_LOAD( "bm05.4k", 0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) ) /* characters */ + + ROM_REGION( 0x40000, "gfx2", 0 ) + /* double size roms - same gfx different layout */ + ROM_LOAD( "mkb12.12f", 0x00000, 0x8000, CRC(075e9a7f) SHA1(2b826d6d202d37cff1aeb58f225e70be7ba9a206) ) /* bg tiles */ + ROM_CONTINUE( 0x10000, 0x08000 ) + ROM_LOAD( "mkb11.14f", 0x08000, 0x8000, CRC(05aca09a) SHA1(21cc251e61343be27e969885b013fa6e8b5aa210) ) + ROM_CONTINUE( 0x18000, 0x08000 ) + ROM_LOAD( "mkb09.12j", 0x20000, 0x8000, CRC(0f4b7e0e) SHA1(1dd2a4a78ab45bb122895e5a0961e527f77713d1) ) + ROM_CONTINUE( 0x30000, 0x08000 ) + ROM_LOAD( "mkb10.14j", 0x28000, 0x8000, CRC(61a90c0a) SHA1(8aae483e51d645d9e4d2604dbca432c13a3e8d0d) ) + ROM_CONTINUE( 0x38000, 0x08000 ) + + ROM_REGION( 0x10000, "gfx3", 0 ) + ROM_LOAD( "mkb08.14k", 0x00000, 0x8000, CRC(798215e3) SHA1(1c732b60cd430aa0acd1698b4fe1984385223b28) ) /* fg tiles */ + ROM_LOAD( "bm25.14l", 0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) ) + + ROM_REGION( 0x40000, "gfx4", 0 ) + ROM_LOAD( "bm06.10a", 0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) ) /* sprites */ + ROM_LOAD( "bm07.11a", 0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) ) + ROM_LOAD( "bm08.12a", 0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) ) + ROM_LOAD( "bm09.14a", 0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) ) + ROM_LOAD( "bm10.10c", 0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) ) + ROM_LOAD( "bm11.11c", 0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) ) + ROM_LOAD( "bm12.12c", 0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) ) + ROM_LOAD( "bm13.14c", 0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) ) + + ROM_REGION( 0x10000, "gfx5", 0 ) /* tilemaps */ + /* front background */ + ROM_LOAD( "bm14.5f", 0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) ) + /* back background probably same gfx different layout */ + ROM_LOAD( "mkb07.8k", 0xc000, 0x4000, CRC(ae1b317f) SHA1(d311c198d77ec932d776427e2ebfffe90e5330c3) ) + ROM_CONTINUE( 0x8000, 0x4000 ) + + ROM_REGION( 0x0c00, "proms", 0 ) + ROM_LOAD( "bm1.12a", 0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) ) /* red component */ + ROM_LOAD( "bm2.13a", 0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) ) /* green component */ + ROM_LOAD( "bm3.14a", 0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) ) /* blue component */ + ROM_LOAD( "bm5.7f", 0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) ) /* char lookup table */ + ROM_LOAD( "bm10.7l", 0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) ) /* foreground lookup table */ + ROM_LOAD( "bm9.6l", 0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) ) /* foreground palette bank */ + ROM_LOAD( "bm12.12m", 0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) ) /* background lookup table */ + ROM_LOAD( "bm11.12l", 0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) ) /* background palette bank */ + ROM_LOAD( "bm8.8c", 0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) ) /* sprite lookup table */ + ROM_LOAD( "bm7.7c", 0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) ) /* sprite palette bank */ + ROM_LOAD( "bm4.12c", 0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) ) /* priority encoder / palette selector (not used) */ + ROM_LOAD( "bm6.4b", 0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) ) /* video timing (not used) */ +ROM_END DRIVER_INIT_MEMBER(_1943_state,1943) { @@ -767,4 +824,5 @@ GAME( 1987, 1943ua, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom" GAME( 1987, 1943j, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943: Midway Kaisen (Japan, Rev B)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, 1943ja, 1943, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943: Midway Kaisen (Japan)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, 1943b, 1943, 1943, 1943, _1943_state, 1943b,ROT270, "bootleg", "1943: Battle of Midway (bootleg, hack of Japan set)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, 1943bj, 1943, 1943, 1943, _1943_state, 1943b,ROT270, "bootleg", "1943: Midway Kaisen (bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, 1943kai, 0, 1943, 1943, _1943_state, 1943, ROT270, "Capcom", "1943 Kai: Midway Kaisen (Japan)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/1945kiii.cpp b/src/mame/drivers/1945kiii.cpp index 55b4b8c6ee3..93b649814e9 100644 --- a/src/mame/drivers/1945kiii.cpp +++ b/src/mame/drivers/1945kiii.cpp @@ -2,6 +2,8 @@ // copyright-holders:David Haywood /* +what is this HW cloned from? I doubt it's an original design + 1945 K-3 driver --------------- @@ -54,8 +56,8 @@ class k3_state : public driver_device public: k3_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_oki1(*this, "oki1"), - m_oki2(*this, "oki2") , + m_oki2(*this, "oki2"), + m_oki1(*this, "oki1") , m_spriteram_1(*this, "spritera1"), m_spriteram_2(*this, "spritera2"), m_bgram(*this, "bgram"), @@ -64,8 +66,8 @@ public: m_palette(*this, "palette") { } /* devices */ + optional_device<okim6295_device> m_oki2; required_device<okim6295_device> m_oki1; - required_device<okim6295_device> m_oki2; /* memory pointers */ required_shared_ptr<UINT16> m_spriteram_1; required_shared_ptr<UINT16> m_spriteram_2; @@ -78,6 +80,7 @@ public: DECLARE_WRITE16_MEMBER(k3_scrollx_w); DECLARE_WRITE16_MEMBER(k3_scrolly_w); DECLARE_WRITE16_MEMBER(k3_soundbanks_w); + DECLARE_WRITE16_MEMBER(flagrall_soundbanks_w); TILE_GET_INFO_MEMBER(get_k3_bg_tile_info); virtual void machine_start() override; virtual void video_start() override; @@ -103,7 +106,7 @@ TILE_GET_INFO_MEMBER(k3_state::get_k3_bg_tile_info) void k3_state::video_start() { - m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k3_state::get_k3_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 64); + m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(k3_state::get_k3_bg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); } void k3_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -151,31 +154,71 @@ WRITE16_MEMBER(k3_state::k3_scrolly_w) WRITE16_MEMBER(k3_state::k3_soundbanks_w) { - m_oki1->set_bank_base((data & 4) ? 0x40000 : 0); - m_oki2->set_bank_base((data & 2) ? 0x40000 : 0); + m_oki2->set_bank_base((data & 4) ? 0x40000 : 0); + m_oki1->set_bank_base((data & 2) ? 0x40000 : 0); } -static ADDRESS_MAP_START( k3_map, AS_PROGRAM, 16, k3_state ) - AM_RANGE(0x0009ce, 0x0009cf) AM_WRITENOP // bug in code? (clean up log) - AM_RANGE(0x0009d2, 0x0009d3) AM_WRITENOP // bug in code? (clean up log) +WRITE16_MEMBER(k3_state::flagrall_soundbanks_w) +{ + + data &= mem_mask; + + // 0x0200 on startup + // 0x0100 on startup + + // 0x80 - ? + // 0x40 - ? + // 0x20 - toggles, might trigger vram -> buffer transfer? + // 0x10 - unknown, always on? + // 0x08 - ? + // 0x06 - oki bank + // 0x01 - ? + + if (data & 0xfcc9) + popmessage("unk control %04x", data & 0xfcc9); + + m_oki1->set_bank_base(0x40000 * ((data & 0x6)>>1) ); + +} + + +static ADDRESS_MAP_START( k3_base_map, AS_PROGRAM, 16, k3_state ) + AM_RANGE(0x0009ce, 0x0009cf) AM_WRITENOP // k3 - bug in code? (clean up log) + AM_RANGE(0x0009d2, 0x0009d3) AM_WRITENOP // l3 - bug in code? (clean up log) AM_RANGE(0x000000, 0x0fffff) AM_ROM // ROM AM_RANGE(0x100000, 0x10ffff) AM_RAM // Main Ram AM_RANGE(0x200000, 0x200fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x240000, 0x240fff) AM_RAM AM_SHARE("spritera1") AM_RANGE(0x280000, 0x280fff) AM_RAM AM_SHARE("spritera2") - AM_RANGE(0x2c0000, 0x2c0fff) AM_RAM_WRITE(k3_bgram_w) AM_SHARE("bgram") + AM_RANGE(0x2c0000, 0x2c07ff) AM_RAM_WRITE(k3_bgram_w) AM_SHARE("bgram") + AM_RANGE(0x2c0800, 0x2c0fff) AM_RAM // or does k3 have a bigger tilemap? (flagrall is definitely 32x32 tiles) AM_RANGE(0x340000, 0x340001) AM_WRITE(k3_scrollx_w) AM_RANGE(0x380000, 0x380001) AM_WRITE(k3_scrolly_w) - AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(k3_soundbanks_w) AM_RANGE(0x400000, 0x400001) AM_READ_PORT("INPUTS") AM_RANGE(0x440000, 0x440001) AM_READ_PORT("SYSTEM") AM_RANGE(0x480000, 0x480001) AM_READ_PORT("DSW") - AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki2", okim6295_device, read, write, 0xff00) - AM_RANGE(0x500000, 0x500001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0xff00) - AM_RANGE(0x8c0000, 0x8cffff) AM_RAM // not used? ADDRESS_MAP_END +static ADDRESS_MAP_START( k3_map, AS_PROGRAM, 16, k3_state ) + AM_IMPORT_FROM( k3_base_map ) + + AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(k3_soundbanks_w) + + AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0xff00) + AM_RANGE(0x500000, 0x500001) AM_DEVREADWRITE8("oki2", okim6295_device, read, write, 0xff00) + AM_RANGE(0x8c0000, 0x8cffff) AM_RAM // not used? (bug in code?) +ADDRESS_MAP_END + + +static ADDRESS_MAP_START( flagrall_map, AS_PROGRAM, 16, k3_state ) + AM_IMPORT_FROM( k3_base_map ) + + AM_RANGE(0x3c0000, 0x3c0001) AM_WRITE(flagrall_soundbanks_w) + AM_RANGE(0x4c0000, 0x4c0001) AM_DEVREADWRITE8("oki1", okim6295_device, read, write, 0x00ff) +ADDRESS_MAP_END + + static INPUT_PORTS_START( k3 ) PORT_START("INPUTS") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) @@ -238,18 +281,81 @@ static INPUT_PORTS_START( k3 ) INPUT_PORTS_END +static INPUT_PORTS_START( flagrall ) + PORT_START("INPUTS") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("SYSTEM") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("DSW") + PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") + PORT_DIPSETTING( 0x0000, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0001, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0003, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( 1C_2C ) ) + PORT_DIPUNUSED_DIPLOC( 0x0004, IP_ACTIVE_LOW, "SW1:3" ) + PORT_DIPUNUSED_DIPLOC( 0x0008, IP_ACTIVE_LOW, "SW1:4" ) + PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:5") + PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0020, 0x0020, "Dip Control" ) PORT_DIPLOCATION("SW1:6") + PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPUNUSED_DIPLOC( 0x0040, IP_ACTIVE_LOW, "SW1:7" ) + PORT_DIPNAME( 0x0080, 0x0080, "Picture Test" ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + + PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPSETTING( 0x0200, "1" ) + PORT_DIPSETTING( 0x0100, "2" ) + PORT_DIPSETTING( 0x0300, "3" ) + PORT_DIPSETTING( 0x0000, "5" ) + PORT_DIPNAME( 0x0400, 0x0400, "Bonus Type" ) PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING ( 0x0400, "0" ) + PORT_DIPSETTING( 0x0000, "1" ) + PORT_DIPUNUSED_DIPLOC( 0x0800, IP_ACTIVE_LOW, "SW2:4" ) + PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6") + PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) ) + PORT_DIPSETTING( 0x1000, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x2000, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x3000, DEF_STR( Normal ) ) + PORT_DIPUNUSED_DIPLOC( 0x4000, IP_ACTIVE_LOW, "SW2:7" ) + PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW2:8") + PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) +INPUT_PORTS_END + + static const gfx_layout k3_layout = { 16,16, RGN_FRAC(1,1), 8, { 0,1,2,3,4,5,6,7 }, - { 0,8,16,24,32,40,48,56, 64, 72, 80, 88, 96, 104, 112, 120 }, - { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, - 8*128, 9*128,10*128,11*128,12*128,13*128,14*128,15*128 }, - 16*128 + { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 }, + { 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 }, + 16*128, }; + static GFXDECODE_START( 1945kiii ) GFXDECODE_ENTRY( "gfx1", 0, k3_layout, 0x0, 2 ) /* bg tiles */ GFXDECODE_ENTRY( "gfx2", 0, k3_layout, 0x0, 2 ) /* bg tiles */ @@ -260,20 +366,19 @@ void k3_state::machine_start() { } -static MACHINE_CONFIG_START( k3, k3_state ) +static MACHINE_CONFIG_START( flagrall, k3_state ) - MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK) - MCFG_CPU_PROGRAM_MAP(k3_map) + MCFG_CPU_ADD("maincpu", M68000, MASTER_CLOCK ) // ? + MCFG_CPU_PROGRAM_MAP(flagrall_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", k3_state, irq4_line_hold) - MCFG_GFXDECODE_ADD("gfxdecode", "palette", 1945kiii) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(64*8, 64*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) + MCFG_SCREEN_SIZE(64*8, 32*8) + MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(k3_state, screen_update_k3) MCFG_SCREEN_PALETTE("palette") @@ -284,9 +389,19 @@ static MACHINE_CONFIG_START( k3, k3_state ) MCFG_OKIM6295_ADD("oki1", MASTER_CLOCK/16, OKIM6295_PIN7_HIGH) /* dividers? */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( k3, flagrall ) + + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(k3_map) MCFG_OKIM6295_ADD("oki2", MASTER_CLOCK/16, OKIM6295_PIN7_HIGH) /* dividers? */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 28*8-1) MACHINE_CONFIG_END @@ -296,10 +411,10 @@ ROM_START( 1945kiii ) ROM_LOAD16_BYTE( "prg-1.u51", 0x00001, 0x80000, CRC(6b345f27) SHA1(60867fa0e2ea7ebdd4b8046315ee0c83e5cf0d74) ) ROM_LOAD16_BYTE( "prg-2.u52", 0x00000, 0x80000, CRC(ce09b98c) SHA1(a06bb712b9cf2249cc535de4055b14a21c68e0c5) ) - ROM_REGION( 0x080000, "oki1", 0 ) /* Samples */ + ROM_REGION( 0x080000, "oki2", 0 ) /* Samples */ ROM_LOAD( "snd-2.su4", 0x00000, 0x80000, CRC(47e3952e) SHA1(d56524621a3f11981e4434e02f5fdb7e89fff0b4) ) - ROM_REGION( 0x080000, "oki2", 0 ) /* Samples */ + ROM_REGION( 0x080000, "oki1", 0 ) /* Samples */ ROM_LOAD( "snd-1.su7", 0x00000, 0x80000, CRC(bbb7f0ff) SHA1(458cf3a0c2d42110bc2427db675226c6b8d30999) ) ROM_REGION( 0x400000, "gfx1", 0 ) // sprites @@ -310,4 +425,32 @@ ROM_START( 1945kiii ) ROM_LOAD( "m16m-3.u61", 0x00000, 0x200000, CRC(32fc80dd) SHA1(bee32493a250e9f21997114bba26b9535b1b636c) ) ROM_END -GAME( 2000, 1945kiii, 0, k3, k3, driver_device, 0, ROT270, "Oriental Soft", "1945k III", MACHINE_SUPPORTS_SAVE ) +ROM_START( flagrall ) + ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */ + ROM_LOAD16_BYTE( "11_u34.bin", 0x00001, 0x40000, CRC(24dd439d) SHA1(88857ad5ed69f29de86702dcc746d35b69b3b93d) ) + ROM_LOAD16_BYTE( "12_u35.bin", 0x00000, 0x40000, CRC(373b71a5) SHA1(be9ab93129e2ffd9bfe296c341dbdf47f1949ac7) ) + + ROM_REGION( 0x100000, "oki1", 0 ) /* Samples */ + // 3x banks + ROM_LOAD( "13_su4.bin", 0x00000, 0x80000, CRC(7b0630b3) SHA1(c615e6630ffd12c122762751c25c249393bf7abd) ) + ROM_LOAD( "14_su6.bin", 0x80000, 0x40000, CRC(593b038f) SHA1(b00dcf321fe541ee52c34b79e69c44f3d7a9cd7c) ) + + ROM_REGION( 0x300000, "gfx1", 0 ) + ROM_LOAD32_BYTE( "1_u5.bin", 0x000000, 0x080000, CRC(9377704b) SHA1(ac516a8ba6d1a70086469504c2a46d47a1f4560b) ) + ROM_LOAD32_BYTE( "5_u6.bin", 0x000001, 0x080000, CRC(1ac0bd0c) SHA1(ab71bb84e61f5c7168601695f332a8d4a30d9948) ) + ROM_LOAD32_BYTE( "2_u7.bin", 0x000002, 0x080000, CRC(5f6db2b3) SHA1(84caa019d3b75be30a14d19ccc2f28e5e94028bd) ) + ROM_LOAD32_BYTE( "6_u8.bin", 0x000003, 0x080000, CRC(79e4643c) SHA1(274f2741f39c63e32f49c6a1a72ded1263bdcdaa) ) + + ROM_LOAD32_BYTE( "3_u58.bin", 0x200000, 0x040000, CRC(c913df7d) SHA1(96e89ecb9e5f4d596d71d7ba35af7b2af4670342) ) + ROM_LOAD32_BYTE( "4_u59.bin", 0x200001, 0x040000, CRC(cb192384) SHA1(329b4c1a4dc388d9f4ce063f9a54cbf3b967682a) ) + ROM_LOAD32_BYTE( "7_u60.bin", 0x200002, 0x040000, CRC(f187a7bf) SHA1(f4ce9ac9fe376250fe426de6ee404fc7841ef08a) ) + ROM_LOAD32_BYTE( "8_u61.bin", 0x200003, 0x040000, CRC(b73fa441) SHA1(a5a3533563070c870276ead5e2f9cb9aaba303cc)) + + ROM_REGION( 0x100000, "gfx2", 0 ) + ROM_LOAD( "10_u102.bin", 0x00000, 0x80000, CRC(b1fd3279) SHA1(4a75581e13d43bef441ce81eae518c2f6bc1d5f8) ) + ROM_LOAD( "9_u103.bin", 0x80000, 0x80000, CRC(01e6d654) SHA1(821d61a5b16f5cb76e2a805c8504db1ef38c3a48) ) +ROM_END + + +GAME( 2000, 1945kiii, 0, k3, k3, driver_device, 0, ROT270, "Oriental Soft", "1945k III", MACHINE_SUPPORTS_SAVE ) +GAME( 1996?,flagrall, 0, flagrall, flagrall, driver_device, 0, ROT0, "<unknown>", "'96 Flag Rally", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp index 4dfeab5b92c..4df457ce129 100644 --- a/src/mame/drivers/8080bw.cpp +++ b/src/mame/drivers/8080bw.cpp @@ -4793,7 +4793,7 @@ GAME( 1979, moonbasea, invadpt2, invadpt2, invadpt2, driver_device, 0, ROT270 GAME( 1980, spclaser, 0, invadpt2, spclaser, driver_device, 0, ROT270, "Taito", "Space Laser", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) GAME( 1980, intruder, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "Taito (Game Plan license)", "Intruder", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -GAME( 1980, laser, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "bootleg (Leisure Time Electronics Inc.)", "Astro Laser (bootleg of Space Laser)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, laser, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "bootleg (Leisure Time Electronics)", "Astro Laser (bootleg of Space Laser)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) GAME( 1979, spcewarl, spclaser, invadpt2, spclaser, driver_device, 0, ROT270, "Leijac Corporation", "Space War (Leijac Corporation)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // Taito's version is actually a spin-off of this? GAME( 1979, lrescue, 0, lrescue, lrescue, driver_device, 0, ROT270, "Taito", "Lunar Rescue", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/adam.cpp b/src/mame/drivers/adam.cpp index a52eb37e567..4369295343b 100644 --- a/src/mame/drivers/adam.cpp +++ b/src/mame/drivers/adam.cpp @@ -1067,7 +1067,7 @@ static MACHINE_CONFIG_START( adam, adam_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SN76489A_TAG, SN76489A, XTAL_7_15909MHz/2) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) - MCFG_SN76496_READY_HANDLER(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT)) + MCFG_SN76496_READY_HANDLER(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT)) // devices MCFG_ADAMNET_BUS_ADD() diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp index 8cfd233520d..af333697ce9 100644 --- a/src/mame/drivers/aerofgt.cpp +++ b/src/mame/drivers/aerofgt.cpp @@ -1521,8 +1521,8 @@ static MACHINE_CONFIG_START( karatblzbl, aerofgt_state ) MCFG_CPU_ADD("audiocpu",Z80,8000000/2) /* 4 MHz ??? */ MCFG_CPU_PROGRAM_MAP(karatblzbl_sound_map) -// MCFG_MACHINE_START_OVERRIDE(aerofgt_state,aerofgt) -// MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,aerofgt) + MCFG_MACHINE_START_OVERRIDE(aerofgt_state,common) + MCFG_MACHINE_RESET_OVERRIDE(aerofgt_state,common) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1552,7 +1552,7 @@ static MACHINE_CONFIG_START( karatblzbl, aerofgt_state ) MCFG_VIDEO_START_OVERRIDE(aerofgt_state,karatblz) /* sound hardware */ - MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") + //MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") // breaks savestate // NEC D7759c + YM???? MACHINE_CONFIG_END diff --git a/src/mame/drivers/amazonlf.cpp b/src/mame/drivers/amazonlf.cpp new file mode 100644 index 00000000000..129af7c3631 --- /dev/null +++ b/src/mame/drivers/amazonlf.cpp @@ -0,0 +1,91 @@ +// license:BSD-3-Clause +// copyright-holders:David Haywood +/* + + uses ADC 'Amazon-LF' SoC, EISC CPU core - similar to crystal system? + +*/ + +#include "emu.h" +#include "cpu/se3208/se3208.h" + + +class amazonlf_state : public driver_device +{ +public: + amazonlf_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_screen(*this, "screen") + { } + + /* devices */ + required_device<cpu_device> m_maincpu; + required_device<screen_device> m_screen; + + + virtual void machine_start() override; + virtual void machine_reset() override; + UINT32 screen_update_amazonlf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void screen_eof_amazonlf(screen_device &screen, bool state); +}; + +static ADDRESS_MAP_START( amazonlf_mem, AS_PROGRAM, 32, amazonlf_state ) + AM_RANGE(0x00000000, 0x0007ffff) AM_ROM +ADDRESS_MAP_END + +void amazonlf_state::machine_start() +{ +} + +void amazonlf_state::machine_reset() +{ +} + +UINT32 amazonlf_state::screen_update_amazonlf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + return 0; +} + +void amazonlf_state::screen_eof_amazonlf(screen_device &screen, bool state) +{ +} + + +static INPUT_PORTS_START(amazonlf) + +INPUT_PORTS_END + + + + + +static MACHINE_CONFIG_START( amazonlf, amazonlf_state ) + + MCFG_CPU_ADD("maincpu", SE3208, 25175000) // ? + MCFG_CPU_PROGRAM_MAP(amazonlf_mem) + + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MCFG_SCREEN_SIZE(640, 480) + MCFG_SCREEN_VISIBLE_AREA(0, 639, 0, 479) + MCFG_SCREEN_UPDATE_DRIVER(amazonlf_state, screen_update_amazonlf) + MCFG_SCREEN_VBLANK_DRIVER(amazonlf_state, screen_eof_amazonlf) + MCFG_SCREEN_PALETTE("palette") + + MCFG_PALETTE_ADD_RRRRRGGGGGGBBBBB("palette") +MACHINE_CONFIG_END + + +ROM_START( crospuzl ) + ROM_REGION( 0x80010, "maincpu", 0 ) + ROM_LOAD("en29lv040a.u5", 0x000000, 0x80010, CRC(d50e8500) SHA1(d681cd18cd0e48854c24291d417d2d6d28fe35c1) ) + + ROM_REGION32_LE( 0x8400010, "user1", ROMREGION_ERASEFF ) // Flash + // mostly empty, but still looks good + ROM_LOAD("k9f1g08u0a.riser", 0x000000, 0x8400010, CRC(7f3c88c3) SHA1(db3169a7b4caab754e9d911998a2ece13c65ce5b) ) +ROM_END + + +GAME( 200?, crospuzl, 0, amazonlf, amazonlf, driver_device, 0, ROT0, "<unknown>", "Cross Puzzle", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp index edca3b6b9b9..f89e0536569 100644 --- a/src/mame/drivers/amiga.cpp +++ b/src/mame/drivers/amiga.cpp @@ -103,6 +103,9 @@ public: DECLARE_DRIVER_INIT( pal ); DECLARE_DRIVER_INIT( ntsc ); + DECLARE_WRITE_LINE_MEMBER( side_int2_w ); + DECLARE_WRITE_LINE_MEMBER( side_int6_w ); + protected: virtual void machine_reset() override; @@ -616,6 +619,18 @@ void a500_state::machine_reset() m_side->reset(); } +WRITE_LINE_MEMBER( a500_state::side_int2_w ) +{ + m_side_int2 = state; + update_int2(); +} + +WRITE_LINE_MEMBER( a500_state::side_int6_w ) +{ + m_side_int6 = state; + update_int6(); +} + bool a500_state::int2_pending() { return m_cia_0_irq || m_side_int2; @@ -1457,6 +1472,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( a500, amiga_base, a500_state ) // cpu slot MCFG_EXPANSION_SLOT_ADD("maincpu", a500_expansion_cards, nullptr) + MCFG_EXPANSION_SLOT_INT2_HANDLER(WRITELINE(a500_state, side_int2_w)) + MCFG_EXPANSION_SLOT_INT6_HANDLER(WRITELINE(a500_state, side_int6_w)) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED_CLASS( a500n, a500, a500_state ) diff --git a/src/mame/drivers/apple1.cpp b/src/mame/drivers/apple1.cpp index a99810887bc..881209946ff 100644 --- a/src/mame/drivers/apple1.cpp +++ b/src/mame/drivers/apple1.cpp @@ -1,135 +1,78 @@ -// license:??? -// copyright-holders:Paul Daniels, Colin Howell, R. Belmont -/********************************************************************** - -Apple I - -CPU: 6502 @ 1.023 MHz - (Effective speed with RAM refresh waits is 0.960 MHz.) - -RAM: 4-8 KB on main board (4 KB standard) - - Additional memory could be added via the expansion - connector, but the user was responsible for making sure - the extra memory was properly interfaced. - - Some users replaced the onboard 4-kilobit RAM chips with - 16-kilobit RAM chips, increasing on-board memory to 32 KB, - but this required modifying the RAM interface circuitry. - -ROM: 256 bytes for Monitor program - - Optional cassette interface included 256 bytes for - cassette routines. - -Interrupts: None. - (The system board had jumpers to allow interrupts, but - these were not connected in a standard system.) - -Video: Dumb terminal, based on 7 1K-bit shift registers - -Sound: None - -Hardware: Motorola 6820 PIA for keyboard and display interface - -Memory map: - -$0000-$1FFF: RAM address space - $0000-$00FF: 6502 zero page - $0024-$002B: Zero page locations used by the Monitor - $0100-$01FF: 6502 processor stack - $0200-$027F: Keyboard input buffer storage used by the Monitor - $0280-$0FFF: RAM space available for a program in a 4 KB system - $1000-$1FFF: Extra RAM space available for a program in an 8 KB system - not using cassette BASIC - -$2000-$BFFF: Unused address space, available for RAM in systems larger - than 8 KB. - -$C000-$CFFF: Address space for optional cassette interface - $C000-$C0FF: Cassette interface I/O range - $C100-$C1FF: Cassette interface ROM - -$D000-$DFFF: I/O address space - $D010-$D013: Motorola 6820 PIA registers. - $D010: Keyboard input port - $D011: Control register for keyboard input port, with - key-available flag. - $D012: Display output port (bit 7 is a status input) - $D013: Control register for display output port - (PIA registers also mirrored at $D014-$D017, $D018-$D01B, $D01C-$D01F, - $D030-$D03F, $D050-$D05F, ... , $DFD0-$DFDF, $DFF0-$DFFF.) - -$E000-$EFFF: Extra RAM space available for a program in an 8 KB system - modified to use cassette BASIC - (The system simulated here always includes this RAM.) - -If you wanted to load the BASIC as rom, here are the details: -ROM_LOAD("basic.bin", 0xE000, 0x1000, CRC(d5e86efc) SHA1(04269c1c66e7d5b4aa5035462c6e612bf2ae9b91) ) - - -$F000-$FFFF: ROM address space - $FF00-$FFFF: Apple Monitor ROM - - -How to use cassettes: -The system has no error checking or checksums, and the cassette -has no header. -Therefore, you must know the details, and pass these to the -interface yourself. -BASIC has no cassette handling. You must enter the monitor -with: CALL -151 -then when finished, re-enter BASIC with: E2B3R - - -Examples: - -A machine-language program will typically be like this: -C100R (enter the interface) -0300.0FFFR (enter the load and end addresses, then load the tape) -You start the tape. -When the prompt returns you stop the tape. -0300R (run your program) - - -To Load Tape Basic: -C100R -E000.EFFFR -You start the tape. -When the prompt returns you stop the tape. -E000R (It must say 4C - if not, your tape is no good). -The BASIC prompt will appear ->@ - - -A BASIC program is split into two areas, one for the scratch pad, -and one for the program proper. -In BASIC you may have to adjust the allowed memory area, such as -LOMEM = 768 -Then, go to the monitor: CALL -151 -C100R (enter the interface) -00A4.00FFR 0300.0FFFR (load the 2 parts) -You start the tape. -When the prompt returns you stop the tape. -E2B3R (back to BASIC) -You can LIST or RUN now. - - -Saving is almost the same, when you specify the address range, enter -W instead of R. The difficulty is finding out how long your program is. - -Insert a blank tape -C100R -0300.0FFFW -Quickly press Record. -When the prompt returns, press Stop. +// license:BSD-3-Clause +// copyright-holders:R. Belmont +/*************************************************************************** + + apple1.cpp - Apple I + + Next generation driver written in February 2016 by R. Belmont. + Thanks to the original crew. + + Apple I has: + 6502 @ 1.023 MHz (~0.960 MHz with RAM refresh) + 4 or 8 KB RAM on-board + 256 byte Monitor ROM + No IRQs, no sound, dumb terminal video + 6820 PIA for keyboard / terminal interface + + ------------------------------------------------------------------- + + How to use cassettes: + The system has no error checking or checksums, and the cassette + has no header. + Therefore, you must know the details, and pass these to the + interface yourself. + + BASIC has no cassette handling. You must enter the monitor + with: CALL -151 + then when finished, re-enter BASIC with: E2B3R + + Examples: + + A machine-language program will typically be like this: + C100R (enter the interface) + 0300.0FFFR (enter the load and end addresses, then load the tape) + You start the tape. + When the prompt returns you stop the tape. + 0300R (run your program) + + + To Load Tape Basic: + C100R + E000.EFFFR + You start the tape. + When the prompt returns you stop the tape. + E000R (It must say 4C - if not, your tape is no good). + The BASIC prompt will appear + >@ + + + A BASIC program is split into two areas, one for the scratch pad, + and one for the program proper. + In BASIC you may have to adjust the allowed memory area, such as + LOMEM = 768 + Then, go to the monitor: CALL -151 + C100R (enter the interface) + 00A4.00FFR 0300.0FFFR (load the 2 parts) + You start the tape. + When the prompt returns you stop the tape. + E2B3R (back to BASIC) + You can LIST or RUN now. + + + Saving is almost the same, when you specify the address range, enter + W instead of R. The difficulty is finding out how long your program is. + + Insert a blank tape + C100R + 0300.0FFFW + Quickly press Record. + When the prompt returns, press Stop. **********************************************************************/ #include "emu.h" #include "cpu/m6502/m6502.h" #include "machine/6821pia.h" -#include "includes/apple1.h" #include "imagedev/snapquik.h" #include "machine/ram.h" @@ -139,59 +82,437 @@ When the prompt returns, press Stop. #include "softlist.h" -/* port i/o functions */ +#define A1_CPU_TAG "maincpu" +#define A1_PIA_TAG "pia6821" +#define A1_BUS_TAG "a1bus" +#define A1_BASICRAM_TAG "basicram" -/* memory w/r functions */ +class apple1_state : public driver_device +{ +public: + apple1_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, A1_CPU_TAG), + m_pia(*this, A1_PIA_TAG), + m_ram(*this, RAM_TAG), + m_basicram(*this, A1_BASICRAM_TAG), + m_kb0(*this, "KEY0"), + m_kb1(*this, "KEY1"), + m_kb2(*this, "KEY2"), + m_kb3(*this, "KEY3"), + m_kbspecial(*this, "KBSPECIAL") + { } + + required_device<cpu_device> m_maincpu; + required_device<pia6821_device> m_pia; + required_device<ram_device> m_ram; + required_shared_ptr<UINT8> m_basicram; + required_ioport m_kb0, m_kb1, m_kb2, m_kb3, m_kbspecial; + + virtual void machine_start() override; + virtual void machine_reset() override; + + DECLARE_PALETTE_INIT(apple2); + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + DECLARE_READ8_MEMBER(ram_r); + DECLARE_WRITE8_MEMBER(ram_w); + DECLARE_READ8_MEMBER(pia_keyboard_r); + DECLARE_WRITE8_MEMBER(pia_display_w); + DECLARE_WRITE_LINE_MEMBER(pia_display_gate_w); + DECLARE_SNAPSHOT_LOAD_MEMBER( apple1 ); + TIMER_CALLBACK_MEMBER(ready_start_cb); + TIMER_CALLBACK_MEMBER(ready_end_cb); + TIMER_CALLBACK_MEMBER(keyboard_strobe_cb); + +private: + UINT8 *m_ram_ptr, *m_char_ptr; + int m_ram_size, m_char_size; + + UINT8 m_vram[40*24]; + int m_cursx, m_cursy; + + bool m_reset_down; + bool m_clear_down; + + UINT8 m_transchar; + UINT16 m_lastports[4]; + + void plot_text_character(bitmap_ind16 &bitmap, int xpos, int ypos, int xscale, UINT32 code, const UINT8 *textgfx_data, UINT32 textgfx_datalen); + void poll_keyboard(); + + emu_timer *m_ready_start_timer, *m_ready_end_timer, *m_kbd_strobe_timer; +}; -static ADDRESS_MAP_START( apple1_map, AS_PROGRAM, 8, apple1_state ) - /* In $D000-$DFFF, PIA is selected by address bit 4 being high, - and PIA registers are addressed with address bits 0-1. All - other address bits are ignored. Thus $D010-$D013 is mirrored - at all $Dxxx addresses with bit 4 high. */ - AM_RANGE(0xd010, 0xd013) AM_MIRROR(0x0fec) AM_DEVREADWRITE("pia",pia6821_device, read, write) +static const UINT8 apple1_keymap[] = +{ + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '=', '[', ']', ';', '\'', // KEY0 + ',', '.', '/', '\\', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', // KEY1 + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_', // KEY2 + ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // KEY3 + + ')', '!', '@', '#', '$', '%', '^', '&', '*', '(', '_', '+', '[', ']', ':', '"', // KEY0 + shift + '<', '>', '?', '\\', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', // KEY1 + shift + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_', // KEY2 + shift + ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // KEY3 + shift + + '0', '1', '\x00', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', '8', '9', '\x1f', '=', '\x1b', '\x1d', ';', '\'', // KEY0 + CTRL + ',', '.', '/', '\x1c', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c', // KEY1 + CTRL + '\x0d', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\r', '_', // KEY2 + CTRL + ' ', '\x1b', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // KEY3 + CTRL + +}; + +// header is "LOAD:abcdDATA:" where abcd is the starting address +SNAPSHOT_LOAD_MEMBER( apple1_state, apple1 ) +{ + UINT64 snapsize; + UINT8 *data; + UINT16 start, end; + static const char hd1[6] = "LOAD:"; + static const char hd2[6] = "DATA:"; + + // get the snapshot's size + snapsize = image.length(); + + if (snapsize < 12) + { + logerror("Snapshot is too short\n"); + return IMAGE_INIT_FAIL; + } + + if ((snapsize - 12) > 65535) + { + logerror("Snapshot is too long\n"); + return IMAGE_INIT_FAIL; + } + + data = (UINT8 *)image.ptr(); + if (!data) + { + logerror("Internal error loading snapshot\n"); + return IMAGE_INIT_FAIL; + } + + if ((memcmp(hd1, data, 5)) || (memcmp(hd2, &data[7], 5))) + { + logerror("Snapshot is invalid\n"); + return IMAGE_INIT_FAIL; + } + + start = (data[5]<<8) | data[6]; + end = (snapsize - 12) + start; + + // check if this fits in RAM; load below 0xe000 must fit in RAMSIZE, + // load at 0xe000 must fit in 4K + if (((start < 0xe000) && (end > (m_ram_size - 1))) || (end > 0xefff)) + { + logerror("Snapshot can't fit in RAM\n"); + return IMAGE_INIT_FAIL; + } + + if (start < 0xe000) + { + memcpy(m_ram_ptr + start, &data[12], snapsize - 12); + } + else if ((start >= 0xe000) && (start <= 0xefff)) + { + memcpy(m_basicram + (start - 0xe000), &data[12], snapsize - 12); + } + else + { + logerror("Snapshot has invalid load address %04x\n", start); + return IMAGE_INIT_FAIL; + } + + return IMAGE_INIT_PASS; +} + +void apple1_state::poll_keyboard() +{ + UINT8 special = m_kbspecial->read(); + UINT16 ports[4]; + int rawkey = 0; + bool bKeypress = false; + + // handle special keys first: + if (special & 0x10) // RESET + { + m_reset_down = true; + m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); + m_pia->reset(); + } + else if (m_reset_down) + { + m_reset_down = false; + m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); + } + + if (special & 0x20) // CLEAR SCREEN + { + m_clear_down = true; + memset(m_vram, 0, sizeof(m_vram)); + m_cursx = m_cursy = 0; + } + else + { + m_clear_down = false; + } + + // lower the keyboard strobe + m_pia->ca1_w(0); + + // cache all the rows + ports[0] = m_kb0->read(); + ports[1] = m_kb1->read(); + ports[2] = m_kb2->read(); + ports[3] = m_kb3->read(); + + for (int port = 0; port < 4; port++) + { + UINT16 ptread = ports[port] ^ m_lastports[port]; + + for (int bit = 0; bit < 16; bit++) + { + // key changed? + if (ptread & (1 << bit)) + { + // key down? + if (ports[port] & (1 << bit)) + { + rawkey = (port * 16) + bit; + m_lastports[port] |= (1 << bit); + port = 4; // force outer for loop to quit too + bKeypress = true; + } + else // key up + { + m_lastports[port] &= ~(1 << bit); + } + break; + } + } + } + + if (bKeypress) + { + if ((special & 0xc) != 0) + { + m_transchar = apple1_keymap[rawkey + (8*16)]; + } + else if ((special & 0x3) != 0) + { + m_transchar = apple1_keymap[rawkey + (4*16)]; + } + else + { + m_transchar = apple1_keymap[rawkey]; + } + // pulse the strobe line + m_pia->ca1_w(1); + } +} + +void apple1_state::plot_text_character(bitmap_ind16 &bitmap, int xpos, int ypos, int xscale, UINT32 code, + const UINT8 *textgfx_data, UINT32 textgfx_datalen) +{ + int x, y, i; + const UINT8 *chardata; + UINT16 color; + int fg = 1, bg = 0; + int charcode = (code & 0x1f) | (((code ^ 0x40) & 0x40) >> 1); + + /* look up the character data */ + chardata = &textgfx_data[(charcode * 8)]; + + for (y = 0; y < 8; y++) + { + for (x = 0; x < 7; x++) + { + color = (chardata[y] & (1 << (6-x))) ? fg : bg; + + for (i = 0; i < xscale; i++) + { + bitmap.pix16(ypos + y, xpos + (x * xscale) + i) = color; + } + } + } +} + +UINT32 apple1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + int vramad; + int cursor_blink = 0; + UINT8 curs_save = 0; + + poll_keyboard(); + + // the cursor 555 timer counts 0.52 of a second; the cursor is ON for + // 2 of those counts and OFF for the last one. + if (((int)(machine().time().as_double() / (0.52 / 3.0)) % 3) < 2) + { + curs_save = m_vram[(m_cursy * 40) + m_cursx]; + m_vram[(m_cursy * 40) + m_cursx] = 0x40; + cursor_blink = 1; + } + + for (int row = 0; row < cliprect.max_y; row += 8) + { + for (int col = 0; col < 40; col++) + { + vramad = ((row/8) * 40) + col; + + plot_text_character(bitmap, col * 14, row, 2, m_vram[vramad], + m_char_ptr, m_char_size); + } + } + + if (cursor_blink) + { + m_vram[(m_cursy * 40) + m_cursx] = curs_save; + } + + return 0; +} + +void apple1_state::machine_start() +{ + m_ram_ptr = m_ram->pointer(); + m_ram_size = m_ram->size(); + m_char_ptr = memregion("gfx1")->base(); + m_char_size = memregion("gfx1")->bytes(); + + m_reset_down = m_clear_down = false; + + m_ready_start_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::ready_start_cb), this)); + m_ready_end_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::ready_end_cb), this)); + m_kbd_strobe_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple1_state::keyboard_strobe_cb), this)); + + // setup save states + save_item(NAME(m_vram)); + save_item(NAME(m_cursx)); + save_item(NAME(m_cursy)); + save_item(NAME(m_reset_down)); + save_item(NAME(m_clear_down)); + save_item(NAME(m_transchar)); + save_item(NAME(m_lastports)); +} + +void apple1_state::machine_reset() +{ + memset(m_vram, 0, sizeof(m_vram)); + m_transchar = 0; + m_cursx = m_cursy = 0; + m_lastports[0] = m_lastports[1] = m_lastports[2] = m_lastports[3] = 0; +} + +READ8_MEMBER(apple1_state::ram_r) +{ + if (offset < m_ram_size) + { + return m_ram_ptr[offset]; + } - /* We always include the remapped RAM for cassette BASIC, both for - simplicity and to allow the running of BASIC programs. */ - AM_RANGE(0xe000, 0xefff) AM_RAM + return 0xff; +} - AM_RANGE(0xf000, 0xfeff) AM_NOP +WRITE8_MEMBER(apple1_state::ram_w) +{ + if (offset < m_ram_size) + { + m_ram_ptr[offset] = data; + } +} - /* Monitor ROM: */ - AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("maincpu", 0) +static ADDRESS_MAP_START( apple1_map, AS_PROGRAM, 8, apple1_state ) + AM_RANGE(0x0000, 0xbfff) AM_READWRITE(ram_r, ram_w) + AM_RANGE(0xd010, 0xd013) AM_MIRROR(0x0fec) AM_DEVREADWRITE(A1_PIA_TAG, pia6821_device, read, write) + AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE(A1_BASICRAM_TAG) + AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION(A1_CPU_TAG, 0) ADDRESS_MAP_END -/* graphics output */ +READ8_MEMBER(apple1_state::pia_keyboard_r) +{ + return m_transchar | 0x80; // bit 7 is wired high, similar-ish to the Apple II +} -const gfx_layout apple1_charlayout = +WRITE8_MEMBER(apple1_state::pia_display_w) { - 7, 8, /* character cell is 7 pixels wide by 8 pixels high */ - 64, /* 64 characters in 2513 character generator ROM */ - 1, /* 1 bitplane */ - { 0 }, - /* 5 visible pixels per row, starting at bit 3, with MSB being 0: */ - { 3, 4, 5, 6, 7 }, - /* pixel rows stored from top to bottom: */ - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 8 * 8 /* 8 8-bit pixel rows per character */ -}; + data &= 0x7f; // D7 is ignored by the video h/w + + // ignore characters if CLEAR is down + if (m_clear_down) + { + return; + } + + // video h/w rejects control characters except CR + if ((data < 32) && (data != '\r')) + { + return; + } + + if (data == '\r') + { + m_cursx = 0; + m_cursy++; + } + else + { + m_vram[(m_cursy * 40) + m_cursx] = data; + + m_cursx++; + if (m_cursx > 39) + { + m_cursx = 0; + m_cursy++; + } + } + + // scroll the screen if we're at the bottom + if (m_cursy > 23) + { + for (int sy = 0; sy < 23; sy++) + { + memcpy(&m_vram[sy * 40], &m_vram[(sy + 1) * 40], 40); + } + memset(&m_vram[23*40], 0, 40); + m_cursy = 23; + } +} + +// CB2 here is connected two places: Port B bit 7 for CPU readback, +// and to the display hardware +WRITE_LINE_MEMBER(apple1_state::pia_display_gate_w) +{ + m_pia->portb_w((state << 7) ^ 0x80); + + // falling edge means start the display timer + if (state == CLEAR_LINE) + { + m_ready_start_timer->adjust(machine().first_screen()->time_until_pos(m_cursy, m_cursx)); + } +} + +TIMER_CALLBACK_MEMBER(apple1_state::ready_start_cb) +{ + // we're ready, pulse CB1 for 3500 nanoseconds + m_pia->cb1_w(0); + m_ready_end_timer->adjust(attotime::from_nsec(3500)); +} + +TIMER_CALLBACK_MEMBER(apple1_state::ready_end_cb) +{ + m_pia->cb1_w(1); +} -static GFXDECODE_START( apple1 ) - GFXDECODE_ENTRY( "gfx1", 0x0000, apple1_charlayout, 0, 1 ) -GFXDECODE_END - -/* keyboard input */ -/* - It's very likely that the keyboard assgnments are totally wrong: the code in machine/apple1.c - makes arbitrary assumptions about the mapping of the keys. The schematics that are available - on the web can help revealing the real layout. - The large picture of Woz's Apple I at http://home.earthlink.net/~judgementcall/apple1.jpg - show probably how the real keyboard was meant to be: note how the shifted symbols on the digits - and on some letters are different from the ones produced by current emulation and the presence - of the gray keys. -*/ +TIMER_CALLBACK_MEMBER(apple1_state::keyboard_strobe_cb) +{ + m_pia->ca1_w(0); +} static INPUT_PORTS_START( apple1 ) - PORT_START("KEY0") /* first sixteen keys */ + PORT_START("KEY0") PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') @@ -209,7 +530,7 @@ static INPUT_PORTS_START( apple1 ) PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') - PORT_START("KEY1") /* second sixteen keys */ + PORT_START("KEY1") PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') @@ -227,7 +548,7 @@ static INPUT_PORTS_START( apple1 ) PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') - PORT_START("KEY2") /* third sixteen keys */ + PORT_START("KEY2") PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') @@ -243,21 +564,19 @@ static INPUT_PORTS_START( apple1 ) PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) - PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backarrow") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR('_') + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR('_') - PORT_START("KEY3") /* fourth sixteen keys */ + PORT_START("KEY3") PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Escape") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) - PORT_START("KEY4") /* shift keys */ - PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift (Left)") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift (Right)") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control (Left)") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) - PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control (Right)") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) - - PORT_START("KEY5") /* RESET and CLEAR SCREEN pushbutton switches */ - PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F1)) - PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) + PORT_START("KBSPECIAL") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Control") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F1)) + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) INPUT_PORTS_END static SLOT_INTERFACE_START(apple1_cards) @@ -265,69 +584,44 @@ static SLOT_INTERFACE_START(apple1_cards) SLOT_INTERFACE("cffa", A1BUS_CFFA) SLOT_INTERFACE_END -/* machine definition */ static MACHINE_CONFIG_START( apple1, apple1_state ) - /* basic machine hardware */ - /* Actual CPU speed is 1.023 MHz, but RAM refresh effectively - slows it to 960 kHz. */ - MCFG_CPU_ADD("maincpu", M6502, 960000) /* 1.023 MHz */ + MCFG_CPU_ADD(A1_CPU_TAG, M6502, 960000) // effective CPU speed MCFG_CPU_PROGRAM_MAP(apple1_map) - MCFG_QUANTUM_TIME(attotime::from_hz(60)) - + // video timings are identical to the Apple II, unsurprisingly MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - /* Video is blanked for 70 out of 262 scanlines per refresh cycle. - Each scanline is composed of 65 character times, 40 of which - are visible, and each character time is 7 dot times; a dot time - is 2 cycles of the fundamental 14.31818 MHz oscillator. The - total blanking time is about 4450 microseconds. */ - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC((int) (70 * 65 * 7 * 2 / 14.31818))) - /* It would be nice if we could implement some sort of display - overscan here. */ - MCFG_SCREEN_SIZE(40 * 7, 24 * 8) - MCFG_SCREEN_VISIBLE_AREA(0, 40 * 7 - 1, 0, 24 * 8 - 1) - MCFG_SCREEN_UPDATE_DRIVER(apple1_state, screen_update_apple1) + MCFG_SCREEN_RAW_PARAMS(XTAL_14_31818MHz, (65*7)*2, 0, (40*7)*2, 262, 0, 192) + MCFG_SCREEN_UPDATE_DRIVER(apple1_state, screen_update) MCFG_SCREEN_PALETTE("palette") - MCFG_GFXDECODE_ADD("gfxdecode", "palette", apple1) - MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette") - MCFG_DEVICE_ADD( "pia", PIA6821, 0) - MCFG_PIA_READPA_HANDLER(READ8(apple1_state,apple1_pia0_kbdin)) - MCFG_PIA_WRITEPB_HANDLER(WRITE8(apple1_state,apple1_pia0_dspout)) - MCFG_PIA_CB2_HANDLER(WRITELINE(apple1_state,apple1_pia0_dsp_write_signal)) + MCFG_DEVICE_ADD( A1_PIA_TAG, PIA6821, 0) + MCFG_PIA_READPA_HANDLER(READ8(apple1_state, pia_keyboard_r)) + MCFG_PIA_WRITEPB_HANDLER(WRITE8(apple1_state, pia_display_w)) + MCFG_PIA_CB2_HANDLER(WRITELINE(apple1_state, pia_display_gate_w)) - MCFG_DEVICE_ADD("a1bus", A1BUS, 0) + MCFG_DEVICE_ADD(A1_BUS_TAG, A1BUS, 0) MCFG_A1BUS_CPU("maincpu") - MCFG_A1BUS_SLOT_ADD("a1bus", "exp", apple1_cards, "cassette") + MCFG_A1BUS_SLOT_ADD(A1_BUS_TAG, "exp", apple1_cards, "cassette") - /* snapshot */ MCFG_SNAPSHOT_ADD("snapshot", apple1_state, apple1, "snp", 0) - MCFG_SOFTWARE_LIST_ADD("cass_list","apple1") + MCFG_SOFTWARE_LIST_ADD("cass_list", "apple1") - /* Note that because we always include 4K of RAM at $E000-$EFFF, - the RAM amounts listed here will be 4K below the actual RAM - total. */ - /* internal ram */ MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("48K") MCFG_RAM_EXTRA_OPTIONS("4K,8K,12K,16K,20K,24K,28K,32K,36K,40K,44K") - MACHINE_CONFIG_END ROM_START(apple1) - ROM_REGION(0x100, "maincpu",0) - /* 256-byte main monitor ROM, in two 82s129 or mmi6301 256x4 proms at A1 and A2 called APPLE-A1(bits D3-D0) and APPLE-A2(bits D7-D4) */ - ROM_LOAD_NIB_HIGH( "apple-a2.a2", 0x0000, 0x0100, CRC(254bfb95) SHA1(b6468b72295b7d8ac288d104d252f24de1f1d611) ) - ROM_LOAD_NIB_LOW( "apple-a1.a1", 0x0000, 0x0100, CRC(434f8ce6) SHA1(9deee2d39903209b20c3fc6b58e16372f8efece1) ) - /* 512-byte Signetics 2513 character generator ROM at location D2-D3 */ + ROM_REGION(0x100, A1_CPU_TAG, 0) + ROM_LOAD_NIB_HIGH("apple-a2.a2", 0x0000, 0x0100, CRC(254bfb95) SHA1(b6468b72295b7d8ac288d104d252f24de1f1d611) ) + ROM_LOAD_NIB_LOW("apple-a1.a1", 0x0000, 0x0100, CRC(434f8ce6) SHA1(9deee2d39903209b20c3fc6b58e16372f8efece1) ) ROM_REGION(0x0200, "gfx1",0) ROM_LOAD("s2513.d2", 0x0000, 0x0200, CRC(a7e567fc) SHA1(b18aae0a2d4f92f5a7e22640719bbc4652f3f4ee)) // apple1.vid ROM_END +/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME */ +COMP( 1976, apple1, 0, 0, apple1, apple1, driver_device, 0, "Apple Computer", "Apple I", MACHINE_NO_SOUND_HW | MACHINE_SUPPORTS_SAVE ) -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP( 1976, apple1, 0, 0, apple1, apple1, apple1_state, apple1, "Apple Computer", "Apple I" , MACHINE_NO_SOUND ) diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp index 99bc10dc341..8cf7052f829 100644 --- a/src/mame/drivers/apple2e.cpp +++ b/src/mame/drivers/apple2e.cpp @@ -2901,6 +2901,128 @@ static INPUT_PORTS_START( apple2euk ) PORT_INCLUDE(apple2_sysconfig) INPUT_PORTS_END +static INPUT_PORTS_START( apple2ees ) + PORT_START("X0") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR(0xa3) // a3 is Unicode for the pound sign + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/') + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') + + PORT_START("X1") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(9) + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q') + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w') + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e') + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r') + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y') + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t') + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u') + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o') + + PORT_START("X2") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a') + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d') + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h') + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f') + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g') + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k') + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xf1) PORT_CHAR(0xf1) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') + + PORT_START("X3") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z') + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c') + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v') + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m') + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_') + + PORT_START("X4") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('`') PORT_CHAR(0xbf) // inverted question mark + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=') + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('\'') PORT_CHAR('?') + + PORT_START("X5") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('<') PORT_CHAR('>') + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p') + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('~') PORT_CHAR('^') + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('+') PORT_CHAR('*') + + PORT_START("X6") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xc7) PORT_CHAR(0xa1) // c with cedilla / inverted exclamation point + + PORT_START("X7") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_BACKSPACE)PORT_CHAR(8) + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(10) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) + + PORT_START("X8") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("keyb_special") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Open Apple") PORT_CODE(KEYCODE_LALT) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Solid Apple") PORT_CODE(KEYCODE_RALT) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RESET") PORT_CODE(KEYCODE_F12) + + PORT_INCLUDE( apple2_gameport ) + PORT_INCLUDE(apple2_sysconfig) +INPUT_PORTS_END + INPUT_PORTS_START( apple2ep ) PORT_START("X0") PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(27) @@ -3433,6 +3555,18 @@ ROM_START(apple2euk) ROM_LOAD( "341-0150-a.e12", 0x000, 0x800, CRC(66ffacd7) SHA1(47bb9608be38ff75429a989b930a93b47099648e) ) ROM_END +ROM_START(apple2ees) + ROM_REGION(0x2000,"gfx1",0) + ROM_LOAD( "341-0212-a.e9", 0x000000, 0x002000, CRC(bc5575ef) SHA1(aa20c257255ef552295d32a3f56ccbb52b8716c3) ) + + ROM_REGION(0x8000,"maincpu",0) + ROM_LOAD ( "342-0135-b.64", 0x0000, 0x2000, CRC(e248835e) SHA1(523838c19c79f481fa02df56856da1ec3816d16e)) + ROM_LOAD ( "342-0134-a.64", 0x2000, 0x2000, CRC(fc3d59d8) SHA1(8895a4b703f2184b673078f411f4089889b61c54)) + + ROM_REGION( 0x800, "keyboard", ROMREGION_ERASE00 ) + ROM_LOAD( "341-0211-a.f12", 0x000000, 0x000800, CRC(fac15d54) SHA1(abe019de22641b0647e829a1d4745759bdffe86a) ) +ROM_END + ROM_START(mprof3) ROM_REGION(0x2000,"gfx1",0) ROM_LOAD ( "mpf3.chr", 0x0000, 0x1000,CRC(2597bc19) SHA1(e114dcbb512ec24fb457248c1b53cbd78039ed20)) @@ -3613,6 +3747,7 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ COMP( 1983, apple2e, 0, apple2, apple2e, apple2e, driver_device, 0, "Apple Computer", "Apple //e", MACHINE_SUPPORTS_SAVE ) COMP( 1983, apple2euk,apple2e, 0, apple2e, apple2euk,driver_device, 0, "Apple Computer", "Apple //e (UK)", MACHINE_SUPPORTS_SAVE ) +COMP( 1983, apple2ees,apple2e, 0, apple2e, apple2ees,driver_device, 0, "Apple Computer", "Apple //e (Spain)", MACHINE_SUPPORTS_SAVE ) COMP( 1983, mprof3, apple2e, 0, mprof3, apple2e, driver_device, 0, "Multitech", "Microprofessor III", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) COMP( 1985, apple2ee, apple2e, 0, apple2ee, apple2e, driver_device, 0, "Apple Computer", "Apple //e (enhanced)", MACHINE_SUPPORTS_SAVE ) COMP( 1985, apple2eeuk,apple2e, 0, apple2ee, apple2euk, driver_device,0, "Apple Computer", "Apple //e (enhanced, UK)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/arcadecl.cpp b/src/mame/drivers/arcadecl.cpp index dd261cac975..1e821db2466 100644 --- a/src/mame/drivers/arcadecl.cpp +++ b/src/mame/drivers/arcadecl.cpp @@ -131,7 +131,7 @@ WRITE16_MEMBER(arcadecl_state::latch_w) if (ACCESSING_BITS_0_7) { m_oki->set_bank_base((data & 0x80) ? 0x40000 : 0x00000); - set_oki6295_volume((data & 0x001f) * 100 / 0x1f); + m_oki->set_output_gain(ALL_OUTPUTS, (data & 0x001f) / 31.0f); } } diff --git a/src/mame/drivers/argox.cpp b/src/mame/drivers/argox.cpp new file mode 100644 index 00000000000..737afea4be2 --- /dev/null +++ b/src/mame/drivers/argox.cpp @@ -0,0 +1,85 @@ +// license:GPL2+ +// copyright-holders:Felipe Sanches +/*************************************************************************** + + Argox Rabbit Printer + model: 0S-214 + + Skeleton driver by Felipe Correa da Silva Sanches <juca@members.fsf.org> + + OVERALL HARDWARE DESCRIPTION: + + There's a sticker labeled "V4.21" + The board is labeled "ARGOX INFORMATION 48.20401.002 DATE:2003/03/20 REV:4.2" + + There's a soldered IC at U10 which is labeled "A511 093060006 55-20401-003 E" and "OK" + I guess it may be another flash ROM + + External interfaces: + * RS232 serial interface + * Centronics port + + Connectors: + * 4-pin labeled "PEELER" (unused) + * 4-pin labeled "RIBBON" + * 4-pin labeled "MEDIA" + * 4-pin labeled "MOTOR" + * 6-pin labeled "MOTOR" (unpopulated) + * 4-pin labeled "CUTTER" (unused) + * 18-pin unlabeled JP18 (with 4 unused pins) Connects to the printing subassembly + * 9-pin labeled "KEYPAD" (unpopulated) + * 6-pin labeled "LED/KEY" (connects to FEED button, POWER LED and READY LED) + + Jumpers: + * set of 2 jumpers (JP1 and JP2) with a jumper inserted at JP2 + * set of 6 unlabelled with jumpers inserted at position #0 and #3 + + DIP sockets: + * u8 and u9 hold the FLASH ROM chips + * U19 is an unpopulated DIP16 socket + +***************************************************************************/ + +#include "emu.h" +#include "cpu/h8/h83002.h" + +class os214_state : public driver_device +{ +public: + os214_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu") + { } + + DECLARE_DRIVER_INIT(os214); + required_device<cpu_device> m_maincpu; +}; + +static ADDRESS_MAP_START( os214_prg_map, AS_PROGRAM, 16, os214_state ) + AM_RANGE(0x000000, 0x07ffff) AM_ROM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( os214_io_map, AS_IO, 8, os214_state ) +// ADDRESS_MAP_GLOBAL_MASK(0xff) +ADDRESS_MAP_END + +static MACHINE_CONFIG_START( os214, os214_state ) + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", H83002, XTAL_16MHz) /* X1 xtal value is correct, + but there can be some clock divider perhaps ? */ + MCFG_CPU_PROGRAM_MAP(os214_prg_map) + MCFG_CPU_IO_MAP(os214_io_map) +MACHINE_CONFIG_END + +DRIVER_INIT_MEMBER( os214_state, os214 ) +{ +} + +ROM_START( os214 ) + ROM_REGION( 0x080000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "u9_s2a2-4.03_argox_am.u9", 0x000000, 0x040000, CRC(3bd8b2b1) SHA1(546f9fd8d7e1f589f6e594a332a3429041b49eea) ) + ROM_LOAD16_BYTE( "u8_s2a2-4.03_argox_am.u8", 0x000001, 0x040000, CRC(d49f52af) SHA1(0ca5a70c6c3995f275226af26db965f6ba7ed123) ) +ROM_END + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +COMP( 1996, os214, 0, 0, os214, 0, os214_state, os214, "Argox", "Rabbit Printer (model OS-214)", MACHINE_IS_SKELETON) diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp index 03dedcd5c4d..c93fd804064 100644 --- a/src/mame/drivers/arkanoid.cpp +++ b/src/mame/drivers/arkanoid.cpp @@ -1245,6 +1245,10 @@ GFXDECODE_END void arkanoid_state::machine_start() { + // allocate the MCU timer, even if we have no MCU, and set it to fire NEVER. + m_68705_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(arkanoid_state::timer_68705_increment),this)); + m_68705_timer->adjust(attotime::never); + save_item(NAME(m_gfxbank)); save_item(NAME(m_palettebank)); @@ -1283,8 +1287,8 @@ void arkanoid_state::machine_reset() // the following 3 are all part of the 74ls74 at ic26 and are cleared on reset m_z80HasWritten = 0; m_68705HasWritten = 0; - //if (m_bootleg_id == 0) m_mcu->set_input_line(M68705_IRQ_LINE, CLEAR_LINE); // arkatayt will crash if this line is uncommented, but without this line present, arkanoid will watchdog-reset itself as soon as a level starts after pressing f3/soft reset. - // TODO: this can be better dealt with by having a separate machine_reset function for the mculess vs mcu sets. + if (m_mcu.found()) m_mcu->set_input_line(M68705_IRQ_LINE, CLEAR_LINE); + if (m_mcu.found()) m_68705_timer->adjust(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<7))); m_port_a_in = 0; m_port_a_out = 0; @@ -1430,8 +1434,8 @@ MACHINE_CONFIG_END /* ROMs */ /* rom numbering, with guesses for version numbers and missing roms: A75 01 = Z80 code 1/2 v1.0 Japan (NOT DUMPED) - A75 01-1 = Z80 code 1/2 v1.1 Japan and USA/Romstar - A75 02 = Z80 code 2/2 v1.0 Japan + A75 01-1 = Z80 code 1/2 v1.1 Japan and USA/Romstar and World + A75 02 = Z80 code 2/2 v1.0 Japan (has 'Notice: This game is for use in Japan only' screen) A75 03 = GFX 1/3 A75 04 = GFX 2/3 A75 05 = GFX 3/3 @@ -1439,8 +1443,8 @@ MACHINE_CONFIG_END A75 07 = PROM red A75 08 = PROM green A75 09 = PROM blue - A75 10 = Z80 code 2/2 v1.1 USA/Romstar - A75 11 = Z80 code 2/2 v1.2 Japan(World?) (paired with 01-1 v1.1 Japan) + A75 10 = Z80 code 2/2 v1.0 USA/Romstar (has 'Licensed to Romstar for U.S.A' notice on title) + A75 11 = Z80 code 2/2 v1.0 World (A75 12 through 17 are unknown, could be another two sets of z80 code plus mc68705p5) A75 18 = Z80 code v2.0 2/2 USA/Romstar A75 19 = Z80 code v2.0 1/2 USA/Romstar @@ -1464,7 +1468,7 @@ MACHINE_CONFIG_END A75 37 = Z80 code 2/2 (Tournament v2.0?) (NOT DUMPED) */ -ROM_START( arkanoid ) // v1.2 Japan(world?) +ROM_START( arkanoid ) // v1.0 World ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "a75-01-1.ic17", 0x0000, 0x8000, CRC(5bcda3b0) SHA1(52cadd38b5f8e8856f007a9c602d6b508f30be65) ) ROM_LOAD( "a75-11.ic16", 0x8000, 0x8000, CRC(eafd7191) SHA1(d2f8843b716718b1de209e97a874e8ce600f3f87) ) @@ -1482,12 +1486,11 @@ ROM_START( arkanoid ) // v1.2 Japan(world?) ROM_LOAD( "a75-08.ic23", 0x0200, 0x0200, CRC(abb002fb) SHA1(c14f56b8ef103600862e7930709d293b0aa97a73) ) /* green component */ ROM_LOAD( "a75-09.ic22", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ - // these were decapped, sort them! // All of these MCUs work in place of A75 06, see comments for each. ROM_REGION( 0x1800, "alt_mcus", 0 ) /* 2k for the microcontroller */ - ROM_LOAD( "arkanoid_mcu.ic14", 0x0800, 0x0800, CRC(4e44b50a) SHA1(c61e7d158dc8e2b003c8158053ec139b904599af) ) // This matches the legitimate Taito rom, with a "Programmed By Yasu 1986" string in it, but has a 0x00 fill after the end of the code instead of 0xFF. This matches the legit rom otherwise and may itself be legit, perhaps an artifact of a 68705 programmer at Taito using a sparse s-record/ihex file and not clearing the ram in the chip programmer to 0xFF (or 0x00?) before programming the MCU. - ROM_LOAD( "a75-06__bootleg_68705.ic14", 0x1000, 0x0800, CRC(515d77b6) SHA1(a302937683d11f663abd56a2fd7c174374e4d7fb) ) // This was NOT decapped, it came from an unprotected bootleg, and used to be used by the main set. It is definitely a bootleg mcu with no timer or int selftest, and compltely different code altogether, probably implemented by pirates by blackbox-reverse engineering the real MCU. - ROM_LOAD( "arkanoid1_68705p3.ic14", 0x0000, 0x0800, CRC(1b68e2d8) SHA1(f642a7cb624ee14fb0e410de5ae1fc799d2fa1c2) ) // This is the same as the 515d77b6 rom above except the bootrom (0x785-0x7f7) is intact. No other difference. + ROM_LOAD( "arkanoid_mcu.ic14", 0x0000, 0x0800, CRC(4e44b50a) SHA1(c61e7d158dc8e2b003c8158053ec139b904599af) ) // Decapped: This matches the legitimate Taito rom, with a "Programmed By Yasu 1986" string in it, but has a 0x00 fill after the end of the code instead of 0xFF. This matches the legit rom otherwise and may itself be legit, perhaps an artifact of a 68705 programmer at Taito using a sparse s-record/ihex file and not clearing the ram in the chip programmer to 0xFF (or 0x00?) before programming the MCU. + ROM_LOAD( "a75-06__bootleg_68705.ic14", 0x0800, 0x0800, CRC(515d77b6) SHA1(a302937683d11f663abd56a2fd7c174374e4d7fb) ) // NOT decapped: This came from an unprotected bootleg, and used to be used by the main set. It is definitely a bootleg mcu with no timer or int selftest, and compltely different code altogether, probably implemented by pirates by blackbox-reverse engineering the real MCU. + ROM_LOAD( "arkanoid1_68705p3.ic14", 0x1000, 0x0800, CRC(1b68e2d8) SHA1(f642a7cb624ee14fb0e410de5ae1fc799d2fa1c2) ) // Decapped: This is the same as the bootleg 515d77b6 rom above except the bootrom (0x785-0x7f7) is intact. No other difference. ROM_END ROM_START( arkanoidu ) // V2.0 US/Romstar @@ -1510,7 +1513,7 @@ ROM_START( arkanoidu ) // V2.0 US/Romstar ROM_END /* Observed on a real TAITO J1100075A pcb (with K1100181A sticker), pcb is white painted, and has a "ROMSTAR(C) // All Rights Reserved // Serial No. // No 14128" sticker */ -ROM_START( arkanoiduo ) // V1.1 USA/Romstar +ROM_START( arkanoiduo ) // V1.0 USA/Romstar ROM_REGION( 0x10000, "maincpu", 0 ) /* Silkscreen: "IC17 27256" and "IC16 27256" */ ROM_LOAD( "a75__01-1.ic17", 0x0000, 0x8000, CRC(5bcda3b0) SHA1(52cadd38b5f8e8856f007a9c602d6b508f30be65) ) ROM_LOAD( "a75__10.ic16", 0x8000, 0x8000, CRC(a1769e15) SHA1(fbb45731246a098b29eb08de5d63074b496aaaba) ) @@ -1529,7 +1532,7 @@ ROM_START( arkanoiduo ) // V1.1 USA/Romstar ROM_LOAD( "a75-09.ic22", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* Chip Silkscreen: "A75-09"; blue component */ ROM_REGION( 0x8000, "altgfx", 0 ) - ROM_LOAD( "a75__03(alternate).ic64", 0x00000, 0x8000, CRC(983d4485) SHA1(603a8798d1f531a70a527a5c6122f0ffd6adcfb6) ) // this was found on a legit v1.1 Romstar USA pcb with serial number 29342; the only difference seems to be the first 32 tiles are all 0xFF instead of 0x00. Those tiles don't seem to be used by the game at all. This is likely another incidence of "Taito forgot to clear programmer ram before burning a rom from a sparse s-record/ihex file" + ROM_LOAD( "a75__03(alternate).ic64", 0x00000, 0x8000, CRC(983d4485) SHA1(603a8798d1f531a70a527a5c6122f0ffd6adcfb6) ) // this was found on a legit v1.0 Romstar USA pcb with serial number 29342; the only difference seems to be the first 32 tiles are all 0xFF instead of 0x00. Those tiles don't seem to be used by the game at all. This is likely another incidence of "Taito forgot to clear programmer ram before burning a rom from a sparse s-record/ihex file" ROM_END ROM_START( arkanoidj ) // V2.1 Japan @@ -1612,7 +1615,7 @@ ROM_END // Everything from here on is bootlegs -ROM_START( arkanoidjbl ) +ROM_START( arkanoidjbl ) // bootleg with MCU copied from real Taito code, but notice screen hacked up. ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "e1.6d", 0x0000, 0x8000, CRC(dd4f2b72) SHA1(399a8636030a702dafc1da926f115df6f045bef1) ) /* Hacked up Notice warning text */ ROM_LOAD( "e2.6f", 0x8000, 0x8000, CRC(bbc33ceb) SHA1(e9b6fef98d0d20e77c7a1c25eff8e9a8c668a258) ) /* == A75-02.IC16 */ @@ -1632,7 +1635,7 @@ ROM_START( arkanoidjbl ) ROM_END -ROM_START( arkanoidjbl2 ) +ROM_START( arkanoidjbl2 ) // Bootleg with ??? MCU, probably the a75-06__bootleg_68705.ic14 515d77b6 one ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1.ic81", 0x0000, 0x8000, CRC(9ff93dc2) SHA1(eee0975b799a8e6717f646dd40716dc454476106) ) ROM_LOAD( "2.ic82", 0x8000, 0x8000, CRC(bbc33ceb) SHA1(e9b6fef98d0d20e77c7a1c25eff8e9a8c668a258) ) /* == A75-02.IC16 */ @@ -1648,10 +1651,10 @@ ROM_START( arkanoidjbl2 ) ROM_REGION( 0x0600, "proms", 0 ) /* BPROMs are silkscreened as 7621, actual BPROMs used are MMI 6306-1N */ ROM_LOAD( "a75-07.ic24", 0x0000, 0x0200, CRC(0af8b289) SHA1(6bc589e8a609b4cf450aebedc8ce02d5d45c970f) ) /* red component */ ROM_LOAD( "a75-08.ic23", 0x0200, 0x0200, CRC(abb002fb) SHA1(c14f56b8ef103600862e7930709d293b0aa97a73) ) /* green component */ - ROM_LOAD( "a75-09.ic23", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ + ROM_LOAD( "a75-09.ic22", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ ROM_END -ROM_START( ark1ball ) /* This set requires a MCU. No MCU rom was supplied so we use current A75-06.IC14 for now */ +ROM_START( ark1ball ) /* This set requires a MCU. No MCU rom was supplied so we use the a75-06__bootleg_68705.ic14 515d77b6 one for now */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "a-1.7d", 0x0000, 0x8000, CRC(dd4f2b72) SHA1(399a8636030a702dafc1da926f115df6f045bef1) ) ROM_LOAD( "2palline.7f", 0x8000, 0x8000, CRC(ed6b62ab) SHA1(4d4991b422756bd304fc5ef236aac1422fe1f999) ) @@ -1671,7 +1674,7 @@ ROM_START( ark1ball ) /* This set requires a MCU. No MCU rom was supplied so we ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ ROM_END -ROM_START( arkangc ) +ROM_START( arkangc ) // Game Corporation set with no mcu, d008 read after reading paddle at d018 patched out or not present ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "arkgc.1", 0x0000, 0x8000, CRC(c54232e6) SHA1(beb759cee68009a06824b755d2aa26d7d436b5b0) ) ROM_LOAD( "arkgc.2", 0x8000, 0x8000, CRC(9f0d4754) SHA1(731c9224616a338084edd6944c754d68eabba7f2) ) @@ -1687,7 +1690,7 @@ ROM_START( arkangc ) ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ ROM_END -ROM_START( arkangc2 ) +ROM_START( arkangc2 ) // Game Corporation set with no mcu, has d008 read after reading paddle at d018, and bit 1 must be set ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1.81", 0x0000, 0x8000, CRC(bd6eb996) SHA1(a048ff01156166595dca0b6bee46344f7db548a8) ) ROM_LOAD( "2.82", 0x8000, 0x8000, CRC(29dbe452) SHA1(b99cb98549bddf1e673e2e715c80664001581f9f) ) @@ -1703,6 +1706,7 @@ ROM_START( arkangc2 ) ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ ROM_END +// This set (block2) and the next one (arkblock3) have the same 'space invader' scrambled block gfx, and an unknown (sound?) rom. No mention of what device(s) the extra rom is connected to. ROM_START( block2 ) ROM_REGION( 0x18000, "maincpu", 0 ) ROM_LOAD( "1.bin", 0x00000, 0x8000, CRC(2b026cae) SHA1(73d1d5d3e6d65fbe378ce85ff501610573ae5e95) ) @@ -1723,8 +1727,7 @@ ROM_START( block2 ) ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ ROM_END -// this set has the same 'space invader' scrambled block gfx, and unknown (sound?) rom as the one above -// sadly no mention of what chip it might be for in the readme. +// see comment for 'block2' set ROM_START( arkbloc3 ) ROM_REGION( 0x18000, "maincpu", 0 ) ROM_LOAD( "blockbl.001", 0x00000, 0x8000, CRC(bf7197a0) SHA1(4fbc0cbc09d292ab0f2e4a35b30505b2f7e4dc0d) ) @@ -1745,7 +1748,7 @@ ROM_START( arkbloc3 ) ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ ROM_END -ROM_START( arkblock ) +ROM_START( arkblock ) // no mcu, no d008/d018/f000/f002 protection, just leftover writes ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ark-6.bin", 0x0000, 0x8000, CRC(0be015de) SHA1(f4209085b59d2c96a62ac9657c7bf097da55362b) ) ROM_LOAD( "arkgc.2", 0x8000, 0x8000, CRC(9f0d4754) SHA1(731c9224616a338084edd6944c754d68eabba7f2) ) @@ -1761,7 +1764,7 @@ ROM_START( arkblock ) ROM_LOAD( "a75-09.bpr", 0x0400, 0x0200, CRC(a7c6c277) SHA1(adaa003dcd981576ea1cc5f697d709b2d6b2ea29) ) /* blue component */ ROM_END -ROM_START( arkbloc2 ) +ROM_START( arkbloc2 ) // no mcu, no d008/d018/f000/f002 protection, just leftover writes ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "block01.bin", 0x0000, 0x8000, CRC(5be667e1) SHA1(fbc5c97d836c404a2e6c007c3836e36b52ae75a1) ) ROM_LOAD( "block02.bin", 0x8000, 0x8000, CRC(4f883ef1) SHA1(cb090a57fc75f17a3e2ba637f0e3ec93c1d02cea) ) @@ -1796,38 +1799,38 @@ Note: 1x 8 switches dip Dumped 19/03/2006 */ -ROM_START( arkgcbl ) +ROM_START( arkgcbl ) // similar to arkangc, but has added d008/d018/f000/f002 protection, likely using the PAL16R8 ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "16.6e", 0x0000, 0x8000, CRC(b0f73900) SHA1(2c9a36cc1d2a3f33ec81d63c1c325554b818d2d3) ) - ROM_LOAD( "17.6f", 0x8000, 0x8000, CRC(9827f297) SHA1(697874e73e045eb5a7bf333d7310934b239c0adf) ) + ROM_LOAD( "electric__16.6e", 0x0000, 0x8000, CRC(b0f73900) SHA1(2c9a36cc1d2a3f33ec81d63c1c325554b818d2d3) ) + ROM_LOAD( "electric__17.6f", 0x8000, 0x8000, CRC(9827f297) SHA1(697874e73e045eb5a7bf333d7310934b239c0adf) ) ROM_REGION( 0x18000, "gfx1", 0 ) - ROM_LOAD( "a75-03.rom", 0x00000, 0x8000, CRC(038b74ba) SHA1(ac053cc4908b4075f918748b89570e07a0ba5116) ) - ROM_LOAD( "a75-04.rom", 0x08000, 0x8000, CRC(71fae199) SHA1(5d253c46ccf4cd2976a5fb8b8713f0f345443d06) ) - ROM_LOAD( "a75-05.rom", 0x10000, 0x8000, CRC(c76374e2) SHA1(7520dd48de20db60a2038f134dcaa454988e7874) ) + ROM_LOAD( "electric__18.3a", 0x00000, 0x8000, CRC(038b74ba) SHA1(ac053cc4908b4075f918748b89570e07a0ba5116) ) // = a75-03.ic64 + ROM_LOAD( "electric__19.3c", 0x08000, 0x8000, CRC(71fae199) SHA1(5d253c46ccf4cd2976a5fb8b8713f0f345443d06) ) // = a75-04.ic63 + ROM_LOAD( "electric__20.3d", 0x10000, 0x8000, CRC(c76374e2) SHA1(7520dd48de20db60a2038f134dcaa454988e7874) ) // = a75-05.ic62 ROM_REGION( 0x0600, "proms", 0 ) ROM_LOAD( "82s129.5k", 0x0000, 0x0100, CRC(fa70b64d) SHA1(273669d05f793cf1ee0741b175be281307fa9b5e) ) /* red component + */ - ROM_LOAD( "82s129.5jk", 0x0100, 0x0100, CRC(cca69884) SHA1(fdcd66110c8eb901a401f8618821c7980946a511) ) /* red component = a75-07.bpr*/ + ROM_LOAD( "82s129.5jk", 0x0100, 0x0100, CRC(cca69884) SHA1(fdcd66110c8eb901a401f8618821c7980946a511) ) /* red component = a75-07.ic24*/ ROM_LOAD( "82s129.5l", 0x0200, 0x0100, CRC(3e4d2bf5) SHA1(c475887302dd137d6965769070b7d55f488c1b25) ) /* green component + */ - ROM_LOAD( "82s129.5kl", 0x0300, 0x0100, CRC(085d625a) SHA1(26c96a1c1b7562fed84c31dd92fdf7829e96a9c7) ) /* green component = a75-08.bpr*/ + ROM_LOAD( "82s129.5kl", 0x0300, 0x0100, CRC(085d625a) SHA1(26c96a1c1b7562fed84c31dd92fdf7829e96a9c7) ) /* green component = a75-08.ic23*/ ROM_LOAD( "82s129.5mn", 0x0400, 0x0100, CRC(0fe0b108) SHA1(fcf27619208922345a1e42b3a219b4274f66968d) ) /* blue component + */ - ROM_LOAD( "63s141.5m", 0x0500, 0x0100, CRC(5553f675) SHA1(c50255af8d99664b92e0bb34a527fd42ebf7e759) ) /* blue component = a75-09.bpr*/ + ROM_LOAD( "63s141.5m", 0x0500, 0x0100, CRC(5553f675) SHA1(c50255af8d99664b92e0bb34a527fd42ebf7e759) ) /* blue component = a75-09.ic22*/ ROM_REGION( 0x0200, "pal", 0 ) - ROM_LOAD( "pal16r8.5f", 0x0000, 0x0104, CRC(36471917) SHA1(d0f295a94d480b44416e66be4b480b299aad5c3c) ) + ROM_LOAD( "pal16r8.5f", 0x0000, 0x0104, CRC(36471917) SHA1(d0f295a94d480b44416e66be4b480b299aad5c3c) ) /* likely used for the d008/d018/f000/f002 protection */ ROM_END /* this one still has the original copyright intact */ -ROM_START( arkgcbla ) +ROM_START( arkgcbla ) // similar to arkangc, but has added d008/d018/f000/f002 protection, likely using the PAL16R8 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "k101.e7", 0x0000, 0x8000, CRC(892a556e) SHA1(10d1a92f8ab1b8184b05182a2de070b163a603e2) ) ROM_LOAD( "k102.f7", 0x8000, 0x8000, CRC(d208d05c) SHA1(0aa99a0cb8211e7b90d681c91cc77aa7078a0ccc) ) ROM_REGION( 0x18000, "gfx1", 0 ) - ROM_LOAD( "a75-03.rom", 0x00000, 0x8000, CRC(038b74ba) SHA1(ac053cc4908b4075f918748b89570e07a0ba5116) ) - ROM_LOAD( "a75-04.rom", 0x08000, 0x8000, CRC(71fae199) SHA1(5d253c46ccf4cd2976a5fb8b8713f0f345443d06) ) - ROM_LOAD( "a75-05.rom", 0x10000, 0x8000, CRC(c76374e2) SHA1(7520dd48de20db60a2038f134dcaa454988e7874) ) + ROM_LOAD( "a75-03.rom", 0x00000, 0x8000, CRC(038b74ba) SHA1(ac053cc4908b4075f918748b89570e07a0ba5116) ) // = a75-03.ic64 + ROM_LOAD( "a75-04.rom", 0x08000, 0x8000, CRC(71fae199) SHA1(5d253c46ccf4cd2976a5fb8b8713f0f345443d06) ) // = a75-04.ic63 + ROM_LOAD( "a75-05.rom", 0x10000, 0x8000, CRC(c76374e2) SHA1(7520dd48de20db60a2038f134dcaa454988e7874) ) // = a75-05.ic62 ROM_REGION( 0x0600, "proms", 0 ) ROM_LOAD( "82s129.5k", 0x0000, 0x0100, CRC(fa70b64d) SHA1(273669d05f793cf1ee0741b175be281307fa9b5e) ) /* red component + */ @@ -1838,7 +1841,7 @@ ROM_START( arkgcbla ) ROM_LOAD( "63s141.5m", 0x0500, 0x0100, CRC(5553f675) SHA1(c50255af8d99664b92e0bb34a527fd42ebf7e759) ) /* blue component = a75-09.bpr*/ ROM_REGION( 0x0200, "pal", 0 ) - ROM_LOAD( "pal16r8.5f", 0x0000, 0x0104, CRC(36471917) SHA1(d0f295a94d480b44416e66be4b480b299aad5c3c) ) + ROM_LOAD( "pal16r8.5f", 0x0000, 0x0104, CRC(36471917) SHA1(d0f295a94d480b44416e66be4b480b299aad5c3c) ) /* likely used for the d008/d018/f000/f002 protection */ ROM_END @@ -2139,7 +2142,7 @@ GAME( 1986, arkangc, arkanoid, bootleg, arkangc, arkanoid_state, arkangc, GAME( 1986, arkangc2, arkanoid, bootleg, arkangc2, arkanoid_state, arkangc2, ROT90, "bootleg (Game Corporation)", "Arkanoid (Game Corporation bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, arkblock, arkanoid, bootleg, arkangc, arkanoid_state, arkblock, ROT90, "bootleg (Game Corporation)", "Block (Game Corporation bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, arkbloc2, arkanoid, bootleg, arkangc, arkanoid_state, arkbloc2, ROT90, "bootleg (Game Corporation)", "Block (Game Corporation bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, arkbloc3, arkanoid, bootleg, block2, arkanoid_state, block2, ROT90, "bootleg (Game Corporation)", "Block (Game Corporation bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) // Both these sets have an extra unknown rom +GAME( 1986, arkbloc3, arkanoid, bootleg, block2, arkanoid_state, block2, ROT90, "bootleg (Game Corporation)", "Block (Game Corporation bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) // Both these sets (arkblock3, block2) have an extra unknown rom GAME( 1986, block2, arkanoid, bootleg, block2, arkanoid_state, block2, ROT90, "bootleg (S.P.A. Co.)", "Block 2 (S.P.A. Co. bootleg)", MACHINE_SUPPORTS_SAVE ) // and scrambled gfx roms with 'space invader' themed gfx GAME( 1986, arkgcbl, arkanoid, bootleg, arkgcbl, arkanoid_state, arkgcbl, ROT90, "bootleg", "Arkanoid (bootleg on Block hardware, set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, arkgcbla, arkanoid, bootleg, arkgcbl, arkanoid_state, arkgcbl, ROT90, "bootleg", "Arkanoid (bootleg on Block hardware, set 2)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp index fc1d88c7169..fbaf3ba8be5 100644 --- a/src/mame/drivers/asteroid.cpp +++ b/src/mame/drivers/asteroid.cpp @@ -772,6 +772,23 @@ ROM_START( asteroidb ) ROM_LOAD( "034602-01.c8", 0x0000, 0x0100, CRC(97953db8) SHA1(8cbded64d1dd35b18c4d5cece00f77e7b2cab2ad) ) ROM_END +/* Space Rocks (J.Estevez, Barcelona). + Seems to be a legit spanish set, since there are documented cabs + registered in Spain. +*/ +ROM_START( spcrocks ) + ROM_REGION( 0x8000, "maincpu", 0 ) + ROM_LOAD( "1.bin", 0x6800, 0x0800, CRC(0cc75459) SHA1(2af85c9689b878155004da47fedbde5853a18723) ) + ROM_LOAD( "2.bin", 0x7000, 0x0800, CRC(096ed35c) SHA1(064d680ded7f30c543f93ae5ca85f90d550f73e5) ) + ROM_LOAD( "3.bin", 0x7800, 0x0800, CRC(b912754d) SHA1(d4ada3e162ff454a48468f6309947276df0c5331) ) + /* Vector ROM */ + ROM_LOAD( "e.bin", 0x5000, 0x0800, CRC(148ef465) SHA1(4b1158112364bc55b8aab4127949f9238c36b238) ) + + /* DVG PROM */ + ROM_REGION( 0x100, "user1", 0 ) + ROM_LOAD( "034602-01.c8", 0x0000, 0x0100, CRC(97953db8) SHA1(8cbded64d1dd35b18c4d5cece00f77e7b2cab2ad) ) +ROM_END + ROM_START( aerolitos ) ROM_REGION( 0x8000, "maincpu", 0 ) ROM_LOAD( "2516_1e.bin", 0x6800, 0x0800, CRC(0cc75459) SHA1(2af85c9689b878155004da47fedbde5853a18723) ) @@ -1023,6 +1040,7 @@ GAME( 1979, asteroid, 0, asteroid, asteroid, driver_device, 0, GAME( 1979, asteroid2, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, asteroid1, asteroid, asteroid, asteroid, driver_device, 0, ROT0, "Atari", "Asteroids (rev 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, asteroidb, asteroid, asteroid, asteroidb, asteroid_state, asteroidb, ROT0, "bootleg", "Asteroids (bootleg on Lunar Lander hardware)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, spcrocks, asteroid, asteroid, aerolitos, driver_device, 0, ROT0, "J.Estevez (Barcelona)", "Space Rocks (Spanish clone of Asteroids)", MACHINE_SUPPORTS_SAVE ) // Space Rocks seems to be a legit set. Cabinet registered to 'J.Estevez (Barcelona). GAME( 1980, aerolitos, asteroid, asteroid, aerolitos, driver_device, 0, ROT0, "bootleg (Rodmar Elec.)","Aerolitos (Spanish bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) // 'Aerolitos' appears on the cabinet, this was distributed in Spain, the Spanish text is different to that contained in the original version (corrected) GAME( 1979, asterock, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Sidam)", "Asterock (Sidam bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) GAME( 1979, asterockv, asteroid, asterock, asterock, asteroid_state, asterock, ROT0, "bootleg (Videotron)", "Asterock (Videotron bootleg of Asteroids)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp index f8a2519700e..d1fe3f3307d 100644 --- a/src/mame/drivers/at.cpp +++ b/src/mame/drivers/at.cpp @@ -17,6 +17,7 @@ #include "softlist.h" static ADDRESS_MAP_START( at16_map, AS_PROGRAM, 16, at_state ) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("bank10") AM_RANGE(0x0c0000, 0x0c7fff) AM_ROM AM_RANGE(0x0c8000, 0x0cffff) AM_ROM @@ -26,7 +27,7 @@ static ADDRESS_MAP_START( at16_map, AS_PROGRAM, 16, at_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( ps2m30286_map, AS_PROGRAM, 16, at_state) - AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("bank10") + AM_RANGE(0x000000, 0x09ffff) AM_RAMBANK("bank10") AM_RANGE(0x0c0000, 0x0c7fff) AM_ROM AM_RANGE(0x0c8000, 0x0cffff) AM_ROM AM_RANGE(0x0d0000, 0x0dffff) AM_RAM @@ -42,6 +43,7 @@ static ADDRESS_MAP_START( ps1_286_map, AS_PROGRAM, 16, at_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( at386_map, AS_PROGRAM, 32, at_state ) + ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x00000000, 0x0009ffff) AM_RAMBANK("bank10") AM_RANGE(0x000a0000, 0x000bffff) AM_NOP AM_RANGE(0x000c0000, 0x000c7fff) AM_ROM diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp index a3ad029f96b..b060c183f77 100644 --- a/src/mame/drivers/atarig1.cpp +++ b/src/mame/drivers/atarig1.cpp @@ -428,8 +428,6 @@ static MACHINE_CONFIG_START( atarig1, atarig1_state ) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen) - MCFG_SLAPSTIC_ADD("slapstic") - MCFG_MACHINE_START_OVERRIDE(atarig1_state,atarig1) MCFG_MACHINE_RESET_OVERRIDE(atarig1_state,atarig1) @@ -461,12 +459,44 @@ static MACHINE_CONFIG_START( atarig1, atarig1_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END + static MACHINE_CONFIG_DERIVED( hydra, atarig1 ) MCFG_ATARIRLE_ADD("rle", modesc_hydra) + MCFG_SLAPSTIC_ADD("slapstic", 116) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( hydrap, hydra ) + MCFG_DEVICE_REMOVE("slapstic") MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( pitfight9, atarig1 ) + MCFG_ATARIRLE_ADD("rle", modesc_pitfight) + MCFG_SLAPSTIC_ADD("slapstic", 114) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( pitfight7, atarig1 ) + MCFG_ATARIRLE_ADD("rle", modesc_pitfight) + MCFG_SLAPSTIC_ADD("slapstic", 112) +MACHINE_CONFIG_END + + static MACHINE_CONFIG_DERIVED( pitfight, atarig1 ) MCFG_ATARIRLE_ADD("rle", modesc_pitfight) + MCFG_SLAPSTIC_ADD("slapstic", 111) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( pitfightj, atarig1 ) + MCFG_ATARIRLE_ADD("rle", modesc_pitfight) + MCFG_SLAPSTIC_ADD("slapstic", 113) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( pitfightb, atarig1 ) + MCFG_ATARIRLE_ADD("rle", modesc_pitfight) MACHINE_CONFIG_END @@ -1198,28 +1228,30 @@ ROM_END * *************************************/ -void atarig1_state::init_common(offs_t slapstic_base, int slapstic, bool is_pitfight) +DRIVER_INIT_MEMBER(atarig1_state,hydra) { - if (slapstic == -1) - { - pitfightb_cheap_slapstic_init(); - save_item(NAME(m_bslapstic_bank)); - save_item(NAME(m_bslapstic_primed)); - } - else if (slapstic != 0) - slapstic_configure(*m_maincpu, slapstic_base, 0, slapstic); + slapstic_configure(*m_maincpu, 0x078000, 0); + m_is_pitfight = 0; +} - m_is_pitfight = is_pitfight; +DRIVER_INIT_MEMBER(atarig1_state,hydrap) +{ + m_is_pitfight = 0; } -DRIVER_INIT_MEMBER(atarig1_state,hydra) { init_common(0x078000, 116, 0); } -DRIVER_INIT_MEMBER(atarig1_state,hydrap) { init_common(0x000000, 0, 0); } +DRIVER_INIT_MEMBER(atarig1_state,pitfight) +{ + slapstic_configure(*m_maincpu, 0x038000, 0); + m_is_pitfight = 1; +} -DRIVER_INIT_MEMBER(atarig1_state,pitfight9) { init_common(0x038000, 114, 1); } -DRIVER_INIT_MEMBER(atarig1_state,pitfight7) { init_common(0x038000, 112, 1); } -DRIVER_INIT_MEMBER(atarig1_state,pitfight) { init_common(0x038000, 111, 1); } -DRIVER_INIT_MEMBER(atarig1_state,pitfightj) { init_common(0x038000, 113, 1); } -DRIVER_INIT_MEMBER(atarig1_state,pitfightb) { init_common(0x038000, -1, 1); } +DRIVER_INIT_MEMBER(atarig1_state,pitfightb) +{ + pitfightb_cheap_slapstic_init(); + save_item(NAME(m_bslapstic_bank)); + save_item(NAME(m_bslapstic_primed)); + m_is_pitfight = 1; +} /************************************* @@ -1228,15 +1260,15 @@ DRIVER_INIT_MEMBER(atarig1_state,pitfightb) { init_common(0x038000, -1, 1); } * *************************************/ -GAME( 1990, hydra, 0, hydra, hydra, atarig1_state, hydra, ROT0, "Atari Games", "Hydra", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, hydrap, hydra, hydra, hydra, atarig1_state, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/14/90)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, hydrap2, hydra, hydra, hydra, atarig1_state, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/25/90)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1990, pitfight, 0, pitfight, pitfight, atarig1_state, pitfight9, ROT0, "Atari Games", "Pit Fighter (rev 9)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pitfight7, pitfight, pitfight, pitfight, atarig1_state, pitfight7, ROT0, "Atari Games", "Pit Fighter (rev 7)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pitfight6, pitfight, pitfight, pitfight, atarig1_state, pitfightj, ROT0, "Atari Games", "Pit Fighter (rev 6)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pitfight5, pitfight, pitfight, pitfight, atarig1_state, pitfight7, ROT0, "Atari Games", "Pit Fighter (rev 5)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pitfight4, pitfight, pitfight, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pitfight3, pitfight, pitfight, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pitfightj, pitfight, pitfight, pitfightj, atarig1_state,pitfightj, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, pitfightb, pitfight, pitfight, pitfight, atarig1_state, pitfightb, ROT0, "bootleg", "Pit Fighter (bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, hydra, 0, hydra, hydra, atarig1_state, hydra, ROT0, "Atari Games", "Hydra", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, hydrap, hydra, hydrap, hydra, atarig1_state, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/14/90)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, hydrap2, hydra, hydrap, hydra, atarig1_state, hydrap, ROT0, "Atari Games", "Hydra (prototype 5/25/90)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1990, pitfight, 0, pitfight9, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 9)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pitfight7, pitfight, pitfight7, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 7)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pitfight6, pitfight, pitfightj, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 6)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pitfight5, pitfight, pitfight7, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 5)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pitfight4, pitfight, pitfight, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pitfight3, pitfight, pitfight, pitfight, atarig1_state, pitfight, ROT0, "Atari Games", "Pit Fighter (rev 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pitfightj, pitfight, pitfightj, pitfightj, atarig1_state,pitfight, ROT0, "Atari Games", "Pit Fighter (Japan, 2 players)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, pitfightb, pitfight, pitfightb, pitfight, atarig1_state, pitfightb, ROT0, "bootleg", "Pit Fighter (bootleg)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp index bc643691371..faf9e1d9562 100644 --- a/src/mame/drivers/atarisy1.cpp +++ b/src/mame/drivers/atarisy1.cpp @@ -713,8 +713,6 @@ static MACHINE_CONFIG_START( atarisy1, atarisy1_state ) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen) - MCFG_SLAPSTIC_ADD("slapstic") - MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -775,6 +773,30 @@ static MACHINE_CONFIG_START( atarisy1, atarisy1_state ) MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(atarisy1_state, via_pb_w)) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( marble, atarisy1 ) + MCFG_SLAPSTIC_ADD("slapstic", 103) +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( peterpak, atarisy1 ) + MCFG_SLAPSTIC_ADD("slapstic", 107) +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( indytemp, atarisy1 ) + MCFG_SLAPSTIC_ADD("slapstic", 105) +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( roadrunn, atarisy1 ) + MCFG_SLAPSTIC_ADD("slapstic", 108) +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( roadb109, atarisy1 ) + MCFG_SLAPSTIC_ADD("slapstic", 109) +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( roadb110, atarisy1 ) + MCFG_SLAPSTIC_ADD("slapstic", 110) +MACHINE_CONFIG_END + /************************************* @@ -2405,7 +2427,7 @@ ROM_END DRIVER_INIT_MEMBER(atarisy1_state,marble) { - slapstic_configure(*m_maincpu, 0x080000, 0, 103); + slapstic_configure(*m_maincpu, 0x080000, 0); m_joystick_type = 0; /* none */ m_trackball_type = 1; /* rotated */ @@ -2414,7 +2436,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,marble) DRIVER_INIT_MEMBER(atarisy1_state,peterpak) { - slapstic_configure(*m_maincpu, 0x080000, 0, 107); + slapstic_configure(*m_maincpu, 0x080000, 0); m_joystick_type = 1; /* digital */ m_trackball_type = 0; /* none */ @@ -2423,7 +2445,7 @@ DRIVER_INIT_MEMBER(atarisy1_state,peterpak) DRIVER_INIT_MEMBER(atarisy1_state,indytemp) { - slapstic_configure(*m_maincpu, 0x080000, 0, 105); + slapstic_configure(*m_maincpu, 0x080000, 0); m_joystick_type = 1; /* digital */ m_trackball_type = 0; /* none */ @@ -2432,25 +2454,16 @@ DRIVER_INIT_MEMBER(atarisy1_state,indytemp) DRIVER_INIT_MEMBER(atarisy1_state,roadrunn) { - slapstic_configure(*m_maincpu, 0x080000, 0, 108); + slapstic_configure(*m_maincpu, 0x080000, 0); m_joystick_type = 2; /* analog */ m_trackball_type = 0; /* none */ } -DRIVER_INIT_MEMBER(atarisy1_state,roadb109) -{ - slapstic_configure(*m_maincpu, 0x080000, 0, 109); - - m_joystick_type = 3; /* pedal */ - m_trackball_type = 2; /* steering wheel */ -} - - -DRIVER_INIT_MEMBER(atarisy1_state,roadb110) +DRIVER_INIT_MEMBER(atarisy1_state,roadblst) { - slapstic_configure(*m_maincpu, 0x080000, 0, 110); + slapstic_configure(*m_maincpu, 0x080000, 0); m_joystick_type = 3; /* pedal */ m_trackball_type = 2; /* steering wheel */ @@ -2464,35 +2477,35 @@ DRIVER_INIT_MEMBER(atarisy1_state,roadb110) * *************************************/ -GAME( 1984, atarisy1, 0, atarisy1, peterpak, atarisy1_state, peterpak, ROT0, "Atari Games", "Atari System 1 BIOS", MACHINE_IS_BIOS_ROOT ) - -GAME( 1984, marble, atarisy1, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 1)", 0 ) -GAME( 1984, marble2, marble, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 2)", 0 ) -GAME( 1984, marble3, marble, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 3)", 0 ) -GAME( 1984, marble4, marble, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 4)", 0 ) -GAME( 1984, marble5, marble, atarisy1, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 5 - LSI Cartridge)", 0 ) - -GAME( 1984, peterpak, atarisy1, atarisy1, peterpak, atarisy1_state, peterpak, ROT0, "Atari Games", "Peter Pack-Rat", 0 ) - -GAME( 1985, indytemp, atarisy1, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 1)", 0 ) -GAME( 1985, indytemp2,indytemp, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 2)", 0 ) -GAME( 1985, indytemp3,indytemp, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 3)", 0 ) -GAME( 1985, indytemp4,indytemp, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 4)", 0 ) -GAME( 1985, indytempd,indytemp, atarisy1, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (German)", 0 ) -GAME( 1985, indytempc,indytemp, atarisy1, indytemc, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (Cocktail)", MACHINE_IMPERFECT_GRAPHICS ) - -GAME( 1985, roadrunn, atarisy1, atarisy1, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 2)", 0 ) -GAME( 1985, roadrunn2,roadrunn, atarisy1, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 1+)", 0 ) -GAME( 1985, roadrunn1,roadrunn, atarisy1, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 1)", 0 ) - -GAME( 1987, roadblst, atarisy1, atarisy1, roadblst, atarisy1_state, roadb110, ROT0, "Atari Games", "Road Blasters (upright, rev 4)", 0 ) -GAME( 1987, roadblstg, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, German, rev 3)", 0 ) -GAME( 1987, roadblst3, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, rev 3)", 0 ) -GAME( 1987, roadblstg2, roadblst, atarisy1, roadblst, atarisy1_state, roadb110, ROT0, "Atari Games", "Road Blasters (upright, German, rev 2)", 0 ) -GAME( 1987, roadblst2, roadblst, atarisy1, roadblst, atarisy1_state, roadb110, ROT0, "Atari Games", "Road Blasters (upright, rev 2)", 0 ) -GAME( 1987, roadblstg1, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, German, rev 1)", 0 ) -GAME( 1987, roadblst1, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, rev 1)", 0 ) -GAME( 1987, roadblstc, roadblst, atarisy1, roadblst, atarisy1_state, roadb110, ROT0, "Atari Games", "Road Blasters (cockpit, rev 2)", 0 ) -GAME( 1987, roadblstcg, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (cockpit, German, rev 1)", MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1987, roadblstc1, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (cockpit, rev 1)", MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1987, roadblstgu, roadblst, atarisy1, roadblst, atarisy1_state, roadb109, ROT0, "Atari Games", "Road Blasters (upright, German, rev ?)", 0 ) +GAME( 1984, atarisy1, 0, peterpak, peterpak, atarisy1_state, peterpak, ROT0, "Atari Games", "Atari System 1 BIOS", MACHINE_IS_BIOS_ROOT ) + +GAME( 1984, marble, atarisy1, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 1)", 0 ) +GAME( 1984, marble2, marble, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 2)", 0 ) +GAME( 1984, marble3, marble, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 3)", 0 ) +GAME( 1984, marble4, marble, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 4)", 0 ) +GAME( 1984, marble5, marble, marble, marble, atarisy1_state, marble, ROT0, "Atari Games", "Marble Madness (set 5 - LSI Cartridge)", 0 ) + +GAME( 1984, peterpak, atarisy1, peterpak, peterpak, atarisy1_state, peterpak, ROT0, "Atari Games", "Peter Pack-Rat", 0 ) + +GAME( 1985, indytemp, atarisy1, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 1)", 0 ) +GAME( 1985, indytemp2,indytemp, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 2)", 0 ) +GAME( 1985, indytemp3,indytemp, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 3)", 0 ) +GAME( 1985, indytemp4,indytemp, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (set 4)", 0 ) +GAME( 1985, indytempd,indytemp, indytemp, indytemp, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (German)", 0 ) +GAME( 1985, indytempc,indytemp, indytemp, indytemc, atarisy1_state, indytemp, ROT0, "Atari Games", "Indiana Jones and the Temple of Doom (Cocktail)", MACHINE_IMPERFECT_GRAPHICS ) + +GAME( 1985, roadrunn, atarisy1, roadrunn, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 2)", 0 ) +GAME( 1985, roadrunn2,roadrunn, roadrunn, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 1+)", 0 ) +GAME( 1985, roadrunn1,roadrunn, roadrunn, roadrunn, atarisy1_state, roadrunn, ROT0, "Atari Games", "Road Runner (rev 1)", 0 ) + +GAME( 1987, roadblst, atarisy1, roadb110, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 4)", 0 ) +GAME( 1987, roadblstg, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev 3)", 0 ) +GAME( 1987, roadblst3, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 3)", 0 ) +GAME( 1987, roadblstg2, roadblst, roadb110, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev 2)", 0 ) +GAME( 1987, roadblst2, roadblst, roadb110, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 2)", 0 ) +GAME( 1987, roadblstg1, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev 1)", 0 ) +GAME( 1987, roadblst1, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, rev 1)", 0 ) +GAME( 1987, roadblstc, roadblst, roadb110, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, rev 2)", 0 ) +GAME( 1987, roadblstcg, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, German, rev 1)", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1987, roadblstc1, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (cockpit, rev 1)", MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1987, roadblstgu, roadblst, roadb109, roadblst, atarisy1_state, roadblst, ROT0, "Atari Games", "Road Blasters (upright, German, rev ?)", 0 ) diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp index 539e86f5a05..72161c4ca03 100644 --- a/src/mame/drivers/atarisy2.cpp +++ b/src/mame/drivers/atarisy2.cpp @@ -127,9 +127,6 @@ #include "emu.h" #include "includes/atarisy2.h" -#include "sound/tms5220.h" -#include "sound/2151intf.h" -#include "sound/pokey.h" #define MASTER_CLOCK XTAL_20MHz @@ -328,7 +325,7 @@ READ8_MEMBER(atarisy2_state::switch_6502_r) { int result = ioport("1840")->read(); - if ((m_has_tms5220) && (machine().device<tms5220_device>("tms")->readyq_r() == 0)) + if (m_tms5220.found() && (m_tms5220->readyq_r() == 0)) result &= ~0x04; if (!(ioport("1801")->read() & 0x80)) result |= 0x10; @@ -340,10 +337,10 @@ WRITE8_MEMBER(atarisy2_state::switch_6502_w) { output().set_led_value(0, data & 0x04); output().set_led_value(1, data & 0x08); - if (m_has_tms5220) + if (m_tms5220.found()) { data = 12 | ((data >> 5) & 1); - machine().device<tms5220_device>("tms")->set_frequency(MASTER_CLOCK/4 / (16 - data) / 2); + m_tms5220->set_frequency(MASTER_CLOCK/4 / (16 - data) / 2); } } @@ -629,7 +626,7 @@ WRITE8_MEMBER(atarisy2_state::mixer_w) if (!(data & 0x02)) rbott += 1.0/47; if (!(data & 0x04)) rbott += 1.0/22; gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott))); - set_ym2151_volume(gain * 100); + m_ym2151->set_output_gain(ALL_OUTPUTS, gain); /* bits 3-4 control the volume of the POKEYs, using 47k and 100k resistors */ rtop = 1.0/(1.0/100 + 1.0/100); @@ -637,16 +634,20 @@ WRITE8_MEMBER(atarisy2_state::mixer_w) if (!(data & 0x08)) rbott += 1.0/47; if (!(data & 0x10)) rbott += 1.0/22; gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott))); - set_pokey_volume(gain * 100); + m_pokey1->set_output_gain(ALL_OUTPUTS, gain); + m_pokey2->set_output_gain(ALL_OUTPUTS, gain); /* bits 5-7 control the volume of the TMS5220, using 22k, 47k, and 100k resistors */ - rtop = 1.0/(1.0/100 + 1.0/100); - rbott = 0; - if (!(data & 0x20)) rbott += 1.0/100; - if (!(data & 0x40)) rbott += 1.0/47; - if (!(data & 0x80)) rbott += 1.0/22; - gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott))); - set_tms5220_volume(gain * 100); + if (m_tms5220.found()) + { + rtop = 1.0/(1.0/100 + 1.0/100); + rbott = 0; + if (!(data & 0x20)) rbott += 1.0/100; + if (!(data & 0x40)) rbott += 1.0/47; + if (!(data & 0x80)) rbott += 1.0/22; + gain = (rbott == 0) ? 1.0 : ((1.0/rbott) / (rtop + (1.0/rbott))); + m_tms5220->set_output_gain(ALL_OUTPUTS, gain); + } } @@ -664,9 +665,9 @@ WRITE8_MEMBER(atarisy2_state::sound_reset_w) /* a large number of signals are reset when this happens */ m_soundcomm->reset(); machine().device("ymsnd")->reset(); - if (m_has_tms5220) + if (m_tms5220.found()) { - machine().device("tms")->reset(); // technically what happens is the tms5220 gets a long stream of 0xFF written to it when sound_reset_state is 0 which halts the chip after a few frames, but this works just as well, even if it isn't exactly true to hardware... The hardware may not have worked either, the resistors to pull input to 0xFF are fighting against the ls263 gate holding the latched value to be sent to the chip. + m_tms5220->reset(); // technically what happens is the tms5220 gets a long stream of 0xFF written to it when sound_reset_state is 0 which halts the chip after a few frames, but this works just as well, even if it isn't exactly true to hardware... The hardware may not have worked either, the resistors to pull input to 0xFF are fighting against the ls263 gate holding the latched value to be sent to the chip. } mixer_w(space, 0, 0); } @@ -714,17 +715,17 @@ READ8_MEMBER(atarisy2_state::sound_6502_r) WRITE8_MEMBER(atarisy2_state::tms5220_w) { - if (m_has_tms5220) + if (m_tms5220.found()) { - machine().device<tms5220_device>("tms")->data_w(space, 0, data); + m_tms5220->data_w(space, 0, data); } } WRITE8_MEMBER(atarisy2_state::tms5220_strobe_w) { - if (m_has_tms5220) + if (m_tms5220.found()) { - machine().device<tms5220_device>("tms")->wsq_w(1-(offset & 1)); + m_tms5220->wsq_w(1-(offset & 1)); } } @@ -1193,8 +1194,6 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state ) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)MASTER_CLOCK/2/16/16/16/10) - MCFG_SLAPSTIC_ADD("slapstic") - MCFG_MACHINE_START_OVERRIDE(atarisy2_state,atarisy2) MCFG_MACHINE_RESET_OVERRIDE(atarisy2_state,atarisy2) @@ -1240,15 +1239,42 @@ static MACHINE_CONFIG_START( atarisy2, atarisy2_state ) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( sprint, atarisy2 ) +static MACHINE_CONFIG_DERIVED( paperboy, atarisy2 ) + MCFG_SLAPSTIC_ADD("slapstic", 105) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( 720, atarisy2 ) + /* without the default EEPROM, 720 hangs at startup due to communication + issues with the sound CPU; temporarily increasing the sound CPU frequency + to ~2.2MHz "fixes" the problem */ + + MCFG_SLAPSTIC_ADD("slapstic", 107) +MACHINE_CONFIG_END - /* basic machine hardware */ + +static MACHINE_CONFIG_DERIVED( ssprint, atarisy2 ) + MCFG_SLAPSTIC_ADD("slapstic", 108) + + /* sound hardware */ + MCFG_DEVICE_REMOVE("tms") +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( csprint, atarisy2 ) + MCFG_SLAPSTIC_ADD("slapstic", 109) /* sound hardware */ MCFG_DEVICE_REMOVE("tms") MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( apb, atarisy2 ) + MCFG_SLAPSTIC_ADD("slapstic", 110) +MACHINE_CONFIG_END + + + /************************************* * @@ -3131,7 +3157,7 @@ DRIVER_INIT_MEMBER(atarisy2_state,paperboy) int i; UINT8 *cpu1 = memregion("maincpu")->base(); - m_slapstic->slapstic_init(machine(), 105); + m_slapstic->slapstic_init(); /* expand the 16k program ROMs into full 64k chunks */ for (i = 0x10000; i < 0x90000; i += 0x20000) @@ -3142,21 +3168,16 @@ DRIVER_INIT_MEMBER(atarisy2_state,paperboy) } m_pedal_count = 0; - m_has_tms5220 = 1; - machine().device<tms5220_device>("tms")->rsq_w(1); // /RS is tied high on sys2 hw + m_tms5220->rsq_w(1); // /RS is tied high on sys2 hw } DRIVER_INIT_MEMBER(atarisy2_state,720) { - /* without the default EEPROM, 720 hangs at startup due to communication - issues with the sound CPU; temporarily increasing the sound CPU frequency - to ~2.2MHz "fixes" the problem */ - m_slapstic->slapstic_init(machine(), 107); + m_slapstic->slapstic_init(); m_pedal_count = -1; - m_has_tms5220 = 1; - machine().device<tms5220_device>("tms")->rsq_w(1); // /RS is tied high on sys2 hw + m_tms5220->rsq_w(1); // /RS is tied high on sys2 hw } @@ -3165,14 +3186,13 @@ DRIVER_INIT_MEMBER(atarisy2_state,ssprint) int i; UINT8 *cpu1 = memregion("maincpu")->base(); - m_slapstic->slapstic_init(machine(), 108); + m_slapstic->slapstic_init(); /* expand the 32k program ROMs into full 64k chunks */ for (i = 0x10000; i < 0x90000; i += 0x20000) memcpy(&cpu1[i + 0x10000], &cpu1[i], 0x10000); m_pedal_count = 3; - m_has_tms5220 = 0; } @@ -3181,24 +3201,22 @@ DRIVER_INIT_MEMBER(atarisy2_state,csprint) int i; UINT8 *cpu1 = memregion("maincpu")->base(); - m_slapstic->slapstic_init(machine(), 109); + m_slapstic->slapstic_init(); /* expand the 32k program ROMs into full 64k chunks */ for (i = 0x10000; i < 0x90000; i += 0x20000) memcpy(&cpu1[i + 0x10000], &cpu1[i], 0x10000); m_pedal_count = 2; - m_has_tms5220 = 0; } DRIVER_INIT_MEMBER(atarisy2_state,apb) { - m_slapstic->slapstic_init(machine(), 110); + m_slapstic->slapstic_init(); m_pedal_count = 2; - m_has_tms5220 = 1; - machine().device<tms5220_device>("tms")->rsq_w(1); // /RS is tied high on sys2 hw + m_tms5220->rsq_w(1); // /RS is tied high on sys2 hw } @@ -3209,40 +3227,40 @@ DRIVER_INIT_MEMBER(atarisy2_state,apb) * *************************************/ -GAME( 1984, paperboy, 0, atarisy2, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, paperboyr2,paperboy, atarisy2, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, paperboyr1,paperboy, atarisy2, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 1)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1986, 720, 0, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, 720r3, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, 720r2, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, 720r1, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, 720g, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (German, rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, 720gr1, 720, atarisy2, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (German, rev 1)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1986, ssprint, 0, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, ssprint3, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, ssprint1, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, ssprintg, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (German, rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, ssprintg1,ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (German, rev 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, ssprintf, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (French)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, ssprints, ssprint, sprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (Spanish)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1986, csprint, 0, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, csprint2, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, csprint1, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, csprintg, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (German, rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, csprintg1,csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (German, rev 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, csprintf, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (French)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, csprints, csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (Spanish, rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, csprints1,csprint, sprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (Spanish, rev 1)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1987, apb, 0, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 7)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, apb6, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 6)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, apb5, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 5)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, apb4, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, apb3, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, apb2, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, apb1, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, apbg, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (German)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, apbf, apb, atarisy2, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (French)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, paperboy, 0, paperboy, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, paperboyr2,paperboy, paperboy, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, paperboyr1,paperboy, paperboy, paperboy, atarisy2_state, paperboy, ROT0, "Atari Games", "Paperboy (rev 1)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1986, 720, 0, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, 720r3, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, 720r2, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, 720r1, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (rev 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, 720g, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (German, rev 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, 720gr1, 720, 720, 720, atarisy2_state, 720, ROT0, "Atari Games", "720 Degrees (German, rev 1)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1986, ssprint, 0, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, ssprint3, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, ssprint1, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (rev 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, ssprintg, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (German, rev 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, ssprintg1,ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (German, rev 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, ssprintf, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (French)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, ssprints, ssprint, ssprint, ssprint, atarisy2_state, ssprint, ROT0, "Atari Games", "Super Sprint (Spanish)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1986, csprint, 0, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, csprint2, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, csprint1, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (rev 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, csprintg, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (German, rev 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, csprintg1,csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (German, rev 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, csprintf, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (French)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, csprints, csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (Spanish, rev 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, csprints1,csprint, csprint, csprint, atarisy2_state, csprint, ROT0, "Atari Games", "Championship Sprint (Spanish, rev 1)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1987, apb, 0, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 7)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, apb6, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 6)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, apb5, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 5)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, apb4, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, apb3, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, apb2, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, apb1, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (rev 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, apbg, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (German)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, apbf, apb, apb, apb, atarisy2_state, apb, ROT270, "Atari Games", "APB - All Points Bulletin (French)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/atetris.cpp b/src/mame/drivers/atetris.cpp index 61892668c33..a4f0365d896 100644 --- a/src/mame/drivers/atetris.cpp +++ b/src/mame/drivers/atetris.cpp @@ -330,7 +330,7 @@ static MACHINE_CONFIG_START( atetris, atetris_state ) MCFG_CPU_ADD("maincpu", M6502,MASTER_CLOCK/8) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_SLAPSTIC_ADD("slapstic") + MCFG_SLAPSTIC_ADD("slapstic", 101) MCFG_NVRAM_ADD_1FILL("nvram") @@ -367,7 +367,7 @@ static MACHINE_CONFIG_START( atetrisb2, atetris_state ) MCFG_CPU_ADD("maincpu", M6502,BOOTLEG_CLOCK/8) MCFG_CPU_PROGRAM_MAP(atetrisb2_map) - MCFG_SLAPSTIC_ADD("slapstic") + MCFG_SLAPSTIC_ADD("slapstic", 101) MCFG_NVRAM_ADD_1FILL("nvram") @@ -544,7 +544,7 @@ DRIVER_INIT_MEMBER(atetris_state,atetris) { UINT8 *rgn = memregion("maincpu")->base(); - m_slapstic_device->slapstic_init(machine(), 101); + m_slapstic_device->slapstic_init(); m_slapstic_source = &rgn[0x10000]; m_slapstic_base = &rgn[0x04000]; } diff --git a/src/mame/drivers/atom.cpp b/src/mame/drivers/atom.cpp index 6952735fb9e..6e8cb6e473f 100644 --- a/src/mame/drivers/atom.cpp +++ b/src/mame/drivers/atom.cpp @@ -602,8 +602,14 @@ WRITE_LINE_MEMBER( atom_state::atom_8271_interrupt_callback ) WRITE_LINE_MEMBER( atom_state::motor_w ) { - m_fdc->subdevice<floppy_connector>("0")->get_device()->mon_w(!state); - m_fdc->subdevice<floppy_connector>("1")->get_device()->mon_w(!state); + for (int i=0; i != 2; i++) { + char devname[1]; + sprintf(devname, "%d", i); + floppy_connector *con = m_fdc->subdevice<floppy_connector>(devname); + if (con) { + con->get_device()->mon_w(!state); + } + } } TIMER_DEVICE_CALLBACK_MEMBER(atom_state::cassette_output_tick) diff --git a/src/mame/drivers/blmbycar.cpp b/src/mame/drivers/blmbycar.cpp index 9c04c73df6f..b3bef4ec1c6 100644 --- a/src/mame/drivers/blmbycar.cpp +++ b/src/mame/drivers/blmbycar.cpp @@ -41,12 +41,11 @@ Check game speed, it depends on a bit we toggle.. /* The top 64k of samples are banked (16 banks total) */ -WRITE16_MEMBER(blmbycar_state::blmbycar_okibank_w) +WRITE16_MEMBER(blmbycar_state::okibank_w) { if (ACCESSING_BITS_0_7) { - UINT8 *RAM = memregion("oki")->base(); - memcpy(&RAM[0x30000], &RAM[0x40000 + 0x10000 * (data & 0xf)], 0x10000); + membank("okibank")->set_entry(data & 0x0f); } } @@ -98,12 +97,12 @@ READ16_MEMBER(blmbycar_state::blmbycar_opt_wheel_r) ***************************************************************************/ -static ADDRESS_MAP_START( blmbycar_map, AS_PROGRAM, 16, blmbycar_state ) +static ADDRESS_MAP_START( common_map, AS_PROGRAM, 16, blmbycar_state ) AM_RANGE(0x000000, 0x0fffff) AM_ROM AM_RANGE(0xfec000, 0xfeffff) AM_RAM AM_RANGE(0x100000, 0x103fff) AM_WRITEONLY // ??? - AM_RANGE(0x104000, 0x105fff) AM_RAM_WRITE(blmbycar_vram_1_w) AM_SHARE("vram_1") // Layer 1 - AM_RANGE(0x106000, 0x107fff) AM_RAM_WRITE(blmbycar_vram_0_w) AM_SHARE("vram_0") // Layer 0 + AM_RANGE(0x104000, 0x105fff) AM_RAM_WRITE(vram_1_w) AM_SHARE("vram_1") // Layer 1 + AM_RANGE(0x106000, 0x107fff) AM_RAM_WRITE(vram_0_w) AM_SHARE("vram_0") // Layer 0 AM_RANGE(0x108000, 0x10bfff) AM_WRITEONLY // ??? AM_RANGE(0x10c000, 0x10c003) AM_WRITEONLY AM_SHARE("scroll_1") // Scroll 1 AM_RANGE(0x10c004, 0x10c007) AM_WRITEONLY AM_SHARE("scroll_0") // Scroll 0 @@ -113,12 +112,17 @@ static ADDRESS_MAP_START( blmbycar_map, AS_PROGRAM, 16, blmbycar_state ) AM_RANGE(0x444000, 0x445fff) AM_WRITEONLY AM_SHARE("spriteram")// Sprites (size?) AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSW") AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P1_P2") + AM_RANGE(0x70000c, 0x70000d) AM_WRITE(okibank_w) // Sound + AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound +ADDRESS_MAP_END + +static ADDRESS_MAP_START( blmbycar_map, AS_PROGRAM, 16, blmbycar_state ) + AM_IMPORT_FROM(common_map) + AM_RANGE(0x700004, 0x700005) AM_READ(blmbycar_opt_wheel_r) // Wheel (optical) AM_RANGE(0x700006, 0x700007) AM_READ_PORT("UNK") AM_RANGE(0x700008, 0x700009) AM_READ(blmbycar_pot_wheel_r) // Wheel (potentiometer) AM_RANGE(0x70000a, 0x70000b) AM_WRITENOP // ? Wheel - AM_RANGE(0x70000c, 0x70000d) AM_WRITE(blmbycar_okibank_w) // Sound - AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // Sound AM_RANGE(0x70006a, 0x70006b) AM_WRITE(blmbycar_pot_wheel_reset_w) // Wheel (potentiometer) AM_RANGE(0x70007a, 0x70007b) AM_WRITE(blmbycar_pot_wheel_shift_w) // ADDRESS_MAP_END @@ -130,25 +134,16 @@ READ16_MEMBER(blmbycar_state::waterball_unk_r) } static ADDRESS_MAP_START( watrball_map, AS_PROGRAM, 16, blmbycar_state ) - AM_RANGE(0x000000, 0x0fffff) AM_ROM - AM_RANGE(0xfec000, 0xfeffff) AM_RAM - AM_RANGE(0x100000, 0x103fff) AM_WRITEONLY // ??? - AM_RANGE(0x104000, 0x105fff) AM_RAM_WRITE(blmbycar_vram_1_w) AM_SHARE("vram_1") // Layer 1 - AM_RANGE(0x106000, 0x107fff) AM_RAM_WRITE(blmbycar_vram_0_w) AM_SHARE("vram_0") // Layer 0 - AM_RANGE(0x108000, 0x10bfff) AM_WRITEONLY // ??? - AM_RANGE(0x10c000, 0x10c003) AM_WRITEONLY AM_SHARE("scroll_1") // Scroll 1 - AM_RANGE(0x10c004, 0x10c007) AM_WRITEONLY AM_SHARE("scroll_0") // Scroll 0 - AM_RANGE(0x200000, 0x2005ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_MIRROR(0x4000) // Palette - AM_RANGE(0x200600, 0x203fff) AM_RAM AM_MIRROR(0x4000) - AM_RANGE(0x440000, 0x441fff) AM_RAM - AM_RANGE(0x444000, 0x445fff) AM_WRITEONLY AM_SHARE("spriteram")// Sprites (size?) - AM_RANGE(0x700000, 0x700001) AM_READ_PORT("DSW") - AM_RANGE(0x700002, 0x700003) AM_READ_PORT("P1_P2") + AM_IMPORT_FROM(common_map) + AM_RANGE(0x700006, 0x700007) AM_READNOP // read AM_RANGE(0x700008, 0x700009) AM_READ(waterball_unk_r) // 0x0008 must toggle AM_RANGE(0x70000a, 0x70000b) AM_WRITEONLY // ?? busy - AM_RANGE(0x70000c, 0x70000d) AM_WRITE(blmbycar_okibank_w) // Sound - AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // +ADDRESS_MAP_END + +static ADDRESS_MAP_START( blmbycar_oki_map, AS_0, 8, blmbycar_state ) + AM_RANGE(0x00000, 0x2ffff) AM_ROM + AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank") ADDRESS_MAP_END /*************************************************************************** @@ -334,6 +329,8 @@ MACHINE_START_MEMBER(blmbycar_state,blmbycar) { save_item(NAME(m_pot_wheel)); save_item(NAME(m_old_val)); + + membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000); } MACHINE_RESET_MEMBER(blmbycar_state,blmbycar) @@ -359,7 +356,7 @@ static MACHINE_CONFIG_START( blmbycar, blmbycar_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(0x180, 0x100) MCFG_SCREEN_VISIBLE_AREA(0, 0x180-1, 0, 0x100-1) - MCFG_SCREEN_UPDATE_DRIVER(blmbycar_state, screen_update_blmbycar) + MCFG_SCREEN_UPDATE_DRIVER(blmbycar_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", blmbycar) @@ -371,6 +368,7 @@ static MACHINE_CONFIG_START( blmbycar, blmbycar_state ) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified + MCFG_DEVICE_ADDRESS_MAP(AS_0, blmbycar_oki_map) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) MACHINE_CONFIG_END @@ -379,6 +377,8 @@ MACHINE_CONFIG_END MACHINE_START_MEMBER(blmbycar_state,watrball) { save_item(NAME(m_retvalue)); + + membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000); } MACHINE_RESET_MEMBER(blmbycar_state,watrball) @@ -386,35 +386,19 @@ MACHINE_RESET_MEMBER(blmbycar_state,watrball) m_retvalue = 0; } -static MACHINE_CONFIG_START( watrball, blmbycar_state ) +static MACHINE_CONFIG_DERIVED( watrball, blmbycar ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* 12MHz */ + MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(watrball_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", blmbycar_state, irq1_line_hold) MCFG_MACHINE_START_OVERRIDE(blmbycar_state,watrball) MCFG_MACHINE_RESET_OVERRIDE(blmbycar_state,watrball) /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_MODIFY("screen") MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) - MCFG_SCREEN_SIZE(0x180, 0x100) MCFG_SCREEN_VISIBLE_AREA(0, 0x180-1, 16, 0x100-1) - MCFG_SCREEN_UPDATE_DRIVER(blmbycar_state, screen_update_blmbycar) - MCFG_SCREEN_PALETTE("palette") - - MCFG_GFXDECODE_ADD("gfxdecode", "palette", blmbycar) - MCFG_PALETTE_ADD("palette", 0x300) - MCFG_PALETTE_FORMAT(xxxxBBBBRRRRGGGG) - - /* sound hardware */ - MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") - - MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) MACHINE_CONFIG_END @@ -450,10 +434,9 @@ ROM_START( blmbycar ) ROM_LOAD( "bc_rom9", 0x100000, 0x080000, CRC(0337ab3d) SHA1(18c72cd640c7b599390dffaeb670f5832202bf06) ) ROM_LOAD( "bc_rom10", 0x180000, 0x080000, CRC(5458917e) SHA1(c8dd5a391cc20a573e27a140b185893a8c04859e) ) - ROM_REGION( 0x140000, "oki", 0 ) /* 8 bit adpcm (banked) */ - ROM_LOAD( "bc_rom1", 0x040000, 0x080000, CRC(ac6f8ba1) SHA1(69d2d47cdd331bde5a8973d29659b3f8520452e7) ) - ROM_LOAD( "bc_rom2", 0x0c0000, 0x080000, CRC(a4bc31bf) SHA1(f3d60141a91449a73f6cec9f4bc5d95ca7911e19) ) - ROM_COPY( "oki", 0x040000, 0x000000, 0x040000 ) + ROM_REGION( 0x100000, "oki", 0 ) /* 8 bit adpcm (banked) */ + ROM_LOAD( "bc_rom1", 0x000000, 0x080000, CRC(ac6f8ba1) SHA1(69d2d47cdd331bde5a8973d29659b3f8520452e7) ) + ROM_LOAD( "bc_rom2", 0x080000, 0x080000, CRC(a4bc31bf) SHA1(f3d60141a91449a73f6cec9f4bc5d95ca7911e19) ) ROM_END ROM_START( blmbycaru ) @@ -467,10 +450,9 @@ ROM_START( blmbycaru ) ROM_LOAD( "bc_rom9", 0x100000, 0x080000, CRC(0337ab3d) SHA1(18c72cd640c7b599390dffaeb670f5832202bf06) ) ROM_LOAD( "bc_rom10", 0x180000, 0x080000, CRC(5458917e) SHA1(c8dd5a391cc20a573e27a140b185893a8c04859e) ) - ROM_REGION( 0x140000, "oki", 0 ) /* 8 bit adpcm (banked) */ - ROM_LOAD( "bc_rom1", 0x040000, 0x080000, CRC(ac6f8ba1) SHA1(69d2d47cdd331bde5a8973d29659b3f8520452e7) ) - ROM_LOAD( "bc_rom2", 0x0c0000, 0x080000, CRC(a4bc31bf) SHA1(f3d60141a91449a73f6cec9f4bc5d95ca7911e19) ) - ROM_COPY( "oki", 0x040000, 0x000000, 0x040000 ) + ROM_REGION( 0x100000, "oki", 0 ) /* 8 bit adpcm (banked) */ + ROM_LOAD( "bc_rom1", 0x000000, 0x080000, CRC(ac6f8ba1) SHA1(69d2d47cdd331bde5a8973d29659b3f8520452e7) ) + ROM_LOAD( "bc_rom2", 0x080000, 0x080000, CRC(a4bc31bf) SHA1(f3d60141a91449a73f6cec9f4bc5d95ca7911e19) ) ROM_END /* @@ -478,7 +460,7 @@ ROM_END Waterball by ABM (sticker on the pcb 12-3-96) The pcb has some empty sockets, maybe it was used for other games since it has no markings. -The game has fonts identical to World rally and obiviously Blomby car ;) +The game has fonts identical to World Rally and obviously Blomby Car ;) 1x 68k 1x oki 6295 @@ -500,10 +482,9 @@ ROM_START( watrball ) ROM_LOAD( "rom9.bin", 0x100000, 0x080000, CRC(122cc0ad) SHA1(27cdb19fa082089e47c5cdb44742cfd93aa23a00) ) ROM_LOAD( "rom10.bin", 0x180000, 0x080000, CRC(22a2a706) SHA1(c7350a94a857e0007d7fc0076b44a3d62693cb6c) ) - ROM_REGION( 0x140000, "oki", 0 ) /* 8 bit adpcm (banked) */ - ROM_LOAD( "rom1.bin", 0x040000, 0x080000, CRC(7f88dee7) SHA1(d493b961fa4631185a33faee7f61786430707209)) -// ROM_LOAD( "rom2.bin", 0x0c0000, 0x080000, /* not populated for this game */ ) - ROM_COPY( "oki", 0x040000, 0x000000, 0x040000 ) + ROM_REGION( 0x100000, "oki", 0 ) /* 8 bit adpcm (banked) */ + ROM_LOAD( "rom1.bin", 0x000000, 0x080000, CRC(7f88dee7) SHA1(d493b961fa4631185a33faee7f61786430707209)) +// ROM_LOAD( "rom2.bin", 0x080000, 0x080000, /* not populated for this game */ ) ROM_END diff --git a/src/mame/drivers/bublbobl.cpp b/src/mame/drivers/bublbobl.cpp index f2fba272e1d..f79a6e7c61a 100644 --- a/src/mame/drivers/bublbobl.cpp +++ b/src/mame/drivers/bublbobl.cpp @@ -1550,6 +1550,42 @@ ROM_START( sboblboblc ) ROM_END + +ROM_START( sboblbobld ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "3.bin", 0x00000, 0x08000, CRC(524cdc4f) SHA1(f778e53f664e911a5b992a4f85bcad1097eaa36f) ) + /* ROMs banked at 8000-bfff */ + ROM_LOAD( "5.bin", 0x10000, 0x08000, CRC(13118eb1) SHA1(5a5da40c2cc82420f70bc58ffa32de1088c6c82f) ) + ROM_LOAD( "4.bin", 0x18000, 0x08000, CRC(13fe9baa) SHA1(ca1ca240d755621e533d9bbbdd8d953154670499) ) + /* 20000-2ffff empty */ + + ROM_REGION( 0x10000, "slave", 0 ) /* 64k for the second CPU */ + ROM_LOAD( "1.bin", 0x0000, 0x08000, CRC(ae11a07b) SHA1(af7a335c8da637103103cc274e077f123908ebb7) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for the third CPU */ + ROM_LOAD( "2.bin", 0x0000, 0x08000, CRC(4f9a26e8) SHA1(3105b34b88a7134493c2b3f584729f8b0407a011) ) + + ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "12", 0x00000, 0x8000, CRC(20358c22) SHA1(2297af6c53d5807bf90a8e081075b8c72a994fc5) ) /* 1st plane */ + ROM_LOAD( "13", 0x08000, 0x8000, CRC(930168a9) SHA1(fd358c3c3b424bca285f67a1589eb98a345ff670) ) + ROM_LOAD( "14", 0x10000, 0x8000, CRC(9773e512) SHA1(33c1687ee575d66bf0e98add45d06da827813765) ) + ROM_LOAD( "15", 0x18000, 0x8000, CRC(d045549b) SHA1(0c12077d3ddc2ce6aa45a0224ad5540f3f218446) ) + ROM_LOAD( "16", 0x20000, 0x8000, CRC(d0af35c5) SHA1(c5a89f4d73acc0db86654540b3abfd77b3757db5) ) + ROM_LOAD( "17", 0x28000, 0x8000, CRC(7b5369a8) SHA1(1307b26d80e6f36ebe6c442bebec41d20066eaf9) ) + /* 0x30000-0x3ffff empty */ + ROM_LOAD( "6", 0x40000, 0x8000, CRC(6b61a413) SHA1(44eddf12fb46fceca2addbe6da929aaea7636b13) ) /* 2nd plane */ + ROM_LOAD( "7", 0x48000, 0x8000, CRC(b5492d97) SHA1(d5b045e3ebaa44809757a4220cefb3c6815470da) ) + ROM_LOAD( "8", 0x50000, 0x8000, CRC(d69762d5) SHA1(3326fef4e0bd86681a3047dc11886bb171ecb609) ) + ROM_LOAD( "9", 0x58000, 0x8000, CRC(9f243b68) SHA1(32dce8d311a4be003693182a999e4053baa6bb0a) ) + ROM_LOAD( "10", 0x60000, 0x8000, CRC(66e9438c) SHA1(b94e62b6fbe7f4e08086d0365afc5cff6e0ccafd) ) + ROM_LOAD( "11", 0x68000, 0x8000, CRC(9ef863ad) SHA1(29f91b5a3765e4d6e6c3382db1d8d8297b6e56c8) ) + /* 0x70000-0x7ffff empty */ + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */ + +ROM_END + ROM_START( bub68705 ) ROM_REGION( 0x30000, "maincpu", 0 ) /* Program roms match Bubble Bobble (older) */ ROM_LOAD( "2.bin", 0x00000, 0x08000, CRC(32c8305b) SHA1(6bf69b3edfbefd33cd670a762b4bf0b39629a220) ) @@ -1861,6 +1897,7 @@ GAME( 1986, boblbobl, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl GAME( 1986, sboblbobl, bublbobl, boblbobl, sboblbobl, bublbobl_state, bublbobl, ROT0, "bootleg (Datsu)", "Super Bobble Bobble (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, sboblbobla, bublbobl, boblbobl, boblbobl, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, sboblboblb, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, sboblbobld, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bobble Bobble (bootleg, set 4)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, sboblboblc, bublbobl, boblbobl, sboblboblb, bublbobl_state, bublbobl, ROT0, "bootleg", "Super Bubble Bobble (bootleg)", MACHINE_SUPPORTS_SAVE ) // the title screen on this one isn't hacked GAME( 1986, bub68705, bublbobl, bub68705, bublbobl, bublbobl_state, bublbobl, ROT0, "bootleg", "Bubble Bobble (bootleg with 68705)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp index fb9e1ce66c2..e0b9a4584de 100644 --- a/src/mame/drivers/bw12.cpp +++ b/src/mame/drivers/bw12.cpp @@ -574,8 +574,8 @@ static MACHINE_CONFIG_START( common, bw12_state ) MCFG_PIA_WRITEPB_HANDLER(DEVWRITE8("cent_data_out", output_latch_device, write)) MCFG_PIA_CA2_HANDLER(DEVWRITELINE(CENTRONICS_TAG, centronics_device, write_strobe)) MCFG_PIA_CB2_HANDLER(WRITELINE(bw12_state, pia_cb2_w)) - MCFG_PIA_IRQA_HANDLER(DEVWRITELINE(Z80_TAG, z80_device, irq_line)) - MCFG_PIA_IRQB_HANDLER(DEVWRITELINE(Z80_TAG, z80_device, irq_line)) + MCFG_PIA_IRQA_HANDLER(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) + MCFG_PIA_IRQB_HANDLER(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) MCFG_Z80SIO0_ADD(Z80SIO_TAG, XTAL_16MHz/4, 0, 0, 0, 0) MCFG_Z80DART_OUT_TXDA_CB(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_txd)) diff --git a/src/mame/drivers/camplynx.cpp b/src/mame/drivers/camplynx.cpp index 96cc919dfb9..d5647dfbcde 100644 --- a/src/mame/drivers/camplynx.cpp +++ b/src/mame/drivers/camplynx.cpp @@ -831,7 +831,7 @@ static MACHINE_CONFIG_START( lynx48k, camplynx_state ) MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(8) MCFG_MC6845_UPDATE_ROW_CB(camplynx_state, lynx48k_update_row) - MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE("maincpu", z80_device, irq_line)) + MCFG_MC6845_OUT_VSYNC_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( lynx96k, lynx48k ) @@ -871,7 +871,7 @@ static MACHINE_CONFIG_START( lynx128k, camplynx_state ) MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(8) MCFG_MC6845_UPDATE_ROW_CB(camplynx_state, lynx128k_update_row) - MCFG_MC6845_OUT_VSYNC_CB(DEVWRITELINE("maincpu", z80_device, irq_line)) + MCFG_MC6845_OUT_VSYNC_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) MCFG_FRAGMENT_ADD(lynx_disk) MACHINE_CONFIG_END diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp index 366ef73c704..0b81164dd90 100644 --- a/src/mame/drivers/chihiro.cpp +++ b/src/mame/drivers/chihiro.cpp @@ -1015,7 +1015,7 @@ ROM_START( mj2c ) ROM_LOAD( "317-0374-jpn.pic", 0x000000, 0x004000, CRC(004f77a1) SHA1(bc5c6950293f3bff60bf7913d20a2046aa19ea69) ) ROM_END -ROM_START( mj2 ) +ROM_START( mj2f ) CHIHIRO_BIOS DISK_REGION( "gdrom" ) @@ -1041,12 +1041,11 @@ track01.bin 150 599 1058400 track02.raw 750 2101 3179904 track03.bin 45150 549299 1185760800 */ -ROM_START( mj2g ) +ROM_START( mj2 ) CHIHIRO_BIOS DISK_REGION( "gdrom" ) - // this is not CHDv4, but a really bad dump, only ~1/3 of disk content is dumped - DISK_IMAGE_READONLY( "gdx-0006g", 0, BAD_DUMP SHA1(e306837d5c093fdf1e9ff02239a8563535b1c181) ) + DISK_IMAGE_READONLY( "gdx-0006g", 0, SHA1(b8c8b440d4cd2488be78e3a002058ea5b176a1f2) ) ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF) ROM_LOAD( "317-0374-jpn.pic", 0x000000, 0x004000, CRC(004f77a1) SHA1(bc5c6950293f3bff60bf7913d20a2046aa19ea69) ) @@ -1237,8 +1236,8 @@ ROM_END /* 0006C */ GAME( 2004, mj2c, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev C) (GDX-0006C)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) // 0006D GAME( 2004, mj2d, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev D) (GDX-0006D)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) // 0006E GAME( 2004, mj2e, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev E) (GDX-0006E)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) -/* 0006F */ GAME( 2004, mj2, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev F) (GDX-0006F)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) -/* 0006G */ GAME( 2004, mj2g, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev G) (GDX-0006G)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) +/* 0006F */ GAME( 2004, mj2f, mj2, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev F) (GDX-0006F)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) +/* 0006G */ GAME( 2004, mj2, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega", "Sega Network Taisen Mahjong MJ 2 (Rev G) (GDX-0006G)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) /* 0007 */ GAME( 2004, ollie, chihiro, chihirogd, chihiro, driver_device, 0, ROT0, "Sega / Amusement Vision", "Ollie King (GDX-0007)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) // 0008 GAME( 2004, wangmdjo, wangmidj, chihirogd, chihiro, driver_device, 0, ROT0, "Namco", "Wangan Midnight Maximum Tune (Japan) (GDX-0008)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) // 0008A GAME( 2004, wangmdja, wangmidj, chihirogd, chihiro, driver_device, 0, ROT0, "Namco", "Wangan Midnight Maximum Tune (Japan) (Rev A) (GDX-0008A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp index c7b749278e5..8062af06612 100644 --- a/src/mame/drivers/cobra.cpp +++ b/src/mame/drivers/cobra.cpp @@ -155,7 +155,8 @@ 0x000a4: Viewport height / 2? 0x000ac: Viewport center Y - 0x00114: High word: framebuffer pitch? Low word: framebuffer pixel size? + 0x00114: xxxxxxxx xxxxxxxx -------- -------- Framebuffer pixel read line count + -------- -------- xxxxxxxx xxxxxxxx Framebuffer pixel read pixel count 0x00118: xxxxxxxx xxxxxxxx -------- -------- Framebuffer pixel read X pos -------- -------- xxxxxxxx xxxxxxxx Framebuffer pixel read Y pos @@ -1631,6 +1632,10 @@ WRITE64_MEMBER(cobra_state::main_fifo_w) gfx_ram[(0x38632c^4) / 4] = 0x38600000; // skip check_one_scene() } + // racjamdx + else if (strcmp(space.machine().system().name, "racjamdx") == 0) + { + } } m_main_debug_state = 0; @@ -2123,7 +2128,7 @@ void cobra_renderer::gfx_reset() UINT32 cobra_renderer::gfx_read_gram(UINT32 address) { - if (address & 3) + if (!DWORD_ALIGNED(address)) { printf("gfx_read_gram: %08X, not dword aligned!\n", address); return 0; @@ -2181,7 +2186,7 @@ void cobra_renderer::gfx_write_gram(UINT32 address, UINT32 mask, UINT32 data) } } - if (address & 3) + if (!DWORD_ALIGNED(address)) { printf("gfx_write_gram: %08X, %08X, not dword aligned!\n", address, data); return; @@ -2639,33 +2644,42 @@ void cobra_renderer::gfx_fifo_exec() { // Read a specified pixel position from a pixelbuffer -// printf("GFX: FB read X: %d, Y: %d\n", (UINT16)(m_gfx_gram[0x118/4] >> 16), (UINT16)(m_gfx_gram[0x118/4])); +// printf("GFX: FB read X: %d, Y: %d, %08X\n", (UINT16)(m_gfx_gram[0x118/4] >> 16), (UINT16)(m_gfx_gram[0x118/4]), m_gfx_gram[0x114/4]); int x = (m_gfx_gram[0x118/4] >> 16) & 0xffff; int y = m_gfx_gram[0x118/4] & 0xffff; - UINT32 *buffer; - switch (m_gfx_gram[0x80104/4]) - { - case 0x800000: buffer = &m_framebuffer->pix32(y); break; - case 0x200000: buffer = &m_backbuffer->pix32(y); break; - case 0x0e0000: buffer = &m_overlay->pix32(y); break; - case 0x000800: buffer = &m_zbuffer->pix32(y); break; - case 0x000200: buffer = &m_stencil->pix32(y); break; - - default: - { - fatalerror("gfxfifo_exec: fb read from buffer %08X!\n", m_gfx_gram[0x80100/4]); - } - } + int pix_count = m_gfx_gram[0x114/4] & 0xffff; + int line_count = (m_gfx_gram[0x114/4] >> 16) & 0xffff; // flush fifo_out so we have fresh data at top fifo_out->flush(); - fifo_out->push(nullptr, buffer[x+0]); - fifo_out->push(nullptr, buffer[x+1]); - fifo_out->push(nullptr, buffer[x+2]); - fifo_out->push(nullptr, buffer[x+3]); + if (pix_count != 4) + fatalerror("GFX: fb read line count %d, pix count %d\n", line_count, pix_count); + + for (int i=0; i < line_count; i++) + { + UINT32 *buffer; + switch (m_gfx_gram[0x80104/4]) + { + case 0x800000: buffer = &m_framebuffer->pix32(y+i); break; + case 0x200000: buffer = &m_backbuffer->pix32(y+i); break; + case 0x0e0000: buffer = &m_overlay->pix32(y+i); break; + case 0x000800: buffer = &m_zbuffer->pix32(y+i); break; + case 0x000200: buffer = &m_stencil->pix32(y+i); break; + + default: + { + fatalerror("gfxfifo_exec: fb read from buffer %08X!\n", m_gfx_gram[0x80100/4]); + } + } + + fifo_out->push(nullptr, buffer[x+0]); + fifo_out->push(nullptr, buffer[x+1]); + fifo_out->push(nullptr, buffer[x+2]); + fifo_out->push(nullptr, buffer[x+3]); + } cobra->m_gfx_re_status = RE_STATUS_IDLE; break; @@ -3022,7 +3036,7 @@ WRITE64_MEMBER(cobra_state::gfx_buf_w) // teximage_load() / mbuslib_prc_read(): 0x00A00001 0x10520800 -// printf("prc_read %08X%08X at %08X\n", (UINT32)(data >> 32), (UINT32)(data), activecpu_get_pc()); +// printf("prc_read %08X%08X at %08X\n", (UINT32)(data >> 32), (UINT32)(data), space.device().safe_pc()); m_renderer->gfx_fifo_exec(); diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp index 0a1a01a4ebc..f7d8d0a0466 100644 --- a/src/mame/drivers/cyberbal.cpp +++ b/src/mame/drivers/cyberbal.cpp @@ -389,8 +389,6 @@ static MACHINE_CONFIG_START( cyberbal, cyberbal_state ) MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_SLAPSTIC_ADD("slapstic") - MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8) MCFG_CPU_PROGRAM_MAP(sound_map) MCFG_DEVICE_PERIODIC_INT_DEVICE("soundcomm", atari_sound_comm_device, sound_irq_gen, (double)ATARI_CLOCK_14MHz/4/4/16/16/14) @@ -466,6 +464,8 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cyberbalt, cyberbal ) MCFG_DEVICE_REMOVE("eeprom") MCFG_ATARI_EEPROM_2816_ADD("eeprom") + + MCFG_SLAPSTIC_ADD("slapstic", 116) MACHINE_CONFIG_END @@ -997,20 +997,9 @@ ROM_END * *************************************/ -DRIVER_INIT_MEMBER(cyberbal_state,cyberbal) -{ - slapstic_configure(*m_maincpu, 0x018000, 0, 0); -} - - DRIVER_INIT_MEMBER(cyberbal_state,cyberbalt) { - slapstic_configure(*m_maincpu, 0x018000, 0, 116); -} - - -DRIVER_INIT_MEMBER(cyberbal_state,cyberbal2p) -{ + slapstic_configure(*m_maincpu, 0x018000, 0); } @@ -1021,14 +1010,14 @@ DRIVER_INIT_MEMBER(cyberbal_state,cyberbal2p) * *************************************/ -GAMEL(1988, cyberbal, 0, cyberbal, cyberbal, cyberbal_state, cyberbal, ROT0, "Atari Games", "Cyberball (rev 4)", 0, layout_dualhsxs ) -GAMEL(1988, cyberbal2, cyberbal, cyberbal, cyberbal, cyberbal_state, cyberbal, ROT0, "Atari Games", "Cyberball (rev 2)", 0, layout_dualhsxs ) -GAMEL(1988, cyberbalp, cyberbal, cyberbal, cyberbal, cyberbal_state, cyberbal, ROT0, "Atari Games", "Cyberball (prototype)", 0, layout_dualhsxs ) +GAMEL(1988, cyberbal, 0, cyberbal, cyberbal, driver_device, 0, ROT0, "Atari Games", "Cyberball (rev 4)", 0, layout_dualhsxs ) +GAMEL(1988, cyberbal2, cyberbal, cyberbal, cyberbal, driver_device, 0, ROT0, "Atari Games", "Cyberball (rev 2)", 0, layout_dualhsxs ) +GAMEL(1988, cyberbalp, cyberbal, cyberbal, cyberbal, driver_device, 0, ROT0, "Atari Games", "Cyberball (prototype)", 0, layout_dualhsxs ) -GAME( 1989, cyberbal2p, cyberbal, cyberbal2p, cyberbal2p, cyberbal_state, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 4)", 0 ) -GAME( 1989, cyberbal2p3, cyberbal, cyberbal2p, cyberbal2p, cyberbal_state, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 3)", 0 ) -GAME( 1989, cyberbal2p2, cyberbal, cyberbal2p, cyberbal2p, cyberbal_state, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 2)", 0 ) -GAME( 1989, cyberbal2p1, cyberbal, cyberbal2p, cyberbal2p, cyberbal_state, cyberbal2p, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 1)", 0 ) +GAME( 1989, cyberbal2p, cyberbal, cyberbal2p, cyberbal2p, driver_device, 0, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 4)", 0 ) +GAME( 1989, cyberbal2p3, cyberbal, cyberbal2p, cyberbal2p, driver_device, 0, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 3)", 0 ) +GAME( 1989, cyberbal2p2, cyberbal, cyberbal2p, cyberbal2p, driver_device, 0, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 2)", 0 ) +GAME( 1989, cyberbal2p1, cyberbal, cyberbal2p, cyberbal2p, driver_device, 0, ROT0, "Atari Games", "Cyberball 2072 (2 player, rev 1)", 0 ) GAMEL(1989, cyberbalt, cyberbal, cyberbalt, cyberbal, cyberbal_state, cyberbalt, ROT0, "Atari Games", "Tournament Cyberball 2072 (rev 2)", 0, layout_dualhsxs ) GAMEL(1989, cyberbalt1, cyberbal, cyberbalt, cyberbal, cyberbal_state, cyberbalt, ROT0, "Atari Games", "Tournament Cyberball 2072 (rev 1)", 0, layout_dualhsxs ) diff --git a/src/mame/drivers/deco156.cpp b/src/mame/drivers/deco156.cpp index faa0f3bb6a5..b8ab102bee1 100644 --- a/src/mame/drivers/deco156.cpp +++ b/src/mame/drivers/deco156.cpp @@ -8,9 +8,6 @@ See also deco32.c, deco_mlc.c, backfire.c - Todo: - complete co-processor emulation for wcvol95 - Emulation by Bryan McPhail, mish@tendril.co.uk */ @@ -628,8 +625,36 @@ ROM_START( wcvol95 ) // ROM_REGION( 0x80, "user1", 0 ) /* eeprom */ // ROM_LOAD( "93c46.3k", 0x00, 0x80, CRC(88f8e270) SHA1(cb82203ad38e0c12ea998562b7b785979726afe5) ) + + ROM_REGION( 0x200, "gals", 0 ) + ROM_LOAD( "GAL16V8B.10J.bin", 0x000, 0x117, CRC(06bbcbd5) SHA1(f7adb4bca13bb799bc42411eb178edfdc11a76c7) ) + ROM_LOAD( "GAL16V8B.5D.bin", 0x000, 0x117, CRC(117784f0) SHA1(daf3720740621fc3af49333c96795718b693f4d2)) ROM_END + + +ROM_START( wcvol95x ) + ROM_REGION( 0x100000, "maincpu", 0 ) /* DE156 code (encrypted) */ + // no label markings were present + ROM_LOAD32_WORD( "2f.bin", 0x000002, 0x080000, CRC(ac06633d) SHA1(5d37ca3050f35d5fc06f70e91b1522e325471585) ) + ROM_LOAD32_WORD( "4f.bin", 0x000000, 0x080000, CRC(e211f67a) SHA1(d008c2b809482f17ada608134357fa1205d767d4) ) + + ROM_REGION( 0x080000, "gfx1", 0 ) + ROM_LOAD( "mbx-00.9a", 0x000000, 0x080000, CRC(a0b24204) SHA1(cec8089c6c635f23b3a4aeeef2c43f519568ad70) ) + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD16_BYTE( "mbx-01.12a", 0x000000, 0x100000, CRC(73deb3f1) SHA1(c0cabecfd88695afe0f27c5bb115b4973907207d) ) + ROM_LOAD16_BYTE( "mbx-02.13a", 0x000001, 0x100000, CRC(3204d324) SHA1(44102f71bae44bf3a9bd2de7e5791d959a2c9bdd) ) + + ROM_REGION( 0x200000, "ymz", 0 ) /* YMZ280B-F samples */ + ROM_LOAD( "mbx-03.13j", 0x00000, 0x200000, CRC(061632bc) SHA1(7900ac56e59f4a4e5768ce72f4a4b7c5875f5ae8) ) + + ROM_REGION( 0x200, "gals", 0 ) + ROM_LOAD( "GAL16V8B.10J.bin", 0x000, 0x117, CRC(06bbcbd5) SHA1(f7adb4bca13bb799bc42411eb178edfdc11a76c7) ) + ROM_LOAD( "GAL16V8B.5D.bin", 0x000, 0x117, CRC(117784f0) SHA1(daf3720740621fc3af49333c96795718b693f4d2)) +ROM_END + + /**********************************************************************************/ void deco156_state::descramble_sound( const char *tag ) @@ -677,3 +702,4 @@ GAME( 1993, hvysmsh, 0, hvysmsh, hvysmsh, deco156_state, hvysmsh, ROT0, GAME( 1993, hvysmsha, hvysmsh, hvysmsh, hvysmsh, deco156_state, hvysmsh, ROT0, "Data East Corporation", "Heavy Smash (Asia version -4)", MACHINE_SUPPORTS_SAVE ) GAME( 1993, hvysmshj, hvysmsh, hvysmsh, hvysmsh, deco156_state, hvysmsh, ROT0, "Data East Corporation", "Heavy Smash (Japan version -2)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, wcvol95, 0, wcvol95, wcvol95, deco156_state, wcvol95, ROT0, "Data East Corporation", "World Cup Volley '95 (Japan v1.0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, wcvol95x, wcvol95, wcvol95, wcvol95, deco156_state, wcvol95, ROT0, "Data East Corporation", "World Cup Volley '95 Extra Version (Asia v2.0B)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/deshoros.cpp b/src/mame/drivers/deshoros.cpp index b1884ab9265..dac7f3a989d 100644 --- a/src/mame/drivers/deshoros.cpp +++ b/src/mame/drivers/deshoros.cpp @@ -12,7 +12,7 @@ It is not Y2K compliant. Rough cpanel sketch: - [LED-array dispay] 1 2 3 M + [LED-array display] 1 2 3 M 4 5 6 F 7 8 9 0 CLEAR ENTER diff --git a/src/mame/drivers/elecbowl.cpp b/src/mame/drivers/elecbowl.cpp index 65a2070bc5c..297288fcbde 100644 --- a/src/mame/drivers/elecbowl.cpp +++ b/src/mame/drivers/elecbowl.cpp @@ -6,7 +6,7 @@ Marx Series 300 Electronic Bowling Game Main board: - * TMS1100NLL MP3403 DBS 7836 SINGAPORE + * TMS1100NLL MP3403 DBS 7836 SINGAPORE (no decap) * 4*SN75492 quad segment driver, 2*SN74259 8-line demultiplexer, 2*CD4043 quad r/s input latch * 5 7seg LEDs, 15 lamps(10 lamps projected to bowling pins reflection), @@ -161,7 +161,7 @@ INPUT_PORTS_END ***************************************************************************/ -// output PLA is not dumped +// output PLA is not decapped static const UINT16 elecbowl_output_pla[0x20] = { lA+lB+lC+lD+lE+lF, // 0 @@ -183,7 +183,7 @@ static const UINT16 elecbowl_output_pla[0x20] = static MACHINE_CONFIG_START( elecbowl, elecbowl_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 350000) // RC osc. R=33K, C=100pf -> ~350kHz + MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K, C=100pf MCFG_TMS1XXX_OUTPUT_PLA(elecbowl_output_pla) MCFG_TMS1XXX_READ_K_CB(READ8(elecbowl_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(elecbowl_state, write_r)) @@ -211,7 +211,7 @@ ROM_START( elecbowl ) ROM_LOAD( "mp3403.u9", 0x0000, 0x0800, CRC(9eabaa7d) SHA1(b1f54587ed7f2bbf3a5d49075c807296384c2b06) ) ROM_REGION( 867, "maincpu:mpla", 0 ) - ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified + ROM_LOAD( "tms1100_common3_micro.pla", 0, 867, BAD_DUMP CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) ) // not verified ROM_REGION( 365, "maincpu:opla", 0 ) ROM_LOAD( "tms1100_elecbowl_output.pla", 0, 365, NO_DUMP ) ROM_END diff --git a/src/mame/drivers/electron.cpp b/src/mame/drivers/electron.cpp index dc1e2142212..106fc034a03 100644 --- a/src/mame/drivers/electron.cpp +++ b/src/mame/drivers/electron.cpp @@ -64,7 +64,6 @@ Incomplete: Missing: - Support for floppy disks - Other peripherals - - Keyboard is missing the 'Break' key ******************************************************************************/ #include "emu.h" @@ -93,34 +92,39 @@ PALETTE_INIT_MEMBER(electron_state, electron) } static ADDRESS_MAP_START(electron_mem, AS_PROGRAM, 8, electron_state ) - AM_RANGE(0x0000, 0x7fff) AM_RAM AM_REGION("maincpu", 0x00000) /* 32KB of RAM */ - AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank2") /* Banked ROM pages */ - AM_RANGE(0xc000, 0xfbff) AM_ROM AM_REGION("user1", 0x40000) /* OS ROM */ - AM_RANGE(0xfc00, 0xfcff) AM_READWRITE(electron_jim_r, electron_jim_w ) /* JIM pages */ - AM_RANGE(0xfd00, 0xfdff) AM_READWRITE(electron_1mhz_r, electron_1mhz_w ) /* 1 MHz bus */ - AM_RANGE(0xfe00, 0xfeff) AM_READWRITE(electron_ula_r, electron_ula_w ) /* Electron ULA */ - AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("user1", 0x43f00) /* OS ROM continued */ + AM_RANGE(0x0000, 0x7fff) AM_RAM AM_REGION("maincpu", 0x00000) /* 32KB of RAM */ + AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank2") /* Banked ROM pages */ + AM_RANGE(0xc000, 0xfbff) AM_ROM AM_REGION("user1", 0x40000) /* OS ROM */ + AM_RANGE(0xfc00, 0xfcff) AM_READWRITE(electron_fred_r, electron_fred_w ) /* FRED */ + AM_RANGE(0xfd00, 0xfdff) AM_READWRITE(electron_jim_r, electron_jim_w ) /* JIM */ + AM_RANGE(0xfe00, 0xfeff) AM_READWRITE(electron_sheila_r, electron_sheila_w ) /* SHEILA */ + AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("user1", 0x43f00) /* OS ROM continued */ ADDRESS_MAP_END +INPUT_CHANGED_MEMBER(electron_state::trigger_reset) +{ + m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); +} + static INPUT_PORTS_START( electron ) PORT_START("LINE.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x92 | \\") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR('|') PORT_CHAR('\\') // on the real keyboard, this would be on the 1st row, the 3rd key after 0 PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("COPY") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHAR('[') PORT_CHAR(']') - /* PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("<NONE>") PORT_CODE(KEYCODE_) */ + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_START("LINE.1") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x90 ^ ~") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHAR('^') PORT_CHAR('~') PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x93 _ }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHAR('_') PORT_CHAR('}') - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DELETE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_START("LINE.2") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91 \xC2\xA3 {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR('\xA3') PORT_CHAR('{') PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') - /* PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("<NONE>") PORT_CODE(KEYCODE_) */ + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_START("LINE.3") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('@') @@ -188,10 +192,12 @@ static INPUT_PORTS_START( electron ) PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_START("BRK") /* BREAK */ + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("BREAK") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) PORT_CHANGED_MEMBER(DEVICE_SELF, electron_state, trigger_reset, 0) INPUT_PORTS_END static MACHINE_CONFIG_START( electron, electron_state ) - MCFG_CPU_ADD( "maincpu", M6502, 2000000 ) + MCFG_CPU_ADD( "maincpu", M6502, XTAL_16MHz/8 ) MCFG_CPU_PROGRAM_MAP( electron_mem) MCFG_SCREEN_ADD("screen", RASTER) @@ -212,11 +218,13 @@ static MACHINE_CONFIG_START( electron, electron_state ) MCFG_CASSETTE_ADD( "cassette" ) MCFG_CASSETTE_FORMATS(uef_cassette_formats) MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY) + MCFG_CASSETTE_INTERFACE("electron_cass") MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "electron_cart") MCFG_GENERIC_LOAD(electron_state, electron_cart) /* software lists */ + MCFG_SOFTWARE_LIST_ADD("cass_list","electron_cass") MCFG_SOFTWARE_LIST_ADD("cart_list","electron_cart") MACHINE_CONFIG_END @@ -246,5 +254,6 @@ ROM_START(electron) /* 3c000 15 available for cartridges with a language ROM */ ROM_END -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP ( 1983, electron, 0, 0, electron, electron, driver_device, 0, "Acorn", "Acorn Electron", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ +COMP ( 1983, electron, 0, 0, electron, electron, driver_device, 0, "Acorn", "Acorn Electron", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +//COMP ( 1985, btm2501, electron, 0, electron, electron, driver_device, 0, "British Telecom Business Systems", "Merlin M2501", MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/ep64.cpp b/src/mame/drivers/ep64.cpp index eb537de944b..84a529841f9 100644 --- a/src/mame/drivers/ep64.cpp +++ b/src/mame/drivers/ep64.cpp @@ -516,7 +516,7 @@ static MACHINE_CONFIG_START( ep64, ep64_state ) MCFG_EP64_EXPANSION_BUS_SLOT_DAVE(DAVE_TAG) MCFG_EP64_EXPANSION_BUS_SLOT_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0)) MCFG_EP64_EXPANSION_BUS_SLOT_NMI_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_NMI)) - MCFG_EP64_EXPANSION_BUS_SLOT_WAIT_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT)) + MCFG_EP64_EXPANSION_BUS_SLOT_WAIT_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT)) MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer") MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(ep64_state, write_centronics_busy)) diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp index 8ba0616585e..01f12b0de2b 100644 --- a/src/mame/drivers/esd16.cpp +++ b/src/mame/drivers/esd16.cpp @@ -826,6 +826,37 @@ ROM_START( multchmpk ) ROM_LOAD( "esd4.su10", 0x00000, 0x20000, CRC(6e741fcd) SHA1(742e0952916c00f67dd9f8d01e721a9a538d2fc4) ) ROM_END +ROM_START( multchmpa ) + ROM_REGION( 0x080000, "maincpu", 0 ) /* 68000 Code */ + ROM_LOAD16_BYTE( "esd2.cu02", 0x000000, 0x040000, CRC(bfd39198) SHA1(11c0cb7a865daa1be9301ddfa5f5d2014e8f9908) ) + ROM_LOAD16_BYTE( "esd1.cu03", 0x000001, 0x040000, CRC(cd769077) SHA1(741cca679393dab031691834874c96fee791241e) ) + + ROM_REGION( 0x40000, "audiocpu", 0 ) /* Z80 Code */ + ROM_LOAD( "esd3.su01", 0x00000, 0x20000, CRC(7c178bd7) SHA1(8754d3c70d9b2bf369a5ce0cce4cc0696ed22750) ) + + ROM_REGION( 0x180000, "spr", 0 ) /* Sprites, 16x16x5 */ + ROM_LOAD16_BYTE( "esd17.ju06", 0x000000, 0x040000, CRC(51f01067) SHA1(d5ebbc7d358b63724d2f24da8b2ce4a202be37a5) ) + ROM_LOAD16_BYTE( "esd16.ju05", 0x000001, 0x040000, CRC(88e252e8) SHA1(07d898379798c6be42b636762b0af61b9111a480) ) + ROM_LOAD16_BYTE( "esd15.ju04", 0x080000, 0x040000, CRC(b1ae7f08) SHA1(37dd9d4cef8b9e1d09d7b46a9794fb2b777c9a01) ) + ROM_LOAD16_BYTE( "esd14.ju03", 0x080001, 0x040000, CRC(d8f06fa8) SHA1(f76912f93f99578529612a7f01d82ac7229a8e41) ) + ROM_LOAD16_BYTE( "esd13.ju07", 0x100000, 0x040000, CRC(9d1590a6) SHA1(35f634dbf0df06ec62359c7bae43c7f5d14b0ab2) ) + + ROM_REGION( 0x400000, "bgs", 0 ) /* Layers, 16x16x8 */ + ROM_LOAD32_BYTE( "esd9.fu28", 0x000000, 0x080000, CRC(a3cfe895) SHA1(a8dc0d5d9e64d4c5112177b8f20b5bdb86ca73af) ) + ROM_LOAD32_BYTE( "esd11.fu29", 0x000001, 0x080000, CRC(d3c1855e) SHA1(bb547d4a45a745e9ae4a6727087cdf325105de90) ) + ROM_LOAD32_BYTE( "esd7.fu26", 0x000002, 0x080000, CRC(042d59ff) SHA1(8e45a4757e07d8aaf50b151d8849c1a27424e64b) ) + ROM_LOAD32_BYTE( "esd5.fu27", 0x000003, 0x080000, CRC(ed5b4e58) SHA1(82c3ee9e2525c0b370a29d5560c21ec6380d1a43) ) + ROM_LOAD32_BYTE( "esd10.fu31", 0x200000, 0x080000, CRC(396d77b6) SHA1(f22449a7f9f50e172e36db4f399c14e527409884) ) + ROM_LOAD32_BYTE( "esd12.fu33", 0x200001, 0x080000, CRC(a68848a8) SHA1(915239a961d76af6a1a567eb89b1569f158e714e) ) + ROM_LOAD32_BYTE( "esd8.fu30", 0x200002, 0x080000, CRC(fa8cd2d3) SHA1(ddc1b98867e6d2eee458bf35a933e7cdc59f4c7e) ) + ROM_LOAD32_BYTE( "esd6.fu32", 0x200003, 0x080000, CRC(97fde7b1) SHA1(b3610f6fcc1367ff079dc01121c86bc1e1f4c7a2) ) + + ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ + ROM_LOAD( "esd4.su08", 0x00000, 0x20000, CRC(6e741fcd) SHA1(742e0952916c00f67dd9f8d01e721a9a538d2fc4) ) +ROM_END + + + /* Multi Champ Deluxe @@ -1530,7 +1561,9 @@ ROM_END /* ESD 11-09-98 */ GAME( 1999, multchmp, 0, esd16, multchmp, driver_device, 0, ROT0, "ESD", "Multi Champ (World, ver. 2.5)", MACHINE_SUPPORTS_SAVE ) -GAME( 1998, multchmpk,multchmp, esd16, multchmp, driver_device, 0, ROT0, "ESD", "Multi Champ (Korea)", MACHINE_SUPPORTS_SAVE ) +GAME( 1998, multchmpk,multchmp, esd16, multchmp, driver_device, 0, ROT0, "ESD", "Multi Champ (Korea, older)", MACHINE_SUPPORTS_SAVE ) +GAME( 1998, multchmpa,multchmp, esd16, multchmp, driver_device, 0, ROT0, "ESD", "Multi Champ (World, older)", MACHINE_SUPPORTS_SAVE ) + GAME( 2001, jumppop, 0, jumppop, jumppop, driver_device, 0, ROT0, "ESD", "Jumping Pop (set 1)", MACHINE_SUPPORTS_SAVE ) /* Redesigned(?) ESD 11-09-98 with no ID# */ GAME( 2001, jumppope, jumppop, jumppop, jumppop, driver_device, 0, ROT0, "Emag Soft", "Jumping Pop (set 2)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp index 4abd445eb35..af10ddd4bd1 100644 --- a/src/mame/drivers/fantland.cpp +++ b/src/mame/drivers/fantland.cpp @@ -1047,7 +1047,7 @@ static MACHINE_CONFIG_START( wheelrun, fantland_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_14MHz/4) - MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", z80_device, irq_line)) + MCFG_YM3526_IRQ_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_IRQ0)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END diff --git a/src/mame/drivers/fidel6502.cpp b/src/mame/drivers/fidel6502.cpp index 2a17baa6590..43bdd8337c8 100644 --- a/src/mame/drivers/fidel6502.cpp +++ b/src/mame/drivers/fidel6502.cpp @@ -3,10 +3,260 @@ /****************************************************************************** Fidelity Electronics 6502 based board driver - See drivers/fidelz80.cpp for hardware description + +****************************************************************************** + +Champion Sensory Chess Challenger (CSC) +--------------------------------------- + +Memory map: +----------- +0000-07FF: 2K of RAM +0800-0FFF: 1K of RAM (note: mirrored twice) +1000-17FF: PIA 0 (display, TSI speech chip) +1800-1FFF: PIA 1 (keypad, LEDs) +2000-3FFF: 101-64019 ROM (also used on the regular sensory chess challenger) +4000-7FFF: mirror of 0000-3FFF +8000-9FFF: not used +A000-BFFF: 101-1025A03 ROM +C000-DFFF: 101-1025A02 ROM +E000-FDFF: 101-1025A01 ROM +FE00-FFFF: 512 byte 74S474 PROM + +CPU is a 6502 running at 1.95MHz (3.9MHz resonator, divided by 2) + +NMI is not used. +IRQ is connected to a 600Hz oscillator (38.4KHz divided by 64). +Reset is connected to a power-on reset circuit. + +PIA 0: +------ +PA0 - 7seg segments E, TSI A0 +PA1 - 7seg segments D, TSI A1 +PA2 - 7seg segments C, TSI A2 +PA3 - 7seg segments H, TSI A3 +PA4 - 7seg segments G, TSI A4 +PA5 - 7seg segments F, TSI A5 +PA6 - 7seg segments B +PA7 - 7seg segments A + +PB0 - A12 on speech ROM (if used... not used on this model, ROM is 4K) +PB1 - START line on TSI +PB2 - white wire +PB3 - BUSY line from TSI +PB4 - hi/lo TSI speaker volume +PB5 - button row 9 +PB6 - selection jumper (resistor to 5V) +PB7 - selection jumper (resistor to ground) + +CA1 - NC +CA2 - violet wire + +CB1 - NC +CB2 - NC (connects to pin 14 of soldered connector) + +PIA 1: +------ +PA0 - button row 1 +PA1 - button row 2 +PA2 - button row 3 +PA3 - button row 4 +PA4 - button row 5 +PA5 - button row 6 +PA6 - 7442 selector bit 0 +PA7 - 7442 selector bit 1 + +PB0 - LED row 1 +PB1 - LED row 2 +PB2 - LED row 3 +PB3 - LED row 4 +PB4 - LED row 5 +PB5 - LED row 6 +PB6 - LED row 7 +PB7 - LED row 8 + +CA1 - button row 7 +CA2 - selector bit 3 + +CB1 - button row 8 +CB2 - selector bit 2 + +Selector: (attached to PIA 1, outputs 1 of 10 pins low. 7442) +--------- +output # (selected turns this column on, and all others off) +0 - LED column A, button column A, 7seg digit 1 +1 - LED column B, button column B, 7seg digit 2 +2 - LED column C, button column C, 7seg digit 3 +3 - LED column D, button column D, 7seg digit 4 +4 - LED column E, button column E +5 - LED column F, button column F +6 - LED column G, button column G +7 - LED column H, button column H +8 - button column I +9 - Tone line (toggle to make a tone in the buzzer) + +The rows/columns are indicated on the game board: + + ABCDEFGH I +-------------- +| | 8 +| | 7 +| | 6 +| | 5 +| | 4 +| | 3 +| | 2 +| | 1 +-------------- + +The "lone LED" is above the control column. +column I is the "control column" on the right for starting a new game, etc. + +The upper 6 buttons are connected as such: + +column A - speak +column B - RV +column C - TM +column D - LV +column E - DM +column F - ST + +these 6 buttons use row 9 (connects to PIA 0) + +LED display: +------------ +43 21 (digit number) +----- +88:88 + +The LED display is four 7 segment digits. normal ABCDEFG lettering is used for segments. + +The upper dot is connected to digit 3 common +The lower dot is connected to digit 4 common +The lone LED is connected to digit 1 common + +All three of the above are called "segment H". + + +****************************************************************************** + +Sensory Chess Challenger (SC12-B, 6086) +4 versions are known to exist: A,B,C, and X, with increasing CPU speed. +--------------------------------- +RE information from netlist by Berger + +8*(8+1) buttons, 8+8+2 red LEDs +DIN 41524C printer port +36-pin edge connector +CPU is a R65C02P4, running at 4MHz + +NE556 dual-timer IC: +- timer#1, one-shot at power-on, to CPU _RESET +- timer#2: R1=82K, R2=1K, C=22nf, to CPU _IRQ: ~780Hz, active low=15.25us + +Memory map: +----------- +6000-0FFF: 4K RAM (2016 * 2) +2000-5FFF: cartridge +6000-7FFF: control(W) +8000-9FFF: 8K ROM SSS SCM23C65E4 +A000-BFFF: keypad(R) +C000-DFFF: 4K ROM TI TMS2732AJL-45 +E000-FFFF: 8K ROM Toshiba TMM2764D-2 + +control: (74LS377) +-------- +Q0-Q3: 7442 A0-A3 +Q4: enable printer port pin 1 input +Q5: printer port pin 5 output +Q6,Q7: LEDs common anode + +7442 0-8: input mux and LEDs cathode +7442 9: buzzer + +The keypad is read through a 74HC251, where S0,1,2 is from CPU A0,1,2, Y is connected to CPU D7. +If control Q4 is set, printer data can be read from I0. + + +****************************************************************************** + +Voice Excellence (model 6092) +---------------- +PCB 1: 510.1117A02, appears to be identical to other "Excellence" boards +CPU: GTE G65SC102P-3, 32 KB PRG ROM: AMI 101-1080A01(IC5), 8192x8 SRAM SRM2264C10(IC6) +2 rows of LEDs on the side: 1*8 green, 1*8 red + +PCB 2: 510.1117A01 +Speech: TSI S14001A, 32 KB ROM: AMI 101-1081A01(IC2) +Dip Switches set ROM A13 and ROM A14, on the side of the board + +ROM A12 is tied to S14001A's A11 (yuck) +ROM A11 is however tied to the CPU's XYZ + +0000_07FF - Spanish 1/4 +0800_0FFF - Spanish 3/4 +1000_17FF - Spanish 2/4 +1800_1FFF - Spanish 4/4 + +2000_27FF - French 1/4 +2800_2FFF - French 3/4 +3000_3FFF - French 2/4 +3800_3FFF - French 4/4 + +4000_47FF - German 1/4 +4800_4FFF - German 3/4 +5000_57FF - German 2/4 +5800_5FFF - German 4/4 - TODO: - - x +6000_67FF - English 1/2 +6800_6FFF - Bridge Challenger 1/2 +7000_77FF - English 2/2 +7800_7FFF - Bridge Challenger 2/2 + +------------------ +RE info by hap, based on PCB photos + +Memory map: +----------- +0000-3FFF: 8K RAM (SRM2264) +4000-7FFF: control (R/W) +8000-FFFF: 32K ROM (M27256 compatible) + +control (W): +------------ +Z80 A0-A2 to 3*74259, Z80 Dx to D (_C unused) + +Z80 D0: +- Q4,Q5: led commons +- Q6,Q7,Q2,Q1: 7seg panel digit select +- Q0-Q3: 7442 A0-A3 + + 0-7: led data + + 0-8: keypad mux + + 9: buzzer out + +Z80 D1: (model 6093) +- Q0-Q7: 7seg data + +Z80 D2: (model 6092) +- Q0-Q5: TSI C0-C5 +- Q6: TSI START pin +- Q7: TSI ROM A11 + +A11 from TSI is tied to TSI ROM A12(!) +TSI ROM A13,A14 are hardwired to the 2 language switches. +Sound comes from the Audio out pin, digital out pins are N/C. + +control (R): +------------ +Z80 A0-A2 to 2*74251, Z80 Dx to output + +Z80 D7 to Y: +- D0-D7: keypad row data + +Z80 D6 to W: (model 6092, tied to VCC otherwise) +- D0,D1: language switches +- D2-D6: VCC +- D7: TSI BUSY ******************************************************************************/ @@ -15,15 +265,13 @@ #include "cpu/m6502/r65c02.h" #include "cpu/m6502/m65sc02.h" #include "machine/6821pia.h" -#include "sound/speaker.h" #include "includes/fidelz80.h" // internal artwork -#include "fidel_sc12.lh" -#include "fidel_fev.lh" - -extern const char layout_fidel_vsc[]; // same layout as fidelz80/vsc +#include "fidel_csc.lh" // clickable +#include "fidel_fev.lh" // clickable +#include "fidel_sc12.lh" // clickable class fidel6502_state : public fidelz80base_state @@ -32,16 +280,17 @@ public: fidel6502_state(const machine_config &mconfig, device_type type, const char *tag) : fidelz80base_state(mconfig, type, tag), m_6821pia(*this, "6821pia"), - m_speaker(*this, "speaker"), - m_irq_off(*this, "irq_off") + m_cart(*this, "cartslot") { } // devices/pointers optional_device<pia6821_device> m_6821pia; - optional_device<speaker_sound_device> m_speaker; - optional_device<timer_device> m_irq_off; + optional_device<generic_slot_device> m_cart; + + TIMER_DEVICE_CALLBACK_MEMBER(irq_on) { m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); } + TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); } - // model CSC + // CSC void csc_prepare_display(); DECLARE_READ8_MEMBER(csc_speech_r); DECLARE_WRITE8_MEMBER(csc_pia0_pa_w); @@ -56,11 +305,16 @@ public: DECLARE_READ_LINE_MEMBER(csc_pia1_ca1_r); DECLARE_READ_LINE_MEMBER(csc_pia1_cb1_r); - // model SC12 - TIMER_DEVICE_CALLBACK_MEMBER(irq_off); - TIMER_DEVICE_CALLBACK_MEMBER(sc12_irq); + // SC12/6086 DECLARE_WRITE8_MEMBER(sc12_control_w); DECLARE_READ8_MEMBER(sc12_input_r); + DECLARE_READ8_MEMBER(sc12_cart_r); + + // 6080/6092/6093 (Excellence) + DECLARE_INPUT_CHANGED_MEMBER(fexcelv_bankswitch); + DECLARE_READ8_MEMBER(fexcelv_speech_r); + DECLARE_WRITE8_MEMBER(fexcel_ttl_w); + DECLARE_READ8_MEMBER(fexcel_ttl_r); }; @@ -75,21 +329,22 @@ public: void fidel6502_state::csc_prepare_display() { - // 7442 output, also update input mux (9 is unused) - m_inp_mux = (1 << m_led_select) & 0x1ff; + // 7442 0-8: led select, input mux + m_inp_mux = 1 << m_led_select & 0x3ff; + + // 7442 9: speaker out + m_speaker->level_w(m_inp_mux >> 9 & 1); // 4 7seg leds + H for (int i = 0; i < 4; i++) - { - m_display_segmask[i] = 0x7f; m_display_state[i] = (m_inp_mux >> i & 1) ? m_7seg_data : 0; - } // 8*8 chessboard leds for (int i = 0; i < 8; i++) m_display_state[i+4] = (m_inp_mux >> i & 1) ? m_led_data : 0; - set_display_size(8, 12); + set_display_size(8, 4+8); + set_display_segmask(0xf, 0x7f); display_update(); } @@ -119,9 +374,9 @@ WRITE8_MEMBER(fidel6502_state::csc_pia0_pb_w) // d1: TSI START line m_speech->start_w(data >> 1 & 1); - - // d4: tone line - m_speaker->level_w(data >> 4 & 1); + + // d4: lower TSI volume + m_speech->set_output_gain(0, (data & 0x10) ? 0.5 : 1.0); } READ8_MEMBER(fidel6502_state::csc_pia0_pb_r) @@ -134,12 +389,9 @@ READ8_MEMBER(fidel6502_state::csc_pia0_pb_r) data |= 0x08; // d5: button row 8 (active low) - if (!(read_inputs(9) & 0x100)) - data |= 0x20; - // d6,d7: language switches - data|=0xc0; - + data |= (~read_inputs(9) >> 3 & 0x20) | (~m_inp_matrix[9]->read() << 6 & 0xc0); + return data; } @@ -200,24 +452,12 @@ WRITE_LINE_MEMBER(fidel6502_state::csc_pia1_ca2_w) /****************************************************************************** - SC12 + SC12/6086 ******************************************************************************/ -// interrupt handling -TIMER_DEVICE_CALLBACK_MEMBER(fidel6502_state::irq_off) -{ - m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); -} - -TIMER_DEVICE_CALLBACK_MEMBER(fidel6502_state::sc12_irq) -{ - m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); - m_irq_off->adjust(attotime::from_nsec(15250)); // active low for 15.25us -} - -// TTL +// TTL/generic WRITE8_MEMBER(fidel6502_state::sc12_control_w) { @@ -239,7 +479,96 @@ WRITE8_MEMBER(fidel6502_state::sc12_control_w) READ8_MEMBER(fidel6502_state::sc12_input_r) { // a0-a2,d7: multiplexed inputs (active low) - return (read_inputs(9) << (offset^7) & 0x80) ^ 0xff; + return (read_inputs(9) >> offset & 1) ? 0 : 0x80; +} + +READ8_MEMBER(fidel6502_state::sc12_cart_r) +{ + if (m_cart->exists()) + return m_cart->read_rom(space, offset); + else + return 0; +} + + + +/****************************************************************************** + 6080/6092/6093 (Excellence) +******************************************************************************/ + +// misc handlers + +INPUT_CHANGED_MEMBER(fidel6502_state::fexcelv_bankswitch) +{ + // tied to speech ROM highest bits + m_speech->force_update(); + m_speech_bank = (m_speech_bank & 1) | newval << 1; +} + +READ8_MEMBER(fidel6502_state::fexcelv_speech_r) +{ + // TSI A11 is A12, program controls A11, user controls A13,A14(language switches) + offset = (offset & 0x7ff) | (offset << 1 & 0x1000); + return m_speech_rom[offset | (m_speech_bank << 11 & 0x800) | (~m_speech_bank << 12 & 0x6000)]; +} + + +// TTL + +WRITE8_MEMBER(fidel6502_state::fexcel_ttl_w) +{ + // a0-a2,d0: 74259(1) + UINT8 mask = 1 << offset; + m_led_select = (m_led_select & ~mask) | ((data & 1) ? mask : 0); + + // 74259 Q0-Q3: 7442 a0-a3 + // 7442 0-8: led data, input mux + UINT16 sel = 1 << (m_led_select & 0xf) & 0x3ff; + UINT8 led_data = sel & 0xff; + m_inp_mux = sel & 0x1ff; + + // 7442 9: speaker out (optional?) + m_speaker->level_w(sel >> 9 & 1); + + // 74259 Q4-Q7,Q2,Q1: digit/led select (active low) + UINT8 led_sel = ~BITSWAP8(m_led_select,0,3,1,2,7,6,5,4) & 0x3f; + + // a0-a2,d1: digit segment data (model 6093) + m_7seg_data = (m_7seg_data & ~mask) | ((data & 2) ? mask : 0); + UINT8 seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4); + + // update display: 4 7seg leds, 2*8 chessboard leds + for (int i = 0; i < 6; i++) + m_display_state[i] = (led_sel >> i & 1) ? ((i < 2) ? led_data : seg_data) : 0; + + set_display_size(8, 2+4); + set_display_segmask(0x3c, 0x7f); + display_update(); + + // speech (model 6092) + if (m_speech != nullptr) + { + // a0-a2,d2: 74259(2) to speech board + m_speech_data = (m_speech_data & ~mask) | ((data & 4) ? mask : 0); + + // 74259 Q6: TSI ROM A11 + m_speech->force_update(); // update stream to now + m_speech_bank = (m_speech_bank & ~1) | (m_speech_data >> 6 & 1); + + // Q0-Q5: TSI C0-C5 + // Q7: TSI START line + m_speech->data_w(space, 0, m_speech_data & 0x3f); + m_speech->start_w(m_speech_data >> 7 & 1); + } +} + +READ8_MEMBER(fidel6502_state::fexcel_ttl_r) +{ + // a0-a2,d6: from speech board: language switches and TSI BUSY line, otherwise tied to VCC + UINT8 d6 = (read_safe(m_inp_matrix[9], 0xff) >> offset & 1) ? 0x40 : 0; + + // a0-a2,d7: multiplexed inputs (active low) + return d6 | ((read_inputs(9) >> offset & 1) ? 0 : 0x80); } @@ -261,11 +590,12 @@ static ADDRESS_MAP_START( csc_map, AS_PROGRAM, 8, fidel6502_state ) ADDRESS_MAP_END -// SC12 +// SC12/6086 static ADDRESS_MAP_START( sc12_map, AS_PROGRAM, 8, fidel6502_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x0fff) AM_RAM + AM_RANGE(0x2000, 0x5fff) AM_READ(sc12_cart_r) AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_WRITE(sc12_control_w) AM_RANGE(0x8000, 0x9fff) AM_ROM AM_RANGE(0xa000, 0xa007) AM_MIRROR(0x1ff8) AM_READ(sc12_input_r) @@ -274,11 +604,11 @@ static ADDRESS_MAP_START( sc12_map, AS_PROGRAM, 8, fidel6502_state ) ADDRESS_MAP_END -// FEV +// 6080/6092/6093 (Excellence) -static ADDRESS_MAP_START( fev_map, AS_PROGRAM, 8, fidel6502_state ) - ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x1fff) AM_RAM +static ADDRESS_MAP_START( fexcel_map, AS_PROGRAM, 8, fidel6502_state ) + AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x2000) AM_RAM + AM_RANGE(0x4000, 0x4007) AM_MIRROR(0x3ff8) AM_READWRITE(fexcel_ttl_r, fexcel_ttl_w) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -288,197 +618,171 @@ ADDRESS_MAP_END Input Ports ******************************************************************************/ -static INPUT_PORTS_START( csc ) +static INPUT_PORTS_START( sc12 ) PORT_START("IN.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Speak") PORT_CODE(KEYCODE_SPACE) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a8") PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RV") PORT_CODE(KEYCODE_V) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b8") PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TM") PORT_CODE(KEYCODE_T) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c8") PORT_START("IN.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L) // level + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d8") PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e8") PORT_START("IN.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ST") PORT_CODE(KEYCODE_S) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f8") PORT_START("IN.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g8") PORT_START("IN.7") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h8") PORT_START("IN.8") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn") PORT_CODE(KEYCODE_1) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook") PORT_CODE(KEYCODE_2) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight") PORT_CODE(KEYCODE_3) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop") PORT_CODE(KEYCODE_4) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen") PORT_CODE(KEYCODE_5) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King") PORT_CODE(KEYCODE_6) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) // clear - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) // reset - PORT_BIT(0x100,IP_ACTIVE_HIGH, IPT_UNUSED) PORT_UNUSED + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("RV/Pawn") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("DM/Knight") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("TB/Bishop") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("LV/Rook") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV/Queen") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("PB/King") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("RE") INPUT_PORTS_END -static INPUT_PORTS_START( sc12 ) - PORT_START("IN.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) +static INPUT_PORTS_START( fexcel ) + PORT_INCLUDE( sc12 ) + + PORT_MODIFY("IN.8") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Move/Pawn") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Hint/Knight") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Take Back/Bishop") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Level/Rook") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Options/Queen") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Verify/King") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") +INPUT_PORTS_END - PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) +static INPUT_PORTS_START( fexcelv ) + PORT_INCLUDE( fexcel ) + + PORT_START("IN.9") + PORT_CONFNAME( 0x03, 0x00, "Language" ) PORT_CHANGED_MEMBER(DEVICE_SELF, fidel6502_state, fexcelv_bankswitch, 0) + PORT_CONFSETTING( 0x00, "English" ) + PORT_CONFSETTING( 0x01, "German" ) + PORT_CONFSETTING( 0x02, "French" ) + PORT_CONFSETTING( 0x03, "Spanish" ) + PORT_BIT(0x7c, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SPECIAL) PORT_READ_LINE_DEVICE_MEMBER("speech", s14001a_device, busy_r) +INPUT_PORTS_END - PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_START("IN.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) +static INPUT_PORTS_START( csc ) + PORT_INCLUDE( sc12 ) - PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_MODIFY("IN.0") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Speaker") - PORT_START("IN.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_MODIFY("IN.1") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("RV") - PORT_START("IN.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_MODIFY("IN.2") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("TM") - PORT_START("IN.7") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_MODIFY("IN.3") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LV") - PORT_START("IN.8") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RV / Pawn") PORT_CODE(KEYCODE_1) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM / Knight") PORT_CODE(KEYCODE_2) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TB / Bishop") PORT_CODE(KEYCODE_3) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV / Rook") PORT_CODE(KEYCODE_4) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PV / Queen") PORT_CODE(KEYCODE_5) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PB / King") PORT_CODE(KEYCODE_6) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) // clear - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) // reset + PORT_MODIFY("IN.4") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("DM") + + PORT_MODIFY("IN.5") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("ST") + + PORT_MODIFY("IN.8") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Pawn") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Rook") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Knight") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Queen") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("King") + + PORT_START("IN.9") // hardwired + PORT_CONFNAME( 0x01, 0x00, "Language" ) + PORT_CONFSETTING( 0x00, "English" ) + PORT_CONFSETTING( 0x01, "Other" ) + PORT_CONFNAME( 0x02, 0x00, DEF_STR( Unknown ) ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x02, DEF_STR( On ) ) +INPUT_PORTS_END + +static INPUT_PORTS_START( cscg ) + PORT_INCLUDE( csc ) + + PORT_MODIFY("IN.9") + PORT_CONFNAME( 0x01, 0x01, "Language" ) + PORT_CONFSETTING( 0x00, "English" ) + PORT_CONFSETTING( 0x01, "Other" ) INPUT_PORTS_END @@ -510,7 +814,7 @@ static MACHINE_CONFIG_START( csc, fidel6502_state ) MCFG_PIA_CB2_HANDLER(WRITELINE(fidel6502_state, csc_pia1_cb2_w)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1)) - MCFG_DEFAULT_LAYOUT(layout_fidel_vsc) + MCFG_DEFAULT_LAYOUT(layout_fidel_csc) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -527,8 +831,9 @@ static MACHINE_CONFIG_START( sc12, fidel6502_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", R65C02, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(sc12_map) - MCFG_TIMER_DRIVER_ADD_PERIODIC("sc12_irq", fidel6502_state, sc12_irq, attotime::from_hz(780)) // from 556 timer - MCFG_TIMER_DRIVER_ADD("irq_off", fidel6502_state, irq_off) + MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(780)) // from 556 timer + MCFG_TIMER_START_DELAY(attotime::from_hz(780) - attotime::from_nsec(15250)) // active for 15.25us + MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(780)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_fidel_sc12) @@ -537,21 +842,37 @@ static MACHINE_CONFIG_START( sc12, fidel6502_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) + + /* cartridge */ + MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc") + MCFG_GENERIC_EXTENSIONS("bin,dat") + MCFG_GENERIC_LOAD(fidelz80base_state, scc_cartridge) + MCFG_SOFTWARE_LIST_ADD("cart_list", "fidel_scc") MACHINE_CONFIG_END -static MACHINE_CONFIG_START( fev, fidel6502_state ) +static MACHINE_CONFIG_START( fexcel, fidel6502_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M65SC02, XTAL_3MHz) // M65SC102 (CMD) - MCFG_CPU_PROGRAM_MAP(fev_map) + MCFG_CPU_ADD("maincpu", M65SC02, XTAL_12MHz/4) // G65SC102P-3, 12.0M ceramic resonator + MCFG_CPU_PROGRAM_MAP(fexcel_map) + MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_on", fidel6502_state, irq_on, attotime::from_hz(780)) // from 556 timer, PCB photo suggests it's same as sc12 + MCFG_TIMER_START_DELAY(attotime::from_hz(780) - attotime::from_nsec(15250)) // active for 15.25us + MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_off", fidel6502_state, irq_off, attotime::from_hz(780)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_fidel_fev) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( fexcelv, fexcel ) + + /* sound hardware */ MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz - MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, csc_speech_r)) + MCFG_S14001A_EXT_READ_HANDLER(READ8(fidel6502_state, fexcelv_speech_r)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) MACHINE_CONFIG_END @@ -574,6 +895,43 @@ ROM_START( csc ) ROM_RELOAD( 0x1000, 0x1000) ROM_END +ROM_START( cscsp ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) ) + ROM_LOAD("1025a03.bin", 0xa000, 0x2000, CRC(63982c07) SHA1(5ed4356323d5c80df216da55994abe94ba4aa94c) ) + ROM_LOAD("1025a02.bin", 0xc000, 0x2000, CRC(9e6e7c69) SHA1(4f1ed9141b6596f4d2b1217d7a4ba48229f3f1b0) ) + ROM_LOAD("1025a01.bin", 0xe000, 0x2000, CRC(57f068c3) SHA1(7d2ac4b9a2fba19556782863bdd89e2d2d94e97b) ) + ROM_LOAD("74s474.bin", 0xfe00, 0x0200, CRC(4511ba31) SHA1(e275b1739f8c3aa445cccb6a2b597475f507e456) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, BAD_DUMP CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) // taken from vcc/fexcelv, assume correct +ROM_END + +ROM_START( cscg ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) ) + ROM_LOAD("1025a03.bin", 0xa000, 0x2000, CRC(63982c07) SHA1(5ed4356323d5c80df216da55994abe94ba4aa94c) ) + ROM_LOAD("1025a02.bin", 0xc000, 0x2000, CRC(9e6e7c69) SHA1(4f1ed9141b6596f4d2b1217d7a4ba48229f3f1b0) ) + ROM_LOAD("1025a01.bin", 0xe000, 0x2000, CRC(57f068c3) SHA1(7d2ac4b9a2fba19556782863bdd89e2d2d94e97b) ) + ROM_LOAD("74s474.bin", 0xfe00, 0x0200, CRC(4511ba31) SHA1(e275b1739f8c3aa445cccb6a2b597475f507e456) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct +ROM_END + +ROM_START( cscfr ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) ) + ROM_LOAD("1025a03.bin", 0xa000, 0x2000, CRC(63982c07) SHA1(5ed4356323d5c80df216da55994abe94ba4aa94c) ) + ROM_LOAD("1025a02.bin", 0xc000, 0x2000, CRC(9e6e7c69) SHA1(4f1ed9141b6596f4d2b1217d7a4ba48229f3f1b0) ) + ROM_LOAD("1025a01.bin", 0xe000, 0x2000, CRC(57f068c3) SHA1(7d2ac4b9a2fba19556782863bdd89e2d2d94e97b) ) + ROM_LOAD("74s474.bin", 0xfe00, 0x0200, CRC(4511ba31) SHA1(e275b1739f8c3aa445cccb6a2b597475f507e456) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct +ROM_END + + ROM_START( fscc12 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("101-1068a01", 0x8000, 0x2000, CRC(63c76cdd) SHA1(e0771c98d4483a6b1620791cb99a7e46b0db95c4) ) // SSS SCM23C65E4 @@ -581,21 +939,33 @@ ROM_START( fscc12 ) ROM_LOAD("tmm2764d-2", 0xe000, 0x2000, CRC(183d3edc) SHA1(3296a4c3bce5209587d4a1694fce153558544e63) ) // Toshiba TMM2764D-2 ROM_END + +ROM_START( fexcel ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-1080a01.ic5", 0x8000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) ) // same as fexcelv +ROM_END + ROM_START( fexcelv ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("101-1080a01.ic5", 0x8000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) ) + ROM_LOAD("101-1080a01.ic5", 0x8000, 0x8000, CRC(846f8e40) SHA1(4e1d5b08d5ff3422192b54fa82cb3f505a69a971) ) // PCB1, M27256 ROM_REGION( 0x8000, "speech", 0 ) - ROM_LOAD("101-1081a01.ic2", 0x0000, 0x8000, CRC(c8ae1607) SHA1(6491ce6be60ed77f3dd931c0ca17616f13af943e) ) + ROM_LOAD("101-1081a01.ic2", 0x0000, 0x8000, CRC(c8ae1607) SHA1(6491ce6be60ed77f3dd931c0ca17616f13af943e) ) // PCB2, M27256 ROM_END + + /****************************************************************************** Drivers ******************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -COMP( 1981, csc, 0, 0, csc, csc, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +COMP( 1981, csc, 0, 0, csc, csc, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1981, cscsp, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1981, cscg, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1981, cscfr, csc, 0, csc, cscg, driver_device, 0, "Fidelity Electronics", "Champion Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_NOT_WORKING ) +COMP( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1987, fexcelv, 0, 0, fev, csc, driver_device, 0, "Fidelity Electronics", "Voice Excellence", MACHINE_NOT_WORKING ) +COMP( 1987, fexcel, 0, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "Excellence (model 6080/6093)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1987, fexcelv, 0, 0, fexcelv, fexcelv, driver_device, 0, "Fidelity Electronics", "Voice Excellence", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/fidel68k.cpp b/src/mame/drivers/fidel68k.cpp new file mode 100644 index 00000000000..56cd651bb90 --- /dev/null +++ b/src/mame/drivers/fidel68k.cpp @@ -0,0 +1,473 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/****************************************************************************** + + Fidelity Electronics 68000 based board driver + + TODO: + - how does dual-CPU work? + - IRQ level/timing is unknown + - USART is not emulated + - V11 CPU should be M68EC060, not yet emulated + +****************************************************************************** + +Elite Avant Garde (EAG, model 6114) +----------------------------------- + +There are 5 versions of model 6114(V1 to V5). The one emulated here came from a V2, +but is practically emulated as a V4. + +V1: 128KB DRAM, no EEPROM +V2: 128KB DRAM +V3: 512KB DRAM +V4: 1MB DRAM +V5: 128KB+64KB DRAM, dual-CPU! (2*68K @ 16MHz) + +V6-V11 are on model 6117. Older 1986 model 6081 uses a 6502 CPU. + +Hardware info: +-------------- +- MC68HC000P12F 16MHz CPU, 16MHz XTAL +- MB1422A DRAM Controller, 25MHz XTAL near, 4 DRAM slots(V2: slot 1 and 2 64KB) +- 2*27C512 64KB EPROM, 2*KM6264AL-10 8KB SRAM, 2*AT28C64X 8KB EEPROM +- OKI M82C51A-2 USART, 4.9152MHz XTAL +- other special: magnet sensors, external module slot, serial port + +IRQ source is unknown. Several possibilities: +- NE555 timer IC +- MM/SN74HC4060 binary counter IC (near the M82C51A) +- one of the XTALs, plus divider of course + +The module slot pinout is different from SCC series. The data on those appears +to be compatible with EAG though and will load fine with an adapter. + +The USART allows for a serial connection between the chess computer and another +device, for example a PC. Fidelity released a DOS tool called EAGLINK which +featured PC printer support, complete I/O control, detailed information while +the program is 'thinking', etc. + +Memory map: (of what is known) +----------- +000000-01FFFF: 128KB ROM +104000-107FFF: 16KB SRAM +200000-2FFFFF: hashtable DRAM (max. 1MB) +300000-30000F W hi d0: NE591: 7seg data +300000-30000F W lo d0: NE591: LED data +300000-30000F R lo d7: 74259: keypad rows 0-7 +400000-400001 W lo d0-d3: 74145/7442: led/keypad mux, buzzer out +400000-4????? R hi: external module slot +700002-700003 R lo d7: 74251: keypad row 8 +604000-607FFF: 16KB EEPROM + + +****************************************************************************** + +Elite Avant Garde (EAG, model 6117) +----------------------------------- + +There are 6 versions of model 6114(V6 to V11). From a programmer's point of view, +the hardware is very similar to model 6114. + +V6: 68020, 512KB hashtable RAM +V7: 68020, 1MB h.RAM +V8: 2*68020, 512KB+128KB h.RAM +V9: 68030, 1MB h.RAM +V10: 68040, 1MB h.RAM +V11: 68060, 2MB h.RAM, high speed + +V7 Hardware info: +----------------- +- MC68020RC25E CPU, 25MHz XTAL +- 4*AS7C164-20PC 8KB SRAM, 2*KM684000ALG-7L 512KB CMOS SRAM +- 2*27C512? 64KB EPROM, 2*HM6264LP-15 8KB SRAM, 2*AT28C64B 8KB EEPROM, 2*GAL16V8C +- same as 6114: M82C51A, NE555, SN74HC4060, module slot, chessboard, .. + +V7 Memory map: +-------------- +000000-01FFFF: 128KB ROM +104000-107FFF: 16KB SRAM (unused?) +200000-2FFFFF: hashtable SRAM +300000-30000x: see model 6114 +400000-40000x: see model 6114 +700000-70000x: see model 6114 +604000-607FFF: 16KB EEPROM +800000-807FFF: 32KB SRAM + +V10 Hardware info: +------------------ +- 68040 CPU, 25MHz +- other: assume same or very similar to V11(see below) + +The ROM dump came from the V11(see below). Built-in factory test proves +that this program is a V10. Hold TB button immediately after power-on and +press it for a sequence of tests: +1) all LEDs on +2) F40C: V10 program version +3) 38b9: V10 ROM checksum +4) xxxx: external module ROM checksum (0000 if no module present) +5) xxxx: user settings (stored in EEPROM) +6) xxxx: " +7) 1024: hashtable RAM size +8) return to game + +V11 Hardware info: +------------------ +- MC68EC060RC75 CPU, 36MHz XTAL(36MHz bus, 72MHz CPU), CPU cooler required +- 4*CXK5863AP-20 8KB SRAM, 4*K6X4008C1F-DF55 512KB CMOS SRAM +- 4*M27C256B 32KB EPROM, 2*AT28C64 8KB EEPROM, 5*GAL16V8D +- NEC D71051C USART, assume 8MHz, on quick glance it's same as the OKI USART +- same as 6114: NE555, SN74HC4060, module slot, chessboard, .. + +This is a custom overclocked V10, manufactured by Wilfried Bucke. PCB is marked: +"CHESS HW DESIGN COPYRIGHT 22-10-2002: REVA03 510.1136A01/510.1144B01 COMPONENT SIDE" +There are two versions of this, one with a 66MHz CPU, one with a 72MHz CPU. +Maybe other differences too? + +V1x Memory map: +--------------- +000000-01FFFF: 128KB ROM +200000-3FFFFF: hashtable SRAM (less on V10?) +B0000x-xxxxxx: see V7, -800000 + +******************************************************************************/ + +#include "emu.h" +#include "cpu/m68000/m68000.h" +#include "machine/nvram.h" + +#include "includes/fidelz80.h" + +// internal artwork +#include "fidel_eag.lh" // clickable + + +class fidel68k_state : public fidelz80base_state +{ +public: + fidel68k_state(const machine_config &mconfig, device_type type, const char *tag) + : fidelz80base_state(mconfig, type, tag) + { } + + // devices/pointers + + // EAG(6114/6117) + void eag_prepare_display(); + DECLARE_READ8_MEMBER(eag_input1_r); + DECLARE_WRITE8_MEMBER(eag_leds_w); + DECLARE_WRITE8_MEMBER(eag_7seg_w); + DECLARE_WRITE8_MEMBER(eag_mux_w); + DECLARE_READ8_MEMBER(eag_input2_r); + DECLARE_READ8_MEMBER(eag_cart_r); +}; + + + +// Devices, I/O + +/****************************************************************************** + EAG +******************************************************************************/ + +// misc handlers + +void fidel68k_state::eag_prepare_display() +{ + // 8*7seg leds, (8+1)*8 chessboard leds + UINT8 seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4); + set_display_segmask(0x1ef, 0x7f); + display_matrix(16, 9, m_led_data << 8 | seg_data, m_inp_mux); +} + + +// TTL/generic + +READ8_MEMBER(fidel68k_state::eag_input1_r) +{ + // a1-a3,d7: multiplexed inputs (active low) + return (read_inputs(9) >> offset & 1) ? 0 : 0x80; +} + +READ8_MEMBER(fidel68k_state::eag_input2_r) +{ + // d7: multiplexed inputs highest bit + return (read_inputs(9) & 0x100) ? 0x80 : 0; +} + +WRITE8_MEMBER(fidel68k_state::eag_leds_w) +{ + // a1-a3,d0: led data + m_led_data = (m_led_data & ~(1 << offset)) | ((data & 1) << offset); + eag_prepare_display(); +} + +WRITE8_MEMBER(fidel68k_state::eag_7seg_w) +{ + // a1-a3,d0(d8): digit segment data + m_7seg_data = (m_7seg_data & ~(1 << offset)) | ((data & 1) << offset); + eag_prepare_display(); +} + +WRITE8_MEMBER(fidel68k_state::eag_mux_w) +{ + // d0-d3: 74145 A-D + // 74145 0-8: input mux, digit/led select + // 74145 9: speaker out + UINT16 sel = 1 << (data & 0xf); + m_speaker->level_w(sel >> 9 & 1); + m_inp_mux = sel & 0x1ff; + eag_prepare_display(); +} + +READ8_MEMBER(fidel68k_state::eag_cart_r) +{ + if (m_cart->exists()) + return m_cart->read_rom(space, offset); + else + return 0; +} + + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +// EAG + +static ADDRESS_MAP_START( eag_map, AS_PROGRAM, 16, fidel68k_state ) + AM_RANGE(0x000000, 0x01ffff) AM_ROM + AM_RANGE(0x104000, 0x107fff) AM_RAM + AM_RANGE(0x200000, 0x2fffff) AM_RAM // DRAM slots + AM_RANGE(0x300000, 0x30000f) AM_MIRROR(0x000010) AM_READWRITE8(eag_input1_r, eag_leds_w, 0x00ff) + AM_RANGE(0x300000, 0x30000f) AM_MIRROR(0x000010) AM_WRITE8(eag_7seg_w, 0xff00) AM_READNOP + AM_RANGE(0x400000, 0x407fff) AM_READ8(eag_cart_r, 0xff00) + AM_RANGE(0x400000, 0x400001) AM_WRITE8(eag_mux_w, 0x00ff) + AM_RANGE(0x400002, 0x400007) AM_WRITENOP // ? + AM_RANGE(0x604000, 0x607fff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x700002, 0x700003) AM_READ8(eag_input2_r, 0x00ff) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( eagv7_map, AS_PROGRAM, 32, fidel68k_state ) + AM_RANGE(0x000000, 0x01ffff) AM_ROM + AM_RANGE(0x104000, 0x107fff) AM_RAM + AM_RANGE(0x200000, 0x2fffff) AM_RAM + AM_RANGE(0x300000, 0x30000f) AM_MIRROR(0x000010) AM_READWRITE8(eag_input1_r, eag_leds_w, 0x00ff00ff) + AM_RANGE(0x300000, 0x30000f) AM_MIRROR(0x000010) AM_WRITE8(eag_7seg_w, 0xff00ff00) AM_READNOP + AM_RANGE(0x400000, 0x407fff) AM_READ8(eag_cart_r, 0xff00ff00) + AM_RANGE(0x400000, 0x400003) AM_WRITE8(eag_mux_w, 0x00ff0000) + AM_RANGE(0x400004, 0x400007) AM_WRITENOP // ? + AM_RANGE(0x604000, 0x607fff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x700000, 0x700003) AM_READ8(eag_input2_r, 0x000000ff) + AM_RANGE(0x800000, 0x807fff) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( eagv11_map, AS_PROGRAM, 32, fidel68k_state ) + AM_RANGE(0x00000000, 0x0001ffff) AM_ROM + AM_RANGE(0x00200000, 0x003fffff) AM_RAM + AM_RANGE(0x00b00000, 0x00b0000f) AM_MIRROR(0x00000010) AM_READWRITE8(eag_input1_r, eag_leds_w, 0x00ff00ff) + AM_RANGE(0x00b00000, 0x00b0000f) AM_MIRROR(0x00000010) AM_WRITE8(eag_7seg_w, 0xff00ff00) AM_READNOP + AM_RANGE(0x00c00000, 0x00c07fff) AM_READ8(eag_cart_r, 0xff00ff00) + AM_RANGE(0x00c00000, 0x00c00003) AM_WRITE8(eag_mux_w, 0x00ff0000) + AM_RANGE(0x00c00004, 0x00c00007) AM_WRITENOP // ? + AM_RANGE(0x00e04000, 0x00e07fff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x00f00000, 0x00f00003) AM_READ8(eag_input2_r, 0x000000ff) + AM_RANGE(0x01000000, 0x0101ffff) AM_RAM +ADDRESS_MAP_END + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( eag ) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g1") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f1") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e1") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d1") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c1") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b1") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a1") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL") + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h2") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f2") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e2") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d2") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c2") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b2") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a2") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("DM") + + PORT_START("IN.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h3") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g3") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e3") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d3") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c3") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b3") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a3") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") + + PORT_START("IN.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h4") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g4") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f4") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d4") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c4") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b4") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a4") + + PORT_START("IN.4") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h5") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g5") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f5") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e5") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c5") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b5") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a5") + + PORT_START("IN.5") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h6") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g6") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f6") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e6") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d6") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b6") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a6") + + PORT_START("IN.6") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h7") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g7") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f7") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e7") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d7") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c7") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a7") + + PORT_START("IN.7") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square h8") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square g8") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square f8") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square e8") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square d8") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square c8") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square b8") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_TOGGLE PORT_NAME("Square a8") + + PORT_START("IN.8") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("PB/King") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("PV/Queen") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("TM/Rook") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("ST/Bishop") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("TB/Knight") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("LV/Pawn") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Option") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("RV") +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Drivers +******************************************************************************/ + +static MACHINE_CONFIG_START( eag, fidel68k_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) + MCFG_CPU_PROGRAM_MAP(eag_map) + MCFG_CPU_PERIODIC_INT_DRIVER(fidel68k_state, irq2_line_hold, 600) // complete guess + + MCFG_NVRAM_ADD_1FILL("nvram") + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_fidel_eag) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) + + /* cartridge */ + MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "fidel_scc") + MCFG_GENERIC_EXTENSIONS("bin,dat") + MCFG_GENERIC_LOAD(fidelz80base_state, scc_cartridge) + MCFG_SOFTWARE_LIST_ADD("cart_list", "fidel_scc") +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( eagv7, eag ) + + /* basic machine hardware */ + MCFG_CPU_REPLACE("maincpu", M68020, XTAL_25MHz) + MCFG_CPU_PROGRAM_MAP(eagv7_map) + MCFG_CPU_PERIODIC_INT_DRIVER(fidel68k_state, irq2_line_hold, 600) // complete guess +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( eagv10, eag ) + + /* basic machine hardware */ + MCFG_CPU_REPLACE("maincpu", M68040, XTAL_25MHz) + MCFG_CPU_PROGRAM_MAP(eagv11_map) + MCFG_CPU_PERIODIC_INT_DRIVER(fidel68k_state, irq2_line_hold, 600) // complete guess +MACHINE_CONFIG_END + +static MACHINE_CONFIG_DERIVED( eagv11, eag ) + + /* basic machine hardware */ + MCFG_CPU_REPLACE("maincpu", M68EC040, XTAL_36MHz*2) // wrong! should be M68EC060 + MCFG_CPU_PROGRAM_MAP(eagv11_map) + MCFG_CPU_PERIODIC_INT_DRIVER(fidel68k_state, irq2_line_hold, 600) // complete guess +MACHINE_CONFIG_END + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( feagv2 ) + ROM_REGION16_BE( 0x20000, "maincpu", 0 ) + ROM_LOAD16_BYTE("6114_e5.u18", 0x00000, 0x10000, CRC(f9c7bada) SHA1(60e545f829121b9a4f1100d9e85ac83797715e80) ) // 27c512 + ROM_LOAD16_BYTE("6114_o5.u19", 0x00001, 0x10000, CRC(04f97b22) SHA1(8b2845dd115498f7b385e8948eca6a5893c223d1) ) // " +ROM_END + + +ROM_START( feagv7 ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD16_BYTE("eag-v7b", 0x00000, 0x10000, CRC(f2f68b63) SHA1(621e5073e9c5083ac9a9b467f3ef8aa29beac5ac) ) + ROM_LOAD16_BYTE("eag-v7a", 0x00001, 0x10000, CRC(506b688f) SHA1(0a091c35d0f01166b57f964b111cde51c5720d58) ) +ROM_END + + +ROM_START( feagv11 ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD32_BYTE("16", 0x00000, 0x08000, CRC(8375d61f) SHA1(e042f6f01480c59ee09a458cf34f135664479824) ) // 27c256 + ROM_LOAD32_BYTE("18", 0x00002, 0x08000, CRC(9341dcaf) SHA1(686bd4799e89ffaf11a813d4cf5a2aedd4c2d97a) ) // " + ROM_LOAD32_BYTE("19", 0x00003, 0x08000, CRC(a70c5468) SHA1(7f6b4f46577d5cfdaa84d387c7ce35d941e5bbc7) ) // " + ROM_LOAD32_BYTE("17", 0x00001, 0x08000, CRC(bfd14916) SHA1(115af6dfd29ddd8ad6d2ce390f8ecc4d60de6fce) ) // " +ROM_END + +#define rom_feagv10 rom_feagv11 + + + +/****************************************************************************** + Drivers +******************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +COMP( 1989, feagv2, 0, 0, eag, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6114-2/3/4)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1990, feagv7, 0, 0, eagv7, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6117-7)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1990, feagv10, 0, 0, eagv10, eag, driver_device, 0, "Fidelity Electronics", "Elite Avant Garde (model 6117-10)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 2002, feagv11, feagv10, 0, eagv11, eag, driver_device, 0, "hack (Wilfried Bucke)", "Elite Avant Garde (model 6117-11)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/fidelz80.cpp b/src/mame/drivers/fidelz80.cpp index 6e3e5cb725e..fd14411bfef 100644 --- a/src/mame/drivers/fidelz80.cpp +++ b/src/mame/drivers/fidelz80.cpp @@ -4,18 +4,46 @@ Fidelity Electronics Z80 based board driver for 6502 based boards, see drivers/fidel6502.cpp - - Detailed RE work done by Kevin 'kevtris' Horton, except where noted + for 68000 based boards, see drivers/fidel68k.cpp TODO: - Figure out why it says the first speech line twice; it shouldn't? It sometimes does this on Voice Sensory Chess Challenger real hardware. It can also be heard on Advanced Voice Chess Challenger real hardware, but not the whole line: "I I am Fidelity's chess challenger", instead. - - Get rom locations from pcb (done for UVC, VCC is probably similar) - - correctly hook up VBRC speech so that the z80 is halted while words are being spoken + - VBRC card scanner + + Chess pieces are required, but theoretically blindfold chess is possible. + Chessboard artwork is provided for boards with pressure/magnet sensors. + Read the official manual(s) on how to play. + + Keypad legend: + - RE: Reset + - CL: Clear + - EN: Enter + - PB: Problem Mode + - PV: Position Verification + - LV: Playing Levels + - TB: Take Back + - DM: Display Move/Double Move + - RV: Reverse + - ST: Set/Stop + - TM: Time + + Peripherals, compatible with various boards: + - Fidelity Challenger Printer - thermal printer, MCU=? + + Program/data cartridges, for various boards, some cross-compatible: + - CG6: Greatest Chess Games 1 + - CAC: Challenger Advanced Chess - 8KB 101-1038A01 + - CB9: Challenger Book Openings 1 - 8KB? + - CB16: Challenger Book Openings 2 - 8+8KB 101-1042A01,02 + - others are alt. titles of these? + + Board hardware descriptions below. + Detailed RE work done by Kevin 'kevtris' Horton, except where noted -*********************************************************************** +****************************************************************************** Voice Chess Challenger (VCC) (version A and B?) Advanced Voice Chess Challenger (UVC) @@ -24,7 +52,6 @@ Decorator Challenger (FCC) (which share the same hardware) ---------------------- - The CPU is a Z80 running at 4MHz. The TSI chip runs at around 25KHz, using a 470K / 100pf RC network. This system is very very basic, and is composed of just the Z80, 4 ROMs, the TSI chip, and an 8255. @@ -52,14 +79,12 @@ Memory map (UVC): 4000-5FFF: 1K RAM (2114 SRAM x2) 6000-FFFF: empty -I/O map: --------- +Port map: +--------- 00-03: 8255 port chip, mirrored over the 00-FF range; program accesses F4-F7 - 8255 connections: ----------------- - PA.0 - segment G, TSI A0 (W) PA.1 - segment F, TSI A1 (W) PA.2 - segment E, TSI A2 (W) @@ -88,19 +113,15 @@ PC.5 - button column B (W) PC.6 - button column C (W) PC.7 - button column D (W) - language switches: ------------------ - When PB.6 is pulled low, the language switches can be read. There are four. They connect to the button rows. When enabled, the row(s) will read low if the jumper is present. English only VCC's do not have the 367 or any pads stuffed. The jumpers are labelled: French, German, Spanish, and special. - language latch: --------------- - There's an unstuffed 7474 on the board that connects to PA.6 and PA.7. It allows one to latch the state of A12 to the speech ROM. The English version has the chip missing, and a jumper pulling "A12" to ground. This line is really a negative @@ -116,11 +137,10 @@ automatically select the correct ROM(s). I have to test whether it will do auto determination and give you a language option on power up or something. -*********************************************************************** +****************************************************************************** -Chess Challenger 10 +Chess Challenger 10 (CC10) ------------------- - 4 versions are known to exist: A,B,C,D. Strangely, version C has an 8080 instead of Z80. Chess Challenger 1,3 and 7 also run on very similar hardware. @@ -131,7 +151,6 @@ the connections to ports A and B on the PPI: 8255 connections: ----------------- - PA.0 - segment G (W) PA.1 - segment F (W) PA.2 - segment E (W) @@ -166,6 +185,38 @@ PC.7 - button column D (W) ****************************************************************************** +Chess Challenger 7 (BCC) +------------------------ +RE information from netlist by Berger + +Zilog Z80A, 3.579MHz from XTAL +Z80 IRQ/NMI unused, no timer IC. +This is a cost-reduced design from CC10, no special I/O chips. + +Memory map: +----------- +0000-0FFF: 4K 2332 ROM CN19103N BCC-REVB. +2000-2FFF: ROM/RAM bus conflict! +3000-3FFF: 256 bytes RAM (2111 SRAM x2) +4000-FFFF: Z80 A14/A15 not connected + +Port map (Write): +--------- +D0-D3: digit select and keypad mux +D4: LOSE led +D5: CHECK led +A0-A2: NE591 A0-A2 +D7: NE591 D (_C not used) +NE591 Q0-Q6: digit segments A-G +NE591 Q7: buzzer + +Port map (Read): +--------- +D0-D3: keypad row + + +****************************************************************************** + Voice Bridge Challenger (Model VBRC, later reissued as Model 7002) and Bridge Challenger 3 (Model 7014) (which both share the same* hardware) @@ -189,7 +240,6 @@ The 8041 runs at 5MHz. Memory Map: ----------- - 0000-1FFF: 8K 101-64108 ROM 2000-3FFF: 8K 101-64109 ROM 4000-5FFF: 8K 101-64110 ROM @@ -203,15 +253,12 @@ when the word is done being spoken. This is because D0-D5 run to the TSI chip d The TSI chip's ROM is 4K, and is marked 101-32118. The clock is the same as the Chess Challengers- 470K/100pf which gives a frequency around 25KHz or so. -I/O Map: --------- - +Port Map: +--------- 00-FF: 8041 I/O ports (A0 selects between the two) - 8041 pinout: ------------ - (note: columns are pulled up with 10K resistors) P10 - column H, RD LED, VFD grid 0 @@ -237,10 +284,8 @@ PROG - I/O expander T0 - optical card sensor (high = bright/reflective, low = dark/non reflective) T1 - connects to inverter, then nothing? - D8243C I/O expander: -------------------- - P4.0 - segment M P4.1 - segment L P4.2 - segment N @@ -261,10 +306,8 @@ P7.1 - goes through inverter, to pads that are not used P7.2 - segment C P7.3 - segment H - button matrix: -------------- - the matrix is composed of 8 columns by 4 rows. A B C D E F G H @@ -305,159 +348,14 @@ A detailed description of the hardware can be found also in the patent 4,373,719 ****************************************************************************** -Champion Sensory Chess Challenger (CSC) (6502 based -> fidel6502.cpp driver) ---------------------------------------- - -Memory map: ------------ - -0000-07FF: 2K of RAM -0800-0FFF: 1K of RAM (note: mirrored twice) -1000-17FF: PIA 0 (display, TSI speech chip) -1800-1FFF: PIA 1 (keypad, LEDs) -2000-3FFF: 101-64019 ROM (also used on the regular sensory chess challenger) -4000-7FFF: mirror of 0000-3FFF -8000-9FFF: not used -A000-BFFF: 101-1025A03 ROM -C000-DFFF: 101-1025A02 ROM -E000-FDFF: 101-1025A01 ROM -FE00-FFFF: 512 byte 74S474 PROM - -CPU is a 6502 running at 1.95MHz (3.9MHz resonator, divided by 2) - -NMI is not used. -IRQ is connected to a 600Hz oscillator (38.4KHz divided by 64). -Reset is connected to a power-on reset circuit. - - -PIA 0: ------- - -PA0 - 7seg segments E, TSI A0 -PA1 - 7seg segments D, TSI A1 -PA2 - 7seg segments C, TSI A2 -PA3 - 7seg segments H, TSI A3 -PA4 - 7seg segments G, TSI A4 -PA5 - 7seg segments F, TSI A5 -PA6 - 7seg segments B -PA7 - 7seg segments A - -PB0 - A12 on speech ROM (if used... not used on this model, ROM is 4K) -PB1 - START line on S14001A -PB2 - white wire -PB3 - BUSY line from S14001A -PB4 - Tone line (toggle to make a tone in the speaker) -PB5 - button row 9 -PB6 - selection jumper (resistor to 5V) -PB7 - selection jumper (resistor to ground) - -CA1 - NC -CA2 - violet wire - -CB1 - NC -CB2 - NC (connects to pin 14 of soldered connector) - - -PIA 1: ------- - -PA0 - button row 1 -PA1 - button row 2 -PA2 - button row 3 -PA3 - button row 4 -PA4 - button row 5 -PA5 - button row 6 -PA6 - 7442 selector bit 0 -PA7 - 7442 selector bit 1 - -PB0 - LED row 1 -PB1 - LED row 2 -PB2 - LED row 3 -PB3 - LED row 4 -PB4 - LED row 5 -PB5 - LED row 6 -PB6 - LED row 7 -PB7 - LED row 8 - -CA1 - button row 7 -CA2 - selector bit 3 - -CB1 - button row 8 -CB2 - selector bit 2 - - -Selector: (attached to PIA 1, outputs 1 of 10 pins low. 7442) ---------- - -output # (selected turns this column on, and all others off) -0 - LED column A, button column A, 7seg digit 1 -1 - LED column B, button column B, 7seg digit 2 -2 - LED column C, button column C, 7seg digit 3 -3 - LED column D, button column D, 7seg digit 4 -4 - LED column E, button column E -5 - LED column F, button column F -6 - LED column G, button column G -7 - LED column H, button column H -8 - button column I -9 - - -The rows/columns are indicated on the game board: - - ABCDEFGH I --------------- -| | 8 -| | 7 -| | 6 -| | 5 -| | 4 -| | 3 -| | 2 -| | 1 --------------- - -The "lone LED" is above the control column. -column I is the "control column" on the right for starting a new game, etc. - -The upper 6 buttons are connected as such: - -column A - speak -column B - RV -column C - TM -column D - LV -column E - DM -column F - ST - -these 6 buttons use row 9 (connects to PIA 0) - - -LED display: ------------- - -43 21 (digit number) ------ -88:88 - -The LED display is four 7 segment digits. normal ABCDEFG lettering is used for segments. - -The upper dot is connected to digit 3 common -The lower dot is connected to digit 4 common -The lone LED is connected to digit 1 common - -All three of the above are called "segment H". - - -*********************************************************************** - Voice Sensory Chess Challenger (VSC) ------------------------------------ - The display/button/LED/speech technology is identical to the above product. Only the CPU board was changed. As such, it works the same but is interfaced to different port chips this time. Hardware: --------- - On the board are 13 chips. The CPU is a Z80A running at 3.9MHz, with 20K of ROM and 1K of RAM mapped. @@ -481,17 +379,15 @@ RST connects to a power-on reset circuit Memory map: ----------- - 0000-1FFF: 8K ROM 101-64018 2000-3FFF: 8K ROM 101-64019 (also used on the sensory champ. chess challenger) 4000-5FFF: 4K ROM 101-32024 6000-7FFF: 1K of RAM (2114 * 2) 8000-FFFF: not used, maps to open bus -I/O map: --------- - -There's only two chips in the I/O map, an 8255 triple port chip, and a Z80A PIO +Port map: +--------- +There's only two chips in the portmap, an 8255 triple port chip, and a Z80A PIO parallel input/output device. Decoding isn't performed using a selector, but instead address lines are used. @@ -521,13 +417,11 @@ This sequence repeats every 16 addresses. So to recap: 10-FF: mirrors of 00-0F. -Refer to the Sensory Champ. Chess Chall. above for explanations of the below +Refer to the Sensory Champ. Chess Chall. for explanations of the below I/O names and labels. It's the same. - 8255: ----- - PA.0 - segment D, TSI A0 PA.1 - segment E, TSI A1 PA.2 - segment F, TSI A2 @@ -555,10 +449,8 @@ PC.5 - LED column F, button column F PC.6 - LED column G, button column G PC.7 - LED column H, button column H - Z80A PIO: --------- - PA.0 - button row 1 PA.1 - button row 2 PA.2 - button row 3 @@ -570,17 +462,15 @@ PA.7 - button row 8 PB.0 - button column I PB.1 - button column J -PB.2 - Tone line (toggle to make tone in the speaker) +PB.2 - hi/lo TSI speaker volume PB.3 - violet wire PB.4 - white wire (and TSI BUSY line) PB.5 - selection jumper input (see below) PB.6 - TSI start line -PB.7 - TSI ROM D0 line - +PB.7 - TSI ROM A12 line selection jumpers: ------------------ - These act like another row of buttons. It is composed of two diode locations, so there's up to 4 possible configurations. My board does not have either diode stuffed, so this most likely is "English". I suspect it selects which language to use @@ -591,86 +481,6 @@ Anyways, the two jumpers are connected to button columns A and B and the common connects to Z80A PIO PB.5, which basically makes a 10th button row. I would expect that the software reads these once on startup only. - -****************************************************************************** - -Sensory Chess Challenger (SC12-B) (6502 based -> fidel6502.cpp driver) ---------------------------------- - -RE information by Berger - -8*(8+1) buttons, 8+8+2 red LEDs -DIN 41524C printer port -36-pin edge connector -CPU is a R65C02P4, running at 4MHz - -NE556 dual-timer IC: -- timer#1, one-shot at power-on, to CPU _RESET -- timer#2: R1=82K, R2=1K, C=22nf, to CPU _IRQ: ~780Hz, active low=15.25us - - -Memory map: ------------ - -6000-0FFF: 4K of RAM (2016 * 2) -2000-5FFF: cartridge -6000-7FFF: control(W) -8000-9FFF: 8K ROM SSS SCM23C65E4 -A000-BFFF: keypad(R) -C000-DFFF: 4K ROM TI TMS2732AJL-45 -E000-FFFF: 8K ROM Toshiba TMM2764D-2 - -control: (74LS377) --------- - -Q0-Q3: 7442 A0-A3 -Q4: enable printer port pin 1 input -Q5: printer port pin 5 output -Q6,Q7: LEDs common anode - -7442 0-8: input mux and LEDs cathode -7442 9: buzzer - -The keypad is read through a 74HC251, where S0,1,2 is from CPU A0,1,2, Y is connected to CPU D7. -If control Q4 is set, printer data can be read from I0. - - -****************************************************************************** - -Voice Excellence (FEV, model 6092) (6502 based -> fidel6502.cpp driver) ----------------------------------- - -PCB 1: 510.1117A02, appears to be identical to other "Excellence" boards -CPU: GTE G65SC102P-3, 32 KB PRG ROM: AMI 101-1080A01(IC5), 8192x8 SRAM SRM2264C10(IC6) -2 rows of LEDs on the side: 1*8 green, 1*8 red - -PCB 2: 510.1117A01 -Speech: TSI S14001A, 32 KB ROM: AMI 101-1081A01(IC2) -Dip Switches set ROM A13 and ROM A14, on the side of the tablet - -ROM A12 is tied to S14001A's A11 (yuck) -ROM A11 is however tied to the CPU's XYZ - -0000_07FF - Spanish 1/4 -0800_0FFF - Spanish 3/4 -1000_17FF - Spanish 2/4 -1800_1FFF - Spanish 4/4 - -2000_27FF - French 1/4 -2800_2FFF - French 3/4 -3000_3FFF - French 2/4 -3800_3FFF - French 4/4 - -4000_47FF - German 1/4 -4800_4FFF - German 3/4 -5000_57FF - German 2/4 -5800_5FFF - German 4/4 - -6000_67FF - English 1/2 -6800_6FFF - Bridge Challenger 1/2 -7000_77FF - English 2/2 -7800_7FFF - Bridge Challenger 2/2 - ******************************************************************************/ #include "emu.h" @@ -679,16 +489,16 @@ ROM A11 is however tied to the CPU's XYZ #include "machine/i8255.h" #include "machine/i8243.h" #include "machine/z80pio.h" -#include "sound/speaker.h" #include "sound/beep.h" #include "includes/fidelz80.h" // internal artwork #include "fidel_cc.lh" +#include "fidel_bcc.lh" #include "fidel_vcc.lh" -#include "fidel_vsc.lh" #include "fidel_vbrc.lh" +#include "fidel_vsc.lh" // clickable class fidelz80_state : public fidelz80base_state @@ -700,7 +510,6 @@ public: m_z80pio(*this, "z80pio"), m_ppi8255(*this, "ppi8255"), m_i8243(*this, "i8243"), - m_speaker(*this, "speaker"), m_beeper_off(*this, "beeper_off"), m_beeper(*this, "beeper") { } @@ -710,13 +519,12 @@ public: optional_device<z80pio_device> m_z80pio; optional_device<i8255_device> m_ppi8255; optional_device<i8243_device> m_i8243; - optional_device<speaker_sound_device> m_speaker; optional_device<timer_device> m_beeper_off; optional_device<beep_device> m_beeper; DECLARE_INPUT_CHANGED_MEMBER(reset_button); - // model VCC/UVC/CC10 + // CC10 and VCC/UVC void vcc_prepare_display(); DECLARE_READ8_MEMBER(vcc_speech_r); DECLARE_WRITE8_MEMBER(vcc_ppi_porta_w); @@ -726,8 +534,12 @@ public: DECLARE_WRITE8_MEMBER(vcc_ppi_portc_w); DECLARE_WRITE8_MEMBER(cc10_ppi_porta_w); TIMER_DEVICE_CALLBACK_MEMBER(beeper_off_callback); + + // BCC + DECLARE_READ8_MEMBER(bcc_input_r); + DECLARE_WRITE8_MEMBER(bcc_control_w); - // model VSC + // VSC void vsc_prepare_display(); DECLARE_READ8_MEMBER(vsc_io_trampoline_r); DECLARE_WRITE8_MEMBER(vsc_io_trampoline_w); @@ -738,7 +550,7 @@ public: DECLARE_READ8_MEMBER(vsc_pio_portb_r); DECLARE_WRITE8_MEMBER(vsc_pio_portb_w); - // model 7014 and VBC + // VBRC/7014 void vbrc_prepare_display(); DECLARE_WRITE8_MEMBER(vbrc_speech_w); DECLARE_WRITE8_MEMBER(vbrc_mcu_p1_w); @@ -762,6 +574,7 @@ void fidelz80base_state::machine_start() m_led_select = 0; m_led_data = 0; m_7seg_data = 0; + m_speech_data = 0; m_speech_bank = 0; // register for savestates @@ -778,6 +591,7 @@ void fidelz80base_state::machine_start() save_item(NAME(m_led_select)); save_item(NAME(m_led_data)); save_item(NAME(m_7seg_data)); + save_item(NAME(m_speech_data)); save_item(NAME(m_speech_bank)); } @@ -866,7 +680,18 @@ void fidelz80base_state::set_display_size(int maxx, int maxy) m_display_maxy = maxy; } -void fidelz80base_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +void fidelz80base_state::set_display_segmask(UINT32 digits, UINT32 mask) +{ + // set a segment mask per selected digit, but leave unselected ones alone + for (int i = 0; i < 0x20; i++) + { + if (digits & 1) + m_display_segmask[i] = mask; + digits >>= 1; + } +} + +void fidelz80base_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) { set_display_size(maxx, maxy); @@ -875,7 +700,8 @@ void fidelz80base_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; - display_update(); + if (update) + display_update(); } @@ -903,6 +729,26 @@ INPUT_CHANGED_MEMBER(fidelz80_state::reset_button) } +// cartridge + +DEVICE_IMAGE_LOAD_MEMBER(fidelz80base_state, scc_cartridge) +{ + UINT32 size = m_cart->common_get_size("rom"); + + // max size is 16KB? + if (size > 0x4000) + { + image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid file size"); + return IMAGE_INIT_FAIL; + } + + m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); + m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); + + return IMAGE_INIT_PASS; +} + + // Devices, I/O @@ -914,12 +760,9 @@ INPUT_CHANGED_MEMBER(fidelz80_state::reset_button) void fidelz80_state::vcc_prepare_display() { - // 4 7seg leds - for (int i = 0; i < 4; i++) - m_display_segmask[i] = 0x7f; - - // note: sel d0 for extra leds + // 4 7seg leds (note: sel d0 for extra leds) UINT8 outdata = (m_7seg_data & 0x7f) | (m_led_select << 7 & 0x80); + set_display_segmask(0xf, 0x7f); display_matrix(8, 4, outdata, m_led_select >> 2 & 0xf); } @@ -1003,6 +846,34 @@ WRITE8_MEMBER(fidelz80_state::cc10_ppi_porta_w) /****************************************************************************** + BCC +******************************************************************************/ + +// TTL + +WRITE8_MEMBER(fidelz80_state::bcc_control_w) +{ + // a0-a2,d7: digit segment data via NE591, Q7 is speaker out + UINT8 mask = 1 << (offset & 7); + m_7seg_data = (m_7seg_data & ~mask) | ((data & 0x80) ? mask : 0); + m_speaker->level_w(m_7seg_data >> 7 & 1); + + // d0-d3: led select, input mux + // d4,d5: check,lose leds(direct) + set_display_segmask(0xf, 0x7f); + display_matrix(7, 6, m_7seg_data & 0x7f, data & 0x3f); + m_inp_mux = data & 0xf; +} + +READ8_MEMBER(fidelz80_state::bcc_input_r) +{ + // d0-d3: multiplexed inputs + return read_inputs(4); +} + + + +/****************************************************************************** VSC ******************************************************************************/ @@ -1012,16 +883,14 @@ void fidelz80_state::vsc_prepare_display() { // 4 7seg leds + H for (int i = 0; i < 4; i++) - { - m_display_segmask[i] = 0x7f; m_display_state[i] = (m_led_select >> i & 1) ? m_7seg_data : 0; - } // 8*8 chessboard leds for (int i = 0; i < 8; i++) m_display_state[i+4] = (m_led_select >> i & 1) ? m_led_data : 0; set_display_size(8, 12); + set_display_segmask(0xf, 0x7f); display_update(); } @@ -1049,7 +918,7 @@ WRITE8_MEMBER(fidelz80_state::vsc_ppi_portc_w) { // d0-d3: select digits // d0-d7: select leds, input mux low bits - m_inp_mux = (m_inp_mux & 0x300) | data; + m_inp_mux = (m_inp_mux & ~0xff) | data; m_led_select = data; vsc_prepare_display(); } @@ -1060,35 +929,40 @@ WRITE8_MEMBER(fidelz80_state::vsc_ppi_portc_w) READ8_MEMBER(fidelz80_state::vsc_pio_porta_r) { // d0-d7: multiplexed inputs - return read_inputs(10); + return read_inputs(11); } READ8_MEMBER(fidelz80_state::vsc_pio_portb_r) { - UINT8 ret = 0; + UINT8 data = 0; // d4: TSI BUSY line - ret |= (m_speech->busy_r()) ? 0 : 0x10; - - return ret; + data |= (m_speech->busy_r()) ? 0 : 0x10; + + return data; } WRITE8_MEMBER(fidelz80_state::vsc_pio_portb_w) { // d0,d1: input mux highest bits - m_inp_mux = (m_inp_mux & 0xff) | (data << 8 & 0x300); - - // d2: tone line - m_speaker->level_w(data >> 2 & 1); - + // d5: enable language switch + m_inp_mux = (m_inp_mux & 0xff) | (data << 8 & 0x300) | (data << 5 & 0x400); + + // d7: TSI ROM A12 + m_speech->force_update(); // update stream to now + m_speech_bank = data >> 7 & 1; + // d6: TSI START line m_speech->start_w(data >> 6 & 1); + + // d2: lower TSI volume + m_speech->set_output_gain(0, (data & 4) ? 0.5 : 1.0); } /****************************************************************************** - VBRC + VBRC/7014 ******************************************************************************/ // misc handlers @@ -1097,9 +971,7 @@ void fidelz80_state::vbrc_prepare_display() { // 14seg led segments, d15 is extra led, d14 is unused (tone on prototype?) UINT16 outdata = BITSWAP16(m_7seg_data,12,13,1,6,5,2,0,7,15,11,10,14,4,3,9,8); - for (int i = 0; i < 8; i++) - m_display_segmask[i] = 0x3fff; - + set_display_segmask(0xff, 0x3fff); display_matrix(16, 8, outdata, m_led_select); } @@ -1151,8 +1023,9 @@ READ8_MEMBER(fidelz80_state::vbrc_mcu_t_r) static ADDRESS_MAP_START( cc10_map, AS_PROGRAM, 8, fidelz80_state ) ADDRESS_MAP_UNMAP_HIGH + ADDRESS_MAP_GLOBAL_MASK(0x3fff) AM_RANGE(0x0000, 0x0fff) AM_ROM - AM_RANGE(0x3000, 0x31ff) AM_RAM + AM_RANGE(0x3000, 0x31ff) AM_MIRROR(0x0e00) AM_RAM ADDRESS_MAP_END static ADDRESS_MAP_START( vcc_map, AS_PROGRAM, 8, fidelz80_state ) @@ -1167,6 +1040,21 @@ static ADDRESS_MAP_START( vcc_io, AS_IO, 8, fidelz80_state ) ADDRESS_MAP_END +// BCC + +static ADDRESS_MAP_START( bcc_map, AS_PROGRAM, 8, fidelz80_state ) + ADDRESS_MAP_UNMAP_HIGH + ADDRESS_MAP_GLOBAL_MASK(0x3fff) + AM_RANGE(0x0000, 0x0fff) AM_ROM + AM_RANGE(0x3000, 0x30ff) AM_MIRROR(0x0f00) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( bcc_io, AS_IO, 8, fidelz80_state ) + ADDRESS_MAP_GLOBAL_MASK(0x07) + AM_RANGE(0x00, 0x07) AM_READWRITE(bcc_input_r, bcc_control_w) +ADDRESS_MAP_END + + // VSC static ADDRESS_MAP_START( vsc_map, AS_PROGRAM, 8, fidelz80_state ) @@ -1179,13 +1067,13 @@ ADDRESS_MAP_END // VSC io: A2 is 8255 _CE, A3 is Z80 PIO _CE - in theory, both chips can be accessed simultaneously READ8_MEMBER(fidelz80_state::vsc_io_trampoline_r) { - UINT8 ret = 0xff; // open bus + UINT8 data = 0xff; // open bus if (~offset & 4) - ret &= m_ppi8255->read(space, offset & 3); + data &= m_ppi8255->read(space, offset & 3); if (~offset & 8) - ret &= m_z80pio->read(space, offset & 3); + data &= m_z80pio->read(space, offset & 3); - return ret; + return data; } WRITE8_MEMBER(fidelz80_state::vsc_io_trampoline_w) @@ -1202,25 +1090,20 @@ static ADDRESS_MAP_START( vsc_io, AS_IO, 8, fidelz80_state ) ADDRESS_MAP_END -// VBRC +// VBRC/7014 WRITE8_MEMBER(fidelz80_state::vbrc_speech_w) { - //printf("%X ",data); - - // todo: HALT THE z80 here, and set up a callback to poll the s14001a BUSY line to resume z80 m_speech->data_w(space, 0, data & 0x3f); m_speech->start_w(1); m_speech->start_w(0); - - //m_speech->start_w(BIT(data, 7)); } static ADDRESS_MAP_START( vbrc_main_map, AS_PROGRAM, 8, fidelz80_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x6000, 0x63ff) AM_MIRROR(0x1c00) AM_RAM - AM_RANGE(0xe000, 0xffff) AM_MIRROR(0x1fff) AM_WRITE(vbrc_speech_w) + AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1fff) AM_WRITE(vbrc_speech_w) ADDRESS_MAP_END static ADDRESS_MAP_START( vbrc_main_io, AS_IO, 8, fidelz80_state ) @@ -1242,200 +1125,290 @@ ADDRESS_MAP_END Input Ports ******************************************************************************/ -static INPUT_PORTS_START( fidelz80 ) +static INPUT_PORTS_START( vcc_base ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_A) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_E) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_A) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(KEYCODE_E) PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CB") PORT_CODE(KEYCODE_Z) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Speaker") PORT_CODE(KEYCODE_SPACE) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_B) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(KEYCODE_B) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_F) PORT_START("IN.2") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_P) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_C) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_G) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CODE(KEYCODE_C) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_G) PORT_START("IN.3") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_ENTER) PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PV") PORT_CODE(KEYCODE_O) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_D) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_H) - - PORT_START("IN.4") // TODO: hardcode this - PORT_CONFNAME( 0x0f, 0x00, "Language" ) - PORT_CONFSETTING( 0x00, "English" ) - PORT_CONFSETTING( 0x01, "French" ) - PORT_CONFSETTING( 0x02, "Spanish" ) - PORT_CONFSETTING( 0x04, "German" ) - PORT_CONFSETTING( 0x08, "Special" ) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(KEYCODE_D) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_H) PORT_START("RESET") // is not on matrix IN.0 d0 PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) PORT_CHANGED_MEMBER(DEVICE_SELF, fidelz80_state, reset_button, 0) +INPUT_PORTS_END + +static INPUT_PORTS_START( cc10 ) + PORT_INCLUDE( vcc_base ) + + PORT_START("IN.4") + PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("LEVEL") // hardwired (VCC/GND?) + PORT_CONFNAME( 0x80, 0x00, "Maximum Levels" ) + PORT_CONFSETTING( 0x00, "10" ) // factory setting + PORT_CONFSETTING( 0x80, "3" ) +INPUT_PORTS_END + +static INPUT_PORTS_START( vcc ) + PORT_INCLUDE( vcc_base ) + + PORT_START("IN.4") // PCB jumpers, not consumer accessible + PORT_CONFNAME( 0x01, 0x00, "Language: German" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x01, DEF_STR( On ) ) + PORT_CONFNAME( 0x02, 0x00, "Language: French" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x02, DEF_STR( On ) ) + PORT_CONFNAME( 0x04, 0x00, "Language: Spanish" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x04, DEF_STR( On ) ) + PORT_CONFNAME( 0x08, 0x00, "Language: Special" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x08, DEF_STR( On ) ) +INPUT_PORTS_END + +static INPUT_PORTS_START( vccfr ) + PORT_INCLUDE( vcc ) + + PORT_MODIFY("IN.4") + PORT_CONFNAME( 0x02, 0x02, "Language: French" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x02, DEF_STR( On ) ) +INPUT_PORTS_END + +static INPUT_PORTS_START( vccsp ) + PORT_INCLUDE( vcc ) + + PORT_MODIFY("IN.4") + PORT_CONFNAME( 0x04, 0x04, "Language: Spanish" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x04, DEF_STR( On ) ) +INPUT_PORTS_END - PORT_START("LEVEL") // cc10 only, TODO: hardcode this - PORT_CONFNAME( 0x80, 0x00, "Number of levels" ) - PORT_CONFSETTING( 0x00, "10" ) - PORT_CONFSETTING( 0x80, "3" ) +static INPUT_PORTS_START( vccg ) + PORT_INCLUDE( vcc ) + + PORT_MODIFY("IN.4") + PORT_CONFNAME( 0x01, 0x01, "Language: German" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x01, DEF_STR( On ) ) +INPUT_PORTS_END + + +static INPUT_PORTS_START( bcc ) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_ENTER) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PV") PORT_CODE(KEYCODE_O) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("d4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(KEYCODE_D) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_H) + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_P) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CODE(KEYCODE_C) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("g7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_G) + + PORT_START("IN.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CB") PORT_CODE(KEYCODE_SPACE) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("b2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(KEYCODE_B) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_F) + + PORT_START("IN.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_A) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(KEYCODE_E) INPUT_PORTS_END + static INPUT_PORTS_START( vsc ) PORT_START("IN.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square a8") PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square b8") PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square c8") PORT_START("IN.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square d8") PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square e8") PORT_START("IN.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square f8") PORT_START("IN.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square g8") PORT_START("IN.7") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h4") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h5") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Square h8") PORT_START("IN.8") // buttons on the right - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn") PORT_CODE(KEYCODE_1) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook") PORT_CODE(KEYCODE_2) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight") PORT_CODE(KEYCODE_3) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop") PORT_CODE(KEYCODE_4) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen") PORT_CODE(KEYCODE_5) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King") PORT_CODE(KEYCODE_6) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Pawn") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Rook") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Knight") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Queen") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("King") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("RE") PORT_START("IN.9") // buttons beside the display - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TM") PORT_CODE(KEYCODE_T) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RV") PORT_CODE(KEYCODE_V) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Speak") PORT_CODE(KEYCODE_SPACE) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LV") PORT_CODE(KEYCODE_L) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ST") PORT_CODE(KEYCODE_S) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("TM") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("RV") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Speaker") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LV") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("DM") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("ST") PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("IN.10") // hardwired (2 diodes) + PORT_CONFNAME( 0x01, 0x00, "Language" ) + PORT_CONFSETTING( 0x00, "English" ) + PORT_CONFSETTING( 0x01, "Other" ) + PORT_CONFNAME( 0x02, 0x00, DEF_STR( Unknown ) ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x02, DEF_STR( On ) ) +INPUT_PORTS_END + +static INPUT_PORTS_START( vscg ) + PORT_INCLUDE( vsc ) + + PORT_MODIFY("IN.10") + PORT_CONFNAME( 0x01, 0x01, "Language" ) + PORT_CONFSETTING( 0x00, "English" ) + PORT_CONFSETTING( 0x01, "Other" ) INPUT_PORTS_END + static INPUT_PORTS_START( vbrc ) PORT_START("IN.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A") PORT_CODE(KEYCODE_A) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("10") PORT_CODE(KEYCODE_0) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("6") PORT_CODE(KEYCODE_6) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("2") PORT_CODE(KEYCODE_2) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("A") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_NAME("10") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("6") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("2") PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("K") PORT_CODE(KEYCODE_K) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("9") PORT_CODE(KEYCODE_9) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("5") PORT_CODE(KEYCODE_5) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("1") PORT_CODE(KEYCODE_1) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_K) PORT_NAME("K") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_NAME("9") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("5") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("1") PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("8") PORT_CODE(KEYCODE_8) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("4") PORT_CODE(KEYCODE_4) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("P") PORT_CODE(KEYCODE_Z) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Q") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("8") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("4") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("P") PORT_START("IN.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("J") PORT_CODE(KEYCODE_J) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("7") PORT_CODE(KEYCODE_7) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("3") PORT_CODE(KEYCODE_3) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("NT") PORT_CODE(KEYCODE_N) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_J) PORT_NAME("J") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("7") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("NT") PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("EN") PORT_CODE(KEYCODE_E) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("SC") PORT_CODE(KEYCODE_S) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PL") PORT_CODE(KEYCODE_X) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Spades") PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("EN") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("SC") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("PL") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Spades") PORT_START("IN.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_C) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DB") PORT_CODE(KEYCODE_D) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("VL") PORT_CODE(KEYCODE_V) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Hearts") PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("CL") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("DB") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("VL") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Hearts") PORT_START("IN.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Beep on/off") PORT_CODE(KEYCODE_SPACE) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PB") PORT_CODE(KEYCODE_B) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CV") PORT_CODE(KEYCODE_G) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Diamonds") PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Speaker") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("PB") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("CV") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Diamonds") PORT_START("IN.7") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BR") PORT_CODE(KEYCODE_T) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DL") PORT_CODE(KEYCODE_L) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Clubs") PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("BR") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("DL") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Clubs") PORT_START("RESET") // is not on matrix IN.7 d0 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RE") PORT_CODE(KEYCODE_R) PORT_CHANGED_MEMBER(DEVICE_SELF, fidelz80_state, reset_button, 0) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_CHANGED_MEMBER(DEVICE_SELF, fidelz80_state, reset_button, 0) PORT_NAME("RE") INPUT_PORTS_END @@ -1444,6 +1417,22 @@ INPUT_PORTS_END Machine Drivers ******************************************************************************/ +static MACHINE_CONFIG_START( bcc, fidelz80_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz) + MCFG_CPU_PROGRAM_MAP(bcc_map) + MCFG_CPU_IO_MAP(bcc_io) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", fidelz80base_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_fidel_bcc) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + static MACHINE_CONFIG_START( cc10, fidelz80_state ) /* basic machine hardware */ @@ -1516,10 +1505,8 @@ static MACHINE_CONFIG_START( vsc, fidelz80_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz + MCFG_S14001A_EXT_READ_HANDLER(READ8(fidelz80_state, vcc_speech_r)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) - - MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END static MACHINE_CONFIG_START( vbrc, fidelz80_state ) @@ -1541,6 +1528,7 @@ static MACHINE_CONFIG_START( vbrc, fidelz80_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz + MCFG_S14001A_BSY_HANDLER(INPUTLINE("maincpu", Z80_INPUT_LINE_WAIT)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) MACHINE_CONFIG_END @@ -1555,6 +1543,11 @@ ROM_START( cc10 ) ROM_LOAD( "cc10b", 0x0000, 0x1000, CRC(afd3ca99) SHA1(870d09b2b52ccb8572d69642c59b5215d5fb26ab) ) // 2332 ROM_END +ROM_START( cc7 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "cn19103n_bcc-revb", 0x0000, 0x1000, CRC(a397d471) SHA1(9b12bc442fccee40f4d8500c792bc9d886c5e1a5) ) // 2332 +ROM_END + ROM_START( vcc ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -1567,34 +1560,34 @@ ROM_START( vcc ) ROM_RELOAD( 0x1000, 0x1000) ROM_END -ROM_START( vccg ) +ROM_START( vccsp ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("101-32103.bin", 0x0000, 0x1000, CRC(257bb5ab) SHA1(f7589225bb8e5f3eac55f23e2bd526be780b38b5) ) ROM_LOAD("vcc2.bin", 0x1000, 0x1000, CRC(f33095e7) SHA1(692fcab1b88c910b74d04fe4d0660367aee3f4f0) ) ROM_LOAD("vcc3.bin", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) ) ROM_REGION( 0x2000, "speech", 0 ) - ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv + ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) // dumped from Spanish VCC, is same as data in fexcelv ROM_END -ROM_START( vccfr ) +ROM_START( vccg ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("101-32103.bin", 0x0000, 0x1000, CRC(257bb5ab) SHA1(f7589225bb8e5f3eac55f23e2bd526be780b38b5) ) ROM_LOAD("vcc2.bin", 0x1000, 0x1000, CRC(f33095e7) SHA1(692fcab1b88c910b74d04fe4d0660367aee3f4f0) ) ROM_LOAD("vcc3.bin", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) ) ROM_REGION( 0x2000, "speech", 0 ) - ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv + ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct ROM_END -ROM_START( vccsp ) +ROM_START( vccfr ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("101-32103.bin", 0x0000, 0x1000, CRC(257bb5ab) SHA1(f7589225bb8e5f3eac55f23e2bd526be780b38b5) ) ROM_LOAD("vcc2.bin", 0x1000, 0x1000, CRC(f33095e7) SHA1(692fcab1b88c910b74d04fe4d0660367aee3f4f0) ) ROM_LOAD("vcc3.bin", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) ) ROM_REGION( 0x2000, "speech", 0 ) - ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) + ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct ROM_END @@ -1603,8 +1596,36 @@ ROM_START( uvc ) ROM_LOAD("101-64017.b3", 0x0000, 0x2000, CRC(f1133abf) SHA1(09dd85051c4e7d364d43507c1cfea5c2d08d37f4) ) // "MOS // 101-64017 // 3880" ROM_LOAD("101-32010.a1", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) ) // "NEC P9Z021 // D2332C 228 // 101-32010", == vcc3.bin on vcc - ROM_REGION( 0x1000, "speech", 0 ) + ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD("101-32107.c4", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d) ) // "NEC P9Y019 // D2332C 229 // 101-32107", == vcc-engl.bin on vcc + ROM_RELOAD( 0x1000, 0x1000) +ROM_END + +ROM_START( uvcsp ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64017.b3", 0x0000, 0x2000, CRC(f1133abf) SHA1(09dd85051c4e7d364d43507c1cfea5c2d08d37f4) ) + ROM_LOAD("101-32010.a1", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) +ROM_END + +ROM_START( uvcg ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64017.b3", 0x0000, 0x2000, CRC(f1133abf) SHA1(09dd85051c4e7d364d43507c1cfea5c2d08d37f4) ) + ROM_LOAD("101-32010.a1", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct +ROM_END + +ROM_START( uvcfr ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64017.b3", 0x0000, 0x2000, CRC(f1133abf) SHA1(09dd85051c4e7d364d43507c1cfea5c2d08d37f4) ) + ROM_LOAD("101-32010.a1", 0x2000, 0x1000, CRC(624f0cd5) SHA1(7c1a4f4497fe5882904de1d6fecf510c07ee6fc6) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct ROM_END @@ -1614,8 +1635,39 @@ ROM_START( vsc ) ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) ) ROM_LOAD("101-32024.bin", 0x4000, 0x1000, CRC(2a078676) SHA1(db2f0aba7e8ac0f84a17bae7155210cdf0813afb) ) - ROM_REGION( 0x1000, "speech", 0 ) + ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD("101-32107.bin", 0x0000, 0x1000, CRC(f35784f9) SHA1(348e54a7fa1e8091f89ac656b4da22f28ca2e44d) ) + ROM_RELOAD( 0x1000, 0x1000) +ROM_END + +ROM_START( vscsp ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64108.bin", 0x0000, 0x2000, CRC(c9c98490) SHA1(e6db883df088d60463e75db51433a4b01a3e7626) ) + ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) ) + ROM_LOAD("101-32024.bin", 0x4000, 0x1000, CRC(2a078676) SHA1(db2f0aba7e8ac0f84a17bae7155210cdf0813afb) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-spanish.bin", 0x0000, 0x2000, BAD_DUMP CRC(8766e128) SHA1(78c7413bf240159720b131ab70bfbdf4e86eb1e9) ) // taken from vcc/fexcelv, assume correct +ROM_END + +ROM_START( vscg ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64108.bin", 0x0000, 0x2000, CRC(c9c98490) SHA1(e6db883df088d60463e75db51433a4b01a3e7626) ) + ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) ) + ROM_LOAD("101-32024.bin", 0x4000, 0x1000, CRC(2a078676) SHA1(db2f0aba7e8ac0f84a17bae7155210cdf0813afb) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-german.bin", 0x0000, 0x2000, BAD_DUMP CRC(6c85e310) SHA1(20d1d6543c1e6a1f04184a2df2a468f33faec3ff) ) // taken from fexcelv, assume correct +ROM_END + +ROM_START( vscfr ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("101-64108.bin", 0x0000, 0x2000, CRC(c9c98490) SHA1(e6db883df088d60463e75db51433a4b01a3e7626) ) + ROM_LOAD("101-64109.bin", 0x2000, 0x2000, CRC(08a3577c) SHA1(69fe379d21a9d4b57c84c3832d7b3e7431eec341) ) + ROM_LOAD("101-32024.bin", 0x4000, 0x1000, CRC(2a078676) SHA1(db2f0aba7e8ac0f84a17bae7155210cdf0813afb) ) + + ROM_REGION( 0x2000, "speech", 0 ) + ROM_LOAD("vcc-french.bin", 0x0000, 0x2000, BAD_DUMP CRC(fe8c5c18) SHA1(2b64279ab3747ee81c86963c13e78321c6cfa3a3) ) // taken from fexcelv, assume correct ROM_END @@ -1653,15 +1705,24 @@ ROM_END Drivers ******************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -COMP( 1978, cc10, 0, 0, cc10, fidelz80, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (version B)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -COMP( 1979, vcc, 0, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -COMP( 1979, vccg, vcc, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -COMP( 1979, vccfr, vcc, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -COMP( 1979, vccsp, vcc, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -COMP( 1980, uvc, vcc, 0, vcc, fidelz80, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +COMP( 1978, cc10, 0, 0, cc10, cc10, driver_device, 0, "Fidelity Electronics", "Chess Challenger 10 (rev. B)", MACHINE_SUPPORTS_SAVE ) +COMP( 1979, cc7, 0, 0, bcc, bcc, driver_device, 0, "Fidelity Electronics", "Chess Challenger 7 (rev. B)", MACHINE_SUPPORTS_SAVE ) + +COMP( 1979, vcc, 0, 0, vcc, vcc, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE ) +COMP( 1979, vccsp, vcc, 0, vcc, vccsp, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE ) +COMP( 1979, vccg, vcc, 0, vcc, vccg, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE ) +COMP( 1979, vccfr, vcc, 0, vcc, vccfr, driver_device, 0, "Fidelity Electronics", "Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE ) + +COMP( 1980, uvc, vcc, 0, vcc, vcc, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (English)", MACHINE_SUPPORTS_SAVE ) +COMP( 1980, uvcsp, vcc, 0, vcc, vccsp, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE ) +COMP( 1980, uvcg, vcc, 0, vcc, vccg, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (German)", MACHINE_SUPPORTS_SAVE ) +COMP( 1980, uvcfr, vcc, 0, vcc, vccfr, driver_device, 0, "Fidelity Electronics", "Advanced Voice Chess Challenger (French)", MACHINE_SUPPORTS_SAVE ) -COMP( 1980, vsc, 0, 0, vsc, vsc, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1980, vsc, 0, 0, vsc, vsc, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1980, vscsp, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (Spanish)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1980, vscg, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (German)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1980, vscfr, vsc, 0, vsc, vscg, driver_device, 0, "Fidelity Electronics", "Voice Sensory Chess Challenger (French)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -COMP( 1979, vbrc, 0, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -COMP( 1980, bridgec3, vbrc, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger III", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +COMP( 1979, vbrc, 0, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +COMP( 1980, bridgec3, vbrc, 0, vbrc, vbrc, driver_device, 0, "Fidelity Electronics", "Voice Bridge Challenger III", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/funkball.cpp b/src/mame/drivers/funkball.cpp index caa650705fe..6eaf7c496ef 100644 --- a/src/mame/drivers/funkball.cpp +++ b/src/mame/drivers/funkball.cpp @@ -142,7 +142,7 @@ void funkball_state::video_start() UINT32 funkball_state::screen_update( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect ) { - return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; + return m_voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; } static UINT32 voodoo_0_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) @@ -186,7 +186,7 @@ static void voodoo_0_pci_w(device_t *busdevice, device_t *device, int function, break; case 0x40: state->m_voodoo_pci_regs.init_enable = data; - voodoo_set_init_enable(state->m_voodoo, data); + state->m_voodoo->voodoo_set_init_enable(data); break; } } diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp index 06a068e372c..44739b59053 100644 --- a/src/mame/drivers/gaelco2.cpp +++ b/src/mame/drivers/gaelco2.cpp @@ -1046,9 +1046,6 @@ ROM_START( snowboara ) ROM_LOAD( "sb44", 0x0000000, 0x0400000, CRC(1bbe88bc) SHA1(15bce9ada2b742ba4d537fa8efc0f29f661bff00) ) /* GFX only */ ROM_LOAD( "sb45", 0x0400000, 0x0400000, CRC(373983d9) SHA1(05e35a8b27cab469885f0ec2a5df200a366b50a1) ) /* Sound only */ ROM_LOAD( "sb46", 0x0800000, 0x0400000, CRC(22e7c648) SHA1(baddb9bc13accd83bea61533d7286cf61cd89279) ) /* GFX only */ - - DISK_REGION( "decrypt" ) - DISK_IMAGE( "snowboar", 0, SHA1(fecf611bd9289d24a0b1cabaaf030e2cee322cfa) ) ROM_END ROM_START( snowboar ) @@ -1086,9 +1083,6 @@ ROM_START( snowboar ) ROM_LOAD( "sb.e2", 0x1100000, 0x0080000, CRC(f5948c6c) SHA1(91bba817ced194b02885ce84b7a8132ef5ca631a) ) /* GFX only */ ROM_LOAD( "sb.e3", 0x1180000, 0x0080000, CRC(4baa678f) SHA1(a7fbbd687e2d8d7e96207c8ace0799a3cc9c3272) ) /* GFX only */ ROM_FILL( 0x1200000, 0x0200000, 0x00 ) /* Empty */ - - DISK_REGION( "decrypt" ) - DISK_IMAGE( "snowboar", 0, SHA1(fecf611bd9289d24a0b1cabaaf030e2cee322cfa) ) ROM_END diff --git a/src/mame/drivers/galaxi.cpp b/src/mame/drivers/galaxi.cpp index 679bd63b40d..de2e1e47512 100644 --- a/src/mame/drivers/galaxi.cpp +++ b/src/mame/drivers/galaxi.cpp @@ -1,46 +1,41 @@ // license:BSD-3-Clause -// copyright-holders:Luca Elia +// copyright-holders:Luca Elia,Roberto Fresca /*************************************************************************** -Galaxi (C)2000 B.R.L. + Galaxi (C)2000 B.R.L. -driver by Luca Elia + Driver by Luca Elia. + Additional work by Roberto Fresca. -Hardware info (29/07/2008 f205v): -Chips: + Hardware info (29/07/2008 f205v): + + Chips: 1x missing main CPU (u1)(from the socket I would say it's a 68000) 1x A40MX04-PL84 (u29) 1x AD-65 (equivalent to M6295) (u9)(sound) 1x MC1458P (u10)(sound) 1x TDA2003 (u8)(sound) 1x oscillator 10.000MHz (QZ1) - 1x oscillator 16.000000 (QZ2) -ROMs: + 1x oscillator 16.000000 (QZ2) + ROMs: 1x AT27C020 (1) 2x M27C4001 (2,3) 2x AT49F010 (4,5) 2x DS1230Y (non volatile SRAM) -Notes: + Notes: 1x 28x2 edge connector 1x trimmer (volume) -- This hardware is almost identical to that in magic10.c - - -[31/08/2008] (Roberto Fresca) - -- Added Magic Joker. -- Fixed the 3rd background offset to Galaxi. -- Remapped inputs to match the standard poker games. - -[12/09/2008] (Roberto Fresca) - -- Added lamps support to magjoker & galaxi. + - This hardware is almost identical to that in magic10.c + CPU is a MC68000P10, from the other games boards... ***************************************************************************/ +#define CPU_CLOCK (XTAL_10MHz) +#define SND_CLOCK (XTAL_16MHz)/16 + #include "emu.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" @@ -229,7 +224,7 @@ UINT32 galaxi_state::screen_update_galaxi(screen_device &screen, bitmap_ind16 &b } /*************************************************************************** - Memory Maps + Handlers ***************************************************************************/ void galaxi_state::show_out( ) @@ -295,6 +290,10 @@ CUSTOM_INPUT_MEMBER(galaxi_state::hopper_r) } +/*************************************************************************** + Memory Maps +***************************************************************************/ + static ADDRESS_MAP_START( galaxi_map, AS_PROGRAM, 16, galaxi_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM @@ -343,6 +342,7 @@ static ADDRESS_MAP_START( lastfour_map, AS_PROGRAM, 16, galaxi_state ) AM_RANGE(0x600000, 0x607fff) AM_RAM AM_SHARE("nvram") // 2x DS1230Y (non volatile SRAM) ADDRESS_MAP_END + /*************************************************************************** Input Ports ***************************************************************************/ @@ -389,7 +389,7 @@ INPUT_PORTS_END /*************************************************************************** - Graphics Layout + Graphics Layout & Graphics Decode ***************************************************************************/ static const gfx_layout layout_8x8x4 = @@ -421,7 +421,7 @@ GFXDECODE_END /*************************************************************************** - Machine Drivers + Machine Start & Reset ***************************************************************************/ void galaxi_state::machine_start() @@ -438,10 +438,14 @@ void galaxi_state::machine_reset() m_out = 0; } +/*************************************************************************** + Machine Drivers +***************************************************************************/ + static MACHINE_CONFIG_START( galaxi, galaxi_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", M68000, XTAL_10MHz) // ? + MCFG_CPU_ADD("maincpu", M68000, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(galaxi_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", galaxi_state, irq4_line_hold) @@ -460,19 +464,16 @@ static MACHINE_CONFIG_START( galaxi, galaxi_state ) MCFG_PALETTE_ADD("palette", 0x400) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) - /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_OKIM6295_ADD("oki", XTAL_16MHz/16, OKIM6295_PIN7_LOW) // ? + MCFG_OKIM6295_ADD("oki", SND_CLOCK, OKIM6295_PIN7_LOW) // ? MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( magjoker, galaxi ) - /* basic machine hardware */ - /* sound hardware */ MCFG_SOUND_MODIFY("oki") @@ -481,11 +482,15 @@ static MACHINE_CONFIG_DERIVED( magjoker, galaxi ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 4.0) MACHINE_CONFIG_END + static MACHINE_CONFIG_DERIVED( lastfour, galaxi ) + + /* basic machine hardware */ MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(lastfour_map) MACHINE_CONFIG_END + /*************************************************************************** ROMs Loading ***************************************************************************/ @@ -533,7 +538,7 @@ ROM_END Game Drivers ***************************************************************************/ -/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ -GAMEL( 2000, galaxi, 0, galaxi, galaxi, driver_device, 0, ROT0, "B.R.L.", "Galaxi (v2.0)", MACHINE_SUPPORTS_SAVE, layout_galaxi ) -GAMEL( 2000, magjoker, 0, magjoker, magjoker, driver_device, 0, ROT0, "B.R.L.", "Magic Joker (v1.25.10.2000)", MACHINE_SUPPORTS_SAVE, layout_galaxi ) -GAMEL( 2001, lastfour, 0, lastfour, magjoker, driver_device, 0, ROT0, "B.R.L.", "Last Four (09:12 16/01/2001)",MACHINE_SUPPORTS_SAVE, layout_galaxi ) +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ +GAMEL( 2000, galaxi, 0, galaxi, galaxi, driver_device, 0, ROT0, "B.R.L.", "Galaxi (v2.0)", MACHINE_SUPPORTS_SAVE, layout_galaxi ) +GAMEL( 2000, magjoker, 0, magjoker, magjoker, driver_device, 0, ROT0, "B.R.L.", "Magic Joker (v1.25.10.2000)", MACHINE_SUPPORTS_SAVE, layout_galaxi ) +GAMEL( 2001, lastfour, 0, lastfour, magjoker, driver_device, 0, ROT0, "B.R.L.", "Last Four (09:12 16/01/2001)", MACHINE_SUPPORTS_SAVE, layout_galaxi ) diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp index 9fb23df9be1..09b615701cf 100644 --- a/src/mame/drivers/galaxian.cpp +++ b/src/mame/drivers/galaxian.cpp @@ -9750,6 +9750,7 @@ ROM_START( frogger ) ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) ) ROM_END + ROM_START( froggers1 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "frogger.26", 0x0000, 0x1000, CRC(597696d6) SHA1(e7e021776cad00f095a1ebbef407b7c0a8f5d835) ) /* We need the correct Sega "EPR" labels for these 3 */ @@ -9789,6 +9790,26 @@ ROM_START( froggers2 ) ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) ) ROM_END +ROM_START( froggers3 ) + ROM_REGION( 0x10000, "maincpu", 0 ) // different code revision, but didn't have Sega labels (other roms on PCB did) so might be unofficial mod + ROM_LOAD( "29", 0x0000, 0x1000, CRC(a58e43a7) SHA1(f4d4646cf295ae351279eec87347d4ef980bea26) ) + ROM_LOAD( "30", 0x1000, 0x1000, CRC(119bbedb) SHA1(6a8ef356cbef39c68002e1bb9d2ac0ac8805ac2d) ) + ROM_LOAD( "31", 0x2000, 0x1000, CRC(405595e9) SHA1(1cbcae7159d716b801a5dde8009503d6fcc790c0) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "epr-608.ic32", 0x0000, 0x0800, CRC(e8ab0256) SHA1(f090afcfacf5f13cdfa0dfda8e3feb868c6ce8bc) ) + ROM_LOAD( "epr-609.ic33", 0x0800, 0x0800, CRC(7380a48f) SHA1(75582a94b696062cbdb66a4c5cf0bc0bb94f81ee) ) + ROM_LOAD( "epr-610.ic34", 0x1000, 0x0800, CRC(31d7eb27) SHA1(2e1d34ae4da385fd7cac94707d25eeddf4604e1a) ) + + ROM_REGION( 0x1000, "gfx1", 0 ) + ROM_LOAD( "epr-607.ic101", 0x0000, 0x0800, CRC(05f7d883) SHA1(78831fd287da18928651a8adb7e578d291493eff) ) + ROM_LOAD( "epr-606.ic102", 0x0800, 0x0800, CRC(f524ee30) SHA1(dd768967add61467baa08d5929001f157d6cd911) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "pr-91.6l", 0x0000, 0x0020, CRC(413703bf) SHA1(66648b2b28d3dcbda5bdb2605d1977428939dd3c) ) +ROM_END + + ROM_START( froggermc ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "epr-1031.15", 0x0000, 0x1000, CRC(4b7c8d11) SHA1(9200b33cac0ef5a6647c95ebd25237fa62fcdf30) ) @@ -11391,6 +11412,7 @@ GAME( 1980, kingballj, kingball, kingball, kingball, galaxian_state, kingb GAME( 1981, frogger, 0, frogger, frogger, galaxian_state, frogger, ROT90, "Konami", "Frogger", MACHINE_SUPPORTS_SAVE ) GAME( 1981, froggers1, frogger, frogger, frogger, galaxian_state, frogger, ROT90, "Konami (Sega license)", "Frogger (Sega set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, froggers2, frogger, frogger, frogger, galaxian_state, frogger, ROT90, "Konami (Sega license)", "Frogger (Sega set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, froggers3, frogger, frogger, frogger, galaxian_state, frogger, ROT90, "Konami (Sega license)", "Frogger (Sega set 3)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, froggermc, frogger, froggermc, froggermc, galaxian_state, froggermc, ROT90, "Konami (Sega license)", "Frogger (Moon Cresta hardware)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, froggers, frogger, froggers, frogger, galaxian_state, froggers, ROT90, "bootleg", "Frog", MACHINE_SUPPORTS_SAVE ) GAME( 1981, frogf, frogger, frogf, frogger, galaxian_state, froggers, ROT90, "bootleg (Falcon)", "Frog (Falcon bootleg)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/galaxy.cpp b/src/mame/drivers/galaxy.cpp index 886e9716df5..7104b6f3bf9 100644 --- a/src/mame/drivers/galaxy.cpp +++ b/src/mame/drivers/galaxy.cpp @@ -255,7 +255,7 @@ MACHINE_CONFIG_END ROM_START (galaxy) ROM_REGION (0x10000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(365f3e24) SHA1(ffc6bf2ec09eabdad76604a63f5dd697c30c4358)) + ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(dc970a32) SHA1(dfc92163654a756b70f5a446daf49d7534f4c739)) ROM_LOAD_OPTIONAL ("galrom2.bin", 0x1000, 0x1000, CRC(5dc5a100) SHA1(5d5ab4313a2d0effe7572bb129193b64cab002c1)) ROM_REGION(0x0800, "gfx1",0) ROM_LOAD ("galchr.bin", 0x0000, 0x0800, CRC(5c3b5bb5) SHA1(19429a61dc5e55ddec3242a8f695e06dd7961f88)) @@ -263,7 +263,7 @@ ROM_END ROM_START (galaxyp) ROM_REGION (0x10000, "maincpu", ROMREGION_ERASEFF) - ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(365f3e24) SHA1(ffc6bf2ec09eabdad76604a63f5dd697c30c4358)) + ROM_LOAD ("galrom1.bin", 0x0000, 0x1000, CRC(dc970a32) SHA1(dfc92163654a756b70f5a446daf49d7534f4c739)) ROM_LOAD ("galrom2.bin", 0x1000, 0x1000, CRC(5dc5a100) SHA1(5d5ab4313a2d0effe7572bb129193b64cab002c1)) ROM_LOAD ("galplus.bin", 0xe000, 0x1000, CRC(d4cfab14) SHA1(b507b9026844eeb757547679907394aa42055eee)) ROM_REGION(0x0800, "gfx1",0) @@ -271,5 +271,5 @@ ROM_START (galaxyp) ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ -COMP(1983, galaxy, 0, 0, galaxy, galaxy, galaxy_state, galaxy, "Elektronika inzenjering", "Galaksija", 0) -COMP(1985, galaxyp, galaxy, 0, galaxyp,galaxyp, galaxy_state,galaxyp,"Elektronika inzenjering", "Galaksija plus", 0) +COMP(1983, galaxy, 0, 0, galaxy, galaxy, galaxy_state, galaxy, "Voja Antonic / Elektronika inzenjering", "Galaksija", 0) +COMP(1985, galaxyp, galaxy, 0, galaxyp,galaxyp, galaxy_state,galaxyp,"Nenad Dunjic", "Galaksija plus", 0) diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp index b47226747c1..1f9c349de33 100644 --- a/src/mame/drivers/galpanic.cpp +++ b/src/mame/drivers/galpanic.cpp @@ -74,7 +74,12 @@ Stephh's additional notes : #include "includes/galpanic.h" #include "includes/galpnipt.h" -void galpanic_state::screen_eof_galpanic(screen_device &screen, bool state) +void galpanic_state::machine_start() +{ + membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000); +} + +void galpanic_state::screen_eof(screen_device &screen, bool state) { // rising edge if (state) @@ -83,7 +88,7 @@ void galpanic_state::screen_eof_galpanic(screen_device &screen, bool state) } } -TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galpanic_scanline) +TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::scanline) { int scanline = param; @@ -98,13 +103,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(galpanic_state::galpanic_scanline) -WRITE16_MEMBER(galpanic_state::galpanic_6295_bankswitch_w) +WRITE16_MEMBER(galpanic_state::m6295_bankswitch_w) { if (ACCESSING_BITS_8_15) { - UINT8 *rom = memregion("oki")->base(); - - memcpy(&rom[0x30000],&rom[0x40000 + ((data >> 8) & 0x0f) * 0x10000],0x10000); + membank("okibank")->set_entry((data >> 8) & 0x0f); // used before title screen m_pandora->set_clear_bitmap((data & 0x8000)>>15); @@ -113,7 +116,7 @@ WRITE16_MEMBER(galpanic_state::galpanic_6295_bankswitch_w) -WRITE16_MEMBER(galpanic_state::galpanic_coin_w) +WRITE16_MEMBER(galpanic_state::coin_w) { if (ACCESSING_BITS_8_15) { @@ -131,15 +134,15 @@ static ADDRESS_MAP_START( galpanic_map, AS_PROGRAM, 16, galpanic_state ) AM_RANGE(0x000000, 0x3fffff) AM_ROM AM_RANGE(0x400000, 0x400001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_SHARE("fgvideoram") - AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(galpanic_bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */ + AM_RANGE(0x520000, 0x53ffff) AM_RAM_WRITE(bgvideoram_w) AM_SHARE("bgvideoram") /* + work RAM */ AM_RANGE(0x600000, 0x6007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") /* 1024 colors, but only 512 seem to be used */ AM_RANGE(0x700000, 0x701fff) AM_DEVREADWRITE("pandora", kaneko_pandora_device, spriteram_LSB_r, spriteram_LSB_w) AM_RANGE(0x702000, 0x704fff) AM_RAM AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1") AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2") AM_RANGE(0x800004, 0x800005) AM_READ_PORT("SYSTEM") - AM_RANGE(0x900000, 0x900001) AM_WRITE(galpanic_6295_bankswitch_w) - AM_RANGE(0xa00000, 0xa00001) AM_WRITE(galpanic_coin_w) /* coin counters */ + AM_RANGE(0x900000, 0x900001) AM_WRITE(m6295_bankswitch_w) + AM_RANGE(0xa00000, 0xa00001) AM_WRITE(coin_w) /* coin counters */ AM_RANGE(0xb00000, 0xb00001) AM_WRITENOP /* ??? */ AM_RANGE(0xc00000, 0xc00001) AM_WRITENOP /* ??? */ AM_RANGE(0xd00000, 0xd00001) AM_WRITENOP /* ??? */ @@ -147,6 +150,10 @@ static ADDRESS_MAP_START( galpanic_map, AS_PROGRAM, 16, galpanic_state ) ADDRESS_MAP_END +static ADDRESS_MAP_START( galpanic_oki_map, AS_0, 8, galpanic_state ) + AM_RANGE(0x00000, 0x2ffff) AM_ROM + AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank") +ADDRESS_MAP_END static INPUT_PORTS_START( galpanic ) @@ -221,7 +228,7 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_12MHz) /* verified on pcb */ MCFG_CPU_PROGRAM_MAP(galpanic_map) - MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, galpanic_scanline, "screen", 0, 1) + MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", galpanic_state, scanline, "screen", 0, 1) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -229,8 +236,8 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0) /* frames per second, vblank duration */) MCFG_SCREEN_SIZE(256, 256) MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 224-1) - MCFG_SCREEN_UPDATE_DRIVER(galpanic_state, screen_update_galpanic) - MCFG_SCREEN_VBLANK_DRIVER(galpanic_state, screen_eof_galpanic) + MCFG_SCREEN_UPDATE_DRIVER(galpanic_state, screen_update) + MCFG_SCREEN_VBLANK_DRIVER(galpanic_state, screen_eof) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", galpanic) @@ -246,12 +253,11 @@ static MACHINE_CONFIG_START( galpanic, galpanic_state ) MCFG_DEVICE_ADD("calc1_mcu", KANEKO_HIT, 0) kaneko_hit_device::set_type(*device, 0); - MCFG_VIDEO_START_OVERRIDE(galpanic_state,galpanic) - /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_OKIM6295_ADD("oki", XTAL_12MHz/6, OKIM6295_PIN7_LOW) /* verified on pcb */ + MCFG_DEVICE_ADDRESS_MAP(AS_0, galpanic_oki_map) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -287,11 +293,10 @@ ROM_START( galpanic ) /* PAMERA-04 PCB with the PAMERA-SUB daughter card and unp ROM_REGION( 0x100000, "gfx1", 0 ) /* sprites */ ROM_LOAD( "pm006e.67", 0x000000, 0x100000, CRC(57aec037) SHA1(e6ba095b6892d4dcd76ba3343a97dd98ae29dc24) ) - ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */ + ROM_REGION( 0x100000, "oki", 0 ) /* OKIM6295 samples */ /* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */ ROM_LOAD( "pm008e.l", 0x00000, 0x80000, CRC(d9379ba8) SHA1(5ae7c743319b1a12f2b101a9f0f8fe0728ed1476) ) - ROM_RELOAD( 0x40000, 0x80000 ) - ROM_LOAD( "pm007e.u", 0xc0000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) ) + ROM_LOAD( "pm007e.u", 0x80000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) ) ROM_END ROM_START( galpanica ) /* PAMERA-04 PCB with the CALC1 MCU used */ @@ -308,12 +313,11 @@ ROM_START( galpanica ) /* PAMERA-04 PCB with the CALC1 MCU used */ ROM_REGION( 0x100000, "gfx1", 0 ) /* sprites */ ROM_LOAD( "pm006e.67", 0x000000, 0x100000, CRC(57aec037) SHA1(e6ba095b6892d4dcd76ba3343a97dd98ae29dc24) ) - ROM_REGION( 0x140000, "oki", 0 ) /* OKIM6295 samples */ + ROM_REGION( 0x100000, "oki", 0 ) /* OKIM6295 samples */ /* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */ ROM_LOAD( "pm008e.l", 0x00000, 0x80000, CRC(d9379ba8) SHA1(5ae7c743319b1a12f2b101a9f0f8fe0728ed1476) ) - ROM_RELOAD( 0x40000, 0x80000 ) - ROM_LOAD( "pm007e.u", 0xc0000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) ) + ROM_LOAD( "pm007e.u", 0x80000, 0x80000, CRC(c7ed7950) SHA1(133258b058d3c562208d0d00b9fac71202647c32) ) ROM_END -GAME( 1990, galpanic, 0, galpanic, galpanic, driver_device, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", MACHINE_NO_COCKTAIL ) -GAME( 1990, galpanica,galpanic, galpanica,galpanica, driver_device, 0, ROT90, "Kaneko", "Gals Panic (MCU Protected)", MACHINE_NO_COCKTAIL ) +GAME( 1990, galpanic, 0, galpanic, galpanic, driver_device, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1990, galpanica,galpanic, galpanica,galpanica, driver_device, 0, ROT90, "Kaneko", "Gals Panic (MCU Protected)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp index 3bf38312812..f10375d51fe 100644 --- a/src/mame/drivers/gauntlet.cpp +++ b/src/mame/drivers/gauntlet.cpp @@ -191,13 +191,12 @@ WRITE16_MEMBER(gauntlet_state::sound_reset_w) m_soundcomm->sound_cpu_reset(); if (m_sound_reset_val & 1) { - machine().device("ymsnd")->reset(); - tms5220_device *tms5220 = machine().device<tms5220_device>("tms"); - tms5220->reset(); - tms5220->set_frequency(ATARI_CLOCK_14MHz/2 / 11); - set_ym2151_volume(0); - set_pokey_volume(0); - set_tms5220_volume(0); + m_ym2151->reset(); + m_tms5220->reset(); + m_tms5220->set_frequency(ATARI_CLOCK_14MHz/2 / 11); + m_ym2151->set_output_gain(ALL_OUTPUTS, 0.0f); + m_pokey->set_output_gain(ALL_OUTPUTS, 0.0f); + m_tms5220->set_output_gain(ALL_OUTPUTS, 0.0f); } } } @@ -213,12 +212,11 @@ WRITE16_MEMBER(gauntlet_state::sound_reset_w) READ8_MEMBER(gauntlet_state::switch_6502_r) { - tms5220_device *tms5220 = machine().device<tms5220_device>("tms"); int temp = 0x30; if (m_soundcomm->main_to_sound_ready()) temp ^= 0x80; if (m_soundcomm->sound_to_main_ready()) temp ^= 0x40; - if (!tms5220->readyq_r()) temp ^= 0x20; + if (!m_tms5220->readyq_r()) temp ^= 0x20; if (!(ioport("803008")->read() & 0x0008)) temp ^= 0x10; return temp; @@ -233,24 +231,23 @@ READ8_MEMBER(gauntlet_state::switch_6502_r) WRITE8_MEMBER(gauntlet_state::sound_ctl_w) { - tms5220_device *tms5220 = machine().device<tms5220_device>("tms"); switch (offset & 7) { case 0: /* music reset, bit D7, low reset */ - if (((data>>7)&1) == 0) machine().device("ymsnd")->reset(); + if (((data>>7)&1) == 0) m_ym2151->reset(); break; case 1: /* speech write, bit D7, active low */ - tms5220->wsq_w(data >> 7); + m_tms5220->wsq_w(data >> 7); break; case 2: /* speech reset, bit D7, active low */ - tms5220->rsq_w(data >> 7); + m_tms5220->rsq_w(data >> 7); break; case 3: /* speech squeak, bit D7 */ data = 5 | ((data >> 6) & 2); - tms5220->set_frequency(ATARI_CLOCK_14MHz/2 / (16 - data)); + m_tms5220->set_frequency(ATARI_CLOCK_14MHz/2 / (16 - data)); break; } } @@ -265,9 +262,9 @@ WRITE8_MEMBER(gauntlet_state::sound_ctl_w) WRITE8_MEMBER(gauntlet_state::mixer_w) { - set_ym2151_volume((data & 7) * 100 / 7); - set_pokey_volume(((data >> 3) & 3) * 100 / 3); - set_tms5220_volume(((data >> 5) & 7) * 100 / 7); + m_ym2151->set_output_gain(ALL_OUTPUTS, (data & 7) / 7.0f); + m_pokey->set_output_gain(ALL_OUTPUTS, ((data >> 3) & 3) / 3.0f); + m_tms5220->set_output_gain(ALL_OUTPUTS, ((data >> 5) & 7) / 7.0f); } @@ -492,15 +489,13 @@ GFXDECODE_END * *************************************/ -static MACHINE_CONFIG_START( gauntlet, gauntlet_state ) +static MACHINE_CONFIG_START( gauntlet_base, gauntlet_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68010, ATARI_CLOCK_14MHz/2) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen) - MCFG_SLAPSTIC_ADD("slapstic") - MCFG_CPU_ADD("audiocpu", M6502, ATARI_CLOCK_14MHz/8) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -548,6 +543,27 @@ static MACHINE_CONFIG_START( gauntlet, gauntlet_state ) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( gauntlet, gauntlet_base ) + MCFG_SLAPSTIC_ADD("slapstic", 104) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( gaunt2p, gauntlet_base ) + MCFG_SLAPSTIC_ADD("slapstic", 107) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( gauntlet2, gauntlet_base ) + MCFG_SLAPSTIC_ADD("slapstic", 106) +MACHINE_CONFIG_END + + +static MACHINE_CONFIG_DERIVED( vindctr2, gauntlet_base ) + MCFG_SLAPSTIC_ADD("slapstic", 118) +MACHINE_CONFIG_END + + + /************************************* * @@ -1627,10 +1643,10 @@ void gauntlet_state::swap_memory(void *ptr1, void *ptr2, int bytes) } } -void gauntlet_state::common_init(int slapstic, int vindctr2) +void gauntlet_state::common_init(int vindctr2) { UINT8 *rom = memregion("maincpu")->base(); - slapstic_configure(*m_maincpu, 0x038000, 0, slapstic); + slapstic_configure(*m_maincpu, 0x038000, 0); /* swap the top and bottom halves of the main CPU ROM images */ swap_memory(rom + 0x000000, rom + 0x008000, 0x8000); @@ -1646,19 +1662,7 @@ void gauntlet_state::common_init(int slapstic, int vindctr2) DRIVER_INIT_MEMBER(gauntlet_state,gauntlet) { - common_init(104, 0); -} - - -DRIVER_INIT_MEMBER(gauntlet_state,gaunt2p) -{ - common_init(107, 0); -} - - -DRIVER_INIT_MEMBER(gauntlet_state,gauntlet2) -{ - common_init(106, 0); + common_init(0); } @@ -1668,7 +1672,7 @@ DRIVER_INIT_MEMBER(gauntlet_state,vindctr2) dynamic_buffer data(0x8000); int i; - common_init(118, 1); + common_init(1); /* highly strange -- the address bits on the chip at 2J (and only that chip) are scrambled -- this is verified on the schematics! */ @@ -1704,20 +1708,20 @@ GAME( 1985, gauntletgr3, gauntlet, gauntlet, gauntlet, gauntlet_state, gauntlet, GAME( 1985, gauntletr2, gauntlet, gauntlet, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (rev 2)", 0 ) GAME( 1985, gauntletr1, gauntlet, gauntlet, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (rev 1)", 0 ) -GAME( 1985, gauntlet2p, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, rev 6)", 0 ) -GAME( 1985, gauntlet2pj, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, Japanese, rev 5)", 0 ) -GAME( 1985, gauntlet2pg, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, German, rev 4)", 0 ) -GAME( 1985, gauntlet2pr3, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, rev 3)", 0 ) -GAME( 1985, gauntlet2pj2, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, Japanese, rev 2)", 0 ) -GAME( 1985, gauntlet2pg1, gauntlet, gauntlet, gauntlet, gauntlet_state, gaunt2p, ROT0, "Atari Games", "Gauntlet (2 Players, German, rev 1)", 0 ) +GAME( 1985, gauntlet2p, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, rev 6)", 0 ) +GAME( 1985, gauntlet2pj, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, Japanese, rev 5)", 0 ) +GAME( 1985, gauntlet2pg, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, German, rev 4)", 0 ) +GAME( 1985, gauntlet2pr3, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, rev 3)", 0 ) +GAME( 1985, gauntlet2pj2, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, Japanese, rev 2)", 0 ) +GAME( 1985, gauntlet2pg1, gauntlet, gaunt2p, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet (2 Players, German, rev 1)", 0 ) -GAME( 1986, gaunt2, 0, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II", 0 ) -GAME( 1986, gaunt2g, gaunt2, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II (German)", 0 ) +GAME( 1986, gaunt2, 0, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II", 0 ) +GAME( 1986, gaunt2g, gaunt2, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II (German)", 0 ) -GAME( 1986, gaunt22p, gaunt2, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II (2 Players, rev 2)", 0 ) -GAME( 1986, gaunt22p1, gaunt2, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II (2 Players, rev 1)", 0 ) -GAME( 1986, gaunt22pg, gaunt2, gauntlet, gauntlet, gauntlet_state, gauntlet2, ROT0, "Atari Games", "Gauntlet II (2 Players, German)", 0 ) +GAME( 1986, gaunt22p, gaunt2, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II (2 Players, rev 2)", 0 ) +GAME( 1986, gaunt22p1, gaunt2, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II (2 Players, rev 1)", 0 ) +GAME( 1986, gaunt22pg, gaunt2, gauntlet2, gauntlet, gauntlet_state, gauntlet, ROT0, "Atari Games", "Gauntlet II (2 Players, German)", 0 ) -GAME( 1988, vindctr2, 0, gauntlet, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 3)", 0 ) -GAME( 1988, vindctr2r2, vindctr2, gauntlet, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 2)", 0 ) -GAME( 1988, vindctr2r1, vindctr2, gauntlet, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 1)", 0 ) +GAME( 1988, vindctr2, 0, vindctr2, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 3)", 0 ) +GAME( 1988, vindctr2r2, vindctr2, vindctr2, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 2)", 0 ) +GAME( 1988, vindctr2r1, vindctr2, vindctr2, vindctr2, gauntlet_state, vindctr2, ROT0, "Atari Games", "Vindicators Part II (rev 1)", 0 ) diff --git a/src/mame/drivers/gkigt.cpp b/src/mame/drivers/gkigt.cpp index 07bd4c982ea..867514520b8 100644 --- a/src/mame/drivers/gkigt.cpp +++ b/src/mame/drivers/gkigt.cpp @@ -172,7 +172,7 @@ GFXDECODE_END static MACHINE_CONFIG_START( igt_gameking, igt_gameking_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", I960, 20000000) // ?? Mhz + MCFG_CPU_ADD("maincpu", I960, XTAL_24MHz) MCFG_CPU_PROGRAM_MAP(igt_gameking_mem) @@ -185,6 +185,7 @@ static MACHINE_CONFIG_START( igt_gameking, igt_gameking_state ) MCFG_SCREEN_VISIBLE_AREA(8*8, 48*8-1, 2*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(igt_gameking_state, screen_update_igt_gameking) MCFG_SCREEN_PALETTE("palette") + // Xilinx used as video chip XTAL_26_66666MHz on board MCFG_PALETTE_ADD("palette", 0x200) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) @@ -198,6 +199,26 @@ static MACHINE_CONFIG_START( igt_gameking, igt_gameking_state ) MACHINE_CONFIG_END +ROM_START( ms72c ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD( "3B5019FA MULTISTAR 7 2c CONFIG.u8", 0x00000, 0x80000, CRC(6c326a31) SHA1(cd8ecc814ef4f379946ab3654dddd508c24ae56c) ) + + ROM_REGION32_LE( 0x200000, "game", 0 ) + ROM_LOAD16_BYTE( "DA5001FA Gamebase GME1.u21", 0x000000, 0x100000, CRC(4cd63b5f) SHA1(440302a6ac844b453573e358b29c64f2e8ece80e) ) + ROM_LOAD16_BYTE( "DA5001FA Gamebase GME2.u5", 0x000001, 0x100000, CRC(663df2fe) SHA1(d2ac3129a346450168a9f76431b0fa8b78db3b37) ) + + ROM_REGION( 0x100000, "cg", 0 ) + ROM_LOAD16_BYTE( "1G5019FA Multistar 7 PUB.u48", 0x000000, 0x80000, CRC(ac50a155) SHA1(50d07ba5ca176c97adde169fda6e6385c8ec8299) ) + ROM_LOAD16_BYTE( "1G5019FA Multistar 7 PUB.u47", 0x000001, 0x80000, CRC(5fee078b) SHA1(a41591d14fbc12c68d773fbd1ac340d9427d68e9) ) + + ROM_REGION( 0x200000, "plx", 0 ) + ROM_LOAD16_BYTE( "1G5019FA Multistar 7 PUB.u20", 0x000000, 0x100000, CRC(806ec7d4) SHA1(b9263f942b3d7101797bf87ad18cfddac9582791) ) + ROM_LOAD16_BYTE( "1G5019FA Multistar 7 PUB.u4", 0x000001, 0x100000, CRC(2e1e9c8a) SHA1(b6992f013f43debf43f4704396fc71e88449e365) ) + + ROM_REGION( 0x200000, "snd", 0 ) + ROM_LOAD( "1H5008FA Multistar 7.u6", 0x000000, 0x100000, CRC(69656637) SHA1(28c2cf48856ee4f820146fdbd0f3c7e307892dc6) ) +ROM_END + ROM_START( gkigt4 ) ROM_REGION( 0x80000, "maincpu", 0 ) @@ -369,6 +390,7 @@ ROM_START( gkkey ) ROM_END +GAME( 1994, ms72c, 0, igt_gameking, igt_gameking, driver_device, 0, ROT0, "IGT", "Multistar 7 2c", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) GAME( 2003, gkigt4, 0, igt_gameking, igt_gameking, driver_device, 0, ROT0, "IGT", "Game King (v4.x)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) GAME( 2003, gkigt4ms, gkigt4, igt_gameking, igt_gameking, driver_device, 0, ROT0, "IGT", "Game King (v4.x, MS)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) GAME( 2003, gkigt43, gkigt4, igt_gameking, igt_gameking, driver_device, 0, ROT0, "IGT", "Game King (v4.3)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff --git a/src/mame/drivers/glass.cpp b/src/mame/drivers/glass.cpp index 54304712b71..5711341018f 100644 --- a/src/mame/drivers/glass.cpp +++ b/src/mame/drivers/glass.cpp @@ -6,7 +6,8 @@ Glass (c) 1993 Gaelco (Developed by OMK. Produced by Gaelco) Driver by Manuel Abadia <emumanu+mame@gmail.com> -The DS5002FP has up to 128KB undumped gameplay code making the game unplayable :_( +The DS5002FP has up to 128KB undumped gameplay code making the game unplayable, +except for the Promat licensed Korean version which is unprotected. ***************************************************************************/ @@ -20,7 +21,7 @@ WRITE16_MEMBER(glass_state::clr_int_w) m_cause_interrupt = 1; } -INTERRUPT_GEN_MEMBER(glass_state::glass_interrupt) +INTERRUPT_GEN_MEMBER(glass_state::interrupt) { if (m_cause_interrupt) { @@ -54,13 +55,11 @@ GFXDECODE_END WRITE16_MEMBER(glass_state::OKIM6295_bankswitch_w) { - UINT8 *RAM = memregion("oki")->base(); - if (ACCESSING_BITS_0_7) - memcpy(&RAM[0x30000], &RAM[0x40000 + (data & 0x0f) * 0x10000], 0x10000); + membank("okibank")->set_entry(data & 0x0f); } -WRITE16_MEMBER(glass_state::glass_coin_w) +WRITE16_MEMBER(glass_state::coin_w) { switch (offset >> 3) { @@ -79,7 +78,7 @@ WRITE16_MEMBER(glass_state::glass_coin_w) static ADDRESS_MAP_START( glass_map, AS_PROGRAM, 16, glass_state ) AM_RANGE(0x000000, 0x0fffff) AM_ROM /* ROM */ - AM_RANGE(0x100000, 0x101fff) AM_RAM_WRITE(glass_vram_w) AM_SHARE("videoram") /* Video RAM */ + AM_RANGE(0x100000, 0x101fff) AM_RAM_WRITE(vram_w) AM_SHARE("videoram") /* Video RAM */ AM_RANGE(0x102000, 0x102fff) AM_RAM /* Extra Video RAM */ AM_RANGE(0x108000, 0x108007) AM_WRITEONLY AM_SHARE("vregs") /* Video Registers */ AM_RANGE(0x108008, 0x108009) AM_WRITE(clr_int_w) /* CLR INT Video */ @@ -89,14 +88,20 @@ static ADDRESS_MAP_START( glass_map, AS_PROGRAM, 16, glass_state ) AM_RANGE(0x700002, 0x700003) AM_READ_PORT("DSW1") AM_RANGE(0x700004, 0x700005) AM_READ_PORT("P1") AM_RANGE(0x700006, 0x700007) AM_READ_PORT("P2") - AM_RANGE(0x700008, 0x700009) AM_WRITE(glass_blitter_w) /* serial blitter */ + AM_RANGE(0x700008, 0x700009) AM_WRITE(blitter_w) /* serial blitter */ AM_RANGE(0x70000c, 0x70000d) AM_WRITE(OKIM6295_bankswitch_w) /* OKI6295 bankswitch */ AM_RANGE(0x70000e, 0x70000f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) /* OKI6295 status register */ - AM_RANGE(0x70000a, 0x70004b) AM_WRITE(glass_coin_w) /* Coin Counters/Lockout */ + AM_RANGE(0x70000a, 0x70004b) AM_WRITE(coin_w) /* Coin Counters/Lockout */ AM_RANGE(0xfec000, 0xfeffff) AM_RAM AM_SHARE("mainram") /* Work RAM (partially shared with DS5002FP) */ ADDRESS_MAP_END +static ADDRESS_MAP_START( oki_map, AS_0, 8, glass_state ) + AM_RANGE(0x00000, 0x2ffff) AM_ROM + AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank") +ADDRESS_MAP_END + + static INPUT_PORTS_START( glass ) PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:6,7,8") @@ -172,6 +177,8 @@ INPUT_PORTS_END void glass_state::machine_start() { + membank("okibank")->configure_entries(0, 16, memregion("oki")->base(), 0x10000); + save_item(NAME(m_cause_interrupt)); save_item(NAME(m_current_bit)); save_item(NAME(m_current_command)); @@ -180,13 +187,11 @@ void glass_state::machine_start() void glass_state::machine_reset() { - int i; - m_cause_interrupt = 1; m_current_bit = 0; m_current_command = 0; - for (i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) m_blitter_serial_buffer[i] = 0; } @@ -195,7 +200,7 @@ static MACHINE_CONFIG_START( glass, glass_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M68000, XTAL_24MHz/2) /* 12 MHz verified on PCB */ MCFG_CPU_PROGRAM_MAP(glass_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", glass_state, glass_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", glass_state, interrupt) /* video hardware */ @@ -204,7 +209,7 @@ static MACHINE_CONFIG_START( glass, glass_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(32*16, 32*16) MCFG_SCREEN_VISIBLE_AREA(0, 368-1, 16, 256-1) - MCFG_SCREEN_UPDATE_DRIVER(glass_state, screen_update_glass) + MCFG_SCREEN_UPDATE_DRIVER(glass_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", glass) @@ -215,6 +220,7 @@ static MACHINE_CONFIG_START( glass, glass_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH) /* 1MHz Resonator & pin 7 high verified on PCB */ + MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MACHINE_CONFIG_END @@ -236,10 +242,9 @@ ROM_START( glass ) /* Version 1.1 */ ROM_REGION( 0x100000, "gfx3", 0 ) /* 16 bitmaps (320x200, indexed colors) */ ROM_LOAD( "h9.bin", 0x000000, 0x100000, CRC(b9492557) SHA1(3f5c0d696d65e1cd492763dfa749c813dd56a9bf) ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "c1.bin", 0x000000, 0x100000, CRC(d9f075a2) SHA1(31a7a677861f39d512e9d1f51925c689e481159a) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x100000 ) ROM_END ROM_START( glass10 ) /* Version 1.0 */ @@ -260,10 +265,9 @@ ROM_START( glass10 ) /* Version 1.0 */ ROM_REGION( 0x100000, "gfx3", 0 ) /* 16 bitmaps (320x200, indexed colors) */ ROM_LOAD( "h9.bin", 0x000000, 0x100000, CRC(b9492557) SHA1(3f5c0d696d65e1cd492763dfa749c813dd56a9bf) ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "c1.bin", 0x000000, 0x100000, CRC(d9f075a2) SHA1(31a7a677861f39d512e9d1f51925c689e481159a) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x100000 ) ROM_END ROM_START( glass10a ) /* Title screen shows "GLASS" and under that "Break Edition" on a real PCB */ @@ -284,10 +288,9 @@ ROM_START( glass10a ) /* Title screen shows "GLASS" and under that "Break Editio ROM_REGION( 0x100000, "gfx3", 0 ) /* 16 bitmaps (320x200, indexed colors) */ ROM_LOAD( "h9.bin", 0x000000, 0x100000, CRC(b9492557) SHA1(3f5c0d696d65e1cd492763dfa749c813dd56a9bf) ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "c1.bin", 0x000000, 0x100000, CRC(d9f075a2) SHA1(31a7a677861f39d512e9d1f51925c689e481159a) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x100000 ) ROM_END ROM_START( glasskr ) @@ -305,10 +308,9 @@ ROM_START( glasskr ) ROM_REGION( 0x100000, "gfx3", 0 ) /* 16 bitmaps (320x200, indexed colors) */ ROM_LOAD( "glassk.h9", 0x000000, 0x100000, CRC(d499be4c) SHA1(204f754813be687e8dc00bfe7b5dbc4857ac8738) ) - ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_REGION( 0x100000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ ROM_LOAD( "c1.bin", 0x000000, 0x100000, CRC(d9f075a2) SHA1(31a7a677861f39d512e9d1f51925c689e481159a) ) /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched from all the ROMs */ - ROM_RELOAD( 0x040000, 0x100000 ) ROM_END /*************************************************************************** @@ -317,7 +319,7 @@ ROM_END ***************************************************************************/ -void glass_state::glass_ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 ) +void glass_state::ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 ) { int i; @@ -342,14 +344,14 @@ void glass_state::glass_ROM16_split_gfx( const char *src_reg, const char *dst_re */ -READ16_MEMBER( glass_state::glass_mainram_r ) +READ16_MEMBER( glass_state::mainram_r ) { UINT16 ret = m_mainram[offset]; int pc = space.device().safe_pc(); if (offset == (0xfede96 - 0xfec000)>>1) { - // this address seems important, the game will abort with 'power failure' depending on some reads, presumably refering to the power to the battery + // this address seems important, the game will abort with 'power failure' depending on some reads, presumably referring to the power to the battery // there are also various code segments like the one below /* @@ -376,7 +378,7 @@ READ16_MEMBER( glass_state::glass_mainram_r ) return ret; } -WRITE16_MEMBER( glass_state::glass_mainram_w ) +WRITE16_MEMBER( glass_state::mainram_w ) { int pc = space.device().safe_pc(); @@ -436,10 +438,10 @@ DRIVER_INIT_MEMBER(glass_state, glass) */ /* split ROM H13 */ - glass_ROM16_split_gfx("gfx2", "gfx1", 0x0000000, 0x0200000, 0x0000000, 0x0100000); + ROM16_split_gfx("gfx2", "gfx1", 0x0000000, 0x0200000, 0x0000000, 0x0100000); /* split ROM H11 */ - glass_ROM16_split_gfx("gfx2", "gfx1", 0x0200000, 0x0200000, 0x0200000, 0x0300000); + ROM16_split_gfx("gfx2", "gfx1", 0x0200000, 0x0200000, 0x0200000, 0x0300000); } @@ -449,7 +451,7 @@ DRIVER_INIT_MEMBER(glass_state,glassp) DRIVER_INIT_CALL(glass); /* install custom handler over RAM for protection */ - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xfec000, 0xfeffff, read16_delegate(FUNC(glass_state::glass_mainram_r), this), write16_delegate(FUNC(glass_state::glass_mainram_w),this)); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xfec000, 0xfeffff, read16_delegate(FUNC(glass_state::mainram_r), this), write16_delegate(FUNC(glass_state::mainram_w),this)); } diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp index e4a1485a892..8a4c83f039a 100644 --- a/src/mame/drivers/goldstar.cpp +++ b/src/mame/drivers/goldstar.cpp @@ -1668,6 +1668,7 @@ static INPUT_PORTS_START( cmasterb ) /* Test Mode For Disp. Of Doll not checked */ INPUT_PORTS_END + static INPUT_PORTS_START( cmezspin ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1738,6 +1739,7 @@ static INPUT_PORTS_START( cmezspin ) /* Test Mode For Disp. Of Doll not checked */ INPUT_PORTS_END + static INPUT_PORTS_START( cmasterc ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1796,6 +1798,66 @@ static INPUT_PORTS_START( cmasterc ) /* Test Mode For Disp. Of Doll not checked */ INPUT_PORTS_END + +static INPUT_PORTS_START( cmasterg ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Stop All") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Info") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") + + PORT_INCLUDE( cmv4_coins ) + + PORT_INCLUDE( cmv4_service ) + + PORT_INCLUDE( cmv4_dsw1 ) + PORT_MODIFY("DSW1") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW1:1") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + /* Hopper Out Switch not checked */ + /* Payout Mode not checked */ + /* '7' In Double Up Game OK */ + PORT_DIPNAME( 0x10, 0x00, "Double Up Game Pay Rate" ) PORT_DIPLOCATION("DSW1:5") /* OK */ + PORT_DIPSETTING( 0x00, "60%" ) + PORT_DIPSETTING( 0x10, "70%" ) + /* Double Up Game OK */ + /* Bet Max OK */ + + PORT_INCLUDE( cmv4_dsw2 ) + PORT_MODIFY("DSW2") + PORT_DIPNAME( 0x07, 0x00, "Main Game Pay Rate" ) PORT_DIPLOCATION("DSW2:1,2,3") /* OK */ + PORT_DIPSETTING( 0x07, "45%" ) + PORT_DIPSETTING( 0x06, "50%" ) + PORT_DIPSETTING( 0x05, "55%" ) + PORT_DIPSETTING( 0x04, "60%" ) + PORT_DIPSETTING( 0x03, "65%" ) + PORT_DIPSETTING( 0x02, "70%" ) + PORT_DIPSETTING( 0x01, "75%" ) + PORT_DIPSETTING( 0x00, "80%" ) + /* Hopper Limit OK */ + /* 100+ Odds Sound not checked */ + /* Key In Type OK */ + /* Center Super 7 Bet Limit related with Min. Bet For Bonus Play (DSW4-6) */ + + PORT_INCLUDE( cmv4_dsw3 ) /* all OK */ + + PORT_INCLUDE( cmv4_dsw4 ) /* all OK */ + + PORT_INCLUDE( cmv4_dsw5 ) + /* Display of Doll On Demo only affects payout table screen */ + /* Coin In Limit OK */ + /* Condition For 3 Kind Of Bonus not checked */ + /* Display Of Doll At All Fr. Bonus not checked */ + /* DSW5-7 listed as unused */ + /* Test Mode For Disp. Of Doll not checked */ +INPUT_PORTS_END + + static INPUT_PORTS_START( cmast91 ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -6690,6 +6752,31 @@ static const gfx_layout sangho_tilelayout = 128*8 /* every char takes 128 consecutive bytes */ }; +static const gfx_layout super9_charlayout = +{ + 8,8, /* 8*8 characters */ + 4096, /* 4096 characters */ + 3, /* 3 bits per pixel */ + { 2, 4, 6 }, /* the bitplanes are packed in one byte */ + { 0*8+0, 0*8+1, 1*8+0, 1*8+1, 2*8+0, 2*8+1, 3*8+0, 3*8+1 }, + { 0*32, 4*32, 2*32, 6*32, 1*32, 5*32, 3*32, 7*32 }, + 32*8 /* every char takes 32 consecutive bytes */ +}; + +static const gfx_layout super9_tilelayout = // Green is OK. Red needs normal goldstar order... +{ + 8,32, /* 8*32 characters */ + 256, /* 256 tiles */ + 4, /* 4 bits per pixel */ + { 0, 2, 4, 6 }, + { 1, 0, 1*8+1, 1*8+0, 2*8+1, 2*8+0, 3*8+1, 3*8+0 }, + { 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8, + 32*8, 36*8, 40*8, 44*8, 48*8, 52*8, 56*8, 60*8, + 64*8, 68*8, 72*8, 76*8, 80*8, 84*8, 88*8, 92*8, + 96*8, 100*8, 104*8, 108*8, 112*8, 116*8, 120*8, 124*8 }, + 128*8 /* every char takes 128 consecutive bytes */ +}; + static GFXDECODE_START( goldstar ) @@ -6790,6 +6877,11 @@ static GFXDECODE_START( sangho ) */ GFXDECODE_END +static GFXDECODE_START( super9 ) + GFXDECODE_ENTRY( "gfx1", 0, super9_charlayout, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0, super9_tilelayout, 128, 8 ) +GFXDECODE_END + static const gfx_layout tiles8x32_4bpp_layout = { @@ -7091,12 +7183,12 @@ static MACHINE_CONFIG_START( super9, goldstar_state ) MCFG_SCREEN_UPDATE_DRIVER(goldstar_state, screen_update_goldstar) MCFG_SCREEN_PALETTE("palette") - MCFG_GFXDECODE_ADD("gfxdecode", "palette", goldstar) + MCFG_GFXDECODE_ADD("gfxdecode", "palette", super9) MCFG_PALETTE_ADD("palette", 256) MCFG_PALETTE_FORMAT(BBGGGRRR) MCFG_NVRAM_ADD_1FILL("nvram") - MCFG_VIDEO_START_OVERRIDE(goldstar_state,goldstar) + MCFG_VIDEO_START_OVERRIDE(goldstar_state, goldstar) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -8211,9 +8303,17 @@ ROM_START( chrygld ) ROM_END +/* Moon Light (V.0629) + Rip off / clone of Gold Star. + + The program ROM is double size and stores two different programs. + Whilst we have not idea about the real addressing, we can support + both sets separately. + +*/ ROM_START( moonlght ) - ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "4.bin", 0x0000, 0x20000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) ) + ROM_REGION( 0x20000, "maincpu", 0 ) // using only the first half of the program ROM. + ROM_LOAD( "4.bin", 0x0000, 0x20000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) ) // low program, normal gfx ROM_REGION( 0x20000, "gfx1", 0 ) ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) ) @@ -8225,6 +8325,89 @@ ROM_START( moonlght ) ROM_LOAD( "gs1-snd.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) ) ROM_END +ROM_START( moonlghta ) + ROM_REGION( 0x20000, "maincpu", 0 ) // using only the second half of the program ROM. + ROM_LOAD( "4.bin", 0x10000, 0x10000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) ) // high program, normal gfx + ROM_CONTINUE( 0x00000, 0x10000) + + ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) ) + + ROM_REGION( 0x20000, "gfx2", 0 ) + ROM_LOAD( "29.bin", 0x00000, 0x20000, CRC(8a5f274d) SHA1(0f2ad61b00e220fc509c01c11c1a8f4e47b54f2a) ) + + ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */ + ROM_LOAD( "gs1-snd.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) ) +ROM_END + +/* Moon Light (V.02L0A) + Rip off / clone of Gold Star. + + The program ROM is double size and stores two different programs. + Whilst we have not idea about the real addressing, we can support + both sets separately. + + GFX devices are 4 times bigger and contains 4 times the same data. + Maybe the manufacturers run out of proper devices... + + The background is not set properly due to a palette error. The program ROM stores + the palette at offset 0xC700 onwards... The value stored at 0xC780 (color 0x80) should + be black to mask the reels tilemaps and turn them 'invisible'. This program has a value + of 0x40 instead, turning the tilemaps blue and therefore visible. The results is an odd + effect that shouldn't be there. Maybe is product of a bad dump. Need to be checked with + the real board. + + The hardware currently uses only the second half of the program ROM (high program), that + replaces the double-up's cards graphics with 'drakkars' (scandinavian / viking ships). + +---------------------------------------------------------------------------------------- +28.bin FIXED BITS (00xxxxxx) +29.bin 00xxxxxxxxxxxxxxx = 0xFF + moon-gfx1.bin BADADDR --xxxxxxxxxxxxxxxxx + moon-gfx2.bin FIXED BITS (00xxxxxx) + moon-gfx2.bin BADADDR --xxxxxxxxxxxxxxxxx +29.bin moon-gfx1.bin [1/4] IDENTICAL +29.bin moon-gfx1.bin [2/4] IDENTICAL +29.bin moon-gfx1.bin [3/4] IDENTICAL +29.bin moon-gfx1.bin [4/4] IDENTICAL +4.bin [1/4] moon-main.bin [1/4] 99.615479% +4.bin [3/4] moon-main.bin [3/4] 99.426270% +4.bin [2/4] moon-main.bin [2/4] 97.201538% +4.bin [4/4] moon-main.bin [4/4] 95.953369% +28.bin moon-gfx2.bin [1/4] 94.188690% +28.bin moon-gfx2.bin [2/4] 94.188690% +28.bin moon-gfx2.bin [3/4] 94.188690% +28.bin moon-gfx2.bin [4/4] 94.188690% +*/ +ROM_START( moonlghtb ) + ROM_REGION( 0x20000, "maincpu", 0 ) // using only the first half of the program ROM. + ROM_LOAD( "moon-main.bin", 0x00000, 0x20000, CRC(0a4b5dd0) SHA1(825801e9b72c10fed8e07f42b3b475688bdbd878) ) // low program, normal gfx + + ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_LOAD( "28.bin", 0x00000, 0x20000, CRC(76915c0f) SHA1(3f6d1c0dd3d9bf29538181a0e930291b822dad8c) ) // Normal GFX, from the other PCB + + ROM_REGION( 0x20000, "gfx2", 0 ) + ROM_LOAD( "29.bin", 0x00000, 0x20000, CRC(8a5f274d) SHA1(0f2ad61b00e220fc509c01c11c1a8f4e47b54f2a) ) // Normal GFX, from the other PCB + + ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */ + ROM_LOAD( "moon-sound.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) ) +ROM_END + +ROM_START( moonlghtc ) + ROM_REGION( 0x20000, "maincpu", 0 ) // using only the second half of the program ROM. + ROM_LOAD( "moon-main.bin", 0x10000, 0x10000, CRC(0a4b5dd0) SHA1(825801e9b72c10fed8e07f42b3b475688bdbd878) ) // high program, alt gfx + ROM_CONTINUE( 0x00000, 0x10000) + + ROM_REGION( 0x80000, "gfx1", 0 ) + ROM_LOAD( "moon-gfx2.bin", 0x00000, 0x80000, CRC(2ce5b722) SHA1(feb87fbf3b8d875842df80cd1edfef5071ed60c7) ) // Alt GFX set. Ships instead of cards + + ROM_REGION( 0x80000, "gfx2", 0 ) + ROM_LOAD( "moon-gfx1.bin", 0x00000, 0x80000, CRC(ea7d4234) SHA1(4016227aabf176c6e0fd822ebc59cade811f4ce8) ) // Alt GFX set. Ships instead of cards + + ROM_REGION( 0x40000, "oki", 0 ) /* Audio ADPCM */ + ROM_LOAD( "moon-sound.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) ) +ROM_END + /* Gold Fruit @@ -8447,6 +8630,58 @@ ROM_START( cb3e ) ROM_END +/* Cherry Gold I (bootleg) + It runs in CB3e similar hardware... + +1x TMPZ84C00AP-6 u15 8-bit Microprocessor +3x D71055C u30, u39, u40 Programmable Peripheral Interface +1x WF19054 u27 Programmable Sound Generator +1x SN76489AN u28 Digital Complex Sound Generator +1x oscillator unmarked Y1 + +ROMs +1x D27256 1.u3 +1x AM27512 3.u22 +1x D27C010 2u6 +1x N82S147AF u1 + +RAMs +4x HM6116LP-4 u9, u10, u11, u12 +1x D4016C-1 u23 + +PLDs +1x unknowun Cl-001 (QFP144) CY144A read protected +4x GAL20V8A-15LNC pl1, pl4, pl5, pl6 read protected +2x PALCE20V8H-25PC/4 u2,u? read protected +1x PALCE22V10H-25PC/4 u? read protected + +Others +1x 36x2 edge connector +1x 10x2 edge connector +1x pushbutton (TS) +2x trimmer (volume)(VR1,VR2) +5x 8x2 switches DIP(SW1-5) +1x battery 5,5V + +Notes +PCB is marked "REV.3" +*/ +ROM_START( chryglda ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "3.u22", 0x00000, 0x10000, CRC(059857c5) SHA1(f4becfda1e25ab347f55f35dc9f5818ef9344e2c) ) + + ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_LOAD( "2.u6", 0x00000, 0x20000, CRC(1359dfac) SHA1(78eb934055cda9e10d8e939c79bfa62262ecad7d) ) + + ROM_REGION( 0x08000, "gfx2", 0 ) + ROM_LOAD( "1.u3", 0x00000, 0x08000, CRC(919bd692) SHA1(1aeb66f1e4555b731858833445000593e613f74d) ) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD( "n82s147af.u1", 0x00000, 0x0100, CRC(d4eaa276) SHA1(b6598ee64ac3d41ca979c8667de8576cfb304451) ) + ROM_CONTINUE( 0x00000, 0x0100) // 2nd half has the data. +ROM_END + + ROM_START( cmv801 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "prg512", 0x0000, 0x10000, CRC(2f6e3fe9) SHA1(c5ffa51478a0dc2d8ff6a0f286cfb461011bb55d) ) @@ -9036,6 +9271,115 @@ ROM_START( cmasterf ) ROM_END +/* Cherry Master I (CM1-1.01) + Sticker with "Cherry Master V4 -B-" on the PCB. + Similar to cmasterb. Different program. + +1x TMPZ84C00AP-6 u80 8-bit Microprocessor +1x D8255AC-5 u36 Programmable Peripheral Interface +1x D71055C u54 Parallel Interface Unit +1x YM2149F u13 Programmable Sound Generator +1x oscillator 12.000MHz Y1 + +ROMs +4x 2764 1,2,3,4 +4x 27256 5,6,7,9 +1x 27512 8 +3x N82S129AN u46, u79, u84 + +RAMs +1x LC3517AL-10 u82 +4x D4016CX-15-10 u22, u26, u28, u38 + +PLDs +4x PALCE16V8H-25pc/4 u51, u66, u73, u74 + +Others +1x 36x2 edge connector +1x 10x2 edge connector +1x pushbutton (SW6) +1x trimmer (volume)(VR1) +5x 8x2 switches DIP(SW1-SW5) +1x battery 5.5V(BT1) +*/ +ROM_START( cmasterg ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "9.u81", 0x0000, 0x1000, CRC(10979629) SHA1(a7342e37c75c85aef8a86ab5366a9e27f2c4bab8) ) + ROM_CONTINUE(0x4000,0x1000) + ROM_CONTINUE(0x3000,0x1000) + ROM_CONTINUE(0x7000,0x1000) + ROM_CONTINUE(0x1000,0x1000) + ROM_CONTINUE(0x6000,0x1000) + ROM_CONTINUE(0x2000,0x1000) + ROM_CONTINUE(0x5000,0x1000) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "7.u16", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) ) + ROM_LOAD( "6.u11", 0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) ) + ROM_LOAD( "5.u4", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "4.u15", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) ) + ROM_LOAD( "3.u10", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) ) + ROM_LOAD( "2.u14", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) ) + ROM_LOAD( "1.u9", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) ) + + ROM_REGION( 0x10000, "user1", 0 ) + ROM_LOAD( "8.u53", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "n82s129an.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) ) + ROM_LOAD( "n82s129an.u79", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) ) + + ROM_REGION( 0x100, "proms2", 0 ) + ROM_LOAD( "n82s129an.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) +ROM_END + + +/* Cherry Master I (V1.10) + Original Dyna upgrade for Cherry Master boards. + The game runs in an original Dyna D9001 PCB. + It laks of STOP ALL button. + + From the owner (sic): + - The reels cannot be stop, not exist all stop button or cannot be stop from small, big, double-up button. + - The odds still be "high" (on the version 4.x be "low" odds). + - Not hold a pair option to, and the min bet to start is fixed x1. + */ +ROM_START( cmasterh ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "cm_v1.10_dyna.bin", 0x0000, 0x1000, CRC(872f2ef0) SHA1(ec68a03a1e8ab793d4a5eae1ce25f91608351c55) ) + ROM_CONTINUE(0x4000,0x1000) + ROM_CONTINUE(0x3000,0x1000) + ROM_CONTINUE(0x7000,0x1000) + ROM_CONTINUE(0x1000,0x1000) + ROM_CONTINUE(0x6000,0x1000) + ROM_CONTINUE(0x2000,0x1000) + ROM_CONTINUE(0x5000,0x1000) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "7.u16", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) ) + ROM_LOAD( "6.u11", 0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) ) + ROM_LOAD( "5.u4", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "4.u15", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) ) + ROM_LOAD( "3.u10", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) ) + ROM_LOAD( "2.u14", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) ) + ROM_LOAD( "1.u9", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) ) + + ROM_REGION( 0x10000, "user1", 0 ) + ROM_LOAD( "8.u53", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "n82s129an.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) ) + ROM_LOAD( "n82s129an.u79", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) ) + + ROM_REGION( 0x100, "proms2", 0 ) + ROM_LOAD( "n82s129an.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) +ROM_END + + ROM_START( cmast99 ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "cm99-041-8.u81", 0x0000, 0x1000, CRC(e0872d9f) SHA1(6d8f5e09e5c9daf834d5c74434eae86e5dd7e194) ) @@ -10655,6 +10999,47 @@ ROM_START( roypok96b ) ROM_END +ROM_START( roypok96c ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "subboard.bin", 0x0000, 0x1000, CRC(5ce4bed1) SHA1(bd888fec4531157668d4b14a9439a3051e52b3ec) ) + ROM_CONTINUE(0x4000,0x1000) + ROM_CONTINUE(0x3000,0x1000) + ROM_CONTINUE(0x7000,0x1000) + ROM_CONTINUE(0x1000,0x1000) + ROM_CONTINUE(0x6000,0x1000) + ROM_CONTINUE(0x2000,0x1000) + ROM_CONTINUE(0x5000,0x1000) + ROM_CONTINUE(0x8000,0x8000) + + ROM_REGION( 0x20000, "graphics", 0 ) + ROM_LOAD( "rp35h.bin", 0x00000, 0x10000, CRC(664649ea) SHA1(7915ab31afd2a1bbb8f817f961e0e522d76f5c05) ) + ROM_LOAD( "rp35l.bin", 0x10000, 0x10000, CRC(ef416c4e) SHA1(5aac157ba15c66f79a7a68935095bef9a2636f7b) ) + + ROM_REGION( 0x10000, "user1", ROMREGION_ERASEFF ) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_COPY( "graphics", 0x18000, 0x00000, 0x4000 ) // 1 + ROM_COPY( "graphics", 0x08000, 0x08000, 0x4000 ) // 1 + ROM_COPY( "graphics", 0x04000, 0x10000, 0x4000 ) // 1 + ROM_COPY( "graphics", 0x1c000, 0x04000, 0x4000 ) // 2 + ROM_COPY( "graphics", 0x0c000, 0x0c000, 0x4000 ) // 2 + ROM_COPY( "graphics", 0x14000, 0x14000, 0x4000 ) // 2 + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 ) + ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 ) + ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 ) + ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 ) + + ROM_REGION( 0x200, "proms", 0 ) // palette + ROM_LOAD( "rpu19.bin", 0x0000, 0x0100, CRC(deb9ae3c) SHA1(056ce4947244ade1ff70f167a998140745b5cffa) ) + ROM_LOAD( "rpu20.bin", 0x0100, 0x0100, CRC(b3e0a328) SHA1(f8990fcd1e90d3e9205ee81f1d7dd105dbdcfcd6) ) + + ROM_REGION( 0x100, "proms2", 0 ) // colours again? + ROM_LOAD( "rpu1920.bin", 0x0000, 0x0100, CRC(e204e8f3) SHA1(9005fe9c72055af690701cd239f4b3665b2fae21) ) +ROM_END + + ROM_START( pokonl97 ) ROM_REGION( 0x20000, "maincpu", 0 ) ROM_LOAD( "po33.bin", 0x00000, 0x1000, CRC(55bdd5cf) SHA1(7fd9e5c63ab2439db33710d7684f5df5e7324325) ) @@ -11674,9 +12059,27 @@ ROM_START( nfm ) ROM_END +/* Super Cherry Master. + Lacks of Dyna copyright. Maybe bootleg. + + Not reels stop options. + Tried any input on the real hardware without luck. +*/ +ROM_START( scmaster ) // all roms unique + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "27c512.u6", 0x00000, 0x10000, CRC(4eef290a) SHA1(27cca383de49d5f0072ecdda11591b78727469c6) ) + + ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_LOAD( "27c010.u29", 0x00000, 0x20000, CRC(98bd34b6) SHA1(e3ff6536eb421ed2e2f5d4354099078ba4ae5671) ) + + ROM_REGION( 0x40000, "gfx2", 0 ) + ROM_LOAD( "27c020.u41", 0x00000, 0x40000, CRC(ece34be2) SHA1(fdfaaffb12a7f6de6bf21b46ad50e845abc00734) ) +ROM_END + + ROM_START( unkch1 ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "u6.bin", 0x0000, 0x10000, CRC(30309996) SHA1(290f35f587fdf78dcb4f09403c510deec533c9c2) ) + ROM_LOAD( "u6.bin", 0x00000, 0x10000, CRC(30309996) SHA1(290f35f587fdf78dcb4f09403c510deec533c9c2) ) ROM_REGION( 0x20000, "gfx1", 0 ) ROM_LOAD( "u29.bin", 0x00000, 0x20000, CRC(6db245a1) SHA1(e9f85ba29b0af483eae6f999f49f1e431d9d2e27) ) @@ -11688,7 +12091,7 @@ ROM_END ROM_START( unkch2 ) // only gfx2 differs from unkch1 ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "u6.bin", 0x0000, 0x10000, CRC(30309996) SHA1(290f35f587fdf78dcb4f09403c510deec533c9c2) ) + ROM_LOAD( "u6.bin", 0x00000, 0x10000, CRC(30309996) SHA1(290f35f587fdf78dcb4f09403c510deec533c9c2) ) ROM_REGION( 0x20000, "gfx1", 0 ) ROM_LOAD( "u29.bin", 0x00000, 0x20000, CRC(6db245a1) SHA1(e9f85ba29b0af483eae6f999f49f1e431d9d2e27) ) @@ -11700,7 +12103,7 @@ ROM_END ROM_START( unkch3 ) // gfx2 is the same as unkch1, others differ ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "u6.3", 0x0000, 0x10000, CRC(902f9e42) SHA1(ac5843089748d457f70ea52d15285a0ccda705ad) ) + ROM_LOAD( "u6.3", 0x00000, 0x10000, CRC(902f9e42) SHA1(ac5843089748d457f70ea52d15285a0ccda705ad) ) ROM_REGION( 0x20000, "gfx1", 0 ) ROM_LOAD( "u29.3", 0x00000, 0x20000, CRC(546929e6) SHA1(f97fe5687f8776f0abe68962a0246c9bbeb6acd1) ) @@ -11712,7 +12115,7 @@ ROM_END ROM_START( unkch4 ) // all roms unique ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "u6.4", 0x0000, 0x10000, CRC(eb191efa) SHA1(3004f26f9af7633df572f609647716cc4ac75990) ) + ROM_LOAD( "u6.4", 0x00000, 0x10000, CRC(eb191efa) SHA1(3004f26f9af7633df572f609647716cc4ac75990) ) ROM_REGION( 0x20000, "gfx1", 0 ) ROM_LOAD( "u29.4", 0x00000, 0x20000, CRC(eaec0034) SHA1(6b2d3922873979eafcd4c71c52017263482b82ab) ) @@ -11722,6 +12125,18 @@ ROM_START( unkch4 ) // all roms unique ROM_END +ROM_START( cherry96 ) // all roms unique + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "new_96-16-3.u6", 0x00000, 0x10000, CRC(84d5f2fc) SHA1(e3ed0670350920c661c5a40581966671b8a8c7df) ) + + ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_LOAD( "new_96-16-2.u29", 0x00000, 0x20000, CRC(dd8f7450) SHA1(c897e5151809d4e0a0b1e46609f07bb0156b489a) ) + + ROM_REGION( 0x40000, "gfx2", 0 ) + ROM_LOAD( "new_96-16-1.u41", 0x00000, 0x20000, CRC(9ab19bdc) SHA1(2f34789729b5d12f6fa098a29253d5a80aef5b39) ) +ROM_END + + /* Cherry Master '97 @@ -11844,7 +12259,7 @@ ROM_END and Eagle & Fun World stickers (serial numbers). - For custom IC's 06B49P, and 06B53P, see the reverse-engineering notes in lucky74.c. + For custom IC's 06B49P, and 06B53P, see the reverse-engineering notes in lucky74.cpp. ------------------------ @@ -13274,8 +13689,11 @@ DRIVER_INIT_MEMBER(goldstar_state, wcherry) YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ GAMEL( 199?, goldstar, 0, goldstar, goldstar, goldstar_state, goldstar, ROT0, "IGS", "Golden Star", 0, layout_goldstar ) GAMEL( 199?, goldstbl, goldstar, goldstbl, goldstar, driver_device, 0, ROT0, "IGS", "Golden Star (Blue version)", 0, layout_goldstar ) -GAME( 199?, moonlght, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (bootleg of Golden Star)", 0 ) -GAMEL( 199?, chrygld, 0, chrygld, chrygld, cb3_state, chrygld, ROT0, "bootleg", "Cherry Gold I", 0, layout_chrygld ) +GAME( 199?, moonlght, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.0629, low program)", 0 ) +GAME( 199?, moonlghta, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.0629, high program)", 0 ) +GAME( 199?, moonlghtb, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.02L0A, low program)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black. +GAME( 199?, moonlghtc, goldstar, moonlght, goldstar, driver_device, 0, ROT0, "bootleg", "Moon Light (v.02L0A, high program, alt gfx)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black. +GAMEL( 199?, chrygld, 0, chrygld, chrygld, cb3_state, chrygld, ROT0, "bootleg", "Cherry Gold I (set 1)", 0, layout_chrygld ) GAMEL( 199?, chry10, 0, chrygld, chry10, cb3_state, chry10, ROT0, "bootleg", "Cherry 10 (bootleg with PIC16F84)", 0, layout_chrygld ) GAME( 199?, goldfrui, goldstar, goldfrui, goldstar, driver_device, 0, ROT0, "bootleg", "Gold Fruit", 0 ) // maybe fullname should be 'Gold Fruit (main 40%)' GAME( 2001, super9, goldstar, super9, goldstar, goldstar_state, super9, ROT0, "Playmark", "Super Nove (Playmark)", MACHINE_NOT_WORKING ) // need to decode gfx and see the program loops/reset... @@ -13291,6 +13709,7 @@ GAMEL( 199?, cb3b, ncb3, cherrys, ncb3, cb3_state, cherrys, GAME( 199?, cb3c, ncb3, cb3c, chrygld, cb3_state, cb3, ROT0, "bootleg", "Cherry Bonus III (alt, set 2)", MACHINE_NOT_WORKING) GAMEL( 199?, cb3d, ncb3, ncb3, ncb3, driver_device, 0, ROT0, "bootleg", "Cherry Bonus III (set 3)", 0, layout_cherryb3 ) GAMEL( 199?, cb3e, ncb3, cb3e, chrygld, cb3_state, cb3e, ROT0, "bootleg", "Cherry Bonus III (set 4, encrypted bootleg)", 0, layout_chrygld ) +GAMEL( 199?, chryglda, ncb3, cb3e, chrygld, cb3_state, cb3e, ROT0, "bootleg", "Cherry Gold I (set 2, encrypted bootleg)", 0, layout_chrygld ) // Runs in CB3e hardware. GAME( 1996, cmast97, ncb3, cm97, chrygld, driver_device, 0, ROT0, "Dyna", "Cherry Master '97", MACHINE_NOT_WORKING) // fix prom decode @@ -13303,7 +13722,6 @@ GAMEL( 198?, cmv801, 0, cm, cmv801, cmaster_state, cm, - // most of these are almost certainly bootlegs, with added features, hacked payouts etc. identifying which are // the original, unmodified dyna versions is almost impossible due to lack of documentation from back in the day, // even original boards almost always run modified sets @@ -13319,6 +13737,8 @@ GAMEL( 1991, cmasterbv, cmaster, cm, cmasterb, cmaster_state, cmv4, GAMEL( 1991, cmasterd, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 5)", 0, layout_cmasterb ) GAMEL( 1991, cmastere, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 6)", 0, layout_cmasterb ) GAMEL( 1991, cmasterf, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 7)", 0, layout_cmasterb ) +GAMEL( 1991, cmasterg, cmaster, cm, cmasterg, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 8, V4-B-)", 0, layout_cmasterb ) +GAMEL( 1991, cmasterh, cmaster, cm, cmasterb, cmaster_state, cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.10)", 0, layout_cmasterb ) GAME( 199?, cmast99, 0, cm, cmv4, cmaster_state, cmv4, ROT0, "????", "Cherry Master '99", MACHINE_NOT_WORKING ) @@ -13393,6 +13813,7 @@ GAME( 2009, fb2010, 0, amcoe2, nfb96tx, cmaster_state, fb2010, GAMEL( 1996, roypok96, 0, amcoe2, roypok96, cmaster_state, rp35, ROT0, "Amcoe", "Royal Poker '96 (set 1, v97-3.5)", 0, layout_roypok96 ) GAMEL( 1996, roypok96a, roypok96, amcoe2, roypok96a, cmaster_state, rp36, ROT0, "Amcoe", "Royal Poker '96 (set 2, v98-3.6)", 0, layout_roypok96 ) GAMEL( 1996, roypok96b, roypok96, amcoe2, roypok96a, cmaster_state, rp36c3, ROT0, "Amcoe", "Royal Poker '96 (set 3, v98-3.6?)", 0, layout_roypok96 ) +GAME( 1996, roypok96c, roypok96, amcoe2, roypok96a, driver_device, 0, ROT0, "Amcoe", "Royal Poker '96 (set 4, C3 board)", MACHINE_NOT_WORKING ) /* these all appear to be graphic hacks of 'New Fruit Bonus '96', they can run with the same program rom @@ -13407,11 +13828,17 @@ GAME( 2003, carb2003, nfb96, amcoe2, nfb96bl, driver_device, 0, GAME( 2003, nfm, 0, nfm, nfm, driver_device, 0, ROT0, "Ming-Yang Electronic", "New Fruit Machine (Ming-Yang Electronic)", MACHINE_NOT_WORKING ) // vFB02-07A "Copyright By Ms. Liu Orchis 2003/03/06" -// these have 'cherry 1994' in the program roms, but also "Super Cherry / New Cherry Gold '99" probably hacks of a 1994 version of Cherry Bonus / Cherry Master (Super Cherry Master?) -GAMEL(1999, unkch1, 0, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 1)", 0, layout_unkch ) -GAMEL(1999, unkch2, unkch1, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "Super Cherry Gold (bootleg of Super Cherry Master)", 0, layout_unkch ) -GAMEL(1999, unkch3, unkch1, unkch, unkch3, unkch_state, unkch3, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 2)", 0, layout_unkch ) // cards have been hacked to look like barrels, girl removed? -GAMEL(1999, unkch4, unkch1, unkch, unkch4, unkch_state, unkch4, ROT0, "bootleg", "Grand Cherry Master (bootleg of Super Cherry Master)", 0, layout_unkch ) // by 'Toy System' Hungary + +// super cherry master sets... +GAMEL(1994, scmaster, 0, unkch, unkch4, unkch_state, unkch4, ROT0, "bootleg", "Super Cherry Master (v1.0)", 0, layout_unkch ) + +// these have 'cherry 1994' in the program roms, but also "Super Cherry / New Cherry Gold '99". probably hacks of a 1994 version of Super Cherry Master. +GAMEL(1999, unkch1, scmaster, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 1)", 0, layout_unkch ) +GAMEL(1999, unkch2, scmaster, unkch, unkch, unkch_state, unkch1, ROT0, "bootleg", "Super Cherry Gold (bootleg of Super Cherry Master)", 0, layout_unkch ) +GAMEL(1999, unkch3, scmaster, unkch, unkch3, unkch_state, unkch3, ROT0, "bootleg", "New Cherry Gold '99 (bootleg of Super Cherry Master) (set 2)", 0, layout_unkch ) // cards have been hacked to look like barrels, girl removed? +GAMEL(1999, unkch4, scmaster, unkch, unkch4, unkch_state, unkch4, ROT0, "bootleg", "Grand Cherry Master (bootleg of Super Cherry Master)", 0, layout_unkch ) // by 'Toy System' Hungary + +GAME( 1996, cherry96, scmaster, unkch, unkch4, unkch_state, unkch4, ROT0, "bootleg", "New Cherry '96 (bootleg of New Fruit Bonus?)", MACHINE_NOT_WORKING ) // need to be moved to another machine... /* Stealth sets. @@ -13422,7 +13849,7 @@ GAMEL( 198?, cmpacman, 0, cm, cmpacman, cmaster_state, cm, RO GAMEL( 198?, cmtetris, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (Corsica, v8.01, set 1)", 0, layout_cmpacman ) // need to press K/L to switch between games... GAMEL( 198?, cmtetrsa, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (Corsica, v8.01, set 2)", MACHINE_NOT_WORKING, layout_cmpacman ) // seems banked... GAMEL( 198?, cmtetrsb, 0, cm, cmtetris, cmaster_state, cm, ROT0, "<unknown>", "Tetris + Cherry Master (+K, Canada Version, encrypted)", MACHINE_NOT_WORKING, layout_cmpacman ) // different Tetris game. press insert to throttle and see the attract running. -GAMEL( 1997, crazybon, 0, pkrmast, crazybon, driver_device, 0, ROT0, "bootleg (Crazy Co.)", "Crazy Bonus 2002", MACHINE_IMPERFECT_COLORS, layout_crazybon ) +GAMEL( 1997, crazybon, 0, pkrmast, crazybon, driver_device, 0, ROT0, "bootleg (Crazy Co.)", "Crazy Bonus 2002", MACHINE_IMPERFECT_COLORS, layout_crazybon ) // Windows ME desktop... but not found the way to switch it. /* other possible stealth sets: - cmv4a ---> see the 1fxx zone. put a bp in 1f9f to see the loop. diff --git a/src/mame/drivers/goupil.cpp b/src/mame/drivers/goupil.cpp new file mode 100644 index 00000000000..d1bdabb186d --- /dev/null +++ b/src/mame/drivers/goupil.cpp @@ -0,0 +1,511 @@ +// license:BSD-3-Clause +// copyright-holders:Jean-François DEL NERO +/*************************************************************************** + + SMT Goupil G1 driver + + Current state : + + -> CPU / ROM / RAM working + -> Video output working + -> Keyboard support working (need to be polished... ) + -> Floppy FDC not fully implemented. + -> Sound support missing. + + Software : + -> The Monitor is working + -> The internal Basic is working (-> 6800 0xC3 illegal opcode emulation needed). + + 02/04/2016 + Jean-François DEL NERO + +****************************************************************************/ + +#include "emu.h" +#include "cpu/m6800/m6800.h" +#include "machine/6522via.h" +#include "machine/i8279.h" +#include "video/ef9364.h" +#include "video/mc6845.h" +#include "machine/6850acia.h" +#include "machine/wd_fdc.h" + +#include "softlist.h" + +#define MAIN_CLOCK XTAL_4MHz +#define VIDEO_CLOCK MAIN_CLOCK / 8 /* 1.75 Mhz */ +#define CPU_CLOCK MAIN_CLOCK / 4 /* 1 Mhz */ + +class goupil_g1_state : public driver_device +{ +public: + goupil_g1_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_acia(*this, "ef6850") + , m_ef9364(*this, "ef9364") + , m_maincpu(*this, "maincpu") + , m_via_video(*this, "m_via_video") + , m_via_keyb(*this, "m_via_keyb") + , m_via_modem(*this, "m_via_modem") + , m_fdc(*this, "fd1791") + , m_floppy0(*this, "fd1791:0") + , m_floppy1(*this, "fd1791:1") + , m_floppy(NULL) + { } + + DECLARE_WRITE8_MEMBER(via_video_pba_w); + DECLARE_WRITE8_MEMBER(via_video_pbb_w); + DECLARE_WRITE_LINE_MEMBER(via_video_ca2_w); + + DECLARE_READ8_MEMBER(kbd1_r); + DECLARE_READ8_MEMBER(kbd2_r); + DECLARE_READ8_MEMBER(shift_kb1_r); + DECLARE_READ8_MEMBER(shift_kb2_r); + DECLARE_READ8_MEMBER(ctrl_kb1_r); + DECLARE_READ8_MEMBER(ctrl_kb2_r); + + DECLARE_WRITE8_MEMBER(scanlines_kbd1_w); + DECLARE_WRITE8_MEMBER(scanlines_kbd2_w); + + DECLARE_READ_LINE_MEMBER(via_keyb_ca2_r); + + virtual void machine_start() override; + virtual void machine_reset() override; + + UINT8 m_row_kbd1; + UINT8 m_row_kbd2; + int old_state_ca2; + UINT8 via_video_pbb_data; + UINT8 cnttim; + UINT8 valkeyb; + TIMER_DEVICE_CALLBACK_MEMBER(goupil_scanline); + +private: + required_device<acia6850_device> m_acia; + required_device<ef9364_device> m_ef9364; + required_device<cpu_device> m_maincpu; + required_device<via6522_device> m_via_video; + required_device<via6522_device> m_via_keyb; + required_device<via6522_device> m_via_modem; + required_device<fd1791_t> m_fdc; + required_device<floppy_connector> m_floppy0; + required_device<floppy_connector> m_floppy1; + floppy_image_device *m_floppy; +}; + +/********************************** +* Floppy controller I/O Handlers * +***********************************/ +// TODO + +/********************************** +* Keyboard I/O Handlers * +***********************************/ + +TIMER_DEVICE_CALLBACK_MEMBER( goupil_g1_state::goupil_scanline ) +{ + m_ef9364->update_scanline((UINT16)param); +} + +static ADDRESS_MAP_START(goupil_mem, AS_PROGRAM, 8, goupil_g1_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000,0x3fff) AM_RAM + AM_RANGE(0x4000,0x7fff) AM_RAM + AM_RANGE(0xC000,0xE3FF) AM_ROM AM_REGION("maincpu", 0x1000) // Basic ROM (BASIC 1 up to BASIC 9). + + AM_RANGE(0xe400,0xe7ff) AM_RAM + AM_RANGE(0xE800,0xE80F) AM_DEVREADWRITE("ef6850", acia6850_device, data_r, data_w) + AM_RANGE(0xE810,0xE81F) AM_DEVREADWRITE("m_via_video", via6522_device, read, write) + + AM_RANGE(0xE820,0xE820) AM_DEVREADWRITE("i8279_kb1", i8279_device, data_r, data_w ) + AM_RANGE(0xE821,0xE821) AM_DEVREADWRITE("i8279_kb1", i8279_device, status_r, cmd_w ) + + AM_RANGE(0xE830,0xE830) AM_DEVREADWRITE("i8279_kb2", i8279_device, data_r, data_w ) + AM_RANGE(0xE831,0xE831) AM_DEVREADWRITE("i8279_kb2", i8279_device, status_r, cmd_w ) + + AM_RANGE(0xE840,0xE84F) AM_DEVREADWRITE("m_via_keyb", via6522_device, read, write) + + AM_RANGE(0xE860,0xE86F) AM_DEVREADWRITE("m_via_modem", via6522_device, read, write) + + AM_RANGE(0xe8f0,0xe8ff) AM_DEVREADWRITE("fd1791", fd1791_t, read, write) + //AM_RANGE(0xf08a,0xf08a) AM_READWRITE( fdc_sel0_r, fdc_sel0_w ) + //AM_RANGE(0xf08b,0xf08b) AM_READWRITE( fdc_sel1_r, fdc_sel1_w ) + + AM_RANGE(0xf400,0xf7ff) AM_ROM AM_REGION("maincpu", 0x0800) // Modem (MOD 3) + AM_RANGE(0xf800,0xffff) AM_ROM AM_REGION("maincpu", 0x0000) // Monitor (MON 1 + MON 2) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( goupil_io, AS_IO, 8, goupil_g1_state) + ADDRESS_MAP_UNMAP_HIGH +ADDRESS_MAP_END + +WRITE8_MEMBER( goupil_g1_state::scanlines_kbd1_w ) +{ + m_row_kbd1 = data; +} + +READ8_MEMBER( goupil_g1_state::ctrl_kb1_r ) +{ + char kbdrow[6]; + unsigned char data; + + kbdrow[0] = 'C'; + kbdrow[1] = 'T'; + kbdrow[2] = 'R'; + kbdrow[3] = '0'; + kbdrow[4] = 0; + + data = ioport(kbdrow)->read(); + if( data & 0x02 ) + return 1; + else + return 0; +} + +READ8_MEMBER( goupil_g1_state::ctrl_kb2_r ) +{ + return 1; +} + +READ8_MEMBER( goupil_g1_state::shift_kb1_r ) +{ + char kbdrow[6]; + unsigned char data; + + kbdrow[0] = 'C'; + kbdrow[1] = 'T'; + kbdrow[2] = 'R'; + kbdrow[3] = '0'; + kbdrow[4] = 0; + + data = ioport(kbdrow)->read(); + if( data & 0x01 ) + return 1; + else + return 0; +} + +READ8_MEMBER( goupil_g1_state::shift_kb2_r ) +{ + return 1; +} + +READ8_MEMBER( goupil_g1_state::kbd1_r ) +{ + char kbdrow[6]; + UINT8 data = 0xff; + + kbdrow[0] = 'A'; + kbdrow[1] = 'X'; + kbdrow[2] = '0' + ( m_row_kbd1 & 7 ) ; + kbdrow[3] = 0; + + data = ioport(kbdrow)->read(); + + return data; +} + +WRITE8_MEMBER( goupil_g1_state::scanlines_kbd2_w ) +{ + m_row_kbd2 = data & 7; +} + +READ_LINE_MEMBER( goupil_g1_state::via_keyb_ca2_r ) +{ + return 0; +} + +READ8_MEMBER( goupil_g1_state::kbd2_r ) +{ + char kbdrow[6]; + UINT8 data = 0xff; + + kbdrow[0] = 'B'; + kbdrow[1] = 'X'; + kbdrow[2] = '0' + ( m_row_kbd2 & 7 ) ; + kbdrow[3] = 0; + + data = ioport(kbdrow)->read(); + + return data; +} + +/* Input ports */ +static INPUT_PORTS_START( goupil_g1 ) + PORT_START("AX0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_START("AX1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_START("AX2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('?') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_START("AX3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) + PORT_START("AX4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR(':') PORT_CHAR('/') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('.') + PORT_START("AX5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BS") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_START("AX6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00F9) PORT_CHAR('%') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') + PORT_START("AX7") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("CTR0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + + PORT_START("BX0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("BX1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("BX2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("BX3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') + PORT_START("BX4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("BX5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("BX6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') + PORT_START("BX7") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') +INPUT_PORTS_END + +static SLOT_INTERFACE_START( goupil_floppies ) + SLOT_INTERFACE( "525qd", FLOPPY_525_QD ) +SLOT_INTERFACE_END + +void goupil_g1_state::machine_start() +{ + std::string region_tag; + + m_floppy = NULL; + valkeyb = 0xFF; +} + +void goupil_g1_state::machine_reset() +{ +} + +WRITE8_MEMBER(goupil_g1_state::via_video_pba_w) +{ + #ifdef DBGMODE + printf("%s: write via_video_pba_w reg : 0x%X\n",machine().describe_context(),data); + #endif + m_ef9364->char_latch_w(data); +} + +WRITE8_MEMBER(goupil_g1_state::via_video_pbb_w) +{ + #ifdef DBGMODE + printf("%s: write via_video_pbb_w reg : 0x%X\n",machine().describe_context(),data); + #endif + via_video_pbb_data = data; +} + +WRITE_LINE_MEMBER( goupil_g1_state::via_video_ca2_w ) +{ + if(old_state_ca2==0 && state==1) + { + m_ef9364->command_w(via_video_pbb_data&0xF); + } + old_state_ca2 = state; +} + +static MACHINE_CONFIG_START( goupil_g1, goupil_g1_state ) + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu",M6808, CPU_CLOCK) + MCFG_CPU_PROGRAM_MAP(goupil_mem) + MCFG_CPU_IO_MAP(goupil_io) + + /* sound hardware */ + // TODO ! + + MCFG_DEVICE_ADD ("ef6850", ACIA6850, 0) + + /* screen */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(50) + MCFG_SCREEN_UPDATE_DEVICE("ef9364", ef9364_device, screen_update) + + MCFG_SCREEN_SIZE((64*8), (16*(8+4))) + MCFG_SCREEN_VISIBLE_AREA(0, (64*8)-1, 0, (16*(8+4))-1) + MCFG_PALETTE_ADD("palette", 16) + + MCFG_DEVICE_ADD("ef9364", EF9364, VIDEO_CLOCK) + MCFG_EF9364_PALETTE("palette") + MCFG_EF9364_PAGES_CNT(1); + MCFG_TIMER_DRIVER_ADD_SCANLINE("goupil_sl", goupil_g1_state, goupil_scanline, "screen", 0, 10) + + MCFG_DEVICE_ADD("m_via_video", VIA6522, 0) + MCFG_VIA6522_WRITEPA_HANDLER(WRITE8(goupil_g1_state, via_video_pba_w)) + MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(goupil_g1_state, via_video_pbb_w)) + MCFG_VIA6522_CA2_HANDLER(WRITELINE(goupil_g1_state, via_video_ca2_w)) + + MCFG_DEVICE_ADD("m_via_keyb", VIA6522, 0) + MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line)) + + MCFG_DEVICE_ADD("m_via_modem", VIA6522, 0) + MCFG_VIA6522_IRQ_HANDLER(DEVWRITELINE("maincpu", m6808_cpu_device, irq_line)) + + /* Floppy */ + MCFG_FD1791_ADD("fd1791", XTAL_8MHz ) + MCFG_FLOPPY_DRIVE_ADD("fd1791:0", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("fd1791:1", goupil_floppies, "525qd", floppy_image_device::default_floppy_formats) + + MCFG_DEVICE_ADD("i8279_kb1", I8279, CPU_CLOCK) + MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd1_w)) // scan SL lines + MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd1_r)) // kbd RL lines + MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb1_r)) + MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb1_r)) + MCFG_I8279_OUT_IRQ_CB(DEVWRITELINE("m_via_keyb", via6522_device, write_ca1)) + + MCFG_DEVICE_ADD("i8279_kb2", I8279, CPU_CLOCK) + MCFG_I8279_OUT_SL_CB(WRITE8(goupil_g1_state, scanlines_kbd2_w)) // scan SL lines + MCFG_I8279_IN_RL_CB(READ8(goupil_g1_state, kbd2_r)) // kbd RL lines + MCFG_I8279_IN_SHIFT_CB(READ8(goupil_g1_state, shift_kb2_r)) + MCFG_I8279_IN_CTRL_CB(READ8(goupil_g1_state, ctrl_kb2_r)) + +MACHINE_CONFIG_END + +/* ROM definition */ +ROM_START( goupilg1 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_DEFAULT_BIOS("v1_0") + + ROM_SYSTEM_BIOS(0, "v1_0", "Version 1.0") + ROMX_LOAD( "SMT_Goupil_G1_MON_1.bin", 0x0000, 0x0400, CRC(98B7BE69) SHA1(69E83FE78A43FCF2B08FB0BCEFB0D217A57B1ECB), ROM_BIOS(1) ) + ROM_LOAD ( "SMT_Goupil_G1_MON_2.bin", 0x0400, 0x0400, CRC(19386B81) SHA1(E52F63FD29D374319781E9677DE6D3FD61A3684C) ) + + ROM_LOAD( "SMT_Goupil_G1_MOD_3.bin", 0x0800, 0x0400, CRC(E662F152) SHA1(11B91C5737E7572A2C18472B66BBD16B485132D5) ) + + ROMX_LOAD( "SMT_Goupil_G1_Basic_1.bin", 0x1000, 0x0400, CRC(AD105B12) SHA1(631CD4B997F76B57BF2509E4BFF30B1595C8BD13), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_2.bin", 0x1400, 0x0400, CRC(0C5C309C) SHA1(F1CAB4B0F9191E53113790A95F1AB7108F9406A1), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_3.bin", 0x1800, 0x0400, CRC(1F1EB127) SHA1(DBBB880C79D515ACBFCB2BE9A4C96962F3E4EDEA), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_4.bin", 0x1C00, 0x0400, CRC(09BE48E4) SHA1(86CAE0D159583C1D572A5754F3BB6B4A2E479359), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_5.bin", 0x2000, 0x0400, CRC(BDEB395C) SHA1(32A50468F1CA772EE45A1F5C61C66F3ECC774074), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_6.bin", 0x2400, 0x0400, CRC(850A4000) SHA1(720F0BB3E45877835219B7E1D943EF4F19B9977D), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_7.bin", 0x2800, 0x0400, CRC(586C7670) SHA1(13E2E96B9F1A53555CE0D55F657CF3C6B96F10A0), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_8.bin", 0x2C00, 0x0400, CRC(33281300) SHA1(CE631FA8157A3F8869C5FEFE24B7F40E06696DF9), ROM_BIOS(1) ) + ROMX_LOAD( "SMT_Goupil_G1_Basic_9.bin", 0x3000, 0x0400, CRC(A3911201) SHA1(8623A0A2D83EB3A27A795030643C5C05A4350A9F), ROM_BIOS(1) ) + + ROM_REGION( 0x400, "ef9364", 0 ) + ROM_LOAD( "SMT_Goupil_G1_Charset.bin", 0x0000, 0x0400, CRC(8B6DA54B) SHA1(AC2204600F45C6DD0DF1E759B62ED25928F02A12) ) +ROM_END + +/* Driver */ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +COMP( 1979, goupilg1, 0, 0, goupil_g1, goupil_g1,driver_device, 0, "SMT", "Goupil G1", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp index b751e7fc029..e9cbb5e37a5 100644 --- a/src/mame/drivers/gticlub.cpp +++ b/src/mame/drivers/gticlub.cpp @@ -910,21 +910,21 @@ UINT32 gticlub_state::screen_update_hangplt(screen_device &screen, bitmap_rgb32 if (strcmp(screen.tag(), ":lscreen") == 0) { - device_t *voodoo = machine().device("voodoo0"); + voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo0"); // m_k001604_1->draw_back_layer(bitmap, cliprect); - voodoo_update(voodoo, bitmap, cliprect); + voodoo->voodoo_update(bitmap, cliprect); m_k001604_1->draw_front_layer(screen, bitmap, cliprect); } else if (strcmp(screen.tag(), ":rscreen") == 0) { - device_t *voodoo = machine().device("voodoo1"); + voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo1"); // m_k001604_2->draw_back_layer(bitmap, cliprect); - voodoo_update(voodoo, bitmap, cliprect); + voodoo->voodoo_update(bitmap, cliprect); m_k001604_2->draw_front_layer(screen, bitmap, cliprect); } diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp index e6b881a60f4..e5eb4267425 100644 --- a/src/mame/drivers/harddriv.cpp +++ b/src/mame/drivers/harddriv.cpp @@ -1425,7 +1425,7 @@ static MACHINE_CONFIG_FRAGMENT( driver_nomsp ) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", harddriv_state, video_int_gen) MCFG_CPU_PERIODIC_INT_DRIVER(harddriv_state, hd68k_irq_gen, (double)HARDDRIV_MASTER_CLOCK/16/16/16/16/2) - MCFG_SLAPSTIC_ADD("slapstic") + MCFG_SLAPSTIC_ADD("slapstic", 117) MCFG_SLAPSTIC_68K_ACCESS(1) MCFG_CPU_ADD("gsp", TMS34010, HARDDRIV_GSP_CLOCK) @@ -1472,6 +1472,7 @@ static MACHINE_CONFIG_FRAGMENT( driver_msp ) MCFG_TMS340X0_OUTPUT_INT_CB(WRITELINE(harddriv_state, hdmsp_irq_gen)) MCFG_VIDEO_SET_SCREEN("screen") + MCFG_DEVICE_REMOVE("slapstic") MACHINE_CONFIG_END @@ -1510,6 +1511,7 @@ static MACHINE_CONFIG_FRAGMENT( multisync_msp ) MCFG_TMS340X0_OUTPUT_INT_CB(WRITELINE(harddriv_state, hdmsp_irq_gen)) MCFG_VIDEO_SET_SCREEN("screen") + MCFG_DEVICE_REMOVE("slapstic") MACHINE_CONFIG_END @@ -1524,6 +1526,8 @@ static MACHINE_CONFIG_FRAGMENT( multisync2 ) MCFG_CPU_MODIFY("gsp") MCFG_CPU_PROGRAM_MAP(multisync2_gsp_map) + + MCFG_DEVICE_REMOVE("slapstic") MACHINE_CONFIG_END @@ -1682,6 +1686,7 @@ static MACHINE_CONFIG_FRAGMENT( stunrun ) MCFG_CPU_MODIFY("gsp") MCFG_TMS340X0_PIXEL_CLOCK(5000000) /* pixel clock */ MCFG_FRAGMENT_ADD( adsp ) /* ADSP board */ + MCFG_DEVICE_REMOVE("slapstic") /* video hardware */ MCFG_SCREEN_MODIFY("screen") @@ -2018,6 +2023,10 @@ static MACHINE_CONFIG_START( racedriv_panorama_machine, harddriv_new_state ) MCFG_DEVICE_MODIFY("mainpcb:duartn68681") MCFG_MC68681_A_TX_CALLBACK(DEVWRITELINE(DEVICE_SELF_OWNER, harddriv_new_state,tx_a)) + // boots with 'PROGRAM OK' when using standard Hard Drivin' board type (needs 137412-115 slapstic) + MCFG_DEVICE_MODIFY("mainpcb:slapstic") + MCFG_SLAPSTIC_NUM(115) + MCFG_TIMER_DRIVER_ADD_PERIODIC("hack_timer", harddriv_new_state, hack_timer, attotime::from_hz(60)) // MCFG_QUANTUM_TIME(attotime::from_hz(60000)) MACHINE_CONFIG_END @@ -4070,7 +4079,6 @@ Filename Location Label Board ROM_START( racedrivpan ) ROM_REGION( 0x200000, "mainpcb:maincpu", 0 ) /* 2MB for 68000 code */ // Multisync PBB A045988 - Central Monitor - // boots with 'PROGRAM OK' when using standard Hard Drivin' board type (needs 137412-115 slapstic) ROM_LOAD16_BYTE( "088-1002.bin", 0x000000, 0x010000, CRC(49a97391) SHA1(dbe4086cd87669a02d2a2133d0d9e2895946b383) ) ROM_LOAD16_BYTE( "088-1001.bin", 0x000001, 0x010000, CRC(4473accc) SHA1(099bda6cfe31d4e53cbe74046679ddf8b874982d) ) ROM_LOAD16_BYTE( "088-1004.bin", 0x020000, 0x010000, CRC(33b84ca6) SHA1(9e3cafadfb23bfc4a44e503043cc05db27d939a9) ) @@ -4652,7 +4660,7 @@ void harddriv_state::init_multisync(int compact_inputs) m_gsp_multisync = TRUE; // if we have a JSA board, install the read/write handlers - if (m_jsa != nullptr) + if (m_jsa.found()) m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x600000, 0x603fff, read8_delegate(FUNC(atari_jsa_base_device::main_response_r),m_jsa.target()), write8_delegate(FUNC(atari_jsa_base_device::main_command_w),m_jsa.target()), 0xff00); /* install handlers for the compact driving games' inputs */ @@ -4936,7 +4944,7 @@ void harddriv_state::init_racedriv(void) init_driver_sound(); /* set up the slapstic */ - m_slapstic_device->slapstic_init(machine(), 117); + m_slapstic_device->slapstic_init(); m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this)); /* synchronization */ @@ -4957,7 +4965,7 @@ void harddriv_state::racedrivc_init_common(offs_t gsp_protection) init_driver_sound(); /* set up the slapstic */ - m_slapstic_device->slapstic_init(machine(), 117); + m_slapstic_device->slapstic_init(); m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this)); /* synchronization */ @@ -4987,7 +4995,7 @@ void harddriv_state::init_racedrivc_panorama_side() init_adsp(); /* set up the slapstic */ - m_slapstic_device->slapstic_init(machine(), 117); + m_slapstic_device->slapstic_init(); m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this)); /* set up protection hacks */ @@ -5079,7 +5087,7 @@ void harddriv_state::init_strtdriv(void) init_dsk(); /* set up the slapstic */ - m_slapstic_device->slapstic_init(machine(), 117); + m_slapstic_device->slapstic_init(); m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xe0000, 0xfffff, read16_delegate(FUNC(harddriv_state::rd68k_slapstic_r), this), write16_delegate(FUNC(harddriv_state::rd68k_slapstic_w), this)); m_maincpu->space(AS_PROGRAM).install_read_handler(0xa80000, 0xafffff, read16_delegate(FUNC(harddriv_state::hda68k_port1_r), this)); diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index 486f6882b28..4b5046bde85 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -66,7 +66,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); protected: virtual void machine_start() override; @@ -194,7 +194,7 @@ void hh_cop400_state::set_display_size(int maxx, int maxy) m_display_maxy = maxy; } -void hh_cop400_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +void hh_cop400_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) { set_display_size(maxx, maxy); @@ -203,10 +203,13 @@ void hh_cop400_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 set for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; - display_update(); + if (update) + display_update(); } +// generic input handlers + UINT8 hh_cop400_state::read_inputs(int columns) { // active low @@ -232,7 +235,7 @@ UINT8 hh_cop400_state::read_inputs(int columns) Castle Toy Einstein * COP421 MCU labeled ~/927 COP421-NEZ/N - * 4 lamps, 1bit sound + * 4 lamps, 1-bit sound ***************************************************************************/ @@ -277,7 +280,7 @@ MACHINE_CONFIG_END Entex Space Invader * COP444L MCU labeled /B138 COPL444-HRZ/N INV II (die labeled HRZ COP 444L/A) - * 3 7seg LEDs, LED matrix and overlay mask, 1bit sound + * 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound The first version was on TMS1100 (see hh_tms1k.c), this is the reprogrammed second release with a gray case instead of black. @@ -393,7 +396,7 @@ MACHINE_CONFIG_END Mattel Funtronics Jacks * COP410L MCU bonded directly to PCB (die labeled COP410L/B NGS) - * 8 LEDs, 1bit sound + * 8 LEDs, 1-bit sound ***************************************************************************/ @@ -500,7 +503,7 @@ MACHINE_CONFIG_END Mattel Funtronics Red Light Green Light * COP410L MCU bonded directly to PCB (die labeled COP410L/B NHZ) - * 14 LEDs, 1bit sound + * 14 LEDs, 1-bit sound known releases: - USA: Funtronics Red Light Green Light @@ -595,7 +598,7 @@ MACHINE_CONFIG_END Milton Bradley Plus One * COP410L MCU in 8-pin DIP, labeled ~/029 MM 57405 (die labeled COP410L/B NNE) - * 4 sensors(1 on each die side), 1bit sound + * 4 sensors(1 on each die side), 1-bit sound ***************************************************************************/ @@ -639,7 +642,7 @@ MACHINE_CONFIG_END Milton Bradley (Electronic) Lightfight * COP421L MCU labeled /B119 COP421L-HLA/N - * LED matrix, 1bit sound + * LED matrix, 1-bit sound Xbox-shaped electronic game for 2 or more players, with long diagonal buttons next to each outer LED. The main object of the game is to pinpoint a light @@ -824,4 +827,4 @@ CONS( 1979, funjacks, 0, 0, funjacks, funjacks, driver_device, 0, "Mat CONS( 1979, funrlgl, 0, 0, funrlgl, funrlgl, driver_device, 0, "Mattel", "Funtronics Red Light Green Light", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) CONS( 1980, plus1, 0, 0, plus1, plus1, driver_device, 0, "Milton Bradley", "Plus One", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) -CONS( 1981, lightfgt, 0, 0, lightfgt, lightfgt, driver_device, 0, "Milton Bradley", "Lightfight", MACHINE_SUPPORTS_SAVE ) +CONS( 1981, lightfgt, 0, 0, lightfgt, lightfgt, driver_device, 0, "Milton Bradley", "Lightfight", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index b511780824a..36bfd7a52ab 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -138,7 +138,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety); + void display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety, bool update = true); protected: virtual void machine_start() override; @@ -267,7 +267,7 @@ void hh_hmcs40_state::set_display_size(int maxx, int maxy) m_display_maxy = maxy; } -void hh_hmcs40_state::display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety) +void hh_hmcs40_state::display_matrix(int maxx, int maxy, UINT64 setx, UINT32 sety, bool update) { set_display_size(maxx, maxy); @@ -276,10 +276,13 @@ void hh_hmcs40_state::display_matrix(int maxx, int maxy, UINT64 setx, UINT32 set for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (U64(1) << maxx)) : 0; - display_update(); + if (update) + display_update(); } +// generic input handlers + UINT16 hh_hmcs40_state::read_inputs(int columns) { UINT16 ret = 0; diff --git a/src/mame/drivers/hh_melps4.cpp b/src/mame/drivers/hh_melps4.cpp index 541352078d7..c16715427be 100644 --- a/src/mame/drivers/hh_melps4.cpp +++ b/src/mame/drivers/hh_melps4.cpp @@ -54,7 +54,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); protected: virtual void machine_start() override; @@ -176,7 +176,7 @@ void hh_melps4_state::set_display_size(int maxx, int maxy) m_display_maxy = maxy; } -void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) { set_display_size(maxx, maxy); @@ -185,7 +185,8 @@ void hh_melps4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 set for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; - display_update(); + if (update) + display_update(); } diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp index bb65a69265e..50bcd9c9e91 100644 --- a/src/mame/drivers/hh_pic16.cpp +++ b/src/mame/drivers/hh_pic16.cpp @@ -66,7 +66,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); protected: virtual void machine_start() override; @@ -186,7 +186,7 @@ void hh_pic16_state::set_display_size(int maxx, int maxy) m_display_maxy = maxy; } -void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) { set_display_size(maxx, maxy); @@ -195,7 +195,8 @@ void hh_pic16_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; - display_update(); + if (update) + display_update(); } diff --git a/src/mame/drivers/hh_tms1k.cpp b/src/mame/drivers/hh_tms1k.cpp index 9670ab8be9f..87c4e51a772 100644 --- a/src/mame/drivers/hh_tms1k.cpp +++ b/src/mame/drivers/hh_tms1k.cpp @@ -14,15 +14,19 @@ @CP0904A TMS0970 1977, Milton Bradley Comp IV @MP0905B TMS0970 1977, Parker Brothers Codename Sector *MP0057 TMS1000 1978, APH Student Speech+ (same ROM contents as TSI Speech+?) + *MP0158 TMS1000 1979, Entex Soccer *MP0168 TMS1000? 1979, Conic Basketball + *MP0170 TMS1000? 1979, E.R.S. Football @MP0914 TMS1000 1979, Entex Baseball 1 @MP0923 TMS1000 1979, Entex Baseball 2 @MP1030 TMS1100 1980, APF Mathemagician @MP1133 TMS1470 1979, Kosmos Astro @MP1180 TMS1100 1980, Tomy Power House Pinball + @MP1181 TMS1100 1979, Conic Football 2 @MP1204 TMS1100 1980, Entex Baseball 3 (6007) @MP1211 TMS1100 1980, Entex Space Invader @MP1218 TMS1100 1980, Entex Basketball 2 (6010) + *MP1219 TMS1100 1980, U.S. Games Super Sports 4 @MP1221 TMS1100 1980, Entex Raise The Devil *MP1296 TMS1100? 1982, Entex Black Knight *MP1312 TMS1100 198?, Tandy/RadioShack Science Fair Microcomputer Trainer @@ -43,7 +47,8 @@ MP3403 TMS1100 1978, Marx Electronic Bowling -> elecbowl.cpp @MP3404 TMS1100 1978, Parker Brothers Merlin @MP3405 TMS1100 1979, Coleco Amaze-A-Tron - *MP3415 TMS1100 1978, Coleco Electronic Quarterback + @MP3415 TMS1100 1978, Coleco Electronic Quarterback + @MP3435 TMS1100 1979, Coleco Zodiac @MP3438A TMS1100 1979, Kenner Star Wars Electronic Battle Command MP3450A TMS1100 1979, MicroVision cartridge: Blockbuster MP3454 TMS1100 1979, MicroVision cartridge: Star Trek Phaser Strike @@ -59,7 +64,9 @@ MP3496 TMS1100 1980, MicroVision cartridge: Sea Duel M34009 TMS1100 1981, MicroVision cartridge: Alien Raiders (note: MP3498, MP3499, M3400x..) @M34012 TMS1100 1980, Mattel Dungeons & Dragons - Computer Labyrinth Game + *M34014 TMS1100 1981, Coleco Bowlatronic M34017 TMS1100 1981, MicroVision cartridge: Cosmic Hunter + @M34038 TMS1100 1982, Parker Brothers Lost Treasure M34047 TMS1100 1982, MicroVision cartridge: Super Blockbuster *M34078A TMS1100 1983, Milton Bradley Arcade Mania @MP6100A TMS0980 1979, Ideal Electronic Detective @@ -68,7 +75,7 @@ *MP7303 TMS1400? 19??, Tiger 7-in-1 Sports Stadium @MP7313 TMS1400 1980, Parker Brothers Bank Shot @MP7314 TMS1400 1980, Parker Brothers Split Second - *MP7324 TMS1400? 1985, Coleco Talking Teacher + MP7324 TMS1400 1985, Tiger K28/Coleco Talking Teacher -> tispeak.cpp MP7332 TMS1400 1981, Milton Bradley Dark Tower -> mbdtower.cpp @MP7334 TMS1400 1981, Coleco Total Control 4 @MP7351 TMS1400CR 1982, Parker Brothers Master Merlin @@ -107,8 +114,10 @@ #include "astro.lh" #include "bankshot.lh" #include "bigtrak.lh" +#include "cnfball2.lh" #include "cnsector.lh" #include "comp4.lh" +#include "cqback.lh" #include "ebball.lh" #include "ebball2.lh" #include "ebball3.lh" @@ -120,6 +129,7 @@ #include "gpoker.lh" #include "h2hbaseb.lh" #include "h2hfootb.lh" +#include "lostreas.lh" #include "mathmagi.lh" #include "merlin.lh" // clickable #include "mmerlin.lh" // clickable @@ -131,6 +141,7 @@ #include "tandy12.lh" // clickable #include "tbreakup.lh" #include "tc4.lh" +#include "zodiac.lh" #include "hh_tms1k_test.lh" // common test-layout - use external artwork @@ -265,7 +276,18 @@ void hh_tms1k_state::set_display_size(int maxx, int maxy) m_display_maxy = maxy; } -void hh_tms1k_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +void hh_tms1k_state::set_display_segmask(UINT32 digits, UINT32 mask) +{ + // set a segment mask per selected digit, but leave unselected ones alone + for (int i = 0; i < 0x20; i++) + { + if (digits & 1) + m_display_segmask[i] = mask; + digits >>= 1; + } +} + +void hh_tms1k_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) { set_display_size(maxx, maxy); @@ -274,18 +296,12 @@ void hh_tms1k_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; - display_update(); + if (update) + display_update(); } -void hh_tms1k_state::display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask) -{ - // expects m_display_segmask to be not-0 - for (int y = 0; y < maxy; y++) - m_display_segmask[y] &= segmask; - - display_matrix(maxx, maxy, setx, sety); -} +// generic input handlers UINT8 hh_tms1k_state::read_inputs(int columns) { @@ -299,6 +315,19 @@ UINT8 hh_tms1k_state::read_inputs(int columns) return ret; } +UINT8 hh_tms1k_state::read_rotated_inputs(int columns, UINT8 rowmask) +{ + UINT8 ret = 0; + UINT16 colmask = (1 << columns) - 1; + + // read selected input columns + for (int i = 0; i < 8; i++) + if (1 << i & rowmask && m_inp_matrix[i]->read() & m_inp_mux & colmask) + ret |= 1 << i; + + return ret; +} + // devices with a TMS0980 can auto power-off @@ -328,7 +357,7 @@ INPUT_CHANGED_MEMBER(hh_tms1k_state::power_button) /*************************************************************************** APF Mathemagician - * TMS1100 MCU, labeled MP1030 + * TMS1100 MCU, labeled MP1030 (no decap) * 2 x DS8870N - Hex LED Digit Driver * 2 x DS8861N - MOS-to-LED 5-Segment Driver * 10-digit 7seg LED display(2 custom ones) + 4 LEDs, no sound @@ -365,21 +394,8 @@ public: void mathmagi_state::prepare_display() { - // R0-R7: 7seg leds - for (int y = 0; y < 8; y++) - { - m_display_segmask[y] = 0x7f; - m_display_state[y] = (m_r >> y & 1) ? (m_o >> 1) : 0; - } - - // R8: custom math symbols digit - // R9: custom equals digit - // R10: misc lamps - for (int y = 8; y < 11; y++) - m_display_state[y] = (m_r >> y & 1) ? m_o : 0; - - set_display_size(8, 11); - display_update(); + set_display_segmask(0xff, 0x7f); + display_matrix(7, 11, m_o, m_r); } WRITE16_MEMBER(mathmagi_state::write_r) @@ -387,17 +403,20 @@ WRITE16_MEMBER(mathmagi_state::write_r) // R3,R5-R7,R9,R10: input mux m_inp_mux = (data >> 3 & 1) | (data >> 4 & 0xe) | (data >> 5 & 0x30); - // +others: + // R0-R7: 7seg leds + // R8: custom math symbols digit + // R9: custom equals digit + // R10: misc lamps m_r = data; prepare_display(); } WRITE16_MEMBER(mathmagi_state::write_o) { - // O1-O7: digit segments A-G + // O1-O7: led/digit segment data // O0: N/C - data = (data << 1 & 0xfe) | (data >> 7 & 1); // because opla is unknown m_o = data; + prepare_display(); } READ8_MEMBER(mathmagi_state::read_k) @@ -457,7 +476,7 @@ static INPUT_PORTS_START( mathmagi ) INPUT_PORTS_END -// output PLA is not dumped +// output PLA is not decapped static const UINT16 mathmagi_output_pla[0x20] = { lA+lB+lC+lD+lE+lF, // 0 @@ -497,7 +516,7 @@ static const UINT16 mathmagi_output_pla[0x20] = static MACHINE_CONFIG_START( mathmagi, mathmagi_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 175000) // RC osc. R=68K, C=82pf -> ~175kHz + MCFG_CPU_ADD("maincpu", TMS1100, 175000) // approximation - RC osc. R=68K, C=82pf MCFG_TMS1XXX_OUTPUT_PLA(mathmagi_output_pla) MCFG_TMS1XXX_READ_K_CB(READ8(mathmagi_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mathmagi_state, write_r)) @@ -517,7 +536,7 @@ MACHINE_CONFIG_END Coleco Amaze-A-Tron, by Ralph Baer * TMS1100 MCU, labeled MP3405(die label too) - * 2-digit 7seg LED display + 2 LEDs(one red, one green), 1bit sound + * 2-digit 7seg LED display + 2 LEDs(one red, one green), 1-bit sound * 5x5 pressure-sensitive playing board This is an electronic board game with a selection of 8 maze games, @@ -636,7 +655,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( amaztron, amaztron_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 350000) // RC osc. R=33K?, C=100pf -> ~350kHz + MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K?, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(amaztron_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(amaztron_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(amaztron_state, write_o)) @@ -656,21 +675,19 @@ MACHINE_CONFIG_END /*************************************************************************** - Coleco Head to Head Baseball - * PCB labels Coleco rev C 73891/2 - * TMS1170NLN MP1525-N2 (die labeled MP1525) - * 9-digit cyan VFD display, and other LEDs behind bezel, 1bit sound - - known releases: - - USA: Head to Head Baseball - - Japan: Computer Baseball, published by Tsukuda + Coleco Zodiac - The Astrology Computer + * TMS1100 MP3435 (no decap) + * 8-digit 7seg display, 12 other LEDs, 1-bit sound + + As the name suggests, this is an astrologic calculator. Refer to the + (very extensive) manual on how to use it. ***************************************************************************/ -class h2hbaseb_state : public hh_tms1k_state +class zodiac_state : public hh_tms1k_state { public: - h2hbaseb_state(const machine_config &mconfig, device_type type, const char *tag) + zodiac_state(const machine_config &mconfig, device_type type, const char *tag) : hh_tms1k_state(mconfig, type, tag) { } @@ -678,111 +695,245 @@ public: DECLARE_WRITE16_MEMBER(write_r); DECLARE_WRITE16_MEMBER(write_o); DECLARE_READ8_MEMBER(read_k); - - void set_clock(); - DECLARE_INPUT_CHANGED_MEMBER(skill_switch); - -protected: - virtual void machine_reset() override; }; // handlers -void h2hbaseb_state::prepare_display() +void zodiac_state::prepare_display() { - memset(m_display_segmask, ~0, sizeof(m_display_segmask)); - display_matrix_seg(9, 9, (m_r & 0x100) | m_o, (m_r & 0xff) | (m_r >> 1 & 0x100), 0x7f); + set_display_segmask(0xff, 0x7f); + display_matrix(8, 10, m_o, m_r); } -WRITE16_MEMBER(h2hbaseb_state::write_r) +WRITE16_MEMBER(zodiac_state::write_r) { // R10: speaker out m_speaker->level_w(data >> 10 & 1); - // R4-R7: input mux - m_inp_mux = data >> 4 & 0xf; + // R0-R4,R8: input mux + m_inp_mux = (data & 0x1f) | (data >> 3 & 0x20); - // R0-R7,R9: select vfd digit/led - // R8: led state - m_r = data; + // R0-R7: digit select + // R8,R9: led select + m_r = data & 0x3ff; prepare_display(); } -WRITE16_MEMBER(h2hbaseb_state::write_o) +WRITE16_MEMBER(zodiac_state::write_o) { - // O0-O6: digit segments A-G - // O7: N/C + // O0-O7: digit segment/led data m_o = data; prepare_display(); } -READ8_MEMBER(h2hbaseb_state::read_k) +READ8_MEMBER(zodiac_state::read_k) { - // K: multiplexed inputs (note: K8(Vss row) is always on) - return m_inp_matrix[4]->read() | read_inputs(4); + // K: multiplexed inputs + return read_inputs(6); } // config -static INPUT_PORTS_START( h2hbaseb ) - PORT_START("IN.0") // R4 - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("N") - PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) +static INPUT_PORTS_START( zodiac ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0") - PORT_START("IN.1") // R5 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("B") - PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_START("IN.1") // R1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") - PORT_START("IN.2") // R6 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("S") - PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_START("IN.2") // R2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("D") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("A") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") - PORT_START("IN.3") // R7 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Curve") // these two buttons appear twice on the board - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Fast Pitch") - PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_START("IN.3") // R3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_P) PORT_NAME("P") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) PORT_NAME("L") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("J") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("E") - PORT_START("IN.4") // Vss! - PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Swing") + PORT_START("IN.4") // R4 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear") - PORT_START("IN.5") // fake - PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, h2hbaseb_state, skill_switch, NULL) - PORT_CONFSETTING( 0x00, "1" ) - PORT_CONFSETTING( 0x01, "2" ) + PORT_START("IN.5") // R8 + PORT_CONFNAME( 0x03, 0x01, "Mode") + PORT_CONFSETTING( 0x01, "H" ) // Horoscope + PORT_CONFSETTING( 0x02, "P" ) // Preview + PORT_CONFSETTING( 0x00, "A" ) // Answer + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END -INPUT_CHANGED_MEMBER(h2hbaseb_state::skill_switch) + +// output PLA is not decapped +static const UINT16 zodiac_output_pla[0x20] = { - set_clock(); + 0x80, // empty/led 1/7 + lC, // i/led 2/8 + lE+lG, // r/led 3/9 + lC+lE+lG, // n + lF, // seg F/led 4/10 + 0, // ? + 0, // ? + lC+lE+lF+lG, // h + lB, // seg B/led 5/11 + lD, // seg D/led 6/12 + 0, // ? + 0, // ? + 0, // ? + 0, // ? + lA+lB+lE+lF+lG, // P + 0, // ? + lA+lB+lC+lD+lE+lF, // 0 + lB+lC, // 1 + lA+lB+lD+lE+lG, // 2 + lA+lB+lC+lD+lG, // 3 + lB+lC+lF+lG, // 4 + lA+lC+lD+lF+lG, // 5 + lA+lC+lD+lE+lF+lG, // 6 + lA+lB+lC, // 7 + lA+lB+lC+lD+lE+lF+lG, // 8 + lA+lB+lC+lD+lF+lG, // 9 + lA+lB+lC+lE+lF+lG, // A + lB+lC+lD+lE+lG, // d + lA+lD+lE+lF+lG, // E + lB+lC+lD+lE, // J + lD+lE+lF, // L + lB+lC+lD+lE+lF // U +}; + +static MACHINE_CONFIG_START( zodiac, zodiac_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1100, 500000) // approximation - RC osc. R=18K, C=100pf + MCFG_TMS1XXX_OUTPUT_PLA(zodiac_output_pla) + MCFG_TMS1XXX_READ_K_CB(READ8(zodiac_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(zodiac_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(zodiac_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_zodiac) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Coleco Electronic Quarterback + * TMS1100NLL MP3415 (die labeled MP3415) + * 9-digit LED grid, 1-bit sound + + known releases: + - USA(1): Electronic Quarterback + - USA(2): Electronic Touchdown, distributed by Sears + +***************************************************************************/ + +class cqback_state : public hh_tms1k_state +{ +public: + cqback_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); +}; + +// handlers + +void cqback_state::prepare_display() +{ + // R9 selects between segments B/C or A'/D' + UINT16 seg = m_o; + if (m_r & 0x200) + seg = (m_o << 7 & 0x300) | (m_o & 0xf9); + + set_display_segmask(0x1ff, 0xff); + display_matrix(11, 9, seg, m_r & 0x1ff); } +WRITE16_MEMBER(cqback_state::write_r) +{ + // R10: speaker out + m_speaker->level_w(data >> 10 & 1); -void h2hbaseb_state::set_clock() + // R0-R4: input mux + m_inp_mux = data & 0x1f; + + // R0-R9: select digit/segment + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(cqback_state::write_o) { - // MCU clock is from an RC circuit with C=47pf, and R value is depending on - // skill switch: R=51K(1) or 43K(2) - m_maincpu->set_unscaled_clock((m_inp_matrix[5]->read() & 1) ? 400000 : 350000); + // O0-O7: digit segments + m_o = data; + prepare_display(); } -void h2hbaseb_state::machine_reset() +READ8_MEMBER(cqback_state::read_k) { - hh_tms1k_state::machine_reset(); - set_clock(); + // K: multiplexed inputs, rotated matrix + return read_rotated_inputs(5); } -static MACHINE_CONFIG_START( h2hbaseb, h2hbaseb_state ) + +// config + +static INPUT_PORTS_START( cqback ) + PORT_START("IN.0") // K1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Left/Right") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Kick/Pass") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Display") + + PORT_START("IN.1") // K2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_TOGGLE PORT_NAME("Play Selector") // pass + PORT_BIT( 0x02, 0x02, IPT_SPECIAL ) PORT_CONDITION("IN.1", 0x01, EQUALS, 0x00) // run/kick + + PORT_START("IN.2") // K4 + PORT_CONFNAME( 0x03, 0x02, "Skill Level" ) + PORT_CONFSETTING( 0x02, "1" ) + PORT_CONFSETTING( 0x01, "2" ) + + PORT_START("IN.3") // K8 + PORT_CONFNAME( 0x01, 0x00, "Factory Test" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x01, DEF_STR( On ) ) // TP1-TP2 +INPUT_PORTS_END + +static MACHINE_CONFIG_START( cqback, cqback_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1170, 350000) // see set_clock - MCFG_TMS1XXX_READ_K_CB(READ8(h2hbaseb_state, read_k)) - MCFG_TMS1XXX_WRITE_R_CB(WRITE16(h2hbaseb_state, write_r)) - MCFG_TMS1XXX_WRITE_O_CB(WRITE16(h2hbaseb_state, write_o)) + MCFG_CPU_ADD("maincpu", TMS1100, 310000) // approximation - RC osc. R=33K, C=100pf + MCFG_TMS1XXX_READ_K_CB(READ8(cqback_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(cqback_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(cqback_state, write_o)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) - MCFG_DEFAULT_LAYOUT(layout_h2hbaseb) + MCFG_DEFAULT_LAYOUT(layout_cqback) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -798,10 +949,14 @@ MACHINE_CONFIG_END Coleco Head to Head Football * TMS1100NLLE (rev. E!) MP3460 (die labeled MP3460) - * 2*SN75492N LED display drivers, 9-digit LED grid, 1bit sound + * 2*SN75492N LED display drivers, 9-digit LED grid, 1-bit sound + + known releases: + - USA(1): Head to Head Football + - USA(2): Team Play Football, distributed by Sears LED electronic football game. To distinguish between offense and defense, - offense blips (should) appear brighter. + offense blips (should) appear brighter. The hardware is similar to cqback. ***************************************************************************/ @@ -822,8 +977,8 @@ public: void h2hfootb_state::prepare_display() { - memset(m_display_segmask, ~0, sizeof(m_display_segmask)); - display_matrix_seg(9, 9, m_o | (m_r >> 1 & 0x100), (m_r & 0x1ff), 0x7f); + set_display_segmask(0x1ff, 0x7f); + display_matrix(9, 9, m_o | (m_r >> 1 & 0x100), m_r & 0x1ff); } WRITE16_MEMBER(h2hfootb_state::write_r) @@ -849,15 +1004,8 @@ WRITE16_MEMBER(h2hfootb_state::write_o) READ8_MEMBER(h2hfootb_state::read_k) { - // K: multiplexed inputs - UINT8 k = 0; - - // compared to the usual setup, the button matrix is rotated - for (int i = 0; i < 4; i++) - if (m_inp_matrix[i]->read() & m_inp_mux) - k |= 1 << i; - - return k; + // K: multiplexed inputs, rotated matrix + return read_rotated_inputs(9); } @@ -893,7 +1041,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( h2hfootb, h2hfootb_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 325000) // approximation - RC osc. R=39K, C=100pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1100, 310000) // approximation - RC osc. R=39K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(h2hfootb_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(h2hfootb_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(h2hfootb_state, write_o)) @@ -913,9 +1061,149 @@ MACHINE_CONFIG_END /*************************************************************************** + Coleco Head to Head Baseball + * PCB labels Coleco rev C 73891/2 + * TMS1170NLN MP1525-N2 (die labeled MP1525) + * 9-digit cyan VFD display, and other LEDs behind bezel, 1-bit sound + + known releases: + - USA: Head to Head Baseball + - Japan: Computer Baseball, published by Tsukuda + +***************************************************************************/ + +class h2hbaseb_state : public hh_tms1k_state +{ +public: + h2hbaseb_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); + + void set_clock(); + DECLARE_INPUT_CHANGED_MEMBER(skill_switch); + +protected: + virtual void machine_reset() override; +}; + +// handlers + +void h2hbaseb_state::prepare_display() +{ + set_display_segmask(0x1ff, 0x7f); + display_matrix(9, 9, (m_r & 0x100) | m_o, (m_r & 0xff) | (m_r >> 1 & 0x100)); +} + +WRITE16_MEMBER(h2hbaseb_state::write_r) +{ + // R10: speaker out + m_speaker->level_w(data >> 10 & 1); + + // R4-R7: input mux + m_inp_mux = data >> 4 & 0xf; + + // R0-R7,R9: select vfd digit/led + // R8: led state + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(h2hbaseb_state::write_o) +{ + // O0-O6: digit segments A-G + // O7: N/C + m_o = data; + prepare_display(); +} + +READ8_MEMBER(h2hbaseb_state::read_k) +{ + // K: multiplexed inputs (note: K8(Vss row) is always on) + return m_inp_matrix[4]->read() | read_inputs(4); +} + + +// config + +static INPUT_PORTS_START( h2hbaseb ) + PORT_START("IN.0") // R4 + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("N") + PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // R5 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("B") + PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.2") // R6 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("S") + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.3") // R7 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Curve") // these two buttons appear twice on the board + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Fast Pitch") // " + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.4") // Vss! + PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Swing") + + PORT_START("IN.5") // fake + PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, h2hbaseb_state, skill_switch, NULL) + PORT_CONFSETTING( 0x00, "1" ) + PORT_CONFSETTING( 0x01, "2" ) +INPUT_PORTS_END + +INPUT_CHANGED_MEMBER(h2hbaseb_state::skill_switch) +{ + set_clock(); +} + + +void h2hbaseb_state::set_clock() +{ + // MCU clock is from an RC circuit with C=47pf, and R value is depending on + // skill switch: R=51K(1) or 43K(2) + m_maincpu->set_unscaled_clock((m_inp_matrix[5]->read() & 1) ? 400000 : 350000); +} + +void h2hbaseb_state::machine_reset() +{ + hh_tms1k_state::machine_reset(); + set_clock(); +} + +static MACHINE_CONFIG_START( h2hbaseb, h2hbaseb_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1170, 350000) // see set_clock + MCFG_TMS1XXX_READ_K_CB(READ8(h2hbaseb_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(h2hbaseb_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(h2hbaseb_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_h2hbaseb) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Coleco Total Control 4 * TMS1400NLL MP7334-N2 (die labeled MP7334) - * 2x2-digit 7seg LED display + 4 LEDs, LED grid display, 1bit sound + * 2x2-digit 7seg LED display + 4 LEDs, LED grid display, 1-bit sound This is a head to head electronic tabletop LED-display sports console. One cartridge(Football) was included with the console, the other three were @@ -1049,7 +1337,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( tc4, tc4_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1400, 450000) // approximation - RC osc. R=27.3K, C=100pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1400, 450000) // approximation - RC osc. R=27.3K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(tc4_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tc4_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tc4_state, write_o)) @@ -1069,9 +1357,133 @@ MACHINE_CONFIG_END /*************************************************************************** + Conic Electronic Football II + * TMS1100 MP1181 (no decap) + * 9-digit LED grid, 1-bit sound + + This is a clone of Coleco's Quarterback, similar at hardware-level too. + It was also sold by Tandy under the same title. + +***************************************************************************/ + +class cnfball2_state : public hh_tms1k_state +{ +public: + cnfball2_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); +}; + +// handlers + +void cnfball2_state::prepare_display() +{ + // R1 selects between segments B/C or A'/D' + UINT16 seg = m_o; + if (~m_r & 2) + seg = (m_o << 7 & 0x300) | (m_o & 0xf9); + + set_display_segmask(0x1ff, 0xff); + display_matrix(11, 9, seg, m_r >> 1 & 0x1ff); +} + +WRITE16_MEMBER(cnfball2_state::write_r) +{ + // R0: speaker out + m_speaker->level_w(data & 1); + + // R8-R10: input mux + m_inp_mux = data >> 8 & 7; + + // R1-R10: select digit/segment + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(cnfball2_state::write_o) +{ + // O0-O7: digit segments + m_o = data; + prepare_display(); +} + +READ8_MEMBER(cnfball2_state::read_k) +{ + // K: multiplexed inputs + return read_inputs(3); +} + + +// config + +static INPUT_PORTS_START( cnfball2 ) + PORT_START("IN.0") // R8 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_CONFNAME( 0x02, 0x00, "Factory Test" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x02, DEF_STR( On ) ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_TOGGLE PORT_NAME("Play Selector") // pass/run + PORT_CONFNAME( 0x08, 0x00, "Skill Level" ) + PORT_CONFSETTING( 0x00, "1" ) // college + PORT_CONFSETTING( 0x08, "2" ) // professional + + PORT_START("IN.1") // R9 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + + PORT_START("IN.2") // R10 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Kick/Pass") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_NAME("Score") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_NAME("Status") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + + +// output PLA is not decapped +static const UINT16 cnfball2_output_pla[0x20] = +{ + // first half was dumped electronically + 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x40, 0x01, 0x08, 0x02, 0x04, 0x00, + + // rest is unknown + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + +static MACHINE_CONFIG_START( cnfball2, cnfball2_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=47K, C=47pf + MCFG_TMS1XXX_OUTPUT_PLA(cnfball2_output_pla) + MCFG_TMS1XXX_READ_K_CB(READ8(cnfball2_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(cnfball2_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(cnfball2_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_cnfball2) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Entex (Electronic) Baseball (1) * TMS1000NLP MP0914 (die labeled MP0914A) - * 1 7seg LED, and other LEDs behind bezel, 1bit sound + * 1 7seg LED, and other LEDs behind bezel, 1-bit sound This is a handheld LED baseball game. One player controls the batter, the CPU or other player controls the pitcher. Pitcher throw buttons are on a 'joypad' @@ -1184,7 +1596,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( ebball, ebball_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1000, 375000) // RC osc. R=43K, C=47pf -> ~375kHz + MCFG_CPU_ADD("maincpu", TMS1000, 375000) // approximation - RC osc. R=43K, C=47pf MCFG_TMS1XXX_READ_K_CB(READ8(ebball_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ebball_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ebball_state, write_o)) @@ -1207,7 +1619,7 @@ MACHINE_CONFIG_END Entex (Electronic) Baseball 2 * PCBs are labeled: ZENY * TMS1000 MCU, MP0923 (die labeled MP0923) - * 3 7seg LEDs, and other LEDs behind bezel, 1bit sound + * 3 7seg LEDs, and other LEDs behind bezel, 1-bit sound The Japanese version was published by Gakken, black casing instead of white. @@ -1309,7 +1721,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( ebball2, ebball2_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1000, 350000) // RC osc. R=47K, C=47pf -> ~350kHz + MCFG_CPU_ADD("maincpu", TMS1000, 350000) // approximation - RC osc. R=47K, C=47pf MCFG_TMS1XXX_READ_K_CB(READ8(ebball2_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ebball2_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ebball2_state, write_o)) @@ -1333,7 +1745,7 @@ MACHINE_CONFIG_END * PCBs are labeled: ZENY * TMS1100NLL 6007 MP1204 (rev. E!) (die labeled MP1204) * 2*SN75492N LED display driver - * 4 7seg LEDs, and other LEDs behind bezel, 1bit sound + * 4 7seg LEDs, and other LEDs behind bezel, 1-bit sound This is another improvement over Entex Baseball, where gameplay is a bit more varied. Like the others, the pitcher controls are on a separate joypad. @@ -1512,7 +1924,7 @@ MACHINE_CONFIG_END Entex Space Invader * TMS1100 MP1211 (die labeled MP1211) - * 3 7seg LEDs, LED matrix and overlay mask, 1bit sound + * 3 7seg LEDs, LED matrix and overlay mask, 1-bit sound There are two versions of this game: the first release(this one) is on TMS1100, the second more widespread release runs on a COP400. There are @@ -1626,7 +2038,7 @@ MACHINE_CONFIG_END Entex Color Football 4 * TMS1670 6009 MP7551 (die also labeled MP7551) - * 9-digit cyan VFD display, 60 red and green LEDs behind bezel, 1bit sound + * 9-digit cyan VFD display, 60 red and green LEDs behind bezel, 1-bit sound ***************************************************************************/ @@ -1721,7 +2133,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( efootb4, efootb4_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1670, 475000) // approximation - RC osc. R=42K, C=47pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1670, 475000) // approximation - RC osc. R=42K, C=47pf MCFG_TMS1XXX_READ_K_CB(READ8(efootb4_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(efootb4_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(efootb4_state, write_o)) @@ -1743,7 +2155,7 @@ MACHINE_CONFIG_END Entex (Electronic) Basketball 2 * TMS1100 6010 MP1218 (die also labeled MP1218) - * 4 7seg LEDs, and other LEDs behind bezel, 1bit sound + * 4 7seg LEDs, and other LEDs behind bezel, 1-bit sound lamp translation table: led zz from game PCB = MAME lampyx: @@ -1844,7 +2256,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( ebaskb2, ebaskb2_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 360000) // RC osc. R=33K, C=82pf -> ~360kHz + MCFG_CPU_ADD("maincpu", TMS1100, 360000) // approximation - RC osc. R=33K, C=82pf MCFG_TMS1XXX_READ_K_CB(READ8(ebaskb2_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ebaskb2_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ebaskb2_state, write_o)) @@ -1866,7 +2278,7 @@ MACHINE_CONFIG_END Entex Raise The Devil * TMS1100 MP1221 (die labeled MP1221) - * 4 7seg LEDs(rightmost one unused), and other LEDs behind bezel, 1bit sound + * 4 7seg LEDs(rightmost one unused), and other LEDs behind bezel, 1-bit sound lamp translation table: led zz from game PCB = MAME lampyx: @@ -2040,8 +2452,8 @@ protected: void gpoker_state::prepare_display() { - memset(m_display_segmask, ~0, sizeof(m_display_segmask)); - display_matrix_seg(12, 11, m_o | (m_r >> 3 & 0xf00), m_r & 0x7ff, 0x7f); + set_display_segmask(0x7ff, 0x7f); + display_matrix(12, 11, m_o | (m_r >> 3 & 0xf00), m_r & 0x7ff); } WRITE16_MEMBER(gpoker_state::write_r) @@ -2131,7 +2543,7 @@ void gpoker_state::machine_reset() static MACHINE_CONFIG_START( gpoker, gpoker_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1370, 350000) // RC osc. R=47K, C=47pf -> ~350kHz + MCFG_CPU_ADD("maincpu", TMS1370, 350000) // approximation - RC osc. R=47K, C=47pf MCFG_TMS1XXX_READ_K_CB(READ8(gpoker_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(gpoker_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(gpoker_state, write_o)) @@ -2244,7 +2656,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( gjackpot, gjackpot_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1670, 450000) // approximation - RC osc. R=47K, C=47pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1670, 450000) // approximation - RC osc. R=47K, C=47pf MCFG_TMS1XXX_READ_K_CB(READ8(gpoker_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(gjackpot_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(gpoker_state, write_o)) @@ -2266,9 +2678,9 @@ MACHINE_CONFIG_END Ideal Electronic Detective * TMS0980NLL MP6100A (die labeled 0980B-00) - * 10-digit 7seg LED display, 1bit sound + * 10-digit 7seg LED display, 2-level sound - hardware (and concept) is very similar to Parker Bros Stop Thief + hardware (and concept) is very similar to Parker Brothers Stop Thief This is an electronic board game. It requires game cards with suspect info, and good old pen and paper to record game progress. To start the game, enter @@ -2293,12 +2705,12 @@ public: WRITE16_MEMBER(elecdet_state::write_r) { - // R7,R8: speaker on - m_speaker->level_w((data & 0x180 && m_o & 0x80) ? 1 : 0); + // R7,R8: speaker out + m_speaker->level_w((m_o & 0x80) ? (data >> 7 & 3) : 0); // R0-R6: select digit - memset(m_display_segmask, ~0, sizeof(m_display_segmask)); - display_matrix_seg(7, 7, BITSWAP8(m_o,7,5,2,1,4,0,6,3), data, 0x7f); + set_display_segmask(0x7f, 0x7f); + display_matrix(7, 7, BITSWAP8(m_o,7,5,2,1,4,0,6,3), data); } WRITE16_MEMBER(elecdet_state::write_o) @@ -2307,7 +2719,7 @@ WRITE16_MEMBER(elecdet_state::write_o) m_inp_mux = (data & 3) | (data >> 2 & 4) | (data >> 3 & 8); // O0-O6: digit segments A-G - // O7: speaker out -> write_r + // O7: speaker on -> write_r m_o = data; } @@ -2367,6 +2779,9 @@ static INPUT_PORTS_START( elecdet ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) INPUT_PORTS_END + +static const INT16 elecdet_speaker_levels[4] = { 0, 0x3fff, 0x3fff, 0x7fff }; + static MACHINE_CONFIG_START( elecdet, elecdet_state ) /* basic machine hardware */ @@ -2382,6 +2797,7 @@ static MACHINE_CONFIG_START( elecdet, elecdet_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SPEAKER_LEVELS(4, elecdet_speaker_levels) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END @@ -2393,7 +2809,7 @@ MACHINE_CONFIG_END Kenner Star Wars - Electronic Battle Command * TMS1100 MCU, labeled MP3438A - * 4x4 LED grid display + 2 separate LEDs and 2-digit 7segs, 1bit sound + * 4x4 LED grid display + 2 separate LEDs and 2-digit 7segs, 1-bit sound This is a small tabletop space-dogfighting game. To start the game, press BASIC/INTER/ADV and enter P#(number of players), then @@ -2497,7 +2913,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( starwbc, starwbc_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 325000) // RC osc. R=51K, C=47pf -> ~325kHz + MCFG_CPU_ADD("maincpu", TMS1100, 325000) // approximation - RC osc. R=51K, C=47pf MCFG_TMS1XXX_READ_K_CB(READ8(starwbc_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(starwbc_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(starwbc_state, write_o)) @@ -2543,8 +2959,8 @@ public: void astro_state::prepare_display() { - memset(m_display_segmask, ~0, sizeof(m_display_segmask)); - display_matrix_seg(8, 10, m_o, m_r, 0xff); + set_display_segmask(0x3ff, 0xff); + display_matrix(8, 10, m_o, m_r); } WRITE16_MEMBER(astro_state::write_r) @@ -2624,7 +3040,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( astro, astro_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1470, 450000) // approximation - RC osc. R=4.7K, C=33pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1470, 450000) // approximation - RC osc. R=4.7K, C=33pf MCFG_TMS1XXX_READ_K_CB(READ8(astro_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(astro_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(astro_state, write_o)) @@ -2643,7 +3059,7 @@ MACHINE_CONFIG_END Mattel Dungeons & Dragons - Computer Labyrinth Game * TMS1100 M34012-N2LL (die labeled M34012) - * 72 buttons, no LEDs, 1bit sound + * 72 buttons, no LEDs, 1-bit sound This is an electronic board game. It requires markers and wall pieces to play. Refer to the official manual for more information. @@ -2812,7 +3228,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( mdndclab, mdndclab_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 500000) // approximation - RC osc. R=27K, C=100pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1100, 500000) // approximation - RC osc. R=27K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(mdndclab_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mdndclab_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mdndclab_state, write_o)) @@ -2937,7 +3353,7 @@ MACHINE_CONFIG_END Revision A hardware: * TMS1000 (die labeled MP3226) - * DS75494 Hex digit LED driver, 4 big lamps, 1bit sound + * DS75494 Hex digit LED driver, 4 big lamps, 1-bit sound Newer revisions (also Pocket Simon) have a smaller 16-pin MB4850 chip instead of the TMS1000. This one has been decapped too, but we couldn't @@ -3017,7 +3433,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( simon, simon_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1000, 350000) // RC osc. R=33K, C=100pf -> ~350kHz + MCFG_CPU_ADD("maincpu", TMS1000, 350000) // approximation - RC osc. R=33K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(simon_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(simon_state, write_r)) @@ -3038,7 +3454,7 @@ MACHINE_CONFIG_END Milton Bradley Super Simon * TMS1100 MP3476NLL (die labeled MP3476) - * 8 big lamps(2 turn on at same time), 1bit sound + * 8 big lamps(2 turn on at same time), 1-bit sound The semi-squel to Simon, not as popular. It includes more game variations and a 2-player head-to-head mode. @@ -3335,12 +3751,12 @@ void bigtrak_state::machine_start() save_item(NAME(m_gearbox_pos)); } -static const INT16 bigtrak_speaker_levels[] = { 0, 32767/3, 32767/3, 32767/3*2, 32767/3, 32767/3*2, 32767/3*2, 32767 }; +static const INT16 bigtrak_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff }; static MACHINE_CONFIG_START( bigtrak, bigtrak_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=83K, C=100pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=83K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(bigtrak_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(bigtrak_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(bigtrak_state, write_o)) @@ -3388,18 +3804,10 @@ public: WRITE16_MEMBER(cnsector_state::write_r) { - // R0-R5: select digit (right-to-left) - for (int y = 0; y < 6; y++) - { - m_display_segmask[y] = 0xff; - m_display_state[y] = (data >> y & 1) ? m_o : 0; - } - - // R6-R9: direction leds (-> lamp60-63) - m_display_state[6] = data >> 6 & 0xf; - - set_display_size(8, 7); - display_update(); + // R0-R5: select digit + // R6-R9: direction leds + set_display_segmask(0x3f, 0xff); + display_matrix(8, 10, m_o, data); } WRITE16_MEMBER(cnsector_state::write_o) @@ -3485,7 +3893,7 @@ MACHINE_CONFIG_END /*************************************************************************** - Parker Bros Merlin handheld game, by Bob Doyle + Parker Brothers Merlin handheld game, by Bob Doyle * TMS1100NLL MP3404A-N2 * 11 LEDs behind buttons, 3-level sound @@ -3578,12 +3986,12 @@ static INPUT_PORTS_START( merlin ) INPUT_PORTS_END -static const INT16 merlin_speaker_levels[] = { 0, 32767/3, 32767/3, 32767/3*2, 32767/3, 32767/3*2, 32767/3*2, 32767 }; +static const INT16 merlin_speaker_levels[8] = { 0, 0x7fff/3, 0x7fff/3, 0x7fff/3*2, 0x7fff/3, 0x7fff/3*2, 0x7fff/3*2, 0x7fff }; static MACHINE_CONFIG_START( merlin, merlin_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 350000) // RC osc. R=33K, C=100pf -> ~350kHz + MCFG_CPU_ADD("maincpu", TMS1100, 350000) // approximation - RC osc. R=33K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(merlin_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(merlin_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(merlin_state, write_o)) @@ -3647,7 +4055,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( mmerlin, mmerlin_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=30K, C=100pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=30K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(mmerlin_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mmerlin_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mmerlin_state, write_o)) @@ -3670,7 +4078,7 @@ MACHINE_CONFIG_END Parker Brothers Stop Thief, by Bob Doyle * TMS0980NLL MP6101B (die labeled 0980B-01A) - * 3-digit 7seg LED display, 1bit sound + * 3-digit 7seg LED display, 6-level sound Stop Thief is actually a board game, the electronic device emulated here (called Electronic Crime Scanner) is an accessory. To start a game, press @@ -3695,18 +4103,14 @@ public: WRITE16_MEMBER(stopthief_state::write_r) { // R0-R2: select digit - UINT8 o = BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f; - for (int y = 0; y < 3; y++) - { - m_display_segmask[y] = 0x7f; - m_display_state[y] = (data >> y & 1) ? o : 0; - } - - set_display_size(7, 3); - display_update(); + set_display_segmask(7, 0x7f); + display_matrix(7, 3, BITSWAP8(m_o,3,5,2,1,4,0,6,7) & 0x7f, data & 7); - // R3-R8: speaker on - m_speaker->level_w((data & 0x1f8 && m_o & 8) ? 1 : 0); + // R3-R8(tied together): speaker out + int level = 0; + for (int i = 0; m_o & 8 && i < 6; i++) + level += (data >> (i+3) & 1); + m_speaker->level_w(level); } WRITE16_MEMBER(stopthief_state::write_o) @@ -3714,7 +4118,7 @@ WRITE16_MEMBER(stopthief_state::write_o) // O0,O6: input mux m_inp_mux = (data & 1) | (data >> 5 & 2); - // O3: speaker out + // O3: speaker on // O0-O2,O4-O7: led segments A-G m_o = data; } @@ -3761,6 +4165,9 @@ static INPUT_PORTS_START( stopthief ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) INPUT_PORTS_END + +static const INT16 stopthief_speaker_levels[7] = { 0, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff }; + static MACHINE_CONFIG_START( stopthief, stopthief_state ) /* basic machine hardware */ @@ -3776,6 +4183,7 @@ static MACHINE_CONFIG_START( stopthief, stopthief_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SPEAKER_LEVELS(7, stopthief_speaker_levels) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END @@ -3787,7 +4195,7 @@ MACHINE_CONFIG_END Parker Brothers Bank Shot (known as Cue Ball in the UK), by Garry Kitchen * TMS1400NLL MP7313-N2 (die labeled MP7313) - * LED grid display, 1bit sound + * LED grid display, 1-bit sound Bank Shot is an electronic pool game. To select a game, repeatedly press the [SELECT] button, then press [CUE UP] to start. Refer to the official @@ -3872,7 +4280,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( bankshot, bankshot_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(bankshot_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(bankshot_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(bankshot_state, write_o)) @@ -3894,7 +4302,7 @@ MACHINE_CONFIG_END Parker Brothers Split Second * TMS1400NLL MP7314-N2 (die labeled MP7314) - * LED grid display(default round LEDs, and rectangular shape ones), 1bit sound + * LED grid display(default round LEDs, and rectangular shape ones), 1-bit sound This is an electronic handheld reflex gaming device, it's straightforward to use. The included mini-games are: @@ -3983,7 +4391,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( splitsec, splitsec_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1400, 475000) // approximation - RC osc. R=24K, C=100pf MCFG_TMS1XXX_READ_K_CB(READ8(splitsec_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(splitsec_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(splitsec_state, write_o)) @@ -4003,9 +4411,125 @@ MACHINE_CONFIG_END /*************************************************************************** + Parker Brothers Lost Treasure - The Electronic Deep-Sea Diving Game, + Featuring The Electronic Dive-Control Center + * TMS1100 M34038-NLL (die labeled 1100E, M34038) + * 11 LEDs, 4-bit sound + + This is a board game. The electronic accessory is the emulated part here. + +***************************************************************************/ + +class lostreas_state : public hh_tms1k_state +{ +public: + lostreas_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); +}; + +// handlers + +WRITE16_MEMBER(lostreas_state::write_r) +{ + // R0-R10: leds + display_matrix(11, 1, data, 1); +} + +WRITE16_MEMBER(lostreas_state::write_o) +{ + // O0-O3: input mux + m_inp_mux = data & 0xf; + + // O4: 330 ohm resistor - speaker out + // O5: 220 ohm resistor - speaker out + // O6: 180 ohm resistor - speaker out + // O7: 68 ohm resistor - speaker out + m_speaker->level_w(data >> 4 & 0xf); +} + +READ8_MEMBER(lostreas_state::read_k) +{ + // K: multiplexed inputs + return read_inputs(4); +} + + +// config + +/* physical button layout and labels is like this: + (note: Canadian version differs slightly to accomodoate dual-language) + + [N-S(gold)] [1] [2] [3] [AIR] + [E-W(gold)] [4] [5] [6] [UP] + [N-S(silv)] [7] [8] [9] [$ VALUE] + [E-W(silv)] [CLEAR] +*/ + +static INPUT_PORTS_START( lostreas ) + PORT_START("IN.0") // O0 + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") + + PORT_START("IN.1") // O1 + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") + + PORT_START("IN.2") // O2 + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_U) PORT_NAME("Air/Up") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("$ Value") + + PORT_START("IN.3") // O3 + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("E-W (silver)") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("N-S (silver)") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("E-W (gold)") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("N-S (gold)") +INPUT_PORTS_END + + +static const INT16 lostreas_speaker_levels[16] = +{ + 0, 0x7fff/15, 0x7fff/14, 0x7fff/13, 0x7fff/12, 0x7fff/11, 0x7fff/10, 0x7fff/9, + 0x7fff/8, 0x7fff/7, 0x7fff/6, 0x7fff/5, 0x7fff/4, 0x7fff/3, 0x7fff/2, 0x7fff/1 +}; + +static MACHINE_CONFIG_START( lostreas, lostreas_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1100, 425000) // approximation - RC osc. R=39K, C=47pf + MCFG_TMS1XXX_READ_K_CB(READ8(lostreas_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(lostreas_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(lostreas_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_lostreas) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SPEAKER_LEVELS(16, lostreas_speaker_levels) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Tandy Radio Shack Computerized Arcade (1981, 1982, 1995) * TMS1100 MCU, labeled CD7282SL - * 12 lamps behind buttons, 1bit sound + * 12 lamps behind buttons, 1-bit sound This handheld contains 12 minigames. It looks and plays like "Fabulous Fred" by the Japanese company Mego Corp. in 1980, which in turn is a mix of Merlin @@ -4126,6 +4650,7 @@ static INPUT_PORTS_START( tandy12 ) INPUT_PORTS_END +// output PLA is not decapped static const UINT16 tandy12_output_pla[0x20] = { // these are certain @@ -4141,7 +4666,7 @@ static const UINT16 tandy12_output_pla[0x20] = static MACHINE_CONFIG_START( tandy12, tandy12_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 400000) // RC osc. R=39K, C=47pf -> ~400kHz + MCFG_CPU_ADD("maincpu", TMS1100, 400000) // approximation - RC osc. R=39K, C=47pf MCFG_TMS1XXX_OUTPUT_PLA(tandy12_output_pla) MCFG_TMS1XXX_READ_K_CB(READ8(tandy12_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tandy12_state, write_r)) @@ -4166,7 +4691,7 @@ MACHINE_CONFIG_END * PCB label TOMY B.O. * TMS1040 MP2726 TOMY WIPE (die labeled MP2726A) * TMS1025N2LL I/O expander - * 2-digit 7seg display, 46 other leds, 1bit sound + * 2-digit 7seg display, 46 other leds, 1-bit sound known releases: - USA: Break Up @@ -4367,7 +4892,7 @@ MACHINE_CONFIG_END Tomy Power House Pinball * PCB label TOMY P-B * TMS1100 MP1180 TOMY PINB (die labeled MP1180) - * 3 7seg LEDs, and other LEDs behind bezel, 1bit sound + * 3 7seg LEDs, and other LEDs behind bezel, 1-bit sound known releases: - USA: Power House Pinball @@ -4410,10 +4935,7 @@ public: void phpball_state::prepare_display() { - // R0-R2 are 7segs - for (int y = 0; y < 3; y++) - m_display_segmask[y] = 0x7f; - + set_display_segmask(7, 0x7f); display_matrix(7, 9, m_o, m_r); } @@ -4425,6 +4947,7 @@ WRITE16_MEMBER(phpball_state::write_r) // R9: input mux m_inp_mux = data >> 9 & 1; + // R0-R2: digit select // R0-R8: led select m_r = data; prepare_display(); @@ -4432,7 +4955,7 @@ WRITE16_MEMBER(phpball_state::write_r) WRITE16_MEMBER(phpball_state::write_o) { - // O0-O6: led state + // O0-O6: digit segment/led data // O7: N/C m_o = data & 0x7f; prepare_display(); @@ -4469,7 +4992,7 @@ INPUT_CHANGED_MEMBER(phpball_state::flipper_button) static MACHINE_CONFIG_START( phpball, phpball_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1100, 375000) // RC osc. R=47K, C=47pf -> ~375kHz + MCFG_CPU_ADD("maincpu", TMS1100, 375000) // approximation - RC osc. R=47K, C=47pf MCFG_TMS1XXX_READ_K_CB(READ8(phpball_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(phpball_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(phpball_state, write_o)) @@ -4498,7 +5021,7 @@ ROM_START( mathmagi ) ROM_LOAD( "mp1030", 0x0000, 0x0800, CRC(a81d7ccb) SHA1(4756ce42f1ea28ce5fe6498312f8306f10370969) ) ROM_REGION( 867, "maincpu:mpla", 0 ) - ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, BAD_DUMP CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) // not verified + ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, BAD_DUMP CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) // not verified ROM_REGION( 365, "maincpu:opla", 0 ) ROM_LOAD( "tms1100_mathmagi_output.pla", 0, 365, NO_DUMP ) ROM_END @@ -4515,14 +5038,25 @@ ROM_START( amaztron ) ROM_END -ROM_START( h2hbaseb ) +ROM_START( zodiac ) ROM_REGION( 0x0800, "maincpu", 0 ) - ROM_LOAD( "mp1525", 0x0000, 0x0800, CRC(b5d6bf9b) SHA1(2cc9f35f077c1209c46d16ec853af87e4725c2fd) ) + ROM_LOAD( "mp3435", 0x0000, 0x0800, CRC(ecdc3160) SHA1(a7e82d66314a039fcffeddf99919d9f9ad42d61d) ) ROM_REGION( 867, "maincpu:mpla", 0 ) - ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) + ROM_LOAD( "tms1100_common3_micro.pla", 0, 867, BAD_DUMP CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) ) // not verified ROM_REGION( 365, "maincpu:opla", 0 ) - ROM_LOAD( "tms1100_h2hbaseb_output.pla", 0, 365, CRC(cb3d7e38) SHA1(6ab4a7c52e6010b7c7158463cb499973e52ff556) ) + ROM_LOAD( "tms1100_zodiac_output.pla", 0, 365, NO_DUMP ) +ROM_END + + +ROM_START( cqback ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp3415.u4", 0x0000, 0x0800, CRC(65ebdabf) SHA1(9b5cf5adaf9132ced87f611ae8c3148b9b62ba89) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_common3_micro.pla", 0, 867, CRC(03574895) SHA1(04407cabfb3adee2ee5e4218612cb06c12c540f4) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_cqback_output.pla", 0, 365, CRC(c6dcbfd0) SHA1(593b6b7de981a28d1b4a33336b39df92d02ed4f4) ) ROM_END @@ -4537,6 +5071,17 @@ ROM_START( h2hfootb ) ROM_END +ROM_START( h2hbaseb ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp1525", 0x0000, 0x0800, CRC(b5d6bf9b) SHA1(2cc9f35f077c1209c46d16ec853af87e4725c2fd) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_h2hbaseb_output.pla", 0, 365, CRC(cb3d7e38) SHA1(6ab4a7c52e6010b7c7158463cb499973e52ff556) ) +ROM_END + + ROM_START( tc4 ) ROM_REGION( 0x1000, "maincpu", 0 ) ROM_LOAD( "mp7334", 0x0000, 0x1000, CRC(923f3821) SHA1(a9ae342d7ff8dae1dedcd1e4984bcfae68586581) ) @@ -4548,6 +5093,17 @@ ROM_START( tc4 ) ROM_END +ROM_START( cnfball2 ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp1181", 0x0000, 0x0800, CRC(4553a840) SHA1(2e1132c9bc51641f77ba7f2430b5a3b2766b3a3d) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_common2_micro.pla", 0, 867, BAD_DUMP CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) // not verified + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_cnfball2_output.pla", 0, 365, NO_DUMP ) +ROM_END + + ROM_START( ebball ) ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD( "mp0914", 0x0000, 0x0400, CRC(3c6fb05b) SHA1(b2fe4b3ca72d6b4c9bfa84d67f64afdc215e7178) ) @@ -4841,6 +5397,17 @@ ROM_START( splitsec ) ROM_END +ROM_START( lostreas ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "m34038", 0x0000, 0x0800, CRC(4c996f63) SHA1(ebbaa8b2f909f4300887aa2dbdb7185eedc75d3f) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_lostreas_output.pla", 0, 365, CRC(c62d850f) SHA1(d25974e6901eb10c52cdda12e6d4a13e26745e6f) ) +ROM_END + + ROM_START( tandy12 ) ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "cd7282sl", 0x0000, 0x0800, CRC(a10013dd) SHA1(42ebd3de3449f371b99937f9df39c240d15ac686) ) @@ -4879,10 +5446,14 @@ ROM_END COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) CONS( 1979, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", MACHINE_SUPPORTS_SAVE ) -CONS( 1980, h2hbaseb, 0, 0, h2hbaseb, h2hbaseb, driver_device, 0, "Coleco", "Head to Head Baseball", MACHINE_SUPPORTS_SAVE ) +COMP( 1979, zodiac, 0, 0, zodiac, zodiac, driver_device, 0, "Coleco", "Zodiac - The Astrology Computer", MACHINE_SUPPORTS_SAVE ) +CONS( 1978, cqback, 0, 0, cqback, cqback, driver_device, 0, "Coleco", "Electronic Quarterback", MACHINE_SUPPORTS_SAVE ) CONS( 1980, h2hfootb, 0, 0, h2hfootb, h2hfootb, driver_device, 0, "Coleco", "Head to Head Football", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, h2hbaseb, 0, 0, h2hbaseb, h2hbaseb, driver_device, 0, "Coleco", "Head to Head Baseball", MACHINE_SUPPORTS_SAVE ) CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", MACHINE_SUPPORTS_SAVE ) +CONS( 1979, cnfball2, 0, 0, cnfball2, cnfball2, driver_device, 0, "Conic", "Electronic Football II (Conic)", MACHINE_SUPPORTS_SAVE ) + CONS( 1979, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Electronic Baseball (Entex)", MACHINE_SUPPORTS_SAVE ) CONS( 1979, ebball2, 0, 0, ebball2, ebball2, driver_device, 0, "Entex", "Electronic Baseball 2 (Entex)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, ebball3, 0, 0, ebball3, ebball3, driver_device, 0, "Entex", "Electronic Baseball 3 (Entex)", MACHINE_SUPPORTS_SAVE ) @@ -4904,19 +5475,20 @@ COMP( 1979, astro, 0, 0, astro, astro, driver_device, 0, "Kos CONS( 1980, mdndclab, 0, 0, mdndclab, mdndclab, driver_device, 0, "Mattel", "Dungeons & Dragons - Computer Labyrinth Game", MACHINE_SUPPORTS_SAVE ) // *** CONS( 1977, comp4, 0, 0, comp4, comp4, driver_device, 0, "Milton Bradley", "Comp IV", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", MACHINE_SUPPORTS_SAVE ) -CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE ) +CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, driver_device, 0, "Milton Bradley", "Big Trak", MACHINE_SUPPORTS_SAVE | MACHINE_MECHANICAL ) // *** CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) // *** -CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", MACHINE_SUPPORTS_SAVE ) +CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner)", MACHINE_SUPPORTS_SAVE ) // *** CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) CONS( 1980, bankshot, 0, 0, bankshot, bankshot, driver_device, 0, "Parker Brothers", "Bank Shot - Electronic Pool", MACHINE_SUPPORTS_SAVE ) CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", MACHINE_SUPPORTS_SAVE ) -CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, driver_device, 0, "Parker Brothers", "Master Merlin", MACHINE_SUPPORTS_SAVE ) +CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, driver_device, 0, "Parker Brothers", "Master Merlin", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1982, lostreas, 0, 0, lostreas, lostreas, driver_device, 0, "Parker Brothers", "Lost Treasure - The Electronic Deep-Sea Diving Game (Electronic Dive-Control Center)", MACHINE_SUPPORTS_SAVE ) // *** -CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12: Computerized Arcade", MACHINE_SUPPORTS_SAVE ) // some of the minigames: *** +CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12: Computerized Arcade", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // some of the minigames: *** CONS( 1979, tbreakup, 0, 0, tbreakup, tbreakup, driver_device, 0, "Tomy", "Break Up (Tomy)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, phpball, 0, 0, phpball, phpball, driver_device, 0, "Tomy", "Power House Pinball", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) diff --git a/src/mame/drivers/hh_ucom4.cpp b/src/mame/drivers/hh_ucom4.cpp index b78b15a40d3..9eaf283d33f 100644 --- a/src/mame/drivers/hh_ucom4.cpp +++ b/src/mame/drivers/hh_ucom4.cpp @@ -46,7 +46,7 @@ @512 uPD557LC 1980, Castle Toy Tactix - *060 uPD650C 1979, Mattel Computer Gin + @060 uPD650C 1979, Mattel Computer Gin *085 uPD650C 1980, Roland TR-808 *127 uPD650C 198?, Sony OA-S1100 Typecorder (subcpu, have dump) 128 uPD650C 1981, Roland TR-606 -> tr606.cpp @@ -65,6 +65,7 @@ TODO: // internal artwork #include "efball.lh" +#include "mcompgin.lh" #include "mvbfree.lh" #include "tactix.lh" // clickable @@ -187,7 +188,7 @@ void hh_ucom4_state::set_display_size(int maxx, int maxy) m_display_maxy = maxy; } -void hh_ucom4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +void hh_ucom4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update) { set_display_size(maxx, maxy); @@ -196,10 +197,13 @@ void hh_ucom4_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety for (int y = 0; y < maxy; y++) m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; - display_update(); + if (update) + display_update(); } +// generic input handlers + UINT8 hh_ucom4_state::read_inputs(int columns) { UINT8 ret = 0; @@ -1580,6 +1584,79 @@ MACHINE_CONFIG_END /*************************************************************************** + Mattel Computer Gin + * NEC uCOM-43 MCU, labeled D650C 060 + +***************************************************************************/ + +class mcompgin_state : public hh_ucom4_state +{ +public: + mcompgin_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_ucom4_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(unk_w); +}; + +// handlers + +void mcompgin_state::prepare_display() +{ +} + +WRITE8_MEMBER(mcompgin_state::unk_w) +{ + // E=lcd +} + + +// config + +static INPUT_PORTS_START( mcompgin ) + PORT_START("IN.0") // port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // 21 select + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // 23 deal + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) // 22 discard + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) // 20 draw + + PORT_START("IN.1") // port B + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) // 24 comp + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) // 25 score + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON7 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON8 ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( mcompgin, mcompgin_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D650, 400000) // approximation + MCFG_UCOM4_READ_A_CB(IOPORT("IN.0")) + MCFG_UCOM4_READ_B_CB(IOPORT("IN.1")) + MCFG_UCOM4_WRITE_C_CB(WRITE8(mcompgin_state, unk_w)) + MCFG_UCOM4_WRITE_D_CB(WRITE8(mcompgin_state, unk_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(mcompgin_state, unk_w)) + MCFG_UCOM4_WRITE_F_CB(WRITE8(mcompgin_state, unk_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(mcompgin_state, unk_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(mcompgin_state, unk_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(mcompgin_state, unk_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_mcompgin) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Mego Mini-Vid Break Free (manufactured in Japan) * PCB label Mego 79 rev F * NEC uCOM-43 MCU, labeled D553C 049 @@ -2444,6 +2521,12 @@ ROM_START( edracula ) ROM_END +ROM_START( mcompgin ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "d650c-060", 0x0000, 0x0800, BAD_DUMP CRC(92a4d8be) SHA1(d67f14a2eb53b79a7d9eb08103325299bc643781) ) // d5 stuck: xx1x xxxx +ROM_END + + ROM_START( mvbfree ) ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "d553c-049", 0x0000, 0x0800, CRC(d64a8399) SHA1(97887e486fa29b1fc4a5a40cacf3c960f67aacbf) ) @@ -2496,7 +2579,7 @@ CONS( 1980, splasfgt, 0, 0, splasfgt, splasfgt, driver_device, 0, "Bambin CONS( 1982, bcclimbr, 0, 0, bcclimbr, bcclimbr, driver_device, 0, "Bandai", "Crazy Climber (Bandai)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) -CONS( 1980, tactix, 0, 0, tactix, tactix, driver_device, 0, "Castle Toy", "Tactix", MACHINE_SUPPORTS_SAVE ) +CONS( 1980, tactix, 0, 0, tactix, tactix, driver_device, 0, "Castle Toy", "Tactix (Castle Toy)", MACHINE_SUPPORTS_SAVE ) CONS( 1980, invspace, 0, 0, invspace, invspace, driver_device, 0, "Epoch", "Invader From Space", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) CONS( 1980, efball, 0, 0, efball, efball, driver_device, 0, "Epoch", "Electronic Football (Epoch)", MACHINE_SUPPORTS_SAVE ) @@ -2504,6 +2587,8 @@ CONS( 1981, galaxy2, 0, 0, galaxy2, galaxy2, driver_device, 0, "Epoch" CONS( 1982, astrocmd, 0, 0, astrocmd, astrocmd, driver_device, 0, "Epoch", "Astro Command", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula (Epoch)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +CONS( 1979, mcompgin, 0, 0, mcompgin, mcompgin, driver_device, 0, "Mattel", "Computer Gin", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) + CONS( 1979, mvbfree, 0, 0, mvbfree, mvbfree, driver_device, 0, "Mego", "Mini-Vid Break Free", MACHINE_SUPPORTS_SAVE ) CONS( 1980, tccombat, 0, 0, tccombat, tccombat, driver_device, 0, "Tomy", "Cosmic Combat", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) diff --git a/src/mame/drivers/horizon.cpp b/src/mame/drivers/horizon.cpp index 11076e517f2..8a0badd1c4b 100644 --- a/src/mame/drivers/horizon.cpp +++ b/src/mame/drivers/horizon.cpp @@ -168,7 +168,7 @@ static MACHINE_CONFIG_START( horizon, horizon_state ) // S-100 MCFG_S100_BUS_ADD() - MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT)) + MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT)) //MCFG_S100_SLOT_ADD("s100_1", horizon_s100_cards, NULL, NULL) // CPU MCFG_S100_SLOT_ADD("s100_2", horizon_s100_cards, nullptr) // RAM MCFG_S100_SLOT_ADD("s100_3", horizon_s100_cards, "mdsad") // MDS diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp index 49200920f36..b1df15c8419 100644 --- a/src/mame/drivers/hornet.cpp +++ b/src/mame/drivers/hornet.cpp @@ -478,9 +478,9 @@ WRITE_LINE_MEMBER(hornet_state::voodoo_vblank_1) UINT32 hornet_state::screen_update_hornet(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - device_t *voodoo = machine().device("voodoo0"); + voodoo_device* voodoo = (voodoo_device*)machine().device("voodoo0"); - voodoo_update(voodoo, bitmap, cliprect); + voodoo->voodoo_update(bitmap, cliprect); m_k037122_1->tile_draw(screen, bitmap, cliprect); @@ -493,16 +493,16 @@ UINT32 hornet_state::screen_update_hornet_2board(screen_device &screen, bitmap_r { if (strcmp(screen.tag(), ":lscreen") == 0) { - device_t *voodoo = machine().device("voodoo0"); - voodoo_update(voodoo, bitmap, cliprect); + voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo0"); + voodoo->voodoo_update(bitmap, cliprect); /* TODO: tilemaps per screen */ m_k037122_1->tile_draw(screen, bitmap, cliprect); } else if (strcmp(screen.tag(), ":rscreen") == 0) { - device_t *voodoo = machine().device("voodoo1"); - voodoo_update(voodoo, bitmap, cliprect); + voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo1"); + voodoo->voodoo_update(bitmap, cliprect); /* TODO: tilemaps per screen */ m_k037122_2->tile_draw(screen, bitmap, cliprect); diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp index 2936cae3228..7f83f001fe3 100644 --- a/src/mame/drivers/hp9845.cpp +++ b/src/mame/drivers/hp9845.cpp @@ -16,12 +16,12 @@ // - LPU & PPU ROMs // - LPU & PPU RAMs // - Text mode screen -// - Keyboard (most of keys) +// - Keyboard +// - T15 tape drive // What's not yet in: // - Beeper -// - Rest of keyboard // - Graphic screen -// - Tape drive (this needs some heavy RE of the TACO chip) +// - Better naming of tape drive image (it's now "magt", should be "t15") // - Better documentation of this file // - Software list to load optional ROMs // What's wrong: @@ -33,6 +33,7 @@ #include "cpu/z80/z80.h" #include "softlist.h" #include "cpu/hphybrid/hphybrid.h" +#include "machine/hp_taco.h" #define BIT_MASK(n) (1U << (n)) @@ -77,7 +78,8 @@ public: m_io_key0(*this , "KEY0"), m_io_key1(*this , "KEY1"), m_io_key2(*this , "KEY2"), - m_io_key3(*this , "KEY3") + m_io_key3(*this , "KEY3"), + m_t15(*this , "t15") { } UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -90,7 +92,7 @@ public: void vblank_w(screen_device &screen, bool state); IRQ_CALLBACK_MEMBER(irq_callback); - void update_irl(void); + void update_irq(void); TIMER_DEVICE_CALLBACK_MEMBER(kb_scan); DECLARE_READ16_MEMBER(kb_scancode_r); @@ -99,6 +101,10 @@ public: DECLARE_WRITE8_MEMBER(pa_w); + DECLARE_WRITE_LINE_MEMBER(t15_irq_w); + DECLARE_WRITE_LINE_MEMBER(t15_flg_w); + DECLARE_WRITE_LINE_MEMBER(t15_sts_w); + private: required_device<hp_5061_3001_cpu_device> m_lpu; required_device<hp_5061_3001_cpu_device> m_ppu; @@ -107,6 +113,7 @@ private: required_ioport m_io_key1; required_ioport m_io_key2; required_ioport m_io_key3; + required_device<hp_taco_device> m_t15; void set_video_mar(UINT16 mar); void video_fill_buff(bool buff_idx); @@ -136,12 +143,15 @@ private: // Interrupt handling UINT8 m_irl_pending; + UINT8 m_irh_pending; // State of keyboard ioport_value m_kb_state[ 4 ]; UINT8 m_kb_scancode; UINT16 m_kb_status; + // State of PPU I/O + UINT8 m_ppu_pa; }; static INPUT_PORTS_START(hp9845b) @@ -322,10 +332,13 @@ void hp9845b_state::machine_reset() m_video_frame = 0; m_irl_pending = 0; + m_irh_pending = 0; memset(&m_kb_state[ 0 ] , 0 , sizeof(m_kb_state)); m_kb_scancode = 0x7f; m_kb_status = 0; + + m_ppu_pa = 0; } void hp9845b_state::set_video_mar(UINT16 mar) @@ -479,13 +492,14 @@ IRQ_CALLBACK_MEMBER(hp9845b_state::irq_callback) if (irqline == HPHYBRID_IRL) { return m_irl_pending; } else { - return 0; + return m_irh_pending; } } -void hp9845b_state::update_irl(void) +void hp9845b_state::update_irq(void) { m_ppu->set_input_line(HPHYBRID_IRL , m_irl_pending != 0); + m_ppu->set_input_line(HPHYBRID_IRH , m_irh_pending != 0); } TIMER_DEVICE_CALLBACK_MEMBER(hp9845b_state::kb_scan) @@ -546,7 +560,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(hp9845b_state::kb_scan) m_kb_scancode = i; BIT_SET(m_irl_pending , 0); BIT_SET(m_kb_status, 0); - update_irl(); + update_irq(); // Special case: pressing stop key sets LPU "status" flag if (i == 0x47) { @@ -572,24 +586,50 @@ WRITE16_MEMBER(hp9845b_state::kb_irq_clear_w) { BIT_CLR(m_irl_pending , 0); BIT_CLR(m_kb_status, 0); - update_irl(); + update_irq(); m_lpu->status_w(0); // TODO: beeper start } WRITE8_MEMBER(hp9845b_state::pa_w) { + m_ppu_pa = data; + // TODO: handle sts & flg - if (data == 0xf) { - // RHS tape drive (T15) - m_ppu->status_w(1); - m_ppu->flag_w(1); + if (data == 15) { + // RHS tape drive (T15) + m_ppu->status_w(m_t15->sts_r()); + m_ppu->flag_w(m_t15->flg_r()); } else { m_ppu->status_w(0); m_ppu->flag_w(0); } } +WRITE_LINE_MEMBER(hp9845b_state::t15_irq_w) +{ + if (state) { + BIT_SET(m_irh_pending , 7); + } else { + BIT_CLR(m_irh_pending , 7); + } + update_irq(); +} + +WRITE_LINE_MEMBER(hp9845b_state::t15_flg_w) +{ + if (m_ppu_pa == 15) { + m_ppu->flag_w(state); + } +} + +WRITE_LINE_MEMBER(hp9845b_state::t15_sts_w) +{ + if (m_ppu_pa == 15) { + m_ppu->status_w(state); + } +} + static MACHINE_CONFIG_START( hp9845a, hp9845_state ) //MCFG_CPU_ADD("lpu", HP_5061_3010, XTAL_11_4MHz) //MCFG_CPU_ADD("ppu", HP_5061_3011, XTAL_11_4MHz) @@ -638,6 +678,9 @@ static ADDRESS_MAP_START(ppu_io_map , AS_IO , 16 , hp9845b_state) // PA = 0, IC = 3 // Keyboard status input & keyboard interrupt clear AM_RANGE(HP_MAKE_IOADDR(0 , 3) , HP_MAKE_IOADDR(0 , 3)) AM_READWRITE(kb_status_r , kb_irq_clear_w) + // PA = 15, IC = 0..3 + // Right-hand side tape drive (T15) + AM_RANGE(HP_MAKE_IOADDR(15 , 0) , HP_MAKE_IOADDR(15 , 3)) AM_DEVREADWRITE("t15" , hp_taco_device , reg_r , reg_w) ADDRESS_MAP_END static MACHINE_CONFIG_START( hp9845b, hp9845b_state ) @@ -663,6 +706,12 @@ static MACHINE_CONFIG_START( hp9845b, hp9845b_state ) // Actual keyboard refresh rate should be KEY_SCAN_OSCILLATOR / 128 (2560 Hz) MCFG_TIMER_DRIVER_ADD_PERIODIC("kb_timer" , hp9845b_state , kb_scan , attotime::from_hz(100)) + // Tape controller + MCFG_DEVICE_ADD("t15" , HP_TACO , 4000000) + MCFG_TACO_IRQ_HANDLER(WRITELINE(hp9845b_state , t15_irq_w)) + MCFG_TACO_FLG_HANDLER(WRITELINE(hp9845b_state , t15_flg_w)) + MCFG_TACO_STS_HANDLER(WRITELINE(hp9845b_state , t15_sts_w)) + MCFG_SOFTWARE_LIST_ADD("optrom_list", "hp9845b_rom") MACHINE_CONFIG_END diff --git a/src/mame/drivers/iteagle.cpp b/src/mame/drivers/iteagle.cpp index 2ff0a30f1bb..ff6b387bc45 100644 --- a/src/mame/drivers/iteagle.cpp +++ b/src/mame/drivers/iteagle.cpp @@ -179,7 +179,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore01, iteagle ) MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000401, 0x0b0b0b) + MCFG_ITEAGLE_FPGA_INIT(0x00000401, 0x0b0b0b) MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0401, 0x7) MACHINE_CONFIG_END @@ -187,7 +187,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore02, iteagle ) MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000402, 0x020201) - MCFG_DEVICE_MODIFY(":pci:0a.0") + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0402, 0x7) MACHINE_CONFIG_END @@ -215,28 +215,28 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gtfore06, iteagle ) MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x01000406, 0x0c0b0d) - MCFG_DEVICE_MODIFY(":pci:0a.0") + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0406, 0x9); MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( carnking, iteagle ) MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000603, 0x0c0b0d) + MCFG_ITEAGLE_FPGA_INIT(0x01000a01, 0x0e0a0a) MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x9) + MCFG_ITEAGLE_EEPROM_INIT(0x0a01, 0x9) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bbhsc, iteagle ) MCFG_DEVICE_MODIFY(PCI_ID_FPGA) - MCFG_ITEAGLE_FPGA_INIT(0x01000600, 0x0c0a0a) + MCFG_ITEAGLE_FPGA_INIT(0x02000600, 0x0c0a0a) MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) - MCFG_ITEAGLE_EEPROM_INIT(0x0600, 0x9) + MCFG_ITEAGLE_EEPROM_INIT(0x0000, 0x7) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( bbhcotw, iteagle ) MCFG_DEVICE_MODIFY(PCI_ID_FPGA) MCFG_ITEAGLE_FPGA_INIT(0x02000603, 0x080704) - MCFG_DEVICE_MODIFY(":pci:0a.0") + MCFG_DEVICE_MODIFY(PCI_ID_EEPROM) MCFG_ITEAGLE_EEPROM_INIT(0x0603, 0x9) MACHINE_CONFIG_END @@ -331,7 +331,7 @@ static INPUT_PORTS_START( virtpool ) INPUT_PORTS_END -static INPUT_PORTS_START( bbhcotw ) +static INPUT_PORTS_START( bbh ) PORT_INCLUDE( iteagle ) PORT_MODIFY("IN1") @@ -557,7 +557,7 @@ ROM_END GAME( 2000, iteagle, 0, iteagle, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Eagle BIOS", MACHINE_IS_BIOS_ROOT ) GAME( 1998, virtpool, iteagle, virtpool, virtpool, driver_device, 0, ROT0, "Incredible Technologies", "Virtual Pool", MACHINE_NOT_WORKING ) // random lockups on loading screens -GAME( 2002, carnking, iteagle, carnking, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Carnival King (v1.00.11)", MACHINE_NOT_WORKING ) +GAME( 2002, carnking, iteagle, carnking, bbh, driver_device, 0, ROT0, "Incredible Technologies", "Carnival King (v1.00.11)", 0 ) GAME( 2000, gtfore01, iteagle, gtfore01, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! (v1.00.25)", 0 ) GAME( 2001, gtfore02, iteagle, gtfore02, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2002 (v2.01.06)", 0 ) GAME( 2002, gtfore03, iteagle, gtfore03, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2003 (v3.00.10)", 0 ) @@ -569,5 +569,5 @@ GAME( 2004, gtfore05a, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "I GAME( 2004, gtfore05b, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.01.00)", 0 ) GAME( 2004, gtfore05c, gtfore05, gtfore05, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2005 Extra (v5.00.00)", 0 ) GAME( 2005, gtfore06, iteagle, gtfore06, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Golden Tee Fore! 2006 Complete (v6.00.01)", 0 ) -GAME( 2002, bbhsc, iteagle, bbhsc, iteagle, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter - Shooter's Challenge (v1.50.07)", MACHINE_NOT_WORKING ) // doesn't boot -GAME( 2006, bbhcotw, iteagle, bbhcotw, bbhcotw, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter Call of the Wild (v3.02.5)", MACHINE_NOT_WORKING ) // random lockups +GAME( 2002, bbhsc, iteagle, bbhsc, bbh, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter - Shooter's Challenge (v1.50.07)", MACHINE_NOT_WORKING ) // doesn't boot +GAME( 2006, bbhcotw, iteagle, bbhcotw, bbh, driver_device, 0, ROT0, "Incredible Technologies", "Big Buck Hunter Call of the Wild (v3.02.5)", MACHINE_NOT_WORKING ) // random lockups diff --git a/src/mame/drivers/itgamble.cpp b/src/mame/drivers/itgamble.cpp index 8c9cf972924..c4caaa27b74 100644 --- a/src/mame/drivers/itgamble.cpp +++ b/src/mame/drivers/itgamble.cpp @@ -713,4 +713,4 @@ GAME( 200?, abacus, 0, itgamble, itgamble, driver_device, 0, ROT0, "<u GAME( 200?, bookthr, 0, itgamble, itgamble, driver_device, 0, ROT0, "<unknown>", "Book Theatre (Ver 1.2)", MACHINE_IS_SKELETON ) /* different hardware */ -GAME( 200?, mnumber, 0, mnumber, itgamble, driver_device, 0, ROT0, "M.M. - B.R.L.", "Mystery Number", MACHINE_IS_SKELETON ) +GAME( 2000, mnumber, 0, mnumber, itgamble, driver_device, 0, ROT0, "MM / BRL Bologna", "Mystery Number", MACHINE_IS_SKELETON ) diff --git a/src/mame/drivers/jangou.cpp b/src/mame/drivers/jangou.cpp index a72c7c1a9b6..d8dd8401ba7 100644 --- a/src/mame/drivers/jangou.cpp +++ b/src/mame/drivers/jangou.cpp @@ -32,9 +32,9 @@ $c088-$c095 player tiles #include "sound/hc55516.h" #include "sound/msm5205.h" #include "video/resnet.h" +#include "video/jangou_blitter.h" #include "machine/nvram.h" - #define MASTER_CLOCK XTAL_19_968MHz class jangou_state : public driver_device @@ -47,7 +47,8 @@ public: m_nsc(*this, "nsc"), m_msm(*this, "msm"), m_cvsd(*this, "cvsd"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_blitter(*this, "blitter") { } /* sound-related */ // Jangou CVSD Sound @@ -70,13 +71,9 @@ public: optional_device<msm5205_device> m_msm; optional_device<hc55516_device> m_cvsd; required_device<palette_device> m_palette; + required_device<jangou_blitter_device> m_blitter; /* video-related */ - UINT8 m_pen_data[0x10]; - UINT8 m_blit_data[6]; - UINT8 m_blit_buffer[256 * 256]; - DECLARE_WRITE8_MEMBER(blitter_process_w); - DECLARE_WRITE8_MEMBER(blit_vregs_w); DECLARE_WRITE8_MEMBER(mux_w); DECLARE_WRITE8_MEMBER(output_w); DECLARE_WRITE8_MEMBER(sound_latch_w); @@ -102,9 +99,9 @@ public: DECLARE_MACHINE_RESET(common); UINT32 screen_update_jangou(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(cvsd_bit_timer_callback); - UINT8 jangou_gfx_nibble( UINT16 niboffset ); - void plot_jangou_gfx_pixel( UINT8 pix, int x, int y ); DECLARE_WRITE_LINE_MEMBER(jngolady_vclk_cb); + + std::unique_ptr<bitmap_ind16> m_tmp_bitmap; }; @@ -157,7 +154,7 @@ PALETTE_INIT_MEMBER(jangou_state, jangou) void jangou_state::video_start() { - save_item(NAME(m_blit_buffer)); + m_tmp_bitmap = std::make_unique<bitmap_ind16>(256, 256); } UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -166,8 +163,8 @@ UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &b for (y = cliprect.min_y; y <= cliprect.max_y; ++y) { - UINT8 *src = &m_blit_buffer[y * 512 / 2 + cliprect.min_x]; - UINT16 *dst = &bitmap.pix16(y, cliprect.min_x); + UINT8 *src = &m_blitter->m_blit_buffer[y * 256 + cliprect.min_x]; + UINT16 *dst = &m_tmp_bitmap->pix16(y, cliprect.min_x); for (x = cliprect.min_x; x <= cliprect.max_x; x += 2) { @@ -176,99 +173,11 @@ UINT32 jangou_state::screen_update_jangou(screen_device &screen, bitmap_ind16 &b *dst++ = m_palette->pen((srcpix >> 4) & 0xf); } } + //void copybitmap(bitmap_rgb32 &dest, const bitmap_rgb32 &src, int flipx, int flipy, INT32 destx, INT32 desty, const rectangle &cliprect) - return 0; -} - -/* -Blitter Memory Map: - -src lo word[$12] -src hi word[$13] -x [$14] -y [$15] -h [$16] -w [$17] -*/ - -UINT8 jangou_state::jangou_gfx_nibble( UINT16 niboffset ) -{ - const UINT8 *const blit_rom = memregion("gfx")->base(); - - if (niboffset & 1) - return (blit_rom[(niboffset >> 1) & 0xffff] & 0xf0) >> 4; - else - return (blit_rom[(niboffset >> 1) & 0xffff] & 0x0f); -} - -void jangou_state::plot_jangou_gfx_pixel( UINT8 pix, int x, int y ) -{ - if (y < 0 || y >= 512) - return; - if (x < 0 || x >= 512) - return; - - if (x & 1) - m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0x0f) | ((pix << 4) & 0xf0); - else - m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0xf0) | (pix & 0x0f); -} + copybitmap(bitmap, *m_tmp_bitmap, flip_screen(), flip_screen(),0,0, cliprect); -WRITE8_MEMBER(jangou_state::blitter_process_w) -{ - int src, x, y, h, w, flipx; - m_blit_data[offset] = data; - - if (offset == 5) - { - int count = 0; - int xcount, ycount; - - /* printf("%02x %02x %02x %02x %02x %02x\n", m_blit_data[0], m_blit_data[1], m_blit_data[2], - m_blit_data[3], m_blit_data[4], m_blit_data[5]); */ - w = (m_blit_data[4] & 0xff) + 1; - h = (m_blit_data[5] & 0xff) + 1; - src = ((m_blit_data[1] << 8)|(m_blit_data[0] << 0)); - x = (m_blit_data[2] & 0xff); - y = (m_blit_data[3] & 0xff); - - // lowest bit of src controls flipping / draw direction? - flipx = (m_blit_data[0] & 1); - - if (!flipx) - src += (w * h) - 1; - else - src -= (w * h) - 1; - - for (ycount = 0; ycount < h; ycount++) - { - for(xcount = 0; xcount < w; xcount++) - { - int drawx = (x + xcount) & 0xff; - int drawy = (y + ycount) & 0xff; - UINT8 dat = jangou_gfx_nibble(src + count); - UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4]; - UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0]; - - dat = cur_pen_lo | (cur_pen_hi << 4); - - if ((dat & 0xff) != 0) - plot_jangou_gfx_pixel(dat, drawx, drawy); - - if (!flipx) - count--; - else - count++; - } - } - } -} - -/* What is the bit 5 (0x20) for?*/ -WRITE8_MEMBER(jangou_state::blit_vregs_w) -{ - // printf("%02x %02x\n", offset, data); - m_pen_data[offset] = data & 0xf; + return 0; } /************************************* @@ -285,13 +194,13 @@ WRITE8_MEMBER(jangou_state::mux_w) WRITE8_MEMBER(jangou_state::output_w) { /* - --x- ---- ? (polls between high and low in irq routine,probably signals the vblank routine) + --x- ---- ? (polls between high and low in irq routine, most likely irq mask) ---- -x-- flip screen ---- ---x coin counter */ // printf("%02x\n", data); machine().bookkeeping().coin_counter_w(0, data & 0x01); -// flip_screen_set(data & 0x04); + flip_screen_set(data & 0x04); // machine().bookkeeping().coin_lockout_w(0, ~data & 0x20); } @@ -415,11 +324,10 @@ static ADDRESS_MAP_START( cpu0_io, AS_IO, 8, jangou_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) - AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag - AM_RANGE(0x10,0x10) AM_WRITE(output_w) + AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") AM_WRITE(output_w) //dsw + blitter busy flag AM_RANGE(0x11,0x11) AM_WRITE(mux_w) - AM_RANGE(0x12,0x17) AM_WRITE(blitter_process_w) - AM_RANGE(0x20,0x2f) AM_WRITE(blit_vregs_w) + AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w) + AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w) AM_RANGE(0x30,0x30) AM_WRITENOP //? polls 0x03 continuously AM_RANGE(0x31,0x31) AM_WRITE(sound_latch_w) ADDRESS_MAP_END @@ -489,8 +397,8 @@ static ADDRESS_MAP_START( cntrygrl_cpu0_io, AS_IO, 8, jangou_state ) AM_RANGE(0x10,0x10) AM_READ_PORT("DSW") //dsw + blitter busy flag AM_RANGE(0x10,0x10) AM_WRITE(output_w) AM_RANGE(0x11,0x11) AM_WRITE(mux_w) - AM_RANGE(0x12,0x17) AM_WRITE(blitter_process_w) - AM_RANGE(0x20,0x2f) AM_WRITE(blit_vregs_w ) + AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w) + AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w) AM_RANGE(0x30,0x30) AM_WRITENOP //? polls 0x03 continuously // AM_RANGE(0x31,0x31) AM_WRITE(sound_latch_w) ADDRESS_MAP_END @@ -514,8 +422,8 @@ static ADDRESS_MAP_START( roylcrdn_cpu0_io, AS_IO, 8, jangou_state ) AM_RANGE(0x10,0x10) AM_WRITENOP /* Writes continuosly 0's in attract mode, and 1's in game */ AM_RANGE(0x11,0x11) AM_WRITE(mux_w) AM_RANGE(0x13,0x13) AM_READNOP /* Often reads bit7 with unknown purposes */ - AM_RANGE(0x12,0x17) AM_WRITE(blitter_process_w) - AM_RANGE(0x20,0x2f) AM_WRITE(blit_vregs_w) + AM_RANGE(0x12,0x17) AM_DEVWRITE("blitter",jangou_blitter_device, process_w) + AM_RANGE(0x20,0x2f) AM_DEVWRITE("blitter",jangou_blitter_device, vregs_w) AM_RANGE(0x30,0x30) AM_WRITENOP /* Seems to write 0x10 on each sound event */ ADDRESS_MAP_END @@ -614,7 +522,7 @@ static INPUT_PORTS_START( jangou ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r) INPUT_PORTS_END static INPUT_PORTS_START( macha ) @@ -675,7 +583,7 @@ static INPUT_PORTS_START( macha ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") // guess - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r) INPUT_PORTS_END @@ -760,7 +668,7 @@ static INPUT_PORTS_START( cntrygrl ) PORT_DIPNAME( 0x40, 0x40, "Coin B setting" ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) ) PORT_DIPSETTING( 0x00, "1 Coin / 10 Credits" ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // blitter busy flag + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r) PORT_START("IN_NOMUX") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -801,7 +709,7 @@ static INPUT_PORTS_START( jngolady ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //blitter busy flag + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r) INPUT_PORTS_END static INPUT_PORTS_START( roylcrdn ) @@ -859,29 +767,9 @@ static INPUT_PORTS_START( roylcrdn ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Credit Clear") /* Credit Clear */ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* Spare 1 */ - PORT_START("DSW") /* Not a real DSW on PCB */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* blitter busy flag */ + PORT_START("DSW") + PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r) PORT_START("IN_NOMUX") PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -896,8 +784,6 @@ INPUT_PORTS_END MACHINE_START_MEMBER(jangou_state,common) { - save_item(NAME(m_pen_data)); - save_item(NAME(m_blit_data)); save_item(NAME(m_mux_data)); } @@ -925,15 +811,7 @@ MACHINE_START_MEMBER(jangou_state,jngolady) MACHINE_RESET_MEMBER(jangou_state,common) { - int i; - m_mux_data = 0; - - for (i = 0; i < 6; i++) - m_blit_data[i] = 0; - - for (i = 0; i < 16; i++) - m_pen_data[i] = 0; } void jangou_state::machine_reset() @@ -967,14 +845,11 @@ static MACHINE_CONFIG_START( jangou, jangou_state ) MCFG_CPU_PROGRAM_MAP(cpu1_map) MCFG_CPU_IO_MAP(cpu1_io) - + MCFG_JANGOU_BLITTER_ADD("blitter", MASTER_CLOCK/4) + /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) //not accurate - MCFG_SCREEN_SIZE(256, 256) - MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 16, 240-1) + MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4,320,0,256,264,16,240) // assume same as nightgal.cpp MCFG_SCREEN_UPDATE_DRIVER(jangou_state, screen_update_jangou) MCFG_SCREEN_PALETTE("palette") @@ -1290,7 +1165,7 @@ ROM_START( roylcrdn ) ROM_LOAD( "prg.p2", 0x1000, 0x1000, CRC(7e10259d) SHA1(d1279922a8c2475c3c73d9960b0a728c0ef851fb) ) ROM_LOAD( "prg.p3", 0x2000, 0x1000, CRC(06ef7073) SHA1(d3f990d710629b23daec76cd7ad6ccc7e066e710) ) - ROM_REGION( 0x20000, "gfx", 0 ) + ROM_REGION( 0x10000, "gfx", 0 ) ROM_LOAD( "chrgen.cr1", 0x0000, 0x1000, CRC(935d0e1c) SHA1(0d5b067f6931585c8138b211cf73e5f585af8101) ) ROM_LOAD( "chrgen.cr2", 0x1000, 0x1000, CRC(4429362e) SHA1(0bbb6dedf919e0453be2db6343827c5787d139f3) ) ROM_LOAD( "chrgen.cr3", 0x2000, 0x1000, CRC(dc059cc9) SHA1(3041e83b9a265adfe4e1da889ae6a18593de0894) ) @@ -1306,7 +1181,7 @@ ROM_START( luckygrl ) ROM_LOAD( "7.9f", 0x01000, 0x01000, CRC(14a44d23) SHA1(4f84a8f986a8fd9d5ac0636be1bb036c3b2746c2) ) ROM_LOAD( "6.9e", 0x02000, 0x01000, CRC(06850aa8) SHA1(c23cb6b7b26d5586b1a095dee88228d1613ae7d0) ) - ROM_REGION( 0x80000, "gfx", 0 ) + ROM_REGION( 0x10000, "gfx", 0 ) ROM_LOAD( "1.5r", 0x00000, 0x2000, CRC(fb429678) SHA1(00e37e90550d9190d06977a5f5ed75b691750cc1) ) ROM_LOAD( "piggy2.5r", 0x02000, 0x2000, CRC(a3919845) SHA1(45fffe34b7a29ecf8c8feb4152b5c7330ea3ad83) ) ROM_LOAD( "3.5n", 0x04000, 0x2000, CRC(130cfb89) SHA1(86b2a2142675cbd69d7cccab9b00f4c8863cdcbc) ) @@ -1383,13 +1258,13 @@ DRIVER_INIT_MEMBER(jangou_state,luckygrl) * *************************************/ -GAME( 1983, jangou, 0, jangou, jangou, driver_device, 0, ROT0, "Nichibutsu", "Jangou [BET] (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, macha, 0, jangou, macha, driver_device, 0, ROT0, "Logitec", "Monoshiri Quiz Osyaberi Macha (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, jngolady, 0, jngolady, jngolady, jangou_state, jngolady, ROT0, "Nichibutsu", "Jangou Lady (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, cntrygrl, 0, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Royal Denshi", "Country Girl (Japan set 1)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, cntrygrla, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Country Girl (Japan set 2)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, fruitbun, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Fruits & Bunny (World?)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, roylcrdn, 0, roylcrdn, roylcrdn, driver_device, 0, ROT0, "Nichibutsu", "Royal Card (Nichibutsu)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, jangou, 0, jangou, jangou, driver_device, 0, ROT0, "Nichibutsu", "Jangou [BET] (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, macha, 0, jangou, macha, driver_device, 0, ROT0, "Logitec", "Monoshiri Quiz Osyaberi Macha (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, jngolady, 0, jngolady, jngolady, jangou_state, jngolady, ROT0, "Nichibutsu", "Jangou Lady (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, cntrygrl, 0, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Royal Denshi", "Country Girl (Japan set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, cntrygrla, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Country Girl (Japan set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, fruitbun, cntrygrl, cntrygrl, cntrygrl, driver_device, 0, ROT0, "Nichibutsu", "Fruits & Bunny (World?)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, roylcrdn, 0, roylcrdn, roylcrdn, driver_device, 0, ROT0, "Nichibutsu", "Royal Card (Nichibutsu)", MACHINE_SUPPORTS_SAVE ) /* The following might not run there... */ GAME( 1984?, luckygrl, 0, cntrygrl, cntrygrl, jangou_state, luckygrl, ROT0, "Wing Co., Ltd.", "Lucky Girl? (Wing)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp new file mode 100644 index 00000000000..0dddfd432c8 --- /dev/null +++ b/src/mame/drivers/k28.cpp @@ -0,0 +1,518 @@ +// license:BSD-3-Clause +// copyright-holders:hap, Kevin Horton +/*************************************************************************** + + Tiger Electronics K28: Talking Learning Computer (model 7-230/7-231) + * PCB marked PB-123 WIZARD, TIGER + * Intel P8021 MCU with 1KB internal ROM + * MM5445N VFD driver, 9-digit alphanumeric display same as snmath + * 2*TMS6100 (32KB VSM) + * SC-01-A speech chip + + 3 models exist: + - 7-230: darkblue case, toy-ish looks + - 7-231: gray case, hardware is the same + - 7-232: this one is completely different hw --> driver tispeak.cpp + + TODO: + - external module support (no dumps yet) + - SC-01 frog speech is why this driver is marked NOT_WORKING + +***************************************************************************/ + +#include "emu.h" +#include "cpu/mcs48/mcs48.h" +#include "machine/tms6100.h" +#include "sound/votrax.h" + +#include "k28.lh" + + +class k28_state : public driver_device +{ +public: + k28_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_tms6100(*this, "tms6100"), + m_speech(*this, "speech"), + m_onbutton_timer(*this, "on_button"), + m_inp_matrix(*this, "IN"), + m_display_wait(33), + m_display_maxy(1), + m_display_maxx(0) + { } + + // devices + required_device<cpu_device> m_maincpu; + required_device<tms6100_device> m_tms6100; + required_device<votrax_sc01_device> m_speech; + required_device<timer_device> m_onbutton_timer; + required_ioport_array<7> m_inp_matrix; + + // display common + int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) + int m_display_maxy; // display matrix number of rows + int m_display_maxx; // display matrix number of columns (max 31 for now) + + UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) + UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments + UINT32 m_display_cache[0x20]; // (internal use) + UINT8 m_display_decay[0x20][0x20]; // (internal use) + + TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); + void display_update(); + void set_display_size(int maxx, int maxy); + void set_display_segmask(UINT32 digits, UINT32 mask); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); + + bool m_power_on; + UINT8 m_inp_mux; + UINT8 m_phoneme; + int m_speech_strobe; + int m_vfd_data_enable; + int m_vfd_data_in; + int m_vfd_clock; + UINT64 m_vfd_shiftreg; + UINT64 m_vfd_shiftreg_out; + int m_vfd_shiftcount; + + DECLARE_WRITE8_MEMBER(mcu_p0_w); + DECLARE_READ8_MEMBER(mcu_p1_r); + DECLARE_READ8_MEMBER(mcu_p2_r); + DECLARE_WRITE8_MEMBER(mcu_p2_w); + DECLARE_WRITE8_MEMBER(mcu_prog_w); + DECLARE_READ8_MEMBER(mcu_t1_r); + + DECLARE_INPUT_CHANGED_MEMBER(power_on); + void power_off(); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; +}; + + +// machine start/reset/power + +void k28_state::machine_start() +{ + // zerofill + memset(m_display_state, 0, sizeof(m_display_state)); + memset(m_display_cache, ~0, sizeof(m_display_cache)); + memset(m_display_decay, 0, sizeof(m_display_decay)); + memset(m_display_segmask, 0, sizeof(m_display_segmask)); + + m_power_on = false; + m_inp_mux = 0; + m_phoneme = 0x3f; + m_speech_strobe = 0; + m_vfd_data_enable = 0; + m_vfd_data_in = 0; + m_vfd_clock = 0; + m_vfd_shiftreg = 0; + m_vfd_shiftreg_out = 0; + m_vfd_shiftcount = 0; + + // register for savestates + save_item(NAME(m_display_maxy)); + save_item(NAME(m_display_maxx)); + save_item(NAME(m_display_wait)); + + save_item(NAME(m_display_state)); + /* save_item(NAME(m_display_cache)); */ // don't save! + save_item(NAME(m_display_decay)); + save_item(NAME(m_display_segmask)); + + save_item(NAME(m_power_on)); + save_item(NAME(m_inp_mux)); + save_item(NAME(m_phoneme)); + save_item(NAME(m_speech_strobe)); + save_item(NAME(m_vfd_data_enable)); + save_item(NAME(m_vfd_data_in)); + save_item(NAME(m_vfd_clock)); + save_item(NAME(m_vfd_shiftreg)); + save_item(NAME(m_vfd_shiftreg_out)); + save_item(NAME(m_vfd_shiftcount)); +} + +void k28_state::machine_reset() +{ + m_power_on = true; + m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); + + // the game relies on reading the on-button as pressed when it's turned on + m_onbutton_timer->adjust(attotime::from_msec(250)); +} + +INPUT_CHANGED_MEMBER(k28_state::power_on) +{ + if (newval && !m_power_on) + machine_reset(); +} + +void k28_state::power_off() +{ + m_power_on = false; + m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); +} + + +/*************************************************************************** + + Helper Functions + +***************************************************************************/ + +// The device may strobe the outputs very fast, it is unnoticeable to the user. +// To prevent flickering here, we need to simulate a decay. + +void k28_state::display_update() +{ + UINT32 active_state[0x20]; + + for (int y = 0; y < m_display_maxy; y++) + { + active_state[y] = 0; + + for (int x = 0; x <= m_display_maxx; x++) + { + // turn on powered segments + if (m_power_on && m_display_state[y] >> x & 1) + m_display_decay[y][x] = m_display_wait; + + // determine active state + UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0; + active_state[y] |= (ds << x); + } + } + + // on difference, send to output + for (int y = 0; y < m_display_maxy; y++) + if (m_display_cache[y] != active_state[y]) + { + if (m_display_segmask[y] != 0) + output().set_digit_value(y, active_state[y] & m_display_segmask[y]); + + const int mul = (m_display_maxx <= 10) ? 10 : 100; + for (int x = 0; x <= m_display_maxx; x++) + { + int state = active_state[y] >> x & 1; + char buf1[0x10]; // lampyx + char buf2[0x10]; // y.x + + if (x == m_display_maxx) + { + // always-on if selected + sprintf(buf1, "lamp%da", y); + sprintf(buf2, "%d.a", y); + } + else + { + sprintf(buf1, "lamp%d", y * mul + x); + sprintf(buf2, "%d.%d", y, x); + } + output().set_value(buf1, state); + output().set_value(buf2, state); + } + } + + memcpy(m_display_cache, active_state, sizeof(m_display_cache)); +} + +TIMER_DEVICE_CALLBACK_MEMBER(k28_state::display_decay_tick) +{ + // slowly turn off unpowered segments + for (int y = 0; y < m_display_maxy; y++) + for (int x = 0; x <= m_display_maxx; x++) + if (m_display_decay[y][x] != 0) + m_display_decay[y][x]--; + + display_update(); +} + +void k28_state::set_display_size(int maxx, int maxy) +{ + m_display_maxx = maxx; + m_display_maxy = maxy; +} + +void k28_state::set_display_segmask(UINT32 digits, UINT32 mask) +{ + // set a segment mask per selected digit, but leave unselected ones alone + for (int i = 0; i < 0x20; i++) + { + if (digits & 1) + m_display_segmask[i] = mask; + digits >>= 1; + } +} + +void k28_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +{ + set_display_size(maxx, maxy); + + // update current state + UINT32 mask = (1 << maxx) - 1; + for (int y = 0; y < maxy; y++) + m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; + + display_update(); +} + + + +/*************************************************************************** + + I/O, Address Map(s) + +***************************************************************************/ + +WRITE8_MEMBER(k28_state::mcu_p0_w) +{ + // d0,d1: phoneme high bits + // d0-d2: input mux high bits + m_inp_mux = (m_inp_mux & 0xf) | (~data << 4 & 0x70); + m_phoneme = (m_phoneme & 0xf) | (data << 4 & 0x30); + + // d3: SC-01 strobe, latch phoneme on rising edge + int strobe = data >> 3 & 1; + if (!strobe && m_speech_strobe) + m_speech->write(space, 0, m_phoneme); + m_speech_strobe = strobe; + + // d5: VFD driver data enable + m_vfd_data_enable = ~data >> 5 & 1; + if (m_vfd_data_enable) + m_vfd_shiftreg = (m_vfd_shiftreg & U64(~1)) | m_vfd_data_in; + + // d4: VSM chip enable + // d6: VSM M0 + // d7: VSM M1 + m_tms6100->cs_w(~data >> 4 & 1); + m_tms6100->m0_w(data >> 6 & 1); + m_tms6100->m1_w(data >> 7 & 1); + m_tms6100->clk_w(1); + m_tms6100->clk_w(0); +} + +READ8_MEMBER(k28_state::mcu_p1_r) +{ + UINT8 data = 0; + + // multiplexed inputs (active low) + for (int i = 0; i < 7; i++) + if (m_inp_mux >> i & 1) + { + data |= m_inp_matrix[i]->read(); + + // force press on-button at boot + if (i == 5 && m_onbutton_timer->enabled()) + data |= 1; + } + + return data ^ 0xff; +} + +READ8_MEMBER(k28_state::mcu_p2_r) +{ + // d3: VSM data + return (m_tms6100->data_line_r()) ? 8 : 0; +} + +WRITE8_MEMBER(k28_state::mcu_p2_w) +{ + // d0: VFD driver serial data + m_vfd_data_in = data & 1; + if (m_vfd_data_enable) + m_vfd_shiftreg = (m_vfd_shiftreg & U64(~1)) | m_vfd_data_in; + + // d0-d3: VSM data, input mux and SC-01 phoneme lower nibble + m_tms6100->add_w(space, 0, data); + m_inp_mux = (m_inp_mux & ~0xf) | (~data & 0xf); + m_phoneme = (m_phoneme & ~0xf) | (data & 0xf); +} + +WRITE8_MEMBER(k28_state::mcu_prog_w) +{ + // 8021 PROG: clock VFD driver + int state = (data) ? 1 : 0; + bool rise = state == 1 && !m_vfd_clock; + m_vfd_clock = state; + + // on rising edge + if (rise) + { + // leading 1 triggers shift start + if (m_vfd_shiftcount == 0 && ~m_vfd_shiftreg & 1) + return; + + // output shiftreg on 35th clock + if (m_vfd_shiftcount == 35) + { + m_vfd_shiftcount = 0; + + // output 0-15: digit segment data + UINT16 seg_data = (UINT16)(m_vfd_shiftreg >> 19); + seg_data = BITSWAP16(seg_data,0,1,13,9,10,12,14,8,3,4,5,2,15,11,6,7); + + // output 16-24: digit select + UINT16 digit_sel = (UINT16)(m_vfd_shiftreg >> 10) & 0x1ff; + set_display_segmask(0x1ff, 0x3fff); + display_matrix(16, 9, seg_data, digit_sel); + + // output 25: power-off request on falling edge + if (~m_vfd_shiftreg & m_vfd_shiftreg_out & 0x200) + power_off(); + m_vfd_shiftreg_out = m_vfd_shiftreg; + } + else + { + m_vfd_shiftreg <<= 1; + m_vfd_shiftcount++; + } + } +} + +READ8_MEMBER(k28_state::mcu_t1_r) +{ + // 8021 T1: SC-01 A/R pin + return m_speech->request(); +} + + +static ADDRESS_MAP_START( k28_mcu_map, AS_IO, 8, k28_state ) + AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_WRITE(mcu_p0_w) + AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READ(mcu_p1_r) + AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(mcu_p2_r, mcu_p2_w) + AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_WRITE(mcu_prog_w) + AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(mcu_t1_r) +ADDRESS_MAP_END + + + +/*************************************************************************** + + Inputs + +***************************************************************************/ + +static INPUT_PORTS_START( k28 ) + PORT_START("IN.0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("Yes/True") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME("No/False") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Select") + + PORT_START("IN.1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("Scroll") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("<") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Erase/Clear") + + PORT_START("IN.2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("Menu") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_NAME(">") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T') + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Enter/Start") + + PORT_START("IN.3") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("Prompt") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0") + + PORT_START("IN.4") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("Say It Again(Repeat)") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME(".") + + PORT_START("IN.5") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("On") PORT_CHANGED_MEMBER(DEVICE_SELF, k28_state, power_on, nullptr) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("=") + + PORT_START("IN.6") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") // -> auto_power_off + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") +INPUT_PORTS_END + + + +/*************************************************************************** + + Machine Config + +***************************************************************************/ + +static MACHINE_CONFIG_START( k28, k28_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", I8021, XTAL_3_579545MHz) + MCFG_CPU_IO_MAP(k28_mcu_map) + + MCFG_DEVICE_ADD("tms6100", TMS6100, XTAL_3_579545MHz) // CLK tied to 8021 ALE pin + + MCFG_TIMER_ADD_NONE("on_button") + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", k28_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_k28) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_DEVICE_ADD("speech", VOTRAX_SC01, 760000) // measured 760kHz on its RC pin + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) +MACHINE_CONFIG_END + + + +/*************************************************************************** + + ROM Defs, Game driver(s) + +***************************************************************************/ + +ROM_START( k28 ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "p8021", 0x0000, 0x0400, CRC(15536d20) SHA1(fac98ce652340ffb2d00952697c3a9ce75393fa4) ) + + ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff? = space reserved for cartridge + ROM_LOAD( "cm62050.vsm", 0x0000, 0x4000, CRC(6afb8645) SHA1(e22435568ed11c6516a3b4008131f99cd4e47aa9) ) + ROM_LOAD( "cm62051.vsm", 0x4000, 0x4000, CRC(0fa61baa) SHA1(831be669423ba60c7f85a896b4b09a1295478bd9) ) +ROM_END + + + +COMP( 1981, k28, 0, 0, k28, k28, driver_device, 0, "Tiger Electronics", "K28: Talking Learning Computer (model 7-230)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp index 494b5db608e..b9c25759145 100644 --- a/src/mame/drivers/kaneko16.cpp +++ b/src/mame/drivers/kaneko16.cpp @@ -3342,6 +3342,69 @@ ROM_START( gtmra ) /* Not present on this board */ ROM_END +ROM_START( gtmrb ) + ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */ + ROM_LOAD16_BYTE( "mmp0x1.u514", 0x000000, 0x080000, CRC(6c163f12) SHA1(7f33d1475dcb754c83f68b5fb686fb236ba81256) ) + ROM_LOAD16_BYTE( "mmp1x1.u513", 0x000001, 0x080000, CRC(424dc7e1) SHA1(a9cb8d1fd0549c8c77462552c649c180c30eef89) ) + + ROM_REGION( 0x020000, "mcudata", 0 ) /* MCU Code */ + ROM_LOAD16_WORD_SWAP( "mmd0x1.u124", 0x000000, 0x020000, CRC(3d7cb329) SHA1(053106acde642a414fde0b01105fe6762b6a10f6) ) // == mmd0x2 + + ROM_REGION( 0x840000, "gfx1", 0 ) /* Sprites */ + ROM_LOAD( "mm-200-402-s0.bin", 0x000000, 0x200000, CRC(c0ab3efc) SHA1(e6cd15480977b036234d91e6f3a6e21b7f0a3c3e) ) + ROM_LOAD( "mm-201-403-s1.bin", 0x200000, 0x200000, CRC(cf6b23dc) SHA1(ccfd0b17507e091e55c169361cd6a6b19641b717) ) + ROM_LOAD( "mm-202-404-s2.bin", 0x400000, 0x200000, CRC(8f27f5d3) SHA1(219a86446ce2556682009d8aff837480f040a01e) ) + ROM_LOAD( "mm-203-405-s3.bin", 0x600000, 0x080000, CRC(e9747c8c) SHA1(2507102ec34755c6f110eadb3444e6d3a3474051) ) + ROM_LOAD16_BYTE( "mms1x1.u30", 0x800001, 0x020000, CRC(9463825c) SHA1(696bbfc816b564b3cff1487e1b848d375951f923) ) + ROM_LOAD16_BYTE( "mms0x1.u29", 0x800000, 0x020000, CRC(bd22b7d2) SHA1(ef82d00d72439590c71aed33ecfabc6ee71a6ff9) ) // == mms0x2 + + ROM_REGION( 0x200000, "gfx2", 0 ) /* Tiles (scrambled) */ + ROM_LOAD( "mm-300-406-a0.bin", 0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) ) + + ROM_REGION( 0x200000, "gfx3", 0 ) /* Tiles (scrambled) */ + ROM_COPY("gfx2",0x000000,0,0x200000) // it isn't on the board twice. + + ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */ + ROM_LOAD( "mm-100-401-e0.bin", 0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) ) // 16 x $10000 + + ROM_REGION( 0x100000, "oki2", ROMREGION_ERASE00 ) /* Samples */ + /* Not present on this board */ +ROM_END + + +ROM_START( gtmro ) + ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */ + ROM_LOAD16_BYTE( "u514.bin", 0x000000, 0x080000, CRC(2e857685) SHA1(43b6d88df51a3b4fb0cb910f63a5ec26b06e216a) ) + ROM_LOAD16_BYTE( "u513.bin", 0x000001, 0x080000, CRC(d5003870) SHA1(6a4353fa8f94a119c23f232861d790f50be26ea8) ) + + ROM_REGION( 0x020000, "mcudata", 0 ) /* MCU Code */ + ROM_LOAD16_WORD_SWAP( "mmd0x0.u124", 0x000000, 0x020000, CRC(e1f6159e) SHA1(e4af85036756482d6fa27494842699e2647809c7) ) + + ROM_REGION( 0x800000, "gfx1", 0 ) /* Sprites */ + ROM_LOAD16_BYTE( "mm200-e.bin", 0x000000, 0x100000, CRC(eb104408) SHA1(a7805597161dc5acd2804d607dd0acac0c40111d) ) + ROM_LOAD16_BYTE( "mm200-o.bin", 0x000001, 0x100000, CRC(b6d04e7c) SHA1(1fa9d6b967724ed0c9e6ae3eda7089a081120d54) ) + ROM_LOAD16_BYTE( "mm201-e.bin", 0x200000, 0x100000, CRC(b8c64e14) SHA1(8e2b19f0ba715dfdf0d423a41989e715145adbeb) ) + ROM_LOAD16_BYTE( "mm201-o.bin", 0x200001, 0x100000, CRC(3ecd6c0a) SHA1(cb48564e2bd3014eeaad9cfa589bdef3f828c282) ) + ROM_LOAD16_BYTE( "mm202-e.bin", 0x400000, 0x100000, CRC(f0fd5688) SHA1(a3f5edfef253c81b27434519b0b9527f6c9a6e82) ) + ROM_LOAD16_BYTE( "mm202-o.bin", 0x400001, 0x100000, CRC(e0fe1b2b) SHA1(e66bd09eed6dfea524d8610a3c7e1792a1ff6286) ) + ROM_LOAD16_BYTE( "mm203-e.bin", 0x600000, 0x100000, CRC(b9001f28) SHA1(b112c17b960a535a543565ca2e22734c7c510f18) ) + ROM_LOAD16_BYTE( "mm203-o.bin", 0x600001, 0x100000, CRC(2ed6227d) SHA1(d9abbb739ef15437194c90cd01d5d82dbd4b7859) ) + + ROM_REGION( 0x200000, "gfx2", 0 ) /* Tiles (scrambled) */ + ROM_LOAD16_BYTE( "mm300-e.u53", 0x000000, 0x100000, CRC(f9ee708d) SHA1(4c11a9574ea815a87d7e4af04db4368b14bf7530) ) + ROM_LOAD16_BYTE( "mm300-o.u54", 0x000001, 0x100000, CRC(76299353) SHA1(01997905ba019d770ac1998633f4ebf6f91a3945) ) + + ROM_REGION( 0x200000, "gfx3", 0 ) /* Tiles (scrambled) */ + ROM_COPY("gfx2",0x000000,0,0x200000) // it isn't on the board twice. + + ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */ + ROM_LOAD( "mm-100-401-e0.bin", 0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) ) // 16 x $10000 + + ROM_REGION( 0x100000, "oki2", ROMREGION_ERASE00 ) /* Samples */ + /* Not present on this board */ +ROM_END + + /* The evolution and USA versions seem to be more like GTMR 1.5, they have some fairly significant changes */ /* This version displays: @@ -4346,8 +4409,10 @@ GAME( 1993, wingforc, 0, wingforc, wingforc, kaneko16_state, kan GAME( 1994, bonkadv, 0, bonkadv , bonkadv, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "B.C. Kid / Bonk's Adventure / Kyukyoku!! PC Genjin", MACHINE_SUPPORTS_SAVE ) GAME( 1994, bloodwar, 0, bloodwar, bloodwar, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Blood Warrior", MACHINE_SUPPORTS_SAVE ) GAME( 1994, oedfight, bloodwar, bloodwar, bloodwar, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Oedo Fight (Japan Bloodshed Ver.)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, gtmr, 0, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/07/18)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, gtmr, 0, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/07/18)", MACHINE_SUPPORTS_SAVE ) // this set shows 'PCB by Jinwei Co Ltd. ROC' GAME( 1994, gtmra, gtmr, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/06/13)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, gtmrb, gtmr, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/05/26)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, gtmro, gtmr, gtmr, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "1000 Miglia: Great 1000 Miles Rally (94/05/10)", MACHINE_SUPPORTS_SAVE ) // possible prototype GAME( 1994, gtmre, gtmr, gtmre, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Great 1000 Miles Rally: Evolution Model!!! (94/09/06)", MACHINE_SUPPORTS_SAVE ) GAME( 1994, gtmrusa, gtmr, gtmre, gtmr, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Great 1000 Miles Rally: U.S.A Version! (94/09/06)", MACHINE_SUPPORTS_SAVE ) // U.S.A version seems part of the title, rather than region GAME( 1995, gtmr2, 0, gtmr2, gtmr2, kaneko16_gtmr_state, gtmr, ROT0, "Kaneko", "Mille Miglia 2: Great 1000 Miles Rally (95/05/24)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/kchamp.cpp b/src/mame/drivers/kchamp.cpp index 49b65cf2f19..913b14a16f7 100644 --- a/src/mame/drivers/kchamp.cpp +++ b/src/mame/drivers/kchamp.cpp @@ -481,10 +481,10 @@ static MACHINE_CONFIG_START( kchamp, kchamp_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/8) + MCFG_SOUND_ADD("ay1", AY8910, XTAL_12MHz/12) /* Guess based on actual pcb recordings of karatedo */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/8) + MCFG_SOUND_ADD("ay2", AY8910, XTAL_12MHz/12) /* Guess based on actual pcb recordings of karatedo */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) MCFG_DAC_ADD("dac") diff --git a/src/mame/drivers/kurukuru.cpp b/src/mame/drivers/kurukuru.cpp index a9354ecea56..1bbce2e5bb4 100644 --- a/src/mame/drivers/kurukuru.cpp +++ b/src/mame/drivers/kurukuru.cpp @@ -1,10 +1,9 @@ // license:BSD-3-Clause // copyright-holders:Roberto Fresca, hap -/****************************************************************************** +/*********************************************************************************** KURU KURU PYON PYON - Taiyo Jidoki / Success - + Success / Taiyo Jidoki Driver by Roberto Fresca & hap. @@ -16,7 +15,7 @@ ports, descriptions and a lot of things... :) -******************************************************************************* +************************************************************************************ Technical Notes.... @@ -114,12 +113,16 @@ AB = NEC C1663C 8926B. -******************************************************************************* +************************************************************************************ General Notes.... - The game name could be translated as "Croak Croak Hop Hop" - Kuru is the frog sound, and Pyon is the sound of jumps. + There are at least 4 games in the Pyon Pyon series... + + 1) Pyon Pyon (a marathon game with froggy characters). + 2) Kuru Kuru Pyon Pyon (a kind of slots game with the same froggy characters). + 3) Pyon Pyon Jyanpu (a contents where the same characters try to cross the river jumping on pads). + 4) Sui Sui Pyon Pyon (a swimming competition where the same characters swim with different styles, even walking). Coin 1 (key 5) could be set either as Coin 1 or as Payout button, through a DIP switch. @@ -129,12 +132,19 @@ will be cleared). -******************************************************************************* +************************************************************************************ - * How to play... + Games Notes: + ------------ - Insert tokens (medals)... + * Kuru Kuru Pyon Pyon: + The game name could be translated as "Croak Croak Hop Hop" + Kuru is the frog sound, and Pyon is the sound of jumps. + + How to play... + + Insert tokens (medals). You can bet to any (or all) of the following 5 characters: Bote, Oume, Pyoko, Kunio, and Pyon Pyon. Press start, and the reels start to roll. You'll win if you can get 3 of the choosen character(s) in a row, column or diagonal. @@ -146,8 +156,7 @@ Red tadpoles are a bonus. Once you get one, it will go to the right panel, revealing a number. This number represents the extra credits you won. - - * Bookkeeping... + Bookkeeping... Pressing Bookkeeping key (key 9), you enter the Bookkeeping Mode. There are 2 screens with all the game information like DIP switches and statistics... @@ -168,30 +177,73 @@ Pressing the Bookkeeping key once more, you exit the mode and go back to the game. + ---------------------------------------------------------------------------------- + + * Pyon Pyon Jyanpu: + + The game name could be translated as "Hop Hop Jump" + Pyon is the sound of jumps. Jyanpu means jump. + + How to play... + + Insert tokens (medals). + You can bet to any (or all) of the following 5 characters: Boketa, Kunio, Pyon-Pyon, + Pyokorin and Botechin. Press start, and the river's pads start to roll. You'll win + if your character gets the three pads to jump to the other side of the river. + + There is also a bonus game with a black tadpole rounding some pads with extra credits. + you'll get the extra credits marked in the pad where the tadpole stopped. + + Bookkeeping... + + Pressing Bookkeeping key (key 9), you enter the Bookkeeping Mode. There are + 2 screens with all the game information like DIP switches and statistics... + + 1st screen... + + - [Left panel]: All the DIP switches parameters. + + - [Right panel]: Bet and Win totals, 100Y/10Y/medal IN/OUT, total of games, + won, loss, won by paid range, and 'omake' (extra/bonus). + + 2nd screen (press Bookkeeping key again)... + + - Win distribution by character + (Boketa, Kunio, Pyon-Pyon, Pyokorin and Botechin). + + - Bet distribution (1, 2, 3, 4, 5~10) + + - Omake (bonus) distribution (games total, win games, loss games) + + Pressing the Bookkeeping key once more, you exit the mode and go back to the game. + -******************************************************************************* +************************************************************************************ ADPCM Samples.... - There are 14 samples in the system. + There are 14 samples in Kuru Kuru Pyon Pyon. - 00: "Boterin" + 00: "Botechin" 01: - 02: "Hakase" ("professor") + 02: "Hakase" (professor) 03: "Pyokorin" 04: "Kunio" - 05: "Pyon Pyon" - 06: + 05: "Pyon-Pyon" + 06: "Boketa" 07: 08: "Oume" - 09: "Haipaa" ("hyper") - 10: "Ichi ni tsuite" ("on your marks") - 11: "Youi" ("get ready") - 12: Bang sound for the tadpoles landing in the right panel. + 09: "Haipaa" (hyper) + 10: "Ichi ni tsuite" (on your marks) + 11: "Youi" (get ready) + 12: "Bang" (sound for the tadpoles landing in the right panel). 13: Sound effect for reels when running. + The fact that there are samples for "on your marks", "get ready", and "bang", + make me think that these sounds could be shared with the other unemulated marathon + game of the series called just "Pyon Pyon". -******************************************************************************/ +***********************************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" @@ -363,6 +415,44 @@ static ADDRESS_MAP_START( kurukuru_io, AS_IO, 8, kurukuru_state ) AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_DEVWRITE("ym2149", ay8910_device, data_w) ADDRESS_MAP_END +static ADDRESS_MAP_START( ppj_map, AS_PROGRAM, 8, kurukuru_state ) + AM_RANGE(0x0000, 0x5fff) AM_ROM + AM_RANGE(0x6000, 0xdfff) AM_ROMBANK("bank1") + AM_RANGE(0xe000, 0xffff) AM_RAM AM_SHARE("nvram") +ADDRESS_MAP_END + +static ADDRESS_MAP_START( ppj_io, AS_IO, 8, kurukuru_state ) + ADDRESS_MAP_GLOBAL_MASK(0xff) + AM_RANGE(0x00, 0x00) AM_MIRROR(0x0f) AM_WRITE(kurukuru_bankswitch_w) + AM_RANGE(0x10, 0x13) AM_MIRROR(0x0c) AM_DEVREADWRITE( "v9938", v9938_device, read, write ) + AM_RANGE(0x30, 0x30) AM_MIRROR(0x0f) AM_WRITE(kurukuru_soundlatch_w) + AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_READ_PORT("DSW1") + AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_WRITE(kurukuru_out_latch_w) + AM_RANGE(0x60, 0x60) AM_MIRROR(0x0f) AM_READ_PORT("IN1") + AM_RANGE(0x70, 0x70) AM_MIRROR(0x0f) AM_READ_PORT("IN0") + AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x0f) AM_DEVWRITE("ym2149", ay8910_device, address_w) + AM_RANGE(0xc8, 0xc8) AM_MIRROR(0x0f) AM_DEVREAD("ym2149", ay8910_device, data_r) + AM_RANGE(0xd0, 0xd0) AM_MIRROR(0x0f) AM_DEVWRITE("ym2149", ay8910_device, data_w) +ADDRESS_MAP_END +/* + + 00h W --> bankswitching reg... + + 10h W --> 00's \ + 11h W --> 02 8f 20 91... > V9938 OK + 13h W --> / + + 30h W --> soundlatch... + 40h R --> (very begining) seems DSW1 + 50h W --> Output port (counters) + 60h R --> Input port + 70h R --> Input port + + C0h W --> YM2149 address W + C8h R --> YM2149 data R --> DSW2 + D0h W --> YM2149 data W + +*/ // Audio CPU @@ -401,12 +491,12 @@ READ8_MEMBER(kurukuru_state::kurukuru_adpcm_timer_irqack_r) } -static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, kurukuru_state ) +static ADDRESS_MAP_START( kurukuru_audio_map, AS_PROGRAM, 8, kurukuru_state ) AM_RANGE(0x0000, 0xf7ff) AM_ROM AM_RANGE(0xf800, 0xffff) AM_RAM ADDRESS_MAP_END -static ADDRESS_MAP_START( audio_io, AS_IO, 8, kurukuru_state ) +static ADDRESS_MAP_START( kurukuru_audio_io, AS_IO, 8, kurukuru_state ) ADDRESS_MAP_GLOBAL_MASK(0x7f) AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_WRITE(kurukuru_adpcm_data_w) AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_WRITE(kurukuru_adpcm_reset_w) @@ -414,6 +504,23 @@ static ADDRESS_MAP_START( audio_io, AS_IO, 8, kurukuru_state ) AM_RANGE(0x70, 0x70) AM_MIRROR(0x0f) AM_READ(kurukuru_adpcm_timer_irqack_r) ADDRESS_MAP_END +static ADDRESS_MAP_START( ppj_audio_map, AS_PROGRAM, 8, kurukuru_state ) + AM_RANGE(0x0000, 0xf7ff) AM_ROM + AM_RANGE(0xf800, 0xffff) AM_RAM +ADDRESS_MAP_END + +static ADDRESS_MAP_START( ppj_audio_io, AS_IO, 8, kurukuru_state ) + ADDRESS_MAP_GLOBAL_MASK(0x7f) + AM_RANGE(0x20, 0x20) AM_MIRROR(0x0f) AM_WRITE(kurukuru_adpcm_data_w) + AM_RANGE(0x30, 0x30) AM_MIRROR(0x0f) AM_WRITE(kurukuru_adpcm_reset_w) + AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_READ(kurukuru_soundlatch_r) + AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_READ(kurukuru_adpcm_timer_irqack_r) +ADDRESS_MAP_END +/* + 30h -W --> 0x0b + 40h R- --> soundlatch... + 50h R- --> adpcm irq ack +*/ /* YM2149 ports */ WRITE8_MEMBER(kurukuru_state::ym2149_aout_w) @@ -436,13 +543,13 @@ static INPUT_PORTS_START( kurukuru ) /* bits d0-d3 are JAMMA top side pins 20,21,22,23, bits d4-d7 are JAMMA bottom side pins 20,21,22,23 so that's player 1 left/right/button1/button2 then player 2 left/right/button1/button2 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("1st (Bote)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("1st (Bote/Botechin)") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("2nd (Oume)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("3rd (Pyoko)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("3rd (Pyoko/Pyokorin)") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_V) PORT_NAME("4th (Kunio)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("5th (Pyon Pyon)") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_N) PORT_NAME("Unknown A0h - bit5") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CODE(KEYCODE_M) PORT_NAME("Unknown A0h - bit6") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("5th (Pyon-Pyon)") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("Unknown A0h - bit5") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("Unknown A0h - bit6") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_START("IN1") @@ -511,6 +618,81 @@ static INPUT_PORTS_START( kurukuru ) INPUT_PORTS_END +static INPUT_PORTS_START( ppj ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("1st (Boketa)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("2nd (Kunio)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_C) PORT_NAME("3rd (Pyon-Pyon)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_V) PORT_NAME("4th (Pyokorin)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_B) PORT_NAME("5th (Botechin)") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("Unknown 70h - bit5") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("Unknown 70h - bit6") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Bookkeeping") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Medal In") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Reset Button") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("Unknown 60h - bit4") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE (2) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) // hopper feedback + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + + PORT_START("DSW1") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings) + PORT_DIPNAME( 0x07, 0x03, "Coinage A (100 Y)" ) PORT_DIPLOCATION("DSW1:1,2,3") + PORT_DIPSETTING( 0x00, "1 Coin / 1 Medal" ) + PORT_DIPSETTING( 0x04, "1 Coin / 2 Medal" ) + PORT_DIPSETTING( 0x02, "1 Coin / 3 Medal" ) + PORT_DIPSETTING( 0x06, "1 Coin / 4 Medal" ) + PORT_DIPSETTING( 0x01, "1 Coin / 5 Medal" ) + PORT_DIPSETTING( 0x05, "1 Coin / 6 Medal" ) + PORT_DIPSETTING( 0x03, "1 Coin / 10 Medal" ) + PORT_DIPSETTING( 0x07, "1 Coin / 11 Medal" ) + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:4") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x00, "Unknown (related to coin1/payout)") PORT_DIPLOCATION("DSW1:5") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x00, "Coinage Config" ) PORT_DIPLOCATION("DSW1:6") + PORT_DIPSETTING( 0x00, "Coin 1 = Normal" ) + PORT_DIPSETTING( 0x20, "Coin 1 = Payout" ) + PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("DSW1:7") + PORT_DIPSETTING( 0x40, "Manual" ) + PORT_DIPSETTING( 0x00, "Automatic" ) + PORT_DIPNAME( 0x80, 0x00, "Repeat Last Bet") PORT_DIPLOCATION("DSW1:8") + PORT_DIPSETTING( 0x80, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + + PORT_START("DSW2") // found in the PCB: 00000000 (arranged for sale since they are uncommon settings) + PORT_DIPNAME( 0x07, 0x01, "Percentage" ) PORT_DIPLOCATION("DSW2:1,2,3") + PORT_DIPSETTING( 0x07, "50%" ) + PORT_DIPSETTING( 0x03, "60%" ) + PORT_DIPSETTING( 0x05, "70%" ) + PORT_DIPSETTING( 0x01, "75%" ) + PORT_DIPSETTING( 0x06, "80%" ) + PORT_DIPSETTING( 0x02, "85%" ) + PORT_DIPSETTING( 0x04, "90%" ) + PORT_DIPSETTING( 0x00, "95%" ) + PORT_DIPNAME( 0x08, 0x00, "Winwave" ) PORT_DIPLOCATION("DSW2:4") + PORT_DIPSETTING( 0x08, "Small" ) + PORT_DIPSETTING( 0x00, "Big" ) + PORT_DIPNAME( 0x10, 0x00, "M.Medal" ) PORT_DIPLOCATION("DSW2:5") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x60, 0x60, "HG" ) PORT_DIPLOCATION("DSW2:6,7") + PORT_DIPSETTING( 0x60, "20-1" ) + PORT_DIPSETTING( 0x20, "50-1" ) + PORT_DIPSETTING( 0x40, "100-1" ) + PORT_DIPSETTING( 0x00, "200-1" ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + +INPUT_PORTS_END + + /************************************************* * Machine Start & Reset Routines * *************************************************/ @@ -537,8 +719,8 @@ static MACHINE_CONFIG_START( kurukuru, kurukuru_state ) MCFG_CPU_IO_MAP(kurukuru_io) MCFG_CPU_ADD("audiocpu", Z80, CPU_CLOCK) - MCFG_CPU_PROGRAM_MAP(audio_map) - MCFG_CPU_IO_MAP(audio_io) + MCFG_CPU_PROGRAM_MAP(kurukuru_audio_map) + MCFG_CPU_IO_MAP(kurukuru_audio_io) MCFG_NVRAM_ADD_0FILL("nvram") @@ -564,12 +746,48 @@ static MACHINE_CONFIG_START( kurukuru, kurukuru_state ) MACHINE_CONFIG_END -/*************************************************************************** +static MACHINE_CONFIG_START( ppj, kurukuru_state ) - Game driver(s) + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu",Z80, CPU_CLOCK) + MCFG_CPU_PROGRAM_MAP(ppj_map) + MCFG_CPU_IO_MAP(ppj_io) -***************************************************************************/ + MCFG_CPU_ADD("audiocpu", Z80, CPU_CLOCK) + MCFG_CPU_PROGRAM_MAP(ppj_audio_map) + MCFG_CPU_IO_MAP(ppj_audio_io) + + MCFG_NVRAM_ADD_0FILL("nvram") + + /* video hardware */ + MCFG_V9938_ADD("v9938", "screen", VDP_MEM, MAIN_CLOCK) + MCFG_V99X8_INTERRUPT_CALLBACK(WRITELINE(kurukuru_state,kurukuru_vdp_interrupt)) + MCFG_V99X8_SCREEN_ADD_NTSC("screen", "v9938", MAIN_CLOCK) + + MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(HOPPER_PULSE), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW ) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("ym2149", YM2149, YM2149_CLOCK) + MCFG_AY8910_PORT_B_READ_CB(IOPORT("DSW2")) + MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(kurukuru_state, ym2149_aout_w)) + MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(kurukuru_state, ym2149_bout_w)) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) + MCFG_SOUND_ADD("adpcm", MSM5205, M5205_CLOCK) + MCFG_MSM5205_VCLK_CB(WRITELINE(kurukuru_state, kurukuru_msm5205_vck)) + MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S48_4B) /* changed on the fly */ + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) +MACHINE_CONFIG_END + + +/************************************************* +* ROMs Loading * +*************************************************/ + +/* Kuru Kuru Pyon Pyon. + 1990, Success / Taiyo Jidoki. +*/ ROM_START( kurukuru ) ROM_REGION( 0x08000, "maincpu", 0 ) ROM_LOAD( "kp_17l.ic17", 0x00000, 0x08000, CRC(9b552ebc) SHA1(07d0e62b7fdad381963a345376b72ad31eb7b96d) ) // program code @@ -590,6 +808,10 @@ ROM_START( kurukuru ) ROM_LOAD( "7908b-4.ic32", 0x0600, 0x0034, CRC(bddf925e) SHA1(861cf5966444d0c0392241e5cfa08db475fb439a) ) ROM_END +/* Pyon Pyon Jyanpu. + Ver 1.40. + 199?, Success / Taiyo Jidoki. +*/ ROM_START( ppj ) ROM_REGION( 0x08000, "maincpu", 0 ) ROM_LOAD( "ppj17.ic17", 0x00000, 0x08000, CRC(5d9c9ceb) SHA1(0f52c8a0aaaf978afeb07e56493399133b4ce781) ) // program code @@ -611,6 +833,15 @@ ROM_START( ppj ) ROM_END -/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ -GAME( 199?, kurukuru, 0, kurukuru, kurukuru, driver_device, 0, ROT0, "Success / Taiyo Jidoki", "Kuru Kuru Pyon Pyon (Japan)", 0 ) -GAME( 199?, ppj, 0, kurukuru, kurukuru, driver_device, 0, ROT0, "Success / Taiyo Jidoki", "Pyon Pyon Jump (Japan)", MACHINE_NOT_WORKING ) +/*************************************************************************** +* Game Drivers * +***************************************************************************/ + +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ +GAME( 1990, kurukuru, 0, kurukuru, kurukuru, driver_device, 0, ROT0, "Success / Taiyo Jidoki", "Kuru Kuru Pyon Pyon (Japan)", 0 ) +GAME( 199?, ppj, 0, ppj, ppj, driver_device, 0, ROT0, "Success / Taiyo Jidoki", "Pyon Pyon Jyanpu (V1.40, Japan)", 0 ) + +// unemulated.... + +// 199?, Success / Taiyo Jidoki, Pyon Pyon +// 1990, Success / Taiyo Jidoki, Sui Sui Pyon Pyon diff --git a/src/mame/drivers/ladyfrog.cpp b/src/mame/drivers/ladyfrog.cpp index 9a4782366d9..cf99c2192eb 100644 --- a/src/mame/drivers/ladyfrog.cpp +++ b/src/mame/drivers/ladyfrog.cpp @@ -365,7 +365,24 @@ ROM_START( toucheme ) ROM_LOAD( "8.ic10", 0x20000, 0x10000, CRC(fc6808bf) SHA1(f1f1b75a79dfdb500012f9b52c6364f0a13dce2d) ) ROM_END +ROM_START( touchemea ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "2.ic107", 0x0000, 0x10000, CRC(4e72312d) SHA1(a7d178608f05c87a53c650298b903bcf34b3b755) ) // sldh + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "1.ic115", 0x0000, 0x8000, CRC(902589aa) SHA1(d60088fc31a67fec91f908f671af77bb87a5e59c) ) + + ROM_REGION( 0x60000, "gfx1", ROMREGION_INVERT ) + ROM_LOAD( "3.ic32", 0x30000, 0x10000, CRC(223b4435) SHA1(fb5a4096012093bae5fda213a5de317e63a88ec3) ) + ROM_LOAD( "4.ic33", 0x40000, 0x10000, CRC(96dcc2f3) SHA1(9c61f8161771e40ca41b6e102bc04583dc97cd0d) ) + ROM_LOAD( "5.ic34", 0x50000, 0x10000, CRC(b8667a6b) SHA1(288a5cbd8fc01b24822e89fbc1e6d7f45c181483) ) + ROM_LOAD( "6.ic8", 0x00000, 0x10000, CRC(d257382f) SHA1(9c459b90c9ddfe90de4a252f29a7bee809412b46) ) + ROM_LOAD( "7.ic9", 0x10000, 0x10000, CRC(feb1b974) SHA1(ffd4527472cdf655fbebebf4d3abb61962e54457) ) + ROM_LOAD( "8.ic10", 0x20000, 0x10000, CRC(fc6808bf) SHA1(f1f1b75a79dfdb500012f9b52c6364f0a13dce2d) ) +ROM_END + GAME( 1990, ladyfrog, 0, ladyfrog, ladyfrog, driver_device, 0, ORIENTATION_SWAP_XY, "Mondial Games", "Lady Frog", MACHINE_SUPPORTS_SAVE ) // toucheme art style is similar to ladyfrog, so it's probably the same manufacturer -GAME( 19??, toucheme, 0, toucheme, toucheme, driver_device, 0, ORIENTATION_SWAP_XY, "<unknown>", "Touche Me", MACHINE_SUPPORTS_SAVE ) +GAME( 19??, toucheme, 0, toucheme, toucheme, driver_device, 0, ORIENTATION_SWAP_XY, "<unknown>", "Touche Me (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 19??, touchemea,toucheme, toucheme, toucheme, driver_device, 0, ORIENTATION_SWAP_XY, "<unknown>", "Touche Me (set 2, harder)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/laserbat.cpp b/src/mame/drivers/laserbat.cpp index 2d9ea56a2e4..3f3342c3ed0 100644 --- a/src/mame/drivers/laserbat.cpp +++ b/src/mame/drivers/laserbat.cpp @@ -62,23 +62,17 @@ * Service coin 1 input grants two credits the first time it's pushed, but remembers this and won't grant credits again unless unless you trigger the tilt input - * Flyer suggests there should be an "old lady" sprite, which is not - present in our ROM dump - * Sprite ROM is likely double size, banking could be controlled by - one of the many unused CSOUND bits, the NEG2 bit, or even H128 - * Judging by the PLA program, the colour weight resistors are likely - different to what Laser Battle/Lazarian uses - we need a detailed - colour photo of the game board or a schematic to confirm values + * The sprite ROM is twice the size as Laser Battle with the bank + selected using bit 9 of the 16-bit sound interface (there's a wire + making this connection visible on the component side of the PCB) + * If demo sounds are enabled (using DIP switches), background music + is played every sixth time through the attract loop * Sound board emulation is based on tracing the program and guessing what's connected where - we really need someone to trace out the 1b11107 sound board if we want to get this right TODO: - work out where all the magic layer offsets come from - - catnmous sprite ROM appears to be underdumped - - need to confirm colour weight resistors on catnmous (detailed photo required): - R58, R59, R60, R61, R62, R65, R66, R67, R68, R69, R72, R73, R74, R75 - (network connected between 11M, 12M, Q5, Q7, Q8) - sound in laserbat (with schematics) and in catnmous */ @@ -89,6 +83,8 @@ #include "cpu/m6800/m6800.h" #include "cpu/s2650/s2650.h" +#include "machine/clock.h" + WRITE8_MEMBER(laserbat_state_base::ct_io_w) { @@ -201,14 +197,6 @@ static ADDRESS_MAP_START( laserbat_io_map, AS_IO, 8, laserbat_state_base ) ADDRESS_MAP_END -static ADDRESS_MAP_START( catnmous_sound_map, AS_PROGRAM, 8, catnmous_state ) - AM_RANGE(0x0000, 0x007f) AM_RAM - AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia", pia6821_device, read, write) - AM_RANGE(0xc000, 0xcfff) AM_ROM - AM_RANGE(0xe000, 0xffff) AM_ROM -ADDRESS_MAP_END - - static INPUT_PORTS_START( laserbat_base ) PORT_START("ROW0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) @@ -465,13 +453,6 @@ void laserbat_state::machine_start() save_item(NAME(m_keys)); } -void catnmous_state::machine_start() -{ - laserbat_state_base::machine_start(); - - save_item(NAME(m_cb1)); -} - void laserbat_state_base::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { switch (id) @@ -499,9 +480,6 @@ static MACHINE_CONFIG_START( laserbat_base, laserbat_state_base ) MCFG_SCREEN_UPDATE_DRIVER(laserbat_state_base, screen_update_laserbat) MCFG_SCREEN_PALETTE("palette") - MCFG_PALETTE_ADD("palette", 256) - MCFG_PALETTE_INIT_OWNER(laserbat_state_base, laserbat) - MCFG_PLS100_ADD("gfxmix") MCFG_DEVICE_ADD("pvi1", S2636, XTAL_14_31818MHz/3) @@ -522,6 +500,10 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED_CLASS( laserbat, laserbat_base, laserbat_state ) + // video hardware + MCFG_PALETTE_ADD("palette", 256) + MCFG_PALETTE_INIT_OWNER(laserbat_state, laserbat) + // sound board devices MCFG_SPEAKER_STANDARD_MONO("mono") @@ -540,36 +522,24 @@ static MACHINE_CONFIG_DERIVED_CLASS( laserbat, laserbat_base, laserbat_state ) MCFG_SN76477_ENVELOPE_PARAMS(0, 1) // GND, Vreg MCFG_SN76477_ENABLE(0) // AB SOUND - MCFG_TMS3615_ADD("synth_high", XTAL_4MHz/16/2) // from the other one's /2 clock output + MCFG_TMS3615_ADD("synth_low", XTAL_4MHz/16/2) // from the other one's /2 clock output MCFG_SOUND_ROUTE(TMS3615_FOOTAGE_8, "mono", 1.0) - MCFG_TMS3615_ADD("synth_low", XTAL_4MHz/16) // 4MHz divided down with a 74LS161 + MCFG_TMS3615_ADD("synth_high", XTAL_4MHz/16) // 4MHz divided down with a 74LS161 MCFG_SOUND_ROUTE(TMS3615_FOOTAGE_8, "mono", 1.0) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED_CLASS( catnmous, laserbat_base, catnmous_state ) - // sound board devices - MCFG_CPU_ADD("audiocpu", M6802, 3580000) // ? - MCFG_CPU_PROGRAM_MAP(catnmous_sound_map) - MCFG_CPU_PERIODIC_INT_DRIVER(catnmous_state, cb1_toggle, (double)3580000/4096) - - MCFG_DEVICE_ADD("pia", PIA6821, 0) - MCFG_PIA_READPA_HANDLER(READ8(catnmous_state, pia_porta_r)) - MCFG_PIA_WRITEPA_HANDLER(WRITE8(catnmous_state, pia_porta_w)) - MCFG_PIA_WRITEPB_HANDLER(WRITE8(catnmous_state, pia_portb_w)) - MCFG_PIA_IRQA_HANDLER(WRITELINE(catnmous_state, pia_irqa)) - MCFG_PIA_IRQB_HANDLER(WRITELINE(catnmous_state, pia_irqb)) + // video hardware + MCFG_PALETTE_ADD("palette", 256) + MCFG_PALETTE_INIT_OWNER(catnmous_state, catnmous) + // sound board devices MCFG_SPEAKER_STANDARD_MONO("mono") - - MCFG_SOUND_ADD("psg1", AY8910, 3580000/2) // ? - MCFG_AY8910_PORT_B_READ_CB(READ8(catnmous_state, psg1_portb_r)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) - - MCFG_SOUND_ADD("psg2", AY8910, 3580000/2) // ? - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + MCFG_ZACCARIA_1B11107("audiopcb") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MACHINE_CONFIG_END @@ -703,17 +673,13 @@ ROM_START( catnmous ) ROM_LOAD( "type01.10g", 0x0800, 0x0800, CRC(e5259f9b) SHA1(396753291ab36c3ed72208d619665fc0f33d1e17) ) ROM_LOAD( "type01.11g", 0x1000, 0x0800, CRC(2999f378) SHA1(929082383b2b0006de171587adb932ce57316963) ) - ROM_REGION( 0x0800, "gfx2", 0 ) - // This needs double checking, might be a case of the wrong ROM type being marked on the PCB like with the final program rom. - // Flyers indicate there should be an 'old lady' character, and even show a graphic for one approaching from the right. - // This graphic is not present in our ROM and instead we get incorrect looking sprites, so the rom could be half size with - // an additional sprite bank bit coming from somewhere? - ROM_LOAD( "type01.14l", 0x0000, 0x0800, BAD_DUMP CRC(af79179a) SHA1(de61af7d02c93be326a33ee51572e3da7a25dab0) ) + ROM_REGION( 0x1000, "gfx2", 0 ) + ROM_LOAD( "cat'n_mouse-type01-mem_n.14l.14l", 0x0000, 0x1000, CRC(83502383) SHA1(9561f87e1a6425bb9544e71340336db8d43c1fd9) ) ROM_REGION( 0x0100, "gfxmix", 0 ) ROM_LOAD( "82s100.13m", 0x0000, 0x00f5, CRC(6b724cdb) SHA1(8a0ca3b171b103661a3b2fffbca3d7162089e243) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) ROM_LOAD( "sound01.1f", 0xc000, 0x1000, CRC(473c44de) SHA1(ff08b02d45a2c23cabb5db716aa203225a931424) ) ROM_LOAD( "sound01.1d", 0xe000, 0x1000, CRC(f65cb9d0) SHA1(a2fe7563c6da055bf6aa20797b2d9fa184f0133c) ) ROM_LOAD( "sound01.1e", 0xf000, 0x1000, CRC(1bd90c93) SHA1(20fd2b765a42e25cf7f716e6631b8c567785a866) ) @@ -748,15 +714,14 @@ ROM_START( catnmousa ) ROM_LOAD( "catnmous.10g", 0x0800, 0x0800, CRC(e5259f9b) SHA1(396753291ab36c3ed72208d619665fc0f33d1e17) ) ROM_LOAD( "catnmous.11g", 0x1000, 0x0800, CRC(2999f378) SHA1(929082383b2b0006de171587adb932ce57316963) ) - ROM_REGION( 0x0800, "gfx2", 0 ) - // see comment in parent set - ROM_LOAD( "catnmous.14l", 0x0000, 0x0800, BAD_DUMP CRC(af79179a) SHA1(de61af7d02c93be326a33ee51572e3da7a25dab0) ) + ROM_REGION( 0x1000, "gfx2", 0 ) + ROM_LOAD( "cat'n_mouse-type01-mem_n.14l.14l", 0x0000, 0x1000, CRC(83502383) SHA1(9561f87e1a6425bb9544e71340336db8d43c1fd9) ) ROM_REGION( 0x0100, "gfxmix", 0 ) // copied from parent set to give working graphics, need dump to confirm ROM_LOAD( "catnmousa_82s100.13m", 0x0000, 0x00f5, CRC(6b724cdb) SHA1(8a0ca3b171b103661a3b2fffbca3d7162089e243) BAD_DUMP ) - ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) ROM_LOAD( "snd.1f", 0xc000, 0x1000, CRC(473c44de) SHA1(ff08b02d45a2c23cabb5db716aa203225a931424) ) ROM_LOAD( "snd.1d", 0xe000, 0x1000, CRC(f65cb9d0) SHA1(a2fe7563c6da055bf6aa20797b2d9fa184f0133c) ) ROM_LOAD( "snd.1e", 0xf000, 0x1000, CRC(1bd90c93) SHA1(20fd2b765a42e25cf7f716e6631b8c567785a866) ) @@ -765,5 +730,5 @@ ROM_END GAME( 1981, laserbat, 0, laserbat, laserbat, laserbat_state_base, laserbat, ROT0, "Zaccaria", "Laser Battle", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1981, lazarian, laserbat, laserbat, lazarian, laserbat_state_base, laserbat, ROT0, "Zaccaria (Bally Midway license)", "Lazarian", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, catnmous, 0, catnmous, catnmous, laserbat_state_base, laserbat, ROT90, "Zaccaria", "Cat and Mouse (set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, catnmousa, catnmous, catnmous, catnmous, laserbat_state_base, laserbat, ROT90, "Zaccaria", "Cat and Mouse (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, catnmous, 0, catnmous, catnmous, laserbat_state_base, laserbat, ROT90, "Zaccaria", "Cat and Mouse (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, catnmousa, catnmous, catnmous, catnmous, laserbat_state_base, laserbat, ROT90, "Zaccaria", "Cat and Mouse (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp index 91b05cf42b5..6c48e8786d0 100644 --- a/src/mame/drivers/m5.cpp +++ b/src/mame/drivers/m5.cpp @@ -1,26 +1,267 @@ // license:BSD-3-Clause -// copyright-holders:Curt Coder +// copyright-holders:Curt Coder, Ales Dlabac /*************************************************************************** Sord m.5 http://www.retropc.net/mm/m5/ - http://www.museo8bits.es/wiki/index.php/Sord_M5 - http://k5.web.klfree.net/content/view/10/11/ - http://k5.web.klfree.net/images/stories/sord/m5heap.htm + http://www.museo8bits.es/wiki/index.php/Sord_M5 not working + http://k5.web.klfree.net/content/view/10/11/ not working + http://k5.web.klfree.net/images/stories/sord/m5heap.htm not working + http://k5.klfree.net/index.php?option=com_content&task=view&id=5&Itemid=3 + http://k5.klfree.net/index.php?option=com_content&task=view&id=10&Itemid=11 + http://k5.klfree.net/index.php?option=com_content&task=view&id=14&Itemid=3 + http://www.dlabi.cz/?s=sord + https://www.facebook.com/groups/59667560188/ + http://www.oldcomp.cz/viewtopic.php?f=103&t=1164 ****************************************************************************/ -/* +/*************************************************************************** TODO: - - floppy + - fd5 floppy - SI-5 serial interface (8251, ROM) - - 64KB RAM expansions - + - ramdisk for KRX Memory expansion + - add to brno mod support for lzr floppy disc format + - move dipswitch declaration to sofwarelist file? + - in brno mod include basic-i + - 64krx: get windows ROM version with cpm & ramdisk support (Stuchlik S.E.I. version) + + + + CHANGELOG: + +5.2.2016 + - added BRNO modification - 1024kB Ramdisk + CP/M support + - 32/64KB RAM expansions EM-5, 64KBI, 64KBF, 64KRX + - since now own version of rom and slot handlers + - 2 slots for carts + + +****************************************************************************** + + +Controlling (paging) of homebrew 64KB RAM carts +================================================ + +Used ports: +EM-64, 64KBI: OUT 6CH,00H - enables ROM + OUT 6CH,01H - enables RAM +64KBF: OUT 30H,00000xxxB - enables RAM or ROM, see bellow +64KRD, 64KRX: OUT 7FH,00000000B - enables RAM + OUT 7FH,11111111B - enables ROM + OUT 7FH,xxxxxxxxB - enables RAM and ROM, see bellow + +=========================================================================================================================== + +RAM/ROM modes of EM-64/64KBI cart +------------------------------------------ +mode 0: 0x0000-0x6fff ROM 0x7000-0xffff RAM (it is possible to limit actual ROM size by DIP switch only to 32kb) +mode 1: 0x0000-0xffff RAM + +=========================================================================================================================== + +RAM/ROM modes of 64KBF version 2C cart +------------------------------------------ +Memory paging is done by using "OUT &30,mod". + +MODE READ WRITE +---------------------------------------------------------------------- + 00 8 KB MON + 20 KB BF + 36 KB RAM 28 KB DIS + 36 KB RAM + 01 64 KB RAM 64 KB RAM + 02 8 KB MON + 56 KB RAM 64 KB RAM + 03 64 KB RAM 28 KB DIS + 36 KB RAM + 04 64 KB RAM 16 KB DIS + 48 KB RAM + 05 8 KB MON + 20 KB BF + 36 KB RAM 64 KB RAM + 06 8 KB MON + 20 KB DIS + 36 KB RAM 64 KB RAM + 07 64 KB DIS 64 KB DIS + +Version LZR ( 2C ) +================ + ++------------+ +|////////////| READ ONLY AREA ++------------+ +|\\\\\\\\\\\\| WRITE ONLY AREA ++------------+ +|XXXXXXXXXXXX| R&W AREA ++------------+ +| | DISABLED R&W ++------------+ + + 0 0 0 1 1 2 2 2 3 3 4 4 4 5 5 6 6 +kB 0 4 8 2 6 0 4 8 2 6 0 4 8 2 6 0 4 + +-------+-------------------+ +ROM |MONITOR| BASIC-F | + +-------+-------+-------+---+---+-------+-------+-------+-------+ +RAM | | | | | | | | | + +-------+-------+-------+-------+-------+-------+-------+-------+ +CART | | | | | | | | | + +-------+-------+-------+-------+-------+-------+-------+-------+ + + +Mode + +-------+-------------------+ + |///////|///////////////////| + +-------+-------+-------+---+---+-------+-------+-------+-------+ +M0 | | | | |XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + +-------+-------+-------+-------+-------+-------+-------+-------+ + + +-------+-------------------+ + | | | + +-------+-------+-------+---+---+-------+-------+-------+-------+ +M1 |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + +-------+-------+-------+-------+-------+-------+-------+-------+ + + +-------+-------------------+ + |///////| | + +-------+-------+-------+---+---+-------+-------+-------+-------+ +M2 |\\\\\\\|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + +-------+-------+-------+-------+-------+-------+-------+-------+ + + +-------+-------------------+ + | | | + +-------+-------+-------+---+---+-------+-------+-------+-------+ +M3 |///////|///////|///////|///|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + +-------+-------+-------+-------+-------+-------+-------+-------+ + + +-------+-------------------+ + | | | + +-------+-------+-------+---+---+-------+-------+-------+-------+ +M4 |///////|///////|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + +-------+-------+-------+-------+-------+-------+-------+-------+ + + +-------+-------------------+ + |///////|///////////////////| + +-------+-------+-------+---+---+-------+-------+-------+-------+ +M5 |\\\\\\\|\\\\\\\|\\\\\\\|\\\|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + +-------+-------+-------+-------+-------+-------+-------+-------+ + + +-------+-------------------+ + |///////| | + +-------+-------+-------+---+---+-------+-------+-------+-------+ +M6 |\\\\\\\|\\\\\\\|\\\\\\\|\\\|XXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + +-------+-------+-------+---+---+-------+-------+-------+-------+ + |///////|///////|///| + +-------+-------+---+ + + +-------+-------------------+ + | | | + +-------+-------+-------+---+---+-------+-------+-------+-------+ +M7 | | | | | | | | | + +-------+-------+-------+-------+-------+-------+-------+-------+ + |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| + +---------------------------------------------------------------+ + +=========================================================================================================== + +Memory map of ROM and RAM in configuration SORD M5 + 64 KRX memory cart +----------------------------------------------------------------------- + + cart inside Sord inside Sord cart cart +FFFF +----------+ +----------+ +----------+ +----------+ +----------+ + | | | | | | + | | | EPROM 16K| | EPROM 16K| + | | | 5 | | 7 | +C000 | DRAM | +----------+ +----------+ + | | | | | | + | | | EPROM 16K| | EPROM 16K| + | | | 4 | | 6 | +7FFF +----------+ +----------+ +----------+ +----------+ + | SRAM | +7000 +----------+ +----------+ + | | +6000 | | +----------+ + | | | | +5000 | | | EPROM 8K | + | | | 3 | +4000 | | +----------+ +----------+ + | | | | +3000 | DRAM | | EPROM 8K | + | | | 2 | +2000 | | +----------+ + | | | | +1000 | | | EPROM 8K | + | | | 1 | +0000 +----------+ +----------+ +----------+ +----------+ +----------+ + +1 - MONITOR ROM +2 - WINDOWS + BASIC-F 3rd part +3 - BASIC-I +4 - 2nd part of BASIC-F + 1st part of BASIC-F +5 - 1st part of BASIC-G + 2nd part of BASIC-G +6 - 1st part of MSX 1.C +7 - 2nd part of MSX 1.C + +Note: position 3 could be replaced with SRAM 8KB with battery power backup! + +Upon powering up either SRAM + 1,2,3,4,5 or SRAM + 1,2,3,6,7 are selected. +Switching between 4,5 and 6,7 is provided by hw switch, selecting ROM/RAM mode happens +using OUT (7FH),A, where each bit of A means 8KB memory chunk ( state: 0=RAM, +1=ROM, bit: 0=1, 1=2, 2=3, 3=always SRAM, 4=4, 5=5, 6=6, 7=7 ). + + */ +/* +************************************************************* +* BRNO MOD * +************************************************************* +HW and SW was originaly created by Pavel Brychta with help of Jiri Kubin and L. Novak +This driver mod was implemented by Ales Dlabac with great help of Pavel Brychta. Without him this would never happen +This mod exists in two versions. First one is "windows"(brno_rom12.rom) version and was created by Ladislav Novak. +Second version vesion is "pure text" and was created by Pavel Brychta and Jiri Kubin + +Function: +Whole Sord's address area (0000-FFFF) is divided to 16 4kB banks. To this 16 banks +you can map any of possible 256 ramdisc blocks what allows user to have 1024kB large ramdisc. +Ofcourse to be able to realise this is necessary page out all roms + +As pagination port MMU(page select) is used. +For RAM write protection port CASEN is used. 0=access to ramdisk enabled, 0xff=ramdisk access disabled(data protection), &80=ROM2+48k RAM, &81=ROM2+4k RAM(this is not implemented) +For ROM detaching port RAMEN is used. 0=rom enable; 0xff=rom+sord ram disabled (ramdisk visible) + +SORD M5 RAM memory map in address area 7000H-7FFFH +7000H 7300H 7800H 7E00H 7FFFH + +---------+-----------------------+----------------------------+---------+ + | a. | | c. | d. | + +a. SORD system variables and stack +c. Area where the first sector of 1st track is loaded, simultaneously is reserved for Hook program +d. Reserved for memory tests and ramdisk mapping(pagination). After boot is used as buffer for cursor position, + type of floppy and so on. Area consists of: + +7FFFH .... bootloader version +7FFEH .... identification byte of floppy - is transfered from EPROM, it might be changed by SETUP +7FFDH .... namber of last Ramdisk segment of RAM +7FFBH .... address of cursor in VRAM in 40 columns CRT. For 80 columns CRT both bytes are zero +7FF9H .... X,Y cursor actual position for 40 columns CRTs. In case of 80 columns CRT both bytes are zero + +System floppy disk header on track 00 of 1st sector + byte 0-1 ... system disk identification SY + byte 2 ... # of physical sectors for BIOS or DOS plus # of segments for DIR + byte 3-4 ... Start address for loading of BIOS or DOS + byte 5 ... # of bytes for possible HOOK program + byte 6- ... HOOK program, or either BIOS or DOS + +In case of HOOK, bytes 8 and 9 contains characters 'H' and 'O' for HOOK testing + +Few other notes: + Ramdisc warm boot is provided by pressing Ctrl+C + Against real HW/SW is possible to store ramdisc dump to file by pressing Ctrl+S which could be loaded back in as snapshot + + + Floppy formats as follows: + + A: Ramdisk 1024kB, 8 sectors, + B: Floppy format "Heat Magnolia" SingleSide SingleDensity , 40 tracks, 9 sectors, 512 sec. length, 128 dirs, offset 3, 166kB + C: Floppy format "Robotron aka PC1715", DS DD, 80 tracks, 5 sectors, 1024 sec. length, 128 dirs, offset 2, 780kB + +**********************************************************************************************************************************/ + + #include "emu.h" #include "cpu/z80/z80.h" @@ -31,14 +272,17 @@ #include "bus/centronics/ctronics.h" #include "machine/i8255.h" #include "machine/ram.h" +#include "machine/wd_fdc.h" //brno mod #include "machine/upd765.h" #include "machine/z80ctc.h" #include "sound/sn76496.h" #include "video/tms9928a.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" -#include "includes/m5.h" +#include "bus/m5/slot.h" +#include "bus/m5/rom.h" #include "softlist.h" +#include "includes/m5.h" + + //************************************************************************** @@ -232,6 +476,211 @@ WRITE8_MEMBER( m5_state::fd5_tc_w ) m_fdc->tc_w(false); } +//************************************************************************** +// 64KBI support for oldest memory module +//************************************************************************** + +READ8_MEMBER( m5_state::mem64KBI_r ) //in 0x6c +{ + return BIT(m_ram_mode, 0); +} + +WRITE8_MEMBER( m5_state::mem64KBI_w ) //out 0x6c +{ + + if (m_ram_type != MEM64KBI) return; + + address_space &program = m_maincpu->space(AS_PROGRAM); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); + memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str()); + + if (m_ram_mode == BIT(data, 0)) + return; + + m_ram_mode = BIT(data, 0); + + //if 32kb only mode don't map top ram + if (m_ram_mode && (m_DIPS->read() & 4) != 4) + { + program.install_ram(0x0000, 0x6fff, ram_region->base()); + } + else + { + program.install_rom(0x0000, 0x1fff, memregion(Z80_TAG)->base()); + program.unmap_write(0x0000, 0x1fff); + + //if AUTOSTART is on don't load any ROM cart + if (m_cart && (m_DIPS->read() & 2) != 2) + { + program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom), (m5_cart_slot_device*)m_cart)); //m_cart pointer to rom cart + program.unmap_write(0x2000, 0x3fff); + } + else + program.unmap_readwrite(0x2000, 0x3fff); + } + + logerror("64KBI: ROM %s", m_ram_mode == 0 ? "enabled\n" : "disabled\n"); +} + +//************************************************************************** +// 64KBF paging +//************************************************************************** + +WRITE8_MEMBER( m5_state::mem64KBF_w ) //out 0x30 +{ + if (m_ram_type != MEM64KBF) return; + + address_space &program = m_maincpu->space(AS_PROGRAM); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); //ROM region of the cart + memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str()); //RAM region of the cart + memory_region *rom_region=memregion(region_tag.assign(m_cart->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); //region where clasic ROM cartridge resides + + if (m_ram_mode == data) + return; + + m_ram_mode = data; + + switch(m_ram_mode) + { + case 0: + program.unmap_write(0x0000, 0x6fff); + membank("bank1r")->set_base(memregion(Z80_TAG)->base()); + membank("bank2r")->set_base(m_cart_rom->base()); + membank("bank3r")->set_base(m_cart_rom->base()+0x2000); + membank("bank4r")->set_base(m_cart_rom->base()+0x4000); + membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000); + break; + case 1: + program.install_write_bank(0x0000,0x1fff,"bank1w"); + program.install_write_bank(0x2000,0x3fff,"bank2w"); + program.install_write_bank(0x4000,0x5fff,"bank3w"); + program.install_write_bank(0x6000,0x6fff,"bank4w"); + membank("bank1r")->set_base(ram_region->base()+0x0000); membank("bank1w")->set_base(ram_region->base()+0x0000); + membank("bank2r")->set_base(ram_region->base()+0x2000); membank("bank2w")->set_base(ram_region->base()+0x2000); + membank("bank3r")->set_base(ram_region->base()+0x4000); membank("bank3w")->set_base(ram_region->base()+0x4000); + membank("bank4r")->set_base(ram_region->base()+0x6000); membank("bank4w")->set_base(ram_region->base()+0x6000); + membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000); + break; + case 2: + program.install_write_bank(0x0000,0x1fff,"bank1w"); + program.install_write_bank(0x2000,0x3fff,"bank2w"); + program.install_write_bank(0x4000,0x5fff,"bank3w"); + program.install_write_bank(0x6000,0x6fff,"bank4w"); + membank("bank1r")->set_base(memregion(Z80_TAG)->base()); membank("bank1w")->set_base(ram_region->base()+0x0000); + membank("bank2r")->set_base(ram_region->base()+0x2000); membank("bank2w")->set_base(ram_region->base()+0x2000); + membank("bank3r")->set_base(ram_region->base()+0x4000); membank("bank3w")->set_base(ram_region->base()+0x4000); + membank("bank4r")->set_base(ram_region->base()+0x6000); membank("bank4w")->set_base(ram_region->base()+0x6000); + membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000); + break; + case 3: + program.unmap_write(0x0000, 0x6fff); + membank("bank1r")->set_base(ram_region->base()+0x0000); + membank("bank2r")->set_base(ram_region->base()+0x2000); + membank("bank3r")->set_base(ram_region->base()+0x4000); + membank("bank4r")->set_base(ram_region->base()+0x6000); + membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000); + break; + case 4: + program.unmap_write(0x0000, 0x3fff); + program.install_write_bank(0x4000,0x5fff,"bank3w"); + program.install_write_bank(0x6000,0x6fff,"bank4w"); + membank("bank1r")->set_base(ram_region->base()+0x0000); + membank("bank2r")->set_base(ram_region->base()+0x2000); + membank("bank3r")->set_base(ram_region->base()+0x4000); membank("bank3w")->set_base(ram_region->base()+0x4000); + membank("bank4r")->set_base(ram_region->base()+0x6000); membank("bank4w")->set_base(ram_region->base()+0x6000); + membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000); + break; + case 5: + program.install_write_bank(0x0000,0x1fff,"bank1w"); + program.install_write_bank(0x2000,0x3fff,"bank2w"); + program.install_write_bank(0x4000,0x5fff,"bank3w"); + program.install_write_bank(0x6000,0x6fff,"bank4w"); + membank("bank1r")->set_base(memregion(Z80_TAG)->base()); membank("bank1w")->set_base(ram_region->base()+0x0000); + membank("bank2r")->set_base(m_cart_rom->base()); membank("bank2w")->set_base(ram_region->base()+0x2000); + membank("bank3r")->set_base(m_cart_rom->base()+0x2000); membank("bank3w")->set_base(ram_region->base()+0x4000); + membank("bank4r")->set_base(m_cart_rom->base()+0x4000); membank("bank4w")->set_base(ram_region->base()+0x6000); + membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000); + break; + case 6: + program.install_write_bank(0x0000,0x1fff,"bank1w"); + program.install_write_bank(0x2000,0x3fff,"bank2w"); + program.install_write_bank(0x4000,0x5fff,"bank3w"); + program.install_write_bank(0x6000,0x6fff,"bank4w"); + membank("bank1r")->set_base(memregion(Z80_TAG)->base()); membank("bank1w")->set_base(ram_region->base()+0x0000); + membank("bank2r")->set_base(rom_region->base()+0x0000); membank("bank2w")->set_base(ram_region->base()+0x2000); + membank("bank3r")->set_base(rom_region->base()+0x2000); membank("bank3w")->set_base(ram_region->base()+0x4000); + membank("bank4r")->set_base(rom_region->base()+0x4000); membank("bank4w")->set_base(ram_region->base()+0x6000); + membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000); + break; + case 7: //probably this won't work - it should redirect rw to another ram module + program.install_write_bank(0x0000,0x1fff,"bank1w"); + program.install_write_bank(0x2000,0x3fff,"bank2w"); + program.install_write_bank(0x4000,0x5fff,"bank3w"); + program.install_write_bank(0x6000,0x6fff,"bank4w"); + program.install_readwrite_bank(0x7000,0x7fff,"sram"); + membank("bank1r")->set_base(rom_region->base()+0x0000); membank("bank1w")->set_base(rom_region->base()+0x0000); + membank("bank2r")->set_base(rom_region->base()+0x2000); membank("bank2w")->set_base(rom_region->base()+0x2000); + membank("bank3r")->set_base(rom_region->base()+0x4000); membank("bank3w")->set_base(rom_region->base()+0x4000); + membank("bank4r")->set_base(rom_region->base()+0x6000); membank("bank4w")->set_base(rom_region->base()+0x6000); + membank("sram")->set_base(rom_region->base()+0x7000); + membank("bank5r")->set_base(rom_region->base()+0x8000); membank("bank5w")->set_base(rom_region->base()+0x8000); + membank("bank6r")->set_base(rom_region->base()+0xc000); membank("bank6w")->set_base(rom_region->base()+0xc000); + break; + } + + logerror("64KBF RAM mode set to %d\n", m_ram_mode); +} + +//************************************************************************** +// 64KRX paging +//************************************************************************** + +WRITE8_MEMBER( m5_state::mem64KRX_w ) //out 0x7f +{ + + if (m_ram_type != MEM64KRX) return; + if (m_ram_mode == data) return; + + address_space &program = m_maincpu->space(AS_PROGRAM); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); + memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str()); + + m_ram_mode = data; + + BIT(m_ram_mode, 0) ? membank("bank1r")->set_base(memregion(Z80_TAG)->base()) : membank("bank1r")->set_base(ram_region->base()); + BIT(m_ram_mode, 1) ? membank("bank2r")->set_base(m_cart_rom->base()) : membank("bank2r")->set_base(ram_region->base()+0x2000); + BIT(m_ram_mode, 2) ? membank("bank3r")->set_base(m_cart_rom->base()+0x2000) : membank("bank3r")->set_base(ram_region->base()+0x4000); + + if ((m_DIPS->read() & 0x01)) + { + BIT(m_ram_mode, 4) ? membank("bank5r")->set_base(m_cart_rom->base()+0x6000) : membank("bank5r")->set_base(ram_region->base()+0x8000); + BIT(m_ram_mode, 5) ? membank("bank6r")->set_base(m_cart_rom->base()+0xa000) : membank("bank6r")->set_base(ram_region->base()+0xc000); + } + else + { + BIT(m_ram_mode, 6) ? membank("bank5r")->set_base(m_cart_rom->base()+0xe000) : membank("bank5r")->set_base(ram_region->base()+0x8000); + BIT(m_ram_mode, 7) ? membank("bank6r")->set_base(m_cart_rom->base()+0x12000): membank("bank6r")->set_base(ram_region->base()+0xc000); + } + + //if KRX ROM is paged out page in cart ROM if any + if (m_cart && BIT(m_ram_mode, 1) == 0 ) + { + program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart)); + program.unmap_write(0x2000, 0x6fff); + } + + logerror("64KRX RAM mode set to %02x\n", m_ram_mode); +} //************************************************************************** @@ -244,10 +693,13 @@ WRITE8_MEMBER( m5_state::fd5_tc_w ) static ADDRESS_MAP_START( m5_mem, AS_PROGRAM, 8, m5_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x0000, 0x1fff) AM_ROM - //AM_RANGE(0x2000, 0x6fff) // mapped by the cartslot - AM_RANGE(0x7000, 0x7fff) AM_RAM - AM_RANGE(0x8000, 0xffff) AM_RAM + AM_RANGE(0x0000, 0x1fff) AM_READ_BANK("bank1r") AM_WRITE_BANK("bank1w") //monitor rom(bios) + AM_RANGE(0x2000, 0x3fff) AM_READ_BANK("bank2r") AM_WRITE_BANK("bank2w") + AM_RANGE(0x4000, 0x5fff) AM_READ_BANK("bank3r") AM_WRITE_BANK("bank3w") + AM_RANGE(0x6000, 0x6fff) AM_READ_BANK("bank4r") AM_WRITE_BANK("bank4w") + AM_RANGE(0x7000, 0x7fff) AM_RAM //4kb internal RAM + AM_RANGE(0x8000, 0xbfff) AM_READ_BANK("bank5r") AM_WRITE_BANK("bank5w") + AM_RANGE(0xc000, 0xffff) AM_READ_BANK("bank6r") AM_WRITE_BANK("bank6w") ADDRESS_MAP_END @@ -262,7 +714,7 @@ static ADDRESS_MAP_START( m5_io, AS_IO, 8, m5_state ) AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write) AM_RANGE(0x11, 0x11) AM_MIRROR(0x0e) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write) AM_RANGE(0x20, 0x20) AM_MIRROR(0x0f) AM_DEVWRITE(SN76489AN_TAG, sn76489a_device, write) - AM_RANGE(0x30, 0x30) AM_MIRROR(0x08) AM_READ_PORT("Y0") // 64KBF bank select + AM_RANGE(0x30, 0x30) AM_MIRROR(0x08) AM_READ_PORT("Y0") AM_WRITE( mem64KBF_w) // 64KBF paging AM_RANGE(0x31, 0x31) AM_MIRROR(0x08) AM_READ_PORT("Y1") AM_RANGE(0x32, 0x32) AM_MIRROR(0x08) AM_READ_PORT("Y2") AM_RANGE(0x33, 0x33) AM_MIRROR(0x08) AM_READ_PORT("Y3") @@ -273,9 +725,9 @@ static ADDRESS_MAP_START( m5_io, AS_IO, 8, m5_state ) AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_DEVWRITE("cent_data_out", output_latch_device, write) AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_READWRITE(sts_r, com_w) // AM_RANGE(0x60, 0x63) SIO -// AM_RANGE(0x6c, 0x6c) EM-64/64KBI bank select - AM_RANGE(0x70, 0x73) AM_MIRROR(0x0c) AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write) -// AM_RANGE(0x7f, 0x7f) 64KRD/64KRX bank select + AM_RANGE(0x6c, 0x6c) AM_READWRITE(mem64KBI_r, mem64KBI_w) //EM-64/64KBI paging + AM_RANGE(0x70, 0x73) /*AM_MIRROR(0x0c) don't know if necessary mirror this*/ AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write) + AM_RANGE(0x7f, 0x7f) AM_WRITE( mem64KRX_w) //64KRD/64KRX paging ADDRESS_MAP_END @@ -396,6 +848,17 @@ static INPUT_PORTS_START( m5 ) PORT_START("RESET") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Reset") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) /* 1st line, 1st key from right! */ + + PORT_START("DIPS") + PORT_DIPNAME(0x01, 0x01, "KRX: BASIC[on]/MSX[off]") //switching between BASIC and MSX ROMs which share same address area + PORT_DIPSETTING( 0x00, DEF_STR( Off )) + PORT_DIPSETTING( 0x01, DEF_STR( On )) + PORT_DIPNAME(0x02, 0x00, "KBI: AUTOSTART") //pages out cart and starts loading from tape + PORT_DIPSETTING( 0x00, DEF_STR( Off )) + PORT_DIPSETTING( 0x02, DEF_STR( On )) + PORT_DIPNAME(0x04, 0x00, "KBI: 32kb only") //compatible with em-5 + PORT_DIPSETTING( 0x00, DEF_STR( Off )) + PORT_DIPSETTING( 0x04, DEF_STR( On )) INPUT_PORTS_END //------------------------------------------------- @@ -421,7 +884,7 @@ READ8_MEMBER( m5_state::ppi_pa_r ) return m_fd5_data; } -READ8_MEMBER( m5_state::ppi_pc_r ) +READ8_MEMBER(m5_state::ppi_pc_r ) { /* @@ -511,6 +974,11 @@ static SLOT_INTERFACE_START( m5_floppies ) SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) SLOT_INTERFACE_END +static SLOT_INTERFACE_START(m5_cart) + SLOT_INTERFACE_INTERNAL("std", M5_ROM_STD) + SLOT_INTERFACE_INTERNAL("ram", M5_ROM_RAM) +SLOT_INTERFACE_END + //------------------------------------------------- // z80_daisy_config m5_daisy_chain //------------------------------------------------- @@ -518,54 +986,422 @@ SLOT_INTERFACE_END static const z80_daisy_config m5_daisy_chain[] = { { Z80CTC_TAG }, - { nullptr } + { NULL } }; +//------------------------------------------------- +// BRNO mod code below +//------------------------------------------------- -//************************************************************************** -// MACHINE INITIALIZATION -//************************************************************************** //------------------------------------------------- -// MACHINE_START( m5 ) +// ADDRESS_MAP( m5_mem_brno ) //------------------------------------------------- -void m5_state::machine_start() + +static ADDRESS_MAP_START( m5_mem_brno, AS_PROGRAM, 8, brno_state ) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0000, 0x0fff) AM_READWRITE_BANK("bank1") + AM_RANGE(0x1000, 0x1fff) AM_READWRITE_BANK("bank2") + AM_RANGE(0x2000, 0x2fff) AM_READWRITE_BANK("bank3") + AM_RANGE(0x3000, 0x3fff) AM_READWRITE_BANK("bank4") + AM_RANGE(0x4000, 0x4fff) AM_READWRITE_BANK("bank5") + AM_RANGE(0x5000, 0x5fff) AM_READWRITE_BANK("bank6") + AM_RANGE(0x6000, 0x6fff) AM_READWRITE_BANK("bank7") + AM_RANGE(0x7000, 0x7fff) AM_READWRITE_BANK("bank8") + AM_RANGE(0x8000, 0x8fff) AM_READWRITE_BANK("bank9") + AM_RANGE(0x9000, 0x9fff) AM_READWRITE_BANK("bank10") + AM_RANGE(0xa000, 0xafff) AM_READWRITE_BANK("bank11") + AM_RANGE(0xb000, 0xbfff) AM_READWRITE_BANK("bank12") + AM_RANGE(0xc000, 0xcfff) AM_READWRITE_BANK("bank13") + AM_RANGE(0xd000, 0xdfff) AM_READWRITE_BANK("bank14") + AM_RANGE(0xe000, 0xefff) AM_READWRITE_BANK("bank15") + AM_RANGE(0xf000, 0xffff) AM_READWRITE_BANK("bank16") +ADDRESS_MAP_END + +//------------------------------------------------- +// ADDRESS_MAP( brno_io ) +//------------------------------------------------- +static ADDRESS_MAP_START( brno_io, AS_IO, 8, brno_state ) + ADDRESS_MAP_UNMAP_HIGH + ADDRESS_MAP_GLOBAL_MASK(0xff) + AM_RANGE(0x00, 0x03) AM_MIRROR(0x0c) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write) + AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write) + AM_RANGE(0x11, 0x11) AM_MIRROR(0x0e) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write) + AM_RANGE(0x20, 0x20) AM_MIRROR(0x0f) AM_DEVWRITE(SN76489AN_TAG, sn76489a_device, write) + AM_RANGE(0x30, 0x30) AM_READ_PORT("Y0") + AM_RANGE(0x31, 0x31) AM_READ_PORT("Y1") + AM_RANGE(0x32, 0x32) AM_READ_PORT("Y2") + AM_RANGE(0x33, 0x33) AM_READ_PORT("Y3") + AM_RANGE(0x34, 0x34) AM_READ_PORT("Y4") + AM_RANGE(0x35, 0x35) AM_READ_PORT("Y5") + AM_RANGE(0x36, 0x36) AM_READ_PORT("Y6") + AM_RANGE(0x37, 0x37) AM_READ_PORT("JOY") + AM_RANGE(0x40, 0x40) AM_MIRROR(0x0f) AM_DEVWRITE("cent_data_out", output_latch_device, write) + AM_RANGE(0x50, 0x50) AM_MIRROR(0x0f) AM_READWRITE(sts_r, com_w) +// AM_RANGE(0x60, 0x63) // SIO + AM_RANGE(0x64, 0x67) AM_READWRITE(mmu_r, mmu_w) // MMU - page select (ramdisk memory paging) + AM_RANGE(0x68, 0x6b) AM_READWRITE(ramsel_r, ramsel_w) // CASEN 0=access to ramdisk enabled, 0xff=ramdisk access disabled(data protection), &80=ROM2+48k RAM, &81=ROM2+4k RAM + AM_RANGE(0x6c, 0x6f) AM_READWRITE(romsel_r, romsel_w) // RAMEN 0=rom enable; 0xff=rom+sord ram disabled (ramdisk visible) +// AM_RANGE(0x70, 0x73) AM_MIRROR(0x04) AM_DEVREADWRITE(I8255A_TAG, i8255_device, read, write) // PIO + AM_RANGE(0x78, 0x7b) AM_DEVREADWRITE(WD2797_TAG, wd_fdc_t, read, write) // WD2797 registers -> 78 - status/cmd, 79 - track #, 7a - sector #, 7b - data + AM_RANGE(0x7c, 0x7c) AM_READWRITE(fd_r, fd_w) // drive select +ADDRESS_MAP_END + + +READ8_MEMBER( brno_state::mmu_r ) +{ + return 0; +} + + +WRITE8_MEMBER( brno_state::mmu_w ) +{ + + m_ramcpu = m_maincpu->state_int(Z80_B); + m_rambank = ~data; //m_maincpu->state_int(Z80_A); + m_rammap[m_ramcpu >> 4]=m_rambank; + + + switch (m_ramcpu>>4) + { + case 0: membank("bank1")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 1: membank("bank2")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 2: membank("bank3")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 3: membank("bank4")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 4: membank("bank5")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 5: membank("bank6")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 6: membank("bank7")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 7: if (!m_romen) membank("bank8")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 8: membank("bank9")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 9: membank("bank10")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 10: membank("bank11")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 11: membank("bank12")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 12: membank("bank13")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 13: membank("bank14")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 14: membank("bank15")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + case 15: membank("bank16")->set_base(memregion(RAMDISK)->base()+(m_rambank << 12));break; + } + + //logerror("RAMdisk page change(CPURAM<=BANK): &%02X00<=%02X at address &%04X\n",m_ramcpu,m_rambank,m_maincpu->state_int(Z80_PC)-2); + + +} + +READ8_MEMBER( brno_state::ramsel_r ) +{ + return m_ramen; +} + + +WRITE8_MEMBER( brno_state::ramsel_w ) //out 6b +{ + //address_space &program = m_maincpu->space(AS_PROGRAM); + + if (!data) + m_ramen=true; + else + m_ramen=false; + + logerror("CASEN change: out (&6b),%x\n",data); +} + +READ8_MEMBER( brno_state::romsel_r ) +{ + return m_romen; +} + +WRITE8_MEMBER( brno_state::romsel_w ) //out 6c { address_space &program = m_maincpu->space(AS_PROGRAM); - // configure RAM - switch (m_ram->size()) + if (!data) { - case 4*1024: - program.unmap_readwrite(0x8000, 0xffff); - break; + program.install_rom(0x0000, 0x6fff, memregion(Z80_TAG)->base()); + program.unmap_write(0x0000, 0x6fff); + m_romen=true; + } - case 36*1024: - break; + else + { + program.install_readwrite_bank(0x0000, 0x0fff, "bank1"); + program.install_readwrite_bank(0x1000, 0x1fff, "bank2"); + program.install_readwrite_bank(0x2000, 0x2fff, "bank3"); + program.install_readwrite_bank(0x3000, 0x3fff, "bank4"); + program.install_readwrite_bank(0x4000, 0x4fff, "bank5"); + program.install_readwrite_bank(0x5000, 0x5fff, "bank6"); + program.install_readwrite_bank(0x6000, 0x6fff, "bank7"); + + m_romen=false; + } + + logerror("RAMEN change: out (&6c),%x\n",data); +} + + +//------------------------------------------------- +// FD port 7c - Floppy select +//------------------------------------------------- + +READ8_MEMBER( brno_state::fd_r ) +{ + return 0; +} + + +WRITE8_MEMBER( brno_state::fd_w ) +{ + floppy_image_device *floppy; + m_floppy = NULL; + int disk = 0; + + + floppy = m_floppy0->get_device(); + if (floppy) + { + if(BIT(data,0)) + { + m_floppy= floppy; + disk=1; + } + else + { + floppy->mon_w(1); + } + } + floppy = m_floppy1->get_device(); + if (floppy) + { + if(BIT(data,1)) + { + m_floppy= floppy; + disk=2; + } + else + { + floppy->mon_w(1); + } + } + + m_fdc->set_floppy(m_floppy); + if (m_floppy) + { + m_floppy->set_rpm(300); + m_floppy->mon_w(0); + logerror("Select floppy %d\n", disk); + } + +} + + + +FLOPPY_FORMATS_MEMBER( brno_state::floppy_formats ) + FLOPPY_DSK_FORMAT +FLOPPY_FORMATS_END + +static SLOT_INTERFACE_START( brno_floppies ) + SLOT_INTERFACE("35hd", FLOPPY_35_DD) +SLOT_INTERFACE_END + + +//------------------------------------------------- +// SNAPSHOT LOADER - BRNO +//------------------------------------------------- + +SNAPSHOT_LOAD_MEMBER( brno_state, brno ) +{ + + + UINT8* rmd = memregion(RAMDISK)->base(); + + + popmessage("Loading file %s\r\n", image.filename()); + //image.message(" aaaaa:%s",image.basename_noext()); + + + + if (strcmp(image.basename_noext(), "ramdump") == 0) + { + logerror("Dumping ramdisk to file.\r\n"); + } - case 68*1024: - break; + if (strcmp(image.filetype(), "rmd") == 0) + { + + + image.fread( rmd+0x10000, snapshot_size-0x10000); + + + // image.seterror(IMAGE_ERROR_INVALIDIMAGE, "Not a Z1013 image"); + // image.message(" Not a Z1013 image"); } + else + return IMAGE_INIT_FAIL; + - if (m_cart->exists()) - program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); + return IMAGE_INIT_PASS; +} + +//************************************************************************** +// MACHINE INITIALIZATION +//************************************************************************** + +//------------------------------------------------- +// MACHINE_START( m5 ) +//------------------------------------------------- +void m5_state::machine_start() +{ // register for state saving save_item(NAME(m_fd5_data)); save_item(NAME(m_fd5_com)); save_item(NAME(m_intra)); save_item(NAME(m_ibfa)); save_item(NAME(m_obfa)); + } - void m5_state::machine_reset() { + address_space &program = m_maincpu->space(AS_PROGRAM); + std::string region_tag; + + //is ram/rom cart plugged in? + if (m_cart1->exists()) + { + if (m_cart1->get_type() > 0) + m_cart_ram=m_cart1; + else + m_cart=m_cart1; + } + if (m_cart2->exists()) + { + if (m_cart2->get_type() > 0) + m_cart_ram=m_cart2; + else + m_cart=m_cart2; + } + // no cart inserted - there is nothing to do - not allowed in original Sord m5 + if (m_cart_ram == NULL && m_cart == NULL) + { + membank("bank1r")->set_base(memregion(Z80_TAG)->base()); + program.unmap_write(0x0000, 0x1fff); + // program.unmap_readwrite(0x2000, 0x6fff); //if you uncomment this line Sord starts cassete loading but it is not correct on real hw + program.unmap_readwrite(0x8000, 0xffff); + return; + } + + //cart is ram module + if (m_cart_ram->exists()) + { + m_ram_type=m_cart_ram->get_type(); + + m_cart_rom = memregion(region_tag.assign(m_cart_ram->tag()).append(M5SLOT_ROM_REGION_TAG).c_str()); + memory_region *ram_region=memregion(region_tag.assign(m_cart_ram->tag()).append(":ram").c_str()); + + switch (m_ram_type) + { + case EM_5: + program.install_readwrite_handler(0x8000, 0xffff, read8_delegate(FUNC(m5_cart_slot_device::read_ram),(m5_cart_slot_device*)m_cart_ram), write8_delegate(FUNC(m5_cart_slot_device::write_ram),(m5_cart_slot_device*)m_cart_ram)); + if (m_cart) + { + program.install_read_handler(0x2000, 0x6fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart)); + program.unmap_write(0x2000, 0x6fff); + } + break; + case MEM64KBI: + program.install_rom(0x0000, 0x1fff, memregion(Z80_TAG)->base()); + program.unmap_write(0x0000, 0x1fff); + program.install_ram(0x8000, 0xffff, ram_region->base()+0x8000); + + //if AUTOSTART is on then page out cart and start tape loading + if (m_cart && ((m_DIPS->read() & 2) != 2)) + { + program.install_read_handler(0x2000, 0x3fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart)); + program.unmap_write(0x2000, 0x3fff); + } + else + program.unmap_readwrite(0x2000, 0x6fff); //monitor rom is testing this area for 0xFFs otherwise thinks there is some ROM cart plugged in + + break; + case MEM64KBF: + program.unmap_write(0x0000, 0x6fff); + membank("bank1r")->set_base(memregion(Z80_TAG)->base()); + membank("bank2r")->set_base(m_cart_rom->base()); + membank("bank3r")->set_base(m_cart_rom->base()+0x2000); + membank("bank4r")->set_base(m_cart_rom->base()+0x4000); + membank("bank5r")->set_base(ram_region->base()+0x8000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(ram_region->base()+0xc000); membank("bank6w")->set_base(ram_region->base()+0xc000); + break; + case MEM64KRX: + membank("bank1r")->set_base(memregion(Z80_TAG)->base()); membank("bank1w")->set_base(ram_region->base()); + membank("bank2r")->set_base(m_cart_rom->base()); membank("bank2w")->set_base(ram_region->base()+0x2000); + membank("bank3r")->set_base(m_cart_rom->base()+0x2000); membank("bank3w")->set_base(ram_region->base()+0x4000); + membank("bank4r")->set_base(ram_region->base()+0x6000); membank("bank4w")->set_base(ram_region->base()+0x6000); + + //page in BASIC or MSX + if ((m_DIPS->read() & 0x01)) + { + membank("bank5r")->set_base(m_cart_rom->base()+0x6000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(m_cart_rom->base()+0xa000); membank("bank6w")->set_base(ram_region->base()+0xc000); + } + else + { + membank("bank5r")->set_base(m_cart_rom->base()+0xe000); membank("bank5w")->set_base(ram_region->base()+0x8000); + membank("bank6r")->set_base(m_cart_rom->base()+0x12000); membank("bank6w")->set_base(ram_region->base()+0xc000); + } + break; + default: + program.unmap_readwrite(0x8000, 0xffff); + } + //I don't have idea what to do with savestates, please someone take care of it + //m_cart_ram->save_ram(); + } + + m_ram_mode=0; +} + + + +void brno_state::machine_start() +{ } +void brno_state::machine_reset() +{ + /* enable ROM1+ROM2 */ + address_space &program = m_maincpu->space(AS_PROGRAM); + + program.install_rom(0x0000, 0x5fff, memregion(Z80_TAG)->base()); + program.unmap_write(0x0000, 0x5fff); + + //is ram/rom cart plugged in? + if (m_cart1->exists()) + { + if (m_cart1->get_type() > 0) + m_cart_ram=m_cart1; + else + m_cart=m_cart1; + } + if (m_cart2->exists()) + { + if (m_cart2->get_type() > 0) + m_cart_ram=m_cart2; + else + m_cart=m_cart2; + } + + if (m_cart) + { + program.install_read_handler(0x2000, 0x5fff, read8_delegate(FUNC(m5_cart_slot_device::read_rom),(m5_cart_slot_device*)m_cart)); + program.unmap_write(0x2000, 0x5fff); + } + + m_romen=true; + m_ramen=false; +} //************************************************************************** // MACHINE CONFIGURATION @@ -619,18 +1455,18 @@ static MACHINE_CONFIG_START( m5, m5_state ) MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", m5_floppies, "525dd", m5_state::floppy_formats) // cartridge - MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "m5_cart") - MCFG_GENERIC_EXTENSIONS("bin,rom") - //MCFG_GENERIC_MANDATORY + MCFG_M5_CARTRIDGE_ADD("cartslot1", m5_cart, NULL) + MCFG_M5_CARTRIDGE_ADD("cartslot2", m5_cart, NULL) // software lists MCFG_SOFTWARE_LIST_ADD("cart_list", "m5_cart") MCFG_SOFTWARE_LIST_ADD("cass_list", "m5_cass") + //MCFG_SOFTWARE_LIST_ADD("flop_list", "m5_flop") // internal ram MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("4K") - MCFG_RAM_EXTRA_OPTIONS("36K,68K") + MCFG_RAM_EXTRA_OPTIONS("36K,64K") //68K is not possible, 'cos internal ram always overlays any expansion memory in that area MACHINE_CONFIG_END @@ -661,6 +1497,48 @@ static MACHINE_CONFIG_DERIVED( pal, m5 ) MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9928a_device, screen_update ) MACHINE_CONFIG_END +//------------------------------------------------- +// MACHINE_CONFIG( m5p_brno ) +//------------------------------------------------- + + +static MACHINE_CONFIG_DERIVED_CLASS( brno, m5, brno_state ) + + // basic machine hardware + MCFG_CPU_MODIFY(Z80_TAG) + MCFG_CPU_PROGRAM_MAP(m5_mem_brno) + MCFG_CPU_IO_MAP(brno_io) +// MCFG_CPU_CONFIG(m5_daisy_chain) + + + //remove devices used for fd5 floppy + MCFG_DEVICE_REMOVE(Z80_FD5_TAG) + MCFG_DEVICE_REMOVE(I8255A_TAG) + MCFG_DEVICE_REMOVE(UPD765_TAG) + + // video hardware + MCFG_DEVICE_ADD( "tms9928a", TMS9929A, XTAL_10_738635MHz / 2 ) + MCFG_TMS9928A_VRAM_SIZE(0x4000) + MCFG_TMS9928A_OUT_INT_LINE_CB(WRITELINE(m5_state, sordm5_video_interrupt_callback)) + MCFG_TMS9928A_SCREEN_ADD_PAL( "screen" ) + MCFG_SCREEN_UPDATE_DEVICE( "tms9928a", tms9928a_device, screen_update ) + + + // floppy + MCFG_WD2797_ADD(WD2797_TAG, XTAL_1MHz) + MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":0", brno_floppies, "35hd", brno_state::floppy_formats) + MCFG_FLOPPY_DRIVE_SOUND(true) + MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":1", brno_floppies, "35hd", brno_state::floppy_formats) + MCFG_FLOPPY_DRIVE_SOUND(true) + // only one floppy drive + //MCFG_DEVICE_REMOVE(WD2797_TAG":1") + + MCFG_SNAPSHOT_ADD("snapshot", brno_state, brno, "rmd", 0) + + // software list + MCFG_SOFTWARE_LIST_ADD("flop_list","m5_flop") + +MACHINE_CONFIG_END //************************************************************************** @@ -692,7 +1570,21 @@ ROM_START( m5p ) ROM_LOAD( "sordfd5.rom", 0x0000, 0x4000, CRC(7263bbc5) SHA1(b729500d3d2b2e807d384d44b76ea5ad23996f4a)) ROM_END +//------------------------------------------------- +// ROM( brno ) +//------------------------------------------------- + +ROM_START( m5p_brno ) + ROM_REGION( 0x10000, Z80_TAG, ROMREGION_ERASEFF ) + ROM_LOAD( "sordint.ic21", 0x0000, 0x2000, CRC(78848d39) SHA1(ac042c4ae8272ad6abe09ae83492ef9a0026d0b2)) // monitor rom + //ROM_LOAD( "brno_rom1.rom", 0x2000, 0x2000, CRC(f4cfb2ee) SHA1(23f41d2d9ac915545409dd0163f3dc298f04eea2)) //windows + //ROM_LOAD( "brno_rom12.rom", 0x2000, 0x4000, CRC(cac52406) SHA1(91f6ba97e85a2b3a317689635d425ee97413bbe3)) //windows+BI + ROM_LOAD( "brno_boot.rom", 0x2000, 0xd80, CRC(60008729) SHA1(FB26E2AE9F74B0AE0D723B417A038A8EF3D72782)) + //Ramdisc area (maximum is 1024kB 256x 4kB banks) + ROM_REGION(1024*1024,RAMDISK,0) + ROM_FILL(0,1024*1024,0xff) +ROM_END //************************************************************************** // DRIVER INITIALIZATION @@ -715,6 +1607,14 @@ DRIVER_INIT_MEMBER(m5_state,pal) { } +//------------------------------------------------- +// ROM( BRNO ) +//------------------------------------------------- + +DRIVER_INIT_MEMBER(brno_state,brno) +{ +// logerror("Driver init entered\n" ); +} //************************************************************************** @@ -724,3 +1624,4 @@ DRIVER_INIT_MEMBER(m5_state,pal) // YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS COMP( 1983, m5, 0, 0, ntsc, m5, m5_state, ntsc, "Sord", "m.5 (Japan)", 0 ) COMP( 1983, m5p, m5, 0, pal, m5, m5_state, pal, "Sord", "m.5 (Europe)", 0 ) +COMP( 1983, m5p_brno, m5, 0, brno, m5, brno_state, brno, "Sord", "m.5 (Europe) BRNO mod", 0 ) diff --git a/src/mame/drivers/magictg.cpp b/src/mame/drivers/magictg.cpp index 63b0df20394..901c8070390 100644 --- a/src/mame/drivers/magictg.cpp +++ b/src/mame/drivers/magictg.cpp @@ -180,7 +180,7 @@ public: /* 3Dfx Voodoo */ - device_t* m_voodoo[2]; + voodoo_device* m_voodoo[2]; struct { @@ -241,8 +241,8 @@ public: void magictg_state::machine_start() { - m_voodoo[0] = machine().device("voodoo_0"); - m_voodoo[1] = machine().device("voodoo_1"); + m_voodoo[0] = (voodoo_device*)machine().device("voodoo_0"); + m_voodoo[1] = (voodoo_device*)machine().device("voodoo_1"); } @@ -278,7 +278,7 @@ void magictg_state::video_start() UINT32 magictg_state::screen_update_magictg(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - return voodoo_update(m_voodoo[0], bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; + return m_voodoo[0]->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; } @@ -338,7 +338,7 @@ static void voodoo_0_pci_w(device_t *busdevice, device_t *device, int function, break; case 0x40: state->m_voodoo_pci_regs[0].init_enable = data; - voodoo_set_init_enable(state->m_voodoo[0], data); + state->m_voodoo[0]->voodoo_set_init_enable(data); break; default: diff --git a/src/mame/drivers/maygay1b.cpp b/src/mame/drivers/maygay1b.cpp index 8d129794d27..220854829ee 100644 --- a/src/mame/drivers/maygay1b.cpp +++ b/src/mame/drivers/maygay1b.cpp @@ -709,9 +709,7 @@ DRIVER_INIT_MEMBER(maygay1b_state,m1) //AM_RANGE(0x2420, 0x2421) AM_WRITE(latch_ch2_w ) // oki // if there is no OKI region disable writes here, the rom might be missing, so alert user - UINT8 *okirom = memregion( "msm6376" )->base(); - - if (!okirom) { + if (m_oki_region == nullptr) { m_maincpu->space(AS_PROGRAM).install_write_handler(0x2420, 0x2421, write8_delegate(FUNC(maygay1b_state::m1ab_no_oki_w), this)); } } diff --git a/src/mame/drivers/mbdtower.cpp b/src/mame/drivers/mbdtower.cpp index f20f805fb5f..d5a1d589604 100644 --- a/src/mame/drivers/mbdtower.cpp +++ b/src/mame/drivers/mbdtower.cpp @@ -62,7 +62,7 @@ void mbdtower_state::prepare_display() { // declare display matrix size and the 2 7segs set_display_size(7, 3); - m_display_segmask[1] = m_display_segmask[2] = 0x7f; + set_display_segmask(6, 0x7f); // update current state if (~m_r & 0x10) @@ -246,7 +246,7 @@ void mbdtower_state::machine_start() static MACHINE_CONFIG_START( mbdtower, mbdtower_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=43K, C=56pf, but unknown RC curve + MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=43K, C=56pf MCFG_TMS1XXX_READ_K_CB(READ8(mbdtower_state, read_k)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mbdtower_state, write_r)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mbdtower_state, write_o)) diff --git a/src/mame/drivers/mc1000.cpp b/src/mame/drivers/mc1000.cpp index 06c1b177c15..c98f66b601e 100644 --- a/src/mame/drivers/mc1000.cpp +++ b/src/mame/drivers/mc1000.cpp @@ -453,6 +453,7 @@ static MACHINE_CONFIG_START( mc1000, mc1000_state ) /* devices */ MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) + MCFG_CASSETTE_INTERFACE("mc1000_cass") MCFG_SOFTWARE_LIST_ADD("cass_list", "mc1000_cass") diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp index ad32ebb1961..bed3ec42e7d 100644 --- a/src/mame/drivers/megasys1.cpp +++ b/src/mame/drivers/megasys1.cpp @@ -43,7 +43,7 @@ Year + Game System Protection Peek-a-Boo! D Inputs --------------------------------------------------------------------- -NOTE: Chimera Beast is the only game missing a dump of its priority PROM +NOTE: Chimera Beast PROM has not been dumped, but looks like it should match 64street based on game analysis. Hardware Main CPU Sound CPU Sound Chips @@ -94,10 +94,6 @@ RAM RW 0f0000-0f3fff 0e0000-0effff? < Issues / To Do -------------- -- There is a 512 byte PROM in the video section (differs by game) that - controls the priorities. This prom is currently missing for one game, - so we have to use fake data for it (Chimera Beast). - - Making the M6295 status register return 0 fixes the music tempo in avspirit, 64street, astyanax etc. but makes most of the effects in hachoo disappear! Define SOUND_HACK to 0 to turn this hack off @@ -105,15 +101,9 @@ RAM RW 0f0000-0f3fff 0e0000-0effff? < bootleg version of rodlandj has one instruction patched out to do exactly the same thing that we are doing (ignoring the 6295 status). -- Understand properly how irqs truly works, kazan / iganinju is (again) broken. - -- 64street: player characters in attract mode doesn't move at all, protection? - they move on the real PCB +- Understand properly how irqs truly works, kazan / iganinju solution seems hacky -- tshingen: unemulated mosaic effect when killing enemies with the flashing sword. - See https://youtu.be/m4ZH0v8UqWs - The effect can be tested in e.g. stdragon and p47 test mode: - See https://youtu.be/zo3FTCqkNBc and https://youtu.be/dEqH017YBzw +- P47 intro effect is imperfect ( https://www.youtube.com/watch?v=eozZGcVspVw ) - Understand a handful of unknown bits in video regs @@ -144,16 +134,16 @@ RAM RW 0f0000-0f3fff 0e0000-0effff? < MACHINE_RESET_MEMBER(megasys1_state,megasys1) { - m_ignore_oki_status = 1; /* ignore oki status due 'protection' */ - m_ip_select = 0; /* reset protection */ + + m_ignore_oki_status = 1; /* ignore oki status due 'protection' */ + m_ip_latched = 0x0006; /* reset protection - some games expect this initial read without sending anything */ m_mcu_hs = 0; } MACHINE_RESET_MEMBER(megasys1_state,megasys1_hachoo) { + MACHINE_RESET_CALL_MEMBER(megasys1); m_ignore_oki_status = 0; /* strangely hachoo need real oki status */ - m_ip_select = 0; /* reset protection */ - m_mcu_hs = 0; } @@ -254,7 +244,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(megasys1_state::megasys1B_scanline) in that order. */ -READ16_MEMBER(megasys1_state::ip_select_r) +READ16_MEMBER(megasys1_state::ip_select_r) // FROM MCU +{ + return m_ip_latched; +} + + + +WRITE16_MEMBER(megasys1_state::ip_select_w) // TO MCU { int i; @@ -266,26 +263,24 @@ READ16_MEMBER(megasys1_state::ip_select_r) // 20 21 22 23 24 < edf // 51 52 53 54 55 < hayaosi1 - /* f(x) = ((x*x)>>4)&0xFF ; f(f($D)) == 6 */ - if ((m_ip_select & 0xF0) == 0xF0) return 0x000D; - for (i = 0; i < 5; i++) if (m_ip_select == m_ip_select_values[i]) break; + for (i = 0; i < 7; i++) if ((data & 0x00ff) == m_ip_select_values[i]) break; switch (i) { - case 0 : return m_io_system->read(); - case 1 : return m_io_p1->read(); - case 2 : return m_io_p2->read(); - case 3 : return m_io_dsw1->read(); - case 4 : return m_io_dsw2->read(); - default : return 0x0006; + case 0 : m_ip_latched = m_io_system->read(); break; + case 1 : m_ip_latched = m_io_p1->read(); break; + case 2 : m_ip_latched = m_io_p2->read(); break; + case 3 : m_ip_latched = m_io_dsw1->read(); break; + case 4 : m_ip_latched = m_io_dsw2->read(); break; + case 5 : m_ip_latched = 0x0d; break; // startup check? + case 6 : m_ip_latched = 0x06; break; // sent before each other command + default: return; // get out if it wasn't a valid request } -} -WRITE16_MEMBER(megasys1_state::ip_select_w) -{ - COMBINE_DATA(&m_ip_select); + + // if the command is valid, generate an IRQ from the MCU m_maincpu->set_input_line(2, HOLD_LINE); } @@ -1812,6 +1807,40 @@ ROM_START( 64street ) ROM_LOAD( "pr91009.12", 0x0000, 0x0200, CRC(c69423d6) SHA1(ba9644a9899df2d73a5a16bf7ceef1954c2e25f3) ) // same as pr-91044 on hayaosi1 ROM_END +ROM_START( 64streetja ) + ROM_REGION( 0x80000, "maincpu", 0 ) /* Main CPU Code */ + ROM_LOAD16_BYTE( "ic53.bin", 0x000000, 0x040000, CRC(c978d086) SHA1(b091faf570841f098d4d70bf3ca4f26d6cda890a) ) + ROM_LOAD16_BYTE( "ic52.bin", 0x000001, 0x040000, CRC(af475852) SHA1(5e0a375dd904a4176ca6fdccdb67a907e270e9be) ) + + ROM_REGION( 0x20000, "audiocpu", 0 ) /* Sound CPU Code */ + ROM_LOAD16_BYTE( "64th_08.rom", 0x000000, 0x010000, CRC(632be0c1) SHA1(626073037249d96ac70b2d11b2dd72b22bac49c7) ) + ROM_LOAD16_BYTE( "64th_07.rom", 0x000001, 0x010000, CRC(13595d01) SHA1(e730a530ca232aab883217fa12804075cb2aa640) ) + + ROM_REGION( 0x1000, "mcu", 0 ) /* MCU Internal Code, M50747? */ + ROM_LOAD( "64street.mcu", 0x000000, 0x1000, NO_DUMP ) + + ROM_REGION( 0x80000, "gfx1", 0 ) /* Scroll 0 */ + ROM_LOAD( "64th_01.rom", 0x000000, 0x080000, CRC(06222f90) SHA1(52b6cb88b9d2209c16d1633c83c0224b6ebf29dc) ) + + ROM_REGION( 0x80000, "gfx2", 0 ) /* Scroll 1 */ + ROM_LOAD( "64th_06.rom", 0x000000, 0x080000, CRC(2bfcdc75) SHA1(f49f92f1ff58dccf72e05ecf80761c7b65a25ba3) ) + + ROM_REGION( 0x20000, "gfx3", 0 ) /* Scroll 2 */ + ROM_LOAD( "64th_09.rom", 0x000000, 0x020000, CRC(a4a97db4) SHA1(1179457a6f33b3b44fac6056f6245f3aaae6afd5) ) + + ROM_REGION( 0x100000, "gfx4", 0 ) /* Sprites */ + ROM_LOAD( "64th_05.rom", 0x000000, 0x080000, CRC(a89a7020) SHA1(be36e58e9314688ee39249944c5a6c201e0249ee) ) + ROM_LOAD( "64th_04.rom", 0x080000, 0x080000, CRC(98f83ef6) SHA1(e9b72487695ac7cdc4fbf595389c4b8781ed207e) ) + + ROM_REGION( 0x40000, "oki1", 0 ) /* Samples */ + ROM_LOAD( "64th_11.rom", 0x000000, 0x020000, CRC(b0b8a65c) SHA1(b7e42d9083d0bbfe160fc73a7317d696e90d83d6) ) + + ROM_REGION( 0x40000, "oki2", 0 ) /* Samples */ + ROM_LOAD( "64th_10.rom", 0x000000, 0x040000, CRC(a3390561) SHA1(f86d5c61e3e80d30408535c2203940ca1e95ac18) ) + + ROM_REGION( 0x0200, "proms", 0 ) /* Priority PROM */ + ROM_LOAD( "pr91009.12", 0x0000, 0x0200, CRC(c69423d6) SHA1(ba9644a9899df2d73a5a16bf7ceef1954c2e25f3) ) // same as pr-91044 on hayaosi1 +ROM_END ROM_START( 64streetj ) ROM_REGION( 0x80000, "maincpu", 0 ) /* Main CPU Code */ @@ -2251,7 +2280,7 @@ ROM_START( chimerab ) ROM_LOAD( "voi10.bin", 0x000000, 0x040000, CRC(67498914) SHA1(8d89fa90f38fd102b15f26f71491ea833ec32cb2) ) ROM_REGION( 0x0200, "proms", 0 ) /* Priority PROM */ - ROM_LOAD( "prom", 0x0000, 0x0200, NO_DUMP ) + ROM_LOAD( "pr-91044", 0x0000, 0x0200, BAD_DUMP CRC(c69423d6) SHA1(ba9644a9899df2d73a5a16bf7ceef1954c2e25f3) ) // guess, but 99% sure it's meant to be the same as 64street/hayaosi1 based on analysis of game and previous handcrafted data ROM_END @@ -3988,6 +4017,10 @@ DRIVER_INIT_MEMBER(megasys1_state,64street) m_ip_select_values[2] = 0x54; m_ip_select_values[3] = 0x55; m_ip_select_values[4] = 0x56; + + m_ip_select_values[5] = 0xfa; + m_ip_select_values[6] = 0x06; + } READ16_MEMBER(megasys1_state::megasys1A_mcu_hs_r) @@ -4041,6 +4074,10 @@ DRIVER_INIT_MEMBER(megasys1_state,avspirit) m_ip_select_values[3] = 0x33; m_ip_select_values[4] = 0x34; + m_ip_select_values[5] = 0xff; + m_ip_select_values[6] = 0x06; + + // has twice less RAM m_maincpu->space(AS_PROGRAM).unmap_readwrite(0x060000, 0x06ffff); m_maincpu->space(AS_PROGRAM).install_ram(0x070000, 0x07ffff, m_ram); @@ -4053,6 +4090,10 @@ DRIVER_INIT_MEMBER(megasys1_state,bigstrik) m_ip_select_values[2] = 0x55; m_ip_select_values[3] = 0x56; m_ip_select_values[4] = 0x57; + + m_ip_select_values[5] = 0xfb; + m_ip_select_values[6] = 0x06; + } DRIVER_INIT_MEMBER(megasys1_state,chimerab) @@ -4063,6 +4104,10 @@ DRIVER_INIT_MEMBER(megasys1_state,chimerab) m_ip_select_values[2] = 0x53; m_ip_select_values[3] = 0x54; m_ip_select_values[4] = 0x55; + + m_ip_select_values[5] = 0xf2; + m_ip_select_values[6] = 0x06; + } DRIVER_INIT_MEMBER(megasys1_state,cybattlr) @@ -4072,6 +4117,9 @@ DRIVER_INIT_MEMBER(megasys1_state,cybattlr) m_ip_select_values[2] = 0x53; m_ip_select_values[3] = 0x54; m_ip_select_values[4] = 0x55; + + m_ip_select_values[5] = 0xf2; + m_ip_select_values[6] = 0x06; } DRIVER_INIT_MEMBER(megasys1_state,edf) @@ -4081,6 +4129,10 @@ DRIVER_INIT_MEMBER(megasys1_state,edf) m_ip_select_values[2] = 0x22; m_ip_select_values[3] = 0x23; m_ip_select_values[4] = 0x24; + + m_ip_select_values[5] = 0xf0; + m_ip_select_values[6] = 0x06; + } READ16_MEMBER(megasys1_state::edfbl_input_r) @@ -4115,6 +4167,10 @@ DRIVER_INIT_MEMBER(megasys1_state,hayaosi1) m_ip_select_values[2] = 0x53; m_ip_select_values[3] = 0x54; m_ip_select_values[4] = 0x55; + + m_ip_select_values[5] = 0xfc; + m_ip_select_values[6] = 0x06; + } READ16_MEMBER(megasys1_state::iganinju_mcu_hs_r) @@ -4390,7 +4446,8 @@ GAME( 1993, hayaosi1, 0, system_B_hayaosi1, hayaosi1, megasys1_state, hay // Type C GAME( 1991, 64street, 0, system_C, 64street, megasys1_state, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (World)", 0 ) -GAME( 1991, 64streetj,64street, system_C, 64street, megasys1_state, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (Japan)", 0 ) +GAME( 1991, 64streetj,64street, system_C, 64street, megasys1_state, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (Japan, set 1)", 0 ) +GAME( 1991, 64streetja,64street,system_C, 64street, megasys1_state, 64street, ROT0, "Jaleco", "64th. Street - A Detective Story (Japan, set 2)", 0 ) GAME( 1992, bigstrik, 0, system_C, bigstrik, megasys1_state, bigstrik, ROT0, "Jaleco", "Big Striker", 0 ) GAME( 1993, chimerab, 0, system_C, chimerab, megasys1_state, chimerab, ROT0, "Jaleco", "Chimera Beast (Japan, prototype)", 0 ) GAME( 1993, cybattlr, 0, system_C, cybattlr, megasys1_state, cybattlr, ROT90, "Jaleco", "Cybattler", 0 ) diff --git a/src/mame/drivers/merit.cpp b/src/mame/drivers/merit.cpp index 9f5ac8f6190..f438e37dea9 100644 --- a/src/mame/drivers/merit.cpp +++ b/src/mame/drivers/merit.cpp @@ -59,7 +59,7 @@ Merit Riviera Notes - There are several known versions: Riviera Super Star (not dumped) Riviera Montana Version (with journal printer, not dumped) Riviera Tennessee Draw (not dumped) - Michigan Superstar Draw Poker (not dumped) + Michigan Super Draw Poker (Is there a "Superstar" version?) Americana There are several law suites over the Riviera games. Riviera Distributors Inc. bought earlier versions @@ -422,6 +422,19 @@ static ADDRESS_MAP_START( bigappg_map, AS_PROGRAM, 8, merit_state ) AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w) ADDRESS_MAP_END +static ADDRESS_MAP_START( misdraw_map, AS_PROGRAM, 8, merit_state ) + AM_RANGE(0x0000, 0x7fff) AM_ROM + AM_RANGE(0xb000, 0xb7ff) AM_RAM AM_SHARE("cpunvram") // overlays other NVRAM? or is it banked? + AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0xc004, 0xc007) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write) // swapped compared to other set? + AM_RANGE(0xc008, 0xc00b) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write) + AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w) + AM_RANGE(0xe001, 0xe001) AM_DEVWRITE("crtc", mc6845_device, register_w) + AM_RANGE(0xe800, 0xefff) AM_RAM AM_SHARE("raattr") + AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_SHARE("ravideo") + AM_RANGE(0xf800, 0xfbff) AM_READWRITE(palette_r, palette_w) +ADDRESS_MAP_END + static ADDRESS_MAP_START( dodge_map, AS_PROGRAM, 8, merit_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xa000, 0xbfff) AM_RAM AM_SHARE("nvram") @@ -590,6 +603,8 @@ static INPUT_PORTS_START( meritpoker ) PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW1:8" ) INPUT_PORTS_END + + static INPUT_PORTS_START( bigappg ) PORT_INCLUDE( meritpoker ) @@ -1260,6 +1275,14 @@ static MACHINE_CONFIG_DERIVED( bigappg, pitboss ) MCFG_NVRAM_ADD_0FILL("nvram") MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( misdraw, bigappg ) + + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(misdraw_map) + + MCFG_NVRAM_ADD_0FILL("cpunvram") +MACHINE_CONFIG_END + static MACHINE_CONFIG_DERIVED( dodge, pitboss ) MCFG_CPU_MODIFY("maincpu") @@ -1479,6 +1502,23 @@ ROM_START( bigappg ) ROM_LOAD( "haip_u40.u40", 0x0000, 0x2000, CRC(ac4983b8) SHA1(a552a15f813c331de67eaae2ed42cc037b26c5bd) ) ROM_END +ROM_START( misdraw ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "2131-16_u5-2.u5", 0x0000, 0x8000, CRC(fc756320) SHA1(6b810c57ed1be844a04a6081d727e182509604b4) ) /* 2131-16 U5-2 081889 */ + + ROM_REGION( 0x6000, "gfx1", 0 ) + ROM_LOAD( "u39.u39", 0x0000, 0x2000, CRC(0f09d19b) SHA1(1f98559d5bad7c84d92ecea5a6df9429914a47f0) ) + ROM_LOAD( "u38.u38", 0x2000, 0x2000, CRC(8210a48d) SHA1(9af3e8ac8dcf1e548c4ba3ca8096e48dbb3b4700) ) + ROM_LOAD( "u37.u37", 0x4000, 0x2000, CRC(34ca07d5) SHA1(3656b3eb78dd6ea06cf323a08fc3f949a01b76a3) ) + + ROM_REGION( 0x2000, "gfx2", 0 ) + ROM_LOAD( "haip_u40.u40", 0x0000, 0x2000, CRC(ac4983b8) SHA1(a552a15f813c331de67eaae2ed42cc037b26c5bd) ) + + ROM_REGION( 0x0800, "cpunvram", ROMREGION_ERASEFF ) + // this contains CODE, the game jumps there on startup + ROM_LOAD( "crt-209_2131-16", 0x0000, 0x0800, CRC(34729437) SHA1(f097a1a97d8078d7d6a6af85be416b1d1d09c7f2) ) /* 2816 EEPROM in Z80 epoxy CPU module */ +ROM_END + ROM_START( dodgectya ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "2131-82_u5-0d.u5", 0x0000, 0x8000, CRC(ef71b268) SHA1(c85f2c8e7e9cd89b4720699814d8fcfbecf4dc1b) ) /* 2131-82 U5-0D 884111 2131 820*/ @@ -2185,6 +2225,7 @@ GAME( 1986, rivieraa, riviera, dodge, riviera, driver_device, 0, ROT0, " GAME( 1986, rivierab, riviera, dodge, rivierab, driver_device, 0, ROT0, "Merit", "Riviera Hi-Score (2131-08, U5-2D)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1986, bigappg, 0, bigappg, bigappg, driver_device, 0, ROT0, "Big Apple Games / Merit", "The Big Apple (2131-13, U5-0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, misdraw, 0, misdraw, bigappg, driver_device, 0, ROT0, "Big Apple Games / Merit", "Michigan Super Draw (2131-16, U5-2)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, dodgectya,dodgecty,dodge, dodge, driver_device, 0, ROT0, "Merit", "Dodge City (2131-82, U5-0D)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) GAME( 1986, dodgectyb,dodgecty,dodge, dodge, driver_device, 0, ROT0, "Merit", "Dodge City (2131-82, U5-50)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/midtunit.cpp b/src/mame/drivers/midtunit.cpp index 996086bfe05..15e50184a56 100644 --- a/src/mame/drivers/midtunit.cpp +++ b/src/mame/drivers/midtunit.cpp @@ -1186,253 +1186,289 @@ ROM_END ROM_START( nbajam ) ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ - ROM_LOAD( "nbau3.bin", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) ) + ROM_LOAD( "l2_nba_jam_u3_sound_rom.u3", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) ) ROM_RELOAD( 0x030000, 0x20000 ) ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ - ROM_LOAD( "nbau12.bin", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) ) - ROM_LOAD( "nbau13.bin", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) ) + ROM_LOAD( "nbau12.u12", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) ) + ROM_LOAD( "nbau13.u13", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "nbauj12.bin", 0x00000, 0x80000, CRC(b93e271c) SHA1(b0e9f055376a4a4cd1115a81f71c933903c251b1) ) - ROM_LOAD16_BYTE( "nbaug12.bin", 0x00001, 0x80000, CRC(407d3390) SHA1(a319bc890d94310e44fe2ec98bfc95665a662701) ) + ROM_LOAD16_BYTE( "l3_nba_jam_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(b93e271c) SHA1(b0e9f055376a4a4cd1115a81f71c933903c251b1) ) + ROM_LOAD16_BYTE( "l3_nba_jam_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(407d3390) SHA1(a319bc890d94310e44fe2ec98bfc95665a662701) ) ROM_REGION( 0xc00000, "gfxrom", 0 ) - ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) - ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) - ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) - ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) - - ROM_LOAD32_BYTE( "nbaug16.bin", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) ) - ROM_LOAD32_BYTE( "nbauj16.bin", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) ) - ROM_LOAD32_BYTE( "nbaug20.bin", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) ) - ROM_LOAD32_BYTE( "nbauj20.bin", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) ) - - ROM_LOAD32_BYTE( "nbaug17.bin", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) ) - ROM_LOAD32_BYTE( "nbauj17.bin", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) ) - ROM_LOAD32_BYTE( "nbaug22.bin", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) ) - ROM_LOAD32_BYTE( "nbauj22.bin", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) ) - - ROM_LOAD32_BYTE( "nbaug18.bin", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) ) - ROM_LOAD32_BYTE( "nbauj18.bin", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) ) - ROM_LOAD32_BYTE( "nbaug23.bin", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) ) - ROM_LOAD32_BYTE( "nbauj23.bin", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) ) ROM_END ROM_START( nbajamr2 ) ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ - ROM_LOAD( "nbau3.bin", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) ) + ROM_LOAD( "l2_nba_jam_u3_sound_rom.u3", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) ) ROM_RELOAD( 0x030000, 0x20000 ) ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ - ROM_LOAD( "nbau12.bin", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) ) - ROM_LOAD( "nbau13.bin", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) ) + ROM_LOAD( "nbau12.u12", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) ) + ROM_LOAD( "nbau13.u13", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "jam2uj12.bin", 0x00000, 0x80000, CRC(0fe80b36) SHA1(fe6b21dc9b393b25c511b2914b568fa92301d749) ) - ROM_LOAD16_BYTE( "jam2ug12.bin", 0x00001, 0x80000, CRC(5d106315) SHA1(e2cddd9ed6771e77711e3a4f25fe2d07712d954e) ) + ROM_LOAD16_BYTE( "l2_nba_jam_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(0fe80b36) SHA1(fe6b21dc9b393b25c511b2914b568fa92301d749) ) + ROM_LOAD16_BYTE( "l2_nba_jam_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(5d106315) SHA1(e2cddd9ed6771e77711e3a4f25fe2d07712d954e) ) ROM_REGION( 0xc00000, "gfxrom", 0 ) - ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) - ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) - ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) - ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) - - ROM_LOAD32_BYTE( "nbaug16.bin", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) ) - ROM_LOAD32_BYTE( "nbauj16.bin", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) ) - ROM_LOAD32_BYTE( "nbaug20.bin", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) ) - ROM_LOAD32_BYTE( "nbauj20.bin", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) ) - - ROM_LOAD32_BYTE( "nbaug17.bin", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) ) - ROM_LOAD32_BYTE( "nbauj17.bin", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) ) - ROM_LOAD32_BYTE( "nbaug22.bin", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) ) - ROM_LOAD32_BYTE( "nbauj22.bin", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) ) - - ROM_LOAD32_BYTE( "nbaug18.bin", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) ) - ROM_LOAD32_BYTE( "nbauj18.bin", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) ) - ROM_LOAD32_BYTE( "nbaug23.bin", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) ) - ROM_LOAD32_BYTE( "nbauj23.bin", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) ) +ROM_END + + +ROM_START( nbajamr1 ) + ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ + ROM_LOAD( "l2_nba_jam_u3_sound_rom.u3", 0x010000, 0x20000, CRC(3a3ea480) SHA1(d12a45cba5c35f046b176661d7877fa4fd0e6c13) ) + ROM_RELOAD( 0x030000, 0x20000 ) + + ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ + ROM_LOAD( "nbau12.u12", 0x000000, 0x80000, CRC(b94847f1) SHA1(e7efa0a379bfa91fe4ffb75f07a5dfbfde9a96b4) ) + ROM_LOAD( "nbau13.u13", 0x080000, 0x80000, CRC(b6fe24bd) SHA1(f70f75b5570a2b368ebc74d2a7d264c618940430) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "l1_nba_jam_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(4db672ec) SHA1(bb329c552473179f617d3bd038f47fb69d060b55) ) + ROM_LOAD16_BYTE( "l1_nba_jam_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(ed1df3f7) SHA1(36b0c47758a205719dbef169f0af3e761f557b99) ) + + ROM_REGION( 0xc00000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(8591c572) SHA1(237bab2e93abf438a84be3603505db5de59922af) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(d2e554f1) SHA1(139aa39bd48b8605058ece188f9f5e6793561fcb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(44fd6221) SHA1(1d6754bf2c24950080523f66b77407931babba29) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(f9cebbb6) SHA1(6202e490bc5658bd0741422f841540fcd037cfee) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(6f921886) SHA1(72542249ca6602dc4816952765c1810f064ff394) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(b2e14981) SHA1(5cec9b7fcaa6d0ce5bff689541fc98db435c5b5f) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(ab05ed89) SHA1(4153d098fbaeac963d93f26dcd9d8bc33a48a734) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(59a95878) SHA1(b95165987853f164842ab2b5895ea95484a1d78b) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(5162d3d6) SHA1(14d377977510b7793e4006a7a5089dbfd785d7d1) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(fdee0037) SHA1(3bcc740f4bdb3236822cd6e7ed06241804351cca) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(7b934c7a) SHA1(a6992fb3c50429ac4fa15bd91612ae0c0b8f961d) ) + ROM_LOAD32_BYTE( "l1_nba_jam_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(427d2eee) SHA1(4985e3dd9c9e1bedd5a900958bf549656debd494) ) ROM_END ROM_START( nbajamte ) ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ - ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) + ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) ROM_RELOAD( 0x030000, 0x20000 ) ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ - ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) - ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) + ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) + ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "te-uj12.l4", 0x00000, 0x80000, CRC(d7c21bc4) SHA1(e05f0299b955500df6a08b1c0b24b932a9cdfa6a) ) - ROM_LOAD16_BYTE( "te-ug12.l4", 0x00001, 0x80000, CRC(7ad49229) SHA1(e9ceedb0e620809d8a4d42087d806aa296a4cd59) ) + ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(d7c21bc4) SHA1(e05f0299b955500df6a08b1c0b24b932a9cdfa6a) ) + ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(7ad49229) SHA1(e9ceedb0e620809d8a4d42087d806aa296a4cd59) ) ROM_REGION( 0xc00000, "gfxrom", 0 ) - ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) - ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) - ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) - ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) - - ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) - ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) - ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) - ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) - - ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) - ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) - ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) - ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) - - ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) - ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) - ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) - ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) ROM_END -ROM_START( nbajamte1 ) +ROM_START( nbajamte3 ) ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ - ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) + ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) ROM_RELOAD( 0x030000, 0x20000 ) ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ - ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) - ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) + ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) + ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "te-uj12.l1", 0x00000, 0x80000, CRC(a9f555ad) SHA1(34f5fc1b003ef8acbb2b38fbacd58d018d20ab1b) ) - ROM_LOAD16_BYTE( "te-ug12.l1", 0x00001, 0x80000, CRC(bd4579b5) SHA1(c893cff931f1e60a1d0d29d2719f514d92fb3490) ) + ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(8fdf77b4) SHA1(1a8a178b19d0b8e7a5fd2ddf373a4279321440d0) ) + ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(656579ed) SHA1(b038fdc814ebc8d203724fdb2f7501d40f1dc21f) ) ROM_REGION( 0xc00000, "gfxrom", 0 ) - ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) - ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) - ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) - ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) - - ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) - ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) - ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) - ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) - - ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) - ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) - ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) - ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) - - ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) - ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) - ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) - ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) ROM_END ROM_START( nbajamte2 ) ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ - ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) + ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) ROM_RELOAD( 0x030000, 0x20000 ) ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ - ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) - ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) + ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) + ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "te-uj12.l2", 0x00000, 0x80000, CRC(eaa6fb32) SHA1(8c8c0c6ace2b98679d7fe90e1f9284bdf0e14eaf) ) - ROM_LOAD16_BYTE( "te-ug12.l2", 0x00001, 0x80000, CRC(5a694d9a) SHA1(fb74e4242d9adba03f24a81451ea06e8d9b4af96) ) + ROM_LOAD16_BYTE( "l2_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(eaa6fb32) SHA1(8c8c0c6ace2b98679d7fe90e1f9284bdf0e14eaf) ) + ROM_LOAD16_BYTE( "l2_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(5a694d9a) SHA1(fb74e4242d9adba03f24a81451ea06e8d9b4af96) ) ROM_REGION( 0xc00000, "gfxrom", 0 ) - ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) - ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) - ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) - ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) - - ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) - ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) - ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) - ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) - - ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) - ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) - ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) - ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) - - ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) - ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) - ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) - ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) ROM_END -ROM_START( nbajamte3 ) +ROM_START( nbajamte1 ) ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ - ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) + ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) ROM_RELOAD( 0x030000, 0x20000 ) ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ - ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) - ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) + ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) + ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "te-uj12.l3", 0x00000, 0x80000, CRC(8fdf77b4) SHA1(1a8a178b19d0b8e7a5fd2ddf373a4279321440d0) ) - ROM_LOAD16_BYTE( "te-ug12.l3", 0x00001, 0x80000, CRC(656579ed) SHA1(b038fdc814ebc8d203724fdb2f7501d40f1dc21f) ) + ROM_LOAD16_BYTE( "l1_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(a9f555ad) SHA1(34f5fc1b003ef8acbb2b38fbacd58d018d20ab1b) ) + ROM_LOAD16_BYTE( "l1_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(bd4579b5) SHA1(c893cff931f1e60a1d0d29d2719f514d92fb3490) ) ROM_REGION( 0xc00000, "gfxrom", 0 ) - ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) - ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) - ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) - ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) - - ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) - ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) - ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) - ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) - - ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) - ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) - ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) - ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) - - ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) - ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) - ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) - ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) ROM_END ROM_START( nbajamten ) ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ - ROM_LOAD( "te-u3.bin", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) + ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) ROM_RELOAD( 0x030000, 0x20000 ) ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ - ROM_LOAD( "te-u12.bin", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) - ROM_LOAD( "te-u13.bin", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) + ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) + ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ ROM_LOAD16_BYTE( "nani-uj12.bin", 0x00000, 0x80000, CRC(a2662e74) SHA1(7a6c18464446baf3d279013eb95bf862b5b3be70) ) ROM_LOAD16_BYTE( "nani-ug12.bin", 0x00001, 0x80000, CRC(40cda5b1) SHA1(2ff51f830aa86f6456c626666e221be1f7bfbfa2) ) ROM_REGION( 0xc00000, "gfxrom", 0 ) - ROM_LOAD32_BYTE( "nbaug14.bin", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) - ROM_LOAD32_BYTE( "nbauj14.bin", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) - ROM_LOAD32_BYTE( "nbaug19.bin", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) - ROM_LOAD32_BYTE( "nbauj19.bin", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) - - ROM_LOAD32_BYTE( "te-ug16.bin", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) - ROM_LOAD32_BYTE( "te-uj16.bin", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) - ROM_LOAD32_BYTE( "te-ug20.bin", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) - ROM_LOAD32_BYTE( "te-uj20.bin", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) - - ROM_LOAD32_BYTE( "te-ug17.bin", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) - ROM_LOAD32_BYTE( "te-uj17.bin", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) - ROM_LOAD32_BYTE( "te-ug22.bin", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) - ROM_LOAD32_BYTE( "te-uj22.bin", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) - - ROM_LOAD32_BYTE( "te-ug18.bin", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) - ROM_LOAD32_BYTE( "te-uj18.bin", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) - ROM_LOAD32_BYTE( "te-ug23.bin", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) - ROM_LOAD32_BYTE( "te-uj23.bin", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) ROM_END @@ -1499,9 +1535,10 @@ GAME( 1993, jdreddp, 0, tunit_adpcm, jdreddp, midtunit_state, jdreddp, GAME( 1993, nbajam, 0, tunit_adpcm, nbajam, midtunit_state, nbajam, ROT0, "Midway", "NBA Jam (rev 3.01 04/07/93)", MACHINE_SUPPORTS_SAVE ) GAME( 1993, nbajamr2, nbajam, tunit_adpcm, nbajam, midtunit_state, nbajam, ROT0, "Midway", "NBA Jam (rev 2.00 02/10/93)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, nbajamr1, nbajam, tunit_adpcm, nbajam, midtunit_state, nbajam, ROT0, "Midway", "NBA Jam (rev 1.00 02/1/93)", MACHINE_SUPPORTS_SAVE ) GAME( 1994, nbajamte, 0, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 4.0 03/23/94)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, nbajamte1,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 1.0 01/17/94)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, nbajamte2,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 2.0 01/28/94)", MACHINE_SUPPORTS_SAVE ) GAME( 1994, nbajamte3,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 3.0 03/04/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, nbajamte2,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 2.0 01/28/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, nbajamte1,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam TE (rev 1.0 01/17/94)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, nbajamten,nbajamte, tunit_adpcm, nbajamte, midtunit_state, nbajamte, ROT0, "Midway", "NBA Jam T.E. Nani Edition (rev 5.2 8/11/95, prototype)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp index f075e7b1957..d564c6e9ead 100644 --- a/src/mame/drivers/mitchell.cpp +++ b/src/mame/drivers/mitchell.cpp @@ -2045,73 +2045,91 @@ ROM_END ROM_START( block ) ROM_REGION( 0x50000, "maincpu", 0 ) - ROM_LOAD( "ble_05.rom", 0x00000, 0x08000, CRC(c12e7f4c) SHA1(335f4eab2323b942d5feeb3bab6f7286fabfffb4) ) - ROM_LOAD( "ble_06.rom", 0x10000, 0x20000, CRC(cdb13d55) SHA1(2e4489d12a603b4c7dfb90d246ebff9176e88a0b) ) - ROM_LOAD( "ble_07.rom", 0x30000, 0x20000, CRC(1d114f13) SHA1(ee3588e1752b3432fd611e2d7d4fb43f942de580) ) + ROM_LOAD( "ble_05b.14f", 0x00000, 0x08000, CRC(fcdb7885) SHA1(500ee4b8344181e9ad348bd22344a1a942fe9fdc) ) + ROM_LOAD( "ble_06b.15f", 0x10000, 0x20000, CRC(e114ebde) SHA1(12362e809443644b43fbc72e7eead5f376fe11d3) ) + ROM_LOAD( "ble_07b.16f", 0x30000, 0x20000, CRC(61bef077) SHA1(92792f26305df1e5e66607bed391b84b4964ba3e) ) ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF ) - ROM_LOAD( "bl_08.rom", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */ - ROM_LOAD( "bl_09.rom", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) ) + ROM_LOAD( "bl_08.8h", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */ + ROM_LOAD( "bl_09.9h", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) ) /* 40000-7ffff empty */ - ROM_LOAD( "bl_18.rom", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) ) - ROM_LOAD( "bl_19.rom", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) ) + ROM_LOAD( "bl_18.8j", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) ) + ROM_LOAD( "bl_19.9j", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) ) /* c0000-fffff empty */ ROM_REGION( 0x040000, "gfx2", 0 ) - ROM_LOAD( "bl_16.rom", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */ - ROM_LOAD( "bl_17.rom", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) ) + ROM_LOAD( "bl_16.2j", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */ + ROM_LOAD( "bl_17.3j", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) ) ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */ - ROM_LOAD( "bl_01.rom", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) ) + ROM_LOAD( "bl_01.2d", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) ) ROM_END -ROM_START( blockj ) +ROM_START( blockr1 ) ROM_REGION( 0x50000, "maincpu", 0 ) - ROM_LOAD( "blj_05.rom", 0x00000, 0x08000, CRC(3b55969a) SHA1(86de2f1f5878de380a8b1e3935cffa146863f07f) ) - ROM_LOAD( "ble_06.rom", 0x10000, 0x20000, CRC(cdb13d55) SHA1(2e4489d12a603b4c7dfb90d246ebff9176e88a0b) ) - ROM_LOAD( "blj_07.rom", 0x30000, 0x20000, CRC(1723883c) SHA1(e6b7575a55c045b90fb41290a60306713121acfb) ) + ROM_LOAD( "ble_05a.14f", 0x00000, 0x08000, CRC(fa2a4536) SHA1(8f584745116bd0ced4d66719cd80c0372b797134) ) + ROM_LOAD( "ble_06a.15f", 0x10000, 0x20000, CRC(e114ebde) SHA1(12362e809443644b43fbc72e7eead5f376fe11d3) ) + ROM_LOAD( "ble_07.16f", 0x30000, 0x20000, CRC(1d114f13) SHA1(ee3588e1752b3432fd611e2d7d4fb43f942de580) ) + /* the highscore table specifies an unused tile number, so we need ROMREGION_ERASEFF to ensure it is blank */ ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF ) - ROM_LOAD( "bl_08.rom", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */ - ROM_LOAD( "bl_09.rom", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) ) + ROM_LOAD( "bl_08.8h", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */ + ROM_LOAD( "bl_09.9h", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) ) /* 40000-7ffff empty */ - ROM_LOAD( "bl_18.rom", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) ) - ROM_LOAD( "bl_19.rom", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) ) + ROM_LOAD( "bl_18.8j", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) ) + ROM_LOAD( "bl_19.9j", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) ) /* c0000-fffff empty */ ROM_REGION( 0x040000, "gfx2", 0 ) - ROM_LOAD( "bl_16.rom", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */ - ROM_LOAD( "bl_17.rom", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) ) + ROM_LOAD( "bl_16.2j", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */ + ROM_LOAD( "bl_17.3j", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) ) ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */ - ROM_LOAD( "bl_01.rom", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) ) + ROM_LOAD( "bl_01.2d", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) ) ROM_END -ROM_START( blockjoy ) +ROM_START( blockr2 ) ROM_REGION( 0x50000, "maincpu", 0 ) - ROM_LOAD( "ble_05.bin", 0x00000, 0x08000, CRC(fa2a4536) SHA1(8f584745116bd0ced4d66719cd80c0372b797134) ) - ROM_LOAD( "blf_06.bin", 0x10000, 0x20000, CRC(e114ebde) SHA1(12362e809443644b43fbc72e7eead5f376fe11d3) ) -// this seems to be a bad version of the above rom, although the rom code is different it is 99% the same, and level 6 -// is impossible to finish due to a missing block. Probably bitrot -// ROM_LOAD( "ble_06.bin", 0x10000, 0x20000, BAD_DUMP CRC(58a77402) SHA1(cb24b1edd53a0965c3a9a34fe764b5c1f8dd9733) ) + ROM_LOAD( "ble_05.14f", 0x00000, 0x08000, CRC(c12e7f4c) SHA1(335f4eab2323b942d5feeb3bab6f7286fabfffb4) ) + ROM_LOAD( "ble_06.15f", 0x10000, 0x20000, CRC(cdb13d55) SHA1(2e4489d12a603b4c7dfb90d246ebff9176e88a0b) ) + ROM_LOAD( "ble_07.16f", 0x30000, 0x20000, CRC(1d114f13) SHA1(ee3588e1752b3432fd611e2d7d4fb43f942de580) ) - ROM_LOAD( "ble_07.rom", 0x30000, 0x20000, CRC(1d114f13) SHA1(ee3588e1752b3432fd611e2d7d4fb43f942de580) ) + ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF ) + ROM_LOAD( "bl_08.8h", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */ + ROM_LOAD( "bl_09.9h", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) ) + /* 40000-7ffff empty */ + ROM_LOAD( "bl_18.8j", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) ) + ROM_LOAD( "bl_19.9j", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) ) + /* c0000-fffff empty */ + + ROM_REGION( 0x040000, "gfx2", 0 ) + ROM_LOAD( "bl_16.2j", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */ + ROM_LOAD( "bl_17.3j", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) ) + + ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */ + ROM_LOAD( "bl_01.2d", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) ) +ROM_END + +ROM_START( blockj ) + ROM_REGION( 0x50000, "maincpu", 0 ) + ROM_LOAD( "blj_05.14f", 0x00000, 0x08000, CRC(3b55969a) SHA1(86de2f1f5878de380a8b1e3935cffa146863f07f) ) + ROM_LOAD( "ble_06.15f", 0x10000, 0x20000, CRC(cdb13d55) SHA1(2e4489d12a603b4c7dfb90d246ebff9176e88a0b) ) + ROM_LOAD( "blj_07.16f", 0x30000, 0x20000, CRC(1723883c) SHA1(e6b7575a55c045b90fb41290a60306713121acfb) ) - /* the highscore table specifies an unused tile number, so we need ROMREGION_ERASEFF to ensure it is blank */ ROM_REGION( 0x100000, "gfx1", ROMREGION_ERASEFF ) - ROM_LOAD( "bl_08.rom", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */ - ROM_LOAD( "bl_09.rom", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) ) + ROM_LOAD( "bl_08.8h", 0x000000, 0x20000, CRC(aa0f4ff1) SHA1(58f3c468f89d834caaf66d3c084ab87addbb75c0) ) /* chars */ + ROM_LOAD( "bl_09.9h", 0x020000, 0x20000, CRC(6fa8c186) SHA1(d4dd26d666f2accce871f70e7882e140d924dd07) ) /* 40000-7ffff empty */ - ROM_LOAD( "bl_18.rom", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) ) - ROM_LOAD( "bl_19.rom", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) ) + ROM_LOAD( "bl_18.8j", 0x080000, 0x20000, CRC(c0acafaf) SHA1(7c44b2605da6a324d0c145202cb8bac7af7a9c68) ) + ROM_LOAD( "bl_19.9j", 0x0a0000, 0x20000, CRC(1ae942f5) SHA1(e9322790db0bf2a9e862b14e166ee3f36f9ea5ad) ) /* c0000-fffff empty */ ROM_REGION( 0x040000, "gfx2", 0 ) - ROM_LOAD( "bl_16.rom", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */ - ROM_LOAD( "bl_17.rom", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) ) + ROM_LOAD( "bl_16.2j", 0x000000, 0x20000, CRC(fadcaff7) SHA1(f4bd8e375fe6b1e6a07b4ec4e58f5807dbd738f8) ) /* sprites */ + ROM_LOAD( "bl_17.3j", 0x020000, 0x20000, CRC(5f8cab42) SHA1(3a4c682a7938479e0be80c0494c2c8fc7303b663) ) ROM_REGION( 0x80000, "oki", 0 ) /* OKIM */ - ROM_LOAD( "bl_01.rom", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) ) + ROM_LOAD( "bl_01.2d", 0x00000, 0x20000, CRC(c2ec2abb) SHA1(89981f2a887ace4c4580e2828cbdc962f89c215e) ) ROM_END ROM_START( blockbl ) @@ -2323,32 +2341,33 @@ DRIVER_INIT_MEMBER(mitchell_state,mstworld) * *************************************/ -GAME( 1988, mgakuen, 0, mgakuen, mgakuen, mitchell_state, mgakuen, ROT0, "Yuga", "Mahjong Gakuen", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, 7toitsu, mgakuen, mgakuen, mgakuen, mitchell_state, mgakuen, ROT0, "Yuga", "Chi-Toitsu", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, mgakuen2, 0, marukin, marukin, mitchell_state, mgakuen2, ROT0, "Face", "Mahjong Gakuen 2 Gakuen-chou no Fukushuu", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pkladies, 0, marukin, pkladies, mitchell_state, pkladies, ROT0, "Mitchell", "Poker Ladies", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pkladiesl, pkladies, marukin, pkladies, mitchell_state, pkladies, ROT0, "Leprechaun", "Poker Ladies (Leprechaun ver. 510)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pkladiesla,pkladies, marukin, pkladies, mitchell_state, pkladies, ROT0, "Leprechaun", "Poker Ladies (Leprechaun ver. 401)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pkladiesbl,pkladies, pkladiesbl,pkladies, mitchell_state,pkladiesbl,ROT0, "bootleg", "Poker Ladies (Censored bootleg)", MACHINE_NOT_WORKING ) // by Playmark? need to figure out CPU 'decryption' / ordering -GAME( 1989, dokaben, 0, pang, pang, mitchell_state, dokaben, ROT0, "Capcom", "Dokaben (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pang, 0, pang, pang, mitchell_state, pang, ROT0, "Mitchell", "Pang (World)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, bbros, pang, pang, pang, mitchell_state, pang, ROT0, "Mitchell (Capcom license)", "Buster Bros. (USA)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pompingw, pang, pang, pang, mitchell_state, pang, ROT0, "Mitchell", "Pomping World (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pangb, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pangbold, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pangba, pang, spangbl, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 3)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1989, pangb2, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, cworld, 0, pang, qtono1, mitchell_state, cworld, ROT0, "Capcom", "Capcom World (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, hatena, 0, pang, qtono1, mitchell_state, hatena, ROT0, "Capcom", "Adventure Quiz 2 - Hatena? no Daibouken (Japan 900228)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, spang, 0, pangnv, pang, mitchell_state, spang, ROT0, "Mitchell", "Super Pang (World 900914)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, sbbros, spang, pangnv, pang, mitchell_state, sbbros, ROT0, "Mitchell (Capcom license)", "Super Buster Bros. (USA 901001)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, spangj, spang, pangnv, pang, mitchell_state, spangj, ROT0, "Mitchell", "Super Pang (Japan 901023)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, spangbl, spang, spangbl, spangbl, mitchell_state, spangbl, ROT0, "bootleg", "Super Pang (World 900914, bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // different sound hardware -GAME( 1994, mstworld, 0, mstworld,mstworld, mitchell_state, mstworld, ROT0, "bootleg (TCH)", "Monsters World (bootleg of Super Pang)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1990, marukin, 0, marukin, marukin, mitchell_state, marukin, ROT0, "Yuga", "Super Marukin-Ban (Japan 901017)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, qtono1, 0, pang, qtono1, mitchell_state, qtono1, ROT0, "Capcom", "Quiz Tonosama no Yabou (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, qsangoku, 0, pang, qtono1, mitchell_state, qsangoku, ROT0, "Capcom", "Quiz Sangokushi (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, block, 0, pangnv, block, mitchell_state, block, ROT270, "Capcom", "Block Block (World 910910)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, blockj, block, pangnv, block, mitchell_state, block, ROT270, "Capcom", "Block Block (Japan 910910)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, blockjoy, block, pangnv, blockjoy, mitchell_state, block, ROT270, "Capcom", "Block Block (World 911106 Joystick)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, blockbl, block, pangnv, block, mitchell_state, blockbl, ROT270, "bootleg", "Block Block (bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, mgakuen, 0, mgakuen, mgakuen, mitchell_state, mgakuen, ROT0, "Yuga", "Mahjong Gakuen", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, 7toitsu, mgakuen, mgakuen, mgakuen, mitchell_state, mgakuen, ROT0, "Yuga", "Chi-Toitsu", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, mgakuen2, 0, marukin, marukin, mitchell_state, mgakuen2, ROT0, "Face", "Mahjong Gakuen 2 Gakuen-chou no Fukushuu", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pkladies, 0, marukin, pkladies, mitchell_state, pkladies, ROT0, "Mitchell", "Poker Ladies", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pkladiesl, pkladies, marukin, pkladies, mitchell_state, pkladies, ROT0, "Leprechaun", "Poker Ladies (Leprechaun ver. 510)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pkladiesla,pkladies, marukin, pkladies, mitchell_state, pkladies, ROT0, "Leprechaun", "Poker Ladies (Leprechaun ver. 401)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pkladiesbl,pkladies, pkladiesbl,pkladies, mitchell_state, pkladiesbl,ROT0, "bootleg", "Poker Ladies (Censored bootleg)", MACHINE_NOT_WORKING ) // by Playmark? need to figure out CPU 'decryption' / ordering +GAME( 1989, dokaben, 0, pang, pang, mitchell_state, dokaben, ROT0, "Capcom", "Dokaben (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pang, 0, pang, pang, mitchell_state, pang, ROT0, "Mitchell", "Pang (World)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, bbros, pang, pang, pang, mitchell_state, pang, ROT0, "Mitchell (Capcom license)", "Buster Bros. (USA)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pompingw, pang, pang, pang, mitchell_state, pang, ROT0, "Mitchell", "Pomping World (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pangb, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pangbold, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pangba, pang, spangbl, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 3)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1989, pangb2, pang, pang, pang, mitchell_state, pangb, ROT0, "bootleg", "Pang (bootleg, set 4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, cworld, 0, pang, qtono1, mitchell_state, cworld, ROT0, "Capcom", "Capcom World (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, hatena, 0, pang, qtono1, mitchell_state, hatena, ROT0, "Capcom", "Adventure Quiz 2 - Hatena? no Daibouken (Japan 900228)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, spang, 0, pangnv, pang, mitchell_state, spang, ROT0, "Mitchell", "Super Pang (World 900914)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, sbbros, spang, pangnv, pang, mitchell_state, sbbros, ROT0, "Mitchell (Capcom license)", "Super Buster Bros. (USA 901001)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, spangj, spang, pangnv, pang, mitchell_state, spangj, ROT0, "Mitchell", "Super Pang (Japan 901023)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, spangbl, spang, spangbl, spangbl, mitchell_state, spangbl, ROT0, "bootleg", "Super Pang (World 900914, bootleg)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // different sound hardware +GAME( 1994, mstworld, 0, mstworld, mstworld, mitchell_state, mstworld, ROT0, "bootleg (TCH)", "Monsters World (bootleg of Super Pang)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1990, marukin, 0, marukin, marukin, mitchell_state, marukin, ROT0, "Yuga", "Super Marukin-Ban (Japan 901017)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, qtono1, 0, pang, qtono1, mitchell_state, qtono1, ROT0, "Capcom", "Quiz Tonosama no Yabou (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, qsangoku, 0, pang, qtono1, mitchell_state, qsangoku, ROT0, "Capcom", "Quiz Sangokushi (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, block, 0, pangnv, blockjoy, mitchell_state, block, ROT270, "Capcom", "Block Block (World 911219 Joystick)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, blockr1, block, pangnv, blockjoy, mitchell_state, block, ROT270, "Capcom", "Block Block (World 911106 Joystick)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, blockr2, block, pangnv, block, mitchell_state, block, ROT270, "Capcom", "Block Block (World 910910)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, blockj, block, pangnv, block, mitchell_state, block, ROT270, "Capcom", "Block Block (Japan 910910)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, blockbl, block, pangnv, block, mitchell_state, blockbl, ROT270, "bootleg", "Block Block (bootleg)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp index aa1b5b6a236..09e83e6dcf6 100644 --- a/src/mame/drivers/mmodular.cpp +++ b/src/mame/drivers/mmodular.cpp @@ -15,7 +15,6 @@ Vancouver 68020 12Mhz Genius 68030 V4.00 33.333 Mhz Genius 68030 V4.01 33.333 Mhz - Genius 68030 V4.01 33.333x2 Mhz (custom MESS overclocked version for higher ELO) Berlin Pro 68020 24.576 Mhz (not modular board, but otherwise close to milano) Berlin Pro (London) 68020 24.576 Mhz (not modular board, but otherwise close to milano) London 68030 V5.00k 33.333 Mhz (probably the Genius 3/4 update ROM) @@ -998,16 +997,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(polgar_state::timer_update_irq_academy) MACHINE_START_MEMBER(polgar_state,van32) { // patch LCD delay loop on the 68030 machines until waitstates and/or opcode timings are fixed in MAME core -// patches gen32 gen32_41 gen32_oc lond030 +// patches gen32 gen32_41 lond030 UINT8 *rom = memregion("maincpu")->base(); if(rom[0x870] == 0x0c && rom[0x871] == 0x78) { - if (!strcmp(machine().system().name,"gen32_oc")) { - rom[0x870] = 0x6c; - } else { - rom[0x870] = 0x38; - } + rom[0x870] = 0x38; } } @@ -1694,15 +1689,6 @@ static MACHINE_CONFIG_START( gen32, polgar_state ) MACHINE_CONFIG_END -static MACHINE_CONFIG_DERIVED( gen32_oc, gen32 ) - MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_CLOCK( XTAL_33_333MHz * 2 ) - MCFG_DEVICE_REMOVE("int_timer") - MCFG_TIMER_DRIVER_ADD_PERIODIC("int_timer", polgar_state, timer_update_irq6, attotime::from_hz(500)) - - -MACHINE_CONFIG_END - static MACHINE_CONFIG_START( bpl32, polgar_state ) MCFG_CPU_ADD("maincpu", M68020, XTAL_24_576MHz) MCFG_CPU_PROGRAM_MAP(bpl32_mem) @@ -1851,11 +1837,6 @@ ROM_START( gen32_41 ) ROM_LOAD("gen32_41.bin", 0x00000, 0x40000,CRC(ea9938c0) SHA1(645cf0b5b831b48104ad6cec8d78c63dbb6a588c)) ROM_END -ROM_START( gen32_oc ) - ROM_REGION32_BE( 0x40000, "maincpu", 0 ) - ROM_LOAD("gen32_41.bin", 0x00000, 0x40000,CRC(ea9938c0) SHA1(645cf0b5b831b48104ad6cec8d78c63dbb6a588c)) -ROM_END - ROM_START( berlinp ) ROM_REGION32_BE( 0x40000, "maincpu", 0 ) ROM_LOAD("berlinp.bin", 0x00000, 0x40000,CRC(82FBAF6E) SHA1(729B7CEF3DFAECC4594A6178FC4BA6015AFA6202)) @@ -1904,7 +1885,6 @@ DRIVER_INIT_MEMBER(polgar_state,polgar) CONS( 1992, risc, 0, 0, risc, van16, driver_device, 0, "Saitek", "RISC2500", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK|MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) CONS( 1993, gen32, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.00", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) CONS( 1993, gen32_41, van16, 0, gen32, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.01", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) - CONS( 1993, gen32_oc, van16, 0, gen32_oc, gen32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Genius030 V4.01OC", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK|MACHINE_UNOFFICIAL | MACHINE_CLICKABLE_ARTWORK ) CONS( 1994, berlinp, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro 68020", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) CONS( 1996, bpl32, van16, 0, bpl32, bpl32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto Berlin Pro London Upgrade V5.00", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) CONS( 1996, lond020, van16, 0, van32, van32, driver_device, 0, "Hegener & Glaser Muenchen", "Mephisto London 68020 32 Bit", MACHINE_SUPPORTS_SAVE|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp index aca17b6ecfc..8f640ac1b9f 100644 --- a/src/mame/drivers/model3.cpp +++ b/src/mame/drivers/model3.cpp @@ -92,11 +92,11 @@ Tilemap entry formats (16-bit wide): are the palette select bits for 8bpp and PHI-T5 for 4bpp. =================================================================================== - -Model 3 Hardware Overview. +Guru-Readme +Model 3 Hardware Overview Sega, 1996-1998 -This document covers all games running on the original Model 3 hardware and is produced with +This document covers all games running on the original Model 3 hardware with reference to a Scud Race PCB and Virtua Fighter 3TB PCB. ALL PCB numbers are identical. Scud Race runs on the original Sega Model 3 hardware. It's the same PCB as Virtua Fighter 3, there is no mention of 'Step 1.5' or even 'Step 1.0' on any of the PCBs and there is no 50MHz or @@ -136,8 +136,6 @@ Virtua Striker 2 Virtua Striker 2 Version '98 -[There is an external MPEG PCB used on some games but it was not available for documenting] - COMM Board ---------- 171-7053B @@ -196,6 +194,30 @@ Notes: if different, it's likely only for the games that use 64MBit MASKROMs. ROMs - Not all sockets are populated. See MAME src for exact ROM usage. +(For dumping reference) +Jumpers centre pin joins +------------------------------------------------------- +JP3: 2-3 pin2 of ic 1 to ic 16 and pin 39 of ic 17 to ic 20 +JP4: 2-3 pin2 of ic 1 to ic 16 and pin 39 of ic 17 to ic 20 +JP5: 2-3 pin2 of ic 1 to ic 16 and pin 39 of ic 17 to ic 20 +JP6: 2-3 pin2 of ic 1 to ic 16 and pin 39 of ic 17 to ic 20 +JP7: 2-3 pin2 of ic 22 to ic 25 and pin 39 ic ic21 +JP8: 2-3 pin32 of ic 22 to ic 25 +JP9: 2-3 pin32 of ic 22 to ic 25 +Jumper pos. 1 is +5V + +JP1: 1-2 gnd +JP2: 2-3 +5v +Jumper pos. 1 is GND +Jumper pos. 3 is +5V + + pin1 joins +------------------------------- +JP10: 1-2 pin32 of ic 26 to ic 41 + +All CROM ROMs are 32M MASK +ALL VROM ROMs are 16M MASK + CPU Board --------- @@ -317,12 +339,69 @@ Notes: Other than the revision of the listed chips, the PCBs are identical. - -Harley Davidson (Rev.A) -Sega, 1997 - -This game runs on Sega Model3 Step2 hardware. - +External MPEG Audio Board +------------------------- +This is the first version of the Model 3 Digital Audio Board used +on Scud Race and is usually just mounted bare onto the outside of +the main board metal box. + +837-10084 DIGITAL AUDIO BD SEGA 1993 +171-6614B PC BD +Sticker: 837-12941 +|-------------------------------------------------| +| CN3 CN4 CN1 R RCA-1 CN2 RCA-2 | +| MB84256 PC910 4040 7805 TL062 TL062 D6376 | +| D71051 SM5840| +| EPROM.IC2 |------| | +| Z80 16MHz |NEC | | +| |D65654| | +| |--------| |------| | +| |SEGA | KM68257 | +| |315-5762| KM68257 | +| | | KM68257 MB84256 | +| 20MHz|--------| | +| | +| MB3771 JP1 JP2 MROM.IC57| +| 12.288MHz | +| MROM.IC58| +| | +| MROM.IC59| +| | +|DSW(4) G G G G MROM.IC60| +|-------------------------------------------------| +Notes: + Z80 - Clock 4.000MHz [16/4] +EPROM.IC2 - 27C1001/27C010 EPROM (DIP32) + - Scud Race : EPR-19612.IC2 + MROM* - 8M/16M Mask ROM (DIP42) + - Scud Race : MPR-19603/04/05/06 + MB84256 - Fujitsu MB84256 32kx8 SRAM (DIP28) + KM68257 - Samsung KM68257 32kx8 SRAM (DIP28). On this PCB pin 1 (A14) is grounded with a jumper wire on all 3 chips making it 16k + PC910 - Sharp PC910 Optocoupler (DIP8) + 4040 - 74HC4040 logic chip + 7805 - 12V to 5V Voltage Regulator + MB3771 - Fujitsu MB3771 Master Reset IC (DIP8) + TL062 - Texas Instruments TL062 Low Power JFET-Input Operational Amplifier (DIP8) + D71051 - NEC uPD71051 Serial Control Unit USART, functionally equivalent to uPD8251 (SOP28) + D65654 - NEC uPD65654 CMOS Gate Array (QFP100) + SM5840 - Nippon Precision Circuits SM5840 Digital Audio Multi-Function Digital Filter (DIP18) + D6376 - NEC uPD6376GS Audio 2-Channel 16-bit D/A converter (DIP16) + 315-5762 - Sega custom chip, probably a NEC or Texas Instruments DSP or MCU, clock input 20MHz (PLCC68) + R - Red LED + G - Green LED + DSW - 4 position DIP switch, all OFF + JP1 - 1-2 (Select 16M ROM on bank 1 - IC57 & IC58). alt is select 8M + JP2 - 1-2 (Select 16M ROM on bank 2 - IC59 & IC60). alt is select 8M + CN1 - 10-pin power input connector + CN2 - 5-pin connector for Left+/Left-/Right+/Right- Stereo Audio Output + CN3 - 6-pin connector for MIDI TX+/TX-/RX+/RX- communication + CN4 - 4-pin connector (not used) + RCA* - Left/Right RCA Audio Output Jacks (not used) + + +Sega Model 3 Step2 hardware +--------------------------- +This covers most, if not all of the later MODEL 3 games on Step 2 & 2.1 hardware. ROM Board --------- @@ -352,6 +431,8 @@ ROM Board | | |---------------------------------------------------------------------------------------------------| +Notes: (ROMs documented are for Harley Davidson) + VROM00.27 mpr-20378 \ VROM01.26 mpr-20377 | VROM02.29 mpr-20380 | @@ -491,7 +572,7 @@ CPU Board | CN25 | | RTC72423 (Connector for ) | | KM4132G271AQ-10 (Protection PCB) | -| ( not used ) | +| | | 32MHz BATT_3V | | NEC D71051-10 | | | @@ -573,76 +654,68 @@ Security Board 315-6050 Lattice ispLSI 2032 315-5881 TQFP100 stamped 317-0247-COM for Spikeout FE -=================================================================================== - -Scud Race -Sega, 1996 - -Tis game runs on Sega Model 3 Step 1.5 hardware - - -Sound Board (bolted to outside of the metal box) ------------ - -PCB Layout ----------- - -PCB Number: 837-10084 DIGITAL AUDIO BD (C) SEGA 1993 ---------------------------------------------------------------- -84256 D71051GU-10 D6376 SM5840 -epr-19612 -Z80 16MHz SEGA D65654GF102 - 315-5762 (QFP100) - (PLCC68) - 20MHz KM68257 - KM68257 84256 - KM68257 - 12.288MHz mpr-19603 - mpr-19604 - mpr-19605 -DSW1 mpr-19606 ----------------------------------------------------------------- - - -Jumpers -JP1: 1-2 (Select 16M ROM on bank 1 - ic57 & ic58) -JP2: 1-2 (Select 16M ROM on bank 2 - ic59 & ic60) - - - -ROM Board ---------- - -PCB Number: 837-11860 MODEL3 ROM BOARD (C) SEGA 1995 - -(For dumping reference) - -Jumpers centre pin joins -------------------------------------------------------- -JP3: 2-3 pin2 of ic 1 to 16 and pin 39 of ic 17 to 20 -JP4: 2-3 pin2 of ic 1 to 16 and pin 39 of ic 17 to 20 -JP5: 2-3 pin2 of ic 1 to 16 and pin 39 of ic 17 to 20 -JP6: 2-3 pin2 of ic 1 to 16 and pin 39 of ic 17 to 20 -JP7: 2-3 pin2 of ic 22 to 25 and pin 39 ic ic21 -JP8: 2-3 pin32 of ic 22 to 25 -JP9: 2-3 pin32 of ic 22 to 25 -Jumper pos. 1 is +5V -JP1: 1-2 gnd -JP2: 2-3 +5v -Jumper pos. 1 is GND -Jumper pos. 3 is +5V - - pin1 joins -------------------------------- -JP10: 1-2 pin32 of ic 26 to 41 - -All CROM ROMs are 32M MASK -ALL VROM ROMs are 16M MASK - -*/ +External MPEG Audio Board +------------------------- +This is the second version of the Model 3 Digital Audio Board used on +Sega Rally 2, Daytona USA 2 and others and is mounted inside a metal box. + +837-12273 DIGITAL SOUND BD 2 SEGA 1995 +171-7165D PC BD +Sticker: 837-12273-92 +Sticker: 837-13376 +|-------------------------------------------------| +| CN1 CN2 R CN5 CN6 LMC6484 CN7 | +|315-5932 D71051 PQ30RV21 7805 D63210 D63210 | +|PC910 R 12.288MHz | +| JP8 | +|68EC000 315-6028A | +| 33MHz | +|KM62256 * | +|KM62256 MCM6206 | +| MCM6206 JP4/5/6/7 | +| JP1/2/3 315-5934| +|3771 JP10 | +| JP9 | +| EPROM.IC2 | +| RGRG MROM.IC18 MROM.IC20 MROM.IC22 MROM.IC24 | +|DSW(4) MROM.IC19 MROM.IC21 MROM.IC23 MROM.IC25| +|-------------------------------------------------| +Notes: + 68000 - Motorola 68EC000FN12 CPU, clock 11.000MHz [33/3] (PLCC68) +EPROM.IC2 - 27C1024 EPROM (DIP40) + - Sega Rally 2 : EPR-20641.IC2 + - Daytona 2 : EPR-20886.IC2 + MROM* - Mask ROM (DIP42) + - Sega Rally 2 : MPR-20637/38/39/40 + - Daytona 2 : MPR-20887/88/89/90 + KM62256 - Samsung KM62256 32kx8 SRAM (SOP28) + MCM6206 - Motorola MCM6206 32kx8 SRAM (SOP28) + PC910 - Sharp PC910 Optocoupler (DIP8) + 7805 - 12V to 5V Voltage Regulator + PQ30RV21 - Sharp PQ30RV21 3.3V Voltage Regulator + MB3771 - Fujitsu MB3771 Master Reset IC (SOIC8) + 315-5934 - GAL16V8 (PLCC20) + 315-5932 - GAL16V8 (PLCC20) + LMC6484 - Texas Instruments LMC6484IM CMOS Quad Rail-to-Rail Input and Output Operational Amplifier (SOIC14) + D71051 - NEC uPD71051 Serial Control Unit USART, functionally equivalent to uPD8251 (SOP28) + D63210 - NEC uPD63210 16-bit D/A Converter with built-in Digital Filter for Audio (SOP28) +315-6028A - Sega custom chip, probably a NEC DSP, clock input 12.228MHz (QFP100) + * - Unpopulated position on bottom side of PCB for a NEC uPD77016 DSP. The Sega chip above may be similar to this + R - Red LED + G - Green LED + DSW - 4 position DIP switch, all OFF + JP1/2/3 - Jumpers to configure ROMs +JP4/5/6/7 - Jumpers to configure ROMs + JP8 - Jumper tied to pin 26 (IPL1) of MC68EC000 + JP9/10 - Jumpers to configure ROMs, tied to GAL16V8 315-5934 + CN1 - 6-pin connector for MIDI TX+/TX-/RX+/RX- communication + CN2 - 4-pin connector (not used) + CN5 - 10-pin power input connector + CN6 - 5-pin connector for Left+/Left-/Right+/Right- Stereo Audio Output + CN7 - 5-pin connector (not used) +=================================================================================== -/* magtruck locations of interest 000006ee (word) - incremented each vblank, used by mainline to busywait. diff --git a/src/mame/drivers/mpz80.cpp b/src/mame/drivers/mpz80.cpp index 0c42707b541..e5e05a051a4 100644 --- a/src/mame/drivers/mpz80.cpp +++ b/src/mame/drivers/mpz80.cpp @@ -716,7 +716,7 @@ static MACHINE_CONFIG_START( mpz80, mpz80_state ) MCFG_S100_BUS_ADD() MCFG_S100_IRQ_CALLBACK(WRITELINE(mpz80_state, s100_pint_w)) MCFG_S100_NMI_CALLBACK(WRITELINE(mpz80_state, s100_nmi_w)) - MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT)) + MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT)) MCFG_S100_SLOT_ADD("s100_1", mpz80_s100_cards, "mm65k16s") MCFG_S100_SLOT_ADD("s100_2", mpz80_s100_cards, "wunderbus") MCFG_S100_SLOT_ADD("s100_3", mpz80_s100_cards, "dj2db") diff --git a/src/mame/drivers/mrgame.cpp b/src/mame/drivers/mrgame.cpp index beb0a9e0bca..bcb1e89957a 100644 --- a/src/mame/drivers/mrgame.cpp +++ b/src/mame/drivers/mrgame.cpp @@ -492,7 +492,7 @@ static MACHINE_CONFIG_START( mrgame, mrgame_state ) MCFG_DAC_ADD("dacr") MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) MCFG_SOUND_ADD("tms", TMS5220, 672000) // uses a RC combination. 672k copied from jedi.h - MCFG_TMS52XX_READYQ_HANDLER(INPUTLINE("audiocpu2", Z80_INPUT_LINE_WAIT)) + MCFG_TMS52XX_READYQ_HANDLER(INPUTLINE("audiocpu2", Z80_INPUT_LINE_BOGUSWAIT)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) diff --git a/src/mame/drivers/namcops2.cpp b/src/mame/drivers/namcops2.cpp index a0eec46f766..d53c83c3085 100644 --- a/src/mame/drivers/namcops2.cpp +++ b/src/mame/drivers/namcops2.cpp @@ -1461,6 +1461,18 @@ ROM_START( wanganmd ) DISK_IMAGE_READONLY( "wmn1-a", 0, SHA1(4254e987e71d0d4038a87f11dc1a304396b3dffc) ) ROM_END +ROM_START( wanganmr ) + ROM_REGION(0x200000, "bios", 0) + SYSTEM246_BIOS + + ROM_REGION(0x840000, "key", ROMREGION_ERASE00) + ROM_LOAD( "wmr1vera.ic002", 0x000000, 0x800000, CRC(b431936b) SHA1(e2c543936cb5689a432662a69d0042c6179a3728) ) + ROM_LOAD( "wmr1vera_spr.ic002", 0x800000, 0x040000, CRC(b8b7539c) SHA1(f415bdc8e3ebf3b0c3d0d7607b894440e89b0fe7) ) + + DISK_REGION("dvd") // actually single-track CD-ROM + DISK_IMAGE_READONLY( "wmr1-a", 0, SHA1(02feab4380dcc2dd95c85b209192f858bafc721e) ) +ROM_END + ROM_START( vnight ) ROM_REGION(0x200000, "bios", 0) SYSTEM246_BIOS @@ -1585,6 +1597,7 @@ GAME(2002, tekken4, sys246, system246, system246, driver_device, 0, ROT0, "Na GAME(2002, tekken4a, tekken4, system246, system246, driver_device, 0, ROT0, "Namco", "Tekken 4 (TEF2 Ver. A)", MACHINE_IS_SKELETON) GAME(2002, tekken4b, tekken4, system246, system246, driver_device, 0, ROT0, "Namco", "Tekken 4 (TEF1 Ver. A)", MACHINE_IS_SKELETON) GAME(2002, tekken4c, tekken4, system246, system246, driver_device, 0, ROT0, "Namco", "Tekken 4 (TEF1 Ver. C)", MACHINE_IS_SKELETON) +GAME(2002, wanganmr, sys246, system246, system246, driver_device, 0, ROT0, "Namco", "Wangan Midnight R (WMR1 Ver. A)", MACHINE_IS_SKELETON) GAME(2003, prdgp03, sys246, system246, system246, driver_device, 0, ROT0, "Namco", "Pride GP 2003 (PR21 Ver. A)", MACHINE_IS_SKELETON) GAME(2003, timecrs3, sys246, system246, system246, driver_device, 0, ROT0, "Namco", "Time Crisis 3 (TST1)", MACHINE_IS_SKELETON) GAME(2003, timecrs3e,timecrs3, system246, system246, driver_device, 0, ROT0, "Namco", "Time Crisis 3 (TST2 Ver. A)", MACHINE_IS_SKELETON) diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp index de906fba250..96dc89ca2c4 100644 --- a/src/mame/drivers/naomi.cpp +++ b/src/mame/drivers/naomi.cpp @@ -377,7 +377,7 @@ Airline Pilots (Rev A) 840-0005C 21739A 11 (64Mb) Cosmic Smash 840-0044C 23428 8 (64Mb) ? 315-6213 317-0289-COM joystick + 2 buttons Cosmic Smash (Rev A) 840-0044C 23428A 8 (64Mb) ? 315-6213 317-0289-COM joystick + 2 buttons Crazy Taxi 840-0002C 21684 13 (64Mb)* present 315-6213 317-0248-COM * ic8 and ic9 are not present -Dead Or Alive 2 841-0003C 22121 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons +Dead Or Alive 2 (Rev A) 841-0003C 22121A 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons Dead Or Alive 2 Millennium 841-0003C DOA2 M 21 (64Mb) present 315-6213 317-5048-COM joystick + 3 buttons Death Crimson OX 841-0016C 23524 10 (64Mb) present 315-6213 317-5066-COM Dengen Tenshi Taisen Janshi Shangri-La 841-0004C 22060 12 (64Mb) ? 315-6213 317-5050-JPN @@ -1862,7 +1862,9 @@ READ64_MEMBER(naomi_state::aw_modem_r ) { /* 0x00600280 r 0000dcba - a/b/c/d - coin inputs 1-4, active low + a/b - 1P/2P coin inputs (JAMMA), active low + c/d - 3P/4P coin inputs (EX. IO board), active low + (ab == 0) -> BIOS skip RAM test */ return U64(0xffffffff00000000) | (ioport("COINS")->read() & 0x0F); @@ -1896,8 +1898,8 @@ WRITE64_MEMBER(naomi_state::aw_modem_w ) TODO: hook this then MAME have such devices emulated 0x00600288 rw 0000dcba - a - 1P coin couner - b - 2P coin couner + a - 1P coin counter + b - 2P coin counter c - 1P coin lockout d - 2P coin lockout @@ -2965,9 +2967,20 @@ Probably at some stage of development NAOMI was planned as non-JVS system as wel ROM_SYSTEM_BIOS( 20, "bios20", "Naomi Dev BIOS" ) \ ROM_LOAD16_WORD_SWAP_BIOS( 20, "dcnaodev.bios", 0x000000, 0x080000, CRC(7a50fab9) SHA1(ef79f448e0bf735d1264ad4f051d24178822110f) ) \ ROM_SYSTEM_BIOS( 21, "bios21", "Naomi Dev BIOS v1.10" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 21, "develop110.ic27", 0x000000, 0x200000, CRC(de7cfdb0) SHA1(da16800edc4d49f70481c124d487f544c2fa8ce7) ) + ROM_LOAD16_WORD_SWAP_BIOS( 21, "develop110.ic27", 0x000000, 0x200000, CRC(de7cfdb0) SHA1(da16800edc4d49f70481c124d487f544c2fa8ce7) ) \ + ROM_SYSTEM_BIOS( 22, "bios22", "Naomi Unknown Dev board" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 22, "zukinver0930.ipl", 0x000000, 0x200000, CRC(58e17c23) SHA1(19330f906accf1b859f56bbcedc2edff73747599) ) /* dcnaodev.bios comes from a dev / beta board. The eprom was a 27C4096 */ +/* + zukinver0930.ipl comes from 837-13502-01 / 837-13663 PCB which contains: + 22 empty sockets ROM0 - ROM21 + 315-6187 Altera EPM7064LC68-10 + PC16550DV UART + Fujitsu MB???? SCSI controller + IPL BOOT ROM with printed label "Zukin Ver.0930 / 99/5/24 / SUM:DB9C" +*/ + // bios for House of the Dead 2 #define HOTD2_BIOS \ ROM_REGION( 0x200000, "maincpu", 0) \ @@ -3411,7 +3424,7 @@ ROM_START( doa2 ) NAOMI_DEFAULT_EEPROM_NO_BD ROM_REGION( 0xb000000, "rom_board", ROMREGION_ERASEFF) - ROM_LOAD("epr-22121.ic22", 0x0000000, 0x0400000, CRC(30f93b5e) SHA1(0e33383e7ab9a721dab4708b063598f2e9c9f2e7) ) // partially encrypted + ROM_LOAD("epr-22121a.ic22", 0x0000000, 0x0400000, CRC(30f93b5e) SHA1(0e33383e7ab9a721dab4708b063598f2e9c9f2e7) ) // partially encrypted ROM_LOAD("mpr-22100.ic1", 0x0800000, 0x0800000, CRC(92a53e5e) SHA1(87fcdeee9c4e65a3eb6eb345eed85d4f2df26c3c) ) ROM_LOAD("mpr-22101.ic2", 0x1000000, 0x0800000, CRC(14cd7dce) SHA1(5df14a5dad14bc922b4f88881dc2e9c8e74d6170) ) @@ -7963,6 +7976,26 @@ ROM_START( puyofev ) ROM_LOAD("317-0375-com.pic", 0x00, 0x4000, CRC(52b56b52) SHA1(221590efbb09824621714cb163bda51a921d7d54) ) ROM_END +/* + note: + both Dragon Treasure game binaries have only first 16MB encrypted using DES key from security PIC provided with GD-ROMs. + the rest of data encrypted using some other key, same in both game versions. + presumably this data uploaded via network to satellite units and decrypted using DES key from their own security PICs. +*/ + +// requires 837-14381 "G2 EXPANSION BD" I/O board +ROM_START( dragntr2 ) + NAOMIGD_BIOS + NAOMI_DEFAULT_EEPROM + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gds-0037a", 0, SHA1(ce65fe84cabaa1ac3f40bff9535a42c2055b5f1c) ) + + ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF) + //PIC is missing + ROM_LOAD("317-xxxx-xxx.pic", 0x00, 0x4000, NO_DUMP ) +ROM_END + // requires 837-14381 "G2 EXPANSION BD" I/O board ROM_START( dragntr3 ) NAOMIGD_BIOS @@ -9008,6 +9041,9 @@ ROM_START( ngbc ) ROM_LOAD( "ax3301f01.bin", 0, 4, CRC(9afe949b) SHA1(4f7b039f3287da61a53a2d012993bfb57e1459bd) ) ROM_END +// note: it looks there no regional differences in KOF NW EN and JP cartridge dumps, possible JP is just newer revision + +// Build: Jul 2004 ROM_START( kofnw ) AW_BIOS @@ -9024,6 +9060,7 @@ ROM_START( kofnw ) ROM_LOAD( "ax2201f01.bin", 0, 4, CRC(b1fff0c8) SHA1(d83177e3672378a2bbc08653b4b73704333ca30a) ) ROM_END +// Build: Sep 2004 ROM_START( kofnwj ) AW_BIOS @@ -9142,6 +9179,7 @@ ROM_START( ftspeed ) ROM_LOAD( "ax1701f01.bin", 0, 4, CRC(f3f03c35) SHA1(2a8329a29cdcc0219e9360cc573c0f3ad44d0175) ) ROM_END +// contents of cartridges labeled as JP and EN is the same ROM_START( kofxi ) AW_BIOS @@ -9456,8 +9494,8 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", " /* 841-xxxxx ("Licensed by Sega" Naomi cart games)*/ /* 0001 */ GAME( 1999, pstone, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Capcom", "Power Stone (JPN, USA, EUR, ASI, AUS)", GAME_FLAGS ) /* 0002 */ GAME( 1999, suchie3, naomi, naomim2, suchie3, naomi_state,naomi_mp,ROT0, "Jaleco", "Idol Janshi Suchie-Pai 3 (JPN)", GAME_FLAGS ) -/* 0003 */ GAME( 1999, doa2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS ) -/* 0003 */ GAME( 2000, doa2m, doa2, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 Millennium (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS ) +/* 0003 */ GAME( 1999, doa2, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 (Rev A)", GAME_FLAGS ) +/* 0003 */ GAME( 2000, doa2m, doa2, naomim2, naomi, naomi_state, naomi, ROT0, "Tecmo", "Dead or Alive 2 Millennium", GAME_FLAGS ) /* 0004 */ GAME( 1999, shangril, naomi, naomim2, naomi_mp,naomi_state,naomi_mp,ROT0, "Marvelous Ent.", "Dengen Tenshi Taisen Janshi Shangri-la (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS ) /* 0005 */ GAME( 1999, spawn, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Todd Mc Farlane / Capcom","Spawn In the Demon's Hand (JPN, USA, EUR, ASI, AUS) (Rev B)", GAME_FLAGS ) /* 0006 */ GAME( 1999, puyoda, naomi, naomim2, naomi, naomi_state, naomi, ROT0, "Compile", "Puyo Puyo Da!", GAME_FLAGS ) @@ -9566,7 +9604,7 @@ GAME( 2003, puyofevp, naomi, naomim1, naomi, naomi_state, naomi, ROT0, "Sega", " // 0036E Virtua Fighter 4 Final Tuned (GDS-0036E) /* 0036F */ GAME( 2004, vf4tuned, naomi2, naomi2gd, naomi, naomi_state, naomi2, ROT0, "Sega", "Virtua Fighter 4 Final Tuned (Rev F) (GDS-0036F)", GAME_FLAGS ) // 0037 Dragon Treasure 2 (GDS-0037) -// 0037A Dragon Treasure 2 (Rev A) (GDS-0037A) +/* 0037A */ GAME( 2004, dragntr2, naomigd, naomigd, naomi, naomi_state, naomigd, ROT0, "Sega", "Dragon Treasure 2 (Rev A) (GDS-0037A)", GAME_FLAGS ) // 0038 // 0039 Initial D Arcade Stage Ver. 3 Cycraft Edition (GDS-0039) /* 0039A */ GAME( 2006, inidv3ca, inidv3cy,naomigd, naomi, naomi_state, naomi2, ROT0, "Sega", "Initial D Arcade Stage Ver. 3 Cycraft Edition (Rev A) (GDS-0039A)", GAME_FLAGS ) diff --git a/src/mame/drivers/nibble.cpp b/src/mame/drivers/nibble.cpp new file mode 100644 index 00000000000..f89a14f0f38 --- /dev/null +++ b/src/mame/drivers/nibble.cpp @@ -0,0 +1,362 @@ +// license:BSD-3-Clause +// copyright-holders:Roberto Fresca +/************************************************************************* + + Lucky 9, Nibble. + + Driver by Roberto Fresca. + + Seems some sort of gambling game with playing cards (no poker) + and girls graphics... + + +************************************************************************** + + Specs: + + 1x UM6845 (U67). + 1x AY38910A/p (U75). + + 3x HY6264P-12 (U153, U154, U25). + 2x IMSG171P-50G (U32, U104). + + 2 Chips with no markings! + + 8x 64K Graphics ROMs (U139, U141, U149, U147, U137, U143, U145, U152). + 1x 64K Program ROM (U123). + 1x 128K unknown ROM (U138). + + 1x TI LF347N (U158) Operational Amplifier. + 1x LM380N (U82) 2.5W Audio Power Amplifier. + + 2x XTAL - 11.98135 KDS9C + 2x 8 DIP switches banks. + 1x 3.6V lithium battery. + 1x Reset push button. + + +************************************************************************** + + Tech notes... + + About the unknown ICs: + DIP64 (U101) CPU with Xtal tied to pins 30 % 31. --> TMS9900? (ROM 9) + DIP40 (U64) CPU or sound IC driving 128k (ROM 10) data? (pin 20 tied to GND) + + +*************************************************************************/ + + +#define MASTER_CLOCK XTAL_12MHz + +#include "emu.h" +#include "cpu/tms9900/tms9980a.h" +//#include "cpu/tms9900/tms9900.h" +#include "sound/ay8910.h" +#include "video/mc6845.h" + + +class nibble_state : public driver_device +{ +public: + nibble_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_videoram(*this, "videoram"), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode") { } + + required_shared_ptr<UINT8> m_videoram; + tilemap_t *m_bg_tilemap; + DECLARE_WRITE8_MEMBER(nibble_videoram_w); + TILE_GET_INFO_MEMBER(get_bg_tile_info); + + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + DECLARE_PALETTE_INIT(nibble); + UINT32 screen_update_nibble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(nibble_interrupt); + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; +}; + + +/************************* +* Video Hardware * +*************************/ + +WRITE8_MEMBER(nibble_state::nibble_videoram_w) +{ + m_videoram[offset] = data; + m_bg_tilemap->mark_tile_dirty(offset); +} + + +TILE_GET_INFO_MEMBER(nibble_state::get_bg_tile_info) +{ +/* - bits - + 7654 3210 + ---- ---- bank select. + ---- ---- color code. + ---- ---- seems unused. +*/ + int code = m_videoram[tile_index]; + + SET_TILE_INFO_MEMBER(0 /* bank */, code, 0 /* color */, 0); +} + +void nibble_state::video_start() +{ + m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(nibble_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); +} + +UINT32 nibble_state::screen_update_nibble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + return 0; +} + +PALETTE_INIT_MEMBER(nibble_state, nibble) +{ +} + + +/************************** +* Read / Write Handlers * +**************************/ + +INTERRUPT_GEN_MEMBER(nibble_state::nibble_interrupt) +{ +} + + +/************************ +* Start & Reset * +************************/ + +void nibble_state::machine_start() +{ +} + +void nibble_state::machine_reset() +{ +} + + +/************************* +* Memory Map Information * +*************************/ + +static ADDRESS_MAP_START( nibble_map, AS_PROGRAM, 8, nibble_state ) +// ADDRESS_MAP_GLOBAL_MASK(0x3fff) + AM_RANGE(0x0000, 0xbfff) AM_ROM + AM_RANGE(0xc000, 0xc3ff) AM_WRITE(nibble_videoram_w) AM_SHARE("videoram") // placeholder +// AM_RANGE(0xff00, 0xff01) AM_DEVWRITE("crtc", mc6845_device, address_w) +// AM_RANGE(0xff02, 0xff03) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) +ADDRESS_MAP_END + + +static ADDRESS_MAP_START( nibble_cru_map, AS_IO, 8, nibble_state ) +ADDRESS_MAP_END + + +/************************* +* Input Ports * +*************************/ + +static INPUT_PORTS_START( nibble ) + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("IN0-1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("IN0-2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("IN0-3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("IN0-4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("IN0-5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("IN0-6") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("IN0-7") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("IN0-8") + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("IN1-1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) PORT_NAME("IN1-2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) PORT_NAME("IN1-3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN1-4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("IN1-5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) PORT_NAME("IN1-6") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("IN1-7") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN1-8") + + PORT_START("IN2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("IN2-1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("IN2-2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN2-3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN2-4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN2-5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN2-6") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-7") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) PORT_NAME("IN2-8") + + PORT_START("IN3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_NAME("IN3-1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_NAME("IN3-2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) PORT_NAME("IN3-3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) PORT_NAME("IN3-4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) PORT_NAME("IN3-5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("IN3-6") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("IN3-7") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) PORT_NAME("IN3-8") + + PORT_START("IN4") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("IN4-1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("IN4-2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("IN4-3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("IN4-4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("IN4-5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("IN4-6") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("IN4-7") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("IN4-8") + + PORT_START("DSW1") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("DSW2") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + +INPUT_PORTS_END + + +/************************* +* Graphics Layouts * +*************************/ + +static const gfx_layout charlayout = +{ + 8,8, + RGN_FRAC(1,8), + 8, + { RGN_FRAC(0,8), RGN_FRAC(1,8), RGN_FRAC(2,8), RGN_FRAC(3,8), RGN_FRAC(4,8), RGN_FRAC(5,8), RGN_FRAC(6,8), RGN_FRAC(7,8) }, + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, + 8*8 +}; + + +/****************************** +* Graphics Decode Information * +******************************/ + +static GFXDECODE_START( nibble ) + GFXDECODE_ENTRY( "gfx", 0, charlayout, 0, 16 ) +GFXDECODE_END + + +/************************* +* Machine Drivers * +*************************/ + +static MACHINE_CONFIG_START( nibble, nibble_state ) + + // CPU should be switched to TMS9900 + MCFG_TMS99xx_ADD("maincpu", TMS9980A, MASTER_CLOCK/4, nibble_map, nibble_cru_map) + MCFG_CPU_VBLANK_INT_DRIVER("screen", nibble_state, nibble_interrupt) + + /* video hardware */ + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) + MCFG_SCREEN_SIZE(32*8, 32*8) + MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) + MCFG_SCREEN_UPDATE_DRIVER(nibble_state, screen_update_nibble) + MCFG_SCREEN_PALETTE("palette") + + MCFG_GFXDECODE_ADD("gfxdecode", "palette", nibble) + + MCFG_PALETTE_ADD("palette", 256) + MCFG_PALETTE_INIT_OWNER(nibble_state, nibble) + + MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/8) /* guess */ + MCFG_MC6845_SHOW_BORDER_AREA(false) + MCFG_MC6845_CHAR_WIDTH(8) + +MACHINE_CONFIG_END + + +/************************* +* Rom Load * +*************************/ + +ROM_START( l9nibble ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "09.U123", 0x00000, 0x10000, CRC(dfef685d) SHA1(0aeb4257e408e8549df629a0cdb5f2b6790e32de) ) // tms9900 code? + + ROM_REGION( 0x80000, "gfx", 0 ) + ROM_LOAD( "01.u139", 0x00000, 0x10000, CRC(aba06e58) SHA1(5841beec122613eed2ba9f48cb1d51bfa0ff450c) ) + ROM_LOAD( "02.u141", 0x10000, 0x10000, CRC(a1e5d6d1) SHA1(8ec85b0544dd75bcb13600bae503ad2b20978281) ) + ROM_LOAD( "03.u149", 0x20000, 0x10000, CRC(ae66f77c) SHA1(6c9e98cc00b72252cb238f14686c0faef47134df) ) + ROM_LOAD( "04.u147", 0x30000, 0x10000, CRC(f1864094) SHA1(b439f9e8c2cc4575f9edbda45b9e724257015a73) ) + ROM_LOAD( "05.u137", 0x40000, 0x10000, CRC(2e8ae9de) SHA1(5f2831f71b351e34df82af37041c9aa815eb372c) ) + ROM_LOAD( "06.u143", 0x50000, 0x10000, CRC(8a56f324) SHA1(68790a12ca57c999bd7b7f26adc206aab3c06976) ) + ROM_LOAD( "07.u145", 0x60000, 0x10000, CRC(4f757912) SHA1(63e5fc2672552463060680b7a5a94df45f3d4b68) ) + ROM_LOAD( "08.u152", 0x70000, 0x10000, CRC(4f878ee4) SHA1(215f3ead0c358cc09c21515981cbb0a1e58c2ca6) ) + + ROM_REGION( 0x20000, "user", 0 ) + ROM_LOAD( "10.u138", 0x00000, 0x20000, CRC(ed831d2a) SHA1(ce5c3b24979d220215d7f0e8d50f45550aec15bd) ) // unknown data... + + ROM_REGION( 0x0400, "plds", 0 ) + ROM_LOAD( "pal16l8acn.u23", 0x0000, 0x0104, NO_DUMP ) + ROM_LOAD( "pal16l8acn.uxx", 0x0200, 0x0104, NO_DUMP ) + +ROM_END + + +/************************* +* Game Drivers * +*************************/ + +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS... */ +GAME( 19??, l9nibble, 0, nibble, nibble, driver_device, 0, ROT0, "Nibble", "Lucky 9", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/nightgal.cpp b/src/mame/drivers/nightgal.cpp index 2720f071051..38a3a3953f9 100644 --- a/src/mame/drivers/nightgal.cpp +++ b/src/mame/drivers/nightgal.cpp @@ -6,18 +6,15 @@ Night Gal (c) 1984 Nichibutsu a.k.a. same Jangou blitter but with NCS CPU for displaying graphics as protection. -preliminary driver by David Haywood & Angelo Salese +driver by David Haywood & Angelo Salese many thanks to Charles MacDonald for the schematics / documentation of this HW. TODO: --Night Gal Summer trips illegal opcodes on the NCS side, presumably a CPU bug; --Fix Sweet Gal/Sexy Gal gfxs if necessary (i.e. if the bugs aren't all caused by irq/nmi - wrong firing); --Proper Z80<->MCU comms,many video problems because of that; --Abstract the video chip to a proper video file and get the name of that chip; --Minor graphic glitches in Royal Queen (cross hatch test, some little glitches during gameplay), - presumably due of the unemulated wait states on the comms. - + - extra protection for Night Gal Summer (ports 0x6000-3 for z80); + - Fix Sweet Gal/Sexy Gal layer clearances; + - NMI origin for Sexy Gal / Night Gal Summer + - unemulated WAIT pin for Z80, MCU asserts it when accessing communication RAM + *******************************************************************************************/ #include "emu.h" @@ -25,6 +22,7 @@ TODO: #include "sound/2203intf.h" #include "cpu/z80/z80.h" #include "cpu/m6800/m6800.h" +#include "video/jangou_blitter.h" #include "video/resnet.h" #define MASTER_CLOCK XTAL_19_968MHz @@ -37,7 +35,6 @@ public: m_comms_ram(*this, "comms_ram"), m_maincpu(*this, "maincpu"), m_subcpu(*this, "sub"), - m_gfxrom(*this, "gfx1"), m_io_cr_clear(*this, "CR_CLEAR"), m_io_coins(*this, "COINS"), m_io_pl1_1(*this, "PL1_1"), @@ -57,13 +54,11 @@ public: m_io_dswa(*this, "DSWA"), m_io_dswb(*this, "DSWB"), m_io_dswc(*this, "DSWC"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_blitter(*this, "blitter") { } /* video-related */ UINT8 m_blit_raw_data[3]; - UINT8 m_true_blit[7]; - UINT8 m_pen_data[0x10]; - UINT8 m_pen_raw_data[0x10]; /* misc */ UINT8 m_nsc_latch; @@ -77,22 +72,20 @@ public: required_device<cpu_device> m_subcpu; /* memory */ - UINT8 m_blit_buffer[256*256]; - DECLARE_READ8_MEMBER(blitter_status_r); - DECLARE_WRITE8_MEMBER(nsc_true_blitter_w); - DECLARE_WRITE8_MEMBER(sexygal_nsc_true_blitter_w); + //DECLARE_WRITE8_MEMBER(sexygal_nsc_true_blitter_w); DECLARE_WRITE8_MEMBER(royalqn_blitter_0_w); DECLARE_WRITE8_MEMBER(royalqn_blitter_1_w); DECLARE_WRITE8_MEMBER(royalqn_blitter_2_w); DECLARE_READ8_MEMBER(royalqn_nsc_blit_r); DECLARE_READ8_MEMBER(royalqn_comm_r); DECLARE_WRITE8_MEMBER(royalqn_comm_w); - DECLARE_WRITE8_MEMBER(blit_true_vregs_w); DECLARE_WRITE8_MEMBER(mux_w); DECLARE_READ8_MEMBER(input_1p_r); DECLARE_READ8_MEMBER(input_2p_r); + DECLARE_WRITE8_MEMBER(output_w); DECLARE_DRIVER_INIT(ngalsumr); DECLARE_DRIVER_INIT(royalqn); + DECLARE_WRITE8_MEMBER(ngalsumr_unk_w); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; @@ -100,7 +93,6 @@ public: UINT32 screen_update_nightgal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: - required_region_ptr<UINT8> m_gfxrom; required_ioport m_io_cr_clear; required_ioport m_io_coins; required_ioport m_io_pl1_1; @@ -121,21 +113,16 @@ protected: required_ioport m_io_dswb; required_ioport m_io_dswc; required_device<palette_device> m_palette; + required_device<jangou_blitter_device> m_blitter; + void z80_wait_assert_cb(); + TIMER_CALLBACK_MEMBER( z80_wait_ack_cb ); - UINT8 nightgal_gfx_nibble( int niboffset ); - void plot_nightgal_gfx_pixel( UINT8 pix, int x, int y ); + std::unique_ptr<bitmap_ind16> m_tmp_bitmap; }; - - -READ8_MEMBER(nightgal_state::blitter_status_r) -{ - return 0x80; -} - void nightgal_state::video_start() { - save_item(NAME(m_blit_buffer)); + m_tmp_bitmap = std::make_unique<bitmap_ind16>(256, 256); } UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) @@ -144,8 +131,8 @@ UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind1 for (y = cliprect.min_y; y <= cliprect.max_y; ++y) { - UINT8 *src = &m_blit_buffer[y * 512 / 2 + cliprect.min_x]; - UINT16 *dst = &bitmap.pix16(y, cliprect.min_x); + UINT8 *src = &m_blitter->m_blit_buffer[y * 256 + cliprect.min_x]; + UINT16 *dst = &m_tmp_bitmap->pix16(y, cliprect.min_x); for (x = cliprect.min_x; x <= cliprect.max_x; x += 2) { @@ -155,144 +142,11 @@ UINT32 nightgal_state::screen_update_nightgal(screen_device &screen, bitmap_ind1 } } + copybitmap(bitmap, *m_tmp_bitmap, flip_screen(), flip_screen(),0,0, cliprect); return 0; } -UINT8 nightgal_state::nightgal_gfx_nibble( int niboffset ) -{ - if (niboffset & 1) - { - return (m_gfxrom[(niboffset >> 1) & 0x1ffff] & 0xf0) >> 4; - } - else - { - return (m_gfxrom[(niboffset >> 1) & 0x1ffff] & 0x0f); - } -} - -void nightgal_state::plot_nightgal_gfx_pixel( UINT8 pix, int x, int y ) -{ - if (y >= 512) return; - if (x >= 512) return; - if (y < 0) return; - if (x < 0) return; - - if (x & 1) - m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0x0f) | ((pix << 4) & 0xf0); - else - m_blit_buffer[(y * 256) + (x >> 1)] = (m_blit_buffer[(y * 256) + (x >> 1)] & 0xf0) | (pix & 0x0f); -} - -WRITE8_MEMBER(nightgal_state::nsc_true_blitter_w) -{ - int src, x, y, h, w, flipx; - m_true_blit[offset] = data; - - /*trigger blitter write to ram,might not be correct...*/ - if (offset == 5) - { - //printf("%02x %02x %02x %02x %02x %02x %02x\n", m_true_blit[0], m_true_blit[1], m_true_blit[2], m_true_blit[3], m_true_blit[4], m_true_blit[5], m_true_blit[6]); - w = (m_true_blit[4] & 0xff) + 1; - h = (m_true_blit[5] & 0xff) + 1; - src = ((m_true_blit[1] << 8) | (m_true_blit[0] << 0)); - src |= (m_true_blit[6] & 3) << 16; - - x = (m_true_blit[2] & 0xff); - y = (m_true_blit[3] & 0xff); - - // lowest bit of src controls flipping / draw direction? - flipx = (m_true_blit[0] & 1); - - if (!flipx) - src += (w * h) - 1; - else - src -= (w * h) - 1; - - { - int count = 0; - int xcount, ycount; - for (ycount = 0; ycount < h; ycount++) - { - for (xcount = 0; xcount < w; xcount++) - { - int drawx = (x + xcount) & 0xff; - int drawy = (y + ycount) & 0xff; - UINT8 dat = nightgal_gfx_nibble(src + count); - UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4]; - UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0]; - - dat = cur_pen_lo | (cur_pen_hi << 4); - - if ((dat & 0xff) != 0) - plot_nightgal_gfx_pixel(dat, drawx, drawy); - - if (!flipx) - count--; - else - count++; - } - } - } - } -} - -/* different register writes (probably a PAL line swapping).*/ -WRITE8_MEMBER(nightgal_state::sexygal_nsc_true_blitter_w) -{ - int src, x, y, h, w, flipx; - m_true_blit[offset] = data; - - /*trigger blitter write to ram,might not be correct...*/ - if (offset == 6) - { - //printf("%02x %02x %02x %02x %02x %02x %02x\n", m_true_blit[0], m_true_blit[1], m_true_blit[2], m_true_blit[3], m_true_blit[4], m_true_blit[5], m_true_blit[6]); - w = (m_true_blit[5] & 0xff) + 1; - h = (m_true_blit[6] & 0xff) + 1; - src = ((m_true_blit[1] << 8) | (m_true_blit[0] << 0)); - src |= (m_true_blit[2] & 3) << 16; - - - x = (m_true_blit[3] & 0xff); - y = (m_true_blit[4] & 0xff); - - // lowest bit of src controls flipping / draw direction? - flipx = (m_true_blit[0] & 1); - - if (!flipx) - src += (w * h) - 1; - else - src -= (w * h) - 1; - - { - int count = 0; - int xcount, ycount; - for (ycount = 0; ycount < h; ycount++) - { - for (xcount = 0; xcount < w; xcount++) - { - int drawx = (x + xcount) & 0xff; - int drawy = (y + ycount) & 0xff; - UINT8 dat = nightgal_gfx_nibble(src + count); - UINT8 cur_pen_hi = m_pen_data[(dat & 0xf0) >> 4]; - UINT8 cur_pen_lo = m_pen_data[(dat & 0x0f) >> 0]; - - dat = cur_pen_lo | cur_pen_hi << 4; - - if ((dat & 0xff) != 0) - plot_nightgal_gfx_pixel(dat, drawx, drawy); - - if (!flipx) - count--; - else - count++; - } - } - //m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE ); - } - } -} - /* guess: use the same resistor values as Crazy Climber (needs checking on the real HW) */ PALETTE_INIT_MEMBER(nightgal_state, nightgal) { @@ -341,62 +195,9 @@ PALETTE_INIT_MEMBER(nightgal_state, nightgal) ********************************************/ /* -(note:when I say "0x80" I just mean a negative result) -master-slave algorithm --z80 writes the data for the mcu; --z80 writes 0 to c200; --it waits with the bit 0x80 on c100 clears (i.e. the z80 halts),when this happens the z80 continues his logic algorithm (so stop it until we are done!!!) - --nsc takes an irq --puts ff to [1100] --it waits that the bit 0x80 on [1100] clears --(puts default clut data,only the first time around) --reads params from z80 and puts them on the blitter chip --expects that bit [80] is equal to 0x80; --clears [1100] and expects that [1100] is 0 --executes a wai (i.e. halt) opcode then expects to receive another irq... -*/ - -#define MAIN_Z80_RUN if(offset == 2) m_z80_latch = 0x00 -#define MAIN_Z80_HALT if(offset == 2) m_z80_latch = 0x80 -//#define SUB_NCS_RUN m_ncs_latch = 0x00 -//#define SUB_NCS_HALT m_ncs_latch = 0x80 -#ifdef UNUSED_CODE -WRITE8_MEMBER(nightgal_state::nsc_latch_w) -{ - m_subcpu->set_input_line(0, HOLD_LINE ); -} - -READ8_MEMBER(nightgal_state::nsc_latch_r) -{ - return m_z80_latch; -} - -WRITE8_MEMBER(nightgal_state::z80_latch_w) -{ - m_nsc_latch = data; -} - -READ8_MEMBER(nightgal_state::z80_latch_r) -{ - return m_nsc_latch; -} - -/*z80 -> MCU video params*/ -WRITE8_MEMBER(nightgal_state::blitter_w) -{ - m_blit_raw_data[offset] = data; - MAIN_Z80_HALT; -} - -READ8_MEMBER(nightgal_state::nsc_blit_r) -{ - MAIN_Z80_RUN; - return m_blit_raw_data[offset]; -} -#endif -/* TODO: simplify this (error in the document) */ - + There are three unidirectional latches that also sends an irq from z80 to MCU. + */ +// TODO: simplify this (error in the document) WRITE8_MEMBER(nightgal_state::royalqn_blitter_0_w) { m_blit_raw_data[0] = data; @@ -417,36 +218,37 @@ READ8_MEMBER(nightgal_state::royalqn_nsc_blit_r) { if(offset == 2) m_subcpu->set_input_line(0, CLEAR_LINE ); - + return m_blit_raw_data[offset]; } -READ8_MEMBER(nightgal_state::royalqn_comm_r) +TIMER_CALLBACK_MEMBER(nightgal_state::z80_wait_ack_cb) { - return (m_comms_ram[offset] & 0x80) | (0x7f); //bits 6-0 are undefined, presumably open bus + m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE); } -WRITE8_MEMBER(nightgal_state::royalqn_comm_w) +void nightgal_state::z80_wait_assert_cb() { - m_comms_ram[offset] = data & 0x80; + m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + + // Note: cycles_to_attotime requires z80 context to work, calling for example m_subcpu as context gives a x4 cycle boost in z80 terms (reads execute_cycles_to_clocks() from NCS?) even if they runs at same speed basically. + // TODO: needs a getter that tells a given CPU how many cycles requires an executing opcode for the r/w operation, which stacks with wait state penalty for accessing this specific area. + machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(4), timer_expired_delegate(FUNC(nightgal_state::z80_wait_ack_cb),this)); } -#ifdef UNUSED_CODE -WRITE8_MEMBER(nightgal_state::blit_vregs_w) +READ8_MEMBER(nightgal_state::royalqn_comm_r) { - m_pen_raw_data[offset] = data; + z80_wait_assert_cb(); + return (m_comms_ram[offset] & 0x80) | (0x7f); //bits 6-0 are undefined, presumably open bus } -READ8_MEMBER(nightgal_state::blit_vregs_r) -{ - return m_pen_raw_data[offset]; -} -#endif -WRITE8_MEMBER(nightgal_state::blit_true_vregs_w) +WRITE8_MEMBER(nightgal_state::royalqn_comm_w) { - m_pen_data[offset] = data; + z80_wait_assert_cb(); + m_comms_ram[offset] = data & 0x80; } + /******************************************** * * Input Multiplexer handling @@ -497,6 +299,18 @@ READ8_MEMBER(nightgal_state::input_2p_r) m_io_pl2_4->read() & m_io_pl2_5->read() & m_io_pl2_6->read()) | coin_port; } +WRITE8_MEMBER(nightgal_state::output_w) +{ + /* + Doesn't match Charles notes? + --x- ---- unknown, set by Royal Queen on gameplay + ---- -x-- flip screen + ---- ---x out counter + */ + machine().bookkeeping().coin_counter_w(0, data & 0x02); + flip_screen_set((data & 0x04) == 0); +} + /******************************************** * * Memory Maps @@ -504,47 +318,6 @@ READ8_MEMBER(nightgal_state::input_2p_r) ********************************************/ /******************************** -* Night Gal -********************************/ -#ifdef UNUSED_CODE -static ADDRESS_MAP_START( nightgal_map, AS_PROGRAM, 8, nightgal_state ) - AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0xc100, 0xc100) AM_READ(nsc_latch_r) - AM_RANGE(0xc200, 0xc200) AM_WRITE(nsc_latch_w) - AM_RANGE(0xc300, 0xc30f) AM_WRITE(blit_vregs_w) - AM_RANGE(0xf000, 0xffff) AM_RAM -ADDRESS_MAP_END - -static ADDRESS_MAP_START( nightgal_io, AS_IO, 8, nightgal_state ) - ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x01,0x01) AM_DEVREAD("aysnd", ay8910_device, data_r) - AM_RANGE(0x02,0x03) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) -// AM_RANGE(0x10,0x10) AM_WRITE(output_w) - AM_RANGE(0x10,0x10) AM_READ_PORT("DSWC") - AM_RANGE(0x11,0x11) AM_READ_PORT("SYSA") - AM_RANGE(0x12,0x12) AM_READ_PORT("DSWA") - AM_RANGE(0x13,0x13) AM_READ_PORT("DSWB") - AM_RANGE(0x11,0x11) AM_WRITE(mux_w) - AM_RANGE(0x12,0x14) AM_WRITE(blitter_w) //data for the nsc to be processed -ADDRESS_MAP_END - -static ADDRESS_MAP_START( nsc_map, AS_PROGRAM, 8, nightgal_state ) - AM_RANGE(0x0000, 0x007f) AM_RAM - AM_RANGE(0x0080, 0x0080) AM_READ(blitter_status_r) - AM_RANGE(0x0081, 0x0083) AM_READ(nsc_blit_r) - AM_RANGE(0x0080, 0x0086) AM_WRITE(nsc_true_blitter_w) - - AM_RANGE(0x00a0, 0x00af) AM_WRITE(blit_true_vregs_w) - - AM_RANGE(0x1100, 0x1100) AM_READWRITE(z80_latch_r,z80_latch_w) //irq control? - AM_RANGE(0x1200, 0x1200) AM_READNOP //flip screen set bit - AM_RANGE(0x1300, 0x130f) AM_READ(blit_vregs_r) -// AM_RANGE(0x1000, 0xdfff) AM_ROM AM_REGION("gfx1", 0 ) - AM_RANGE(0xe000, 0xffff) AM_ROM AM_WRITENOP -ADDRESS_MAP_END -#endif - -/******************************** * Sexy Gal ********************************/ @@ -558,8 +331,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sexygal_io, AS_IO, 8, nightgal_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00,0x01) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write) -// AM_RANGE(0x10,0x10) AM_WRITE(output_w) - AM_RANGE(0x10,0x10) AM_READ_PORT("DSWC") + AM_RANGE(0x10,0x10) AM_READ_PORT("DSWC") AM_WRITE(output_w) AM_RANGE(0x11,0x11) AM_READ_PORT("SYSA") AM_WRITE(mux_w) AM_RANGE(0x12,0x12) AM_MIRROR(0xe8) AM_READ_PORT("DSWA") AM_WRITE(royalqn_blitter_0_w) AM_RANGE(0x13,0x13) AM_MIRROR(0xe8) AM_READ_PORT("DSWB") AM_WRITE(royalqn_blitter_1_w) @@ -568,21 +340,21 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sexygal_nsc_map, AS_PROGRAM, 8, nightgal_state ) AM_RANGE(0x0000, 0x007f) AM_RAM - AM_RANGE(0x0080, 0x0080) AM_READ(blitter_status_r) + AM_RANGE(0x0080, 0x0080) AM_READ_PORT("BLIT_PORT") AM_RANGE(0x0081, 0x0083) AM_READ(royalqn_nsc_blit_r) - AM_RANGE(0x0080, 0x0086) AM_WRITE(sexygal_nsc_true_blitter_w) - - AM_RANGE(0x00a0, 0x00af) AM_WRITE(blit_true_vregs_w) - AM_RANGE(0x00b0, 0x00b0) AM_WRITENOP // bltflip register + AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, alt_process_w) + AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, vregs_w) + AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w) AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2c00) AM_READWRITE(royalqn_comm_r, royalqn_comm_w) AM_SHARE("comms_ram") - AM_RANGE(0xc000, 0xffff) AM_ROM AM_WRITENOP + AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM AM_REGION("subrom", 0) ADDRESS_MAP_END /******************************** * Royal Queen ********************************/ + static ADDRESS_MAP_START( royalqn_map, AS_PROGRAM, 8, nightgal_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_NOP @@ -594,7 +366,7 @@ static ADDRESS_MAP_START( royalqn_io, AS_IO, 8, nightgal_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x01,0x01) AM_MIRROR(0xec) AM_DEVREAD("aysnd", ay8910_device, data_r) AM_RANGE(0x02,0x03) AM_MIRROR(0xec) AM_DEVWRITE("aysnd", ay8910_device, data_address_w) - AM_RANGE(0x10,0x10) AM_MIRROR(0xe8) AM_READ_PORT("DSWC") AM_WRITENOP //AM_WRITE(output_w) + AM_RANGE(0x10,0x10) AM_MIRROR(0xe8) AM_READ_PORT("DSWC") AM_WRITE(output_w) AM_RANGE(0x11,0x11) AM_MIRROR(0xe8) AM_READ_PORT("SYSA") AM_WRITE(mux_w) AM_RANGE(0x12,0x12) AM_MIRROR(0xe8) AM_READ_PORT("DSWA") AM_WRITE(royalqn_blitter_0_w) AM_RANGE(0x13,0x13) AM_MIRROR(0xe8) AM_READ_PORT("DSWB") AM_WRITE(royalqn_blitter_1_w) @@ -606,17 +378,16 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( royalqn_nsc_map, AS_PROGRAM, 8, nightgal_state ) AM_RANGE(0x0000, 0x007f) AM_RAM - AM_RANGE(0x0080, 0x0080) AM_READ(blitter_status_r) + AM_RANGE(0x0080, 0x0080) AM_READ_PORT("BLIT_PORT") AM_RANGE(0x0081, 0x0083) AM_READ(royalqn_nsc_blit_r) - AM_RANGE(0x0080, 0x0086) AM_WRITE(nsc_true_blitter_w) - - AM_RANGE(0x00a0, 0x00af) AM_WRITE(blit_true_vregs_w) - AM_RANGE(0x00b0, 0x00b0) AM_WRITENOP // bltflip register + AM_RANGE(0x0080, 0x0086) AM_DEVWRITE("blitter", jangou_blitter_device, process_w) + AM_RANGE(0x00a0, 0x00af) AM_DEVWRITE("blitter", jangou_blitter_device, vregs_w) + AM_RANGE(0x00b0, 0x00b0) AM_DEVWRITE("blitter", jangou_blitter_device, bltflip_w) AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x2c00) AM_READWRITE(royalqn_comm_r,royalqn_comm_w) AM_RANGE(0x4000, 0x4000) AM_NOP AM_RANGE(0x8000, 0x8000) AM_NOP //open bus or protection check - AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM + AM_RANGE(0xc000, 0xdfff) AM_MIRROR(0x2000) AM_ROM AM_REGION("subrom", 0) ADDRESS_MAP_END /******************************************** @@ -855,6 +626,31 @@ static INPUT_PORTS_START( sexygal ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("BLIT_PORT") + PORT_DIPNAME( 0x01, 0x01, "BLIT_PORT" ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("blitter", jangou_blitter_device, status_r) + INPUT_PORTS_END void nightgal_state::machine_start() @@ -864,9 +660,6 @@ void nightgal_state::machine_start() save_item(NAME(m_mux_data)); save_item(NAME(m_blit_raw_data)); - save_item(NAME(m_true_blit)); - save_item(NAME(m_pen_data)); - save_item(NAME(m_pen_raw_data)); } void nightgal_state::machine_reset() @@ -876,9 +669,6 @@ void nightgal_state::machine_reset() m_mux_data = 0; memset(m_blit_raw_data, 0, ARRAY_LENGTH(m_blit_raw_data)); - memset(m_true_blit, 0, ARRAY_LENGTH(m_true_blit)); - memset(m_pen_data, 0, ARRAY_LENGTH(m_pen_data)); - memset(m_pen_raw_data, 0, ARRAY_LENGTH(m_pen_raw_data)); } static MACHINE_CONFIG_START( royalqn, nightgal_state ) @@ -894,14 +684,11 @@ static MACHINE_CONFIG_START( royalqn, nightgal_state ) MCFG_QUANTUM_PERFECT_CPU("maincpu") + MCFG_JANGOU_BLITTER_ADD("blitter", MASTER_CLOCK/4) /* video hardware */ - /* TODO: blitter clock is MASTER_CLOCK / 4, 320 x 264 pixels, 256 x 224 of visible area */ MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_SIZE(256, 256) - MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-1) + MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/4,320,0,256,264,16,240) MCFG_SCREEN_UPDATE_DRIVER(nightgal_state, screen_update_nightgal) MCFG_SCREEN_PALETTE("palette") @@ -923,7 +710,7 @@ static MACHINE_CONFIG_DERIVED( sexygal, royalqn ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(sexygal_map) MCFG_CPU_IO_MAP(sexygal_io) - MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 244)//??? + MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 60)//??? MCFG_CPU_MODIFY("sub") MCFG_CPU_PROGRAM_MAP(sexygal_nsc_map) @@ -941,7 +728,7 @@ static MACHINE_CONFIG_DERIVED( ngalsumr, royalqn ) MCFG_CPU_MODIFY("maincpu") MCFG_CPU_PROGRAM_MAP(royalqn_map) MCFG_CPU_IO_MAP(royalqn_io) - MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 244)//??? + MCFG_CPU_PERIODIC_INT_DRIVER(nightgal_state, nmi_line_pulse, 60)//??? MACHINE_CONFIG_END /* @@ -978,10 +765,10 @@ ROM_START( nightgal ) ROM_LOAD( "ngal_11.bin", 0x02000, 0x02000, CRC(c52f7942) SHA1(e23b9e4936f9b3111ea14c0250190ee6de1ed4ab) ) ROM_LOAD( "ngal_12.bin", 0x04000, 0x02000, CRC(515e69a7) SHA1(234247c829c2b082360d7d44c1488fc5fcf45cd2) ) - ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "ngal_09.bin", 0x0c000, 0x02000, CRC(da3dcc08) SHA1(6f5319c1777dabf7041286698ac8f25eca1545a1) ) + ROM_REGION( 0x2000, "subrom", 0 ) + ROM_LOAD( "ngal_09.bin", 0x0000, 0x02000, CRC(da3dcc08) SHA1(6f5319c1777dabf7041286698ac8f25eca1545a1) ) - ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_REGION( 0x20000, "gfx", 0 ) ROM_LOAD( "ngal_01.bin", 0x00000, 0x02000, CRC(8e4c92ad) SHA1(13cebe765ebabe6be79c9c9ac3f778550e450380) ) ROM_LOAD( "ngal_02.bin", 0x02000, 0x02000, CRC(c60f7dc1) SHA1(273fd05c62e1efe26538efd2d4f0973c5eba65e4) ) ROM_LOAD( "ngal_03.bin", 0x04000, 0x02000, CRC(824b7d9e) SHA1(04d3340cbb954add0d70c093df4ccb669e5ed12b) ) @@ -1028,10 +815,10 @@ ROM_START( ngtbunny ) ROM_LOAD( "7.3p", 0x02000, 0x02000, CRC(34024380) SHA1(ba535e2b198f55e68a45ad7030b12c9aa1389aea) ) ROM_LOAD( "8.3s", 0x04000, 0x02000, CRC(9bf96168) SHA1(f0e9302bc9577fe779b56cb72035672368c94481) ) - ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "5.3m", 0x0c000, 0x02000, CRC(b8a82966) SHA1(9f86b3208fb48f9735cfc4f8e62680f0cb4a92f0) ) + ROM_REGION( 0x2000, "subrom", 0 ) + ROM_LOAD( "5.3m", 0x0000, 0x02000, CRC(b8a82966) SHA1(9f86b3208fb48f9735cfc4f8e62680f0cb4a92f0) ) - ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_REGION( 0x20000, "gfx", 0 ) ROM_LOAD( "1.3a", 0x00000, 0x02000, CRC(16776c5f) SHA1(a2925eaed938ae3985ea796658b62d6fafb6412b) ) ROM_LOAD( "2.3c", 0x02000, 0x02000, CRC(dffd2cc6) SHA1(34f45b20596f69c44dc01c7aef765ab3ddaa076b) ) ROM_LOAD( "3.3d", 0x04000, 0x02000, CRC(c532ca49) SHA1(b01b08e99e24649c45ce1833f830775d6f532f6b) ) @@ -1047,10 +834,10 @@ ROM_START( royalngt ) ROM_LOAD( "rn7.3p", 0x02000, 0x02000, CRC(ae9c082b) SHA1(ee3effea653f972fd732453e9ab72f48e75410f8) ) ROM_LOAD( "rn8.3s", 0x04000, 0x02000, CRC(1371a83a) SHA1(c7107b62534837dd51bb4a93ba9a690f91393930) ) - ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "rn5.3l", 0x0c000, 0x02000, CRC(b8a82966) SHA1(9f86b3208fb48f9735cfc4f8e62680f0cb4a92f0) ) + ROM_REGION( 0x2000, "subrom", 0 ) + ROM_LOAD( "rn5.3l", 0x00000, 0x02000, CRC(b8a82966) SHA1(9f86b3208fb48f9735cfc4f8e62680f0cb4a92f0) ) - ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_REGION( 0x20000, "gfx", 0 ) ROM_LOAD( "rn1.3a", 0x00000, 0x02000, CRC(16776c5f) SHA1(a2925eaed938ae3985ea796658b62d6fafb6412b) ) ROM_LOAD( "rn2.3c", 0x02000, 0x02000, CRC(dffd2cc6) SHA1(34f45b20596f69c44dc01c7aef765ab3ddaa076b) ) ROM_LOAD( "rn3.3d", 0x04000, 0x02000, CRC(31fb1d47) SHA1(41441bc2613c95dc810cad569cbaa0c023c819ba) ) @@ -1066,12 +853,12 @@ ROM_START( royalqn ) ROM_LOAD( "a11.3t", 0x02000, 0x02000, CRC(e7c5395b) SHA1(5131ab9b0fbf1b7b4d410aa2a57eceaf47f8ec3a) ) ROM_LOAD( "a12.3v", 0x04000, 0x02000, CRC(4e8efda4) SHA1(1959491fd899a4d85fd067d7674592ec25188a75) ) - ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "rq9.3p", 0x0c000, 0x02000, CRC(34b4cf82) SHA1(01f49ca11a695d41c181e92217e228bc1656ee57) ) + ROM_REGION( 0x2000, "subrom", 0 ) + ROM_LOAD( "rq9.3p", 0x0000, 0x02000, CRC(34b4cf82) SHA1(01f49ca11a695d41c181e92217e228bc1656ee57) ) ROM_REGION( 0xc000, "samples", ROMREGION_ERASE00 ) - ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_REGION( 0x20000, "gfx", 0 ) ROM_LOAD( "rq1.3a", 0x00000, 0x02000, CRC(066449dc) SHA1(34838f5e3569b313306ce465e481b934e938c837) ) ROM_LOAD( "rq2.3c", 0x02000, 0x02000, CRC(c467adb5) SHA1(755ebde6229bbf0c7d9293e0becb7506d9aa9d49) ) ROM_LOAD( "rq3.3d", 0x04000, 0x02000, CRC(7e5a7a2d) SHA1(5770cd832de59ff4f61ac40eca8c2238ff7b582d) ) @@ -1132,14 +919,14 @@ ROM_START( sexygal ) ROM_LOAD( "11.3pr", 0x04000, 0x04000, CRC(a3138b42) SHA1(1bf7f6e2c4020251379cc72fa731c17795f35e2e) ) ROM_LOAD( "12.s8b", 0x08000, 0x04000, CRC(7ac4a984) SHA1(7b41c522387938fe7625c9a6c62a385d6635cc5e) ) - ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "1.3a", 0x0c000, 0x04000, CRC(f814cf27) SHA1(ceba1f14a202d926380039d7cb4669eb8be58539) ) // has a big (16 byte wide) ASCII 'Y.M' art, written in YMs (!) + ROM_REGION( 0x4000, "subrom", 0 ) + ROM_LOAD( "1.3a", 0x00000, 0x04000, CRC(f814cf27) SHA1(ceba1f14a202d926380039d7cb4669eb8be58539) ) // has a big (16 byte wide) ASCII 'Y.M' art, written in YMs (!) ROM_REGION( 0xc000, "samples", 0 ) ROM_LOAD( "13.s7b", 0x04000, 0x04000, CRC(5eb75f56) SHA1(b7d81d786d1ac8d65a6a122140954eb89d76e8b4) ) ROM_LOAD( "14.s6b", 0x08000, 0x04000, CRC(b4a2497b) SHA1(7231f57b4548899c886625e883b9972c0f30e9f2) ) - ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_REGION( 0x20000, "gfx", 0 ) ROM_LOAD( "2.3c", 0x00000, 0x04000, CRC(f719e09d) SHA1(c78411b4f974b3dd261d51e522e086fc30a96fcb) ) ROM_LOAD( "3.3d", 0x04000, 0x04000, CRC(a84d9a89) SHA1(91d5978e35ba4acf9353a13ec22c22aeb8a35f12) ) ROM_LOAD( "4.3e", 0x08000, 0x04000, CRC(f1cdbedb) SHA1(caacf2887a3a05e498d57d570a1e9873f95a5d5f) ) @@ -1158,15 +945,15 @@ ROM_START( sweetgal ) ROM_LOAD( "10.3n", 0x00000, 0x04000, CRC(0f6c4bf0) SHA1(50e5c6f08e124641f5df8938ccfcdebde18f6a0f) ) // sldh ROM_LOAD( "11.3p", 0x04000, 0x04000, CRC(7388e9b3) SHA1(e318d2d3888679bbd43a0aab68252fd359b7969d) ) - ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "1.3a", 0x0e000, 0x2000, CRC(5342c757) SHA1(b4ff84c45bd2c6a6a468f1d0daaf5b19c4dbf8fe) ) // sldh + ROM_REGION( 0x2000, "subrom", 0 ) + ROM_LOAD( "1.3a", 0x0000, 0x2000, CRC(5342c757) SHA1(b4ff84c45bd2c6a6a468f1d0daaf5b19c4dbf8fe) ) // sldh ROM_REGION( 0xc000, "samples", 0 ) // sound samples ROM_LOAD( "v2_12.bin", 0x00000, 0x04000, CRC(66a35be2) SHA1(4f0d73d753387acacc5ccc90e91d848a5ecce55e) ) ROM_LOAD( "v2_13.bin", 0x04000, 0x04000, CRC(60785a0d) SHA1(71eaec3512c0b18b93c083c1808eec51cfd4f520) ) ROM_LOAD( "v2_14.bin", 0x08000, 0x04000, CRC(149e84c1) SHA1(5c4e18637bef2f31bc3578cae6525fb6280fbc06) ) - ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_REGION( 0x20000, "gfx", 0 ) ROM_LOAD( "2.3c", 0x00000, 0x04000, CRC(3a3d78f7) SHA1(71e35529f30c43ee8ec2363f85fe17042f1d304e) ) // sldh ROM_LOAD( "3.3d", 0x04000, 0x04000, CRC(c6f9b884) SHA1(32d6fe1906a3f1f528f30dbd3f89971b2ea1925b) ) // sldh // all roms below match sexygal @@ -1225,21 +1012,21 @@ ROM_START( ngalsumr ) ROM_LOAD( "9.3t", 0x02000, 0x02000, CRC(879fc493) SHA1(ec7c6928b5d4e46dcc99271466e7eb801f601a70) ) ROM_LOAD( "10.3v", 0x04000, 0x02000, CRC(31211088) SHA1(960b781c420602be3de66565a030cf5ebdcc2ffb) ) - ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "7.3p", 0x0c000, 0x02000, CRC(20c55a25) SHA1(9dc88cb6c016b594264f7272d4fd5f30567e7c5d) ) + ROM_REGION( 0x2000, "subrom", 0 ) + ROM_LOAD( "7.3p", 0x0000, 0x02000, CRC(20c55a25) SHA1(9dc88cb6c016b594264f7272d4fd5f30567e7c5d) ) ROM_REGION( 0xc000, "samples", 0 ) ROM_LOAD( "1s.ic7", 0x00000, 0x04000, CRC(47ad8a0f) SHA1(e3b1e13f0a5c613bd205338683bef8d005b54830) ) ROM_LOAD( "2s.ic6", 0x04000, 0x04000, CRC(ca2a735f) SHA1(5980525a67fb0ffbfa04b82d805eee2463236ce3) ) ROM_LOAD( "3s.ic5", 0x08000, 0x04000, CRC(5cf15267) SHA1(72e4b2aa59a50af6b1b25d5279b3b125bfe06d86) ) - ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_REGION( 0x20000, "gfx", ROMREGION_ERASEFF ) ROM_LOAD( "1.3a", 0x00000, 0x04000, CRC(9626f812) SHA1(ca7162811a0ba05dfaa2aa8cc93a2e898b326e9e) ) - ROM_LOAD( "2.3c", 0x04000, 0x04000, CRC(0d59cf7a) SHA1(600bc70d29853fb936f8adaef048d925cbae0ce9) ) - ROM_LOAD( "3.3d", 0x08000, 0x04000, CRC(2fb2ec0b) SHA1(2f1735e33906783b8c0b283455a2a079431e6f11) ) - ROM_LOAD( "4.3f", 0x0c000, 0x04000, CRC(c7b85199) SHA1(1c4ed2faf82f45d8a23c168793b02969f1201df6) ) - ROM_LOAD( "5.3h", 0x10000, 0x04000, CRC(feaca6a3) SHA1(6658c01ac5769e8317a1c7eec6802e7c96885710) ) - ROM_LOAD( "6.3l", 0x14000, 0x04000, CRC(de9e05f8) SHA1(724468eade222b513b7f39f0a24515f343428130) ) + ROM_LOAD( "3.3d", 0x04000, 0x04000, CRC(2fb2ec0b) SHA1(2f1735e33906783b8c0b283455a2a079431e6f11) ) + ROM_LOAD( "5.3h", 0x08000, 0x04000, CRC(feaca6a3) SHA1(6658c01ac5769e8317a1c7eec6802e7c96885710) ) + ROM_LOAD( "2.3c", 0x10000, 0x04000, CRC(0d59cf7a) SHA1(600bc70d29853fb936f8adaef048d925cbae0ce9) ) + ROM_LOAD( "4.3f", 0x14000, 0x04000, CRC(c7b85199) SHA1(1c4ed2faf82f45d8a23c168793b02969f1201df6) ) + ROM_LOAD( "6.3l", 0x18000, 0x04000, CRC(de9e05f8) SHA1(724468eade222b513b7f39f0a24515f343428130) ) ROM_REGION( 0x20, "proms", 0 ) ROM_LOAD( "ng2.6u", 0x00, 0x20, CRC(0162a24a) SHA1(f7e1623c5bca3725f2e59ae2096b9bc42e0363bf) ) @@ -1247,29 +1034,31 @@ ROM_END DRIVER_INIT_MEMBER(nightgal_state,royalqn) { - UINT8 *ROM = memregion("sub")->base(); + UINT8 *ROM = memregion("subrom")->base(); /* patch open bus / protection */ - ROM[0xc27e] = 0x02; - ROM[0xc27f] = 0x02; + ROM[0x027e] = 0x02; + ROM[0x027f] = 0x02; } -DRIVER_INIT_MEMBER(nightgal_state,ngalsumr) +WRITE8_MEMBER(nightgal_state::ngalsumr_unk_w) { - UINT8 *ROM = memregion("sub")->base(); + //m_z80_latch = data; +} - /* patch protection */ - ROM[0xd6ce] = 0x02; - ROM[0xd6cf] = 0x02; +DRIVER_INIT_MEMBER(nightgal_state,ngalsumr) +{ + m_maincpu->space(AS_PROGRAM).install_write_handler(0x6000, 0x6000, write8_delegate(FUNC(nightgal_state::ngalsumr_unk_w), this) ); + // 0x6003 some kind of f/f state } /* Type 1 HW */ GAME( 1984, nightgal, 0, royalqn, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Night Gal (Japan 840920 AG 1-00)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1984, ngtbunny, 0, royalqn, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Night Bunny (Japan 840601 MRN 2-10)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1984, royalngt, ngtbunny, royalqn, sexygal, driver_device, 0, ROT0, "Royal Denshi", "Royal Night [BET] (Japan 840220 RN 2-00)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, royalqn, 0, royalqn, sexygal, nightgal_state, royalqn, ROT0, "Royal Denshi", "Royal Queen [BET] (Japan 841010 RQ 0-07)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, royalqn, 0, royalqn, sexygal, nightgal_state, royalqn, ROT0, "Royal Denshi", "Royal Queen [BET] (Japan 841010 RQ 0-07)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) /* Type 2 HW */ -GAME( 1985, sexygal, 0, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sexy Gal (Japan 850501 SXG 1-00)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, sweetgal, sexygal, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sweet Gal (Japan 850510 SWG 1-02)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, sexygal, 0, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sexy Gal (Japan 850501 SXG 1-00)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, sweetgal, sexygal, sexygal, sexygal, driver_device, 0, ROT0, "Nichibutsu", "Sweet Gal (Japan 850510 SWG 1-02)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) /* Type 3 HW */ -GAME( 1985, ngalsumr, 0, ngalsumr,sexygal, nightgal_state, ngalsumr,ROT0, "Nichibutsu", "Night Gal Summer", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, ngalsumr, 0, ngalsumr,sexygal, nightgal_state, ngalsumr,ROT0, "Nichibutsu", "Night Gal Summer (Japan 850702 NGS 0-01)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/notetaker.cpp b/src/mame/drivers/notetaker.cpp new file mode 100644 index 00000000000..ca36c069361 --- /dev/null +++ b/src/mame/drivers/notetaker.cpp @@ -0,0 +1,311 @@ +// license:BSD-3-Clause +// copyright-holders:Jonathan Gevaryahu +/* Xerox NoteTaker, 1978 + * Driver by Jonathan Gevaryahu + + * Notetaker Team At Xerox PARC 1976-1980: + Alan Kay - Team Lead + Bruce Horn - BIOS code and more + Ted Kaehler - SmallTalk-76 code porting[2] and more ( http://tedkaehler.weather-dimensions.com/us/ted/index.html ) + Dan Ingalls - BitBlt engine and SmallTalk kernel and more[3] + Doug Fairbairn - NoteTaker Hardware/Electronics Design ( http://www.computerhistory.org/atchm/author/dfairbairn/ ) + James Leung - NoteTaker Hardware/Electronics Design + Ron Freeman - NoteTaker Hardware/Electronics Design + <there are probably others I've missed> + + * History of the machine can be found at http://freudenbergs.de/bert/publications/Ingalls-2014-Smalltalk78.pdf + + * Prototypes only, 10 units[2] manufactured 1978-1980 + Known surviving units: + * One at CHM (missing? mouse, no media) + * One at Xerox Museum at PARC (with mouse and 2 floppies, floppies were not imaged to the best of my knowledge) + + * The NoteTaker used the BitBlt graphical operation (from SmallTalk-76) to do most graphical functions, in order to fit the SmallTalk code and programs within 256K of RAM[2]. The actual BitBlt code lives in ROM[3]. + + * As far as I am aware, no media (world disks/boot disks) for the NoteTaker have survived (except maybe the two disks at Xerox Museum at PARC), but an incomplete dump of the Smalltalk-76 'world' which was used to bootstrap Smalltalk-78 originally did survive on the Alto disks at CHM + + * see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker for additional information + * see http://xeroxalto.computerhistory.org/Filene/Smalltalk-76/ for the smalltalk-76 dump + * see http://xeroxalto.computerhistory.org/Indigo/BasicDisks/Smalltalk14.bfs!1_/ for more notetaker/smalltalk related files, including SmallTalk-80 files based on the notetaker smalltalk-78 + + References: + * [1] http://freudenbergs.de/bert/publications/Ingalls-2014-Smalltalk78.pdf + * [2] "Smalltalk and Object Orientation: An Introduction" By John Hunt, pages 45-46 [ISBN 978-3-540-76115-0] + * [3] http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790620_Z-IOP_1.5_ls.pdf + * [4] http://xeroxalto.computerhistory.org/Filene/Smalltalk-76/ + * [5] http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790118_NoteTaker_System_Manual.pdf + * MISSING DUMP for 8741? Keyboard MCU which does row-column scanning and mouse-related stuff + +TODO: everything below. +* figure out the correct memory maps for the 256kB of shared ram, and what part of ram constitutes the framebuffer +* figure out how the emulation-cpu boots and where its 4k of local ram maps to +* Get smalltalk-78 loaded as a rom and forced into ram on startup, since no boot disks have survived (or if any survived, they are not dumped) +* floppy controller wd1791 + According to [3] and [5] the format is double density/MFM, 128 bytes per sector, 16 sectors per track, 1 or 2 sided, for 170K or 340K per disk. + According to the schematics, we're missing an 82s147 DISKSEP.PROM used as a data separator +* crt5027 video controller; we're missing a PROM used to handle memory arbitration between the crtc and the rest of the system, but the equations are on the schematic +* Harris 6402 serial/EIA UART +* Harris 6402 keyboard UART +* HLE for the missing i8748[5] MCU in the keyboard which reads the mouse quadratures and buttons and talks serially to the Keyboard UART + +WIP: +* pic8259 interrupt controller - this is attached as a device, but the interrupts are not hooked to it yet. +* i/o cpu i/o area needs the memory map worked out per the schematics - mostly done +*/ + +#include "cpu/i86/i86.h" +#include "machine/pic8259.h" +//#include "video/tms9927.h" + +class notetaker_state : public driver_device +{ +public: + notetaker_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag) , + m_maincpu(*this, "maincpu"), + m_pic(*this, "pic8259")//, + //m_vtac(*this, "crt5027") + { + } +// devices + required_device<cpu_device> m_maincpu; + required_device<pic8259_device> m_pic; + //required_device<crt5027_device> m_vtac; + +//declarations + DECLARE_WRITE16_MEMBER(IPConReg_w); + DECLARE_READ16_MEMBER(maincpu_r); + DECLARE_WRITE16_MEMBER(maincpu_w); + DECLARE_DRIVER_INIT(notetakr); + +//variables + UINT8 m_BootSeqDone; + UINT8 m_DisableROM; + +// overrides + virtual void machine_reset() override; +}; + +WRITE16_MEMBER(notetaker_state::IPConReg_w) +{ + m_BootSeqDone = (data&0x80)?1:0; + //m_ProcLock = (data&0x40)?1:0; // processor lock + //m_CharCtr = (data&0x20)?1:0; // battery charge control + m_DisableROM = (data&0x10)?1:0; // disable rom at 0000-0fff + //m_CorrOn = (data&0x08)?1:0; // also LedInd5 + //m_LedInd6 = (data&0x04)?1:0; + //m_LedInd7 = (data&0x02)?1:0; + //m_LedInd8 = (data&0x01)?1:0; + popmessage("LEDS: CR1: %d, CR2: %d, CR3: %d, CR4: %d", (data&0x04)>>2, (data&0x08)>>3, (data&0x02)>>1, (data&0x01)); // cr1 and 2 are in the reverse order as expected, according to the schematic +} + +READ16_MEMBER(notetaker_state::maincpu_r) +{ + UINT16 *rom = (UINT16 *)(memregion("maincpu")->base()); + rom += 0x7f800; + UINT16 *ram = (UINT16 *)(memregion("ram")->base()); + if ( (m_BootSeqDone == 0) || ((m_DisableROM == 0) && ((offset&0x7F800) == 0)) ) + { + rom += (offset&0x7FF); + return *rom; + } + else + { + ram += (offset); + return *ram; + } +} + +WRITE16_MEMBER(notetaker_state::maincpu_w) +{ + UINT16 *ram = (UINT16 *)(memregion("ram")->base()); + ram += offset; + *ram = data; +} + +/* Address map comes from http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf +a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 BootSeqDone DisableROM +x x x x x x x x * * * * * * * * * * * * 0 x R ROM +0 0 0 0 0 0 0 0 * * * * * * * * * * * * 1 0 R ROM +< anything not all zeroes > * * * * * * * * * * * * 1 0 RW RAM +x x x x ? ? * * * * * * * * * * * * * * x x W RAM +x x x x ? ? * * * * * * * * * * * * * * 1 1 RW RAM + +More or less: +BootSeqDone is 0, DisableROM is ignored, mem map is 0x00000-0xfffff reading is the 0x1000-long ROM, repeated every 0x1000 bytes. writing goes to RAM. +BootSeqDone is 1, DisableROM is 0, mem map is 0x00000-0x00fff reading is the 0x1000-long ROM, remainder of memory map goes to RAM or open bus. writing goes to RAM. +BootSeqDone is 1, DisableROM is 1, mem map is entirely RAM or open bus for both reading and writing. +*/ +static ADDRESS_MAP_START(notetaker_mem, AS_PROGRAM, 16, notetaker_state) + /* + AM_RANGE(0x00000, 0x00fff) AM_ROM AM_REGION("maincpu", 0xFF000) // rom is here if either BootSeqDone OR DisableROM are zero. the 1.5 source code implies writes here are ignored + AM_RANGE(0x01000, 0x01fff) AM_RAM // 4k of ram, local to the io processor + AM_RANGE(0x02000, 0x3ffff) AM_RAM AM_BASE("sharedram") // 256k of ram (less 8k), shared between both processors + // note 4000-8fff? is the framebuffer for the screen? + AM_RANGE(0xff000, 0xfffff) AM_ROM // rom is only banked in here if bootseqdone is 0, so the reset vector is in the proper place + */ + AM_RANGE(0x00000, 0xfffff) AM_READWRITE(maincpu_r, maincpu_w) // bypass MAME's memory map system as we need finer grained control +ADDRESS_MAP_END + +/* io memory map comes from http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/memos/19790605_Definition_of_8086_Ports.pdf + and from the schematic at http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf +a19 a18 a17 a16 a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0 +x x x x 0 x x x x x x 0 0 0 0 x x x * . RW IntCon (PIC8259) +x x x x 0 x x x x x x 0 0 0 1 x x x x . W IPConReg +x x x x 0 x x x x x x 0 0 1 0 x 0 0 0 . . KbdInt:Open Bus +x x x x 0 x x x x x x 0 0 1 0 x 0 0 1 . R KbdInt:ReadKeyData +x x x x 0 x x x x x x 0 0 1 0 x 0 1 0 . R KbdInt:ReadOPStatus +x x x x 0 x x x x x x 0 0 1 0 x 0 1 1 . . KbdInt:Open Bus +x x x x 0 x x x x x x 0 0 1 0 x 1 0 0 . W KbdInt:LoadKeyCtlReg +x x x x 0 x x x x x x 0 0 1 0 x 1 0 1 . W KbdInt:LoadKeyData +x x x x 0 x x x x x x 0 0 1 0 x 1 1 0 . W KbdInt:KeyDataReset +x x x x 0 x x x x x x 0 0 1 0 x 1 1 1 . W KbdInt:KeyChipReset +x x x x 0 x x x x x x 0 0 1 1 x x x x . W FIFOReg +x x x x 0 x x x x x x 0 1 0 0 x x x x . . Open Bus +x x x x 0 x x x x x x 0 1 0 1 x x x x . . Open Bus +x x x x 0 x x x x x x 0 1 1 0 x x x x . W FIFOBus +x x x x 0 x x x x x x 0 1 1 1 x x x x . . Open Bus +x x x x 0 x x x x x x 1 0 0 0 x x x x . RW SelDiskReg +x x x x 0 x x x x x x 1 0 0 1 x x * * . RW SelDiskInt +x x x x 0 x x x x x x 1 0 1 0 * * * * . W SelCrtInt +x x x x 0 x x x x x x 1 0 1 1 x x x x . W LoadDispAddr +x x x x 0 x x x x x x 1 1 0 0 x x x x . . Open Bus +x x x x 0 x x x x x x 0 1 0 1 x 0 0 0 . R SelEIA:ReadEIAStatus +x x x x 0 x x x x x x 0 1 0 1 x 0 0 1 . R SelEIA:ReadEIAData +x x x x 0 x x x x x x 0 1 0 1 x 0 1 0 . . SelEIA:Open Bus +x x x x 0 x x x x x x 0 1 0 1 x 0 1 1 . . SelEIA:Open Bus +x x x x 0 x x x x x x 0 1 0 1 x 1 0 0 . W SelEIA:LoadEIACtlReg +x x x x 0 x x x x x x 0 1 0 1 x 1 0 1 . W SelEIA:LoadEIAData +x x x x 0 x x x x x x 0 1 0 1 x 1 1 0 . W SelEIA:EIADataReset +x x x x 0 x x x x x x 0 1 0 1 x 1 1 1 . W SelEIA:EIAChipReset +x x x x 0 x x x x x x 1 1 1 0 x x x x . R SelADCHi +x x x x 0 x x x x x x 1 1 1 1 x x x x . W CRTSwitch +*/ +static ADDRESS_MAP_START(notetaker_io, AS_IO, 16, notetaker_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x00, 0x03) AM_MIRROR(0x7E1C) AM_DEVREADWRITE8("pic8259", pic8259_device, read, write, 0x00ff) + AM_RANGE(0x20, 0x21) AM_MIRROR(0x7E1E) AM_WRITE(IPConReg_w) // processor (rom mapping, etc) control register + //AM_RANGE(0x42, 0x43) AM_MIRROR(0x7E10) AM_READ(ReadKeyData_r) // read keyboard data (high byte only) [from mcu?] + //AM_RANGE(0x44, 0x45) AM_MIRROR(0x7E10) AM_READ(ReadOPStatus_r) // read keyboard fifo state (high byte only) [from mcu?] + //AM_RANGE(0x48, 0x49) AM_MIRROR(0x7E10) AM_WRITE(LoadKeyCtlReg_w) // kbd uart control register + //AM_RANGE(0x4a, 0x4b) AM_MIRROR(0x7E10) AM_WRITE(LoadKeyData_w) // kbd uart data register + //AM_RANGE(0x4c, 0x4d) AM_MIRROR(0x7E10) AM_WRITE(KeyDataReset_w) // kbd uart ddr switch (data reset) + //AM_RANGE(0x4e, 0x4f) AM_MIRROR(0x7E10) AM_WRITE(KeyChipReset_w) // kbd uart reset + //AM_RANGE(0x60, 0x61) AM_MIRROR(0x7E1E) AM_WRITE(FIFOReg_w) // DAC sample and hold and frequency setup + //AM_RANGE(0x100, 0x101) AM_WRITE I/O register (adc speed, crtc pixel clock enable, etc) + //AM_RANGE(0x140, 0x15f) AM_DEVREADWRITE("crt5027", crt5027_device, read, write) +ADDRESS_MAP_END + +/* writes during boot: +0x88 to port 0x020 (PCR; boot sequence done(1), processor not locked(0), battery charger off(0), rom not disabled(0) correction off&cr4 off(1), cr3 on(0), cr2 on(0), cr1 on (0);) +0x02 to port 0x100 (IOR write: enable 5v only relay control for powering up 4116 dram enabled) +0x03 to port 0x100 (IOR write: in addition to above, enable 12v relay control for powering up 4116 dram enabled) +<dram memory 0x00000-0x3ffff is zeroed here> +0x13 to port 0x000 PIC (?????) +0x08 to port 0x002 PIC (UART int enabled) +0x0D to port 0x002 PIC (UART, wd1791, and parity error int enabled) +0xff to port 0x002 PIC (all ints enabled) +0x0000 to port 0x04e (reset keyboard fifo/controller) +0x0000 to port 0x1ae (reset UART) +0x0016 to port 0x048 (kbd control reg write) +0x0005 to port 0x1a8 (UART control reg write) +0x5f to port 0x140 \ +0xf2 to port 0x142 \ +0x7d to port 0x144 \ +0x1d to port 0x146 \_ set up CRTC +0x04 to port 0x148 / +0x10 to port 0x14a / +0x00 to port 0x154 / +0x1e to port 0x15a / +0x0a03 to port 0x100 (IOR write: set bit clock to 12Mhz) +0x2a03 to port 0x100 (IOR write: enable crtc clock chain) +0x00 to port 0x15c (fire off crtc timing chain) +read from 0x0002 (byte wide) (check interrupts) <looking for vblank int or odd/even frame int here, most likely> +0xaf to port 0x002 PIC (mask out kb int and 30hz display int) +0x0400 to 0x060 (select DAC fifo frequency 2) +read from 0x44 (byte wide) in a loop forever (read keyboard fifo status) +*/ + +/* Machine Reset */ +void notetaker_state::machine_reset() +{ + m_BootSeqDone = 0; + m_DisableROM = 0; +} + +/* Input ports */ +static INPUT_PORTS_START( notetakr ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( notetakr, notetaker_state ) + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", I8086, XTAL_24MHz/3) /* iD8086-2 @ E4A; 24Mhz crystal divided down to 8Mhz by i8284 clock generator */ + MCFG_CPU_PROGRAM_MAP(notetaker_mem) + MCFG_CPU_IO_MAP(notetaker_io) + MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE("pic8259", pic8259_device, inta_cb) + MCFG_PIC8259_ADD("pic8259", INPUTLINE("maincpu", 0), VCC, NULL) // iP8259A-2 @ E6 + + //Note there is a second i8086 cpu on the 'emulator board', which is probably loaded with code once smalltalk-78 loads + + /* video hardware */ + /*MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_REFRESH_RATE(60) + MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(250)) + MCFG_SCREEN_UPDATE_DRIVER(notetaker_state, screen_update) + MCFG_SCREEN_SIZE(64*6, 32*8) + MCFG_SCREEN_VISIBLE_AREA(0, 64*6-1, 0, 32*8-1) + + MCFG_PALETTE_ADD_3BIT_RGB("palette") + + MCFG_DEVICE_ADD("crt5027", CRT5027, XTAL_17_9712MHz/2) + //MCFG_TMS9927_CHAR_WIDTH(6) + //MCFG_TMS9927_VSYN_CALLBACK(DEVWRITELINE(TMS5501_TAG, tms5501_device, sens_w)) + MCFG_VIDEO_SET_SCREEN("screen")*/ + /* Devices */ + +MACHINE_CONFIG_END + +DRIVER_INIT_MEMBER(notetaker_state,notetakr) +{ + // descramble the rom; the whole thing is a gigantic scrambled mess either to ease + // interfacing with older xerox technologies which used A0 and D0 as the MSB bits + // or maybe because someone screwed up somewhere along the line. we may never know. + // see http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/notetaker/schematics/19790423_Notetaker_IO_Processor.pdf pages 12 and onward + UINT16 *romsrc = (UINT16 *)(memregion("maincpuload")->base()); + UINT16 *romdst = (UINT16 *)(memregion("maincpu")->base()); + UINT16 *temppointer; + UINT16 wordtemp; + UINT16 addrtemp; + // leave the src pointer alone, since we've only used a 0x1000 long address space + romdst += 0x7f800; // set the dest pointer to 0xff000 (>>1 because 16 bits data) + for (int i = 0; i < 0x800; i++) + { + wordtemp = BITSWAP16(*romsrc, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15); // data bus is completely reversed + addrtemp = BITSWAP16(i, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); // address bus is completely reversed; 11-15 should always be zero + temppointer = romdst+(addrtemp&0x7FF); + *temppointer = wordtemp; + romsrc++; + } +} + +/* ROM definition */ +ROM_START( notetakr ) + ROM_REGION( 0x1000, "maincpuload", ROMREGION_ERASEFF ) // load roms here before descrambling + ROM_SYSTEM_BIOS( 0, "v2.00", "IO Monitor v2.00" ) // dumped from Notetaker + ROMX_LOAD( "biop__2.00_hi.b2716.h1", 0x0000, 0x0800, CRC(1119691d) SHA1(4c20b595b554e6f5489ab2c3fb364b4a052f05e3), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "biop__2.00_lo.b2716.g1", 0x0001, 0x0800, CRC(b72aa4c7) SHA1(85dab2399f906c7695dc92e7c18f32e2303c5892), ROM_SKIP(1) | ROM_BIOS(1)) + ROM_SYSTEM_BIOS( 1, "v1.50", "IO Monitor v1.50" ) // typed from the source listing at http://bitsavers.trailing-edge.com/pdf/xerox/notetaker/memos/19790620_Z-IOP_1.5_ls.pdf and scrambled + ROMX_LOAD( "z-iop_1.50_hi.h1", 0x0000, 0x0800, CRC(2994656e) SHA1(ca2bb38eb9075c5c2f3cc5439b209e7e216084da), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "z-iop_1.50_lo.g1", 0x0001, 0x0800, CRC(2cb79a67) SHA1(692aafd2aeea27533f6288dbb1cb8678ea08fade), ROM_SKIP(1) | ROM_BIOS(2)) + ROM_REGION( 0x100000, "maincpu", ROMREGION_ERASEFF ) // area for descrambled roms + ROM_REGION( 0x100000, "ram", ROMREGION_ERASEFF ) // ram cards + ROM_REGION( 0x1000, "proms", ROMREGION_ERASEFF ) + ROM_LOAD( "disksep.prom.82s147.a4", 0x000, 0x200, NO_DUMP ) // disk data separator prom from the disk/display module board + ROM_LOAD( "setmemrq.prom.82s126.d9", 0x200, 0x100, NO_DUMP ) // SETMEMRQ memory timing prom from the disk/display module board; The equations for this one are actually listed on the schematic, so it should be pretty easy to recreate. +ROM_END + +/* Driver */ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */ +COMP( 1978, notetakr, 0, 0, notetakr, notetakr, notetaker_state, notetakr, "Xerox", "Notetaker", MACHINE_IS_SKELETON) +//COMP( 1978, notetakr, 0, 0, notetakr, notetakr, driver_device, notetakr, "Xerox", "Notetaker", MACHINE_IS_SKELETON) diff --git a/src/mame/drivers/nwk-tr.cpp b/src/mame/drivers/nwk-tr.cpp index 3d4719b95f1..a64c10fd96a 100644 --- a/src/mame/drivers/nwk-tr.cpp +++ b/src/mame/drivers/nwk-tr.cpp @@ -304,6 +304,7 @@ public: int m_fpga_uploaded; int m_lanc2_ram_r; int m_lanc2_ram_w; + UINT8 m_lanc2_reg[3]; std::unique_ptr<UINT8[]> m_lanc2_ram; std::unique_ptr<UINT32[]> m_sharc_dataram; DECLARE_WRITE32_MEMBER(paletteram32_w); @@ -346,11 +347,11 @@ WRITE_LINE_MEMBER(nwktr_state::voodoo_vblank_0) UINT32 nwktr_state::screen_update_nwktr(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - device_t *voodoo = machine().device("voodoo0"); + voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo0"); bitmap.fill(m_palette->pen(0), cliprect); - voodoo_update(voodoo, bitmap, cliprect); + voodoo->voodoo_update(bitmap, cliprect); const rectangle &visarea = screen.visible_area(); const rectangle tilemap_rect(visarea.min_x, visarea.max_x, visarea.min_y+16, visarea.max_y); @@ -521,6 +522,7 @@ WRITE32_MEMBER(nwktr_state::lanc2_w) ((value << 7) & 0x80); m_fpga_uploaded = 1; + m_lanc2_reg[0] = (UINT8)(data >> 24); //printf("lanc2_fpga_w: %02X at %08X\n", value, space.device().safe_pc()); } @@ -528,11 +530,16 @@ WRITE32_MEMBER(nwktr_state::lanc2_w) { m_lanc2_ram_r = 0; m_lanc2_ram_w = 0; + m_lanc2_reg[1] = (UINT8)(data >> 8); } else if (ACCESSING_BITS_16_23) { - m_lanc2_ram[2] = (data >> 20) & 0xf; - m_lanc2_ram[3] = 0; + if (m_lanc2_reg[0] != 0) + { + m_lanc2_ram[2] = (data >> 20) & 0xf; + m_lanc2_ram[3] = 0; + } + m_lanc2_reg[2] = (UINT8)(data >> 16); } else if (ACCESSING_BITS_0_7) { diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp index c611c2b32eb..233da503224 100644 --- a/src/mame/drivers/overdriv.cpp +++ b/src/mame/drivers/overdriv.cpp @@ -70,23 +70,32 @@ WRITE16_MEMBER(overdriv_state::eeprom_w) TIMER_DEVICE_CALLBACK_MEMBER(overdriv_state::overdriv_cpuA_scanline) { + const int timer_threshold = 168; // fwiw matches 0 on mask ROM check, so IF it's a timer irq then should be close ... int scanline = param; - - /* TODO: irqs routines are TOO slow right now, it ends up firing spurious irqs for whatever reason (shared ram fighting?) */ - /* this is a temporary solution to get rid of deprecat lib and the crashes, but also makes the game timer to be too slow */ - if(scanline == 256 && m_screen->frame_number() & 1) // vblank-out irq + + m_fake_timer ++; + + // TODO: irqs routines are TOO slow right now, it ends up firing spurious irqs for whatever reason (shared ram fighting?) + // this is a temporary solution to get rid of deprecat lib and the crashes, but also makes the game timer to be too slow. + // Update: gameplay is actually too fast compared to timer, first attract mode shouldn't even surpass first blue car on right. + if(scanline == 256) // vblank-out irq + { + // m_screen->frame_number() & 1 m_maincpu->set_input_line(4, HOLD_LINE); - else if((scanline % 128) == 0) // timer irq + } + else if(m_fake_timer >= timer_threshold) // timer irq + { + m_fake_timer -= timer_threshold; m_maincpu->set_input_line(5, HOLD_LINE); + } } +#ifdef UNUSED_FUNCTION INTERRUPT_GEN_MEMBER(overdriv_state::cpuB_interrupt) { // this doesn't get turned on until the irq has happened? wrong irq? -// if (m_k053246->k053246_is_irq_enabled()) - m_subcpu->set_input_line(4, HOLD_LINE); // likely wrong } - +#endif WRITE16_MEMBER(overdriv_state::cpuA_ctrl_w) { @@ -127,17 +136,22 @@ WRITE16_MEMBER(overdriv_state::cpuB_ctrl_w) WRITE16_MEMBER(overdriv_state::overdriv_soundirq_w) { - m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE); + m_audiocpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } -WRITE16_MEMBER(overdriv_state::overdriv_cpuB_irq_x_w) + + + +WRITE16_MEMBER(overdriv_state::slave_irq4_assert_w) { - m_subcpu->set_input_line(5, HOLD_LINE); // likely wrong + // used in-game + m_subcpu->set_input_line(4, HOLD_LINE); } -WRITE16_MEMBER(overdriv_state::overdriv_cpuB_irq_y_w) +WRITE16_MEMBER(overdriv_state::slave_irq5_assert_w) { - m_subcpu->set_input_line(6, HOLD_LINE); // likely wrong + // tests GFX ROMs with this irq (indeed enabled only in test mode) + m_subcpu->set_input_line(5, HOLD_LINE); } static ADDRESS_MAP_START( overdriv_master_map, AS_PROGRAM, 16, overdriv_state ) @@ -163,11 +177,11 @@ static ADDRESS_MAP_START( overdriv_master_map, AS_PROGRAM, 16, overdriv_state ) AM_RANGE(0x218000, 0x218fff) AM_DEVREADWRITE8("k051316_2", k051316_device, read, write, 0xff00) AM_RANGE(0x220000, 0x220fff) AM_DEVREAD8("k051316_1", k051316_device, rom_r, 0xff00) AM_RANGE(0x228000, 0x228fff) AM_DEVREAD8("k051316_2", k051316_device, rom_r, 0xff00) - AM_RANGE(0x230000, 0x230001) AM_WRITE(overdriv_cpuB_irq_y_w) - AM_RANGE(0x238000, 0x238001) AM_WRITE(overdriv_cpuB_irq_x_w) + AM_RANGE(0x230000, 0x230001) AM_WRITE(slave_irq4_assert_w) + AM_RANGE(0x238000, 0x238001) AM_WRITE(slave_irq5_assert_w) ADDRESS_MAP_END -// HACK ALERT +#ifdef UNUSED_FUNCTION WRITE16_MEMBER( overdriv_state::overdriv_k053246_word_w ) { m_k053246->k053246_word_w(space,offset,data,mem_mask); @@ -190,6 +204,20 @@ WRITE16_MEMBER( overdriv_state::overdriv_k053246_word_w ) //printf("%02x %04x %04x\n", offset, data, mem_mask); } +#endif + +TIMER_CALLBACK_MEMBER(overdriv_state::objdma_end_cb ) +{ + m_subcpu->set_input_line(6, HOLD_LINE); +} + +WRITE16_MEMBER(overdriv_state::objdma_w) +{ + if(data & 0x10) + machine().scheduler().timer_set(attotime::from_usec(100), timer_expired_delegate(FUNC(overdriv_state::objdma_end_cb), this)); + + m_k053246->k053246_w(space,5,data,mem_mask); +} static ADDRESS_MAP_START( overdriv_slave_map, AS_PROGRAM, 16, overdriv_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM @@ -197,17 +225,27 @@ static ADDRESS_MAP_START( overdriv_slave_map, AS_PROGRAM, 16, overdriv_state ) AM_RANGE(0x0c0000, 0x0c1fff) AM_RAM //AM_DEVREADWRITE("k053250_1", k053250_device, ram_r, ram_w) AM_RANGE(0x100000, 0x10000f) AM_DEVREADWRITE("k053250_1", k053250_device, reg_r, reg_w) AM_RANGE(0x108000, 0x10800f) AM_DEVREADWRITE("k053250_2", k053250_device, reg_r, reg_w) - AM_RANGE(0x118000, 0x118fff) AM_RAM AM_SHARE("sprram") //AM_DEVREADWRITE("k053246", k053247_device, k053247_word_r, k053247_word_w) // data gets copied to sprite chip with DMA.. + AM_RANGE(0x118000, 0x118fff) AM_DEVREADWRITE("k053246", k053247_device, k053247_word_r, k053247_word_w) // data gets copied to sprite chip with DMA.. AM_RANGE(0x120000, 0x120001) AM_DEVREAD("k053246", k053247_device, k053246_word_r) AM_RANGE(0x128000, 0x128001) AM_READWRITE(cpuB_ctrl_r, cpuB_ctrl_w) /* enable K053247 ROM reading, plus something else */ - AM_RANGE(0x130000, 0x130007) AM_WRITE(overdriv_k053246_word_w) // AM_DEVWRITE("k053246", k053247_device, k053246_word_w) + AM_RANGE(0x130004, 0x130005) AM_WRITE(objdma_w) + AM_RANGE(0x130000, 0x130007) AM_DEVREADWRITE8("k053246", k053247_device, k053246_r,k053246_w,0xffff) + //AM_RANGE(0x140000, 0x140001) used in later stages, set after writes at 0x208000-0x20bfff range AM_RANGE(0x200000, 0x203fff) AM_RAM AM_SHARE("share1") - AM_RANGE(0x208000, 0x20bfff) AM_RAM + AM_RANGE(0x208000, 0x20bfff) AM_RAM // sprite indirect table? AM_RANGE(0x218000, 0x219fff) AM_DEVREAD("k053250_1", k053250_device, rom_r) AM_RANGE(0x220000, 0x221fff) AM_DEVREAD("k053250_2", k053250_device, rom_r) ADDRESS_MAP_END +WRITE8_MEMBER(overdriv_state::sound_ack_w) +{ + m_audiocpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); +} + static ADDRESS_MAP_START( overdriv_sound_map, AS_PROGRAM, 8, overdriv_state ) + AM_RANGE(0x0000, 0x0000) AM_WRITE(sound_ack_w) + // 0x012 read during explosions + // 0x180 AM_RANGE(0x0200, 0x0201) AM_DEVREADWRITE("ymsnd", ym2151_device,read,write) AM_RANGE(0x0400, 0x042f) AM_DEVREADWRITE("k053260_1", k053260_device, read, write) AM_RANGE(0x0600, 0x062f) AM_DEVREADWRITE("k053260_2", k053260_device, read, write) @@ -222,7 +260,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( overdriv ) PORT_START("INPUTS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_TOGGLE + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_TOGGLE PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -282,8 +320,9 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state ) MCFG_CPU_ADD("sub", M68000, XTAL_24MHz/2) /* 12 MHz */ MCFG_CPU_PROGRAM_MAP(overdriv_slave_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", overdriv_state, cpuB_interrupt) /* IRQ 5 and 6 are generated by the main CPU. */ - /* IRQ 5 is used only in test mode, to request the checksums of the gfx ROMs. */ + //MCFG_CPU_VBLANK_INT_DRIVER("screen", overdriv_state, cpuB_interrupt) + /* IRQ 5 and 6 are generated by the main CPU. */ + /* IRQ 5 is used only in test mode, to request the checksums of the gfx ROMs. */ MCFG_CPU_ADD("audiocpu", M6809, XTAL_3_579545MHz) /* 1.789 MHz?? This might be the right speed, but ROM testing */ MCFG_CPU_PROGRAM_MAP(overdriv_sound_map) /* takes a little too much (the counter wraps from 0000 to 9999). */ @@ -297,10 +336,7 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state ) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(59) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) - MCFG_SCREEN_SIZE(64*8, 40*8) - MCFG_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 0*8, 32*8-1 ) + MCFG_SCREEN_RAW_PARAMS(XTAL_24MHz/4,384,0,305,264,0,224) MCFG_SCREEN_UPDATE_DRIVER(overdriv_state, screen_update_overdriv) MCFG_SCREEN_PALETTE("palette") @@ -475,6 +511,6 @@ ROM_START( overdrivb ) ROM_LOAD( "789e02.f1", 0x100000, 0x100000, CRC(bdd3b5c6) SHA1(412332d64052c0a3714f4002c944b0e7d32980a4) ) ROM_END -GAMEL( 1990, overdriv, 0, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) -GAMEL( 1990, overdriva, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) -GAMEL( 1990, overdrivb, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) +GAMEL( 1990, overdriv, 0, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // US version +GAMEL( 1990, overdriva, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // Overseas? +GAMEL( 1990, overdrivb, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 3)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_overdriv ) // Overseas? diff --git a/src/mame/drivers/pc2000.cpp b/src/mame/drivers/pc2000.cpp index 152ee648b28..b207dd72fec 100644 --- a/src/mame/drivers/pc2000.cpp +++ b/src/mame/drivers/pc2000.cpp @@ -935,6 +935,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( pc1000, misterx ) MCFG_SOFTWARE_LIST_REMOVE("cart_list") + MCFG_SOFTWARE_LIST_REMOVE("pc1000_cart") MCFG_SOFTWARE_LIST_ADD("cart_list", "pc1000") MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("misterx_cart", "misterx") MACHINE_CONFIG_END diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp index 433e8346858..f2f305ec97c 100644 --- a/src/mame/drivers/pc9801.cpp +++ b/src/mame/drivers/pc9801.cpp @@ -425,6 +425,7 @@ Keyboard TX commands: #include "machine/pc9801_118.h" #include "machine/pc9801_cbus.h" #include "machine/pc9801_kbd.h" +#include "machine/pc9801_cd.h" #include "machine/idectrl.h" #include "machine/idehd.h" @@ -512,6 +513,7 @@ public: UINT8 *m_kanji_rom; UINT8 m_dma_offset[4]; + UINT8 m_dma_autoinc[4]; int m_dack; UINT8 m_video_ff[8],m_gfx_ff; @@ -569,7 +571,9 @@ public: UINT8 m_sys_type; DECLARE_WRITE_LINE_MEMBER( write_uart_clock ); - DECLARE_WRITE8_MEMBER(rtc_dmapg_w); + DECLARE_WRITE8_MEMBER(rtc_w); + DECLARE_WRITE8_MEMBER(dmapg4_w); + DECLARE_WRITE8_MEMBER(dmapg8_w); DECLARE_WRITE8_MEMBER(nmi_ctrl_w); DECLARE_WRITE8_MEMBER(vrtc_clear_w); DECLARE_WRITE8_MEMBER(pc9801_video_ff_w); @@ -733,6 +737,7 @@ public: UINT8 freq_index; }m_mouse; TIMER_DEVICE_CALLBACK_MEMBER( mouse_irq_cb ); + DECLARE_READ8_MEMBER(unk_r); DECLARE_DRIVER_INIT(pc9801_kanji); inline void set_dma_channel(int channel, int state); @@ -973,29 +978,29 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( pc9801_state::hgdc_draw_text ) } -WRITE8_MEMBER(pc9801_state::rtc_dmapg_w) +WRITE8_MEMBER(pc9801_state::rtc_w) { - if((offset & 1) == 0) - { - if(offset == 0) - { - m_rtc->c0_w((data & 0x01) >> 0); - m_rtc->c1_w((data & 0x02) >> 1); - m_rtc->c2_w((data & 0x04) >> 2); - m_rtc->stb_w((data & 0x08) >> 3); - m_rtc->clk_w((data & 0x10) >> 4); - m_rtc->data_in_w(((data & 0x20) >> 5)); - if(data & 0xc0) - logerror("RTC write to undefined bits %02x\n",data & 0xc0); - } - else - logerror("Write to undefined port [%02x] <- %02x\n",offset+0x20,data); - } - else // odd - { -// logerror("Write to DMA bank register %d %02x\n",((offset >> 1)+1) & 3,data); - m_dma_offset[((offset >> 1)+1) & 3] = data & 0x0f; - } + m_rtc->c0_w((data & 0x01) >> 0); + m_rtc->c1_w((data & 0x02) >> 1); + m_rtc->c2_w((data & 0x04) >> 2); + m_rtc->stb_w((data & 0x08) >> 3); + m_rtc->clk_w((data & 0x10) >> 4); + m_rtc->data_in_w(((data & 0x20) >> 5)); + if(data & 0xc0) + logerror("RTC write to undefined bits %02x\n",data & 0xc0); +} + +WRITE8_MEMBER(pc9801_state::dmapg4_w) +{ + m_dma_offset[(offset+1) & 3] = data & 0x0f; +} + +WRITE8_MEMBER(pc9801_state::dmapg8_w) +{ + if(offset == 4) + m_dma_autoinc[data & 3] = (data >> 2) & 3; + else if(offset < 4) + m_dma_offset[(offset+1) & 3] = data; } WRITE8_MEMBER(pc9801_state::nmi_ctrl_w) @@ -1425,7 +1430,20 @@ void pc9801_state::egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask) } // mask off the bits past the end of the blit - if(m_egc.count < 16) + if((m_egc.count < 8) && (mem_mask != 0xffff)) + { + UINT16 end_mask = dir ? ((1 << m_egc.count) - 1) : ~((1 << (8 - m_egc.count)) - 1); + // if the blit is less than 8 bits, adjust the masks + if(m_egc.first) + { + if(dir) + end_mask <<= dst_off & 7; + else + end_mask >>= dst_off & 7; + } + mask &= end_mask; + } + else if((m_egc.count < 16) && (mem_mask == 0xffff)) { UINT16 end_mask = dir ? ((1 << m_egc.count) - 1) : ~((1 << (16 - m_egc.count)) - 1); // if the blit is less than 16 bits, adjust the masks @@ -1456,11 +1474,6 @@ void pc9801_state::egc_blit_w(UINT32 offset, UINT16 data, UINT16 mem_mask) out = data; break; case 1: - if(mem_mask == 0x00ff) - src = src | src << 8; - else if(mem_mask == 0xff00) - src = src | src >> 8; - out = egc_do_partial_op(i, src, pat, m_video_ram_2[offset + (((i + 1) & 3) * 0x4000)]); break; case 2: @@ -1773,7 +1786,8 @@ static ADDRESS_MAP_START( pc9801_io, AS_IO, 16, pc9801_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("i8237", am9517a_device, read, write, 0xff00) AM_RANGE(0x0000, 0x000f) AM_READWRITE8(pic_r, pic_w, 0x00ff) // i8259 PIC (bit 3 ON slave / master) / i8237 DMA - AM_RANGE(0x0020, 0x0027) AM_WRITE8(rtc_dmapg_w,0xffff) // RTC / DMA registers (LS244) + AM_RANGE(0x0020, 0x0021) AM_WRITE8(rtc_w,0x00ff) + AM_RANGE(0x0020, 0x0027) AM_WRITE8(dmapg4_w,0xff00) AM_RANGE(0x0030, 0x0037) AM_DEVREADWRITE8("ppi8255_sys", i8255_device, read, write, 0xff00) //i8251 RS232c / i8255 system port AM_RANGE(0x0040, 0x0047) AM_DEVREADWRITE8("ppi8255_prn", i8255_device, read, write, 0x00ff) AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE8("keyb", pc9801_kbd_device, rx_r, tx_w, 0xff00) //i8255 printer port / i8251 keyboard @@ -2231,6 +2245,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pc9801ux_io, AS_IO, 16, pc9801_state ) ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(0x0020, 0x002f) AM_WRITE8(dmapg8_w,0xff00) AM_RANGE(0x0050, 0x0057) AM_NOP // 2dd ppi? AM_RANGE(0x005c, 0x005f) AM_READ(pc9821_timestamp_r) AM_WRITENOP // artic AM_RANGE(0x0068, 0x006b) AM_WRITE8(pc9801rs_video_ff_w,0x00ff) //mode FF / <undefined> @@ -2262,7 +2277,7 @@ static ADDRESS_MAP_START( pc9801rs_io, AS_IO, 16, pc9801_state ) AM_RANGE(0x0430, 0x0433) AM_READWRITE8(ide_ctrl_r, ide_ctrl_w, 0x00ff) AM_RANGE(0x0640, 0x064f) AM_READWRITE(ide_cs0_r, ide_cs0_w) AM_RANGE(0x0740, 0x074f) AM_READWRITE(ide_cs1_r, ide_cs1_w) - AM_RANGE(0x1e80, 0x1e8f) AM_NOP // temp + AM_RANGE(0x1e8c, 0x1e8f) AM_NOP // temp AM_RANGE(0xbfd8, 0xbfdf) AM_WRITE8(pc9801rs_mouse_freq_w, 0xffff) AM_RANGE(0xe0d0, 0xe0d3) AM_READ8(pc9801rs_midi_r, 0xffff) AM_IMPORT_FROM(pc9801ux_io) @@ -2278,6 +2293,8 @@ WRITE8_MEMBER(pc9801_state::pc9821_video_ff_w) { if(offset == 1) { + if(((data & 0xfe) == 4) && !m_ex_video_ff[3]) // TODO: many other settings are protected + return; m_ex_video_ff[(data & 0xfe) >> 1] = data & 1; //if((data & 0xfe) == 0x20) @@ -2469,13 +2486,15 @@ static ADDRESS_MAP_START( pc9821_io, AS_IO, 32, pc9801_state ) // ADDRESS_MAP_UNMAP_HIGH // TODO: a read to somewhere makes this to fail at POST AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8("i8237", am9517a_device, read, write, 0xff00ff00) AM_RANGE(0x0000, 0x000f) AM_READWRITE8(pic_r, pic_w, 0x00ff00ff) // i8259 PIC (bit 3 ON slave / master) / i8237 DMA - AM_RANGE(0x0020, 0x0027) AM_WRITE8(rtc_dmapg_w, 0xffffffff) // RTC / DMA registers (LS244) + AM_RANGE(0x0020, 0x0023) AM_WRITE8(rtc_w,0x000000ff) + AM_RANGE(0x0020, 0x002f) AM_WRITE8(dmapg8_w,0xff00ff00) AM_RANGE(0x0030, 0x0037) AM_DEVREADWRITE8("ppi8255_sys", i8255_device, read, write, 0xff00ff00) //i8251 RS232c / i8255 system port AM_RANGE(0x0040, 0x0047) AM_DEVREADWRITE8("ppi8255_prn", i8255_device, read, write, 0x00ff00ff) AM_RANGE(0x0040, 0x0043) AM_DEVREADWRITE8("keyb", pc9801_kbd_device, rx_r, tx_w, 0xff00ff00) //i8255 printer port / i8251 keyboard AM_RANGE(0x0050, 0x0053) AM_WRITE8(pc9801rs_nmi_w, 0xffffffff) AM_RANGE(0x005c, 0x005f) AM_READ16(pc9821_timestamp_r,0xffffffff) AM_WRITENOP // artic AM_RANGE(0x0060, 0x0063) AM_DEVREADWRITE8("upd7220_chr", upd7220_device, read, write, 0x00ff00ff) //upd7220 character ports / <undefined> + AM_RANGE(0x0060, 0x0063) AM_READ8(unk_r, 0xff00ff00) // mouse related (unmapped checking for AT keyb controller\PS/2 mouse?) AM_RANGE(0x0064, 0x0067) AM_WRITE8(vrtc_clear_w, 0x000000ff) AM_RANGE(0x0068, 0x006b) AM_WRITE8(pc9821_video_ff_w, 0x00ff00ff) //mode FF / <undefined> AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00ff00) @@ -2511,6 +2530,7 @@ static ADDRESS_MAP_START( pc9821_io, AS_IO, 32, pc9801_state ) // AM_RANGE(0x0c2d, 0x0c2d) cs4231 PCM board hi byte control // AM_RANGE(0x0cc0, 0x0cc7) SCSI interface / <undefined> // AM_RANGE(0x0cfc, 0x0cff) PCI bus + AM_RANGE(0x1e8c, 0x1e8f) AM_NOP // IDE RAM switch AM_RANGE(0x3fd8, 0x3fdf) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0xff00ff00) // <undefined> / pit mirror ports AM_RANGE(0x7fd8, 0x7fdf) AM_DEVREADWRITE8("ppi8255_mouse", i8255_device, read, write, 0xff00ff00) AM_RANGE(0x841c, 0x841f) AM_READWRITE8(sdip_0_r,sdip_0_w,0xffffffff) @@ -2871,6 +2891,21 @@ READ8_MEMBER(pc9801_state::dma_read_byte) { address_space &program = m_maincpu->space(AS_PROGRAM); offs_t addr = (m_dma_offset[m_dack] << 16) | offset; + if(offset == 0xffff) + { + switch(m_dma_autoinc[m_dack]) + { + case 1: + { + UINT8 page = m_dma_offset[m_dack]; + m_dma_offset[m_dack] = ((page + 1) & 0xf) | (page & 0xf0); + break; + } + case 3: + m_dma_offset[m_dack]++; + break; + } + } // logerror("%08x\n",addr); @@ -2882,7 +2917,21 @@ WRITE8_MEMBER(pc9801_state::dma_write_byte) { address_space &program = m_maincpu->space(AS_PROGRAM); offs_t addr = (m_dma_offset[m_dack] << 16) | offset; - + if(offset == 0xffff) + { + switch(m_dma_autoinc[m_dack]) + { + case 1: + { + UINT8 page = m_dma_offset[m_dack]; + m_dma_offset[m_dack] = ((page + 1) & 0xf) | (page & 0xf0); + break; + } + case 3: + m_dma_offset[m_dack]++; + break; + } + } // logerror("%08x %02x\n",addr,data); program.write_byte(addr, data); @@ -2959,6 +3008,11 @@ WRITE8_MEMBER(pc9801_state::ppi_mouse_portc_w) m_mouse.control = data; } +READ8_MEMBER(pc9801_state::unk_r) +{ + return 0xff; +} + /**************************************** * * UPD765 interface @@ -3122,6 +3176,7 @@ MACHINE_RESET_MEMBER(pc9801_state,pc9801_common) m_mouse.control = 0xff; m_mouse.freq_reg = 0; m_mouse.freq_index = 0; + m_dma_autoinc[0] = m_dma_autoinc[1] = m_dma_autoinc[2] = m_dma_autoinc[3] = 0; memset(&m_egc, 0, sizeof(m_egc)); } @@ -3218,6 +3273,10 @@ TIMER_DEVICE_CALLBACK_MEMBER( pc9801_state::mouse_irq_cb ) } } +SLOT_INTERFACE_START(pc9801_atapi_devices) + SLOT_INTERFACE("pc9801_cd", PC9801_CD) +SLOT_INTERFACE_END + static MACHINE_CONFIG_FRAGMENT( pc9801_keyboard ) MCFG_DEVICE_ADD("keyb", PC9801_KBD, 53) MCFG_PC9801_KBD_IRQ_CALLBACK(DEVWRITELINE("pic8259_master", pic8259_device, ir1_w)) @@ -3266,7 +3325,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( pc9801_ide ) MCFG_ATA_INTERFACE_ADD("ide1", ata_devices, "hdd", nullptr, false) MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(pc9801_state, ide1_irq_w)) - MCFG_ATA_INTERFACE_ADD("ide2", ata_devices, "cdrom", nullptr, false) + MCFG_ATA_INTERFACE_ADD("ide2", pc9801_atapi_devices, "pc9801_cd", nullptr, false) MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(pc9801_state, ide2_irq_w)) MACHINE_CONFIG_END @@ -3409,7 +3468,7 @@ static MACHINE_CONFIG_START( pc9801rs, pc9801_state ) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("1664K") - MCFG_RAM_EXTRA_OPTIONS("640K,3712K,7808K") + MCFG_RAM_EXTRA_OPTIONS("640K,3712K,7808K,14M") MCFG_DEVICE_MODIFY("upd7220_btm") MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_grcg_2_map) @@ -3668,6 +3727,10 @@ ROM_START( pc9821 ) ROM_REGION( 0x60000, "ipl", ROMREGION_ERASEFF ) ROM_LOAD( "itf.rom", 0x18000, 0x08000, CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) ) ROM_LOAD( "bios.rom", 0x28000, 0x18000, BAD_DUMP CRC(34a19a59) SHA1(2e92346727b0355bc1ec9a7ded1b444a4917f2b9) ) + ROM_FILL(0x34c40, 4, 0) // hide the _32_ marker until we have a 32-bit clean IDE bios otherwise windows tries to + // make a 32-bit call into 16-bit code + ROM_FILL(0x37ffe, 1, 0x92) + ROM_FILL(0x37fff, 1, 0xd7) ROM_REGION( 0x10000, "sound_bios", 0 ) ROM_LOAD( "sound.rom", 0x0000, 0x4000, CRC(a21ef796) SHA1(34137c287c39c44300b04ee97c1e6459bb826b60) ) diff --git a/src/mame/drivers/playch10.cpp b/src/mame/drivers/playch10.cpp index 1a044e7e2ec..3de354d2a38 100644 --- a/src/mame/drivers/playch10.cpp +++ b/src/mame/drivers/playch10.cpp @@ -1726,7 +1726,7 @@ GAME( 1988, pc_pinbt, playch10, playch10_hboard, playch10, playch10_state, pchbo /* i-Board Games */ GAME( 1989, pc_cshwk, playch10, playch10, playch10, playch10_state, pciboard, ROT0, "Rare (Nintendo of America license)", "Captain Sky Hawk (PlayChoice-10)", 0 ) -GAME( 1990, pc_sjetm, playch10, playch10, playch10, playch10_state, pciboard, ROT0, "Rare", "Solar Jetman (PlayChoice-10)", 0 ) +GAME( 1990, pc_sjetm, playch10, playch10, playch10, playch10_state, pciboard, ROT0, "Rare", "Solar Jetman (PlayChoice-10)", MACHINE_IMPERFECT_GRAPHICS ) /* K-Board Games */ GAME( 1991, pc_moglf, playch10, playch10, playch10, playch10_state, pckboard, ROT0, "Nintendo", "Mario's Open Golf (PlayChoice-10)", 0 ) diff --git a/src/mame/drivers/prestige.cpp b/src/mame/drivers/prestige.cpp index e8c0c1200fb..4b7131f82d4 100644 --- a/src/mame/drivers/prestige.cpp +++ b/src/mame/drivers/prestige.cpp @@ -775,6 +775,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( snotec, glcolor ) MCFG_SOFTWARE_LIST_REMOVE("cart_list") + MCFG_SOFTWARE_LIST_REMOVE("snotec_cart") MCFG_SOFTWARE_LIST_ADD("cart_list", "snotec") MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("glcolor_cart", "glcolor") MACHINE_CONFIG_END diff --git a/src/mame/drivers/pulsar.cpp b/src/mame/drivers/pulsar.cpp index 48030adce83..eda3535ee2d 100644 --- a/src/mame/drivers/pulsar.cpp +++ b/src/mame/drivers/pulsar.cpp @@ -254,7 +254,10 @@ MACHINE_CONFIG_END /* ROM definition */ ROM_START( pulsarlb ) ROM_REGION( 0x10800, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "mp7a.bin", 0x10000, 0x800, CRC(726b8a19) SHA1(43b2af84d5622c1f67584c501b730acf002a6113) ) + ROM_SYSTEM_BIOS(0, "mon7", "MP7A") + ROMX_LOAD( "mp7a.bin", 0x10000, 0x800, CRC(726b8a19) SHA1(43b2af84d5622c1f67584c501b730acf002a6113), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(1, "mon6", "LBOOT6") // Blank screen until floppy boots + ROMX_LOAD( "lboot6.rom", 0x10000, 0x800, CRC(3bca9096) SHA1(ff99288e51a9e832785ce8e3ab5a9452b1064231), ROM_BIOS(2)) ROM_END /* Driver */ diff --git a/src/mame/drivers/punchout.cpp b/src/mame/drivers/punchout.cpp index d7d54a6a2c4..9355d7f7726 100644 --- a/src/mame/drivers/punchout.cpp +++ b/src/mame/drivers/punchout.cpp @@ -12,7 +12,6 @@ the bottom screen. driver by Nicola Salmoria TODO: -- finish spunchout protection, currently using a hacky workaround - add useless driver config to choose between pink and white color proms - video raw params - pixel clock is derived from 20.16mhz xtal - money bag placement might not be 100% correct in Arm Wrestling @@ -148,10 +147,7 @@ WRITE8_MEMBER(punchout_state::punchout_speech_vcu_w) WRITE8_MEMBER(punchout_state::punchout_2a03_reset_w) { - if (data & 1) - m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); - else - m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); + m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 1) ? ASSERT_LINE : CLEAR_LINE); } WRITE8_MEMBER(punchout_state::nmi_mask_w) @@ -192,20 +188,19 @@ static ADDRESS_MAP_START( punchout_io_map, AS_IO, 8, punchout_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") - AM_RANGE(0x00, 0x01) AM_WRITENOP /* the 2A03 #1 is not present */ + AM_RANGE(0x00, 0x01) AM_WRITENOP // the 2A03 #1 is not present AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW2") AM_WRITE(soundlatch_byte_w) AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_WRITE(soundlatch2_byte_w) - AM_RANGE(0x04, 0x04) AM_DEVWRITE("vlm", vlm5030_device, data_w) /* VLM5030 */ -// AM_RANGE(0x05, 0x05) AM_WRITENOP /* unused */ -// AM_RANGE(0x06, 0x06) AM_WRITENOP + AM_RANGE(0x04, 0x04) AM_DEVWRITE("vlm", vlm5030_device, data_w) + AM_RANGE(0x05, 0x07) AM_WRITENOP // spunchout protection AM_RANGE(0x08, 0x08) AM_WRITE(nmi_mask_w) - AM_RANGE(0x09, 0x09) AM_WRITENOP /* watchdog reset, seldom used because 08 clears the watchdog as well */ - AM_RANGE(0x0a, 0x0a) AM_WRITENOP /* ?? */ + AM_RANGE(0x09, 0x09) AM_WRITENOP // watchdog reset, seldom used because 08 clears the watchdog as well + AM_RANGE(0x0a, 0x0a) AM_WRITENOP // ? AM_RANGE(0x0b, 0x0b) AM_WRITE(punchout_2a03_reset_w) - AM_RANGE(0x0c, 0x0c) AM_WRITE(punchout_speech_reset_w) /* VLM5030 */ - AM_RANGE(0x0d, 0x0d) AM_WRITE(punchout_speech_st_w) /* VLM5030 */ - AM_RANGE(0x0e, 0x0e) AM_WRITE(punchout_speech_vcu_w) /* VLM5030 */ - AM_RANGE(0x0f, 0x0f) AM_WRITENOP /* enable NVRAM ? */ + AM_RANGE(0x0c, 0x0c) AM_WRITE(punchout_speech_reset_w) + AM_RANGE(0x0d, 0x0d) AM_WRITE(punchout_speech_st_w) + AM_RANGE(0x0e, 0x0e) AM_WRITE(punchout_speech_vcu_w) + AM_RANGE(0x0f, 0x0f) AM_WRITENOP // enable NVRAM? ADDRESS_MAP_END @@ -229,15 +224,6 @@ READ8_MEMBER(punchout_state::spunchout_exp_r) ret |= m_rp5h01->counter_r() ? 0x00 : 0x40; ret |= m_rp5h01->data_r() ? 0x00 : 0x80; - // FIXME - hack d6/d7 state until we figure out why the game resets - /* PC = 0x0313 */ - /* (ret or 0x10) -> (D7DF),(D7A0) - (D7DF),(D7A0) = 0d0h(ret nc) */ - ret &= 0x3f; - if (space.device().safe_pcbase() == 0x0313) - { - ret |= 0xc0; - } - return ret; } @@ -245,22 +231,30 @@ WRITE8_MEMBER(punchout_state::spunchout_exp_w) { // d0-d3: D0-D3 to RP5C01 m_rtc->write(space, offset >> 4 & 0xf, data & 0xf); +} - // d0: 74LS74 1D + 74LS74 2D - // 74LS74 1Q -> RP5H01 DATA CLOCK + TEST +WRITE8_MEMBER(punchout_state::spunchout_rp5h01_reset_w) +{ + // d0: 74LS74 2D // 74LS74 2Q -> RP5H01 RESET // 74LS74 _2Q -> 74LS74 _1 RESET - m_rp5h01->clock_w(data & 1); - m_rp5h01->test_w(data & 1); m_rp5h01->reset_w(data & 1); - m_rp5h01->clock_w(0); - m_rp5h01->test_w(0); + if (data & 1) + spunchout_rp5h01_clock_w(space, 0, 0); +} - // d4-d7: unused? +WRITE8_MEMBER(punchout_state::spunchout_rp5h01_clock_w) +{ + // d0: 74LS74 1D + // 74LS74 1Q -> RP5H01 DATA CLOCK + TEST + m_rp5h01->clock_w(data & 1); + m_rp5h01->test_w(data & 1); } static ADDRESS_MAP_START( spnchout_io_map, AS_IO, 8, punchout_state ) - AM_RANGE(0x07, 0x07) AM_MIRROR(0xf0) AM_MASK(0xf0) AM_READWRITE(spunchout_exp_r, spunchout_exp_w) /* protection ports */ + AM_RANGE(0x05, 0x05) AM_MIRROR(0xf0) AM_WRITE(spunchout_rp5h01_reset_w) + AM_RANGE(0x06, 0x06) AM_MIRROR(0xf0) AM_WRITE(spunchout_rp5h01_clock_w) + AM_RANGE(0x07, 0x07) AM_MIRROR(0xf0) AM_MASK(0xf0) AM_READWRITE(spunchout_exp_r, spunchout_exp_w) // protection ports AM_IMPORT_FROM( punchout_io_map ) ADDRESS_MAP_END diff --git a/src/mame/drivers/r9751.cpp b/src/mame/drivers/r9751.cpp index 5ca1d8d153a..fd93f310e2e 100644 --- a/src/mame/drivers/r9751.cpp +++ b/src/mame/drivers/r9751.cpp @@ -67,6 +67,8 @@ public: DECLARE_READ32_MEMBER(r9751_mmio_5ff_r); DECLARE_WRITE32_MEMBER(r9751_mmio_5ff_w); + DECLARE_READ32_MEMBER(r9751_mmio_ff01_r); + DECLARE_WRITE32_MEMBER(r9751_mmio_ff01_w); DECLARE_READ32_MEMBER(r9751_mmio_ff05_r); DECLARE_WRITE32_MEMBER(r9751_mmio_ff05_w); DECLARE_READ32_MEMBER(r9751_mmio_fff8_r); @@ -90,6 +92,8 @@ private: UINT32 fdd_dest_address; // 5FF080B0 UINT32 fdd_cmd_complete; UINT32 smioc_out_addr; + UINT32 smioc_dma_bank; + UINT32 fdd_dma_bank; attotime timer_32khz_last; // End registers @@ -110,12 +114,16 @@ UINT32 r9751_state::swap_uint32( UINT32 val ) READ8_MEMBER(r9751_state::pdc_dma_r) { - return m_maincpu->space(AS_PROGRAM).read_byte(offset); + /* This callback function takes the value written to 0xFF01000C as the bank offset */ + UINT32 address = (fdd_dma_bank & 0x7FFFF800) + (offset&0xFFFF); + return m_maincpu->space(AS_PROGRAM).read_byte(address); } WRITE8_MEMBER(r9751_state::pdc_dma_w) { - m_maincpu->space(AS_PROGRAM).write_byte(m_pdc->fdd_68k_dma_address,data); + /* This callback function takes the value written to 0xFF01000C as the bank offset */ + UINT32 address = (fdd_dma_bank & 0x7FFFF800) + (data&0xFFFF); + m_maincpu->space(AS_PROGRAM).write_byte(m_pdc->fdd_68k_dma_address,address); } DRIVER_INIT_MEMBER(r9751_state,r9751) @@ -123,9 +131,10 @@ DRIVER_INIT_MEMBER(r9751_state,r9751) reg_ff050004 = 0; reg_fff80040 = 0; fdd_dest_address = 0; -// fdd_scsi_command = 0; fdd_cmd_complete = 0; + fdd_dma_bank = 0; smioc_out_addr = 0; + smioc_dma_bank = 0; m_mem = &m_maincpu->space(AS_PROGRAM); } @@ -147,32 +156,31 @@ void r9751_state::machine_reset() READ32_MEMBER( r9751_state::r9751_mmio_5ff_r ) { UINT32 data; - UINT32 address = offset * 4 + 0x5FF00000; - switch(address) + switch(offset << 2) { /* PDC HDD region (0x24, device 9) */ - case 0x5FF00824: /* HDD Command result code */ + case 0x0824: /* HDD Command result code */ return 0x10; - case 0x5FF03024: /* HDD SCSI command completed successfully */ + case 0x3024: /* HDD SCSI command completed successfully */ data = 0x1; - if(TRACE_HDC) logerror("SCSI HDD command completion status - Read: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + if(TRACE_HDC) logerror("SCSI HDD command completion status - Read: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); return data; /* SMIOC region (0x98, device 26) */ - case 0x5FF00898: /* Serial status or DMA status */ + case 0x0898: /* Serial status or DMA status */ return 0x40; /* PDC FDD region (0xB0, device 44 */ - case 0x5FF008B0: /* FDD Command result code */ + case 0x08B0: /* FDD Command result code */ return 0x10; - case 0x5FF010B0: /* Clear 5FF030B0 ?? */ + case 0x10B0: /* Clear 5FF030B0 ?? */ if(TRACE_FDC) logerror("--- FDD 0x5FF010B0 READ (0)\n"); return 0; - case 0x5FF030B0: /* FDD command completion status */ + case 0x30B0: /* FDD command completion status */ data = (m_pdc->reg_p5 << 8) + m_pdc->reg_p4; - if(TRACE_FDC) logerror("--- SCSI FDD command completion status - Read: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + if(TRACE_FDC) logerror("--- SCSI FDD command completion status - Read: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); return data; default: - if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, 0, mem_mask); + if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000, 0, mem_mask); return 0; } } @@ -180,49 +188,57 @@ READ32_MEMBER( r9751_state::r9751_mmio_5ff_r ) WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w ) { UINT8 data_b0, data_b1; - UINT32 address = offset * 4 + 0x5FF00000; + /* Unknown mask */ + if (mem_mask != 0xFFFFFFFF) + logerror("Mask found: %08X Register: %08X PC: %08X\n", mem_mask, offset << 2 | 0x5FF00000, space.machine().firstcpu->pc()); - switch(address) + switch(offset << 2) { /* PDC HDD region (0x24, device 9 */ - case 0x5FF00224: /* HDD SCSI read command */ - if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + case 0x0224: /* HDD SCSI read command */ + if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); break; - case 0x5FF08024: /* HDD SCSI read command */ - if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + case 0x8024: /* HDD SCSI read command */ + if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); break; - case 0x5FF0C024: /* HDD SCSI read command */ - if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + case 0xC024: /* HDD SCSI read command */ + if(TRACE_HDC) logerror("@@@ HDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); break; /* SMIOC region (0x98, device 26) */ - case 0x5FF04098: /* Serial DMA Command */ + case 0x4098: /* Serial DMA Command */ switch(data) { case 0x4100: /* Send byte to serial */ - if(TRACE_SMIOC) logerror("Serial byte: %02X\n", m_mem->read_dword(smioc_out_addr)); + if(TRACE_SMIOC) logerror("Serial byte: %02X PC: %08X\n", m_mem->read_dword(smioc_out_addr), space.machine().firstcpu->pc()); m_terminal->write(space,0,m_mem->read_dword(smioc_out_addr)); break; default: if(TRACE_SMIOC) logerror("Uknown serial DMA command: %X\n", data); } break; - case 0x5FF0C098: /* Serial DMA output address */ - smioc_out_addr = data * 2; + case 0xC098: /* Serial DMA output address */ + //smioc_out_addr = data * 2; + smioc_out_addr = (smioc_dma_bank & 0x7FFFF800) | ((data&0x3FF)<<1); + if(TRACE_SMIOC) logerror("Serial output address: %08X PC: %08X\n", smioc_out_addr, space.machine().firstcpu->pc()); break; /* PDC FDD region (0xB0, device 44 */ - case 0x5FF001B0: /* FDD SCSI read command */ - if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + case 0x01B0: /* FDD SCSI read command */ + if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); break; - case 0x5FF002B0: /* FDD SCSI read command */ - if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + case 0x02B0: /* FDD SCSI read command */ + if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); break; - case 0x5FF008B0: /* FDD SCSI read command */ - if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + case 0x04B0: /* FDD RESET PDC */ + if(TRACE_FDC) logerror("PDC RESET, PC: %08X\n", space.machine().firstcpu->pc()); + m_pdc->reset(); break; - case 0x5FF041B0: /* Unknown - Probably old style commands */ - if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), address); + case 0x08B0: /* FDD SCSI read command */ + if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); + break; + case 0x41B0: /* Unknown - Probably old style commands */ + if(TRACE_FDC) logerror("--- FDD Command: %08X, From: %08X, Register: %08X\n", data, space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000); - /* Clear FDD Command completion status 0x5FF030B0 (PDC 0x4, 0x5)*/ + /* Clear FDD Command completion status 0x5FF030B0 (PDC 0x4, 0x5) */ m_pdc->reg_p4 = 0; m_pdc->reg_p5 = 0; @@ -233,7 +249,7 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w ) m_pdc->reg_p38 |= 0x2; /* Set bit 1 on port 38 register, PDC polls this port looking for a command */ if(TRACE_FDC) logerror("--- FDD Old Command: %02X and %02X\n", data_b0, data_b1); break; - case 0x5FF080B0: /* fdd_dest_address register */ + case 0x80B0: /* fdd_dest_address register */ fdd_dest_address = data << 1; if(TRACE_FDC) logerror("--- FDD destination address: %08X\n", fdd_dest_address); data_b0 = data & 0xFF; @@ -241,14 +257,14 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w ) m_pdc->reg_p6 = data_b0; m_pdc->reg_p7 = data_b1; break; - case 0x5FF0C0B0: - case 0x5FF0C1B0: /* FDD command address register */ + case 0xC0B0: + case 0xC1B0: /* FDD command address register */ UINT32 fdd_scsi_command; UINT32 fdd_scsi_command2; unsigned char c_fdd_scsi_command[8]; // Array for SCSI command int scsi_lba; // FDD LBA location here, extracted from command - /* Clear FDD Command completion status 0x5FF030B0 (PDC 0x4, 0x5)*/ + /* Clear FDD Command completion status 0x5FF030B0 (PDC 0x4, 0x5) */ m_pdc->reg_p4 = 0; m_pdc->reg_p5 = 0; @@ -281,86 +297,119 @@ WRITE32_MEMBER( r9751_state::r9751_mmio_5ff_w ) break; default: - if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask); + if(TRACE_FDC || TRACE_HDC || TRACE_SMIOC) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0x5FF00000, data, mem_mask); } } /****************************************************************************** - CPU board registers [0xFF050000 - 0xFF06FFFF] + CPU board registers [0xFF010000 - 0xFF06FFFF] ******************************************************************************/ +READ32_MEMBER( r9751_state::r9751_mmio_ff01_r ) +{ + //UINT32 data; + + switch(offset << 2) + { + default: + //return data; + return 0; + } +} + +WRITE32_MEMBER( r9751_state::r9751_mmio_ff01_w ) +{ + /* Unknown mask */ + if (mem_mask != 0xFFFFFFFF) + logerror("Mask found: %08X Register: %08X PC: %08X\n", mem_mask, offset << 2 | 0xFF010000, space.machine().firstcpu->pc()); + + switch(offset << 2) + { + case 0x000C: /* FDD DMA Offset */ + fdd_dma_bank = data; + return; + case 0x0010: /* SMIOC DMA Offset */ + smioc_dma_bank = data; + return; + default: + return; + } +} + READ32_MEMBER( r9751_state::r9751_mmio_ff05_r ) { UINT32 data; - UINT32 address = offset * 4 + 0xFF050000; - switch(address) + switch(offset << 2) { - case 0xFF050004: + case 0x0004: return reg_ff050004; - case 0xFF050300: + case 0x0300: return 0x1B | (1<<0x14); - case 0xFF050320: /* Some type of counter */ + case 0x0320: /* Some type of counter */ return (machine().time() - timer_32khz_last).as_ticks(32768) & 0xFFFF; - case 0xFF050584: + case 0x0584: return 0; - case 0xFF050610: + case 0x0610: return 0xabacabac; - case 0xFF060014: + case 0x0014: return 0x80; default: data = 0; - if(TRACE_CPU_REG) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask); + if(TRACE_CPU_REG) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0xFF050000, data, mem_mask); return data; } } WRITE32_MEMBER( r9751_state::r9751_mmio_ff05_w ) { - UINT32 address = offset * 4 + 0xFF050000; + /* Unknown mask */ + if (mem_mask != 0xFFFFFFFF) + logerror("Mask found: %08X Register: %08X PC: %08X\n", mem_mask, offset << 2 | 0xFF050000, space.machine().firstcpu->pc()); - switch(address) + switch(offset << 2) { - case 0xFF050004: + case 0x0004: reg_ff050004 = data; return; - case 0xFF05000C: /* CPU LED hex display indicator */ + case 0x000C: /* CPU LED hex display indicator */ if(TRACE_LED) logerror("\n*** LED: %02x, Instruction: %08x ***\n\n", data, space.machine().firstcpu->pc()); return; - case 0xFF050320: + case 0x0320: timer_32khz_last = machine().time(); default: - if(TRACE_CPU_REG) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask); + if(TRACE_CPU_REG) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0xFF050000, data, mem_mask); return; } } READ32_MEMBER( r9751_state::r9751_mmio_fff8_r ) { - UINT32 data; - UINT32 address = offset * 4 + 0xFFF80000; + UINT32 data; - switch(address) + switch(offset << 2) { - case 0xFFF80040: + case 0x0040: return reg_fff80040; default: data = 0; - if(TRACE_CPU_REG) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask); + if(TRACE_CPU_REG) logerror("Instruction: %08x READ MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0xFFF80000, data, mem_mask); return data; } } WRITE32_MEMBER( r9751_state::r9751_mmio_fff8_w ) { - UINT32 address = offset * 4 + 0xFFF80000; + /* Unknown mask */ + if (mem_mask != 0xFFFFFFFF) + logerror("Mask found: %08X Register: %08X PC: %08X\n", mem_mask, offset << 2 | 0xFFF80000, space.machine().firstcpu->pc()); - switch(address) + switch(offset << 2) { - case 0xFFF80040: + case 0x0040: reg_fff80040 = data; return; default: - if(TRACE_CPU_REG) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), address, data, mem_mask); + if(TRACE_CPU_REG) logerror("Instruction: %08x WRITE MMIO(%08x): %08x & %08x\n", space.machine().firstcpu->pc(), offset << 2 | 0xFFF80000, data, mem_mask); } } @@ -373,6 +422,7 @@ static ADDRESS_MAP_START(r9751_mem, AS_PROGRAM, 32, r9751_state) AM_RANGE(0x00000000,0x00ffffff) AM_RAM AM_SHARE("main_ram") // 16MB AM_RANGE(0x08000000,0x0800ffff) AM_ROM AM_REGION("prom", 0) AM_RANGE(0x5FF00000,0x5FFFFFFF) AM_READWRITE(r9751_mmio_5ff_r, r9751_mmio_5ff_w) + AM_RANGE(0xFF010000,0xFF01FFFF) AM_READWRITE(r9751_mmio_ff01_r, r9751_mmio_ff01_w) AM_RANGE(0xFF050000,0xFF06FFFF) AM_READWRITE(r9751_mmio_ff05_r, r9751_mmio_ff05_w) AM_RANGE(0xFFF80000,0xFFF8FFFF) AM_READWRITE(r9751_mmio_fff8_r, r9751_mmio_fff8_w) //AM_RANGE(0xffffff00,0xffffffff) AM_RAM // Unknown area diff --git a/src/mame/drivers/rampart.cpp b/src/mame/drivers/rampart.cpp index 523650d5915..9c0827a39bc 100644 --- a/src/mame/drivers/rampart.cpp +++ b/src/mame/drivers/rampart.cpp @@ -105,12 +105,12 @@ WRITE16_MEMBER(rampart_state::latch_w) /* lower byte being modified? */ if (ACCESSING_BITS_0_7) { - set_oki6295_volume((data & 0x0020) ? 100 : 0); + m_oki->set_output_gain(ALL_OUTPUTS, (data & 0x0020) ? 1.0f : 0.0f); if (!(data & 0x0010)) m_oki->reset(); - set_ym2413_volume(((data >> 1) & 7) * 100 / 7); + m_ym2413->set_output_gain(ALL_OUTPUTS, ((data >> 1) & 7) / 7.0f); if (!(data & 0x0001)) - machine().device("ymsnd")->reset(); + m_ym2413->reset(); } } @@ -339,7 +339,7 @@ static MACHINE_CONFIG_START( rampart, rampart_state ) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen) - MCFG_SLAPSTIC_ADD("slapstic") + MCFG_SLAPSTIC_ADD("slapstic", 118) MCFG_MACHINE_RESET_OVERRIDE(rampart_state,rampart) @@ -481,7 +481,7 @@ DRIVER_INIT_MEMBER(rampart_state,rampart) UINT8 *rom = memregion("maincpu")->base(); memcpy(&rom[0x140000], &rom[0x40000], 0x8000); - slapstic_configure(*m_maincpu, 0x140000, 0x438000, 118); + slapstic_configure(*m_maincpu, 0x140000, 0x438000); } diff --git a/src/mame/drivers/relief.cpp b/src/mame/drivers/relief.cpp index b1ba6031cc9..82915064d71 100644 --- a/src/mame/drivers/relief.cpp +++ b/src/mame/drivers/relief.cpp @@ -84,7 +84,7 @@ WRITE16_MEMBER(relief_state::audio_control_w) if (ACCESSING_BITS_0_7) { m_ym2413_volume = (data >> 1) & 15; - set_ym2413_volume((m_ym2413_volume * m_overall_volume * 100) / (127 * 15)); + m_ym2413->set_output_gain(ALL_OUTPUTS, (m_ym2413_volume * m_overall_volume) / (127.0f * 15.0f)); m_adpcm_bank = ((data >> 6) & 3) | (m_adpcm_bank & 4); } if (ACCESSING_BITS_8_15) @@ -99,8 +99,8 @@ WRITE16_MEMBER(relief_state::audio_volume_w) if (ACCESSING_BITS_0_7) { m_overall_volume = data & 127; - set_ym2413_volume((m_ym2413_volume * m_overall_volume * 100) / (127 * 15)); - set_oki6295_volume(m_overall_volume * 100 / 127); + m_ym2413->set_output_gain(ALL_OUTPUTS, (m_ym2413_volume * m_overall_volume) / (127.0f * 15.0f)); + m_oki->set_output_gain(ALL_OUTPUTS, m_overall_volume / 127.0f); } } diff --git a/src/mame/drivers/savquest.cpp b/src/mame/drivers/savquest.cpp index 784278096fa..77cb34fcc37 100644 --- a/src/mame/drivers/savquest.cpp +++ b/src/mame/drivers/savquest.cpp @@ -336,7 +336,7 @@ void savquest_state::vid_3dfx_init() m_pci_3dfx_regs[0x08 / 4] = 2; // revision ID m_pci_3dfx_regs[0x10 / 4] = 0xff000000; m_pci_3dfx_regs[0x40 / 4] = 0x4000; //INITEN_SECONDARY_REV_ID - voodoo_set_init_enable(m_voodoo, 0x4000); //INITEN_SECONDARY_REV_ID + m_voodoo->voodoo_set_init_enable(0x4000); //INITEN_SECONDARY_REV_ID } static UINT32 pci_3dfx_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask) @@ -358,7 +358,7 @@ osd_printf_warning("PCI write: %x %x\n", reg, data); } else if (reg == 0x40) { - voodoo_set_init_enable(state->m_voodoo, data); + state->m_voodoo->voodoo_set_init_enable(data); } else if (reg == 0x54) { diff --git a/src/mame/drivers/sdk86.cpp b/src/mame/drivers/sdk86.cpp index dd341654595..c655c0cd23e 100644 --- a/src/mame/drivers/sdk86.cpp +++ b/src/mame/drivers/sdk86.cpp @@ -208,5 +208,5 @@ ROM_END /* Driver */ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1979, sdk86, 0, 0, sdk86, sdk86, driver_device, 0, "Intel", "SDK-86", MACHINE_NO_SOUND_HW) +/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */ +COMP( 1979, sdk86, 0, 0, sdk86, sdk86, driver_device, 0, "Intel", "SDK-86", MACHINE_NO_SOUND_HW) diff --git a/src/mame/drivers/seattle.cpp b/src/mame/drivers/seattle.cpp index 57295aec2ac..79b56322995 100644 --- a/src/mame/drivers/seattle.cpp +++ b/src/mame/drivers/seattle.cpp @@ -540,7 +540,7 @@ public: UINT32 seattle_state::screen_update_seattle(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; + return m_voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; } @@ -876,7 +876,7 @@ void seattle_state::pci_3dfx_w(address_space &space, UINT8 reg, UINT8 type, UINT break; case 0x10: /* initEnable register */ - voodoo_set_init_enable(m_voodoo, data); + m_voodoo->voodoo_set_init_enable(data); break; } if (LOG_PCI) diff --git a/src/mame/drivers/segac2.cpp b/src/mame/drivers/segac2.cpp index 4c83e1fb618..86eb16efe5f 100644 --- a/src/mame/drivers/segac2.cpp +++ b/src/mame/drivers/segac2.cpp @@ -1962,8 +1962,8 @@ ROM_END ROM_START( potopoto ) /* Poto Poto (c)1994 Sega */ ROM_REGION( 0x200000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "epr-16662.ic32", 0x000000, 0x040000, CRC(bbd305d6) SHA1(1a4f4869fefac188c69bc67df0b625e43a0c3f1f) ) - ROM_LOAD16_BYTE( "epr-16661.ic31", 0x000001, 0x040000, CRC(5a7d14f4) SHA1(a615b5f481256366db7b1c6302a8dcb69708102b) ) + ROM_LOAD16_BYTE( "epr-16662a.ic32", 0x000000, 0x040000, CRC(bbd305d6) SHA1(1a4f4869fefac188c69bc67df0b625e43a0c3f1f) ) + ROM_LOAD16_BYTE( "epr-16661a.ic31", 0x000001, 0x040000, CRC(5a7d14f4) SHA1(a615b5f481256366db7b1c6302a8dcb69708102b) ) ROM_REGION( 0x040000, "upd", 0 ) ROM_LOAD( "epr-16660.ic4", 0x000000, 0x040000, CRC(8251c61c) SHA1(03eef3aa0bdde2c1d93128648f54fd69278d85dd) ) @@ -2506,7 +2506,7 @@ GAME( 1992, wwmarine, 0, segac2, wwmarine, segac2_state, bloxeedc, ROT0, // not really sure how this should hook up, things like the 'sold out' flags could be mechanical sensors, or from another MCU / CPU board in the actual popcorn part of the machine? GAME( 1993, sonicpop, 0, segac2, sonicpop, segac2_state, bloxeedc, ROT0, "Sega", "SegaSonic Popcorn Shop (Rev B)", MACHINE_MECHANICAL ) // region DSW for USA / Export / Japan, still speaks Japanese tho. 'Mechanical' part isn't emulated -GAME( 1994, potopoto, 0, segac2, potopoto, segac2_state, potopoto, ROT0, "Sega", "Poto Poto (Japan)", 0 ) +GAME( 1994, potopoto, 0, segac2, potopoto, segac2_state, potopoto, ROT0, "Sega", "Poto Poto (Japan, Rev A)", 0 ) GAME( 1994, stkclmns, 0, segac2, stkclmns, segac2_state, stkclmns, ROT0, "Sega", "Stack Columns (World)", 0 ) GAME( 1994, stkclmnsj, stkclmns, segac2, stkclmns, segac2_state, stkclmnj, ROT0, "Sega", "Stack Columns (Japan)", 0 ) diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp index aa15bad1857..dfb04f270a3 100644 --- a/src/mame/drivers/segas16b.cpp +++ b/src/mame/drivers/segas16b.cpp @@ -7143,6 +7143,7 @@ ROM_END // Sonic Boom, Sega System 16B // CPU: FD1094 (317-0053) // ROM Board type: 171-5358 +// Sega ID# for ROM board: 834-6532-01 // // Pos. Silk Type Part Pos. Silk Type Part // diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp index 161d87ae25f..3543985a418 100644 --- a/src/mame/drivers/seibuspi.cpp +++ b/src/mame/drivers/seibuspi.cpp @@ -3277,6 +3277,44 @@ ROM_START( rdft2ja ) /* SPI Cart, Japan */ ROM_LOAD("flash0_blank_region01.u1053", 0x000000, 0x100000, CRC(7ae7ab76) SHA1(a2b196f470bf64af94002fc4e2640fadad00418f) ) ROM_END + +ROM_START( rdft2it ) /* SPI Cart, Italy */ + ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program */ + ROM_LOAD32_BYTE("seibu1.bin",0x000000, 0x80000, CRC(501b92a9) SHA1(3e1c5cc63906ec7b97a3478557ec2638c515d726) ) + ROM_LOAD32_BYTE("seibu2.bin",0x000001, 0x80000, CRC(ec73a767) SHA1(83f3905afe49401793c0ea0193cb31d3ba1e1739) ) + ROM_LOAD32_BYTE("seibu3.bin",0x000002, 0x80000, CRC(e66243b2) SHA1(54e67af37a4586fd1afc79085ed433d599e1bb87) ) + ROM_LOAD32_BYTE("seibu4.bin",0x000003, 0x80000, CRC(92b7b73e) SHA1(128649b2a6a0616113bd0f9846fb6cf814ae326d) ) + + ROM_REGION( 0x40000, "audiocpu", ROMREGION_ERASE00 ) /* 256K RAM, ROM from Z80 point-of-view */ + + ROM_REGION( 0x30000, "gfx1", ROMREGION_ERASEFF ) /* text layer roms */ + ROM_LOAD24_BYTE("seibu5.bin", 0x000001, 0x10000, CRC(377cac2f) SHA1(f7c9323d79b77f6c8c02ba2c6cdca127d6e5cb5c) ) + ROM_LOAD24_BYTE("seibu6.bin", 0x000000, 0x10000, CRC(42bd5372) SHA1(c38df85b25070db9640eac541f71c0511bab0c98) ) + ROM_LOAD24_BYTE("seibu7.bin", 0x000002, 0x10000, CRC(1efaac7e) SHA1(8252af56dcb7a6306dc3422070176778e3c511c2) ) + + ROM_REGION( 0xc00000, "gfx2", ROMREGION_ERASEFF ) /* background layer roms */ + ROM_LOAD24_WORD("bg-1d.u0535", 0x000000, 0x400000, CRC(6143f576) SHA1(c034923d0663d9ef24357a03098b8cb81dbab9f8) ) + ROM_LOAD24_BYTE("bg-1p.u0537", 0x000002, 0x200000, CRC(55e64ef7) SHA1(aae991268948d07342ee8ba1b3761bd180aab8ec) ) + ROM_LOAD24_WORD("bg-2d.u0536", 0x600000, 0x400000, CRC(c607a444) SHA1(dc1aa96a42e9394ca6036359670a4ec6f830c96d) ) + ROM_LOAD24_BYTE("bg-2p.u0538", 0x600002, 0x200000, CRC(f0830248) SHA1(6075df96b49e70d2243fef691e096119e7a4d044) ) + + ROM_REGION( 0x1200000, "gfx3", 0 ) /* sprites */ + ROM_LOAD("obj3.u0434", 0x0000000, 0x400000, CRC(e08f42dc) SHA1(5188d71d4355eaf43ea8893b4cfc4fe80cc24f41) ) + ROM_LOAD("obj3b.u0433", 0x0400000, 0x200000, CRC(1b6a523c) SHA1(99a420dbc8e22e7832ccda7cec9fa661a2a2687a) ) + ROM_LOAD("obj2.u0431", 0x0600000, 0x400000, CRC(7aeadd8e) SHA1(47103c0579240c5b1add4d0b164eaf76f5fa97f0) ) + ROM_LOAD("obj2b.u0432", 0x0a00000, 0x200000, CRC(5d790a5d) SHA1(1ed5d4ad4c9a7e505ce35dcc90d184c26ce891dc) ) + ROM_LOAD("obj1.u0429", 0x0c00000, 0x400000, CRC(c2c50f02) SHA1(b81397b5800c6d49f58b7ac7ff6eac56da3c5257) ) + ROM_LOAD("obj1b.u0430", 0x1000000, 0x200000, CRC(5259321f) SHA1(3c70c1147e49f81371d0f60f7108d9718d56faf4) ) + + ROM_REGION32_LE( 0xa00000, "sound01", ROMREGION_ERASE00 ) /* sound roms */ + ROM_LOAD32_WORD("pcm.u0217", 0x000000, 0x100000, CRC(2edc30b5) SHA1(c25d690d633657fc3687636b9070f36bd305ae06) ) + ROM_CONTINUE( 0x400000, 0x100000 ) + ROM_LOAD32_BYTE("seibu8.bin", 0x800000, 0x080000, CRC(b7bd3703) SHA1(6427a7e6de10d6743d6e64b984a1d1c647f5643a) ) + + ROM_REGION( 0x100000, "soundflash1", 0 ) /* on SPI motherboard */ + ROM_LOAD("flash0_blank_region92.u1053", 0x000000, 0x100000, CRC(204d82d0) SHA1(444f4aefa27d8f5d1a2f7f08f826ea84b0ccbd02) ) +ROM_END + ROM_START( rdft2a ) /* SPI Cart, Asia (Metrotainment license); SPI PCB is marked "(C)1997 SXX2C ROM SUB8" */ // The SUB8 board is also capable of having two 23C8100 roms at U0223 and U0219 for PRG instead of the four roms below. ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program, all are 27C040 */ @@ -3848,13 +3886,20 @@ GAME( 1996, rdftauge, rdft, spi, spi_3button, seibuspi_state, rdft, GAME( 1996, rdftit, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Italy)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) GAME( 1996, rdfta, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Austria)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +// this is one revision GAME( 1997, rdft2, 0, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Tuning license)", "Raiden Fighters 2 - Operation Hell Dive (Germany)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) -GAME( 1997, rdft2u, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden Fighters 2 - Operation Hell Dive (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) GAME( 1997, rdft2j, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Japan set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) -GAME( 1997, rdft2ja, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Japan set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) GAME( 1997, rdft2a, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Metrotainment license)", "Raiden Fighters 2 - Operation Hell Dive (Hong Kong)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +// this is another +GAME( 1997, rdft2ja, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Japan set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) GAME( 1997, rdft2aa, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Dream Island license)", "Raiden Fighters 2 - Operation Hell Dive (Korea)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +GAME( 1997, rdft2it, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Italy)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +// these 2 are both unique GAME( 1997, rdft2t, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Taiwan)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +GAME( 1997, rdft2u, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden Fighters 2 - Operation Hell Dive (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) + + + GAME( 1998, rfjet, 0, spi, spi_2button, seibuspi_state, rfjet, ROT270, "Seibu Kaihatsu (Tuning license)", "Raiden Fighters Jet (Germany)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) GAME( 1998, rfjetu, rfjet, spi, spi_2button, seibuspi_state, rfjet, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden Fighters Jet (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/sigmab52.cpp b/src/mame/drivers/sigmab52.cpp index 75299bfd274..38b535774ea 100644 --- a/src/mame/drivers/sigmab52.cpp +++ b/src/mame/drivers/sigmab52.cpp @@ -10,9 +10,10 @@ Games running on this hardware: - * Joker's Wild (B52 system, set 1), 199?, Sigma. - * Joker's Wild (B52 system, set 2), 199?, Sigma. - * Joker's Wild (B52 system, Harrah's GFX), 199?, Sigma. + * Joker's Wild (B52 system, BP55114-V1104, Ver.054NMV), 199?, Sigma. + * Joker's Wild (B52 system, BP55114-V1104, Ver.054NMV, Harrah's GFX), 199?, Sigma. + * Joker's Wild (B52 system, WP02001-054, Ver.031WM), 199?, Sigma. + * Super 8 Ways FC (DB98103-011, Fruit combination), 1989, Sigma. The HD63484 ACRTC support is a bit hacky and incomplete, @@ -618,8 +619,12 @@ MACHINE_CONFIG_END * Rom Load * *************************/ +/* Joker's Wild + BP55114-V1104, Ver.054NMV + Modern cards set. Normal cardsback. +*/ ROM_START( jwildb52 ) - ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_REGION( 0x10000, "maincpu", 0 ) // BP55114-V1104, Ver.054NMV ROM_LOAD( "poker.ic95", 0x00000, 0x10000, CRC(07eb9007) SHA1(ee814c40c6d8c9ea9e5246cae0cfa2c30f2976ed) ) ROM_REGION16_BE( 0x40000, "gfx1", 0 ) @@ -636,44 +641,56 @@ ROM_START( jwildb52 ) ROM_END -ROM_START( jwildb52a ) +/* Joker's Wild + BP55114-V1104, Ver.054NMV + Modern cards set. Harrah's cardsback. +*/ +ROM_START( jwildb52h ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "sigm_wrk.bin", 0x00000, 0x10000, CRC(15c83c6c) SHA1(7a05bd94ea8b1ad051fbe6580a6550d4bb47dd15) ) + ROM_LOAD( "jokers_wild_ver_xxx.ic95", 0x00000, 0x10000, CRC(07eb9007) SHA1(ee814c40c6d8c9ea9e5246cae0cfa2c30f2976ed) ) ROM_REGION16_BE( 0x40000, "gfx1", 0 ) - ROM_LOAD32_BYTE( "c-1416-1.ic45", 0x00003, 0x10000, CRC(02a0b517) SHA1(5a0818a174683f791ca885bfdfd7555616c80758) ) - ROM_LOAD32_BYTE( "c-1416-2.ic46", 0x00001, 0x10000, CRC(3196e486) SHA1(2d264e518083ff05d1a1eb7f8e1649feb70349e7) ) - ROM_LOAD32_BYTE( "c-1416-3.ic47", 0x00000, 0x10000, CRC(1c9a2939) SHA1(e18fdf9a656687db47ac00700e7721c3d8e800c5) ) - ROM_LOAD32_BYTE( "c-1416-4.ic48", 0x00002, 0x10000, CRC(7bd8bf78) SHA1(ddacbb75df14a343e69949dcaa14ce1a7ec8407a) ) - - /* No sound dumps. Using the ones from parent set for now... */ + ROM_LOAD32_BYTE( "2006-1_harrahs.ic45", 0x00003, 0x10000, CRC(6e6871dc) SHA1(5dfc99c808c06ec34838324181988d4550c1ed1a) ) + ROM_LOAD32_BYTE( "2006-2_harrahs.ic46", 0x00001, 0x10000, CRC(1039c62d) SHA1(11f0dbcbbff5f6e9028a0305f7e16a0654be40d4) ) + ROM_LOAD32_BYTE( "2006-3_harrahs.ic47", 0x00000, 0x10000, CRC(d66af95a) SHA1(70bba1aeea9221541b82642045ce8ecf26e1d08c) ) + ROM_LOAD32_BYTE( "2006-4_harrahs.ic48", 0x00002, 0x10000, CRC(2bf196cb) SHA1(686ca0dd84c48f51efee5349ea3db65531dd4a52) ) ROM_REGION( 0x8000, "audiocpu", 0 ) - ROM_LOAD( "sound-01-00.43", 0x0000, 0x8000, BAD_DUMP CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) ) + ROM_LOAD( "poker-01-00.43", 0x0000, 0x8000, CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "mb7118.41", 0x0000, 0x0100, BAD_DUMP CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) ) + ROM_LOAD( "mb7118.41", 0x0000, 0x0100, CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) ) ROM_END -ROM_START( jwildb52h ) +/* Joker's Wild + WP02001-054, Ver.031WM + Classic cards set. Normal cardsback. +*/ +ROM_START( jwildb52a ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "jokers_wild_ver_xxx.ic95", 0x00000, 0x10000, CRC(07eb9007) SHA1(ee814c40c6d8c9ea9e5246cae0cfa2c30f2976ed) ) + ROM_LOAD( "sigm_wrk.bin", 0x00000, 0x10000, CRC(15c83c6c) SHA1(7a05bd94ea8b1ad051fbe6580a6550d4bb47dd15) ) ROM_REGION16_BE( 0x40000, "gfx1", 0 ) - ROM_LOAD32_BYTE( "2006-1_harrahs.ic45", 0x00003, 0x10000, CRC(6e6871dc) SHA1(5dfc99c808c06ec34838324181988d4550c1ed1a) ) - ROM_LOAD32_BYTE( "2006-2_harrahs.ic46", 0x00001, 0x10000, CRC(1039c62d) SHA1(11f0dbcbbff5f6e9028a0305f7e16a0654be40d4) ) - ROM_LOAD32_BYTE( "2006-3_harrahs.ic47", 0x00000, 0x10000, CRC(d66af95a) SHA1(70bba1aeea9221541b82642045ce8ecf26e1d08c) ) - ROM_LOAD32_BYTE( "2006-4_harrahs.ic48", 0x00002, 0x10000, CRC(2bf196cb) SHA1(686ca0dd84c48f51efee5349ea3db65531dd4a52) ) + ROM_LOAD32_BYTE( "c-1416-1.ic45", 0x00003, 0x10000, CRC(02a0b517) SHA1(5a0818a174683f791ca885bfdfd7555616c80758) ) + ROM_LOAD32_BYTE( "c-1416-2.ic46", 0x00001, 0x10000, CRC(3196e486) SHA1(2d264e518083ff05d1a1eb7f8e1649feb70349e7) ) + ROM_LOAD32_BYTE( "c-1416-3.ic47", 0x00000, 0x10000, CRC(1c9a2939) SHA1(e18fdf9a656687db47ac00700e7721c3d8e800c5) ) + ROM_LOAD32_BYTE( "c-1416-4.ic48", 0x00002, 0x10000, CRC(7bd8bf78) SHA1(ddacbb75df14a343e69949dcaa14ce1a7ec8407a) ) + + /* No sound dumps. Using the ones from parent set for now... */ ROM_REGION( 0x8000, "audiocpu", 0 ) - ROM_LOAD( "poker-01-00.43", 0x0000, 0x8000, CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) ) + ROM_LOAD( "sound-01-00.43", 0x0000, 0x8000, BAD_DUMP CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) ) ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "mb7118.41", 0x0000, 0x0100, CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) ) + ROM_LOAD( "mb7118.41", 0x0000, 0x0100, BAD_DUMP CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) ) ROM_END +/* Super 8 Ways FC + Fruit combination. + DB98103-011. +*/ ROM_START( s8waysfc ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "dv98103.011", 0x00000, 0x10000, CRC(416190a1) SHA1(e2738644efc6c2adcea2470b482f3f818ed9af8d) ) @@ -698,7 +715,7 @@ ROM_END * Driver Init * *************************/ -DRIVER_INIT_MEMBER(sigmab52_state,jwildb52) +DRIVER_INIT_MEMBER(sigmab52_state, jwildb52) { } @@ -707,8 +724,8 @@ DRIVER_INIT_MEMBER(sigmab52_state,jwildb52) * Game Drivers * *************************/ -/* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ -GAMEL( 199?, jwildb52, 0, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 1)", MACHINE_NOT_WORKING, layout_sigmab52 ) -GAMEL( 199?, jwildb52a, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 2)", MACHINE_NOT_WORKING, layout_sigmab52 ) -GAMEL( 199?, jwildb52h, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, Harrah's GFX)", MACHINE_NOT_WORKING, layout_sigmab52 ) -GAME ( 199?, s8waysfc, 0, jwildb52, s8waysfc, sigmab52_state, jwildb52, ROT0, "Sigma", "Super 8 Ways FC (Fruit combination)", MACHINE_NOT_WORKING ) +/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ +GAMEL( 199?, jwildb52, 0, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, BP55114-V1104, Ver.054NMV)", MACHINE_NOT_WORKING, layout_sigmab52 ) +GAMEL( 199?, jwildb52h, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, BP55114-V1104, Ver.054NMV, Harrah's GFX)", MACHINE_NOT_WORKING, layout_sigmab52 ) +GAMEL( 199?, jwildb52a, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, WP02001-054, Ver.031WM)", MACHINE_NOT_WORKING, layout_sigmab52 ) +GAME ( 1989, s8waysfc, 0, jwildb52, s8waysfc, sigmab52_state, jwildb52, ROT0, "Sigma", "Super 8 Ways FC (DB98103-011, Fruit combination)", MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/slapfght.cpp b/src/mame/drivers/slapfght.cpp index 98f7578ac71..413cf8651b2 100644 --- a/src/mame/drivers/slapfght.cpp +++ b/src/mame/drivers/slapfght.cpp @@ -1832,72 +1832,166 @@ ROM_START( slapfighb3 ) ROM_LOAD( "sf_col19.bin", 0x0200, 0x0100, CRC(5cbf9fbf) SHA1(abfa58fa4e44ebc56f2e0fac9bcc36164c845fa3) ) ROM_END +/* + +Guardian +1986 Taito Corporation + +The Guardian PCB is exactly the same PCB as Tiger Heli, including the +edge connector pinout. + +PCB Layout +---------- + +Top Board + +Sticker - M6100151B 860010898 +GX-006-A MADE IN JAPAN +|--------------------------------------------------| +|VOL ROM21.12Q 2148 | +|MB3712 2148 | +| ROM19.12P 2148 | +| 2148 | +| ROM20.12M 6264 | +| | +| 6264 | +| | +|2 A68_13.8J A68_12.6J 6264 | +|2 YM2149F | +|W A68_11.8H A68_10.6H 6264 | +|A DSW1 DSW2 | +|Y 2148 | +| YM2149F | +| ROM16.1E| +| | +| A68_03.12D ROM17.1C| +| | +| ROM18.2B | +| Z80A 6116 | +| | +|-----|----------|--------------|----------|-------| + |----------| |----------| +Notes: + YM2149F - Clock 1.500MHz (36/24) + Z80A - Clock 3.000MHz (36/12) + 6116 - 2kx8 SRAM + 6264 - 8kx8 SRAM + MB3712 - Audio Power AMP + 2148 - 1kx4 SRAM + DSW1/2 - 8-position DIP-switch + VSync - 56.91313Hz + HSync - 14.97090kHz + A68_03 - 2764 EPROM + A68_10 to 13 - 27256 EPROM + ROM18 - 82S123 PROM +ROM16/17/19/20/21 - 82S129 PROM + + +Bottom Board + +GX-006-B MADE IN JAPAN +|--------------------------------------------------| +| A68_14.6A | +| | +| ROM14.2C ROM15.8B | +| | +| | +| 6116 A68_05.6F | +| 36MHz | +| 6116 A68_04.6G | +| | +| | +| | +| | +| 6116 | +| A68_02.8K | +| | +| A68_09.4M A47_08.6M X | +| 6116 | +| 6116 A68_07.6N A68_01.8N | +| | +| 6116 A68_06.6P A68_00.8P | +| Z80B | +|-----|----------|--------------|----------|-------| + |----------| |----------| +Notes: + Z80B - Clock 6.000MHz (36/6) + 6116 - 2kx8 SRAM + ROM14/15 - 82S129 PROM + A68_00/01 - 27128 EPROM +A68_02 & 06 to 09 - 27256 EPROM + A68_04/05 - 2764 EPROM + A68_14 - Motorola MC68705P5 Micro-Controller (protected). Clock 3.000MHz [36/12] + X - Unpopulated socket + +*/ + ROM_START( grdian ) ROM_REGION( 0x18000, "maincpu", 0 ) /* Region 0 - main cpu code */ - ROM_LOAD( "a68_00-1", 0x00000, 0x4000, CRC(6a8bdc6c) SHA1(c923bca539bd2eb9a34cb9c7a67a199e28bc081a) ) - ROM_LOAD( "a68_01-1", 0x04000, 0x4000, CRC(ebe8db3c) SHA1(9046d6e63c33fc9cbd48b90dcbcc0badf1d3b9ba) ) - ROM_LOAD( "a68_02-1", 0x10000, 0x8000, CRC(343e8415) SHA1(00b98055277a0ddfb7d0bda6537df10a4049533e) ) + ROM_LOAD( "a68_00-1.8p", 0x00000, 0x4000, CRC(6a8bdc6c) SHA1(c923bca539bd2eb9a34cb9c7a67a199e28bc081a) ) + ROM_LOAD( "a68_01-1.8n", 0x04000, 0x4000, CRC(ebe8db3c) SHA1(9046d6e63c33fc9cbd48b90dcbcc0badf1d3b9ba) ) + ROM_LOAD( "a68_02-1.8k", 0x10000, 0x8000, CRC(343e8415) SHA1(00b98055277a0ddfb7d0bda6537df10a4049533e) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* Region 3 - sound cpu code */ - ROM_LOAD( "a68-03", 0x0000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) ) + ROM_LOAD( "a68-03.12d", 0x0000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) ) ROM_REGION( 0x0800, "mcu", 0 ) /* 2k for the microcontroller */ - ROM_LOAD( "a68_14", 0x0000, 0x0800, NO_DUMP ) + ROM_LOAD( "a68_14.6a", 0x0000, 0x0800, NO_DUMP ) ROM_REGION( 0x04000, "gfx1", 0 ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_05-1", 0x00000, 0x2000, CRC(06f60107) SHA1(c5dcf0c7a5863ea960ee747d2d7ec7ac8bb7d3af) ) /* Chars */ - ROM_LOAD( "a68_04-1", 0x02000, 0x2000, CRC(1fc8f277) SHA1(59dc1a0fad23b1e98abca3d0b1685b9d2939b059) ) + ROM_LOAD( "a68_05-1.6f", 0x00000, 0x2000, CRC(06f60107) SHA1(c5dcf0c7a5863ea960ee747d2d7ec7ac8bb7d3af) ) /* Chars */ + ROM_LOAD( "a68_04-1.6g", 0x02000, 0x2000, CRC(1fc8f277) SHA1(59dc1a0fad23b1e98abca3d0b1685b9d2939b059) ) ROM_REGION( 0x20000, "gfx2", 0 ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_09", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */ - ROM_LOAD( "a68_08", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) ) - ROM_LOAD( "a68_07", 0x10000, 0x8000, CRC(cf1a964c) SHA1(e9223c8d4f3bdafed193a1ded63e377f16f45e17) ) - ROM_LOAD( "a68_06", 0x18000, 0x8000, CRC(05f9eb9a) SHA1(a71640a63b259799086d361ef293aa26cec46a0c) ) + ROM_LOAD( "a68_09.4m", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */ + ROM_LOAD( "a68_08.6m", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) ) + ROM_LOAD( "a68_07.6n", 0x10000, 0x8000, CRC(cf1a964c) SHA1(e9223c8d4f3bdafed193a1ded63e377f16f45e17) ) + ROM_LOAD( "a68_06.6p", 0x18000, 0x8000, CRC(05f9eb9a) SHA1(a71640a63b259799086d361ef293aa26cec46a0c) ) ROM_REGION( 0x20000, "gfx3", 0 ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68-13", 0x00000, 0x8000, CRC(643fb282) SHA1(d904d3c27c2b56341929c5eed4ea97e948c53c34) ) /* Sprites */ - ROM_LOAD( "a68-12", 0x08000, 0x8000, CRC(11f74e32) SHA1(02d8b4cc679f45a02c4989f2b62cde91b7418235) ) - ROM_LOAD( "a68-11", 0x10000, 0x8000, CRC(f24158cf) SHA1(db4c6b68a488b0798ea5f793ac8ced283a8ecab2) ) - ROM_LOAD( "a68-10", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) ) + ROM_LOAD( "a68-13.8j", 0x00000, 0x8000, CRC(643fb282) SHA1(d904d3c27c2b56341929c5eed4ea97e948c53c34) ) /* Sprites */ + ROM_LOAD( "a68-12.6j", 0x08000, 0x8000, CRC(11f74e32) SHA1(02d8b4cc679f45a02c4989f2b62cde91b7418235) ) + ROM_LOAD( "a68-11.8h", 0x10000, 0x8000, CRC(f24158cf) SHA1(db4c6b68a488b0798ea5f793ac8ced283a8ecab2) ) + ROM_LOAD( "a68-10.6h", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) ) ROM_REGION( 0x0300, "proms", 0 ) - ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) - ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) - ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) + ROM_LOAD( "rom21.12q", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) + ROM_LOAD( "rom20.12m", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) + ROM_LOAD( "rom19.12p", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) ROM_END ROM_START( getstarj ) ROM_REGION( 0x18000, "maincpu", 0 ) /* Region 0 - main cpu code */ - ROM_LOAD( "a68_00.bin", 0x00000, 0x4000, CRC(ad1a0143) SHA1(0d9adeb12bd4d5ad11e5bada0cd7498bc565c1db) ) - ROM_LOAD( "a68_01.bin", 0x04000, 0x4000, CRC(3426eb7c) SHA1(e91db45a650a1bfefd7c12c7553b647bc916c7c8) ) - ROM_LOAD( "a68_02.bin", 0x10000, 0x8000, CRC(3567da17) SHA1(29d698606d0bd30abfc3171d79bfad95b0de89fc) ) + ROM_LOAD( "a68_00.8p", 0x00000, 0x4000, CRC(ad1a0143) SHA1(0d9adeb12bd4d5ad11e5bada0cd7498bc565c1db) ) + ROM_LOAD( "a68_01.8n", 0x04000, 0x4000, CRC(3426eb7c) SHA1(e91db45a650a1bfefd7c12c7553b647bc916c7c8) ) + ROM_LOAD( "a68_02.8k", 0x10000, 0x8000, CRC(3567da17) SHA1(29d698606d0bd30abfc3171d79bfad95b0de89fc) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* Region 3 - sound cpu code */ - ROM_LOAD( "a68-03", 0x00000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) ) + ROM_LOAD( "a68-03.12d", 0x00000, 0x2000, CRC(18daa44c) SHA1(1a3d22a186c591321d1b836ee30d89fba4771122) ) ROM_REGION( 0x0800, "mcu", 0 ) /* 2k for the microcontroller */ - ROM_LOAD( "68705.bin", 0x0000, 0x0800, NO_DUMP ) + ROM_LOAD( "68705.6a", 0x0000, 0x0800, NO_DUMP ) ROM_REGION( 0x04000, "gfx1", 0 ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_05.bin", 0x00000, 0x2000, CRC(e3d409e7) SHA1(0b6be4767f110729f4dd1a472ef8d9a0c718b684) ) /* Chars */ - ROM_LOAD( "a68_04.bin", 0x02000, 0x2000, CRC(6e5ac9d4) SHA1(74f90b7a1ceb3b1c2fd92dff100d92dea0155530) ) + ROM_LOAD( "a68_05.6f", 0x00000, 0x2000, CRC(e3d409e7) SHA1(0b6be4767f110729f4dd1a472ef8d9a0c718b684) ) /* Chars */ + ROM_LOAD( "a68_04.6g", 0x02000, 0x2000, CRC(6e5ac9d4) SHA1(74f90b7a1ceb3b1c2fd92dff100d92dea0155530) ) ROM_REGION( 0x20000, "gfx2", 0 ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68_09", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */ - ROM_LOAD( "a68_08", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) ) - ROM_LOAD( "a68_07", 0x10000, 0x8000, CRC(cf1a964c) SHA1(e9223c8d4f3bdafed193a1ded63e377f16f45e17) ) - ROM_LOAD( "a68_06", 0x18000, 0x8000, CRC(05f9eb9a) SHA1(a71640a63b259799086d361ef293aa26cec46a0c) ) + ROM_LOAD( "a68_09.4m", 0x00000, 0x8000, CRC(a293cc2e) SHA1(a2c2598e92982d13b51cbb6efb4b963142233433) ) /* Tiles */ + ROM_LOAD( "a68_08.6m", 0x08000, 0x8000, CRC(37662375) SHA1(46ba8a3f0b553d476ecf431d0d20556896b4ca43) ) + ROM_LOAD( "a68_07.6n", 0x10000, 0x8000, CRC(cf1a964c) SHA1(e9223c8d4f3bdafed193a1ded63e377f16f45e17) ) + ROM_LOAD( "a68_06.6p", 0x18000, 0x8000, CRC(05f9eb9a) SHA1(a71640a63b259799086d361ef293aa26cec46a0c) ) ROM_REGION( 0x20000, "gfx3", 0 ) /* Region 1 - temporary for gfx */ - ROM_LOAD( "a68-13", 0x00000, 0x8000, CRC(643fb282) SHA1(d904d3c27c2b56341929c5eed4ea97e948c53c34) ) /* Sprites */ - ROM_LOAD( "a68-12", 0x08000, 0x8000, CRC(11f74e32) SHA1(02d8b4cc679f45a02c4989f2b62cde91b7418235) ) - ROM_LOAD( "a68-11", 0x10000, 0x8000, CRC(f24158cf) SHA1(db4c6b68a488b0798ea5f793ac8ced283a8ecab2) ) - ROM_LOAD( "a68-10", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) ) + ROM_LOAD( "a68-13.8j", 0x00000, 0x8000, CRC(643fb282) SHA1(d904d3c27c2b56341929c5eed4ea97e948c53c34) ) /* Sprites */ + ROM_LOAD( "a68-12.6j", 0x08000, 0x8000, CRC(11f74e32) SHA1(02d8b4cc679f45a02c4989f2b62cde91b7418235) ) + ROM_LOAD( "a68-11.8h", 0x10000, 0x8000, CRC(f24158cf) SHA1(db4c6b68a488b0798ea5f793ac8ced283a8ecab2) ) + ROM_LOAD( "a68-10.6h", 0x18000, 0x8000, CRC(83161ed0) SHA1(a6aa28f22f487dc3a2ec07935e6d42bcdd1eff81) ) ROM_REGION( 0x0300, "proms", 0 ) - ROM_LOAD( "rom21", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) - ROM_LOAD( "rom20", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) - ROM_LOAD( "rom19", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) + ROM_LOAD( "rom21.12q", 0x0000, 0x0100, CRC(d6360b4d) SHA1(3e64548c82a3378fc091e104cdc2b0c7e592fc44) ) + ROM_LOAD( "rom20.12m", 0x0100, 0x0100, CRC(4ca01887) SHA1(2892c89d5e60f1d10593adffff55c1a9654e8209) ) + ROM_LOAD( "rom19.12p", 0x0200, 0x0100, CRC(513224f0) SHA1(15b34612206138f6fc5f7478925b1fff2ed56aa8) ) ROM_END ROM_START( getstarb1 ) diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp index 0ebc52b1d0a..0e35f023e59 100644 --- a/src/mame/drivers/snk.cpp +++ b/src/mame/drivers/snk.cpp @@ -3841,6 +3841,11 @@ static MACHINE_CONFIG_DERIVED( fitegolf, tnk3 ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( fitegolf2, fitegolf ) + MCFG_SCREEN_MODIFY("screen") + MCFG_SCREEN_UPDATE_DRIVER(snk_state, screen_update_fitegolf2) +MACHINE_CONFIG_END + static MACHINE_CONFIG_START( ikari, snk_state ) @@ -4643,6 +4648,47 @@ ROM_START( fitegolfu ) /* Later US version containing enhancements to make the ROM_LOAD( "pal20l8a.6r", 0x0400, 0x0144, CRC(0f011673) SHA1(383e6f6e78daec9c874d5b48378111ca60f5ed64) ) ROM_END + + + +ROM_START( fitegolf2 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "fg_ver2_6.4e", 0x0000, 0x4000, CRC(4cc9ef0c) SHA1(0ac6071725db3ec85659b170eecec91d22e76abd) ) + ROM_LOAD( "fg_ver2_7.g4", 0x4000, 0x4000, CRC(144b0beb) SHA1(5b5e58ee93cabbdd560487b16d0cc7217d9cea7f) ) + ROM_LOAD( "fg_ver2_8.4h", 0x8000, 0x4000, CRC(057888c9) SHA1(bd412bbd9939358fedf6cc7635b46f737a288e64) ) + + ROM_REGION( 0x10000, "sub", 0 ) + ROM_LOAD( "fg_ver2_3.2e", 0x0000, 0x4000, CRC(cf8c29d7) SHA1(2153ed43ddd1967e3aea7b40415b6cd70fc6ff34) ) + ROM_LOAD( "fg_ver2_4.2g", 0x4000, 0x4000, CRC(90c1fb09) SHA1(13dcb6e9ffb3ed1588225df195c9f6af8a868970) ) + ROM_LOAD( "fg_ver2_5.2h", 0x8000, 0x4000, CRC(0ffbdbb8) SHA1(09e58551a8caf06ba420b6b44f16003b50b2ebc4) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "fg_2.3e", 0x0000, 0x4000, CRC(811b87d7) SHA1(fb387f42085d6e0e5a88729ca0e50656411ce037) ) + ROM_LOAD( "fg_1.2e", 0x4000, 0x8000, CRC(2d998e2b) SHA1(a471cfbb4dabc90fcc29c562620b9965eaff6861) ) + + ROM_REGION( 0x0c00, "proms", 0 ) + ROM_LOAD( "gl1.5f", 0x00000, 0x00400, CRC(6e4c7836) SHA1(3ab3c498939fac992e2bf1c33983ee821a9b6a18) ) + ROM_LOAD( "gl2.5g", 0x00400, 0x00400, CRC(29e7986f) SHA1(85ba8d3443458c27728f633745857a1315dd183f) ) + ROM_LOAD( "gl3.5h", 0x00800, 0x00400, CRC(27ba9ff9) SHA1(f021d10460f40de4447560df5ac47fa53bb57ff9) ) + + ROM_REGION( 0x4000, "tx_tiles", 0 ) + ROM_LOAD( "fg_12.1e", 0x0000, 0x4000, CRC(f1628dcf) SHA1(efea343d3a9dd45ef74947c297e166e34afbb680) ) + + ROM_REGION( 0x8000, "bg_tiles", 0 ) + ROM_LOAD( "fg_14.3d", 0x0000, 0x4000, CRC(29393a19) SHA1(bae5a61c16832dc217c6fd0bd9d54db86cb9692f) ) + ROM_LOAD( "fg_ver2_13.3c", 0x4000, 0x4000, CRC(5cd57c93) SHA1(7f5fb0d9e40b4894f3940373ad09fa4e984b108e) ) + + ROM_REGION( 0x18000, "sp16_tiles", 0 ) + ROM_LOAD( "fg_ver2_11.7h", 0x00000, 0x8000, CRC(d4957ec5) SHA1(8ead7866ba5ac66ead6b707aa868bcae30c486e1) ) + ROM_LOAD( "fg_ver2_10.7g", 0x08000, 0x8000, CRC(b3acdac2) SHA1(7377480d5e1b5ab2c49f5fee2927623ce8240e19) ) + ROM_LOAD( "fg_ver2_9.7e", 0x10000, 0x8000, CRC(b99cf73b) SHA1(23989fc3914e77d364807a9eb96a4ddf75ad7cf1) ) + + ROM_REGION( 0x0600, "plds", 0 ) + ROM_LOAD( "pal16r6a.6c", 0x0000, 0x0104, CRC(de291f4e) SHA1(b50294d30cb8eacc7a9bb8b46695a7463ef45ff1) ) + ROM_LOAD( "pal16l8a.3f", 0x0200, 0x0104, CRC(c5f1c1da) SHA1(e17293be0f77d302c59c1095fe1ec65e45557627) ) + ROM_LOAD( "pal20l8a.6r", 0x0400, 0x0144, CRC(0f011673) SHA1(383e6f6e78daec9c874d5b48378111ca60f5ed64) ) +ROM_END + /***********************************************************************/ /* @@ -6317,6 +6363,7 @@ GAME( 1985, tnk3j, tnk3, tnk3, tnk3, driver_device, 0, ROT GAME( 1986, athena, 0, athena, athena, driver_device, 0, ROT0, "SNK", "Athena", 0 ) GAME( 1988, fitegolf, 0, fitegolf, fitegolf, driver_device, 0, ROT0, "SNK", "Fighting Golf (World?)", 0 ) GAME( 1988, fitegolfu,fitegolf, fitegolf, fitegolfu, driver_device,0, ROT0, "SNK", "Fighting Golf (US)", 0 ) +GAME( 1988, fitegolf2,fitegolf, fitegolf2,fitegolfu, driver_device,0, ROT0, "SNK", "Fighting Golf (US, Ver 2)", 0 ) GAME( 1988, countryc, 0, fitegolf, countryc, snk_state, countryc, ROT0, "SNK", "Country Club", 0 ) GAME( 1986, ikari, 0, ikari, ikari, driver_device, 0, ROT270, "SNK", "Ikari Warriors (US JAMMA)", 0 ) // distributed by Tradewest(?) diff --git a/src/mame/drivers/starwars.cpp b/src/mame/drivers/starwars.cpp index 9fdc3c45be0..986d1c6d671 100644 --- a/src/mame/drivers/starwars.cpp +++ b/src/mame/drivers/starwars.cpp @@ -333,8 +333,6 @@ static MACHINE_CONFIG_START( starwars, starwars_state ) MCFG_CPU_PERIODIC_INT_DRIVER(starwars_state, irq0_line_assert, CLOCK_3KHZ / 12) MCFG_WATCHDOG_TIME_INIT(attotime::from_hz(CLOCK_3KHZ / 128)) - MCFG_SLAPSTIC_ADD("slapstic") - MCFG_CPU_ADD("audiocpu", M6809, MASTER_CLOCK / 8) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -378,6 +376,11 @@ static MACHINE_CONFIG_START( starwars, starwars_state ) MACHINE_CONFIG_END +static MACHINE_CONFIG_DERIVED( esb, starwars ) + MCFG_SLAPSTIC_ADD("slapstic", 101) +MACHINE_CONFIG_END + + /************************************* * @@ -558,7 +561,7 @@ DRIVER_INIT_MEMBER(starwars_state,esb) UINT8 *rom = memregion("maincpu")->base(); /* init the slapstic */ - m_slapstic_device->slapstic_init(machine(), 101); + m_slapstic_device->slapstic_init(); m_slapstic_source = &rom[0x14000]; m_slapstic_base = &rom[0x08000]; @@ -603,4 +606,4 @@ GAME( 1983, starwarso,starwars, starwars, starwars, starwars_state, starwars, RO GAME( 1983, tomcatsw, tomcat, starwars, starwars, starwars_state, starwars, ROT0, "Atari", "TomCat (Star Wars hardware, prototype)", MACHINE_NO_SOUND ) -GAME( 1985, esb, 0, starwars, esb, starwars_state, esb, ROT0, "Atari Games", "The Empire Strikes Back", 0 ) +GAME( 1985, esb, 0, esb, esb, starwars_state, esb, ROT0, "Atari Games", "The Empire Strikes Back", 0 ) diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp index c75d566f39d..1a823eabcc1 100644 --- a/src/mame/drivers/stv.cpp +++ b/src/mame/drivers/stv.cpp @@ -2901,61 +2901,192 @@ ROM_START( pclub2fc ) // set to 1p ROM_END -ROM_START( pclb297w ) // set to 1p +ROM_START( pclub2pf ) // set to 1p STV_BIOS ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ - ROM_LOAD16_WORD_SWAP( "pclb297w_ic22", 0x0200000, 0x0200000, CRC(589f6705) SHA1(d10897ab26c3ecdd518087562207de131133646c) ) // OK - IC7? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic24", 0x0400000, 0x0200000, CRC(4bd706d1) SHA1(e3c52c63bb93d9fa836c300865423a226bf74586) ) // OK - IC2? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic26", 0x0600000, 0x0200000, CRC(417e182a) SHA1(4df04a390523e52e48efcc48891bc54452f351c9) ) // OK - IC2? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic28", 0x0800000, 0x0200000, CRC(73da594e) SHA1(936b0af4a32d5b93847bbf2ecfc8d334290059c0) ) // OK - IC3? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - IC3? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic32", 0x0c00000, 0x0200000, CRC(20437e93) SHA1(dfd2026bec6b2f418cd1cbfa7266717211d013b6) ) // OK - IC4? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic34", 0x0e00000, 0x0200000, CRC(9639b003) SHA1(8f95b024ad19151e1e642d58aa785d14ae3a0661) ) // OK - IC4? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic36", 0x1000000, 0x0200000, CRC(dd1b57b6) SHA1(8450355ec6cdc9718f8579f8702f3900f686c3f8) ) // BAD? - IC5 ?? (will need rom below to pass) - ROM_LOAD16_WORD_SWAP( "pclb297w_ic23", 0x1200000, 0x0200000, NO_DUMP) // IC5 ?? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic25", 0x1400000, 0x0200000, NO_DUMP) // IC6 ?? - ROM_LOAD16_WORD_SWAP( "pclb297w_ic27", 0x1600000, 0x0200000, NO_DUMP) // IC6 ?? + ROM_LOAD16_WORD_SWAP( "pclb2puf.IC22", 0x0200000, 0x0200000, CRC(a14282f2) SHA1(b96e70693d8e71b090e20efdd3aa6228e7289fa4) ) // OK + ROM_LOAD16_WORD_SWAP( "pclb2puf.IC24", 0x0400000, 0x0200000, CRC(4fb4dc74) SHA1(1f174512c9cd5420d7f935cbc6b5875836f6e825) ) // OK + ROM_LOAD16_WORD_SWAP( "pclb2puf.IC26", 0x0600000, 0x0200000, CRC(d20bbfb5) SHA1(5f2768e0e306bd0e3ed9b4e1d234aac8fd7155e6) ) // OK + ROM_LOAD16_WORD_SWAP( "pclb2puf.IC28", 0x0800000, 0x0200000, CRC(da658ae9) SHA1(24293c2b23b3009956fc05df5177a27415754301) ) // OK + ROM_LOAD16_WORD_SWAP( "pclb2puf.IC30", 0x0a00000, 0x0200000, CRC(cafc0e6b) SHA1(fa2ac54260336d5dd1ced7ccaf87115511ece1f8) ) // OK + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "pclub2pf.nv", 0x0000, 0x0080, CRC(447bb3bd) SHA1(9fefec09849bfa0c14b49e73ff13e2a538dff511) ) +ROM_END + +ROM_START( prc297wi ) // set to 1p + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + + ROM_LOAD16_WORD_SWAP( "prc297wi_ic22", 0x0200000, 0x0200000, CRC(589f6705) SHA1(d10897ab26c3ecdd518087562207de131133646c) ) // OK - IC7 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic24", 0x0400000, 0x0200000, CRC(4bd706d1) SHA1(e3c52c63bb93d9fa836c300865423a226bf74586) ) // OK - IC2 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic26", 0x0600000, 0x0200000, CRC(417e182a) SHA1(4df04a390523e52e48efcc48891bc54452f351c9) ) // OK - IC2 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic28", 0x0800000, 0x0200000, CRC(73da594e) SHA1(936b0af4a32d5b93847bbf2ecfc8d334290059c0) ) // OK - IC3 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - IC3 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic32", 0x0c00000, 0x0200000, CRC(20437e93) SHA1(dfd2026bec6b2f418cd1cbfa7266717211d013b6) ) // OK - IC4 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic34", 0x0e00000, 0x0200000, CRC(9639b003) SHA1(8f95b024ad19151e1e642d58aa785d14ae3a0661) ) // OK - IC4 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic36", 0x1000000, 0x0200000, CRC(dd1b57b6) SHA1(8450355ec6cdc9718f8579f8702f3900f686c3f8) ) // OK - IC5 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic23", 0x1200000, 0x0200000, CRC(e3d9d12b) SHA1(28ec3727774ef8a6a241238ad134a5adab8327fd) ) // OK - IC5 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic25", 0x1400000, 0x0200000, CRC(71238374) SHA1(0dc534628a98aba508bdef58f8b812908414ae48) ) // OK - IC6 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic27", 0x1600000, 0x0200000, CRC(7485a9a2) SHA1(17999a5192f185a27c08c2f05e19c65977b8f84e) ) // OK - IC6 + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "eeprom", 0x0000, 0x0080, CRC(9ba58358) SHA1(555ac21321b3051f7083cd72176ddc0fef2d4155) ) +ROM_END + +ROM_START( prc297wia ) // set to 1p + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + + ROM_LOAD16_WORD_SWAP( "pclb297w_ic22_ALT", 0x0200000, 0x0200000, CRC(1feb3bfe) SHA1(cb79908a13e32c3c00e5892d988088a902d6f874) ) // OK - IC7 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic24", 0x0400000, 0x0200000, CRC(4bd706d1) SHA1(e3c52c63bb93d9fa836c300865423a226bf74586) ) // OK - IC2 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic26", 0x0600000, 0x0200000, CRC(417e182a) SHA1(4df04a390523e52e48efcc48891bc54452f351c9) ) // OK - IC2 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic28", 0x0800000, 0x0200000, CRC(73da594e) SHA1(936b0af4a32d5b93847bbf2ecfc8d334290059c0) ) // OK - IC3 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - IC3 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic32", 0x0c00000, 0x0200000, CRC(20437e93) SHA1(dfd2026bec6b2f418cd1cbfa7266717211d013b6) ) // OK - IC4 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic34", 0x0e00000, 0x0200000, CRC(9639b003) SHA1(8f95b024ad19151e1e642d58aa785d14ae3a0661) ) // OK - IC4 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic36", 0x1000000, 0x0200000, CRC(dd1b57b6) SHA1(8450355ec6cdc9718f8579f8702f3900f686c3f8) ) // OK - IC5 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic23", 0x1200000, 0x0200000, CRC(e3d9d12b) SHA1(28ec3727774ef8a6a241238ad134a5adab8327fd) ) // OK - IC5 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic25", 0x1400000, 0x0200000, CRC(71238374) SHA1(0dc534628a98aba508bdef58f8b812908414ae48) ) // OK - IC6 + ROM_LOAD16_WORD_SWAP( "prc297wi_ic27", 0x1600000, 0x0200000, CRC(7485a9a2) SHA1(17999a5192f185a27c08c2f05e19c65977b8f84e) ) // OK - IC6 ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player ROM_LOAD( "eeprom", 0x0000, 0x0080, CRC(9ba58358) SHA1(555ac21321b3051f7083cd72176ddc0fef2d4155) ) ROM_END -ROM_START( pclub298 ) // set to 1p + +ROM_START( prc298sp ) // set to 1p + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + + ROM_LOAD16_WORD_SWAP( "prc298sp_ic22", 0x0200000, 0x0200000, CRC(cb0ec98a) SHA1(efef536cb3bc71207936b26b87f04641baded10b) ) // OK? - tested as IC7? + ROM_LOAD16_WORD_SWAP( "prc298sp_ic24", 0x0400000, 0x0200000, CRC(645e7e24) SHA1(7362b0c4b500639c20ec27002f543a0b4390eaa8) ) // OK - tested as IC2 + ROM_LOAD16_WORD_SWAP( "prc298sp_ic26", 0x0600000, 0x0200000, CRC(9d3ad85d) SHA1(71fe330594ab58be331aa5311472855be07cb44c) ) // OK - tested as IC2 + ROM_LOAD16_WORD_SWAP( "prc298sp_ic28", 0x0800000, 0x0200000, CRC(877e73cc) SHA1(dd9928a3fe0ed759611e1b7be8ea10b45084e392) ) // OK - tested as IC3 + ROM_LOAD16_WORD_SWAP( "prc298sp_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - tested as IC3 + ROM_LOAD16_WORD_SWAP( "prc298sp_ic32", 0x0c00000, 0x0200000, CRC(62c10626) SHA1(58cb0ca0330fa7a62b277ab0ff84bff65b81bb23) ) // OK - tested as IC4 + ROM_LOAD16_WORD_SWAP( "prc298sp_ic34", 0x0e00000, 0x0200000, CRC(8d89877e) SHA1(7d76d48d64d7ac5411d714a4bb83f37e3e5b8df6) ) // 00 fill. OK - tested as IC4 + ROM_LOAD16_WORD_SWAP( "prc298sp_ic36", 0x1000000, 0x0200000, CRC(8d89877e) SHA1(7d76d48d64d7ac5411d714a4bb83f37e3e5b8df6) ) // 00 fill, OK - tested as IC5 + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "prc298sp.nv", 0x0000, 0x0080, CRC(a23dd0f2) SHA1(457282b5d40a17477b95330bba91e05c603f951e) ) +ROM_END + +ROM_START( prc298su ) // set to 1p + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + + ROM_LOAD16_WORD_SWAP( "pclb298s_ic22", 0x0200000, 0x0200000, CRC(9720fe7a) SHA1(5b17eee0bd4574c0b2eb5bb64928d37bd87da23f) ) // OK - tested as IC7 + ROM_LOAD16_WORD_SWAP( "pclb298s_ic24", 0x0400000, 0x0200000, CRC(380496dc) SHA1(60a000cd71553cd23009ffd41b0208153b18d858) ) // OK - tested as IC2 + ROM_LOAD16_WORD_SWAP( "pclb298s_ic26", 0x0600000, 0x0200000, CRC(42622126) SHA1(cc312b1be51e919013ce55d4c1242a90676157e0) ) // OK - tested as IC2 + ROM_LOAD16_WORD_SWAP( "pclb298s_ic28", 0x0800000, 0x0200000, CRC(c03e861a) SHA1(e39e1d040651577d088ce88d354c74e96971efaa) ) // OK - tested as IC3 + ROM_LOAD16_WORD_SWAP( "pclb298s_ic30", 0x0a00000, 0x0200000, CRC(01844b12) SHA1(92d23e54cdfba8c0bdf3d87c52313334e2f903fa) ) // OK - tested as IC3 + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "prc298su.nv", 0x0000, 0x0080, CRC(6b81636a) SHA1(c84de7c374c46f92985186834ab023986e2abbd8) ) +ROM_END + + +ROM_START( pclub26w ) // set to 1p + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + + ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC22", 0x0200000, 0x0200000, CRC(72aa320c) SHA1(09bc30e8cb00a5a4014c44e468cc64f6c3425d92) ) + ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC24", 0x0400000, 0x0200000, CRC(d98371e2) SHA1(813ac5f3c5b57d07cc319c73560bc0719ddcfe6b) ) + ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC26", 0x0600000, 0x0200000, CRC(e6bbe3a5) SHA1(b2f642b8ca0779ad66cfbbadece40f4e3dc41fd1) ) + ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC28", 0x0800000, 0x0200000, CRC(3c330c9b) SHA1(92f8e8d4f43db7c4ce431d17501492a7f8d8a867) ) + ROM_LOAD16_WORD_SWAP( "pclbvol6w_IC30", 0x0a00000, 0x0200000, CRC(67646090) SHA1(ed6402a22acafa0203c587b871edc547f0ec5277) ) + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "pclub26w.nv", 0x0000, 0x0080, CRC(448f770d) SHA1(5f966c511c4c8e9d5b2d257c41c2c88a453b4944) ) +ROM_END + +ROM_START( pclub27s ) // set to 1p + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + + ROM_LOAD16_WORD_SWAP( "pclub2v7.IC22", 0x0200000, 0x0200000, CRC(44c8ab27) SHA1(65e2705b2918da32ea40375707df4e148b311159) ) + ROM_LOAD16_WORD_SWAP( "pclub2v7.IC24", 0x0400000, 0x0200000, CRC(24818437) SHA1(5293d45b53680301abaf0b32a62596aaaa2552d6) ) + ROM_LOAD16_WORD_SWAP( "pclub2v7.IC26", 0x0600000, 0x0200000, CRC(076c1d44) SHA1(d597ed4524bb03eb0ef8ada08d49f3dc0fc8136d) ) + ROM_LOAD16_WORD_SWAP( "pclub2v7.IC28", 0x0800000, 0x0200000, CRC(ff9643ca) SHA1(3309f970f87324b06cc48add386019f769abcd89) ) + ROM_LOAD16_WORD_SWAP( "pclub2v7.IC30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "pclub27s.nv", 0x0000, 0x0080, CRC(e58c7167) SHA1(d88b1648c5d86a90615a8c6a1bf87bc9e75dc320) ) +ROM_END + +ROM_START( pclub2pe ) // set to 1p STV_BIOS ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ - ROM_LOAD16_WORD_SWAP( "pclub298_ic22", 0x0200000, 0x0200000, CRC(cb0ec98a) SHA1(efef536cb3bc71207936b26b87f04641baded10b) ) // OK? - tested as IC7? - ROM_LOAD16_WORD_SWAP( "pclub298_ic24", 0x0400000, 0x0200000, CRC(645e7e24) SHA1(7362b0c4b500639c20ec27002f543a0b4390eaa8) ) // OK - tested as IC2 - ROM_LOAD16_WORD_SWAP( "pclub298_ic26", 0x0600000, 0x0200000, CRC(9d3ad85d) SHA1(71fe330594ab58be331aa5311472855be07cb44c) ) // OK - tested as IC2 - ROM_LOAD16_WORD_SWAP( "pclub298_ic28", 0x0800000, 0x0200000, CRC(877e73cc) SHA1(dd9928a3fe0ed759611e1b7be8ea10b45084e392) ) // OK - tested as IC3 - ROM_LOAD16_WORD_SWAP( "pclub298_ic30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) // OK - tested as IC3 - ROM_LOAD16_WORD_SWAP( "pclub298_ic32", 0x0c00000, 0x0200000, CRC(62c10626) SHA1(58cb0ca0330fa7a62b277ab0ff84bff65b81bb23) ) // OK - tested as IC4 - ROM_LOAD16_WORD_SWAP( "pclub298_ic34", 0x0e00000, 0x0200000, CRC(8d89877e) SHA1(7d76d48d64d7ac5411d714a4bb83f37e3e5b8df6) ) // 00 fill. OK - tested as IC4 - ROM_LOAD16_WORD_SWAP( "pclub298_ic36", 0x1000000, 0x0200000, CRC(8d89877e) SHA1(7d76d48d64d7ac5411d714a4bb83f37e3e5b8df6) ) // 00 fill, OK - tested as IC5 + ROM_LOAD16_WORD_SWAP( "pclb2psi_IC22", 0x0200000, 0x0200000, CRC(caadc660) SHA1(f2e84bee96266bb03d8f9009249c17c27935f82e) ) + ROM_LOAD16_WORD_SWAP( "pclb2psi_IC24", 0x0400000, 0x0200000, CRC(ece82698) SHA1(b17b1ea8adc13c3722067c9854d1b7fdf3917090) ) + ROM_LOAD16_WORD_SWAP( "pclb2psi_IC26", 0x0600000, 0x0200000, CRC(c8a1e335) SHA1(a95ddfc41fdd9f720c11208f45ef5db4bee6cb97) ) + ROM_LOAD16_WORD_SWAP( "pclb2psi_IC28", 0x0800000, 0x0200000, CRC(52f09627) SHA1(e2ffc321bb0f2a650d0c0b39c3ec68226e1ca7f4) ) + ROM_LOAD16_WORD_SWAP( "pclb2psi_IC30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player - ROM_LOAD( "pclub298.nv", 0x0000, 0x0080, CRC(a23dd0f2) SHA1(457282b5d40a17477b95330bba91e05c603f951e) ) + ROM_LOAD( "pclub2pe.nv", 0x0000, 0x0080, CRC(447bb3bd) SHA1(9fefec09849bfa0c14b49e73ff13e2a538dff511)) ROM_END -ROM_START( pclb298a ) // set to 1p +ROM_START( pclub2wb ) // set to 1p STV_BIOS ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ - ROM_LOAD16_WORD_SWAP( "pclb298a_ic22", 0x0200000, 0x0200000, CRC(21a995ce) SHA1(6ee1250becd76bef3aa8044a42e10c3830a609bd) ) // OK - ROM_LOAD16_WORD_SWAP( "pclb298a_ic24", 0x0400000, 0x0200000, CRC(94540f39) SHA1(cee9fff48d177e7502802d366339ed922c212871) ) // OK - ROM_LOAD16_WORD_SWAP( "pclb298a_ic26", 0x0600000, 0x0200000, CRC(8b22c41f) SHA1(371f8b35ed45f695f5ec0c8db2c4b62007bf4782) ) // OK - ROM_LOAD16_WORD_SWAP( "pclb298a_ic28", 0x0800000, 0x0200000, CRC(bf68cec0) SHA1(550138f5110661d69eaff44c0596914a2621c3df) ) // OK - ROM_LOAD16_WORD_SWAP( "pclb298a_ic30", 0x0a00000, 0x0200000, CRC(ae276c06) SHA1(98358860ae9bf7c405ba4f763c7a4bf309ce85e3) ) // OK - ROM_LOAD16_WORD_SWAP( "pclb298a_ic32", 0x0c00000, 0x0200000, CRC(a3fb81f5) SHA1(6c78c97635dd486d2a7c09bc0511267eae6082c4) ) // OK - ROM_LOAD16_WORD_SWAP( "pclb298a_ic34", 0x0e00000, 0x0200000, CRC(04200dc9) SHA1(e40b01d12ccf71e50da7fd0f3000158626e5a98d) ) // OK - ROM_LOAD16_WORD_SWAP( "pclb298a_ic36", 0x1000000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) ) // (blank! - not tested) + ROM_LOAD16_WORD_SWAP( "pclb2wb_IC22", 0x0200000, 0x0200000, CRC(12245be7) SHA1(4d6c2c9ca7fe73a9ec490157cdb01a6228dee7f8) ) + ROM_LOAD16_WORD_SWAP( "pclb2wb_IC24", 0x0400000, 0x0200000, CRC(e5d6e11e) SHA1(4af3c646747f76d99482c985f960df2519a85c23) ) + ROM_LOAD16_WORD_SWAP( "pclb2wb_IC26", 0x0600000, 0x0200000, CRC(7ee066f0) SHA1(a7c725ce8e621ed299474dd215174699e097db3f) ) + ROM_LOAD16_WORD_SWAP( "pclb2wb_IC28", 0x0800000, 0x0200000, CRC(9ed59513) SHA1(c8f5ed13be2a91f83c35a7929aaa5751d7843e6e) ) + ROM_LOAD16_WORD_SWAP( "pclb2wb_IC30", 0x0a00000, 0x0200000, CRC(00a0c702) SHA1(f2c4a7a51559f0ade96b8e6337cd1a1d61472de7) ) ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player - ROM_LOAD( "pclub298a.nv", 0x0000, 0x0080, CRC(b4440ff0) SHA1(bd3c83221ede11c68163df4b52a85856c83f865f) ) + ROM_LOAD( "pclub2wb.nv", 0x0000, 0x0080, CRC(0d442eec) SHA1(54dd544e1496e3999d8111eb06abf805b610d77d) ) +ROM_END + + + +ROM_START( pclubyo2 ) // set to 1p + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + + ROM_LOAD16_WORD_SWAP( "pclbyov2.IC22", 0x0200000, 0x0200000, CRC(719a4d27) SHA1(328dfb8debea02e8660e636e953982d381529945) ) + ROM_LOAD16_WORD_SWAP( "pclbyov2.IC24", 0x0400000, 0x0200000, CRC(790dc7b5) SHA1(829ead39930779617a9bef41d8615362ca86c4c7) ) + ROM_LOAD16_WORD_SWAP( "pclbyov2.IC26", 0x0600000, 0x0200000, CRC(12ae1606) SHA1(9534fb2dbf6fd2c258ba2716783cc5bab8bd8dc0) ) + ROM_LOAD16_WORD_SWAP( "pclbyov2.IC28", 0x0800000, 0x0200000, CRC(ff9643ca) SHA1(3309f970f87324b06cc48add386019f769abcd89) ) + ROM_LOAD16_WORD_SWAP( "pclbyov2.IC30", 0x0a00000, 0x0200000, CRC(03b9eacf) SHA1(d69c10f7613d9f52042dd6cce64e74e2b1ecc2d8) ) + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "pclubyo2.nv", 0x0000, 0x0080, CRC(2b26a8f7) SHA1(32f34096cac05a37c492ee389ed8e4c02694c268) ) +ROM_END + + +ROM_START( prc298au ) // set to 1p + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + + ROM_LOAD16_WORD_SWAP( "prc298au_ic22", 0x0200000, 0x0200000, CRC(21a995ce) SHA1(6ee1250becd76bef3aa8044a42e10c3830a609bd) ) // OK + ROM_LOAD16_WORD_SWAP( "prc298au_ic24", 0x0400000, 0x0200000, CRC(94540f39) SHA1(cee9fff48d177e7502802d366339ed922c212871) ) // OK + ROM_LOAD16_WORD_SWAP( "prc298au_ic26", 0x0600000, 0x0200000, CRC(8b22c41f) SHA1(371f8b35ed45f695f5ec0c8db2c4b62007bf4782) ) // OK + ROM_LOAD16_WORD_SWAP( "prc298au_ic28", 0x0800000, 0x0200000, CRC(bf68cec0) SHA1(550138f5110661d69eaff44c0596914a2621c3df) ) // OK + ROM_LOAD16_WORD_SWAP( "prc298au_ic30", 0x0a00000, 0x0200000, CRC(ae276c06) SHA1(98358860ae9bf7c405ba4f763c7a4bf309ce85e3) ) // OK + ROM_LOAD16_WORD_SWAP( "prc298au_ic32", 0x0c00000, 0x0200000, CRC(a3fb81f5) SHA1(6c78c97635dd486d2a7c09bc0511267eae6082c4) ) // OK + ROM_LOAD16_WORD_SWAP( "prc298au_ic34", 0x0e00000, 0x0200000, CRC(04200dc9) SHA1(e40b01d12ccf71e50da7fd0f3000158626e5a98d) ) // OK + ROM_LOAD16_WORD_SWAP( "prc298au_ic36", 0x1000000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) ) // (blank! - not tested) + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "prc298au.nv", 0x0000, 0x0080, CRC(b4440ff0) SHA1(bd3c83221ede11c68163df4b52a85856c83f865f) ) ROM_END @@ -3058,6 +3189,82 @@ ROM_START( pclb2elk ) // set to 1p ROM_LOAD( "pclb2elk.nv", 0x0000, 0x0080, CRC(54c7564f) SHA1(574dcc5e8fe4aac091fee1476347485ed660eddd) ) ROM_END +ROM_START( pclove ) + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + // note, 'IC2' in service mode (the test of IC24/IC26) fails once you map the protection device because it occupies the same memory address as the rom at IC26 + // there must be a way to enable / disable it. + ROM_LOAD16_WORD_SWAP( "pclbLove.ic22", 0x0200000, 0x0200000, CRC(8cd25a0f) SHA1(c938d5f4f800db019abc2e17cce1e780e93f3d02) ) // OK (tested as IC7) + ROM_LOAD16_WORD_SWAP( "pclbLove.ic24", 0x0400000, 0x0200000, CRC(85583e2c) SHA1(7f407d1bce40317fc10433dafcd82ee41be05839) ) // OK (tested as IC2) + ROM_LOAD16_WORD_SWAP( "pclbLove.ic26", 0x0600000, 0x0200000, CRC(7efcabcc) SHA1(b99a67ab2053c3be5ce37530b65f9693c2a4eef8) ) // OK (tested as IC2) + ROM_LOAD16_WORD_SWAP( "pclbLove.ic28", 0x0800000, 0x0200000, CRC(a1336da7) SHA1(ba26810067a13968a54a8867025b8d8e96384ae7) ) // OK (tested as IC3) + ROM_LOAD16_WORD_SWAP( "pclbLove.ic30", 0x0a00000, 0x0200000, CRC(ec5b5e28) SHA1(89bcddb52c176c86ad4bdb9f4f052be5b75bcd1b) ) // OK (tested as IC3) + ROM_LOAD16_WORD_SWAP( "pclbLove.ic32", 0x0c00000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) ) // FF fill? (not tested either) + + // protection device used to decrypt some startup code + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "pclove.nv", 0x0000, 0x0080, CRC(3c78e3bd) SHA1(6d5fe8545f434b4cc1e8229549adb0a49ac45bd1) ) +ROM_END + +ROM_START( pclove2 ) + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */ + // note, 'IC2' in service mode (the test of IC24/IC26) fails once you map the protection device because it occupies the same memory address as the rom at IC26 + // there must be a way to enable / disable it. + ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(d7d968d6) SHA1(59916a453ba8a53af2138272e359c6d6ce11ea8c) ) // OK (tested as IC7) + ROM_LOAD16_WORD_SWAP( "ic24", 0x0400000, 0x0200000, CRC(9c9b7e57) SHA1(ae834a3648126ec2456d2cc5544f81b6dc2f5825) ) // OK (tested as IC2) + ROM_LOAD16_WORD_SWAP( "ic26", 0x0600000, 0x0200000, CRC(55eb859f) SHA1(4f25536787142f965d688d1758a45885b52ae52e) ) // OK (tested as IC2) + ROM_LOAD16_WORD_SWAP( "ic28", 0x0800000, 0x0200000, CRC(463604a6) SHA1(d8eb41676c750e01870241361ef04c8f22a0c4b4) ) // OK (tested as IC3) + ROM_LOAD16_WORD_SWAP( "ic30", 0x0a00000, 0x0200000, CRC(ec5b5e28) SHA1(89bcddb52c176c86ad4bdb9f4f052be5b75bcd1b) ) // OK (tested as IC3) + ROM_LOAD16_WORD_SWAP( "ic32", 0x0c00000, 0x0200000, CRC(9a4109e5) SHA1(ba59caac5f5a80fc52c507d8a47f322a380aa9a1) ) // FF fill? (not tested either) + + // protection device used to decrypt some startup code + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "pclove2.nv", 0x0000, 0x0080, CRC(93b30600) SHA1(eadba12ec322911823a6873a343e4d9b4089ed93) ) +ROM_END + + +// Name Club / Name Club vol.2 +// have an unusual rom mapping compared to other games, the cartridge is a little different too, with a large PALCE16V8H-10 marked 315-6026 +// For Name Club vol. 2, the protection device (317-0229 on both) is checked in the 'each game test' menu as 'RCDD2' +// For the service mode test the game just passes a large block of compressed data and checksums the result, it doesn't even look like it's +// passing 100% valid data, just an entire section of ROM, checking the result against a pre-calculated checksum. + +// The device is accessed by the game when you choose to print, it looks like it's decompressing the full-size graphics for the printer rather +// than anything you see onscreen. It makes quite extensive use of the device, with lots of different dictionaries, unlike Decathlete where +// there are only 2 that cover all the data. + +ROM_START( nameclub ) + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASEFF ) /* SH2 code */ + ROM_LOAD16_WORD_SWAP( "ic22", 0x0200000, 0x0200000, CRC(ac23c648) SHA1(4dd099a92ff162082eb24a61a277ca907b3f9892) ) // OK + ROM_LOAD16_WORD_SWAP( "ic24", 0x0600000, 0x0200000, CRC(a16902e3) SHA1(85c582cb0d02ef028a8ae32688c20a5b5aeeaae8) ) // OK + ROM_LOAD16_WORD_SWAP( "ic26", 0x0a00000, 0x0200000, CRC(a5eab3f3) SHA1(1b7263639bb8f4aa644cc46133988ef4d2b6c9de) ) // OK + ROM_LOAD16_WORD_SWAP( "ic28", 0x0e00000, 0x0200000, CRC(34ed677a) SHA1(ff2c4dd8fae33ac618f6e3e28ba71c4ecb4ca88f) ) // OK + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "nameclub.nv", 0x0000, 0x0080, CRC(680a64bc) SHA1(45194bbe4a7e67f0e44f858589881967884f63a6) ) +ROM_END + +ROM_START( nclubv2 ) + STV_BIOS + + ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASEFF ) /* SH2 code */ + ROM_LOAD16_WORD_SWAP( "nclubv2.ic22", 0x0200000, 0x0200000, CRC(7e81676d) SHA1(fc0f0dcdb4aaf71218d7c1dd0e4ddc5381e8b13b) ) // OK + ROM_LOAD16_WORD_SWAP( "nclubv2.ic24", 0x0600000, 0x0200000, CRC(1b7637de) SHA1(43c3094f60a6582298a45bad923fef57e98c5b2b) ) // OK + ROM_LOAD16_WORD_SWAP( "nclubv2.ic26", 0x0a00000, 0x0200000, CRC(630be99d) SHA1(ac7fbaae98b126fad5228b0ebffa91a0f0a94516) ) // OK + ROM_LOAD16_WORD_SWAP( "nclubv2.ic28", 0x0e00000, 0x0200000, CRC(1a3ca5e2) SHA1(4d3aed51d29c54e71175d828f648c9feb813ac04) ) // OK + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player + ROM_LOAD( "nclubv2.nv", 0x0000, 0x0080, CRC(96d55fa9) SHA1(b3c821d6cd4ed52d0e20565e12a06d8f81a08dbc) ) +ROM_END + + GAME( 1996, stvbios, 0, stv_slot, stv, stv_state, stv, ROT0, "Sega", "ST-V Bios", MACHINE_IS_BIOS_ROOT ) @@ -3103,7 +3310,6 @@ GAME( 1998, sss, stvbios, stv_5881, stv, stv_state, sss, ROT GAME( 1995, sandor, stvbios, stv, stv, stv_state, sandor, ROT0, "Sega", "Puzzle & Action: Sando-R (J 951114 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1997, thunt, sandor, stv, stv, stv_state, thunt, ROT0, "Sega", "Puzzle & Action: Treasure Hunt (JUET 970901 V2.00E)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1997, thuntk, sandor, stv, stv, stv_state, sandor, ROT0, "Sega / Deniam", "Puzzle & Action: BoMulEul Chajara (JUET 970125 V2.00K)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1998, twcup98, stvbios, stv_5881, stv, stv_state, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1995, smleague, stvbios, stv, stv, stv_state, smleague, ROT0, "Sega", "Super Major League (U 960108 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1995, finlarch, smleague,stv, stv, stv_state, finlarch, ROT0, "Sega", "Final Arch (J 950714 V1.001)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1996, sokyugrt, stvbios, stv, stv, stv_state, sokyugrt, ROT0, "Raizing / Eighting", "Soukyugurentai / Terra Diver (JUET 960821 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) @@ -3114,26 +3320,48 @@ GAME( 1997, winterht, stvbios, stv, stv, stv_state, winterht, ROT GAME( 1997, znpwfv, stvbios, stv, stv, stv_state, znpwfv, ROT0, "Sega", "Zen Nippon Pro-Wrestling Featuring Virtua (J 971123 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) /* Unemulated printer / camera devices */ -GAME( 1998, stress, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Stress Busters (J 981020 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) -GAME( 1997, nclubv3, stvbios, stv, stv, stv_state, nameclv3, ROT0, "Sega", "Name Club Ver.3 (J 970723 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) -GAME( 1997, pclub2, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 (U 970921 V1.000)", MACHINE_NOT_WORKING ) -GAME( 1999, pclub2fc, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Felix The Cat (Rev. A) (J 970415 V1.100)", MACHINE_NOT_WORKING ) -GAME( 1997, pclb297w, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '97 Winter Ver (J 971017 V1.100)", MACHINE_NOT_WORKING ) -GAME( 1997, pclub298, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Spring Ver (J 971017 V1.100)", MACHINE_NOT_WORKING ) -GAME( 1998, pclb298a, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Autumn Ver (J 980827 V1.000)", MACHINE_NOT_WORKING ) +// USA sets +GAME( 1997, pclub2, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 (U 970921 V1.000)", MACHINE_NOT_WORKING ) +GAME( 1999, pclub2v3, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 3 (U 990310 V1.000)", MACHINE_NOT_WORKING ) // Hello Kitty themed +GAME( 1999, pclubpok, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Pokemon B (U 991126 V1.000)", MACHINE_NOT_WORKING ) +// Japan sets +GAME( 1999, pclub2fc, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Felix The Cat (Rev. A) (J 970415 V1.100)", MACHINE_NOT_WORKING ) +GAME( 1998, pclub2pf, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Puffy (Japan)", MACHINE_NOT_WORKING ) // version info is blank +GAME( 1997, pclb2elk, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Earth Limited Kobe (Print Club Custom) (J 970808 V1.000)", MACHINE_NOT_WORKING ) +GAME( 1997, pclub2pe, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Pepsiman (J 970618 V1.100)", MACHINE_NOT_WORKING ) +GAME( 1997, pclub2wb, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Warner Bros (J 970228 V1.000)", MACHINE_NOT_WORKING ) + +GAME( 1997, pclub26w, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 6 Winter (J 961210 V1.000)", MACHINE_NOT_WORKING ) // internal string is 'PURIKURA2 97FUYU' (but in reality it seems to be an end of 96 Winter version) +GAME( 1997, pclub27s, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 7 Spring (J 970313 V1.100)", MACHINE_NOT_WORKING ) +// Summer 97? +// Autumn 97? +GAME( 1997, prc297wi, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '97 Winter Ver (J 971017 V1.100, set 1)", MACHINE_NOT_WORKING ) // internal string is '97WINTER' +GAME( 1997, prc297wia, prc297wi,stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '97 Winter Ver (J 971017 V1.100, set 2)", MACHINE_NOT_WORKING ) // different program revision, same date code, clearly didn't get updated properly +GAME( 1998, prc298sp, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Spring Ver (J 971017 V1.100)", MACHINE_NOT_WORKING ) // again, dat doesn't appear to have bene updated, this should be early 98 +GAME( 1998, prc298su, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Summer Ver (J 980603 V1.100)", MACHINE_NOT_WORKING ) // again, dat doesn't appear to have bene updated, this should be early 98 +GAME( 1998, prc298au, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 '98 Autumn Ver (J 980827 V1.000)", MACHINE_NOT_WORKING ) + GAME( 1999, pclubor, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Goukakenran (J 991104 V1.000)", MACHINE_NOT_WORKING ) GAME( 1999, pclubol, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Olive (J 980717 V1.000)", MACHINE_NOT_WORKING ) -GAME( 1999, pclub2v3, pclub2, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Vol. 3 (U 990310 V1.000)", MACHINE_NOT_WORKING ) -GAME( 1999, pclubpok, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Pokemon B (U 991126 V1.000)", MACHINE_NOT_WORKING ) GAME( 1997, pclub2kc, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Kome Kome Club (J 970203 V1.000)", MACHINE_NOT_WORKING ) -GAME( 1997, pclb2elk, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club 2 Earth Limited Kobe (Print Club Custom) (J 970808 V1.000)", MACHINE_NOT_WORKING ) +GAME( 1997, pclubyo2, stvbios, stv, stv, stv_state, stv, ROT0, "Atlus", "Print Club Yoshimoto V2 (J 970422 V1.100)", MACHINE_NOT_WORKING ) + +GAME( 1997, pclove, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Atlus", "Print Club LoveLove (J 970421 V1.000)", MACHINE_NOT_WORKING ) // uses the same type of protection as decathlete!! +GAME( 1997, pclove2, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Atlus", "Print Club LoveLove Ver 2 (J 970825 V1.000)", MACHINE_NOT_WORKING ) // ^ + +GAME( 1998, stress, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Stress Busters (J 981020 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) + +GAME( 1996, nameclub, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Sega", "Name Club (J 960315 V1.000)", MACHINE_NOT_WORKING ) // uses the same type of protection as decathlete!! +GAME( 1996, nclubv2, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Sega", "Name Club Ver.2 (J 960315 V1.000)", MACHINE_NOT_WORKING ) // ^ (has the same datecode as nameclub, probably incorrect unless both were released today) +GAME( 1997, nclubv3, stvbios, stv, stv, stv_state, nameclv3, ROT0, "Sega", "Name Club Ver.3 (J 970723 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // no protection + /* Doing something.. but not enough yet */ GAME( 1995, vfremix, stvbios, stv, stv, stv_state, vfremix, ROT0, "Sega", "Virtua Fighter Remix (JUETBKAL 950428 V1.000)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) GAME( 1996, decathlt, stvbios, stv_5838, stv, stv_state, decathlt, ROT0, "Sega", "Decathlete (JUET 960709 V1.001)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) GAME( 1996, decathlto, decathlt,stv_5838, stv, stv_state, decathlt, ROT0, "Sega", "Decathlete (JUET 960424 V1.000)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) - +GAME( 1998, twcup98, stvbios, stv_5881, stv, stv_state, twcup98, ROT0, "Tecmo", "Tecmo World Cup '98 (JUET 980410 V1.000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // some situations with the GK result in the game stalling, maybe CPU core bug?? /* Gives I/O errors */ GAME( 1996, magzun, stvbios, stv, stv, stv_state, magzun, ROT0, "Sega", "Magical Zunou Power (J 961031 V1.000)", MACHINE_NOT_WORKING ) GAME( 1997, techbowl, stvbios, stv, stv, stv_state, stv, ROT0, "Sega", "Technical Bowling (J 971212 V1.000)", MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/suna16.cpp b/src/mame/drivers/suna16.cpp index e2d375bc148..f33d0142f62 100644 --- a/src/mame/drivers/suna16.cpp +++ b/src/mame/drivers/suna16.cpp @@ -1021,7 +1021,7 @@ static MACHINE_CONFIG_START( bestbest, suna16_state ) MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) MCFG_SOUND_ADD("ymsnd", YM3526, XTAL_24MHz/8) /* 3MHz */ - MCFG_YM3526_IRQ_HANDLER(DEVWRITELINE("audiocpu", z80_device, irq_line)) + MCFG_YM3526_IRQ_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_IRQ0)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) diff --git a/src/mame/drivers/super6.cpp b/src/mame/drivers/super6.cpp index 599aadbcdf5..838db3e3b20 100644 --- a/src/mame/drivers/super6.cpp +++ b/src/mame/drivers/super6.cpp @@ -193,7 +193,7 @@ READ8_MEMBER( super6_state::fdc_r ) // don't crash please... but it's true, WAIT does nothing in our Z80 //fatalerror("Z80 WAIT not supported by MAME core\n"); - m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE); return !m_fdc->intrq_r() << 7; } @@ -409,14 +409,14 @@ SLOT_INTERFACE_END WRITE_LINE_MEMBER( super6_state::fdc_intrq_w ) { - if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE); + if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, CLEAR_LINE); m_ctc->trg3(!state); } WRITE_LINE_MEMBER( super6_state::fdc_drq_w ) { - if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE); + if (state) m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, CLEAR_LINE); m_dma->rdy_w(state); } diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp index 1d33d59194a..17d62e4f18e 100644 --- a/src/mame/drivers/taito_f3.cpp +++ b/src/mame/drivers/taito_f3.cpp @@ -678,15 +678,15 @@ ROM_START( arabianm ) ROM_LOAD16_BYTE("d29-02.ic18", 0x600000, 0x100000, CRC(ed894fe1) SHA1(5bf2fb6abdcf25bc525a2c3b29dbf7aca0b18fea) ) // -std- ROM_REGION( 0x1200, "plds", 0 ) - ROM_LOAD( "palce20v8h.1", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) /* D29-11 */ - ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */ - ROM_LOAD( "palce20v8h.3", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) /* D29-13 */ - ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */ - ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */ - ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */ - ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */ - ROM_LOAD( "palce20v8h.69", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) /* D29-14 */ - ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */ + ROM_LOAD( "D29-11.IC15.bin", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) // palce20v8h.1 + ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */ + ROM_LOAD( "D29-13.IC14.bin", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) // palce20v8h.3 + ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */ + ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */ + ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */ + ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */ + ROM_LOAD( "D29-14.IC28.bin", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) // palce20v8h.69 + ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */ ROM_END ROM_START( arabianmj ) @@ -718,15 +718,15 @@ ROM_START( arabianmj ) ROM_LOAD16_BYTE("d29-02.ic18", 0x600000, 0x100000, CRC(ed894fe1) SHA1(5bf2fb6abdcf25bc525a2c3b29dbf7aca0b18fea) ) // -std- ROM_REGION( 0x1200, "plds", 0 ) - ROM_LOAD( "palce20v8h.1", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) /* D29-11 */ - ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */ - ROM_LOAD( "palce20v8h.3", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) /* D29-13 */ - ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */ - ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */ - ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */ - ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */ - ROM_LOAD( "palce20v8h.69", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) /* D29-14 */ - ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */ + ROM_LOAD( "D29-11.IC15.bin", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) // palce20v8h.1 + ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */ + ROM_LOAD( "D29-13.IC14.bin", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) // palce20v8h.3 + ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */ + ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */ + ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */ + ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */ + ROM_LOAD( "D29-14.IC28.bin", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) // palce20v8h.69 + ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */ ROM_END ROM_START( arabianmu ) @@ -758,15 +758,15 @@ ROM_START( arabianmu ) ROM_LOAD16_BYTE("d29-02.ic18", 0x600000, 0x100000, CRC(ed894fe1) SHA1(5bf2fb6abdcf25bc525a2c3b29dbf7aca0b18fea) ) // -std- ROM_REGION( 0x1200, "plds", 0 ) - ROM_LOAD( "palce20v8h.1", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) /* D29-11 */ - ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */ - ROM_LOAD( "palce20v8h.3", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) /* D29-13 */ - ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */ - ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */ - ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */ - ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */ - ROM_LOAD( "palce20v8h.69", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) /* D29-14 */ - ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */ + ROM_LOAD( "D29-11.IC15.bin", 0x0000, 0x0157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) // palce20v8h.1 + ROM_LOAD( "pal20l8b.2", 0x0200, 0x0144, CRC(c91437e2) SHA1(5bd6fb57fd7e0ff957a6ef9509b8f2e35a8ca29a) ) /* D29-12 */ + ROM_LOAD( "D29-13.IC14.bin", 0x0400, 0x0157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) // palce20v8h.3 + ROM_LOAD( "palce16v8h.11", 0x0600, 0x0117, CRC(51088324) SHA1(b985835b92c9d1e1dae6ae7cba9fa83c4db58bbb) ) /* D29-16 */ + ROM_LOAD( "pal16l8b.22", 0x0800, 0x0104, CRC(3e01e854) SHA1(72f48982673ac8337dac3358b7a79e45c60b9601) ) /* D29-09 */ + ROM_LOAD( "palce16v8h.31", 0x0a00, 0x0117, CRC(e0789727) SHA1(74add02cd194741de5ca6e36a99f9dd3e756fbdf) ) /* D29-17 */ + ROM_LOAD( "pal16l8b.62", 0x0c00, 0x0104, CRC(7093e2f3) SHA1(62bb0085ed93cc8a5fb3a1b08ce9c8071ebda657) ) /* D29-10 */ + ROM_LOAD( "D29-14.IC28.bin", 0x0e00, 0x0157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) // palce20v8h.69 + ROM_LOAD( "pal20l8b.70", 0x1000, 0x0144, CRC(92b5b97c) SHA1(653ab0467f71d93eceb8143b124cdedaf1ede750) ) /* D29-15 */ ROM_END ROM_START( ridingf ) @@ -1068,8 +1068,24 @@ ROM_START( hthero93u ) ROM_LOAD16_BYTE("d49-04.38", 0x000000, 0x200000, CRC(44b365a9) SHA1(14c4a6b193a0069360406c74c500ba24f2a55b62) ) // C8 C9 CA CB // half empty ROM_LOAD16_BYTE("d49-05.41", 0x600000, 0x100000, CRC(ed894fe1) SHA1(5bf2fb6abdcf25bc525a2c3b29dbf7aca0b18fea) ) // -std- + + ROM_REGION(0x800000, "palsgame" , ROMREGION_ERASE00 ) // all unprotected / unlocked (dumped from single PCB version of game) + ROM_LOAD ("D49-12.IC60.bin", 0x000, 0x104, CRC(aa4cff37) SHA1(58e67e3807a32c403b1ef145d4bc5f91e1537554) ) + ROM_LOAD ("D49-21.IC17.bin", 0x000, 0x104, CRC(821775d4) SHA1(f066cf6ee2118dd57c904fcff3bb287d57e16367) ) + + ROM_REGION(0x800000, "palsbase" , ROMREGION_ERASE00 ) // all unprotected / unlocked (dumped from single PCB version of game) + // these should be the same on this and Arabian Magic, but the dumps don't match in all cases, maybe the AM ones were protected? + ROM_LOAD ("D29-11.IC15.bin", 0x000000, 0x157, CRC(5dd5c8f9) SHA1(5e6153d9e08985b2326dfd6d73f7b90136a7a4b1) ) + ROM_LOAD ("D29-12.IC12.bin", 0x000000, 0x144, CRC(c872f1fd) SHA1(6bcf766f76d83c18fa1c095716a1298581aa06c2) ) + ROM_LOAD ("D29-13.IC14.bin", 0x000000, 0x157, CRC(74d61d36) SHA1(c34d8b2d227f69c167d1516dea53e4bcb76491d1) ) + ROM_LOAD ("D29-14.IC28.bin", 0x000000, 0x157, CRC(25d205d5) SHA1(8859fd498e4d84a55424899d23db470be217eaba) ) + ROM_LOAD ("D29-15.IC29.bin", 0x000000, 0x157, CRC(692eb582) SHA1(db40eb294cecc65d4a0d65e75b6daef75dcc2fb7) ) + ROM_LOAD ("D29-16.IC7.bin", 0x000000, 0x117, CRC(11875f52) SHA1(2c3a7a15b3184421ca1bc88383eeccf49ee0d22c) ) + ROM_LOAD ("D29-17.IC16.bin", 0x000000, 0x117, CRC(a0f74b51) SHA1(9d19e9099be965152a3cfbc5593e6abedb7c9d71) ) + ROM_END + ROM_START( trstar ) ROM_REGION(0x200000, "maincpu", 0) /* 68020 code */ ROM_LOAD32_BYTE("d53-15-1.24", 0x000000, 0x40000, CRC(098bba94) SHA1(b77990213ac790d15bdc0dc1e8f7adf04fe5e952) ) diff --git a/src/mame/drivers/tb303.cpp b/src/mame/drivers/tb303.cpp index e0f4e4798c9..41b5f648a02 100644 --- a/src/mame/drivers/tb303.cpp +++ b/src/mame/drivers/tb303.cpp @@ -23,12 +23,9 @@ class tb303_state : public hh_ucom4_state { public: tb303_state(const machine_config &mconfig, device_type type, const char *tag) - : hh_ucom4_state(mconfig, type, tag), - m_tp3_off_timer(*this, "tp3_off") + : hh_ucom4_state(mconfig, type, tag) { } - required_device<timer_device> m_tp3_off_timer; - UINT8 m_ram[0xc00]; UINT16 m_ram_address; bool m_ram_ce; @@ -43,37 +40,18 @@ public: DECLARE_READ8_MEMBER(input_r); void update_leds(); - TIMER_DEVICE_CALLBACK_MEMBER(tp3_clock); - TIMER_DEVICE_CALLBACK_MEMBER(tp3_off); + TIMER_DEVICE_CALLBACK_MEMBER(tp3_clock) { m_maincpu->set_input_line(0, ASSERT_LINE); } + TIMER_DEVICE_CALLBACK_MEMBER(tp3_clear) { m_maincpu->set_input_line(0, CLEAR_LINE); } virtual void machine_start() override; }; - -/*************************************************************************** - - Timer/Interrupt - -***************************************************************************/ - // TP2 to MCU CLK: LC circuit(TI S74230), stable sine wave, 2.2us interval -#define TP2_CLOCK_HZ 454545 /* in hz */ +#define TP2_HZ 454545 // TP3 to MCU _INT: square wave, 1.8ms interval, short duty cycle -#define TP3_CLOCK attotime::from_usec(1800) -#define TP3_OFF (TP3_CLOCK / 8) - -TIMER_DEVICE_CALLBACK_MEMBER(tb303_state::tp3_off) -{ - m_maincpu->set_input_line(0, CLEAR_LINE); -} - -TIMER_DEVICE_CALLBACK_MEMBER(tb303_state::tp3_clock) -{ - m_maincpu->set_input_line(0, ASSERT_LINE); - m_tp3_off_timer->adjust(TP3_OFF); -} - +#define TP3_PERIOD attotime::from_usec(1800) +#define TP3_LOW (TP3_PERIOD / 8) /*************************************************************************** @@ -270,7 +248,7 @@ void tb303_state::machine_start() static MACHINE_CONFIG_START( tb303, tb303_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", NEC_D650, TP2_CLOCK_HZ) + MCFG_CPU_ADD("maincpu", NEC_D650, TP2_HZ) MCFG_UCOM4_READ_A_CB(READ8(tb303_state, input_r)) MCFG_UCOM4_READ_B_CB(READ8(tb303_state, input_r)) MCFG_UCOM4_READ_C_CB(READ8(tb303_state, ram_r)) @@ -282,9 +260,9 @@ static MACHINE_CONFIG_START( tb303, tb303_state ) MCFG_UCOM4_WRITE_H_CB(WRITE8(tb303_state, switch_w)) MCFG_UCOM4_WRITE_I_CB(WRITE8(tb303_state, strobe_w)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clock", tb303_state, tp3_clock, TP3_CLOCK) - MCFG_TIMER_START_DELAY(TP3_CLOCK) - MCFG_TIMER_DRIVER_ADD("tp3_off", tb303_state, tp3_off) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clock", tb303_state, tp3_clock, TP3_PERIOD) + MCFG_TIMER_START_DELAY(TP3_PERIOD - TP3_LOW) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clear", tb303_state, tp3_clear, TP3_PERIOD) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_tb303) diff --git a/src/mame/drivers/ticalc1x.cpp b/src/mame/drivers/ticalc1x.cpp index dcdea37827c..74d97ffeffb 100644 --- a/src/mame/drivers/ticalc1x.cpp +++ b/src/mame/drivers/ticalc1x.cpp @@ -35,19 +35,9 @@ public: ticalc1x_state(const machine_config &mconfig, device_type type, const char *tag) : hh_tms1k_state(mconfig, type, tag) { } - -protected: - virtual void machine_start() override; }; -void ticalc1x_state::machine_start() -{ - hh_tms1k_state::machine_start(); - memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // ! -} - - /*************************************************************************** @@ -85,21 +75,18 @@ public: void tisr16_state::prepare_display() { // update leds state - for (int y = 0; y < 11; y++) - m_display_state[y] = (m_r >> y & 1) ? m_o : 0; + set_display_segmask(0xfff, 0xff); + display_matrix(8, 12, m_o, m_r, false); // exponent sign is from R10 O1, and R10 itself only uses segment G m_display_state[11] = m_display_state[10] << 5 & 0x40; m_display_state[10] &= 0x40; - - set_display_size(8, 12); display_update(); } WRITE16_MEMBER(tisr16_state::write_r) { - // R0-R10: input mux - // R0-R10: select digit (right-to-left) + // R0-R10: input mux, select digit m_r = m_inp_mux = data; prepare_display(); } @@ -259,7 +246,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( tisr16, tisr16_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS1000, 300000) // RC osc. R=43K, C=68pf -> ~300kHz (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf -> also ~300kHz) + MCFG_CPU_ADD("maincpu", TMS1000, 300000) // approximation - RC osc. R=43K, C=68pf (note: tisr16ii MCU RC osc. is different: R=30K, C=100pf, same freq) MCFG_TMS1XXX_READ_K_CB(READ8(tisr16_state, read_k)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tisr16_state, write_o)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tisr16_state, write_r)) @@ -315,11 +302,10 @@ public: WRITE16_MEMBER(ti1250_state::write_r) { - // R8 only has segment G connected - m_display_segmask[8] = 0x40; - - // R0-R7(,R8): select digit (right-to-left) - display_matrix_seg(8, 9, m_o, data, 0xff); + // R0-R8: select digit + set_display_segmask(0xff, 0xff); + set_display_segmask(0x100, 0x40); // R8 only has segment G connected + display_matrix(8, 9, m_o, data); } WRITE16_MEMBER(ti1250_state::write_o) @@ -398,7 +384,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( ti1250, ti1250_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", TMS0950, 200000) // RC osc. R=68K, C=68pf -> ~200kHz + MCFG_CPU_ADD("maincpu", TMS0950, 200000) // approximation - RC osc. R=68K, C=68pf MCFG_TMS1XXX_READ_K_CB(READ8(ti1250_state, read_k)) MCFG_TMS1XXX_WRITE_O_CB(WRITE16(ti1250_state, write_o)) MCFG_TMS1XXX_WRITE_R_CB(WRITE16(ti1250_state, write_r)) @@ -451,9 +437,9 @@ public: WRITE16_MEMBER(ti1000_state::write_r) { - // R0-R7: select digit (right-to-left) - UINT8 o = BITSWAP8(m_o,7,4,3,2,1,0,6,5); - display_matrix_seg(8, 8, o, data, 0xff); + // R0-R7: select digit + set_display_segmask(0xff, 0xff); + display_matrix(8, 8, m_o, data); } WRITE16_MEMBER(ti1000_state::write_o) @@ -461,7 +447,7 @@ WRITE16_MEMBER(ti1000_state::write_o) // O0-O3,O5(?): input mux // O0-O7: digit segments m_inp_mux = (data & 0xf) | (data >> 1 & 0x10); - m_o = data; + m_o = BITSWAP8(data,7,4,3,2,1,0,6,5); } READ8_MEMBER(ti1000_state::read_k) @@ -555,10 +541,11 @@ WRITE16_MEMBER(wizatron_state::write_r) // 3rd digit only has A and G for =, though some newer hardware revisions // (goes for both wizatron and lilprof) use a custom equals-sign digit here - m_display_segmask[3] = 0x41; + set_display_segmask(8, 0x41); - // R0-R8: select digit (right-to-left) - display_matrix_seg(7, 9, m_o, data, 0x7f); + // R0-R8: select digit + set_display_segmask(0x1ff^8, 0x7f); + display_matrix(7, 9, m_o, data); } WRITE16_MEMBER(wizatron_state::write_o) @@ -725,19 +712,16 @@ public: WRITE16_MEMBER(lilprof78_state::write_r) { // update leds state - UINT8 o = BITSWAP8(m_o,7,4,3,2,1,0,6,5) & 0x7f; + UINT8 seg = BITSWAP8(m_o,7,4,3,2,1,0,6,5) & 0x7f; UINT16 r = (data & 7) | (data << 1 & 0x1f0); - - for (int y = 0; y < 9; y++) - m_display_state[y] = (r >> y & 1) ? o : 0; - + set_display_segmask(0x1ff, 0x7f); + display_matrix(7, 9, seg, r, false); + // 3rd digit A/G(equals sign) is from O7 - m_display_state[3] = (r && m_o & 0x80) ? 0x41 : 0; + m_display_state[3] = (r != 0 && m_o & 0x80) ? 0x41 : 0; // 6th digit is a custom 7seg for math symbols (see wizatron_state write_r) m_display_state[6] = BITSWAP8(m_display_state[6],7,6,1,4,2,3,5,0); - - set_display_size(7, 9); display_update(); } @@ -836,7 +820,8 @@ public: void dataman_state::prepare_display() { // note the extra segment on R9 - display_matrix_seg(8, 9, m_o | (m_r >> 2 & 0x80), m_r & 0x1ff, 0x7f); + set_display_segmask(0x1ff, 0x7f); + display_matrix(8, 9, m_o | (m_r >> 2 & 0x80), m_r & 0x1ff); } WRITE16_MEMBER(dataman_state::write_r) @@ -959,12 +944,10 @@ public: WRITE16_MEMBER(ti30_state::write_r) { - // 1st digit only has segments B,F,G,DP - m_display_segmask[0] = 0xe2; - // R0-R8: select digit - UINT8 o = BITSWAP8(m_o,7,5,2,1,4,0,6,3); - display_matrix_seg(8, 9, o, data, 0xff); + set_display_segmask(0x1fe, 0xff); + set_display_segmask(0x001, 0xe2); // 1st digit only has segments B,F,G,DP + display_matrix(8, 9, m_o, data); } WRITE16_MEMBER(ti30_state::write_o) @@ -972,7 +955,7 @@ WRITE16_MEMBER(ti30_state::write_o) // O0-O2,O4-O7: input mux // O0-O7: digit segments m_inp_mux = (data & 7) | (data >> 1 & 0x78); - m_o = data; + m_o = BITSWAP8(data,7,5,2,1,4,0,6,3); } READ8_MEMBER(ti30_state::read_k) @@ -1384,6 +1367,6 @@ COMP( 1978, lilprof78, lilprof, 0, lilprof78, lilprof78, driver_device, 0, "Tex COMP( 1977, dataman, 0, 0, dataman, dataman, driver_device, 0, "Texas Instruments", "DataMan", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -COMP( 1976, ti30, 0, 0, ti30, ti30, driver_device, 0, "Texas Instruments", "TI-30", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -COMP( 1976, tibusan, 0, 0, ti30, tibusan, driver_device, 0, "Texas Instruments", "TI Business Analyst", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -COMP( 1977, tiprog, 0, 0, ti30, tiprog, driver_device, 0, "Texas Instruments", "TI Programmer", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 1976, ti30, 0, 0, ti30, ti30, driver_device, 0, "Texas Instruments", "TI-30", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 1976, tibusan, 0, 0, ti30, tibusan, driver_device, 0, "Texas Instruments", "TI Business Analyst", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 1977, tiprog, 0, 0, ti30, tiprog, driver_device, 0, "Texas Instruments", "TI Programmer", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp index 205574b0a5e..cafc46a7cbc 100644 --- a/src/mame/drivers/tispeak.cpp +++ b/src/mame/drivers/tispeak.cpp @@ -80,7 +80,7 @@ above expectations. TI continued to manufacture many products for this line. - notes: this one has a dedicated voice actor Speak & Spell (France) "La Dictee Magique", 1980 - - MCU: CD2702* + - MCU: CD2702, labeled CD2702AN2L (die labeled TMC0270F 2702A) - TMS51xx: CD2801 - VSM: 16KB CD2352 @@ -143,7 +143,7 @@ Note that they are interchangeable, eg. you can use a French module on a US Spea Speak & Math: Speak & Math (US), 1980 (renamed to "Speak & Maths" in UK, but is the same product) - - MCU: CD2704* + - MCU: CD2704, labeled CD2704B-N2L (die labeled TMC0270F 2704B) - 2nd revision?(mid-1982) - TMS51xx: CD2801 - VSM(1/2): 16KB CD2392 - VSM(2/2): 16KB CD2393 @@ -170,7 +170,7 @@ Speak & Math: Speak & Read: Speak & Read (US), 1980 - - MCU: CD2705, labeled CD2705B-N2L (die labeled TMC0270E 2705B) - 2nd revision? + - MCU: CD2705, labeled CD2705B-N2L (die labeled TMC0270E 2705B) - 2nd revision?(late-1981) - TMS51xx: CD2801 - VSM(1/2): 16KB CD2394(rev.A) - VSM(2/2): 16KB CD2395(rev.A) @@ -351,10 +351,40 @@ Language Tutor modules: - English(4/4): VSM: 16KB CD3529 +Other manufacturers: + +Tiger Electronics K28 (model 7-232) Sold in Hong Kong, distributed in US as: +- Coleco: Talking Teacher +- Sears: Talkatron - Learning Computer + +1981 K28 models 7-230 and 7-231 are on different hardware, showing a different +keyboard, VFD display, and use the SC-01 speech chip. --> driver k28.cpp + + K28 model 7-232 (HK), 1985 + - MCU: TMS1400 MP7324 + - TMS51xx: TMS5110A + - VSM: 16KB CM62084 + - LCD: unknown 8*16-seg + +K28 modules: + + - Spelling I: VSM: 16KB CM62086 + - Spelling II: VSM: 16KB CM62085? + - Spelling III: VSM: 16KB CM62087 + - Expansion Module 1: VSM: 16KB CM62214? - assumed same VSM as CM62086 + - Expansion Module 2: VSM: 16KB CM62216 - assumed same VSM as the one in Spelling II + - Expansion Module 3: VSM: 16KB CM62215 - same VSM as CM62087 + - Expansion Module 4: VSM: 16KB CM62217 + - Expansion Module 5: VSM: 16KB CM62218* + - Expansion Module 6: VSM: 16KB CM62219 + + note: these won't work on the 1981 version(s) + ---------------------------------------------------------------------------- TODO: - why doesn't lantutor work? + - identify and emulate k28 LCD - emulate other known devices @@ -368,6 +398,7 @@ Language Tutor modules: #include "softlist.h" // internal artwork +#include "k28m2.lh" #include "lantutor.lh" #include "snmath.lh" #include "snspell.lh" @@ -412,6 +443,11 @@ public: DECLARE_WRITE16_MEMBER(snspellc_write_r); DECLARE_READ8_MEMBER(tntell_read_k); + void k28_prepare_display(UINT8 old, UINT8 data); + DECLARE_READ8_MEMBER(k28_read_k); + DECLARE_WRITE16_MEMBER(k28_write_o); + DECLARE_WRITE16_MEMBER(k28_write_r); + // cartridge UINT32 m_cart_max_size; UINT8* m_cart_base; @@ -432,7 +468,6 @@ protected: void tispeak_state::machine_start() { hh_tms1k_state::machine_start(); - memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // ! init_cartridge(); } @@ -505,8 +540,9 @@ DRIVER_INIT_MEMBER(tispeak_state, lantutor) void tispeak_state::prepare_display() { - UINT16 gridmask = (m_display_decay[15][16] != 0) ? 0xffff : 0x8000; - display_matrix_seg(16+1, 16, m_plate | 0x10000, m_grid & gridmask, 0x3fff); + UINT16 gridmask = (m_display_decay[15][16] != 0) ? 0xffff : 0x8000; // vfd filament on/off + set_display_segmask(0x21ff, 0x3fff); + display_matrix(16+1, 16, m_plate | 1<<16, m_grid & gridmask); } WRITE16_MEMBER(tispeak_state::snspell_write_r) @@ -631,6 +667,46 @@ TIMER_DEVICE_CALLBACK_MEMBER(tispeak_state::tntell_get_overlay) } +// k28 specific + +void tispeak_state::k28_prepare_display(UINT8 old, UINT8 data) +{ + // ? +} + +WRITE16_MEMBER(tispeak_state::k28_write_r) +{ + // R1234: TMS5100 CTL8421 + m_tms5100->ctl_w(space, 0, BITSWAP8(data,0,0,0,0,1,2,3,4) & 0xf); + + // R0: TMS5100 PDC pin + m_tms5100->pdc_w(data & 1); + + // R5: input mux high bit + m_inp_mux = (m_inp_mux & 0xff) | (data << 3 & 0x100); + + // R6: power-off request, on falling edge + if ((m_r >> 6 & 1) && !(data >> 6 & 1)) + power_off(); + + // R7-R10: LCD data + k28_prepare_display(m_r >> 7 & 0xf, data >> 7 & 0xf); + m_r = data; +} + +WRITE16_MEMBER(tispeak_state::k28_write_o) +{ + // O0-O7: input mux low + m_inp_mux = (m_inp_mux & ~0xff) | data; +} + +READ8_MEMBER(tispeak_state::k28_read_k) +{ + // K: TMS5100 CTL, multiplexed inputs + return m_tms5100->ctl_r(space, 0) | read_inputs(9); +} + + /*************************************************************************** @@ -799,7 +875,7 @@ static INPUT_PORTS_START( snmath ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("+") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("-") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME(UTF8_MULTIPLY) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE) // / + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH_PAD) PORT_NAME(UTF8_DIVIDE) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("Mix It") PORT_START("IN.6") // R6 @@ -1031,6 +1107,63 @@ static INPUT_PORTS_START( tntell ) INPUT_PORTS_END +static INPUT_PORTS_START( k28m2 ) + PORT_START("IN.0") // O0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") // -> auto_power_off + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('A') PORT_NAME("A/1") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('J') PORT_NAME("J/0") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') + + PORT_START("IN.1") // O1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("On") PORT_CHANGED_MEMBER(DEVICE_SELF, tispeak_state, power_button, (void *)true) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR('B') PORT_NAME("B/2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR('K') PORT_NAME("K/+") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T') + + PORT_START("IN.2") // O2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("Repeat") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR('C') PORT_NAME("C/3") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR('L') PORT_NAME("L/-") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') + + PORT_START("IN.3") // O3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("Prompt") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR('D') PORT_NAME("D/4") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR('M') PORT_NAME("M/" UTF8_MULTIPLY) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') + + PORT_START("IN.4") // O4 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("Menu") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('E') PORT_NAME("E/5") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR('N') PORT_NAME("N/" UTF8_DIVIDE) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') + + PORT_START("IN.5") // O5 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_NAME("Module") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('F') PORT_NAME("F/6") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') + + PORT_START("IN.6") // O6 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("Select") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('G') PORT_NAME("G/7") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') + + PORT_START("IN.7") // O7 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('H') PORT_NAME("H/8") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') + + PORT_START("IN.8") // R5 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('I') PORT_NAME("I/9") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") +INPUT_PORTS_END + + /*************************************************************************** @@ -1210,6 +1343,33 @@ static MACHINE_CONFIG_DERIVED( tntell, vocaid ) MACHINE_CONFIG_END +static MACHINE_CONFIG_START( k28m2, tispeak_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1400, MASTER_CLOCK/2) + MCFG_TMS1XXX_READ_K_CB(READ8(tispeak_state, k28_read_k)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(tispeak_state, k28_write_o)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(tispeak_state, k28_write_r)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_k28m2) + + /* sound hardware */ + MCFG_DEVICE_ADD("tms6100", TMS6100, MASTER_CLOCK/4) + + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("tms5100", TMS5110A, MASTER_CLOCK) + MCFG_FRAGMENT_ADD(tms5110_route) + + /* cartridge */ + MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "k28m2") + MCFG_GENERIC_EXTENSIONS("vsm") + MCFG_GENERIC_LOAD(tispeak_state, tispeak_cartridge) + + MCFG_SOFTWARE_LIST_ADD("cart_list", "k28m2") +MACHINE_CONFIG_END + + /*************************************************************************** @@ -1242,10 +1402,10 @@ ROM_START( snspellp ) ROM_REGION( 2127, "maincpu:mpla", 0 ) ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) ROM_REGION( 1246, "maincpu:opla", 0 ) - ROM_LOAD( "tms0270_tmc0271_output.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) // using the one from 1978 version + ROM_LOAD( "tms0270_tmc0271_output.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) // using the one from 1st version ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff = space reserved for cartridge - ROM_LOAD( "tmc0351nl.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) ) // using the one from 1978 version + ROM_LOAD( "tmc0351nl.vsm", 0x0000, 0x4000, CRC(beea3373) SHA1(8b0f7586d2f12c3d4a885fdb528cf23feffa1a3b) ) // using the one from 1st version ROM_LOAD( "tmc0352nl.vsm", 0x4000, 0x4000, CRC(d51f0587) SHA1(ddaa484be1bba5fef46b481cafae517e4acaa8ed) ) // " ROM_END @@ -1256,7 +1416,7 @@ ROM_START( snspellua ) ROM_REGION( 1246, "maincpu:ipla", 0 ) ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) ROM_REGION( 2127, "maincpu:mpla", 0 ) - ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, BAD_DUMP CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) // not verified + ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) ROM_REGION( 1246, "maincpu:opla", 0 ) ROM_LOAD( "tms0270_tmc0271_output.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) @@ -1287,7 +1447,7 @@ ROM_START( snspelluk ) ROM_REGION( 1246, "maincpu:ipla", 0 ) ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) ROM_REGION( 2127, "maincpu:mpla", 0 ) - ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, BAD_DUMP CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) // not verified + ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) ROM_REGION( 1246, "maincpu:opla", 0 ) ROM_LOAD( "tms0270_tmc0271_output.pla", 0, 1246, CRC(9ebe12ab) SHA1(acb4e07ba26f2daca5f1c234885ac0371c7ce87f) ) @@ -1329,14 +1489,14 @@ ROM_END ROM_START( snspellfr ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "tmc0271h-n2l", 0x0000, 0x1000, BAD_DUMP CRC(f83b5d2d) SHA1(10155b0b7f7f1583c7def8a693553cd35944ea6f) ) // placeholder, use the one we have + ROM_LOAD( "cd2702an2l", 0x0000, 0x1000, CRC(895d6a4e) SHA1(a8bc118c83a84260033734191dcaa71a93dfa52b) ) ROM_REGION( 1246, "maincpu:ipla", 0 ) ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) ROM_REGION( 2127, "maincpu:mpla", 0 ) - ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, BAD_DUMP CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) // not verified + ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) ROM_REGION( 1246, "maincpu:opla", 0 ) - ROM_LOAD( "tms0270_tmc0271h_output.pla", 0, 1246, BAD_DUMP CRC(2478c595) SHA1(9a8ac690902731e1e01533279a1c9223011e1537) ) // placeholder, use the one we have + ROM_LOAD( "tms0270_cd2702_output.pla", 0, 1246, CRC(2478c595) SHA1(9a8ac690902731e1e01533279a1c9223011e1537) ) ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge ROM_LOAD( "cd2352.vsm", 0x0000, 0x4000, CRC(181a239e) SHA1(e16043766c385e152b7005c1c010be4c5fccdd9b) ) @@ -1344,14 +1504,14 @@ ROM_END ROM_START( snspellit ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "tmc0271h-n2l", 0x0000, 0x1000, BAD_DUMP CRC(f83b5d2d) SHA1(10155b0b7f7f1583c7def8a693553cd35944ea6f) ) // placeholder, use the one we have + ROM_LOAD( "cd2702an2l", 0x0000, 0x1000, CRC(895d6a4e) SHA1(a8bc118c83a84260033734191dcaa71a93dfa52b) ) ROM_REGION( 1246, "maincpu:ipla", 0 ) ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) ROM_REGION( 2127, "maincpu:mpla", 0 ) - ROM_LOAD( "tms0270_common2_micro.pla", 0, 2127, BAD_DUMP CRC(86737ac1) SHA1(4aa0444f3ddf88738ea74aec404c684bf54eddba) ) // not verified + ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) ROM_REGION( 1246, "maincpu:opla", 0 ) - ROM_LOAD( "tms0270_tmc0271h_output.pla", 0, 1246, BAD_DUMP CRC(2478c595) SHA1(9a8ac690902731e1e01533279a1c9223011e1537) ) // placeholder, use the one we have + ROM_LOAD( "tms0270_cd2702_output.pla", 0, 1246, CRC(2478c595) SHA1(9a8ac690902731e1e01533279a1c9223011e1537) ) ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // uses only 1 rom, 8000-bfff = space reserved for cartridge ROM_LOAD( "cd62190.vsm", 0x0000, 0x4000, CRC(63832002) SHA1(ea8124b2bf0f5908c5f1a56d60063f2468a10143) ) @@ -1400,7 +1560,23 @@ ROM_END ROM_START( snmath ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "cd2708n2l", 0x0000, 0x1000, CRC(35937360) SHA1(69c362c75bb459056c09c7fab37c91040485474b) ) + ROM_LOAD( "cd2704b-n2l", 0x0000, 0x1000, CRC(7e06c7c5) SHA1(d60a35a8163ab593c31afc840a0d8a9b3a762f29) ) + + ROM_REGION( 1246, "maincpu:ipla", 0 ) + ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) + ROM_REGION( 2127, "maincpu:mpla", 0 ) + ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) + ROM_REGION( 1246, "maincpu:opla", 0 ) + ROM_LOAD( "tms0270_cd2704_output.pla", 0, 1246, CRC(5a2eb949) SHA1(8bb161d4884f229af65f8d155e59b9d8966fe3d1) ) + + ROM_REGION( 0x8000, "tms6100", ROMREGION_ERASEFF ) + ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) ) + ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) ) +ROM_END + +ROM_START( snmatha ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "cd2708-n2l", 0x0000, 0x1000, CRC(35937360) SHA1(69c362c75bb459056c09c7fab37c91040485474b) ) ROM_REGION( 1246, "maincpu:ipla", 0 ) ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) @@ -1426,13 +1602,13 @@ ROM_START( snmathp ) ROM_REGION( 1246, "maincpu:ipla", 0 ) ROM_LOAD( "tms0980_common1_instr.pla", 0, 1246, CRC(42db9a38) SHA1(2d127d98028ec8ec6ea10c179c25e447b14ba4d0) ) ROM_REGION( 2127, "maincpu:mpla", 0 ) - ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, BAD_DUMP CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) // not verified + ROM_LOAD( "tms0270_common1_micro.pla", 0, 2127, CRC(504b96bb) SHA1(67b691e7c0b97239410587e50e5182bf46475b43) ) ROM_REGION( 1246, "maincpu:opla", 0 ) - ROM_LOAD( "tms0270_cd2708_output.pla", 0, 1246, BAD_DUMP CRC(1abad753) SHA1(53d20b519ed73ce248368047a056836afbe3cd46) ) // taken from cd2708, need to verify if it's same as cd2704 + ROM_LOAD( "tms0270_cd2704_output.pla", 0, 1246, CRC(5a2eb949) SHA1(8bb161d4884f229af65f8d155e59b9d8966fe3d1) ) // using the one from 1st version ROM_REGION( 0x8000, "tms6100", ROMREGION_ERASEFF ) - ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) ) - ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) ) + ROM_LOAD( "cd2392.vsm", 0x0000, 0x4000, CRC(4ed2e920) SHA1(8896f29e25126c1e4d9a47c9a325b35dddecc61f) ) // using the one from 1st version + ROM_LOAD( "cd2393.vsm", 0x4000, 0x4000, CRC(571d5b5a) SHA1(83284755d9b77267d320b5b87fdc39f352433715) ) // " ROM_END @@ -1535,32 +1711,49 @@ ROM_START( vocaid ) ROM_END +ROM_START( k28m2 ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "mp7324", 0x0000, 0x1000, CRC(08d15ab6) SHA1(5b0f6c53e6732a362c4bb25d966d4072fdd33db8) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_common1_micro.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) + ROM_REGION( 557, "maincpu:opla", 0 ) + ROM_LOAD( "tms1400_k28m2_output.pla", 0, 557, CRC(3a5c7005) SHA1(3fe5819c138a90e7fc12817415f2622ca81b40b2) ) + + ROM_REGION( 0x10000, "tms6100", ROMREGION_ERASEFF ) // 8000-bfff? = space reserved for cartridge + ROM_LOAD( "cm62084.vsm", 0x0000, 0x4000, CRC(cd1376f7) SHA1(96fa484c392c451599bc083b8376cad9c998df7d) ) +ROM_END + + /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -COMP( 1978, snspell, 0, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1979 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +COMP( 1979, snspell, 0, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1979 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) COMP( 1978, snspellp, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) COMP( 1980, snspellub, snspell, 0, sns_tmc0281d, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1980 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -COMP( 1979, snspellua, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // incomplete dump, using 1979 MCU ROM instead -COMP( 1978, snspelluk, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // " +COMP( 1978, snspellua, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // incomplete dump, using 1979 MCU ROM instead +COMP( 1978, snspelluk, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1978 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // " COMP( 1981, snspelluka, snspell, 0, sns_cd2801, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK, 1981 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) COMP( 1979, snspelljp, snspell, 0, sns_tmc0281, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (Japan)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -COMP( 1980, snspellfr, snspell, 0, sns_cd2801, snspellfr, tispeak_state, snspell, "Texas Instruments", "La Dictee Magique (France)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // doesn't work due to missing CD2702 MCU dump, German/Italian version has CD2702 too -COMP( 1982, snspellit, snspell, 0, sns_cd2801_m, snspellit, tispeak_state, snspell, "Texas Instruments", "Grillo Parlante (Italy)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // " +COMP( 1980, snspellfr, snspell, 0, sns_cd2801, snspellfr, tispeak_state, snspell, "Texas Instruments", "La Dictee Magique (France)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +COMP( 1982, snspellit, snspell, 0, sns_cd2801_m, snspellit, tispeak_state, snspell, "Texas Instruments", "Grillo Parlante (Italy)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) COMP( 1981, snspellc, 0, 0, snspellc, snspellc, tispeak_state, snspell, "Texas Instruments", "Speak & Spell Compact (US, 1981 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) COMP( 1982, snspellca, snspellc, 0, snspellc, snspellc, tispeak_state, snspell, "Texas Instruments", "Speak & Spell Compact (US, 1982 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) COMP( 1982, snspellcuk, snspellc, 0, snspellcuk, snspellcuk, tispeak_state, snspell, "Texas Instruments", "Speak & Write (UK)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -COMP( 1986, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1986 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -COMP( 1980, snmathp, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1980 version/patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +COMP( 1980, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1980 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +COMP( 1986, snmatha, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, 1986 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +COMP( 1980, snmathp, snmath, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US, patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_IS_INCOMPLETE ) COMP( 1980, snread, 0, 0, snread, snread, tispeak_state, snspell, "Texas Instruments", "Speak & Read (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) COMP( 1979, lantutor, 0, 0, lantutor, lantutor, tispeak_state, lantutor, "Texas Instruments", "Language Tutor (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) -COMP( 1981, tntell, 0, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (US, 1981 version)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK ) // assume there is an older version too, with CD8010 MCU -COMP( 1980, tntellp, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING ) -COMP( 1981, tntelluk, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (UK)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK ) -COMP( 1981, tntellfr, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Le Livre Magique (France)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK ) +COMP( 1981, tntell, 0, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (US)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK | MACHINE_REQUIRES_ARTWORK ) +COMP( 1980, tntellp, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (US, patent)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK | MACHINE_REQUIRES_ARTWORK | MACHINE_NOT_WORKING ) +COMP( 1981, tntelluk, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Touch & Tell (UK)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK | MACHINE_REQUIRES_ARTWORK ) +COMP( 1981, tntellfr, tntell, 0, tntell, tntell, tispeak_state, tntell, "Texas Instruments", "Le Livre Magique (France)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_CLICKABLE_ARTWORK | MACHINE_REQUIRES_ARTWORK ) COMP( 1982, vocaid, 0, 0, vocaid, tntell, driver_device, 0, "Texas Instruments", "Vocaid", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_REQUIRES_ARTWORK ) + +COMP( 1985, k28m2, 0, 0, k28m2, k28m2, tispeak_state, snspell, "Tiger Electronics", "K28: Talking Learning Computer (model 7-232)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/drivers/tispellb.cpp b/src/mame/drivers/tispellb.cpp index 0afe81d0a49..fcb7b072260 100644 --- a/src/mame/drivers/tispellb.cpp +++ b/src/mame/drivers/tispellb.cpp @@ -26,6 +26,7 @@ - TMC0355 4KB VSM ROM CD2602* - 8-digit cyan VFD display - 1-bit sound (indicated by a music note symbol on the top-right of the casing) + - note: much rarer than the 1978 version, not much luck finding one on eBay Spelling ABC (UK), 1979: exact same hardware as US version @@ -104,7 +105,6 @@ protected: void tispellb_state::machine_start() { hh_tms1k_state::machine_start(); - memset(m_display_segmask, ~0, sizeof(m_display_segmask)); // ! // zerofill m_rev1_ctl = 0; @@ -138,9 +138,10 @@ void tispellb_state::power_off() void tispellb_state::prepare_display() { - // same as snspell - UINT16 gridmask = (m_display_decay[15][16] != 0) ? 0xffff : 0x8000; - display_matrix_seg(16+1, 16, m_plate | 0x10000, m_grid & gridmask, 0x3fff); + // almost same as snspell + UINT16 gridmask = (m_display_decay[15][16] != 0) ? 0xffff : 0x8000; // vfd filament on/off + set_display_segmask(0xff, 0x3fff); + display_matrix(16+1, 16, m_plate | 1<<16, m_grid & gridmask); } WRITE16_MEMBER(tispellb_state::main_write_o) diff --git a/src/mame/drivers/tr606.cpp b/src/mame/drivers/tr606.cpp index 3842cb0f875..4fd0e50141e 100644 --- a/src/mame/drivers/tr606.cpp +++ b/src/mame/drivers/tr606.cpp @@ -23,43 +23,22 @@ class tr606_state : public hh_ucom4_state { public: tr606_state(const machine_config &mconfig, device_type type, const char *tag) - : hh_ucom4_state(mconfig, type, tag), - m_tp3_off_timer(*this, "tp3_off") + : hh_ucom4_state(mconfig, type, tag) { } - required_device<timer_device> m_tp3_off_timer; - - TIMER_DEVICE_CALLBACK_MEMBER(tp3_clock); - TIMER_DEVICE_CALLBACK_MEMBER(tp3_off); + TIMER_DEVICE_CALLBACK_MEMBER(tp3_clock) { m_maincpu->set_input_line(0, ASSERT_LINE); } + TIMER_DEVICE_CALLBACK_MEMBER(tp3_clear) { m_maincpu->set_input_line(0, CLEAR_LINE); } virtual void machine_start() override; }; - -/*************************************************************************** - - Timer/Interrupt - -***************************************************************************/ - // TP2 to MCU CLK: LC circuit(TI S74230), stable sine wave, 2.2us interval -#define TP2_CLOCK_HZ 454545 /* in hz */ +#define TP2_HZ 454545 +// MCU interrupt timing is same as in TB303 // TP3 to MCU _INT: square wave, 1.8ms interval, short duty cycle -#define TP3_CLOCK attotime::from_usec(1800) -#define TP3_OFF (TP3_CLOCK / 8) - -TIMER_DEVICE_CALLBACK_MEMBER(tr606_state::tp3_off) -{ - m_maincpu->set_input_line(0, CLEAR_LINE); -} - -TIMER_DEVICE_CALLBACK_MEMBER(tr606_state::tp3_clock) -{ - m_maincpu->set_input_line(0, ASSERT_LINE); - m_tp3_off_timer->adjust(TP3_OFF); -} - +#define TP3_PERIOD attotime::from_usec(1800) +#define TP3_LOW (TP3_PERIOD / 8) /*************************************************************************** @@ -100,11 +79,11 @@ void tr606_state::machine_start() static MACHINE_CONFIG_START( tr606, tr606_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", NEC_D650, TP2_CLOCK_HZ) + MCFG_CPU_ADD("maincpu", NEC_D650, TP2_HZ) - MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clock", tr606_state, tp3_clock, TP3_CLOCK) - MCFG_TIMER_START_DELAY(TP3_CLOCK) - MCFG_TIMER_DRIVER_ADD("tp3_off", tr606_state, tp3_off) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clock", tr606_state, tp3_clock, TP3_PERIOD) + MCFG_TIMER_START_DELAY(TP3_PERIOD - TP3_LOW) + MCFG_TIMER_DRIVER_ADD_PERIODIC("tp3_clear", tr606_state, tp3_clear, TP3_PERIOD) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) MCFG_DEFAULT_LAYOUT(layout_tr606) diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp index 52bc57fa118..7617c1fb7ef 100644 --- a/src/mame/drivers/tsispch.cpp +++ b/src/mame/drivers/tsispch.cpp @@ -245,6 +245,7 @@ WRITE_LINE_MEMBER( tsispch_state::dsp_to_8086_p1_w ) void tsispch_state::machine_reset() { fprintf(stderr,"machine reset\n"); + m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); // starts in reset } DRIVER_INIT_MEMBER(tsispch_state,prose2k) @@ -291,7 +292,6 @@ DRIVER_INIT_MEMBER(tsispch_state,prose2k) dspprg++; } m_paramReg = 0x00; // on power up, all leds on, reset to upd7720 is high - m_dsp->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); // starts in reset } /****************************************************************************** @@ -543,6 +543,6 @@ ROM_START( prose2ko ) Drivers ******************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1987, prose2k, 0, 0, prose2k, prose2k, tsispch_state, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020 v3.4.1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) -COMP( 1982, prose2ko, prose2k, 0, prose2k, prose2k, tsispch_state, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020 v1.1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */ +COMP( 1987, prose2k, 0, 0, prose2k, prose2k, tsispch_state, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020 v3.4.1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +COMP( 1982, prose2ko, prose2k, 0, prose2k, prose2k, tsispch_state, prose2k, "Telesensory Systems Inc/Speech Plus", "Prose 2000/2020 v1.1", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff --git a/src/mame/drivers/vc4000.cpp b/src/mame/drivers/vc4000.cpp index 2dcc44e54e7..11362de1e92 100644 --- a/src/mame/drivers/vc4000.cpp +++ b/src/mame/drivers/vc4000.cpp @@ -722,5 +722,5 @@ CONS(1979, telngtcs, rwtrntcs, 0, rwtrntcs, vc4000, driver_device, CONS(1979, krvnjvtv, 0, vc4000, vc4000, vc4000, driver_device, 0, "SOE", "OC Jeu Video TV Karvan", MACHINE_IMPERFECT_GRAPHICS ) /* France */ CONS(1979, oc2000, krvnjvtv, 0, vc4000, vc4000, driver_device, 0, "SOE", "OC-2000", MACHINE_IMPERFECT_GRAPHICS ) /* France */ CONS(1980, mpt05, 0, vc4000, vc4000, vc4000, driver_device, 0, "ITMC", "MPT-05", MACHINE_IMPERFECT_GRAPHICS ) /* France */ -CONS(1982, h21, 0, 0, h21, vc4000, driver_device, 0, "TRQ", "Video Computer H-21", MACHINE_IMPERFECT_GRAPHICS) // Spain +CONS(1982, h21, 0, vc4000, h21, vc4000, driver_device, 0, "TRQ", "Video Computer H-21", MACHINE_IMPERFECT_GRAPHICS) // Spain CONS(1979, elektor, 0, 0, elektor, elektor, driver_device, 0, "Elektor", "Elektor TV Games Computer", MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp index c71cff65f1a..c65e6885d9a 100644 --- a/src/mame/drivers/vegas.cpp +++ b/src/mame/drivers/vegas.cpp @@ -493,7 +493,7 @@ public: UINT8 m_sio_led_state; UINT8 m_pending_analog_read; UINT8 m_cmos_unlocked; - device_t *m_voodoo; + voodoo_device *m_voodoo; UINT8 m_dcs_idma_cs; int m_count; int m_dynamic_count; @@ -567,7 +567,7 @@ public: UINT32 vegas_state::screen_update_vegas(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - return voodoo_update(m_voodoo, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; + return m_voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; } @@ -579,7 +579,7 @@ UINT32 vegas_state::screen_update_vegas(screen_device &screen, bitmap_rgb32 &bit void vegas_state::machine_start() { - m_voodoo = machine().device("voodoo"); + m_voodoo = (voodoo_device*)machine().device("voodoo"); /* allocate timers for the NILE */ m_timer[0] = machine().scheduler().timer_alloc(FUNC_NULL); @@ -797,7 +797,7 @@ WRITE32_MEMBER( vegas_state::pci_ide_w ) READ32_MEMBER( vegas_state::pci_3dfx_r ) { - int voodoo_type = voodoo_get_type(m_voodoo); + int voodoo_type = m_voodoo->voodoo_get_type(); UINT32 result = m_pci_3dfx_regs[offset]; switch (offset) @@ -830,7 +830,7 @@ READ32_MEMBER( vegas_state::pci_3dfx_r ) WRITE32_MEMBER( vegas_state::pci_3dfx_w ) { - int voodoo_type = voodoo_get_type(m_voodoo); + int voodoo_type = m_voodoo->voodoo_get_type(); m_pci_3dfx_regs[offset] = data; @@ -869,7 +869,7 @@ WRITE32_MEMBER( vegas_state::pci_3dfx_w ) break; case 0x10: /* initEnable register */ - voodoo_set_init_enable(m_voodoo, data); + m_voodoo->voodoo_set_init_enable(data); break; } @@ -1555,7 +1555,7 @@ inline void vegas_state::_add_dynamic_address(offs_t start, offs_t end, read32_d void vegas_state::remap_dynamic_addresses() { dynamic_address *dynamic = m_dynamic; - int voodoo_type = voodoo_get_type(m_voodoo); + int voodoo_type = m_voodoo->voodoo_get_type(); offs_t base; int addr; diff --git a/src/mame/drivers/vigilant.cpp b/src/mame/drivers/vigilant.cpp index 12f0dc881bd..239a7c85a53 100644 --- a/src/mame/drivers/vigilant.cpp +++ b/src/mame/drivers/vigilant.cpp @@ -650,6 +650,9 @@ ROM_START( vigilant ) // World Rev E ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) ) ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) ) ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing ROM_END ROM_START( vigilantg ) // US Rev G @@ -687,6 +690,9 @@ ROM_START( vigilantg ) // US Rev G ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) ) ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) ) ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing ROM_END ROM_START( vigilanto ) // US (earliest base version) @@ -726,6 +732,9 @@ ROM_START( vigilanto ) // US (earliest base version) ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) ) ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) ) ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing ROM_END ROM_START( vigilanta ) // World Rev A @@ -765,6 +774,9 @@ ROM_START( vigilanta ) // World Rev A ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) ) ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) ) ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing ROM_END ROM_START( vigilantb ) // US Rev B @@ -804,6 +816,9 @@ ROM_START( vigilantb ) // US Rev B ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) ) ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) ) ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing ROM_END ROM_START( vigilantc ) // World Rev C @@ -843,6 +858,9 @@ ROM_START( vigilantc ) // World Rev C ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) ) ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) ) ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing ROM_END ROM_START( vigilantd ) // Japan Rev D @@ -882,6 +900,9 @@ ROM_START( vigilantd ) // Japan Rev D ROM_LOAD( "VG_B-8R.ic90", 0x0000, 0x0117, CRC(df368a7a) SHA1(597d85d1f90b7ee0188f2d849792ee02ff2ea48b) ) ROM_LOAD( "VG_B-4M.ic38", 0x0200, 0x0117, CRC(dbca4204) SHA1(d8e190f2dc4d6285f22be331d01ed402520d2017) ) ROM_LOAD( "VG_B-1B.ic1", 0x0400, 0x0117, CRC(922e5167) SHA1(08efdfdfeb35f3f73b6fd3d5c0c2a386dea5f617) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "tbp24s10_7a.ic52", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // tbp24s10, 82s129-equivalent - video timing ROM_END ROM_START( vigilantbl ) /* Bootleg */ @@ -1010,7 +1031,7 @@ ROM_START( buccanrs ) ROM_LOAD( "2.u74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) ) ROM_REGION( 0x400, "proms", 0 ) - ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) + ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante ROM_LOAD( "prom4.u79", 0x0100, 0x0100, CRC(e6506ef4) SHA1(079841da7640b14d94aaaeb572bf018932b58293) ) ROM_LOAD( "prom3.u88", 0x0200, 0x0100, CRC(b43d094f) SHA1(2bed4892d8a91d7faac5a07bf858d9294eb30606) ) ROM_LOAD( "prom2.u99", 0x0300, 0x0100, CRC(e0aa8869) SHA1(ac8bdfeba69420ba56ec561bf3d0f1229d02cea2) ) @@ -1049,7 +1070,7 @@ ROM_START( buccanrsa ) ROM_LOAD( "2.u74", 0x00000, 0x10000, CRC(36ee1dac) SHA1(6dfd2a885c0b1c9347abc4b204ade66551c4b404) ) ROM_REGION( 0x400, "proms", 0 ) - ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) + ROM_LOAD( "prom1.u54", 0x0000, 0x0100, CRC(c324835e) SHA1(cf6ffe38523badfda211d341410e93e647de87a9) ) // == ic52 video timing prom from vigilante ROM_LOAD( "prom4.u79", 0x0100, 0x0100, CRC(e6506ef4) SHA1(079841da7640b14d94aaaeb572bf018932b58293) ) ROM_LOAD( "prom3.u88", 0x0200, 0x0100, CRC(b43d094f) SHA1(2bed4892d8a91d7faac5a07bf858d9294eb30606) ) ROM_LOAD( "prom2.u99", 0x0300, 0x0100, CRC(e0aa8869) SHA1(ac8bdfeba69420ba56ec561bf3d0f1229d02cea2) ) diff --git a/src/mame/drivers/viper.cpp b/src/mame/drivers/viper.cpp index c10c28e55d0..e71413b1f1d 100644 --- a/src/mame/drivers/viper.cpp +++ b/src/mame/drivers/viper.cpp @@ -327,21 +327,21 @@ some other components. It will be documented at a later date. Game status: ppp2nd POST: "DIP SWITCH ERROR", "NO SECURITY ERROR" boxingm Goes to attract mode when ran with memory card check. Coins up. - code1d,b Inf loop on blue screen (writes to I2C before) - gticlub2 Inf loop on blue screen (writes to I2C before) + code1d,b RTC self check bad + gticlub2 Attract mode works. Coins up. Hangs in car selection. gticlub2ea Doesn't boot: bad CHD? jpark3 POST?: Shows "Now loading..." then black screen (sets global timer 1 on EPIC...) - mocapglf Inf loop on blue screen (writes to I2C before) - mocapb,j POST: U13 bad - p911,e,j,uc,kc POST: U13 bad - p9112 POST: U13 bad + mocapglf Security code error + mocapb,j Crash after self checks + p911,e,j,uc,kc "Distribution error" + p9112 RTC self check bad popn9 Doesn't boot: bad CHD? - sscopex/sogeki Inf loop on blue screen + sscopex/sogeki Security code error thrild2,a Attract mode with partial graphics. Coins up. Hangs in car selection screen. thrild2c Inf loop on blue screen tsurugi Goes to attract mode when ran with memory card check. Coins up. tsurugij No NVRAM - wcombat Hangs on blue screen + wcombat Stuck on network check xtrial Attract mode. Hangs. mfightc,c Passes POST. Waits for network connection from main unit? Spams writes to 0xffe08000 (8-bit) */ @@ -355,7 +355,7 @@ some other components. It will be documented at a later date. #include "video/voodoo.h" #define VIPER_DEBUG_LOG -#define VIPER_DEBUG_EPIC_INTS 1 +#define VIPER_DEBUG_EPIC_INTS 0 #define VIPER_DEBUG_EPIC_TIMERS 0 #define VIPER_DEBUG_EPIC_REGS 0 #define VIPER_DEBUG_EPIC_I2C 0 @@ -363,7 +363,6 @@ some other components. It will be documented at a later date. #define SDRAM_CLOCK 166666666 // Main SDRAMs run at 166MHz -static UINT32 *workram; static emu_timer *ds2430_timer; @@ -377,7 +376,8 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_ata(*this, "ata"), - m_voodoo(*this, "voodoo") + m_voodoo(*this, "voodoo"), + m_workram(*this, "workram") { } @@ -385,6 +385,11 @@ public: int m_cf_card_ide; int m_unk1_bit; UINT32 m_voodoo3_pci_reg[0x100]; + int m_unk_serial_bit_w; + UINT16 m_unk_serial_cmd; + UINT16 m_unk_serial_data; + UINT16 m_unk_serial_data_r; + UINT8 m_unk_serial_regs[0x80]; DECLARE_READ32_MEMBER(epic_r); DECLARE_WRITE32_MEMBER(epic_w); @@ -413,15 +418,21 @@ public: DECLARE_WRITE64_MEMBER(cf_card_w); DECLARE_READ64_MEMBER(ata_r); DECLARE_WRITE64_MEMBER(ata_w); + DECLARE_READ64_MEMBER(unk_serial_r); + DECLARE_WRITE64_MEMBER(unk_serial_w); DECLARE_WRITE_LINE_MEMBER(voodoo_vblank); DECLARE_DRIVER_INIT(viper); DECLARE_DRIVER_INIT(vipercf); + DECLARE_DRIVER_INIT(viperhd); virtual void machine_start() override; virtual void machine_reset() override; UINT32 screen_update_viper(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(viper_vblank); TIMER_CALLBACK_MEMBER(epic_global_timer_callback); TIMER_CALLBACK_MEMBER(ds2430_timer_callback); +#if VIPER_DEBUG_EPIC_REGS + const char* epic_get_register_name(UINT32 reg); +#endif void epic_update_interrupts(); void mpc8240_interrupt(int irq); void mpc8240_epic_init(); @@ -431,12 +442,13 @@ public: required_device<ppc_device> m_maincpu; required_device<ata_interface_device> m_ata; required_device<voodoo_3_device> m_voodoo; + required_shared_ptr<UINT64> m_workram; }; UINT32 viper_state::screen_update_viper(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - device_t *device = machine().device("voodoo"); - return voodoo_update(device, bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; + voodoo_device *voodoo = (voodoo_device*)machine().device("voodoo"); + return voodoo->voodoo_update(bitmap, cliprect) ? 0 : UPDATE_HAS_NOT_CHANGED; } UINT32 m_mpc8240_regs[256/4]; @@ -616,7 +628,7 @@ struct MPC8240_EPIC static MPC8240_EPIC epic; #if VIPER_DEBUG_EPIC_REGS -const viper_state::char* epic_get_register_name(UINT32 reg) +const char* viper_state::epic_get_register_name(UINT32 reg) { switch (reg >> 16) { @@ -858,7 +870,9 @@ READ32_MEMBER(viper_state::epic_r) { if (epic.i2c_state == I2C_STATE_ADDRESS_CYCLE) { +#if VIPER_DEBUG_EPIC_I2C printf("I2C address cycle read\n"); +#endif epic.i2c_state = I2C_STATE_DATA_TRANSFER; @@ -868,7 +882,9 @@ READ32_MEMBER(viper_state::epic_r) // generate interrupt if interrupt are enabled if (epic.i2c_cr & 0x40) { +#if VIPER_DEBUG_EPIC_I2C printf("I2C interrupt\n"); +#endif mpc8240_interrupt(MPC8240_I2C_IRQ); // set interrupt flag in status register @@ -877,7 +893,9 @@ READ32_MEMBER(viper_state::epic_r) } else if (epic.i2c_state == I2C_STATE_DATA_TRANSFER) { +#if VIPER_DEBUG_EPIC_I2C printf("I2C data read\n"); +#endif epic.i2c_state = I2C_STATE_ADDRESS_CYCLE; @@ -959,7 +977,7 @@ READ32_MEMBER(viper_state::epic_r) ret |= epic.irq[MPC8240_I2C_IRQ].priority << 16; ret |= epic.irq[MPC8240_I2C_IRQ].vector; ret |= epic.irq[MPC8240_I2C_IRQ].active ? 0x40000000 : 0; - return ret; + break; } } break; @@ -1748,7 +1766,7 @@ READ64_MEMBER(viper_state::unk1_r) reg |= (unk1_bit << 5); reg |= 0x40; // if this bit is 0, loads a disk copier instead //r |= 0x04; // screen flip - //reg |= 0x08; // memory card check (1 = enable) + reg |= 0x08; // memory card check (1 = enable) r |= reg << 40; @@ -1844,8 +1862,8 @@ void viper_state::DS2430_w(int bit) case DS2430_STATE_READ_MEM: { + unk1_bit = (ds2430_rom[(ds2430_data_count/8)] >> (ds2430_data_count%8)) & 1; ds2430_data_count++; - unk1_bit = rand () & 1; printf("DS2430_w: read mem %d, bit = %d\n", ds2430_data_count, unk1_bit); if (ds2430_data_count >= 256) @@ -1970,12 +1988,74 @@ READ64_MEMBER(viper_state::e00000_r) return r; } +READ64_MEMBER(viper_state::unk_serial_r) +{ + UINT64 r = 0; + if (ACCESSING_BITS_16_31) + { + int bit = m_unk_serial_data_r & 0x1; + m_unk_serial_data_r >>= 1; + r |= bit << 17; + } + return r; +} + +WRITE64_MEMBER(viper_state::unk_serial_w) +{ + if (ACCESSING_BITS_16_31) + { + if (data & 0x10000) + { + int bit = (data & 0x20000) ? 1 : 0; + if (m_unk_serial_bit_w < 8) + { + if (m_unk_serial_bit_w > 0) + m_unk_serial_cmd <<= 1; + m_unk_serial_cmd |= bit; + } + else + { + if (m_unk_serial_bit_w > 8) + m_unk_serial_data <<= 1; + m_unk_serial_data |= bit; + } + m_unk_serial_bit_w++; + + if (m_unk_serial_bit_w == 8) + { + if ((m_unk_serial_cmd & 0x80) == 0) // register read + { + int reg = m_unk_serial_cmd & 0x7f; + UINT8 data = m_unk_serial_regs[reg]; + + m_unk_serial_data_r = ((data & 0x1) << 7) | ((data & 0x2) << 5) | ((data & 0x4) << 3) | ((data & 0x8) << 1) | ((data & 0x10) >> 1) | ((data & 0x20) >> 3) | ((data & 0x40) >> 5) | ((data & 0x80) >> 7); + + printf("unk_serial read reg %02X: %04X\n", reg, data); + } + } + if (m_unk_serial_bit_w == 16) + { + if (m_unk_serial_cmd & 0x80) // register write + { + int reg = m_unk_serial_cmd & 0x7f; + m_unk_serial_regs[reg] = m_unk_serial_data; + printf("unk_serial write reg %02X: %04X\n", reg, m_unk_serial_data); + } + + m_unk_serial_bit_w = 0; + m_unk_serial_cmd = 0; + m_unk_serial_data = 0; + } + } + } +} + /*****************************************************************************/ static ADDRESS_MAP_START(viper_map, AS_PROGRAM, 64, viper_state ) - AM_RANGE(0x00000000, 0x00ffffff) AM_MIRROR(0x1000000) AM_RAM + AM_RANGE(0x00000000, 0x00ffffff) AM_MIRROR(0x1000000) AM_RAM AM_SHARE("workram") AM_RANGE(0x80000000, 0x800fffff) AM_READWRITE32(epic_r, epic_w,U64(0xffffffffffffffff)) AM_RANGE(0x82000000, 0x83ffffff) AM_READWRITE(voodoo3_r, voodoo3_w) AM_RANGE(0x84000000, 0x85ffffff) AM_READWRITE(voodoo3_lfb_r, voodoo3_lfb_w) @@ -1984,7 +2064,7 @@ static ADDRESS_MAP_START(viper_map, AS_PROGRAM, 64, viper_state ) AM_RANGE(0xfee00000, 0xfeefffff) AM_READWRITE(pci_config_data_r, pci_config_data_w) // 0xff000000, 0xff000fff - cf_card_data_r/w (installed in DRIVER_INIT(vipercf)) // 0xff200000, 0xff200fff - cf_card_r/w (installed in DRIVER_INIT(vipercf)) - AM_RANGE(0xff300000, 0xff300fff) AM_READWRITE(ata_r, ata_w) + // 0xff300000, 0xff300fff - ata_r/w (installed in DRIVER_INIT(viperhd)) AM_RANGE(0xffe00000, 0xffe00007) AM_READ(e00000_r) AM_RANGE(0xffe00008, 0xffe0000f) AM_READWRITE(e00008_r, e00008_w) AM_RANGE(0xffe10000, 0xffe10007) AM_READ(unk1_r) @@ -2074,7 +2154,7 @@ void viper_state::machine_start() m_maincpu->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS); /* configure fast RAM regions for DRC */ - m_maincpu->ppcdrc_add_fastram(0x00000000, 0x00ffffff, FALSE, workram); + m_maincpu->ppcdrc_add_fastram(0x00000000, 0x00ffffff, FALSE, m_workram); ds2430_rom = (UINT8*)memregion("ds2430")->base(); } @@ -2135,12 +2215,21 @@ DRIVER_INIT_MEMBER(viper_state,viper) // m_maincpu->space(AS_PROGRAM).install_legacy_readwrite_handler( *ide, 0xff200000, 0xff207fff, FUNC(hdd_r), FUNC(hdd_w) ); //TODO } +DRIVER_INIT_MEMBER(viper_state,viperhd) +{ + DRIVER_INIT_CALL(viper); + + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff300000, 0xff300fff, read64_delegate(FUNC(viper_state::ata_r), this), write64_delegate(FUNC(viper_state::ata_w), this)); +} + DRIVER_INIT_MEMBER(viper_state,vipercf) { DRIVER_INIT_CALL(viper); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff000000, 0xff000fff, read64_delegate(FUNC(viper_state::cf_card_data_r), this), write64_delegate(FUNC(viper_state::cf_card_data_w), this) ); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff200000, 0xff200fff, read64_delegate(FUNC(viper_state::cf_card_r), this), write64_delegate(FUNC(viper_state::cf_card_w), this) ); + + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff300000, 0xff300fff, read64_delegate(FUNC(viper_state::unk_serial_r), this), write64_delegate(FUNC(viper_state::unk_serial_w), this) ); } @@ -2350,6 +2439,19 @@ ROM_START(p911e) //* DISK_IMAGE( "a00eaa02", 0, SHA1(81565a2dce2e2b0a7927078a784354948af1f87c) ) ROM_END +ROM_START(p911ea) + VIPER_BIOS + + ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */ + ROM_LOAD("ds2430.u3", 0x00, 0x28, CRC(f1511505) SHA1(ed7cd9b2763b3e377df9663943160f9871f65105)) + + ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ + ROM_LOAD("a00eaa_nvram.u39", 0x000000, 0x2000, CRC(4f3497b6) SHA1(3045c54f98dff92cdf3a1fc0cd4c76ba82d632d7) ) + + DISK_REGION( "ata:0:hdd:image" ) + DISK_IMAGE( "a00eaa02", 0, SHA1(fa057bf17f4c0fb9b9a09b820ff7a101e44fab7d) ) +ROM_END + ROM_START(p911j) //* VIPER_BIOS @@ -2417,6 +2519,17 @@ ROM_START(sogeki) //* DISK_IMAGE( "a13b02", 0, SHA1(c25a61b76d365794c2da4a9e7de88a5519e944ec) ) ROM_END +ROM_START(sscopefh) + VIPER_BIOS + + ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */ + + ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ + + DISK_REGION( "ata:0:hdd:image" ) + DISK_IMAGE( "ccca02", 0, SHA1(ec0d9a1520f17c73750de71dba8b31bc8c9d0409) ) +ROM_END + ROM_START(thrild2) //* VIPER_BIOS @@ -2444,6 +2557,32 @@ ROM_START(thrild2a) //* DISK_IMAGE( "a41a02", 0, SHA1(bbb71e23bddfa07dfa30b6565a35befd82b055b8) ) ROM_END +ROM_START(thrild2ab) + VIPER_BIOS + + ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */ + ROM_LOAD("ds2430.u3", 0x00, 0x28, CRC(f1511505) SHA1(ed7cd9b2763b3e377df9663943160f9871f65105)) + + ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ + ROM_LOAD("a41aaa_nvram.u39", 0x00000, 0x2000, CRC(d5de9b8e) SHA1(768bcd46a6ad20948f60f5e0ecd2f7b9c2901061)) + + DISK_REGION( "ata:0:hdd:image" ) + DISK_IMAGE( "a41a02_alt", 0, SHA1(7a9cfdab7000765ffdd9198b209f7a74741248f2) ) +ROM_END + +ROM_START(thrild2ac) + VIPER_BIOS + + ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */ + ROM_LOAD("ds2430.u3", 0x00, 0x28, CRC(f1511505) SHA1(ed7cd9b2763b3e377df9663943160f9871f65105)) + + ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ + ROM_LOAD("a41aaa_nvram.u39", 0x00000, 0x2000, CRC(d5de9b8e) SHA1(768bcd46a6ad20948f60f5e0ecd2f7b9c2901061)) + + DISK_REGION( "ata:0:hdd:image" ) + DISK_IMAGE( "a41a02_alt2", 0, SHA1(c8bfbac4f5a1a2241df7417ad2f9eba7d9e9a9df) ) +ROM_END + /* This CF card has sticker 941EAA02 */ ROM_START(thrild2c) //* VIPER_BIOS @@ -2484,6 +2623,17 @@ ROM_START(tsurugij) //* DISK_IMAGE( "a30c02", 0, SHA1(533b5669b00884a800df9ba29651777a76559862) ) ROM_END +ROM_START(tsurugie) + VIPER_BIOS + + ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */ + + ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ + + DISK_REGION( "ata:0:hdd:image" ) + DISK_IMAGE( "a30eab02", 0, SHA1(fcc5b69f89e246f26ca4b8546cc409d3488bbdd9) ) +ROM_END + /* This CF card has sticker C22D02 */ ROM_START(wcombat) //* VIPER_BIOS @@ -2498,6 +2648,19 @@ ROM_START(wcombat) //* DISK_IMAGE( "c22d02", 0, SHA1(69a24c9e36b073021d55bec27d89fcc0254a60cc) ) // chs 978,8,32 ROM_END +ROM_START(wcombatb) //* + VIPER_BIOS + + ROM_REGION(0x28, "ds2430", ROMREGION_ERASE00) /* DS2430 */ + ROM_LOAD("ds2430.u3", 0x00, 0x28, CRC(f1511505) SHA1(ed7cd9b2763b3e377df9663943160f9871f65105)) + + ROM_REGION(0x2000, "m48t58", ROMREGION_ERASE00) /* M48T58 Timekeeper NVRAM */ + ROM_LOAD("wcombat_nvram.u39", 0x00000, 0x2000, CRC(4f8b5858) SHA1(68066241c6f9db7f45e55b3c5da101987f4ce53c)) + + DISK_REGION( "ata:0:hdd:image" ) + DISK_IMAGE( "c22d02_alt", 0, SHA1(772e3fe7910f5115ec8f2235bb48ba9fcac6950d) ) // chs 978,8,32 +ROM_END + ROM_START(wcombatk) //* VIPER_BIOS @@ -2631,7 +2794,7 @@ ROM_END /* Viper BIOS */ GAME(1999, kviper, 0, viper, viper, viper_state, viper, ROT0, "Konami", "Konami Viper BIOS", MACHINE_IS_BIOS_ROOT) -GAME(2001, ppp2nd, kviper, viper, viper, viper_state, viper, ROT0, "Konami", "ParaParaParadise 2nd Mix", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) +GAME(2001, ppp2nd, kviper, viper, viper, viper_state, viperhd, ROT0, "Konami", "ParaParaParadise 2nd Mix", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, boxingm, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Boxing Mania (ver JAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2000, code1d, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Code One Dispatch (ver D)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) @@ -2646,17 +2809,23 @@ GAME(2001, p911, kviper, viper, viper, viper_state, vipercf, ROT90, "K GAME(2001, p911uc, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 911 (ver UAC)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, p911kc, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 911 (ver KAC)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, p911e, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 24/7 (ver EAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) +GAME(2001, p911ea, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 24/7 (ver EAA, alt)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, p911j, p911, viper, viper, viper_state, vipercf, ROT90, "Konami", "Keisatsukan Shinjuku 24ji (ver JAC)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, p9112, kviper, viper, viper, viper_state, vipercf, ROT90, "Konami", "Police 911 2 (VER. UAA:B)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2003, popn9, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Pop'n Music 9 (ver JAB)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, sscopex, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Silent Scope EX (ver UAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, sogeki, sscopex, viper, viper, viper_state, vipercf, ROT0, "Konami", "Sogeki (ver JAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) +GAME(2002, sscopefh, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Silent Scope Fortune Hunter", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, thrild2, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver EBB)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, thrild2a, thrild2, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver AAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) +GAME(2001, thrild2ab, thrild2, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver AAA, alt)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) +GAME(2001, thrild2ac, thrild2, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver AAA, alt 2)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2001, thrild2c, thrild2, viper, viper, viper_state, vipercf, ROT0, "Konami", "Thrill Drive 2 (ver EAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2002, tsurugi, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "Tsurugi (ver EAB)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) +GAME(2002, tsurugie, tsurugi, viper, viper, viper_state, vipercf, ROT0, "Konami", "Tsurugi (ver EAB, alt)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2002, tsurugij, tsurugi, viper, viper, viper_state, vipercf, ROT0, "Konami", "Tsurugi (ver JAC)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2002, wcombat, kviper, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat (ver AAD:B)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) +GAME(2002, wcombatb, wcombat, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat (ver AAD:B, alt)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2002, wcombatk, wcombat, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat (ver KBC:B)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2002, wcombatu, wcombat, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat / Warzaid (ver UCD:B)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) GAME(2002, wcombatj, wcombat, viper, viper, viper_state, vipercf, ROT0, "Konami", "World Combat (ver JAA)", MACHINE_NOT_WORKING|MACHINE_NO_SOUND) diff --git a/src/mame/drivers/wrally.cpp b/src/mame/drivers/wrally.cpp index db729a6b7ac..c6af288a8eb 100644 --- a/src/mame/drivers/wrally.cpp +++ b/src/mame/drivers/wrally.cpp @@ -66,6 +66,7 @@ CPUs related: Sound related: ============== * 1xOKIM6295 @ C6 +* 1xOSC1MHz @ C7 * 2xM27C4001 @ C1 & C3 (OKI ADPCM samples) * 1xPAL16R4 @ E2 (handles OKI ROM banking) @@ -94,6 +95,12 @@ to pin #2 (CLK) at ICs A16 and A17 and it is a clock for the 74LS169 ICs; this c frequency is proportional to the movements of the steering wheel: fast movements produces a high clock frequency, slow movements a low freq. +PCB: REF.930217 + +The PCB has a layout that can either use the 4 rom set of I7, I9, I11 & I 13 or larger + roms at H8 & H12 for graphics as well as the ability to use different size sound sample + roms at C1 & C3 + ***************************************************************************/ #include "emu.h" @@ -329,7 +336,31 @@ ROM_START( wrallya ) ROM_LOAD( "pal16r8-b15.bin", 0x0000, 0x0104, CRC(b50337a6) SHA1(1f922753cb9982cad9a3c9246894ecd38273236e) ) ROM_END -ROM_START( wrallyb ) /* Board Marked 930217, Atari License */ +ROM_START( wrallyb ) + ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_LOAD16_BYTE( "rally_c23.c23", 0x000000, 0x080000, CRC(ddd6f833) SHA1(f12f82c412fa93f46020d50c2620974ae2fb502b) ) + ROM_LOAD16_BYTE( "rally_c22.c22", 0x000001, 0x080000, CRC(59a0d35c) SHA1(7c6f376a53c1e6d793cbfb16861ee3298ee013a1) ) + + ROM_REGION( 0x10000, "mcu", 0 ) /* DS5002FP code */ + ROM_LOAD( "wrdallas.bin", 0x00000, 0x8000, CRC(547d1768) SHA1(c58d1edd072d796be0663fb265f4739ec006b688) ) + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "rally h-12.h12", 0x000000, 0x100000, CRC(3353dc00) SHA1(db3b1686751dcaa231d66c08b5be81fcfe299ad9) ) /* Same data, different layout */ + ROM_LOAD( "rally h-8.h8", 0x100000, 0x100000, CRC(58dcd024) SHA1(384ff296d3c7c8e0c4469231d1940de3cea89fc2) ) + + ROM_REGION( 0x140000, "oki", 0 ) /* ADPCM samples - sound chip is OKIM6295 */ + ROM_LOAD( "sound c-1.c1", 0x000000, 0x100000, CRC(2d69c9b8) SHA1(328cb3c928dc6921c0c3f0277f59bca6c747c504) ) /* Same data in a single rom */ + ROM_RELOAD( 0x040000, 0x100000 ) + + ROM_REGION( 0x0514, "plds", 0 ) /* PAL's and GAL's */ + ROM_LOAD( "tibpal20l8-25cnt.b23", 0x0000, 0x0104, NO_DUMP ) + ROM_LOAD( "gal16v8-25lnc.h21", 0x0000, 0x0104, NO_DUMP ) + ROM_LOAD( "tibpal20l8-25cnt.h15", 0x0000, 0x0104, NO_DUMP ) + ROM_LOAD( "pal16r4-e2.bin", 0x0000, 0x0104, CRC(15fee75c) SHA1(b9ee5121dd41f2535d9abd78ff5fcfeaa1ac6b62) ) + ROM_LOAD( "pal16r8-b15.bin", 0x0000, 0x0104, CRC(b50337a6) SHA1(1f922753cb9982cad9a3c9246894ecd38273236e) ) +ROM_END + +ROM_START( wrallyat ) /* Board Marked 930217, Atari License */ ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_BYTE( "rally.c23", 0x000000, 0x080000, CRC(366595ad) SHA1(e16341ed9eacf9b729c28184268150ea9b62f185) ) /* North & South America only... */ ROM_LOAD16_BYTE( "rally.c22", 0x000001, 0x080000, CRC(0ad4ec6f) SHA1(991557cf25fe960b1c586e990e6019befe5a11d0) ) @@ -354,6 +385,7 @@ ROM_START( wrallyb ) /* Board Marked 930217, Atari License */ ROM_END -GAME( 1993, wrally, 0, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 1)", MACHINE_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Tension baja " */ -GAME( 1993, wrallya, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (set 2)", MACHINE_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Power Failure" */ -GAME( 1993, wrallyb, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco (Atari license)", "World Rally (US, 930217)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, wrally, 0, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (Version 1.0, Checksum 0E56)", MACHINE_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Tension baja " */ +GAME( 1993, wrallya, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (Version 1.0, Checksum 3873)", MACHINE_SUPPORTS_SAVE ) /* Dallas DS5002FP power failure shows as: "Power Failure" */ +GAME( 1993, wrallyb, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco", "World Rally (Version 1.0, Checksum 8AA2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, wrallyat, wrally, wrally, wrally, driver_device, 0, ROT0, "Gaelco (Atari license)", "World Rally (US, 930217)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/xor100.cpp b/src/mame/drivers/xor100.cpp index 3d85c372c7d..05b81f316ac 100644 --- a/src/mame/drivers/xor100.cpp +++ b/src/mame/drivers/xor100.cpp @@ -189,7 +189,7 @@ READ8_MEMBER( xor100_state::fdc_wait_r ) if (!m_fdc_irq && !m_fdc_drq) { fatalerror("Z80 WAIT not supported by MAME core\n"); - m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE); } } @@ -442,7 +442,7 @@ void xor100_state::fdc_intrq_w(bool state) if (state) { fatalerror("Z80 WAIT not supported by MAME core\n"); - m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE); } } @@ -453,7 +453,7 @@ void xor100_state::fdc_drq_w(bool state) if (state) { fatalerror("Z80 WAIT not supported by MAME core\n"); - m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_maincpu->set_input_line(Z80_INPUT_LINE_BOGUSWAIT, ASSERT_LINE); } } @@ -568,7 +568,7 @@ static MACHINE_CONFIG_START( xor100, xor100_state ) // S-100 MCFG_S100_BUS_ADD() - MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT)) + MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_BOGUSWAIT)) MCFG_S100_SLOT_ADD("s100_1", xor100_s100_cards, nullptr) MCFG_S100_SLOT_ADD("s100_2", xor100_s100_cards, nullptr) MCFG_S100_SLOT_ADD("s100_3", xor100_s100_cards, nullptr) diff --git a/src/mame/drivers/xybots.cpp b/src/mame/drivers/xybots.cpp index 948e7aa33ae..9cb32712bd2 100644 --- a/src/mame/drivers/xybots.cpp +++ b/src/mame/drivers/xybots.cpp @@ -184,7 +184,7 @@ static MACHINE_CONFIG_START( xybots, xybots_state ) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen) - MCFG_SLAPSTIC_ADD("slapstic") + MCFG_SLAPSTIC_ADD("slapstic", 107) MCFG_MACHINE_RESET_OVERRIDE(xybots_state,xybots) @@ -395,7 +395,7 @@ ROM_END DRIVER_INIT_MEMBER(xybots_state,xybots) { m_h256 = 0x0400; - slapstic_configure(*m_maincpu, 0x008000, 0, 107); + slapstic_configure(*m_maincpu, 0x008000, 0); } diff --git a/src/mame/drivers/zaccaria.cpp b/src/mame/drivers/zaccaria.cpp index a002b46b6d0..328c9614af7 100644 --- a/src/mame/drivers/zaccaria.cpp +++ b/src/mame/drivers/zaccaria.cpp @@ -41,31 +41,19 @@ Notes: #include "emu.h" #include "cpu/z80/z80.h" -#include "cpu/m6800/m6800.h" #include "machine/i8255.h" -#include "sound/dac.h" #include "includes/zaccaria.h" void zaccaria_state::machine_start() { save_item(NAME(m_dsw_sel)); - save_item(NAME(m_active_8910)); - save_item(NAME(m_port0a)); - save_item(NAME(m_acs)); - save_item(NAME(m_last_port0b)); - save_item(NAME(m_toggle)); save_item(NAME(m_nmi_mask)); } void zaccaria_state::machine_reset() { m_dsw_sel = 0; - m_active_8910 = 0; - m_port0a = 0; - m_acs = 0; - m_last_port0b = 0; - m_toggle = 0; m_nmi_mask = 0; } @@ -73,21 +61,21 @@ WRITE8_MEMBER(zaccaria_state::dsw_sel_w) { switch (data & 0xf0) { - case 0xe0: - m_dsw_sel = 0; - break; + case 0xe0: + m_dsw_sel = 0; + break; - case 0xd0: - m_dsw_sel = 1; - break; + case 0xd0: + m_dsw_sel = 1; + break; - case 0xb0: - m_dsw_sel = 2; - break; + case 0xb0: + m_dsw_sel = 2; + break; - default: - logerror("%s: portsel = %02x\n", machine().describe_context(), data); - break; + default: + logerror("%s: portsel = %02x\n", machine().describe_context(), data); + break; } } @@ -97,100 +85,6 @@ READ8_MEMBER(zaccaria_state::dsw_r) } -WRITE8_MEMBER(zaccaria_state::ay8910_port0a_w) -{ - /* bits 0-2 go to a 74LS156 with open collector outputs - * one out of 8 Resitors is than used to form a resistor - * divider with Analog input 5 (tromba) - */ - - // bits 3-4 control the analog drum emulation on 8910 #0 ch. A - - static const int table[8] = { 8200, 5600, 3300, 1500, 820, 390, 150, 47 }; - int b0, b1, b2, ba, v; - b0 = data & 0x01; - b1 = (data & 0x02) >> 1; - b2 = (data & 0x04) >> 2; - ba = (b0<<2) | (b1<<1) | b2; - /* 150 below to scale to volume 100 */ - v = (150 * table[ba]) / (4700 + table[ba]); - //printf("dac1w %02d %04d\n", ba, v); - m_ay2->set_volume(1, v); -} - -READ8_MEMBER(zaccaria_state::port0a_r) -{ - return (m_active_8910 == 0) ? m_ay1->data_r(space, 0) : m_ay2->data_r(space, 0); -} - -WRITE8_MEMBER(zaccaria_state::port0a_w) -{ - m_port0a = data; -} - -WRITE8_MEMBER(zaccaria_state::port0b_w) -{ - /* bit 1 goes to 8910 #0 BDIR pin */ - if ((m_last_port0b & 0x02) == 0x02 && (data & 0x02) == 0x00) - { - /* bit 0 goes to the 8910 #0 BC1 pin */ - m_ay1->data_address_w(space, m_last_port0b, m_port0a); - } - else if ((m_last_port0b & 0x02) == 0x00 && (data & 0x02) == 0x02) - { - /* bit 0 goes to the 8910 #0 BC1 pin */ - if (m_last_port0b & 0x01) - m_active_8910 = 0; - } - /* bit 3 goes to 8910 #1 BDIR pin */ - if ((m_last_port0b & 0x08) == 0x08 && (data & 0x08) == 0x00) - { - /* bit 2 goes to the 8910 #1 BC1 pin */ - m_ay2->data_address_w(space, m_last_port0b >> 2, m_port0a); - } - else if ((m_last_port0b & 0x08) == 0x00 && (data & 0x08) == 0x08) - { - /* bit 2 goes to the 8910 #1 BC1 pin */ - if (m_last_port0b & 0x04) - m_active_8910 = 1; - } - - m_last_port0b = data; -} - -INTERRUPT_GEN_MEMBER(zaccaria_state::cb1_toggle) -{ - m_pia0->cb1_w(m_toggle & 1); - m_toggle ^= 1; -} - -WRITE8_MEMBER(zaccaria_state::port1b_w) -{ - // bit 0 = /RS - m_tms->rsq_w((data >> 0) & 0x01); - // bit 1 = /WS - m_tms->wsq_w((data >> 1) & 0x01); - - // bit 3 = "ACS" (goes, inverted, to input port 6 bit 3) - m_acs = ~data & 0x08; - - // bit 4 = led (for testing?) - output().set_led_value(0,~data & 0x10); -} - - -WRITE8_MEMBER(zaccaria_state::sound_command_w) -{ - soundlatch_byte_w(space, 0, data); - m_audio2->set_input_line(0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); -} - -WRITE8_MEMBER(zaccaria_state::sound1_command_w) -{ - m_pia0->ca1_w(data & 0x80); - soundlatch2_byte_w(space, 0, data); -} - GAME_EXTERN(monymony); READ8_MEMBER(zaccaria_state::prot1_r) @@ -253,83 +147,23 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, zaccaria_state ) AM_RANGE(0x6800, 0x683f) AM_WRITE(attributes_w) AM_SHARE("attributesram") AM_RANGE(0x6840, 0x685f) AM_RAM AM_SHARE("spriteram") AM_RANGE(0x6881, 0x68c0) AM_RAM AM_SHARE("spriteram2") - AM_RANGE(0x6c00, 0x6c00) AM_WRITE(flip_screen_x_w) - AM_RANGE(0x6c01, 0x6c01) AM_WRITE(flip_screen_y_w) - AM_RANGE(0x6c02, 0x6c02) AM_WRITENOP /* sound reset */ - AM_RANGE(0x6c06, 0x6c06) AM_WRITE(coin_w) - AM_RANGE(0x6c07, 0x6c07) AM_WRITE(nmi_mask_w) - AM_RANGE(0x6c00, 0x6c07) AM_READ(prot2_r) - AM_RANGE(0x6e00, 0x6e00) AM_READWRITE(dsw_r, sound_command_w) + AM_RANGE(0x6c00, 0x6c00) AM_MIRROR(0x81f8) AM_WRITE(flip_screen_x_w) + AM_RANGE(0x6c01, 0x6c01) AM_MIRROR(0x81f8) AM_WRITE(flip_screen_y_w) + AM_RANGE(0x6c02, 0x6c02) AM_MIRROR(0x81f8) AM_WRITE(ressound_w) + AM_RANGE(0x6c06, 0x6c06) AM_MIRROR(0x81f8) AM_WRITE(coin_w) + AM_RANGE(0x6c07, 0x6c07) AM_MIRROR(0x81f8) AM_WRITE(nmi_mask_w) + AM_RANGE(0x6c00, 0x6c07) AM_MIRROR(0x81f8) AM_READ(prot2_r) + AM_RANGE(0x6e00, 0x6e00) AM_MIRROR(0x81f8) AM_READ(dsw_r) AM_DEVWRITE("audiopcb", zac1b11142_audio_device, hs_w) AM_RANGE(0x7000, 0x77ff) AM_RAM AM_RANGE(0x7800, 0x7803) AM_DEVREADWRITE("ppi8255", i8255_device, read, write) AM_RANGE(0x7c00, 0x7c00) AM_READ(watchdog_reset_r) AM_RANGE(0x8000, 0xdfff) AM_ROM ADDRESS_MAP_END -/* slave sound cpu, produces music and sound effects */ -/* mapping: - A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00 - 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram - 0 0 0 x x x x x x x x x x x x x Open bus (for area that doesn't overlap ram) - 0 0 1 x x x x x x x x x x x x x Open bus - 0 1 0 x x x x x x x x x 0 0 x x Open bus - 0 1 0 x x x x x x x x x 0 1 x x Open bus - 0 1 0 x x x x x x x x x 1 0 x x Open bus - 0 1 0 x x x x x x x x x 1 1 * * RW 6821 PIA @ 4I - 0 1 1 x x x x x x x x x x x x x Open bus - 1 0 % % * * * * * * * * * * * * R /CS4A: Enable Rom 13 - 1 1 % % * * * * * * * * * * * * R /CS5A: Enable Rom 9 - note that the % bits go to pins 2 (6802 A12) and 26 (6802 A13) of the roms - monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care - hence for actual chips used, the mem map is: - 1 0 x * * * * * * * * * * * * * R /CS4A: Enable Rom 13 - 1 1 x * * * * * * * * * * * * * R /CS5A: Enable Rom 9 - - 6821 PIA: CA1 comes from the master sound cpu's latch bit 7 (which is also connected to the AY chip at 4G's IOB1); CB1 comes from a periodic counter clocked by the 6802's clock, divided by 4096. CA2 and CB2 are disconnected. PA0-7 connect to the data busses of the AY-3-8910 chips; PB0 and PB1 connect to the BC1 and BDIR pins of the AY chip at 4G; PB2 and PB3 connect to the BC1 and BDIR pins of the AY chip at 4H. -*/ -static ADDRESS_MAP_START( sound_map_1, AS_PROGRAM, 8, zaccaria_state ) - AM_RANGE(0x0000, 0x007f) AM_RAM - AM_RANGE(0x500c, 0x500f) AM_DEVREADWRITE("pia0", pia6821_device, read, write) AM_MIRROR(0x1ff0) - AM_RANGE(0x8000, 0x9fff) AM_ROM AM_MIRROR(0x2000) // rom 13 - AM_RANGE(0xc000, 0xdfff) AM_ROM AM_MIRROR(0x2000) // rom 9 -ADDRESS_MAP_END -/* master sound cpu, controls speech directly */ -/* mapping: - A15 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00 - 0 0 0 0 0 0 0 0 0 * * * * * * * RW 6802 internal ram -**** x 0 0 0 x x x x 1 x x 0 x x * * Open bus (test mode writes as if there was another PIA here) - x 0 0 0 x x x x 1 x x 1 x x * * RW 6821 PIA @ 1I - x 0 0 1 0 0 x x x x x x x x x x W MC1408 DAC - x x 0 1 0 1 x x x x x x x x x x W Command to slave sound1 cpu - x x 0 1 1 0 x x x x x x x x x x R Command read latch from z80 - x x 0 1 1 1 x x x x x x x x x x Open bus - % % 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8 - % % 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7 - note that the % bits go to pins 2 (6802 A14) and 26 (6802 A15) of the roms - monymony and jackrabt both use 2764 roms, which use pin 2 as A12 and pin 26 as N/C don't care - hence for actual chips used, the mem map is: - x * 1 0 * * * * * * * * * * * * R /CS1A: Enable Rom 8 - x * 1 1 * * * * * * * * * * * * R /CS0A: Enable Rom 7 - - 6821 PIA: PA0-7, CA2 and CB1 connect to the TMS5200; CA1 and CB2 are disconnected, though the test mode assumes there's something connected to CB2 (possibly another LED like the one connected to PB4); PB3 connects to 'ACS' which goes to the z80. -*/ -static ADDRESS_MAP_START( sound_map_2, AS_PROGRAM, 8, zaccaria_state ) - AM_RANGE(0x0000, 0x007f) AM_RAM /* 6802 internal ram */ - AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_MIRROR(0x8F6C) - AM_RANGE(0x1000, 0x1000) AM_DEVWRITE("mc1408", dac_device, write_unsigned8) AM_MIRROR(0x83FF) /* MC1408 */ - AM_RANGE(0x1400, 0x1400) AM_WRITE(sound1_command_w) AM_MIRROR(0xC3FF) - AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_MIRROR(0xC3FF) - AM_RANGE(0x2000, 0x2fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 low - AM_RANGE(0x3000, 0x3fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 low - AM_RANGE(0x6000, 0x6fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 high - AM_RANGE(0x7000, 0x7fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 high -ADDRESS_MAP_END - - -CUSTOM_INPUT_MEMBER(zaccaria_state::acs_r) +WRITE8_MEMBER(zaccaria_state::ressound_w) { - return (m_acs & 0x08) ? 1 : 0; + m_audiopcb->ressound_w(data & 0x01); } static INPUT_PORTS_START( monymony ) @@ -437,7 +271,7 @@ static INPUT_PORTS_START( monymony ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaccaria_state,acs_r, NULL) /* "ACS" - from pin 13 of a PIA on the sound board */ + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("audiopcb", zac1b11142_audio_device, acs_r) /* other bits come from a protection device */ INPUT_PORTS_END @@ -508,33 +342,12 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", zaccaria_state, vblank_irq) // MCFG_QUANTUM_TIME(attotime::from_hz(1000000)) - MCFG_CPU_ADD("audiocpu", M6802,XTAL_3_579545MHz) /* verified on pcb */ - MCFG_CPU_PROGRAM_MAP(sound_map_1) - MCFG_CPU_PERIODIC_INT_DRIVER(zaccaria_state, cb1_toggle, (double)XTAL_3_579545MHz/4096) -// MCFG_QUANTUM_TIME(attotime::from_hz(1000000)) - - MCFG_CPU_ADD("audio2", M6802,XTAL_3_579545MHz) /* verified on pcb */ - MCFG_CPU_PROGRAM_MAP(sound_map_2) -// MCFG_QUANTUM_TIME(attotime::from_hz(1000000)) - MCFG_DEVICE_ADD("ppi8255", I8255A, 0) MCFG_I8255_IN_PORTA_CB(IOPORT("P1")) MCFG_I8255_IN_PORTB_CB(IOPORT("P2")) MCFG_I8255_IN_PORTC_CB(IOPORT("SYSTEM")) MCFG_I8255_OUT_PORTC_CB(WRITE8(zaccaria_state, dsw_sel_w)) - MCFG_DEVICE_ADD( "pia0", PIA6821, 0) - MCFG_PIA_READPA_HANDLER(READ8(zaccaria_state, port0a_r)) - MCFG_PIA_WRITEPA_HANDLER(WRITE8(zaccaria_state, port0a_w)) - MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state, port0b_w)) - MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, nmi_line)) - MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("audiocpu", m6802_cpu_device, irq_line)) - - MCFG_DEVICE_ADD( "pia1", PIA6821, 0) - MCFG_PIA_READPA_HANDLER(DEVREAD8("tms", tms5220_device, status_r)) - MCFG_PIA_WRITEPA_HANDLER(DEVWRITE8("tms", tms5220_device, data_w)) - MCFG_PIA_WRITEPB_HANDLER(WRITE8(zaccaria_state,port1b_w)) - /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60.57) /* verified on pcb */ @@ -551,24 +364,8 @@ static MACHINE_CONFIG_START( zaccaria, zaccaria_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") - - MCFG_SOUND_ADD("ay1", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */ - MCFG_AY8910_PORT_B_READ_CB(READ8(driver_device, soundlatch2_byte_r)) - MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(zaccaria_state, ay8910_port0a_w)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) - - MCFG_SOUND_ADD("ay2", AY8910, XTAL_3_579545MHz/2) /* verified on pcb */ - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) - - MCFG_DAC_ADD("mc1408") - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) - - /* There is no xtal, the clock is obtained from a RC oscillator as shown in the TMS5220 datasheet (R=100kOhm C=22pF) */ - /* 162kHz measured on pin 3 20 minutesa fter power on. Clock would then be 162*4=648kHz. */ - MCFG_SOUND_ADD("tms", TMS5200, 649200) /* ROMCLK pin measured at 162.3Khz, OSC is exactly *4 of that) */ - MCFG_TMS52XX_IRQ_HANDLER(DEVWRITELINE("pia1", pia6821_device, cb1_w)) - MCFG_TMS52XX_READYQ_HANDLER(DEVWRITELINE("pia1", pia6821_device, ca2_w)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80) + MCFG_ZACCARIA_1B11142("audiopcb") + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00) MACHINE_CONFIG_END @@ -594,11 +391,11 @@ ROM_START( monymony ) ROM_LOAD( "cpu6.2c", 0x5000, 0x1000, CRC(31da62b1) SHA1(486f07087244f8537510afacb64ddd59eb512a4d) ) ROM_CONTINUE( 0xd000, 0x1000 ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */ + ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */ ROM_LOAD( "snd13.2g", 0x8000, 0x2000, CRC(78b01b98) SHA1(2aabed56cdae9463deb513c0c5021f6c8dfd271e) ) ROM_LOAD( "snd9.1i", 0xc000, 0x2000, CRC(94e3858b) SHA1(04961f67b95798b530bd83355dec612389f22255) ) - ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */ + ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */ ROM_LOAD( "snd8.1h", 0x2000, 0x1000, CRC(aad76193) SHA1(e08fc184efced392ee902c4cc9daaaf3310cdfe2) ) ROM_CONTINUE( 0x6000, 0x1000 ) ROM_LOAD( "snd7.1g", 0x3000, 0x1000, CRC(1e8ffe3e) SHA1(858ee7abe88d5801237e519cae2b50ae4bf33a58) ) @@ -629,11 +426,11 @@ ROM_START( jackrabt ) ROM_LOAD( "cpu-01.5h", 0xc000, 0x1000, CRC(785e1a01) SHA1(a748d300be9455cad4f912e01c2279bb8465edfe) ) ROM_LOAD( "cpu-01.6h", 0xd000, 0x1000, CRC(dd5979cf) SHA1(e9afe7002b2258a1c3132bdd951c6e20d473fb6a) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */ + ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */ ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) ) ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) ) - ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */ + ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */ ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) ) ROM_CONTINUE( 0x6000, 0x1000 ) ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) ) @@ -668,11 +465,11 @@ ROM_START( jackrabt2 ) ROM_LOAD( "6cpu2.2c", 0x5000, 0x1000, CRC(404496eb) SHA1(44381e27e540fe9d8cacab4c3b1fe9a4f20d26a8) ) ROM_CONTINUE( 0xd000, 0x1000 ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */ + ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */ ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) ) ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) ) - ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */ + ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */ ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) ) ROM_CONTINUE( 0x6000, 0x1000 ) ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) ) @@ -709,11 +506,11 @@ ROM_START( jackrabts ) ROM_LOAD( "6cpu.2c", 0x5000, 0x1000, CRC(f53d6356) SHA1(9b167edca59cf81a2468368a372bab132f15e2ea) ) ROM_CONTINUE( 0xd000, 0x1000 ) - ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for first 6802 */ + ROM_REGION( 0x10000, "audiopcb:melodycpu", 0 ) /* 64k for first 6802 */ ROM_LOAD( "13snd.2g", 0x8000, 0x2000, CRC(fc05654e) SHA1(ed9c66672fe89c41e320e1d27b53f5efa92dce9c) ) ROM_LOAD( "9snd.1i", 0xc000, 0x2000, CRC(3dab977f) SHA1(3e79c06d2e70b050f01b7ac58be5127ba87904b0) ) - ROM_REGION( 0x10000, "audio2", 0 ) /* 64k for second 6802 */ + ROM_REGION( 0x10000, "audiopcb:audiocpu", 0 ) /* 64k for second 6802 */ ROM_LOAD( "8snd.1h", 0x2000, 0x1000, CRC(f4507111) SHA1(0513f0831b94aeda84aa4f3b4a7c60dfc5113b2d) ) ROM_CONTINUE( 0x6000, 0x1000 ) ROM_LOAD( "7snd.1g", 0x3000, 0x1000, CRC(c722eff8) SHA1(d8d1c091ab80ea2d6616e4dc030adc9905c0a496) ) diff --git a/src/mame/includes/apple1.h b/src/mame/includes/apple1.h deleted file mode 100644 index 35215b9e9a3..00000000000 --- a/src/mame/includes/apple1.h +++ /dev/null @@ -1,92 +0,0 @@ -// license:??? -// copyright-holders:Paul Daniels, Colin Howell, R. Belmont -/***************************************************************************** - * - * includes/apple1.h - * - ****************************************************************************/ - -#ifndef APPLE1_H_ -#define APPLE1_H_ - -#include "imagedev/snapquik.h" -#include "machine/ram.h" - -typedef short termchar_t; - -struct terminal_t -{ - tilemap_t *tm; - int gfx; - int blank_char; - int char_bits; - int num_cols; - int num_rows; - int (*getcursorcode)(int original_code); - int cur_offset; - int cur_hidden; - termchar_t mem[1]; -}; - - -class apple1_state : public driver_device -{ -public: - apple1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen") { } - - int m_vh_clrscrn_pressed; - int m_kbd_data; - UINT32 m_kbd_last_scan[4]; - int m_reset_flag; - terminal_t *m_current_terminal; - terminal_t *m_terminal; - int m_blink_on; - DECLARE_DRIVER_INIT(apple1); - TILE_GET_INFO_MEMBER(terminal_gettileinfo); - virtual void machine_reset() override; - virtual void video_start() override; - UINT32 screen_update_apple1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TIMER_CALLBACK_MEMBER(apple1_kbd_poll); - TIMER_CALLBACK_MEMBER(apple1_kbd_strobe_end); - TIMER_CALLBACK_MEMBER(apple1_dsp_ready_start); - TIMER_CALLBACK_MEMBER(apple1_dsp_ready_end); - DECLARE_READ8_MEMBER(apple1_pia0_kbdin); - DECLARE_WRITE8_MEMBER(apple1_pia0_dspout); - DECLARE_WRITE_LINE_MEMBER(apple1_pia0_dsp_write_signal); - required_device<cpu_device> m_maincpu; - void terminal_draw(screen_device &screen, bitmap_ind16 &dest, const rectangle &cliprect, terminal_t *terminal); - void verify_coords(terminal_t *terminal, int x, int y); - void terminal_putchar(terminal_t *terminal, int x, int y, int ch); - int terminal_getchar(terminal_t *terminal, int x, int y); - void terminal_putblank(terminal_t *terminal, int x, int y); - void terminal_dirtycursor(terminal_t *terminal); - void terminal_setcursor(terminal_t *terminal, int x, int y); - void terminal_hidecursor(terminal_t *terminal); - void terminal_showcursor(terminal_t *terminal); - void terminal_getcursor(terminal_t *terminal, int *x, int *y); - void terminal_fill(terminal_t *terminal, int val); - void terminal_clear(terminal_t *terminal); - void apple1_vh_dsp_w (int data); - void apple1_vh_dsp_clr (); - void apple1_vh_cursor_blink (); - int apple1_verify_header (UINT8 *data); - terminal_t *terminal_create(int gfx, int blank_char, int char_bits,int (*getcursorcode)(int original_code),int num_cols, int num_rows); - attotime apple1_vh_dsp_time_to_ready(); - DECLARE_SNAPSHOT_LOAD_MEMBER( apple1 ); - required_device<ram_device> m_ram; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; -}; - - -/*----------- defined in drivers/apple1.c -----------*/ - -extern const gfx_layout apple1_charlayout; - - -#endif /* APPLE1_H_ */ diff --git a/src/mame/includes/arcadecl.h b/src/mame/includes/arcadecl.h index 7a580d012c1..056875df906 100644 --- a/src/mame/includes/arcadecl.h +++ b/src/mame/includes/arcadecl.h @@ -8,15 +8,18 @@ #include "machine/atarigen.h" #include "video/atarimo.h" +#include "sound/okim6295.h" class arcadecl_state : public atarigen_state { public: arcadecl_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), + m_oki(*this, "oki"), m_mob(*this, "mob"), m_bitmap(*this, "bitmap") { } + required_device<okim6295_device> m_oki; optional_device<atari_motion_objects_device> m_mob; required_shared_ptr<UINT16> m_bitmap; diff --git a/src/mame/includes/arkanoid.h b/src/mame/includes/arkanoid.h index 483975bd45f..3bae2fd73bf 100644 --- a/src/mame/includes/arkanoid.h +++ b/src/mame/includes/arkanoid.h @@ -62,7 +62,7 @@ public: UINT8 m_ddr_c; UINT8 m_tdr; UINT8 m_tcr; - + emu_timer *m_68705_timer; /* hexaa */ UINT8 m_hexaa_from_main; diff --git a/src/mame/includes/atarig1.h b/src/mame/includes/atarig1.h index 3cef67afe31..01e9b3e9e82 100644 --- a/src/mame/includes/atarig1.h +++ b/src/mame/includes/atarig1.h @@ -55,9 +55,6 @@ public: void update_bank(int bank); DECLARE_DRIVER_INIT(hydrap); DECLARE_DRIVER_INIT(hydra); - DECLARE_DRIVER_INIT(pitfight9); - DECLARE_DRIVER_INIT(pitfight7); - DECLARE_DRIVER_INIT(pitfightj); DECLARE_DRIVER_INIT(pitfight); DECLARE_DRIVER_INIT(pitfightb); TILE_GET_INFO_MEMBER(get_alpha_tile_info); @@ -67,6 +64,5 @@ public: DECLARE_VIDEO_START(atarig1); UINT32 screen_update_atarig1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); private: - void init_common(offs_t slapstic_base, int slapstic, bool is_pitfight); void pitfightb_cheap_slapstic_init(); }; diff --git a/src/mame/includes/atarisy1.h b/src/mame/includes/atarisy1.h index a2e27c24704..3c0c0d5e4ec 100644 --- a/src/mame/includes/atarisy1.h +++ b/src/mame/includes/atarisy1.h @@ -15,6 +15,8 @@ class atarisy1_state : public atarigen_state public: atarisy1_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), + m_audiocpu(*this, "audiocpu"), + m_soundcomm(*this, "soundcomm"), m_bankselect(*this, "bankselect"), m_mob(*this, "mob"), m_joystick_timer(*this, "joystick_timer"), @@ -25,6 +27,9 @@ public: m_int3off_timer(*this, "int3off_timer"), m_tms(*this, "tms") { } + required_device<cpu_device> m_audiocpu; + required_device<atari_sound_comm_device> m_soundcomm; + required_shared_ptr<UINT16> m_bankselect; required_device<atari_motion_objects_device> m_mob; @@ -67,8 +72,7 @@ public: DECLARE_READ8_MEMBER(via_pa_r); DECLARE_WRITE8_MEMBER(via_pb_w); DECLARE_READ8_MEMBER(via_pb_r); - DECLARE_DRIVER_INIT(roadb110); - DECLARE_DRIVER_INIT(roadb109); + DECLARE_DRIVER_INIT(roadblst); DECLARE_DRIVER_INIT(peterpak); DECLARE_DRIVER_INIT(marble); DECLARE_DRIVER_INIT(roadrunn); diff --git a/src/mame/includes/atarisy2.h b/src/mame/includes/atarisy2.h index 21be1d85549..3fefb6a7130 100644 --- a/src/mame/includes/atarisy2.h +++ b/src/mame/includes/atarisy2.h @@ -10,6 +10,9 @@ #include "video/atarimo.h" #include "cpu/m6502/m6502.h" #include "cpu/t11/t11.h" +#include "sound/2151intf.h" +#include "sound/pokey.h" +#include "sound/tms5220.h" #include "slapstic.h" class atarisy2_state : public atarigen_state @@ -23,6 +26,11 @@ public: m_slapstic_base(*this, "slapstic_base"), m_playfield_tilemap(*this, "playfield"), m_alpha_tilemap(*this, "alpha"), + m_soundcomm(*this, "soundcomm"), + m_ym2151(*this, "ymsnd"), + m_pokey1(*this, "pokey1"), + m_pokey2(*this, "pokey2"), + m_tms5220(*this, "tms"), m_rombank1(*this, "rombank1"), m_rombank2(*this, "rombank2"), m_slapstic(*this, "slapstic") @@ -40,7 +48,11 @@ public: INT8 m_pedal_count; - UINT8 m_has_tms5220; + required_device<atari_sound_comm_device> m_soundcomm; + required_device<ym2151_device> m_ym2151; + required_device<pokey_device> m_pokey1; + required_device<pokey_device> m_pokey2; + optional_device<tms5220_device> m_tms5220; UINT8 m_which_adc; diff --git a/src/mame/includes/badlands.h b/src/mame/includes/badlands.h index dca560b4466..a23ec09a2c3 100644 --- a/src/mame/includes/badlands.h +++ b/src/mame/includes/badlands.h @@ -14,9 +14,14 @@ class badlands_state : public atarigen_state public: badlands_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), + m_audiocpu(*this, "audiocpu"), + m_soundcomm(*this, "soundcomm"), m_playfield_tilemap(*this, "playfield"), m_mob(*this, "mob") { } + optional_device<cpu_device> m_audiocpu; + optional_device<atari_sound_comm_device> m_soundcomm; + required_device<tilemap_device> m_playfield_tilemap; required_device<atari_motion_objects_device> m_mob; diff --git a/src/mame/includes/blmbycar.h b/src/mame/includes/blmbycar.h index 2fbc5390e01..af7b6f120f4 100644 --- a/src/mame/includes/blmbycar.h +++ b/src/mame/includes/blmbycar.h @@ -11,14 +11,19 @@ class blmbycar_state : public driver_device public: blmbycar_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), m_vram_1(*this, "vram_1"), m_vram_0(*this, "vram_0"), m_scroll_1(*this, "scroll_1"), m_scroll_0(*this, "scroll_0"), - m_spriteram(*this, "spriteram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_spriteram(*this, "spriteram") { } + + /* devices */ + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; /* memory pointers */ required_shared_ptr<UINT16> m_vram_1; @@ -35,25 +40,31 @@ public: UINT8 m_pot_wheel; // blmbycar int m_old_val; // blmbycar int m_retvalue; // waterball - DECLARE_WRITE16_MEMBER(blmbycar_okibank_w); + + // common + DECLARE_WRITE16_MEMBER(okibank_w); + DECLARE_WRITE16_MEMBER(vram_0_w); + DECLARE_WRITE16_MEMBER(vram_1_w); + + // blmbycar DECLARE_WRITE16_MEMBER(blmbycar_pot_wheel_reset_w); DECLARE_WRITE16_MEMBER(blmbycar_pot_wheel_shift_w); DECLARE_READ16_MEMBER(blmbycar_pot_wheel_r); DECLARE_READ16_MEMBER(blmbycar_opt_wheel_r); + + // waterball DECLARE_READ16_MEMBER(waterball_unk_r); - DECLARE_WRITE16_MEMBER(blmbycar_vram_0_w); - DECLARE_WRITE16_MEMBER(blmbycar_vram_1_w); - DECLARE_DRIVER_INIT(blmbycar); + TILE_GET_INFO_MEMBER(get_tile_info_0); TILE_GET_INFO_MEMBER(get_tile_info_1); + + DECLARE_DRIVER_INIT(blmbycar); virtual void video_start() override; DECLARE_MACHINE_START(blmbycar); DECLARE_MACHINE_RESET(blmbycar); DECLARE_MACHINE_START(watrball); DECLARE_MACHINE_RESET(watrball); - UINT32 screen_update_blmbycar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; }; diff --git a/src/mame/includes/chihiro.h b/src/mame/includes/chihiro.h index a9efcc711e3..0a1915157c6 100644 --- a/src/mame/includes/chihiro.h +++ b/src/mame/includes/chihiro.h @@ -3,6 +3,8 @@ /* * geforce 3d (NV2A) vertex program disassembler */ +#include <mutex> + class vertex_program_disassembler { static const char *srctypes[]; static const char *scaops[]; @@ -344,6 +346,15 @@ public: B8 = 9, G8B8 = 10 }; + enum class NV2A_GL_FRONT_FACE { + CW = 0x0900, + CCW = 0x0901 + }; + enum class NV2A_GL_CULL_FACE { + FRONT = 0x0404, + BACK = 0x0405, + FRONT_AND_BACK = 0x0408 + }; nv2a_renderer(running_machine &machine) : poly_manager<float, nvidia_object_data, 13, 8192>(machine) { @@ -357,11 +368,13 @@ public: objectdata = &(object_data_alloc()); objectdata->data = this; combiner.used = 0; - combiner.lock = osd_lock_alloc(); enabled_vertex_attributes = 0; indexesleft_count = 0; vertex_pipeline = 4; color_mask = 0xffffffff; + backface_culling_enabled = false; + backface_culling_winding = NV2A_GL_FRONT_FACE::CCW; + backface_culling_culled = NV2A_GL_CULL_FACE::BACK; alpha_test_enabled = false; alpha_reference = 0; alpha_func = NV2A_COMPARISON_OP::ALWAYS; @@ -463,6 +476,7 @@ public: int read_vertices_0x1810(address_space & space, vertex_nv *destination, int offset, int limit); int read_vertices_0x1818(address_space & space, vertex_nv *destination, UINT32 address, int limit); void convert_vertices_poly(vertex_nv *source, vertex_t *destination, int count); + UINT32 render_triangle_culling(const rectangle &cliprect, render_delegate callback, int paramcount, const vertex_t &_v1, const vertex_t &_v2, const vertex_t &_v3); void clear_render_target(int what, UINT32 value); void clear_depth_buffer(int what, UINT32 value); inline UINT8 *direct_access_ptr(offs_t address); @@ -626,9 +640,12 @@ public: } final; int stages; int used; - osd_lock *lock; + std::mutex lock; } combiner; UINT32 color_mask; + bool backface_culling_enabled; + NV2A_GL_FRONT_FACE backface_culling_winding; + NV2A_GL_CULL_FACE backface_culling_culled; bool alpha_test_enabled; NV2A_COMPARISON_OP alpha_func; int alpha_reference; diff --git a/src/mame/includes/cyberbal.h b/src/mame/includes/cyberbal.h index 0bc65bccb57..aca6711a0ae 100644 --- a/src/mame/includes/cyberbal.h +++ b/src/mame/includes/cyberbal.h @@ -24,6 +24,7 @@ public: m_daccpu(*this, "dac"), m_dac1(*this, "dac1"), m_dac2(*this, "dac2"), + m_soundcomm(*this, "soundcomm"), m_jsa(*this, "jsa"), m_playfield_tilemap(*this, "playfield"), m_alpha_tilemap(*this, "alpha"), @@ -40,6 +41,7 @@ public: optional_device<cpu_device> m_daccpu; optional_device<dac_device> m_dac1; optional_device<dac_device> m_dac2; + optional_device<atari_sound_comm_device> m_soundcomm; optional_device<atari_jsa_ii_device> m_jsa; required_device<tilemap_device> m_playfield_tilemap; required_device<tilemap_device> m_alpha_tilemap; @@ -76,8 +78,6 @@ public: DECLARE_WRITE16_MEMBER(sound_68k_w); DECLARE_WRITE16_MEMBER(sound_68k_dac_w); DECLARE_DRIVER_INIT(cyberbalt); - DECLARE_DRIVER_INIT(cyberbal2p); - DECLARE_DRIVER_INIT(cyberbal); TILE_GET_INFO_MEMBER(get_alpha_tile_info); TILE_GET_INFO_MEMBER(get_playfield_tile_info); DECLARE_MACHINE_START(cyberbal); diff --git a/src/mame/includes/electron.h b/src/mame/includes/electron.h index 81d6b9ca171..bfa6de0f5a7 100644 --- a/src/mame/includes/electron.h +++ b/src/mame/includes/electron.h @@ -23,10 +23,10 @@ #define INT_HIGH_TONE 0x40 #define INT_TRANSMIT_EMPTY 0x20 #define INT_RECEIVE_FULL 0x10 -#define INT_RTC 0x08 +#define INT_RTC 0x08 #define INT_DISPLAY_END 0x04 -#define INT_SET 0x100 -#define INT_CLEAR 0x200 +#define INT_SET 0x100 +#define INT_CLEAR 0x200 /* ULA context */ @@ -83,12 +83,12 @@ public: int m_map16[256]; emu_timer *m_scanline_timer; DECLARE_READ8_MEMBER(electron_read_keyboard); + DECLARE_READ8_MEMBER(electron_fred_r); + DECLARE_WRITE8_MEMBER(electron_fred_w); DECLARE_READ8_MEMBER(electron_jim_r); DECLARE_WRITE8_MEMBER(electron_jim_w); - DECLARE_READ8_MEMBER(electron_1mhz_r); - DECLARE_WRITE8_MEMBER(electron_1mhz_w); - DECLARE_READ8_MEMBER(electron_ula_r); - DECLARE_WRITE8_MEMBER(electron_ula_w); + DECLARE_READ8_MEMBER(electron_sheila_r); + DECLARE_WRITE8_MEMBER(electron_sheila_w); void electron_tape_start(); void electron_tape_stop(); virtual void machine_start() override; @@ -108,6 +108,7 @@ public: inline void electron_plot_pixel(bitmap_ind16 &bitmap, int x, int y, UINT32 color); void electron_interrupt_handler(int mode, int interrupt); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( electron_cart ); + DECLARE_INPUT_CHANGED_MEMBER( trigger_reset ); protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; diff --git a/src/mame/includes/fidelz80.h b/src/mame/includes/fidelz80.h index c9aea6bafc4..3f57cc38ec6 100644 --- a/src/mame/includes/fidelz80.h +++ b/src/mame/includes/fidelz80.h @@ -7,7 +7,11 @@ ******************************************************************************/ #include "emu.h" +#include "sound/speaker.h" #include "sound/s14001a.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" +#include "softlist.h" class fidelz80base_state : public driver_device { @@ -18,6 +22,8 @@ public: m_inp_matrix(*this, "IN"), m_speech(*this, "speech"), m_speech_rom(*this, "speech"), + m_speaker(*this, "speaker"), + m_cart(*this, "cartslot"), m_display_wait(33), m_display_maxy(1), m_display_maxx(0) @@ -25,18 +31,22 @@ public: // devices/pointers required_device<cpu_device> m_maincpu; - optional_ioport_array<10> m_inp_matrix; // max 10 + optional_ioport_array<11> m_inp_matrix; // max 11 optional_device<s14001a_device> m_speech; optional_region_ptr<UINT8> m_speech_rom; + optional_device<speaker_sound_device> m_speaker; + optional_device<generic_slot_device> m_cart; // misc common UINT16 m_inp_mux; // multiplexed keypad/leds mask - UINT16 m_led_select; // 5 bit selects for 7 seg leds and for common other leds, bits are (7seg leds are 0 1 2 3, common other leds are C) 0bxx3210xc - UINT16 m_7seg_data; // data for seg leds + UINT16 m_led_select; + UINT16 m_7seg_data; // data for seg leds UINT16 m_led_data; - UINT8 m_speech_bank; + UINT8 m_speech_data; + UINT8 m_speech_bank; // speech rom higher address bits UINT16 read_inputs(int columns); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(scc_cartridge); // display common int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) @@ -51,7 +61,8 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); + void set_display_segmask(UINT32 digits, UINT32 mask); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); protected: virtual void machine_start() override; diff --git a/src/mame/includes/galpanic.h b/src/mame/includes/galpanic.h index 788ca087540..0ab503e6742 100644 --- a/src/mame/includes/galpanic.h +++ b/src/mame/includes/galpanic.h @@ -10,7 +10,6 @@ public: m_maincpu(*this, "maincpu"), m_bgvideoram(*this, "bgvideoram"), m_fgvideoram(*this, "fgvideoram"), - m_spriteram(*this, "spriteram"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), @@ -20,23 +19,23 @@ public: required_device<cpu_device> m_maincpu; required_shared_ptr<UINT16> m_bgvideoram; required_shared_ptr<UINT16> m_fgvideoram; - bitmap_ind16 m_bitmap; - bitmap_ind16 m_sprites_bitmap; - optional_shared_ptr<UINT16> m_spriteram; required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; required_device<palette_device> m_palette; required_device<kaneko_pandora_device> m_pandora; - DECLARE_WRITE16_MEMBER(galpanic_6295_bankswitch_w); - DECLARE_WRITE16_MEMBER(galpanic_coin_w); + bitmap_ind16 m_bitmap; + + DECLARE_WRITE16_MEMBER(m6295_bankswitch_w); + DECLARE_WRITE16_MEMBER(coin_w); + DECLARE_WRITE16_MEMBER(bgvideoram_w); - DECLARE_VIDEO_START(galpanic); + virtual void machine_start() override; + virtual void video_start() override; DECLARE_PALETTE_INIT(galpanic); - UINT32 screen_update_galpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void screen_eof_galpanic(screen_device &screen, bool state); - TIMER_DEVICE_CALLBACK_MEMBER(galpanic_scanline); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void screen_eof(screen_device &screen, bool state); + TIMER_DEVICE_CALLBACK_MEMBER(scanline); void draw_fgbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); - /*----------- defined in video/galpanic.c -----------*/ - DECLARE_WRITE16_MEMBER( galpanic_bgvideoram_w ); }; diff --git a/src/mame/includes/gauntlet.h b/src/mame/includes/gauntlet.h index 685021ebaa8..e14e72776a2 100644 --- a/src/mame/includes/gauntlet.h +++ b/src/mame/includes/gauntlet.h @@ -8,16 +8,30 @@ #include "machine/atarigen.h" #include "video/atarimo.h" +#include "sound/2151intf.h" +#include "sound/pokey.h" +#include "sound/tms5220.h" class gauntlet_state : public atarigen_state { public: gauntlet_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), + m_audiocpu(*this, "audiocpu"), + m_soundcomm(*this, "soundcomm"), + m_ym2151(*this, "ymsnd"), + m_pokey(*this, "pokey"), + m_tms5220(*this, "tms"), m_playfield_tilemap(*this, "playfield"), m_alpha_tilemap(*this, "alpha"), m_mob(*this, "mob") { } + required_device<cpu_device> m_audiocpu; + required_device<atari_sound_comm_device> m_soundcomm; + required_device<ym2151_device> m_ym2151; + required_device<pokey_device> m_pokey; + required_device<tms5220_device> m_tms5220; + required_device<tilemap_device> m_playfield_tilemap; required_device<tilemap_device> m_alpha_tilemap; required_device<atari_motion_objects_device> m_mob; @@ -33,9 +47,7 @@ public: DECLARE_WRITE8_MEMBER(sound_ctl_w); DECLARE_WRITE8_MEMBER(mixer_w); void swap_memory(void *ptr1, void *ptr2, int bytes); - void common_init(int slapstic, int vindctr2); - DECLARE_DRIVER_INIT(gauntlet2); - DECLARE_DRIVER_INIT(gaunt2p); + void common_init(int vindctr2); DECLARE_DRIVER_INIT(gauntlet); DECLARE_DRIVER_INIT(vindctr2); TILE_GET_INFO_MEMBER(get_alpha_tile_info); diff --git a/src/mame/includes/glass.h b/src/mame/includes/glass.h index 4fc0cbe59ee..a3ae64203f5 100644 --- a/src/mame/includes/glass.h +++ b/src/mame/includes/glass.h @@ -11,13 +11,19 @@ class glass_state : public driver_device public: glass_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), m_videoram(*this, "videoram"), m_vregs(*this, "vregs"), m_spriteram(*this, "spriteram"), - m_mainram(*this, "mainram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_mainram(*this, "mainram") { } + + + /* devices */ + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; /* memory pointers */ required_shared_ptr<UINT16> m_videoram; @@ -34,27 +40,25 @@ public: int m_current_command; int m_cause_interrupt; int m_blitter_serial_buffer[5]; + DECLARE_WRITE16_MEMBER(clr_int_w); DECLARE_WRITE16_MEMBER(OKIM6295_bankswitch_w); - DECLARE_WRITE16_MEMBER(glass_coin_w); - DECLARE_WRITE16_MEMBER(glass_blitter_w); - DECLARE_WRITE16_MEMBER(glass_vram_w); - - DECLARE_READ16_MEMBER( glass_mainram_r ); - DECLARE_WRITE16_MEMBER( glass_mainram_w ); + DECLARE_WRITE16_MEMBER(coin_w); + DECLARE_WRITE16_MEMBER(blitter_w); + DECLARE_WRITE16_MEMBER(vram_w); + DECLARE_READ16_MEMBER(mainram_r); + DECLARE_WRITE16_MEMBER(mainram_w); DECLARE_DRIVER_INIT(glass); DECLARE_DRIVER_INIT(glassp); - TILE_GET_INFO_MEMBER(get_tile_info_glass_screen0); - TILE_GET_INFO_MEMBER(get_tile_info_glass_screen1); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - UINT32 screen_update_glass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(glass_interrupt); + + TILE_GET_INFO_MEMBER(get_tile_info_screen0); + TILE_GET_INFO_MEMBER(get_tile_info_screen1); + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + INTERRUPT_GEN_MEMBER(interrupt); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void glass_ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 ); - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; + void ROM16_split_gfx( const char *src_reg, const char *dst_reg, int start, int length, int dest1, int dest2 ); }; diff --git a/src/mame/includes/hh_tms1k.h b/src/mame/includes/hh_tms1k.h index 4a7ccb99467..fc05dc3baf9 100644 --- a/src/mame/includes/hh_tms1k.h +++ b/src/mame/includes/hh_tms1k.h @@ -41,6 +41,7 @@ public: bool m_power_led; UINT8 read_inputs(int columns); + UINT8 read_rotated_inputs(int columns, UINT8 rowmask = 0xf); virtual DECLARE_INPUT_CHANGED_MEMBER(power_button); virtual DECLARE_WRITE_LINE_MEMBER(auto_power_off); @@ -60,8 +61,8 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); - void display_matrix_seg(int maxx, int maxy, UINT32 setx, UINT32 sety, UINT16 segmask); + void set_display_segmask(UINT32 digits, UINT32 mask); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); protected: virtual void machine_start() override; diff --git a/src/mame/includes/hh_ucom4.h b/src/mame/includes/hh_ucom4.h index 76b3a5d7a02..36a525254b6 100644 --- a/src/mame/includes/hh_ucom4.h +++ b/src/mame/includes/hh_ucom4.h @@ -55,7 +55,7 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); void display_update(); void set_display_size(int maxx, int maxy); - void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety, bool update = true); protected: virtual void machine_start() override; diff --git a/src/mame/includes/laserbat.h b/src/mame/includes/laserbat.h index f50cd4e1bd9..e3b130a109d 100644 --- a/src/mame/includes/laserbat.h +++ b/src/mame/includes/laserbat.h @@ -6,6 +6,8 @@ *************************************************************************/ +#include "audio/zaccaria.h" + #include "machine/6821pia.h" #include "machine/pla.h" #include "machine/s2636.h" @@ -65,9 +67,6 @@ public: DECLARE_DRIVER_INIT(laserbat); INTERRUPT_GEN_MEMBER(laserbat_interrupt); - // video initialisation - DECLARE_PALETTE_INIT(laserbat); - // video memory and control ports DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_WRITE8_MEMBER(wcoh_w); @@ -162,6 +161,9 @@ public: { } + // video initialisation + DECLARE_PALETTE_INIT(laserbat); + // sound control ports virtual DECLARE_WRITE8_MEMBER(csound2_w) override; @@ -185,43 +187,17 @@ class catnmous_state : public laserbat_state_base public: catnmous_state(const machine_config &mconfig, device_type type, const char *tag) : laserbat_state_base(mconfig, type, tag) - , m_audiocpu(*this, "audiocpu") - , m_pia(*this, "pia") - , m_psg1(*this, "psg1") - , m_psg2(*this, "psg2") - , m_cb1(false) + , m_audiopcb(*this, "audiopcb") { } + // video initialisation + DECLARE_PALETTE_INIT(catnmous); + // sound control ports virtual DECLARE_WRITE8_MEMBER(csound1_w) override; virtual DECLARE_WRITE8_MEMBER(csound2_w) override; - // PIA handlers - DECLARE_READ8_MEMBER(pia_porta_r); - DECLARE_WRITE8_MEMBER(pia_porta_w); - DECLARE_WRITE8_MEMBER(pia_portb_w); - DECLARE_WRITE_LINE_MEMBER(pia_irqa); - DECLARE_WRITE_LINE_MEMBER(pia_irqb); - - // PSG handlers - DECLARE_WRITE8_MEMBER(psg1_porta_w); - DECLARE_READ8_MEMBER(psg1_portb_r); - - // periodic signal generators - INTERRUPT_GEN_MEMBER(cb1_toggle); - protected: - - // initialisation/startup - virtual void machine_start() override; - - // sound board devices - required_device<cpu_device> m_audiocpu; - required_device<pia6821_device> m_pia; - required_device<ay8910_device> m_psg1; - required_device<ay8910_device> m_psg2; - - // control line states - bool m_cb1; + required_device<zac1b11107_audio_device> m_audiopcb; }; diff --git a/src/mame/includes/m5.h b/src/mame/includes/m5.h index 7ba55be8172..9b5d82b0c00 100644 --- a/src/mame/includes/m5.h +++ b/src/mame/includes/m5.h @@ -1,9 +1,12 @@ // license:BSD-3-Clause -// copyright-holders:Curt Coder +// copyright-holders:Curt Coder, Ales Dlabac #ifndef __M5__ #define __M5__ + #include "machine/z80ctc.h" +#include "imagedev/snapquik.h" + #define Z80_TAG "ic17" #define Z80CTC_TAG "ic19" @@ -15,6 +18,10 @@ #define UPD765_TAG "upd765" #define CENTRONICS_TAG "centronics" #define SCREEN_TAG "screen" +//brno mod +#define WD2797_TAG "5f" +#define RAMDISK "ramdisk" + class m5_state : public driver_device { @@ -22,36 +29,40 @@ public: m5_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, Z80_TAG), - m_fd5cpu(*this, Z80_FD5_TAG), m_ctc(*this, Z80CTC_TAG), + m_fd5cpu(*this, Z80_FD5_TAG), m_ppi(*this, I8255A_TAG), m_fdc(*this, UPD765_TAG), + m_floppy0(*this, UPD765_TAG ":0:525dd"), m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), + m_cart1(*this, "cartslot1"), + m_cart2(*this, "cartslot2"), m_centronics(*this, CENTRONICS_TAG), m_ram(*this, RAM_TAG), - m_floppy0(*this, UPD765_TAG ":0:525dd"), - m_reset(*this, "RESET") + m_reset(*this, "RESET"), + m_DIPS(*this, "DIPS") { } required_device<cpu_device> m_maincpu; - required_device<cpu_device> m_fd5cpu; required_device<z80ctc_device> m_ctc; - required_device<i8255_device> m_ppi; - required_device<upd765a_device> m_fdc; + //I've changed following devices to optional since we have to remove them in BRNO mod (I don't know better solution) + optional_device<cpu_device> m_fd5cpu; + optional_device<i8255_device> m_ppi; + optional_device<upd765a_device> m_fdc; + optional_device<floppy_image_device> m_floppy0; required_device<cassette_image_device> m_cassette; - required_device<generic_slot_device> m_cart; + optional_device<m5_cart_slot_device> m_cart1; + optional_device<m5_cart_slot_device> m_cart2; required_device<centronics_device> m_centronics; required_device<ram_device> m_ram; - required_device<floppy_image_device> m_floppy0; required_ioport m_reset; + optional_ioport m_DIPS; virtual void machine_start() override; virtual void machine_reset() override; DECLARE_READ8_MEMBER( sts_r ); DECLARE_WRITE8_MEMBER( com_w ); - DECLARE_READ8_MEMBER( ppi_pa_r ); DECLARE_WRITE8_MEMBER( ppi_pa_w ); DECLARE_WRITE8_MEMBER( ppi_pb_w ); @@ -65,23 +76,90 @@ public: DECLARE_WRITE8_MEMBER( fd5_ctrl_w ); DECLARE_WRITE8_MEMBER( fd5_tc_w ); + DECLARE_FLOPPY_FORMATS( floppy_formats ); + // video state // const TMS9928a_interface *m_vdp_intf; int m_centronics_busy; DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); - // floppy state + DECLARE_DRIVER_INIT(pal); + DECLARE_DRIVER_INIT(ntsc); + DECLARE_WRITE_LINE_MEMBER(sordm5_video_interrupt_callback); + + // memory + DECLARE_READ8_MEMBER( mem64KBI_r ); + DECLARE_WRITE8_MEMBER( mem64KBI_w ); + DECLARE_WRITE8_MEMBER( mem64KBF_w ); + DECLARE_WRITE8_MEMBER( mem64KRX_w ); + UINT8 m_ram_mode; + UINT8 m_ram_type; + memory_region *m_cart_rom; + m5_cart_slot_device *m_cart_ram, *m_cart; + + // floppy state for fd5 UINT8 m_fd5_data; UINT8 m_fd5_com; int m_intra; int m_ibfa; int m_obfa; - DECLARE_DRIVER_INIT(pal); - DECLARE_DRIVER_INIT(ntsc); - DECLARE_WRITE_LINE_MEMBER(sordm5_video_interrupt_callback); +}; + + +class brno_state : public m5_state +{ +public: + brno_state(const machine_config &mconfig, device_type type, const char *tag) + : m5_state(mconfig, type, tag), + + m_fdc(*this, WD2797_TAG), + m_floppy0(*this, WD2797_TAG":0"), + m_floppy1(*this, WD2797_TAG":1") + // m_ramdisk(*this, RAMDISK) + { } + + + required_device<wd2797_t> m_fdc; + required_device<floppy_connector> m_floppy0; + optional_device<floppy_connector> m_floppy1; + floppy_image_device *m_floppy; + + + + DECLARE_READ8_MEMBER( mmu_r ); + DECLARE_WRITE8_MEMBER( mmu_w ); + DECLARE_READ8_MEMBER( ramsel_r ); + DECLARE_WRITE8_MEMBER(ramsel_w ); + DECLARE_READ8_MEMBER( romsel_r ); + DECLARE_WRITE8_MEMBER(romsel_w ); + + DECLARE_READ8_MEMBER( fd_r ); + DECLARE_WRITE8_MEMBER( fd_w ); DECLARE_FLOPPY_FORMATS( floppy_formats ); + + +// DECLARE_WRITE_LINE_MEMBER( wd2797_intrq_w ); +// DECLARE_WRITE_LINE_MEMBER( wd2797_drq_w ); +// DECLARE_WRITE_LINE_MEMBER( wd2797_index_callback); + + //required_device<ram_device> m_ramdisk; + DECLARE_DRIVER_INIT(brno); + DECLARE_SNAPSHOT_LOAD_MEMBER( brno ); +// DECLARE_DEVICE_IMAGE_LOAD_MEMBER(m5_cart); + + + virtual void machine_start() override; + virtual void machine_reset() override; + + UINT8 m_rambank; // bank # + UINT8 m_ramcpu; //where Ramdisk bank is mapped + bool m_romen; + bool m_ramen; + + + UINT8 m_rammap[16]; // memory map }; #endif diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h index b76f3192a33..142c71ae407 100644 --- a/src/mame/includes/maygay1b.h +++ b/src/mame/includes/maygay1b.h @@ -53,7 +53,8 @@ public: m_reel3(*this, "reel3"), m_reel4(*this, "reel4"), m_reel5(*this, "reel5"), - m_meters(*this, "meters") + m_meters(*this, "meters"), + m_oki_region(*this, "msm6376") {} required_device<cpu_device> m_maincpu; @@ -79,6 +80,7 @@ public: required_device<stepper_device> m_reel4; required_device<stepper_device> m_reel5; required_device<meters_device> m_meters; + optional_region_ptr<UINT8> m_oki_region; UINT8 m_lamppos; int m_lamp_strobe; diff --git a/src/mame/includes/megasys1.h b/src/mame/includes/megasys1.h index 414b670cc36..65694249f8f 100644 --- a/src/mame/includes/megasys1.h +++ b/src/mame/includes/megasys1.h @@ -65,8 +65,8 @@ public: bitmap_ind16 m_sprite_buffer_bitmap; UINT16 *m_spriteram; - UINT16 m_ip_select; - UINT16 m_ip_select_values[5]; + UINT16 m_ip_select_values[7]; + UINT16 m_ip_latched; UINT8 m_ignore_oki_status; UINT16 m_protection_val; int m_scrollx[3]; diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h index ad0cceba7a7..9b5cc1b2cd2 100644 --- a/src/mame/includes/overdriv.h +++ b/src/mame/includes/overdriv.h @@ -24,7 +24,6 @@ public: m_k053246(*this, "k053246"), m_k053251(*this, "k053251"), m_k053252(*this, "k053252"), - m_sprram(*this, "sprram"), m_screen(*this, "screen") { } @@ -45,22 +44,25 @@ public: required_device<k053247_device> m_k053246; required_device<k053251_device> m_k053251; required_device<k053252_device> m_k053252; - required_shared_ptr<UINT16> m_sprram; required_device<screen_device> m_screen; DECLARE_WRITE16_MEMBER(eeprom_w); DECLARE_WRITE16_MEMBER(cpuA_ctrl_w); DECLARE_READ16_MEMBER(cpuB_ctrl_r); DECLARE_WRITE16_MEMBER(cpuB_ctrl_w); DECLARE_WRITE16_MEMBER(overdriv_soundirq_w); - DECLARE_WRITE16_MEMBER(overdriv_cpuB_irq_x_w); - DECLARE_WRITE16_MEMBER(overdriv_cpuB_irq_y_w); + DECLARE_WRITE8_MEMBER(sound_ack_w); + DECLARE_WRITE16_MEMBER(slave_irq4_assert_w); + DECLARE_WRITE16_MEMBER(slave_irq5_assert_w); + DECLARE_WRITE16_MEMBER(objdma_w); + TIMER_CALLBACK_MEMBER(objdma_end_cb); + virtual void machine_start() override; virtual void machine_reset() override; UINT32 screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(cpuB_interrupt); + //INTERRUPT_GEN_MEMBER(cpuB_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(overdriv_cpuA_scanline); - - DECLARE_WRITE16_MEMBER( overdriv_k053246_word_w ); + int m_fake_timer; + K051316_CB_MEMBER(zoom_callback_1); K051316_CB_MEMBER(zoom_callback_2); K053246_CB_MEMBER(sprite_callback); diff --git a/src/mame/includes/punchout.h b/src/mame/includes/punchout.h index b8e3bf4cd43..874b31678d1 100644 --- a/src/mame/includes/punchout.h +++ b/src/mame/includes/punchout.h @@ -60,6 +60,8 @@ public: DECLARE_WRITE8_MEMBER(punchout_2a03_reset_w); DECLARE_READ8_MEMBER(spunchout_exp_r); DECLARE_WRITE8_MEMBER(spunchout_exp_w); + DECLARE_WRITE8_MEMBER(spunchout_rp5h01_reset_w); + DECLARE_WRITE8_MEMBER(spunchout_rp5h01_clock_w); DECLARE_WRITE8_MEMBER(nmi_mask_w); DECLARE_WRITE8_MEMBER(punchout_bg_top_videoram_w); DECLARE_WRITE8_MEMBER(punchout_bg_bot_videoram_w); diff --git a/src/mame/includes/rampart.h b/src/mame/includes/rampart.h index d7e62bc9b39..964befa8056 100644 --- a/src/mame/includes/rampart.h +++ b/src/mame/includes/rampart.h @@ -8,6 +8,7 @@ #include "machine/atarigen.h" #include "sound/okim6295.h" +#include "sound/2413intf.h" #include "video/atarimo.h" class rampart_state : public atarigen_state @@ -17,10 +18,12 @@ public: : atarigen_state(mconfig, type, tag), m_mob(*this, "mob"), m_oki(*this, "oki"), + m_ym2413(*this, "ymsnd"), m_bitmap(*this, "bitmap") { } required_device<atari_motion_objects_device> m_mob; required_device<okim6295_device> m_oki; + required_device<ym2413_device> m_ym2413; required_shared_ptr<UINT16> m_bitmap; diff --git a/src/mame/includes/relief.h b/src/mame/includes/relief.h index cae4ad37e3d..7d80ef07569 100644 --- a/src/mame/includes/relief.h +++ b/src/mame/includes/relief.h @@ -8,6 +8,8 @@ #include "machine/atarigen.h" #include "video/atarimo.h" +#include "sound/okim6295.h" +#include "sound/2413intf.h" class relief_state : public atarigen_state { @@ -15,10 +17,14 @@ public: relief_state(const machine_config &mconfig, device_type type, const char *tag) : atarigen_state(mconfig, type, tag), m_vad(*this, "vad"), + m_oki(*this, "oki"), + m_ym2413(*this, "ymsnd"), m_okibank(*this, "okibank") { } required_device<atari_vad_device> m_vad; + required_device<okim6295_device> m_oki; + required_device<ym2413_device> m_ym2413; required_memory_bank m_okibank; UINT8 m_ym2413_volume; diff --git a/src/mame/includes/slapstic.h b/src/mame/includes/slapstic.h index cfcfcce890e..27328fc4c04 100644 --- a/src/mame/includes/slapstic.h +++ b/src/mame/includes/slapstic.h @@ -23,8 +23,9 @@ extern const device_type SLAPSTIC; -#define MCFG_SLAPSTIC_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, SLAPSTIC, 0) +#define MCFG_SLAPSTIC_ADD(_tag, _chip) \ + MCFG_DEVICE_ADD(_tag, SLAPSTIC, 0) \ + MCFG_SLAPSTIC_NUM(_chip) /************************************* @@ -123,6 +124,9 @@ enum }; +#define MCFG_SLAPSTIC_NUM(_chipnum) \ + atari_slapstic_device::static_set_chipnum(*device, _chipnum); + #define MCFG_SLAPSTIC_68K_ACCESS(_type) \ atari_slapstic_device::static_set_access68k(*device, _type); @@ -134,10 +138,10 @@ public: // construction/destruction atari_slapstic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - void slapstic_init(running_machine &machine, int chip); - void slapstic_reset(void); + void slapstic_init(); + void slapstic_reset(); - int slapstic_bank(void); + int slapstic_bank(); int slapstic_tweak(address_space &space, offs_t offset); int alt2_kludge(address_space &space, offs_t offset); @@ -148,6 +152,13 @@ public: dev.access_68k = type; } + static void static_set_chipnum(device_t &device, int chipnum) + { + atari_slapstic_device &dev = downcast<atari_slapstic_device &>(device); + dev.m_chipnum = chipnum; + } + + int m_chipnum; UINT8 state; UINT8 current_bank; @@ -168,6 +179,7 @@ public: protected: virtual void device_start() override; virtual void device_reset() override; + virtual void device_validity_check(validity_checker &valid) const override; private: diff --git a/src/mame/includes/snk.h b/src/mame/includes/snk.h index 7e6469d6f3b..81744602a36 100644 --- a/src/mame/includes/snk.h +++ b/src/mame/includes/snk.h @@ -185,6 +185,7 @@ public: UINT32 screen_update_ikari(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_gwar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_tdfever(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + UINT32 screen_update_fitegolf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(sgladiat_sndirq_update_callback); TIMER_CALLBACK_MEMBER(sndirq_update_callback); DECLARE_WRITE_LINE_MEMBER(ymirq_callback_2); diff --git a/src/mame/includes/xbox.h b/src/mame/includes/xbox.h index ea4db5c7db4..8094ac33100 100644 --- a/src/mame/includes/xbox.h +++ b/src/mame/includes/xbox.h @@ -111,7 +111,7 @@ struct USBSetupPacket { UINT16 wLength; }; -struct USBStandardDeviceDscriptor { +struct USBStandardDeviceDescriptor { UINT8 bLength; UINT8 bDescriptorType; UINT16 bcdUSB; @@ -188,20 +188,52 @@ enum USBDescriptorType { ENDPOINT=5 }; +enum USBRequestType +{ + StandardType=0, + ClassType, + VendorType, + ReservedType +}; + +enum USBRequestRecipient +{ + DeviceRecipient=0, + InterfaceRecipient, + EndpointRecipient, + OtherRecipient +}; + +enum USBDeviceState +{ + DefaultState, + AddressState, + ConfiguredState +}; + class ohci_function_device { public: - ohci_function_device(); + ohci_function_device(running_machine &machine); void execute_reset(); int execute_transfer(int address, int endpoint, int pid, UINT8 *buffer, int size); private: + void add_device_descriptor(USBStandardDeviceDescriptor &descriptor); + void add_configuration_descriptor(USBStandardConfigurationDescriptor &descriptor); + void add_interface_descriptor(USBStandardInterfaceDescriptor &descriptor); + void add_endpoint_descriptor(USBStandardEndpointDescriptor &descriptor); + int handle_nonstandard_request(USBSetupPacket *setup); + int state; int address; int newaddress; int controldirection; int controltype; int controlrecipient; + int configurationvalue; bool settingaddress; int remain; UINT8 *position; + UINT8 *descriptors; + int descriptors_pos; }; class xbox_base_state : public driver_device diff --git a/src/mame/includes/zaccaria.h b/src/mame/includes/zaccaria.h index 8371e6b6fb0..6bcfa72798d 100644 --- a/src/mame/includes/zaccaria.h +++ b/src/mame/includes/zaccaria.h @@ -1,60 +1,25 @@ // license:BSD-3-Clause // copyright-holders:Nicola Salmoria -#include "machine/6821pia.h" -#include "sound/ay8910.h" -#include "sound/tms5220.h" +#include "emu.h" +#include "audio/zaccaria.h" class zaccaria_state : public driver_device { public: zaccaria_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_audio2(*this, "audio2"), - m_pia0(*this, "pia0"), - m_ay1(*this, "ay1"), - m_ay2(*this, "ay2"), - m_tms(*this, "tms"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_videoram(*this, "videoram"), - m_attributesram(*this, "attributesram"), - m_spriteram(*this, "spriteram"), - m_spriteram2(*this, "spriteram2"), - m_dsw_port(*this, "DSW") { } - - - - /* devices */ - required_device<cpu_device> m_maincpu; - required_device<cpu_device> m_audio2; - required_device<pia6821_device> m_pia0; - required_device<ay8910_device> m_ay1; - required_device<ay8910_device> m_ay2; - required_device<tms5220_device> m_tms; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; - - /* memory pointers */ - required_shared_ptr<UINT8> m_videoram; - required_shared_ptr<UINT8> m_attributesram; - required_shared_ptr<UINT8> m_spriteram; - required_shared_ptr<UINT8> m_spriteram2; - - required_ioport_array<3> m_dsw_port; - - int m_dsw_sel; - int m_active_8910; - int m_port0a; - int m_acs; - int m_last_port0b; - int m_toggle; - tilemap_t *m_bg_tilemap; - UINT8 m_nmi_mask; + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") + , m_audiopcb(*this, "audiopcb") + , m_videoram(*this, "videoram") + , m_attributesram(*this, "attributesram") + , m_spriteram(*this, "spriteram") + , m_spriteram2(*this, "spriteram2") + , m_dsw_port(*this, "DSW") + { } DECLARE_READ8_MEMBER(dsw_r); - DECLARE_WRITE8_MEMBER(sound_command_w); - DECLARE_WRITE8_MEMBER(sound1_command_w); DECLARE_READ8_MEMBER(prot1_r); DECLARE_READ8_MEMBER(prot2_r); DECLARE_WRITE8_MEMBER(coin_w); @@ -63,20 +28,31 @@ public: DECLARE_WRITE8_MEMBER(attributes_w); DECLARE_WRITE8_MEMBER(flip_screen_x_w); DECLARE_WRITE8_MEMBER(flip_screen_y_w); - DECLARE_CUSTOM_INPUT_MEMBER(acs_r); + DECLARE_WRITE8_MEMBER(ressound_w); DECLARE_WRITE8_MEMBER(dsw_sel_w); - DECLARE_WRITE8_MEMBER(ay8910_port0a_w); - DECLARE_READ8_MEMBER(port0a_r); - DECLARE_WRITE8_MEMBER(port0a_w); - DECLARE_WRITE8_MEMBER(port0b_w); - DECLARE_WRITE8_MEMBER(port1b_w); TILE_GET_INFO_MEMBER(get_tile_info); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; DECLARE_PALETTE_INIT(zaccaria); UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(cb1_toggle); INTERRUPT_GEN_MEMBER(vblank_irq); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,UINT8 *spriteram,int color,int section); + +protected: + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + required_device<zac1b11142_audio_device> m_audiopcb; + + required_shared_ptr<UINT8> m_videoram; + required_shared_ptr<UINT8> m_attributesram; + required_shared_ptr<UINT8> m_spriteram; + required_shared_ptr<UINT8> m_spriteram2; + + required_ioport_array<3> m_dsw_port; + + int m_dsw_sel; + tilemap_t *m_bg_tilemap; + UINT8 m_nmi_mask; }; diff --git a/src/mame/layout/cnfball2.lay b/src/mame/layout/cnfball2.lay new file mode 100644 index 00000000000..6f643de070b --- /dev/null +++ b/src/mame/layout/cnfball2.lay @@ -0,0 +1,185 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="static_white"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element> + <element name="static_green"><rect><color red="0.1" green="0.5" blue="0.2" /></rect></element> + + <element name="text_down"> + <rect><color red="0.1" green="0.5" blue="0.2" /></rect> + <text string="DOWN"><color red="0.8" green="0.8" blue="0.8" /></text> + </element> + <element name="text_home"> + <rect><color red="0.1" green="0.5" blue="0.2" /></rect> + <text string="HOME"><color red="0.8" green="0.8" blue="0.8" /></text> + </element> + <element name="text_yards"> + <rect><color red="0.1" green="0.5" blue="0.2" /></rect> + <text string="YARDS TO GO"><color red="0.8" green="0.8" blue="0.8" /></text> + </element> + <element name="text_time"> + <rect><color red="0.1" green="0.5" blue="0.2" /></rect> + <text string="TIME REMAINING"><color red="0.8" green="0.8" blue="0.8" /></text> + </element> + <element name="text_field"> + <rect><color red="0.1" green="0.5" blue="0.2" /></rect> + <text string="FIELD POSITION"><color red="0.8" green="0.8" blue="0.8" /></text> + </element> + <element name="text_visitor"> + <rect><color red="0.1" green="0.5" blue="0.2" /></rect> + <text string="VISITOR"><color red="0.8" green="0.8" blue="0.8" /></text> + </element> + + <element name="text_p1"> + <rect><color red="0.06" green="0.3" blue="0.12" /></rect> + <text string="PL SEL:"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.7" green="0.7" blue="0.8" /> + </text> + </element> + <element name="text_p2" defstate="0"> + <rect><color red="0.06" green="0.3" blue="0.12" /></rect> + <text state="0" string="RUN"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.82" green="0.82" blue="0.82" /> + </text> + <text state="1" string="PASS"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.82" green="0.82" blue="0.82" /> + </text> + </element> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.25" blue="0.26" /></led7seg> + </element> + <element name="seg" defstate="0"> + <rect state="0"><color red="0.13" green="0.0325" blue="0.0338" /></rect> + <rect state="1"><color red="1.0" green="0.25" blue="0.26" /></rect> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-9" right="393" top="-104" bottom="186" /> + <bezel element="static_black"> + <bounds left="-9" right="393" top="-104" bottom="186" /> + </bezel> + + <!-- bezel --> + + <bezel element="static_green"><bounds left="-9" right="393" top="-110" bottom="-60" /></bezel> + <bezel element="static_green"><bounds left="-9" right="393" top="111" bottom="200" /></bezel> + + <bezel element="static_white"><bounds x="-10" y="-84" width="404" height="3" /></bezel> + <bezel element="text_down"><bounds x="5" y="-92" width="66" height="19" /></bezel> + <bezel element="text_field"><bounds x="122" y="-92" width="140" height="19" /></bezel> + <bezel element="text_yards"><bounds x="286" y="-92" width="111" height="19" /></bezel> + + <bezel element="static_white"><bounds x="-10" y="141" width="404" height="3" /></bezel> + <bezel element="text_home"><bounds x="5" y="133" width="66" height="19" /></bezel> + <bezel element="text_time"><bounds x="122" y="133" width="140" height="19" /></bezel> + <bezel element="text_visitor"><bounds x="306" y="133" width="80" height="19" /></bezel> + + <bezel element="text_p1"><bounds x="316" y="161" width="40" height="16" /></bezel> + <bezel element="text_p2" inputtag="IN.0" inputmask="0x04"> + <bounds x="354" y="161" width="35" height="16" /> + </bezel> + + <bezel element="static_white"><bounds left="-9" right="393" top="-61" bottom="-51" /></bezel> + <bezel element="static_white"><bounds left="-9" right="393" top="110" bottom="120" /></bezel> + + <bezel element="static_white"><bounds x="-9" y="-52" width="4" height="163" /></bezel> + <bezel element="static_white"><bounds x="37" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="81" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="125" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="169" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="213" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="257" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="301" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="345" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="389" y="-52" width="4" height="163" /></bezel> + + <bezel element="static_white"><bounds x="-8" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="-8" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="-8" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="36" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="36" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="36" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="80" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="80" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="80" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="124" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="124" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="124" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="168" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="168" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="168" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="212" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="212" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="212" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="256" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="256" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="256" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="300" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="300" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="300" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="344" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="344" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="344" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="388" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="388" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="388" y="56" width="4" height="1" /></bezel> + + <!-- leds --> + + <bezel name="digit8" element="digit"><bounds x="3" y="-15.5" width="24" height="32" /></bezel> + <bezel name="8.8" element="seg"><bounds x="7" y="42.5" width="15" height="3" /></bezel> + <bezel name="8.9" element="seg"><bounds x="7" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit7" element="digit"><bounds x="47" y="-15.5" width="24" height="32" /></bezel> + <bezel name="7.8" element="seg"><bounds x="51" y="42.5" width="15" height="3" /></bezel> + <bezel name="7.9" element="seg"><bounds x="51" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit6" element="digit"><bounds x="91" y="-15.5" width="24" height="32" /></bezel> + <bezel name="6.8" element="seg"><bounds x="95" y="42.5" width="15" height="3" /></bezel> + <bezel name="6.9" element="seg"><bounds x="95" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit5" element="digit"><bounds x="135" y="-15.5" width="24" height="32" /></bezel> + <bezel name="5.8" element="seg"><bounds x="139" y="42.5" width="15" height="3" /></bezel> + <bezel name="5.9" element="seg"><bounds x="139" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit4" element="digit"><bounds x="179" y="-15.5" width="24" height="32" /></bezel> + <bezel name="4.8" element="seg"><bounds x="183" y="42.5" width="15" height="3" /></bezel> + <bezel name="4.9" element="seg"><bounds x="183" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit3" element="digit"><bounds x="223" y="-15.5" width="24" height="32" /></bezel> + <bezel name="3.8" element="seg"><bounds x="227" y="42.5" width="15" height="3" /></bezel> + <bezel name="3.9" element="seg"><bounds x="227" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit2" element="digit"><bounds x="267" y="-15.5" width="24" height="32" /></bezel> + <bezel name="2.8" element="seg"><bounds x="271" y="42.5" width="15" height="3" /></bezel> + <bezel name="2.9" element="seg"><bounds x="271" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit1" element="digit"><bounds x="311" y="-15.5" width="24" height="32" /></bezel> + <bezel name="1.8" element="seg"><bounds x="315" y="42.5" width="15" height="3" /></bezel> + <bezel name="1.9" element="seg"><bounds x="315" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit0" element="digit"><bounds x="355" y="-15.5" width="24" height="32" /></bezel> + <bezel name="0.8" element="seg"><bounds x="359" y="42.5" width="15" height="3" /></bezel> + <bezel name="0.9" element="seg"><bounds x="359" y="71.5" width="15" height="3" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mame/layout/cnsector.lay b/src/mame/layout/cnsector.lay index 5bd9aaa0d48..730e02c3d06 100644 --- a/src/mame/layout/cnsector.lay +++ b/src/mame/layout/cnsector.lay @@ -12,7 +12,7 @@ <led7seg><color red="1.0" green="0.25" blue="0.20" /></led7seg> </element> - <element name="lamp" defstate="0"> + <element name="led" defstate="0"> <disk state="1"><color red="1.0" green="0.25" blue="0.20" /></disk> <disk state="0"><color red="0.2" green="0.0" blue="0.0" /></disk> </element> @@ -56,7 +56,6 @@ </element> - <!-- build screen --> <view name="Internal Layout"> @@ -87,7 +86,6 @@ <bezel element="text_depth"><bounds x="21" y="37" width="20" height="7" /></bezel> <bezel element="text_range"><bounds x="57" y="37" width="20" height="7" /></bezel> - <bezel name="digit5" element="digit"> <bounds x="5" y="17" width="10" height="15" /> </bezel> @@ -109,35 +107,26 @@ <bounds x="77" y="17" width="10" height="15" /> </bezel> - <!-- compass --> <bezel element="static_gray"><bounds x="0" y="50" width="100" height="100" /></bezel> <bezel element="static_red"><bounds x="0" y="55" width="100" height="86" /></bezel> - <bezel name="lamp60" element="lamp"> - <bounds x="42" y="62" width="8" height="8" /> - </bezel> - <bezel name="lamp61" element="lamp"> - <bounds x="42" y="126" width="8" height="8" /> - </bezel> - <bezel name="lamp62" element="lamp"> - <bounds x="74" y="94" width="8" height="8" /> - </bezel> - <bezel name="lamp63" element="lamp"> - <bounds x="10" y="94" width="8" height="8" /> - </bezel> + <bezel name="6.a" element="led"><bounds x="42" y="62" width="8" height="8" /></bezel> + <bezel name="7.a" element="led"><bounds x="42" y="126" width="8" height="8" /></bezel> + <bezel name="8.a" element="led"><bounds x="74" y="94" width="8" height="8" /></bezel> + <bezel name="9.a" element="led"><bounds x="10" y="94" width="8" height="8" /></bezel> <bezel element="text_n"><bounds x="41" y="72" width="10" height="10" /></bezel> <bezel element="text_s"><bounds x="41" y="114" width="10" height="10" /></bezel> <bezel element="text_e"><bounds x="63" y="93" width="10" height="10" /></bezel> <bezel element="text_w"><bounds x="21" y="93" width="10" height="10" /></bezel> - <!-- crop borders --> <bezel element="static_black"><bounds x="92" y="0" width="10" height="160" /></bezel> <bezel element="static_black"><bounds x="0" y="146" width="100" height="10" /></bezel> + </view> </mamelayout> diff --git a/src/mame/layout/cqback.lay b/src/mame/layout/cqback.lay new file mode 100644 index 00000000000..ebdfa1feaf8 --- /dev/null +++ b/src/mame/layout/cqback.lay @@ -0,0 +1,178 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="static_white"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element> + <element name="static_green"><rect><color red="0.1" green="0.5" blue="0.2" /></rect></element> + <element name="static_orange"><rect><color red="0.8" green="0.25" blue="0.1" /></rect></element> + + <element name="text_down"> + <rect><color red="0.8" green="0.8" blue="0.8" /></rect> + <text string="DOWN"><color red="0.8" green="0.25" blue="0.1" /></text> + </element> + <element name="text_home"> + <rect><color red="0.8" green="0.8" blue="0.8" /></rect> + <text string="HOME"><color red="0.8" green="0.25" blue="0.1" /></text> + </element> + <element name="text_yards"> + <rect><color red="0.8" green="0.8" blue="0.8" /></rect> + <text string="YARDS TO GO"><color red="0.8" green="0.25" blue="0.1" /></text> + </element> + <element name="text_time"> + <rect><color red="0.8" green="0.8" blue="0.8" /></rect> + <text string="TIME REMAINING"><color red="0.8" green="0.25" blue="0.1" /></text> + </element> + <element name="text_field"> + <rect><color red="0.8" green="0.8" blue="0.8" /></rect> + <text string="FIELD POS."><color red="0.8" green="0.25" blue="0.1" /></text> + </element> + <element name="text_visitor"> + <rect><color red="0.8" green="0.8" blue="0.8" /></rect> + <text string="VISITOR"><color red="0.8" green="0.25" blue="0.1" /></text> + </element> + + <element name="text_p1"> + <rect><color red="0.06" green="0.3" blue="0.12" /></rect> + <text string="PL SEL:"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.7" green="0.7" blue="0.8" /> + </text> + </element> + <element name="text_p2" defstate="0"> + <rect><color red="0.06" green="0.3" blue="0.12" /></rect> + <text state="0" string="RUN/KICK"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.82" green="0.82" blue="0.82" /> + </text> + <text state="1" string="PASS"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.82" green="0.82" blue="0.82" /> + </text> + </element> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.25" blue="0.26" /></led7seg> + </element> + <element name="seg" defstate="0"> + <rect state="0"><color red="0.13" green="0.0325" blue="0.0338" /></rect> + <rect state="1"><color red="1.0" green="0.25" blue="0.26" /></rect> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-9" right="393" top="-130" bottom="156" /> + <bezel element="static_black"> + <bounds left="-9" right="393" top="-130" bottom="156" /> + </bezel> + + <!-- bezel --> + + <bezel element="static_white"><bounds left="-9" right="393" top="-130" bottom="-60" /></bezel> + <bezel element="static_green"><bounds left="-9" right="393" top="111" bottom="156" /></bezel> + + <bezel element="text_down"><bounds x="-5" y="-126" width="86" height="19" /></bezel> + <bezel element="text_yards"><bounds x="107" y="-126" width="170" height="19" /></bezel> + <bezel element="text_field"><bounds x="301" y="-126" width="90" height="19" /></bezel> + + <bezel element="text_home"><bounds x="-5" y="-92" width="86" height="19" /></bezel> + <bezel element="text_time"><bounds x="107" y="-92" width="170" height="19" /></bezel> + <bezel element="text_visitor"><bounds x="301" y="-92" width="90" height="19" /></bezel> + + <bezel element="text_p1"><bounds x="301" y="130" width="40" height="16" /></bezel> + <bezel element="text_p2" inputtag="IN.1" inputmask="0x01"> + <bounds x="339" y="130" width="50" height="16" /> + </bezel> + + <bezel element="static_orange"><bounds left="-9" right="393" top="-102" bottom="-96" /></bezel> + <bezel element="static_white"><bounds left="-9" right="393" top="-61" bottom="-51" /></bezel> + <bezel element="static_green"><bounds left="-9" right="393" top="-67" bottom="-61" /></bezel> + <bezel element="static_white"><bounds left="-9" right="393" top="110" bottom="120" /></bezel> + + <bezel element="static_white"><bounds x="-9" y="-52" width="4" height="163" /></bezel> + <bezel element="static_white"><bounds x="37" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="81" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="125" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="169" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="213" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="257" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="301" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="345" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="389" y="-52" width="4" height="163" /></bezel> + + <bezel element="static_white"><bounds x="36" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="36" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="36" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="80" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="80" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="80" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="124" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="124" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="124" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="168" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="168" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="168" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="212" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="212" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="212" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="256" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="256" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="256" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="300" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="300" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="300" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="344" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="344" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="344" y="56" width="4" height="1" /></bezel> + + <!-- leds --> + + <bezel name="digit0" element="digit"><bounds x="3" y="-15.5" width="24" height="32" /></bezel> + <bezel name="0.8" element="seg"><bounds x="7" y="42.5" width="15" height="3" /></bezel> + <bezel name="0.9" element="seg"><bounds x="7" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit1" element="digit"><bounds x="47" y="-15.5" width="24" height="32" /></bezel> + <bezel name="1.8" element="seg"><bounds x="51" y="42.5" width="15" height="3" /></bezel> + <bezel name="1.9" element="seg"><bounds x="51" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit2" element="digit"><bounds x="91" y="-15.5" width="24" height="32" /></bezel> + <bezel name="2.8" element="seg"><bounds x="95" y="42.5" width="15" height="3" /></bezel> + <bezel name="2.9" element="seg"><bounds x="95" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit3" element="digit"><bounds x="135" y="-15.5" width="24" height="32" /></bezel> + <bezel name="3.8" element="seg"><bounds x="139" y="42.5" width="15" height="3" /></bezel> + <bezel name="3.9" element="seg"><bounds x="139" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit4" element="digit"><bounds x="179" y="-15.5" width="24" height="32" /></bezel> + <bezel name="4.8" element="seg"><bounds x="183" y="42.5" width="15" height="3" /></bezel> + <bezel name="4.9" element="seg"><bounds x="183" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit5" element="digit"><bounds x="223" y="-15.5" width="24" height="32" /></bezel> + <bezel name="5.8" element="seg"><bounds x="227" y="42.5" width="15" height="3" /></bezel> + <bezel name="5.9" element="seg"><bounds x="227" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit6" element="digit"><bounds x="267" y="-15.5" width="24" height="32" /></bezel> + <bezel name="6.8" element="seg"><bounds x="271" y="42.5" width="15" height="3" /></bezel> + <bezel name="6.9" element="seg"><bounds x="271" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit7" element="digit"><bounds x="311" y="-15.5" width="24" height="32" /></bezel> + <bezel name="7.8" element="seg"><bounds x="315" y="42.5" width="15" height="3" /></bezel> + <bezel name="7.9" element="seg"><bounds x="315" y="71.5" width="15" height="3" /></bezel> + + <bezel name="digit8" element="digit"><bounds x="355" y="-15.5" width="24" height="32" /></bezel> + <bezel name="8.8" element="seg"><bounds x="359" y="42.5" width="15" height="3" /></bezel> + <bezel name="8.9" element="seg"><bounds x="359" y="71.5" width="15" height="3" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mame/layout/fidel_bcc.lay b/src/mame/layout/fidel_bcc.lay new file mode 100644 index 00000000000..d9bf4712953 --- /dev/null +++ b/src/mame/layout/fidel_bcc.lay @@ -0,0 +1,69 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> + </element> + + <element name="txt_check"> + <text string="CHECK"><color red="0.6" green="0.6" blue="0.6" /></text> + </element> + <element name="txt_lose"> + <text string="I LOSE"><color red="0.6" green="0.6" blue="0.6" /></text> + </element> + + <element name="txt_from"> + <text string="FROM"><color red="0.6" green="0.6" blue="0.6" /></text> + </element> + <element name="txt_to"> + <text string="TO"><color red="0.6" green="0.6" blue="0.6" /></text> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="47" top="0" bottom="25" /> + + <bezel element="txt_check"> + <bounds x="1" y="1" width="20" height="3" /> + </bezel> + <bezel element="txt_lose"> + <bounds x="26" y="1" width="20" height="3" /> + </bezel> + <bezel name="4.a" element="led"> + <bounds x="2" y="1" width="3" height="3" /> + </bezel> + <bezel name="5.a" element="led"> + <bounds x="27" y="1" width="3" height="3" /> + </bezel> + + <bezel element="txt_from"> + <bounds x="1" y="21" width="20" height="3" /> + </bezel> + <bezel element="txt_to"> + <bounds x="26" y="21" width="20" height="3" /> + </bezel> + + <bezel name="digit0" element="digit"> + <bounds x="1" y="5" width="10" height="15" /> + </bezel> + <bezel name="digit1" element="digit"> + <bounds x="11" y="5" width="10" height="15" /> + </bezel> + <bezel name="digit2" element="digit"> + <bounds x="26" y="5" width="10" height="15" /> + </bezel> + <bezel name="digit3" element="digit"> + <bounds x="36" y="5" width="10" height="15" /> + </bezel> + + </view> +</mamelayout> diff --git a/src/mame/layout/fidel_csc.lay b/src/mame/layout/fidel_csc.lay new file mode 100644 index 00000000000..22aed7ef11c --- /dev/null +++ b/src/mame/layout/fidel_csc.lay @@ -0,0 +1,493 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- other than panel button mappings, layout is identical to vsc --> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> + </element> + + <element name="hl" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="1.0" green="1.0" blue="1.0" /> + </disk> + </element> + <element name="hlb" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="1.0" green="1.0" blue="1.0" /> + </disk> + </element> + <element name="hlp" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <rect state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="1.0" green="1.0" blue="1.0" /> + </rect> + </element> + + <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element> + <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element> + <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element> + <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element> + + <element name="text_1"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_2"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_3"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_4"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_5"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_6"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_7"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_8"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_a"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_c"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_d"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_e"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_f"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_g"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_h"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_re"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="RE"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_cl"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="CL"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_king"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="K"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_queen"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="Q"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_rook"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="R"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_bishop"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="B"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_knight"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="N"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_pion"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="P"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + + <element name="text_tm"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="TM"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_rv"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="RV"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_speak"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="spk"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_st"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="ST"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_dm"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="DM"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_lv"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="LV"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-2" right="98" top="-18" bottom="88" /> + <bezel element="static_black"> + <bounds left="-2" right="98" top="-18" bottom="88" /> + </bezel> + + <bezel element="white"><bounds x="-2.5" y="-2" width="101" height="90.5" /></bezel> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel> + + <!-- chessboard bezel --> + + <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel> + <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel> + + <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel> + + <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel> + <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel> + + <!-- chessboard leds --> + + <bezel name="4.7" element="led"><bounds x="3.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.7" element="led"><bounds x="13.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.7" element="led"><bounds x="23.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.7" element="led"><bounds x="33.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.7" element="led"><bounds x="43.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.7" element="led"><bounds x="53.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.7" element="led"><bounds x="63.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.7" element="led"><bounds x="73.2" y="11.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.6" element="led"><bounds x="3.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.6" element="led"><bounds x="13.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.6" element="led"><bounds x="23.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.6" element="led"><bounds x="33.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.6" element="led"><bounds x="43.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.6" element="led"><bounds x="53.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.6" element="led"><bounds x="63.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.6" element="led"><bounds x="73.2" y="21.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.5" element="led"><bounds x="3.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.5" element="led"><bounds x="13.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.5" element="led"><bounds x="23.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.5" element="led"><bounds x="33.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.5" element="led"><bounds x="43.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.5" element="led"><bounds x="53.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.5" element="led"><bounds x="63.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.5" element="led"><bounds x="73.2" y="31.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.4" element="led"><bounds x="3.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.4" element="led"><bounds x="13.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.4" element="led"><bounds x="23.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.4" element="led"><bounds x="33.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.4" element="led"><bounds x="43.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.4" element="led"><bounds x="53.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.4" element="led"><bounds x="63.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.4" element="led"><bounds x="73.2" y="41.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.3" element="led"><bounds x="3.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.3" element="led"><bounds x="13.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.3" element="led"><bounds x="23.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.3" element="led"><bounds x="33.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.3" element="led"><bounds x="43.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.3" element="led"><bounds x="53.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.3" element="led"><bounds x="63.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.3" element="led"><bounds x="73.2" y="51.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.2" element="led"><bounds x="3.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.2" element="led"><bounds x="13.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.2" element="led"><bounds x="23.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.2" element="led"><bounds x="33.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.2" element="led"><bounds x="43.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.2" element="led"><bounds x="53.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.2" element="led"><bounds x="63.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.2" element="led"><bounds x="73.2" y="61.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.1" element="led"><bounds x="3.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.1" element="led"><bounds x="13.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.1" element="led"><bounds x="23.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.1" element="led"><bounds x="33.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.1" element="led"><bounds x="43.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.1" element="led"><bounds x="53.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.1" element="led"><bounds x="63.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.1" element="led"><bounds x="73.2" y="71.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.0" element="led"><bounds x="3.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.0" element="led"><bounds x="13.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.0" element="led"><bounds x="23.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.0" element="led"><bounds x="33.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.0" element="led"><bounds x="43.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.0" element="led"><bounds x="53.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.0" element="led"><bounds x="63.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.0" element="led"><bounds x="73.2" y="81.3" width="1.5" height="1.5" /></bezel> + + <!-- chessboard sensors --> + + <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + + <!-- right side --> + + <bezel name="0.7" element="led"><bounds x="89.95" y="7.25" width="1.5" height="1.5" /></bezel> + + <bezel element="disk_black"><bounds x="87" y="13" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="21.8" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="30.6" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="39.4" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="48.2" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="57" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="65.8" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="74.6" width="7.4" height="7.4" /></bezel> + + <bezel element="disk_white"><bounds x="88.2" y="14.2" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="23" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="31.8" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="40.6" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="49.4" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="58.2" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="67" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="75.8" width="5" height="5" /></bezel> + + <bezel element="text_re"><bounds x="88.2" y="15.2" width="5" height="3" /></bezel> + <bezel element="text_cl"><bounds x="88.2" y="24" width="5" height="3" /></bezel> + <bezel element="text_king"><bounds x="88.2" y="32.8" width="5" height="3" /></bezel> + <bezel element="text_queen"><bounds x="88.2" y="41.6" width="5" height="3" /></bezel> + <bezel element="text_bishop"><bounds x="88.2" y="50.4" width="5" height="3" /></bezel> + <bezel element="text_knight"><bounds x="88.2" y="59.2" width="5" height="3" /></bezel> + <bezel element="text_rook"><bounds x="88.2" y="68" width="5" height="3" /></bezel> + <bezel element="text_pion"><bounds x="88.2" y="76.8" width="5" height="3" /></bezel> + + <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="13" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="21.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="30.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="39.4" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="48.2" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="57" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="65.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="74.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + + <!-- panel 7seg leds --> + + <bezel name="digit3" element="digit"> + <bounds x="33" y="-14.5" width="5.66" height="8.5" /> + </bezel> + <bezel name="digit2" element="digit"> + <bounds x="38.66" y="-14.5" width="5.66" height="8.5" /> + </bezel> + <bezel name="digit1" element="digit"> + <bounds x="47.16" y="-14.5" width="5.66" height="8.5" /> + </bezel> + <bezel name="digit0" element="digit"> + <bounds x="52.82" y="-14.5" width="5.66" height="8.5" /> + </bezel> + + <bezel name="2.7" element="led"> + <bounds x="45.58" y="-13" width="0.85" height="0.85" /> + </bezel> + <bezel name="3.7" element="led"> + <bounds x="45.13" y="-8.35" width="0.85" height="0.85" /> + </bezel> + + <!-- panel buttons --> + + <bezel element="black"><bounds x="73" y="-14.5" width="5" height="3" /></bezel> + <bezel element="text_tm"><bounds x="73.05" y="-14.45" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.2" inputmask="0x100"><bounds x="73" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="79.2" y="-14.5" width="5" height="3" /></bezel> + <bezel element="text_rv"><bounds x="79.25" y="-14.45" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.1" inputmask="0x100"><bounds x="79.2" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="85.4" y="-14.5" width="5" height="3" /></bezel> + <bezel element="text_speak"><bounds x="85.45" y="-14.45" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.0" inputmask="0x100"><bounds x="85.4" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="73" y="-9" width="5" height="3" /></bezel> + <bezel element="text_st"><bounds x="73.05" y="-8.95" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.5" inputmask="0x100"><bounds x="73" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="79.2" y="-9" width="5" height="3" /></bezel> + <bezel element="text_dm"><bounds x="79.25" y="-8.95" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.4" inputmask="0x100"><bounds x="79.2" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="85.4" y="-9" width="5" height="3" /></bezel> + <bezel element="text_lv"><bounds x="85.45" y="-8.95" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.3" inputmask="0x100"><bounds x="85.4" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mame/layout/fidel_eag.lay b/src/mame/layout/fidel_eag.lay new file mode 100644 index 00000000000..f321527a168 --- /dev/null +++ b/src/mame/layout/fidel_eag.lay @@ -0,0 +1,432 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> + </element> + + <element name="led2" defstate="0"> + <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk> + <disk state="0"><color red="0.14" green="0.014" blue="0.02" /></disk> + </element> + <element name="led2g" defstate="0"> + <disk state="1"><color red="0.1" green="1.0" blue="0.15" /></disk> + <disk state="0"><color red="0.014" green="0.14" blue="0.02" /></disk> + </element> + <element name="led2y" defstate="0"> + <disk state="1"><color red="1.0" green="0.85" blue="0.15" /></disk> + <disk state="0"><color red="0.18" green="0.14" blue="0.02" /></disk> + </element> + + <element name="bt" defstate="0"> + <disk state="0"><color red="0.17" green="0.15" blue="0.15" /></disk> + <disk state="1"><color red="0.4" green="0.41" blue="0.45" /></disk> + </element> + + <element name="hl" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="1.0" green="1.0" blue="1.0" /> + </disk> + </element> + + <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element> + <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element> + <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element> + + <element name="text_1"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_2"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_3"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_4"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_5"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_6"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_7"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_8"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_a"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_c"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_d"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_e"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_f"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_g"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_h"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_r11"><text string="K"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r21"><text string="Q"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r31"><text string="R"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r41"><text string="B"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r51"><text string="N"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r61"><text string="P"><color red="0.81" green="0.8" blue="0.79" /></text></element> + + <element name="text_r12"><text string="PB" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r22"><text string="PV" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r32"><text string="TM" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r42"><text string="ST" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r52"><text string="TB" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r62"><text string="LV" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r72"><text string="OPTION" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r82"><text string="RV" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r92"><text string="NEW" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_r93"><text string="GAME" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + + <element name="text_rx1"><text string="YOUR MOVE"><color red="0.61" green="0.6" blue="0.59" /></text></element> + <element name="text_ry1"><text string="CHECK"><color red="0.61" green="0.6" blue="0.59" /></text></element> + <element name="text_rx2"><text string="CL" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_ry2"><text string="DM" align="1"><color red="0.81" green="0.8" blue="0.79" /></text></element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-2" right="102" top="-2" bottom="88" /> + <bezel element="static_black"> + <bounds left="-2" right="102" top="-2" bottom="88" /> + </bezel> + + <bezel element="white"><bounds x="-2.5" y="-2.5" width="90.5" height="91" /></bezel> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel> + + <!-- chessboard bezel --> + + <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel> + <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel> + + <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel> + + <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel> + <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel> + + <!-- chessboard leds --> + + <bezel name="7.15" element="led"><bounds x="11.3" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.14" element="led"><bounds x="21.3" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.13" element="led"><bounds x="31.3" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.12" element="led"><bounds x="41.3" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.11" element="led"><bounds x="51.3" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.10" element="led"><bounds x="61.3" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.9" element="led"><bounds x="71.3" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.8" element="led"><bounds x="81.3" y="11.3" width="1.5" height="1.5" /></bezel> + + <bezel name="6.15" element="led"><bounds x="11.3" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.14" element="led"><bounds x="21.3" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.13" element="led"><bounds x="31.3" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.12" element="led"><bounds x="41.3" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.11" element="led"><bounds x="51.3" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.10" element="led"><bounds x="61.3" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.9" element="led"><bounds x="71.3" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.8" element="led"><bounds x="81.3" y="21.3" width="1.5" height="1.5" /></bezel> + + <bezel name="5.15" element="led"><bounds x="11.3" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.14" element="led"><bounds x="21.3" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.13" element="led"><bounds x="31.3" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.12" element="led"><bounds x="41.3" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.11" element="led"><bounds x="51.3" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.10" element="led"><bounds x="61.3" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.9" element="led"><bounds x="71.3" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.8" element="led"><bounds x="81.3" y="31.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.15" element="led"><bounds x="11.3" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="4.14" element="led"><bounds x="21.3" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="4.13" element="led"><bounds x="31.3" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="4.12" element="led"><bounds x="41.3" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="4.11" element="led"><bounds x="51.3" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="4.10" element="led"><bounds x="61.3" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="4.9" element="led"><bounds x="71.3" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="4.8" element="led"><bounds x="81.3" y="41.3" width="1.5" height="1.5" /></bezel> + + <bezel name="3.15" element="led"><bounds x="11.3" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="3.14" element="led"><bounds x="21.3" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="3.13" element="led"><bounds x="31.3" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="3.12" element="led"><bounds x="41.3" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="3.11" element="led"><bounds x="51.3" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="3.10" element="led"><bounds x="61.3" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="3.9" element="led"><bounds x="71.3" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="3.8" element="led"><bounds x="81.3" y="51.3" width="1.5" height="1.5" /></bezel> + + <bezel name="2.15" element="led"><bounds x="11.3" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="2.14" element="led"><bounds x="21.3" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="2.13" element="led"><bounds x="31.3" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="2.12" element="led"><bounds x="41.3" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="2.11" element="led"><bounds x="51.3" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="2.10" element="led"><bounds x="61.3" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="2.9" element="led"><bounds x="71.3" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="2.8" element="led"><bounds x="81.3" y="61.3" width="1.5" height="1.5" /></bezel> + + <bezel name="1.15" element="led"><bounds x="11.3" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="1.14" element="led"><bounds x="21.3" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="1.13" element="led"><bounds x="31.3" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="1.12" element="led"><bounds x="41.3" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="1.11" element="led"><bounds x="51.3" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="1.10" element="led"><bounds x="61.3" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="1.9" element="led"><bounds x="71.3" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="1.8" element="led"><bounds x="81.3" y="71.3" width="1.5" height="1.5" /></bezel> + + <bezel name="0.15" element="led"><bounds x="11.3" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="0.14" element="led"><bounds x="21.3" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="0.13" element="led"><bounds x="31.3" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="0.12" element="led"><bounds x="41.3" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="0.11" element="led"><bounds x="51.3" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="0.10" element="led"><bounds x="61.3" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="0.9" element="led"><bounds x="71.3" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="0.8" element="led"><bounds x="81.3" y="81.3" width="1.5" height="1.5" /></bezel> + + <!-- chessboard sensors --> + + <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + + <!-- panel 7seg leds --> + + <bezel name="digit6" element="digit"><bounds x="90" y="3" width="8.5" height="5.66" /><orientation rotate="90" /></bezel> + <bezel name="digit5" element="digit"><bounds x="90" y="8.66" width="8.5" height="5.66" /><orientation rotate="90" /></bezel> + <bezel name="digit7" element="digit"><bounds x="90" y="17.16" width="8.5" height="5.66" /><orientation rotate="90" /></bezel> + <bezel name="digit8" element="digit"><bounds x="90" y="22.82" width="8.5" height="5.66" /><orientation rotate="90" /></bezel> + + <bezel name="5.7" element="led"><bounds x="96.15" y="15.58" width="0.85" height="0.85" /></bezel> + <bezel name="6.7" element="led"><bounds x="91.5" y="15.13" width="0.85" height="0.85" /></bezel> + + <bezel name="digit1" element="digit"><bounds x="90" y="53" width="8.5" height="5.66" /><orientation rotate="90" /></bezel> + <bezel name="digit0" element="digit"><bounds x="90" y="58.66" width="8.5" height="5.66" /><orientation rotate="90" /></bezel> + <bezel name="digit2" element="digit"><bounds x="90" y="67.16" width="8.5" height="5.66" /><orientation rotate="90" /></bezel> + <bezel name="digit3" element="digit"><bounds x="90" y="72.82" width="8.5" height="5.66" /><orientation rotate="90" /></bezel> + + <bezel name="0.7" element="led"><bounds x="96.15" y="65.58" width="0.85" height="0.85" /></bezel> + <bezel name="1.7" element="led"><bounds x="91.5" y="65.13" width="0.85" height="0.85" /></bezel> + + <!-- right side --> + + <bezel element="text_r11"><bounds x="91.5" y="29.75" width="2.5" height="1.5" /></bezel> + <bezel element="text_r21"><bounds x="91.5" y="32.25" width="2.5" height="1.5" /></bezel> + <bezel element="text_r31"><bounds x="91.5" y="34.75" width="2.5" height="1.5" /></bezel> + <bezel element="text_r41"><bounds x="91.5" y="37.25" width="2.5" height="1.5" /></bezel> + <bezel element="text_r51"><bounds x="91.5" y="39.75" width="2.5" height="1.5" /></bezel> + <bezel element="text_r61"><bounds x="91.5" y="42.25" width="2.5" height="1.5" /></bezel> + + <bezel element="text_r12"><bounds x="96.8" y="29.75" width="10" height="1.5" /></bezel> + <bezel element="text_r22"><bounds x="96.8" y="32.25" width="10" height="1.5" /></bezel> + <bezel element="text_r32"><bounds x="96.8" y="34.75" width="10" height="1.5" /></bezel> + <bezel element="text_r42"><bounds x="96.8" y="37.25" width="10" height="1.5" /></bezel> + <bezel element="text_r52"><bounds x="96.8" y="39.75" width="10" height="1.5" /></bezel> + <bezel element="text_r62"><bounds x="96.8" y="42.25" width="10" height="1.5" /></bezel> + <bezel element="text_r72"><bounds x="96.8" y="44.75" width="10" height="1.5" /></bezel> + <bezel element="text_r82"><bounds x="96.8" y="47.25" width="10" height="1.5" /></bezel> + + <bezel element="text_r92"><bounds x="96.8" y="49.5" width="10" height="1.5" /></bezel> + <bezel element="text_r93"><bounds x="96.8" y="51" width="10" height="1.5" /></bezel> + + <bezel name="8.10" element="led2"><bounds x="90" y="29.75" width="1.5" height="1.5" /></bezel> + <bezel name="8.11" element="led2"><bounds x="90" y="32.25" width="1.5" height="1.5" /></bezel> + <bezel name="8.12" element="led2"><bounds x="90" y="34.75" width="1.5" height="1.5" /></bezel> + <bezel name="8.13" element="led2"><bounds x="90" y="37.25" width="1.5" height="1.5" /></bezel> + <bezel name="8.14" element="led2"><bounds x="90" y="39.75" width="1.5" height="1.5" /></bezel> + <bezel name="8.15" element="led2"><bounds x="90" y="42.25" width="1.5" height="1.5" /></bezel> + + <bezel element="bt" inputtag="IN.8" inputmask="0x01"><bounds x="94" y="29.5" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.8" inputmask="0x02"><bounds x="94" y="32" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.8" inputmask="0x04"><bounds x="94" y="34.5" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.8" inputmask="0x08"><bounds x="94" y="37" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.8" inputmask="0x10"><bounds x="94" y="39.5" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.8" inputmask="0x20"><bounds x="94" y="42" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.8" inputmask="0x40"><bounds x="94" y="44.5" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.8" inputmask="0x80"><bounds x="94" y="47" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.2" inputmask="0x100"><bounds x="94" y="49.5" width="2" height="2" /></bezel> + + <bezel element="text_rx2"><bounds x="96.8" y="79.75" width="10" height="1.5" /></bezel> + <bezel element="text_ry2"><bounds x="96.8" y="82.25" width="10" height="1.5" /></bezel> + <bezel element="text_rx1"><bounds x="88" y="78.75" width="6" height="1" /></bezel> + <bezel element="text_ry1"><bounds x="88" y="81.25" width="5.5" height="1" /></bezel> + + <bezel name="8.9" element="led2y"><bounds x="90" y="79.75" width="1.5" height="1.5" /></bezel> + <bezel name="8.8" element="led2g"><bounds x="90" y="82.25" width="1.5" height="1.5" /></bezel> + + <bezel element="bt" inputtag="IN.0" inputmask="0x100"><bounds x="94" y="79.5" width="2" height="2" /></bezel> + <bezel element="bt" inputtag="IN.1" inputmask="0x100"><bounds x="94" y="82" width="2" height="2" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mame/layout/fidel_fev.lay b/src/mame/layout/fidel_fev.lay index 8c4637ab6ce..93d4abaf163 100644 --- a/src/mame/layout/fidel_fev.lay +++ b/src/mame/layout/fidel_fev.lay @@ -3,38 +3,482 @@ <!-- define elements --> - <element name="ledr" defstate="0"> - <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk> - <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk> + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> </element> <element name="ledg" defstate="0"> - <disk state="0"><color red="0.04" green="0.2" blue="0.046" /></disk> - <disk state="1"><color red="0.2" green="1.0" blue="0.23" /></disk> + <disk state="1"><color red="0.1" green="1.0" blue="0.15" /></disk> + <disk state="0"><color red="0.01" green="0.1" blue="0.015" /></disk> + </element> + + <element name="hl" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="1.0" green="1.0" blue="1.0" /> + </disk> + </element> + <element name="hlb" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <rect state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="1.0" green="1.0" blue="1.0" /> + </rect> + </element> + + <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element> + <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element> + <element name="redb"><rect><color red="0.81" green="0.3" blue="0.29" /></rect></element> + + <element name="text_1"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="1" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_2"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="2" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_3"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="3" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_4"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="4" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_5"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="5" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_6"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="6" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_7"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="7" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_8"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="8" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_9"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="9" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_10"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="10" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_11"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="11" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_12"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="12" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_a"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_c"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_d"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_e"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_f"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_g"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_h"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_lb"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="CHECK"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_lc"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="MATE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_ld"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="WHITE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_le"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="BLACK"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_lf"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="STALEMATE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_lg"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_lh"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="I LOSE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_t81"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="NEW"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t82"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="GAME"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t7"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="VERIFY"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t6"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="OPTIONS"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t5"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="LEVEL"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t41"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="TAKE"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t42"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="BACK"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t3"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="HINT"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t2"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="MOVE"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_t1"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="CLEAR"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + + <element name="text_tl7"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="king"><color red="0.65" green="0.15" blue="0.14" /></text> + </element> + <element name="text_tl6"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="queen"><color red="0.65" green="0.15" blue="0.14" /></text> + </element> + <element name="text_tl5"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="rook"><color red="0.65" green="0.15" blue="0.14" /></text> + </element> + <element name="text_tl4"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="bishop"><color red="0.65" green="0.15" blue="0.14" /></text> + </element> + <element name="text_tl3"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="knight"><color red="0.65" green="0.15" blue="0.14" /></text> + </element> + <element name="text_tl2"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="pion"><color red="0.65" green="0.15" blue="0.14" /></text> </element> <!-- build screen --> <view name="Internal Layout"> - <bounds left="0" right="20" top="0" bottom="20" /> - - <bezel name="0.0" element="ledr"><bounds x="1" y="1" width="1" height="1" /></bezel> - <bezel name="0.1" element="ledr"><bounds x="1" y="2" width="1" height="1" /></bezel> - <bezel name="0.2" element="ledr"><bounds x="1" y="3" width="1" height="1" /></bezel> - <bezel name="0.3" element="ledr"><bounds x="1" y="4" width="1" height="1" /></bezel> - <bezel name="0.4" element="ledr"><bounds x="1" y="5" width="1" height="1" /></bezel> - <bezel name="0.5" element="ledr"><bounds x="1" y="6" width="1" height="1" /></bezel> - <bezel name="0.6" element="ledr"><bounds x="1" y="7" width="1" height="1" /></bezel> - <bezel name="0.7" element="ledr"><bounds x="1" y="8" width="1" height="1" /></bezel> - - <bezel name="1.0" element="ledg"><bounds x="2" y="9" width="1" height="1" /></bezel> - <bezel name="1.1" element="ledg"><bounds x="3" y="9" width="1" height="1" /></bezel> - <bezel name="1.2" element="ledg"><bounds x="4" y="9" width="1" height="1" /></bezel> - <bezel name="1.3" element="ledg"><bounds x="5" y="9" width="1" height="1" /></bezel> - <bezel name="1.4" element="ledg"><bounds x="6" y="9" width="1" height="1" /></bezel> - <bezel name="1.5" element="ledg"><bounds x="7" y="9" width="1" height="1" /></bezel> - <bezel name="1.6" element="ledg"><bounds x="8" y="9" width="1" height="1" /></bezel> - <bezel name="1.7" element="ledg"><bounds x="9" y="9" width="1" height="1" /></bezel> + <bounds left="-2" right="98" top="-14.5" bottom="89" /> + <bezel element="static_black"> + <bounds left="-2" right="98" top="-14.5" bottom="89" /> + </bezel> + + <bezel element="white"><bounds x="-2.5" y="-2" width="101" height="91.5" /></bezel> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="-0.3" y="9" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="-0.3" y="19" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="-0.3" y="29" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="-0.3" y="39" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="-0.3" y="49" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="-0.3" y="59" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="-0.3" y="69" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="-0.3" y="79" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="5" y="84.2" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="15" y="84.2" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="25" y="84.2" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="35" y="84.2" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="45" y="84.2" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="55" y="84.2" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="65" y="84.2" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="75" y="84.2" width="2" height="2" /></bezel> + + <!-- left side labels --> + + <bezel element="text_9"><bounds x="-4.3" y="12" width="5" height="2" /></bezel> + <bezel element="text_10"><bounds x="-4.3" y="22" width="5" height="2" /></bezel> + <bezel element="text_11"><bounds x="-4.3" y="32" width="5" height="2" /></bezel> + <bezel element="text_12"><bounds x="-4.3" y="42" width="5" height="2" /></bezel> + + <!-- bottom side labels --> + + <bezel element="text_lb"><bounds x="13" y="86.3" width="10" height="2" /></bezel> + <bezel element="text_lc"><bounds x="23" y="86.3" width="10" height="2" /></bezel> + <bezel element="text_ld"><bounds x="33" y="86.3" width="10" height="2" /></bezel> + <bezel element="text_le"><bounds x="43" y="86.3" width="10" height="2" /></bezel> + <bezel element="text_lf"><bounds x="53" y="86.3" width="10" height="2" /></bezel> + <bezel element="text_lh"><bounds x="73" y="86.3" width="10" height="2" /></bezel> + <bezel element="text_lg"><bounds x="62" y="86.3" width="12" height="2" /></bezel> + + <!-- chessboard bezel --> + + <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel> + <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel> + + <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel> + + <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel> + <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel> + + <!-- chessboard sensors --> + + <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + + <!-- chessboard leds --> + + <bezel name="0.7" element="led"><bounds x="1.5" y="7.25" width="1.5" height="1.5" /></bezel> + <bezel name="0.6" element="led"><bounds x="1.5" y="17.25" width="1.5" height="1.5" /></bezel> + <bezel name="0.5" element="led"><bounds x="1.5" y="27.25" width="1.5" height="1.5" /></bezel> + <bezel name="0.4" element="led"><bounds x="1.5" y="37.25" width="1.5" height="1.5" /></bezel> + <bezel name="0.3" element="led"><bounds x="1.5" y="47.25" width="1.5" height="1.5" /></bezel> + <bezel name="0.2" element="led"><bounds x="1.5" y="57.25" width="1.5" height="1.5" /></bezel> + <bezel name="0.1" element="led"><bounds x="1.5" y="67.25" width="1.5" height="1.5" /></bezel> + <bezel name="0.0" element="led"><bounds x="1.5" y="77.25" width="1.5" height="1.5" /></bezel> + + <bezel name="1.0" element="ledg"><bounds x="7.25" y="83" width="1.5" height="1.5" /></bezel> + <bezel name="1.1" element="ledg"><bounds x="17.25" y="83" width="1.5" height="1.5" /></bezel> + <bezel name="1.2" element="ledg"><bounds x="27.25" y="83" width="1.5" height="1.5" /></bezel> + <bezel name="1.3" element="ledg"><bounds x="37.25" y="83" width="1.5" height="1.5" /></bezel> + <bezel name="1.4" element="ledg"><bounds x="47.25" y="83" width="1.5" height="1.5" /></bezel> + <bezel name="1.5" element="ledg"><bounds x="57.25" y="83" width="1.5" height="1.5" /></bezel> + <bezel name="1.6" element="ledg"><bounds x="67.25" y="83" width="1.5" height="1.5" /></bezel> + <bezel name="1.7" element="ledg"><bounds x="77.25" y="83" width="1.5" height="1.5" /></bezel> + + <!-- 7seg leds --> + + <bezel name="digit2" element="digit"> + <bounds x="64.18" y="-12.5" width="5.66" height="8.5" /> + </bezel> + <bezel name="digit3" element="digit"> + <bounds x="69.84" y="-12.5" width="5.66" height="8.5" /> + </bezel> + <bezel name="digit4" element="digit"> + <bounds x="78.34" y="-12.5" width="5.66" height="8.5" /> + </bezel> + <bezel name="digit5" element="digit"> + <bounds x="84" y="-12.5" width="5.66" height="8.5" /> + </bezel> + + <bezel name="3.7" element="led"> + <bounds x="76.76" y="-11" width="0.85" height="0.85" /> + </bezel> + <bezel name="2.7" element="led"> + <bounds x="76.31" y="-6.35" width="0.85" height="0.85" /> + </bezel> + + <!-- right side --> + + <bezel element="black"><bounds x="86" y="2" width="10" height="82" /></bezel> + + <bezel element="text_tl7"><bounds x="87" y="17" width="8" height="1.7" /></bezel> + <bezel element="text_tl6"><bounds x="87" y="26" width="8" height="1.7" /></bezel> + <bezel element="text_tl5"><bounds x="87" y="35" width="8" height="1.7" /></bezel> + <bezel element="text_tl4"><bounds x="87" y="44" width="8" height="1.7" /></bezel> + <bezel element="text_tl3"><bounds x="87" y="53" width="8" height="1.7" /></bezel> + <bezel element="text_tl2"><bounds x="87" y="62" width="8" height="1.7" /></bezel> + + <bezel element="redb"><bounds x="87" y="9" width="8" height="4" /></bezel> + <bezel element="redb"><bounds x="87" y="19" width="8" height="4" /></bezel> + <bezel element="redb"><bounds x="87" y="28" width="8" height="4" /></bezel> + <bezel element="redb"><bounds x="87" y="37" width="8" height="4" /></bezel> + <bezel element="redb"><bounds x="87" y="46" width="8" height="4" /></bezel> + <bezel element="redb"><bounds x="87" y="55" width="8" height="4" /></bezel> + <bezel element="redb"><bounds x="87" y="64" width="8" height="4" /></bezel> + <bezel element="redb"><bounds x="87" y="73" width="8" height="4" /></bezel> + + <bezel element="white"><bounds x="87.3" y="9.3" width="7.4" height="3.4" /></bezel> + <bezel element="white"><bounds x="87.3" y="19.3" width="7.4" height="3.4" /></bezel> + <bezel element="white"><bounds x="87.3" y="28.3" width="7.4" height="3.4" /></bezel> + <bezel element="white"><bounds x="87.3" y="37.3" width="7.4" height="3.4" /></bezel> + <bezel element="white"><bounds x="87.3" y="46.3" width="7.4" height="3.4" /></bezel> + <bezel element="white"><bounds x="87.3" y="55.3" width="7.4" height="3.4" /></bezel> + <bezel element="white"><bounds x="87.3" y="64.3" width="7.4" height="3.4" /></bezel> + <bezel element="white"><bounds x="87.3" y="73.3" width="7.4" height="3.4" /></bezel> + + <bezel element="text_t81"><bounds x="87.35" y="9.5" width="7.3" height="1.5" /></bezel> + <bezel element="text_t82"><bounds x="87.35" y="11" width="7.3" height="1.5" /></bezel> + <bezel element="text_t7"><bounds x="87.35" y="20.25" width="7.3" height="1.5" /></bezel> + <bezel element="text_t6"><bounds x="87.35" y="29.25" width="7.3" height="1.5" /></bezel> + <bezel element="text_t5"><bounds x="87.35" y="38.25" width="7.3" height="1.5" /></bezel> + <bezel element="text_t41"><bounds x="87.35" y="46.5" width="7.3" height="1.5" /></bezel> + <bezel element="text_t42"><bounds x="87.35" y="48" width="7.3" height="1.5" /></bezel> + <bezel element="text_t3"><bounds x="87.35" y="56.25" width="7.3" height="1.5" /></bezel> + <bezel element="text_t2"><bounds x="87.35" y="65.25" width="7.3" height="1.5" /></bezel> + <bezel element="text_t1"><bounds x="87.35" y="74.25" width="7.3" height="1.5" /></bezel> + + <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="9" width="8" height="4" /><color alpha="0.4" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="19" width="8" height="4" /><color alpha="0.4" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="28" width="8" height="4" /><color alpha="0.4" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="37" width="8" height="4" /><color alpha="0.4" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="46" width="8" height="4" /><color alpha="0.4" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="55" width="8" height="4" /><color alpha="0.4" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="64" width="8" height="4" /><color alpha="0.4" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="73" width="8" height="4" /><color alpha="0.4" /></bezel> + </view> </mamelayout> diff --git a/src/mame/layout/fidel_sc12.lay b/src/mame/layout/fidel_sc12.lay index b765ef5ddd1..3d087368edf 100644 --- a/src/mame/layout/fidel_sc12.lay +++ b/src/mame/layout/fidel_sc12.lay @@ -3,37 +3,498 @@ <!-- define elements --> + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="blackl"><rect><color red="0.01" green="0.01" blue="0.01" /></rect></element> + <element name="led" defstate="0"> - <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk> - <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk> + <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> + </element> + + <element name="hl" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="1.0" green="1.0" blue="1.0" /> + </disk> + </element> + <element name="hlb" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="1.0" green="1.0" blue="1.0" /> + </disk> + </element> + + <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element> + <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element> + <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element> + <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element> + + <element name="text_1"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_2"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_3"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_4"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_5"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_6"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_7"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_8"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_l1"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="9" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_l2"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="10" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_l3"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="11" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_l4"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="12" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_l5"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="NO MATE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_l61"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_l62"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="ACCEPTED"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_l71"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_l72"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="DECLINED"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_a"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_c"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_d"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_e"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_f"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_g"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_h"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_b1"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="WHITE" align="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b9"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="BLACK" align="1"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_b2"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="STALEMATE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b31"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="3 TIME"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b32"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="REPEAT"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b41"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="50 MOVE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b42"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="RULE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b5"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="YOUR MOVE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b61"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="DRAW"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b62"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="OFFER"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b7"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="I LOSE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b8"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="MATE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_illegal"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="ILLEGAL"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_check"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="CHECK"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_re"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="RE"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_cl"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="CL"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_king"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="PB/K"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_queen"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="PV/Q"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_rook"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="LV/R"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_bishop"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="TB/B"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_knight"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="DM/N"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_pion"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="RV/P"><color red="0.17" green="0.15" blue="0.15" /></text> </element> <!-- build screen --> <view name="Internal Layout"> - <bounds left="0" right="20" top="0" bottom="20" /> - - <bezel name="1.0" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel> - <bezel name="1.1" element="led"><bounds x="1" y="2" width="1" height="1" /></bezel> - <bezel name="1.2" element="led"><bounds x="1" y="3" width="1" height="1" /></bezel> - <bezel name="1.3" element="led"><bounds x="1" y="4" width="1" height="1" /></bezel> - <bezel name="1.4" element="led"><bounds x="1" y="5" width="1" height="1" /></bezel> - <bezel name="1.5" element="led"><bounds x="1" y="6" width="1" height="1" /></bezel> - <bezel name="1.6" element="led"><bounds x="1" y="7" width="1" height="1" /></bezel> - <bezel name="1.7" element="led"><bounds x="1" y="8" width="1" height="1" /></bezel> - - <bezel name="0.0" element="led"><bounds x="2" y="9" width="1" height="1" /></bezel> - <bezel name="0.1" element="led"><bounds x="3" y="9" width="1" height="1" /></bezel> - <bezel name="0.2" element="led"><bounds x="4" y="9" width="1" height="1" /></bezel> - <bezel name="0.3" element="led"><bounds x="5" y="9" width="1" height="1" /></bezel> - <bezel name="0.4" element="led"><bounds x="6" y="9" width="1" height="1" /></bezel> - <bezel name="0.5" element="led"><bounds x="7" y="9" width="1" height="1" /></bezel> - <bezel name="0.6" element="led"><bounds x="8" y="9" width="1" height="1" /></bezel> - <bezel name="0.7" element="led"><bounds x="9" y="9" width="1" height="1" /></bezel> - - <bezel name="1.8" element="led"><bounds x="11" y="7" width="1" height="1" /></bezel> - <bezel name="0.8" element="led"><bounds x="11" y="8" width="1" height="1" /></bezel> + <bounds left="-7" right="98" top="-2" bottom="93" /> + <bezel element="static_black"> + <bounds left="-7" right="98" top="-2" bottom="93" /> + </bezel> + + <bezel element="white"><bounds x="-7.5" y="-2.5" width="106" height="96" /></bezel> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="-0.8" y="9" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="-0.8" y="19" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="-0.8" y="29" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="-0.8" y="39" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="-0.8" y="49" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="-0.8" y="59" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="-0.8" y="69" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="-0.8" y="79" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="5" y="85" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="15" y="85" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="25" y="85" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="35" y="85" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="45" y="85" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="55" y="85" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="65" y="85" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="75" y="85" width="2" height="2" /></bezel> + + <!-- left side labels --> + + <bezel element="text_l1"><bounds x="-6.8" y="12" width="5" height="2" /></bezel> + <bezel element="text_l2"><bounds x="-6.8" y="22" width="5" height="2" /></bezel> + <bezel element="text_l3"><bounds x="-6.8" y="32" width="5" height="2" /></bezel> + <bezel element="text_l4"><bounds x="-6.8" y="42" width="5" height="2" /></bezel> + + <bezel element="text_l5"><bounds x="-3.8" y="47.25" width="2" height="11.5" /><orientation rotate="90" /></bezel> + <bezel element="text_l61"><bounds x="-3.8" y="58.75" width="2" height="8.5" /><orientation rotate="90" /></bezel> + <bezel element="text_l62"><bounds x="-5.81" y="58.0" width="2" height="10" /><orientation rotate="90" /></bezel> + <bezel element="text_l71"><bounds x="-3.8" y="68.75" width="2" height="8.5" /><orientation rotate="90" /></bezel> + <bezel element="text_l72"><bounds x="-5.81" y="68.0" width="2" height="10" /><orientation rotate="90" /></bezel> + + <bezel element="blackl"><bounds x="-1.3" y="8.75" width="0.3" height="8.5" /></bezel> + <bezel element="blackl"><bounds x="-1.3" y="18.75" width="0.3" height="8.5" /></bezel> + <bezel element="blackl"><bounds x="-1.3" y="28.75" width="0.3" height="8.5" /></bezel> + <bezel element="blackl"><bounds x="-1.3" y="38.75" width="0.3" height="8.5" /></bezel> + <bezel element="blackl"><bounds x="-1.3" y="48.75" width="0.3" height="8.5" /></bezel> + <bezel element="blackl"><bounds x="-1.3" y="58.75" width="0.3" height="8.5" /></bezel> + <bezel element="blackl"><bounds x="-1.3" y="68.75" width="0.3" height="8.5" /></bezel> + + <!-- bottom side labels --> + + <bezel element="text_b1"><bounds x="0" y="87.5" width="7.25" height="2" /></bezel> + <bezel element="text_b9"><bounds x="78.75" y="87.5" width="7.25" height="2" /></bezel> + + <bezel element="blackl"><bounds x="3" y="87" width="4.25" height="0.3" /></bezel> + <bezel element="blackl"><bounds x="78.75" y="87" width="4.25" height="0.3" /></bezel> + + <bezel element="text_b2"><bounds x="7.35" y="87.5" width="11.3" height="2" /></bezel> + <bezel element="text_b31"><bounds x="18.75" y="87.5" width="8.5" height="2" /></bezel> + <bezel element="text_b32"><bounds x="18.75" y="89.51" width="8.5" height="2" /></bezel> + <bezel element="text_b41"><bounds x="28.75" y="87.5" width="8.5" height="2" /></bezel> + <bezel element="text_b42"><bounds x="28.75" y="89.51" width="8.5" height="2" /></bezel> + <bezel element="text_b61"><bounds x="48.75" y="87.5" width="8.5" height="2" /></bezel> + <bezel element="text_b62"><bounds x="48.75" y="89.51" width="8.5" height="2" /></bezel> + <bezel element="text_b5"><bounds x="37.25" y="87.5" width="12" height="2" /></bezel> + <bezel element="text_b7"><bounds x="58.75" y="87.5" width="8.5" height="2" /></bezel> + <bezel element="text_b8"><bounds x="68.75" y="87.5" width="8.5" height="2" /></bezel> + + <bezel element="blackl"><bounds x="8.75" y="87" width="8.5" height="0.3" /></bezel> + <bezel element="blackl"><bounds x="18.75" y="87" width="8.5" height="0.3" /></bezel> + <bezel element="blackl"><bounds x="28.75" y="87" width="8.5" height="0.3" /></bezel> + <bezel element="blackl"><bounds x="38.75" y="87" width="8.5" height="0.3" /></bezel> + <bezel element="blackl"><bounds x="48.75" y="87" width="8.5" height="0.3" /></bezel> + <bezel element="blackl"><bounds x="58.75" y="87" width="8.5" height="0.3" /></bezel> + <bezel element="blackl"><bounds x="68.75" y="87" width="8.5" height="0.3" /></bezel> + + <!-- chessboard leds --> + + <bezel name="1.0" element="led"><bounds x="-1" y="7.25" width="1.5" height="1.5" /></bezel> + <bezel name="1.1" element="led"><bounds x="-1" y="17.25" width="1.5" height="1.5" /></bezel> + <bezel name="1.2" element="led"><bounds x="-1" y="27.25" width="1.5" height="1.5" /></bezel> + <bezel name="1.3" element="led"><bounds x="-1" y="37.25" width="1.5" height="1.5" /></bezel> + <bezel name="1.4" element="led"><bounds x="-1" y="47.25" width="1.5" height="1.5" /></bezel> + <bezel name="1.5" element="led"><bounds x="-1" y="57.25" width="1.5" height="1.5" /></bezel> + <bezel name="1.6" element="led"><bounds x="-1" y="67.25" width="1.5" height="1.5" /></bezel> + <bezel name="1.7" element="led"><bounds x="-1" y="77.25" width="1.5" height="1.5" /></bezel> + + <bezel name="0.0" element="led"><bounds x="7.25" y="85.5" width="1.5" height="1.5" /></bezel> + <bezel name="0.1" element="led"><bounds x="17.25" y="85.5" width="1.5" height="1.5" /></bezel> + <bezel name="0.2" element="led"><bounds x="27.25" y="85.5" width="1.5" height="1.5" /></bezel> + <bezel name="0.3" element="led"><bounds x="37.25" y="85.5" width="1.5" height="1.5" /></bezel> + <bezel name="0.4" element="led"><bounds x="47.25" y="85.5" width="1.5" height="1.5" /></bezel> + <bezel name="0.5" element="led"><bounds x="57.25" y="85.5" width="1.5" height="1.5" /></bezel> + <bezel name="0.6" element="led"><bounds x="67.25" y="85.5" width="1.5" height="1.5" /></bezel> + <bezel name="0.7" element="led"><bounds x="77.25" y="85.5" width="1.5" height="1.5" /></bezel> + + <bezel element="text_illegal"><bounds x="85" y="79.5" width="11.4" height="2" /></bezel> + <bezel element="text_check"><bounds x="85" y="83.5" width="11.4" height="2" /></bezel> + + <bezel name="1.8" element="led"><bounds x="89.95" y="81.5" width="1.5" height="1.5" /></bezel> + <bezel name="0.8" element="led"><bounds x="89.95" y="85.5" width="1.5" height="1.5" /></bezel> + + <!-- chessboard bezel --> + + <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel> + <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel> + + <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel> + + <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel> + <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel> + + <!-- chessboard sensors --> + + <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + + <!-- right side --> + + <bezel element="disk_black"><bounds x="87" y="3.1" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="12.4" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="24.3" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="33.6" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="42.9" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="52.2" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="61.5" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="70.8" width="7.4" height="7.4" /></bezel> + + <bezel element="disk_white"><bounds x="87.8" y="3.9" width="5.8" height="5.8" /></bezel> + <bezel element="disk_white"><bounds x="87.8" y="13.2" width="5.8" height="5.8" /></bezel> + <bezel element="disk_white"><bounds x="87.8" y="25.1" width="5.8" height="5.8" /></bezel> + <bezel element="disk_white"><bounds x="87.8" y="34.4" width="5.8" height="5.8" /></bezel> + <bezel element="disk_white"><bounds x="87.8" y="43.7" width="5.8" height="5.8" /></bezel> + <bezel element="disk_white"><bounds x="87.8" y="53 " width="5.8" height="5.8" /></bezel> + <bezel element="disk_white"><bounds x="87.8" y="62.3" width="5.8" height="5.8" /></bezel> + <bezel element="disk_white"><bounds x="87.8" y="71.6" width="5.8" height="5.8" /></bezel> + + <bezel element="text_re"><bounds x="87.8" y="5.6" width="5.8" height="2.4" /></bezel> + <bezel element="text_cl"><bounds x="87.8" y="14.9" width="5.8" height="2.4" /></bezel> + <bezel element="text_king"><bounds x="87.8" y="26.8" width="5.8" height="2.4" /></bezel> + <bezel element="text_queen"><bounds x="87.8" y="36.1" width="5.8" height="2.4" /></bezel> + <bezel element="text_rook"><bounds x="87.8" y="45.4" width="5.8" height="2.4" /></bezel> + <bezel element="text_bishop"><bounds x="87.8" y="54.7" width="5.8" height="2.4" /></bezel> + <bezel element="text_knight"><bounds x="87.8" y="64 " width="5.8" height="2.4" /></bezel> + <bezel element="text_pion"><bounds x="87.8" y="73.3" width="5.8" height="2.4" /></bezel> + + <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="3.1" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="12.4" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="24.3" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="33.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="42.9" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="52.2" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="61.5" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="70.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + </view> </mamelayout> diff --git a/src/mame/layout/fidel_vsc.lay b/src/mame/layout/fidel_vsc.lay index c56ae1b11db..f9c2c742620 100644 --- a/src/mame/layout/fidel_vsc.lay +++ b/src/mame/layout/fidel_vsc.lay @@ -1,262 +1,491 @@ <?xml version="1.0"?> <mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="digit" defstate="0"> - <led7seg> - <color red="0.75" green="0.0" blue="0.0" /> - </led7seg> + <led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg> </element> + <element name="led" defstate="0"> + <disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk> + <disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk> + </element> + + <element name="hl" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> <disk state="1"> - <color red="0.75" green="0.0" blue="0.0" /> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="1.0" green="1.0" blue="1.0" /> </disk> - <disk state="0"> - <color red="0.20" green="0.0" blue="0.0" /> + </element> + <element name="hlb" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="1.0" green="1.0" blue="1.0" /> </disk> </element> - <element name="background"> - <rect> - <bounds left="0" top="0" right="1" bottom="1" /> + <element name="hlp" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> <color red="0.0" green="0.0" blue="0.0" /> + </text> + <rect state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="1.0" green="1.0" blue="1.0" /> </rect> </element> + <element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element> + <element name="white"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element> + <element name="disk_black"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element> + <element name="disk_white"><disk><color red="0.81" green="0.8" blue="0.79" /></disk></element> + + <element name="text_1"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_2"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_3"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_4"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_5"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_6"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_7"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_8"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_a"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_b"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_c"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_d"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_e"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_f"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_g"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_h"> + <rect><color red="0.81" green="0.8" blue="0.79" /></rect> + <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + + <element name="text_re"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="RE"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_cl"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="CL"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_king"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="K"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_queen"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="Q"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_rook"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="R"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_bishop"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="B"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_knight"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="N"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + <element name="text_pion"> + <disk><color red="0.81" green="0.8" blue="0.79" /></disk> + <text string="P"><color red="0.17" green="0.15" blue="0.15" /></text> + </element> + + <element name="text_tm"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="TM"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_rv"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="RV"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_speak"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="spk"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_st"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="ST"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_dm"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="DM"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + <element name="text_lv"> + <rect><color red="0.17" green="0.15" blue="0.15" /></rect> + <text string="LV"><color red="0.81" green="0.8" blue="0.79" /></text> + </element> + + +<!-- build screen --> + <view name="Internal Layout"> - <!-- background --> - <bezel element="background"> - <bounds left="00" top="00" right="82" bottom="90" /> + <bounds left="-2" right="98" top="-18" bottom="88" /> + <bezel element="static_black"> + <bounds left="-2" right="98" top="-18" bottom="88" /> </bezel> - <!-- Column A --> - <bezel name="4.7" element="led" inputtag="IN.0" inputmask="0x80"> - <bounds x="5" y="15" width="2" height="2" /> - </bezel> - <bezel name="4.6" element="led" inputtag="IN.0" inputmask="0x40"> - <bounds x="5" y="25" width="2" height="2" /> - </bezel> - <bezel name="4.5" element="led" inputtag="IN.0" inputmask="0x20"> - <bounds x="5" y="35" width="2" height="2" /> - </bezel> - <bezel name="4.4" element="led" inputtag="IN.0" inputmask="0x10"> - <bounds x="5" y="45" width="2" height="2" /> - </bezel> - <bezel name="4.3" element="led" inputtag="IN.0" inputmask="0x08"> - <bounds x="5" y="55" width="2" height="2" /> - </bezel> - <bezel name="4.2" element="led" inputtag="IN.0" inputmask="0x04"> - <bounds x="5" y="65" width="2" height="2" /> - </bezel> - <bezel name="4.1" element="led" inputtag="IN.0" inputmask="0x02"> - <bounds x="5" y="75" width="2" height="2" /> - </bezel> - <bezel name="4.0" element="led" inputtag="IN.0" inputmask="0x01"> - <bounds x="5" y="85" width="2" height="2" /> - </bezel> + <bezel element="white"><bounds x="-2.5" y="-2" width="101" height="90.5" /></bezel> - <!-- Column B --> - <bezel name="5.7" element="led" inputtag="IN.1" inputmask="0x80"> - <bounds x="15" y="15" width="2" height="2" /> - </bezel> - <bezel name="5.6" element="led" inputtag="IN.1" inputmask="0x40"> - <bounds x="15" y="25" width="2" height="2" /> - </bezel> - <bezel name="5.5" element="led" inputtag="IN.1" inputmask="0x20"> - <bounds x="15" y="35" width="2" height="2" /> - </bezel> - <bezel name="5.4" element="led" inputtag="IN.1" inputmask="0x10"> - <bounds x="15" y="45" width="2" height="2" /> - </bezel> - <bezel name="5.3" element="led" inputtag="IN.1" inputmask="0x08"> - <bounds x="15" y="55" width="2" height="2" /> - </bezel> - <bezel name="5.2" element="led" inputtag="IN.1" inputmask="0x04"> - <bounds x="15" y="65" width="2" height="2" /> - </bezel> - <bezel name="5.1" element="led" inputtag="IN.1" inputmask="0x02"> - <bounds x="15" y="75" width="2" height="2" /> - </bezel> - <bezel name="5.0" element="led" inputtag="IN.1" inputmask="0x01"> - <bounds x="15" y="85" width="2" height="2" /> - </bezel> + <!-- chessboard coords --> - <!-- Column C --> - <bezel name="6.7" element="led" inputtag="IN.2" inputmask="0x80"> - <bounds x="25" y="15" width="2" height="2" /> - </bezel> - <bezel name="6.6" element="led" inputtag="IN.2" inputmask="0x40"> - <bounds x="25" y="25" width="2" height="2" /> - </bezel> - <bezel name="6.5" element="led" inputtag="IN.2" inputmask="0x20"> - <bounds x="25" y="35" width="2" height="2" /> - </bezel> - <bezel name="6.4" element="led" inputtag="IN.2" inputmask="0x10"> - <bounds x="25" y="45" width="2" height="2" /> - </bezel> - <bezel name="6.3" element="led" inputtag="IN.2" inputmask="0x08"> - <bounds x="25" y="55" width="2" height="2" /> - </bezel> - <bezel name="6.2" element="led" inputtag="IN.2" inputmask="0x04"> - <bounds x="25" y="65" width="2" height="2" /> - </bezel> - <bezel name="6.1" element="led" inputtag="IN.2" inputmask="0x02"> - <bounds x="25" y="75" width="2" height="2" /> - </bezel> - <bezel name="6.0" element="led" inputtag="IN.2" inputmask="0x01"> - <bounds x="25" y="85" width="2" height="2" /> - </bezel> + <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel> - <!-- Column D --> - <bezel name="7.7" element="led" inputtag="IN.3" inputmask="0x80"> - <bounds x="35" y="15" width="2" height="2" /> - </bezel> - <bezel name="7.6" element="led" inputtag="IN.3" inputmask="0x40"> - <bounds x="35" y="25" width="2" height="2" /> - </bezel> - <bezel name="7.5" element="led" inputtag="IN.3" inputmask="0x20"> - <bounds x="35" y="35" width="2" height="2" /> - </bezel> - <bezel name="7.4" element="led" inputtag="IN.3" inputmask="0x10"> - <bounds x="35" y="45" width="2" height="2" /> - </bezel> - <bezel name="7.3" element="led" inputtag="IN.3" inputmask="0x08"> - <bounds x="35" y="55" width="2" height="2" /> - </bezel> - <bezel name="7.2" element="led" inputtag="IN.3" inputmask="0x04"> - <bounds x="35" y="65" width="2" height="2" /> - </bezel> - <bezel name="7.1" element="led" inputtag="IN.3" inputmask="0x02"> - <bounds x="35" y="75" width="2" height="2" /> - </bezel> - <bezel name="7.0" element="led" inputtag="IN.3" inputmask="0x01"> - <bounds x="35" y="85" width="2" height="2" /> - </bezel> + <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel> - <!-- Column E --> - <bezel name="8.7" element="led" inputtag="IN.4" inputmask="0x80"> - <bounds x="45" y="15" width="2" height="2" /> - </bezel> - <bezel name="8.6" element="led" inputtag="IN.4" inputmask="0x40"> - <bounds x="45" y="25" width="2" height="2" /> - </bezel> - <bezel name="8.5" element="led" inputtag="IN.4" inputmask="0x20"> - <bounds x="45" y="35" width="2" height="2" /> - </bezel> - <bezel name="8.4" element="led" inputtag="IN.4" inputmask="0x10"> - <bounds x="45" y="45" width="2" height="2" /> - </bezel> - <bezel name="8.3" element="led" inputtag="IN.4" inputmask="0x08"> - <bounds x="45" y="55" width="2" height="2" /> - </bezel> - <bezel name="8.2" element="led" inputtag="IN.4" inputmask="0x04"> - <bounds x="45" y="65" width="2" height="2" /> - </bezel> - <bezel name="8.1" element="led" inputtag="IN.4" inputmask="0x02"> - <bounds x="45" y="75" width="2" height="2" /> - </bezel> - <bezel name="8.0" element="led" inputtag="IN.4" inputmask="0x01"> - <bounds x="45" y="85" width="2" height="2" /> - </bezel> + <!-- chessboard bezel --> - <!-- Column F --> - <bezel name="9.7" element="led" inputtag="IN.5" inputmask="0x80"> - <bounds x="55" y="15" width="2" height="2" /> - </bezel> - <bezel name="9.6" element="led" inputtag="IN.5" inputmask="0x40"> - <bounds x="55" y="25" width="2" height="2" /> - </bezel> - <bezel name="9.5" element="led" inputtag="IN.5" inputmask="0x20"> - <bounds x="55" y="35" width="2" height="2" /> - </bezel> - <bezel name="9.4" element="led" inputtag="IN.5" inputmask="0x10"> - <bounds x="55" y="45" width="2" height="2" /> - </bezel> - <bezel name="9.3" element="led" inputtag="IN.5" inputmask="0x08"> - <bounds x="55" y="55" width="2" height="2" /> - </bezel> - <bezel name="9.2" element="led" inputtag="IN.5" inputmask="0x04"> - <bounds x="55" y="65" width="2" height="2" /> - </bezel> - <bezel name="9.1" element="led" inputtag="IN.5" inputmask="0x02"> - <bounds x="55" y="75" width="2" height="2" /> - </bezel> - <bezel name="9.0" element="led" inputtag="IN.5" inputmask="0x01"> - <bounds x="55" y="85" width="2" height="2" /> - </bezel> + <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel> + <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel> - <!-- Column G --> - <bezel name="10.7" element="led" inputtag="IN.6" inputmask="0x80"> - <bounds x="65" y="15" width="2" height="2" /> - </bezel> - <bezel name="10.6" element="led" inputtag="IN.6" inputmask="0x40"> - <bounds x="65" y="25" width="2" height="2" /> - </bezel> - <bezel name="10.5" element="led" inputtag="IN.6" inputmask="0x20"> - <bounds x="65" y="35" width="2" height="2" /> - </bezel> - <bezel name="10.4" element="led" inputtag="IN.6" inputmask="0x10"> - <bounds x="65" y="45" width="2" height="2" /> - </bezel> - <bezel name="10.3" element="led" inputtag="IN.6" inputmask="0x08"> - <bounds x="65" y="55" width="2" height="2" /> - </bezel> - <bezel name="10.2" element="led" inputtag="IN.6" inputmask="0x04"> - <bounds x="65" y="65" width="2" height="2" /> - </bezel> - <bezel name="10.1" element="led" inputtag="IN.6" inputmask="0x02"> - <bounds x="65" y="75" width="2" height="2" /> - </bezel> - <bezel name="10.0" element="led" inputtag="IN.6" inputmask="0x01"> - <bounds x="65" y="85" width="2" height="2" /> - </bezel> + <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel> - <!-- Column H --> - <bezel name="11.7" element="led" inputtag="IN.7" inputmask="0x80"> - <bounds x="75" y="15" width="2" height="2" /> - </bezel> - <bezel name="11.6" element="led" inputtag="IN.7" inputmask="0x40"> - <bounds x="75" y="25" width="2" height="2" /> - </bezel> - <bezel name="11.5" element="led" inputtag="IN.7" inputmask="0x20"> - <bounds x="75" y="35" width="2" height="2" /> - </bezel> - <bezel name="11.4" element="led" inputtag="IN.7" inputmask="0x10"> - <bounds x="75" y="45" width="2" height="2" /> - </bezel> - <bezel name="11.3" element="led" inputtag="IN.7" inputmask="0x08"> - <bounds x="75" y="55" width="2" height="2" /> - </bezel> - <bezel name="11.2" element="led" inputtag="IN.7" inputmask="0x04"> - <bounds x="75" y="65" width="2" height="2" /> - </bezel> - <bezel name="11.1" element="led" inputtag="IN.7" inputmask="0x02"> - <bounds x="75" y="75" width="2" height="2" /> - </bezel> - <bezel name="11.0" element="led" inputtag="IN.7" inputmask="0x01"> - <bounds x="75" y="85" width="2" height="2" /> - </bezel> + <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel> - <!-- Problem mode LED --> - <bezel name="0.7" element="led"> - <bounds x="69" y="5" width="2" height="2" /> - </bezel> + <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel> + <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel> + + <!-- chessboard leds --> + + <bezel name="4.7" element="led"><bounds x="3.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.7" element="led"><bounds x="13.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.7" element="led"><bounds x="23.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.7" element="led"><bounds x="33.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.7" element="led"><bounds x="43.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.7" element="led"><bounds x="53.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.7" element="led"><bounds x="63.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.7" element="led"><bounds x="73.2" y="11.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.6" element="led"><bounds x="3.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.6" element="led"><bounds x="13.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.6" element="led"><bounds x="23.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.6" element="led"><bounds x="33.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.6" element="led"><bounds x="43.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.6" element="led"><bounds x="53.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.6" element="led"><bounds x="63.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.6" element="led"><bounds x="73.2" y="21.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.5" element="led"><bounds x="3.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.5" element="led"><bounds x="13.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.5" element="led"><bounds x="23.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.5" element="led"><bounds x="33.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.5" element="led"><bounds x="43.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.5" element="led"><bounds x="53.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.5" element="led"><bounds x="63.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.5" element="led"><bounds x="73.2" y="31.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.4" element="led"><bounds x="3.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.4" element="led"><bounds x="13.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.4" element="led"><bounds x="23.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.4" element="led"><bounds x="33.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.4" element="led"><bounds x="43.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.4" element="led"><bounds x="53.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.4" element="led"><bounds x="63.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.4" element="led"><bounds x="73.2" y="41.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.3" element="led"><bounds x="3.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.3" element="led"><bounds x="13.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.3" element="led"><bounds x="23.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.3" element="led"><bounds x="33.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.3" element="led"><bounds x="43.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.3" element="led"><bounds x="53.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.3" element="led"><bounds x="63.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.3" element="led"><bounds x="73.2" y="51.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.2" element="led"><bounds x="3.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.2" element="led"><bounds x="13.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.2" element="led"><bounds x="23.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.2" element="led"><bounds x="33.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.2" element="led"><bounds x="43.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.2" element="led"><bounds x="53.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.2" element="led"><bounds x="63.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.2" element="led"><bounds x="73.2" y="61.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.1" element="led"><bounds x="3.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.1" element="led"><bounds x="13.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.1" element="led"><bounds x="23.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.1" element="led"><bounds x="33.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.1" element="led"><bounds x="43.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.1" element="led"><bounds x="53.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.1" element="led"><bounds x="63.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.1" element="led"><bounds x="73.2" y="71.3" width="1.5" height="1.5" /></bezel> + + <bezel name="4.0" element="led"><bounds x="3.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="5.0" element="led"><bounds x="13.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="6.0" element="led"><bounds x="23.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="7.0" element="led"><bounds x="33.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="8.0" element="led"><bounds x="43.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="9.0" element="led"><bounds x="53.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="10.0" element="led"><bounds x="63.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="11.0" element="led"><bounds x="73.2" y="81.3" width="1.5" height="1.5" /></bezel> + + <!-- chessboard sensors --> + + <bezel element="hl" inputtag="IN.0" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.4" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.5" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="IN.6" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.7" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + + <!-- right side --> + + <bezel name="0.7" element="led"><bounds x="89.95" y="7.25" width="1.5" height="1.5" /></bezel> + + <bezel element="disk_black"><bounds x="87" y="13" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="21.8" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="30.6" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="39.4" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="48.2" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="57" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="65.8" width="7.4" height="7.4" /></bezel> + <bezel element="disk_black"><bounds x="87" y="74.6" width="7.4" height="7.4" /></bezel> + + <bezel element="disk_white"><bounds x="88.2" y="14.2" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="23" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="31.8" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="40.6" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="49.4" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="58.2" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="67" width="5" height="5" /></bezel> + <bezel element="disk_white"><bounds x="88.2" y="75.8" width="5" height="5" /></bezel> + + <bezel element="text_re"><bounds x="88.2" y="15.2" width="5" height="3" /></bezel> + <bezel element="text_cl"><bounds x="88.2" y="24" width="5" height="3" /></bezel> + <bezel element="text_king"><bounds x="88.2" y="32.8" width="5" height="3" /></bezel> + <bezel element="text_queen"><bounds x="88.2" y="41.6" width="5" height="3" /></bezel> + <bezel element="text_bishop"><bounds x="88.2" y="50.4" width="5" height="3" /></bezel> + <bezel element="text_knight"><bounds x="88.2" y="59.2" width="5" height="3" /></bezel> + <bezel element="text_rook"><bounds x="88.2" y="68" width="5" height="3" /></bezel> + <bezel element="text_pion"><bounds x="88.2" y="76.8" width="5" height="3" /></bezel> + + <bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="13" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="21.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="30.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="39.4" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="48.2" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="57" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="65.8" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + <bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="74.6" width="7.4" height="7.4" /><color alpha="0.3" /></bezel> + + <!-- panel 7seg leds --> - <!-- Display --> <bezel name="digit3" element="digit"> - <bounds x="31" y="2" width="4" height="8" /> + <bounds x="33" y="-14.5" width="5.66" height="8.5" /> </bezel> <bezel name="digit2" element="digit"> - <bounds x="36" y="2" width="4" height="8" /> - </bezel> - <bezel name="2.7" element="led"> - <bounds x="42" y="3" width="1" height="1" /> - </bezel> - <bezel name="3.7" element="led"> - <bounds x="42" y="8" width="1" height="1" /> + <bounds x="38.66" y="-14.5" width="5.66" height="8.5" /> </bezel> <bezel name="digit1" element="digit"> - <bounds x="45" y="2" width="4" height="8" /> + <bounds x="47.16" y="-14.5" width="5.66" height="8.5" /> </bezel> <bezel name="digit0" element="digit"> - <bounds x="50" y="2" width="4" height="8" /> + <bounds x="52.82" y="-14.5" width="5.66" height="8.5" /> + </bezel> + + <bezel name="2.7" element="led"> + <bounds x="45.58" y="-13" width="0.85" height="0.85" /> + </bezel> + <bezel name="3.7" element="led"> + <bounds x="45.13" y="-8.35" width="0.85" height="0.85" /> </bezel> + + <!-- panel buttons --> + + <bezel element="black"><bounds x="73" y="-14.5" width="5" height="3" /></bezel> + <bezel element="text_tm"><bounds x="73.05" y="-14.45" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.9" inputmask="0x01"><bounds x="73" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="79.2" y="-14.5" width="5" height="3" /></bezel> + <bezel element="text_rv"><bounds x="79.25" y="-14.45" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.9" inputmask="0x02"><bounds x="79.2" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="85.4" y="-14.5" width="5" height="3" /></bezel> + <bezel element="text_speak"><bounds x="85.45" y="-14.45" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.9" inputmask="0x04"><bounds x="85.4" y="-14.5" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="73" y="-9" width="5" height="3" /></bezel> + <bezel element="text_st"><bounds x="73.05" y="-8.95" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.9" inputmask="0x20"><bounds x="73" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="79.2" y="-9" width="5" height="3" /></bezel> + <bezel element="text_dm"><bounds x="79.25" y="-8.95" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.9" inputmask="0x10"><bounds x="79.2" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel> + + <bezel element="black"><bounds x="85.4" y="-9" width="5" height="3" /></bezel> + <bezel element="text_lv"><bounds x="85.45" y="-8.95" width="4.9" height="2.9" /></bezel> + <bezel element="hlp" inputtag="IN.9" inputmask="0x08"><bounds x="85.4" y="-9" width="5" height="3" /><color alpha="0.25" /></bezel> + + </view> </mamelayout> diff --git a/src/mame/layout/h2hfootb.lay b/src/mame/layout/h2hfootb.lay index 1bf59a074c9..9a31d4f72bb 100644 --- a/src/mame/layout/h2hfootb.lay +++ b/src/mame/layout/h2hfootb.lay @@ -34,7 +34,7 @@ <element name="text_p1"> <rect><color red="0.24" green="0.4" blue="0.24" /></rect> - <text string="P1 SEL:"> + <text string="PL SEL:"> <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> <color red="0.7" green="0.7" blue="0.8" /> </text> @@ -139,7 +139,6 @@ <bezel element="static_white"><bounds x="344" y="29" width="4" height="1" /></bezel> <bezel element="static_white"><bounds x="344" y="56" width="4" height="1" /></bezel> - <!-- leds --> <bezel name="0.5" element="seg"><bounds x="0" y="0" width="5" height="20" /></bezel> diff --git a/src/mame/layout/k28.lay b/src/mame/layout/k28.lay new file mode 100644 index 00000000000..70e4c1e0577 --- /dev/null +++ b/src/mame/layout/k28.lay @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="digit" defstate="0"> + <led14seg><color red="0.2" green="1.0" blue="0.85" /></led14seg> + </element> + +<!-- add our own for DP(display point) and the CT(comma tail) segments --> +<!-- MAME led16segsc won't do, since this one has them on the left side --> + + <element name="lamp_dp" defstate="0"> + <disk state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></disk> + <disk state="1"><color red="0.2" green="1.0" blue="0.85" /></disk> + </element> + <element name="lamp_ct" defstate="0"> + <rect state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></rect> + <rect state="1"><color red="0.2" green="1.0" blue="0.85" /></rect> + </element> + + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-1.5" right="99" top="0" bottom="15" /> + + <!-- 9 digits --> + + <bezel name="digit8" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel> + <bezel name="lamp814" element="lamp_dp"><bounds x="-1.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp815" element="lamp_ct"><bounds x="-0.8" y="13.5" width="0.75" height="1.5" /></bezel> + + <bezel name="digit7" element="digit"><bounds x="11" y="0" width="10" height="15" /></bezel> + <bezel name="lamp714" element="lamp_dp"><bounds x="9.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp715" element="lamp_ct"><bounds x="10.2" y="13.5" width="0.75" height="1.5" /></bezel> + + <bezel name="digit6" element="digit"><bounds x="22" y="0" width="10" height="15" /></bezel> + <bezel name="lamp614" element="lamp_dp"><bounds x="20.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp615" element="lamp_ct"><bounds x="21.2" y="13.5" width="0.75" height="1.5" /></bezel> + + <bezel name="digit5" element="digit"><bounds x="33" y="0" width="10" height="15" /></bezel> + <bezel name="lamp514" element="lamp_dp"><bounds x="31.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp515" element="lamp_ct"><bounds x="32.2" y="13.5" width="0.75" height="1.5" /></bezel> + + <bezel name="digit4" element="digit"><bounds x="44" y="0" width="10" height="15" /></bezel> + <bezel name="lamp414" element="lamp_dp"><bounds x="42.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp415" element="lamp_ct"><bounds x="43.2" y="13.5" width="0.75" height="1.5" /></bezel> + + <bezel name="digit3" element="digit"><bounds x="55" y="0" width="10" height="15" /></bezel> + <bezel name="lamp314" element="lamp_dp"><bounds x="53.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp315" element="lamp_ct"><bounds x="54.2" y="13.5" width="0.75" height="1.5" /></bezel> + + <bezel name="digit2" element="digit"><bounds x="66" y="0" width="10" height="15" /></bezel> + <bezel name="lamp214" element="lamp_dp"><bounds x="64.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp215" element="lamp_ct"><bounds x="65.2" y="13.5" width="0.75" height="1.5" /></bezel> + + <bezel name="digit1" element="digit"><bounds x="77" y="0" width="10" height="15" /></bezel> + <bezel name="lamp114" element="lamp_dp"><bounds x="75.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp115" element="lamp_ct"><bounds x="76.2" y="13.5" width="0.75" height="1.5" /></bezel> + + <bezel name="digit0" element="digit"><bounds x="88" y="0" width="10" height="15" /></bezel> + <bezel name="lamp14" element="lamp_dp"><bounds x="86.5" y="11" width="1.5" height="1.5" /></bezel> + <bezel name="lamp15" element="lamp_ct"><bounds x="87.2" y="13.5" width="0.75" height="1.5" /></bezel> + + </view> +</mamelayout> diff --git a/src/mame/layout/k28m2.lay b/src/mame/layout/k28m2.lay new file mode 100644 index 00000000000..dde1a20e295 --- /dev/null +++ b/src/mame/layout/k28m2.lay @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="digit" defstate="0"> + <led16seg><color red="0.5" green="0.5" blue="0.5" /></led16seg> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="80" top="0" bottom="15" /> + + <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel> + <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel> + <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel> + <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel> + <bezel name="digit4" element="digit"><bounds x="40" y="0" width="10" height="15" /></bezel> + <bezel name="digit5" element="digit"><bounds x="50" y="0" width="10" height="15" /></bezel> + <bezel name="digit6" element="digit"><bounds x="60" y="0" width="10" height="15" /></bezel> + <bezel name="digit7" element="digit"><bounds x="70" y="0" width="10" height="15" /></bezel> + + </view> +</mamelayout> diff --git a/src/mame/layout/lostreas.lay b/src/mame/layout/lostreas.lay new file mode 100644 index 00000000000..ac967ce00f2 --- /dev/null +++ b/src/mame/layout/lostreas.lay @@ -0,0 +1,181 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_blue"><rect><color red="0.1" green="0.25" blue="0.5" /></rect></element> + <element name="static_blue2"><rect><color red="0.04" green="0.1" blue="0.2" /></rect></element> + <element name="disk_cyan"><disk><color red="0.0" green="0.75" blue="1.0" /></disk></element> + <element name="disk_white"><disk><color red="0.8" green="0.9" blue="1.0" /></disk></element> + + <element name="led" defstate="0"> + <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk> + <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk> + </element> + + <element name="text_1"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="1"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_2"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="2"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_3"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="3"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_4"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="4"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_5"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="5"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_6"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="6"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_7"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="7"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_8"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="8"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_9"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="9"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_10"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="10"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_11"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="11"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_12"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="12"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + + <element name="text_100"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="100"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_150"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="150"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_200"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="200"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_250"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="250"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_300"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="300"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_350"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="350"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + + <element name="text_air"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="AIR"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + <element name="text_ss"> + <rect><color red="0.1" green="0.25" blue="0.5" /></rect> + <text string="$$"><color red="0.04" green="0.1" blue="0.2" /></text> + </element> + + <element name="text_n"> + <rect><color red="0.0" green="0.75" blue="1.0" /></rect> + <text string="N"><color red="1" green="1" blue="1" /></text> + </element> + <element name="text_s"> + <rect><color red="0.0" green="0.75" blue="1.0" /></rect> + <text string="S"><color red="1" green="1" blue="1" /></text> + </element> + <element name="text_w"> + <rect><color red="0.0" green="0.75" blue="1.0" /></rect> + <text string="W"><color red="1" green="1" blue="1" /></text> + </element> + <element name="text_e"> + <rect><color red="0.0" green="0.75" blue="1.0" /></rect> + <text string="E"><color red="1" green="1" blue="1" /></text> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="2.2" right="18.5" top="1" bottom="17.3" /> + <bezel element="static_blue"> + <bounds left="0" right="20" top="0" bottom="20" /> + </bezel> + + <!-- left side --> + + <bezel element="text_12"><bounds x="2.5" y="4" width="2" height="0.5" /></bezel> + <bezel element="text_11"><bounds x="2.5" y="4.7" width="2" height="0.5" /></bezel> + <bezel element="text_10"><bounds x="2.5" y="6" width="2" height="0.5" /></bezel> + <bezel element="text_9"><bounds x="2.5" y="6.7" width="2" height="0.5" /></bezel> + <bezel element="text_8"><bounds x="2.5" y="8" width="2" height="0.5" /></bezel> + <bezel element="text_7"><bounds x="2.5" y="8.7" width="2" height="0.5" /></bezel> + <bezel element="text_6"><bounds x="2.5" y="10" width="2" height="0.5" /></bezel> + <bezel element="text_5"><bounds x="2.5" y="10.7" width="2" height="0.5" /></bezel> + <bezel element="text_4"><bounds x="2.5" y="12" width="2" height="0.5" /></bezel> + <bezel element="text_3"><bounds x="2.5" y="12.7" width="2" height="0.5" /></bezel> + <bezel element="text_2"><bounds x="2.5" y="14" width="2" height="0.5" /></bezel> + <bezel element="text_1"><bounds x="2.5" y="14.7" width="2" height="0.5" /></bezel> + <bezel element="text_air"><bounds x="1.5" y="15.7" width="4" height="0.5" /></bezel> + + <bezel element="text_350"><bounds x="4.4" y="4.35" width="3" height="0.5" /></bezel> + <bezel element="text_300"><bounds x="4.4" y="6.35" width="3" height="0.5" /></bezel> + <bezel element="text_250"><bounds x="4.4" y="8.35" width="3" height="0.5" /></bezel> + <bezel element="text_200"><bounds x="4.4" y="10.35" width="3" height="0.5" /></bezel> + <bezel element="text_150"><bounds x="4.4" y="12.35" width="3" height="0.5" /></bezel> + <bezel element="text_100"><bounds x="4.4" y="14.35" width="3" height="0.5" /></bezel> + <bezel element="text_ss"><bounds x="4.4" y="15.7" width="3" height="0.5" /></bezel> + + <bezel element="static_blue2"><bounds x="3.1" y="4.57" width="0.77" height="0.06" /></bezel> + <bezel element="static_blue2"><bounds x="3.1" y="6.57" width="0.77" height="0.06" /></bezel> + <bezel element="static_blue2"><bounds x="3.1" y="8.57" width="0.77" height="0.06" /></bezel> + <bezel element="static_blue2"><bounds x="3.1" y="10.57" width="0.77" height="0.06" /></bezel> + <bezel element="static_blue2"><bounds x="3.1" y="12.57" width="0.77" height="0.06" /></bezel> + <bezel element="static_blue2"><bounds x="3.1" y="14.57" width="0.77" height="0.06" /></bezel> + <bezel element="static_blue2"><bounds x="7" y="0" width="0.3" height="20" /></bezel> + + <bezel name="0.5" element="led"><bounds x="4" y="4" width="1.2" height="1.2" /></bezel> + <bezel name="0.4" element="led"><bounds x="4" y="6" width="1.2" height="1.2" /></bezel> + <bezel name="0.3" element="led"><bounds x="4" y="8" width="1.2" height="1.2" /></bezel> + <bezel name="0.2" element="led"><bounds x="4" y="10" width="1.2" height="1.2" /></bezel> + <bezel name="0.1" element="led"><bounds x="4" y="12" width="1.2" height="1.2" /></bezel> + <bezel name="0.0" element="led"><bounds x="4" y="14" width="1.2" height="1.2" /></bezel> + + <!-- compass --> + + <bezel element="disk_white"><bounds x="8.1" y="2.1" width="9" height="9" /></bezel> + <bezel element="disk_cyan"><bounds x="8.5" y="2.5" width="8.2" height="8.2" /></bezel> + + <bezel element="text_n"><bounds x="12" y="2.7" width="1.2" height="1.2" /></bezel> + <bezel element="text_s"><bounds x="12" y="9.3" width="1.2" height="1.2" /></bezel> + <bezel element="text_w"><bounds x="8.8" y="6" width="1.2" height="1.2" /></bezel> + <bezel element="text_e"><bounds x="15.2" y="6" width="1.2" height="1.2" /></bezel> + + <bezel name="0.6" element="led"><bounds x="12" y="4" width="1.2" height="1.2" /></bezel> + <bezel name="0.7" element="led"><bounds x="12" y="8" width="1.2" height="1.2" /></bezel> + <bezel name="0.8" element="led"><bounds x="10" y="6" width="1.2" height="1.2" /></bezel> + <bezel name="0.9" element="led"><bounds x="14" y="6" width="1.2" height="1.2" /></bezel> + <bezel name="0.10" element="led"><bounds x="12" y="6" width="1.2" height="1.2" /></bezel> + + </view> +</mamelayout> diff --git a/src/mame/layout/mathmagi.lay b/src/mame/layout/mathmagi.lay index eb4e745c77b..b75ac74e178 100644 --- a/src/mame/layout/mathmagi.lay +++ b/src/mame/layout/mathmagi.lay @@ -27,7 +27,6 @@ </element> - <!-- build screen --> <view name="Internal Layout"> @@ -62,28 +61,28 @@ <!-- math symbols custom digit --> - <bezel name="lamp87" element="lamp_dash"><bounds x="21.5" y="17.25" width="7" height="0.5" /></bezel> + <bezel name="8.6" element="lamp_dash"><bounds x="21.5" y="17.25" width="7" height="0.5" /></bezel> - <bezel name="lamp82" element="lamp_slash"><bounds x="24" y="9.5" width="5" height="7.5" /></bezel> - <bezel name="lamp82" element="lamp_slash"><bounds x="21" y="17" width="5" height="7.5" /></bezel> + <bezel name="8.1" element="lamp_slash"><bounds x="24" y="9.5" width="5" height="7.5" /></bezel> + <bezel name="8.1" element="lamp_slash"><bounds x="21" y="17" width="5" height="7.5" /></bezel> - <bezel name="lamp83" element="lamp_backslash"><bounds x="21" y="9.5" width="5" height="7.5" /></bezel> - <bezel name="lamp83" element="lamp_backslash"><bounds x="24" y="17" width="5" height="7.5" /></bezel> + <bezel name="8.2" element="lamp_backslash"><bounds x="21" y="9.5" width="5" height="7.5" /></bezel> + <bezel name="8.2" element="lamp_backslash"><bounds x="24" y="17" width="5" height="7.5" /></bezel> - <bezel name="lamp81" element="lamp_dot"><bounds x="24.25" y="12.25" width="1.5" height="1.5" /></bezel> - <bezel name="lamp81" element="lamp_dot"><bounds x="24.25" y="21.75" width="1.5" height="1.5" /></bezel> + <bezel name="8.0" element="lamp_dot"><bounds x="24.25" y="12.25" width="1.5" height="1.5" /></bezel> + <bezel name="8.0" element="lamp_dot"><bounds x="24.25" y="21.75" width="1.5" height="1.5" /></bezel> <!-- equals sign custom digit --> - <bezel name="lamp91" element="lamp_dash"><bounds x="51.5" y="14.5" width="7" height="0.5" /></bezel> - <bezel name="lamp94" element="lamp_dash"><bounds x="51.5" y="20.0" width="7" height="0.5" /></bezel> + <bezel name="9.0" element="lamp_dash"><bounds x="51.5" y="14.5" width="7" height="0.5" /></bezel> + <bezel name="9.3" element="lamp_dash"><bounds x="51.5" y="20.0" width="7" height="0.5" /></bezel> <!-- other lamps --> - <bezel name="lamp101" element="lamp_dot"><bounds x="1" y="1" width="4" height="4" /></bezel> - <bezel name="lamp102" element="lamp_dot"><bounds x="26" y="1" width="4" height="4" /></bezel> - <bezel name="lamp104" element="lamp_dot"><bounds x="51" y="1" width="4" height="4" /></bezel> - <bezel name="lamp107" element="lamp_dot"><bounds x="76" y="1" width="4" height="4" /></bezel> + <bezel name="10.0" element="lamp_dot"><bounds x="1" y="1" width="4" height="4" /></bezel> + <bezel name="10.1" element="lamp_dot"><bounds x="26" y="1" width="4" height="4" /></bezel> + <bezel name="10.3" element="lamp_dot"><bounds x="51" y="1" width="4" height="4" /></bezel> + <bezel name="10.6" element="lamp_dot"><bounds x="76" y="1" width="4" height="4" /></bezel> </view> diff --git a/src/mame/layout/mcompgin.lay b/src/mame/layout/mcompgin.lay new file mode 100644 index 00000000000..9d3e4d2766a --- /dev/null +++ b/src/mame/layout/mcompgin.lay @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="led" defstate="0"> + <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk> + <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="100" top="0" bottom="100" /> + + <bezel name="0.0" element="led"><bounds x="1" y="1" width="1" height="1" /></bezel> + + </view> +</mamelayout> diff --git a/src/mame/layout/snmath.lay b/src/mame/layout/snmath.lay index ca1eb371aea..14f53a0704d 100644 --- a/src/mame/layout/snmath.lay +++ b/src/mame/layout/snmath.lay @@ -8,7 +8,7 @@ </element> <!-- add our own for DP(display point) and the CT(comma tail) segments --> -<!-- MAME led16segsc won't do, since Speak & Math has them on the left side --> +<!-- MAME led16segsc won't do, since this one has them on the left side --> <element name="lamp_dp" defstate="0"> <disk state="0"><color red="0.0235" green="0.1255" blue="0.1059" /></disk> diff --git a/src/mame/layout/zodiac.lay b/src/mame/layout/zodiac.lay new file mode 100644 index 00000000000..0101e8b6c7f --- /dev/null +++ b/src/mame/layout/zodiac.lay @@ -0,0 +1,83 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0" green="0" blue="0" /></rect></element> + <element name="disk_black"><disk><color red="0" green="0" blue="0" /></disk></element> + <element name="disk_red"><disk><color red="0.25" green="0.05" blue="0.02" /></disk></element> + + <element name="led" defstate="0"> + <disk state="0"><color red="0.2" green="0.04" blue="0.046" /></disk> + <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk> + </element> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.15" blue="0.08" /></led7seg> + </element> + + <element name="text_1"><text string="1"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_2"><text string="2"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_3"><text string="3"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_4"><text string="4"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_5"><text string="5"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_6"><text string="6"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_7"><text string="7"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_8"><text string="8"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_9"><text string="9"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_10"><text string="10"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_11"><text string="11"><color red="0.7" green="0.7" blue="0.7" /></text></element> + <element name="text_12"><text string="12"><color red="0.7" green="0.7" blue="0.7" /></text></element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-35" right="158" top="5" bottom="198" /> + <bezel element="static_black"> + <bounds left="-35" right="158" top="5" bottom="198" /> + </bezel> + + <bezel element="disk_red"><bounds x="-40" y="0" width="203" height="203" /></bezel> + <bezel element="disk_black"><bounds x="-15" y="25" width="153" height="153" /></bezel> + + <bezel name="digit7" element="digit"><bounds x="20" y="70" width="10" height="15" /></bezel> + <bezel name="digit6" element="digit"><bounds x="30" y="70" width="10" height="15" /></bezel> + <bezel name="digit5" element="digit"><bounds x="40" y="70" width="10" height="15" /></bezel> + <bezel name="digit4" element="digit"><bounds x="50" y="70" width="10" height="15" /></bezel> + <bezel name="digit3" element="digit"><bounds x="60" y="70" width="10" height="15" /></bezel> + <bezel name="digit2" element="digit"><bounds x="70" y="70" width="10" height="15" /></bezel> + <bezel name="digit1" element="digit"><bounds x="80" y="70" width="10" height="15" /></bezel> + <bezel name="digit0" element="digit"><bounds x="90" y="70" width="10" height="15" /></bezel> + + <bezel name="9.7" element="led"><bounds x="15" y="145" width="3" height="3" /></bezel> + <bezel name="9.2" element="led"><bounds x="40" y="160" width="3" height="3" /></bezel> + <bezel name="9.4" element="led"><bounds x="80" y="160" width="3" height="3" /></bezel> + <bezel name="9.5" element="led"><bounds x="105" y="145" width="3" height="3" /></bezel> + <bezel name="9.1" element="led"><bounds x="120" y="120" width="3" height="3" /></bezel> + <bezel name="9.3" element="led"><bounds x="120" y="80" width="3" height="3" /></bezel> + + <bezel name="8.7" element="led"><bounds x="105" y="55" width="3" height="3" /></bezel> + <bezel name="8.2" element="led"><bounds x="80" y="40" width="3" height="3" /></bezel> + <bezel name="8.4" element="led"><bounds x="40" y="40" width="3" height="3" /></bezel> + <bezel name="8.5" element="led"><bounds x="15" y="55" width="3" height="3" /></bezel> + <bezel name="8.1" element="led"><bounds x="0" y="80" width="3" height="3" /></bezel> + <bezel name="8.3" element="led"><bounds x="0" y="120" width="3" height="3" /></bezel> + + <bezel element="text_1"><bounds x="17" y="143" width="12" height="7" /></bezel> + <bezel element="text_2"><bounds x="42" y="158" width="12" height="7" /></bezel> + <bezel element="text_3"><bounds x="82" y="158" width="12" height="7" /></bezel> + <bezel element="text_4"><bounds x="107" y="143" width="12" height="7" /></bezel> + <bezel element="text_5"><bounds x="122" y="118" width="12" height="7" /></bezel> + <bezel element="text_6"><bounds x="122" y="78" width="12" height="7" /></bezel> + + <bezel element="text_7"><bounds x="107" y="53" width="12" height="7" /></bezel> + <bezel element="text_8"><bounds x="82" y="38" width="12" height="7" /></bezel> + <bezel element="text_9"><bounds x="42" y="38" width="12" height="7" /></bezel> + <bezel element="text_10"><bounds x="17" y="53" width="12" height="7" /></bezel> + <bezel element="text_11"><bounds x="2" y="78" width="12" height="7" /></bezel> + <bezel element="text_12"><bounds x="2" y="118" width="12" height="7" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mame/machine/315-5838_317-0229_comp.cpp b/src/mame/machine/315-5838_317-0229_comp.cpp index cfd38aa7c88..f4c0b69129b 100644 --- a/src/mame/machine/315-5838_317-0229_comp.cpp +++ b/src/mame/machine/315-5838_317-0229_comp.cpp @@ -4,21 +4,32 @@ 315-5838 - Decathlete (ST-V) 317-0229 - Dead or Alive (Model 2A) + 317-0229 - Name Club / Name Club Ver 2 (ST-V) (tested as RCDD2 in the service menu!) + 317-0231 - Print Club Love Love / Print Club Love Love Ver 2 (ST-V) - Package Type: TQFP100 + Several Print Club (ST-V) carts have + an unpopulated space marked '317-0229' on the PCB - This appears to be a dual channel compression chip, used in 1996, predating the 5881. - Decathlete uses it to compress ALL the game graphics, Dead or Alive uses it for a - dumb security check, decompressing a single string. + Package Type: TQFP100 - Each channel appears to be connected to a different set of ROMs, however there is - defintiely only a single 315-5838 chip. (could the different channels actually just - be mirror addresses, with part of the address determining the ROMs to use?) + Decathlete accesses the chip at 2 different addresses, however, I don't think there + are 2 channels / sets of registers, instead the 2nd set of addresses are just a + mirror that allows access to a different set of source roms; the tables etc. are + re-uploaded before every transfer. - Dead of Alive only uses a single channel, and has the source data in RAM, not ROM. + Dead of Alive has the source data in RAM, not ROM. This is similar to how some 5881 games were set up, with the ST-V versions decrypting data directly from ROM and the Model 2 ones using a RAM source buffer. + Decathlete decompresses all graphic data with the chip. + + The Name Club games use the chip for decompressing data for the printer (full size + versions of the graphics?) + + Print Club Love Love decrypts some start up code/data required for booting. + + Dead or Alive decrypts a string that is checked on startup, nothing else. + Looking at the values read I don't think there is any address based encryption, for example many blocks where you'd expect a zero fill start with repeating patterns of 8f708f70 (different lengths) channel would appear to relate to compressed 0x00 data @@ -49,11 +60,12 @@ sega_315_5838_comp_device::sega_315_5838_comp_device(const machine_config &mconf void sega_315_5838_comp_device::device_start() { + m_decathlt_lastcount = 0; + m_decathlt_prot_uploadmode = 0; + m_decathlt_prot_uploadoffset = 0; + for (auto & elem : m_channel) { - elem.m_decathlt_lastcount = 0; - elem.m_decathlt_prot_uploadmode = 0; - elem.m_decathlt_prot_uploadoffset = 0; elem.m_read_ch.bind_relative_to(*owner()); } @@ -61,14 +73,10 @@ void sega_315_5838_comp_device::device_start() void sega_315_5838_comp_device::device_reset() { - for (auto & elem : m_channel) - { - elem.m_srcoffset = 0; - elem.m_decathlt_lastcount = 0; - elem.m_decathlt_prot_uploadmode = 0; - elem.m_decathlt_prot_uploadoffset = 0; - } - + m_srcoffset = 0; + m_decathlt_lastcount = 0; + m_decathlt_prot_uploadmode = 0; + m_decathlt_prot_uploadoffset = 0; m_protstate = 0; } @@ -100,46 +108,46 @@ UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int ch // UINT32 *fake0 = (UINT32*)memregion( ":fake0" )->base(); // UINT32 retvalue = 0xffff; - switch (m_channel[channel].m_srcoffset) + switch (m_srcoffset) { default: - m_channel[channel].m_decathlt_lastcount++; + m_decathlt_lastcount++; UINT32 tempdata = 0; - tempdata |= m_channel[channel].m_read_ch(m_channel[channel].m_srcoffset) << 0; - m_channel[channel].m_srcoffset++; - tempdata |= m_channel[channel].m_read_ch(m_channel[channel].m_srcoffset) << 16; - m_channel[channel].m_srcoffset++; + tempdata |= m_channel[channel].m_read_ch(m_srcoffset) << 0; + m_srcoffset++; + tempdata |= m_channel[channel].m_read_ch(m_srcoffset) << 16; + m_srcoffset++; #ifdef DEBUG_DATA_DUMP - //printf("read addr %08x, blah_r %08x - read count count %08x\n", m_channel[channel].m_srcoffset*2, tempdata, m_channel[channel].m_decathlt_lastcount*4); + //printf("read addr %08x, blah_r %08x - read count count %08x\n", m_srcoffset*2, tempdata, m_decathlt_lastcount*4); fwrite(&tempdata, 1, 4, tempfile); #else - logerror("read addr %08x, blah_r %08x - read count count %08x\n", m_channel[channel].m_srcoffset*2, tempdata, m_channel[channel].m_decathlt_lastcount*4); + logerror("read addr %08x, blah_r %08x - read count count %08x\n", m_srcoffset*2, tempdata, m_decathlt_lastcount*4); #endif return tempdata; #if 0 case 0x03228e4: - if (fake0) retvalue = fake0[(((0x20080/4)+m_channel[channel].m_decathlt_lastcount))]; - m_channel[channel].m_decathlt_lastcount++; + if (fake0) retvalue = fake0[(((0x20080/4)+m_decathlt_lastcount))]; + m_decathlt_lastcount++; return retvalue; case 0x00a9f3a: - if (fake0) retvalue = fake0[(((0x00000/4)+m_channel[channel].m_decathlt_lastcount))]; - m_channel[channel].m_decathlt_lastcount++; + if (fake0) retvalue = fake0[(((0x00000/4)+m_decathlt_lastcount))]; + m_decathlt_lastcount++; return retvalue; case 0x0213ab4: - if (fake0) retvalue = fake0[(((0x40000/4)+m_channel[channel].m_decathlt_lastcount))]; - m_channel[channel].m_decathlt_lastcount++; + if (fake0) retvalue = fake0[(((0x40000/4)+m_decathlt_lastcount))]; + m_decathlt_lastcount++; return retvalue; case 0x01efaf0: - if (fake0) retvalue = fake0[(((0x60000/4)+m_channel[channel].m_decathlt_lastcount))]; - m_channel[channel].m_decathlt_lastcount++; + if (fake0) retvalue = fake0[(((0x60000/4)+m_decathlt_lastcount))]; + m_decathlt_lastcount++; return retvalue; case 0x033f16c: @@ -180,14 +188,14 @@ UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int ch void sega_315_5838_comp_device::set_prot_addr(UINT32 data, UINT32 mem_mask, int channel) { // printf("set_prot_addr\n"); - COMBINE_DATA(&m_channel[channel].m_srcoffset); + COMBINE_DATA(&m_srcoffset); - //if (m_decathlt_part==0) logerror("%d, last read count was %06x\n",channel, m_channel[channel].m_decathlt_lastcount*4); - m_channel[channel].m_decathlt_lastcount = 0; + //if (m_decathlt_part==0) logerror("%d, last read count was %06x\n",channel, m_decathlt_lastcount*4); + m_decathlt_lastcount = 0; if (mem_mask == 0x0000ffff) { - printf("set source address to %08x (channel %d)\n", m_channel[channel].m_srcoffset, channel); + printf("set source address to %08x (channel %d)\n", m_srcoffset, channel); } @@ -198,24 +206,24 @@ void sega_315_5838_comp_device::set_prot_addr(UINT32 data, UINT32 mem_mask, int fclose(tempfile); char filename[256]; - sprintf(filename, "%d_compressed_%08x", channel, m_channel[channel].m_srcoffset * 2); + sprintf(filename, "%d_compressed_%08x", channel, m_srcoffset * 2); tempfile = fopen(filename, "w+b"); // the table and dictionary are uploaded repeatedly, usually before groups of data transfers but // it's always the same tables (one pair for each channel) { FILE* fp; - sprintf(filename, "%d_compressed_table1", channel); + sprintf(filename, "%d_compressed_table1_%08x", channel, m_srcoffset * 2); fp = fopen(filename, "w+b"); - fwrite(&m_channel[channel].m_decathlt_prottable1, 24, 2, fp); + fwrite(&m_decathlt_prottable1, 24, 2, fp); fclose(fp); } { FILE* fp; - sprintf(filename, "%d_compressed_dictionary", channel); + sprintf(filename, "%d_compressed_dictionary_%08x", channel, m_srcoffset * 2); fp = fopen(filename, "w+b"); - fwrite(&m_channel[channel].m_decathlt_dictionary, 128, 2, fp); + fwrite(&m_decathlt_dictionaryy, 128, 2, fp); fclose(fp); } } @@ -228,13 +236,13 @@ void sega_315_5838_comp_device::set_upload_mode(UINT16 data, int channel) if ((data == 0x8000) || (data == 0x0000)) { // logerror("changed to upload mode 1\n"); - m_channel[channel].m_decathlt_prot_uploadmode = 1; - m_channel[channel].m_decathlt_prot_uploadoffset = 0; + m_decathlt_prot_uploadmode = 1; + m_decathlt_prot_uploadoffset = 0; } else if ((data == 0x8080) || (data == 0x0080)) { - m_channel[channel].m_decathlt_prot_uploadmode = 2; - m_channel[channel].m_decathlt_prot_uploadoffset = 0; + m_decathlt_prot_uploadmode = 2; + m_decathlt_prot_uploadoffset = 0; } else { @@ -244,30 +252,30 @@ void sega_315_5838_comp_device::set_upload_mode(UINT16 data, int channel) void sega_315_5838_comp_device::upload_table_data(UINT16 data, int channel) { - if (m_channel[channel].m_decathlt_prot_uploadmode == 1) + if (m_decathlt_prot_uploadmode == 1) { - if (m_channel[channel].m_decathlt_prot_uploadoffset >= 24) + if (m_decathlt_prot_uploadoffset >= 24) { fatalerror("upload mode 1 error, too big\n"); return; } - //logerror("uploading table 1 %04x %04x\n",m_channel[channel].m_decathlt_prot_uploadoffset, data&0xffff); - m_channel[channel].m_decathlt_prottable1[m_channel[channel].m_decathlt_prot_uploadoffset] = data & 0xffff; - m_channel[channel].m_decathlt_prot_uploadoffset++; + //logerror("uploading table 1 %04x %04x\n",m_decathlt_prot_uploadoffset, data&0xffff); + m_decathlt_prottable1[m_decathlt_prot_uploadoffset] = data & 0xffff; + m_decathlt_prot_uploadoffset++; printf("unk table 1 %04x (channel %d)\n", data & 0xffff, channel); } - else if (m_channel[channel].m_decathlt_prot_uploadmode == 2) + else if (m_decathlt_prot_uploadmode == 2) { - if (m_channel[channel].m_decathlt_prot_uploadoffset >= 128) + if (m_decathlt_prot_uploadoffset >= 128) { fatalerror("upload mode 2 error, too big\n"); return; } - //logerror("uploading table 2 %04x %04x\n",m_channel[channel].m_decathlt_prot_uploadoffset, data&0xffff); - m_channel[channel].m_decathlt_dictionary[m_channel[channel].m_decathlt_prot_uploadoffset] = data & 0xffff; - m_channel[channel].m_decathlt_prot_uploadoffset++; + //logerror("uploading table 2 %04x %04x\n",m_decathlt_prot_uploadoffset, data&0xffff); + m_decathlt_dictionaryy[m_decathlt_prot_uploadoffset] = data & 0xffff; + m_decathlt_prot_uploadoffset++; printf("dictionary %04x (channel %d)\n", data & 0xffff, channel); } } diff --git a/src/mame/machine/315-5838_317-0229_comp.h b/src/mame/machine/315-5838_317-0229_comp.h index 2fd0904450e..4ad6070ab84 100644 --- a/src/mame/machine/315-5838_317-0229_comp.h +++ b/src/mame/machine/315-5838_317-0229_comp.h @@ -65,17 +65,19 @@ protected: virtual void device_reset() override; private: + UINT16 m_decathlt_prottable1[24]; + UINT16 m_decathlt_dictionaryy[128]; + + UINT32 m_srcoffset; + + UINT32 m_decathlt_lastcount; + UINT32 m_decathlt_prot_uploadmode; + UINT32 m_decathlt_prot_uploadoffset; + // Decathlete specific variables and functions (see machine/decathlt.c) struct channel_type { - UINT32 m_srcoffset; - UINT16 m_decathlt_prottable1[24]; - UINT16 m_decathlt_dictionary[128]; - - UINT32 m_decathlt_lastcount; - UINT32 m_decathlt_prot_uploadmode; - UINT32 m_decathlt_prot_uploadoffset; sega_dec_read_delegate m_read_ch; }; diff --git a/src/mame/machine/apple1.cpp b/src/mame/machine/apple1.cpp deleted file mode 100644 index 59b360aea7e..00000000000 --- a/src/mame/machine/apple1.cpp +++ /dev/null @@ -1,404 +0,0 @@ -// license:??? -// copyright-holders:Paul Daniels, Colin Howell, R. Belmont -/*************************************************************************** - - machine.c - - Functions to emulate general aspects of the machine (RAM, ROM, interrupts, - I/O ports) - - The Apple I used a Motorola 6820 PIA for its keyboard and display - I/O. The keyboard was mapped to PIA port A, and the display to port - B. - - Port A, the keyboard, was an input port connected to a standard - ASCII-encoded keyboard. The high bit of the port was tied to +5V. - The keyboard strobe signal was connected to the PIA's CA1 control - input so that the keyboard could signal each keypress to the PIA. - The processor could check for a keypress by testing the IRQA1 flag - in the Port A Control Register and then reading the character value - from Port A. - - The keyboard connector also had two special lines, RESET and CLEAR - SCREEN, which were meant to be connected to pushbutton switches on - the keyboard. RESET was tied to the reset inputs for the CPU and - PIA; it allowed the user to stop a program and return control to the - Monitor. CLEAR SCREEN was directly tied to the video hardware and - would clear the display. - - Port B, the display, was an output port which accepted 7-bit ASCII - characters from the PIA and wrote them on the display. The details - of this are described in video/apple1.c. Control line CB2 served - as an output signal to inform the display of a new character. (CB2 - was also connected to line 7 of port B, which was configured as an - input, so that the CPU could more easily check the status of the - write.) The CB1 control input signaled the PIA when the display had - finished writing the character and could accept a new one. - - MAME models the 6821 instead of the earlier 6820 used in the Apple - I, but there is no difference in functionality between the two - chips; the 6821 simply has a better ability to drive electrical - loads. - - The Apple I had an optional cassette interface which plugged into - the expansion connector. This is described below in the "Cassette - interface I/O" section. - -***************************************************************************/ - -#include "emu.h" -#include "includes/apple1.h" -#include "machine/6821pia.h" -#include "cpu/m6502/m6502.h" -#include "imagedev/cassette.h" -#include "machine/ram.h" - -/***************************************************************************** -** Structures -*****************************************************************************/ - -/* Use the same keyboard mapping as on a modern keyboard. This is not - the same as the keyboard mapping of the actual teletype-style - keyboards used with the Apple I, but it's less likely to cause - confusion for people who haven't memorized that layout. - - The Backspace key is mapped to the '_' (underscore) character - because the Apple I ROM Monitor used "back-arrow" to erase - characters, rather than backspace, and back-arrow is an earlier - form of the underscore. */ - -#define ESCAPE '\x1b' - -static const UINT8 apple1_unshifted_keymap[] = -{ - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', '-', '=', '[', ']', ';', '\'', - ',', '.', '/', '\\', 'A', 'B', 'C', 'D', - 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', - 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_', - ' ', ESCAPE -}; - -static const UINT8 apple1_shifted_keymap[] = -{ - ')', '!', '@', '#', '$', '%', '^', '&', - '*', '(', '_', '+', '[', ']', ':', '"', - '<', '>', '?', '\\', 'A', 'B', 'C', 'D', - 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', - 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', - 'U', 'V', 'W', 'X', 'Y', 'Z', '\r', '_', - ' ', ESCAPE -}; - -/* Control key mappings, like the other mappings, conform to a modern - keyboard where possible. Note that the Apple I ROM Monitor ignores - most control characters. */ - -static const UINT8 apple1_control_keymap[] = -{ - '0', '1', '\x00', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', - '8', '9', '\x1f', '=', '\x1b', '\x1d', ';', '\'', - ',', '.', '/', '\x1c', '\x01', '\x02', '\x03', '\x04', - '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c', - '\x0d', '\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', - '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\r', '_', - '\x00', ESCAPE -}; - - - -/***************************************************************************** -** DRIVER_INIT: driver-specific setup, executed once at MESS startup. -*****************************************************************************/ - -DRIVER_INIT_MEMBER(apple1_state,apple1) -{ - address_space& space = m_maincpu->space(AS_PROGRAM); - /* Set up the handlers for MESS's dynamically-sized RAM. */ - space.install_readwrite_bank(0x0000, m_ram->size() - 1, "bank1"); - membank("bank1")->set_base(m_ram->pointer()); - - /* Poll the keyboard input ports periodically. These include both - ordinary keys and the RESET and CLEAR SCREEN pushbutton - switches. We can't handle these switches in a VBLANK_INT or - PERIODIC_INT because both switches need to be monitored even - while the CPU is suspended during RESET; VBLANK_INT and - PERIODIC_INT callbacks aren't run while the CPU is in this - state. - - A 120-Hz poll rate seems to be fast enough to ensure no - keystrokes are missed. */ - machine().scheduler().timer_pulse(attotime::from_hz(120), timer_expired_delegate(FUNC(apple1_state::apple1_kbd_poll),this)); -} - - -void apple1_state::machine_reset() -{ - /* Reset the display hardware. */ - apple1_vh_dsp_clr(); -} - - -/***************************************************************************** -** apple1_verify_header -*****************************************************************************/ -int apple1_state::apple1_verify_header (UINT8 *data) -{ - /* Verify the format for the snapshot */ - if ((data[0] == 'L') && - (data[1] == 'O') && - (data[2] == 'A') && - (data[3] == 'D') && - (data[4] == ':') && - (data[7] == 'D') && - (data[8] == 'A') && - (data[9] == 'T') && - (data[10]== 'A') && - (data[11]== ':')) - { - return(IMAGE_VERIFY_PASS); - } - else - { - return(IMAGE_VERIFY_FAIL); - } -} - -#define SNAP_HEADER_LEN 12 - -/***************************************************************************** -** snapshot_load_apple1 -** -** Format of the binary snapshot image is: -** -** [ LOAD:xxyyDATA:zzzzzz...] -** -** where xxyy is the binary starting address (in big-endian byte -** order) to load the binary data zzzzzz to. -** -** The image can be of arbitrary length, but it must fit in available -** memory. -*****************************************************************************/ -SNAPSHOT_LOAD_MEMBER( apple1_state,apple1) -{ - UINT64 filesize, datasize; - UINT8 *snapbuf, *snapptr; - UINT16 start_addr, end_addr, addr; - - filesize = image.length(); - - /* Read the snapshot data into a temporary array */ - if (filesize < SNAP_HEADER_LEN) - return IMAGE_INIT_FAIL; - snapbuf = (UINT8*)image.ptr(); - if (!snapbuf) - return IMAGE_INIT_FAIL; - - /* Verify the snapshot header */ - if (apple1_verify_header(snapbuf) == IMAGE_VERIFY_FAIL) - { - logerror("apple1 - Snapshot Header is in incorrect format - needs to be LOAD:xxyyDATA:\n"); - return IMAGE_INIT_FAIL; - } - - datasize = filesize - SNAP_HEADER_LEN; - - /* Extract the starting address to load the snapshot to. */ - start_addr = (snapbuf[5] << 8) | (snapbuf[6]); - logerror("apple1 - LoadAddress is 0x%04x\n", start_addr); - - end_addr = start_addr + datasize - 1; - - if ((start_addr < 0xE000 && end_addr > m_ram->size() - 1) - || end_addr > 0xEFFF) - { - logerror("apple1 - Snapshot won't fit in this memory configuration;\n" - "needs memory from $%04X to $%04X.\n", start_addr, end_addr); - return IMAGE_INIT_FAIL; - } - - /* Copy the data into memory space. */ - for (addr = start_addr, snapptr = snapbuf + SNAP_HEADER_LEN; - addr <= end_addr; - addr++, snapptr++) - m_maincpu->space(AS_PROGRAM).write_byte(addr, *snapptr); - - - return IMAGE_INIT_PASS; -} - - -/***************************************************************************** -** apple1_kbd_poll -** -** Keyboard polling handles both ordinary keys and the special RESET -** and CLEAR SCREEN switches. -** -** For ordinary keys, this implements 2-key rollover to reduce the -** chance of missed keypresses. If we press a key and then press a -** second key while the first hasn't been completely released, as -** might happen during rapid typing, only the second key is -** registered; the first key is ignored. -** -** If multiple newly-pressed keys are found, the one closest to the -** end of the input ports list is counted; the others are ignored. -*****************************************************************************/ -TIMER_CALLBACK_MEMBER(apple1_state::apple1_kbd_poll) -{ - int port, bit; - int key_pressed; - UINT32 shiftkeys, ctrlkeys; - pia6821_device *pia = machine().device<pia6821_device>("pia"); - static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3" }; - - /* This holds the values of all the input ports for ordinary keys - seen during the last scan. */ - - /* First we check the RESET and CLEAR SCREEN pushbutton switches. */ - - /* The RESET switch resets the CPU and the 6820 PIA. */ - if (ioport("KEY5")->read() & 0x0001) - { - if (!m_reset_flag) { - m_reset_flag = 1; - /* using PULSE_LINE does not allow us to press and hold key */ - m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); - pia->reset(); - } - } - else if (m_reset_flag) { - /* RESET released--allow the processor to continue. */ - m_reset_flag = 0; - m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); - } - - /* The CLEAR SCREEN switch clears the video hardware. */ - if (ioport("KEY5")->read() & 0x0002) - { - if (!m_vh_clrscrn_pressed) - { - /* Ignore further video writes, and clear the screen. */ - m_vh_clrscrn_pressed = 1; - apple1_vh_dsp_clr(); - } - } - else if (m_vh_clrscrn_pressed) - { - /* CLEAR SCREEN released--pay attention to video writes again. */ - m_vh_clrscrn_pressed = 0; - } - - /* Now we scan all the input ports for ordinary keys, recording - new keypresses while ignoring keys that were already pressed in - the last scan. */ - - m_kbd_data = 0; - key_pressed = 0; - - /* The keyboard strobe line should always be low when a scan starts. */ - pia->ca1_w(0); - - shiftkeys = ioport("KEY4")->read() & 0x0003; - ctrlkeys = ioport("KEY4")->read() & 0x000c; - - for (port = 0; port < 4; port++) - { - UINT32 portval, newkeys; - - portval = ioport(keynames[port])->read(); - newkeys = portval & ~(m_kbd_last_scan[port]); - - if (newkeys) - { - key_pressed = 1; - for (bit = 0; bit < 16; bit++) { - if (newkeys & 1) - { - m_kbd_data = (ctrlkeys) - ? apple1_control_keymap[port*16 + bit] - : (shiftkeys) - ? apple1_shifted_keymap[port*16 + bit] - : apple1_unshifted_keymap[port*16 + bit]; - } - newkeys >>= 1; - } - } - m_kbd_last_scan[port] = portval; - } - - if (key_pressed) - { - /* The keyboard will pulse its strobe line when a key is - pressed. A 10-usec pulse is typical. */ - pia->ca1_w(1); - machine().scheduler().timer_set(attotime::from_usec(10), timer_expired_delegate(FUNC(apple1_state::apple1_kbd_strobe_end),this)); - } -} - -TIMER_CALLBACK_MEMBER(apple1_state::apple1_kbd_strobe_end) -{ - pia6821_device *pia = machine().device<pia6821_device>("pia"); - - /* End of the keyboard strobe pulse. */ - pia->ca1_w(0); -} - - -/***************************************************************************** -** READ/WRITE HANDLERS -*****************************************************************************/ -READ8_MEMBER(apple1_state::apple1_pia0_kbdin) -{ - /* Bit 7 of the keyboard input is permanently wired high. This is - what the ROM Monitor software expects. */ - return m_kbd_data | 0x80; -} - -WRITE8_MEMBER(apple1_state::apple1_pia0_dspout) -{ - /* Send an ASCII character to the video hardware. */ - apple1_vh_dsp_w(data); -} - -WRITE_LINE_MEMBER(apple1_state::apple1_pia0_dsp_write_signal) -{ - device_t *device = machine().device("pia"); - /* PIA output CB2 is inverted to become the DA signal, used to - signal a display write to the video hardware. */ - - /* DA is directly connected to PIA input PB7, so the processor can - read bit 7 of port B to test whether the display has completed - a write. */ - pia6821_device *pia = downcast<pia6821_device *>(device); - pia->portb_w((!state) << 7); - - /* Once DA is asserted, the display will wait until it can perform - the write, when the cursor position is about to be refreshed. - Only then will it assert \RDA to signal readiness for another - write. Thus the write delay depends on the cursor position and - where the display is in the refresh cycle. */ - if (!state) - machine().scheduler().timer_set(apple1_vh_dsp_time_to_ready(), timer_expired_delegate(FUNC(apple1_state::apple1_dsp_ready_start),this)); -} - -TIMER_CALLBACK_MEMBER(apple1_state::apple1_dsp_ready_start) -{ - pia6821_device *pia = machine().device<pia6821_device>("pia"); - - /* When the display asserts \RDA to signal it is ready, it - triggers a 74123 one-shot to send a 3.5-usec low pulse to PIA - input CB1. The end of this pulse will tell the PIA that the - display is ready for another write. */ - pia->cb1_w(0); - machine().scheduler().timer_set(attotime::from_nsec(3500), timer_expired_delegate(FUNC(apple1_state::apple1_dsp_ready_end),this)); -} - -TIMER_CALLBACK_MEMBER(apple1_state::apple1_dsp_ready_end) -{ - pia6821_device *pia = machine().device<pia6821_device>("pia"); - - /* The one-shot pulse has ended; return CB1 to high, so we can do - another display write. */ - pia->cb1_w(1); -} diff --git a/src/mame/machine/arkanoid.cpp b/src/mame/machine/arkanoid.cpp index 11b352e63df..02bb306a1b6 100644 --- a/src/mame/machine/arkanoid.cpp +++ b/src/mame/machine/arkanoid.cpp @@ -82,14 +82,14 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_68705_tcr_w) if ((m_tcr^data)&0x20)// check if TIN state changed { /* logerror("timer enable state changed!\n"); */ - if (data&0x20) timer_set(attotime::never, TIMER_68705_PRESCALER_EXPIRED); - else timer_set(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(data&0x7))), TIMER_68705_PRESCALER_EXPIRED); + if (data&0x20) m_68705_timer->adjust(attotime::never, TIMER_68705_PRESCALER_EXPIRED); + else m_68705_timer->adjust(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(data&0x7))), TIMER_68705_PRESCALER_EXPIRED); } // prescaler check: if timer prescaler has changed, or the PSC bit is set, adjust the timer length for the prescaler expired timer, but only if the timer would be running if ( (((m_tcr&0x07)!=(data&0x07))||(data&0x08)) && ((data&0x20)==0) ) { /* logerror("timer reset due to PSC or prescaler change!\n"); */ - timer_set(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(data&0x7))), TIMER_68705_PRESCALER_EXPIRED); + m_68705_timer->adjust(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(data&0x7))), TIMER_68705_PRESCALER_EXPIRED); } m_tcr = data; // if int state is set, and TIM is unmasked, assert an interrupt. otherwise clear it. @@ -120,7 +120,7 @@ TIMER_CALLBACK_MEMBER(arkanoid_state::timer_68705_increment) m_mcu->set_input_line(M68705_INT_TIMER, ASSERT_LINE); else m_mcu->set_input_line(M68705_INT_TIMER, CLEAR_LINE); - timer_set(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(m_tcr&0x7))), TIMER_68705_PRESCALER_EXPIRED); + m_68705_timer->adjust(attotime::from_hz(((XTAL_12MHz/4)/4)/(1<<(m_tcr&0x7))), TIMER_68705_PRESCALER_EXPIRED); } READ8_MEMBER(arkanoid_state::arkanoid_68705_port_c_r) diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp index 287342585f6..2d55560cee8 100644 --- a/src/mame/machine/atarigen.cpp +++ b/src/mame/machine/atarigen.cpp @@ -10,11 +10,6 @@ #include "emu.h" #include "cpu/m6502/m6502.h" -#include "sound/2151intf.h" -#include "sound/2413intf.h" -#include "sound/tms5220.h" -#include "sound/okim6295.h" -#include "sound/pokey.h" #include "video/atarimo.h" #include "atarigen.h" @@ -965,9 +960,6 @@ atarigen_state::atarigen_state(const machine_config &mconfig, device_type type, m_slapstic_mirror(0), m_scanlines_per_callback(0), m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_oki(*this, "oki"), - m_soundcomm(*this, "soundcomm"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), @@ -1012,7 +1004,7 @@ void atarigen_state::machine_reset() // reset the slapstic if (m_slapstic_num != 0) { - if (!m_slapstic_device) + if (!m_slapstic_device.found()) fatalerror("Slapstic device is missing?\n"); m_slapstic_device->slapstic_reset(); @@ -1187,8 +1179,8 @@ void atarigen_state::device_post_load() { if (m_slapstic_num != 0) { - if (!m_slapstic_device) - fatalerror("Slapstic device is missing?\n"); + if (!m_slapstic_device.found()) + fatalerror("Slapstic device is missing?\n"); slapstic_update_bank(m_slapstic_device->slapstic_bank()); } @@ -1222,37 +1214,30 @@ DIRECT_UPDATE_MEMBER(atarigen_state::slapstic_setdirect) // slapstic and sets the chip number. //------------------------------------------------- -void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, int chipnum) +void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t mirror) { - // reset in case we have no state - m_slapstic_num = chipnum; - m_slapstic = nullptr; + if (!m_slapstic_device.found()) + fatalerror("Slapstic device is missing\n"); - // if we have a chip, install it - if (chipnum != 0) - { - if (!m_slapstic_device) - fatalerror("Slapstic device is missing\n"); + // initialize the slapstic + m_slapstic_num = m_slapstic_device->m_chipnum; + m_slapstic_device->slapstic_init(); - // initialize the slapstic - m_slapstic_device->slapstic_init(machine(), chipnum); + // install the memory handlers + address_space &program = device.space(AS_PROGRAM); + m_slapstic = program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this)); + program.set_direct_update_handler(direct_update_delegate(FUNC(atarigen_state::slapstic_setdirect), this)); - // install the memory handlers - address_space &program = device.space(AS_PROGRAM); - m_slapstic = program.install_readwrite_handler(base, base + 0x7fff, 0, mirror, read16_delegate(FUNC(atarigen_state::slapstic_r), this), write16_delegate(FUNC(atarigen_state::slapstic_w), this)); - program.set_direct_update_handler(direct_update_delegate(FUNC(atarigen_state::slapstic_setdirect), this)); + // allocate memory for a copy of bank 0 + m_slapstic_bank0.resize(0x2000); + memcpy(&m_slapstic_bank0[0], m_slapstic, 0x2000); - // allocate memory for a copy of bank 0 - m_slapstic_bank0.resize(0x2000); - memcpy(&m_slapstic_bank0[0], m_slapstic, 0x2000); + // ensure we recopy memory for the bank + m_slapstic_bank = 0xff; - // ensure we recopy memory for the bank - m_slapstic_bank = 0xff; - - // install an opcode base handler if we are a 68000 or variant - m_slapstic_base = base; - m_slapstic_mirror = mirror; - } + // install an opcode base handler if we are a 68000 or variant + m_slapstic_base = base; + m_slapstic_mirror = mirror; } @@ -1264,7 +1249,7 @@ void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t WRITE16_MEMBER(atarigen_state::slapstic_w) { - if (!m_slapstic_device) + if (!m_slapstic_device.found()) fatalerror("Slapstic device is missing?\n"); slapstic_update_bank(m_slapstic_device->slapstic_tweak(space, offset)); @@ -1278,7 +1263,7 @@ WRITE16_MEMBER(atarigen_state::slapstic_w) READ16_MEMBER(atarigen_state::slapstic_r) { - if (!m_slapstic_device) + if (!m_slapstic_device.found()) fatalerror("Slapstic device is missing?\n"); // fetch the result from the current bank first @@ -1292,57 +1277,6 @@ READ16_MEMBER(atarigen_state::slapstic_r) /*************************************************************************** - SOUND HELPERS -***************************************************************************/ - -//------------------------------------------------- -// set_volume_by_type: Scans for a particular -// sound chip and changes the volume on all -// channels associated with it. -//------------------------------------------------- - -void atarigen_state::set_volume_by_type(int volume, device_type type) -{ - sound_interface_iterator iter(*this); - for (device_sound_interface *sound = iter.first(); sound != nullptr; sound = iter.next()) - if (sound->device().type() == type) - sound->set_output_gain(ALL_OUTPUTS, volume / 100.0); -} - - -//------------------------------------------------- -// set_XXXXX_volume: Sets the volume for a given -// type of chip. -//------------------------------------------------- - -void atarigen_state::set_ym2151_volume(int volume) -{ - set_volume_by_type(volume, YM2151); -} - -void atarigen_state::set_ym2413_volume(int volume) -{ - set_volume_by_type(volume, YM2413); -} - -void atarigen_state::set_pokey_volume(int volume) -{ - set_volume_by_type(volume, POKEY); -} - -void atarigen_state::set_tms5220_volume(int volume) -{ - set_volume_by_type(volume, TMS5220); -} - -void atarigen_state::set_oki6295_volume(int volume) -{ - set_volume_by_type(volume, OKIM6295); -} - - - -/*************************************************************************** SCANLINE TIMING ***************************************************************************/ diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h index 0adeb414a0b..0266d2bd458 100644 --- a/src/mame/machine/atarigen.h +++ b/src/mame/machine/atarigen.h @@ -14,7 +14,6 @@ #include "machine/eeprompar.h" #include "video/atarimo.h" #include "cpu/m6502/m6502.h" -#include "sound/okim6295.h" #include "includes/slapstic.h" @@ -356,20 +355,12 @@ public: DECLARE_WRITE16_MEMBER(video_int_ack_w); // slapstic helpers - void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror, int chipnum); + void slapstic_configure(cpu_device &device, offs_t base, offs_t mirror); void slapstic_update_bank(int bank); DECLARE_DIRECT_UPDATE_MEMBER(slapstic_setdirect); DECLARE_WRITE16_MEMBER(slapstic_w); DECLARE_READ16_MEMBER(slapstic_r); - // sound helpers - void set_volume_by_type(int volume, device_type type); - void set_ym2151_volume(int volume); - void set_ym2413_volume(int volume); - void set_pokey_volume(int volume); - void set_tms5220_volume(int volume); - void set_oki6295_volume(int volume); - // scanline timing void scanline_timer_reset(screen_device &screen, int frequency); void scanline_timer(emu_timer &timer, screen_device &screen, int scanline); @@ -412,10 +403,7 @@ public: atarigen_screen_timer m_screen_timer[2]; required_device<cpu_device> m_maincpu; - optional_device<cpu_device> m_audiocpu; - optional_device<okim6295_device> m_oki; - optional_device<atari_sound_comm_device> m_soundcomm; optional_device<gfxdecode_device> m_gfxdecode; optional_device<screen_device> m_screen; optional_device<palette_device> m_palette; diff --git a/src/mame/machine/awboard.cpp b/src/mame/machine/awboard.cpp index e931fa221eb..7ec0c5b6c3a 100644 --- a/src/mame/machine/awboard.cpp +++ b/src/mame/machine/awboard.cpp @@ -97,8 +97,9 @@ ROM board internal layouts: Type 2: 00000000 - 00800000 FMEM1 flash ROM - 00800000 - 01000000 FMEM2 flash ROM - 01000000 - 02000000 unk, probably mirror of above + 00800000 - 01000000 mirror of above + 01000000 - 01800000 FMEM2 flash ROM + 01800000 - 02000000 mirror of above 02000000 - 04000000 MROM1 MROM4 MROM7 MROM10 \ 04000000 - 06000000 MROM2 MROM5 MROM8 MROM11 banked mask ROMs 06000000 - 08000000 MROM3 MROM6 MROM9 MROM12 / diff --git a/src/mame/machine/bbc.cpp b/src/mame/machine/bbc.cpp index d82f4fdd827..9d25639924b 100644 --- a/src/mame/machine/bbc.cpp +++ b/src/mame/machine/bbc.cpp @@ -1426,14 +1426,26 @@ WRITE_LINE_MEMBER(bbc_state::write_acia_clock) WRITE_LINE_MEMBER(bbc_state::motor_w) { - m_i8271->subdevice<floppy_connector>("0")->get_device()->mon_w(!state); - m_i8271->subdevice<floppy_connector>("1")->get_device()->mon_w(!state); + for (int i=0; i != 2; i++) { + char devname[1]; + sprintf(devname, "%d", i); + floppy_connector *con = m_i8271->subdevice<floppy_connector>(devname); + if (con) { + con->get_device()->mon_w(!state); + } + } } WRITE_LINE_MEMBER(bbc_state::side_w) { - m_i8271->subdevice<floppy_connector>("0")->get_device()->ss_w(state); - m_i8271->subdevice<floppy_connector>("1")->get_device()->ss_w(state); + for (int i=0; i != 2; i++) { + char devname[1]; + sprintf(devname, "%d", i); + floppy_connector *con = m_i8271->subdevice<floppy_connector>(devname); + if (con) { + con->get_device()->ss_w(state); + } + } } diff --git a/src/mame/machine/beta.cpp b/src/mame/machine/beta.cpp index ef9ec771805..4c1afc59f64 100644 --- a/src/mame/machine/beta.cpp +++ b/src/mame/machine/beta.cpp @@ -184,9 +184,13 @@ SLOT_INTERFACE_END static MACHINE_CONFIG_FRAGMENT( beta_disk ) MCFG_KR1818VG93_ADD("wd179x", XTAL_8MHz / 8) MCFG_FLOPPY_DRIVE_ADD("wd179x:0", beta_disk_floppies, "drive0", beta_disk_device::floppy_formats) + MCFG_FLOPPY_DRIVE_SOUND(true) MCFG_FLOPPY_DRIVE_ADD("wd179x:1", beta_disk_floppies, "drive1", beta_disk_device::floppy_formats) + MCFG_FLOPPY_DRIVE_SOUND(true) MCFG_FLOPPY_DRIVE_ADD("wd179x:2", beta_disk_floppies, "drive2", beta_disk_device::floppy_formats) + MCFG_FLOPPY_DRIVE_SOUND(true) MCFG_FLOPPY_DRIVE_ADD("wd179x:3", beta_disk_floppies, "drive3", beta_disk_device::floppy_formats) + MCFG_FLOPPY_DRIVE_SOUND(true) MACHINE_CONFIG_END ROM_START( beta_disk ) diff --git a/src/mame/machine/electron.cpp b/src/mame/machine/electron.cpp index cbeb410bc23..a8df99e819f 100644 --- a/src/mame/machine/electron.cpp +++ b/src/mame/machine/electron.cpp @@ -145,25 +145,25 @@ READ8_MEMBER(electron_state::electron_read_keyboard) return data; } -READ8_MEMBER(electron_state::electron_jim_r) +READ8_MEMBER(electron_state::electron_fred_r) { return 0xff; } -WRITE8_MEMBER(electron_state::electron_jim_w) +WRITE8_MEMBER(electron_state::electron_fred_w) { } -READ8_MEMBER(electron_state::electron_1mhz_r) +READ8_MEMBER(electron_state::electron_jim_r) { return 0xff; } -WRITE8_MEMBER(electron_state::electron_1mhz_w) +WRITE8_MEMBER(electron_state::electron_jim_w) { } -READ8_MEMBER(electron_state::electron_ula_r) +READ8_MEMBER(electron_state::electron_sheila_r) { UINT8 data = ((UINT8 *)memregion("user1")->base())[0x43E00 + offset]; switch ( offset & 0x0f ) @@ -186,7 +186,7 @@ READ8_MEMBER(electron_state::electron_ula_r) static const int electron_palette_offset[4] = { 0, 4, 5, 1 }; static const UINT16 electron_screen_base[8] = { 0x3000, 0x3000, 0x3000, 0x4000, 0x5800, 0x5800, 0x6000, 0x5800 }; -WRITE8_MEMBER(electron_state::electron_ula_w) +WRITE8_MEMBER(electron_state::electron_sheila_w) { int i = electron_palette_offset[(( offset >> 1 ) & 0x03)]; logerror( "ULA: write offset %02x <- %02x\n", offset & 0x0f, data ); diff --git a/src/mame/machine/gaelco2.cpp b/src/mame/machine/gaelco2.cpp index 6d39cdd0962..0ac284242d7 100644 --- a/src/mame/machine/gaelco2.cpp +++ b/src/mame/machine/gaelco2.cpp @@ -287,19 +287,75 @@ WRITE16_MEMBER(gaelco2_state::gaelco2_eeprom_data_w) ***************************************************************************/ -READ16_MEMBER(gaelco2_state::snowboar_protection_r) +static UINT32 rol(UINT32 x, unsigned int c) { - chd_file * table = machine().rom_load().get_disk_handle(":decrypt"); - UINT8 temp[1024]; - table->read_hunk(snowboard_latch>>9, &temp[0]); - UINT16 data = (temp[(snowboard_latch & 0x1ff)*2]<<8) | temp[((snowboard_latch & 0x1ff)*2)+1]; - - // TODO: replace above lookup (8GB table) with emulation of device - - logerror("%06x: protection read (input %08x output %04x)\n", space.device().safe_pc(), snowboard_latch, data); - + return (x << c) | (x >> (32 - c)); +} + +static UINT16 get_lo(UINT32 x) +{ + return ((x & 0x00000010) << 1) | + ((x & 0x00000800) << 3) | + ((x & 0x40000000) >> 27) | + ((x & 0x00000005) << 6) | + ((x & 0x00000008) << 8) | + rol(x & 0x00800040, 9) | + ((x & 0x04000000) >> 16) | + ((x & 0x00008000) >> 14) | + ((x & 0x00002000) >> 11) | + ((x & 0x00020000) >> 10) | + ((x & 0x00100000) >> 8) | + ((x & 0x00044000) >> 5) | + ((x & 0x00000020) >> 1); +} + +static UINT16 get_hi(UINT32 x) +{ + return ((x & 0x00001400) >> 0) | + ((x & 0x10000000) >> 26) | + ((x & 0x02000000) >> 24) | + ((x & 0x08000000) >> 21) | + ((x & 0x00000002) << 12) | + ((x & 0x01000000) >> 19) | + ((x & 0x20000000) >> 18) | + ((x & 0x80000000) >> 16) | + ((x & 0x00200000) >> 13) | + ((x & 0x00010000) >> 12) | + ((x & 0x00080000) >> 10) | + ((x & 0x00000200) >> 9) | + ((x & 0x00400000) >> 8) | + ((x & 0x00000080) >> 4) | + ((x & 0x00000100) >> 1); +} + +static UINT16 get_out(UINT16 x) +{ + return ((x & 0xc840) << 0) | + ((x & 0x0080) << 2) | + ((x & 0x0004) << 3) | + ((x & 0x0008) << 5) | + ((x & 0x0010) << 8) | + ((x & 0x0002) << 9) | + ((x & 0x0001) << 13) | + ((x & 0x0200) >> 9) | + ((x & 0x1400) >> 8) | + ((x & 0x0100) >> 7) | + ((x & 0x2000) >> 6) | + ((x & 0x0020) >> 2); +} + +UINT16 mangle(UINT32 x) +{ + UINT16 a = get_lo(x); + UINT16 b = get_hi(x); + return get_out(((a ^ 0x0010) - (b ^ 0x0024)) ^ 0x5496); +} - return data; +READ16_MEMBER(gaelco2_state::snowboar_protection_r) +{ + UINT16 ret = mangle(snowboard_latch); + ret = ((ret & 0xff00) >> 8) | ((ret & 0x00ff) << 8); + return ret; } diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp index 9dc14a34438..a9653cf34ea 100644 --- a/src/mame/machine/harddriv.cpp +++ b/src/mame/machine/harddriv.cpp @@ -54,11 +54,11 @@ void harddriv_state::device_reset() { /* generic reset */ //atarigen_state::machine_reset(); - m_slapstic_device->slapstic_reset(); + if (m_slapstic_device.found()) m_slapstic_device->slapstic_reset(); /* halt several of the DSPs to start */ - if (m_adsp != nullptr) m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); - if (m_dsp32 != nullptr) m_dsp32->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + if (m_adsp.found()) m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + if (m_dsp32.found()) m_dsp32->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_last_gsp_shiftreg = 0; @@ -72,14 +72,14 @@ void harddriv_state::device_reset() m_adsp_br = 0; m_adsp_xflag = 0; - if (m_ds3sdsp != nullptr) + if (m_ds3sdsp.found()) { m_ds3sdsp->load_boot_data(m_ds3sdsp->region()->base(), m_ds3sdsp_pgm_memory); m_ds3sdsp_timer_en = 0; m_ds3sdsp_internal_timer->adjust(attotime::never); } - if (m_ds3xdsp != nullptr) + if (m_ds3xdsp.found()) { m_ds3xdsp->load_boot_data(m_ds3xdsp->region()->base(), m_ds3xdsp_pgm_memory); m_ds3xdsp_timer_en = 0; @@ -173,7 +173,7 @@ READ16_MEMBER( harddriv_state::hd68k_msp_io_r ) UINT16 result; offset = (offset / 2) ^ 1; m_hd34010_host_access = TRUE; - result = (m_msp != nullptr) ? m_msp->host_r(space, offset, 0xffff) : 0xffff; + result = m_msp.found() ? m_msp->host_r(space, offset, 0xffff) : 0xffff; m_hd34010_host_access = FALSE; return result; } @@ -182,7 +182,7 @@ READ16_MEMBER( harddriv_state::hd68k_msp_io_r ) WRITE16_MEMBER( harddriv_state::hd68k_msp_io_w ) { offset = (offset / 2) ^ 1; - if (m_msp != nullptr) + if (m_msp.found()) { m_hd34010_host_access = TRUE; m_msp->host_w(space, offset, data, 0xffff); @@ -302,7 +302,7 @@ READ16_MEMBER( harddriv_state::hd68k_adc12_r ) READ16_MEMBER( harddriv_state::hd68k_sound_reset_r ) { - if (m_jsa != nullptr) + if (m_jsa.found()) m_jsa->reset(); return ~0; } @@ -404,12 +404,12 @@ WRITE16_MEMBER( harddriv_state::hd68k_nwr_w ) break; case 6: /* /GSPRES */ logerror("Write to /GSPRES(%d)\n", data); - if (m_gsp != nullptr) + if (m_gsp.found()) m_gsp->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); break; case 7: /* /MSPRES */ logerror("Write to /MSPRES(%d)\n", data); - if (m_msp != nullptr) + if (m_msp.found()) m_msp->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE); break; } @@ -859,7 +859,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w ) { case 0: /* SRES - reset sound CPU */ - if (m_ds3sdsp) + if (m_ds3sdsp.found()) { m_ds3sdsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); m_ds3sdsp->load_boot_data(m_ds3sdsp->region()->base(), m_ds3sdsp_pgm_memory); @@ -879,7 +879,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_ds3_control_w ) case 1: /* XRES - reset sound helper CPU */ - if (m_ds3xdsp) + if (m_ds3xdsp.found()) { m_ds3xdsp->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); m_ds3xdsp->load_boot_data(m_ds3xdsp->region()->base(), m_ds3xdsp_pgm_memory); @@ -1510,11 +1510,11 @@ WRITE16_MEMBER( harddriv_state::hd68k_dsk_control_w ) switch (offset & 7) { case 0: /* DSPRESTN */ - if (m_dsp32) m_dsp32->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); + if (m_dsp32.found()) m_dsp32->set_input_line(INPUT_LINE_RESET, val ? CLEAR_LINE : ASSERT_LINE); break; case 1: /* DSPZN */ - if (m_dsp32) m_dsp32->set_input_line(INPUT_LINE_HALT, val ? CLEAR_LINE : ASSERT_LINE); + if (m_dsp32.found()) m_dsp32->set_input_line(INPUT_LINE_HALT, val ? CLEAR_LINE : ASSERT_LINE); break; case 2: /* ZW1 */ @@ -1578,7 +1578,7 @@ READ16_MEMBER( harddriv_state::hd68k_dsk_rom_r ) WRITE16_MEMBER( harddriv_state::hd68k_dsk_dsp32_w ) { m_dsk_pio_access = TRUE; - if (m_dsp32) m_dsp32->pio_w(offset, data); + if (m_dsp32.found()) m_dsp32->pio_w(offset, data); m_dsk_pio_access = FALSE; } @@ -1587,7 +1587,7 @@ READ16_MEMBER( harddriv_state::hd68k_dsk_dsp32_r ) { UINT16 result; m_dsk_pio_access = TRUE; - if (m_dsp32) result = m_dsp32->pio_r(offset); + if (m_dsp32.found()) result = m_dsp32->pio_r(offset); else result = 0x00; m_dsk_pio_access = FALSE; diff --git a/src/mame/machine/iteagle_fpga.cpp b/src/mame/machine/iteagle_fpga.cpp index 9fa7cef6da8..40e1a9bb19e 100644 --- a/src/mame/machine/iteagle_fpga.cpp +++ b/src/mame/machine/iteagle_fpga.cpp @@ -4,6 +4,7 @@ #include "coreutil.h" #define LOG_FPGA (0) +#define LOG_SERIAL (0) #define LOG_RTC (0) #define LOG_RAM (0) #define LOG_EEPROM (0) @@ -80,14 +81,14 @@ void iteagle_fpga_device::device_reset() m_serial_str.clear(); m_serial_idx = 0; m_serial_data = false; + memset(m_serial_com0, 0, sizeof(m_serial_com0)); memset(m_serial_com1, 0, sizeof(m_serial_com1)); memset(m_serial_com2, 0, sizeof(m_serial_com2)); memset(m_serial_com3, 0, sizeof(m_serial_com3)); - memset(m_serial_com4, 0, sizeof(m_serial_com4)); + m_serial_com0[0] = 0x2c; m_serial_com1[0] = 0x2c; m_serial_com2[0] = 0x2c; m_serial_com3[0] = 0x2c; - m_serial_com4[0] = 0x2c; } void iteagle_fpga_device::update_sequence(UINT32 data) @@ -130,12 +131,10 @@ void iteagle_fpga_device::update_sequence_eg1(UINT32 data) val1 = ((m_seq & 0x2)<<6) | ((m_seq & 0x4)<<4) | ((m_seq & 0x8)<<2) | ((m_seq & 0x10)<<0) | ((m_seq & 0x20)>>2) | ((m_seq & 0x40)>>4) | ((m_seq & 0x80)>>6) | ((m_seq & 0x100)>>8); m_seq = (m_seq>>8) | ((feed&0xff)<<16); - //m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((val1 + m_seq_rem1)&0xFF); m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((val1 + m_seq_rem1 + m_seq_rem2)&0xFF); } else if (data & 0x2) { val1 = ((m_seq & 0x2)<<1) | ((m_seq & 0x4)>>1) | ((m_seq & 0x8)>>3); m_seq_rem1 = ((m_seq & 0x10)) | ((m_seq & 0x20)>>2) | ((m_seq & 0x40)>>4); - //m_seq_rem2 = ((m_seq & 0x80)>>1) | ((m_seq & 0x100)>>3) | ((m_seq & 0x200)>>5); m_seq = (m_seq>>6) | ((feed&0x3f)<<18); m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((val1 + m_seq_rem1 + m_seq_rem2)&0xFF); } else { @@ -197,16 +196,16 @@ READ32_MEMBER( iteagle_fpga_device::fpga_r ) logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; case 0x0c/4: // 1d = modem byte - result = (result & 0xFFFF0000) | ((m_serial_com2[m_serial_idx]&0xff)<<8) | (m_serial_com1[m_serial_idx]&0xff); + result = (result & 0xFFFF0000) | ((m_serial_com1[m_serial_idx]&0xff)<<8) | (m_serial_com0[m_serial_idx]&0xff); if (ACCESSING_BITS_0_15) { m_serial_data = false; m_serial_idx = 0; } - if (LOG_FPGA) + if (0 && LOG_FPGA) logerror("%s:fpga_r offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, result, mem_mask); break; case 0x1c/4: // 1d = modem byte - result = (result & 0xFFFF0000) | ((m_serial_com4[m_serial_idx]&0xff)<<8) | (m_serial_com3[m_serial_idx]&0xff); + result = (result & 0xFFFF0000) | ((m_serial_com3[m_serial_idx]&0xff)<<8) | (m_serial_com2[m_serial_idx]&0xff); if (ACCESSING_BITS_0_15) { m_serial_data = false; m_serial_idx = 0; @@ -233,8 +232,8 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w ) if ((m_version & 0xff00) == 0x0200) update_sequence_eg1(data & 0xff); else - // ATMEL Chip access. Returns version id's when bit 7 is set. - update_sequence(data & 0xff); + // ATMEL Chip access. Returns version id's when bit 7 is set. + update_sequence(data & 0xff); if (0 && LOG_FPGA) logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); } @@ -242,7 +241,7 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w ) if (ACCESSING_BITS_24_31 && (data & 0x01000000)) { m_cpu->set_input_line(m_irq_num, CLEAR_LINE); // Not sure what value to use here, needed for lightgun - m_timer->adjust(attotime::from_hz(25)); + m_timer->adjust(attotime::from_hz(59)); if (LOG_FPGA) logerror("%s:fpga_w offset %04X = %08X & %08X Clearing interrupt(%i)\n", machine().describe_context(), offset*4, data, mem_mask, m_irq_num); } else { @@ -269,7 +268,7 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w ) if (!m_serial_data) { m_serial_idx = data&0xf; } else { - m_serial_com1[m_serial_idx] = data&0xff; + m_serial_com0[m_serial_idx] = data&0xff; m_serial_idx = 0; } m_serial_data = !m_serial_data; @@ -278,29 +277,31 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w ) if (!m_serial_data) { m_serial_idx = (data&0x0f00)>>8; } else { - m_serial_com2[m_serial_idx] = (data&0xff00)>>8; + m_serial_com1[m_serial_idx] = (data&0xff00)>>8; } m_serial_data = !m_serial_data; } if (ACCESSING_BITS_16_23) { if (m_serial_str.size()==0) - m_serial_str = "com1: "; + m_serial_str = "com0: "; m_serial_str += (data>>16)&0xff; if (((data>>16)&0xff)==0xd) { + if (LOG_SERIAL) logerror("%s\n", m_serial_str.c_str()); osd_printf_debug("%s\n", m_serial_str.c_str()); m_serial_str.clear(); } } if (ACCESSING_BITS_24_31) { if (m_serial_str.size()==0) - m_serial_str = "com2: "; + m_serial_str = "com1: "; m_serial_str += (data>>24)&0xff; if (1 || ((data>>24)&0xff)==0xd) { + if (LOG_SERIAL) logerror("%s\n", m_serial_str.c_str()); osd_printf_debug("%s\n", m_serial_str.c_str()); m_serial_str.clear(); } } - if (LOG_FPGA) + if (0 && LOG_FPGA) logerror("%s:fpga_w offset %04X = %08X & %08X\n", machine().describe_context(), offset*4, data, mem_mask); break; case 0x1c/4: @@ -308,7 +309,7 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w ) if (!m_serial_data) { m_serial_idx = data&0xf; } else { - m_serial_com3[m_serial_idx] = data&0xff; + m_serial_com2[m_serial_idx] = data&0xff; m_serial_idx = 0; } m_serial_data = !m_serial_data; @@ -317,24 +318,26 @@ WRITE32_MEMBER( iteagle_fpga_device::fpga_w ) if (!m_serial_data) { m_serial_idx = (data&0x0f00)>>8; } else { - m_serial_com4[m_serial_idx] = (data&0xff00)>>8; + m_serial_com3[m_serial_idx] = (data&0xff00)>>8; } m_serial_data = !m_serial_data; } if (ACCESSING_BITS_16_23) { if (m_serial_str.size()==0) - m_serial_str = "com3: "; + m_serial_str = "com2: "; m_serial_str += (data>>16)&0xff; if (1 || ((data>>16)&0xff)==0xd) { + if (LOG_SERIAL) logerror("%s\n", m_serial_str.c_str()); osd_printf_debug("%s\n", m_serial_str.c_str()); m_serial_str.clear(); } } if (ACCESSING_BITS_24_31) { if (m_serial_str.size()==0) - m_serial_str = "com4: "; + m_serial_str = "com3: "; m_serial_str += (data>>24)&0xff; if (((data>>24)&0xff)==0xd) { + if (LOG_SERIAL) logerror("%s\n", m_serial_str.c_str()); osd_printf_debug("%s\n", m_serial_str.c_str()); m_serial_str.clear(); } @@ -649,7 +652,7 @@ void iteagle_ide_device::device_reset() { pci_device::device_reset(); memset(m_ctrl_regs, 0, sizeof(m_ctrl_regs)); - m_ctrl_regs[0x10/4] = 0x00000000; // 0x6=No SIMM, 0x2, 0x1, 0x0 = SIMM . Top 16 bits are compared to 0x3. + m_ctrl_regs[0x10/4] = 0x00070000; // 0x6=No SIMM, 0x2, 0x1, 0x0 = SIMM . Top 16 bits are compared to 0x3. Bit 0 might be lan chip present. memset(m_rtc_regs, 0, sizeof(m_rtc_regs)); m_rtc_regs[0xa] = 0x20; // 32.768 MHz m_rtc_regs[0xb] = 0x02; // 24-hour format diff --git a/src/mame/machine/iteagle_fpga.h b/src/mame/machine/iteagle_fpga.h index 5d150e66116..fe5f9a76687 100644 --- a/src/mame/machine/iteagle_fpga.h +++ b/src/mame/machine/iteagle_fpga.h @@ -63,10 +63,10 @@ private: std::string m_serial_str; UINT8 m_serial_idx; bool m_serial_data; + UINT8 m_serial_com0[0x10]; UINT8 m_serial_com1[0x10]; UINT8 m_serial_com2[0x10]; UINT8 m_serial_com3[0x10]; - UINT8 m_serial_com4[0x10]; UINT32 m_version; UINT32 m_seq_init; diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp index a3e256a080c..5f0d8a6b4d2 100644 --- a/src/mame/machine/n64.cpp +++ b/src/mame/machine/n64.cpp @@ -2089,7 +2089,7 @@ void n64_periphs::si_dma_tick() void n64_periphs::pif_dma(int direction) { - if (si_dram_addr & 0x3) + if (!DWORD_ALIGNED(si_dram_addr)) { fatalerror("pif_dma: si_dram_addr unaligned: %08X\n", si_dram_addr); } diff --git a/src/mame/machine/pc9801_cd.cpp b/src/mame/machine/pc9801_cd.cpp new file mode 100644 index 00000000000..2a4dffdc98e --- /dev/null +++ b/src/mame/machine/pc9801_cd.cpp @@ -0,0 +1,34 @@ +// license:BSD-3-Clause +// copyright-holders:smf +#include "pc9801_cd.h" + +// device type definition +const device_type PC9801_CD = &device_creator<pc9801_cd_device>; + +pc9801_cd_device::pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + atapi_cdrom_device(mconfig, PC9801_CD, "PC9801 CD-ROM Drive", tag, owner, clock, "pc9801_cd", __FILE__) +{ +} + +void pc9801_cd_device::fill_buffer() +{ + atapi_hle_device::fill_buffer(); + m_status |= IDE_STATUS_DRDY | IDE_STATUS_SERV; +} + +void pc9801_cd_device::process_buffer() +{ + atapi_hle_device::process_buffer(); + m_status |= IDE_STATUS_DRDY | IDE_STATUS_SERV; +} + +void pc9801_cd_device::process_command() +{ + atapi_hle_device::process_command(); + switch(m_command) + { + case IDE_COMMAND_CHECK_POWER_MODE: + m_status = IDE_STATUS_DRDY | IDE_STATUS_SERV; + break; + } +} diff --git a/src/mame/machine/pc9801_cd.h b/src/mame/machine/pc9801_cd.h new file mode 100644 index 00000000000..35a2d223bd8 --- /dev/null +++ b/src/mame/machine/pc9801_cd.h @@ -0,0 +1,23 @@ +// license:BSD-3-Clause +// copyright-holders:smf + +#ifndef __PC9801_CD_H__ +#define __PC9801_CD_H__ + +#include "machine/atapicdr.h" + +class pc9801_cd_device : public atapi_cdrom_device +{ +public: + pc9801_cd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + virtual void fill_buffer() override; + virtual void process_command() override; + virtual void process_buffer() override; +}; + +// device type definition +extern const device_type PC9801_CD; + +#endif diff --git a/src/mame/machine/pc9801_kbd.cpp b/src/mame/machine/pc9801_kbd.cpp index 260bd9f6b3d..3e4cd4373f8 100644 --- a/src/mame/machine/pc9801_kbd.cpp +++ b/src/mame/machine/pc9801_kbd.cpp @@ -257,6 +257,7 @@ void pc9801_kbd_device::device_reset() m_keyb_tx = 0xff; m_keyb_rx = 0; + m_key_avail = false; } //------------------------------------------------- @@ -276,6 +277,7 @@ void pc9801_kbd_device::device_timer(emu_timer &timer, device_timer_id id, int p { m_keyb_tx = i | 0x80; m_write_irq(ASSERT_LINE); + m_key_avail = true; m_rx_buf[i] = 0; return; } @@ -288,6 +290,7 @@ void pc9801_kbd_device::device_timer(emu_timer &timer, device_timer_id id, int p { m_keyb_tx = i; m_write_irq(ASSERT_LINE); + m_key_avail = true; m_rx_buf[i] = 0; return; } @@ -303,8 +306,11 @@ READ8_MEMBER( pc9801_kbd_device::rx_r ) { m_write_irq(CLEAR_LINE); if(!offset) + { + m_key_avail = false; return m_keyb_tx; - return 1 | 4 | 2; + } + return 1 | 4 | (m_key_avail ? 2 : 0); } WRITE8_MEMBER( pc9801_kbd_device::tx_w ) diff --git a/src/mame/machine/pc9801_kbd.h b/src/mame/machine/pc9801_kbd.h index c33d554ab3e..e776e2b238e 100644 --- a/src/mame/machine/pc9801_kbd.h +++ b/src/mame/machine/pc9801_kbd.h @@ -55,6 +55,7 @@ protected: UINT8 m_rx_buf[0x80]; UINT8 m_keyb_tx; UINT8 m_keyb_rx; + bool m_key_avail; }; diff --git a/src/mame/machine/slapstic.cpp b/src/mame/machine/slapstic.cpp index 4ff2fe4a2e3..2d1e83aae67 100644 --- a/src/mame/machine/slapstic.cpp +++ b/src/mame/machine/slapstic.cpp @@ -182,6 +182,7 @@ #include "includes/slapstic.h" +#include "validity.h" extern const device_type SLAPSTIC = &device_creator<atari_slapstic_device>; @@ -736,6 +737,12 @@ static const struct slapstic_data *const slapstic_table[] = }; +void atari_slapstic_device::device_validity_check(validity_checker &valid) const +{ + // only a small number of chips are known to exist + if (m_chipnum < 101 || m_chipnum > 118 || !slapstic_table[m_chipnum - 101]) + osd_printf_error("Unknown slapstic number: %d\n", m_chipnum); +} /************************************* @@ -744,23 +751,17 @@ static const struct slapstic_data *const slapstic_table[] = * *************************************/ -void atari_slapstic_device::slapstic_init(running_machine &machine, int chip) +void atari_slapstic_device::slapstic_init() { if (access_68k == -1) { /* see if we're 68k or 6502/6809 based */ - device_type cputype = machine.device(":maincpu")->type(); + device_type cputype = machine().device(":maincpu")->type(); access_68k = (cputype == M68000 || cputype == M68010); } - /* only a small number of chips are known to exist */ - if (chip < 101 || chip > 118) - return; - /* set up the parameters */ - if (!slapstic_table[chip - 101]) - return; - slapstic = *slapstic_table[chip - 101]; + slapstic = *slapstic_table[m_chipnum - 101]; /* reset the chip */ slapstic_reset(); diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp index d341d9804d5..69e07a8c374 100644 --- a/src/mame/machine/xbox.cpp +++ b/src/mame/machine/xbox.cpp @@ -633,7 +633,8 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer) int changed = 0; int list = 1; bool cont = false; - int pid, remain, mps; + bool retire = false; + int pid, remain, mps, done; hcca = ohcist.hc_regs[HcHCCA]; if (ohcist.state == UsbOperational) { @@ -709,21 +710,20 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer) if ((ohcist.transfer_descriptor.be ^ ohcist.transfer_descriptor.cbp) & 0xfffff000) a |= 0x1000; remain = a - b + 1; - if (pid == InPid) { - mps = ohcist.endpoint_descriptor.mps; + mps = ohcist.endpoint_descriptor.mps; + if ((pid == InPid) || (pid == OutPid)) { if (remain < mps) mps = remain; } - else { - mps = ohcist.endpoint_descriptor.mps; - } - if (ohcist.transfer_descriptor.cbp == 0) + if (ohcist.transfer_descriptor.cbp == 0) { + remain = 0; mps = 0; + } b = ohcist.transfer_descriptor.cbp; // if sending ... if (pid != InPid) { // ... get mps bytes - for (int c = 0; c < mps; c++) { + for (int c = 0; c < remain; c++) { ohcist.buffer[c] = ohcist.space->read_byte(b); b++; if ((b & 0xfff) == 0) @@ -732,11 +732,11 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer) } // should check for time available // execute transaction - mps=ohcist.ports[1].function->execute_transfer(ohcist.endpoint_descriptor.fa, ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps); + done=ohcist.ports[1].function->execute_transfer(ohcist.endpoint_descriptor.fa, ohcist.endpoint_descriptor.en, pid, ohcist.buffer, mps); // if receiving ... if (pid == InPid) { - // ... store mps bytes - for (int c = 0; c < mps; c++) { + // ... store done bytes + for (int c = 0; c < done; c++) { ohcist.space->write_byte(b,ohcist.buffer[c]); b++; if ((b & 0xfff) == 0) @@ -746,9 +746,20 @@ TIMER_CALLBACK_MEMBER(xbox_base_state::usb_ohci_timer) // status writeback (CompletionCode field, DataToggleControl field, CurrentBufferPointer field, ErrorCount field) ohcist.transfer_descriptor.cc = NoError; ohcist.transfer_descriptor.t = (ohcist.transfer_descriptor.t ^ 1) | 2; + // if all data is transferred (or there was no data to transfer) cbp must be 0 ? + if ((done == remain) || (pid == SetupPid)) + b = 0; ohcist.transfer_descriptor.cbp = b; ohcist.transfer_descriptor.ec = 0; - if ((remain == mps) || (mps == 0)) { + retire = false; + if ((done == mps) && (done == remain)) { + retire = true; + } + if ((done != mps) && (done <= remain)) + retire = true; + if (done == 0) + retire = true; + if (retire == true) { // retire transfer descriptor a = ohcist.endpoint_descriptor.headp; ohcist.endpoint_descriptor.headp = ohcist.transfer_descriptor.nexttd; @@ -822,16 +833,55 @@ void xbox_base_state::usb_ohci_plug(int port, ohci_function_device *function) } } -static USBStandardDeviceDscriptor devdesc = {18,1,0x201,0xff,0x34,0x56,64,0x100,0x101,0x301,0,0,0,1}; +static USBStandardDeviceDescriptor devdesc = {18,1,0x110,0x00,0x00,0x00,64,0x45e,0x202,0x100,0,0,0,1}; +static USBStandardConfigurationDescriptor condesc = {9,2,0x20,1,1,0,0x80,50}; +static USBStandardInterfaceDescriptor intdesc = {9,4,0,0,2,0x58,0x42,0,0}; +static USBStandardEndpointDescriptor enddesc82 = {7,5,0x82,3,0x20,4}; +static USBStandardEndpointDescriptor enddesc02 = {7,5,0x02,3,0x20,4}; -ohci_function_device::ohci_function_device() +ohci_function_device::ohci_function_device(running_machine &machine) { + state = DefaultState; + descriptors = auto_alloc_array(machine, UINT8, 1024); + descriptors_pos = 0; address = 0; newaddress = 0; controldirection = 0; + controltype = 0; + controlrecipient = 0; + configurationvalue = 0; remain = 0; position = nullptr; settingaddress = false; + add_device_descriptor(devdesc); + add_configuration_descriptor(condesc); + add_interface_descriptor(intdesc); + add_endpoint_descriptor(enddesc82); + add_endpoint_descriptor(enddesc02); +} + +void ohci_function_device::add_device_descriptor(USBStandardDeviceDescriptor &descriptor) +{ + memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor)); + descriptors_pos += descriptor.bLength; +} + +void ohci_function_device::add_configuration_descriptor(USBStandardConfigurationDescriptor &descriptor) +{ + memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor)); + descriptors_pos += descriptor.bLength; +} + +void ohci_function_device::add_interface_descriptor(USBStandardInterfaceDescriptor &descriptor) +{ + memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor)); + descriptors_pos += descriptor.bLength; +} + +void ohci_function_device::add_endpoint_descriptor(USBStandardEndpointDescriptor &descriptor) +{ + memcpy(descriptors + descriptors_pos, &descriptor, sizeof(descriptor)); + descriptors_pos += descriptor.bLength; } void ohci_function_device::execute_reset() @@ -842,9 +892,11 @@ void ohci_function_device::execute_reset() int ohci_function_device::execute_transfer(int address, int endpoint, int pid, UINT8 *buffer, int size) { + int descriptortype;// descriptorindex; + if (endpoint == 0) { if (pid == SetupPid) { - struct USBSetupPacket *p=(struct USBSetupPacket *)buffer; + USBSetupPacket *p=(struct USBSetupPacket *)buffer; // define direction 0:host->device 1:device->host controldirection = (p->bmRequestType & 128) >> 7; // case ==1, IN data stage and OUT status stage @@ -853,9 +905,10 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U controltype = (p->bmRequestType & 0x60) >> 5; controlrecipient = p->bmRequestType & 0x1f; position = nullptr; + // number of byte to transfer in data stage (0 no data stage) remain = p->wLength; - // if standard - if (controltype == 0) { + // if standard device request + if ((controltype == StandardType) && (controlrecipient == DeviceRecipient)) { switch (p->bRequest) { case GET_STATUS: case CLEAR_FEATURE: @@ -866,20 +919,39 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U settingaddress = true; break; case GET_DESCRIPTOR: - if ((p->wValue >> 8) == DEVICE) { // device descriptor - //p->wValue & 255; - position = (UINT8 *)&devdesc; - remain = sizeof(devdesc); + descriptortype = p->wValue >> 8; + //descriptorindex = p->wValue & 255; + if (descriptortype == DEVICE) { // device descriptor + position = descriptors; + remain = descriptors[0]; } - else if ((p->wValue >> 8) == CONFIGURATION) { // configuration descriptor - remain = 0; + else if (descriptortype == CONFIGURATION) { // configuration descriptor + position = descriptors + 18; + remain = descriptors[18+2]; + } + else if (descriptortype == INTERFACE) { // interface descriptor + position = descriptors + 18 + 9; + remain = descriptors[18 + 9]; } + else if (descriptortype == ENDPOINT) { // endpoint descriptor + position = descriptors + 18 + 9 + 9; + remain = descriptors[18 + 9 + 9]; + } + else + remain = 0; if (remain > p->wLength) remain = p->wLength; break; + case SET_CONFIGURATION: + if (p->wValue == 0) + state = AddressState; + else { + configurationvalue = p->wValue; + state = ConfiguredState; + } + break; case SET_DESCRIPTOR: case GET_CONFIGURATION: - case SET_CONFIGURATION: case GET_INTERFACE: case SET_INTERFACE: case SYNCH_FRAME: @@ -887,17 +959,21 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U break; } } + else + return handle_nonstandard_request(p); + size = 0; } else if (pid == InPid) { // if no data has been transferred (except for the setup stage) // and the lenght of this IN transaction is 0 // assume this is the status stage - if (size == 0) { + if ((size == 0) && (remain == 0)) { if (settingaddress == true) { // set of address is active at end of status stage address = newaddress; settingaddress = false; + state = AddressState; } return 0; } @@ -929,9 +1005,27 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U } } } + else + return -1; return size; } +int ohci_function_device::handle_nonstandard_request(USBSetupPacket *setup) +{ + if ((controltype == VendorType) && (controlrecipient == InterfaceRecipient)) + { + if (setup->bRequest == GET_DESCRIPTOR) + { + if (setup->wValue == 0x4200) + { + position = nullptr; + remain = 0; + } + } + } + return 0; +} + void xbox_base_state::usb_ohci_interrupts() { if (((ohcist.hc_regs[HcInterruptStatus] & ohcist.hc_regs[HcInterruptEnable]) != 0) && ((ohcist.hc_regs[HcInterruptEnable] & MasterInterruptEnable) != 0)) @@ -1331,11 +1425,7 @@ READ8_MEMBER(xbox_base_state::get_slave_ack) IRQ_CALLBACK_MEMBER(xbox_base_state::irq_callback) { int r = 0; - r = xbox_base_devs.pic8259_2->acknowledge(); - if (r == 0) - { - r = xbox_base_devs.pic8259_1->acknowledge(); - } + r = xbox_base_devs.pic8259_1->acknowledge(); if (debug_irq_active) debug_generate_irq(debug_irq_number, false); return r; @@ -1588,6 +1678,10 @@ ADDRESS_MAP_END void xbox_base_state::machine_start() { +#ifdef USB_ENABLED + ohci_function_device *usb_device; +#endif + nvidia_nv2a = std::make_unique<nv2a_renderer>(machine()); memset(pic16lc_buffer, 0, sizeof(pic16lc_buffer)); pic16lc_buffer[0] = 'B'; @@ -1626,7 +1720,8 @@ void xbox_base_state::machine_start() ohcist.space = &m_maincpu->space(); ohcist.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(xbox_base_state::usb_ohci_timer), this), (void *)"USB OHCI Timer"); ohcist.timer->enable(false); - usb_ohci_plug(1, new ohci_function_device()); // test connect + usb_device = new ohci_function_device(machine()); + usb_ohci_plug(1, usb_device); // test connect #endif memset(&superiost, 0, sizeof(superiost)); superiost.configuration_mode = false; diff --git a/src/mame/mame.cpp b/src/mame/mame.cpp index 1acc02060ab..9dc8d96c382 100644 --- a/src/mame/mame.cpp +++ b/src/mame/mame.cpp @@ -13,32 +13,11 @@ #define APPNAME "MAME" #define APPNAME_LOWER "mame" #define CONFIGNAME "mame" -#define CAPGAMENOUN "MACHINE" -#define CAPSTARTGAMENOUN "Machine" -#define GAMENOUN "machine" -#define GAMESNOUN "machines" #define COPYRIGHT "Copyright Nicola Salmoria\nand the MAME team\nhttp://mamedev.org" #define COPYRIGHT_INFO "Copyright Nicola Salmoria and the MAME team" -#define DISCLAIMER "This software reproduces, more or less faithfully, the behaviour of a wide range\n" \ - "of machines. But hardware is useless without software, so images of the ROMs and\n" \ - "other media which run on that hardware are also required.\n" -#define USAGE "Usage: %s [%s] [media] [software] [options]" -#define XML_ROOT "mame" -#define XML_TOP "machine" -#define STATE_MAGIC_NUM "MAMESAVE" const char * emulator_info::get_appname() { return APPNAME;} const char * emulator_info::get_appname_lower() { return APPNAME_LOWER;} const char * emulator_info::get_configname() { return CONFIGNAME;} -const char * emulator_info::get_capgamenoun() { return CAPGAMENOUN;} -const char * emulator_info::get_capstartgamenoun() { return CAPSTARTGAMENOUN;} -const char * emulator_info::get_gamenoun() { return GAMENOUN;} -const char * emulator_info::get_gamesnoun() { return GAMESNOUN;} const char * emulator_info::get_copyright() { return COPYRIGHT;} const char * emulator_info::get_copyright_info() { return COPYRIGHT_INFO;} -const char * emulator_info::get_disclaimer() { return DISCLAIMER;} -const char * emulator_info::get_usage() { return USAGE;} -const char * emulator_info::get_xml_root() { return XML_ROOT;} -const char * emulator_info::get_xml_top() { return XML_TOP;} -const char * emulator_info::get_state_magic_num() { return STATE_MAGIC_NUM;} -void emulator_info::printf_usage(const char *par1, const char *par2) { osd_printf_info(USAGE, par1, par2); } diff --git a/src/mame/mame.lst b/src/mame/mame.lst index b4737de8fa8..edf48cd75d1 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles /****************************************************************************** - ume.lst + mame.lst List of all enabled drivers in the system. This file is parsed by makelist.exe, sorted, and output as C code describing the drivers. diff --git a/src/mame/mess.cpp b/src/mame/mess.cpp index 985aeaa19e7..209ff7651d6 100644 --- a/src/mame/mess.cpp +++ b/src/mame/mess.cpp @@ -13,32 +13,9 @@ #define APPNAME "MESS" #define APPNAME_LOWER "mess" #define CONFIGNAME "mess" -#define CAPGAMENOUN "MACHINE" -#define CAPSTARTGAMENOUN "Machine" -#define GAMENOUN "machine" -#define GAMESNOUN "machines" #define COPYRIGHT "Copyright Nicola Salmoria\nand the MAME team\nhttp://mamedev.org" #define COPYRIGHT_INFO "Copyright Nicola Salmoria and the MAME team" -#define DISCLAIMER "This software reproduces, more or less faithfully, the behaviour of a wide range\n" \ - "of machines. But hardware is useless without software, so images of the ROMs and\n" \ - "other media which run on that hardware are also required.\n" -#define USAGE "Usage: %s [%s] [media] [software] [options]" -#define XML_ROOT "mame" -#define XML_TOP "machine" -#define STATE_MAGIC_NUM "MAMESAVE" const char * emulator_info::get_appname() { return APPNAME;} const char * emulator_info::get_appname_lower() { return APPNAME_LOWER;} const char * emulator_info::get_configname() { return CONFIGNAME;} -const char * emulator_info::get_capgamenoun() { return CAPGAMENOUN;} -const char * emulator_info::get_capstartgamenoun() { return CAPSTARTGAMENOUN;} -const char * emulator_info::get_gamenoun() { return GAMENOUN;} -const char * emulator_info::get_gamesnoun() { return GAMESNOUN;} -const char * emulator_info::get_copyright() { return COPYRIGHT;} -const char * emulator_info::get_copyright_info() { return COPYRIGHT_INFO;} -const char * emulator_info::get_disclaimer() { return DISCLAIMER;} -const char * emulator_info::get_usage() { return USAGE;} -const char * emulator_info::get_xml_root() { return XML_ROOT;} -const char * emulator_info::get_xml_top() { return XML_TOP;} -const char * emulator_info::get_state_magic_num() { return STATE_MAGIC_NUM;} -void emulator_info::printf_usage(const char *par1, const char *par2) { osd_printf_info(USAGE, par1, par2); } diff --git a/src/mame/mess.lst b/src/mame/mess.lst index a8ae22b6af3..850a407603f 100644 --- a/src/mame/mess.lst +++ b/src/mame/mess.lst @@ -1153,6 +1153,7 @@ jupace // Jupiter Ace // Sord m5 m5p +m5p_brno // APF Electronics Inc. apfm1000 @@ -2142,18 +2143,35 @@ diablo68 // 1991 Novag Diablo 68000 Chess Computer // Fidelity cc10 -vcc -vccg -vccfr -vccsp -uvc -bridgec3 +cc7 +vcc // VCC: Voice Chess Challenger (English) +vccg // * Spanish +vccfr // * German +vccsp // * French +uvc // UVC: Advanced Voice Chess Challenger (English) +uvcsp // * Spanish +uvcg // * German +uvcfr // * French +vsc // VSC: Voice Sensory Chess Challenger (English) +vscsp // * Spanish +vscg // * German +vscfr // * French vbrc -vsc -csc +bridgec3 + +csc // CSC: Champion Sensory Chess Challenger (English) +cscsp // * Spanish +cscg // * German +cscfr // * French fscc12 +fexcel fexcelv +feagv2 +feagv7 +feagv10 +feagv11 + // Hegener & Glaser Munich //mephisto // Mephisto 1 - roms needed - not in driver mm2 // Mephisto 2 @@ -2184,7 +2202,6 @@ van16 // 1991 Mephisto Vancouver 68000 van32 // 1991 Mephisto Vancouver 68020 gen32 // 1993 Mephisto Genius030 V4.00 gen32_41 // 1993 Mephisto Genius030 V4.01 -gen32_oc // 1993 Mephisto Genius030 V4.01OC berlinp // 1994 Mephisto Berlin Pro 68020 bpl32 // 1996 Mephisto Berlin Pro London Upgrade V5.00 lond020 // 1996 Mephisto London 68020 32 Bit @@ -2250,7 +2267,6 @@ gckong // Gakken gdigdug // Gakken mwcbaseb // Mattel pbqbert // Parker Brothers -mvbfree // Mego kingman // Tomy tmtron // Tomy vinvader // VTech @@ -2270,9 +2286,12 @@ gnwmndon // Nintendo // hh_tms1k mathmagi // APF amaztron // Coleco +zodiac // Coleco +cqback // Coleco h2hbaseb // Coleco h2hfootb // Coleco tc4 // Coleco +cnfball2 // Conic ebball // Entex ebball2 // Entex ebball3 // Entex @@ -2298,6 +2317,7 @@ stopthiep // Parker Bros (patent) bankshot // Parker Bros splitsec // Parker Bros mmerlin // Parker Bros +lostreas // Parker Bros tandy12 // Tandy Radio Shack tbreakup // Tomy phpball // Tomy @@ -2321,6 +2341,10 @@ lilprof lilprof78 dataman +// hh_tms1k tispellb.cpp +spellb +mrchalgr + // hh_tms1k tispeak.cpp snspell snspellp @@ -2335,6 +2359,7 @@ snspellc snspellca snspellcuk snmath +snmatha snmathp snread lantutor @@ -2343,10 +2368,7 @@ tntelluk tntellfr tntellp vocaid - -// hh_tms1k tispellb.cpp -spellb -mrchalgr +k28m2 // Tiger Electronics // hh_ucom4 ufombs // Bambino @@ -2361,6 +2383,8 @@ efball // Epoch galaxy2 // Epoch astrocmd // Epoch edracula // Epoch +mcompgin // Mattel +mvbfree // Mego tccombat // Tomy tmpacman // Tomy tmtennis // Tomy @@ -2379,6 +2403,7 @@ microvsn // Milton Bradley monty // Ritam mmonty // Ritam wildfire // Parker Bros +k28 // Tiger Electronics //********** Misc ********************************************************** @@ -2427,6 +2452,7 @@ hec2mdhrx hec2mx80 hec2mx40 hector1 +os214 victor poly880 sc1 @@ -2440,6 +2466,7 @@ vcs80 v1050 x820 x820ii +notetakr x168 xor100 iq151 @@ -2818,6 +2845,7 @@ hp_ipc lggp40 mt735 squale +goupilg1 micral rd100 proteus3 diff --git a/src/mame/video/apollo.cpp b/src/mame/video/apollo.cpp index 7d6cc7099ef..9735f0e334a 100644 --- a/src/mame/video/apollo.cpp +++ b/src/mame/video/apollo.cpp @@ -1711,7 +1711,7 @@ MACHINE_CONFIG_FRAGMENT( apollo_graphics ) MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) MCFG_SCREEN_REFRESH_RATE(76) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(657)) + MCFG_SCREEN_RAW_PARAMS(68000000, 1343, 0, 1024, 841, 0, 800) MCFG_SCREEN_SIZE(1024, 800) MCFG_SCREEN_VISIBLE_AREA(0, 1023, 0, 799) MCFG_SCREEN_UPDATE_DEVICE(APOLLO_SCREEN_TAG, apollo_graphics_15i, screen_update) @@ -1895,7 +1895,7 @@ MACHINE_CONFIG_FRAGMENT( apollo_mono19i ) MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) MCFG_SCREEN_REFRESH_RATE(64) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(616)) + MCFG_SCREEN_RAW_PARAMS(120000000, 1728, 0, 1280, 1066, 0, 1024) MCFG_SCREEN_SIZE(1280, 1024) MCFG_SCREEN_VISIBLE_AREA(0, 1279, 0, 1023) MCFG_SCREEN_UPDATE_DEVICE(APOLLO_SCREEN_TAG, apollo_graphics_19i, screen_update) diff --git a/src/mame/video/apple1.cpp b/src/mame/video/apple1.cpp deleted file mode 100644 index 2dc880127b5..00000000000 --- a/src/mame/video/apple1.cpp +++ /dev/null @@ -1,392 +0,0 @@ -// license:??? -// copyright-holders:Paul Daniels, Colin Howell, R. Belmont -/*************************************************************************** - - apple1.c - - Functions to emulate the video hardware of the Apple I. - - The Apple I video hardware was basically a dumb video terminal; in - fact it was based on Steve Wozniak's own design for a simple video - terminal. It had 40 columns by 24 lines of uppercase-only text. - Text could only be output at 60 characters per second, one character - per video frame. The cursor (a blinking @) could only be advanced - using spaces or carriage returns. Carriage returns were the only - control characters recognized. Previously written text could not be - altered, only scrolled off the top of the screen. - - The video memory used seven 1k-bit dynamic shift registers. Six of - these held the 6-bit visible character codes, and one stored the - cursor location as a simple bitmap--the bit for the cursor position - was set to 0, and all the other bits were 1. - - These shift registers were continuously recirculated, completing one - cycle per video frame. As a new line of characters was about to be - scanned by the video beam, that character line would be recirculated - into the shift registers and would simultaneously be stored into a - 6x40-bit line buffer (also a shift register). At this point, if the - cursor location was in this line, a new character could be written - into that location in the shift registers and the cursor could be - advanced. (Carriage returns were not written into the shift - registers; they only advanced the cursor.) - - The characters in the line buffer were recirculated 7 times to - display the 8 scan lines of the characters, before being replaced by - a new line of characters from the main shift registers. - - Cursor blinking was performed by a Signetics 555 timer IC whose - output was gated into the character code signals as they passed into - the line buffer. - - Character images were provided by a Signetics 2513 character - generator ROM, a chip also used in computer terminals such as the - ADM-3A. This ROM had 9 address lines and 5 data lines; it contained - 64 character images, each 5 pixels wide by 8 pixels high, with one - line of pixels being blank for vertical separation. The video - circuitry added the 2 pixels of horizontal separation for each - character. - - A special CLEAR SCREEN switch on the keyboard, directly connected to - the video hardware, could be used to clear the video memory and - return the cursor to the home position. This was completely - independent of the processor. - - A schematic of the Apple I video hardware can be found in the - Apple-1 Operation Manual; look for the schematic titled "Terminal - Section". Most of the functionality modeled here was determined by - reading this schematic. Many of the chips used were standard 74xx - TTL chips, but the shift registers used for the video memory and - line buffer were Signetics 25xx PMOS ICs. These were already - becoming obsolete when the Apple I was built, and detailed - information on them is very hard to find today. - -***************************************************************************/ - -#include "emu.h" -#include "includes/apple1.h" - - -/*************************************************************************** - - Terminal code - -***************************************************************************/ - -TILE_GET_INFO_MEMBER(apple1_state::terminal_gettileinfo) -{ - int ch, gfxfont, code, color; - - ch = m_current_terminal->mem[tile_index]; - code = ch & ((1 << m_current_terminal->char_bits) - 1); - color = ch >> m_current_terminal->char_bits; - gfxfont = m_current_terminal->gfx; - - if ((tile_index == m_current_terminal->cur_offset) && !m_current_terminal->cur_hidden && m_current_terminal->getcursorcode) - code = m_current_terminal->getcursorcode(code); - - SET_TILE_INFO_MEMBER(gfxfont, /* gfx */ - code, /* character */ - color, /* color */ - 0); /* flags */ -} - -void apple1_state::terminal_draw(screen_device &screen, bitmap_ind16 &dest, const rectangle &cliprect, terminal_t *terminal) -{ - m_current_terminal = terminal; - terminal->tm->draw(screen, dest, cliprect, 0, 0); - m_current_terminal = nullptr; -} - -void apple1_state::verify_coords(terminal_t *terminal, int x, int y) -{ - assert(x >= 0); - assert(y >= 0); - assert(x < terminal->num_cols); - assert(y < terminal->num_rows); -} - -void apple1_state::terminal_putchar(terminal_t *terminal, int x, int y, int ch) -{ - int offs; - - verify_coords(terminal, x, y); - - offs = y * terminal->num_cols + x; - if (terminal->mem[offs] != ch) - { - terminal->mem[offs] = ch; - terminal->tm->mark_tile_dirty(offs); - } -} - -int apple1_state::terminal_getchar(terminal_t *terminal, int x, int y) -{ - int offs; - - verify_coords(terminal, x, y); - offs = y * terminal->num_cols + x; - return terminal->mem[offs]; -} - -void apple1_state::terminal_putblank(terminal_t *terminal, int x, int y) -{ - terminal_putchar(terminal, x, y, terminal->blank_char); -} - -void apple1_state::terminal_dirtycursor(terminal_t *terminal) -{ - if (terminal->cur_offset >= 0) - terminal->tm->mark_tile_dirty(terminal->cur_offset); -} - -void apple1_state::terminal_setcursor(terminal_t *terminal, int x, int y) -{ - terminal_dirtycursor(terminal); - terminal->cur_offset = y * terminal->num_cols + x; - terminal_dirtycursor(terminal); -} - -void apple1_state::terminal_hidecursor(terminal_t *terminal) -{ - terminal->cur_hidden = 1; - terminal_dirtycursor(terminal); -} - -void apple1_state::terminal_showcursor(terminal_t *terminal) -{ - terminal->cur_hidden = 0; - terminal_dirtycursor(terminal); -} - -void apple1_state::terminal_getcursor(terminal_t *terminal, int *x, int *y) -{ - *x = terminal->cur_offset % terminal->num_cols; - *y = terminal->cur_offset / terminal->num_cols; -} - -void apple1_state::terminal_fill(terminal_t *terminal, int val) -{ - int i; - for (i = 0; i < terminal->num_cols * terminal->num_rows; i++) - terminal->mem[i] = val; - terminal->tm->mark_all_dirty(); -} - -void apple1_state::terminal_clear(terminal_t *terminal) -{ - terminal_fill(terminal, terminal->blank_char); -} - -terminal_t *apple1_state::terminal_create( - int gfx, int blank_char, int char_bits, - int (*getcursorcode)(int original_code), - int num_cols, int num_rows) -{ - terminal_t *term; - int char_width, char_height; - - char_width = m_gfxdecode->gfx(gfx)->width(); - char_height = m_gfxdecode->gfx(gfx)->height(); - - term = (terminal_t *) auto_alloc_array(machine(), char, sizeof(terminal_t) - sizeof(term->mem) - + (num_cols * num_rows * sizeof(termchar_t))); - - term->tm = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(apple1_state::terminal_gettileinfo),this), TILEMAP_SCAN_ROWS, - char_width, char_height, num_cols, num_rows); - - term->gfx = gfx; - term->blank_char = blank_char; - term->char_bits = char_bits; - term->num_cols = num_cols; - term->num_rows = num_rows; - term->getcursorcode = getcursorcode; - term->cur_offset = -1; - term->cur_hidden = 0; - terminal_clear(term); - return term; -} - - -/**************************************************************************/ - - - -/* The cursor blinking is generated by a free-running timer with a - 0.52-second period. It is on for 2/3 of this period and off for - 1/3. */ -#define CURSOR_OFF_LENGTH (0.52/3) - -/**************************************************************************/ - -static int apple1_getcursorcode(int original_code) -{ - /* Cursor uses symbol 0 (an @ sign) in the character generator ROM. */ - return 0; -} - -/**************************************************************************/ - -void apple1_state::video_start() -{ - m_blink_on = 1; /* cursor is visible initially */ - m_terminal = terminal_create( - 0, /* graphics font 0 (the only one we have) */ - 32, /* Blank character is symbol 32 in the ROM */ - 8, /* use 8 bits for the character code */ - apple1_getcursorcode, - 40, 24); /* 40 columns, 24 rows */ - - terminal_setcursor(m_terminal, 0, 0); -} - -/* This function handles all writes to the video display. */ -void apple1_state::apple1_vh_dsp_w (int data) -{ - int x, y; - int cursor_x, cursor_y; - - /* While CLEAR SCREEN is being held down, the hardware is forced - to clear the video memory, so video writes have no effect. */ - if (m_vh_clrscrn_pressed) - return; - - /* The video display port only accepts the 7 lowest bits of the char. */ - data &= 0x7f; - - terminal_getcursor(m_terminal, &cursor_x, &cursor_y); - - if (data == '\r') { - /* Carriage-return moves the cursor to the start of the next - line. */ - cursor_x = 0; - cursor_y++; - } - else if (data < ' ') { - /* Except for carriage-return, the video hardware completely - ignores all control characters. */ - return; - } - else { - /* For visible characters, only 6 bits of the ASCII code are - used, because the 2513 character generator ROM only - contains 64 symbols. The low 5 bits of the ASCII code are - used directly. Bit 6 is ignored, since it is the same for - all the available characters in the ROM. Bit 7 is inverted - before being used as the high bit of the 6-bit ROM symbol - index, because the block of 32 ASCII symbols containing the - uppercase letters comes first in the ROM. */ - - int romindx = (data & 0x1f) | (((data ^ 0x40) & 0x40) >> 1); - - terminal_putchar(m_terminal, cursor_x, cursor_y, romindx); - if (cursor_x < 39) - { - cursor_x++; - } - else - { - cursor_x = 0; - cursor_y++; - } - } - - /* If the cursor went past the bottom line, scroll the text up one line. */ - if (cursor_y == 24) - { - for (y = 1; y < 24; y++) - for (x = 0; x < 40; x++) - terminal_putchar(m_terminal, x, y-1, - terminal_getchar(m_terminal, x, y)); - - for (x = 0; x < 40; x++) - terminal_putblank(m_terminal, x, 23); - - cursor_y--; - } - - terminal_setcursor(m_terminal, cursor_x, cursor_y); -} - -/* This function handles clearing the video display on cold-boot or in - response to a press of the CLEAR SCREEN switch. */ -void apple1_state::apple1_vh_dsp_clr () -{ - terminal_setcursor(m_terminal, 0, 0); - terminal_clear(m_terminal); -} - -/* Calculate how long it will take for the display to assert the RDA - signal in response to a video display write. This signal indicates - the display has completed the write and is ready to accept another - write. */ -attotime apple1_state::apple1_vh_dsp_time_to_ready () -{ - int cursor_x, cursor_y; - int cursor_scanline; - double scanline_period = m_screen->scan_period().as_double(); - double cursor_hfrac; - - /* The video hardware refreshes the screen by reading the - character codes from its circulating shift-register memory. - Because of the way this memory works, a new character can only - be written into the cursor location at the moment this location - is about to be read. This happens during the first scanline of - the cursor's character line, when the beam reaches the cursor's - horizontal position. */ - - terminal_getcursor(m_terminal, &cursor_x, &cursor_y); - cursor_scanline = cursor_y * apple1_charlayout.height; - - /* Each scanline is composed of 455 pixel times. The first 175 of - these are the horizontal blanking period; the remaining 280 are - for the visible part of the scanline. */ - cursor_hfrac = (175 + cursor_x * apple1_charlayout.width) / 455; - - if (m_screen->vpos() == cursor_scanline) { - /* video_screen_get_hpos() doesn't account for the horizontal - blanking interval; it acts as if the scanline period is - entirely composed of visible pixel times. However, we can - still use it to find what fraction of the current scanline - period has elapsed. */ - double current_hfrac = m_screen->hpos() / - m_screen->width(); - if (current_hfrac < cursor_hfrac) - return attotime::from_double(scanline_period * (cursor_hfrac - current_hfrac)); - } - - return attotime::from_double( - m_screen->time_until_pos(cursor_scanline, 0).as_double() + - scanline_period * cursor_hfrac); -} - -/* Blink the cursor on or off, as appropriate. */ -void apple1_state::apple1_vh_cursor_blink () -{ - int new_blink_on; - - /* The cursor is on for 2/3 of its blink period and off for 1/3. - This is most easily handled by dividing the total elapsed time - by the length of the off-portion of the cycle, giving us the - number of one-third-cycles elapsed, then checking the result - modulo 3. */ - - if (((int) (machine().time().as_double() / CURSOR_OFF_LENGTH)) % 3 < 2) - new_blink_on = 1; - else - new_blink_on = 0; - - if (new_blink_on != m_blink_on) { /* have we changed state? */ - if (new_blink_on) - terminal_showcursor(m_terminal); - else - terminal_hidecursor(m_terminal); - m_blink_on = new_blink_on; - } -} - -UINT32 apple1_state::screen_update_apple1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - apple1_vh_cursor_blink(); - terminal_draw(screen, bitmap, cliprect, m_terminal); - return 0; -} diff --git a/src/mame/video/blmbycar.cpp b/src/mame/video/blmbycar.cpp index b438f01eafa..6086cd9e9b6 100644 --- a/src/mame/video/blmbycar.cpp +++ b/src/mame/video/blmbycar.cpp @@ -78,13 +78,13 @@ TILE_GET_INFO_MEMBER(blmbycar_state::get_tile_info_1) } -WRITE16_MEMBER(blmbycar_state::blmbycar_vram_0_w) +WRITE16_MEMBER(blmbycar_state::vram_0_w) { COMBINE_DATA(&m_vram_0[offset]); m_tilemap_0->mark_tile_dirty(offset / 2); } -WRITE16_MEMBER(blmbycar_state::blmbycar_vram_1_w) +WRITE16_MEMBER(blmbycar_state::vram_1_w) { COMBINE_DATA(&m_vram_1[offset]); m_tilemap_1->mark_tile_dirty(offset / 2); @@ -192,7 +192,7 @@ void blmbycar_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, ***************************************************************************/ -UINT32 blmbycar_state::screen_update_blmbycar(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 blmbycar_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int i, layers_ctrl = -1; diff --git a/src/mame/video/chihiro.cpp b/src/mame/video/chihiro.cpp index 9f803c45651..f5d413e814e 100644 --- a/src/mame/video/chihiro.cpp +++ b/src/mame/video/chihiro.cpp @@ -1953,7 +1953,7 @@ void nv2a_renderer::render_register_combiners(INT32 scanline, const extent_t &ex if ((extent.startx < 0) || (extent.stopx > 640)) return; - osd_lock_acquire(combiner.lock); // needed since multithreading is not supported yet + std::lock_guard<std::mutex> lock(combiner.lock); // needed since multithreading is not supported yet x = extent.stopx - extent.startx - 1; // number of pixels to draw while (x >= 0) { xp = extent.startx + x; @@ -1998,7 +1998,6 @@ void nv2a_renderer::render_register_combiners(INT32 scanline, const extent_t &ex write_pixel(xp, scanline, a8r8g8b8, z); x--; } - osd_lock_release(combiner.lock); } #if 0 @@ -2550,6 +2549,38 @@ void nv2a_renderer::clear_depth_buffer(int what, UINT32 value) } } +UINT32 nv2a_renderer::render_triangle_culling(const rectangle &cliprect, render_delegate callback, int paramcount, const vertex_t &_v1, const vertex_t &_v2, const vertex_t &_v3) +{ + float areax2; + NV2A_GL_CULL_FACE face = NV2A_GL_CULL_FACE::FRONT; + + if (backface_culling_enabled == false) + return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3); + if (backface_culling_culled == NV2A_GL_CULL_FACE::FRONT_AND_BACK) + return 0; + areax2 = _v1.x*(_v2.y - _v3.y) + _v2.x*(_v3.y - _v1.y) + _v3.x*(_v1.y - _v2.y); + if (backface_culling_winding == NV2A_GL_FRONT_FACE::CCW) + { + if (-areax2 <= 0) + face = NV2A_GL_CULL_FACE::BACK; + else + face = NV2A_GL_CULL_FACE::FRONT; + } else + { + if (areax2 <= 0) + face = NV2A_GL_CULL_FACE::BACK; + else + face = NV2A_GL_CULL_FACE::FRONT; + } + if (face == NV2A_GL_CULL_FACE::FRONT) + if (backface_culling_culled == NV2A_GL_CULL_FACE::BACK) + return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3); + if (face == NV2A_GL_CULL_FACE::BACK) + if (backface_culling_culled == NV2A_GL_CULL_FACE::FRONT) + return render_triangle(cliprect, callback, paramcount, _v1, _v2, _v3); + return 0; +} + int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UINT32 subchannel, UINT32 method, UINT32 address, int &countlen) { UINT32 maddress; @@ -2562,6 +2593,16 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN printf("A:%08X MTHD:%08X D:%08X\n\r",address,maddress,data); #endif if (maddress == 0x17fc) { +#if 0 // useful while debugging to see what coordinates have been used + static int debugvc = 0; + if (debugvc) + if (data == 0) + { + printf("%d %d\n\r", (int)primitive_type, vertex_first); + for (int n = 0; n < vertex_first; n++) + printf("%d X:%f Y:%f Z:%f W:%f x:%f y:%f\n\r", n, vertex_software[n].attribute[0].fv[0], vertex_software[n].attribute[0].fv[1], vertex_software[n].attribute[0].fv[2], vertex_software[n].attribute[0].fv[3], vertex_xy[n].x, vertex_xy[n].y); + } +#endif vertex_count = 0; vertex_first = 0; indexesleft_count = 0; @@ -2593,7 +2634,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN for (n = 0; n <= count; n += 4) { read_vertices_0x1810(space, vertex_software + vertex_first, n + offset, 4); convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 4); - render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy + vertex_first); // 4 rgba, 4 texture units 2 uv + //render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy + vertex_first); // 4 rgba, 4 texture units 2 uv + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 1], vertex_xy[vertex_first + 2]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 2], vertex_xy[vertex_first + 3]); vertex_first = (vertex_first + 4) & 1023; vertex_count = vertex_count + 4; wait(); @@ -2603,7 +2646,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN for (n = 0; n <= count; n += 3) { read_vertices_0x1810(space, vertex_software + vertex_first, n + offset, 3); convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 3); - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv vertex_first = (vertex_first + 3) & 1023; vertex_count = vertex_count + 3; wait(); @@ -2625,7 +2668,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN for (n = 0; n <= count; n++) { read_vertices_0x1810(space, vertex_software + vertex_first, offset + n, 1); convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1); - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); vertex_first = (vertex_first + 1) & 1023; vertex_count = vertex_count + 1; wait(); @@ -2646,9 +2689,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN read_vertices_0x1810(space, vertex_software + vertex_first, offset + n, 1); convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1); if ((vertex_count & 1) == 0) - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); else - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]); vertex_first = (vertex_first + 1) & 1023; vertex_count = vertex_count + 1; wait(); @@ -2692,7 +2735,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN address = address + c * 4; countlen = countlen - c; convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 4); - render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy + vertex_first); // 4 rgba, 4 texture units 2 uv + //render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy + vertex_first); // 4 rgba, 4 texture units 2 uv + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 1], vertex_xy[vertex_first + 2]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 2], vertex_xy[vertex_first + 3]); vertex_first = (vertex_first + 4) & 1023; vertex_count = vertex_count + 4; wait(); @@ -2734,7 +2779,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1); address = address + c * 4; countlen = countlen - c; - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); vertex_first = (vertex_first + 1) & 1023; vertex_count = vertex_count + 1; wait(); @@ -2754,7 +2799,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN address = address + c * 4; countlen = countlen - c; convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 3); - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv vertex_first = (vertex_first + 3) & 1023; vertex_count = vertex_count + 3; wait(); @@ -2790,9 +2835,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN countlen = countlen - c; convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1); if ((vertex_count & 1) == 0) - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); else - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]); vertex_first = (vertex_first + 1) & 1023; vertex_count = vertex_count + 1; wait(); @@ -2850,7 +2895,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN break; } address = address + c * 4; - render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy); // 4 rgba, 4 texture units 2 uv + //render_polygon<4>(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy); // 4 rgba, 4 texture units 2 uv + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 1], vertex_xy[vertex_first + 2]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[vertex_first + 2], vertex_xy[vertex_first + 3]); vertex_first = (vertex_first + 4) & 1023; vertex_count = vertex_count + 4; wait(); @@ -2878,8 +2925,8 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN return 0; } address = address + c * 4; - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[n & 3], vertex_xy[(n + 1) & 3], vertex_xy[(n + 2) & 3]); - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(n + 2) & 3], vertex_xy[(n + 1) & 3], vertex_xy[(n + 3) & 3]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[n & 3], vertex_xy[(n + 1) & 3], vertex_xy[(n + 2) & 3]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(n + 2) & 3], vertex_xy[(n + 1) & 3], vertex_xy[(n + 3) & 3]); wait(); } } @@ -2915,7 +2962,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN } address = address + c * 4; convert_vertices_poly(vertex_software + vertex_first, vertex_xy + vertex_first, 1); - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[1024], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); vertex_first = (vertex_first + 1) & 1023; vertex_count = vertex_count + 1; wait(); @@ -2934,7 +2981,7 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN break; } address = address + c * 4; - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[vertex_first], vertex_xy[(vertex_first + 1) & 1023], vertex_xy[(vertex_first + 2) & 1023]); // 4 rgba, 4 texture units 2 uv vertex_first = (vertex_first + 3) & 1023; vertex_count = vertex_count + 3; wait(); @@ -2969,9 +3016,9 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN } address = address + c * 4; if ((vertex_count & 1) == 0) - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[(vertex_first - 1) & 1023], vertex_xy[vertex_first]); else - render_triangle(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]); + render_triangle_culling(limits_rendertarget, renderspans, 4 + 4 * 2, vertex_xy[(vertex_first - 2) & 1023], vertex_xy[vertex_first], vertex_xy[(vertex_first - 1) & 1023]); vertex_first = (vertex_first + 1) & 1023; vertex_count = vertex_count + 1; wait(); @@ -3029,6 +3076,15 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN } if ((maddress == 0x1d6c) || (maddress == 0x1d70) || (maddress == 0x1a4)) countlen--; + if (maddress == 0x0308) { + backface_culling_enabled = data != 0 ? true : false; + } + if (maddress == 0x03a0) { + backface_culling_winding = (NV2A_GL_FRONT_FACE)data; + } + if (maddress == 0x039c) { + backface_culling_culled = (NV2A_GL_CULL_FACE)data; + } if (maddress == 0x019c) { geforce_read_dma_object(data, dma_offset[0], dma_size[0]); } diff --git a/src/mame/video/galpanic.cpp b/src/mame/video/galpanic.cpp index 487a22aeefb..cf33cb88bdd 100644 --- a/src/mame/video/galpanic.cpp +++ b/src/mame/video/galpanic.cpp @@ -5,52 +5,45 @@ #include "includes/galpanic.h" -VIDEO_START_MEMBER(galpanic_state,galpanic) +void galpanic_state::video_start() { m_screen->register_screen_bitmap(m_bitmap); + + save_item(NAME(m_bitmap)); } PALETTE_INIT_MEMBER(galpanic_state,galpanic) { - int i; - /* first 1024 colors are dynamic */ /* initialize 555 RGB lookup */ - for (i = 0;i < 32768;i++) + for (int i = 0;i < 32768;i++) palette.set_pen_color(i+1024,pal5bit(i >> 5),pal5bit(i >> 10),pal5bit(i >> 0)); } -WRITE16_MEMBER(galpanic_state::galpanic_bgvideoram_w) +WRITE16_MEMBER(galpanic_state::bgvideoram_w) { - int sx,sy; - - data = COMBINE_DATA(&m_bgvideoram[offset]); - sy = offset / 256; - sx = offset % 256; + int sy = offset / 256; + int sx = offset % 256; m_bitmap.pix16(sy, sx) = 1024 + (data >> 1); } void galpanic_state::draw_fgbitmap(bitmap_ind16 &bitmap, const rectangle &cliprect) { - int offs; - - for (offs = 0;offs < m_fgvideoram.bytes()/2;offs++) + for (int offs = 0;offs < m_fgvideoram.bytes()/2;offs++) { - int sx,sy,color; - - sx = offs % 256; - sy = offs / 256; - color = m_fgvideoram[offs]; + int sx = offs % 256; + int sy = offs / 256; + int color = m_fgvideoram[offs]; if (color) bitmap.pix16(sy, sx) = color; } } -UINT32 galpanic_state::screen_update_galpanic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 galpanic_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* copy the temporary bitmap to the screen */ copybitmap(bitmap,m_bitmap,0,0,0,0,cliprect); diff --git a/src/mame/video/glass.cpp b/src/mame/video/glass.cpp index a661ce578a2..c301a1527f1 100644 --- a/src/mame/video/glass.cpp +++ b/src/mame/video/glass.cpp @@ -33,7 +33,7 @@ 1 | xxxxxxxx -------- | not used */ -TILE_GET_INFO_MEMBER(glass_state::get_tile_info_glass_screen0) +TILE_GET_INFO_MEMBER(glass_state::get_tile_info_screen0) { int data = m_videoram[tile_index << 1]; int data2 = m_videoram[(tile_index << 1) + 1]; @@ -43,7 +43,7 @@ TILE_GET_INFO_MEMBER(glass_state::get_tile_info_glass_screen0) } -TILE_GET_INFO_MEMBER(glass_state::get_tile_info_glass_screen1) +TILE_GET_INFO_MEMBER(glass_state::get_tile_info_screen1) { int data = m_videoram[(0x1000 / 2) + (tile_index << 1)]; int data2 = m_videoram[(0x1000 / 2) + (tile_index << 1) + 1]; @@ -67,7 +67,7 @@ TILE_GET_INFO_MEMBER(glass_state::get_tile_info_glass_screen1) B2B1B0 selects the picture (there are 8 pictures in each half of the ROM) */ -WRITE16_MEMBER(glass_state::glass_blitter_w) +WRITE16_MEMBER(glass_state::blitter_w) { m_blitter_serial_buffer[m_current_bit] = data & 0x01; m_current_bit++; @@ -112,7 +112,7 @@ WRITE16_MEMBER(glass_state::glass_blitter_w) ***************************************************************************/ -WRITE16_MEMBER(glass_state::glass_vram_w) +WRITE16_MEMBER(glass_state::vram_w) { COMBINE_DATA(&m_videoram[offset]); m_pant[offset >> 11]->mark_tile_dirty(((offset << 1) & 0x0fff) >> 2); @@ -127,8 +127,8 @@ WRITE16_MEMBER(glass_state::glass_vram_w) void glass_state::video_start() { - m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(glass_state::get_tile_info_glass_screen0),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); - m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(glass_state::get_tile_info_glass_screen1),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); + m_pant[0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(glass_state::get_tile_info_screen0),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); + m_pant[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(glass_state::get_tile_info_screen1),this), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); m_screen_bitmap = std::make_unique<bitmap_ind16>(320, 200); save_item(NAME(*m_screen_bitmap)); @@ -191,7 +191,7 @@ void glass_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ****************************************************************************/ -UINT32 glass_state::screen_update_glass(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 glass_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* set scroll registers */ m_pant[0]->set_scrolly(0, m_vregs[0]); diff --git a/src/mame/video/laserbat.cpp b/src/mame/video/laserbat.cpp index fca20043f37..2431304816f 100644 --- a/src/mame/video/laserbat.cpp +++ b/src/mame/video/laserbat.cpp @@ -82,58 +82,6 @@ #include "includes/laserbat.h" -PALETTE_INIT_MEMBER(laserbat_state_base, laserbat) -{ - /* - Uses GRBGRBGR pixel format. The two topmost bist are the LSBs - for red and green. LSB for blue is always effectively 1. The - middle group is the MSB. Yet another crazy thing they did. - - Each colour channel has an emitter follower buffer amlpifier - biased with a 1k resistor to +5V and a 3k3 resistor to ground. - Output is adjusted by connecting additional resistors across the - leg to ground using an open collector buffer - 270R, 820R and - 1k0 for unset MSB to LSB, respectively (blue has no LSB so it - has no 1k0 resistor). - - Assuming 0.7V drop across the emitter follower and no drop - across the open collector buffer, these are the approximate - output voltages: - - 0.0000, 0.1031, 0.1324, 0.2987 , 0.7194, 1.2821, 1.4711, 3.1372 - - The game never sets the colour to any value above 4, effectively - treating it as 5-level red and green, and 3-level blue, for a - total of 75 usable colours. - - From the fact that there's no DC offset on red and green, and - the highest value used is just over 0.7V, I'm guessing the game - expects to drive a standard 0.7V RGB monitor, and higher colour - values would simply saturate the input. To make it not look - like the inside of a coal mine, I've applied gamma decoding at - 2.2 - - However there's that nasty DC offset on the blue caused by the - fact that it has no LSB, but it's eliminated at the AC-coupling - of the input and output of the buffer amplifier on the monitor - interface board. I'm treating it as though it has the same gain - as the other channels. After gamma adjustment, medium red and - medium blue as used by the game have almost the same intensity. - */ - - int const weights[] = { 0, 107, 120, 173, 255, 255, 255, 255 }; - int const blue_weights[] = { 0, 0, 60, 121, 241, 255, 255, 255, 255 }; - for (int entry = 0; palette.entries() > entry; entry++) - { - UINT8 const bits(entry & 0xff); - UINT8 const r(((bits & 0x01) << 1) | ((bits & 0x08) >> 1) | ((bits & 0x40) >> 6)); - UINT8 const g(((bits & 0x02) >> 0) | ((bits & 0x10) >> 2) | ((bits & 0x80) >> 7)); - UINT8 const b(((bits & 0x04) >> 1) | ((bits & 0x20) >> 3) | 0x01); - palette.set_pen_color(entry, rgb_t(weights[r], weights[g], blue_weights[b])); - } -} - - WRITE8_MEMBER(laserbat_state_base::videoram_w) { if (!m_mpx_bkeff) @@ -375,3 +323,106 @@ TIMER_CALLBACK_MEMBER(laserbat_state_base::video_line) } } } + + +PALETTE_INIT_MEMBER(laserbat_state, laserbat) +{ + /* + Uses GRBGRBGR pixel format. The two topmost bist are the LSBs + for red and green. LSB for blue is always effectively 1. The + middle group is the MSB. Yet another crazy thing they did. + + Each colour channel has an emitter follower buffer amlpifier + biased with a 1k resistor to +5V and a 3k3 resistor to ground. + Output is adjusted by connecting additional resistors across the + leg to ground using an open collector buffer - 270R, 820R and + 1k0 for unset MSB to LSB, respectively (blue has no LSB so it + has no 1k0 resistor). + + Assuming 0.7V drop across the emitter follower and no drop + across the open collector buffer, these are the approximate + output voltages: + + 0.0000, 0.1031, 0.1324, 0.2987, 0.7194, 1.2821, 1.4711, 3.1372 + + The game never sets the colour to any value above 4, effectively + treating it as 5-level red and green, and 3-level blue, for a + total of 75 usable colours. + + From the fact that there's no DC offset on red and green, and + the highest value used is just over 0.7V, I'm guessing the game + expects to drive a standard 0.7V RGB monitor, and higher colour + values would simply saturate the input. To make it not look + like the inside of a coal mine, I've applied gamma decoding at + 2.2 + + However there's that nasty DC offset on the blue caused by the + fact that it has no LSB, but it's eliminated at the AC-coupling + of the input and output of the buffer amplifier on the monitor + interface board. I'm treating it as though it has the same gain + as the other channels. After gamma adjustment, medium red and + medium blue as used by the game have almost the same intensity. + */ + + int const weights[] = { 0, 107, 120, 173, 255, 255, 255, 255 }; + int const blue_weights[] = { 0, 0, 60, 121, 241, 255, 255, 255 }; + for (int entry = 0; palette.entries() > entry; entry++) + { + UINT8 const bits(entry & 0xff); + UINT8 const r(((bits & 0x01) << 1) | ((bits & 0x08) >> 1) | ((bits & 0x40) >> 6)); + UINT8 const g(((bits & 0x02) >> 0) | ((bits & 0x10) >> 2) | ((bits & 0x80) >> 7)); + UINT8 const b(((bits & 0x04) >> 1) | ((bits & 0x20) >> 3) | 0x01); + palette.set_pen_color(entry, rgb_t(weights[r], weights[g], blue_weights[b])); + } +} + + +PALETTE_INIT_MEMBER(catnmous_state, catnmous) +{ + /* + Uses GRBGRBGR pixel format. The two topmost bist are the LSBs + for red and green. The middle group is the MSB. Yet another + crazy thing they did. + + Each colour channel has an emitter follower buffer amlpifier + biased with a 1k resistor to +5V and a 3k3 resistor to ground. + Output is adjusted by connecting additional resistors across the + leg to ground using an open collector buffer. Red and green use + 560R, 820R and 1k0 for unset MSB to LSB, respectively. Blue + uses 47R and 820R on the PCB we have a photo of, although the + 47R resistor looks like it could be a bad repair (opposite + orientation and burn marks on PCB). + + Assuming 0.7V drop across the emitter follower and no drop + across the open collector buffer, these are the approximate + output voltages for red and green: + + 0.2419, 0.4606, 0.5229, 0.7194, 0.9188, 1.2821, 1.4711, 3.1372 + + The game uses all colour values except 4. The DC offset will be + eliminated by the AC coupling on the monitor interface board. + The differences steps aren't very linear, they vary from 0.06V + to 0.36V with no particular order. The input would be expected + to saturate somewhere inside the big jump to the highest level. + + Let's assume the 47R resistor is a bad repair and it's supposed + to be 470R. That gives us these output voltages for blue: + + 0.3752, 0.7574, 1.2821, 3.1372 + + To make life easier, I'll assume the monitor is expected to have + half the gain of a standard monitor and no gamma decoding is + necessary. + */ + + int const weights[] = { 0, 40, 51, 87, 123, 189, 224, 255 }; + int const blue_weights[] = { 0, 70, 165, 255 }; + for (int entry = 0; palette.entries() > entry; entry++) + { + UINT8 const bits(entry & 0xff); + UINT8 const r(((bits & 0x01) << 1) | ((bits & 0x08) >> 1) | ((bits & 0x40) >> 6)); + UINT8 const g(((bits & 0x02) >> 0) | ((bits & 0x10) >> 2) | ((bits & 0x80) >> 7)); + UINT8 const b(((bits & 0x04) >> 2) | ((bits & 0x20) >> 4)); + palette.set_pen_color(entry, rgb_t(weights[r], weights[g], blue_weights[b])); + } +} diff --git a/src/mame/video/megasys1.cpp b/src/mame/video/megasys1.cpp index 1770c490218..7e04cec112d 100644 --- a/src/mame/video/megasys1.cpp +++ b/src/mame/video/megasys1.cpp @@ -844,14 +844,6 @@ struct priority */ -static const struct priority priorities[] = -{ - { "chimerab", - { 0x14032,0x04132,0x14032,0x04132,0xfffff,0xfffff,0xfffff,0xfffff, - 0xfffff,0xfffff,0x01324,0xfffff,0xfffff,0xfffff,0xfffff,0xfffff } - }, - { nullptr } // end of list: use the prom's data -}; /* @@ -901,27 +893,8 @@ void megasys1_state::megasys1_priority_create() { const UINT8 *color_prom = memregion("proms")->base(); int pri_code, offset, i, order; - - /* First check if we have an hand-crafted priority scheme - available (this should happen only if no good dump - of the prom is known) */ - - i = 0; - while ( priorities[i].driver && - strcmp(priorities[i].driver, machine().system().name) != 0 && - strcmp(priorities[i].driver, machine().system().parent) != 0) - i++; - - if (priorities[i].driver) - { - memcpy (m_layers_order, priorities[i].priorities, 16 * sizeof(int)); - - logerror("WARNING: using an hand-crafted priorities scheme\n"); - - return; - } - - /* Otherwise, perform the conversion from the prom itself */ + + /* convert PROM to something we can use */ for (pri_code = 0; pri_code < 0x10 ; pri_code++) // 16 priority codes { diff --git a/src/mame/video/seibuspi.cpp b/src/mame/video/seibuspi.cpp index cb267167789..42e683c70b2 100644 --- a/src/mame/video/seibuspi.cpp +++ b/src/mame/video/seibuspi.cpp @@ -111,7 +111,7 @@ WRITE32_MEMBER(seibuspi_state::tilemap_dma_start_w) int dma_length_real = (m_video_dma_length + 1) * 2; // ideally we should be using this, let's check if we have to: if (m_video_dma_length != 0 && dma_length_user != dma_length_real) popmessage("Tile LEN %X %X, contact MAMEdev", dma_length_user, dma_length_real); // shouldn't happen - else if ((m_video_dma_address & 3) != 0 || (m_video_dma_length & 3) != 3 || (m_video_dma_address + dma_length_user) > 0x40000) + else if (!DWORD_ALIGNED(m_video_dma_address) || (m_video_dma_length & 3) != 3 || (m_video_dma_address + dma_length_user) > 0x40000) popmessage("Tile DMA %X %X, contact MAMEdev", m_video_dma_address, m_video_dma_length); // shouldn't happen if (m_video_dma_address < 0x800) logerror("tilemap_dma_start_w in I/O area: %X\n", m_video_dma_address); @@ -198,7 +198,7 @@ WRITE32_MEMBER(seibuspi_state::palette_dma_start_w) int dma_length = (m_video_dma_length + 1) * 2; // safety check - if ((m_video_dma_address & 3) != 0 || (m_video_dma_length & 3) != 3 || dma_length > m_palette_ram_size || (m_video_dma_address + dma_length) > 0x40000) + if (!DWORD_ALIGNED(m_video_dma_address) || (m_video_dma_length & 3) != 3 || dma_length > m_palette_ram_size || (m_video_dma_address + dma_length) > 0x40000) popmessage("Pal DMA %X %X, contact MAMEdev", m_video_dma_address, m_video_dma_length); // shouldn't happen if (m_video_dma_address < 0x800) logerror("palette_dma_start_w in I/O area: %X\n", m_video_dma_address); @@ -219,7 +219,7 @@ WRITE32_MEMBER(seibuspi_state::palette_dma_start_w) WRITE16_MEMBER(seibuspi_state::sprite_dma_start_w) { // safety check - if ((m_video_dma_address & 3) != 0 || (m_video_dma_address + m_sprite_ram_size) > 0x40000) + if (!DWORD_ALIGNED(m_video_dma_address) || (m_video_dma_address + m_sprite_ram_size) > 0x40000) popmessage("Sprite DMA %X, contact MAMEdev", m_video_dma_address); // shouldn't happen if (m_video_dma_address < 0x800) logerror("sprite_dma_start_w in I/O area: %X\n", m_video_dma_address); diff --git a/src/mame/video/snk.cpp b/src/mame/video/snk.cpp index 19bcf967fda..3749233adcb 100644 --- a/src/mame/video/snk.cpp +++ b/src/mame/video/snk.cpp @@ -930,6 +930,19 @@ UINT32 snk_state::screen_update_tnk3(screen_device &screen, bitmap_ind16 &bitmap return 0; } +UINT32 snk_state::screen_update_fitegolf2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_bg_tilemap->set_scrollx(0, m_bg_scrollx); + m_bg_tilemap->set_scrolly(0, m_bg_scrolly); + + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + tnk3_draw_sprites(bitmap, cliprect, m_sp16_scrollx+1, m_sp16_scrolly); // needs an extra offset?? neither this or fitegolf actually write to sprite offset registers tho? + m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0); + + return 0; +} + + UINT32 snk_state::screen_update_ikari(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { diff --git a/src/mame/video/timeplt.cpp b/src/mame/video/timeplt.cpp index afd493a8b92..b418ab7c4fc 100644 --- a/src/mame/video/timeplt.cpp +++ b/src/mame/video/timeplt.cpp @@ -139,6 +139,9 @@ VIDEO_START_MEMBER(timeplt_state,psurge) VIDEO_START_MEMBER(timeplt_state,chkun) { m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(timeplt_state::get_chkun_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_video_enable = 0; + + save_item(NAME(m_video_enable)); } diff --git a/src/mame/video/x68k.cpp b/src/mame/video/x68k.cpp index 13f6288b642..7a11c89175b 100644 --- a/src/mame/video/x68k.cpp +++ b/src/mame/video/x68k.cpp @@ -867,7 +867,7 @@ bool x68k_state::x68k_draw_gfx_scanline( bitmap_ind16 &bitmap, rectangle cliprec else bitmap.pix16(scanline, pixel) = (pal[colour] & 0xfffe) + blend; } - if(((m_video.reg[2] & 0x1800) == 0x1000) && (colour & 1)) + else if(((m_video.reg[2] & 0x1800) == 0x1000) && (colour & 1)) m_special.pix16(scanline, pixel) = colour; else bitmap.pix16(scanline, pixel) = colour; diff --git a/src/osd/modules/font/font_sdl.cpp b/src/osd/modules/font/font_sdl.cpp index 1474bd61ec4..ad5d1699e3b 100644 --- a/src/osd/modules/font/font_sdl.cpp +++ b/src/osd/modules/font/font_sdl.cpp @@ -10,11 +10,7 @@ #if defined(SDLMAME_UNIX) && (!defined(SDLMAME_MACOSX)) && (!defined(SDLMAME_SOLARIS)) && (!defined(SDLMAME_HAIKU)) && (!defined(SDLMAME_EMSCRIPTEN)) -#if (SDLMAME_SDL2) #include <SDL2/SDL_ttf.h> -#else -#include <SDL/SDL_ttf.h> -#endif #ifndef SDLMAME_HAIKU #include <fontconfig/fontconfig.h> #endif diff --git a/src/osd/modules/opengl/SDL1211_opengl.h b/src/osd/modules/opengl/SDL1211_opengl.h deleted file mode 100644 index 2a5db6f3199..00000000000 --- a/src/osd/modules/opengl/SDL1211_opengl.h +++ /dev/null @@ -1,6553 +0,0 @@ -// license:LGPL-2.1+ -// copyright-holders:Sam Lantinga -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2006 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ - -/* This is a simple file to encapsulate the OpenGL API headers */ - -//#include <SDL/SDL_config.h> - -#ifdef __WIN32__ -#define WIN32_LEAN_AND_MEAN -#ifndef NOMINMAX -#define NOMINMAX /* Don't defined min() and max() */ -#endif -#include <windows.h> -#endif -#ifndef NO_SDL_GLEXT -#define __glext_h_ /* Don't let gl.h include glext.h */ -#endif -#if defined(__MACOSX__) -#include <OpenGL/gl.h> /* Header File For The OpenGL Library */ -#include <OpenGL/glu.h> /* Header File For The GLU Library */ -#elif defined(__MACOS__) -#include <gl.h> /* Header File For The OpenGL Library */ -#include <glu.h> /* Header File For The GLU Library */ -#else -#include <GL/gl.h> /* Header File For The OpenGL Library */ -#include <GL/glu.h> /* Header File For The GLU Library */ -#endif -#ifndef NO_SDL_GLEXT -#undef __glext_h_ -#endif - -/* This file taken from "GLext.h" from the Jeff Molofee OpenGL tutorials. - It is included here because glext.h is not available on some systems. - If you don't want this version included, simply define "NO_SDL_GLEXT" - */ -#ifndef NO_SDL_GLEXT -#if !defined(__glext_h_) && !defined(GL_GLEXT_LEGACY) -#define __glext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** -** http://oss.sgi.com/projects/FreeB -** -** Note that, as provided in the License, the Software is distributed on an -** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS -** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND -** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A -** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -** -** Original Code. The Original Code is: OpenGL Sample Implementation, -** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, -** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc. -** Copyright in any portions created by third parties is as indicated -** elsewhere herein. All Rights Reserved. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -*/ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include <windows.h> -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - -/*************************************************************/ - -/* Header file version number, required by OpenGL ABI for Linux */ -/* glext.h last updated 2005/06/20 */ -/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */ -#define GL_GLEXT_VERSION 29 - -#ifndef GL_VERSION_1_2 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_RESCALE_NORMAL 0x803A -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#endif - -#ifndef GL_ARB_imaging -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_FUNC_ADD 0x8006 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_BLEND_EQUATION 0x8009 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -#endif - -#ifndef GL_VERSION_1_3 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_MAX_TEXTURE_UNITS 0x84E2 -#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_MULTISAMPLE_BIT 0x20000000 -#define GL_NORMAL_MAP 0x8511 -#define GL_REFLECTION_MAP 0x8512 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_COMPRESSED_ALPHA 0x84E9 -#define GL_COMPRESSED_LUMINANCE 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB -#define GL_COMPRESSED_INTENSITY 0x84EC -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_CLAMP_TO_BORDER 0x812D -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_SOURCE0_RGB 0x8580 -#define GL_SOURCE1_RGB 0x8581 -#define GL_SOURCE2_RGB 0x8582 -#define GL_SOURCE0_ALPHA 0x8588 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE2_ALPHA 0x858A -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_SUBTRACT 0x84E7 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF -#endif - -#ifndef GL_VERSION_1_4 -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_POINT_SIZE_MIN 0x8126 -#define GL_POINT_SIZE_MAX 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION 0x8129 -#define GL_GENERATE_MIPMAP 0x8191 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_FOG_COORDINATE_SOURCE 0x8450 -#define GL_FOG_COORDINATE 0x8451 -#define GL_FRAGMENT_DEPTH 0x8452 -#define GL_CURRENT_FOG_COORDINATE 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 -#define GL_FOG_COORDINATE_ARRAY 0x8457 -#define GL_COLOR_SUM 0x8458 -#define GL_CURRENT_SECONDARY_COLOR 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D -#define GL_SECONDARY_COLOR_ARRAY 0x845E -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_FILTER_CONTROL 0x8500 -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_DEPTH_TEXTURE_MODE 0x884B -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_COMPARE_R_TO_TEXTURE 0x884E -#endif - -#ifndef GL_VERSION_1_5 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_SAMPLES_PASSED 0x8914 -#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE -#define GL_FOG_COORD GL_FOG_COORDINATE -#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE -#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE -#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE -#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER -#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY -#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING -#define GL_SRC0_RGB GL_SOURCE0_RGB -#define GL_SRC1_RGB GL_SOURCE1_RGB -#define GL_SRC2_RGB GL_SOURCE2_RGB -#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA -#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA -#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA -#endif - -#ifndef GL_VERSION_2_0 -#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_POINT_SPRITE 0x8861 -#define GL_COORD_REPLACE 0x8862 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_COORDS 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#endif - -#ifndef GL_ARB_multitexture -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 -#endif - -#ifndef GL_ARB_transpose_matrix -#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 -#endif - -#ifndef GL_ARB_multisample -#define GL_MULTISAMPLE_ARB 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F -#define GL_SAMPLE_COVERAGE_ARB 0x80A0 -#define GL_SAMPLE_BUFFERS_ARB 0x80A8 -#define GL_SAMPLES_ARB 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB -#define GL_MULTISAMPLE_BIT_ARB 0x20000000 -#endif - -#ifndef GL_ARB_texture_env_add -#endif - -#ifndef GL_ARB_texture_cube_map -#define GL_NORMAL_MAP_ARB 0x8511 -#define GL_REFLECTION_MAP_ARB 0x8512 -#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C -#endif - -#ifndef GL_ARB_texture_compression -#define GL_COMPRESSED_ALPHA_ARB 0x84E9 -#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB -#define GL_COMPRESSED_INTENSITY_ARB 0x84EC -#define GL_COMPRESSED_RGB_ARB 0x84ED -#define GL_COMPRESSED_RGBA_ARB 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 -#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 -#endif - -#ifndef GL_ARB_texture_border_clamp -#define GL_CLAMP_TO_BORDER_ARB 0x812D -#endif - -#ifndef GL_ARB_point_parameters -#define GL_POINT_SIZE_MIN_ARB 0x8126 -#define GL_POINT_SIZE_MAX_ARB 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 -#endif - -#ifndef GL_ARB_vertex_blend -#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 -#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 -#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 -#define GL_VERTEX_BLEND_ARB 0x86A7 -#define GL_CURRENT_WEIGHT_ARB 0x86A8 -#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA -#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB -#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC -#define GL_WEIGHT_ARRAY_ARB 0x86AD -#define GL_MODELVIEW0_ARB 0x1700 -#define GL_MODELVIEW1_ARB 0x850A -#define GL_MODELVIEW2_ARB 0x8722 -#define GL_MODELVIEW3_ARB 0x8723 -#define GL_MODELVIEW4_ARB 0x8724 -#define GL_MODELVIEW5_ARB 0x8725 -#define GL_MODELVIEW6_ARB 0x8726 -#define GL_MODELVIEW7_ARB 0x8727 -#define GL_MODELVIEW8_ARB 0x8728 -#define GL_MODELVIEW9_ARB 0x8729 -#define GL_MODELVIEW10_ARB 0x872A -#define GL_MODELVIEW11_ARB 0x872B -#define GL_MODELVIEW12_ARB 0x872C -#define GL_MODELVIEW13_ARB 0x872D -#define GL_MODELVIEW14_ARB 0x872E -#define GL_MODELVIEW15_ARB 0x872F -#define GL_MODELVIEW16_ARB 0x8730 -#define GL_MODELVIEW17_ARB 0x8731 -#define GL_MODELVIEW18_ARB 0x8732 -#define GL_MODELVIEW19_ARB 0x8733 -#define GL_MODELVIEW20_ARB 0x8734 -#define GL_MODELVIEW21_ARB 0x8735 -#define GL_MODELVIEW22_ARB 0x8736 -#define GL_MODELVIEW23_ARB 0x8737 -#define GL_MODELVIEW24_ARB 0x8738 -#define GL_MODELVIEW25_ARB 0x8739 -#define GL_MODELVIEW26_ARB 0x873A -#define GL_MODELVIEW27_ARB 0x873B -#define GL_MODELVIEW28_ARB 0x873C -#define GL_MODELVIEW29_ARB 0x873D -#define GL_MODELVIEW30_ARB 0x873E -#define GL_MODELVIEW31_ARB 0x873F -#endif - -#ifndef GL_ARB_matrix_palette -#define GL_MATRIX_PALETTE_ARB 0x8840 -#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 -#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 -#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 -#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 -#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 -#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 -#endif - -#ifndef GL_ARB_texture_env_combine -#define GL_COMBINE_ARB 0x8570 -#define GL_COMBINE_RGB_ARB 0x8571 -#define GL_COMBINE_ALPHA_ARB 0x8572 -#define GL_SOURCE0_RGB_ARB 0x8580 -#define GL_SOURCE1_RGB_ARB 0x8581 -#define GL_SOURCE2_RGB_ARB 0x8582 -#define GL_SOURCE0_ALPHA_ARB 0x8588 -#define GL_SOURCE1_ALPHA_ARB 0x8589 -#define GL_SOURCE2_ALPHA_ARB 0x858A -#define GL_OPERAND0_RGB_ARB 0x8590 -#define GL_OPERAND1_RGB_ARB 0x8591 -#define GL_OPERAND2_RGB_ARB 0x8592 -#define GL_OPERAND0_ALPHA_ARB 0x8598 -#define GL_OPERAND1_ALPHA_ARB 0x8599 -#define GL_OPERAND2_ALPHA_ARB 0x859A -#define GL_RGB_SCALE_ARB 0x8573 -#define GL_ADD_SIGNED_ARB 0x8574 -#define GL_INTERPOLATE_ARB 0x8575 -#define GL_SUBTRACT_ARB 0x84E7 -#define GL_CONSTANT_ARB 0x8576 -#define GL_PRIMARY_COLOR_ARB 0x8577 -#define GL_PREVIOUS_ARB 0x8578 -#endif - -#ifndef GL_ARB_texture_env_crossbar -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_DOT3_RGB_ARB 0x86AE -#define GL_DOT3_RGBA_ARB 0x86AF -#endif - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_ARB 0x8370 -#endif - -#ifndef GL_ARB_depth_texture -#define GL_DEPTH_COMPONENT16_ARB 0x81A5 -#define GL_DEPTH_COMPONENT24_ARB 0x81A6 -#define GL_DEPTH_COMPONENT32_ARB 0x81A7 -#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A -#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B -#endif - -#ifndef GL_ARB_shadow -#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E -#endif - -#ifndef GL_ARB_shadow_ambient -#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF -#endif - -#ifndef GL_ARB_window_pos -#endif - -#ifndef GL_ARB_vertex_program -#define GL_COLOR_SUM_ARB 0x8458 -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 -#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 -#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 -#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF -#endif - -#ifndef GL_ARB_fragment_program -#define GL_FRAGMENT_PROGRAM_ARB 0x8804 -#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 -#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 -#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 -#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 -#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 -#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A -#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B -#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D -#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E -#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F -#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 -#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 -#endif - -#ifndef GL_ARB_vertex_buffer_object -#define GL_BUFFER_SIZE_ARB 0x8764 -#define GL_BUFFER_USAGE_ARB 0x8765 -#define GL_ARRAY_BUFFER_ARB 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 -#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F -#define GL_READ_ONLY_ARB 0x88B8 -#define GL_WRITE_ONLY_ARB 0x88B9 -#define GL_READ_WRITE_ARB 0x88BA -#define GL_BUFFER_ACCESS_ARB 0x88BB -#define GL_BUFFER_MAPPED_ARB 0x88BC -#define GL_BUFFER_MAP_POINTER_ARB 0x88BD -#define GL_STREAM_DRAW_ARB 0x88E0 -#define GL_STREAM_READ_ARB 0x88E1 -#define GL_STREAM_COPY_ARB 0x88E2 -#define GL_STATIC_DRAW_ARB 0x88E4 -#define GL_STATIC_READ_ARB 0x88E5 -#define GL_STATIC_COPY_ARB 0x88E6 -#define GL_DYNAMIC_DRAW_ARB 0x88E8 -#define GL_DYNAMIC_READ_ARB 0x88E9 -#define GL_DYNAMIC_COPY_ARB 0x88EA -#endif - -#ifndef GL_ARB_occlusion_query -#define GL_QUERY_COUNTER_BITS_ARB 0x8864 -#define GL_CURRENT_QUERY_ARB 0x8865 -#define GL_QUERY_RESULT_ARB 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 -#define GL_SAMPLES_PASSED_ARB 0x8914 -#endif - -#ifndef GL_ARB_shader_objects -#define GL_PROGRAM_OBJECT_ARB 0x8B40 -#define GL_SHADER_OBJECT_ARB 0x8B48 -#define GL_OBJECT_TYPE_ARB 0x8B4E -#define GL_OBJECT_SUBTYPE_ARB 0x8B4F -#define GL_FLOAT_VEC2_ARB 0x8B50 -#define GL_FLOAT_VEC3_ARB 0x8B51 -#define GL_FLOAT_VEC4_ARB 0x8B52 -#define GL_INT_VEC2_ARB 0x8B53 -#define GL_INT_VEC3_ARB 0x8B54 -#define GL_INT_VEC4_ARB 0x8B55 -#define GL_BOOL_ARB 0x8B56 -#define GL_BOOL_VEC2_ARB 0x8B57 -#define GL_BOOL_VEC3_ARB 0x8B58 -#define GL_BOOL_VEC4_ARB 0x8B59 -#define GL_FLOAT_MAT2_ARB 0x8B5A -#define GL_FLOAT_MAT3_ARB 0x8B5B -#define GL_FLOAT_MAT4_ARB 0x8B5C -#define GL_SAMPLER_1D_ARB 0x8B5D -#define GL_SAMPLER_2D_ARB 0x8B5E -#define GL_SAMPLER_3D_ARB 0x8B5F -#define GL_SAMPLER_CUBE_ARB 0x8B60 -#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 -#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 -#define GL_SAMPLER_2D_RECT_ARB 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 -#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 -#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 -#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 -#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 -#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 -#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 -#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 -#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 -#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 -#endif - -#ifndef GL_ARB_vertex_shader -#define GL_VERTEX_SHADER_ARB 0x8B31 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A -#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D -#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 -#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A -#endif - -#ifndef GL_ARB_fragment_shader -#define GL_FRAGMENT_SHADER_ARB 0x8B30 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B -#endif - -#ifndef GL_ARB_shading_language_100 -#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C -#endif - -#ifndef GL_ARB_texture_non_power_of_two -#endif - -#ifndef GL_ARB_point_sprite -#define GL_POINT_SPRITE_ARB 0x8861 -#define GL_COORD_REPLACE_ARB 0x8862 -#endif - -#ifndef GL_ARB_fragment_program_shadow -#endif - -#ifndef GL_ARB_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 -#define GL_DRAW_BUFFER0_ARB 0x8825 -#define GL_DRAW_BUFFER1_ARB 0x8826 -#define GL_DRAW_BUFFER2_ARB 0x8827 -#define GL_DRAW_BUFFER3_ARB 0x8828 -#define GL_DRAW_BUFFER4_ARB 0x8829 -#define GL_DRAW_BUFFER5_ARB 0x882A -#define GL_DRAW_BUFFER6_ARB 0x882B -#define GL_DRAW_BUFFER7_ARB 0x882C -#define GL_DRAW_BUFFER8_ARB 0x882D -#define GL_DRAW_BUFFER9_ARB 0x882E -#define GL_DRAW_BUFFER10_ARB 0x882F -#define GL_DRAW_BUFFER11_ARB 0x8830 -#define GL_DRAW_BUFFER12_ARB 0x8831 -#define GL_DRAW_BUFFER13_ARB 0x8832 -#define GL_DRAW_BUFFER14_ARB 0x8833 -#define GL_DRAW_BUFFER15_ARB 0x8834 -#endif - -#ifndef GL_ARB_texture_rectangle -#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 -#endif - -#ifndef GL_ARB_color_buffer_float -#define GL_RGBA_FLOAT_MODE_ARB 0x8820 -#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A -#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B -#define GL_CLAMP_READ_COLOR_ARB 0x891C -#define GL_FIXED_ONLY_ARB 0x891D -#endif - -#ifndef GL_ARB_half_float_pixel -#define GL_HALF_FLOAT_ARB 0x140B -#endif - -#ifndef GL_ARB_texture_float -#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 -#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 -#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 -#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 -#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 -#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGB32F_ARB 0x8815 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_RGBA16F_ARB 0x881A -#define GL_RGB16F_ARB 0x881B -#define GL_ALPHA16F_ARB 0x881C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F -#endif - -#ifndef GL_ARB_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF -#endif - -#ifndef GL_EXT_abgr -#define GL_ABGR_EXT 0x8000 -#endif - -#ifndef GL_EXT_blend_color -#define GL_CONSTANT_COLOR_EXT 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 -#define GL_CONSTANT_ALPHA_EXT 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 -#define GL_BLEND_COLOR_EXT 0x8005 -#endif - -#ifndef GL_EXT_polygon_offset -#define GL_POLYGON_OFFSET_EXT 0x8037 -#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 -#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 -#endif - -#ifndef GL_EXT_texture -#define GL_ALPHA4_EXT 0x803B -#define GL_ALPHA8_EXT 0x803C -#define GL_ALPHA12_EXT 0x803D -#define GL_ALPHA16_EXT 0x803E -#define GL_LUMINANCE4_EXT 0x803F -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE12_EXT 0x8041 -#define GL_LUMINANCE16_EXT 0x8042 -#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 -#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 -#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 -#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 -#define GL_INTENSITY_EXT 0x8049 -#define GL_INTENSITY4_EXT 0x804A -#define GL_INTENSITY8_EXT 0x804B -#define GL_INTENSITY12_EXT 0x804C -#define GL_INTENSITY16_EXT 0x804D -#define GL_RGB2_EXT 0x804E -#define GL_RGB4_EXT 0x804F -#define GL_RGB5_EXT 0x8050 -#define GL_RGB8_EXT 0x8051 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB12_EXT 0x8053 -#define GL_RGB16_EXT 0x8054 -#define GL_RGBA2_EXT 0x8055 -#define GL_RGBA4_EXT 0x8056 -#define GL_RGB5_A1_EXT 0x8057 -#define GL_RGBA8_EXT 0x8058 -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGBA12_EXT 0x805A -#define GL_RGBA16_EXT 0x805B -#define GL_TEXTURE_RED_SIZE_EXT 0x805C -#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D -#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E -#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 -#define GL_REPLACE_EXT 0x8062 -#define GL_PROXY_TEXTURE_1D_EXT 0x8063 -#define GL_PROXY_TEXTURE_2D_EXT 0x8064 -#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 -#endif - -#ifndef GL_EXT_texture3D -#define GL_PACK_SKIP_IMAGES_EXT 0x806B -#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C -#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D -#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E -#define GL_TEXTURE_3D_EXT 0x806F -#define GL_PROXY_TEXTURE_3D_EXT 0x8070 -#define GL_TEXTURE_DEPTH_EXT 0x8071 -#define GL_TEXTURE_WRAP_R_EXT 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 -#endif - -#ifndef GL_SGIS_texture_filter4 -#define GL_FILTER4_SGIS 0x8146 -#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 -#endif - -#ifndef GL_EXT_subtexture -#endif - -#ifndef GL_EXT_copy_texture -#endif - -#ifndef GL_EXT_histogram -#define GL_HISTOGRAM_EXT 0x8024 -#define GL_PROXY_HISTOGRAM_EXT 0x8025 -#define GL_HISTOGRAM_WIDTH_EXT 0x8026 -#define GL_HISTOGRAM_FORMAT_EXT 0x8027 -#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C -#define GL_HISTOGRAM_SINK_EXT 0x802D -#define GL_MINMAX_EXT 0x802E -#define GL_MINMAX_FORMAT_EXT 0x802F -#define GL_MINMAX_SINK_EXT 0x8030 -#define GL_TABLE_TOO_LARGE_EXT 0x8031 -#endif - -#ifndef GL_EXT_convolution -#define GL_CONVOLUTION_1D_EXT 0x8010 -#define GL_CONVOLUTION_2D_EXT 0x8011 -#define GL_SEPARABLE_2D_EXT 0x8012 -#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 -#define GL_REDUCE_EXT 0x8016 -#define GL_CONVOLUTION_FORMAT_EXT 0x8017 -#define GL_CONVOLUTION_WIDTH_EXT 0x8018 -#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 -#endif - -#ifndef GL_SGI_color_matrix -#define GL_COLOR_MATRIX_SGI 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB -#endif - -#ifndef GL_SGI_color_table -#define GL_COLOR_TABLE_SGI 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 -#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 -#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 -#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 -#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 -#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF -#endif - -#ifndef GL_SGIS_pixel_texture -#define GL_PIXEL_TEXTURE_SGIS 0x8353 -#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 -#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 -#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 -#endif - -#ifndef GL_SGIX_pixel_texture -#define GL_PIXEL_TEX_GEN_SGIX 0x8139 -#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B -#endif - -#ifndef GL_SGIS_texture4D -#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 -#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 -#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 -#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 -#define GL_TEXTURE_4D_SGIS 0x8134 -#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 -#define GL_TEXTURE_4DSIZE_SGIS 0x8136 -#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 -#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 -#define GL_TEXTURE_4D_BINDING_SGIS 0x814F -#endif - -#ifndef GL_SGI_texture_color_table -#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC -#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD -#endif - -#ifndef GL_EXT_cmyka -#define GL_CMYK_EXT 0x800C -#define GL_CMYKA_EXT 0x800D -#define GL_PACK_CMYK_HINT_EXT 0x800E -#define GL_UNPACK_CMYK_HINT_EXT 0x800F -#endif - -#ifndef GL_EXT_texture_object -#define GL_TEXTURE_PRIORITY_EXT 0x8066 -#define GL_TEXTURE_RESIDENT_EXT 0x8067 -#define GL_TEXTURE_1D_BINDING_EXT 0x8068 -#define GL_TEXTURE_2D_BINDING_EXT 0x8069 -#define GL_TEXTURE_3D_BINDING_EXT 0x806A -#endif - -#ifndef GL_SGIS_detail_texture -#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 -#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 -#define GL_LINEAR_DETAIL_SGIS 0x8097 -#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 -#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 -#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A -#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B -#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C -#endif - -#ifndef GL_SGIS_sharpen_texture -#define GL_LINEAR_SHARPEN_SGIS 0x80AD -#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE -#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF -#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 -#endif - -#ifndef GL_EXT_packed_pixels -#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 -#endif - -#ifndef GL_SGIS_texture_lod -#define GL_TEXTURE_MIN_LOD_SGIS 0x813A -#define GL_TEXTURE_MAX_LOD_SGIS 0x813B -#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C -#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D -#endif - -#ifndef GL_SGIS_multisample -#define GL_MULTISAMPLE_SGIS 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F -#define GL_SAMPLE_MASK_SGIS 0x80A0 -#define GL_1PASS_SGIS 0x80A1 -#define GL_2PASS_0_SGIS 0x80A2 -#define GL_2PASS_1_SGIS 0x80A3 -#define GL_4PASS_0_SGIS 0x80A4 -#define GL_4PASS_1_SGIS 0x80A5 -#define GL_4PASS_2_SGIS 0x80A6 -#define GL_4PASS_3_SGIS 0x80A7 -#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 -#define GL_SAMPLES_SGIS 0x80A9 -#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA -#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB -#define GL_SAMPLE_PATTERN_SGIS 0x80AC -#endif - -#ifndef GL_EXT_rescale_normal -#define GL_RESCALE_NORMAL_EXT 0x803A -#endif - -#ifndef GL_EXT_vertex_array -#define GL_VERTEX_ARRAY_EXT 0x8074 -#define GL_NORMAL_ARRAY_EXT 0x8075 -#define GL_COLOR_ARRAY_EXT 0x8076 -#define GL_INDEX_ARRAY_EXT 0x8077 -#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 -#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 -#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A -#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B -#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C -#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D -#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E -#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F -#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 -#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 -#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 -#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 -#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 -#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 -#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 -#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 -#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A -#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B -#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C -#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D -#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E -#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F -#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 -#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 -#endif - -#ifndef GL_EXT_misc_attribute -#endif - -#ifndef GL_SGIS_generate_mipmap -#define GL_GENERATE_MIPMAP_SGIS 0x8191 -#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 -#endif - -#ifndef GL_SGIX_clipmap -#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 -#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 -#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 -#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 -#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 -#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 -#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 -#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 -#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 -#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D -#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E -#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F -#endif - -#ifndef GL_SGIX_shadow -#define GL_TEXTURE_COMPARE_SGIX 0x819A -#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B -#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C -#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D -#endif - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_CLAMP_TO_EDGE_SGIS 0x812F -#endif - -#ifndef GL_SGIS_texture_border_clamp -#define GL_CLAMP_TO_BORDER_SGIS 0x812D -#endif - -#ifndef GL_EXT_blend_minmax -#define GL_FUNC_ADD_EXT 0x8006 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#define GL_BLEND_EQUATION_EXT 0x8009 -#endif - -#ifndef GL_EXT_blend_subtract -#define GL_FUNC_SUBTRACT_EXT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B -#endif - -#ifndef GL_EXT_blend_logic_op -#endif - -#ifndef GL_SGIX_interlace -#define GL_INTERLACE_SGIX 0x8094 -#endif - -#ifndef GL_SGIX_pixel_tiles -#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E -#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F -#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 -#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 -#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 -#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 -#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 -#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 -#endif - -#ifndef GL_SGIS_texture_select -#define GL_DUAL_ALPHA4_SGIS 0x8110 -#define GL_DUAL_ALPHA8_SGIS 0x8111 -#define GL_DUAL_ALPHA12_SGIS 0x8112 -#define GL_DUAL_ALPHA16_SGIS 0x8113 -#define GL_DUAL_LUMINANCE4_SGIS 0x8114 -#define GL_DUAL_LUMINANCE8_SGIS 0x8115 -#define GL_DUAL_LUMINANCE12_SGIS 0x8116 -#define GL_DUAL_LUMINANCE16_SGIS 0x8117 -#define GL_DUAL_INTENSITY4_SGIS 0x8118 -#define GL_DUAL_INTENSITY8_SGIS 0x8119 -#define GL_DUAL_INTENSITY12_SGIS 0x811A -#define GL_DUAL_INTENSITY16_SGIS 0x811B -#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C -#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D -#define GL_QUAD_ALPHA4_SGIS 0x811E -#define GL_QUAD_ALPHA8_SGIS 0x811F -#define GL_QUAD_LUMINANCE4_SGIS 0x8120 -#define GL_QUAD_LUMINANCE8_SGIS 0x8121 -#define GL_QUAD_INTENSITY4_SGIS 0x8122 -#define GL_QUAD_INTENSITY8_SGIS 0x8123 -#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 -#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 -#endif - -#ifndef GL_SGIX_sprite -#define GL_SPRITE_SGIX 0x8148 -#define GL_SPRITE_MODE_SGIX 0x8149 -#define GL_SPRITE_AXIS_SGIX 0x814A -#define GL_SPRITE_TRANSLATION_SGIX 0x814B -#define GL_SPRITE_AXIAL_SGIX 0x814C -#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D -#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E -#endif - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E -#endif - -#ifndef GL_EXT_point_parameters -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 -#endif - -#ifndef GL_SGIS_point_parameters -#define GL_POINT_SIZE_MIN_SGIS 0x8126 -#define GL_POINT_SIZE_MAX_SGIS 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 -#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 -#endif - -#ifndef GL_SGIX_instruments -#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 -#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 -#endif - -#ifndef GL_SGIX_texture_scale_bias -#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 -#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A -#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B -#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C -#endif - -#ifndef GL_SGIX_framezoom -#define GL_FRAMEZOOM_SGIX 0x818B -#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C -#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D -#endif - -#ifndef GL_SGIX_tag_sample_buffer -#endif - -#ifndef GL_FfdMaskSGIX -#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 -#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 -#endif - -#ifndef GL_SGIX_polynomial_ffd -#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 -#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 -#define GL_DEFORMATIONS_MASK_SGIX 0x8196 -#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 -#endif - -#ifndef GL_SGIX_reference_plane -#define GL_REFERENCE_PLANE_SGIX 0x817D -#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E -#endif - -#ifndef GL_SGIX_flush_raster -#endif - -#ifndef GL_SGIX_depth_texture -#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 -#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 -#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 -#endif - -#ifndef GL_SGIS_fog_function -#define GL_FOG_FUNC_SGIS 0x812A -#define GL_FOG_FUNC_POINTS_SGIS 0x812B -#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C -#endif - -#ifndef GL_SGIX_fog_offset -#define GL_FOG_OFFSET_SGIX 0x8198 -#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 -#endif - -#ifndef GL_HP_image_transform -#define GL_IMAGE_SCALE_X_HP 0x8155 -#define GL_IMAGE_SCALE_Y_HP 0x8156 -#define GL_IMAGE_TRANSLATE_X_HP 0x8157 -#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 -#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 -#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A -#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B -#define GL_IMAGE_MAG_FILTER_HP 0x815C -#define GL_IMAGE_MIN_FILTER_HP 0x815D -#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E -#define GL_CUBIC_HP 0x815F -#define GL_AVERAGE_HP 0x8160 -#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 -#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 -#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 -#endif - -#ifndef GL_HP_convolution_border_modes -#define GL_IGNORE_BORDER_HP 0x8150 -#define GL_CONSTANT_BORDER_HP 0x8151 -#define GL_REPLICATE_BORDER_HP 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 -#endif - -#ifndef GL_INGR_palette_buffer -#endif - -#ifndef GL_SGIX_texture_add_env -#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE -#endif - -#ifndef GL_EXT_color_subtable -#endif - -#ifndef GL_PGI_vertex_hints -#define GL_VERTEX_DATA_HINT_PGI 0x1A22A -#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B -#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C -#define GL_MAX_VERTEX_HINT_PGI 0x1A22D -#define GL_COLOR3_BIT_PGI 0x00010000 -#define GL_COLOR4_BIT_PGI 0x00020000 -#define GL_EDGEFLAG_BIT_PGI 0x00040000 -#define GL_INDEX_BIT_PGI 0x00080000 -#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 -#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 -#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 -#define GL_MAT_EMISSION_BIT_PGI 0x00800000 -#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 -#define GL_MAT_SHININESS_BIT_PGI 0x02000000 -#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 -#define GL_NORMAL_BIT_PGI 0x08000000 -#define GL_TEXCOORD1_BIT_PGI 0x10000000 -#define GL_TEXCOORD2_BIT_PGI 0x20000000 -#define GL_TEXCOORD3_BIT_PGI 0x40000000 -#define GL_TEXCOORD4_BIT_PGI 0x80000000 -#define GL_VERTEX23_BIT_PGI 0x00000004 -#define GL_VERTEX4_BIT_PGI 0x00000008 -#endif - -#ifndef GL_PGI_misc_hints -#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 -#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD -#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE -#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 -#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 -#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 -#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C -#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D -#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E -#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F -#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 -#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 -#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 -#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 -#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 -#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 -#define GL_CLIP_NEAR_HINT_PGI 0x1A220 -#define GL_CLIP_FAR_HINT_PGI 0x1A221 -#define GL_WIDE_LINE_HINT_PGI 0x1A222 -#define GL_BACK_NORMALS_HINT_PGI 0x1A223 -#endif - -#ifndef GL_EXT_paletted_texture -#define GL_COLOR_INDEX1_EXT 0x80E2 -#define GL_COLOR_INDEX2_EXT 0x80E3 -#define GL_COLOR_INDEX4_EXT 0x80E4 -#define GL_COLOR_INDEX8_EXT 0x80E5 -#define GL_COLOR_INDEX12_EXT 0x80E6 -#define GL_COLOR_INDEX16_EXT 0x80E7 -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED -#endif - -#ifndef GL_EXT_clip_volume_hint -#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 -#endif - -#ifndef GL_SGIX_list_priority -#define GL_LIST_PRIORITY_SGIX 0x8182 -#endif - -#ifndef GL_SGIX_ir_instrument1 -#define GL_IR_INSTRUMENT1_SGIX 0x817F -#endif - -#ifndef GL_SGIX_calligraphic_fragment -#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 -#endif - -#ifndef GL_SGIX_texture_lod_bias -#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E -#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F -#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 -#endif - -#ifndef GL_SGIX_shadow_ambient -#define GL_SHADOW_AMBIENT_SGIX 0x80BF -#endif - -#ifndef GL_EXT_index_texture -#endif - -#ifndef GL_EXT_index_material -#define GL_INDEX_MATERIAL_EXT 0x81B8 -#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 -#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA -#endif - -#ifndef GL_EXT_index_func -#define GL_INDEX_TEST_EXT 0x81B5 -#define GL_INDEX_TEST_FUNC_EXT 0x81B6 -#define GL_INDEX_TEST_REF_EXT 0x81B7 -#endif - -#ifndef GL_EXT_index_array_formats -#define GL_IUI_V2F_EXT 0x81AD -#define GL_IUI_V3F_EXT 0x81AE -#define GL_IUI_N3F_V2F_EXT 0x81AF -#define GL_IUI_N3F_V3F_EXT 0x81B0 -#define GL_T2F_IUI_V2F_EXT 0x81B1 -#define GL_T2F_IUI_V3F_EXT 0x81B2 -#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 -#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 -#endif - -#ifndef GL_EXT_compiled_vertex_array -#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 -#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 -#endif - -#ifndef GL_EXT_cull_vertex -#define GL_CULL_VERTEX_EXT 0x81AA -#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB -#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC -#endif - -#ifndef GL_SGIX_ycrcb -#define GL_YCRCB_422_SGIX 0x81BB -#define GL_YCRCB_444_SGIX 0x81BC -#endif - -#ifndef GL_SGIX_fragment_lighting -#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 -#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 -#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 -#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 -#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 -#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 -#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 -#define GL_LIGHT_ENV_MODE_SGIX 0x8407 -#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 -#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 -#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A -#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B -#define GL_FRAGMENT_LIGHT0_SGIX 0x840C -#define GL_FRAGMENT_LIGHT1_SGIX 0x840D -#define GL_FRAGMENT_LIGHT2_SGIX 0x840E -#define GL_FRAGMENT_LIGHT3_SGIX 0x840F -#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 -#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 -#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 -#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 -#endif - -#ifndef GL_IBM_rasterpos_clip -#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 -#endif - -#ifndef GL_HP_texture_lighting -#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 -#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 -#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 -#endif - -#ifndef GL_EXT_draw_range_elements -#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 -#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 -#endif - -#ifndef GL_WIN_phong_shading -#define GL_PHONG_WIN 0x80EA -#define GL_PHONG_HINT_WIN 0x80EB -#endif - -#ifndef GL_WIN_specular_fog -#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC -#endif - -#ifndef GL_EXT_light_texture -#define GL_FRAGMENT_MATERIAL_EXT 0x8349 -#define GL_FRAGMENT_NORMAL_EXT 0x834A -#define GL_FRAGMENT_COLOR_EXT 0x834C -#define GL_ATTENUATION_EXT 0x834D -#define GL_SHADOW_ATTENUATION_EXT 0x834E -#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F -#define GL_TEXTURE_LIGHT_EXT 0x8350 -#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 -#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 -/* reuse GL_FRAGMENT_DEPTH_EXT */ -#endif - -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_ALPHA_MIN_SGIX 0x8320 -#define GL_ALPHA_MAX_SGIX 0x8321 -#endif - -#ifndef GL_SGIX_impact_pixel_texture -#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 -#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 -#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 -#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 -#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 -#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 -#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A -#endif - -#ifndef GL_EXT_bgra -#define GL_BGR_EXT 0x80E0 -#define GL_BGRA_EXT 0x80E1 -#endif - -#ifndef GL_SGIX_async -#define GL_ASYNC_MARKER_SGIX 0x8329 -#endif - -#ifndef GL_SGIX_async_pixel -#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C -#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D -#define GL_ASYNC_READ_PIXELS_SGIX 0x835E -#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F -#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 -#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 -#endif - -#ifndef GL_SGIX_async_histogram -#define GL_ASYNC_HISTOGRAM_SGIX 0x832C -#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D -#endif - -#ifndef GL_INTEL_texture_scissor -#endif - -#ifndef GL_INTEL_parallel_arrays -#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 -#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 -#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 -#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 -#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 -#endif - -#ifndef GL_HP_occlusion_test -#define GL_OCCLUSION_TEST_HP 0x8165 -#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 -#endif - -#ifndef GL_EXT_pixel_transform -#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 -#define GL_PIXEL_MAG_FILTER_EXT 0x8331 -#define GL_PIXEL_MIN_FILTER_EXT 0x8332 -#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 -#define GL_CUBIC_EXT 0x8334 -#define GL_AVERAGE_EXT 0x8335 -#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 -#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 -#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 -#endif - -#ifndef GL_EXT_pixel_transform_color_table -#endif - -#ifndef GL_EXT_shared_texture_palette -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB -#endif - -#ifndef GL_EXT_separate_specular_color -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA -#endif - -#ifndef GL_EXT_secondary_color -#define GL_COLOR_SUM_EXT 0x8458 -#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D -#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E -#endif - -#ifndef GL_EXT_texture_perturb_normal -#define GL_PERTURB_EXT 0x85AE -#define GL_TEXTURE_NORMAL_EXT 0x85AF -#endif - -#ifndef GL_EXT_multi_draw_arrays -#endif - -#ifndef GL_EXT_fog_coord -#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 -#define GL_FOG_COORDINATE_EXT 0x8451 -#define GL_FRAGMENT_DEPTH_EXT 0x8452 -#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 -#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 -#endif - -#ifndef GL_REND_screen_coordinates -#define GL_SCREEN_COORDINATES_REND 0x8490 -#define GL_INVERTED_SCREEN_W_REND 0x8491 -#endif - -#ifndef GL_EXT_coordinate_frame -#define GL_TANGENT_ARRAY_EXT 0x8439 -#define GL_BINORMAL_ARRAY_EXT 0x843A -#define GL_CURRENT_TANGENT_EXT 0x843B -#define GL_CURRENT_BINORMAL_EXT 0x843C -#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E -#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F -#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 -#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 -#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 -#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 -#define GL_MAP1_TANGENT_EXT 0x8444 -#define GL_MAP2_TANGENT_EXT 0x8445 -#define GL_MAP1_BINORMAL_EXT 0x8446 -#define GL_MAP2_BINORMAL_EXT 0x8447 -#endif - -#ifndef GL_EXT_texture_env_combine -#define GL_COMBINE_EXT 0x8570 -#define GL_COMBINE_RGB_EXT 0x8571 -#define GL_COMBINE_ALPHA_EXT 0x8572 -#define GL_RGB_SCALE_EXT 0x8573 -#define GL_ADD_SIGNED_EXT 0x8574 -#define GL_INTERPOLATE_EXT 0x8575 -#define GL_CONSTANT_EXT 0x8576 -#define GL_PRIMARY_COLOR_EXT 0x8577 -#define GL_PREVIOUS_EXT 0x8578 -#define GL_SOURCE0_RGB_EXT 0x8580 -#define GL_SOURCE1_RGB_EXT 0x8581 -#define GL_SOURCE2_RGB_EXT 0x8582 -#define GL_SOURCE0_ALPHA_EXT 0x8588 -#define GL_SOURCE1_ALPHA_EXT 0x8589 -#define GL_SOURCE2_ALPHA_EXT 0x858A -#define GL_OPERAND0_RGB_EXT 0x8590 -#define GL_OPERAND1_RGB_EXT 0x8591 -#define GL_OPERAND2_RGB_EXT 0x8592 -#define GL_OPERAND0_ALPHA_EXT 0x8598 -#define GL_OPERAND1_ALPHA_EXT 0x8599 -#define GL_OPERAND2_ALPHA_EXT 0x859A -#endif - -#ifndef GL_APPLE_specular_vector -#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 -#endif - -#ifndef GL_APPLE_transform_hint -#define GL_TRANSFORM_HINT_APPLE 0x85B1 -#endif - -#ifndef GL_SGIX_fog_scale -#define GL_FOG_SCALE_SGIX 0x81FC -#define GL_FOG_SCALE_VALUE_SGIX 0x81FD -#endif - -#ifndef GL_SUNX_constant_data -#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 -#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 -#endif - -#ifndef GL_SUN_global_alpha -#define GL_GLOBAL_ALPHA_SUN 0x81D9 -#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA -#endif - -#ifndef GL_SUN_triangle_list -#define GL_RESTART_SUN 0x0001 -#define GL_REPLACE_MIDDLE_SUN 0x0002 -#define GL_REPLACE_OLDEST_SUN 0x0003 -#define GL_TRIANGLE_LIST_SUN 0x81D7 -#define GL_REPLACEMENT_CODE_SUN 0x81D8 -#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 -#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 -#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 -#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 -#define GL_R1UI_V3F_SUN 0x85C4 -#define GL_R1UI_C4UB_V3F_SUN 0x85C5 -#define GL_R1UI_C3F_V3F_SUN 0x85C6 -#define GL_R1UI_N3F_V3F_SUN 0x85C7 -#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 -#define GL_R1UI_T2F_V3F_SUN 0x85C9 -#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA -#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB -#endif - -#ifndef GL_SUN_vertex -#endif - -#ifndef GL_EXT_blend_func_separate -#define GL_BLEND_DST_RGB_EXT 0x80C8 -#define GL_BLEND_SRC_RGB_EXT 0x80C9 -#define GL_BLEND_DST_ALPHA_EXT 0x80CA -#define GL_BLEND_SRC_ALPHA_EXT 0x80CB -#endif - -#ifndef GL_INGR_color_clamp -#define GL_RED_MIN_CLAMP_INGR 0x8560 -#define GL_GREEN_MIN_CLAMP_INGR 0x8561 -#define GL_BLUE_MIN_CLAMP_INGR 0x8562 -#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 -#define GL_RED_MAX_CLAMP_INGR 0x8564 -#define GL_GREEN_MAX_CLAMP_INGR 0x8565 -#define GL_BLUE_MAX_CLAMP_INGR 0x8566 -#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 -#endif - -#ifndef GL_INGR_interlace_read -#define GL_INTERLACE_READ_INGR 0x8568 -#endif - -#ifndef GL_EXT_stencil_wrap -#define GL_INCR_WRAP_EXT 0x8507 -#define GL_DECR_WRAP_EXT 0x8508 -#endif - -#ifndef GL_EXT_422_pixels -#define GL_422_EXT 0x80CC -#define GL_422_REV_EXT 0x80CD -#define GL_422_AVERAGE_EXT 0x80CE -#define GL_422_REV_AVERAGE_EXT 0x80CF -#endif - -#ifndef GL_NV_texgen_reflection -#define GL_NORMAL_MAP_NV 0x8511 -#define GL_REFLECTION_MAP_NV 0x8512 -#endif - -#ifndef GL_EXT_texture_cube_map -#define GL_NORMAL_MAP_EXT 0x8511 -#define GL_REFLECTION_MAP_EXT 0x8512 -#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C -#endif - -#ifndef GL_SUN_convolution_border_modes -#define GL_WRAP_BORDER_SUN 0x81D4 -#endif - -#ifndef GL_EXT_texture_env_add -#endif - -#ifndef GL_EXT_texture_lod_bias -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -#ifndef GL_EXT_vertex_weighting -#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH -#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 -#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX -#define GL_MODELVIEW1_MATRIX_EXT 0x8506 -#define GL_VERTEX_WEIGHTING_EXT 0x8509 -#define GL_MODELVIEW0_EXT GL_MODELVIEW -#define GL_MODELVIEW1_EXT 0x850A -#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B -#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C -#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D -#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E -#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F -#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 -#endif - -#ifndef GL_NV_light_max_exponent -#define GL_MAX_SHININESS_NV 0x8504 -#define GL_MAX_SPOT_EXPONENT_NV 0x8505 -#endif - -#ifndef GL_NV_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_NV 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E -#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F -#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 -#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 -#endif - -#ifndef GL_NV_register_combiners -#define GL_REGISTER_COMBINERS_NV 0x8522 -#define GL_VARIABLE_A_NV 0x8523 -#define GL_VARIABLE_B_NV 0x8524 -#define GL_VARIABLE_C_NV 0x8525 -#define GL_VARIABLE_D_NV 0x8526 -#define GL_VARIABLE_E_NV 0x8527 -#define GL_VARIABLE_F_NV 0x8528 -#define GL_VARIABLE_G_NV 0x8529 -#define GL_CONSTANT_COLOR0_NV 0x852A -#define GL_CONSTANT_COLOR1_NV 0x852B -#define GL_PRIMARY_COLOR_NV 0x852C -#define GL_SECONDARY_COLOR_NV 0x852D -#define GL_SPARE0_NV 0x852E -#define GL_SPARE1_NV 0x852F -#define GL_DISCARD_NV 0x8530 -#define GL_E_TIMES_F_NV 0x8531 -#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 -#define GL_UNSIGNED_IDENTITY_NV 0x8536 -#define GL_UNSIGNED_INVERT_NV 0x8537 -#define GL_EXPAND_NORMAL_NV 0x8538 -#define GL_EXPAND_NEGATE_NV 0x8539 -#define GL_HALF_BIAS_NORMAL_NV 0x853A -#define GL_HALF_BIAS_NEGATE_NV 0x853B -#define GL_SIGNED_IDENTITY_NV 0x853C -#define GL_SIGNED_NEGATE_NV 0x853D -#define GL_SCALE_BY_TWO_NV 0x853E -#define GL_SCALE_BY_FOUR_NV 0x853F -#define GL_SCALE_BY_ONE_HALF_NV 0x8540 -#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 -#define GL_COMBINER_INPUT_NV 0x8542 -#define GL_COMBINER_MAPPING_NV 0x8543 -#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 -#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 -#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 -#define GL_COMBINER_MUX_SUM_NV 0x8547 -#define GL_COMBINER_SCALE_NV 0x8548 -#define GL_COMBINER_BIAS_NV 0x8549 -#define GL_COMBINER_AB_OUTPUT_NV 0x854A -#define GL_COMBINER_CD_OUTPUT_NV 0x854B -#define GL_COMBINER_SUM_OUTPUT_NV 0x854C -#define GL_MAX_GENERAL_COMBINERS_NV 0x854D -#define GL_NUM_GENERAL_COMBINERS_NV 0x854E -#define GL_COLOR_SUM_CLAMP_NV 0x854F -#define GL_COMBINER0_NV 0x8550 -#define GL_COMBINER1_NV 0x8551 -#define GL_COMBINER2_NV 0x8552 -#define GL_COMBINER3_NV 0x8553 -#define GL_COMBINER4_NV 0x8554 -#define GL_COMBINER5_NV 0x8555 -#define GL_COMBINER6_NV 0x8556 -#define GL_COMBINER7_NV 0x8557 -/* reuse GL_TEXTURE0_ARB */ -/* reuse GL_TEXTURE1_ARB */ -/* reuse GL_ZERO */ -/* reuse GL_NONE */ -/* reuse GL_FOG */ -#endif - -#ifndef GL_NV_fog_distance -#define GL_FOG_DISTANCE_MODE_NV 0x855A -#define GL_EYE_RADIAL_NV 0x855B -#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C -/* reuse GL_EYE_PLANE */ -#endif - -#ifndef GL_NV_texgen_emboss -#define GL_EMBOSS_LIGHT_NV 0x855D -#define GL_EMBOSS_CONSTANT_NV 0x855E -#define GL_EMBOSS_MAP_NV 0x855F -#endif - -#ifndef GL_NV_blend_square -#endif - -#ifndef GL_NV_texture_env_combine4 -#define GL_COMBINE4_NV 0x8503 -#define GL_SOURCE3_RGB_NV 0x8583 -#define GL_SOURCE3_ALPHA_NV 0x858B -#define GL_OPERAND3_RGB_NV 0x8593 -#define GL_OPERAND3_ALPHA_NV 0x859B -#endif - -#ifndef GL_MESA_resize_buffers -#endif - -#ifndef GL_MESA_window_pos -#endif - -#ifndef GL_EXT_texture_compression_s3tc -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 -#endif - -#ifndef GL_IBM_cull_vertex -#define GL_CULL_VERTEX_IBM 103050 -#endif - -#ifndef GL_IBM_multimode_draw_arrays -#endif - -#ifndef GL_IBM_vertex_array_lists -#define GL_VERTEX_ARRAY_LIST_IBM 103070 -#define GL_NORMAL_ARRAY_LIST_IBM 103071 -#define GL_COLOR_ARRAY_LIST_IBM 103072 -#define GL_INDEX_ARRAY_LIST_IBM 103073 -#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 -#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 -#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 -#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 -#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 -#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 -#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 -#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 -#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 -#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 -#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 -#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 -#endif - -#ifndef GL_SGIX_subsample -#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 -#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 -#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 -#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 -#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 -#endif - -#ifndef GL_SGIX_ycrcb_subsample -#endif - -#ifndef GL_SGIX_ycrcba -#define GL_YCRCB_SGIX 0x8318 -#define GL_YCRCBA_SGIX 0x8319 -#endif - -#ifndef GL_SGI_depth_pass_instrument -#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 -#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 -#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 -#endif - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 -#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 -#endif - -#ifndef GL_3DFX_multisample -#define GL_MULTISAMPLE_3DFX 0x86B2 -#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 -#define GL_SAMPLES_3DFX 0x86B4 -#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 -#endif - -#ifndef GL_3DFX_tbuffer -#endif - -#ifndef GL_EXT_multisample -#define GL_MULTISAMPLE_EXT 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F -#define GL_SAMPLE_MASK_EXT 0x80A0 -#define GL_1PASS_EXT 0x80A1 -#define GL_2PASS_0_EXT 0x80A2 -#define GL_2PASS_1_EXT 0x80A3 -#define GL_4PASS_0_EXT 0x80A4 -#define GL_4PASS_1_EXT 0x80A5 -#define GL_4PASS_2_EXT 0x80A6 -#define GL_4PASS_3_EXT 0x80A7 -#define GL_SAMPLE_BUFFERS_EXT 0x80A8 -#define GL_SAMPLES_EXT 0x80A9 -#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA -#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB -#define GL_SAMPLE_PATTERN_EXT 0x80AC -#define GL_MULTISAMPLE_BIT_EXT 0x20000000 -#endif - -#ifndef GL_SGIX_vertex_preclip -#define GL_VERTEX_PRECLIP_SGIX 0x83EE -#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF -#endif - -#ifndef GL_SGIX_convolution_accuracy -#define GL_CONVOLUTION_HINT_SGIX 0x8316 -#endif - -#ifndef GL_SGIX_resample -#define GL_PACK_RESAMPLE_SGIX 0x842C -#define GL_UNPACK_RESAMPLE_SGIX 0x842D -#define GL_RESAMPLE_REPLICATE_SGIX 0x842E -#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F -#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 -#endif - -#ifndef GL_SGIS_point_line_texgen -#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 -#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 -#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 -#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 -#define GL_EYE_POINT_SGIS 0x81F4 -#define GL_OBJECT_POINT_SGIS 0x81F5 -#define GL_EYE_LINE_SGIS 0x81F6 -#define GL_OBJECT_LINE_SGIS 0x81F7 -#endif - -#ifndef GL_SGIS_texture_color_mask -#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF -#endif - -#ifndef GL_EXT_texture_env_dot3 -#define GL_DOT3_RGB_EXT 0x8740 -#define GL_DOT3_RGBA_EXT 0x8741 -#endif - -#ifndef GL_ATI_texture_mirror_once -#define GL_MIRROR_CLAMP_ATI 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 -#endif - -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -#ifndef GL_IBM_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_IBM 0x8370 -#endif - -#ifndef GL_NV_evaluators -#define GL_EVAL_2D_NV 0x86C0 -#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 -#define GL_MAP_TESSELLATION_NV 0x86C2 -#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 -#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 -#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 -#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 -#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 -#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 -#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 -#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA -#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB -#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC -#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD -#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE -#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF -#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 -#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 -#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 -#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 -#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 -#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 -#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 -#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 -#endif - -#ifndef GL_NV_packed_depth_stencil -#define GL_DEPTH_STENCIL_NV 0x84F9 -#define GL_UNSIGNED_INT_24_8_NV 0x84FA -#endif - -#ifndef GL_NV_register_combiners2 -#define GL_PER_STAGE_CONSTANTS_NV 0x8535 -#endif - -#ifndef GL_NV_texture_compression_vtc -#endif - -#ifndef GL_NV_texture_rectangle -#define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 -#endif - -#ifndef GL_NV_texture_shader -#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C -#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D -#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E -#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 -#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA -#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB -#define GL_DSDT_MAG_INTENSITY_NV 0x86DC -#define GL_SHADER_CONSISTENT_NV 0x86DD -#define GL_TEXTURE_SHADER_NV 0x86DE -#define GL_SHADER_OPERATION_NV 0x86DF -#define GL_CULL_MODES_NV 0x86E0 -#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV -#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV -#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV -#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 -#define GL_CONST_EYE_NV 0x86E5 -#define GL_PASS_THROUGH_NV 0x86E6 -#define GL_CULL_FRAGMENT_NV 0x86E7 -#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 -#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 -#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA -#define GL_DOT_PRODUCT_NV 0x86EC -#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED -#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE -#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 -#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 -#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 -#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 -#define GL_HILO_NV 0x86F4 -#define GL_DSDT_NV 0x86F5 -#define GL_DSDT_MAG_NV 0x86F6 -#define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_HILO16_NV 0x86F8 -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_HILO16_NV 0x86FA -#define GL_SIGNED_RGBA_NV 0x86FB -#define GL_SIGNED_RGBA8_NV 0x86FC -#define GL_SIGNED_RGB_NV 0x86FE -#define GL_SIGNED_RGB8_NV 0x86FF -#define GL_SIGNED_LUMINANCE_NV 0x8701 -#define GL_SIGNED_LUMINANCE8_NV 0x8702 -#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 -#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 -#define GL_SIGNED_ALPHA_NV 0x8705 -#define GL_SIGNED_ALPHA8_NV 0x8706 -#define GL_SIGNED_INTENSITY_NV 0x8707 -#define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_DSDT8_NV 0x8709 -#define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#define GL_HI_SCALE_NV 0x870E -#define GL_LO_SCALE_NV 0x870F -#define GL_DS_SCALE_NV 0x8710 -#define GL_DT_SCALE_NV 0x8711 -#define GL_MAGNITUDE_SCALE_NV 0x8712 -#define GL_VIBRANCE_SCALE_NV 0x8713 -#define GL_HI_BIAS_NV 0x8714 -#define GL_LO_BIAS_NV 0x8715 -#define GL_DS_BIAS_NV 0x8716 -#define GL_DT_BIAS_NV 0x8717 -#define GL_MAGNITUDE_BIAS_NV 0x8718 -#define GL_VIBRANCE_BIAS_NV 0x8719 -#define GL_TEXTURE_BORDER_VALUES_NV 0x871A -#define GL_TEXTURE_HI_SIZE_NV 0x871B -#define GL_TEXTURE_LO_SIZE_NV 0x871C -#define GL_TEXTURE_DS_SIZE_NV 0x871D -#define GL_TEXTURE_DT_SIZE_NV 0x871E -#define GL_TEXTURE_MAG_SIZE_NV 0x871F -#endif - -#ifndef GL_NV_texture_shader2 -#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF -#endif - -#ifndef GL_NV_vertex_array_range2 -#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 -#endif - -#ifndef GL_NV_vertex_program -#define GL_VERTEX_PROGRAM_NV 0x8620 -#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 -#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 -#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 -#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 -#define GL_CURRENT_ATTRIB_NV 0x8626 -#define GL_PROGRAM_LENGTH_NV 0x8627 -#define GL_PROGRAM_STRING_NV 0x8628 -#define GL_MODELVIEW_PROJECTION_NV 0x8629 -#define GL_IDENTITY_NV 0x862A -#define GL_INVERSE_NV 0x862B -#define GL_TRANSPOSE_NV 0x862C -#define GL_INVERSE_TRANSPOSE_NV 0x862D -#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E -#define GL_MAX_TRACK_MATRICES_NV 0x862F -#define GL_MATRIX0_NV 0x8630 -#define GL_MATRIX1_NV 0x8631 -#define GL_MATRIX2_NV 0x8632 -#define GL_MATRIX3_NV 0x8633 -#define GL_MATRIX4_NV 0x8634 -#define GL_MATRIX5_NV 0x8635 -#define GL_MATRIX6_NV 0x8636 -#define GL_MATRIX7_NV 0x8637 -#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 -#define GL_CURRENT_MATRIX_NV 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 -#define GL_PROGRAM_PARAMETER_NV 0x8644 -#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 -#define GL_PROGRAM_TARGET_NV 0x8646 -#define GL_PROGRAM_RESIDENT_NV 0x8647 -#define GL_TRACK_MATRIX_NV 0x8648 -#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 -#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A -#define GL_PROGRAM_ERROR_POSITION_NV 0x864B -#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 -#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 -#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 -#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 -#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 -#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 -#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 -#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 -#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 -#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 -#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A -#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B -#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C -#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D -#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E -#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F -#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 -#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 -#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 -#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 -#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 -#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 -#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 -#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 -#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 -#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 -#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A -#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B -#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C -#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D -#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E -#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F -#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 -#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 -#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 -#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 -#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 -#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 -#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 -#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 -#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 -#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 -#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A -#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B -#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C -#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D -#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E -#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F -#endif - -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 -#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A -#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B -#endif - -#ifndef GL_SGIX_scalebias_hint -#define GL_SCALEBIAS_HINT_SGIX 0x8322 -#endif - -#ifndef GL_OML_interlace -#define GL_INTERLACE_OML 0x8980 -#define GL_INTERLACE_READ_OML 0x8981 -#endif - -#ifndef GL_OML_subsample -#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 -#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 -#endif - -#ifndef GL_OML_resample -#define GL_PACK_RESAMPLE_OML 0x8984 -#define GL_UNPACK_RESAMPLE_OML 0x8985 -#define GL_RESAMPLE_REPLICATE_OML 0x8986 -#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 -#define GL_RESAMPLE_AVERAGE_OML 0x8988 -#define GL_RESAMPLE_DECIMATE_OML 0x8989 -#endif - -#ifndef GL_NV_copy_depth_to_color -#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E -#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F -#endif - -#ifndef GL_ATI_envmap_bumpmap -#define GL_BUMP_ROT_MATRIX_ATI 0x8775 -#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 -#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 -#define GL_BUMP_TEX_UNITS_ATI 0x8778 -#define GL_DUDV_ATI 0x8779 -#define GL_DU8DV8_ATI 0x877A -#define GL_BUMP_ENVMAP_ATI 0x877B -#define GL_BUMP_TARGET_ATI 0x877C -#endif - -#ifndef GL_ATI_fragment_shader -#define GL_FRAGMENT_SHADER_ATI 0x8920 -#define GL_REG_0_ATI 0x8921 -#define GL_REG_1_ATI 0x8922 -#define GL_REG_2_ATI 0x8923 -#define GL_REG_3_ATI 0x8924 -#define GL_REG_4_ATI 0x8925 -#define GL_REG_5_ATI 0x8926 -#define GL_REG_6_ATI 0x8927 -#define GL_REG_7_ATI 0x8928 -#define GL_REG_8_ATI 0x8929 -#define GL_REG_9_ATI 0x892A -#define GL_REG_10_ATI 0x892B -#define GL_REG_11_ATI 0x892C -#define GL_REG_12_ATI 0x892D -#define GL_REG_13_ATI 0x892E -#define GL_REG_14_ATI 0x892F -#define GL_REG_15_ATI 0x8930 -#define GL_REG_16_ATI 0x8931 -#define GL_REG_17_ATI 0x8932 -#define GL_REG_18_ATI 0x8933 -#define GL_REG_19_ATI 0x8934 -#define GL_REG_20_ATI 0x8935 -#define GL_REG_21_ATI 0x8936 -#define GL_REG_22_ATI 0x8937 -#define GL_REG_23_ATI 0x8938 -#define GL_REG_24_ATI 0x8939 -#define GL_REG_25_ATI 0x893A -#define GL_REG_26_ATI 0x893B -#define GL_REG_27_ATI 0x893C -#define GL_REG_28_ATI 0x893D -#define GL_REG_29_ATI 0x893E -#define GL_REG_30_ATI 0x893F -#define GL_REG_31_ATI 0x8940 -#define GL_CON_0_ATI 0x8941 -#define GL_CON_1_ATI 0x8942 -#define GL_CON_2_ATI 0x8943 -#define GL_CON_3_ATI 0x8944 -#define GL_CON_4_ATI 0x8945 -#define GL_CON_5_ATI 0x8946 -#define GL_CON_6_ATI 0x8947 -#define GL_CON_7_ATI 0x8948 -#define GL_CON_8_ATI 0x8949 -#define GL_CON_9_ATI 0x894A -#define GL_CON_10_ATI 0x894B -#define GL_CON_11_ATI 0x894C -#define GL_CON_12_ATI 0x894D -#define GL_CON_13_ATI 0x894E -#define GL_CON_14_ATI 0x894F -#define GL_CON_15_ATI 0x8950 -#define GL_CON_16_ATI 0x8951 -#define GL_CON_17_ATI 0x8952 -#define GL_CON_18_ATI 0x8953 -#define GL_CON_19_ATI 0x8954 -#define GL_CON_20_ATI 0x8955 -#define GL_CON_21_ATI 0x8956 -#define GL_CON_22_ATI 0x8957 -#define GL_CON_23_ATI 0x8958 -#define GL_CON_24_ATI 0x8959 -#define GL_CON_25_ATI 0x895A -#define GL_CON_26_ATI 0x895B -#define GL_CON_27_ATI 0x895C -#define GL_CON_28_ATI 0x895D -#define GL_CON_29_ATI 0x895E -#define GL_CON_30_ATI 0x895F -#define GL_CON_31_ATI 0x8960 -#define GL_MOV_ATI 0x8961 -#define GL_ADD_ATI 0x8963 -#define GL_MUL_ATI 0x8964 -#define GL_SUB_ATI 0x8965 -#define GL_DOT3_ATI 0x8966 -#define GL_DOT4_ATI 0x8967 -#define GL_MAD_ATI 0x8968 -#define GL_LERP_ATI 0x8969 -#define GL_CND_ATI 0x896A -#define GL_CND0_ATI 0x896B -#define GL_DOT2_ADD_ATI 0x896C -#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D -#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E -#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F -#define GL_NUM_PASSES_ATI 0x8970 -#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 -#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 -#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 -#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 -#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 -#define GL_SWIZZLE_STR_ATI 0x8976 -#define GL_SWIZZLE_STQ_ATI 0x8977 -#define GL_SWIZZLE_STR_DR_ATI 0x8978 -#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 -#define GL_SWIZZLE_STRQ_ATI 0x897A -#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B -#define GL_RED_BIT_ATI 0x00000001 -#define GL_GREEN_BIT_ATI 0x00000002 -#define GL_BLUE_BIT_ATI 0x00000004 -#define GL_2X_BIT_ATI 0x00000001 -#define GL_4X_BIT_ATI 0x00000002 -#define GL_8X_BIT_ATI 0x00000004 -#define GL_HALF_BIT_ATI 0x00000008 -#define GL_QUARTER_BIT_ATI 0x00000010 -#define GL_EIGHTH_BIT_ATI 0x00000020 -#define GL_SATURATE_BIT_ATI 0x00000040 -#define GL_COMP_BIT_ATI 0x00000002 -#define GL_NEGATE_BIT_ATI 0x00000004 -#define GL_BIAS_BIT_ATI 0x00000008 -#endif - -#ifndef GL_ATI_pn_triangles -#define GL_PN_TRIANGLES_ATI 0x87F0 -#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 -#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 -#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 -#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 -#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 -#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 -#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 -#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 -#endif - -#ifndef GL_ATI_vertex_array_object -#define GL_STATIC_ATI 0x8760 -#define GL_DYNAMIC_ATI 0x8761 -#define GL_PRESERVE_ATI 0x8762 -#define GL_DISCARD_ATI 0x8763 -#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 -#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 -#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 -#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 -#endif - -#ifndef GL_EXT_vertex_shader -#define GL_VERTEX_SHADER_EXT 0x8780 -#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 -#define GL_OP_INDEX_EXT 0x8782 -#define GL_OP_NEGATE_EXT 0x8783 -#define GL_OP_DOT3_EXT 0x8784 -#define GL_OP_DOT4_EXT 0x8785 -#define GL_OP_MUL_EXT 0x8786 -#define GL_OP_ADD_EXT 0x8787 -#define GL_OP_MADD_EXT 0x8788 -#define GL_OP_FRAC_EXT 0x8789 -#define GL_OP_MAX_EXT 0x878A -#define GL_OP_MIN_EXT 0x878B -#define GL_OP_SET_GE_EXT 0x878C -#define GL_OP_SET_LT_EXT 0x878D -#define GL_OP_CLAMP_EXT 0x878E -#define GL_OP_FLOOR_EXT 0x878F -#define GL_OP_ROUND_EXT 0x8790 -#define GL_OP_EXP_BASE_2_EXT 0x8791 -#define GL_OP_LOG_BASE_2_EXT 0x8792 -#define GL_OP_POWER_EXT 0x8793 -#define GL_OP_RECIP_EXT 0x8794 -#define GL_OP_RECIP_SQRT_EXT 0x8795 -#define GL_OP_SUB_EXT 0x8796 -#define GL_OP_CROSS_PRODUCT_EXT 0x8797 -#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 -#define GL_OP_MOV_EXT 0x8799 -#define GL_OUTPUT_VERTEX_EXT 0x879A -#define GL_OUTPUT_COLOR0_EXT 0x879B -#define GL_OUTPUT_COLOR1_EXT 0x879C -#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D -#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E -#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F -#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 -#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 -#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 -#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 -#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 -#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 -#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 -#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 -#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 -#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 -#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA -#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB -#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC -#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD -#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE -#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF -#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 -#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 -#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 -#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 -#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 -#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 -#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 -#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 -#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 -#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 -#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA -#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB -#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC -#define GL_OUTPUT_FOG_EXT 0x87BD -#define GL_SCALAR_EXT 0x87BE -#define GL_VECTOR_EXT 0x87BF -#define GL_MATRIX_EXT 0x87C0 -#define GL_VARIANT_EXT 0x87C1 -#define GL_INVARIANT_EXT 0x87C2 -#define GL_LOCAL_CONSTANT_EXT 0x87C3 -#define GL_LOCAL_EXT 0x87C4 -#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 -#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 -#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 -#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 -#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE -#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF -#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 -#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 -#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 -#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 -#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 -#define GL_X_EXT 0x87D5 -#define GL_Y_EXT 0x87D6 -#define GL_Z_EXT 0x87D7 -#define GL_W_EXT 0x87D8 -#define GL_NEGATIVE_X_EXT 0x87D9 -#define GL_NEGATIVE_Y_EXT 0x87DA -#define GL_NEGATIVE_Z_EXT 0x87DB -#define GL_NEGATIVE_W_EXT 0x87DC -#define GL_ZERO_EXT 0x87DD -#define GL_ONE_EXT 0x87DE -#define GL_NEGATIVE_ONE_EXT 0x87DF -#define GL_NORMALIZED_RANGE_EXT 0x87E0 -#define GL_FULL_RANGE_EXT 0x87E1 -#define GL_CURRENT_VERTEX_EXT 0x87E2 -#define GL_MVP_MATRIX_EXT 0x87E3 -#define GL_VARIANT_VALUE_EXT 0x87E4 -#define GL_VARIANT_DATATYPE_EXT 0x87E5 -#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 -#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 -#define GL_VARIANT_ARRAY_EXT 0x87E8 -#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 -#define GL_INVARIANT_VALUE_EXT 0x87EA -#define GL_INVARIANT_DATATYPE_EXT 0x87EB -#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC -#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED -#endif - -#ifndef GL_ATI_vertex_streams -#define GL_MAX_VERTEX_STREAMS_ATI 0x876B -#define GL_VERTEX_STREAM0_ATI 0x876C -#define GL_VERTEX_STREAM1_ATI 0x876D -#define GL_VERTEX_STREAM2_ATI 0x876E -#define GL_VERTEX_STREAM3_ATI 0x876F -#define GL_VERTEX_STREAM4_ATI 0x8770 -#define GL_VERTEX_STREAM5_ATI 0x8771 -#define GL_VERTEX_STREAM6_ATI 0x8772 -#define GL_VERTEX_STREAM7_ATI 0x8773 -#define GL_VERTEX_SOURCE_ATI 0x8774 -#endif - -#ifndef GL_ATI_element_array -#define GL_ELEMENT_ARRAY_ATI 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A -#endif - -#ifndef GL_SUN_mesh_array -#define GL_QUAD_MESH_SUN 0x8614 -#define GL_TRIANGLE_MESH_SUN 0x8615 -#endif - -#ifndef GL_SUN_slice_accum -#define GL_SLICE_ACCUM_SUN 0x85CC -#endif - -#ifndef GL_NV_multisample_filter_hint -#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 -#endif - -#ifndef GL_NV_depth_clamp -#define GL_DEPTH_CLAMP_NV 0x864F -#endif - -#ifndef GL_NV_occlusion_query -#define GL_PIXEL_COUNTER_BITS_NV 0x8864 -#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 -#define GL_PIXEL_COUNT_NV 0x8866 -#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 -#endif - -#ifndef GL_NV_point_sprite -#define GL_POINT_SPRITE_NV 0x8861 -#define GL_COORD_REPLACE_NV 0x8862 -#define GL_POINT_SPRITE_R_MODE_NV 0x8863 -#endif - -#ifndef GL_NV_texture_shader3 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 -#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 -#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 -#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 -#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 -#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A -#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B -#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C -#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D -#define GL_HILO8_NV 0x885E -#define GL_SIGNED_HILO8_NV 0x885F -#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 -#endif - -#ifndef GL_NV_vertex_program1_1 -#endif - -#ifndef GL_EXT_shadow_funcs -#endif - -#ifndef GL_EXT_stencil_two_side -#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 -#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 -#endif - -#ifndef GL_ATI_text_fragment_shader -#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 -#endif - -#ifndef GL_APPLE_client_storage -#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 -#endif - -#ifndef GL_APPLE_element_array -#define GL_ELEMENT_ARRAY_APPLE 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A -#endif - -#ifndef GL_APPLE_fence -#define GL_DRAW_PIXELS_APPLE 0x8A0A -#define GL_FENCE_APPLE 0x8A0B -#endif - -#ifndef GL_APPLE_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 -#endif - -#ifndef GL_APPLE_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E -#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F -#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 -#define GL_STORAGE_CACHED_APPLE 0x85BE -#define GL_STORAGE_SHARED_APPLE 0x85BF -#endif - -#ifndef GL_APPLE_ycbcr_422 -#define GL_YCBCR_422_APPLE 0x85B9 -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -#ifndef GL_S3_s3tc -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB4_S3TC 0x83A1 -#define GL_RGBA_S3TC 0x83A2 -#define GL_RGBA4_S3TC 0x83A3 -#endif - -#ifndef GL_ATI_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 -#define GL_DRAW_BUFFER0_ATI 0x8825 -#define GL_DRAW_BUFFER1_ATI 0x8826 -#define GL_DRAW_BUFFER2_ATI 0x8827 -#define GL_DRAW_BUFFER3_ATI 0x8828 -#define GL_DRAW_BUFFER4_ATI 0x8829 -#define GL_DRAW_BUFFER5_ATI 0x882A -#define GL_DRAW_BUFFER6_ATI 0x882B -#define GL_DRAW_BUFFER7_ATI 0x882C -#define GL_DRAW_BUFFER8_ATI 0x882D -#define GL_DRAW_BUFFER9_ATI 0x882E -#define GL_DRAW_BUFFER10_ATI 0x882F -#define GL_DRAW_BUFFER11_ATI 0x8830 -#define GL_DRAW_BUFFER12_ATI 0x8831 -#define GL_DRAW_BUFFER13_ATI 0x8832 -#define GL_DRAW_BUFFER14_ATI 0x8833 -#define GL_DRAW_BUFFER15_ATI 0x8834 -#endif - -#ifndef GL_ATI_pixel_format_float -#define GL_TYPE_RGBA_FLOAT_ATI 0x8820 -#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 -#endif - -#ifndef GL_ATI_texture_env_combine3 -#define GL_MODULATE_ADD_ATI 0x8744 -#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 -#define GL_MODULATE_SUBTRACT_ATI 0x8746 -#endif - -#ifndef GL_ATI_texture_float -#define GL_RGBA_FLOAT32_ATI 0x8814 -#define GL_RGB_FLOAT32_ATI 0x8815 -#define GL_ALPHA_FLOAT32_ATI 0x8816 -#define GL_INTENSITY_FLOAT32_ATI 0x8817 -#define GL_LUMINANCE_FLOAT32_ATI 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 -#define GL_RGBA_FLOAT16_ATI 0x881A -#define GL_RGB_FLOAT16_ATI 0x881B -#define GL_ALPHA_FLOAT16_ATI 0x881C -#define GL_INTENSITY_FLOAT16_ATI 0x881D -#define GL_LUMINANCE_FLOAT16_ATI 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F -#endif - -#ifndef GL_NV_float_buffer -#define GL_FLOAT_R_NV 0x8880 -#define GL_FLOAT_RG_NV 0x8881 -#define GL_FLOAT_RGB_NV 0x8882 -#define GL_FLOAT_RGBA_NV 0x8883 -#define GL_FLOAT_R16_NV 0x8884 -#define GL_FLOAT_R32_NV 0x8885 -#define GL_FLOAT_RG16_NV 0x8886 -#define GL_FLOAT_RG32_NV 0x8887 -#define GL_FLOAT_RGB16_NV 0x8888 -#define GL_FLOAT_RGB32_NV 0x8889 -#define GL_FLOAT_RGBA16_NV 0x888A -#define GL_FLOAT_RGBA32_NV 0x888B -#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C -#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D -#define GL_FLOAT_RGBA_MODE_NV 0x888E -#endif - -#ifndef GL_NV_fragment_program -#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 -#define GL_FRAGMENT_PROGRAM_NV 0x8870 -#define GL_MAX_TEXTURE_COORDS_NV 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 -#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 -#define GL_PROGRAM_ERROR_STRING_NV 0x8874 -#endif - -#ifndef GL_NV_half_float -#define GL_HALF_FLOAT_NV 0x140B -#endif - -#ifndef GL_NV_pixel_data_range -#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 -#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 -#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A -#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B -#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C -#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D -#endif - -#ifndef GL_NV_primitive_restart -#define GL_PRIMITIVE_RESTART_NV 0x8558 -#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 -#endif - -#ifndef GL_NV_texture_expand_normal -#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F -#endif - -#ifndef GL_NV_vertex_program2 -#endif - -#ifndef GL_ATI_map_object_buffer -#endif - -#ifndef GL_ATI_separate_stencil -#define GL_STENCIL_BACK_FUNC_ATI 0x8800 -#define GL_STENCIL_BACK_FAIL_ATI 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 -#endif - -#ifndef GL_ATI_vertex_attrib_array_object -#endif - -#ifndef GL_OES_read_format -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#endif - -#ifndef GL_EXT_depth_bounds_test -#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 -#define GL_DEPTH_BOUNDS_EXT 0x8891 -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_MIRROR_CLAMP_EXT 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 -#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 -#endif - -#ifndef GL_EXT_blend_equation_separate -#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION -#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D -#endif - -#ifndef GL_MESA_pack_invert -#define GL_PACK_INVERT_MESA 0x8758 -#endif - -#ifndef GL_MESA_ycbcr_texture -#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB -#define GL_YCBCR_MESA 0x8757 -#endif - -#ifndef GL_EXT_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF -#endif - -#ifndef GL_NV_fragment_program_option -#endif - -#ifndef GL_NV_fragment_program2 -#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 -#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 -#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 -#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 -#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 -#endif - -#ifndef GL_NV_vertex_program2_option -/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ -/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ -#endif - -#ifndef GL_NV_vertex_program3 -/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ -#endif - -#ifndef GL_EXT_framebuffer_object -#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 -#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 -#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 -#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 -#define GL_FRAMEBUFFER_EXT 0x8D40 -#define GL_RENDERBUFFER_EXT 0x8D41 -#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 -#define GL_STENCIL_INDEX1_EXT 0x8D46 -#define GL_STENCIL_INDEX4_EXT 0x8D47 -#define GL_STENCIL_INDEX8_EXT 0x8D48 -#define GL_STENCIL_INDEX16_EXT 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 -#endif - -#ifndef GL_GREMEDY_string_marker -#endif - - -/*************************************************************/ - -#include <stddef.h> -#ifndef GL_VERSION_2_0 -/* GL type for program/shader text */ -typedef char GLchar; /* native character */ -#endif - -#ifndef GL_VERSION_1_5 -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptr; -typedef ptrdiff_t GLsizeiptr; -#endif - -#ifndef GL_ARB_vertex_buffer_object -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptrARB; -typedef ptrdiff_t GLsizeiptrARB; -#endif - -#ifndef GL_ARB_shader_objects -/* GL types for handling shader object handles and program/shader text */ -typedef char GLcharARB; /* native character */ -typedef unsigned int GLhandleARB; /* shader object handle */ -#endif - -/* GL types for "half" precision (s10e5) float data in host memory */ -#ifndef GL_ARB_half_float_pixel -typedef unsigned short GLhalfARB; -#endif - -#ifndef GL_NV_half_float -typedef unsigned short GLhalfNV; -#endif - -#ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColor (GLclampf, GLclampf, GLclampf, GLclampf); -GLAPI void APIENTRY glBlendEquation (GLenum); -GLAPI void APIENTRY glDrawRangeElements (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); -GLAPI void APIENTRY glColorTable (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glColorTableParameterfv (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glColorTableParameteriv (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glCopyColorTable (GLenum, GLenum, GLint, GLint, GLsizei); -GLAPI void APIENTRY glGetColorTable (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetColorTableParameterfv (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetColorTableParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glColorSubTable (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glCopyColorSubTable (GLenum, GLsizei, GLint, GLint, GLsizei); -GLAPI void APIENTRY glConvolutionFilter1D (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glConvolutionFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glConvolutionParameterf (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glConvolutionParameterfv (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glConvolutionParameteri (GLenum, GLenum, GLint); -GLAPI void APIENTRY glConvolutionParameteriv (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum, GLenum, GLint, GLint, GLsizei); -GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); -GLAPI void APIENTRY glGetConvolutionFilter (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetSeparableFilter (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); -GLAPI void APIENTRY glSeparableFilter2D (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); -GLAPI void APIENTRY glGetHistogram (GLenum, GLboolean, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetHistogramParameterfv (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetHistogramParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetMinmax (GLenum, GLboolean, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glHistogram (GLenum, GLsizei, GLenum, GLboolean); -GLAPI void APIENTRY glMinmax (GLenum, GLenum, GLboolean); -GLAPI void APIENTRY glResetHistogram (GLenum); -GLAPI void APIENTRY glResetMinmax (GLenum); -GLAPI void APIENTRY glTexImage3D (GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glCopyTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif - -#ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTexture (GLenum); -GLAPI void APIENTRY glClientActiveTexture (GLenum); -GLAPI void APIENTRY glMultiTexCoord1d (GLenum, GLdouble); -GLAPI void APIENTRY glMultiTexCoord1dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord1f (GLenum, GLfloat); -GLAPI void APIENTRY glMultiTexCoord1fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord1i (GLenum, GLint); -GLAPI void APIENTRY glMultiTexCoord1iv (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord1s (GLenum, GLshort); -GLAPI void APIENTRY glMultiTexCoord1sv (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord2d (GLenum, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord2dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord2f (GLenum, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord2fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord2i (GLenum, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord2iv (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord2s (GLenum, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord2sv (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord3d (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord3dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord3f (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord3fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord3i (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord3iv (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord3s (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord3sv (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord4d (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord4dv (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord4f (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord4fv (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord4i (GLenum, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord4iv (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord4s (GLenum, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord4sv (GLenum, const GLshort *); -GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *); -GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *); -GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *); -GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *); -GLAPI void APIENTRY glSampleCoverage (GLclampf, GLboolean); -GLAPI void APIENTRY glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glGetCompressedTexImage (GLenum, GLint, GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); -#endif - -#ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparate (GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glFogCoordf (GLfloat); -GLAPI void APIENTRY glFogCoordfv (const GLfloat *); -GLAPI void APIENTRY glFogCoordd (GLdouble); -GLAPI void APIENTRY glFogCoorddv (const GLdouble *); -GLAPI void APIENTRY glFogCoordPointer (GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glMultiDrawArrays (GLenum, GLint *, GLsizei *, GLsizei); -GLAPI void APIENTRY glMultiDrawElements (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -GLAPI void APIENTRY glPointParameterf (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfv (GLenum, const GLfloat *); -GLAPI void APIENTRY glPointParameteri (GLenum, GLint); -GLAPI void APIENTRY glPointParameteriv (GLenum, const GLint *); -GLAPI void APIENTRY glSecondaryColor3b (GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *); -GLAPI void APIENTRY glSecondaryColor3d (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *); -GLAPI void APIENTRY glSecondaryColor3f (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *); -GLAPI void APIENTRY glSecondaryColor3i (GLint, GLint, GLint); -GLAPI void APIENTRY glSecondaryColor3iv (const GLint *); -GLAPI void APIENTRY glSecondaryColor3s (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *); -GLAPI void APIENTRY glSecondaryColor3ub (GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *); -GLAPI void APIENTRY glSecondaryColor3ui (GLuint, GLuint, GLuint); -GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *); -GLAPI void APIENTRY glSecondaryColor3us (GLushort, GLushort, GLushort); -GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *); -GLAPI void APIENTRY glSecondaryColorPointer (GLint, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glWindowPos2d (GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos2dv (const GLdouble *); -GLAPI void APIENTRY glWindowPos2f (GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos2fv (const GLfloat *); -GLAPI void APIENTRY glWindowPos2i (GLint, GLint); -GLAPI void APIENTRY glWindowPos2iv (const GLint *); -GLAPI void APIENTRY glWindowPos2s (GLshort, GLshort); -GLAPI void APIENTRY glWindowPos2sv (const GLshort *); -GLAPI void APIENTRY glWindowPos3d (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos3dv (const GLdouble *); -GLAPI void APIENTRY glWindowPos3f (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos3fv (const GLfloat *); -GLAPI void APIENTRY glWindowPos3i (GLint, GLint, GLint); -GLAPI void APIENTRY glWindowPos3iv (const GLint *); -GLAPI void APIENTRY glWindowPos3s (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glWindowPos3sv (const GLshort *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); -#endif - -#ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueries (GLsizei, GLuint *); -GLAPI void APIENTRY glDeleteQueries (GLsizei, const GLuint *); -GLAPI GLboolean APIENTRY glIsQuery (GLuint); -GLAPI void APIENTRY glBeginQuery (GLenum, GLuint); -GLAPI void APIENTRY glEndQuery (GLenum); -GLAPI void APIENTRY glGetQueryiv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetQueryObjectiv (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetQueryObjectuiv (GLuint, GLenum, GLuint *); -GLAPI void APIENTRY glBindBuffer (GLenum, GLuint); -GLAPI void APIENTRY glDeleteBuffers (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenBuffers (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glIsBuffer (GLuint); -GLAPI void APIENTRY glBufferData (GLenum, GLsizeiptr, const GLvoid *, GLenum); -GLAPI void APIENTRY glBufferSubData (GLenum, GLintptr, GLsizeiptr, const GLvoid *); -GLAPI void APIENTRY glGetBufferSubData (GLenum, GLintptr, GLsizeiptr, GLvoid *); -GLAPI GLvoid* APIENTRY glMapBuffer (GLenum, GLenum); -GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum); -GLAPI void APIENTRY glGetBufferParameteriv (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetBufferPointerv (GLenum, GLenum, GLvoid* *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum); -GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *); -GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint); -GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint); -GLAPI void APIENTRY glAttachShader (GLuint, GLuint); -GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *); -GLAPI void APIENTRY glCompileShader (GLuint); -GLAPI GLuint APIENTRY glCreateProgram (void); -GLAPI GLuint APIENTRY glCreateShader (GLenum); -GLAPI void APIENTRY glDeleteProgram (GLuint); -GLAPI void APIENTRY glDeleteShader (GLuint); -GLAPI void APIENTRY glDetachShader (GLuint, GLuint); -GLAPI void APIENTRY glDisableVertexAttribArray (GLuint); -GLAPI void APIENTRY glEnableVertexAttribArray (GLuint); -GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); -GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *); -GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *); -GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *); -GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *); -GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *); -GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *); -GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *); -GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *); -GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *); -GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *); -GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *); -GLAPI GLboolean APIENTRY glIsProgram (GLuint); -GLAPI GLboolean APIENTRY glIsShader (GLuint); -GLAPI void APIENTRY glLinkProgram (GLuint); -GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *); -GLAPI void APIENTRY glUseProgram (GLuint); -GLAPI void APIENTRY glUniform1f (GLint, GLfloat); -GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform1i (GLint, GLint); -GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint); -GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glValidateProgram (GLuint); -GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble); -GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat); -GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort); -GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *); -GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *); -GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *); -GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *); -GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *); -GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *); -GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *); -GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *); -GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTextureARB (GLenum); -GLAPI void APIENTRY glClientActiveTextureARB (GLenum); -GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble); -GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat); -GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum, GLint); -GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort); -GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *); -GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *); -GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *); -GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *); -GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); -#endif - -#ifndef GL_ARB_transpose_matrix -#define GL_ARB_transpose_matrix 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *); -GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *); -GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *); -GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -#endif - -#ifndef GL_ARB_multisample -#define GL_ARB_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleCoverageARB (GLclampf, GLboolean); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); -#endif - -#ifndef GL_ARB_texture_env_add -#define GL_ARB_texture_env_add 1 -#endif - -#ifndef GL_ARB_texture_cube_map -#define GL_ARB_texture_cube_map 1 -#endif - -#ifndef GL_ARB_texture_compression -#define GL_ARB_texture_compression 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum, GLint, GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); -#endif - -#ifndef GL_ARB_texture_border_clamp -#define GL_ARB_texture_border_clamp 1 -#endif - -#ifndef GL_ARB_point_parameters -#define GL_ARB_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfARB (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfvARB (GLenum, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_ARB_vertex_blend -#define GL_ARB_vertex_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWeightbvARB (GLint, const GLbyte *); -GLAPI void APIENTRY glWeightsvARB (GLint, const GLshort *); -GLAPI void APIENTRY glWeightivARB (GLint, const GLint *); -GLAPI void APIENTRY glWeightfvARB (GLint, const GLfloat *); -GLAPI void APIENTRY glWeightdvARB (GLint, const GLdouble *); -GLAPI void APIENTRY glWeightubvARB (GLint, const GLubyte *); -GLAPI void APIENTRY glWeightusvARB (GLint, const GLushort *); -GLAPI void APIENTRY glWeightuivARB (GLint, const GLuint *); -GLAPI void APIENTRY glWeightPointerARB (GLint, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glVertexBlendARB (GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); -typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); -typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); -typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); -typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); -typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); -typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); -#endif - -#ifndef GL_ARB_matrix_palette -#define GL_ARB_matrix_palette 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint); -GLAPI void APIENTRY glMatrixIndexubvARB (GLint, const GLubyte *); -GLAPI void APIENTRY glMatrixIndexusvARB (GLint, const GLushort *); -GLAPI void APIENTRY glMatrixIndexuivARB (GLint, const GLuint *); -GLAPI void APIENTRY glMatrixIndexPointerARB (GLint, GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); -typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_ARB_texture_env_combine -#define GL_ARB_texture_env_combine 1 -#endif - -#ifndef GL_ARB_texture_env_crossbar -#define GL_ARB_texture_env_crossbar 1 -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_ARB_texture_env_dot3 1 -#endif - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_ARB_texture_mirrored_repeat 1 -#endif - -#ifndef GL_ARB_depth_texture -#define GL_ARB_depth_texture 1 -#endif - -#ifndef GL_ARB_shadow -#define GL_ARB_shadow 1 -#endif - -#ifndef GL_ARB_shadow_ambient -#define GL_ARB_shadow_ambient 1 -#endif - -#ifndef GL_ARB_window_pos -#define GL_ARB_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dARB (GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *); -GLAPI void APIENTRY glWindowPos2fARB (GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *); -GLAPI void APIENTRY glWindowPos2iARB (GLint, GLint); -GLAPI void APIENTRY glWindowPos2ivARB (const GLint *); -GLAPI void APIENTRY glWindowPos2sARB (GLshort, GLshort); -GLAPI void APIENTRY glWindowPos2svARB (const GLshort *); -GLAPI void APIENTRY glWindowPos3dARB (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *); -GLAPI void APIENTRY glWindowPos3fARB (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *); -GLAPI void APIENTRY glWindowPos3iARB (GLint, GLint, GLint); -GLAPI void APIENTRY glWindowPos3ivARB (const GLint *); -GLAPI void APIENTRY glWindowPos3sARB (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glWindowPos3svARB (const GLshort *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); -#endif - -#ifndef GL_ARB_vertex_program -#define GL_ARB_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttrib1dARB (GLuint, GLdouble); -GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib1fARB (GLuint, GLfloat); -GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib1sARB (GLuint, GLshort); -GLAPI void APIENTRY glVertexAttrib1svARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib2dARB (GLuint, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib2fARB (GLuint, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib2sARB (GLuint, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib2svARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib3dARB (GLuint, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib3fARB (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib3sARB (GLuint, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib3svARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint, const GLbyte *); -GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint, const GLint *); -GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint, const GLuint *); -GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint, const GLushort *); -GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint, const GLbyte *); -GLAPI void APIENTRY glVertexAttrib4dARB (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib4fARB (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint, const GLint *); -GLAPI void APIENTRY glVertexAttrib4sARB (GLuint, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib4svARB (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint, const GLuint *); -GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint, const GLushort *); -GLAPI void APIENTRY glVertexAttribPointerARB (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); -GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint); -GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint); -GLAPI void APIENTRY glProgramStringARB (GLenum, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glBindProgramARB (GLenum, GLuint); -GLAPI void APIENTRY glDeleteProgramsARB (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenProgramsARB (GLsizei, GLuint *); -GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum, GLuint, const GLdouble *); -GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum, GLuint, const GLfloat *); -GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum, GLuint, const GLdouble *); -GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum, GLuint, const GLfloat *); -GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum, GLuint, GLdouble *); -GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum, GLuint, GLfloat *); -GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum, GLuint, GLdouble *); -GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum, GLuint, GLfloat *); -GLAPI void APIENTRY glGetProgramivARB (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetProgramStringARB (GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint, GLenum, GLdouble *); -GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVertexAttribivARB (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint, GLenum, GLvoid* *); -GLAPI GLboolean APIENTRY glIsProgramARB (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); -#endif - -#ifndef GL_ARB_fragment_program -#define GL_ARB_fragment_program 1 -/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ -#endif - -#ifndef GL_ARB_vertex_buffer_object -#define GL_ARB_vertex_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindBufferARB (GLenum, GLuint); -GLAPI void APIENTRY glDeleteBuffersARB (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenBuffersARB (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glIsBufferARB (GLuint); -GLAPI void APIENTRY glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum); -GLAPI void APIENTRY glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *); -GLAPI void APIENTRY glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *); -GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum, GLenum); -GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum); -GLAPI void APIENTRY glGetBufferParameterivARB (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_ARB_occlusion_query -#define GL_ARB_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueriesARB (GLsizei, GLuint *); -GLAPI void APIENTRY glDeleteQueriesARB (GLsizei, const GLuint *); -GLAPI GLboolean APIENTRY glIsQueryARB (GLuint); -GLAPI void APIENTRY glBeginQueryARB (GLenum, GLuint); -GLAPI void APIENTRY glEndQueryARB (GLenum); -GLAPI void APIENTRY glGetQueryivARB (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetQueryObjectivARB (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint, GLenum, GLuint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -#ifndef GL_ARB_shader_objects -#define GL_ARB_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB); -GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum); -GLAPI void APIENTRY glDetachObjectARB (GLhandleARB, GLhandleARB); -GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum); -GLAPI void APIENTRY glShaderSourceARB (GLhandleARB, GLsizei, const GLcharARB* *, const GLint *); -GLAPI void APIENTRY glCompileShaderARB (GLhandleARB); -GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); -GLAPI void APIENTRY glAttachObjectARB (GLhandleARB, GLhandleARB); -GLAPI void APIENTRY glLinkProgramARB (GLhandleARB); -GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB); -GLAPI void APIENTRY glValidateProgramARB (GLhandleARB); -GLAPI void APIENTRY glUniform1fARB (GLint, GLfloat); -GLAPI void APIENTRY glUniform2fARB (GLint, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform3fARB (GLint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform4fARB (GLint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glUniform1iARB (GLint, GLint); -GLAPI void APIENTRY glUniform2iARB (GLint, GLint, GLint); -GLAPI void APIENTRY glUniform3iARB (GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glUniform4iARB (GLint, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glUniform1fvARB (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform2fvARB (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform3fvARB (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform4fvARB (GLint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glUniform1ivARB (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform2ivARB (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform3ivARB (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniform4ivARB (GLint, GLsizei, const GLint *); -GLAPI void APIENTRY glUniformMatrix2fvARB (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glUniformMatrix3fvARB (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glUniformMatrix4fvARB (GLint, GLsizei, GLboolean, const GLfloat *); -GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB, GLenum, GLfloat *); -GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB, GLenum, GLint *); -GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); -GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); -GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB, const GLcharARB *); -GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); -GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB, GLint, GLfloat *); -GLAPI void APIENTRY glGetUniformivARB (GLhandleARB, GLint, GLint *); -GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB, GLsizei, GLsizei *, GLcharARB *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); -typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); -typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); -typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); -typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#endif - -#ifndef GL_ARB_vertex_shader -#define GL_ARB_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB, GLuint, const GLcharARB *); -GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); -GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB, const GLcharARB *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -#endif - -#ifndef GL_ARB_fragment_shader -#define GL_ARB_fragment_shader 1 -#endif - -#ifndef GL_ARB_shading_language_100 -#define GL_ARB_shading_language_100 1 -#endif - -#ifndef GL_ARB_texture_non_power_of_two -#define GL_ARB_texture_non_power_of_two 1 -#endif - -#ifndef GL_ARB_point_sprite -#define GL_ARB_point_sprite 1 -#endif - -#ifndef GL_ARB_fragment_program_shadow -#define GL_ARB_fragment_program_shadow 1 -#endif - -#ifndef GL_ARB_draw_buffers -#define GL_ARB_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); -#endif - -#ifndef GL_ARB_texture_rectangle -#define GL_ARB_texture_rectangle 1 -#endif - -#ifndef GL_ARB_color_buffer_float -#define GL_ARB_color_buffer_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClampColorARB (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); -#endif - -#ifndef GL_ARB_half_float_pixel -#define GL_ARB_half_float_pixel 1 -#endif - -#ifndef GL_ARB_texture_float -#define GL_ARB_texture_float 1 -#endif - -#ifndef GL_ARB_pixel_buffer_object -#define GL_ARB_pixel_buffer_object 1 -#endif - -#ifndef GL_EXT_abgr -#define GL_EXT_abgr 1 -#endif - -#ifndef GL_EXT_blend_color -#define GL_EXT_blend_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColorEXT (GLclampf, GLclampf, GLclampf, GLclampf); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -#endif - -#ifndef GL_EXT_polygon_offset -#define GL_EXT_polygon_offset 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat, GLfloat); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); -#endif - -#ifndef GL_EXT_texture -#define GL_EXT_texture 1 -#endif - -#ifndef GL_EXT_texture3D -#define GL_EXT_texture3D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_SGIS_texture_filter4 -#define GL_SGIS_texture_filter4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum, GLenum, GLsizei, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); -typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#endif - -#ifndef GL_EXT_subtexture -#define GL_EXT_subtexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexSubImage1DEXT (GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_EXT_copy_texture -#define GL_EXT_copy_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); -GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); -GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei); -GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif - -#ifndef GL_EXT_histogram -#define GL_EXT_histogram 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetHistogramEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetMinmaxEXT (GLenum, GLboolean, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glHistogramEXT (GLenum, GLsizei, GLenum, GLboolean); -GLAPI void APIENTRY glMinmaxEXT (GLenum, GLenum, GLboolean); -GLAPI void APIENTRY glResetHistogramEXT (GLenum); -GLAPI void APIENTRY glResetMinmaxEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); -#endif - -#ifndef GL_EXT_convolution -#define GL_EXT_convolution 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum, GLenum, GLint); -GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum, GLenum, GLint, GLint, GLsizei); -GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); -GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); -GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -#endif - -#ifndef GL_EXT_color_matrix -#define GL_EXT_color_matrix 1 -#endif - -#ifndef GL_SGI_color_table -#define GL_SGI_color_table 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableSGI (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glColorTableParameterivSGI (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glCopyColorTableSGI (GLenum, GLenum, GLint, GLint, GLsizei); -GLAPI void APIENTRY glGetColorTableSGI (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum, GLenum, GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); -#endif - -#ifndef GL_SGIX_pixel_texture -#define GL_SGIX_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenSGIX (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); -#endif - -#ifndef GL_SGIS_pixel_texture -#define GL_SGIS_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum, GLint); -GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum, const GLint *); -GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum, GLfloat); -GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum, const GLfloat *); -GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum, GLint *); -GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); -#endif - -#ifndef GL_SGIS_texture4D -#define GL_SGIS_texture4D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage4DSGIS (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_SGI_texture_color_table -#define GL_SGI_texture_color_table 1 -#endif - -#ifndef GL_EXT_cmyka -#define GL_EXT_cmyka 1 -#endif - -#ifndef GL_EXT_texture_object -#define GL_EXT_texture_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei, const GLuint *, GLboolean *); -GLAPI void APIENTRY glBindTextureEXT (GLenum, GLuint); -GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenTexturesEXT (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint); -GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei, const GLuint *, const GLclampf *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); -typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#endif - -#ifndef GL_SGIS_detail_texture -#define GL_SGIS_detail_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum, GLsizei, const GLfloat *); -GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#endif - -#ifndef GL_SGIS_sharpen_texture -#define GL_SGIS_sharpen_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum, GLsizei, const GLfloat *); -GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#endif - -#ifndef GL_EXT_packed_pixels -#define GL_EXT_packed_pixels 1 -#endif - -#ifndef GL_SGIS_texture_lod -#define GL_SGIS_texture_lod 1 -#endif - -#ifndef GL_SGIS_multisample -#define GL_SGIS_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskSGIS (GLclampf, GLboolean); -GLAPI void APIENTRY glSamplePatternSGIS (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); -#endif - -#ifndef GL_EXT_rescale_normal -#define GL_EXT_rescale_normal 1 -#endif - -#ifndef GL_EXT_vertex_array -#define GL_EXT_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glArrayElementEXT (GLint); -GLAPI void APIENTRY glColorPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); -GLAPI void APIENTRY glDrawArraysEXT (GLenum, GLint, GLsizei); -GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei, GLsizei, const GLboolean *); -GLAPI void APIENTRY glGetPointervEXT (GLenum, GLvoid* *); -GLAPI void APIENTRY glIndexPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); -GLAPI void APIENTRY glNormalPointerEXT (GLenum, GLsizei, GLsizei, const GLvoid *); -GLAPI void APIENTRY glTexCoordPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); -GLAPI void APIENTRY glVertexPointerEXT (GLint, GLenum, GLsizei, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); -typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); -typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); -typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_misc_attribute -#define GL_EXT_misc_attribute 1 -#endif - -#ifndef GL_SGIS_generate_mipmap -#define GL_SGIS_generate_mipmap 1 -#endif - -#ifndef GL_SGIX_clipmap -#define GL_SGIX_clipmap 1 -#endif - -#ifndef GL_SGIX_shadow -#define GL_SGIX_shadow 1 -#endif - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_SGIS_texture_edge_clamp 1 -#endif - -#ifndef GL_SGIS_texture_border_clamp -#define GL_SGIS_texture_border_clamp 1 -#endif - -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_blend_subtract -#define GL_EXT_blend_subtract 1 -#endif - -#ifndef GL_EXT_blend_logic_op -#define GL_EXT_blend_logic_op 1 -#endif - -#ifndef GL_SGIX_interlace -#define GL_SGIX_interlace 1 -#endif - -#ifndef GL_SGIX_pixel_tiles -#define GL_SGIX_pixel_tiles 1 -#endif - -#ifndef GL_SGIX_texture_select -#define GL_SGIX_texture_select 1 -#endif - -#ifndef GL_SGIX_sprite -#define GL_SGIX_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum, GLfloat); -GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum, const GLfloat *); -GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum, GLint); -GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum, const GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_SGIX_texture_multi_buffer 1 -#endif - -#ifndef GL_EXT_point_parameters -#define GL_EXT_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfEXT (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfvEXT (GLenum, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_SGIS_point_parameters -#define GL_SGIS_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfSGIS (GLenum, GLfloat); -GLAPI void APIENTRY glPointParameterfvSGIS (GLenum, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_SGIX_instruments -#define GL_SGIX_instruments 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); -GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei, GLint *); -GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *); -GLAPI void APIENTRY glReadInstrumentsSGIX (GLint); -GLAPI void APIENTRY glStartInstrumentsSGIX (void); -GLAPI void APIENTRY glStopInstrumentsSGIX (GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); -typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); -typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); -typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); -#endif - -#ifndef GL_SGIX_texture_scale_bias -#define GL_SGIX_texture_scale_bias 1 -#endif - -#ifndef GL_SGIX_framezoom -#define GL_SGIX_framezoom 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameZoomSGIX (GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); -#endif - -#ifndef GL_SGIX_tag_sample_buffer -#define GL_SGIX_tag_sample_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTagSampleBufferSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); -#endif - -#ifndef GL_SGIX_polynomial_ffd -#define GL_SGIX_polynomial_ffd 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *); -GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *); -GLAPI void APIENTRY glDeformSGIX (GLbitfield); -GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); -#endif - -#ifndef GL_SGIX_reference_plane -#define GL_SGIX_reference_plane 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); -#endif - -#ifndef GL_SGIX_flush_raster -#define GL_SGIX_flush_raster 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushRasterSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); -#endif - -#ifndef GL_SGIX_depth_texture -#define GL_SGIX_depth_texture 1 -#endif - -#ifndef GL_SGIS_fog_function -#define GL_SGIS_fog_function 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogFuncSGIS (GLsizei, const GLfloat *); -GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); -#endif - -#ifndef GL_SGIX_fog_offset -#define GL_SGIX_fog_offset 1 -#endif - -#ifndef GL_HP_image_transform -#define GL_HP_image_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glImageTransformParameteriHP (GLenum, GLenum, GLint); -GLAPI void APIENTRY glImageTransformParameterfHP (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glImageTransformParameterivHP (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum, GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_HP_convolution_border_modes -#define GL_HP_convolution_border_modes 1 -#endif - -#ifndef GL_SGIX_texture_add_env -#define GL_SGIX_texture_add_env 1 -#endif - -#ifndef GL_EXT_color_subtable -#define GL_EXT_color_subtable 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum, GLsizei, GLint, GLint, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#endif - -#ifndef GL_PGI_vertex_hints -#define GL_PGI_vertex_hints 1 -#endif - -#ifndef GL_PGI_misc_hints -#define GL_PGI_misc_hints 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glHintPGI (GLenum, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); -#endif - -#ifndef GL_EXT_paletted_texture -#define GL_EXT_paletted_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); -GLAPI void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *); -GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_EXT_clip_volume_hint -#define GL_EXT_clip_volume_hint 1 -#endif - -#ifndef GL_SGIX_list_priority -#define GL_SGIX_list_priority 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetListParameterivSGIX (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glListParameterfSGIX (GLuint, GLenum, GLfloat); -GLAPI void APIENTRY glListParameterfvSGIX (GLuint, GLenum, const GLfloat *); -GLAPI void APIENTRY glListParameteriSGIX (GLuint, GLenum, GLint); -GLAPI void APIENTRY glListParameterivSGIX (GLuint, GLenum, const GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); -#endif - -#ifndef GL_SGIX_ir_instrument1 -#define GL_SGIX_ir_instrument1 1 -#endif - -#ifndef GL_SGIX_calligraphic_fragment -#define GL_SGIX_calligraphic_fragment 1 -#endif - -#ifndef GL_SGIX_texture_lod_bias -#define GL_SGIX_texture_lod_bias 1 -#endif - -#ifndef GL_SGIX_shadow_ambient -#define GL_SGIX_shadow_ambient 1 -#endif - -#ifndef GL_EXT_index_texture -#define GL_EXT_index_texture 1 -#endif - -#ifndef GL_EXT_index_material -#define GL_EXT_index_material 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexMaterialEXT (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); -#endif - -#ifndef GL_EXT_index_func -#define GL_EXT_index_func 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexFuncEXT (GLenum, GLclampf); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); -#endif - -#ifndef GL_EXT_index_array_formats -#define GL_EXT_index_array_formats 1 -#endif - -#ifndef GL_EXT_compiled_vertex_array -#define GL_EXT_compiled_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLockArraysEXT (GLint, GLsizei); -GLAPI void APIENTRY glUnlockArraysEXT (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); -#endif - -#ifndef GL_EXT_cull_vertex -#define GL_EXT_cull_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCullParameterdvEXT (GLenum, GLdouble *); -GLAPI void APIENTRY glCullParameterfvEXT (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); -#endif - -#ifndef GL_SGIX_ycrcb -#define GL_SGIX_ycrcb 1 -#endif - -#ifndef GL_SGIX_fragment_lighting -#define GL_SGIX_fragment_lighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum, GLenum); -GLAPI void APIENTRY glFragmentLightfSGIX (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glFragmentLightiSGIX (GLenum, GLenum, GLint); -GLAPI void APIENTRY glFragmentLightivSGIX (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum, GLfloat); -GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum, const GLfloat *); -GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum, GLint); -GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum, const GLint *); -GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum, GLenum, GLint); -GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glLightEnviSGIX (GLenum, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); -#endif - -#ifndef GL_IBM_rasterpos_clip -#define GL_IBM_rasterpos_clip 1 -#endif - -#ifndef GL_HP_texture_lighting -#define GL_HP_texture_lighting 1 -#endif - -#ifndef GL_EXT_draw_range_elements -#define GL_EXT_draw_range_elements 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -#endif - -#ifndef GL_WIN_phong_shading -#define GL_WIN_phong_shading 1 -#endif - -#ifndef GL_WIN_specular_fog -#define GL_WIN_specular_fog 1 -#endif - -#ifndef GL_EXT_light_texture -#define GL_EXT_light_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glApplyTextureEXT (GLenum); -GLAPI void APIENTRY glTextureLightEXT (GLenum); -GLAPI void APIENTRY glTextureMaterialEXT (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); -#endif - -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_SGIX_blend_alpha_minmax 1 -#endif - -#ifndef GL_EXT_bgra -#define GL_EXT_bgra 1 -#endif - -#ifndef GL_SGIX_async -#define GL_SGIX_async 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint); -GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *); -GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *); -GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei); -GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei); -GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); -typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); -typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); -typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); -#endif - -#ifndef GL_SGIX_async_pixel -#define GL_SGIX_async_pixel 1 -#endif - -#ifndef GL_SGIX_async_histogram -#define GL_SGIX_async_histogram 1 -#endif - -#ifndef GL_INTEL_parallel_arrays -#define GL_INTEL_parallel_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexPointervINTEL (GLint, GLenum, const GLvoid* *); -GLAPI void APIENTRY glNormalPointervINTEL (GLenum, const GLvoid* *); -GLAPI void APIENTRY glColorPointervINTEL (GLint, GLenum, const GLvoid* *); -GLAPI void APIENTRY glTexCoordPointervINTEL (GLint, GLenum, const GLvoid* *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -#endif - -#ifndef GL_HP_occlusion_test -#define GL_HP_occlusion_test 1 -#endif - -#ifndef GL_EXT_pixel_transform -#define GL_EXT_pixel_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum, GLenum, GLint); -GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum, GLenum, GLfloat); -GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum, GLenum, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_EXT_pixel_transform_color_table -#define GL_EXT_pixel_transform_color_table 1 -#endif - -#ifndef GL_EXT_shared_texture_palette -#define GL_EXT_shared_texture_palette 1 -#endif - -#ifndef GL_EXT_separate_specular_color -#define GL_EXT_separate_specular_color 1 -#endif - -#ifndef GL_EXT_secondary_color -#define GL_EXT_secondary_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *); -GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *); -GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *); -GLAPI void APIENTRY glSecondaryColor3iEXT (GLint, GLint, GLint); -GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *); -GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *); -GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *); -GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint, GLuint, GLuint); -GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *); -GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort, GLushort, GLushort); -GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *); -GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint, GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_texture_perturb_normal -#define GL_EXT_texture_perturb_normal 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureNormalEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); -GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif - -#ifndef GL_EXT_fog_coord -#define GL_EXT_fog_coord 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogCoordfEXT (GLfloat); -GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *); -GLAPI void APIENTRY glFogCoorddEXT (GLdouble); -GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *); -GLAPI void APIENTRY glFogCoordPointerEXT (GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_REND_screen_coordinates -#define GL_REND_screen_coordinates 1 -#endif - -#ifndef GL_EXT_coordinate_frame -#define GL_EXT_coordinate_frame 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTangent3bEXT (GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *); -GLAPI void APIENTRY glTangent3dEXT (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *); -GLAPI void APIENTRY glTangent3fEXT (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *); -GLAPI void APIENTRY glTangent3iEXT (GLint, GLint, GLint); -GLAPI void APIENTRY glTangent3ivEXT (const GLint *); -GLAPI void APIENTRY glTangent3sEXT (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glTangent3svEXT (const GLshort *); -GLAPI void APIENTRY glBinormal3bEXT (GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *); -GLAPI void APIENTRY glBinormal3dEXT (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *); -GLAPI void APIENTRY glBinormal3fEXT (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *); -GLAPI void APIENTRY glBinormal3iEXT (GLint, GLint, GLint); -GLAPI void APIENTRY glBinormal3ivEXT (const GLint *); -GLAPI void APIENTRY glBinormal3sEXT (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glBinormal3svEXT (const GLshort *); -GLAPI void APIENTRY glTangentPointerEXT (GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glBinormalPointerEXT (GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); -typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); -typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); -typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); -typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); -typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); -typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); -typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); -typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); -typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); -typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_texture_env_combine -#define GL_EXT_texture_env_combine 1 -#endif - -#ifndef GL_APPLE_specular_vector -#define GL_APPLE_specular_vector 1 -#endif - -#ifndef GL_APPLE_transform_hint -#define GL_APPLE_transform_hint 1 -#endif - -#ifndef GL_SGIX_fog_scale -#define GL_SGIX_fog_scale 1 -#endif - -#ifndef GL_SUNX_constant_data -#define GL_SUNX_constant_data 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFinishTextureSUNX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); -#endif - -#ifndef GL_SUN_global_alpha -#define GL_SUN_global_alpha 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte); -GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort); -GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint); -GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat); -GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble); -GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte); -GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort); -GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); -#endif - -#ifndef GL_SUN_triangle_list -#define GL_SUN_triangle_list 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint); -GLAPI void APIENTRY glReplacementCodeusSUN (GLushort); -GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte); -GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *); -GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *); -GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *); -GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum, GLsizei, const GLvoid* *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); -#endif - -#ifndef GL_SUN_vertex -#define GL_SUN_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat); -GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat, GLfloat, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *, const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint, GLubyte, GLubyte, GLubyte, GLubyte, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *, const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *, const GLfloat *, const GLfloat *, const GLfloat *, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -#endif - -#ifndef GL_EXT_blend_func_separate -#define GL_EXT_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum, GLenum, GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif - -#ifndef GL_INGR_blend_func_separate -#define GL_INGR_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum, GLenum, GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif - -#ifndef GL_INGR_color_clamp -#define GL_INGR_color_clamp 1 -#endif - -#ifndef GL_INGR_interlace_read -#define GL_INGR_interlace_read 1 -#endif - -#ifndef GL_EXT_stencil_wrap -#define GL_EXT_stencil_wrap 1 -#endif - -#ifndef GL_EXT_422_pixels -#define GL_EXT_422_pixels 1 -#endif - -#ifndef GL_NV_texgen_reflection -#define GL_NV_texgen_reflection 1 -#endif - -#ifndef GL_SUN_convolution_border_modes -#define GL_SUN_convolution_border_modes 1 -#endif - -#ifndef GL_EXT_texture_env_add -#define GL_EXT_texture_env_add 1 -#endif - -#ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 1 -#endif - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#endif - -#ifndef GL_EXT_vertex_weighting -#define GL_EXT_vertex_weighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexWeightfEXT (GLfloat); -GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *); -GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei, GLenum, GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_NV_light_max_exponent -#define GL_NV_light_max_exponent 1 -#endif - -#ifndef GL_NV_vertex_array_range -#define GL_NV_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); -GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); -#endif - -#ifndef GL_NV_register_combiners -#define GL_NV_register_combiners 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *); -GLAPI void APIENTRY glCombinerParameterfNV (GLenum, GLfloat); -GLAPI void APIENTRY glCombinerParameterivNV (GLenum, const GLint *); -GLAPI void APIENTRY glCombinerParameteriNV (GLenum, GLint); -GLAPI void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean); -GLAPI void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum, GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); -#endif - -#ifndef GL_NV_fog_distance -#define GL_NV_fog_distance 1 -#endif - -#ifndef GL_NV_texgen_emboss -#define GL_NV_texgen_emboss 1 -#endif - -#ifndef GL_NV_blend_square -#define GL_NV_blend_square 1 -#endif - -#ifndef GL_NV_texture_env_combine4 -#define GL_NV_texture_env_combine4 1 -#endif - -#ifndef GL_MESA_resize_buffers -#define GL_MESA_resize_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glResizeBuffersMESA (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); -#endif - -#ifndef GL_MESA_window_pos -#define GL_MESA_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dMESA (GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *); -GLAPI void APIENTRY glWindowPos2fMESA (GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *); -GLAPI void APIENTRY glWindowPos2iMESA (GLint, GLint); -GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *); -GLAPI void APIENTRY glWindowPos2sMESA (GLshort, GLshort); -GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *); -GLAPI void APIENTRY glWindowPos3dMESA (GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *); -GLAPI void APIENTRY glWindowPos3fMESA (GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *); -GLAPI void APIENTRY glWindowPos3iMESA (GLint, GLint, GLint); -GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *); -GLAPI void APIENTRY glWindowPos3sMESA (GLshort, GLshort, GLshort); -GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *); -GLAPI void APIENTRY glWindowPos4dMESA (GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *); -GLAPI void APIENTRY glWindowPos4fMESA (GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *); -GLAPI void APIENTRY glWindowPos4iMESA (GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *); -GLAPI void APIENTRY glWindowPos4sMESA (GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); -#endif - -#ifndef GL_IBM_cull_vertex -#define GL_IBM_cull_vertex 1 -#endif - -#ifndef GL_IBM_multimode_draw_arrays -#define GL_IBM_multimode_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint); -GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *, const GLsizei *, GLenum, const GLvoid* const *, GLsizei, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); -#endif - -#ifndef GL_IBM_vertex_array_lists -#define GL_IBM_vertex_array_lists 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint, const GLboolean* *, GLint); -GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glIndexPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glNormalPointerListIBM (GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glTexCoordPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); -GLAPI void APIENTRY glVertexPointerListIBM (GLint, GLenum, GLint, const GLvoid* *, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -#endif - -#ifndef GL_SGIX_subsample -#define GL_SGIX_subsample 1 -#endif - -#ifndef GL_SGIX_ycrcba -#define GL_SGIX_ycrcba 1 -#endif - -#ifndef GL_SGIX_ycrcb_subsample -#define GL_SGIX_ycrcb_subsample 1 -#endif - -#ifndef GL_SGIX_depth_pass_instrument -#define GL_SGIX_depth_pass_instrument 1 -#endif - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_3DFX_texture_compression_FXT1 1 -#endif - -#ifndef GL_3DFX_multisample -#define GL_3DFX_multisample 1 -#endif - -#ifndef GL_3DFX_tbuffer -#define GL_3DFX_tbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTbufferMask3DFX (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); -#endif - -#ifndef GL_EXT_multisample -#define GL_EXT_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskEXT (GLclampf, GLboolean); -GLAPI void APIENTRY glSamplePatternEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); -#endif - -#ifndef GL_SGIX_vertex_preclip -#define GL_SGIX_vertex_preclip 1 -#endif - -#ifndef GL_SGIX_convolution_accuracy -#define GL_SGIX_convolution_accuracy 1 -#endif - -#ifndef GL_SGIX_resample -#define GL_SGIX_resample 1 -#endif - -#ifndef GL_SGIS_point_line_texgen -#define GL_SGIS_point_line_texgen 1 -#endif - -#ifndef GL_SGIS_texture_color_mask -#define GL_SGIS_texture_color_mask 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GLboolean); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#endif - -#ifndef GL_SGIX_igloo_interface -#define GL_SGIX_igloo_interface 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); -#endif - -#ifndef GL_EXT_texture_env_dot3 -#define GL_EXT_texture_env_dot3 1 -#endif - -#ifndef GL_ATI_texture_mirror_once -#define GL_ATI_texture_mirror_once 1 -#endif - -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenFencesNV (GLsizei, GLuint *); -GLAPI GLboolean APIENTRY glIsFenceNV (GLuint); -GLAPI GLboolean APIENTRY glTestFenceNV (GLuint); -GLAPI void APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glFinishFenceNV (GLuint); -GLAPI void APIENTRY glSetFenceNV (GLuint, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -#ifndef GL_NV_evaluators -#define GL_NV_evaluators 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLint, GLint, GLboolean, const GLvoid *); -GLAPI void APIENTRY glMapParameterivNV (GLenum, GLenum, const GLint *); -GLAPI void APIENTRY glMapParameterfvNV (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glGetMapControlPointsNV (GLenum, GLuint, GLenum, GLsizei, GLsizei, GLboolean, GLvoid *); -GLAPI void APIENTRY glGetMapParameterivNV (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGetMapParameterfvNV (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum, GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glEvalMapsNV (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); -#endif - -#ifndef GL_NV_packed_depth_stencil -#define GL_NV_packed_depth_stencil 1 -#endif - -#ifndef GL_NV_register_combiners2 -#define GL_NV_register_combiners2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum, GLenum, const GLfloat *); -GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum, GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_NV_texture_compression_vtc -#define GL_NV_texture_compression_vtc 1 -#endif - -#ifndef GL_NV_texture_rectangle -#define GL_NV_texture_rectangle 1 -#endif - -#ifndef GL_NV_texture_shader -#define GL_NV_texture_shader 1 -#endif - -#ifndef GL_NV_texture_shader2 -#define GL_NV_texture_shader2 1 -#endif - -#ifndef GL_NV_vertex_array_range2 -#define GL_NV_vertex_array_range2 1 -#endif - -#ifndef GL_NV_vertex_program -#define GL_NV_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei, const GLuint *, GLboolean *); -GLAPI void APIENTRY glBindProgramNV (GLenum, GLuint); -GLAPI void APIENTRY glDeleteProgramsNV (GLsizei, const GLuint *); -GLAPI void APIENTRY glExecuteProgramNV (GLenum, GLuint, const GLfloat *); -GLAPI void APIENTRY glGenProgramsNV (GLsizei, GLuint *); -GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum, GLuint, GLenum, GLdouble *); -GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum, GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetProgramivNV (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetProgramStringNV (GLuint, GLenum, GLubyte *); -GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum, GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint, GLenum, GLdouble *); -GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVertexAttribivNV (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint, GLenum, GLvoid* *); -GLAPI GLboolean APIENTRY glIsProgramNV (GLuint); -GLAPI void APIENTRY glLoadProgramNV (GLenum, GLuint, GLsizei, const GLubyte *); -GLAPI void APIENTRY glProgramParameter4dNV (GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glProgramParameter4dvNV (GLenum, GLuint, const GLdouble *); -GLAPI void APIENTRY glProgramParameter4fNV (GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glProgramParameter4fvNV (GLenum, GLuint, const GLfloat *); -GLAPI void APIENTRY glProgramParameters4dvNV (GLenum, GLuint, GLuint, const GLdouble *); -GLAPI void APIENTRY glProgramParameters4fvNV (GLenum, GLuint, GLuint, const GLfloat *); -GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei, const GLuint *); -GLAPI void APIENTRY glTrackMatrixNV (GLenum, GLuint, GLenum, GLenum); -GLAPI void APIENTRY glVertexAttribPointerNV (GLuint, GLint, GLenum, GLsizei, const GLvoid *); -GLAPI void APIENTRY glVertexAttrib1dNV (GLuint, GLdouble); -GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib1fNV (GLuint, GLfloat); -GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib1sNV (GLuint, GLshort); -GLAPI void APIENTRY glVertexAttrib1svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib2dNV (GLuint, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib2fNV (GLuint, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib2sNV (GLuint, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib2svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib3dNV (GLuint, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib3fNV (GLuint, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib3sNV (GLuint, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib3svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4dNV (GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint, const GLdouble *); -GLAPI void APIENTRY glVertexAttrib4fNV (GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint, const GLfloat *); -GLAPI void APIENTRY glVertexAttrib4sNV (GLuint, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexAttrib4svNV (GLuint, const GLshort *); -GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint, const GLubyte *); -GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glVertexAttribs1svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glVertexAttribs2svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glVertexAttribs3svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint, GLsizei, const GLdouble *); -GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint, GLsizei, const GLfloat *); -GLAPI void APIENTRY glVertexAttribs4svNV (GLuint, GLsizei, const GLshort *); -GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint, GLsizei, const GLubyte *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); -typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat *v); -typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); -#endif - -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_SGIX_texture_coordinate_clamp 1 -#endif - -#ifndef GL_SGIX_scalebias_hint -#define GL_SGIX_scalebias_hint 1 -#endif - -#ifndef GL_OML_interlace -#define GL_OML_interlace 1 -#endif - -#ifndef GL_OML_subsample -#define GL_OML_subsample 1 -#endif - -#ifndef GL_OML_resample -#define GL_OML_resample 1 -#endif - -#ifndef GL_NV_copy_depth_to_color -#define GL_NV_copy_depth_to_color 1 -#endif - -#ifndef GL_ATI_envmap_bumpmap -#define GL_ATI_envmap_bumpmap 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBumpParameterivATI (GLenum, const GLint *); -GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum, GLint *); -GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); -#endif - -#ifndef GL_ATI_fragment_shader -#define GL_ATI_fragment_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint); -GLAPI void APIENTRY glBindFragmentShaderATI (GLuint); -GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint); -GLAPI void APIENTRY glBeginFragmentShaderATI (void); -GLAPI void APIENTRY glEndFragmentShaderATI (void); -GLAPI void APIENTRY glPassTexCoordATI (GLuint, GLuint, GLenum); -GLAPI void APIENTRY glSampleMapATI (GLuint, GLuint, GLenum); -GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint, const GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); -typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); -typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); -#endif - -#ifndef GL_ATI_pn_triangles -#define GL_ATI_pn_triangles 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPNTrianglesiATI (GLenum, GLint); -GLAPI void APIENTRY glPNTrianglesfATI (GLenum, GLfloat); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); -#endif - -#ifndef GL_ATI_vertex_array_object -#define GL_ATI_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei, const GLvoid *, GLenum); -GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint); -GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint, GLuint, GLsizei, const GLvoid *, GLenum); -GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetObjectBufferivATI (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glFreeObjectBufferATI (GLuint); -GLAPI void APIENTRY glArrayObjectATI (GLenum, GLint, GLenum, GLsizei, GLuint, GLuint); -GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum, GLenum, GLfloat *); -GLAPI void APIENTRY glGetArrayObjectivATI (GLenum, GLenum, GLint *); -GLAPI void APIENTRY glVariantArrayObjectATI (GLuint, GLenum, GLsizei, GLuint, GLuint); -GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint, GLenum, GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); -typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); -#endif - -#ifndef GL_EXT_vertex_shader -#define GL_EXT_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVertexShaderEXT (void); -GLAPI void APIENTRY glEndVertexShaderEXT (void); -GLAPI void APIENTRY glBindVertexShaderEXT (GLuint); -GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint); -GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint); -GLAPI void APIENTRY glShaderOp1EXT (GLenum, GLuint, GLuint); -GLAPI void APIENTRY glShaderOp2EXT (GLenum, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glShaderOp3EXT (GLenum, GLuint, GLuint, GLuint, GLuint); -GLAPI void APIENTRY glSwizzleEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glWriteMaskEXT (GLuint, GLuint, GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glInsertComponentEXT (GLuint, GLuint, GLuint); -GLAPI void APIENTRY glExtractComponentEXT (GLuint, GLuint, GLuint); -GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum, GLenum, GLenum, GLuint); -GLAPI void APIENTRY glSetInvariantEXT (GLuint, GLenum, const GLvoid *); -GLAPI void APIENTRY glSetLocalConstantEXT (GLuint, GLenum, const GLvoid *); -GLAPI void APIENTRY glVariantbvEXT (GLuint, const GLbyte *); -GLAPI void APIENTRY glVariantsvEXT (GLuint, const GLshort *); -GLAPI void APIENTRY glVariantivEXT (GLuint, const GLint *); -GLAPI void APIENTRY glVariantfvEXT (GLuint, const GLfloat *); -GLAPI void APIENTRY glVariantdvEXT (GLuint, const GLdouble *); -GLAPI void APIENTRY glVariantubvEXT (GLuint, const GLubyte *); -GLAPI void APIENTRY glVariantusvEXT (GLuint, const GLushort *); -GLAPI void APIENTRY glVariantuivEXT (GLuint, const GLuint *); -GLAPI void APIENTRY glVariantPointerEXT (GLuint, GLenum, GLuint, const GLvoid *); -GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint); -GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint); -GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum, GLenum); -GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum, GLenum); -GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum, GLenum, GLenum); -GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum, GLenum); -GLAPI GLuint APIENTRY glBindParameterEXT (GLenum); -GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint, GLenum); -GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint, GLenum, GLboolean *); -GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVariantPointervEXT (GLuint, GLenum, GLvoid* *); -GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint, GLenum, GLboolean *); -GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint, GLenum, GLboolean *); -GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint, GLenum, GLfloat *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); -typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); -typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); -typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); -typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); -typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); -typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); -typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); -typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); -typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); -typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); -typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); -typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); -typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); -typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -#endif - -#ifndef GL_ATI_vertex_streams -#define GL_ATI_vertex_streams 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexStream1sATI (GLenum, GLshort); -GLAPI void APIENTRY glVertexStream1svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream1iATI (GLenum, GLint); -GLAPI void APIENTRY glVertexStream1ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream1fATI (GLenum, GLfloat); -GLAPI void APIENTRY glVertexStream1fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream1dATI (GLenum, GLdouble); -GLAPI void APIENTRY glVertexStream1dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream2sATI (GLenum, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream2svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream2iATI (GLenum, GLint, GLint); -GLAPI void APIENTRY glVertexStream2ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream2fATI (GLenum, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream2fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream2dATI (GLenum, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream2dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream3sATI (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream3svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream3iATI (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glVertexStream3ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream3fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream3dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glVertexStream4sATI (GLenum, GLshort, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glVertexStream4svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glVertexStream4iATI (GLenum, GLint, GLint, GLint, GLint); -GLAPI void APIENTRY glVertexStream4ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glVertexStream4fATI (GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glVertexStream4fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glVertexStream4dATI (GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glVertexStream4dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glNormalStream3bATI (GLenum, GLbyte, GLbyte, GLbyte); -GLAPI void APIENTRY glNormalStream3bvATI (GLenum, const GLbyte *); -GLAPI void APIENTRY glNormalStream3sATI (GLenum, GLshort, GLshort, GLshort); -GLAPI void APIENTRY glNormalStream3svATI (GLenum, const GLshort *); -GLAPI void APIENTRY glNormalStream3iATI (GLenum, GLint, GLint, GLint); -GLAPI void APIENTRY glNormalStream3ivATI (GLenum, const GLint *); -GLAPI void APIENTRY glNormalStream3fATI (GLenum, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glNormalStream3fvATI (GLenum, const GLfloat *); -GLAPI void APIENTRY glNormalStream3dATI (GLenum, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glNormalStream3dvATI (GLenum, const GLdouble *); -GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum); -GLAPI void APIENTRY glVertexBlendEnviATI (GLenum, GLint); -GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum, GLfloat); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); -#endif - -#ifndef GL_ATI_element_array -#define GL_ATI_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerATI (GLenum, const GLvoid *); -GLAPI void APIENTRY glDrawElementArrayATI (GLenum, GLsizei); -GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum, GLuint, GLuint, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); -#endif - -#ifndef GL_SUN_mesh_array -#define GL_SUN_mesh_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum, GLint, GLsizei, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); -#endif - -#ifndef GL_SUN_slice_accum -#define GL_SUN_slice_accum 1 -#endif - -#ifndef GL_NV_multisample_filter_hint -#define GL_NV_multisample_filter_hint 1 -#endif - -#ifndef GL_NV_depth_clamp -#define GL_NV_depth_clamp 1 -#endif - -#ifndef GL_NV_occlusion_query -#define GL_NV_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei, GLuint *); -GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei, const GLuint *); -GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint); -GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint); -GLAPI void APIENTRY glEndOcclusionQueryNV (void); -GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint, GLenum, GLint *); -GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint, GLenum, GLuint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -#ifndef GL_NV_point_sprite -#define GL_NV_point_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameteriNV (GLenum, GLint); -GLAPI void APIENTRY glPointParameterivNV (GLenum, const GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_NV_texture_shader3 -#define GL_NV_texture_shader3 1 -#endif - -#ifndef GL_NV_vertex_program1_1 -#define GL_NV_vertex_program1_1 1 -#endif - -#ifndef GL_EXT_shadow_funcs -#define GL_EXT_shadow_funcs 1 -#endif - -#ifndef GL_EXT_stencil_two_side -#define GL_EXT_stencil_two_side 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); -#endif - -#ifndef GL_ATI_text_fragment_shader -#define GL_ATI_text_fragment_shader 1 -#endif - -#ifndef GL_APPLE_client_storage -#define GL_APPLE_client_storage 1 -#endif - -#ifndef GL_APPLE_element_array -#define GL_APPLE_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerAPPLE (GLenum, const GLvoid *); -GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum, GLint, GLsizei); -GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, GLint, GLsizei); -GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum, const GLint *, const GLsizei *, GLsizei); -GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum, GLuint, GLuint, const GLint *, const GLsizei *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#endif - -#ifndef GL_APPLE_fence -#define GL_APPLE_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenFencesAPPLE (GLsizei, GLuint *); -GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei, const GLuint *); -GLAPI void APIENTRY glSetFenceAPPLE (GLuint); -GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint); -GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint); -GLAPI void APIENTRY glFinishFenceAPPLE (GLuint); -GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum, GLuint); -GLAPI void APIENTRY glFinishObjectAPPLE (GLenum, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); -typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); -typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); -#endif - -#ifndef GL_APPLE_vertex_array_object -#define GL_APPLE_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint); -GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *); -GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); -#endif - -#ifndef GL_APPLE_vertex_array_range -#define GL_APPLE_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei, GLvoid *); -GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei, GLvoid *); -GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum, GLint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); -#endif - -#ifndef GL_APPLE_ycbcr_422 -#define GL_APPLE_ycbcr_422 1 -#endif - -#ifndef GL_S3_s3tc -#define GL_S3_s3tc 1 -#endif - -#ifndef GL_ATI_draw_buffers -#define GL_ATI_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); -#endif - -#ifndef GL_ATI_pixel_format_float -#define GL_ATI_pixel_format_float 1 -/* This is really a WGL extension, but defines some associated GL enums. - * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. - */ -#endif - -#ifndef GL_ATI_texture_env_combine3 -#define GL_ATI_texture_env_combine3 1 -#endif - -#ifndef GL_ATI_texture_float -#define GL_ATI_texture_float 1 -#endif - -#ifndef GL_NV_float_buffer -#define GL_NV_float_buffer 1 -#endif - -#ifndef GL_NV_fragment_program -#define GL_NV_fragment_program 1 -/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat); -GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble); -GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint, GLsizei, const GLubyte *, const GLfloat *); -GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint, GLsizei, const GLubyte *, const GLdouble *); -GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint, GLsizei, const GLubyte *, GLfloat *); -GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint, GLsizei, const GLubyte *, GLdouble *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#endif - -#ifndef GL_NV_half_float -#define GL_NV_half_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertex2hNV (GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *); -GLAPI void APIENTRY glVertex3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glVertex4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *); -GLAPI void APIENTRY glNormal3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glColor4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *); -GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV); -GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *); -GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *); -GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *); -GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum, GLhalfNV); -GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum, const GLhalfNV *); -GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum, const GLhalfNV *); -GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum, const GLhalfNV *); -GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum, const GLhalfNV *); -GLAPI void APIENTRY glFogCoordhNV (GLhalfNV); -GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *); -GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *); -GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV); -GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *); -GLAPI void APIENTRY glVertexAttrib1hNV (GLuint, GLhalfNV); -GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttrib2hNV (GLuint, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttrib3hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttrib4hNV (GLuint, GLhalfNV, GLhalfNV, GLhalfNV, GLhalfNV); -GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint, GLsizei, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint, GLsizei, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint, GLsizei, const GLhalfNV *); -GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint, GLsizei, const GLhalfNV *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); -typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); -typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -#endif - -#ifndef GL_NV_pixel_data_range -#define GL_NV_pixel_data_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelDataRangeNV (GLenum, GLsizei, GLvoid *); -GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); -#endif - -#ifndef GL_NV_primitive_restart -#define GL_NV_primitive_restart 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPrimitiveRestartNV (void); -GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); -#endif - -#ifndef GL_NV_texture_expand_normal -#define GL_NV_texture_expand_normal 1 -#endif - -#ifndef GL_NV_vertex_program2 -#define GL_NV_vertex_program2 1 -#endif - -#ifndef GL_ATI_map_object_buffer -#define GL_ATI_map_object_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint); -GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); -#endif - -#ifndef GL_ATI_separate_stencil -#define GL_ATI_separate_stencil 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpSeparateATI (GLenum, GLenum, GLenum, GLenum); -GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum, GLenum, GLint, GLuint); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#endif - -#ifndef GL_ATI_vertex_attrib_array_object -#define GL_ATI_vertex_attrib_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint, GLint, GLenum, GLboolean, GLsizei, GLuint, GLuint); -GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint, GLenum, GLfloat *); -GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint, GLenum, GLint *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); -#endif - -#ifndef GL_OES_read_format -#define GL_OES_read_format 1 -#endif - -#ifndef GL_EXT_depth_bounds_test -#define GL_EXT_depth_bounds_test 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthBoundsEXT (GLclampd, GLclampd); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_EXT_texture_mirror_clamp 1 -#endif - -#ifndef GL_EXT_blend_equation_separate -#define GL_EXT_blend_equation_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum, GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); -#endif - -#ifndef GL_MESA_pack_invert -#define GL_MESA_pack_invert 1 -#endif - -#ifndef GL_MESA_ycbcr_texture -#define GL_MESA_ycbcr_texture 1 -#endif - -#ifndef GL_EXT_pixel_buffer_object -#define GL_EXT_pixel_buffer_object 1 -#endif - -#ifndef GL_NV_fragment_program_option -#define GL_NV_fragment_program_option 1 -#endif - -#ifndef GL_NV_fragment_program2 -#define GL_NV_fragment_program2 1 -#endif - -#ifndef GL_NV_vertex_program2_option -#define GL_NV_vertex_program2_option 1 -#endif - -#ifndef GL_NV_vertex_program3 -#define GL_NV_vertex_program3 1 -#endif - -#ifndef GL_EXT_framebuffer_object -#define GL_EXT_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint); -GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint); -GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *); -GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei); -GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *); -GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint); -GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint); -GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *); -GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *); -GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum); -GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint); -GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint); -GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint); -GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint); -GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *); -GLAPI void APIENTRY glGenerateMipmapEXT (GLenum); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); -#endif - -#ifndef GL_GREMEDY_string_marker -#define GL_GREMEDY_string_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); -#endif - - -#ifdef __cplusplus -} -#endif - -#endif -#endif /* NO_SDL_GLEXT */ diff --git a/src/osd/modules/opengl/osd_opengl.h b/src/osd/modules/opengl/osd_opengl.h index 5e843543f46..26f577f343e 100644 --- a/src/osd/modules/opengl/osd_opengl.h +++ b/src/osd/modules/opengl/osd_opengl.h @@ -20,7 +20,11 @@ #ifdef OSD_WINDOWS #ifdef _MSC_VER #include <windows.h> - #include "SDL1211_opengl.h" + #include "GL/GL.h" + #include "bgfx/3rdparty/khronos/gl/glext.h " + #ifndef USE_DISPATCH_GL + #include "bgfx/3rdparty/khronos/wgl/wglext.h" + #endif #else #include "GL/gl.h" #include "GL/glext.h" @@ -29,28 +33,14 @@ #endif #endif #else - #if (SDLMAME_SDL2) #include <SDL2/SDL_version.h> - #else - #include <SDL/SDL_version.h> - #endif #if (SDL_VERSION_ATLEAST(1,2,10)) #if defined(SDLMAME_WIN32) // Avoid that winnt.h (included via sdl_opengl.h, windows.h, windef.h includes intrin.h #define __INTRIN_H_ #endif - #if (SDLMAME_SDL2) #include <SDL2/SDL_opengl.h> - #else - #include <SDL/SDL_opengl.h> - #endif - #else - /* - * SDL 1.2.9 does not provide everything we need - * We therefore distribute it ourselves - */ - #include "SDL1211_opengl.h" #endif #endif diff --git a/src/osd/modules/osdwindow.h b/src/osd/modules/osdwindow.h index be4f016f0f9..d4c2a4101cc 100644 --- a/src/osd/modules/osdwindow.h +++ b/src/osd/modules/osdwindow.h @@ -37,7 +37,9 @@ public: #else m_hwnd(0), m_dc(0), m_focus_hwnd(0), m_resize_state(0), #endif - m_primlist(NULL), + m_primlist(nullptr), + m_index(0), + m_main(nullptr), m_prescale(1) {} virtual ~osd_window() { } @@ -55,12 +57,8 @@ public: #ifdef OSD_SDL virtual osd_dim blit_surface_size() = 0; virtual osd_monitor_info *monitor() const = 0; -#if (SDLMAME_SDL2) virtual SDL_Window *sdl_window() = 0; #else - virtual SDL_Surface *sdl_surface() = 0; -#endif -#else virtual osd_monitor_info *monitor() const = 0; virtual bool win_has_menu() = 0; // FIXME: cann we replace winwindow_video_window_monitor(NULL) with monitor() ? @@ -78,6 +76,8 @@ public: render_primitive_list *m_primlist; osd_window_config m_win_config; + int m_index; + osd_window *m_main; protected: int m_prescale; }; diff --git a/src/osd/modules/render/bgfx/fs_line.sc b/src/osd/modules/render/bgfx/fs_line.sc new file mode 100644 index 00000000000..1fcd3b27284 --- /dev/null +++ b/src/osd/modules/render/bgfx/fs_line.sc @@ -0,0 +1,11 @@ +$input v_color0 + +// license:BSD-3-Clause +// copyright-holders:Dario Manesku + +#include "../../../../../3rdparty/bgfx/examples/common/common.sh" + +void main() +{ + gl_FragColor = v_color0; +} diff --git a/src/osd/modules/render/bgfx/fs_quad.sc b/src/osd/modules/render/bgfx/fs_quad.sc new file mode 100644 index 00000000000..1fcd3b27284 --- /dev/null +++ b/src/osd/modules/render/bgfx/fs_quad.sc @@ -0,0 +1,11 @@ +$input v_color0 + +// license:BSD-3-Clause +// copyright-holders:Dario Manesku + +#include "../../../../../3rdparty/bgfx/examples/common/common.sh" + +void main() +{ + gl_FragColor = v_color0; +} diff --git a/src/osd/modules/render/bgfx/fs_quad_texture.sc b/src/osd/modules/render/bgfx/fs_quad_texture.sc new file mode 100644 index 00000000000..5a45a056171 --- /dev/null +++ b/src/osd/modules/render/bgfx/fs_quad_texture.sc @@ -0,0 +1,14 @@ +$input v_color0, v_texcoord0 + +// license:BSD-3-Clause +// copyright-holders:Dario Manesku + +#include "../../../../../3rdparty/bgfx/examples/common/common.sh" + +SAMPLER2D(s_tex, 0); + +void main() +{ + vec4 texel = texture2D(s_tex, v_texcoord0); + gl_FragColor = texel * v_color0; +} diff --git a/src/osd/modules/render/bgfx/makefile b/src/osd/modules/render/bgfx/makefile new file mode 100644 index 00000000000..86735a61c38 --- /dev/null +++ b/src/osd/modules/render/bgfx/makefile @@ -0,0 +1,13 @@ +BGFX_DIR=../../../../../3rdparty/bgfx +RUNTIME_DIR=../../../../.. +BUILD_DIR=../../../../../build + +include $(BGFX_DIR)/scripts/shader.mk + +rebuild: + @make -s --no-print-directory TARGET=0 clean all + @make -s --no-print-directory TARGET=1 clean all + @make -s --no-print-directory TARGET=2 clean all + @make -s --no-print-directory TARGET=3 clean all + @make -s --no-print-directory TARGET=4 clean all + @make -s --no-print-directory TARGET=5 clean all diff --git a/src/osd/modules/render/bgfx/varying.def.sc b/src/osd/modules/render/bgfx/varying.def.sc new file mode 100644 index 00000000000..4745725e015 --- /dev/null +++ b/src/osd/modules/render/bgfx/varying.def.sc @@ -0,0 +1,7 @@ +vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); +vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); +vec3 v_pos : TEXCOORD1 = vec3(0.0, 0.0, 0.0); + +vec3 a_position : POSITION; +vec4 a_color0 : COLOR0; +vec2 a_texcoord0 : TEXCOORD0; diff --git a/src/osd/modules/render/bgfx/vs_line.sc b/src/osd/modules/render/bgfx/vs_line.sc new file mode 100644 index 00000000000..874ffcf46ac --- /dev/null +++ b/src/osd/modules/render/bgfx/vs_line.sc @@ -0,0 +1,13 @@ +$input a_position, a_color0 +$output v_color0 + +// license:BSD-3-Clause +// copyright-holders:Dario Manesku + +#include "../../../../../3rdparty/bgfx/examples/common/common.sh" + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/vs_quad.sc b/src/osd/modules/render/bgfx/vs_quad.sc new file mode 100644 index 00000000000..84e23c5a09b --- /dev/null +++ b/src/osd/modules/render/bgfx/vs_quad.sc @@ -0,0 +1,13 @@ +$input a_position, a_color0 +$output v_color0 + +// license:BSD-3-Clause +// copyright-holders:Dario Manesku + +#include "../../../../../3rdparty/bgfx/examples/common/common.sh" + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/bgfx/vs_quad_texture.sc b/src/osd/modules/render/bgfx/vs_quad_texture.sc new file mode 100644 index 00000000000..c3699f6fbd9 --- /dev/null +++ b/src/osd/modules/render/bgfx/vs_quad_texture.sc @@ -0,0 +1,14 @@ +$input a_position, a_texcoord0, a_color0 +$output v_texcoord0, v_color0 + +// license:BSD-3-Clause +// copyright-holders:Dario Manesku + +#include "../../../../../3rdparty/bgfx/examples/common/common.sh" + +void main() +{ + gl_Position = mul(u_viewProj, vec4(a_position.xy, 0.0, 1.0)); + v_texcoord0 = a_texcoord0; + v_color0 = a_color0; +} diff --git a/src/osd/modules/render/binpacker.cpp b/src/osd/modules/render/binpacker.cpp new file mode 100644 index 00000000000..2054dfa54cf --- /dev/null +++ b/src/osd/modules/render/binpacker.cpp @@ -0,0 +1,195 @@ +// license:BSD-3-Clause +// copyright-holders:Ryan Holtz +//============================================================ +// +// binpacker.cpp - Simple texture packer for dynamic atlasing +// +//============================================================ + +#include "binpacker.h" +#include <algorithm> + +bool rectangle_packer::pack(const std::vector<packable_rectangle>& rects, std::vector<std::vector<packed_rectangle>>& packs, int pack_size) +{ + clear(); + + m_pack_size = pack_size; + + // Add rects to member array, and check to make sure none is too big + for (size_t rect = 0; rect < rects.size(); rect++) + { + m_rects.push_back(rectangle(0, 0, rects[rect].width(), rects[rect].height(), rects[rect].hash(), rects[rect].format(), rects[rect].rowpixels(), rects[rect].palette(), rects[rect].base())); + } + + // Sort from greatest to least area + std::sort(m_rects.rbegin(), m_rects.rend()); + + // Pack + while (m_num_packed < (int)m_rects.size()) + { + int i = m_packs.size(); + m_packs.push_back(rectangle(m_pack_size)); + m_roots.push_back(i); + if (!fill(i)) + { + return false; + } + } + + // Write out + packs.resize(m_roots.size()); + for (size_t i = 0; i < m_roots.size(); ++i) + { + packs[i].clear(); + add_pack_to_array(m_roots[i], packs[i]); + } + + return true; +} + +void rectangle_packer::clear() +{ + m_pack_size = 0; + m_num_packed = 0; + m_rects.clear(); + m_packs.clear(); + m_roots.clear(); +} + +bool rectangle_packer::fill(int pack) +{ + // For each rect + for (size_t rect = 0; rect < m_rects.size(); ++rect) + { + // If it's not already packed + if (!m_rects[rect].packed) + { + // If it fits in the current working area + if (fits(m_rects[rect], m_packs[pack])) + { + // Store in lower-left of working area, split, and recurse + m_num_packed++; + split(pack, rect); + fill(m_packs[pack].children[0]); + fill(m_packs[pack].children[1]); + return true; + } + } + } + return false; +} + +void rectangle_packer::split(int pack, int rect) +{ + // Split the working area either horizontally or vertically with respect + // to the rect we're storing, such that we get the largest possible child + // area. + + rectangle left = m_packs[pack]; + rectangle right = m_packs[pack]; + rectangle bottom = m_packs[pack]; + rectangle top = m_packs[pack]; + + left.y += m_rects[rect].h; + left.w = m_rects[rect].w; + left.h -= m_rects[rect].h; + + right.x += m_rects[rect].w; + right.w -= m_rects[rect].w; + + bottom.x += m_rects[rect].w; + bottom.h = m_rects[rect].h; + bottom.w -= m_rects[rect].w; + + top.y += m_rects[rect].h; + top.h -= m_rects[rect].h; + + int max_lr_area = left.get_area(); + if (right.get_area() > max_lr_area) + { + max_lr_area = right.get_area(); + } + + int max_bt_area = bottom.get_area(); + if (top.get_area() > max_bt_area) + { + max_bt_area = top.get_area(); + } + + if (max_lr_area > max_bt_area) + { + if (left.get_area() > right.get_area()) + { + m_packs.push_back(left); + m_packs.push_back(right); + } + else + { + m_packs.push_back(right); + m_packs.push_back(left); + } + } + else + { + if (bottom.get_area() > top.get_area()) + { + m_packs.push_back(bottom); + m_packs.push_back(top); + } + else + { + m_packs.push_back(top); + m_packs.push_back(bottom); + } + } + + // This pack area now represents the rect we've just stored, so save the + // relevant info to it, and assign children. + m_packs[pack].w = m_rects[rect].w; + m_packs[pack].h = m_rects[rect].h; + m_packs[pack].hash = m_rects[rect].hash; + m_packs[pack].format = m_rects[rect].format; + m_packs[pack].rowpixels = m_rects[rect].rowpixels; + m_packs[pack].palette = m_rects[rect].palette; + m_packs[pack].base = m_rects[rect].base; + m_packs[pack].children[0] = m_packs.size() - 2; + m_packs[pack].children[1] = m_packs.size() - 1; + + // Done with the rect + m_rects[rect].packed = true; + +} + +bool rectangle_packer::fits(rectangle& rect1, const rectangle& rect2) +{ + // Check to see if rect1 fits in rect2 + + if (rect1.w <= rect2.w && rect1.h <= rect2.h) + { + return true; + } + else + { + return false; + } +} + +void rectangle_packer::add_pack_to_array(int pack, std::vector<packed_rectangle>& array) const +{ + if (m_packs[pack].hash != 0) + { + array.push_back(packed_rectangle(m_packs[pack].hash, m_packs[pack].format, + m_packs[pack].w, m_packs[pack].h, m_packs[pack].x, m_packs[pack].y, + m_packs[pack].rowpixels, m_packs[pack].palette, m_packs[pack].base)); + + if (m_packs[pack].children[0] != -1) + { + add_pack_to_array(m_packs[pack].children[0], array); + } + + if (m_packs[pack].children[1] != -1) + { + add_pack_to_array(m_packs[pack].children[1], array); + } + } +} diff --git a/src/osd/modules/render/binpacker.h b/src/osd/modules/render/binpacker.h new file mode 100644 index 00000000000..677083b5c09 --- /dev/null +++ b/src/osd/modules/render/binpacker.h @@ -0,0 +1,183 @@ +#pragma once + +#ifndef __RECTPACKER_H__ +#define __RECTPACKER_H__ + +#include "emu.h" + +#include <vector> + +class rectangle_packer +{ +public: + // The input and output are in terms of vectors of ints to avoid + // dependencies (although I suppose a public member struct could have been + // used). The parameters are: + + // packs : After packing, the outer array contains the packs (therefore + // the number of packs is packs.size()). Each inner array contains a + // sequence of sets of 3 ints. Each set represents a rectangle in the + // pack. The elements in the set are 1) the rect ID, 2) the x position + // of the rect with respect to the pack, and 3) the y position of the rect + // with respect to the pack. The widths and heights of the rects are not + // included, as it's assumed they are stored on the caller's side (they + // were after all the input to the function). + + class packable_rectangle + { + public: + packable_rectangle() : m_hash(0), m_width(-1), m_height(-1) { } + packable_rectangle(UINT32 hash, UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base) + : m_hash(hash) + , m_format(format) + , m_width(width) + , m_height(height) + , m_rowpixels(rowpixels) + , m_palette(palette) + , m_base(base) + { + } + + UINT32 hash() const { return m_hash; } + UINT32 format() const { return m_format; } + int width() const { return m_width; } + int height() const { return m_height; } + int rowpixels() const { return m_rowpixels; } + const rgb_t* palette() const { return m_palette; } + void* base() const { return m_base; } + + private: + UINT32 m_hash; + UINT32 m_format; + int m_width; + int m_height; + int m_rowpixels; + const rgb_t* m_palette; + void* m_base; + }; + + class packed_rectangle + { + public: + packed_rectangle() : m_hash(0), m_format(0), m_width(-1), m_height(-1), m_x(-1), m_y(-1), m_rowpixels(0), m_palette(nullptr), m_base(nullptr) { } + packed_rectangle(const packed_rectangle& rect) + : m_hash(rect.m_hash) + , m_format(rect.m_format) + , m_width(rect.m_width) + , m_height(rect.m_height) + , m_x(rect.m_x) + , m_y(rect.m_y) + , m_rowpixels(rect.m_rowpixels) + , m_palette(rect.m_palette) + , m_base(rect.m_base) + { + } + packed_rectangle(UINT32 hash, UINT32 format, int width, int height, int x, int y, int rowpixels, const rgb_t *palette, void *base) + : m_hash(hash) + , m_format(format) + , m_width(width) + , m_height(height) + , m_x(x) + , m_y(y) + , m_rowpixels(rowpixels) + , m_palette(palette) + , m_base(base) + { + } + + UINT32 hash() const { return m_hash; } + UINT32 format() const { return m_format; } + int width() const { return m_width; } + int height() const { return m_height; } + int x() const { return m_x; } + int y() const { return m_y; } + int rowpixels() const { return m_rowpixels; } + const rgb_t* palette() const { return m_palette; } + void* base() const { return m_base; } + + private: + UINT32 m_hash; + UINT32 m_format; + int m_width; + int m_height; + int m_x; + int m_y; + int m_rowpixels; + const rgb_t* m_palette; + void* m_base; + }; + + bool pack(const std::vector<packable_rectangle>& rects, std::vector<std::vector<packed_rectangle>>& packs, int pack_size); + +private: + struct rectangle + { + rectangle(int size) + : x(0) + , y(0) + , w(size) + , h(size) + , hash(-1) + , format(0) + , rowpixels(0) + , palette(nullptr) + , base(nullptr) + , packed(false) + { + children[0] = -1; + children[1] = -1; + } + + rectangle(int x, int y, int w, int h, int hash, UINT32 format, int rowpixels, const rgb_t *palette, void *base) + : x(x) + , y(y) + , w(w) + , h(h) + , hash(hash) + , format(format) + , rowpixels(rowpixels) + , palette(palette) + , base(base) + , packed(false) + { + children[0] = -1; + children[1] = -1; + } + + int get_area() const + { + return w * h; + } + + bool operator<(const rectangle& rect) const + { + return get_area() < rect.get_area(); + } + + int x; + int y; + int w; + int h; + int hash; + UINT32 format; + int rowpixels; + const rgb_t* palette; + void* base; + int children[2]; + bool packed; + }; + + void clear(); + bool fill(int pack); + void split(int pack, int rect); + bool fits(rectangle& rect1, const rectangle& rect2); + void add_pack_to_array(int pack, std::vector<packed_rectangle>& array) const; + + int m_pack_size; + int m_num_packed; + std::vector<rectangle> m_rects; + std::vector<rectangle> m_packs; + std::vector<int> m_roots; +}; + +#endif // __RECTPACKER_H__
\ No newline at end of file diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index 7284eaabaa6..3ffcee44707 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -1457,9 +1457,9 @@ int shaders::downsample_pass(render_target *rt, int source_index, poly_info *pol curr_effect->update_uniforms(); int bloom_index = 0; - float bloom_size = (d3d->get_width() < d3d->get_height()) ? d3d->get_width() : d3d->get_height(); - float bloom_width = d3d->get_width(); - float bloom_height = d3d->get_height(); + float bloom_width = rt->target_width; + float bloom_height = rt->target_height; + float bloom_size = bloom_width < bloom_height ? bloom_width : bloom_height; for (; bloom_size >= 2.0f && bloom_index < 11; bloom_size *= 0.5f) { bloom_dims[bloom_index][0] = (float)(int)bloom_width; diff --git a/src/osd/modules/render/draw13.cpp b/src/osd/modules/render/draw13.cpp index f357d567e71..320cc9f3a62 100644 --- a/src/osd/modules/render/draw13.cpp +++ b/src/osd/modules/render/draw13.cpp @@ -203,12 +203,6 @@ private: INT32 m_blittimer; -#if (SDLMAME_SDL2) - //SDL_GLContext m_gl_context_id; -#else - // SDL surface - SDL_Surface *m_sdlsurf; -#endif simple_list<texture_info> m_texlist; // list of active textures @@ -601,32 +595,6 @@ static void drawsdl2_exit(void) //============================================================ // sdl_info::create -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a //============================================================ static void drawsdl_show_info(struct SDL_RendererInfo *render_info) @@ -661,7 +629,6 @@ static void drawsdl_show_info(struct SDL_RendererInfo *render_info) int sdl_info13::create() { -#if (SDLMAME_SDL2) // create renderer /* Enable bilinear filtering in case it is supported. @@ -699,9 +666,6 @@ int sdl_info13::create() SDL_GetRendererInfo(m_sdl_renderer, &render_info); drawsdl_show_info(&render_info); -#else - -#endif return 0; } diff --git a/src/osd/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp index ee808bfc197..9d751c9f816 100644 --- a/src/osd/modules/render/drawbgfx.cpp +++ b/src/osd/modules/render/drawbgfx.cpp @@ -1,8 +1,8 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic +// copyright-holders:Miodrag Milanovic,Ryan Holtz,Dario Manesku,Branimir Karadzic,Aaron Giles //============================================================ // -// drawbgfx.c - BGFX drawer +// drawbgfx.cpp - BGFX renderer // //============================================================ #define __STDC_LIMIT_MACROS @@ -14,11 +14,7 @@ #define WIN32_LEAN_AND_MEAN #include <windows.h> #if defined(SDLMAME_WIN32) -#if (SDLMAME_SDL2) #include <SDL2/SDL_syswm.h> -#else -#include <SDL/SDL_syswm.h> -#endif #endif #else #include "sdlinc.h" @@ -30,6 +26,11 @@ #include <bgfx/bgfxplatform.h> #include <bgfx/bgfx.h> +#include <bx/fpumath.h> +#include <bx/readerwriter.h> +#include <algorithm> + +#include "drawbgfx.h" //============================================================ // DEBUGGING @@ -43,6 +44,8 @@ // MACROS //============================================================ +#define GIBBERISH (0) + //============================================================ // INLINES //============================================================ @@ -53,67 +56,6 @@ //============================================================ -/* sdl_info is the information about SDL for the current screen */ -class renderer_bgfx : public osd_renderer -{ -public: - renderer_bgfx(osd_window *w) - : osd_renderer(w, FLAG_NONE), m_blittimer(0), - m_blit_dim(0, 0), - m_last_hofs(0), m_last_vofs(0), - m_last_blit_time(0), m_last_blit_pixels(0) - {} - - virtual int create() override; - virtual int draw(const int update) override; -#ifdef OSD_SDL - virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override; -#else - virtual void save() override { } - virtual void record() override { } - virtual void toggle_fsfx() override { } -#endif - virtual void destroy() override; - virtual render_primitive_list *get_primitives() override - { -#ifdef OSD_WINDOWS - RECT client; - GetClientRect(window().m_hwnd, &client); - window().target()->set_bounds(rect_width(&client), rect_height(&client), window().aspect()); - return &window().target()->get_primitives(); -#else - osd_dim nd = window().blit_surface_size(); - if (nd != m_blit_dim) - { - m_blit_dim = nd; - notify_changed(); - } - window().target()->set_bounds(m_blit_dim.width(), m_blit_dim.height(), window().aspect()); - return &window().target()->get_primitives(); -#endif - } - - // void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y); - - //texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup); - //texture_info *texture_update(const render_primitive &prim); - - INT32 m_blittimer; - - //simple_list<texture_info> m_texlist; // list of active textures - - osd_dim m_blit_dim; - float m_last_hofs; - float m_last_vofs; - - // Stats - INT64 m_last_blit_time; - INT64 m_last_blit_pixels; - - // Original display_mode -}; - - //============================================================ // PROTOTYPES //============================================================ @@ -150,36 +92,85 @@ int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks) static void drawbgfx_exit(void) { + // Shutdown bgfx. + bgfx::shutdown(); } //============================================================ // renderer_bgfx::create //============================================================ +bgfx::ProgramHandle loadProgram(const char* _vsName, const char* _fsName); + + +#ifdef OSD_SDL +static void* sdlNativeWindowHandle(SDL_Window* _window) +{ + SDL_SysWMinfo wmi; + SDL_VERSION(&wmi.version); + if (!SDL_GetWindowWMInfo(_window, &wmi)) + { + return nullptr; + } + +# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD + return (void*)wmi.info.x11.window; +# elif BX_PLATFORM_OSX + return wmi.info.cocoa.window; +# elif BX_PLATFORM_WINDOWS + return wmi.info.win.window; +# elif BX_PLATFORM_STEAMLINK + return wmi.info.vivante.window; +# elif BX_PLATFORM_EMSCRIPTEN + return nullptr; +# endif // BX_PLATFORM_ +} +#endif int renderer_bgfx::create() { // create renderer + osd_dim wdim = window().get_size(); + if (window().m_index == 0) + { #ifdef OSD_WINDOWS - RECT client; - GetClientRect(window().m_hwnd, &client); - - bgfx::winSetHwnd(window().m_hwnd); - bgfx::init(); - bgfx::reset(rect_width(&client), rect_height(&client), BGFX_RESET_VSYNC); + bgfx::winSetHwnd(window().m_hwnd); #else - osd_dim d = window().get_size(); - m_blittimer = 3; - - bgfx::sdlSetWindow(window().sdl_window()); - bgfx::init(); - bgfx::reset(d.width(), d.height(), BGFX_RESET_VSYNC); + bgfx::sdlSetWindow(window().sdl_window()); +#endif + bgfx::init(); + bgfx::reset(wdim.width(), wdim.height(), video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE); + // Enable debug text. + bgfx::setDebug(BGFX_DEBUG_TEXT); //BGFX_DEBUG_STATS + m_dimensions = osd_dim(wdim.width(), wdim.height()); + } + else + { +#ifdef OSD_WINDOWS + fbh = bgfx::createFrameBuffer(window().m_hwnd, wdim.width(), wdim.height()); +#else + fbh = bgfx::createFrameBuffer(sdlNativeWindowHandle(window().sdl_window()), wdim.width(), wdim.height()); #endif + bgfx::touch(window().m_index); + } + + ScreenVertex::init(); + + // Create program from shaders. + m_progQuad = loadProgram("vs_quad", "fs_quad"); + m_progQuadTexture = loadProgram("vs_quad_texture", "fs_quad_texture"); + m_s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1); + + uint32_t flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP | BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT; + m_texture_cache = bgfx::createTexture2D(CACHE_SIZE, CACHE_SIZE, 1, bgfx::TextureFormat::RGBA8, flags); + + const bgfx::Memory* memory = bgfx::alloc(sizeof(uint32_t) * CACHE_SIZE * CACHE_SIZE); + memset(memory->data, 0, sizeof(uint32_t) * CACHE_SIZE * CACHE_SIZE); + bgfx::updateTexture2D(m_texture_cache, 0, 0, 0, CACHE_SIZE, CACHE_SIZE, memory, CACHE_SIZE * sizeof(uint32_t)); - // Enable debug text. - bgfx::setDebug(BGFX_DEBUG_STATS);// BGFX_DEBUG_TEXT); + memset(m_white, 0xff, sizeof(uint32_t) * 16 * 16); + m_texinfo.push_back(rectangle_packer::packable_rectangle(WHITE_HASH, PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32), 16, 16, 16, nullptr, m_white)); - osd_printf_verbose("Leave drawsdl2_window_create\n"); return 0; } @@ -189,12 +180,14 @@ int renderer_bgfx::create() void renderer_bgfx::destroy() { - // free the memory in the window - - // destroy_all_textures(); - - // Shutdown bgfx. - bgfx::shutdown(); + if (window().m_index > 0) + { + bgfx::destroyFrameBuffer(fbh); + } + bgfx::destroyUniform(m_s_texColor); + // Cleanup. + bgfx::destroyProgram(m_progQuad); + bgfx::destroyProgram(m_progQuadTexture); } @@ -205,133 +198,973 @@ void renderer_bgfx::destroy() #ifdef OSD_SDL int renderer_bgfx::xy_to_render_target(int x, int y, int *xt, int *yt) { - *xt = x - m_last_hofs; - *yt = y - m_last_vofs; - if (*xt<0 || *xt >= m_blit_dim.width()) + *xt = x; + *yt = y; + if (*xt<0 || *xt >= m_dimensions.width()) return 0; - if (*yt<0 || *yt >= m_blit_dim.height()) + if (*yt<0 || *yt >= m_dimensions.height()) return 0; return 1; } #endif +static const bgfx::Memory* loadMem(bx::FileReaderI* _reader, const char* _filePath) +{ + if (bx::open(_reader, _filePath)) + { + uint32_t size = (uint32_t)bx::getSize(_reader); + const bgfx::Memory* mem = bgfx::alloc(size + 1); + bx::read(_reader, mem->data, size); + bx::close(_reader); + mem->data[mem->size - 1] = '\0'; + return mem; + } + + return nullptr; +} +static bgfx::ShaderHandle loadShader(bx::FileReaderI* _reader, const char* _name) +{ + char filePath[512]; + + const char* shaderPath = "shaders/dx9/"; + + switch (bgfx::getRendererType()) + { + case bgfx::RendererType::Direct3D11: + case bgfx::RendererType::Direct3D12: + shaderPath = "shaders/dx11/"; + break; + + case bgfx::RendererType::OpenGL: + shaderPath = "shaders/glsl/"; + break; + + case bgfx::RendererType::Metal: + shaderPath = "shaders/metal/"; + break; + + case bgfx::RendererType::OpenGLES: + shaderPath = "shaders/gles/"; + break; + + default: + break; + } + + strcpy(filePath, shaderPath); + strcat(filePath, _name); + strcat(filePath, ".bin"); + + return bgfx::createShader(loadMem(_reader, filePath)); +} + +bgfx::ProgramHandle renderer_bgfx::loadProgram(bx::FileReaderI* _reader, const char* _vsName, const char* _fsName) +{ + bgfx::ShaderHandle vsh = loadShader(_reader, _vsName); + bgfx::ShaderHandle fsh = BGFX_INVALID_HANDLE; + if (nullptr != _fsName) + { + fsh = loadShader(_reader, _fsName); + } + + return bgfx::createProgram(vsh, fsh, true /* destroy shaders when program is destroyed */); +} +static auto s_fileReader = new bx::CrtFileReader; + +bgfx::ProgramHandle renderer_bgfx::loadProgram(const char* _vsName, const char* _fsName) +{ + return loadProgram(s_fileReader, _vsName, _fsName); +} + //============================================================ // drawbgfx_window_draw //============================================================ +bgfx::VertexDecl renderer_bgfx::ScreenVertex::ms_decl; + +void renderer_bgfx::put_packed_quad(render_primitive *prim, UINT32 hash, ScreenVertex* vertex) +{ + rectangle_packer::packed_rectangle& rect = m_hash_to_entry[hash]; + float u0 = float(rect.x()) / float(CACHE_SIZE); + float v0 = float(rect.y()) / float(CACHE_SIZE); + float u1 = u0 + float(rect.width()) / float(CACHE_SIZE); + float v1 = v0 + float(rect.height()) / float(CACHE_SIZE); + u1 -= 0.5f / float(CACHE_SIZE); + v1 -= 0.5f / float(CACHE_SIZE); + u0 += 0.5f / float(CACHE_SIZE); + v0 += 0.5f / float(CACHE_SIZE); + UINT32 rgba = u32Color(prim->color.r * 255, prim->color.g * 255, prim->color.b * 255, prim->color.a * 255); + + float x[4] = { prim->bounds.x0, prim->bounds.x1, prim->bounds.x0, prim->bounds.x1 }; + float y[4] = { prim->bounds.y0, prim->bounds.y0, prim->bounds.y1, prim->bounds.y1 }; + float u[4] = { u0, u1, u0, u1 }; + float v[4] = { v0, v0, v1, v1 }; + + if (PRIMFLAG_GET_TEXORIENT(prim->flags) & ORIENTATION_SWAP_XY) + { + std::swap(u[1], u[2]); + std::swap(v[1], v[2]); + } + + if (PRIMFLAG_GET_TEXORIENT(prim->flags) & ORIENTATION_FLIP_X) + { + std::swap(u[0], u[1]); + std::swap(v[0], v[1]); + std::swap(u[2], u[3]); + std::swap(v[2], v[3]); + } + + if (PRIMFLAG_GET_TEXORIENT(prim->flags) & ORIENTATION_FLIP_Y) + { + std::swap(u[0], u[2]); + std::swap(v[0], v[2]); + std::swap(u[1], u[3]); + std::swap(v[1], v[3]); + } + + vertex[0].m_x = x[0]; // 0 + vertex[0].m_y = y[0]; + vertex[0].m_z = 0; + vertex[0].m_rgba = rgba; + vertex[0].m_u = u[0]; + vertex[0].m_v = v[0]; + + vertex[1].m_x = x[1]; // 1 + vertex[1].m_y = y[1]; + vertex[1].m_z = 0; + vertex[1].m_rgba = rgba; + vertex[1].m_u = u[1]; + vertex[1].m_v = v[1]; + + vertex[2].m_x = x[3]; // 3 + vertex[2].m_y = y[3]; + vertex[2].m_z = 0; + vertex[2].m_rgba = rgba; + vertex[2].m_u = u[3]; + vertex[2].m_v = v[3]; + + vertex[3].m_x = x[3]; // 3 + vertex[3].m_y = y[3]; + vertex[3].m_z = 0; + vertex[3].m_rgba = rgba; + vertex[3].m_u = u[3]; + vertex[3].m_v = v[3]; + + vertex[4].m_x = x[2]; // 2 + vertex[4].m_y = y[2]; + vertex[4].m_z = 0; + vertex[4].m_rgba = rgba; + vertex[4].m_u = u[2]; + vertex[4].m_v = v[2]; + + vertex[5].m_x = x[0]; // 0 + vertex[5].m_y = y[0]; + vertex[5].m_z = 0; + vertex[5].m_rgba = rgba; + vertex[5].m_u = u[0]; + vertex[5].m_v = v[0]; +} + +void renderer_bgfx::render_textured_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer) +{ + ScreenVertex* vertex = (ScreenVertex*)buffer->data; + + UINT32 rgba = u32Color(prim->color.r * 255, prim->color.g * 255, prim->color.b * 255, prim->color.a * 255); + + vertex[0].m_x = prim->bounds.x0; + vertex[0].m_y = prim->bounds.y0; + vertex[0].m_z = 0; + vertex[0].m_rgba = rgba; + vertex[0].m_u = prim->texcoords.tl.u; + vertex[0].m_v = prim->texcoords.tl.v; + + vertex[1].m_x = prim->bounds.x1; + vertex[1].m_y = prim->bounds.y0; + vertex[1].m_z = 0; + vertex[1].m_rgba = rgba; + vertex[1].m_u = prim->texcoords.tr.u; + vertex[1].m_v = prim->texcoords.tr.v; + + vertex[2].m_x = prim->bounds.x1; + vertex[2].m_y = prim->bounds.y1; + vertex[2].m_z = 0; + vertex[2].m_rgba = rgba; + vertex[2].m_u = prim->texcoords.br.u; + vertex[2].m_v = prim->texcoords.br.v; + + vertex[3].m_x = prim->bounds.x1; + vertex[3].m_y = prim->bounds.y1; + vertex[3].m_z = 0; + vertex[3].m_rgba = rgba; + vertex[3].m_u = prim->texcoords.br.u; + vertex[3].m_v = prim->texcoords.br.v; + + vertex[4].m_x = prim->bounds.x0; + vertex[4].m_y = prim->bounds.y1; + vertex[4].m_z = 0; + vertex[4].m_rgba = rgba; + vertex[4].m_u = prim->texcoords.bl.u; + vertex[4].m_v = prim->texcoords.bl.v; + + vertex[5].m_x = prim->bounds.x0; + vertex[5].m_y = prim->bounds.y0; + vertex[5].m_z = 0; + vertex[5].m_rgba = rgba; + vertex[5].m_u = prim->texcoords.tl.u; + vertex[5].m_v = prim->texcoords.tl.v; + bgfx::setVertexBuffer(buffer); + + uint32_t texture_flags = BGFX_TEXTURE_U_CLAMP | BGFX_TEXTURE_V_CLAMP; + if (video_config.filter == 0) + { + texture_flags |= BGFX_TEXTURE_MIN_POINT | BGFX_TEXTURE_MAG_POINT | BGFX_TEXTURE_MIP_POINT; + } + + const bgfx::Memory* mem = mame_texture_data_to_bgfx_texture_data(prim->flags & PRIMFLAG_TEXFORMAT_MASK, + prim->texture.width, prim->texture.height, prim->texture.rowpixels, prim->texture.palette, prim->texture.base); + + bgfx::TextureHandle texture = bgfx::createTexture2D((uint16_t)prim->texture.width, (uint16_t)prim->texture.height, 1, bgfx::TextureFormat::RGBA8, texture_flags, mem); + + bgfx::setTexture(0, m_s_texColor, texture); + + set_bgfx_state(PRIMFLAG_GET_BLENDMODE(prim->flags)); + bgfx::submit(view, m_progQuadTexture); + + bgfx::destroyTexture(texture); +} + +#define MAX_TEMP_COORDS 100 + +void renderer_bgfx::put_polygon(const float* coords, UINT32 num_coords, float r, UINT32 rgba, ScreenVertex* vertex) +{ + float tempCoords[MAX_TEMP_COORDS * 3]; + float tempNormals[MAX_TEMP_COORDS * 2]; + + rectangle_packer::packed_rectangle& rect = m_hash_to_entry[WHITE_HASH]; + float u0 = float(rect.x()) / float(CACHE_SIZE); + float v0 = float(rect.y()) / float(CACHE_SIZE); + + num_coords = num_coords < MAX_TEMP_COORDS ? num_coords : MAX_TEMP_COORDS; + + for (uint32_t ii = 0, jj = num_coords - 1; ii < num_coords; jj = ii++) + { + const float* v0 = &coords[jj * 3]; + const float* v1 = &coords[ii * 3]; + float dx = v1[0] - v0[0]; + float dy = v1[1] - v0[1]; + float d = sqrtf(dx * dx + dy * dy); + if (d > 0) + { + d = 1.0f / d; + dx *= d; + dy *= d; + } + + tempNormals[jj * 2 + 0] = dy; + tempNormals[jj * 2 + 1] = -dx; + } + + for (uint32_t ii = 0, jj = num_coords - 1; ii < num_coords; jj = ii++) + { + float dlx0 = tempNormals[jj * 2 + 0]; + float dly0 = tempNormals[jj * 2 + 1]; + float dlx1 = tempNormals[ii * 2 + 0]; + float dly1 = tempNormals[ii * 2 + 1]; + float dmx = (dlx0 + dlx1) * 0.5f; + float dmy = (dly0 + dly1) * 0.5f; + float dmr2 = dmx * dmx + dmy * dmy; + if (dmr2 > 0.000001f) + { + float scale = 1.0f / dmr2; + if (scale > 10.0f) + { + scale = 10.0f; + } + + dmx *= scale; + dmy *= scale; + } + + tempCoords[ii * 3 + 0] = coords[ii * 3 + 0] + dmx * r; + tempCoords[ii * 3 + 1] = coords[ii * 3 + 1] + dmy * r; + tempCoords[ii * 3 + 2] = coords[ii * 3 + 2]; + } + + int vertIndex = 0; + UINT32 trans = rgba & 0x00ffffff; + for (uint32_t ii = 0, jj = num_coords - 1; ii < num_coords; jj = ii++) + { + vertex[vertIndex].m_x = coords[ii * 3 + 0]; + vertex[vertIndex].m_y = coords[ii * 3 + 1]; + vertex[vertIndex].m_z = coords[ii * 3 + 2]; + vertex[vertIndex].m_rgba = rgba; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + + vertex[vertIndex].m_x = coords[jj * 3 + 0]; + vertex[vertIndex].m_y = coords[jj * 3 + 1]; + vertex[vertIndex].m_z = coords[jj * 3 + 2]; + vertex[vertIndex].m_rgba = rgba; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + + vertex[vertIndex].m_x = tempCoords[jj * 3 + 0]; + vertex[vertIndex].m_y = tempCoords[jj * 3 + 1]; + vertex[vertIndex].m_z = tempCoords[jj * 3 + 2]; + vertex[vertIndex].m_rgba = trans; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + + vertex[vertIndex].m_x = tempCoords[jj * 3 + 0]; + vertex[vertIndex].m_y = tempCoords[jj * 3 + 1]; + vertex[vertIndex].m_z = tempCoords[jj * 3 + 2]; + vertex[vertIndex].m_rgba = trans; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + + vertex[vertIndex].m_x = tempCoords[ii * 3 + 0]; + vertex[vertIndex].m_y = tempCoords[ii * 3 + 1]; + vertex[vertIndex].m_z = tempCoords[ii * 3 + 2]; + vertex[vertIndex].m_rgba = trans; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + + vertex[vertIndex].m_x = coords[ii * 3 + 0]; + vertex[vertIndex].m_y = coords[ii * 3 + 1]; + vertex[vertIndex].m_z = coords[ii * 3 + 2]; + vertex[vertIndex].m_rgba = rgba; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + } + + for (uint32_t ii = 2; ii < num_coords; ++ii) + { + vertex[vertIndex].m_x = coords[0]; + vertex[vertIndex].m_y = coords[1]; + vertex[vertIndex].m_z = coords[2]; + vertex[vertIndex].m_rgba = rgba; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + + vertex[vertIndex].m_x = coords[(ii - 1) * 3 + 0]; + vertex[vertIndex].m_y = coords[(ii - 1) * 3 + 1]; + vertex[vertIndex].m_z = coords[(ii - 1) * 3 + 2]; + vertex[vertIndex].m_rgba = rgba; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + + vertex[vertIndex].m_x = coords[ii * 3 + 0]; + vertex[vertIndex].m_y = coords[ii * 3 + 1]; + vertex[vertIndex].m_z = coords[ii * 3 + 2]; + vertex[vertIndex].m_rgba = rgba; + vertex[vertIndex].m_u = u0; + vertex[vertIndex].m_v = v0; + vertIndex++; + } +} + +void renderer_bgfx::put_line(float x0, float y0, float x1, float y1, float r, UINT32 rgba, ScreenVertex* vertex, float fth) +{ + float dx = x1 - x0; + float dy = y1 - y0; + float d = sqrtf(dx * dx + dy * dy); + if (d > 0.0001f) + { + d = 1.0f / d; + dx *= d; + dy *= d; + } + + float nx = dy; + float ny = -dx; + float verts[4 * 3]; + r -= fth; + r *= 0.5f; + if (r < 0.01f) + { + r = 0.01f; + } + + dx *= r; + dy *= r; + nx *= r; + ny *= r; + + verts[0] = x0 - dx - nx; + verts[1] = y0 - dy - ny; + verts[2] = 0; + + verts[3] = x0 - dx + nx; + verts[4] = y0 - dy + ny; + verts[5] = 0; + + verts[6] = x1 + dx + nx; + verts[7] = y1 + dy + ny; + verts[8] = 0; + + verts[9] = x1 + dx - nx; + verts[10] = y1 + dy - ny; + verts[11] = 0; + + put_polygon(verts, 4, fth, rgba, vertex); +} + +uint32_t renderer_bgfx::u32Color(uint32_t r, uint32_t g, uint32_t b, uint32_t a = 255) +{ + return (a << 24) | (b << 16) | (g << 8) | r; +} + +//============================================================ +// copyline_palette16 +//============================================================ + +static inline void copyline_palette16(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette) +{ + for (int x = 0; x < width; x++) + { + rgb_t srcpixel = palette[*src++]; + *dst++ = 0xff000000 | (srcpixel.b() << 16) | (srcpixel.g() << 8) | srcpixel.r(); + } +} + + +//============================================================ +// copyline_palettea16 +//============================================================ + +static inline void copyline_palettea16(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette) +{ + for (int x = 0; x < width; x++) + { + rgb_t srcpixel = palette[*src++]; + *dst++ = (srcpixel.a() << 24) | (srcpixel.b() << 16) | (srcpixel.g() << 8) | srcpixel.r(); + } +} + + +//============================================================ +// copyline_rgb32 +//============================================================ + +static inline void copyline_rgb32(UINT32 *dst, const UINT32 *src, int width, const rgb_t *palette) +{ + int x; + + // palette (really RGB map) case + if (palette != nullptr) + { + for (x = 0; x < width; x++) + { + rgb_t srcpix = *src++; + *dst++ = 0xff000000 | palette[0x200 + srcpix.b()] | palette[0x100 + srcpix.g()] | palette[srcpix.r()]; + } + } + + // direct case + else + { + for (x = 0; x < width; x++) + { + rgb_t srcpix = *src++; + *dst++ = 0xff000000 | (srcpix.b() << 16) | (srcpix.g() << 8) | srcpix.r(); + } + } +} + + +//============================================================ +// copyline_argb32 +//============================================================ + +static inline void copyline_argb32(UINT32 *dst, const UINT32 *src, int width, const rgb_t *palette) +{ + int x; + // palette (really RGB map) case + if (palette != nullptr) + { + for (x = 0; x < width; x++) + { + rgb_t srcpix = *src++; + *dst++ = (srcpix & 0xff000000) | palette[0x200 + srcpix.b()] | palette[0x100 + srcpix.g()] | palette[srcpix.r()]; + } + } + + // direct case + else + { + for (x = 0; x < width; x++) + { + rgb_t srcpix = *src++; + *dst++ = (srcpix.a() << 24) | (srcpix.b() << 16) | (srcpix.g() << 8) | srcpix.r(); + } + } +} + +static inline UINT32 ycc_to_rgb(UINT8 y, UINT8 cb, UINT8 cr) +{ + /* original equations: + + C = Y - 16 + D = Cb - 128 + E = Cr - 128 + + R = clip(( 298 * C + 409 * E + 128) >> 8) + G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8) + B = clip(( 298 * C + 516 * D + 128) >> 8) + + R = clip(( 298 * (Y - 16) + 409 * (Cr - 128) + 128) >> 8) + G = clip(( 298 * (Y - 16) - 100 * (Cb - 128) - 208 * (Cr - 128) + 128) >> 8) + B = clip(( 298 * (Y - 16) + 516 * (Cb - 128) + 128) >> 8) + + R = clip(( 298 * Y - 298 * 16 + 409 * Cr - 409 * 128 + 128) >> 8) + G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8) + B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128 + 128) >> 8) + + R = clip(( 298 * Y - 298 * 16 + 409 * Cr - 409 * 128 + 128) >> 8) + G = clip(( 298 * Y - 298 * 16 - 100 * Cb + 100 * 128 - 208 * Cr + 208 * 128 + 128) >> 8) + B = clip(( 298 * Y - 298 * 16 + 516 * Cb - 516 * 128 + 128) >> 8) + */ + int r, g, b, common; + + common = 298 * y - 298 * 16; + r = (common + 409 * cr - 409 * 128 + 128) >> 8; + g = (common - 100 * cb + 100 * 128 - 208 * cr + 208 * 128 + 128) >> 8; + b = (common + 516 * cb - 516 * 128 + 128) >> 8; + + if (r < 0) r = 0; + else if (r > 255) r = 255; + if (g < 0) g = 0; + else if (g > 255) g = 255; + if (b < 0) b = 0; + else if (b > 255) b = 255; + + return 0xff000000 | (b << 16) | (g << 8) | r; +} + +//============================================================ +// copyline_yuy16_to_argb +//============================================================ + +static inline void copyline_yuy16_to_argb(UINT32 *dst, const UINT16 *src, int width, const rgb_t *palette, int xprescale) +{ + int x; + + assert(width % 2 == 0); + + // palette (really RGB map) case + if (palette != nullptr) + { + for (x = 0; x < width / 2; x++) + { + UINT16 srcpix0 = *src++; + UINT16 srcpix1 = *src++; + UINT8 cb = srcpix0 & 0xff; + UINT8 cr = srcpix1 & 0xff; + for (int x2 = 0; x2 < xprescale; x2++) + *dst++ = ycc_to_rgb(palette[0x000 + (srcpix0 >> 8)], cb, cr); + for (int x2 = 0; x2 < xprescale; x2++) + *dst++ = ycc_to_rgb(palette[0x000 + (srcpix1 >> 8)], cb, cr); + } + } + + // direct case + else + { + for (x = 0; x < width; x += 2) + { + UINT16 srcpix0 = *src++; + UINT16 srcpix1 = *src++; + UINT8 cb = srcpix0 & 0xff; + UINT8 cr = srcpix1 & 0xff; + for (int x2 = 0; x2 < xprescale; x2++) + *dst++ = ycc_to_rgb(srcpix0 >> 8, cb, cr); + for (int x2 = 0; x2 < xprescale; x2++) + *dst++ = ycc_to_rgb(srcpix1 >> 8, cb, cr); + } + } +} + +const bgfx::Memory* renderer_bgfx::mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base) +{ + const bgfx::Memory* mem = bgfx::alloc(width * height * 4); + for (int y = 0; y < height; y++) + { + switch (format) + { + case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTE16): + copyline_palette16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette); + break; + case PRIMFLAG_TEXFORMAT(TEXFORMAT_PALETTEA16): + copyline_palettea16((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette); + break; + case PRIMFLAG_TEXFORMAT(TEXFORMAT_YUY16): + copyline_yuy16_to_argb((UINT32*)mem->data + y * width, (UINT16*)base + y * rowpixels, width, palette, 1); + break; + case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32): + copyline_argb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette); + break; + case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32): + copyline_rgb32((UINT32*)mem->data + y * width, (UINT32*)base + y * rowpixels, width, palette); + break; + default: + break; + } + } + return mem; +} + int renderer_bgfx::draw(int update) { - //if (has_flags(FI_CHANGED) || (window().width() != m_last_width) || (window().height() != m_last_height)) - // do something - //clear_flags(FI_CHANGED); + int index = window().m_index; + // Set view 0 default viewport. + osd_dim wdim = window().get_size(); + int width = wdim.width(); + int height = wdim.height(); + if (index == 0) + { + if ((m_dimensions != osd_dim(width, height))) { + bgfx::reset(width, height, video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE); + m_dimensions = osd_dim(width, height); + } + } + else { + if ((m_dimensions != osd_dim(width, height))) { + bgfx::reset(window().m_main->get_size().width(), window().m_main->get_size().height(), video_config.waitvsync ? BGFX_RESET_VSYNC : BGFX_RESET_NONE); + if (bgfx::isValid(fbh)) + { + bgfx::destroyFrameBuffer(fbh); + } +#ifdef OSD_WINDOWS + fbh = bgfx::createFrameBuffer(window().m_hwnd, width, height); +#else + fbh = bgfx::createFrameBuffer(sdlNativeWindowHandle(window().sdl_window()), width, height); +#endif + bgfx::setViewFrameBuffer(index, fbh); + m_dimensions = osd_dim(width, height); + bgfx::setViewClear(index + , BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH + , 0x000000ff + , 1.0f + , 0 + ); + bgfx::touch(index); + bgfx::frame(); + return 0; + } + } + if (index != 0) bgfx::setViewFrameBuffer(index, fbh); + bgfx::setViewSeq(index, true); + bgfx::setViewRect(index, 0, 0, width, height); + + // Setup view transform. + { + float view[16]; + bx::mtxIdentity(view); - bgfx::setViewClear(0 - , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH + float left = 0.0f; + float top = 0.0f; + float right = width; + float bottom = height; + float proj[16]; + bx::mtxOrtho(proj, left, right, bottom, top, 0.0f, 100.0f); + bgfx::setViewTransform(index, view, proj); + } + bgfx::setViewClear(index + , BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH , 0x000000ff , 1.0f , 0 ); - // Set view 0 default viewport. -#ifdef OSD_WINDOWS - RECT client; - GetClientRect(window().m_hwnd, &client); - bgfx::setViewRect(0, 0, 0, rect_width(&client), rect_height(&client)); -#else - bgfx::setViewRect(0, 0, 0, m_blit_dim.width(), m_blit_dim.height()); -#endif + // This dummy draw call is here to make sure that view 0 is cleared // if no other draw calls are submitted to view 0. - bgfx::touch(0); + bgfx::touch(index); window().m_primlist->acquire_lock(); - // now draw - for (render_primitive *prim = window().m_primlist->first(); prim != NULL; prim = prim->next()) + // Mark our texture atlas as dirty if we need to do so + bool atlas_valid = update_atlas(); + + render_primitive *prim = window().m_primlist->first(); + while (prim != nullptr) { - switch (prim->type) + UINT32 blend = PRIMFLAG_GET_BLENDMODE(prim->flags); + + bgfx::TransientVertexBuffer buffer; + allocate_buffer(prim, blend, &buffer); + + buffer_status status = buffer_primitives(index, atlas_valid, &prim, &buffer); + + if (status != BUFFER_EMPTY) + { + set_bgfx_state(blend); + bgfx::setVertexBuffer(&buffer); + bgfx::setTexture(0, m_s_texColor, m_texture_cache); + bgfx::submit(index, m_progQuadTexture); + } + + if (status != BUFFER_DONE && status != BUFFER_PRE_FLUSH) + { + prim = prim->next(); + } + } + + window().m_primlist->release_lock(); + // Advance to next frame. Rendering thread will be kicked to + // process submitted rendering primitives. + if (index==0) bgfx::frame(); + + return 0; +} + +renderer_bgfx::buffer_status renderer_bgfx::buffer_primitives(int view, bool atlas_valid, render_primitive** prim, bgfx::TransientVertexBuffer* buffer) +{ + int vertices = 0; + + UINT32 blend = PRIMFLAG_GET_BLENDMODE((*prim)->flags); + while (*prim != nullptr) + { + switch ((*prim)->type) { - /** - * Try to stay in one Begin/End block as long as possible, - * since entering and leaving one is most expensive.. - */ case render_primitive::LINE: - // check if it's really a point -/* - if (((prim->bounds.x1 - prim->bounds.x0) == 0) && ((prim->bounds.y1 - prim->bounds.y0) == 0)) - { - curPrimitive=GL_POINTS; - } else { - curPrimitive=GL_LINES; - } - - if(pendingPrimitive!=GL_NO_PRIMITIVE && pendingPrimitive!=curPrimitive) - { - glEnd(); - pendingPrimitive=GL_NO_PRIMITIVE; - } - - if ( pendingPrimitive==GL_NO_PRIMITIVE ) - { - set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); - } - - glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a); - - if(pendingPrimitive!=curPrimitive) - { - glBegin(curPrimitive); - pendingPrimitive=curPrimitive; - } - - // check if it's really a point - if (curPrimitive==GL_POINTS) - { - glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); - } - else - { - glVertex2f(prim->bounds.x0+hofs, prim->bounds.y0+vofs); - glVertex2f(prim->bounds.x1+hofs, prim->bounds.y1+vofs); - }*/ + put_line((*prim)->bounds.x0, (*prim)->bounds.y0, (*prim)->bounds.x1, (*prim)->bounds.y1, 1.0f, u32Color((*prim)->color.r * 255, (*prim)->color.g * 255, (*prim)->color.b * 255, (*prim)->color.a * 255), (ScreenVertex*)buffer->data + vertices, 1.0f); + vertices += 30; break; case render_primitive::QUAD: -/* - if(pendingPrimitive!=GL_NO_PRIMITIVE) - { - glEnd(); - pendingPrimitive=GL_NO_PRIMITIVE; - } + if ((*prim)->texture.base == nullptr) + { + put_packed_quad(*prim, WHITE_HASH, (ScreenVertex*)buffer->data + vertices); + vertices += 6; + } + else + { + const UINT32 hash = get_texture_hash(*prim); + if (atlas_valid && (*prim)->packable(PACKABLE_SIZE) && hash != 0 && m_hash_to_entry[hash].hash()) + { + put_packed_quad(*prim, hash, (ScreenVertex*)buffer->data + vertices); + vertices += 6; + } + else + { + if (vertices > 0) + { + return BUFFER_PRE_FLUSH; + } + render_textured_quad(view, *prim, buffer); + return BUFFER_EMPTY; + } + } + break; + + default: + // Unhandled + break; + } + + if ((*prim)->next() != nullptr && PRIMFLAG_GET_BLENDMODE((*prim)->next()->flags) != blend) + { + break; + } + + *prim = (*prim)->next(); + } + + if (*prim == nullptr) + { + return BUFFER_DONE; + } + if (vertices == 0) + { + return BUFFER_EMPTY; + } + return BUFFER_FLUSH; +} + +void renderer_bgfx::set_bgfx_state(UINT32 blend) +{ + uint64_t flags = BGFX_STATE_RGB_WRITE | BGFX_STATE_ALPHA_WRITE | BGFX_STATE_DEPTH_TEST_ALWAYS; + + switch (blend) + { + case BLENDMODE_NONE: + bgfx::setState(flags); + break; + case BLENDMODE_ALPHA: + bgfx::setState(flags | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_INV_SRC_ALPHA)); + break; + case BLENDMODE_RGB_MULTIPLY: + bgfx::setState(flags | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_DST_COLOR, BGFX_STATE_BLEND_ZERO)); + break; + case BLENDMODE_ADD: + bgfx::setState(flags | BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_SRC_ALPHA, BGFX_STATE_BLEND_ONE)); + break; + } +} - glColor4f(prim->color.r, prim->color.g, prim->color.b, prim->color.a); +bool renderer_bgfx::update_atlas() +{ + bool atlas_dirty = check_for_dirty_atlas(); + + if (atlas_dirty) + { + m_hash_to_entry.clear(); - set_blendmode(sdl, PRIMFLAG_GET_BLENDMODE(prim->flags)); + std::vector<std::vector<rectangle_packer::packed_rectangle>> packed; + if (m_packer.pack(m_texinfo, packed, CACHE_SIZE)) + { + process_atlas_packs(packed); + } + else + { + packed.clear(); - texture = texture_update(window, prim, 0); + m_texinfo.clear(); + m_texinfo.push_back(rectangle_packer::packable_rectangle(WHITE_HASH, PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32), 16, 16, 16, nullptr, m_white)); + m_packer.pack(m_texinfo, packed, CACHE_SIZE); + process_atlas_packs(packed); - sdl->texVerticex[0]=prim->bounds.x0 + hofs; - sdl->texVerticex[1]=prim->bounds.y0 + vofs; - sdl->texVerticex[2]=prim->bounds.x1 + hofs; - sdl->texVerticex[3]=prim->bounds.y0 + vofs; - sdl->texVerticex[4]=prim->bounds.x1 + hofs; - sdl->texVerticex[5]=prim->bounds.y1 + vofs; - sdl->texVerticex[6]=prim->bounds.x0 + hofs; - sdl->texVerticex[7]=prim->bounds.y1 + vofs; + return false; + } + } + return true; +} - glDrawArrays(GL_QUADS, 0, 4); -*/ +void renderer_bgfx::process_atlas_packs(std::vector<std::vector<rectangle_packer::packed_rectangle>>& packed) +{ + for (std::vector<rectangle_packer::packed_rectangle> pack : packed) + { + for (rectangle_packer::packed_rectangle rect : pack) + { + if (rect.hash() == 0xffffffff) + { + continue; + } + m_hash_to_entry[rect.hash()] = rect; + const bgfx::Memory* mem = mame_texture_data_to_bgfx_texture_data(rect.format(), rect.width(), rect.height(), rect.rowpixels(), rect.palette(), rect.base()); + bgfx::updateTexture2D(m_texture_cache, 0, rect.x(), rect.y(), rect.width(), rect.height(), mem); + } + } +} + +UINT32 renderer_bgfx::get_texture_hash(render_primitive *prim) +{ +#if GIBBERISH + UINT32 xor_value = 0x87; + UINT32 hash = 0xdabeefed; + + int bpp = 2; + UINT32 format = PRIMFLAG_GET_TEXFORMAT(prim->flags); + if (format == TEXFORMAT_ARGB32 || format == TEXFORMAT_RGB32) + { + bpp = 4; + } + + for (int y = 0; y < prim->texture.height; y++) + { + UINT8 *base = reinterpret_cast<UINT8*>(prim->texture.base) + prim->texture.rowpixels * y; + for (int x = 0; x < prim->texture.width * bpp; x++) + { + hash += base[x] ^ xor_value; + } + } + return hash; +#else + return (reinterpret_cast<size_t>(prim->texture.base)) & 0xffffffff; +#endif +} + +bool renderer_bgfx::check_for_dirty_atlas() +{ + bool atlas_dirty = false; + + std::map<UINT32, rectangle_packer::packable_rectangle> acquired_infos; + for (render_primitive *prim = window().m_primlist->first(); prim != nullptr; prim = prim->next()) + { + bool pack = prim->packable(PACKABLE_SIZE); + if (prim->type == render_primitive::QUAD && prim->texture.base != nullptr && pack) + { + const UINT32 hash = get_texture_hash(prim); + // If this texture is packable and not currently in the atlas, prepare the texture for putting in the atlas + if ((hash != 0 && m_hash_to_entry[hash].hash() == 0 && acquired_infos[hash].hash() == 0) + || (hash != 0 && m_hash_to_entry[hash].hash() != hash && acquired_infos[hash].hash() == 0)) + { // Create create the texture and mark the atlas dirty + atlas_dirty = true; + + m_texinfo.push_back(rectangle_packer::packable_rectangle(hash, prim->flags & PRIMFLAG_TEXFORMAT_MASK, + prim->texture.width, prim->texture.height, + prim->texture.rowpixels, prim->texture.palette, prim->texture.base)); + acquired_infos[hash] = m_texinfo[m_texinfo.size() - 1]; + } + } + } + + if (m_texinfo.size() == 1) + { + atlas_dirty = true; + } + + return atlas_dirty; +} + +void renderer_bgfx::allocate_buffer(render_primitive *prim, UINT32 blend, bgfx::TransientVertexBuffer *buffer) +{ + int vertices = 0; + + bool mode_switched = false; + while (prim != nullptr && !mode_switched) + { + switch (prim->type) + { + case render_primitive::LINE: + vertices += 30; break; + case render_primitive::QUAD: + if (!prim->packable(PACKABLE_SIZE)) + { + if (prim->texture.base == nullptr) + { + vertices += 6; + } + else + { + mode_switched = true; + if (vertices == 0) + { + vertices += 6; + } + } + } + else + { + vertices += 6; + } + break; default: - throw emu_fatalerror("Unexpected render_primitive type"); + // Do nothing + break; } - } - window().m_primlist->release_lock(); - // Advance to next frame. Rendering thread will be kicked to - // process submitted rendering primitives. - bgfx::frame(); + prim = prim->next(); - return 0; + if (prim != nullptr && PRIMFLAG_GET_BLENDMODE(prim->flags) != blend) + { + mode_switched = true; + } + } + + if (vertices > 0 && bgfx::checkAvailTransientVertexBuffer(vertices, ScreenVertex::ms_decl)) + { + bgfx::allocTransientVertexBuffer(buffer, vertices, ScreenVertex::ms_decl); + } } diff --git a/src/osd/modules/render/drawbgfx.h b/src/osd/modules/render/drawbgfx.h new file mode 100644 index 00000000000..86619eab718 --- /dev/null +++ b/src/osd/modules/render/drawbgfx.h @@ -0,0 +1,108 @@ +#pragma once + +#ifndef __RENDER_BGFX__ +#define __RENDER_BGFX__ + +#include <map> +#include <vector> + +#include "binpacker.h" + +/* sdl_info is the information about SDL for the current screen */ +class renderer_bgfx : public osd_renderer +{ +public: + renderer_bgfx(osd_window *w) + : osd_renderer(w, FLAG_NONE) + , m_dimensions(0, 0) + { + } + + virtual int create() override; + virtual int draw(const int update) override; +#ifdef OSD_SDL + virtual int xy_to_render_target(const int x, const int y, int *xt, int *yt) override; +#else + virtual void save() override { } + virtual void record() override { } + virtual void toggle_fsfx() override { } +#endif + virtual void destroy() override; + virtual render_primitive_list *get_primitives() override + { + osd_dim wdim = window().get_size(); + window().target()->set_bounds(wdim.width(), wdim.height(), window().aspect()); + return &window().target()->get_primitives(); + } + +private: + struct ScreenVertex + { + float m_x; + float m_y; + float m_z; + UINT32 m_rgba; + float m_u; + float m_v; + + static void init() + { + ms_decl.begin() + .add(bgfx::Attrib::Position, 3, bgfx::AttribType::Float) + .add(bgfx::Attrib::Color0, 4, bgfx::AttribType::Uint8, true) + .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float) + .end(); + } + + static bgfx::VertexDecl ms_decl; + }; + + void allocate_buffer(render_primitive *prim, UINT32 blend, bgfx::TransientVertexBuffer *buffer); + enum buffer_status + { + BUFFER_PRE_FLUSH, + BUFFER_FLUSH, + BUFFER_EMPTY, + BUFFER_DONE + }; + buffer_status buffer_primitives(int view, bool atlas_valid, render_primitive** prim, bgfx::TransientVertexBuffer* buffer); + + void render_textured_quad(int view, render_primitive* prim, bgfx::TransientVertexBuffer* buffer); + + void put_packed_quad(render_primitive *prim, UINT32 hash, ScreenVertex* vertex); + void put_polygon(const float* coords, UINT32 num_coords, float r, UINT32 rgba, ScreenVertex* vertex); + void put_line(float x0, float y0, float x1, float y1, float r, UINT32 rgba, ScreenVertex* vertex, float fth = 1.0f); + + void set_bgfx_state(UINT32 blend); + + uint32_t u32Color(uint32_t r, uint32_t g, uint32_t b, uint32_t a); + + bool check_for_dirty_atlas(); + bool update_atlas(); + void process_atlas_packs(std::vector<std::vector<rectangle_packer::packed_rectangle>>& packed); + const bgfx::Memory* mame_texture_data_to_bgfx_texture_data(UINT32 format, int width, int height, int rowpixels, const rgb_t *palette, void *base); + UINT32 get_texture_hash(render_primitive *prim); + + bgfx::ProgramHandle loadProgram(bx::FileReaderI* _reader, const char* _vsName, const char* _fsName); + bgfx::ProgramHandle loadProgram(const char* _vsName, const char* _fsName); + + bgfx::ProgramHandle m_progQuad; + bgfx::ProgramHandle m_progQuadTexture; + bgfx::UniformHandle m_s_texColor; + bgfx::FrameBufferHandle fbh; + bgfx::TextureHandle m_texture_cache; + + // Original display_mode + osd_dim m_dimensions; + + std::map<UINT32, rectangle_packer::packed_rectangle> m_hash_to_entry; + std::vector<rectangle_packer::packable_rectangle> m_texinfo; + rectangle_packer m_packer; + + uint32_t m_white[16*16]; + enum : uint16_t { CACHE_SIZE = 1024 }; + enum : uint32_t { PACKABLE_SIZE = 128 }; + enum : UINT32 { WHITE_HASH = 0x87654321 }; +}; + +#endif diff --git a/src/osd/modules/render/drawdd.cpp b/src/osd/modules/render/drawdd.cpp deleted file mode 100644 index fb82dff3c1f..00000000000 --- a/src/osd/modules/render/drawdd.cpp +++ /dev/null @@ -1,1317 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -//============================================================ -// -// drawdd.c - Win32 DirectDraw implementation -// -//============================================================ - -// standard windows headers -#define WIN32_LEAN_AND_MEAN -#include <windows.h> -#include <mmsystem.h> -#include <ddraw.h> -#undef interface - -// MAME headers -#include "emu.h" -#include "render.h" -#include "rendutil.h" -#include "rendersw.inc" - -// MAMEOS headers -#include "winmain.h" -#include "window.h" - - - -//============================================================ -// TYPE DEFINITIONS -//============================================================ - -typedef HRESULT (WINAPI *directdrawcreateex_ptr)(GUID FAR *lpGuid, LPVOID *lplpDD, REFIID iid, IUnknown FAR *pUnkOuter); -typedef HRESULT (WINAPI *directdrawenumerateex_ptr)(LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); - - -/* dd_info is the information about DirectDraw for the current screen */ -class renderer_dd : public osd_renderer -{ -public: - renderer_dd(osd_window *window) - : osd_renderer(window, FLAG_NONE), - width(0), - height(0), - refresh(0), - //adapter(0), - adapter_ptr(NULL), - clearouter(0), - blitwidth(0), blitheight(0), - //lastdest - ddraw(NULL), - primary(NULL), - back(NULL), - blit(NULL), - clipper(NULL), - gamma(NULL), - //DDSURFACEDESC2 primarydesc; - //DDSURFACEDESC2 blitdesc; - //DDSURFACEDESC2 origmode; - //ddcaps(0), - //helcaps(0), - membuffer(NULL), - membuffersize(0) - { } - - virtual ~renderer_dd() { } - - virtual int create() override; - virtual render_primitive_list *get_primitives() override; - virtual int draw(const int update) override; - virtual void save() override {}; - virtual void record() override {}; - virtual void toggle_fsfx() override {}; - virtual void destroy() override; - - int width, height; // current width, height - int refresh; // current refresh rate - -private: - - inline void update_outer_rects(); - - // surface management - int ddraw_create(); - int ddraw_create_surfaces(); - void ddraw_delete(); - void ddraw_delete_surfaces(); - int ddraw_verify_caps(); - int ddraw_test_cooperative(); - HRESULT create_surface(DDSURFACEDESC2 *desc, IDirectDrawSurface7 **surface, const char *type); - int create_clipper(); - - // drawing helpers - void compute_blit_surface_size(); - void blit_to_primary(int srcwidth, int srcheight); - - // video modes - int config_adapter_mode(); - void get_adapter_for_monitor(osd_monitor_info *monitor); - void pick_best_mode(); - - // various - void calc_fullscreen_margins(DWORD desc_width, DWORD desc_height, RECT *margins); - - - GUID adapter; // current display adapter - GUID * adapter_ptr; // pointer to current display adapter - int clearouter; // clear the outer areas? - - INT32 blitwidth, blitheight; // current blit width/height values - RECT lastdest; // last destination rectangle - - IDirectDraw7 * ddraw; // pointer to the DirectDraw object - IDirectDrawSurface7 * primary; // pointer to the primary surface object - IDirectDrawSurface7 * back; // pointer to the back buffer surface object - IDirectDrawSurface7 * blit; // pointer to the blit surface object - IDirectDrawClipper * clipper; // pointer to the clipper object - IDirectDrawGammaControl *gamma; // pointer to the gamma control object - - DDSURFACEDESC2 primarydesc; // description of the primary surface - DDSURFACEDESC2 blitdesc; // description of the blitting surface - DDSURFACEDESC2 origmode; // original video mode - - DDCAPS ddcaps; // capabilities of the device - DDCAPS helcaps; // capabilities of the hardware - - UINT8 * membuffer; // memory buffer for complex rendering - UINT32 membuffersize; // current size of the memory buffer -}; - - -/* monitor_enum_info holds information during a monitor enumeration */ -struct monitor_enum_info -{ - osd_monitor_info * monitor; // pointer to monitor we want - GUID guid; // GUID of the one we found - GUID * guid_ptr; // pointer to our GUID - int foundit; // TRUE if we found what we wanted -}; - - -/* mode_enum_info holds information during a display mode enumeration */ -struct mode_enum_info -{ - renderer_dd * renderer; - osd_window * window; - INT32 minimum_width, minimum_height; - INT32 target_width, target_height; - double target_refresh; - float best_score; -}; - - - -//============================================================ -// GLOBALS -//============================================================ - -static HINSTANCE dllhandle; -static directdrawcreateex_ptr directdrawcreateex; -static directdrawenumerateex_ptr directdrawenumerateex; - - - -//============================================================ -// INLINES -//============================================================ - -inline void renderer_dd::update_outer_rects() -{ - clearouter = (back != NULL) ? 3 : 1; -} - - -static inline int better_mode(int width0, int height0, int width1, int height1, float desired_aspect) -{ - float aspect0 = (float)width0 / (float)height0; - float aspect1 = (float)width1 / (float)height1; - return (fabs(desired_aspect - aspect0) < fabs(desired_aspect - aspect1)) ? 0 : 1; -} - - - -//============================================================ -// PROTOTYPES -//============================================================ - -// core functions -static void drawdd_exit(void); - - - -//============================================================ -// drawnone_create -//============================================================ - -static osd_renderer *drawdd_create(osd_window *window) -{ - return global_alloc(renderer_dd(window)); -} - - -//============================================================ -// drawdd_init -//============================================================ - -int drawdd_init(running_machine &machine, osd_draw_callbacks *callbacks) -{ - // dynamically grab the create function from ddraw.dll - dllhandle = LoadLibrary(TEXT("ddraw.dll")); - if (dllhandle == NULL) - { - osd_printf_verbose("DirectDraw: Unable to access ddraw.dll\n"); - return 1; - } - - // import the create function - directdrawcreateex = (directdrawcreateex_ptr)GetProcAddress(dllhandle, "DirectDrawCreateEx"); - if (directdrawcreateex == NULL) - { - osd_printf_verbose("DirectDraw: Unable to find DirectDrawCreateEx\n"); - FreeLibrary(dllhandle); - dllhandle = NULL; - return 1; - } - - // import the enumerate function - directdrawenumerateex = (directdrawenumerateex_ptr)GetProcAddress(dllhandle, "DirectDrawEnumerateExA"); - if (directdrawenumerateex == NULL) - { - osd_printf_verbose("DirectDraw: Unable to find DirectDrawEnumerateExA\n"); - FreeLibrary(dllhandle); - dllhandle = NULL; - return 1; - } - - // fill in the callbacks - memset(callbacks, 0, sizeof(*callbacks)); - callbacks->exit = drawdd_exit; - callbacks->create = drawdd_create; - - osd_printf_verbose("DirectDraw: Using DirectDraw 7\n"); - return 0; -} - - - -//============================================================ -// drawdd_exit -//============================================================ - -static void drawdd_exit(void) -{ - if (dllhandle != NULL) - FreeLibrary(dllhandle); -} - - - -//============================================================ -// drawdd_window_init -//============================================================ - -int renderer_dd::create() -{ - // configure the adapter for the mode we want - if (config_adapter_mode()) - { - osd_printf_error("Unable to configure adapter.\n"); - goto error; - } - - // create the ddraw object - if (ddraw_create()) - { - osd_printf_error("Unable to create ddraw object.\n"); - goto error; - } - - return 0; - -error: - destroy(); - osd_printf_error("Unable to initialize DirectDraw.\n"); - return 1; -} - - - -//============================================================ -// drawdd_window_destroy -//============================================================ - -void renderer_dd::destroy() -{ - // delete the ddraw object - ddraw_delete(); -} - - - -//============================================================ -// drawdd_window_get_primitives -//============================================================ - -render_primitive_list *renderer_dd::get_primitives() -{ - compute_blit_surface_size(); - window().target()->set_bounds(blitwidth, blitheight, 0); - window().target()->set_max_update_rate((refresh == 0) ? origmode.dwRefreshRate : refresh); - - return &window().target()->get_primitives(); -} - - - -//============================================================ -// drawdd_window_draw -//============================================================ - -int renderer_dd::draw(const int update) -{ - render_primitive *prim; - int usemembuffer = FALSE; - HRESULT result; - - // if we're updating, remember to erase the outer stuff - if (update) - update_outer_rects(); - - // if we have a ddraw object, check the cooperative level - if (ddraw_test_cooperative()) - return 1; - - // get the size; if we're too small, delete the existing surfaces - if (blitwidth > blitdesc.dwWidth || blitheight > blitdesc.dwHeight) - ddraw_delete_surfaces(); - - // if we need to create surfaces, do it now - if (blit == NULL && ddraw_create_surfaces() != 0) - return 1; - - // select our surface and lock it - result = IDirectDrawSurface7_Lock(blit, NULL, &blitdesc, DDLOCK_WAIT, NULL); - if (result == DDERR_SURFACELOST) - { - osd_printf_verbose("DirectDraw: Lost surfaces; deleting and retrying next frame\n"); - ddraw_delete_surfaces(); - return 1; - } - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X locking blit surface\n", (int)result); - return 1; - } - - // render to it - window().m_primlist->acquire_lock(); - - // scan the list of primitives for tricky stuff - for (prim = window().m_primlist->first(); prim != NULL; prim = prim->next()) - if (PRIMFLAG_GET_BLENDMODE(prim->flags) != BLENDMODE_NONE || - (prim->texture.base != NULL && PRIMFLAG_GET_TEXFORMAT(prim->flags) == TEXFORMAT_ARGB32)) - { - usemembuffer = TRUE; - break; - } - - // if we're using the memory buffer, draw offscreen first and then copy - if (usemembuffer) - { - int x, y; - - // based on the target format, use one of our standard renderers - switch (blitdesc.ddpfPixelFormat.dwRBitMask) - { - case 0x00ff0000: software_renderer<UINT32, 0,0,0, 16,8,0>::draw_primitives(*window().m_primlist, membuffer, blitwidth, blitheight, blitwidth); break; - case 0x000000ff: software_renderer<UINT32, 0,0,0, 0,8,16>::draw_primitives(*window().m_primlist, membuffer, blitwidth, blitheight, blitwidth); break; - case 0xf800: software_renderer<UINT16, 3,2,3, 11,5,0>::draw_primitives(*window().m_primlist, membuffer, blitwidth, blitheight, blitwidth); break; - case 0x7c00: software_renderer<UINT16, 3,3,3, 10,5,0>::draw_primitives(*window().m_primlist, membuffer, blitwidth, blitheight, blitwidth); break; - default: - osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)blitdesc.ddpfPixelFormat.dwRBitMask, (int)blitdesc.ddpfPixelFormat.dwGBitMask, (int)blitdesc.ddpfPixelFormat.dwBBitMask); - break; - } - - // handle copying to both 16bpp and 32bpp destinations - for (y = 0; y < blitheight; y++) - { - if (blitdesc.ddpfPixelFormat.dwRGBBitCount == 32) - { - UINT32 *src = (UINT32 *)membuffer + y * blitwidth; - UINT32 *dst = (UINT32 *)((UINT8 *)blitdesc.lpSurface + y * blitdesc.lPitch); - for (x = 0; x < blitwidth; x++) - *dst++ = *src++; - } - else if (blitdesc.ddpfPixelFormat.dwRGBBitCount == 16) - { - UINT16 *src = (UINT16 *)membuffer + y * blitwidth; - UINT16 *dst = (UINT16 *)((UINT8 *)blitdesc.lpSurface + y * blitdesc.lPitch); - for (x = 0; x < blitwidth; x++) - *dst++ = *src++; - } - } - - } - - // otherwise, draw directly - else - { - // based on the target format, use one of our standard renderers - switch (blitdesc.ddpfPixelFormat.dwRBitMask) - { - case 0x00ff0000: software_renderer<UINT32, 0,0,0, 16,8,0, true>::draw_primitives(*window().m_primlist, blitdesc.lpSurface, blitwidth, blitheight, blitdesc.lPitch / 4); break; - case 0x000000ff: software_renderer<UINT32, 0,0,0, 0,8,16, true>::draw_primitives(*window().m_primlist, blitdesc.lpSurface, blitwidth, blitheight, blitdesc.lPitch / 4); break; - case 0xf800: software_renderer<UINT16, 3,2,3, 11,5,0, true>::draw_primitives(*window().m_primlist, blitdesc.lpSurface, blitwidth, blitheight, blitdesc.lPitch / 2); break; - case 0x7c00: software_renderer<UINT16, 3,3,3, 10,5,0, true>::draw_primitives(*window().m_primlist, blitdesc.lpSurface, blitwidth, blitheight, blitdesc.lPitch / 2); break; - default: - osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)blitdesc.ddpfPixelFormat.dwRBitMask, (int)blitdesc.ddpfPixelFormat.dwGBitMask, (int)blitdesc.ddpfPixelFormat.dwBBitMask); - break; - } - } - window().m_primlist->release_lock(); - - // unlock and blit - result = IDirectDrawSurface7_Unlock(blit, NULL); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X unlocking blit surface\n", (int)result); - - // sync to VBLANK - if ((video_config.waitvsync || video_config.syncrefresh) && window().machine().video().throttled() && (!window().fullscreen() || back == NULL)) - { - result = IDirectDraw7_WaitForVerticalBlank(ddraw, DDWAITVB_BLOCKBEGIN, NULL); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result); - } - - // complete the blitting - blit_to_primary(blitwidth, blitheight); - return 0; -} - - - -//============================================================ -// ddraw_create -//============================================================ - -int renderer_dd::ddraw_create() -{ - HRESULT result; - int verify; - - // if a device exists, free it - if (ddraw != NULL) - ddraw_delete(); - - // create the DirectDraw object - result = (*directdrawcreateex)(adapter_ptr, (LPVOID *)&ddraw, WRAP_REFIID(IID_IDirectDraw7), NULL); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X during DirectDrawCreateEx call\n", (int)result); - goto error; - } - - // verify the caps - verify = ddraw_verify_caps(); - if (verify == 2) - { - osd_printf_error("DirectDraw: Error - Device does not meet minimum requirements for DirectDraw rendering\n"); - goto error; - } - if (verify == 1) - osd_printf_verbose("DirectDraw: Warning - Device may not perform well for DirectDraw rendering\n"); - - // set the cooperative level - // for non-window modes, we will use full screen here - result = IDirectDraw7_SetCooperativeLevel(ddraw, win_window_list->m_hwnd, DDSCL_SETFOCUSWINDOW); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_SetCooperativeLevel(FOCUSWINDOW) call\n", (int)result); - goto error; - } - result = IDirectDraw7_SetCooperativeLevel(ddraw, window().m_hwnd, DDSCL_SETDEVICEWINDOW | (window().fullscreen() ? DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE : DDSCL_NORMAL)); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_SetCooperativeLevel(DEVICEWINDOW) call\n", (int)result); - goto error; - } - - // full screen mode: set the resolution - if (window().fullscreen() && video_config.switchres) - { - result = IDirectDraw7_SetDisplayMode(ddraw, width, height, 32, refresh, 0); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X attempting to set video mode %dx%d@%d call\n", (int)result, width, height, refresh); - goto error; - } - } - - return ddraw_create_surfaces(); - -error: - ddraw_delete(); - return 1; -} - - - -//============================================================ -// ddraw_create_surfaces -//============================================================ - -int renderer_dd::ddraw_create_surfaces() -{ - HRESULT result; - - // make a description of the primary surface - memset(&primarydesc, 0, sizeof(primarydesc)); - primarydesc.dwSize = sizeof(primarydesc); - primarydesc.dwFlags = DDSD_CAPS; - primarydesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - - // for triple-buffered full screen mode, allocate flipping surfaces - if (window().fullscreen() && video_config.triplebuf) - { - primarydesc.dwFlags |= DDSD_BACKBUFFERCOUNT; - primarydesc.ddsCaps.dwCaps |= DDSCAPS_FLIP | DDSCAPS_COMPLEX; - primarydesc.dwBackBufferCount = 2; - } - - // create the primary surface and report errors - result = create_surface(&primarydesc, &primary, "primary"); - if (result != DD_OK) goto error; - - // full screen mode: get the back surface - back = NULL; - if (window().fullscreen() && video_config.triplebuf) - { - DDSCAPS2 caps = { DDSCAPS_BACKBUFFER }; - result = IDirectDrawSurface7_GetAttachedSurface(primary, &caps, &back); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X getting attached back surface\n", (int)result); - goto error; - } - } - - // now make a description of our blit surface, based on the primary surface - if (blitwidth == 0 || blitheight == 0) - compute_blit_surface_size(); - blitdesc = primarydesc; - blitdesc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS; - blitdesc.dwWidth = blitwidth; - blitdesc.dwHeight = blitheight; - blitdesc.ddsCaps.dwCaps = DDSCAPS_VIDEOMEMORY; - - // then create the blit surface, fall back to system memory if video mem doesn't work - result = create_surface(&blitdesc, &blit, "blit"); - if (result != DD_OK) - { - blitdesc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY; - result = create_surface(&blitdesc, &blit, "blit"); - } - if (result != DD_OK) goto error; - - // create a memory buffer for offscreen drawing - if (membuffersize < blitwidth * blitheight * 4) - { - membuffersize = blitwidth * blitheight * 4; - global_free_array(membuffer); - membuffer = global_alloc_array(UINT8, membuffersize); - } - if (membuffer == NULL) - goto error; - - // create a clipper for windowed mode - if (!window().fullscreen() && create_clipper()) - goto error; - - // full screen mode: set the gamma - if (window().fullscreen()) - { - // only set the gamma if it's not 1.0f - windows_options &options = downcast<windows_options &>(window().machine().options()); - float brightness = options.full_screen_brightness(); - float contrast = options.full_screen_contrast(); - float fgamma = options.full_screen_gamma(); - if (brightness != 1.0f || contrast != 1.0f || fgamma != 1.0f) - { - // see if we can get a GammaControl object - result = IDirectDrawSurface_QueryInterface(primary, WRAP_REFIID(IID_IDirectDrawGammaControl), (void **)&gamma); - if (result != DD_OK) - { - osd_printf_warning("DirectDraw: Warning - device does not support full screen gamma correction.\n"); - this->gamma = NULL; - } - - // proceed if we can - if (this->gamma != NULL) - { - DDGAMMARAMP ramp; - int i; - - // create a standard ramp and set it - for (i = 0; i < 256; i++) - ramp.red[i] = ramp.green[i] = ramp.blue[i] = apply_brightness_contrast_gamma(i, brightness, contrast, fgamma) << 8; - - // attempt to set it - result = IDirectDrawGammaControl_SetGammaRamp(this->gamma, 0, &ramp); - if (result != DD_OK) - osd_printf_verbose("DirectDraw: Error %08X attempting to set gamma correction.\n", (int)result); - } - } - } - - // force some updates - update_outer_rects(); - return 0; - -error: - ddraw_delete_surfaces(); - return 1; -} - - - -//============================================================ -// ddraw_delete -//============================================================ - -void renderer_dd::ddraw_delete() -{ - // free surfaces - ddraw_delete_surfaces(); - - // restore resolutions - if (ddraw != NULL) - IDirectDraw7_RestoreDisplayMode(ddraw); - - // reset cooperative level - if (ddraw != NULL && window().m_hwnd != NULL) - IDirectDraw7_SetCooperativeLevel(ddraw, window().m_hwnd, DDSCL_NORMAL); - - // release the DirectDraw object itself - if (ddraw != NULL) - IDirectDraw7_Release(ddraw); - ddraw = NULL; -} - - - -//============================================================ -// ddraw_delete_surfaces -//============================================================ - -void renderer_dd::ddraw_delete_surfaces() -{ - // release the gamma control - if (gamma != NULL) - IDirectDrawGammaControl_Release(gamma); - gamma = NULL; - - // release the clipper - if (clipper != NULL) - IDirectDrawClipper_Release(clipper); - clipper = NULL; - - // free the memory buffer - global_free_array(membuffer); - membuffer = NULL; - membuffersize = 0; - - // release the blit surface - if (blit != NULL) - IDirectDrawSurface7_Release(blit); - blit = NULL; - - // release the back surface - if (back != NULL) - IDirectDrawSurface7_Release(back); - back = NULL; - - // release the primary surface - if (primary != NULL) - IDirectDrawSurface7_Release(primary); - primary = NULL; -} - - - -//============================================================ -// ddraw_verify_caps -//============================================================ - -int renderer_dd::ddraw_verify_caps() -{ - int retval = 0; - HRESULT result; - - // get the capabilities - ddcaps.dwSize = sizeof(ddcaps); - helcaps.dwSize = sizeof(helcaps); - result = IDirectDraw7_GetCaps(ddraw, &ddcaps, &helcaps); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X during IDirectDraw7_GetCaps call\n", (int)result); - return 1; - } - - // determine if hardware stretching is available - if ((ddcaps.dwCaps & DDCAPS_BLTSTRETCH) == 0) - { - osd_printf_verbose("DirectDraw: Warning - Device does not support hardware stretching\n"); - retval = 1; - } - - return retval; -} - - - -//============================================================ -// ddraw_test_cooperative -//============================================================ - -int renderer_dd::ddraw_test_cooperative() -{ - HRESULT result; - - // check our current status; if we lost the device, punt to GDI - result = IDirectDraw7_TestCooperativeLevel(ddraw); - switch (result) - { - // punt to GDI if someone else has exclusive mode - case DDERR_NOEXCLUSIVEMODE: - case DDERR_EXCLUSIVEMODEALREADYSET: - ddraw_delete_surfaces(); - return 1; - - // if we're ok, but we don't have a primary surface, create one - default: - case DD_OK: - if (primary == NULL) - return ddraw_create_surfaces(); - return 0; - } -} - - - -//============================================================ -// create_surface -//============================================================ - -HRESULT renderer_dd::create_surface(DDSURFACEDESC2 *desc, IDirectDrawSurface7 **surface, const char *type) -{ - HRESULT result; - - // create the surface as requested - result = IDirectDraw7_CreateSurface(ddraw, desc, surface, NULL); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X creating %s surface\n", (int)result, type); - return result; - } - - // get a description of the primary surface - result = IDirectDrawSurface7_GetSurfaceDesc(*surface, desc); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X getting %s surface desciption\n", (int)result, type); - IDirectDrawSurface7_Release(*surface); - *surface = NULL; - return result; - } - - // print out the good stuff - osd_printf_verbose("DirectDraw: %s surface created: %dx%dx%d (R=%08X G=%08X B=%08X)\n", - type, - (int)desc->dwWidth, - (int)desc->dwHeight, - (int)desc->ddpfPixelFormat.dwRGBBitCount, - (UINT32)desc->ddpfPixelFormat.dwRBitMask, - (UINT32)desc->ddpfPixelFormat.dwGBitMask, - (UINT32)desc->ddpfPixelFormat.dwBBitMask); - return result; -} - - - -//============================================================ -// create_clipper -//============================================================ - -int renderer_dd::create_clipper() -{ - HRESULT result; - - // create a clipper for the primary surface - result = IDirectDraw7_CreateClipper(ddraw, 0, &clipper, NULL); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X creating clipper\n", (int)result); - return 1; - } - - // set the clipper's hwnd - result = IDirectDrawClipper_SetHWnd(clipper, 0, window().m_hwnd); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X setting clipper hwnd\n", (int)result); - return 1; - } - - // set the clipper on the primary surface - result = IDirectDrawSurface7_SetClipper(primary, clipper); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X setting clipper on primary surface\n", (int)result); - return 1; - } - return 0; -} - - - -//============================================================ -// compute_blit_surface_size -//============================================================ - -void renderer_dd::compute_blit_surface_size() -{ - INT32 newwidth, newheight; - int xscale, yscale; - RECT client; - - // start with the minimum size - window().target()->compute_minimum_size(newwidth, newheight); - - // get the window's client rectangle - GetClientRect(window().m_hwnd, &client); - - // hardware stretch case: apply prescale - if (video_config.hwstretch) - { - int prescale = (window().prescale() < 1) ? 1 : window().prescale(); - - // clamp the prescale to something smaller than the target bounds - xscale = prescale; - while (xscale > 1 && newwidth * xscale > rect_width(&client)) - xscale--; - yscale = prescale; - while (yscale > 1 && newheight * yscale > rect_height(&client)) - yscale--; - } - - // non stretch case - else - { - INT32 target_width = rect_width(&client); - INT32 target_height = rect_height(&client); - float desired_aspect = 1.0f; - - // compute the appropriate visible area if we're trying to keepaspect - if (video_config.keepaspect) - { - osd_monitor_info *monitor = window().winwindow_video_window_monitor(NULL); - window().target()->compute_visible_area(target_width, target_height, monitor->aspect(), window().target()->orientation(), target_width, target_height); - desired_aspect = (float)target_width / (float)target_height; - } - - // compute maximum integral scaling to fit the window - xscale = (target_width + 2) / newwidth; - yscale = (target_height + 2) / newheight; - - // try a little harder to keep the aspect ratio if desired - if (video_config.keepaspect) - { - // if we could stretch more in the X direction, and that makes a better fit, bump the xscale - while (newwidth * (xscale + 1) <= rect_width(&client) && - better_mode(newwidth * xscale, newheight * yscale, newwidth * (xscale + 1), newheight * yscale, desired_aspect)) - xscale++; - - // if we could stretch more in the Y direction, and that makes a better fit, bump the yscale - while (newheight * (yscale + 1) <= rect_height(&client) && - better_mode(newwidth * xscale, newheight * yscale, newwidth * xscale, newheight * (yscale + 1), desired_aspect)) - yscale++; - - // now that we've maxed out, see if backing off the maximally stretched one makes a better fit - if (rect_width(&client) - newwidth * xscale < rect_height(&client) - newheight * yscale) - { - while (xscale > 1 && better_mode(newwidth * xscale, newheight * yscale, newwidth * (xscale - 1), newheight * yscale, desired_aspect)) - xscale--; - } - else - { - while (yscale > 1 && better_mode(newwidth * xscale, newheight * yscale, newwidth * xscale, newheight * (yscale - 1), desired_aspect)) - yscale--; - } - } - } - - // ensure at least a scale factor of 1 - if (xscale == 0) xscale = 1; - if (yscale == 0) yscale = 1; - - // apply the final scale - newwidth *= xscale; - newheight *= yscale; - if (newwidth != blitwidth || newheight != blitheight) - { - // force some updates - update_outer_rects(); - osd_printf_verbose("DirectDraw: New blit size = %dx%d\n", newwidth, newheight); - } - blitwidth = newwidth; - blitheight = newheight; -} - - - -//============================================================ -// calc_fullscreen_margins -//============================================================ - -void renderer_dd::calc_fullscreen_margins(DWORD desc_width, DWORD desc_height, RECT *margins) -{ - margins->left = 0; - margins->top = 0; - margins->right = desc_width; - margins->bottom = desc_height; - - if (window().win_has_menu()) - { - static int height_with_menubar = 0; - if (height_with_menubar == 0) - { - RECT with_menu = { 100, 100, 200, 200 }; - RECT without_menu = { 100, 100, 200, 200 }; - AdjustWindowRect(&with_menu, WS_OVERLAPPED, TRUE); - AdjustWindowRect(&without_menu, WS_OVERLAPPED, FALSE); - height_with_menubar = (with_menu.bottom - with_menu.top) - (without_menu.bottom - without_menu.top); - } - margins->top = height_with_menubar; - } -} - - - -//============================================================ -// blit_to_primary -//============================================================ - -void renderer_dd::blit_to_primary(int srcwidth, int srcheight) -{ - IDirectDrawSurface7 *target = (back != NULL) ? back : primary; - osd_monitor_info *monitor = window().winwindow_video_window_monitor(NULL); - DDBLTFX blitfx = { sizeof(DDBLTFX) }; - RECT clear, outer, dest, source; - INT32 dstwidth, dstheight; - HRESULT result; - - // compute source rect - source.left = source.top = 0; - source.right = srcwidth; - source.bottom = srcheight; - - // compute outer rect -- windowed version - if (!window().fullscreen()) - { - GetClientRect(window().m_hwnd, &outer); - ClientToScreen(window().m_hwnd, &((LPPOINT)&outer)[0]); - ClientToScreen(window().m_hwnd, &((LPPOINT)&outer)[1]); - - // adjust to be relative to the monitor - osd_rect pos = monitor->position_size(); - outer.left -= pos.left(); - outer.right -= pos.left(); - outer.top -= pos.top(); - outer.bottom -= pos.top(); - } - - // compute outer rect -- full screen version - else - { - calc_fullscreen_margins(primarydesc.dwWidth, primarydesc.dwHeight, &outer); - } - - // if we're respecting the aspect ratio, we need to adjust to fit - dstwidth = rect_width(&outer); - dstheight = rect_height(&outer); - if (!video_config.hwstretch) - { - // trim the source if necessary - if (rect_width(&outer) < srcwidth) - { - source.left += (srcwidth - rect_width(&outer)) / 2; - source.right = source.left + rect_width(&outer); - } - if (rect_height(&outer) < srcheight) - { - source.top += (srcheight - rect_height(&outer)) / 2; - source.bottom = source.top + rect_height(&outer); - } - - // match the destination and source sizes - dstwidth = srcwidth = source.right - source.left; - dstheight = srcheight = source.bottom - source.top; - } - else if (video_config.keepaspect) - { - // compute the appropriate visible area - window().target()->compute_visible_area(rect_width(&outer), rect_height(&outer), monitor->aspect(), window().target()->orientation(), dstwidth, dstheight); - } - - // center within - dest.left = outer.left + (rect_width(&outer) - dstwidth) / 2; - dest.right = dest.left + dstwidth; - dest.top = outer.top + (rect_height(&outer) - dstheight) / 2; - dest.bottom = dest.top + dstheight; - - // compare against last destination; if different, force a redraw - if (dest.left != lastdest.left || dest.right != lastdest.right || dest.top != lastdest.top || dest.bottom != lastdest.bottom) - { - lastdest = dest; - update_outer_rects(); - } - - // clear outer rects if we need to - if (clearouter != 0) - { - clearouter--; - - // clear the left edge - if (dest.left > outer.left) - { - clear = outer; - clear.right = dest.left; - result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); - } - - // clear the right edge - if (dest.right < outer.right) - { - clear = outer; - clear.left = dest.right; - result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); - } - - // clear the top edge - if (dest.top > outer.top) - { - clear = outer; - clear.bottom = dest.top; - result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); - } - - // clear the bottom edge - if (dest.bottom < outer.bottom) - { - clear = outer; - clear.top = dest.bottom; - result = IDirectDrawSurface_Blt(target, &clear, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &blitfx); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X clearing the screen\n", (int)result); - } - } - - // do the blit - result = IDirectDrawSurface7_Blt(target, &dest, blit, &source, DDBLT_WAIT, NULL); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X blitting to the screen\n", (int)result); - - // page flip if triple buffered - if (window().fullscreen() && back != NULL) - { - result = IDirectDrawSurface7_Flip(primary, NULL, DDFLIP_WAIT); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X waiting for VBLANK\n", (int)result); - } -} - - - -//============================================================ -// config_adapter_mode -//============================================================ - -int renderer_dd::config_adapter_mode() -{ - DDDEVICEIDENTIFIER2 identifier; - HRESULT result; - - // choose the monitor number - get_adapter_for_monitor(window().monitor()); - - // create a temporary DirectDraw object - result = (*directdrawcreateex)(adapter_ptr, (LPVOID *)&ddraw, WRAP_REFIID(IID_IDirectDraw7), NULL); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X during DirectDrawCreateEx call\n", (int)result); - return 1; - } - - // get the identifier - result = IDirectDraw7_GetDeviceIdentifier(ddraw, &identifier, 0); - if (result != DD_OK) - { - osd_printf_error("Error getting identifier for device\n"); - return 1; - } - osd_printf_verbose("DirectDraw: Configuring device %s\n", identifier.szDescription); - - // get the current display mode - memset(&origmode, 0, sizeof(origmode)); - origmode.dwSize = sizeof(origmode); - result = IDirectDraw7_GetDisplayMode(ddraw, &origmode); - if (result != DD_OK) - { - osd_printf_verbose("DirectDraw: Error %08X getting current display mode\n", (int)result); - IDirectDraw7_Release(ddraw); - return 1; - } - - // choose a resolution: full screen mode case - if (window().fullscreen()) - { - // default to the current mode exactly - width = origmode.dwWidth; - height = origmode.dwHeight; - refresh = origmode.dwRefreshRate; - - // if we're allowed to switch resolutions, override with something better - if (video_config.switchres) - pick_best_mode(); - } - - // release the DirectDraw object - IDirectDraw7_Release(ddraw); - ddraw = NULL; - - // if we're not changing resolutions, make sure we have a resolution we can handle - if (!window().fullscreen() || !video_config.switchres) - { - switch (origmode.ddpfPixelFormat.dwRBitMask) - { - case 0x00ff0000: - case 0x000000ff: - case 0xf800: - case 0x7c00: - break; - - default: - osd_printf_verbose("DirectDraw: Unknown target mode: R=%08X G=%08X B=%08X\n", (int)origmode.ddpfPixelFormat.dwRBitMask, (int)origmode.ddpfPixelFormat.dwGBitMask, (int)origmode.ddpfPixelFormat.dwBBitMask); - return 1; - } - } - - return 0; -} - - - -//============================================================ -// monitor_enum_callback -//============================================================ - -static BOOL WINAPI monitor_enum_callback(GUID FAR *guid, LPSTR description, LPSTR name, LPVOID context, HMONITOR hmonitor) -{ - monitor_enum_info *einfo = (monitor_enum_info *)context; - - // do we match the desired monitor? - if (hmonitor == *((HMONITOR *)einfo->monitor->oshandle()) || (hmonitor == NULL && einfo->monitor->is_primary())) - { - einfo->guid_ptr = (guid != NULL) ? &einfo->guid : NULL; - if (guid != NULL) - einfo->guid = *guid; - einfo->foundit = TRUE; - } - return 1; -} - - - -//============================================================ -// get_adapter_for_monitor -//============================================================ - -void renderer_dd::get_adapter_for_monitor(osd_monitor_info *monitor) -{ - monitor_enum_info einfo; - HRESULT result; - - // try to find our monitor - memset(&einfo, 0, sizeof(einfo)); - einfo.monitor = monitor; - result = (*directdrawenumerateex)(monitor_enum_callback, &einfo, DDENUM_ATTACHEDSECONDARYDEVICES); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X during DirectDrawEnumerateEx call\n", (int)result); - - // set up the adapter - if (einfo.foundit && einfo.guid_ptr != NULL) - { - adapter = einfo.guid; - adapter_ptr = &adapter; - } - else - adapter_ptr = NULL; -} - - - -//============================================================ -// enum_modes_callback -//============================================================ - -static HRESULT WINAPI enum_modes_callback(LPDDSURFACEDESC2 desc, LPVOID context) -{ - float size_score, refresh_score, final_score; - mode_enum_info *einfo = (mode_enum_info *)context; - renderer_dd *dd = einfo->renderer; - - // skip non-32 bit modes - if (desc->ddpfPixelFormat.dwRGBBitCount != 32) - return DDENUMRET_OK; - - // compute initial score based on difference between target and current - size_score = 1.0f / (1.0f + fabs((float)((INT32)desc->dwWidth - einfo->target_width)) + fabs((float)((INT32)desc->dwHeight - einfo->target_height))); - - // if the mode is too small, give a big penalty - if (desc->dwWidth < einfo->minimum_width || desc->dwHeight < einfo->minimum_height) - size_score *= 0.01f; - - // if mode is smaller than we'd like, it only scores up to 0.1 - if (desc->dwWidth < einfo->target_width || desc->dwHeight < einfo->target_height) - size_score *= 0.1f; - - // if we're looking for a particular mode, that's a winner - if (desc->dwWidth == einfo->window->m_win_config.width && desc->dwHeight == einfo->window->m_win_config.height) - size_score = 2.0f; - - // compute refresh score - refresh_score = 1.0f / (1.0f + fabs((double)desc->dwRefreshRate - einfo->target_refresh)); - - // if refresh is smaller than we'd like, it only scores up to 0.1 - if ((double)desc->dwRefreshRate < einfo->target_refresh) - refresh_score *= 0.1f; - - // if we're looking for a particular refresh, make sure it matches - if (desc->dwRefreshRate == einfo->window->m_win_config.refresh) - refresh_score = 2.0f; - - // weight size and refresh equally - final_score = size_score + refresh_score; - - // best so far? - osd_printf_verbose(" %4dx%4d@%3dHz -> %f\n", (int)desc->dwWidth, (int)desc->dwHeight, (int)desc->dwRefreshRate, final_score * 1000.0f); - if (final_score > einfo->best_score) - { - einfo->best_score = final_score; - dd->width = desc->dwWidth; - dd->height = desc->dwHeight; - dd->refresh = desc->dwRefreshRate; - } - return DDENUMRET_OK; -} - - - -//============================================================ -// pick_best_mode -//============================================================ - -void renderer_dd::pick_best_mode() -{ - mode_enum_info einfo; - HRESULT result; - - // determine the minimum width/height for the selected target - // note: technically we should not be calling this from an alternate window - // thread; however, it is only done during init time, and the init code on - // the main thread is waiting for us to finish, so it is safe to do so here - window().target()->compute_minimum_size(einfo.minimum_width, einfo.minimum_height); - - // use those as the target for now - einfo.target_width = einfo.minimum_width * MAX(1, window().prescale()); - einfo.target_height = einfo.minimum_height * MAX(1, window().prescale()); - - // determine the refresh rate of the primary screen - einfo.target_refresh = 60.0; - const screen_device *primary_screen = window().machine().config().first_screen(); - if (primary_screen != NULL) - einfo.target_refresh = ATTOSECONDS_TO_HZ(primary_screen->refresh_attoseconds()); - printf("Target refresh = %f\n", einfo.target_refresh); - - // if we're not stretching, allow some slop on the minimum since we can handle it - if (!video_config.hwstretch) - { - einfo.minimum_width -= 4; - einfo.minimum_height -= 4; - } - - // if we are stretching, aim for a mode approximately 2x the game's resolution - else if (window().prescale() <= 1) - { - einfo.target_width *= 2; - einfo.target_height *= 2; - } - - // fill in the rest of the data - einfo.window = &window(); - einfo.renderer = this; - einfo.best_score = 0.0f; - - // enumerate the modes - osd_printf_verbose("DirectDraw: Selecting video mode...\n"); - result = IDirectDraw7_EnumDisplayModes(ddraw, DDEDM_REFRESHRATES, NULL, &einfo, enum_modes_callback); - if (result != DD_OK) osd_printf_verbose("DirectDraw: Error %08X during EnumDisplayModes call\n", (int)result); - osd_printf_verbose("DirectDraw: Mode selected = %4dx%4d@%3dHz\n", width, height, refresh); -} diff --git a/src/osd/modules/render/drawogl.cpp b/src/osd/modules/render/drawogl.cpp index 4a2744e4068..728b0810290 100644 --- a/src/osd/modules/render/drawogl.cpp +++ b/src/osd/modules/render/drawogl.cpp @@ -30,10 +30,6 @@ #include "modules/lib/osdlib.h" #include "modules/lib/osdobj_common.h" -#if defined(OSD_WINDOWS) && !defined(SDLMAME_SDL2) -#define SDLMAME_SDL2 0 -#endif - // OpenGL headers #include "modules/opengl/osd_opengl.h" @@ -344,7 +340,7 @@ private: HMODULE win_gl_context::m_module; -#elif SDLMAME_SDL2 +#else class sdl_gl_context : public osd_gl_context { @@ -395,51 +391,6 @@ private: char m_error[256]; }; -#else -// SDL 1.2 -class sdl12_gl_context : public osd_gl_context -{ -public: - sdl12_gl_context(SDL_Surface *window) : osd_gl_context(), m_window(window) - { - m_error[0] = 0; - } - virtual ~sdl12_gl_context() - { - } - virtual void MakeCurrent() - { - } - - virtual int SetSwapInterval(const int swap) - { - // Not supported on 1.2 - return 0; - } - - virtual const char *LastErrorMsg() - { - if (m_error[0] == 0) - return NULL; - else - return m_error; - } - - virtual void *getProcAddress(const char *proc) - { - return SDL_GL_GetProcAddress(proc); - } - - virtual void SwapBuffer() - { - SDL_GL_SwapBuffers(); - } - -private: - SDL_Surface *m_window; - char m_error[256]; -}; - #endif //============================================================ @@ -766,10 +717,8 @@ int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks) load_gl_lib(machine); #if defined(OSD_WINDOWS) osd_printf_verbose("Using Windows OpenGL driver\n"); -#elif SDLMAME_SDL2 - osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n"); #else - osd_printf_verbose("Using SDL single-window OpenGL driver (SDL 1.2)\n"); + osd_printf_verbose("Using SDL multi-window OpenGL driver (SDL 2.0+)\n"); #endif return 0; @@ -1035,10 +984,8 @@ int sdl_info_ogl::create() // create renderer #if defined(OSD_WINDOWS) m_gl_context = global_alloc(win_gl_context(window().m_hwnd)); -#elif SDLMAME_SDL2 - m_gl_context = global_alloc(sdl_gl_context(window().sdl_window())); #else - m_gl_context = global_alloc(sdl12_gl_context(window().sdl_surface())); + m_gl_context = global_alloc(sdl_gl_context(window().sdl_window())); #endif if (m_gl_context->LastErrorMsg() != NULL) { @@ -1530,11 +1477,9 @@ int sdl_info_ogl::draw(const int update) if (m_init_context) { // do some one-time OpenGL setup -#if SDLMAME_SDL2 // FIXME: SRGB conversion is working on SDL2, may be of use // when we eventually target gamma and monitor profiles. //glEnable(GL_FRAMEBUFFER_SRGB); -#endif glShadeModel(GL_SMOOTH); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearDepth(1.0f); @@ -1560,11 +1505,6 @@ int sdl_info_ogl::draw(const int update) loadGLExtensions(); } -#if !defined(OSD_WINDOWS) && !SDLMAME_SDL2 - // force all textures to be regenerated - destroy_all_textures(); -#endif - m_surf_w = m_width; m_surf_h = m_height; diff --git a/src/osd/modules/render/drawsdl.cpp b/src/osd/modules/render/drawsdl.cpp index 221ac79ef4d..b9a40038082 100644 --- a/src/osd/modules/render/drawsdl.cpp +++ b/src/osd/modules/render/drawsdl.cpp @@ -40,11 +40,9 @@ struct sdl_scale_mode; -#if (SDLMAME_SDL2) #define DRAW2_SCALEMODE_NEAREST "0" #define DRAW2_SCALEMODE_LINEAR "1" #define DRAW2_SCALEMODE_BEST "2" -#endif /* sdl_info is the information about SDL for the current screen */ class sdl_info : public osd_renderer @@ -53,12 +51,8 @@ public: sdl_info(osd_window *w, int extra_flags) : osd_renderer(w, extra_flags), - #if (SDLMAME_SDL2) m_sdl_renderer(NULL), m_texture_id(NULL), - #else - m_yuvsurf(NULL), - #endif m_yuv_lookup(NULL), m_yuv_bitmap(NULL), //m_hw_scale_width(0), @@ -88,24 +82,14 @@ public: private: void destroy_all_textures(); void yuv_init(); -#if (SDLMAME_SDL2) void setup_texture(const osd_dim &size); -#endif void yuv_lookup_set(unsigned int pen, unsigned char red, unsigned char green, unsigned char blue); -#if (!SDLMAME_SDL2) - void yuv_overlay_init(); -#endif - INT32 m_blittimer; -#if (SDLMAME_SDL2) SDL_Renderer *m_sdl_renderer; SDL_Texture *m_texture_id; -#else - SDL_Overlay *m_yuvsurf; -#endif // YUV overlay UINT32 *m_yuv_lookup; @@ -127,11 +111,7 @@ struct sdl_scale_mode int is_yuv; /* Yuv mode? */ int mult_w; /* Width multiplier */ int mult_h; /* Height multiplier */ -#if (!SDLMAME_SDL2) - int m_extra_flags; /* Texture/surface flags */ -#else const char *sdl_scale_mode_hint; /* what to use as a hint ? */ -#endif int pixel_format; /* Pixel/Overlay format */ void (*yuv_blit)(const UINT16 *bitmap, UINT8 *ptr, const int pitch, const UINT32 *lookup, const int width, const int height); }; @@ -160,20 +140,6 @@ static void yuv_RGB_to_YUY2X2(const UINT16 *bitmap, UINT8 *ptr, const int pitch, // Static declarations -#if (!SDLMAME_SDL2) -static int shown_video_info = 0; - -static const sdl_scale_mode scale_modes[] = -{ - { "none", 0, 0, 1, 1, osd_renderer::FLAG_NEEDS_DOUBLEBUF, 0, 0 }, - { "async", 0, 0, 1, 1, osd_renderer::FLAG_NEEDS_DOUBLEBUF | osd_renderer::FLAG_NEEDS_ASYNCBLIT, 0, 0 }, - { "yv12", 1, 1, 1, 1, 0, SDL_YV12_OVERLAY, yuv_RGB_to_YV12 }, - { "yv12x2", 1, 1, 2, 2, 0, SDL_YV12_OVERLAY, yuv_RGB_to_YV12X2 }, - { "yuy2", 1, 1, 1, 1, 0, SDL_YUY2_OVERLAY, yuv_RGB_to_YUY2 }, - { "yuy2x2", 1, 1, 2, 1, 0, SDL_YUY2_OVERLAY, yuv_RGB_to_YUY2X2 }, - { NULL } -}; -#else static const sdl_scale_mode scale_modes[] = { { "none", 0, 0, 1, 1, DRAW2_SCALEMODE_NEAREST, 0, 0 }, @@ -186,7 +152,6 @@ static const sdl_scale_mode scale_modes[] = { "yuy2x2", 1, 1, 2, 1, DRAW2_SCALEMODE_BEST, SDL_PIXELFORMAT_YUY2, yuv_RGB_to_YUY2X2 }, { NULL } }; -#endif //============================================================ // drawsdl_scale_mode @@ -226,12 +191,7 @@ int drawsdl_scale_mode(const char *s) static osd_renderer *drawsdl_create(osd_window *window) { // FIXME: QUALITY HINTS -#if (SDLMAME_SDL2) return global_alloc(sdl_info(window, osd_renderer::FLAG_NONE)); -#else - const sdl_scale_mode *sm = &scale_modes[video_config.scale_mode]; - return global_alloc(sdl_info(window, sm->m_extra_flags)); -#endif } //============================================================ @@ -244,11 +204,7 @@ int drawsdl_init(osd_draw_callbacks *callbacks) callbacks->create = drawsdl_create; callbacks->exit = drawsdl_exit; - if (SDLMAME_SDL2) - osd_printf_verbose("Using SDL multi-window soft driver (SDL 2.0+)\n"); - else - osd_printf_verbose("Using SDL single-window soft driver (SDL 1.2)\n"); - + osd_printf_verbose("Using SDL multi-window soft driver (SDL 2.0+)\n"); return 0; } @@ -264,7 +220,6 @@ static void drawsdl_exit(void) // setup_texture for window //============================================================ -#if (SDLMAME_SDL2) void sdl_info::setup_texture(const osd_dim &size) { const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode]; @@ -311,64 +266,11 @@ void sdl_info::setup_texture(const osd_dim &size) size.width(), size.height()); } } -#endif - -//============================================================ -// yuv_overlay_init -//============================================================ - -#if (!SDLMAME_SDL2) -void sdl_info::yuv_overlay_init() -{ - const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode]; - int minimum_width, minimum_height; - - window().target()->compute_minimum_size(minimum_width, minimum_height); - - if (window().prescale()) - { - minimum_width *= window().prescale(); - minimum_height *= window().prescale(); - } - - if (m_yuvsurf != NULL) - { - SDL_FreeYUVOverlay(m_yuvsurf); - m_yuvsurf = NULL; - } - - if (m_yuv_bitmap != NULL) - { - global_free_array(m_yuv_bitmap); - } - - osd_printf_verbose("SDL: Creating %d x %d YUV-Overlay ...\n", minimum_width, minimum_height); - - m_yuv_bitmap = global_alloc_array(UINT16, minimum_width*minimum_height); - - m_yuvsurf = SDL_CreateYUVOverlay(minimum_width * sdl_sm->mult_w, minimum_height * sdl_sm->mult_h, - sdl_sm->pixel_format, window().sdl_surface()); - - if ( m_yuvsurf == NULL ) { - osd_printf_error("SDL: Couldn't create SDL_yuv_overlay: %s\n", SDL_GetError()); - //return 1; - } - - if (!shown_video_info) - { - osd_printf_verbose("YUV Mode : %s\n", sdl_sm->name); - osd_printf_verbose("YUV Overlay Size : %d x %d\n", minimum_width, minimum_height); - osd_printf_verbose("YUV Acceleration : %s\n", m_yuvsurf->hw_overlay ? "Hardware" : "Software"); - shown_video_info = 1; - } -} -#endif //============================================================ // drawsdl_show_info //============================================================ -#if (SDLMAME_SDL2) static void drawsdl_show_info(struct SDL_RendererInfo *render_info) { #define RF_ENTRY(x) {x, #x } @@ -395,42 +297,14 @@ static void drawsdl_show_info(struct SDL_RendererInfo *render_info) if (render_info->flags & rflist[i].flag) osd_printf_verbose("renderer: flag %s\n", rflist[i].name); } -#endif //============================================================ // sdl_info::create -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a -// a //============================================================ int sdl_info::create() { -#if (SDLMAME_SDL2) const sdl_scale_mode *sm = &scale_modes[video_config.scale_mode]; // create renderer @@ -486,8 +360,6 @@ int sdl_info::create() window().get_size(w, h); setup_texture(w, h); #endif -#else -#endif m_yuv_lookup = NULL; m_blittimer = 0; @@ -517,9 +389,7 @@ void sdl_info::destroy() global_free_array(m_yuv_bitmap); m_yuv_bitmap = NULL; } -#if (SDLMAME_SDL2) SDL_DestroyRenderer(m_sdl_renderer); -#endif } //============================================================ @@ -543,16 +413,8 @@ int sdl_info::xy_to_render_target(int x, int y, int *xt, int *yt) void sdl_info::destroy_all_textures() { -#if (SDLMAME_SDL2) SDL_DestroyTexture(m_texture_id); m_texture_id = NULL; -#else - if (m_yuvsurf != NULL) - { - SDL_FreeYUVOverlay(m_yuvsurf); - m_yuvsurf = NULL; - } -#endif } @@ -566,9 +428,7 @@ int sdl_info::draw(int update) UINT8 *surfptr; INT32 pitch; Uint32 rmask, gmask, bmask; -#if (SDLMAME_SDL2) Uint32 amask; -#endif INT32 vofs, hofs, blitwidth, blitheight, ch, cw; int bpp; @@ -584,68 +444,14 @@ int sdl_info::draw(int update) clear_flags(FI_CHANGED); m_blittimer = 3; m_last_dim = wdim; -#if (SDLMAME_SDL2) SDL_RenderSetViewport(m_sdl_renderer, NULL); if (m_texture_id != NULL) SDL_DestroyTexture(m_texture_id); setup_texture(m_blit_dim); m_blittimer = 3; -#else - const sdl_scale_mode *sdl_sm = &scale_modes[video_config.scale_mode]; - if (sdl_sm->is_yuv) - { - yuv_overlay_init(); - } -#endif } // lock it if we need it -#if (!SDLMAME_SDL2) - - pitch = window().sdl_surface()->pitch; - bpp = window().sdl_surface()->format->BytesPerPixel; - rmask = window().sdl_surface()->format->Rmask; - gmask = window().sdl_surface()->format->Gmask; - bmask = window().sdl_surface()->format->Bmask; -// amask = sdlsurf->format->Amask; -#if 0 - if (window().blitwidth() != m_old_blitwidth || window().blitheight() != m_old_blitheight) - { - if (sm->is_yuv) - yuv_overlay_init(); - m_old_blitwidth = window().blitwidth(); - m_old_blitheight = window().blitheight(); - m_blittimer = 3; - } -#endif - if (SDL_MUSTLOCK(window().sdl_surface())) - SDL_LockSurface(window().sdl_surface()); - - // Clear if necessary - if (m_blittimer > 0) - { - memset(window().sdl_surface()->pixels, 0, wdim.height() * window().sdl_surface()->pitch); - m_blittimer--; - } - - - if (sm->is_yuv) - { - SDL_LockYUVOverlay(m_yuvsurf); - surfptr = m_yuvsurf->pixels[0]; // (UINT8 *) m_yuv_bitmap; - pitch = m_yuvsurf->pitches[0]; // (UINT8 *) m_yuv_bitmap; -#if 0 - printf("abcd %d\n", m_yuvsurf->h); - printf("abcd %d %d %d\n", m_yuvsurf->pitches[0], m_yuvsurf->pitches[1], m_yuvsurf->pitches[2]); - printf("abcd %p %p %p\n", m_yuvsurf->pixels[0], m_yuvsurf->pixels[1], m_yuvsurf->pixels[2]); - printf("abcd %ld %ld\n", m_yuvsurf->pixels[1] - m_yuvsurf->pixels[0], m_yuvsurf->pixels[2] - m_yuvsurf->pixels[1]); -#endif - } - else - surfptr = (UINT8 *)window().sdl_surface()->pixels; -#else - //SDL_SelectRenderer(window().sdl_window); - { Uint32 format; @@ -668,7 +474,6 @@ int sdl_info::draw(int update) SDL_LockTexture(m_texture_id, NULL, (void **) &surfptr, &pitch); -#endif // get ready to center the image vofs = hofs = 0; blitwidth = m_blit_dim.width(); @@ -703,25 +508,11 @@ int sdl_info::draw(int update) int mamewidth, mameheight; -#if !SDLMAME_SDL2 - if (!sm->is_yuv) - { - surfptr += ((vofs * pitch) + (hofs * bpp)); - mamewidth = blitwidth; //sdl_surface()->w; - mameheight = blitheight; //sdl_surface()->h; - } - else - { - mamewidth = m_yuvsurf->w / sm->mult_w; - mameheight = m_yuvsurf->h / sm->mult_h; - } -#else Uint32 fmt = 0; int access = 0; SDL_QueryTexture(m_texture_id, &fmt, &access, &mamewidth, &mameheight); mamewidth /= sm->mult_w; mameheight /= sm->mult_h; -#endif //printf("w h %d %d %d %d\n", mamewidth, mameheight, blitwidth, blitheight); // rescale bounds @@ -780,24 +571,6 @@ int sdl_info::draw(int update) window().m_primlist->release_lock(); // unlock and flip -#if (!SDLMAME_SDL2) - if (SDL_MUSTLOCK(window().sdl_surface())) SDL_UnlockSurface(window().sdl_surface()); - if (!sm->is_yuv) - { - SDL_Flip(window().sdl_surface()); - } - else - { - SDL_Rect r; - - SDL_UnlockYUVOverlay(m_yuvsurf); - r.x = hofs; - r.y = vofs; - r.w = blitwidth; - r.h = blitheight; - SDL_DisplayYUVOverlay(m_yuvsurf, &r); - } -#else SDL_UnlockTexture(m_texture_id); { SDL_Rect r; @@ -811,7 +584,6 @@ int sdl_info::draw(int update) SDL_RenderCopy(m_sdl_renderer,m_texture_id, NULL, &r); SDL_RenderPresent(m_sdl_renderer); } -#endif return 0; } //============================================================ @@ -950,12 +722,7 @@ static void yuv_RGB_to_YV12X2(const UINT16 *bitmap, UINT8 *ptr, const int pitch, pixels[0] = ptr; pixels[1] = ptr + pitch * height * 2; -#if (SDLMAME_SDL2) int p2 = (pitch >> 1); -#else - int p2 = (pitch + 7) & ~ 7;; - p2 = (p2 >> 1); -#endif pixels[2] = pixels[1] + p2 * height; for(y=0;y<height;y++) diff --git a/src/osd/modules/sound/direct_sound.cpp b/src/osd/modules/sound/direct_sound.cpp index 78996093e77..0ec810578a3 100644 --- a/src/osd/modules/sound/direct_sound.cpp +++ b/src/osd/modules/sound/direct_sound.cpp @@ -28,11 +28,7 @@ #ifdef SDLMAME_WIN32 #include "../../sdl/osdsdl.h" -#if (SDLMAME_SDL2) #include <SDL2/SDL_syswm.h> -#else -#include <SDL/SDL_syswm.h> -#endif #include "../../sdl/window.h" #else #include "winmain.h" @@ -408,13 +404,8 @@ HRESULT sound_direct_sound::dsound_init() #ifdef SDLMAME_WIN32 SDL_SysWMinfo wminfo; SDL_VERSION(&wminfo.version); -#if SDLMAME_SDL2 SDL_GetWindowWMInfo(sdl_window_list->sdl_window(), &wminfo); HWND const window = wminfo.info.win.window; -#else // SDLMAME_SDL2 - SDL_GetWMInfo(&wminfo); - HWND const window = wminfo.window; -#endif // SDLMAME_SDL2 #else // SDLMAME_WIN32 HWND const window = win_window_list->m_hwnd; #endif // SDLMAME_WIN32 diff --git a/src/osd/modules/sound/js_sound.cpp b/src/osd/modules/sound/js_sound.cpp index bd95c79dd2e..581de205d7b 100644 --- a/src/osd/modules/sound/js_sound.cpp +++ b/src/osd/modules/sound/js_sound.cpp @@ -6,7 +6,7 @@ Shim for native JavaScript sound interface implementations (Emscripten only). -*******************************************************************c********/ +****************************************************************************/ #include "sound_module.h" #include "modules/osdmodule.h" @@ -34,14 +34,14 @@ public: { EM_ASM_ARGS({ // Forward audio stream update on to JS backend implementation. - jsmess_update_audio_stream($0, $1); + jsmame_update_audio_stream($0, $1); }, (unsigned int)buffer, samples_this_frame); } virtual void set_mastervolume(int attenuation) { EM_ASM_ARGS({ // Forward volume update on to JS backend implementation. - jsmess_set_mastervolume($0); + jsmame_set_mastervolume($0); }, attenuation); } diff --git a/src/osd/modules/sound/js_sound.js b/src/osd/modules/sound/js_sound.js new file mode 100644 index 00000000000..b06cbb44365 --- /dev/null +++ b/src/osd/modules/sound/js_sound.js @@ -0,0 +1,213 @@ +// license:BSD-3-Clause +// copyright-holders:Grant Galitz, Katelyn Gadd +/*************************************************************************** + + JSMAME web audio backend v0.3 + + Original by katelyn gadd - kg at luminance dot org ; @antumbral on twitter + Substantial changes by taisel + +***************************************************************************/ + +var jsmame_web_audio = (function () { + +var context = null; +var gain_node = null; +var eventNode = null; +var sampleScale = 32766; +var inputBuffer = new Float32Array(44100); +var bufferSize = 44100; +var start = 0; +var rear = 0; +var watchDogDateLast = null; +var watchDogTimerEvent = null; + +function lazy_init () { + //Make + if (context) { + //Return if already created: + return; + } + if (typeof AudioContext != "undefined") { + //Standard context creation: + context = new AudioContext(); + } + else if (typeof webkitAudioContext != "undefined") { + //Older webkit context creation: + context = new webkitAudioContext(); + } + else { + //API not found! + return; + } + //Generate a volume control node: + gain_node = context.createGain(); + //Set initial volume to 1: + gain_node.gain.value = 1.0; + //Connect volume node to output: + gain_node.connect(context.destination); + //Initialize the streaming event: + init_event(); +}; + +function init_event() { + //Generate a streaming node point: + if (typeof context.createScriptProcessor == "function") { + //Current standard compliant way: + eventNode = context.createScriptProcessor(4096, 0, 2); + } + else { + //Deprecated way: + eventNode = context.createJavaScriptNode(4096, 0, 2); + } + //Make our tick function the audio callback function: + eventNode.onaudioprocess = tick; + //Connect stream to volume control node: + eventNode.connect(gain_node); + //WORKAROUND FOR FIREFOX BUG: + initializeWatchDogForFirefoxBug(); +}; + +function initializeWatchDogForFirefoxBug() { + //TODO: decide if we want to user agent sniff firefox here, + //since Google Chrome doesn't need this: + watchDogDateLast = (new Date()).getTime(); + if (watchDogTimerEvent === null) { + watchDogTimerEvent = setInterval(function () { + var timeDiff = (new Date()).getTime() - watchDogDateLast; + if (timeDiff > 500) { + disconnect_old_event(); + init_event(); + } + }, 500); + } +}; + +function disconnect_old_event() { + //Disconnect from audio graph: + eventNode.disconnect(); + //IIRC there was a firefox bug that did not GC this event when nulling the node itself: + eventNode.onaudioprocess = null; + //Null the glitched/unused node: + eventNode = null; +}; + +function set_mastervolume ( + // even though it's 'attenuation' the value is negative, so... + attenuation_in_decibels +) { + lazy_init(); + if (!context) return; + + // http://stackoverflow.com/questions/22604500/web-audio-api-working-with-decibels + // seemingly incorrect/broken. figures. welcome to Web Audio + // var gain_web_audio = 1.0 - Math.pow(10, 10 / attenuation_in_decibels); + + // HACK: Max attenuation in JSMESS appears to be 32. + // Hit ' then left/right arrow to test. + // FIXME: This is linear instead of log10 scale. + var gain_web_audio = 1.0 + (+attenuation_in_decibels / +32); + if (gain_web_audio < +0) + gain_web_audio = +0; + else if (gain_web_audio > +1) + gain_web_audio = +1; + + gain_node.gain.value = gain_web_audio; +}; + +function update_audio_stream ( + pBuffer, // pointer into emscripten heap. int16 samples + samples_this_frame // int. number of samples at pBuffer address. +) { + lazy_init(); + if (!context) return; + + for ( + var i = 0, + l = samples_this_frame | 0; + i < l; + i++ + ) { + var offset = + // divide by sizeof(INT16) since pBuffer is offset + // in bytes + ((pBuffer / 2) | 0) + + ((i * 2) | 0); + + var left_sample = HEAP16[offset]; + var right_sample = HEAP16[(offset + 1) | 0]; + + // normalize from signed int16 to signed float + var left_sample_float = left_sample / sampleScale; + var right_sample_float = right_sample / sampleScale; + + inputBuffer[rear++] = left_sample_float; + inputBuffer[rear++] = right_sample_float; + if (rear == bufferSize) { + rear = 0; + } + if (start == rear) { + start += 2; + if (start == bufferSize) { + start = 0; + } + } + } +}; +function tick (event) { + //Find all output channels: + for (var bufferCount = 0, buffers = []; bufferCount < 2; ++bufferCount) { + buffers[bufferCount] = event.outputBuffer.getChannelData(bufferCount); + } + //Copy samples from the input buffer to the Web Audio API: + for (var index = 0; index < 4096 && start != rear; ++index) { + buffers[0][index] = inputBuffer[start++]; + buffers[1][index] = inputBuffer[start++]; + if (start == bufferSize) { + start = 0; + } + } + //Pad with silence if we're underrunning: + while (index < 4096) { + buffers[0][index] = 0; + buffers[1][index++] = 0; + } + //Deep inside the bowels of vendors bugs, + //we're using watchdog for a firefox bug, + //where the user agent decides to stop firing events + //if the user agent lags out due to system load. + //Don't even ask.... + watchDogDateLast = (new Date()).getTime(); +} + +function get_context() { + return context; +}; + +function sample_count() { + //TODO get someone to call this from the emulator, + //so the emulator can do proper audio buffering by + //knowing how many samples are left: + if (!context) { + //Use impossible value as an error code: + return -1; + } + var count = rear - start; + if (start > rear) { + count += bufferSize; + } + return count; +} + +return { + set_mastervolume: set_mastervolume, + update_audio_stream: update_audio_stream, + get_context: get_context, + sample_count: sample_count +}; + +})(); + +window.jsmame_set_mastervolume = jsmame_web_audio.set_mastervolume; +window.jsmame_update_audio_stream = jsmame_web_audio.update_audio_stream; +window.jsmame_sample_count = jsmame_web_audio.sample_count; diff --git a/src/osd/modules/sound/sdl_sound.cpp b/src/osd/modules/sound/sdl_sound.cpp index de8d57af11c..c1e3e3dff2b 100644 --- a/src/osd/modules/sound/sdl_sound.cpp +++ b/src/osd/modules/sound/sdl_sound.cpp @@ -421,11 +421,7 @@ int sound_sdl::init(const osd_options &options) } osd_printf_verbose("Audio: Start initialization\n"); - #if (SDLMAME_SDL2) strncpy(audio_driver, SDL_GetCurrentAudioDriver(), sizeof(audio_driver)); - #else - SDL_AudioDriverName(audio_driver, sizeof(audio_driver)); - #endif osd_printf_verbose("Audio: Driver is %s\n", audio_driver); sdl_xfer_samples = SDL_XFER_SAMPLES; diff --git a/src/osd/modules/sound/xaudio2_sound.cpp b/src/osd/modules/sound/xaudio2_sound.cpp index 7df854c0364..9dc3d0461be 100644 --- a/src/osd/modules/sound/xaudio2_sound.cpp +++ b/src/osd/modules/sound/xaudio2_sound.cpp @@ -14,6 +14,7 @@ // standard windows headers #define WIN32_LEAN_AND_MEAN #include <windows.h> +#include <mutex> #pragma warning( push ) #pragma warning( disable: 4068 ) @@ -124,21 +125,12 @@ public: obj->DestroyVoice(); } } - - void operator()(osd_lock* obj) const - { - if (obj != nullptr) - { - osd_lock_free(obj); - } - } }; // Typedefs for smart pointers used with customer deleters typedef std::unique_ptr<IXAudio2, xaudio2_custom_deleter> xaudio2_ptr; typedef std::unique_ptr<IXAudio2MasteringVoice, xaudio2_custom_deleter> mastering_voice_ptr; typedef std::unique_ptr<IXAudio2SourceVoice, xaudio2_custom_deleter> src_voice_ptr; -typedef std::unique_ptr<osd_lock, xaudio2_custom_deleter> osd_lock_ptr; // Typedef for pointer to XAudio2Create typedef HRESULT(__stdcall* PFN_XAUDIO2CREATE)(IXAudio2**, UINT32, XAUDIO2_PROCESSOR); @@ -147,27 +139,6 @@ typedef HRESULT(__stdcall* PFN_XAUDIO2CREATE)(IXAudio2**, UINT32, XAUDIO2_PROCES // Helper classes //============================================================ -// Helper for locking within a particular scope without having to manually release -class osd_scoped_lock -{ -private: - osd_lock * m_lock; -public: - osd_scoped_lock(osd_lock* lock) - { - m_lock = lock; - osd_lock_acquire(m_lock); - } - - ~osd_scoped_lock() - { - if (m_lock != nullptr) - { - osd_lock_release(m_lock); - } - } -}; - // Provides a pool of buffers class bufferpool { @@ -233,7 +204,7 @@ private: DWORD m_buffer_size; DWORD m_buffer_count; DWORD m_writepos; - osd_lock_ptr m_buffer_lock; + std::mutex m_buffer_lock; HANDLE m_hEventBufferCompleted; HANDLE m_hEventDataAvailable; HANDLE m_hEventExiting; @@ -258,7 +229,6 @@ public: m_buffer_size(0), m_buffer_count(0), m_writepos(0), - m_buffer_lock(osd_lock_alloc()), m_hEventBufferCompleted(NULL), m_hEventDataAvailable(NULL), m_hEventExiting(NULL), @@ -389,7 +359,7 @@ void sound_xaudio2::update_audio_stream( UINT32 const bytes_this_frame = samples_this_frame * m_sample_bytes; - osd_scoped_lock scope_lock(m_buffer_lock.get()); + std::lock_guard<std::mutex> lock(m_buffer_lock); UINT32 bytes_left = bytes_this_frame; @@ -446,7 +416,7 @@ void sound_xaudio2::OnBufferEnd(void *pBufferContext) BYTE* completed_buffer = (BYTE*)pBufferContext; if (completed_buffer != nullptr) { - auto scoped_lock = osd_scoped_lock(m_buffer_lock.get()); + std::lock_guard<std::mutex> lock(m_buffer_lock); m_buffer_pool->return_to_pool(completed_buffer); } @@ -625,7 +595,7 @@ void sound_xaudio2::submit_needed() if (state.BuffersQueued >= 1) return; - osd_scoped_lock lock_scope(m_buffer_lock.get()); + std::lock_guard<std::mutex> lock(m_buffer_lock); // Roll the buffer roll_buffer(); diff --git a/src/osd/modules/sync/osdsync.h b/src/osd/modules/sync/osdsync.h index 46d32b09135..e6e5e2f99c9 100644 --- a/src/osd/modules/sync/osdsync.h +++ b/src/osd/modules/sync/osdsync.h @@ -24,7 +24,7 @@ struct osd_event; /*----------------------------------------------------------------------------- - osd_lock_event_alloc: allocate a new event + osd_event_alloc: allocate a new event Parameters: @@ -174,18 +174,4 @@ int osd_thread_cpu_affinity(osd_thread *thread, UINT32 mask); -----------------------------------------------------------------------------*/ void osd_thread_wait_free(osd_thread *thread); -//============================================================ -// Scalable Locks -//============================================================ - -struct osd_scalable_lock; - -osd_scalable_lock *osd_scalable_lock_alloc(void); - -INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock); - -void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot); - -void osd_scalable_lock_free(osd_scalable_lock *lock); - #endif /* __OSDSYNC__ */ diff --git a/src/osd/modules/sync/sync_mini.cpp b/src/osd/modules/sync/sync_mini.cpp index f5e6accb0c7..5829eb6d63c 100644 --- a/src/osd/modules/sync/sync_mini.cpp +++ b/src/osd/modules/sync/sync_mini.cpp @@ -20,63 +20,6 @@ struct _osd_thread { //============================================================ -// osd_lock_alloc -//============================================================ - -osd_lock *osd_lock_alloc(void) -{ - // the minimal implementation does not support threading - // just return a dummy value here - return (osd_lock *)1; -} - - -//============================================================ -// osd_lock_acquire -//============================================================ - -void osd_lock_acquire(osd_lock *lock) -{ - // the minimal implementation does not support threading - // the acquire always "succeeds" -} - - -//============================================================ -// osd_lock_try -//============================================================ - -int osd_lock_try(osd_lock *lock) -{ - // the minimal implementation does not support threading - // the acquire always "succeeds" - return TRUE; -} - - -//============================================================ -// osd_lock_release -//============================================================ - -void osd_lock_release(osd_lock *lock) -{ - // the minimal implementation does not support threading - // do nothing here -} - - -//============================================================ -// osd_lock_free -//============================================================ - -void osd_lock_free(osd_lock *lock) -{ - // the minimal implementation does not support threading - // do nothing here -} - - -//============================================================ // osd_event_alloc //============================================================ diff --git a/src/osd/modules/sync/sync_ntc.cpp b/src/osd/modules/sync/sync_ntc.cpp index 462c56ee434..c78f67ce64a 100644 --- a/src/osd/modules/sync/sync_ntc.cpp +++ b/src/osd/modules/sync/sync_ntc.cpp @@ -38,16 +38,6 @@ #include <errno.h> #include <sys/time.h> -struct osd_lock { - volatile pthread_t holder; - INT32 count; -#ifdef PTR64 - INT8 padding[52]; // Fill a 64-byte cache line -#else - INT8 padding[56]; // A bit more padding -#endif -}; - struct osd_event { pthread_mutex_t mutex; pthread_cond_t cond; @@ -69,275 +59,6 @@ struct osd_thread { pthread_t thread; }; -struct osd_scalable_lock -{ - struct - { - volatile INT32 haslock; // do we have the lock? - INT32 filler[64/4-1]; // assumes a 64-byte cache line - } slot[WORK_MAX_THREADS]; // one slot per thread - volatile INT32 nextindex; // index of next slot to use -}; - - -//============================================================ -// Scalable Locks -//============================================================ - -osd_scalable_lock *osd_scalable_lock_alloc(void) -{ - osd_scalable_lock *lock; - - lock = (osd_scalable_lock *)calloc(1, sizeof(*lock)); - if (lock == NULL) - return NULL; - - memset(lock, 0, sizeof(*lock)); - lock->slot[0].haslock = TRUE; - return lock; -} - - -INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock) -{ - INT32 myslot = (atomic_increment32(&lock->nextindex) - 1) & (WORK_MAX_THREADS - 1); - -#if defined(__i386__) || defined(__x86_64__) - register INT32 tmp; - __asm__ __volatile__ ( - "1: clr %[tmp] ;" - " xchg %[haslock], %[tmp] ;" - " test %[tmp], %[tmp] ;" - " jne 3f ;" - "2: mov %[haslock], %[tmp] ;" - " test %[tmp], %[tmp] ;" - " jne 1b ;" - " pause ;" - " jmp 2b ;" - "3: " - : [haslock] "+m" (lock->slot[myslot].haslock) - , [tmp] "=&r" (tmp) - : - : "cc" - ); -#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__) - register INT32 tmp; - __asm__ __volatile__ ( - "1: lwarx %[tmp], 0, %[haslock] \n" - " cmpwi %[tmp], 0 \n" - " bne 3f \n" - "2: lwzx %[tmp], 0, %[haslock] \n" - " cmpwi %[tmp], 0 \n" - " bne 1b \n" - " nop \n" - " nop \n" - " b 2b \n" - "3: li %[tmp], 0 \n" - " stwcx. %[tmp], 0, %[haslock] \n" - " bne- 1b \n" - " lwsync \n" - : [tmp] "=&r" (tmp) - : [haslock] "r" (&lock->slot[myslot].haslock) - : "cr0" - ); -#else - INT32 backoff = 1; - while (!osd_compare_exchange32(&lock->slot[myslot].haslock, TRUE, FALSE)) - { - INT32 backcount; - for (backcount = 0; backcount < backoff; backcount++) - osd_yield_processor(); - backoff <<= 1; - } -#endif - return myslot; -} - - -void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot) -{ -#if defined(__i386__) || defined(__x86_64__) - register INT32 tmp = TRUE; - __asm__ __volatile__ ( - " xchg %[haslock], %[tmp] ;" - : [haslock] "+m" (lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock) - , [tmp] "+r" (tmp) - : - ); -#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__) - lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock = TRUE; - __asm__ __volatile__ ( " lwsync " : : ); -#else - osd_exchange32(&lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock, TRUE); -#endif -} - -void osd_scalable_lock_free(osd_scalable_lock *lock) -{ - free(lock); -} - -static inline pthread_t osd_compare_exchange_pthread_t(pthread_t volatile *ptr, pthread_t compare, pthread_t exchange) -{ -#ifdef PTR64 - INT64 result = compare_exchange64((INT64 volatile *)ptr, (INT64)compare, (INT64)exchange); -#else - INT32 result = compare_exchange32((INT32 volatile *)ptr, (INT32)compare, (INT32)exchange); -#endif - return (pthread_t)result; -} - -static inline pthread_t osd_exchange_pthread_t(pthread_t volatile *ptr, pthread_t exchange) -{ -#ifdef PTR64 - INT64 result = osd_exchange64((INT64 volatile *)ptr, (INT64)exchange); -#else - INT32 result = atomic_exchange32((INT32 volatile *)ptr, (INT32)exchange); -#endif - return (pthread_t)result; -} - - -//============================================================ -// osd_lock_alloc -//============================================================ - -osd_lock *osd_lock_alloc(void) -{ - osd_lock *lock; - - lock = (osd_lock *)calloc(1, sizeof(osd_lock)); - if (lock == NULL) - return NULL; - - lock->holder = 0; - lock->count = 0; - - return lock; -} - -//============================================================ -// osd_lock_acquire -//============================================================ - -void osd_lock_acquire(osd_lock *lock) -{ - pthread_t current, prev; - - current = pthread_self(); - prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current); - if (prev != nullptr && prev != current) - { - do { - register INT32 spin = 10000; // Convenient spin count - register pthread_t tmp; -#if defined(__i386__) || defined(__x86_64__) - __asm__ __volatile__ ( - "1: pause ;" - " mov %[holder], %[tmp] ;" - " test %[tmp], %[tmp] ;" - " loopne 1b ;" - : [spin] "+c" (spin) - , [tmp] "=&r" (tmp) - : [holder] "m" (lock->holder) - : "cc" - ); -#elif defined(__ppc__) || defined(__PPC__) - __asm__ __volatile__ ( - "1: nop \n" - " nop \n" - " lwzx %[tmp], 0, %[holder] \n" - " cmpwi %[tmp], 0 \n" - " bdnzt eq, 1b \n" - : [spin] "+c" (spin) - , [tmp] "=&r" (tmp) - : [holder] "r" (&lock->holder) - : "cr0" - ); -#elif defined(__ppc64__) || defined(__PPC64__) - __asm__ __volatile__ ( - "1: nop \n" - " nop \n" - " ldx %[tmp], 0, %[holder] \n" - " cmpdi %[tmp], 0 \n" - " bdnzt eq, 1b \n" - : [spin] "+c" (spin) - , [tmp] "=&r" (tmp) - : [holder] "r" (&lock->holder) - : "cr0" - ); -#else - while (--spin > 0 && lock->holder != NULL) - osd_yield_processor(); -#endif -#if 0 - /* If you mean to use locks as a blocking mechanism for extended - * periods of time, you should do something like this. However, - * it kills the performance of gaelco3d. - */ - if (spin == 0) - { - struct timespec sleep = { 0, 100000 }, remaining; - nanosleep(&sleep, &remaining); // sleep for 100us - } -#endif - } while (osd_compare_exchange_pthread_t(&lock->holder, 0, current) != nullptr); - } - lock->count++; -} - -//============================================================ -// osd_lock_try -//============================================================ - -int osd_lock_try(osd_lock *lock) -{ - pthread_t current, prev; - - current = pthread_self(); - prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current); - if (prev == nullptr || prev == current) - { - lock->count++; - return 1; - } - return 0; -} - -//============================================================ -// osd_lock_release -//============================================================ - -void osd_lock_release(osd_lock *lock) -{ - pthread_t current; - - current = pthread_self(); - if (lock->holder == current) - { - if (--lock->count == 0) -#if defined(__ppc__) || defined(__PPC__) || defined(__ppc64__) || defined(__PPC64__) - lock->holder = 0; - __asm__ __volatile__( " lwsync " : : ); -#else - osd_exchange_pthread_t(&lock->holder, 0); -#endif - return; - } - - // trying to release a lock you don't hold is bad! -// assert(lock->holder == pthread_self()); -} - -//============================================================ -// osd_lock_free -//============================================================ - -void osd_lock_free(osd_lock *lock) -{ - free(lock); -} - //============================================================ // osd_event_alloc //============================================================ diff --git a/src/osd/modules/sync/sync_os2.cpp b/src/osd/modules/sync/sync_os2.cpp index dba34065610..6e3265bb198 100644 --- a/src/osd/modules/sync/sync_os2.cpp +++ b/src/osd/modules/sync/sync_os2.cpp @@ -31,16 +31,6 @@ #define pthread_t int #define pthread_self _gettid -struct osd_lock { - volatile pthread_t holder; - INT32 count; -#ifdef PTR64 - INT8 padding[52]; // Fill a 64-byte cache line -#else - INT8 padding[56]; // A bit more padding -#endif -}; - struct osd_event { HMTX hmtx; HEV hev; @@ -58,276 +48,6 @@ struct osd_thread { void *param; }; -struct osd_scalable_lock -{ - struct - { - volatile INT32 haslock; // do we have the lock? - INT32 filler[64/4-1]; // assumes a 64-byte cache line - } slot[WORK_MAX_THREADS]; // one slot per thread - volatile INT32 nextindex; // index of next slot to use -}; - - -//============================================================ -// Scalable Locks -//============================================================ - -osd_scalable_lock *osd_scalable_lock_alloc(void) -{ - osd_scalable_lock *lock; - - lock = (osd_scalable_lock *)calloc(1, sizeof(*lock)); - if (lock == NULL) - return NULL; - - memset(lock, 0, sizeof(*lock)); - lock->slot[0].haslock = TRUE; - return lock; -} - - -INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock) -{ - INT32 myslot = (atomic_increment32(&lock->nextindex) - 1) & (WORK_MAX_THREADS - 1); - -#if defined(__i386__) || defined(__x86_64__) - register INT32 tmp; - __asm__ __volatile__ ( - "1: clr %[tmp] ;" - " xchg %[haslock], %[tmp] ;" - " test %[tmp], %[tmp] ;" - " jne 3f ;" - "2: mov %[haslock], %[tmp] ;" - " test %[tmp], %[tmp] ;" - " jne 1b ;" - " pause ;" - " jmp 2b ;" - "3: " - : [haslock] "+m" (lock->slot[myslot].haslock) - , [tmp] "=&r" (tmp) - : - : "%cc" - ); -#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__) - register INT32 tmp; - __asm__ __volatile__ ( - "1: lwarx %[tmp], 0, %[haslock] \n" - " cmpwi %[tmp], 0 \n" - " bne 3f \n" - "2: lwzx %[tmp], 0, %[haslock] \n" - " cmpwi %[tmp], 0 \n" - " bne 1b \n" - " nop \n" - " nop \n" - " b 2b \n" - "3: li %[tmp], 0 \n" - " sync \n" - " stwcx. %[tmp], 0, %[haslock] \n" - " bne- 1b \n" - " eieio \n" - : [tmp] "=&r" (tmp) - : [haslock] "r" (&lock->slot[myslot].haslock) - : "cr0" - ); -#else - INT32 backoff = 1; - while (!osd_compare_exchange32(&lock->slot[myslot].haslock, TRUE, FALSE)) - { - INT32 backcount; - for (backcount = 0; backcount < backoff; backcount++) - osd_yield_processor(); - backoff <<= 1; - } -#endif - return myslot; -} - - -void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot) -{ -#if defined(__i386__) || defined(__x86_64__) - register INT32 tmp = TRUE; - __asm__ __volatile__ ( - " xchg %[haslock], %[tmp] ;" - : [haslock] "+m" (lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock) - , [tmp] "+r" (tmp) - : - ); -#elif defined(__ppc__) || defined (__PPC__) || defined(__ppc64__) || defined(__PPC64__) - lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock = TRUE; - __asm__ __volatile__ ( " eieio " : : ); -#else - osd_exchange32(&lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock, TRUE); -#endif -} - -void osd_scalable_lock_free(osd_scalable_lock *lock) -{ - free(lock); -} - -static inline pthread_t osd_compare_exchange_pthread_t(pthread_t volatile *ptr, pthread_t compare, pthread_t exchange) -{ -#ifdef PTR64 - INT64 result = compare_exchange64((INT64 volatile *)ptr, (INT64)compare, (INT64)exchange); -#else - INT32 result = compare_exchange32((INT32 volatile *)ptr, (INT32)compare, (INT32)exchange); -#endif - return (pthread_t)result; -} - -static inline pthread_t osd_exchange_pthread_t(pthread_t volatile *ptr, pthread_t exchange) -{ -#ifdef PTR64 - INT64 result = osd_exchange64((INT64 volatile *)ptr, (INT64)exchange); -#else - INT32 result = atomic_exchange32((INT32 volatile *)ptr, (INT32)exchange); -#endif - return (pthread_t)result; -} - - -//============================================================ -// osd_lock_alloc -//============================================================ - -osd_lock *osd_lock_alloc(void) -{ - osd_lock *lock; - - lock = (osd_lock *)calloc(1, sizeof(osd_lock)); - if (lock == NULL) - return NULL; - - lock->holder = 0; - lock->count = 0; - - return lock; -} - -//============================================================ -// osd_lock_acquire -//============================================================ - -void osd_lock_acquire(osd_lock *lock) -{ - pthread_t current, prev; - - current = pthread_self(); - prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current); - if (prev != (size_t)NULL && prev != current) - { - do { - register INT32 spin = 10000; // Convenient spin count - register pthread_t tmp; -#if defined(__i386__) || defined(__x86_64__) - __asm__ __volatile__ ( - "1: pause ;" - " mov %[holder], %[tmp] ;" - " test %[tmp], %[tmp] ;" - " loopne 1b ;" - : [spin] "+c" (spin) - , [tmp] "=&r" (tmp) - : [holder] "m" (lock->holder) - : "%cc" - ); -#elif defined(__ppc__) || defined(__PPC__) - __asm__ __volatile__ ( - "1: nop \n" - " nop \n" - " lwzx %[tmp], 0, %[holder] \n" - " cmpwi %[tmp], 0 \n" - " bdnzt eq, 1b \n" - : [spin] "+c" (spin) - , [tmp] "=&r" (tmp) - : [holder] "r" (&lock->holder) - : "cr0" - ); -#elif defined(__ppc64__) || defined(__PPC64__) - __asm__ __volatile__ ( - "1: nop \n" - " nop \n" - " ldx %[tmp], 0, %[holder] \n" - " cmpdi %[tmp], 0 \n" - " bdnzt eq, 1b \n" - : [spin] "+c" (spin) - , [tmp] "=&r" (tmp) - : [holder] "r" (&lock->holder) - : "cr0" - ); -#else - while (--spin > 0 && lock->holder != NULL) - osd_yield_processor(); -#endif -#if 0 - /* If you mean to use locks as a blocking mechanism for extended - * periods of time, you should do something like this. However, - * it kills the performance of gaelco3d. - */ - if (spin == 0) - { - struct timespec sleep = { 0, 100000 }, remaining; - nanosleep(&sleep, &remaining); // sleep for 100us - } -#endif - } while (osd_compare_exchange_pthread_t(&lock->holder, 0, current) != (size_t)NULL); - } - lock->count++; -} - -//============================================================ -// osd_lock_try -//============================================================ - -int osd_lock_try(osd_lock *lock) -{ - pthread_t current, prev; - - current = pthread_self(); - prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current); - if (prev == (size_t)NULL || prev == current) - { - lock->count++; - return 1; - } - return 0; -} - -//============================================================ -// osd_lock_release -//============================================================ - -void osd_lock_release(osd_lock *lock) -{ - pthread_t current; - - current = pthread_self(); - if (lock->holder == current) - { - if (--lock->count == 0) -#if defined(__ppc__) || defined(__PPC__) || defined(__ppc64__) || defined(__PPC64__) - lock->holder = 0; - __asm__ __volatile__( " eieio " : : ); -#else - osd_exchange_pthread_t(&lock->holder, 0); -#endif - return; - } - - // trying to release a lock you don't hold is bad! -// assert(lock->holder == pthread_self()); -} - -//============================================================ -// osd_lock_free -//============================================================ - -void osd_lock_free(osd_lock *lock) -{ - free(lock); -} - //============================================================ // osd_event_alloc //============================================================ diff --git a/src/osd/modules/sync/sync_sdl.cpp b/src/osd/modules/sync/sync_sdl.cpp index 90969b2a068..73b735fefb3 100644 --- a/src/osd/modules/sync/sync_sdl.cpp +++ b/src/osd/modules/sync/sync_sdl.cpp @@ -51,138 +51,6 @@ struct osd_thread { void *param; }; -struct osd_scalable_lock -{ - SDL_mutex * mutex; -}; - -//============================================================ -// Scalable Locks -//============================================================ - -osd_scalable_lock *osd_scalable_lock_alloc(void) -{ - osd_scalable_lock *lock; - - lock = (osd_scalable_lock *)calloc(1, sizeof(*lock)); - if (lock == NULL) - return NULL; - - lock->mutex = SDL_CreateMutex(); - return lock; -} - - -INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock) -{ - SDL_mutexP(lock->mutex); - return 0; -} - - -void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot) -{ - SDL_mutexV(lock->mutex); -} - -void osd_scalable_lock_free(osd_scalable_lock *lock) -{ - SDL_DestroyMutex(lock->mutex); - free(lock); -} - -//============================================================ -// osd_lock_alloc -//============================================================ - -osd_lock *osd_lock_alloc(void) -{ - hidden_mutex_t *mutex; - - mutex = (hidden_mutex_t *)calloc(1, sizeof(hidden_mutex_t)); - if (mutex == NULL) - return NULL; - - mutex->id = SDL_CreateMutex(); - - return (osd_lock *)mutex; -} - -//============================================================ -// osd_lock_acquire -//============================================================ - -void osd_lock_acquire(osd_lock *lock) -{ - hidden_mutex_t *mutex = (hidden_mutex_t *) lock; - - LOG(("osd_lock_acquire")); - /* get the lock */ - mutex->locked++; /* signal that we are *about* to lock - prevent osd_lock_try */ - SDL_mutexP(mutex->id); - mutex->threadid = SDL_ThreadID(); -} - -//============================================================ -// osd_lock_try -//============================================================ - -int osd_lock_try(osd_lock *lock) -{ - hidden_mutex_t *mutex = (hidden_mutex_t *) lock; - - LOG(("osd_lock_try")); - if (mutex->locked && mutex->threadid == SDL_ThreadID()) - { - /* get the lock */ - SDL_mutexP(mutex->id); - mutex->locked++; - mutex->threadid = SDL_ThreadID(); - return 1; - } - else if ((mutex->locked == 0)) - { - /* get the lock */ - mutex->locked++; - SDL_mutexP(mutex->id); - mutex->threadid = SDL_ThreadID(); - return 1; - } - else - { - /* fail */ - return 0; - } -} - -//============================================================ -// osd_lock_release -//============================================================ - -void osd_lock_release(osd_lock *lock) -{ - hidden_mutex_t *mutex = (hidden_mutex_t *) lock; - - LOG(("osd_lock_release")); - mutex->locked--; - if (mutex->locked == 0) - mutex->threadid = -1; - SDL_mutexV(mutex->id); -} - -//============================================================ -// osd_lock_free -//============================================================ - -void osd_lock_free(osd_lock *lock) -{ - hidden_mutex_t *mutex = (hidden_mutex_t *) lock; - - LOG(("osd_lock_free")); - //osd_lock_release(lock); - SDL_DestroyMutex(mutex->id); - free(mutex); -} //============================================================ // osd_event_alloc @@ -323,11 +191,7 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam) return NULL; thread->callback = callback; thread->param = cbparam; -#ifdef SDLMAME_SDL2 thread->thread = SDL_CreateThread(worker_thread_entry, "Thread", thread); -#else - thread->thread = SDL_CreateThread(worker_thread_entry, thread); -#endif if ( thread->thread == NULL ) { free(thread); diff --git a/src/osd/modules/sync/sync_tc.cpp b/src/osd/modules/sync/sync_tc.cpp index 06dc699edce..64a6a760e96 100644 --- a/src/osd/modules/sync/sync_tc.cpp +++ b/src/osd/modules/sync/sync_tc.cpp @@ -58,123 +58,6 @@ struct osd_thread { pthread_t thread; }; -struct osd_scalable_lock -{ - osd_lock *lock; -}; - -//============================================================ -// Scalable Locks -//============================================================ - -osd_scalable_lock *osd_scalable_lock_alloc(void) -{ - osd_scalable_lock *lock; - - lock = (osd_scalable_lock *)calloc(1, sizeof(*lock)); - if (lock == NULL) - return NULL; - - lock->lock = osd_lock_alloc(); - return lock; -} - - -INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock) -{ - osd_lock_acquire(lock->lock); - return 0; -} - - -void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot) -{ - osd_lock_release(lock->lock); -} - -void osd_scalable_lock_free(osd_scalable_lock *lock) -{ - osd_lock_free(lock->lock); - free(lock); -} - - -//============================================================ -// osd_lock_alloc -//============================================================ - -osd_lock *osd_lock_alloc(void) -{ - hidden_mutex_t *mutex; - pthread_mutexattr_t mtxattr; - - mutex = (hidden_mutex_t *)calloc(1, sizeof(hidden_mutex_t)); - if (mutex == NULL) - return NULL; - - pthread_mutexattr_init(&mtxattr); - pthread_mutexattr_settype(&mtxattr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&mutex->id, &mtxattr); - - return (osd_lock *)mutex; -} - -//============================================================ -// osd_lock_acquire -//============================================================ - -void osd_lock_acquire(osd_lock *lock) -{ - hidden_mutex_t *mutex = (hidden_mutex_t *) lock; - int r; - - r = pthread_mutex_lock(&mutex->id); - if (r==0) - return; - //osd_printf_error("Error on lock: %d: %s\n", r, strerror(r)); -} - -//============================================================ -// osd_lock_try -//============================================================ - -int osd_lock_try(osd_lock *lock) -{ - hidden_mutex_t *mutex = (hidden_mutex_t *) lock; - int r; - - r = pthread_mutex_trylock(&mutex->id); - if (r==0) - return 1; - //if (r!=EBUSY) - // osd_printf_error("Error on trylock: %d: %s\n", r, strerror(r)); - return 0; -} - -//============================================================ -// osd_lock_release -//============================================================ - -void osd_lock_release(osd_lock *lock) -{ - hidden_mutex_t *mutex = (hidden_mutex_t *) lock; - - pthread_mutex_unlock(&mutex->id); -} - -//============================================================ -// osd_lock_free -//============================================================ - -void osd_lock_free(osd_lock *lock) -{ - hidden_mutex_t *mutex = (hidden_mutex_t *) lock; - - //pthread_mutex_unlock(&mutex->id); - pthread_mutex_destroy(&mutex->id); - free(mutex); -} - //============================================================ // osd_event_alloc //============================================================ diff --git a/src/osd/modules/sync/sync_windows.cpp b/src/osd/modules/sync/sync_windows.cpp index 9439d68b72c..c744f345e6f 100644 --- a/src/osd/modules/sync/sync_windows.cpp +++ b/src/osd/modules/sync/sync_windows.cpp @@ -23,8 +23,6 @@ //============================================================ #define DEBUG_SLOW_LOCKS 0 -#define USE_SCALABLE_LOCKS (0) - //============================================================ @@ -33,11 +31,6 @@ typedef BOOL (WINAPI *try_enter_critical_section_ptr)(LPCRITICAL_SECTION lpCriticalSection); -struct osd_lock -{ - CRITICAL_SECTION critsect; -}; - struct osd_event { void * ptr; @@ -49,113 +42,6 @@ struct osd_thread { void *param; }; -struct osd_scalable_lock -{ -#if USE_SCALABLE_LOCKS - struct - { - volatile INT32 haslock; // do we have the lock? - INT32 filler[64/4-1]; // assumes a 64-byte cache line - } slot[WORK_MAX_THREADS]; // one slot per thread - volatile INT32 nextindex; // index of next slot to use -#else - CRITICAL_SECTION section; -#endif -}; - - -//============================================================ -// GLOBAL VARIABLES -//============================================================ - -static try_enter_critical_section_ptr try_enter_critical_section = nullptr; -static int checked_for_try_enter = FALSE; - - - -//============================================================ -// osd_lock_alloc -//============================================================ - -osd_lock *osd_lock_alloc(void) -{ - osd_lock *lock = (osd_lock *)malloc(sizeof(*lock)); - if (lock == nullptr) - return nullptr; - InitializeCriticalSection(&lock->critsect); - return lock; -} - - -//============================================================ -// osd_lock_acquire -//============================================================ - -void osd_lock_acquire(osd_lock *lock) -{ -#if DEBUG_SLOW_LOCKS - osd_ticks_t ticks = osd_ticks(); -#endif - - // block until we can acquire the lock - EnterCriticalSection(&lock->critsect); - -#if DEBUG_SLOW_LOCKS - // log any locks that take more than 1ms - ticks = osd_ticks() - ticks; - if (ticks > osd_ticks_per_second() / 1000) osd_printf_debug("Blocked %d ticks on lock acquire\n", (int)ticks); -#endif -} - - -//============================================================ -// osd_lock_try -//============================================================ - -int osd_lock_try(osd_lock *lock) -{ - int result = TRUE; - - // if we haven't yet checked for the TryEnter API, do it now - if (!checked_for_try_enter) - { - // see if we can use TryEnterCriticalSection - HMODULE library = LoadLibrary(TEXT("kernel32.dll")); - if (library != nullptr) - try_enter_critical_section = (try_enter_critical_section_ptr)GetProcAddress(library, "TryEnterCriticalSection"); - checked_for_try_enter = TRUE; - } - - // if we have it, use it, otherwise just block - if (try_enter_critical_section != nullptr) - result = (*try_enter_critical_section)(&lock->critsect); - else - EnterCriticalSection(&lock->critsect); - return result; -} - - -//============================================================ -// osd_lock_release -//============================================================ - -void osd_lock_release(osd_lock *lock) -{ - LeaveCriticalSection(&lock->critsect); -} - - -//============================================================ -// osd_lock_free -//============================================================ - -void osd_lock_free(osd_lock *lock) -{ - DeleteCriticalSection(&lock->critsect); - free(lock); -} - - //============================================================ // win_compare_exchange32 //============================================================ @@ -317,66 +203,3 @@ int osd_thread_cpu_affinity(osd_thread *thread, UINT32 mask) { return TRUE; } - -//============================================================ -// Scalable Locks -//============================================================ - -osd_scalable_lock *osd_scalable_lock_alloc(void) -{ - osd_scalable_lock *lock; - - lock = (osd_scalable_lock *)calloc(1, sizeof(*lock)); - if (lock == nullptr) - return nullptr; - - memset(lock, 0, sizeof(*lock)); -#if USE_SCALABLE_LOCKS - lock->slot[0].haslock = TRUE; -#else - InitializeCriticalSection(&lock->section); -#endif - return lock; -} - - -INT32 osd_scalable_lock_acquire(osd_scalable_lock *lock) -{ -#if USE_SCALABLE_LOCKS - INT32 myslot = (atomic_increment32(&lock->nextindex) - 1) & (WORK_MAX_THREADS - 1); - INT32 backoff = 1; - - while (!lock->slot[myslot].haslock) - { - INT32 backcount; - for (backcount = 0; backcount < backoff; backcount++) - osd_yield_processor(); - backoff <<= 1; - } - lock->slot[myslot].haslock = FALSE; - return myslot; -#else - EnterCriticalSection(&lock->section); - return 0; -#endif -} - - -void osd_scalable_lock_release(osd_scalable_lock *lock, INT32 myslot) -{ -#if USE_SCALABLE_LOCKS - atomic_exchange32(&lock->slot[(myslot + 1) & (WORK_MAX_THREADS - 1)].haslock, TRUE); -#else - LeaveCriticalSection(&lock->section); -#endif -} - - -void osd_scalable_lock_free(osd_scalable_lock *lock) -{ -#if USE_SCALABLE_LOCKS -#else - DeleteCriticalSection(&lock->section); -#endif - free(lock); -} diff --git a/src/osd/modules/sync/work_osd.cpp b/src/osd/modules/sync/work_osd.cpp index e5582584666..3238fdfe792 100644 --- a/src/osd/modules/sync/work_osd.cpp +++ b/src/osd/modules/sync/work_osd.cpp @@ -18,6 +18,7 @@ #include <stdint.h> #endif #endif +#include <mutex> // MAME headers #include "osdcore.h" @@ -109,7 +110,7 @@ struct work_thread_info struct osd_work_queue { - osd_scalable_lock * lock; // lock for protecting the queue + std::mutex *lock; // lock for protecting the queue osd_work_item * volatile list; // list of items in the queue osd_work_item ** volatile tailptr; // pointer to the tail pointer of work items in the queue osd_work_item * volatile free; // free list of work items @@ -188,7 +189,7 @@ osd_work_queue *osd_work_queue_alloc(int flags) goto error; // initialize the critical section - queue->lock = osd_scalable_lock_alloc(); + queue->lock = new std::mutex(); if (queue->lock == NULL) goto error; @@ -421,7 +422,7 @@ void osd_work_queue_free(osd_work_queue *queue) printf("Spin loops = %9d\n", queue->spinloops); #endif - osd_scalable_lock_free(queue->lock); + delete queue->lock; // free the queue itself osd_free(queue); } @@ -435,7 +436,6 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call { osd_work_item *itemlist = NULL, *lastitem = NULL; osd_work_item **item_tailptr = &itemlist; - INT32 lockslot; int itemnum; // loop over items, building up a local list of work @@ -444,12 +444,14 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call osd_work_item *item; // first allocate a new work item; try the free list first - INT32 myslot = osd_scalable_lock_acquire(queue->lock); - do { - item = (osd_work_item *)queue->free; - } while (item != NULL && compare_exchange_ptr((PVOID volatile *)&queue->free, item, item->next) != item); - osd_scalable_lock_release(queue->lock, myslot); + queue->lock->lock(); + do + { + item = (osd_work_item *)queue->free; + } while (item != NULL && compare_exchange_ptr((PVOID volatile *)&queue->free, item, item->next) != item); + queue->lock->unlock(); + } // if nothing, allocate something new if (item == NULL) @@ -482,10 +484,12 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call } // enqueue the whole thing within the critical section - lockslot = osd_scalable_lock_acquire(queue->lock); - *queue->tailptr = itemlist; - queue->tailptr = item_tailptr; - osd_scalable_lock_release(queue->lock, lockslot); + { + queue->lock->lock(); + *queue->tailptr = itemlist; + queue->tailptr = item_tailptr; + queue->lock->unlock(); + } // increment the number of items in the queue atomic_add32(&queue->items, numitems); @@ -539,9 +543,9 @@ int osd_work_item_wait(osd_work_item *item, osd_ticks_t timeout) // if we don't have an event, create one if (item->event == NULL) { - INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock); + item->queue->lock->lock(); item->event = osd_event_alloc(TRUE, FALSE); // manual reset, not signalled - osd_scalable_lock_release(item->queue->lock, lockslot); + item->queue->lock->unlock(); } else osd_event_reset(item->event); @@ -584,13 +588,13 @@ void osd_work_item_release(osd_work_item *item) osd_work_item_wait(item, 100 * osd_ticks_per_second()); // add us to the free list on our queue - INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock); + item->queue->lock->lock(); do { next = (osd_work_item *)item->queue->free; item->next = next; } while (compare_exchange_ptr((PVOID volatile *)&item->queue->free, next, item) != next); - osd_scalable_lock_release(item->queue->lock, lockslot); + item->queue->lock->unlock(); } @@ -711,7 +715,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa // use a critical section to synchronize the removal of items { - INT32 lockslot = osd_scalable_lock_acquire(queue->lock); + queue->lock->lock(); if (queue->list == NULL) { end_loop = true; @@ -727,7 +731,7 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa queue->tailptr = (osd_work_item **)&queue->list; } } - osd_scalable_lock_release(queue->lock, lockslot); + queue->lock->unlock(); } if (end_loop) @@ -753,13 +757,13 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa // set the result and signal the event else { - INT32 lockslot = osd_scalable_lock_acquire(item->queue->lock); + queue->lock->lock(); if (item->event != NULL) { osd_event_set(item->event); add_to_stat(&item->queue->setevents, 1); } - osd_scalable_lock_release(item->queue->lock, lockslot); + queue->lock->unlock(); } // if we removed an item and there's still work to do, bump the stats @@ -780,8 +784,8 @@ static void worker_thread_process(osd_work_queue *queue, work_thread_info *threa bool queue_has_list_items(osd_work_queue *queue) { - INT32 lockslot = osd_scalable_lock_acquire(queue->lock); + queue->lock->lock(); bool has_list_items = (queue->list != NULL); - osd_scalable_lock_release(queue->lock, lockslot); + queue->lock->unlock(); return has_list_items; } diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h index 0a4f351e5e9..cd08fa8aa4e 100644 --- a/src/osd/osdcore.h +++ b/src/osd/osdcore.h @@ -440,93 +440,6 @@ osd_ticks_t osd_ticks_per_second(void); -----------------------------------------------------------------------------*/ void osd_sleep(osd_ticks_t duration); - - -/*************************************************************************** - SYNCHRONIZATION INTERFACES -***************************************************************************/ - -/* osd_lock is an opaque type which represents a recursive lock/mutex */ -struct osd_lock; - - -/*----------------------------------------------------------------------------- - osd_lock_alloc: allocate a new lock - - Parameters: - - None. - - Return value: - - A pointer to the allocated lock. ------------------------------------------------------------------------------*/ -osd_lock *osd_lock_alloc(void); - - -/*----------------------------------------------------------------------------- - osd_lock_acquire: acquire a lock, blocking until it can be acquired - - Parameters: - - lock - a pointer to a previously allocated osd_lock. - - Return value: - - None. - - Notes: - - osd_locks are defined to be recursive. If the current thread already - owns the lock, this function should return immediately. ------------------------------------------------------------------------------*/ -void osd_lock_acquire(osd_lock *lock); - - -/*----------------------------------------------------------------------------- - osd_lock_try: attempt to acquire a lock - - Parameters: - - lock - a pointer to a previously allocated osd_lock. - - Return value: - - TRUE if the lock was available and was acquired successfully. - FALSE if the lock was already in used by another thread. ------------------------------------------------------------------------------*/ -int osd_lock_try(osd_lock *lock); - - -/*----------------------------------------------------------------------------- - osd_lock_release: release control of a lock that has been acquired - - Parameters: - - lock - a pointer to a previously allocated osd_lock. - - Return value: - - None. ------------------------------------------------------------------------------*/ -void osd_lock_release(osd_lock *lock); - - -/*----------------------------------------------------------------------------- - osd_lock_free: free the memory and resources associated with an osd_lock - - Parameters: - - lock - a pointer to a previously allocated osd_lock. - - Return value: - - None. ------------------------------------------------------------------------------*/ -void osd_lock_free(osd_lock *lock); - - - /*************************************************************************** WORK ITEM INTERFACES ***************************************************************************/ diff --git a/src/osd/osdmini/minimisc.cpp b/src/osd/osdmini/minimisc.cpp index 2bf613b0b7c..9891447359b 100644 --- a/src/osd/osdmini/minimisc.cpp +++ b/src/osd/osdmini/minimisc.cpp @@ -103,11 +103,9 @@ int osd_setenv(const char *name, const char *value, int overwrite) //============================================================ // osd_subst_env //============================================================ -int osd_subst_env(char **dst, const char *src) +void osd_subst_env(char **dst, const char *src) { *dst = (char *)osd_malloc_array(strlen(src) + 1); if (*dst != nullptr) strcpy(*dst, src); - - return 0; } diff --git a/src/osd/osdmini/minisync.cpp b/src/osd/osdmini/minisync.cpp deleted file mode 100644 index a78765f29ed..00000000000 --- a/src/osd/osdmini/minisync.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -//============================================================ -// -// minisync.c - Minimal core synchronization functions -// -//============================================================ - -#include "osdcore.h" - - -//============================================================ -// osd_lock_alloc -//============================================================ - -osd_lock *osd_lock_alloc(void) -{ - // the minimal implementation does not support threading - // just return a dummy value here - return (osd_lock *)1; -} - - -//============================================================ -// osd_lock_acquire -//============================================================ - -void osd_lock_acquire(osd_lock *lock) -{ - // the minimal implementation does not support threading - // the acquire always "succeeds" -} - - -//============================================================ -// osd_lock_try -//============================================================ - -int osd_lock_try(osd_lock *lock) -{ - // the minimal implementation does not support threading - // the acquire always "succeeds" - return TRUE; -} - - -//============================================================ -// osd_lock_release -//============================================================ - -void osd_lock_release(osd_lock *lock) -{ - // the minimal implementation does not support threading - // do nothing here -} - - -//============================================================ -// osd_lock_free -//============================================================ - -void osd_lock_free(osd_lock *lock) -{ - // the minimal implementation does not support threading - // do nothing here -} diff --git a/src/osd/sdl/SDLMain_tmpl.h b/src/osd/sdl/SDLMain_tmpl.h deleted file mode 100644 index c5ad2a346dd..00000000000 --- a/src/osd/sdl/SDLMain_tmpl.h +++ /dev/null @@ -1,13 +0,0 @@ -// license:Zlib|LGPL-2.1+ -// copyright-holders:http://libsdl.org/ -/* SDLMain.m - main entry point for our Cocoa-ized SDL app - Initial Version: Darrell Walisser <dwaliss1@purdue.edu> - Non-NIB-Code & other changes: Max Horn <max@quendi.de> - - Feel free to customize this file to suit your needs -*/ - -#import <Cocoa/Cocoa.h> - -@interface SDLMain : NSObject -@end diff --git a/src/osd/sdl/SDLMain_tmpl.mm b/src/osd/sdl/SDLMain_tmpl.mm deleted file mode 100644 index 78b5d7f4937..00000000000 --- a/src/osd/sdl/SDLMain_tmpl.mm +++ /dev/null @@ -1,386 +0,0 @@ -// license:Zlib|LGPL-2.1+ -// copyright-holders:http://libsdl.org/ -/* SDLMain.m - main entry point for our Cocoa-ized SDL app - Initial Version: Darrell Walisser <dwaliss1@purdue.edu> - Non-NIB-Code & other changes: Max Horn <max@quendi.de> - - Feel free to customize this file to suit your needs -*/ - -#import "sdlinc.h" -#import "SDLMain_tmpl.h" -#import <sys/param.h> /* for MAXPATHLEN */ -#import <unistd.h> - -/* For some reason, Apple removed setAppleMenu from the headers in 10.4, - but the method still is there and works. To avoid warnings, we declare - it ourselves here. */ -@interface NSApplication(SDL_Missing_Methods) -- (void)setAppleMenu:(NSMenu *)menu; -@end - -/* Use this flag to determine whether we use SDLMain.nib or not */ -#define SDL_USE_NIB_FILE 0 - -/* Use this flag to determine whether we use CPS (docking) or not */ -#define SDL_USE_CPS 0 -#ifdef SDL_USE_CPS -/* Portions of CPS.h */ -typedef struct CPSProcessSerNum -{ - UInt32 lo; - UInt32 hi; -} CPSProcessSerNum; - -extern "C" OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn); -extern "C" OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5); -extern "C" OSErr CPSSetFrontProcess( CPSProcessSerNum *psn); - -#endif /* SDL_USE_CPS */ - -static int gArgc; -static char **gArgv; -static BOOL gFinderLaunch; -static BOOL gCalledAppMainline = FALSE; - -static NSString *getApplicationName(void) -{ - NSDictionary *dict; - NSString *appName = 0; - - /* Determine the application name */ - dict = (NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle()); - if (dict) - appName = [dict objectForKey: @"CFBundleName"]; - - if (![appName length]) - appName = [[NSProcessInfo processInfo] processName]; - - return appName; -} - -#if SDL_USE_NIB_FILE -/* A helper category for NSString */ -@interface NSString (ReplaceSubString) -- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString; -@end -#endif - -@interface SDLApplication : NSApplication -@end - -@implementation SDLApplication -/* Invoked from the Quit menu item */ -- (void)terminate:(id)sender -{ - /* Post a SDL_QUIT event */ - SDL_Event event; - event.type = SDL_QUIT; - SDL_PushEvent(&event); -} -@end - -/* The main class of the application, the application's delegate */ -@implementation SDLMain - -/* Set the working directory to the .app's parent directory */ -- (void) setupWorkingDirectory:(BOOL)shouldChdir -{ - if (shouldChdir) - { - char parentdir[MAXPATHLEN]; - CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); - CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); - if (CFURLGetFileSystemRepresentation(url2, true, (UInt8 *)parentdir, MAXPATHLEN)) { - assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */ - } - CFRelease(url); - CFRelease(url2); - } - -} - -#if SDL_USE_NIB_FILE - -/* Fix menu to contain the real app name instead of "SDL App" */ -- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName -{ - NSRange aRange; - NSEnumerator *enumerator; - NSMenuItem *menuItem; - - aRange = [[aMenu title] rangeOfString:@"SDL App"]; - if (aRange.length != 0) - [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]]; - - enumerator = [[aMenu itemArray] objectEnumerator]; - while ((menuItem = [enumerator nextObject])) - { - aRange = [[menuItem title] rangeOfString:@"SDL App"]; - if (aRange.length != 0) - [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]]; - if ([menuItem hasSubmenu]) - [self fixMenu:[menuItem submenu] withAppName:appName]; - } - [ aMenu sizeToFit ]; -} - -#else - -static void setApplicationMenu(void) -{ - /* warning: this code is very odd */ - NSMenu *appleMenu; - NSMenuItem *menuItem; - NSString *title; - NSString *appName; - - appName = getApplicationName(); - appleMenu = [[NSMenu alloc] initWithTitle:@""]; - - /* Add menu items */ - title = [@"About " stringByAppendingString:appName]; - [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""]; - - [appleMenu addItem:[NSMenuItem separatorItem]]; - - title = [@"Hide " stringByAppendingString:appName]; - [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"]; - - menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; - [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; - - [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; - - [appleMenu addItem:[NSMenuItem separatorItem]]; - - title = [@"Quit " stringByAppendingString:appName]; - [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"]; - - - /* Put menu into the menubar */ - menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; - [menuItem setSubmenu:appleMenu]; - [[NSApp mainMenu] addItem:menuItem]; - - /* Tell the application object that this is now the application menu */ - [NSApp setAppleMenu:appleMenu]; - - /* Finally give up our references to the objects */ - [appleMenu release]; - [menuItem release]; -} - -/* Create a window menu */ -static void setupWindowMenu(void) -{ - NSMenu *windowMenu; - NSMenuItem *windowMenuItem; - NSMenuItem *menuItem; - - windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; - - /* "Minimize" item */ - menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; - [windowMenu addItem:menuItem]; - [menuItem release]; - - /* Put menu into the menubar */ - windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""]; - [windowMenuItem setSubmenu:windowMenu]; - [[NSApp mainMenu] addItem:windowMenuItem]; - - /* Tell the application object that this is now the window menu */ - [NSApp setWindowsMenu:windowMenu]; - - /* Finally give up our references to the objects */ - [windowMenu release]; - [windowMenuItem release]; -} - -/* Replacement for NSApplicationMain */ -static void CustomApplicationMain (int argc, char **argv) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - SDLMain *sdlMain; - - /* Ensure the application object is initialised */ - [SDLApplication sharedApplication]; - -#ifdef SDL_USE_CPS - { - CPSProcessSerNum PSN; - /* Tell the dock about us */ - if (!CPSGetCurrentProcess(&PSN)) - if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103)) - if (!CPSSetFrontProcess(&PSN)) - [SDLApplication sharedApplication]; - } -#endif /* SDL_USE_CPS */ - - /* Set up the menubar */ - [NSApp setMainMenu:[[NSMenu alloc] init]]; - setApplicationMenu(); - setupWindowMenu(); - - /* Create SDLMain and make it the app delegate */ - sdlMain = [[SDLMain alloc] init]; - [NSApp setDelegate:sdlMain]; - - /* Start the main event loop */ - [NSApp run]; - - [sdlMain release]; - [pool release]; -} - -#endif - - -/* - * Catch document open requests...this lets us notice files when the app - * was launched by double-clicking a document, or when a document was - * dragged/dropped on the app's icon. You need to have a - * CFBundleDocumentsType section in your Info.plist to get this message, - * apparently. - * - * Files are added to gArgv, so to the app, they'll look like command line - * arguments. Previously, apps launched from the finder had nothing but - * an argv[0]. - * - * This message may be received multiple times to open several docs on launch. - * - * This message is ignored once the app's mainline has been called. - */ -- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename -{ - const char *temparg; - size_t arglen; - char *arg; - char **newargv; - - if (!gFinderLaunch) /* MacOS is passing command line args. */ - return FALSE; - - if (gCalledAppMainline) /* app has started, ignore this document. */ - return FALSE; - - temparg = [filename UTF8String]; - arglen = SDL_strlen(temparg) + 1; - arg = (char *) SDL_malloc(arglen); - if (arg == NULL) - return FALSE; - - newargv = (char **) SDL_realloc(gArgv, sizeof (char *) * (gArgc + 2)); - if (newargv == NULL) - { - SDL_free(arg); - return FALSE; - } - gArgv = newargv; - - SDL_strlcpy(arg, temparg, arglen); - gArgv[gArgc++] = arg; - gArgv[gArgc] = NULL; - return TRUE; -} - - -/* Called when the internal event loop has just started running */ -- (void) applicationDidFinishLaunching: (NSNotification *) note -{ - int status; - - /* Set the working directory to the .app's parent directory */ - [self setupWorkingDirectory:gFinderLaunch]; - -#if SDL_USE_NIB_FILE - /* Set the main menu to contain the real app name instead of "SDL App" */ - [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()]; -#endif - - /* Hand off to main application code */ - gCalledAppMainline = TRUE; - status = SDL_main (gArgc, gArgv); - - /* We're done, thank you for playing */ - exit(status); -} -@end - - -@implementation NSString (ReplaceSubString) - -- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString -{ - unsigned int bufferSize; - unsigned int selfLen = [self length]; - unsigned int aStringLen = [aString length]; - unichar *buffer; - NSRange localRange; - NSString *result; - - bufferSize = selfLen + aStringLen - aRange.length; - buffer = (unichar *)NSAllocateMemoryPages(bufferSize*sizeof(unichar)); - - /* Get first part into buffer */ - localRange.location = 0; - localRange.length = aRange.location; - [self getCharacters:buffer range:localRange]; - - /* Get middle part into buffer */ - localRange.location = 0; - localRange.length = aStringLen; - [aString getCharacters:(buffer+aRange.location) range:localRange]; - - /* Get last part into buffer */ - localRange.location = aRange.location + aRange.length; - localRange.length = selfLen - localRange.location; - [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange]; - - /* Build output string */ - result = [NSString stringWithCharacters:buffer length:bufferSize]; - - NSDeallocateMemoryPages(buffer, bufferSize); - - return result; -} - -@end - - - -#ifdef main -# undef main -#endif - - -/* Main entry point to executable - should *not* be SDL_main! */ -int main (int argc, char **argv) -{ - /* Copy the arguments into a global variable */ - /* This is passed if we are launched by double-clicking */ - if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) { - gArgv = (char **) SDL_malloc(sizeof (char *) * 2); - gArgv[0] = argv[0]; - gArgv[1] = NULL; - gArgc = 1; - gFinderLaunch = YES; - } else { - int i; - gArgc = argc; - gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1)); - for (i = 0; i <= argc; i++) - gArgv[i] = argv[i]; - gFinderLaunch = NO; - } - -#if SDL_USE_NIB_FILE - [SDLApplication poseAsClass:[NSApplication class]]; - NSApplicationMain (argc, argv); -#else - CustomApplicationMain (argc, argv); -#endif - return 0; -} - diff --git a/src/osd/sdl/input.cpp b/src/osd/sdl/input.cpp index 4dfb5bd0ad0..9cfcdb1cf16 100644 --- a/src/osd/sdl/input.cpp +++ b/src/osd/sdl/input.cpp @@ -15,6 +15,7 @@ #include "sdlinc.h" #include <ctype.h> #include <stddef.h> +#include <mutex> #if USE_XINPUT // for xinput @@ -154,7 +155,7 @@ struct device_info //============================================================ // global states -static osd_lock * input_lock; +static std::mutex input_lock; static UINT8 input_paused; static sdl_window_info * focus_window = NULL; @@ -234,7 +235,6 @@ struct kt_table { char * ui_name; }; -#if (SDLMAME_SDL2) #define OSD_SDL_INDEX(x) (x) #define OSD_SDL_INDEX_KEYSYM(keysym) ((keysym)->scancode) @@ -364,132 +364,6 @@ static kt_table sdl_key_trans_table[] = KTT_ENTRY0( BACKSLASH2, NONUSBACKSLASH, 0xdc, '\\', "BACKSLASH2" ), { ITEM_ID_INVALID } }; -#else - -#define OSD_SDL_INDEX(x) (SDLK_INDEX(x)-SDLK_FIRST) -#define OSD_SDL_INDEX_KEYSYM(keysym) (OSD_SDL_INDEX((keysym)->sym)) -#define GET_WINDOW(ev) sdl_window_list -#define GET_FOCUS_WINDOW(ev) sdl_window_list - -#define KTT_ENTRY0(MAME, SDL, VK, AS, UI) { ITEM_ID_ ## MAME, SDLK_ ## SDL, "ITEM_ID_" #MAME, (char *) UI } -#define KTT_ENTRY1(MAME, SDL) KTT_ENTRY0(MAME, SDL, MAME, MAME, #MAME) -// only for reference ... -#define KTT_ENTRY2(MAME, SDL) KTT_ENTRY0(MAME, SDL, 0, 0, #MAME) - - -static kt_table sdl_key_trans_table[] = -{ - // MAME key SDL key vkey ascii - KTT_ENTRY0( ESC, ESCAPE, 0x1b, 0x1b, "ESC" ), - KTT_ENTRY1( 1, 1 ), - KTT_ENTRY1( 2, 2 ), - KTT_ENTRY1( 3, 3 ), - KTT_ENTRY1( 4, 4 ), - KTT_ENTRY1( 5, 5 ), - KTT_ENTRY1( 6, 6 ), - KTT_ENTRY1( 7, 7 ), - KTT_ENTRY1( 8, 8 ), - KTT_ENTRY1( 9, 9 ), - KTT_ENTRY1( 0, 0 ), - KTT_ENTRY0( MINUS, MINUS, 0xbd, '-', "MINUS" ), - KTT_ENTRY0( EQUALS, EQUALS, 0xbb, '=', "EQUALS" ), - KTT_ENTRY0( BACKSPACE, BACKSPACE, 0x08, 0x08, "BACKSPACE" ), - KTT_ENTRY0( TAB, TAB, 0x09, 0x09, "TAB" ), - KTT_ENTRY1( Q, q ), - KTT_ENTRY1( W, w ), - KTT_ENTRY1( E, e ), - KTT_ENTRY1( R, r ), - KTT_ENTRY1( T, t ), - KTT_ENTRY1( Y, y ), - KTT_ENTRY1( U, u ), - KTT_ENTRY1( I, i ), - KTT_ENTRY1( O, o ), - KTT_ENTRY1( P, p ), - KTT_ENTRY0( OPENBRACE, LEFTBRACKET, 0xdb, '[', "OPENBRACE" ), - KTT_ENTRY0( CLOSEBRACE,RIGHTBRACKET, 0xdd, ']', "CLOSEBRACE" ), - KTT_ENTRY0( ENTER, RETURN, 0x0d, 0x0d, "RETURN" ), - KTT_ENTRY2( LCONTROL, LCTRL ), - KTT_ENTRY1( A, a ), - KTT_ENTRY1( S, s ), - KTT_ENTRY1( D, d ), - KTT_ENTRY1( F, f ), - KTT_ENTRY1( G, g ), - KTT_ENTRY1( H, h ), - KTT_ENTRY1( J, j ), - KTT_ENTRY1( K, k ), - KTT_ENTRY1( L, l ), - KTT_ENTRY0( COLON, SEMICOLON, 0xba, ';', "COLON" ), - KTT_ENTRY0( QUOTE, QUOTE, 0xde, '\'', "QUOTE" ), - KTT_ENTRY2( LSHIFT, LSHIFT ), - KTT_ENTRY0( BACKSLASH, BACKSLASH, 0xdc, '\\', "BACKSLASH" ), - KTT_ENTRY1( Z, z ), - KTT_ENTRY1( X, x ), - KTT_ENTRY1( C, c ), - KTT_ENTRY1( V, v ), - KTT_ENTRY1( B, b ), - KTT_ENTRY1( N, n ), - KTT_ENTRY1( M, m ), - KTT_ENTRY0( COMMA, COMMA, 0xbc, ',', "COMMA" ), - KTT_ENTRY0( STOP, PERIOD, 0xbe, '.', "STOP" ), - KTT_ENTRY0( SLASH, SLASH, 0xbf, '/', "SLASH" ), - KTT_ENTRY2( RSHIFT, RSHIFT ), - KTT_ENTRY0( ASTERISK, KP_MULTIPLY, '*', '*', "ASTERIX" ), - KTT_ENTRY2( LALT, LALT ), - KTT_ENTRY0( SPACE, SPACE, ' ', ' ', "SPACE" ), - KTT_ENTRY2( CAPSLOCK, CAPSLOCK ), - KTT_ENTRY2( F1, F1 ), - KTT_ENTRY2( F2, F2 ), - KTT_ENTRY2( F3, F3 ), - KTT_ENTRY2( F4, F4 ), - KTT_ENTRY2( F5, F5 ), - KTT_ENTRY2( F6, F6 ), - KTT_ENTRY2( F7, F7 ), - KTT_ENTRY2( F8, F8 ), - KTT_ENTRY2( F9, F9 ), - KTT_ENTRY2( F10, F10 ), - KTT_ENTRY2( NUMLOCK, NUMLOCK ), - KTT_ENTRY2( SCRLOCK, SCROLLOCK ), - KTT_ENTRY2( 7_PAD, KP7 ), - KTT_ENTRY2( 8_PAD, KP8 ), - KTT_ENTRY2( 9_PAD, KP9 ), - KTT_ENTRY2( MINUS_PAD, KP_MINUS ), - KTT_ENTRY2( 4_PAD, KP4 ), - KTT_ENTRY2( 5_PAD, KP5 ), - KTT_ENTRY2( 6_PAD, KP6 ), - KTT_ENTRY2( PLUS_PAD, KP_PLUS ), - KTT_ENTRY2( 1_PAD, KP1 ), - KTT_ENTRY2( 2_PAD, KP2 ), - KTT_ENTRY2( 3_PAD, KP3 ), - KTT_ENTRY2( 0_PAD, KP0 ), - KTT_ENTRY2( DEL_PAD, KP_PERIOD ), - KTT_ENTRY2( F11, F11 ), - KTT_ENTRY2( F12, F12 ), - KTT_ENTRY2( F13, F13 ), - KTT_ENTRY2( F14, F14 ), - KTT_ENTRY2( F15, F15 ), - KTT_ENTRY2( ENTER_PAD, KP_ENTER ), - KTT_ENTRY2( RCONTROL, RCTRL ), - KTT_ENTRY2( SLASH_PAD, KP_DIVIDE ), - KTT_ENTRY2( PRTSCR, PRINT ), - KTT_ENTRY2( RALT, RALT ), - KTT_ENTRY2( HOME, HOME ), - KTT_ENTRY2( UP, UP ), - KTT_ENTRY2( PGUP, PAGEUP ), - KTT_ENTRY2( LEFT, LEFT ), - KTT_ENTRY2( RIGHT, RIGHT ), - KTT_ENTRY2( END, END ), - KTT_ENTRY2( DOWN, DOWN ), - KTT_ENTRY2( PGDN, PAGEDOWN ), - KTT_ENTRY2( INSERT, INSERT ), - { ITEM_ID_DEL, SDLK_DELETE, "ITEM_ID_DEL", (char *)"DELETE" }, - KTT_ENTRY2( LWIN, LSUPER ), - KTT_ENTRY2( RWIN, RSUPER ), - KTT_ENTRY2( MENU, MENU ), - KTT_ENTRY0( TILDE, BACKQUOTE, 0xc0, '`', "TILDE" ), - KTT_ENTRY0( BACKSLASH2, HASH, 0xdc, '\\', "BACKSLASH2" ), - { ITEM_ID_INVALID } -}; -#endif struct key_lookup_table { @@ -497,7 +371,6 @@ struct key_lookup_table const char *name; }; -#if (SDLMAME_SDL2) #define KE(x) { SDL_SCANCODE_ ## x, "SDL_SCANCODE_" #x }, #define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H) #define KE7(A, B, C, D, E, F, G) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) @@ -526,46 +399,6 @@ static key_lookup_table sdl_lookup_table[] = KE(UNDO) {-1, ""} }; -#else -#define KE(x) { SDLK_ ## x, "SDLK_" #x }, -#define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H) - -static key_lookup_table sdl_lookup_table[] = -{ - KE8(UNKNOWN, FIRST, BACKSPACE, TAB, CLEAR, RETURN, PAUSE, ESCAPE ) - KE8(SPACE, EXCLAIM, QUOTEDBL, HASH, DOLLAR, AMPERSAND, QUOTE, LEFTPAREN ) - KE8(RIGHTPAREN, ASTERISK, PLUS, COMMA, MINUS, PERIOD, SLASH, 0 ) - KE8(1, 2, 3, 4, 5, 6, 7, 8 ) - KE8(9, COLON, SEMICOLON, LESS, EQUALS, GREATER, QUESTION, AT ) - KE8(LEFTBRACKET,BACKSLASH, RIGHTBRACKET, CARET, UNDERSCORE, BACKQUOTE, a, b ) - KE8(c, d, e, f, g, h, i, j ) - KE8(k, l, m, n, o, p, q, r ) - KE8(s, t, u, v, w, x, y, z ) - KE8(DELETE, WORLD_0, WORLD_1, WORLD_2, WORLD_3, WORLD_4, WORLD_5, WORLD_6 ) - KE8(WORLD_7, WORLD_8, WORLD_9, WORLD_10, WORLD_11, WORLD_12, WORLD_13, WORLD_14 ) - KE8(WORLD_15, WORLD_16, WORLD_17, WORLD_18, WORLD_19, WORLD_20, WORLD_21, WORLD_22 ) - KE8(WORLD_23, WORLD_24, WORLD_25, WORLD_26, WORLD_27, WORLD_28, WORLD_29, WORLD_30 ) - KE8(WORLD_31, WORLD_32, WORLD_33, WORLD_34, WORLD_35, WORLD_36, WORLD_37, WORLD_38 ) - KE8(WORLD_39, WORLD_40, WORLD_41, WORLD_42, WORLD_43, WORLD_44, WORLD_45, WORLD_46 ) - KE8(WORLD_47, WORLD_48, WORLD_49, WORLD_50, WORLD_51, WORLD_52, WORLD_53, WORLD_54 ) - KE8(WORLD_55, WORLD_56, WORLD_57, WORLD_58, WORLD_59, WORLD_60, WORLD_61, WORLD_62 ) - KE8(WORLD_63, WORLD_64, WORLD_65, WORLD_66, WORLD_67, WORLD_68, WORLD_69, WORLD_70 ) - KE8(WORLD_71, WORLD_72, WORLD_73, WORLD_74, WORLD_75, WORLD_76, WORLD_77, WORLD_78 ) - KE8(WORLD_79, WORLD_80, WORLD_81, WORLD_82, WORLD_83, WORLD_84, WORLD_85, WORLD_86 ) - KE8(WORLD_87, WORLD_88, WORLD_89, WORLD_90, WORLD_91, WORLD_92, WORLD_93, WORLD_94 ) - KE8(WORLD_95, KP0, KP1, KP2, KP3, KP4, KP5, KP6 ) - KE8(KP7, KP8, KP9, KP_PERIOD, KP_DIVIDE, KP_MULTIPLY,KP_MINUS, KP_PLUS ) - KE8(KP_ENTER, KP_EQUALS, UP, DOWN, RIGHT, LEFT, INSERT, HOME ) - KE8(END, PAGEUP, PAGEDOWN, F1, F2, F3, F4, F5 ) - KE8(F6, F7, F8, F9, F10, F11, F12, F13 ) - KE8(F14, F15, NUMLOCK, CAPSLOCK, SCROLLOCK, RSHIFT, LSHIFT, RCTRL ) - KE8(LCTRL, RALT, LALT, RMETA, LMETA, LSUPER, RSUPER, MODE ) - KE8(COMPOSE, HELP, PRINT, SYSREQ, BREAK, MENU, POWER, EURO ) - KE(UNDO) - KE(LAST) - {-1, ""} -}; -#endif //============================================================ // INLINE FUNCTIONS @@ -717,14 +550,9 @@ static void sdlinput_register_joysticks(running_machine &machine) { char *joy_name; -#if (SDLMAME_SDL2) joy = SDL_JoystickOpen(physical_stick); joy_name = remove_spaces(machine, SDL_JoystickName(joy)); SDL_JoystickClose(joy); -#else - joy_name = remove_spaces(machine, SDL_JoystickName(physical_stick)); -#endif - devmap_register(&joy_map, physical_stick, joy_name); } @@ -1240,7 +1068,7 @@ static kt_table * sdlinput_read_keymap(running_machine &machine) { sdl2section = 1; } - else if (((SDLMAME_SDL2) ^ sdl2section) == 0) + else if (((1) ^ sdl2section) == 0) { mks[0]=0; sks[0]=0; @@ -1380,10 +1208,6 @@ bool sdl_osd_interface::input_init() app_has_mouse_focus = 1; - // allocate a lock for input synchronizations - input_lock = osd_lock_alloc(); - assert_always(input_lock != NULL, "Failed to allocate input_lock"); - // register the keyboards sdlinput_register_keyboards(machine()); @@ -1441,9 +1265,6 @@ void sdl_osd_interface::input_resume() void sdl_osd_interface::input_exit() { - // free the lock - osd_lock_free(input_lock); - // deregister sdlinput_deregister_joysticks(machine()); @@ -1524,7 +1345,6 @@ INT32 normalize_absolute_axis(INT32 raw, INT32 rawmin, INT32 rawmax) // sdlinput_poll //============================================================ -#if (SDLMAME_SDL2) static inline sdl_window_info * window_from_id(Uint32 windowID) { sdl_window_info *w; @@ -1560,19 +1380,15 @@ static inline void resize_all_windows(void) } } -#endif - void sdlinput_process_events_buf() { SDL_Event event; if (SDLMAME_EVENTS_IN_WORKER_THREAD) { - osd_lock_acquire(input_lock); - #if (SDLMAME_SDL2) + std::lock_guard<std::mutex> lock(input_lock); /* Make sure we get all pending events */ SDL_PumpEvents(); - #endif while(SDL_PollEvent(&event)) { if (event_buf_count < MAX_BUF_EVENTS) @@ -1580,7 +1396,6 @@ void sdlinput_process_events_buf() else osd_printf_warning("Event Buffer Overflow!\n"); } - osd_lock_release(input_lock); } else SDL_PumpEvents(); @@ -1709,11 +1524,10 @@ void sdlinput_poll(running_machine &machine) if (SDLMAME_EVENTS_IN_WORKER_THREAD) { - osd_lock_acquire(input_lock); + std::lock_guard<std::mutex> lock(input_lock); memcpy(loc_event_buf, event_buf, sizeof(event_buf)); loc_event_buf_count = event_buf_count; event_buf_count = 0; - osd_lock_release(input_lock); bufp = 0; } @@ -1739,12 +1553,8 @@ void sdlinput_poll(running_machine &machine) devinfo = generic_device_find_index( keyboard_list, keyboard_map.logical[0]); #endif devinfo->keyboard.state[OSD_SDL_INDEX_KEYSYM(&event.key.keysym)] = 0x80; -#if (SDLMAME_SDL2) if (event.key.keysym.sym < 0x20) machine.ui_input().push_char_event(sdl_window_list->target(), event.key.keysym.sym); -#else - ui_input_push_char_event(machine, sdl_window_list->target(), (unicode_char) event.key.keysym.unicode); -#endif break; case SDL_KEYUP: #ifdef SDL2_MULTIAPI @@ -1863,6 +1673,19 @@ void sdlinput_poll(running_machine &machine) } } break; + case SDL_MOUSEWHEEL: +#ifdef SDL2_MULTIAPI + devinfo = generic_device_find_index(mouse_list, mouse_map.logical[event.wheel.which]); +#else + devinfo = generic_device_find_index(mouse_list, mouse_map.logical[0]); +#endif + if (devinfo) + { + sdl_window_info *window = GET_FOCUS_WINDOW(&event.wheel); + if (window != NULL) + machine.ui_input().push_mouse_wheel_event(window->target(), 0, 0, event.wheel.y, 3); + } + break; case SDL_MOUSEBUTTONUP: #ifdef SDL2_MULTIAPI devinfo = generic_device_find_index(mouse_list, mouse_map.logical[event.button.which]); @@ -1889,15 +1712,10 @@ void sdlinput_poll(running_machine &machine) #else devinfo = generic_device_find_index(mouse_list, mouse_map.logical[0]); #endif -#if (SDLMAME_SDL2) // FIXME: may apply to 1.2 as well ... //printf("Motion %d %d %d %s\n", event.motion.which, event.motion.x, event.motion.y, devinfo->name.c_str()); devinfo->mouse.lX += event.motion.xrel * INPUT_RELATIVE_PER_PIXEL; devinfo->mouse.lY += event.motion.yrel * INPUT_RELATIVE_PER_PIXEL; -#else - devinfo->mouse.lX = event.motion.xrel * INPUT_RELATIVE_PER_PIXEL; - devinfo->mouse.lY = event.motion.yrel * INPUT_RELATIVE_PER_PIXEL; -#endif { int cx=-1, cy=-1; sdl_window_info *window = GET_FOCUS_WINDOW(&event.motion); @@ -1912,22 +1730,6 @@ void sdlinput_poll(running_machine &machine) devinfo->joystick.balls[event.jball.ball * 2] = event.jball.xrel * INPUT_RELATIVE_PER_PIXEL; devinfo->joystick.balls[event.jball.ball * 2 + 1] = event.jball.yrel * INPUT_RELATIVE_PER_PIXEL; break; -#if (!SDLMAME_SDL2) - case SDL_APPMOUSEFOCUS: - app_has_mouse_focus = event.active.gain; - if (!event.active.gain) - { - sdl_window_info *window = GET_FOCUS_WINDOW(&event.motion); - ui_input_push_mouse_leave_event(machine, window->target()); - } - break; - case SDL_QUIT: - machine.schedule_exit(); - break; - case SDL_VIDEORESIZE: - sdl_window_list->resize(event.resize.w, event.resize.h); - break; -#else case SDL_TEXTINPUT: if (*event.text.text) { @@ -1978,8 +1780,8 @@ void sdlinput_poll(running_machine &machine) #endif { //printf("event data1,data2 %d x %d %ld\n", event.window.data1, event.window.data2, sizeof(SDL_Event)); - window->resize(event.window.data1, event.window.data2); - } + window->resize(event.window.data1, event.window.data2); + } } focus_window = window; break; @@ -1995,12 +1797,9 @@ void sdlinput_poll(running_machine &machine) } break; } -#endif } } -#if (SDLMAME_SDL2) resize_all_windows(); -#endif } @@ -2011,10 +1810,6 @@ void sdlinput_poll(running_machine &machine) void sdlinput_release_keys() { - // FIXME: SDL >= 1.3 will nuke the window event buffer when - // a window is closed. This will leave keys in a pressed - // state when a window is destroyed and recreated. -#if (SDLMAME_SDL2) device_info *devinfo; int index; @@ -2025,7 +1820,6 @@ void sdlinput_release_keys() break; memset(&devinfo->keyboard.state, 0, sizeof(devinfo->keyboard.state)); } -#endif } diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h index e82c75406cc..bca299eb49d 100644 --- a/src/osd/sdl/osdsdl.h +++ b/src/osd/sdl/osdsdl.h @@ -17,15 +17,9 @@ #if defined(SDLMAME_WIN32) - #if (SDLMAME_SDL2) #define SDLMAME_EVENTS_IN_WORKER_THREAD (0) #define SDLMAME_INIT_IN_WORKER_THREAD (0) #define SDL13_COMBINE_RESIZE (0) //(1) no longer needed - #else - #define SDLMAME_EVENTS_IN_WORKER_THREAD (0) - #define SDLMAME_INIT_IN_WORKER_THREAD (1) - #define SDL13_COMBINE_RESIZE (0) - #endif #else #define SDLMAME_EVENTS_IN_WORKER_THREAD (0) #define SDLMAME_INIT_IN_WORKER_THREAD (0) @@ -122,10 +116,8 @@ public: const char *joy_index(int index) const { return value(strformat("%s%d", SDLOPTION_JOYINDEX, index).c_str()); } bool sixaxis() const { return bool_value(SDLOPTION_SIXAXIS); } -#if (SDLMAME_SDL2) const char *mouse_index(int index) const { return value(strformat("%s%d", SDLOPTION_MOUSEINDEX, index).c_str()); } const char *keyboard_index(int index) const { return value(strformat("%s%d", SDLOPTION_KEYBINDEX, index).c_str()); } -#endif const char *video_driver() const { return value(SDLOPTION_VIDEODRIVER); } const char *render_driver() const { return value(SDLOPTION_RENDERDRIVER); } diff --git a/src/osd/sdl/sdlfile.cpp b/src/osd/sdl/sdlfile.cpp index b6088c8aa54..1f6832b03dd 100644 --- a/src/osd/sdl/sdlfile.cpp +++ b/src/osd/sdl/sdlfile.cpp @@ -134,6 +134,8 @@ file_error osd_open(const char *path, UINT32 openflags, osd_file **file, UINT64 { (*file)->type = SDLFILE_SOCKET; filerr = sdl_open_socket(path, openflags, file, filesize); + if(filerr != FILERR_NONE && (*file)->socket != -1) + close((*file)->socket); goto error; } diff --git a/src/osd/sdl/sdlinc.h b/src/osd/sdl/sdlinc.h index 2bb5dfd0954..47ead42c0cf 100644 --- a/src/osd/sdl/sdlinc.h +++ b/src/osd/sdl/sdlinc.h @@ -3,20 +3,11 @@ #ifndef _sdlinc_h_ #define _sdlinc_h_ -#if (SDLMAME_SDL2) #include <SDL2/SDL.h> #include <SDL2/SDL_version.h> // on win32 this includes windows.h by itself and breaks us! #ifndef SDLMAME_WIN32 #include <SDL2/SDL_syswm.h> #endif -#else -#include <SDL/SDL.h> -#include <SDL/SDL_version.h> -// on win32 this includes windows.h by itself and breaks us! -#if !defined(SDLMAME_WIN32) && !defined(SDLMAME_DARWIN) && !defined(SDLMAME_MACOSX) -#include <SDL/SDL_syswm.h> -#endif -#endif #endif diff --git a/src/osd/sdl/sdlmain.cpp b/src/osd/sdl/sdlmain.cpp index 2f382605cbb..530aa41c9d4 100644 --- a/src/osd/sdl/sdlmain.cpp +++ b/src/osd/sdl/sdlmain.cpp @@ -101,11 +101,7 @@ const options_entry sdl_options::s_option_entries[] = // OS X can be trusted to have working hardware OpenGL, so default to it on for the best user experience { SDLOPTION_CENTERH, "1", OPTION_BOOLEAN, "center horizontally within the view area" }, { SDLOPTION_CENTERV, "1", OPTION_BOOLEAN, "center vertically within the view area" }, -#if (SDLMAME_SDL2) { SDLOPTION_SCALEMODE ";sm", OSDOPTVAL_NONE, OPTION_STRING, "Scale mode: none, hwblit, hwbest, yv12, yuy2, yv12x2, yuy2x2 (-video soft only)" }, -#else - { SDLOPTION_SCALEMODE ";sm", OSDOPTVAL_NONE, OPTION_STRING, "Scale mode: none, async, yv12, yuy2, yv12x2, yuy2x2 (-video soft only)" }, -#endif // full screen options #ifdef SDLMAME_X11 @@ -143,7 +139,6 @@ const options_entry sdl_options::s_option_entries[] = { SDLOPTION_LIGHTGUNINDEX "8", OSDOPTVAL_AUTO, OPTION_STRING, "name of lightgun mapped to lightgun #8" }, #endif -#if (SDLMAME_SDL2) { NULL, NULL, OPTION_HEADER, "SDL MOUSE MAPPING" }, { SDLOPTION_MOUSEINDEX "1", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #1" }, { SDLOPTION_MOUSEINDEX "2", OSDOPTVAL_AUTO, OPTION_STRING, "name of mouse mapped to mouse #2" }, @@ -163,13 +158,11 @@ const options_entry sdl_options::s_option_entries[] = { SDLOPTION_KEYBINDEX "6", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #6" }, { SDLOPTION_KEYBINDEX "7", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #7" }, { SDLOPTION_KEYBINDEX "8", OSDOPTVAL_AUTO, OPTION_STRING, "name of keyboard mapped to keyboard #8" }, -#endif + // SDL low level driver options { NULL, NULL, OPTION_HEADER, "SDL LOWLEVEL DRIVER OPTIONS" }, { SDLOPTION_VIDEODRIVER ";vd", OSDOPTVAL_AUTO, OPTION_STRING, "sdl video driver to use ('x11', 'directfb', ... or 'auto' for SDL default" }, -#if (SDLMAME_SDL2) { SDLOPTION_RENDERDRIVER ";rd", OSDOPTVAL_AUTO, OPTION_STRING, "sdl render driver to use ('software', 'opengl', 'directfb' ... or 'auto' for SDL default" }, -#endif { SDLOPTION_AUDIODRIVER ";ad", OSDOPTVAL_AUTO, OPTION_STRING, "sdl audio driver to use ('alsa', 'arts', ... or 'auto' for SDL default" }, #if USE_OPENGL { SDLOPTION_GL_LIB, SDLOPTVAL_GLLIB, OPTION_STRING, "alternative libGL.so to use; 'auto' for system default" }, @@ -225,21 +218,6 @@ int main(int argc, char *argv[]) { int res = 0; -#if defined(SDLMAME_X11) && !(SDLMAME_SDL2) - XInitThreads(); -#endif - -#if defined(SDLMAME_WIN32) -#if !(SDLMAME_SDL2) - /* Load SDL dynamic link library */ - if ( SDL_Init(SDL_INIT_NOPARACHUTE) < 0 ) { - fprintf(stderr, "WinMain() error: %s", SDL_GetError()); - return(FALSE); - } - SDL_SetModuleHandle(GetModuleHandle(NULL)); -#endif -#endif - // disable I/O buffering setvbuf(stdout, (char *) NULL, _IONBF, 0); setvbuf(stderr, (char *) NULL, _IONBF, 0); @@ -257,25 +235,6 @@ int main(int argc, char *argv[]) MorphToPM(); #endif -#if defined(SDLMAME_X11) && (SDL_MAJOR_VERSION == 1) && (SDL_MINOR_VERSION == 2) - if (SDL_Linked_Version()->patch < 10) - /* workaround for SDL choosing a 32-bit ARGB visual */ - { - Display *display; - if ((display = XOpenDisplay(NULL)) && (DefaultDepth(display, DefaultScreen(display)) >= 24)) - { - XVisualInfo vi; - char buf[130]; - if (XMatchVisualInfo(display, DefaultScreen(display), 24, TrueColor, &vi)) { - snprintf(buf, sizeof(buf), "0x%lx", vi.visualid); - osd_setenv(SDLENV_VISUALID, buf, 0); - } - } - if (display) - XCloseDisplay(display); - } -#endif - { sdl_options options; sdl_osd_interface osd(options); @@ -340,11 +299,7 @@ void sdl_osd_interface::osd_exit() if (!SDLMAME_INIT_IN_WORKER_THREAD) { /* FixMe: Bug in SDL2.0, Quitting joystick will cause SIGSEGV */ -#if SDLMAME_SDL2 SDL_QuitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO /*| SDL_INIT_JOYSTICK */); -#else - SDL_Quit(); -#endif } } @@ -419,7 +374,6 @@ static void defines_verbose(void) static void osd_sdl_info(void) { -#if SDLMAME_SDL2 int i, num = SDL_GetNumVideoDrivers(); osd_printf_verbose("Available videodrivers: "); @@ -456,8 +410,6 @@ static void osd_sdl_info(void) { osd_printf_verbose("\t%-20s\n", SDL_GetAudioDriver(i)); } - -#endif } @@ -512,7 +464,6 @@ void sdl_osd_interface::init(running_machine &machine) osd_setenv(SDLENV_VIDEODRIVER, stemp, 1); } -#if (SDLMAME_SDL2) stemp = options().render_driver(); if (stemp != NULL) { @@ -532,7 +483,6 @@ void sdl_osd_interface::init(running_machine &machine) #endif } } -#endif /* Set the SDL environment variable for drivers wanting to load the * lib at startup. @@ -567,16 +517,12 @@ void sdl_osd_interface::init(running_machine &machine) if (!SDLMAME_INIT_IN_WORKER_THREAD) { -#if (SDLMAME_SDL2) #ifdef SDLMAME_EMSCRIPTEN // timer brings in threads which are not supported in Emscripten if (SDL_InitSubSystem(SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) { #else if (SDL_InitSubSystem(SDL_INIT_TIMER| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) { #endif -#else - if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) { -#endif osd_printf_error("Could not initialize SDL %s\n", SDL_GetError()); exit(-1); } @@ -600,13 +546,9 @@ void sdl_osd_interface::init(running_machine &machine) m_watchdog->setTimeout(watchdog_timeout); } -#if (SDLMAME_SDL2) #ifdef SDLMAME_EMSCRIPTEN SDL_EventState(SDL_TEXTINPUT, SDL_FALSE); #else SDL_EventState(SDL_TEXTINPUT, SDL_TRUE); #endif -#else - SDL_EnableUNICODE(SDL_TRUE); -#endif } diff --git a/src/osd/sdl/sdlos_unix.cpp b/src/osd/sdl/sdlos_unix.cpp index 5811e0c7dc5..23080512e91 100644 --- a/src/osd/sdl/sdlos_unix.cpp +++ b/src/osd/sdl/sdlos_unix.cpp @@ -23,11 +23,6 @@ // MAME headers #include "osdcore.h" - - - -#if (SDLMAME_SDL2) - //============================================================ // osd_get_clipboard_text //============================================================ @@ -45,104 +40,3 @@ char *osd_get_clipboard_text(void) } return result; } - -#elif defined(SDL_VIDEO_DRIVER_X11) && defined(SDLMAME_X11) - -//============================================================ -// osd_get_clipboard_text -//============================================================ - -char *osd_get_clipboard_text(void) -{ - SDL_SysWMinfo info; - Display* display; - Window our_win; - Window selection_win; - Atom data_type; - int data_format; - unsigned long nitems; - unsigned long bytes_remaining; - unsigned char* prop; - char* result; - XEvent event; - Uint32 t0, t1; - Atom types[2]; - int i; - - /* get & validate SDL sys-wm info */ - SDL_VERSION(&info.version); - if ( ! SDL_GetWMInfo( &info ) ) - return NULL; - if ( info.subsystem != SDL_SYSWM_X11 ) - return NULL; - if ( (display = info.info.x11.display) == NULL ) - return NULL; - if ( (our_win = info.info.x11.window) == None ) - return NULL; - - /* request data to owner */ - selection_win = XGetSelectionOwner( display, XA_PRIMARY ); - if ( selection_win == None ) - return NULL; - - /* first, try UTF-8, then latin-1 */ - types[0] = XInternAtom( display, "UTF8_STRING", False ); - types[1] = XA_STRING; /* latin-1 */ - - for ( i = 0; i < ARRAY_LENGTH(types); i++ ) - { - XConvertSelection( display, XA_PRIMARY, types[i], types[i], our_win, CurrentTime ); - - /* wait for SelectionNotify, but no more than 100 ms */ - t0 = t1 = SDL_GetTicks(); - while ( 1 ) - { - if ( XCheckTypedWindowEvent( display, our_win, SelectionNotify, &event ) ) break; - SDL_Delay( 1 ); - t1 = SDL_GetTicks(); - if ( t1 - t0 > 100 ) - return NULL; - } - if ( event.xselection.property == None ) - continue; - - /* get property & check its type */ - if ( XGetWindowProperty( display, our_win, types[i], 0, 65536, False, types[i], - &data_type, &data_format, &nitems, &bytes_remaining, &prop ) - != Success ) - continue; - if ( ! prop ) - continue; - if ( (data_format != 8) || (data_type != types[i]) ) - { - XFree( prop ); - continue; - } - - /* return a copy & free original */ - if (prop != NULL) - { - result = (char *) osd_malloc_array(strlen((char *)prop)+1); - strcpy(result, (char *)prop); - } - else - result = NULL; - XFree( prop ); - return result; - } - - return NULL; -} - -#else -//============================================================ -// osd_get_clipboard_text -//============================================================ - -char *osd_get_clipboard_text(void) -{ - char *result = NULL; - - return result; -} -#endif diff --git a/src/osd/sdl/testkeys.cpp b/src/osd/sdl/testkeys.cpp index 444c1b9eeb2..850ec1ad506 100644 --- a/src/osd/sdl/testkeys.cpp +++ b/src/osd/sdl/testkeys.cpp @@ -24,7 +24,6 @@ struct key_lookup_table const char *name; }; -#if (SDLMAME_SDL2) #define KE(x) { SDL_SCANCODE_ ## x, "SDL_SCANCODE_" #x }, #define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H) #define KE7(A, B, C, D, E, F, G) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) @@ -53,46 +52,6 @@ static key_lookup_table sdl_lookup[] = KE5(MENU, NONUSBACKSLASH, UNDO, APOSTROPHE, GRAVE ) {-1, ""} }; -#else -#define KE(x) { SDLK_ ## x, "SDLK_" #x }, -#define KE8(A, B, C, D, E, F, G, H) KE(A) KE(B) KE(C) KE(D) KE(E) KE(F) KE(G) KE(H) - -static key_lookup_table sdl_lookup[] = -{ - KE8(UNKNOWN, FIRST, BACKSPACE, TAB, CLEAR, RETURN, PAUSE, ESCAPE ) - KE8(SPACE, EXCLAIM, QUOTEDBL, HASH, DOLLAR, AMPERSAND, QUOTE, LEFTPAREN ) - KE8(RIGHTPAREN, ASTERISK, PLUS, COMMA, MINUS, PERIOD, SLASH, 0 ) - KE8(1, 2, 3, 4, 5, 6, 7, 8 ) - KE8(9, COLON, SEMICOLON, LESS, EQUALS, GREATER, QUESTION, AT ) - KE8(LEFTBRACKET,BACKSLASH, RIGHTBRACKET, CARET, UNDERSCORE, BACKQUOTE, a, b ) - KE8(c, d, e, f, g, h, i, j ) - KE8(k, l, m, n, o, p, q, r ) - KE8(s, t, u, v, w, x, y, z ) - KE8(DELETE, WORLD_0, WORLD_1, WORLD_2, WORLD_3, WORLD_4, WORLD_5, WORLD_6 ) - KE8(WORLD_7, WORLD_8, WORLD_9, WORLD_10, WORLD_11, WORLD_12, WORLD_13, WORLD_14 ) - KE8(WORLD_15, WORLD_16, WORLD_17, WORLD_18, WORLD_19, WORLD_20, WORLD_21, WORLD_22 ) - KE8(WORLD_23, WORLD_24, WORLD_25, WORLD_26, WORLD_27, WORLD_28, WORLD_29, WORLD_30 ) - KE8(WORLD_31, WORLD_32, WORLD_33, WORLD_34, WORLD_35, WORLD_36, WORLD_37, WORLD_38 ) - KE8(WORLD_39, WORLD_40, WORLD_41, WORLD_42, WORLD_43, WORLD_44, WORLD_45, WORLD_46 ) - KE8(WORLD_47, WORLD_48, WORLD_49, WORLD_50, WORLD_51, WORLD_52, WORLD_53, WORLD_54 ) - KE8(WORLD_55, WORLD_56, WORLD_57, WORLD_58, WORLD_59, WORLD_60, WORLD_61, WORLD_62 ) - KE8(WORLD_63, WORLD_64, WORLD_65, WORLD_66, WORLD_67, WORLD_68, WORLD_69, WORLD_70 ) - KE8(WORLD_71, WORLD_72, WORLD_73, WORLD_74, WORLD_75, WORLD_76, WORLD_77, WORLD_78 ) - KE8(WORLD_79, WORLD_80, WORLD_81, WORLD_82, WORLD_83, WORLD_84, WORLD_85, WORLD_86 ) - KE8(WORLD_87, WORLD_88, WORLD_89, WORLD_90, WORLD_91, WORLD_92, WORLD_93, WORLD_94 ) - KE8(WORLD_95, KP0, KP1, KP2, KP3, KP4, KP5, KP6 ) - KE8(KP7, KP8, KP9, KP_PERIOD, KP_DIVIDE, KP_MULTIPLY,KP_MINUS, KP_PLUS ) - KE8(KP_ENTER, KP_EQUALS, UP, DOWN, RIGHT, LEFT, INSERT, HOME ) - KE8(END, PAGEUP, PAGEDOWN, F1, F2, F3, F4, F5 ) - KE8(F6, F7, F8, F9, F10, F11, F12, F13 ) - KE8(F14, F15, NUMLOCK, CAPSLOCK, SCROLLOCK, RSHIFT, LSHIFT, RCTRL ) - KE8(LCTRL, RALT, LALT, RMETA, LMETA, LSUPER, RSUPER, MODE ) - KE8(COMPOSE, HELP, PRINT, SYSREQ, BREAK, MENU, POWER, EURO ) - KE(UNDO) - KE(LAST) - {-1, ""} -}; -#endif static const char * lookup_key_name(const key_lookup_table *kt, int kc) { @@ -114,23 +73,14 @@ int main(int argc, char *argv[]) { SDL_Event event; int quit = 0; -#if (SDLMAME_SDL2) char lasttext[20] = ""; -#else - char buf[20]; -#endif if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { fprintf(stderr, "Couldn't initialize SDL: %s\n", SDL_GetError()); exit(1); } -#if (SDLMAME_SDL2) SDL_CreateWindow("Input Test", 0, 0, 100, 100,0 ); -#else - SDL_SetVideoMode(100, 50, 16, SDL_ANYFORMAT); - SDL_EnableUNICODE(1); -#endif while(SDL_PollEvent(&event) || !quit) { switch(event.type) { case SDL_QUIT: @@ -141,46 +91,24 @@ int main(int argc, char *argv[]) quit=1; else { -#if (SDLMAME_SDL2) printf("ITEM_ID_XY %s 0x%x 0x%x %s\n", lookup_key_name(sdl_lookup, event.key.keysym.scancode), (int) event.key.keysym.scancode, (int) event.key.keysym.sym, ""); lasttext[0] = 0; -#else - memset(buf, 0, 19); - utf8_from_uchar(buf, sizeof(buf), event.key.keysym.unicode); - printf("ITEM_ID_XY %s 0x%x 0x%x %s\n", - lookup_key_name(sdl_lookup, event.key.keysym.sym), - (int) event.key.keysym.scancode, - (int) event.key.keysym.unicode, - buf); -#endif } break; case SDL_KEYUP: -#if (SDLMAME_SDL2) printf("ITEM_ID_XY %s 0x%x 0x%x %s\n", lookup_key_name(sdl_lookup, event.key.keysym.scancode), (int) event.key.keysym.scancode, (int) event.key.keysym.sym, lasttext); -#else - memset(buf, 0, 19); - utf8_from_uchar(buf, sizeof(buf), event.key.keysym.unicode); - printf("ITEM_ID_XY %s 0x%x 0x%x %s\n", - lookup_key_name(sdl_lookup, event.key.keysym.sym), - (int) event.key.keysym.scancode, - (int) event.key.keysym.unicode, - buf); -#endif break; -#if (SDLMAME_SDL2) case SDL_TEXTINPUT: strcpy(lasttext, event.text.text); break; -#endif } event.type = 0; diff --git a/src/osd/sdl/video.cpp b/src/osd/sdl/video.cpp index c5de6be41d9..ca7286d5696 100644 --- a/src/osd/sdl/video.cpp +++ b/src/osd/sdl/video.cpp @@ -7,33 +7,6 @@ // SDLMAME by Olivier Galibert and R. Belmont // //============================================================ - -#ifdef SDLMAME_X11 -#include <X11/extensions/Xinerama.h> -#endif - -#ifdef SDLMAME_MACOSX -#undef Status -#include <Carbon/Carbon.h> -#endif - -#ifdef SDLMAME_WIN32 -// for multimonitor -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x501 -#endif - -#define WIN32_LEAN_AND_MEAN -#include <windows.h> - -#include "strconv.h" -#endif - -#ifdef SDLMAME_OS2 -#define INCL_WINSYS -#include <os2.h> -#endif - #include "sdlinc.h" // MAME headers @@ -134,15 +107,9 @@ void sdl_osd_interface::video_exit() //============================================================ // sdlvideo_monitor_refresh //============================================================ -#if defined(SDLMAME_WIN32) // Win32 version -inline osd_rect RECT_to_osd_rect(const RECT &r) -{ - return osd_rect(r.left, r.top, r.right - r.left, r.bottom - r.top); -} -#endif + void sdl_monitor_info::refresh() { - #if (SDLMAME_SDL2) SDL_DisplayMode dmode; #if defined(SDLMAME_WIN32) @@ -156,128 +123,8 @@ void sdl_monitor_info::refresh() m_pos_size = SDL_Rect_to_osd_rect(dimensions); m_usuable_pos_size = SDL_Rect_to_osd_rect(dimensions); m_is_primary = (m_handle == 0); - - #else - #if defined(SDLMAME_WIN32) // Win32 version - MONITORINFOEX info; - info.cbSize = sizeof(info); - GetMonitorInfo((HMONITOR)m_handle, (LPMONITORINFO)&info); - m_pos_size = RECT_to_osd_rect(info.rcMonitor); - m_usuable_pos_size = RECT_to_osd_rect(info.rcWork); - m_is_primary = ((info.dwFlags & MONITORINFOF_PRIMARY) != 0); - char *temp = utf8_from_wstring(info.szDevice); - strncpy(m_name, temp, ARRAY_LENGTH(m_name) - 1); - osd_free(temp); - #elif defined(SDLMAME_MACOSX) // Mac OS X Core Imaging version - CGDirectDisplayID primary; - CGRect dbounds; - - // get the main display - primary = CGMainDisplayID(); - dbounds = CGDisplayBounds(primary); - - m_is_primary = (m_handle == 0); - m_pos_size = osd_rect(0, 0, dbounds.size.width - dbounds.origin.x, dbounds.size.height - dbounds.origin.y); - m_usuable_pos_size = m_pos_size; - strncpy(m_name, "Mac OS X display", ARRAY_LENGTH(m_name) - 1); - #elif defined(SDLMAME_X11) || defined(SDLMAME_NO_X11) // X11 version - { - #if defined(SDLMAME_X11) - // X11 version - int screen; - SDL_SysWMinfo info; - SDL_VERSION(&info.version); - - if ( SDL_GetWMInfo(&info) && (info.subsystem == SDL_SYSWM_X11) ) - { - screen = DefaultScreen(info.info.x11.display); - SDL_VideoDriverName(m_name, ARRAY_LENGTH(m_name) - 1); - m_pos_size = osd_rect(0, 0, - DisplayWidth(info.info.x11.display, screen), - DisplayHeight(info.info.x11.display, screen)); - - /* FIXME: If Xinerame is used we should compile a list of monitors - * like we do for other targets and ignore SDL. - */ - if ((XineramaIsActive(info.info.x11.display)) && video_config.restrictonemonitor) - { - XineramaScreenInfo *xineinfo; - int numscreens; - - xineinfo = XineramaQueryScreens(info.info.x11.display, &numscreens); - - m_pos_size = osd_rect(0, 0, xineinfo[0].width, xineinfo[0].height); - - XFree(xineinfo); - } - m_usuable_pos_size = m_pos_size; - m_is_primary = (m_handle == 0); - } - else - #endif // defined(SDLMAME_X11) - { - static int first_call=0; - static int cw = 0, ch = 0; - - SDL_VideoDriverName(m_name, ARRAY_LENGTH(m_name) - 1); - if (first_call==0) - { - const char *dimstr = osd_getenv(SDLENV_DESKTOPDIM); - const SDL_VideoInfo *sdl_vi; - - sdl_vi = SDL_GetVideoInfo(); - #if (SDL_VERSION_ATLEAST(1,2,10)) - cw = sdl_vi->current_w; - ch = sdl_vi->current_h; - #endif - first_call=1; - if ((cw==0) || (ch==0)) - { - if (dimstr != NULL) - { - sscanf(dimstr, "%dx%d", &cw, &ch); - } - if ((cw==0) || (ch==0)) - { - osd_printf_warning("WARNING: SDL_GetVideoInfo() for driver <%s> is broken.\n", m_name); - osd_printf_warning(" You should set SDLMAME_DESKTOPDIM to your desktop size.\n"); - osd_printf_warning(" e.g. export SDLMAME_DESKTOPDIM=800x600\n"); - osd_printf_warning(" Assuming 1024x768 now!\n"); - cw=1024; - ch=768; - } - } - } - m_pos_size = osd_rect(0, 0, cw, ch); - m_usuable_pos_size = m_pos_size; - m_is_primary = (m_handle == 0); - } - } - #elif defined(SDLMAME_OS2) // OS2 version - m_pos_size = osd_rect(0, 0, - WinQuerySysValue( HWND_DESKTOP, SV_CXSCREEN ), - WinQuerySysValue( HWND_DESKTOP, SV_CYSCREEN ) ); - m_usuable_pos_size = m_pos_size; - m_is_primary = (m_handle == 0); - strncpy(m_name, "OS/2 display", ARRAY_LENGTH(m_name) - 1); - #else - #error Unknown SDLMAME_xx OS type! - #endif - - { - static int info_shown=0; - if (!info_shown) - { - osd_printf_verbose("SDL Device Driver : %s\n", m_name); - osd_printf_verbose("SDL Monitor Dimensions: %d x %d\n", m_pos_size.width(), m_pos_size.height()); - info_shown = 1; - } - } - #endif // (SDLMAME_SDL2) } - - //============================================================ // sdlvideo_monitor_get_aspect //============================================================ @@ -325,68 +172,6 @@ void sdl_osd_interface::update(bool skip_redraw) //============================================================ -// add_primary_monitor -//============================================================ - -#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2) -void sdl_monitor_info::add_primary_monitor(void *data) -{ - // make a list of monitors - osd_monitor_info::list = NULL; - osd_monitor_info **tailptr = &sdl_monitor_info::list; - - // allocate a new monitor info - osd_monitor_info *monitor = global_alloc_clear<sdl_monitor_info>(0, "", 1.0f); - - //monitor->refresh(); - // guess the aspect ratio assuming square pixels - monitor->set_aspect((float)(monitor->position_size().width()) / (float)(monitor->position_size().height())); - - // hook us into the list - *tailptr = monitor; - //tailptr = &monitor->m_next; -} -#endif - - -//============================================================ -// monitor_enum_callback -//============================================================ - -#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2) -BOOL CALLBACK sdl_monitor_info::monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data) -{ - osd_monitor_info ***tailptr = (osd_monitor_info ***)data; - osd_monitor_info *monitor; - MONITORINFOEX info; - BOOL result; - - // get the monitor info - info.cbSize = sizeof(info); - result = GetMonitorInfo(handle, (LPMONITORINFO)&info); - assert(result); - (void)result; // to silence gcc 4.6 - - // guess the aspect ratio assuming square pixels - float aspect = (float)(info.rcMonitor.right - info.rcMonitor.left) / (float)(info.rcMonitor.bottom - info.rcMonitor.top); - - // allocate a new monitor info - char *temp = utf8_from_wstring(info.szDevice); - // copy in the data - monitor = global_alloc(sdl_monitor_info((UINT64) handle, temp, aspect)); - osd_free(temp); - - // hook us into the list - **tailptr = monitor; - *tailptr = &monitor->m_next; - - // enumerate all the available monitors so to list their names in verbose mode - return TRUE; -} -#endif - - -//============================================================ // init_monitors //============================================================ @@ -398,7 +183,6 @@ void sdl_monitor_info::init() osd_monitor_info::list = NULL; tailptr = &osd_monitor_info::list; - #if (SDLMAME_SDL2) { int i; @@ -427,11 +211,6 @@ void sdl_monitor_info::init() } } osd_printf_verbose("Leave init_monitors\n"); - #elif defined(SDLMAME_WIN32) - EnumDisplayMonitors(NULL, NULL, monitor_enum_callback, (LPARAM)&tailptr); - #else - add_primary_monitor((void *)&tailptr); - #endif } void sdl_monitor_info::exit() @@ -534,7 +313,7 @@ static void check_osd_inputs(running_machine &machine) machine.ui().popup_time(1, "Keepaspect %s", video_config.keepaspect? "enabled":"disabled"); } - #if (USE_OPENGL || SDLMAME_SDL2) + #if (USE_OPENGL) //FIXME: on a per window basis if (machine.ui_input().pressed(IPT_OSD_5)) { @@ -600,16 +379,14 @@ void sdl_osd_interface::extract_video_config() } else if (USE_OPENGL && (strcmp(stemp, SDLOPTVAL_OPENGL) == 0)) video_config.mode = VIDEO_MODE_OPENGL; - else if (SDLMAME_SDL2 && (strcmp(stemp, SDLOPTVAL_SDL2ACCEL) == 0)) + else if ((strcmp(stemp, SDLOPTVAL_SDL2ACCEL) == 0)) { video_config.mode = VIDEO_MODE_SDL2ACCEL; } -#ifdef USE_BGFX else if (strcmp(stemp, SDLOPTVAL_BGFX) == 0) { video_config.mode = VIDEO_MODE_BGFX; } -#endif else { osd_printf_warning("Invalid video value %s; reverting to software\n", stemp); @@ -693,19 +470,11 @@ void sdl_osd_interface::extract_video_config() // misc options: sanity check values // global options: sanity check values -#if (!SDLMAME_SDL2) - if (video_config.numscreens < 1 || video_config.numscreens > 1) //MAX_VIDEO_WINDOWS) - { - osd_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens); - video_config.numscreens = 1; - } -#else if (video_config.numscreens < 1 || video_config.numscreens > MAX_VIDEO_WINDOWS) { osd_printf_warning("Invalid numscreens value %d; reverting to 1\n", video_config.numscreens); video_config.numscreens = 1; } -#endif // yuv settings ... stemp = options().scale_mode(); video_config.scale_mode = drawsdl_scale_mode(stemp); diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h index 699f98512d1..a811a417ef4 100644 --- a/src/osd/sdl/video.h +++ b/src/osd/sdl/video.h @@ -11,11 +11,6 @@ #ifndef __SDLVIDEO__ #define __SDLVIDEO__ -#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2) -#define WIN32_LEAN_AND_MEAN -#include <windows.h> -#endif - #include "osdsdl.h" //============================================================ @@ -164,12 +159,6 @@ public: // STATIC static void init(); static void exit(); -#if !defined(SDLMAME_WIN32) && !(SDLMAME_SDL2) - static void add_primary_monitor(void *data); -#endif -#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2) - static BOOL CALLBACK monitor_enum_callback(HMONITOR handle, HDC dc, LPRECT rect, LPARAM data); -#endif private: void virtual refresh() override; @@ -192,9 +181,6 @@ struct osd_video_config int fullstretch; // FXIME: implement in windows! - // ddraw options - int hwstretch; // stretch using the hardware - // d3d, accel, opengl int filter; // enable filtering //int filter; // enable filtering, disabled if glsl_filter>0 diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp index 47ab3cdd162..113a00b47bf 100644 --- a/src/osd/sdl/window.cpp +++ b/src/osd/sdl/window.cpp @@ -16,11 +16,7 @@ // standard SDL headers #include "sdlinc.h" -#if (SDLMAME_SDL2) #include <SDL2/SDL_thread.h> -#else -#include <SDL/SDL_thread.h> -#endif // standard C headers #include <math.h> @@ -92,10 +88,6 @@ static sdl_window_info **last_window_ptr; static int multithreading_enabled; static osd_work_queue *work_queue; -#if !(SDLMAME_SDL2) && (!defined(SDLMAME_EMSCRIPTEN)) -typedef int SDL_threadID; -#endif - static SDL_threadID main_threadid; static SDL_threadID window_threadid; @@ -189,11 +181,7 @@ static OSDWORK_CALLBACK(sdlwindow_thread_id) if (SDLMAME_INIT_IN_WORKER_THREAD) { -#if (SDLMAME_SDL2) if (SDL_InitSubSystem(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) -#else - if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_AUDIO| SDL_INIT_VIDEO| SDL_INIT_JOYSTICK|SDL_INIT_NOPARACHUTE)) -#endif { osd_printf_error("Could not initialize SDL: %s.\n", SDL_GetError()); exit(-1); @@ -242,27 +230,22 @@ bool sdl_osd_interface::window_init() video_config.mode = VIDEO_MODE_SOFT; } #endif -#if SDLMAME_SDL2 if (video_config.mode == VIDEO_MODE_SDL2ACCEL) { if (drawsdl2_init(machine(), &draw)) video_config.mode = VIDEO_MODE_SOFT; } -#endif -#ifdef USE_BGFX if (video_config.mode == VIDEO_MODE_BGFX) { if (drawbgfx_init(machine(), &draw)) video_config.mode = VIDEO_MODE_SOFT; } -#endif if (video_config.mode == VIDEO_MODE_SOFT) { if (drawsdl_init(&draw)) return false; } -#if SDLMAME_SDL2 /* We may want to set a number of the hints SDL2 provides. * The code below will document which hints were set. */ @@ -294,7 +277,6 @@ bool sdl_osd_interface::window_init() osd_printf_verbose("\nHints:\n"); for (int i = 0; hints[i] != NULL; i++) osd_printf_verbose("\t%-40s %s\n", hints[i], SDL_GetHint(hints[i])); -#endif // set up the window list last_window_ptr = &sdl_window_list; @@ -478,14 +460,7 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_resize_wt ) ASSERT_WINDOW_THREAD(); -#if (SDLMAME_SDL2) SDL_SetWindowSize(window->sdl_window(), width, height); -#else - SDL_FreeSurface(window->m_sdlsurf); - - window->m_sdlsurf = SDL_SetVideoMode(width, height, 0, - SDL_SWSURFACE | SDL_ANYFORMAT | window->m_extra_flags); -#endif window->renderer().notify_changed(); osd_free(wp); @@ -559,7 +534,6 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_toggle_full_screen_wt ) global_free(window->m_renderer); window->m_renderer = NULL; -#if (SDLMAME_SDL2) bool is_osx = false; #ifdef SDLMAME_MACOSX // FIXME: This is weird behaviour and certainly a bug in SDL @@ -572,15 +546,6 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_toggle_full_screen_wt ) SDL_SetWindowFullscreen(window->sdl_window(), SDL_WINDOW_FULLSCREEN); // Try to set mode } SDL_DestroyWindow(window->sdl_window()); -#else - if (window->m_sdlsurf) - { - SDL_FreeSurface(window->m_sdlsurf); - window->m_sdlsurf = NULL; - } -#endif - - sdlinput_release_keys(); window->set_renderer(draw.create(window)); @@ -647,7 +612,6 @@ void sdl_window_info::update_cursor_state() c=SDL_CreateCursor(data, data, 8, 8, 0, 0); SDL_SetCursor(c); #else -#if (SDLMAME_SDL2) // do not do mouse capture if the debugger's enabled to avoid // the possibility of losing control if (!(machine().debug_flags & DEBUG_FLAG_OSD_ENABLED)) @@ -670,30 +634,6 @@ void sdl_window_info::update_cursor_state() } SDL_SetCursor(NULL); // Force an update in case the underlying driver has changed visibility } - -#else - // do not do mouse capture if the debugger's enabled to avoid - // the possibility of losing control - if (!(machine().debug_flags & DEBUG_FLAG_OSD_ENABLED)) - { - if ( fullscreen() || sdlinput_should_hide_mouse() ) - { - SDL_ShowCursor(SDL_DISABLE); - if (!SDL_WM_GrabInput(SDL_GRAB_QUERY)) - { - SDL_WM_GrabInput(SDL_GRAB_ON); - } - } - else - { - SDL_ShowCursor(SDL_ENABLE); - if (SDL_WM_GrabInput(SDL_GRAB_QUERY)) - { - SDL_WM_GrabInput(SDL_GRAB_OFF); - } - } - } -#endif #endif } @@ -793,7 +733,6 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_video_window_destroy_wt ) // free the textures etc window->renderer().destroy(); -#if (SDLMAME_SDL2) if (window->fullscreen() && video_config.switchres) { SDL_SetWindowFullscreen(window->sdl_window(), 0); // Try to set mode @@ -801,14 +740,6 @@ OSDWORK_CALLBACK( sdl_window_info::sdlwindow_video_window_destroy_wt ) SDL_SetWindowFullscreen(window->sdl_window(), SDL_WINDOW_FULLSCREEN); // Try to set mode } SDL_DestroyWindow(window->sdl_window()); -#else - if (window->m_sdlsurf) - { - SDL_FreeSurface(window->m_sdlsurf); - window->m_sdlsurf = NULL; - } -#endif - // release all keys ... sdlinput_release_keys(); @@ -853,7 +784,6 @@ void sdl_window_info::destroy() // pick_best_mode //============================================================ -#if SDLMAME_SDL2 osd_dim sdl_window_info::pick_best_mode() { int minimum_width, minimum_height, target_width, target_height; @@ -922,82 +852,6 @@ osd_dim sdl_window_info::pick_best_mode() } return ret; } -#else -osd_dim sdl_window_info::pick_best_mode() -{ - int minimum_width, minimum_height, target_width, target_height; - int i; - float size_score, best_score = 0.0f; - int best_width = 0, best_height = 0; - SDL_Rect **modes; - - // determine the minimum width/height for the selected target - m_target->compute_minimum_size(minimum_width, minimum_height); - - // use those as the target for now - target_width = minimum_width * MAX(1, prescale()); - target_height = minimum_height * MAX(1, prescale()); - - // if we're not stretching, allow some slop on the minimum since we can handle it - { - minimum_width -= 4; - minimum_height -= 4; - } - -#if 1 // defined(SDLMAME_WIN32) - /* - * We need to do this here. If SDL_ListModes is - * called in init_monitors, the call will crash - * on win32 - */ - modes = SDL_ListModes(NULL, SDL_FULLSCREEN | SDL_DOUBLEBUF); -#else - modes = window->m_monitor->modes; -#endif - - if (modes == (SDL_Rect **)0) - { - osd_printf_error("SDL: No modes available?!\n"); - exit(-1); - } - else if (modes == (SDL_Rect **)-1) // all modes are possible - { - return osd_dim(m_win_config.width, m_win_config.height); - } - else - { - for (i = 0; modes[i]; ++i) - { - // compute initial score based on difference between target and current - size_score = 1.0f / (1.0f + fabsf((INT32)modes[i]->w - target_width) + fabsf((INT32)modes[i]->h - target_height)); - - // if the mode is too small, give a big penalty - if (modes[i]->w < minimum_width || modes[i]->h < minimum_height) - size_score *= 0.01f; - - // if mode is smaller than we'd like, it only scores up to 0.1 - if (modes[i]->w < target_width || modes[i]->h < target_height) - size_score *= 0.1f; - - // if we're looking for a particular mode, that's a winner - if (modes[i]->w == m_win_config.width && modes[i]->h == m_win_config.height) - size_score = 2.0f; - - osd_printf_verbose("%4dx%4d -> %f\n", (int)modes[i]->w, (int)modes[i]->h, size_score); - - // best so far? - if (size_score > best_score) - { - best_score = size_score; - best_width = modes[i]->w; - best_height = modes[i]->h; - } - - } - } - return osd_dim(best_width, best_height); -} -#endif //============================================================ // sdlwindow_video_window_update @@ -1142,8 +996,6 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt ) */ osd_printf_verbose("Enter sdl_info::create\n"); -#if (SDLMAME_SDL2) - if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_OPENGL)) { SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); @@ -1227,48 +1079,18 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt ) SDL_SetWindowGrab(window->sdl_window(), SDL_TRUE); #endif -#else - window->m_extra_flags = (window->fullscreen() ? SDL_FULLSCREEN : SDL_RESIZABLE); - - if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_DOUBLEBUF)) - window->m_extra_flags |= SDL_DOUBLEBUF; - if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_ASYNCBLIT)) - window->m_extra_flags |= SDL_ASYNCBLIT; - - if (window->renderer().has_flags(osd_renderer::FLAG_NEEDS_OPENGL)) - { - window->m_extra_flags |= SDL_DOUBLEBUF | SDL_OPENGL; - SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); - #if (SDL_VERSION_ATLEAST(1,2,10)) && (!defined(SDLMAME_EMSCRIPTEN)) - SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, video_config.waitvsync ? 1 : 0); - #endif - // load_gl_lib(window->machine()); - } - - // create the SDL surface (which creates the window in windowed mode) -#if 0 - window->m_sdlsurf = SDL_SetVideoMode(tempwidth, tempheight, - 0, SDL_OPENGL | SDL_FULLSCREEN);// | window->m_extra_flags); - if (!window->m_sdlsurf) - printf("completely failed\n"); -#endif - window->m_sdlsurf = SDL_SetVideoMode(temp.width(), temp.height(), - 0, SDL_SWSURFACE | SDL_ANYFORMAT | window->m_extra_flags); - - if (!window->m_sdlsurf) + // set main window + if (window->m_index > 0) { - osd_printf_error("SDL Error: %s\n", SDL_GetError()); - return (void *) &result[1]; - } - if ( (video_config.mode == VIDEO_MODE_OPENGL) && !(window->m_sdlsurf->flags & SDL_OPENGL) ) - { - osd_printf_error("OpenGL not supported on this driver!\n"); - return (void *) &result[1]; + for (auto w = sdl_window_list; w != NULL; w = w->m_next) + { + if (w->m_index == 0) + { + window->m_main = w; + break; + } + } } - // set the window title - SDL_WM_SetCaption(window->m_title, "SDLMAME"); -#endif - window->monitor()->refresh(); // initialize the drawing backend if (window->renderer().create()) diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h index 3de110fe536..bdaaa311330 100644 --- a/src/osd/sdl/window.h +++ b/src/osd/sdl/window.h @@ -38,21 +38,14 @@ public: const osd_window_config *config) : osd_window(), m_next(NULL), // Following three are used by input code to defer resizes -#if (SDLMAME_SDL2) m_resize_width(0), m_resize_height(0), m_last_resize(0), -#endif m_minimum_dim(0,0), m_windowed_dim(0,0), m_rendered_event(0), m_target(0), -#if (SDLMAME_SDL2) m_sdl_window(NULL), - -#else - m_sdlsurf(NULL), -#endif - m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0), m_index(0) + m_machine(a_machine), m_monitor(a_monitor), m_fullscreen(0) { m_win_config = *config; m_index = index; @@ -81,13 +74,9 @@ public: osd_dim get_size() override { -#if (SDLMAME_SDL2) int w=0; int h=0; SDL_GetWindowSize(m_sdl_window, &w, &h); return osd_dim(w,h); -#else - return osd_dim(m_sdlsurf->w, m_sdlsurf->h); -#endif } int xy_to_render_target(int x, int y, int *xt, int *yt); @@ -97,11 +86,7 @@ public: int fullscreen() const override { return m_fullscreen; } render_target *target() override { return m_target; } -#if (SDLMAME_SDL2) SDL_Window *sdl_window() override { return m_sdl_window; } -#else - SDL_Surface *sdl_surface() { return m_sdlsurf; } -#endif osd_dim blit_surface_size() override; int prescale() const { return m_prescale; } @@ -109,12 +94,10 @@ public: // Pointer to next window sdl_window_info * m_next; -#if (SDLMAME_SDL2) // These are used in combine resizing events ... #if SDL13_COMBINE_RESIZE int m_resize_width; int m_resize_height; osd_ticks_t m_last_resize; -#endif private: // window handle and info @@ -129,15 +112,10 @@ private: osd_event * m_rendered_event; render_target * m_target; -#if (SDLMAME_SDL2) // Needs to be here as well so we can identify window SDL_Window *m_sdl_window; // Original display_mode SDL_DisplayMode m_original_mode; -#else - // SDL surface - SDL_Surface *m_sdlsurf; -#endif int m_extra_flags; @@ -165,7 +143,6 @@ private: // monitor info osd_monitor_info * m_monitor; int m_fullscreen; - int m_index; osd_renderer * m_renderer; // static callbacks ... diff --git a/src/osd/windows/input.cpp b/src/osd/windows/input.cpp index 0165e4820f0..6a9d534a2f6 100644 --- a/src/osd/windows/input.cpp +++ b/src/osd/windows/input.cpp @@ -39,6 +39,7 @@ #include "config.h" #include "winutil.h" +#include <mutex> //============================================================ // PARAMETERS @@ -166,7 +167,7 @@ typedef /*WINUSERAPI*/ BOOL (WINAPI *register_rawinput_devices_ptr)(IN PCRAWINPU // global states static bool input_enabled; -static osd_lock * input_lock; +static std::mutex input_lock; static bool input_paused; static DWORD last_poll; @@ -469,10 +470,6 @@ static inline INT32 normalize_absolute_axis(INT32 raw, INT32 rawmin, INT32 rawma bool windows_osd_interface::input_init() { - // allocate a lock for input synchronizations, since messages sometimes come from another thread - input_lock = osd_lock_alloc(); - assert_always(input_lock != NULL, "Failed to allocate input_lock"); - // decode the options lightgun_shared_axis_mode = downcast<windows_options &>(machine().options()).dual_lightgun(); @@ -512,15 +509,8 @@ void windows_osd_interface::input_resume() void windows_osd_interface::input_exit() { // acquire the lock and turn off input (this ensures everyone is done) - if (input_lock != NULL) - { - osd_lock_acquire(input_lock); - input_enabled = false; - osd_lock_release(input_lock); - - // free the lock - osd_lock_free(input_lock); - } + std::lock_guard<std::mutex> lock(input_lock); + input_enabled = false; } @@ -613,7 +603,7 @@ BOOL wininput_handle_mouse_button(int button, int down, int x, int y) } // take the lock - osd_lock_acquire(input_lock); + std::lock_guard<std::mutex> lock(input_lock); // set the button state devinfo->mouse.state.rgbButtons[button] = down ? 0x80 : 0x00; @@ -632,9 +622,6 @@ BOOL wininput_handle_mouse_button(int button, int down, int x, int y) devinfo->mouse.state.lX = normalize_absolute_axis(mousepos.x, client_rect.left, client_rect.right); devinfo->mouse.state.lY = normalize_absolute_axis(mousepos.y, client_rect.top, client_rect.bottom); } - - // release the lock - osd_lock_release(input_lock); return TRUE; } @@ -661,7 +648,7 @@ BOOL wininput_handle_raw(HANDLE device) // if necessary, allocate a temporary buffer and fetch the data if (size > sizeof(small_buffer)) { - data = global_alloc_array(BYTE, size); + data = global_alloc_array_nothrow(BYTE, size); if (data == NULL) return result; } @@ -675,18 +662,16 @@ BOOL wininput_handle_raw(HANDLE device) // handle keyboard input if (input->header.dwType == RIM_TYPEKEYBOARD) { - osd_lock_acquire(input_lock); + std::lock_guard<std::mutex> lock(input_lock); rawinput_keyboard_update(input->header.hDevice, &input->data.keyboard); - osd_lock_release(input_lock); result = TRUE; } // handle mouse input else if (input->header.dwType == RIM_TYPEMOUSE) { - osd_lock_acquire(input_lock); + std::lock_guard<std::mutex> lock(input_lock); rawinput_mouse_update(input->header.hDevice, &input->data.mouse); - osd_lock_release(input_lock); result = TRUE; } } @@ -804,6 +789,11 @@ void windows_osd_interface::customize_input_type_list(simple_list<input_type_ent entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F12, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_LALT); break; + // add a NOT-lalt to write timecode file + case IPT_UI_TIMECODE: // emu/input.c: input_seq(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT) + entry->defseq(SEQ_TYPE_STANDARD).set(KEYCODE_F12, input_seq::not_code, KEYCODE_LSHIFT, input_seq::not_code, KEYCODE_LALT); + break; + // lctrl-lalt-F5 to toggle post-processing case IPT_OSD_4: entry->configure_osd("POST_PROCESS", "Toggle Post-Processing"); @@ -2201,14 +2191,13 @@ static void rawinput_mouse_poll(device_info *devinfo) poll_if_necessary(devinfo->machine()); // copy the accumulated raw state to the actual state - osd_lock_acquire(input_lock); + std::lock_guard<std::mutex> lock(input_lock); devinfo->mouse.state.lX = devinfo->mouse.raw_x; devinfo->mouse.state.lY = devinfo->mouse.raw_y; devinfo->mouse.state.lZ = devinfo->mouse.raw_z; devinfo->mouse.raw_x = 0; devinfo->mouse.raw_y = 0; devinfo->mouse.raw_z = 0; - osd_lock_release(input_lock); } diff --git a/src/osd/windows/output.cpp b/src/osd/windows/output.cpp index 3b390b1f3a1..ef3c563e3ac 100644 --- a/src/osd/windows/output.cpp +++ b/src/osd/windows/output.cpp @@ -313,8 +313,8 @@ static void notifier_callback(const char *outname, INT32 value, void *param) // loop over clients and notify them for (client = clientlist; client != nullptr; client = client->next) { - printf("there are clients\n"); - if (param == nullptr || param == client) + if (param == nullptr || param == client->machine) { PostMessage(client->hwnd, om_mame_update_state, client->machine->output().name_to_id(outname), value); + } } } diff --git a/src/osd/windows/video.cpp b/src/osd/windows/video.cpp index b4f665a2135..b441121f1ca 100644 --- a/src/osd/windows/video.cpp +++ b/src/osd/windows/video.cpp @@ -373,14 +373,10 @@ void windows_osd_interface::extract_video_config() video_config.mode = VIDEO_MODE_D3D; else if (strcmp(stemp, "auto") == 0) video_config.mode = VIDEO_MODE_D3D; - else if (strcmp(stemp, "ddraw") == 0) - video_config.mode = VIDEO_MODE_DDRAW; else if (strcmp(stemp, "gdi") == 0) video_config.mode = VIDEO_MODE_GDI; -#if defined (USE_BGFX) else if (strcmp(stemp, "bgfx") == 0) video_config.mode = VIDEO_MODE_BGFX; -#endif else if (strcmp(stemp, "none") == 0) { video_config.mode = VIDEO_MODE_NONE; @@ -401,9 +397,6 @@ void windows_osd_interface::extract_video_config() video_config.triplebuf = options().triple_buffer(); video_config.switchres = options().switch_res(); - // ddraw options: extract the data - video_config.hwstretch = options().hwstretch(); - if (video_config.prescale < 1 || video_config.prescale > 3) { osd_printf_warning("Invalid prescale option, reverting to '1'\n"); diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h index 9215dc189bf..87612fb51fe 100644 --- a/src/osd/windows/video.h +++ b/src/osd/windows/video.h @@ -21,10 +21,7 @@ enum { VIDEO_MODE_NONE, VIDEO_MODE_GDI, - VIDEO_MODE_DDRAW, -#if defined (USE_BGFX) VIDEO_MODE_BGFX, -#endif #if (USE_OPENGL) VIDEO_MODE_OPENGL, #endif @@ -180,9 +177,6 @@ struct osd_video_config int fullstretch; // FXIME: implement in windows! - // ddraw options - int hwstretch; // stretch using the hardware - // d3d, accel, opengl int filter; // enable filtering //int filter; // enable filtering, disabled if glsl_filter>0 diff --git a/src/osd/windows/window.cpp b/src/osd/windows/window.cpp index 6111859a255..0fbfae9c481 100644 --- a/src/osd/windows/window.cpp +++ b/src/osd/windows/window.cpp @@ -36,11 +36,8 @@ extern int drawnone_init(running_machine &machine, osd_draw_callbacks *callbacks); extern int drawgdi_init(running_machine &machine, osd_draw_callbacks *callbacks); -extern int drawdd_init(running_machine &machine, osd_draw_callbacks *callbacks); extern int drawd3d_init(running_machine &machine, osd_draw_callbacks *callbacks); -#if defined(USE_BGFX) extern int drawbgfx_init(running_machine &machine, osd_draw_callbacks *callbacks); -#endif #if (USE_OPENGL) extern int drawogl_init(running_machine &machine, osd_draw_callbacks *callbacks); #endif @@ -133,11 +130,11 @@ struct mtlog }; static mtlog mtlog[100000]; -static volatile LONG mtlogindex; +static volatile INT32 mtlogindex; void mtlog_add(const char *event) { - int index = atomic_increment32((LONG *) &mtlogindex) - 1; + int index = atomic_increment32((INT32 *) &mtlogindex) - 1; if (index < ARRAY_LENGTH(mtlog)) { mtlog[index].timestamp = osd_ticks(); @@ -221,17 +218,10 @@ bool windows_osd_interface::window_init() if (drawd3d_init(machine(), &draw)) video_config.mode = VIDEO_MODE_GDI; } - if (video_config.mode == VIDEO_MODE_DDRAW) - { - if (drawdd_init(machine(), &draw)) - video_config.mode = VIDEO_MODE_GDI; - } if (video_config.mode == VIDEO_MODE_GDI) drawgdi_init(machine(), &draw); -#if defined(USE_BGFX) if (video_config.mode == VIDEO_MODE_BGFX) drawbgfx_init(machine(), &draw); -#endif if (video_config.mode == VIDEO_MODE_NONE) drawnone_init(machine(), &draw); #if (USE_OPENGL) @@ -262,7 +252,6 @@ void windows_osd_interface::window_exit() win_window_list = temp->m_next; temp->destroy(); global_free(temp); - } // kill the drawers @@ -300,7 +289,6 @@ win_window_info::win_window_info(running_machine &machine) m_fullscreen(0), m_fullscreen_safe(0), m_aspect(0), - m_render_lock(NULL), m_target(NULL), m_targetview(0), m_targetorient(0), @@ -661,7 +649,20 @@ void win_window_info::create(running_machine &machine, int index, osd_monitor_in window->m_win_config = *config; window->m_monitor = monitor; window->m_fullscreen = !video_config.windowed; + window->m_index = index; + // set main window + if (index > 0) + { + for (auto w = win_window_list; w != NULL; w = w->m_next) + { + if (w->m_index == 0) + { + window->m_main = w; + break; + } + } + } // see if we are safe for fullscreen window->m_fullscreen_safe = TRUE; for (win = win_window_list; win != NULL; win = win->m_next) @@ -672,9 +673,6 @@ void win_window_info::create(running_machine &machine, int index, osd_monitor_in *last_window_ptr = window; last_window_ptr = &window->m_next; - // create a lock that we can use to skip blitting - window->m_render_lock = osd_lock_alloc(); - // load the layout window->m_target = machine.render().target_alloc(); @@ -746,11 +744,6 @@ void win_window_info::destroy() // free the render target machine().render().target_free(m_target); - - // FIXME: move to destructor - // free the lock - osd_lock_free(m_render_lock); - } @@ -792,15 +785,15 @@ void win_window_info::update() // if we're visible and running and not in the middle of a resize, draw if (m_hwnd != NULL && m_target != NULL && m_renderer != NULL) { - int got_lock = TRUE; + bool got_lock = true; mtlog_add("winwindow_video_window_update: try lock"); // only block if we're throttled if (machine().video().throttled() || timeGetTime() - last_update_time > 250) - osd_lock_acquire(m_render_lock); + m_render_lock.lock(); else - got_lock = osd_lock_try(m_render_lock); + got_lock = m_render_lock.try_lock(); // only render if we were able to get the lock if (got_lock) @@ -810,7 +803,7 @@ void win_window_info::update() mtlog_add("winwindow_video_window_update: got lock"); // don't hold the lock; we just used it to see if rendering was still happening - osd_lock_release(m_render_lock); + m_render_lock.unlock(); // ensure the target bounds are up-to-date, and then get the primitives primlist = m_renderer->get_primitives(); @@ -1329,6 +1322,14 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR window->machine().ui_input().push_char_event(window->m_target, (unicode_char) wparam); break; + case WM_MOUSEWHEEL: + { + UINT ucNumLines = 3; // default + SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0, &ucNumLines, 0); + window->machine().ui_input().push_mouse_wheel_event(window->m_target, GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam), GET_WHEEL_DELTA_WPARAM(wparam), ucNumLines); + break; + } + // pause the system when we start a menu or resize case WM_ENTERSIZEMOVE: window->m_resize_state = RESIZE_STATE_RESIZING; @@ -1411,9 +1412,9 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR case WM_DESTROY: if (!(window->m_renderer == NULL)) { - window->m_renderer->destroy(); - global_free(window->m_renderer); - window->m_renderer = NULL; + window->m_renderer->destroy(); + global_free(window->m_renderer); + window->m_renderer = NULL; } window->m_hwnd = NULL; return DefWindowProc(wnd, message, wparam, lparam); @@ -1492,7 +1493,7 @@ void win_window_info::draw_video_contents(HDC dc, int update) mtlog_add("draw_video_contents: begin"); mtlog_add("draw_video_contents: render lock acquire"); - osd_lock_acquire(m_render_lock); + std::lock_guard<std::mutex> lock(m_render_lock); mtlog_add("draw_video_contents: render lock acquired"); // if we're iconic, don't bother @@ -1516,7 +1517,6 @@ void win_window_info::draw_video_contents(HDC dc, int update) } } - osd_lock_release(m_render_lock); mtlog_add("draw_video_contents: render lock released"); mtlog_add("draw_video_contents: end"); diff --git a/src/osd/windows/window.h b/src/osd/windows/window.h index 62d4f57db55..6a925494f93 100644 --- a/src/osd/windows/window.h +++ b/src/osd/windows/window.h @@ -9,6 +9,7 @@ #ifndef __WIN_WINDOW__ #define __WIN_WINDOW__ +#include <mutex> #include "video.h" #include "render.h" @@ -92,7 +93,7 @@ public: float m_aspect; // rendering info - osd_lock * m_render_lock; + std::mutex m_render_lock; render_target * m_target; int m_targetview; int m_targetorient; diff --git a/src/osd/windows/winmain.cpp b/src/osd/windows/winmain.cpp index 08c988e2311..a7fda58c835 100644 --- a/src/osd/windows/winmain.cpp +++ b/src/osd/windows/winmain.cpp @@ -524,7 +524,6 @@ windows_osd_interface::~windows_osd_interface() void windows_osd_interface::video_register() { video_options_add("gdi", NULL); - video_options_add("ddraw", NULL); video_options_add("d3d", NULL); video_options_add("bgfx", NULL); //video_options_add("auto", NULL); // making d3d video default one diff --git a/src/osd/windows/winmain.h b/src/osd/windows/winmain.h index 63dd907d3b3..a17f3a77f1f 100644 --- a/src/osd/windows/winmain.h +++ b/src/osd/windows/winmain.h @@ -110,8 +110,6 @@ #define WINOPTION_GLOBAL_INPUTS "global_inputs" #define WINOPTION_DUAL_LIGHTGUN "dual_lightgun" - - //============================================================ // TYPE DEFINITIONS //============================================================ diff --git a/src/tools/jedutil.cpp b/src/tools/jedutil.cpp index 284b77ae217..a6cfc279e2a 100644 --- a/src/tools/jedutil.cpp +++ b/src/tools/jedutil.cpp @@ -57,11 +57,13 @@ 18CV8 = QP20 QF2696 + AMPAL18P8 = QP20 QF2600 + EPL10P8 = QP20 EPL12P6 = QP20 EPL14P4 = QP20 EPL16P2 = QP20 - EPL16P8 = QP20 + EPL16P8 = QP20 QF2072 EPL16RP8 = QP20 EPL16RP6 = QP20 EPL16RP4 = QP20 @@ -272,6 +274,7 @@ static void print_pal16r8_product_terms(const pal_data* pal, const jed_data* jed static void print_palce16v8_product_terms(const pal_data* pal, const jed_data* jed); static void print_gal16v8_product_terms(const pal_data* pal, const jed_data* jed); static void print_peel18cv8_product_terms(const pal_data* pal, const jed_data* jed); +static void print_ampal18p8_product_terms(const pal_data* pal, const jed_data* jed); static void print_gal18v10_product_terms(const pal_data* pal, const jed_data* jed); static void print_pal20l8_product_terms(const pal_data* pal, const jed_data* jed); static void print_pal20l10_product_terms(const pal_data* pal, const jed_data* jed); @@ -332,6 +335,7 @@ static void config_pal16r8_pins(const pal_data* pal, const jed_data* jed); static void config_palce16v8_pins(const pal_data* pal, const jed_data* jed); static void config_gal16v8_pins(const pal_data* pal, const jed_data* jed); static void config_peel18cv8_pins(const pal_data* pal, const jed_data* jed); +static void config_ampal18p8_pins(const pal_data* pal, const jed_data* jed); static void config_gal18v10_pins(const pal_data* pal, const jed_data* jed); static void config_pal20l8_pins(const pal_data* pal, const jed_data* jed); static void config_pal20l10_pins(const pal_data* pal, const jed_data* jed); @@ -530,6 +534,16 @@ static pin_fuse_rows peel18cv8pinfuserows[] = { {18, 2340, 288, 540}, {19, 2304, 0, 252}}; +static pin_fuse_rows ampal18p8pinfuserows[] = { + {12, 2268, 2304, 2556}, + {13, 1944, 1980, 2232}, + {14, 1620, 1656, 1908}, + {15, 1296, 1332, 1584}, + {16, 972, 1008, 1260}, + {17, 648, 684, 936}, + {18, 324, 360, 612}, + {19, 0, 36, 288}}; + static pin_fuse_rows gal18v10pinfuserows[] = { {9, 3096, 3132, 3384}, {11, 2772, 2808, 3060}, @@ -1172,6 +1186,26 @@ static pin_fuse_columns peel18cv8pinfusecolumns[] = { {18, 11, 10}, {19, 7, 6}}; +static pin_fuse_columns ampal18p8pinfusecolumns[] = { + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 17, 16}, + {7, 21, 20}, + {8, 25, 24}, + {9, 29, 28}, + {11, 31, 30}, + {12, 35, 34}, + {13, 27, 26}, + {14, 23, 22}, + {15, 19, 18}, + {16, 15, 14}, + {17, 11, 10}, + {18, 7, 6}, + {19, 33, 32}}; + static pin_fuse_columns gal18v10pinfusecolumns[] = { {1, 1, 0}, {2, 5, 4}, @@ -1985,6 +2019,13 @@ static pal_data paldata[] = { config_peel18cv8_pins, nullptr, get_peel18cv8_pin_fuse_state}, + {"AMPAL18P8", 2600, + ampal18p8pinfuserows, ARRAY_LENGTH(ampal18p8pinfuserows), + ampal18p8pinfusecolumns, ARRAY_LENGTH(ampal18p8pinfusecolumns), + print_ampal18p8_product_terms, + config_ampal18p8_pins, + nullptr, + nullptr}, {"GAL18V10", 3540, gal18v10pinfuserows, ARRAY_LENGTH(gal18v10pinfuserows), gal18v10pinfusecolumns, ARRAY_LENGTH(gal18v10pinfusecolumns), @@ -2079,57 +2120,57 @@ static pal_data paldata[] = { epl10p8pinfusecolumns, ARRAY_LENGTH(epl10p8pinfusecolumns), print_epl10p8_product_terms, config_epl10p8_pins, - NULL, - NULL}, + nullptr, + nullptr}, {"EPL12P6", 786, epl12p6pinfuserows, ARRAY_LENGTH(epl12p6pinfuserows), epl12p6pinfusecolumns, ARRAY_LENGTH(epl12p6pinfusecolumns), print_epl12p6_product_terms, config_epl12p6_pins, - NULL, - NULL}, + nullptr, + nullptr}, {"EPL14P4", 908, epl14p4pinfuserows, ARRAY_LENGTH(epl14p4pinfuserows), epl14p4pinfusecolumns, ARRAY_LENGTH(epl14p4pinfusecolumns), print_epl14p4_product_terms, config_epl14p4_pins, - NULL, - NULL}, + nullptr, + nullptr}, {"EPL16P2", 1030, epl16p2pinfuserows, ARRAY_LENGTH(epl16p2pinfuserows), epl16p2pinfusecolumns, ARRAY_LENGTH(epl16p2pinfusecolumns), print_epl16p2_product_terms, config_epl16p2_pins, - NULL, - NULL}, + nullptr, + nullptr}, {"EPL16P8", 2072, epl16p8pinfuserows, ARRAY_LENGTH(epl16p8pinfuserows), epl16p8pinfusecolumns, ARRAY_LENGTH(epl16p8pinfusecolumns), print_epl16p8_product_terms, config_epl16p8_pins, - NULL, - NULL}, + nullptr, + nullptr}, {"EPL16RP8", 2072, epl16rp8pinfuserows, ARRAY_LENGTH(epl16rp8pinfuserows), epl16rp8pinfusecolumns, ARRAY_LENGTH(epl16rp8pinfusecolumns), print_epl16rp8_product_terms, config_epl16rp8_pins, - NULL, - NULL}, + nullptr, + nullptr}, {"EPL16RP6", 2072, epl16rp6pinfuserows, ARRAY_LENGTH(epl16rp6pinfuserows), epl16rp6pinfusecolumns, ARRAY_LENGTH(epl16rp6pinfusecolumns), print_epl16rp6_product_terms, config_epl16rp6_pins, - NULL, - NULL}, + nullptr, + nullptr}, {"EPL16RP4", 2072, epl16rp4pinfuserows, ARRAY_LENGTH(epl16rp4pinfuserows), epl16rp4pinfusecolumns, ARRAY_LENGTH(epl16rp4pinfusecolumns), print_epl16rp4_product_terms, config_epl16rp4_pins, - NULL, - NULL}, + nullptr, + nullptr}, #endif {"PAL10P8", 328, pal10p8pinfuserows, ARRAY_LENGTH(pal10p8pinfuserows), @@ -3409,6 +3450,17 @@ static void print_peel18cv8_product_terms(const pal_data* pal, const jed_data* j /*------------------------------------------------- + print_ampal18p8_product_terms - prints the product + terms for an AMPAL18P8 +-------------------------------------------------*/ + +static void print_ampal18p8_product_terms(const pal_data* pal, const jed_data* jed) +{ + print_product_terms(pal, jed); +} + + +/*------------------------------------------------- print_gal18v10_product_terms - prints the product terms for a GAL18V10 -------------------------------------------------*/ @@ -5239,6 +5291,46 @@ static void config_peel18cv8_pins(const pal_data* pal, const jed_data* jed) /*------------------------------------------------- + config_ampal18p8_pins - configures the pins + for an AMPAL18P8 +-------------------------------------------------*/ + +static void config_ampal18p8_pins(const pal_data* pal, const jed_data* jed) +{ + static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19}; + pin_output_config output_pins[8]; + UINT16 index, output_pin_count; + + set_input_pins(input_pins, ARRAY_LENGTH(input_pins)); + + output_pin_count = 0; + + for (index = 0; index < pal->pinfuserowscount; ++index) + { + if (does_output_enable_fuse_row_allow_output(pal, jed, pal->pinfuserows[index].fuserowoutputenable)) + { + output_pins[output_pin_count].pin = pal->pinfuserows[index].pin; + output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; + + if (jed_get_fuse(jed, 2591 + (8 - index))) + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; + } + else + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; + } + + ++output_pin_count; + } + } + + set_output_pins(output_pins, output_pin_count); +} + + + +/*------------------------------------------------- config_gal18v10_pins - configures the pins for a GAL18V10 -------------------------------------------------*/ |