diff options
30 files changed, 822 insertions, 744 deletions
diff --git a/hash/megadriv.xml b/hash/megadriv.xml index e6dabfc7440..e2968f6c69f 100644 --- a/hash/megadriv.xml +++ b/hash/megadriv.xml @@ -19603,7 +19603,7 @@ Notice that these are not working on real hardware due to bugged code with VDP i </part> </software> - <software name="f1heromd"> + <software name="f1heromd" cloneof="ferrari"> <description>Nakajima Satoru Kanshuu F1 Hero MD (Jpn)</description> <year>1992</year> <publisher>Varie</publisher> @@ -21536,7 +21536,7 @@ Notice that these are not working on real hardware due to bugged code with VDP i <publisher>Sega</publisher> <info name="serial" value="G-5525"/> <info name="release" value="19931029"/> - <info name="alt_title" value="ペブルビーチの波濤"/> + <info name="alt_title" value="ペブルビーチの波涛"/> <part name="cart" interface="megadriv_cart"> <feature name="slot" value="rom_sram"/> <dataarea name="rom" width="16" endianness="big" size="1572864"> diff --git a/scripts/genie.lua b/scripts/genie.lua index 208f633a8c9..6504b2d5c50 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1149,6 +1149,7 @@ configuration { "vs*" } "_WIN32", "_CRT_NONSTDC_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE", + "_CRT_STDIO_LEGACY_WIDE_SPECIFIERS", } links { "user32", diff --git a/scripts/target/mame/virtual.lua b/scripts/target/mame/virtual.lua index a5d04d8f370..6d13a002948 100644 --- a/scripts/target/mame/virtual.lua +++ b/scripts/target/mame/virtual.lua @@ -14,17 +14,29 @@ -------------------------------------------------- CPUS["M6502"] = true +CPUS["H6280"] = true -------------------------------------------------- -- specify available sound cores; some of these are -- only for MAME and so aren't included -------------------------------------------------- -SOUNDS["GB_SOUND"] = true -SOUNDS["AY8910"] = true +SOUNDS["NES_APU"] = true +SOUNDS["YM2612"] = true +SOUNDS["YM2151"] = true +SOUNDS["YM2413"] = true SOUNDS["YM2203"] = true +SOUNDS["AY8910"] = true SOUNDS["YM3526"] = true -SOUNDS["NES_APU"] = true +SOUNDS["YM3812"] = true +SOUNDS["C6280"] = true +SOUNDS["SN76496"] = true +SOUNDS["K053260"] = true +SOUNDS["SEGAPCM"] = true +SOUNDS["MULTIPCM"] = true +SOUNDS["GB_SOUND"] = true +SOUNDS["POKEY"] = true +SOUNDS["C352"] = true -------------------------------------------------- -- specify available video cores diff --git a/src/devices/cpu/tlcs90/tlcs90.cpp b/src/devices/cpu/tlcs90/tlcs90.cpp index 5287425c320..8cf66a14ccb 100644 --- a/src/devices/cpu/tlcs90/tlcs90.cpp +++ b/src/devices/cpu/tlcs90/tlcs90.cpp @@ -2481,7 +2481,7 @@ TIMER_CALLBACK_MEMBER( tlcs90_device::t90_timer_callback ) TIMER_CALLBACK_MEMBER( tlcs90_device::t90_timer4_callback ) { -// logerror("CPU Timer 4 fired! value = %d\n", (unsigned)m_timer_value[4]); +// logerror("CPU Timer 4 fired! value = %d\n", (unsigned)m_timer4_value); m_timer4_value++; @@ -2502,7 +2502,7 @@ TIMER_CALLBACK_MEMBER( tlcs90_device::t90_timer4_callback ) // Overflow - if ( m_timer_value == nullptr ) + if ( m_timer4_value == 0 ) { // logerror("CPU Timer 4 overflow\n"); } diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index b631e094d23..7832a03fa46 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -1056,7 +1056,7 @@ UINT64 debugger_cpu::expression_read_memory(void *param, const char *name, expre device = expression_get_device(name); if (device == nullptr || !device->interface(memory)) { - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); memory = &device->memory(); } if (memory->has_space(AS_PROGRAM + (spacenum - EXPSPACE_PROGRAM_LOGICAL))) @@ -1079,7 +1079,7 @@ UINT64 debugger_cpu::expression_read_memory(void *param, const char *name, expre device = expression_get_device(name); if (device == nullptr || !device->interface(memory)) { - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); memory = &device->memory(); } if (memory->has_space(AS_PROGRAM + (spacenum - EXPSPACE_PROGRAM_PHYSICAL))) @@ -1100,7 +1100,7 @@ UINT64 debugger_cpu::expression_read_memory(void *param, const char *name, expre device = expression_get_device(name); if (device == nullptr || !device->interface(memory)) { - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); memory = &device->memory(); } return expression_read_program_direct(memory->space(AS_PROGRAM), (spacenum == EXPSPACE_OPCODE), address, size); @@ -1242,7 +1242,7 @@ void debugger_cpu::expression_write_memory(void *param, const char *name, expres device = expression_get_device(name); if (device == nullptr || !device->interface(memory)) { - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); memory = &device->memory(); } if (memory->has_space(AS_PROGRAM + (spacenum - EXPSPACE_PROGRAM_LOGICAL))) @@ -1260,7 +1260,7 @@ void debugger_cpu::expression_write_memory(void *param, const char *name, expres device = expression_get_device(name); if (device == nullptr || !device->interface(memory)) { - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); memory = &device->memory(); } if (memory->has_space(AS_PROGRAM + (spacenum - EXPSPACE_PROGRAM_PHYSICAL))) @@ -1276,7 +1276,7 @@ void debugger_cpu::expression_write_memory(void *param, const char *name, expres device = expression_get_device(name); if (device == nullptr || !device->interface(memory)) { - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); memory = &device->memory(); } expression_write_program_direct(memory->space(AS_PROGRAM), (spacenum == EXPSPACE_OPCODE), address, size, data); @@ -1433,7 +1433,7 @@ expression_error::error_code debugger_cpu::expression_validate(void *param, cons return expression_error::INVALID_MEMORY_NAME; } if (!device) - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); if (!device->interface(memory) || !memory->has_space(AS_PROGRAM + (space - EXPSPACE_PROGRAM_LOGICAL))) return expression_error::NO_SUCH_MEMORY_SPACE; break; @@ -1449,7 +1449,7 @@ expression_error::error_code debugger_cpu::expression_validate(void *param, cons return expression_error::INVALID_MEMORY_NAME; } if (!device) - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); if (!device->interface(memory) || !memory->has_space(AS_PROGRAM + (space - EXPSPACE_PROGRAM_PHYSICAL))) return expression_error::NO_SUCH_MEMORY_SPACE; break; @@ -1463,7 +1463,7 @@ expression_error::error_code debugger_cpu::expression_validate(void *param, cons return expression_error::INVALID_MEMORY_NAME; } if (!device) - device = m_machine.debugger().cpu().get_visible_cpu(); + device = get_visible_cpu(); if (!device->interface(memory) || !memory->has_space(AS_PROGRAM)) return expression_error::NO_SUCH_MEMORY_SPACE; break; diff --git a/src/emu/dirom.cpp b/src/emu/dirom.cpp index a055ce00539..a59a1d6a4f9 100644 --- a/src/emu/dirom.cpp +++ b/src/emu/dirom.cpp @@ -35,7 +35,7 @@ void device_rom_interface::set_rom(const void *base, UINT32 size) { UINT32 mend = m_rom_config.addr_width() == 32 ? 0xffffffff : (1 << m_rom_config.addr_width()) - 1; UINT32 rend = size-1; - UINT32 banks = (rend+1) / (mend+1); + UINT32 banks = mend == 0xffffffff ? 1 : (rend+1) / (mend+1); if(banks < 1) banks = 1; @@ -43,6 +43,7 @@ void device_rom_interface::set_rom(const void *base, UINT32 size) space().install_read_bank(0, mend, device().tag()); m_bank = device().machine().memory().banks().find(device().tag())->second.get(); m_bank->configure_entries(0, banks, const_cast<void *>(base), mend+1); + m_cur_bank = 0; } else { // Round up to the nearest power-of-two-minus-one diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index dc799ca235b..1c488239efa 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -87,6 +87,8 @@ const options_entry emu_options::s_option_entries[] = { OPTION_KEEPASPECT ";ka", "1", OPTION_BOOLEAN, "constrain to the proper aspect ratio" }, { OPTION_UNEVENSTRETCH ";ues", "1", OPTION_BOOLEAN, "allow non-integer stretch factors" }, { OPTION_UNEVENSTRETCHX ";uesx", "0", OPTION_BOOLEAN, "allow non-integer stretch factors only on horizontal axis"}, + { OPTION_UNEVENSTRETCHY ";uesy", "0", OPTION_BOOLEAN, "allow non-integer stretch factors only on vertical axis"}, + { OPTION_AUTOSTRETCHXY ";asxy", "0", OPTION_BOOLEAN, "automatically apply -unevenstretchx/y based on source native orientation"}, { OPTION_INTOVERSCAN ";ios", "0", OPTION_BOOLEAN, "allow overscan on integer scaled targets"}, { OPTION_INTSCALEX ";sx", "0", OPTION_INTEGER, "set horizontal integer scale factor."}, { OPTION_INTSCALEY ";sy", "0", OPTION_INTEGER, "set vertical integer scale."}, diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index 1e7829690c0..5275b65614f 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -79,6 +79,8 @@ #define OPTION_KEEPASPECT "keepaspect" #define OPTION_UNEVENSTRETCH "unevenstretch" #define OPTION_UNEVENSTRETCHX "unevenstretchx" +#define OPTION_UNEVENSTRETCHY "unevenstretchy" +#define OPTION_AUTOSTRETCHXY "autostretchxy" #define OPTION_INTOVERSCAN "intoverscan" #define OPTION_INTSCALEX "intscalex" #define OPTION_INTSCALEY "intscaley" @@ -265,6 +267,8 @@ public: bool keep_aspect() const { return bool_value(OPTION_KEEPASPECT); } bool uneven_stretch() const { return bool_value(OPTION_UNEVENSTRETCH); } bool uneven_stretch_x() const { return bool_value(OPTION_UNEVENSTRETCHX); } + bool uneven_stretch_y() const { return bool_value(OPTION_UNEVENSTRETCHY); } + bool auto_stretch_xy() const { return bool_value(OPTION_AUTOSTRETCHXY); } bool int_overscan() const { return bool_value(OPTION_INTOVERSCAN); } int int_scale_x() const { return int_value(OPTION_INTSCALEX); } int int_scale_y() const { return int_value(OPTION_INTSCALEY); } diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp index 86f3b916b6d..dd32ba7816d 100644 --- a/src/emu/emupal.cpp +++ b/src/emu/emupal.cpp @@ -301,14 +301,10 @@ inline void palette_device::update_for_write(offs_t byte_offset, int bytes_modif offs_t base = byte_offset / bpe; for (int index = 0; index < count; index++) { - UINT32 data = m_paletteram.read(base + index); - if (m_paletteram_ext.base() != nullptr) - data |= m_paletteram_ext.read(base + index) << (8 * bpe); - if (indirect) - set_indirect_color(base + index, m_raw_to_rgb(data)); + set_indirect_color(base + index, m_raw_to_rgb(read_entry(base + index))); else - m_palette->entry_set_color(base + index, m_raw_to_rgb(data)); + m_palette->entry_set_color(base + index, m_raw_to_rgb(read_entry(base + index))); } } diff --git a/src/emu/emupal.h b/src/emu/emupal.h index 57b6cecebdc..283e40d5700 100644 --- a/src/emu/emupal.h +++ b/src/emu/emupal.h @@ -392,6 +392,15 @@ public: bool shadows_enabled() { return m_enable_shadows; } bool hilights_enabled() { return m_enable_hilights; } + // raw entry reading + UINT32 read_entry(pen_t pen) const + { + UINT32 data = m_paletteram.read(pen); + if (m_paletteram_ext.base() != nullptr) + data |= m_paletteram_ext.read(pen) << (8 * m_paletteram.bytes_per_entry()); + return data; + } + // setters void set_pen_color(pen_t pen, rgb_t rgb) { m_palette->entry_set_color(pen, rgb); } void set_pen_red_level(pen_t pen, UINT8 level) { m_palette->entry_set_red_level(pen, level); } diff --git a/src/emu/memarray.cpp b/src/emu/memarray.cpp index 03161f000bf..98a5c7c33ef 100644 --- a/src/emu/memarray.cpp +++ b/src/emu/memarray.cpp @@ -125,22 +125,22 @@ void memory_array::set_endianness(endianness_t endianness) // heleprs for 1 byte-per-entry //------------------------------------------------- -UINT32 memory_array::read8_from_8(int index) { return reinterpret_cast<UINT8 *>(m_base)[index]; } +UINT32 memory_array::read8_from_8(int index) const { return reinterpret_cast<UINT8 *>(m_base)[index]; } void memory_array::write8_to_8(int index, UINT32 data) { reinterpret_cast<UINT8 *>(m_base)[index] = data; } -UINT32 memory_array::read8_from_16le(int index) { return reinterpret_cast<UINT8 *>(m_base)[BYTE_XOR_LE(index)]; } +UINT32 memory_array::read8_from_16le(int index) const { return reinterpret_cast<UINT8 *>(m_base)[BYTE_XOR_LE(index)]; } void memory_array::write8_to_16le(int index, UINT32 data) { reinterpret_cast<UINT8 *>(m_base)[BYTE_XOR_LE(index)] = data; } -UINT32 memory_array::read8_from_16be(int index) { return reinterpret_cast<UINT8 *>(m_base)[BYTE_XOR_BE(index)]; } +UINT32 memory_array::read8_from_16be(int index) const { return reinterpret_cast<UINT8 *>(m_base)[BYTE_XOR_BE(index)]; } void memory_array::write8_to_16be(int index, UINT32 data) { reinterpret_cast<UINT8 *>(m_base)[BYTE_XOR_BE(index)] = data; } -UINT32 memory_array::read8_from_32le(int index) { return reinterpret_cast<UINT8 *>(m_base)[BYTE4_XOR_LE(index)]; } +UINT32 memory_array::read8_from_32le(int index) const { return reinterpret_cast<UINT8 *>(m_base)[BYTE4_XOR_LE(index)]; } void memory_array::write8_to_32le(int index, UINT32 data) { reinterpret_cast<UINT8 *>(m_base)[BYTE4_XOR_LE(index)] = data; } -UINT32 memory_array::read8_from_32be(int index) { return reinterpret_cast<UINT8 *>(m_base)[BYTE4_XOR_BE(index)]; } +UINT32 memory_array::read8_from_32be(int index) const { return reinterpret_cast<UINT8 *>(m_base)[BYTE4_XOR_BE(index)]; } void memory_array::write8_to_32be(int index, UINT32 data) { reinterpret_cast<UINT8 *>(m_base)[BYTE4_XOR_BE(index)] = data; } -UINT32 memory_array::read8_from_64le(int index) { return reinterpret_cast<UINT8 *>(m_base)[BYTE8_XOR_BE(index)]; } +UINT32 memory_array::read8_from_64le(int index) const { return reinterpret_cast<UINT8 *>(m_base)[BYTE8_XOR_BE(index)]; } void memory_array::write8_to_64le(int index, UINT32 data) { reinterpret_cast<UINT8 *>(m_base)[BYTE8_XOR_BE(index)] = data; } -UINT32 memory_array::read8_from_64be(int index) { return reinterpret_cast<UINT8 *>(m_base)[BYTE8_XOR_BE(index)]; } +UINT32 memory_array::read8_from_64be(int index) const { return reinterpret_cast<UINT8 *>(m_base)[BYTE8_XOR_BE(index)]; } void memory_array::write8_to_64be(int index, UINT32 data) { reinterpret_cast<UINT8 *>(m_base)[BYTE8_XOR_BE(index)] = data; } @@ -149,22 +149,22 @@ void memory_array::write8_to_64be(int index, UINT32 data) { reinterpret_cast<UIN // heleprs for 2 bytes-per-entry //------------------------------------------------- -UINT32 memory_array::read16_from_8le(int index) { return read8_from_8(index*2) | (read8_from_8(index*2+1) << 8); } +UINT32 memory_array::read16_from_8le(int index) const { return read8_from_8(index*2) | (read8_from_8(index*2+1) << 8); } void memory_array::write16_to_8le(int index, UINT32 data) { write8_to_8(index*2, data); write8_to_8(index*2+1, data >> 8); } -UINT32 memory_array::read16_from_8be(int index) { return (read8_from_8(index*2) << 8) | read8_from_8(index*2+1); } +UINT32 memory_array::read16_from_8be(int index) const { return (read8_from_8(index*2) << 8) | read8_from_8(index*2+1); } void memory_array::write16_to_8be(int index, UINT32 data) { write8_to_8(index*2, data >> 8); write8_to_8(index*2+1, data); } -UINT32 memory_array::read16_from_16(int index) { return reinterpret_cast<UINT16 *>(m_base)[index]; } +UINT32 memory_array::read16_from_16(int index) const { return reinterpret_cast<UINT16 *>(m_base)[index]; } void memory_array::write16_to_16(int index, UINT32 data) { reinterpret_cast<UINT16 *>(m_base)[index] = data; } -UINT32 memory_array::read16_from_32le(int index) { return reinterpret_cast<UINT16 *>(m_base)[BYTE_XOR_LE(index)]; } +UINT32 memory_array::read16_from_32le(int index) const { return reinterpret_cast<UINT16 *>(m_base)[BYTE_XOR_LE(index)]; } void memory_array::write16_to_32le(int index, UINT32 data) { reinterpret_cast<UINT16 *>(m_base)[BYTE_XOR_LE(index)] = data; } -UINT32 memory_array::read16_from_32be(int index) { return reinterpret_cast<UINT16 *>(m_base)[BYTE_XOR_BE(index)]; } +UINT32 memory_array::read16_from_32be(int index) const { return reinterpret_cast<UINT16 *>(m_base)[BYTE_XOR_BE(index)]; } void memory_array::write16_to_32be(int index, UINT32 data) { reinterpret_cast<UINT16 *>(m_base)[BYTE_XOR_BE(index)] = data; } -UINT32 memory_array::read16_from_64le(int index) { return reinterpret_cast<UINT16 *>(m_base)[BYTE4_XOR_LE(index)]; } +UINT32 memory_array::read16_from_64le(int index) const { return reinterpret_cast<UINT16 *>(m_base)[BYTE4_XOR_LE(index)]; } void memory_array::write16_to_64le(int index, UINT32 data) { reinterpret_cast<UINT16 *>(m_base)[BYTE4_XOR_LE(index)] = data; } -UINT32 memory_array::read16_from_64be(int index) { return reinterpret_cast<UINT16 *>(m_base)[BYTE4_XOR_BE(index)]; } +UINT32 memory_array::read16_from_64be(int index) const { return reinterpret_cast<UINT16 *>(m_base)[BYTE4_XOR_BE(index)]; } void memory_array::write16_to_64be(int index, UINT32 data) { reinterpret_cast<UINT16 *>(m_base)[BYTE4_XOR_BE(index)] = data; } @@ -173,20 +173,20 @@ void memory_array::write16_to_64be(int index, UINT32 data) { reinterpret_cast<UI // heleprs for 4 bytes-per-entry //------------------------------------------------- -UINT32 memory_array::read32_from_8le(int index) { return read16_from_8le(index*2) | (read16_from_8le(index*2+1) << 16); } +UINT32 memory_array::read32_from_8le(int index) const { return read16_from_8le(index*2) | (read16_from_8le(index*2+1) << 16); } void memory_array::write32_to_8le(int index, UINT32 data) { write16_to_8le(index*2, data); write16_to_8le(index*2+1, data >> 16); } -UINT32 memory_array::read32_from_8be(int index) { return (read16_from_8be(index*2) << 16) | read16_from_8be(index*2+1); } +UINT32 memory_array::read32_from_8be(int index) const { return (read16_from_8be(index*2) << 16) | read16_from_8be(index*2+1); } void memory_array::write32_to_8be(int index, UINT32 data) { write16_to_8be(index*2, data >> 16); write16_to_8be(index*2+1, data); } -UINT32 memory_array::read32_from_16le(int index) { return read16_from_16(index*2) | (read16_from_16(index*2+1) << 16); } +UINT32 memory_array::read32_from_16le(int index) const { return read16_from_16(index*2) | (read16_from_16(index*2+1) << 16); } void memory_array::write32_to_16le(int index, UINT32 data) { write16_to_16(index*2, data); write16_to_16(index*2+1, data >> 16); } -UINT32 memory_array::read32_from_16be(int index) { return (read16_from_16(index*2) << 16) | read16_from_16(index*2+1); } +UINT32 memory_array::read32_from_16be(int index) const { return (read16_from_16(index*2) << 16) | read16_from_16(index*2+1); } void memory_array::write32_to_16be(int index, UINT32 data) { write16_to_16(index*2, data >> 16); write16_to_16(index*2+1, data); } -UINT32 memory_array::read32_from_32(int index) { return reinterpret_cast<UINT32 *>(m_base)[index]; } +UINT32 memory_array::read32_from_32(int index) const { return reinterpret_cast<UINT32 *>(m_base)[index]; } void memory_array::write32_to_32(int index, UINT32 data) { reinterpret_cast<UINT32 *>(m_base)[index] = data; } -UINT32 memory_array::read32_from_64le(int index) { return reinterpret_cast<UINT32 *>(m_base)[BYTE_XOR_LE(index)]; } +UINT32 memory_array::read32_from_64le(int index) const { return reinterpret_cast<UINT32 *>(m_base)[BYTE_XOR_LE(index)]; } void memory_array::write32_to_64le(int index, UINT32 data) { reinterpret_cast<UINT32 *>(m_base)[BYTE_XOR_LE(index)] = data; } -UINT32 memory_array::read32_from_64be(int index) { return reinterpret_cast<UINT32 *>(m_base)[BYTE_XOR_BE(index)]; } +UINT32 memory_array::read32_from_64be(int index) const { return reinterpret_cast<UINT32 *>(m_base)[BYTE_XOR_BE(index)]; } void memory_array::write32_to_64be(int index, UINT32 data) { reinterpret_cast<UINT32 *>(m_base)[BYTE_XOR_BE(index)] = data; } diff --git a/src/emu/memarray.h b/src/emu/memarray.h index bea5bb19912..24e60c0d45d 100644 --- a/src/emu/memarray.h +++ b/src/emu/memarray.h @@ -69,14 +69,14 @@ public: int bytes_per_entry() const { return m_bytes_per_entry; } // entry-level readers and writers - UINT32 read(int index) { return (this->*m_read_entry)(index); } + UINT32 read(int index) const { return (this->*m_read_entry)(index); } void write(int index, UINT32 data) { (this->*m_write_entry)(index, data); } // byte/word/dword-level readers and writers - UINT8 read8(offs_t offset) { return reinterpret_cast<UINT8 *>(m_base)[offset]; } - UINT16 read16(offs_t offset) { return reinterpret_cast<UINT16 *>(m_base)[offset]; } - UINT32 read32(offs_t offset) { return reinterpret_cast<UINT32 *>(m_base)[offset]; } - UINT64 read64(offs_t offset) { return reinterpret_cast<UINT64 *>(m_base)[offset]; } + UINT8 read8(offs_t offset) const { return reinterpret_cast<UINT8 *>(m_base)[offset]; } + UINT16 read16(offs_t offset) const { return reinterpret_cast<UINT16 *>(m_base)[offset]; } + UINT32 read32(offs_t offset) const { return reinterpret_cast<UINT32 *>(m_base)[offset]; } + UINT64 read64(offs_t offset) const { return reinterpret_cast<UINT64 *>(m_base)[offset]; } void write8(offs_t offset, UINT8 data) { reinterpret_cast<UINT8 *>(m_base)[offset] = data; } void write16(offs_t offset, UINT16 data, UINT16 mem_mask = 0xffff) { COMBINE_DATA(&reinterpret_cast<UINT16 *>(m_base)[offset]); } void write32(offs_t offset, UINT32 data, UINT32 mem_mask = 0xffffffff) { COMBINE_DATA(&reinterpret_cast<UINT32 *>(m_base)[offset]); } @@ -84,31 +84,31 @@ public: private: // internal read/write helpers for 1 byte entries - UINT32 read8_from_8(int index); void write8_to_8(int index, UINT32 data); - UINT32 read8_from_16le(int index); void write8_to_16le(int index, UINT32 data); - UINT32 read8_from_16be(int index); void write8_to_16be(int index, UINT32 data); - UINT32 read8_from_32le(int index); void write8_to_32le(int index, UINT32 data); - UINT32 read8_from_32be(int index); void write8_to_32be(int index, UINT32 data); - UINT32 read8_from_64le(int index); void write8_to_64le(int index, UINT32 data); - UINT32 read8_from_64be(int index); void write8_to_64be(int index, UINT32 data); + UINT32 read8_from_8(int index) const; void write8_to_8(int index, UINT32 data); + UINT32 read8_from_16le(int index) const; void write8_to_16le(int index, UINT32 data); + UINT32 read8_from_16be(int index) const; void write8_to_16be(int index, UINT32 data); + UINT32 read8_from_32le(int index) const; void write8_to_32le(int index, UINT32 data); + UINT32 read8_from_32be(int index) const; void write8_to_32be(int index, UINT32 data); + UINT32 read8_from_64le(int index) const; void write8_to_64le(int index, UINT32 data); + UINT32 read8_from_64be(int index) const; void write8_to_64be(int index, UINT32 data); // internal read/write helpers for 2 byte entries - UINT32 read16_from_8le(int index); void write16_to_8le(int index, UINT32 data); - UINT32 read16_from_8be(int index); void write16_to_8be(int index, UINT32 data); - UINT32 read16_from_16(int index); void write16_to_16(int index, UINT32 data); - UINT32 read16_from_32le(int index); void write16_to_32le(int index, UINT32 data); - UINT32 read16_from_32be(int index); void write16_to_32be(int index, UINT32 data); - UINT32 read16_from_64le(int index); void write16_to_64le(int index, UINT32 data); - UINT32 read16_from_64be(int index); void write16_to_64be(int index, UINT32 data); + UINT32 read16_from_8le(int index) const; void write16_to_8le(int index, UINT32 data); + UINT32 read16_from_8be(int index) const; void write16_to_8be(int index, UINT32 data); + UINT32 read16_from_16(int index) const; void write16_to_16(int index, UINT32 data); + UINT32 read16_from_32le(int index) const; void write16_to_32le(int index, UINT32 data); + UINT32 read16_from_32be(int index) const; void write16_to_32be(int index, UINT32 data); + UINT32 read16_from_64le(int index) const; void write16_to_64le(int index, UINT32 data); + UINT32 read16_from_64be(int index) const; void write16_to_64be(int index, UINT32 data); // internal read/write helpers for 4 byte entries - UINT32 read32_from_8le(int index); void write32_to_8le(int index, UINT32 data); - UINT32 read32_from_8be(int index); void write32_to_8be(int index, UINT32 data); - UINT32 read32_from_16le(int index); void write32_to_16le(int index, UINT32 data); - UINT32 read32_from_16be(int index); void write32_to_16be(int index, UINT32 data); - UINT32 read32_from_32(int index); void write32_to_32(int index, UINT32 data); - UINT32 read32_from_64le(int index); void write32_to_64le(int index, UINT32 data); - UINT32 read32_from_64be(int index); void write32_to_64be(int index, UINT32 data); + UINT32 read32_from_8le(int index) const; void write32_to_8le(int index, UINT32 data); + UINT32 read32_from_8be(int index) const; void write32_to_8be(int index, UINT32 data); + UINT32 read32_from_16le(int index) const; void write32_to_16le(int index, UINT32 data); + UINT32 read32_from_16be(int index) const; void write32_to_16be(int index, UINT32 data); + UINT32 read32_from_32(int index) const; void write32_to_32(int index, UINT32 data); + UINT32 read32_from_64le(int index) const; void write32_to_64le(int index, UINT32 data); + UINT32 read32_from_64be(int index) const; void write32_to_64be(int index, UINT32 data); // internal state void * m_base; @@ -116,7 +116,7 @@ private: int m_membits; endianness_t m_endianness; int m_bytes_per_entry; - UINT32 (memory_array::*m_read_entry)(int); + UINT32 (memory_array::*m_read_entry)(int) const; void (memory_array::*m_write_entry)(int, UINT32); }; diff --git a/src/emu/render.cpp b/src/emu/render.cpp index 39018410c2b..7e2ad4c2ca1 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -935,10 +935,16 @@ render_target::render_target(render_manager &manager, const internal_layout *lay m_int_overscan = manager.machine().options().int_overscan(); m_int_scale_x = manager.machine().options().int_scale_x(); m_int_scale_y = manager.machine().options().int_scale_y(); - if (manager.machine().options().uneven_stretch() && !manager.machine().options().uneven_stretch_x()) + if (m_manager.machine().options().auto_stretch_xy()) + m_scale_mode = SCALE_FRACTIONAL_AUTO; + else if (manager.machine().options().uneven_stretch_x()) + m_scale_mode = SCALE_FRACTIONAL_X; + else if (manager.machine().options().uneven_stretch_y()) + m_scale_mode = SCALE_FRACTIONAL_Y; + else if (manager.machine().options().uneven_stretch()) m_scale_mode = SCALE_FRACTIONAL; else - m_scale_mode = manager.machine().options().uneven_stretch_x() ? SCALE_FRACTIONAL_X : SCALE_INTEGER; + m_scale_mode = SCALE_INTEGER; // determine the base orientation based on options if (!manager.machine().options().rotate()) @@ -1194,8 +1200,7 @@ void render_target::compute_visible_area(INT32 target_width, INT32 target_height break; } - case SCALE_FRACTIONAL_X: - case SCALE_INTEGER: + default: { // get source size and aspect INT32 src_width, src_height; @@ -1208,10 +1213,19 @@ void render_target::compute_visible_area(INT32 target_width, INT32 target_height // get target aspect float target_aspect = (float)target_width / (float)target_height * target_pixel_aspect; + bool target_is_portrait = (target_aspect < 1.0f); + + // apply automatic axial stretching if required + int scale_mode = m_scale_mode; + if (m_scale_mode == SCALE_FRACTIONAL_AUTO) + { + bool is_rotated = (m_manager.machine().system().flags & ORIENTATION_SWAP_XY) ^ (target_orientation & ORIENTATION_SWAP_XY); + scale_mode = is_rotated ^ target_is_portrait ? SCALE_FRACTIONAL_Y : SCALE_FRACTIONAL_X; + } // determine the scale mode for each axis - bool x_is_integer = !(target_aspect >= 1.0f && m_scale_mode == SCALE_FRACTIONAL_X); - bool y_is_integer = !(target_aspect < 1.0f && m_scale_mode == SCALE_FRACTIONAL_X); + bool x_is_integer = !((!target_is_portrait && scale_mode == SCALE_FRACTIONAL_X) || (target_is_portrait && scale_mode == SCALE_FRACTIONAL_Y)); + bool y_is_integer = !((target_is_portrait && scale_mode == SCALE_FRACTIONAL_X) || (!target_is_portrait && scale_mode == SCALE_FRACTIONAL_Y)); // first compute scale factors to fit the screen float xscale = (float)target_width / src_width; @@ -1226,8 +1240,10 @@ void render_target::compute_visible_area(INT32 target_width, INT32 target_height if (y_is_integer) yscale = std::min(maxyscale, std::max(1.0f, render_round_nearest(yscale))); // check if we have user defined scale factors, if so use them instead - xscale = m_int_scale_x > 0 ? m_int_scale_x : xscale; - yscale = m_int_scale_y > 0 ? m_int_scale_y : yscale; + int user_scale_x = target_is_portrait? m_int_scale_y : m_int_scale_x; + int user_scale_y = target_is_portrait? m_int_scale_x : m_int_scale_y; + xscale = user_scale_x > 0 ? user_scale_x : xscale; + yscale = user_scale_y > 0 ? user_scale_y : yscale; // set the final width/height visible_width = render_round_nearest(src_width * xscale); diff --git a/src/emu/render.h b/src/emu/render.h index 8355833c9f5..77f8d418522 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -86,6 +86,8 @@ enum { SCALE_FRACTIONAL = 0, // compute fractional scaling factors for both axes SCALE_FRACTIONAL_X, // compute fractional scaling factor for x-axis, and integer factor for y-axis + SCALE_FRACTIONAL_Y, // compute fractional scaling factor for y-axis, and integer factor for x-axis + SCALE_FRACTIONAL_AUTO, // automatically compute fractional scaling for x/y-axes based on source native orientation SCALE_INTEGER // compute integer scaling factors for both axes, based on target dimensions }; diff --git a/src/frontend/mame/cheat.cpp b/src/frontend/mame/cheat.cpp index d9afcdc95bf..534340782ed 100644 --- a/src/frontend/mame/cheat.cpp +++ b/src/frontend/mame/cheat.cpp @@ -80,6 +80,7 @@ #include "ui/menu.h" #include "cheat.h" #include "debug/debugcpu.h" +#include "debugger.h" #include <ctype.h> @@ -1081,10 +1082,13 @@ cheat_manager::cheat_manager(running_machine &machine) if ((machine.debug_flags & DEBUG_FLAG_ENABLED) == 0) { m_cpu = std::make_unique<debugger_cpu>(machine); - - // configure for memory access (shared with debugger) m_cpu->configure_memory(m_symtable); } + else + { + // configure for memory access (shared with debugger) + machine.debugger().cpu().configure_memory(m_symtable); + } // load the cheats reload(); diff --git a/src/frontend/mame/ui/viewgfx.cpp b/src/frontend/mame/ui/viewgfx.cpp index b19df247cfc..f299cacd3cf 100644 --- a/src/frontend/mame/ui/viewgfx.cpp +++ b/src/frontend/mame/ui/viewgfx.cpp @@ -347,14 +347,12 @@ static void palette_handler(mame_ui_manager &mui, render_container &container, u int total = state.palette.which ? palette->indirect_entries() : palette->entries(); const rgb_t *raw_color = palette->palette()->entry_list_raw(); render_font *ui_font = mui.get_font(); - float cellwidth, cellheight; float chwidth, chheight; float titlewidth; float x0, y0; render_bounds cellboxbounds; render_bounds boxbounds; int x, y, skip; - char title[100]; // add a half character padding for the box chheight = mui.get_line_height(); @@ -377,10 +375,42 @@ static void palette_handler(mame_ui_manager &mui, render_container &container, u // add space on the top for a title, a half line of padding, a header, and another half line cellboxbounds.y0 += 3.0f * chheight; - // figure out the title and expand the outer box to fit - const char *suffix = palette->indirect_entries() == 0 ? "" : state.palette.which ? _(" COLORS") : _(" PENS"); - sprintf(title, "'%s'%s", palette->tag(), suffix); - titlewidth = ui_font->string_width(chheight, mui.machine().render().ui_aspect(), title); + // compute the cell size + float cellwidth = (cellboxbounds.x1 - cellboxbounds.x0) / (float)state.palette.columns; + float cellheight = (cellboxbounds.y1 - cellboxbounds.y0) / (float)state.palette.columns; + + // figure out the title + std::ostringstream title_buf; + util::stream_format(title_buf, "'%s'", palette->tag()); + if (palette->indirect_entries() > 0) + title_buf << (state.palette.which ? _(" COLORS") : _(" PENS")); + + // if the mouse pointer is over one of our cells, add some info about the corresponding palette entry + INT32 mouse_target_x, mouse_target_y; + bool mouse_button; + float mouse_x, mouse_y; + render_target *mouse_target = mui.machine().ui_input().find_mouse(&mouse_target_x, &mouse_target_y, &mouse_button); + if (mouse_target != nullptr && mouse_target->map_point_container(mouse_target_x, mouse_target_y, container, mouse_x, mouse_y) + && cellboxbounds.x0 <= mouse_x && cellboxbounds.x1 > mouse_x + && cellboxbounds.y0 <= mouse_y && cellboxbounds.y1 > mouse_y) + { + int index = state.palette.offset + int((mouse_x - cellboxbounds.x0) / cellwidth) + int((mouse_y - cellboxbounds.y0) / cellheight) * state.palette.columns; + if (index < total) + { + util::stream_format(title_buf, " #%X", index); + if (palette->indirect_entries() > 0 && !state.palette.which) + util::stream_format(title_buf, " => %X", palette->pen_indirect(index)); + else if (palette->basemem().base() != nullptr) + util::stream_format(title_buf, " = %X", palette->read_entry(index)); + + rgb_t col = state.palette.which ? palette->indirect_color(index) : raw_color[index]; + util::stream_format(title_buf, " (R:%X G:%X B:%X)", col.r(), col.g(), col.b()); + } + } + + // expand the outer box to fit the title + const std::string title = title_buf.str(); + titlewidth = ui_font->string_width(chheight, mui.machine().render().ui_aspect(), title.c_str()); x0 = 0.0f; if (boxbounds.x1 - boxbounds.x0 < titlewidth + chwidth) x0 = boxbounds.x0 - (0.5f - 0.5f * (titlewidth + chwidth)); @@ -391,16 +421,12 @@ static void palette_handler(mame_ui_manager &mui, render_container &container, u // draw the title x0 = 0.5f - 0.5f * titlewidth; y0 = boxbounds.y0 + 0.5f * chheight; - for (x = 0; title[x] != 0; x++) + for (auto ch : title) { - container.add_char(x0, y0, chheight, mui.machine().render().ui_aspect(), rgb_t::white, *ui_font, title[x]); - x0 += ui_font->char_width(chheight, mui.machine().render().ui_aspect(), title[x]); + container.add_char(x0, y0, chheight, mui.machine().render().ui_aspect(), rgb_t::white, *ui_font, ch); + x0 += ui_font->char_width(chheight, mui.machine().render().ui_aspect(), ch); } - // compute the cell size - cellwidth = (cellboxbounds.x1 - cellboxbounds.x0) / (float)state.palette.columns; - cellheight = (cellboxbounds.y1 - cellboxbounds.y0) / (float)state.palette.columns; - // draw the top column headers skip = (int)(chwidth / cellwidth); for (x = 0; x < state.palette.columns; x += 1 + skip) @@ -559,7 +585,6 @@ static void gfxset_handler(mame_ui_manager &mui, render_container &container, ui float cellwidth, cellheight; float chwidth, chheight; float titlewidth; - //float cellaspect; float x0, y0; render_bounds cellboxbounds; render_bounds boxbounds; @@ -570,7 +595,6 @@ static void gfxset_handler(mame_ui_manager &mui, render_container &container, ui int xcells, ycells; int pixelscale = 0; int x, y, skip; - char title[100]; // add a half character padding for the box chheight = mui.get_line_height(); @@ -638,12 +662,12 @@ static void gfxset_handler(mame_ui_manager &mui, render_container &container, ui boxbounds.y1 = boxbounds.y0 + fullheight; // figure out the title and expand the outer box to fit - sprintf(title, "'%s' %d/%d %dx%d COLOR %X", + const std::string title = string_format("'%s' %d/%d %dx%d COLOR %X", interface.device().tag(), set, info.setcount - 1, gfx.width(), gfx.height(), info.color[set]); - titlewidth = ui_font->string_width(chheight, mui.machine().render().ui_aspect(), title); + titlewidth = ui_font->string_width(chheight, mui.machine().render().ui_aspect(), title.c_str()); x0 = 0.0f; if (boxbounds.x1 - boxbounds.x0 < titlewidth + chwidth) x0 = boxbounds.x0 - (0.5f - 0.5f * (titlewidth + chwidth)); @@ -654,10 +678,10 @@ static void gfxset_handler(mame_ui_manager &mui, render_container &container, ui // draw the title x0 = 0.5f - 0.5f * titlewidth; y0 = boxbounds.y0 + 0.5f * chheight; - for (x = 0; title[x] != 0; x++) + for (auto ch : title) { - container.add_char(x0, y0, chheight, mui.machine().render().ui_aspect(), rgb_t::white, *ui_font, title[x]); - x0 += ui_font->char_width(chheight, mui.machine().render().ui_aspect(), title[x]); + container.add_char(x0, y0, chheight, mui.machine().render().ui_aspect(), rgb_t::white, *ui_font, ch); + x0 += ui_font->char_width(chheight, mui.machine().render().ui_aspect(), ch); } // draw the top column headers @@ -960,8 +984,6 @@ static void tilemap_handler(mame_ui_manager &mui, render_container &container, u int mapboxwidth, mapboxheight; int maxxscale, maxyscale; UINT32 mapwidth, mapheight; - int x, pixelscale; - char title[100]; // get the size of the tilemap itself tilemap_t *tilemap = mui.machine().tilemap().find(state.tilemap.which); @@ -993,7 +1015,7 @@ static void tilemap_handler(mame_ui_manager &mui, render_container &container, u mapboxheight = (mapboxbounds.y1 - mapboxbounds.y0) * (float)targheight; // determine the maximum integral scaling factor - pixelscale = state.tilemap.zoom; + int pixelscale = state.tilemap.zoom; if (pixelscale == 0) { for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) { } @@ -1018,8 +1040,8 @@ static void tilemap_handler(mame_ui_manager &mui, render_container &container, u boxbounds.y1 = mapboxbounds.y1 + 0.5f * chheight; // figure out the title and expand the outer box to fit - sprintf(title, "TILEMAP %d/%d %dx%d OFFS %d,%d", state.tilemap.which, mui.machine().tilemap().count() - 1, mapwidth, mapheight, state.tilemap.xoffs, state.tilemap.yoffs); - titlewidth = ui_font->string_width(chheight, mui.machine().render().ui_aspect(), title); + const std::string title = string_format("TILEMAP %d/%d %dx%d OFFS %d,%d", state.tilemap.which, mui.machine().tilemap().count() - 1, mapwidth, mapheight, state.tilemap.xoffs, state.tilemap.yoffs); + titlewidth = ui_font->string_width(chheight, mui.machine().render().ui_aspect(), title.c_str()); if (boxbounds.x1 - boxbounds.x0 < titlewidth + chwidth) { boxbounds.x0 = 0.5f - 0.5f * (titlewidth + chwidth); @@ -1032,10 +1054,10 @@ static void tilemap_handler(mame_ui_manager &mui, render_container &container, u // draw the title x0 = 0.5f - 0.5f * titlewidth; y0 = boxbounds.y0 + 0.5f * chheight; - for (x = 0; title[x] != 0; x++) + for (auto ch : title) { - container.add_char(x0, y0, chheight, mui.machine().render().ui_aspect(), rgb_t::white, *ui_font, title[x]); - x0 += ui_font->char_width(chheight, mui.machine().render().ui_aspect(), title[x]); + container.add_char(x0, y0, chheight, mui.machine().render().ui_aspect(), rgb_t::white, *ui_font, ch); + x0 += ui_font->char_width(chheight, mui.machine().render().ui_aspect(), ch); } // update the bitmap diff --git a/src/mame/drivers/chessmst.cpp b/src/mame/drivers/chessmst.cpp index e92d94056dc..5a4245f06e6 100644 --- a/src/mame/drivers/chessmst.cpp +++ b/src/mame/drivers/chessmst.cpp @@ -5,7 +5,8 @@ Chess-Master TODO: - - add Reset and Halt buttons + - the HALT button does not work as it should: it stops the computers calculation + (the board LEDs go OFF and the CM's LED goes ON), but the machine doesn't return any move (as it should) - a better artwork ****************************************************************************/ @@ -17,6 +18,7 @@ #include "sound/speaker.h" #include "chessmst.lh" +#define MASTER_CLOCK (9830400/4) /* 9830.4kHz source */ class chessmst_state : public driver_device { @@ -25,7 +27,7 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_speaker(*this, "speaker") - { } + { } required_device<cpu_device> m_maincpu; required_device<speaker_sound_device> m_speaker; @@ -41,6 +43,7 @@ public: DECLARE_READ8_MEMBER( pio2_port_a_r ); DECLARE_WRITE8_MEMBER( pio2_port_b_w ); DECLARE_INPUT_CHANGED_MEMBER(chessmst_sensor); + DECLARE_INPUT_CHANGED_MEMBER(reset_button); }; @@ -59,6 +62,11 @@ static ADDRESS_MAP_START( chessmst_io , AS_IO, 8, chessmst_state) AM_RANGE(0x08, 0x0b) AM_MIRROR(0xf0) AM_DEVREADWRITE("z80pio2", z80pio_device, read, write) ADDRESS_MAP_END +INPUT_CHANGED_MEMBER(chessmst_state::reset_button) +{ + m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); +} + INPUT_CHANGED_MEMBER(chessmst_state::chessmst_sensor) { UINT8 pos = (UINT8)(FPTR)param; @@ -153,6 +161,10 @@ static INPUT_PORTS_START( chessmst ) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Color [2]") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_C) PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Level [1]") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_L) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("New Game [0]") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_ENTER) + + PORT_START("EXTRA") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Halt") PORT_CODE(KEYCODE_F2) PORT_WRITE_LINE_DEVICE_MEMBER("z80pio1", z80pio_device, strobe_a) // -> PIO(1) ASTB pin + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Reset") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, reset_button, 0) // -> Z80 RESET pin INPUT_PORTS_END void chessmst_state::machine_reset() @@ -241,8 +253,9 @@ WRITE8_MEMBER( chessmst_state::pio2_port_b_w ) } static MACHINE_CONFIG_START( chessmst, chessmst_state ) + /* basic machine hardware */ - MCFG_CPU_ADD("maincpu",Z80, XTAL_4MHz) + MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK) // U880 MCFG_CPU_PROGRAM_MAP(chessmst_mem) MCFG_CPU_IO_MAP(chessmst_io) @@ -255,12 +268,12 @@ static MACHINE_CONFIG_START( chessmst, chessmst_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) /* devices */ - MCFG_DEVICE_ADD("z80pio1", Z80PIO, XTAL_4MHz) + MCFG_DEVICE_ADD("z80pio1", Z80PIO, MASTER_CLOCK) MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) MCFG_Z80PIO_OUT_PA_CB(WRITE8(chessmst_state, pio1_port_a_w)) MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio1_port_b_w)) - MCFG_DEVICE_ADD("z80pio2", Z80PIO, XTAL_4MHz) + MCFG_DEVICE_ADD("z80pio2", Z80PIO, MASTER_CLOCK) MCFG_Z80PIO_IN_PA_CB(READ8(chessmst_state, pio2_port_a_r)) MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio2_port_b_w)) MACHINE_CONFIG_END diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp index 4fa59141e73..862f4a71734 100644 --- a/src/mame/drivers/cmi.cpp +++ b/src/mame/drivers/cmi.cpp @@ -381,9 +381,8 @@ public: , m_acia_mkbd_cmi(*this, "acia_mkbd_cmi") , m_cmi07_ptm(*this, "cmi07_ptm") , m_qfc9_region(*this, "qfc9") - , m_floppy_0(*this, "wd1791:0") - , m_floppy_1(*this, "wd1791:1") - , m_floppy(nullptr) + , m_floppy0(*this, "wd1791:0") + , m_floppy1(*this, "wd1791:1") , m_wd1791(*this, "wd1791") , m_channels(*this, "cmi01a_%u", 0) , m_cmi10_pia_u20(*this, "cmi10_pia_u20") @@ -542,9 +541,8 @@ protected: required_device<ptm6840_device> m_cmi07_ptm; required_memory_region m_qfc9_region; - required_device<floppy_connector> m_floppy_0; - required_device<floppy_connector> m_floppy_1; - floppy_image_device *m_floppy; + required_device<floppy_connector> m_floppy0; + required_device<floppy_connector> m_floppy1; required_device<fd1791_t> m_wd1791; required_device_array<cmi01a_device, 8> m_channels; @@ -609,8 +607,8 @@ private: /* Memory management */ UINT8 m_map_sel[16]; - std::unique_ptr<UINT8[]> m_map_ram[4]; - std::unique_ptr<UINT8[]> m_q256_ram[4]; + std::unique_ptr<UINT8[]> m_map_ram[2]; + std::unique_ptr<UINT8[]> m_q256_ram[2]; UINT8 m_map_ram_latch; int m_cpu_active_space[2]; // TODO: Make one register int m_cpu_map_switch[2]; @@ -1294,6 +1292,8 @@ void cmi_state::update_address_space(int cpunum, UINT8 mapinfo) address_space *space = (cpunum == 0 ? m_cpu1space : m_cpu2space); + space->unmap_readwrite(0x0000, 0xffff); + /* Step through the map RAM assignments */ for (int page = 0; page < PAGE_COUNT; ++page) { @@ -1317,7 +1317,7 @@ void cmi_state::update_address_space(int cpunum, UINT8 mapinfo) if (m_cmi07_ctrl & 0x30) if ((address & 0xc000) == ((m_cmi07_ctrl & 0x30) << 10)) { - space->install_ram(address, address + PAGE_SIZE, &m_cmi07_ram[(page * PAGE_SIZE) & 0x3fff]); + space->install_ram(address, address + PAGE_SIZE - 1, &m_cmi07_ram[(page * PAGE_SIZE) & 0x3fff]); continue; } } @@ -1336,7 +1336,7 @@ void cmi_state::update_address_space(int cpunum, UINT8 mapinfo) continue; /* Now map the RAM page */ - space->install_ram(address, address + PAGE_SIZE, &m_q256_ram[i][(page_info & 0x7f) * PAGE_SIZE]); + space->install_ram(address, address + PAGE_SIZE - 1, &m_q256_ram[i][(page_info & 0x7f) * PAGE_SIZE]); } if (vram_en) @@ -1460,20 +1460,15 @@ void cmi_state::write_fdc_ctrl(UINT8 data) int drive = data & 1; int side = BIT(data, 5) ? 1 : 0; - m_floppy = nullptr; - - if (drive) - { - m_floppy = m_floppy_1->get_device(); - } - else + switch (drive) { - m_floppy = m_floppy_0->get_device(); + case 0: m_wd1791->set_floppy(m_floppy0->get_device()); break; + case 1: m_wd1791->set_floppy(m_floppy1->get_device()); break; } - if (m_floppy) - m_floppy->ss_w(side); - m_wd1791->set_floppy(m_floppy); + if (m_floppy0->get_device()) m_floppy0->get_device()->ss_w(side); + if (m_floppy1->get_device()) m_floppy1->get_device()->ss_w(side); + m_wd1791->dden_w(BIT(data, 7) ? true : false); m_fdc_ctrl = data; @@ -2526,14 +2521,10 @@ void cmi_state::machine_start() /* Allocate 1kB memory mapping RAM */ m_map_ram[0] = std::make_unique<UINT8[]>(0x400); m_map_ram[1] = std::make_unique<UINT8[]>(0x400); - m_map_ram[2] = std::make_unique<UINT8[]>(0x400); - m_map_ram[3] = std::make_unique<UINT8[]>(0x400); /* Allocate 256kB for each Q256 RAM card */ m_q256_ram[0] = std::make_unique<UINT8[]>(0x40000); m_q256_ram[1] = std::make_unique<UINT8[]>(0x40000); - m_q256_ram[2] = std::make_unique<UINT8[]>(0x40000); - m_q256_ram[3] = std::make_unique<UINT8[]>(0x40000); /* Allocate 16kB video RAM */ m_video_ram = std::make_unique<UINT8[]>(0x4000); @@ -2697,7 +2688,7 @@ static MACHINE_CONFIG_START( cmi2x, cmi_state ) MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(cmi_state, wd1791_irq)) MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(cmi_state, wd1791_drq)) MCFG_FLOPPY_DRIVE_ADD("wd1791:0", cmi2x_floppies, "8dsdd", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("wd1791:1", cmi2x_floppies, nullptr, floppy_image_device::default_floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("wd1791:1", cmi2x_floppies, "8dsdd", floppy_image_device::default_floppy_formats) // Channel cards MCFG_CMI01A_ADD("cmi01a_0", 0) diff --git a/src/mame/drivers/dooyong.cpp b/src/mame/drivers/dooyong.cpp index dae980b27f9..6839b57452a 100644 --- a/src/mame/drivers/dooyong.cpp +++ b/src/mame/drivers/dooyong.cpp @@ -40,8 +40,6 @@ Primella: - does the game really support cocktail mode as service mode suggests? - are buttons 2 and 3 used as service mode suggests? Pop Bingo -- appears to combine 2 4bpp layers to make 1 8bpp layer, for now we just - treat it as 1 8bpp layer and ignore the 2nd set of registers. - some unknown reads / writes 18.02.2011. Tomasz Slanina @@ -114,8 +112,8 @@ MACHINE_RESET_MEMBER(dooyong_z80_ym2203_state, sound_ym2203) static ADDRESS_MAP_START( lastday_map, AS_PROGRAM, 8, dooyong_z80_ym2203_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") - AM_RANGE(0xc000, 0xc007) AM_WRITE(bgscroll_w) - AM_RANGE(0xc008, 0xc00f) AM_WRITE(fgscroll_w) + AM_RANGE(0xc000, 0xc007) AM_DEVWRITE("bg", dooyong_rom_tilemap_device, ctrl_w) + AM_RANGE(0xc008, 0xc00f) AM_DEVWRITE("fg", dooyong_rom_tilemap_device, ctrl_w) AM_RANGE(0xc010, 0xc010) AM_READ_PORT("SYSTEM") AM_RANGE(0xc010, 0xc010) AM_WRITE(lastday_ctrl_w) /* coin counter, flip screen */ AM_RANGE(0xc011, 0xc011) AM_READ_PORT("P1") @@ -143,8 +141,8 @@ static ADDRESS_MAP_START( pollux_map, AS_PROGRAM, 8, dooyong_z80_ym2203_state ) AM_RANGE(0xf004, 0xf004) AM_READ_PORT("SYSTEM") AM_RANGE(0xf008, 0xf008) AM_WRITE(pollux_ctrl_w) /* coin counter, flip screen */ AM_RANGE(0xf010, 0xf010) AM_DEVWRITE("soundlatch", generic_latch_8_device, write) - AM_RANGE(0xf018, 0xf01f) AM_WRITE(bgscroll_w) - AM_RANGE(0xf020, 0xf027) AM_WRITE(fgscroll_w) + AM_RANGE(0xf018, 0xf01f) AM_DEVWRITE("bg", dooyong_rom_tilemap_device, ctrl_w) + AM_RANGE(0xf020, 0xf027) AM_DEVWRITE("fg", dooyong_rom_tilemap_device, ctrl_w) AM_RANGE(0xf800, 0xffff) AM_READWRITE(paletteram_flytiger_r, paletteram_flytiger_w) ADDRESS_MAP_END @@ -162,8 +160,8 @@ static ADDRESS_MAP_START( gulfstrm_map, AS_PROGRAM, 8, dooyong_z80_ym2203_state AM_RANGE(0xf004, 0xf004) AM_READ_PORT("SYSTEM") AM_RANGE(0xf008, 0xf008) AM_WRITE(pollux_ctrl_w) /* coin counter, flip screen */ AM_RANGE(0xf010, 0xf010) AM_DEVWRITE("soundlatch", generic_latch_8_device, write) - AM_RANGE(0xf018, 0xf01f) AM_WRITE(bgscroll_w) - AM_RANGE(0xf020, 0xf027) AM_WRITE(fgscroll_w) + AM_RANGE(0xf018, 0xf01f) AM_DEVWRITE("bg", dooyong_rom_tilemap_device, ctrl_w) + AM_RANGE(0xf020, 0xf027) AM_DEVWRITE("fg", dooyong_rom_tilemap_device, ctrl_w) AM_RANGE(0xf800, 0xffff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") ADDRESS_MAP_END @@ -178,9 +176,9 @@ static ADDRESS_MAP_START( bluehawk_map, AS_PROGRAM, 8, dooyong_z80_state ) AM_RANGE(0xc004, 0xc004) AM_READ_PORT("SYSTEM") AM_RANGE(0xc008, 0xc008) AM_WRITE(bankswitch_w) AM_RANGE(0xc010, 0xc010) AM_DEVWRITE("soundlatch", generic_latch_8_device, write) - AM_RANGE(0xc018, 0xc01f) AM_WRITE(fg2scroll_w) - AM_RANGE(0xc040, 0xc047) AM_WRITE(bgscroll_w) - AM_RANGE(0xc048, 0xc04f) AM_WRITE(fgscroll_w) + AM_RANGE(0xc018, 0xc01f) AM_DEVWRITE("fg2", dooyong_rom_tilemap_device, ctrl_w) + AM_RANGE(0xc040, 0xc047) AM_DEVWRITE("bg", dooyong_rom_tilemap_device, ctrl_w) + AM_RANGE(0xc048, 0xc04f) AM_DEVWRITE("fg", dooyong_rom_tilemap_device, ctrl_w) AM_RANGE(0xc800, 0xcfff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0xd000, 0xdfff) AM_RAM_WRITE(txvideoram_w) AM_SHARE("txvideoram") AM_RANGE(0xe000, 0xefff) AM_RAM AM_SHARE("spriteram") @@ -200,8 +198,8 @@ static ADDRESS_MAP_START( flytiger_map, AS_PROGRAM, 8, dooyong_z80_state ) AM_RANGE(0xe008, 0xe008) AM_READ_PORT("DSWB") AM_RANGE(0xe010, 0xe010) AM_WRITE(flytiger_ctrl_w) /* coin counter, flip screen */ AM_RANGE(0xe020, 0xe020) AM_DEVWRITE("soundlatch", generic_latch_8_device, write) - AM_RANGE(0xe030, 0xe037) AM_WRITE(bgscroll_w) - AM_RANGE(0xe040, 0xe047) AM_WRITE(fgscroll_w) + AM_RANGE(0xe030, 0xe037) AM_DEVWRITE("bg", dooyong_rom_tilemap_device, ctrl_w) + AM_RANGE(0xe040, 0xe047) AM_DEVWRITE("fg", dooyong_rom_tilemap_device, ctrl_w) AM_RANGE(0xe800, 0xefff) AM_READWRITE(paletteram_flytiger_r, paletteram_flytiger_w) AM_RANGE(0xf000, 0xffff) AM_RAM_WRITE(txvideoram_w) AM_SHARE("txvideoram") ADDRESS_MAP_END @@ -220,8 +218,8 @@ static ADDRESS_MAP_START( primella_map, AS_PROGRAM, 8, dooyong_z80_state ) AM_RANGE(0xf820, 0xf820) AM_READ_PORT("P1") AM_RANGE(0xf830, 0xf830) AM_READ_PORT("P2") AM_RANGE(0xf840, 0xf840) AM_READ_PORT("SYSTEM") - AM_RANGE(0xfc00, 0xfc07) AM_WRITE(bgscroll_w) - AM_RANGE(0xfc08, 0xfc0f) AM_WRITE(fgscroll_w) + AM_RANGE(0xfc00, 0xfc07) AM_DEVWRITE("bg", dooyong_rom_tilemap_device, ctrl_w) + AM_RANGE(0xfc08, 0xfc0f) AM_DEVWRITE("fg", dooyong_rom_tilemap_device, ctrl_w) ADDRESS_MAP_END static ADDRESS_MAP_START( rshark_map, AS_PROGRAM, 16, dooyong_68k_state ) @@ -233,13 +231,13 @@ static ADDRESS_MAP_START( rshark_map, AS_PROGRAM, 16, dooyong_68k_state ) AM_RANGE(0x0c0002, 0x0c0003) AM_READ_PORT("DSW") AM_RANGE(0x0c0004, 0x0c0005) AM_READ_PORT("P1_P2") AM_RANGE(0x0c0006, 0x0c0007) AM_READ_PORT("SYSTEM") - AM_RANGE(0x0c4000, 0x0c400f) AM_WRITE8(bgscroll_w, 0x00ff) - AM_RANGE(0x0c4010, 0x0c401f) AM_WRITE8(bg2scroll_w, 0x00ff) + AM_RANGE(0x0c4000, 0x0c400f) AM_DEVWRITE8("bg", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) + AM_RANGE(0x0c4010, 0x0c401f) AM_DEVWRITE8("bg2", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) AM_RANGE(0x0c8000, 0x0c8fff) AM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x0c0012, 0x0c0013) AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff) AM_RANGE(0x0c0014, 0x0c0015) AM_WRITE(ctrl_w) /* flip screen + unknown stuff */ - AM_RANGE(0x0cc000, 0x0cc00f) AM_WRITE8(fgscroll_w, 0x00ff) - AM_RANGE(0x0cc010, 0x0cc01f) AM_WRITE8(fg2scroll_w, 0x00ff) + AM_RANGE(0x0cc000, 0x0cc00f) AM_DEVWRITE8("fg", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) + AM_RANGE(0x0cc010, 0x0cc01f) AM_DEVWRITE8("fg2", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) ADDRESS_MAP_END static ADDRESS_MAP_START( superx_map, AS_PROGRAM, 16, dooyong_68k_state ) @@ -251,13 +249,13 @@ static ADDRESS_MAP_START( superx_map, AS_PROGRAM, 16, dooyong_68k_state ) AM_RANGE(0x080002, 0x080003) AM_READ_PORT("DSW") AM_RANGE(0x080004, 0x080005) AM_READ_PORT("P1_P2") AM_RANGE(0x080006, 0x080007) AM_READ_PORT("SYSTEM") - AM_RANGE(0x084000, 0x08400f) AM_WRITE8(bgscroll_w, 0x00ff) - AM_RANGE(0x084010, 0x08401f) AM_WRITE8(bg2scroll_w, 0x00ff) + AM_RANGE(0x084000, 0x08400f) AM_DEVWRITE8("bg", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) + AM_RANGE(0x084010, 0x08401f) AM_DEVWRITE8("bg2", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) AM_RANGE(0x088000, 0x088fff) AM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x080012, 0x080013) AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff) AM_RANGE(0x080014, 0x080015) AM_WRITE(ctrl_w) /* flip screen + unknown stuff */ - AM_RANGE(0x08c000, 0x08c00f) AM_WRITE8(fgscroll_w, 0x00ff) - AM_RANGE(0x08c010, 0x08c01f) AM_WRITE8(fg2scroll_w, 0x00ff) + AM_RANGE(0x08c000, 0x08c00f) AM_DEVWRITE8("fg", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) + AM_RANGE(0x08c010, 0x08c01f) AM_DEVWRITE8("fg2", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) ADDRESS_MAP_END static ADDRESS_MAP_START( popbingo_map, AS_PROGRAM, 16, dooyong_68k_state ) @@ -272,11 +270,11 @@ static ADDRESS_MAP_START( popbingo_map, AS_PROGRAM, 16, dooyong_68k_state ) AM_RANGE(0x0c0012, 0x0c0013) AM_DEVWRITE8("soundlatch", generic_latch_8_device, write, 0x00ff) AM_RANGE(0x0c0014, 0x0c0015) AM_WRITE(ctrl_w) AM_RANGE(0x0c0018, 0x0c001b) AM_WRITENOP // ? - AM_RANGE(0x0c4000, 0x0c400f) AM_WRITE8(bgscroll_w, 0x00ff) - AM_RANGE(0x0c4010, 0x0c401f) AM_WRITE8(bg2scroll_w, 0x00ff) // not used atm + AM_RANGE(0x0c4000, 0x0c400f) AM_DEVWRITE8("bg", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) + AM_RANGE(0x0c4010, 0x0c401f) AM_DEVWRITE8("bg2", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) AM_RANGE(0x0c8000, 0x0c8fff) AM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") - AM_RANGE(0x0cc000, 0x0cc00f) AM_WRITE8(fgscroll_w, 0x00ff) // not used atm - AM_RANGE(0x0cc010, 0x0cc01f) AM_WRITE8(fg2scroll_w, 0x00ff) // not used atm + //AM_RANGE(0x08c000, 0x08c00f) AM_DEVWRITE8("fg", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) apparently not present + //AM_RANGE(0x08c010, 0x08c01f) AM_DEVWRITE8("fg2", dooyong_rom_tilemap_device, ctrl_w, 0x00ff) apparently not present AM_RANGE(0x0dc000, 0x0dc01f) AM_RAM // registers of some kind? ADDRESS_MAP_END @@ -470,18 +468,6 @@ static INPUT_PORTS_START( dooyongm68_generic ) 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( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) -*/ - INPUT_PORTS_END /*************************************************************************** @@ -546,7 +532,7 @@ static INPUT_PORTS_START( pollux ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // palette cycle effects need this to work (read near code that also writes to the output ports) - currently can't see them due to wrong palette selection tho + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") // palette cycle effects need this to work PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -711,24 +697,6 @@ static const gfx_layout rshark_spritelayout = 128*8 }; -static const gfx_layout popbingo_tilelayout = -{ - 32,32, - RGN_FRAC(1,2), - 8, - { 0*4, 1*4, 2*4, 3*4, RGN_FRAC(1,2)+0*4,RGN_FRAC(1,2)+1*4,RGN_FRAC(1,2)+2*4,RGN_FRAC(1,2)+3*4 }, - - { 0, 1, 2, 3, 16+0, 16+1, 16+2, 16+3, - 32*32+0, 32*32+1, 32*32+2, 32*32+3, 32*32+16+0, 32*32+16+1, 32*32+16+2, 32*32+16+3, - 2*32*32+0, 2*32*32+1, 2*32*32+2, 2*32*32+3, 2*32*32+16+0, 2*32*32+16+1, 2*32*32+16+2, 2*32*32+16+3, - 3*32*32+0, 3*32*32+1, 3*32*32+2, 3*32*32+3, 3*32*32+16+0, 3*32*32+16+1, 3*32*32+16+2, 3*32*32+16+3 }, - { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, - 8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32, - 16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32, - 24*32, 25*32, 26*32, 27*32, 28*32, 29*32, 30*32, 31*32 }, - 512*8 -}; - static GFXDECODE_START( lastday ) GFXDECODE_ENTRY( "gfx1", 0, lastday_charlayout, 0, 16+64 ) GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 256, 16+64 ) @@ -769,8 +737,10 @@ GFXDECODE_END static GFXDECODE_START( popbingo ) /* no chars */ - GFXDECODE_ENTRY( "gfx1", 0, rshark_spritelayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0, popbingo_tilelayout, 256, 1 ) + GFXDECODE_ENTRY( "gfx1", 0, rshark_spritelayout, 0, 16 ) + GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 1 ) + GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 0, 1 ) + GFXDECODE_END READ8_MEMBER(dooyong_z80_ym2203_state::unk_r) @@ -870,6 +840,9 @@ static MACHINE_CONFIG_START( lastday, dooyong_z80_ym2203_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", lastday) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) + MCFG_DOOYONG_ROM_TILEMAP_ADD("bg", "gfxdecode", 2, "gfx5", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_ADD("fg", "gfxdecode", 3, "gfx6", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15) MCFG_VIDEO_START_OVERRIDE(dooyong_z80_ym2203_state, lastday) @@ -918,6 +891,9 @@ static MACHINE_CONFIG_START( gulfstrm, dooyong_z80_ym2203_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", lastday) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + MCFG_DOOYONG_ROM_TILEMAP_ADD("bg", "gfxdecode", 2, "gfx5", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_ADD("fg", "gfxdecode", 3, "gfx6", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15) MCFG_VIDEO_START_OVERRIDE(dooyong_z80_ym2203_state, gulfstrm) @@ -953,6 +929,9 @@ static MACHINE_CONFIG_START( pollux, dooyong_z80_ym2203_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", lastday) MCFG_PALETTE_ADD("palette", 1024*2) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + MCFG_DOOYONG_ROM_TILEMAP_ADD("bg", "gfxdecode", 2, "gfx5", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_ADD("fg", "gfxdecode", 3, "gfx6", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15) MCFG_VIDEO_START_OVERRIDE(dooyong_z80_ym2203_state, pollux) @@ -987,6 +966,11 @@ static MACHINE_CONFIG_START( bluehawk, dooyong_z80_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", bluehawk) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + MCFG_DOOYONG_ROM_TILEMAP_ADD("bg", "gfxdecode", 2, "gfx3", 0x3c000) + MCFG_DOOYONG_ROM_TILEMAP_ADD("fg", "gfxdecode", 3, "gfx4", 0x3c000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15) + MCFG_DOOYONG_ROM_TILEMAP_ADD("fg2", "gfxdecode", 4, "gfx5", 0x1c000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15) MCFG_VIDEO_START_OVERRIDE(dooyong_z80_state, bluehawk) @@ -1021,6 +1005,10 @@ static MACHINE_CONFIG_START( flytiger, dooyong_z80_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", flytiger) MCFG_PALETTE_ADD("palette", 1024*2) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + MCFG_DOOYONG_ROM_TILEMAP_ADD("bg", "gfxdecode", 2, "gfx3", 0x3c000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15) + MCFG_DOOYONG_ROM_TILEMAP_ADD("fg", "gfxdecode", 3, "gfx4", 0x3c000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15) MCFG_VIDEO_START_OVERRIDE(dooyong_z80_state, flytiger) @@ -1052,6 +1040,11 @@ static MACHINE_CONFIG_START( primella, dooyong_z80_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", primella) MCFG_PALETTE_ADD("palette", 1024) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + MCFG_DOOYONG_ROM_TILEMAP_ADD("bg", "gfxdecode", 1, "gfx2", -0x4000) + MCFG_DOOYONG_ROM_TILEMAP_PRIMELLA_CODE_BITS(10) + MCFG_DOOYONG_ROM_TILEMAP_ADD("fg", "gfxdecode", 2, "gfx3", -0x4000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15) + MCFG_DOOYONG_ROM_TILEMAP_PRIMELLA_CODE_BITS(10) MCFG_VIDEO_START_OVERRIDE(dooyong_z80_state, primella) @@ -1097,6 +1090,13 @@ static MACHINE_CONFIG_START( rshark, dooyong_68k_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", rshark) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + MCFG_RSHARK_ROM_TILEMAP_ADD("bg", "gfxdecode", 4, "gfx5", 0x00000, "gfx6", 0x60000) + MCFG_RSHARK_ROM_TILEMAP_ADD("bg2", "gfxdecode", 3, "gfx4", 0x00000, "gfx6", 0x40000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15); + MCFG_RSHARK_ROM_TILEMAP_ADD("fg", "gfxdecode", 2, "gfx3", 0x00000, "gfx6", 0x20000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15); + MCFG_RSHARK_ROM_TILEMAP_ADD("fg2", "gfxdecode", 1, "gfx2", 0x00000, "gfx6", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15); MCFG_VIDEO_START_OVERRIDE(dooyong_68k_state, rshark) @@ -1129,6 +1129,13 @@ static MACHINE_CONFIG_START( superx, dooyong_68k_state ) // dif mem map MCFG_GFXDECODE_ADD("gfxdecode", "palette", rshark) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + MCFG_RSHARK_ROM_TILEMAP_ADD("bg", "gfxdecode", 4, "gfx5", 0x00000, "gfx6", 0x60000) + MCFG_RSHARK_ROM_TILEMAP_ADD("bg2", "gfxdecode", 3, "gfx4", 0x00000, "gfx6", 0x40000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15); + MCFG_RSHARK_ROM_TILEMAP_ADD("fg", "gfxdecode", 2, "gfx3", 0x00000, "gfx6", 0x20000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15); + MCFG_RSHARK_ROM_TILEMAP_ADD("fg2", "gfxdecode", 1, "gfx2", 0x00000, "gfx6", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(15); MCFG_VIDEO_START_OVERRIDE(dooyong_68k_state, rshark) @@ -1161,6 +1168,10 @@ static MACHINE_CONFIG_START( popbingo, dooyong_68k_state ) MCFG_GFXDECODE_ADD("gfxdecode", "palette", popbingo) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) + MCFG_DOOYONG_ROM_TILEMAP_ADD("bg", "gfxdecode", 1, "gfx2", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_PRIMELLA_CODE_BITS(11) + MCFG_DOOYONG_ROM_TILEMAP_ADD("bg2", "gfxdecode", 2, "gfx3", 0x00000) + MCFG_DOOYONG_ROM_TILEMAP_PRIMELLA_CODE_BITS(11) MCFG_VIDEO_START_OVERRIDE(dooyong_68k_state, popbingo) @@ -1187,27 +1198,28 @@ ROM_START( lastday ) /* 90030003 PCB */ ROM_LOAD( "2.j4", 0x0000, 0x8000, CRC(83eb572c) SHA1(e915afd55d505bce202206c9ecfa89bad561ef6c) ) /* empty */ ROM_CONTINUE( 0x0000, 0x8000 ) - ROM_REGION( 0x40000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x40000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "16.d14", 0x00000, 0x20000, CRC(df503504) SHA1(daa58a7bc24415b5f59b7c7cc918bc85de9702a3) ) ROM_LOAD16_BYTE( "15.a14", 0x00001, 0x20000, CRC(cd990442) SHA1(891b2163db23ab0bb40cbadce6e06fc067d0532f) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_BYTE( "6.s9", 0x00000, 0x20000, CRC(1054361d) SHA1(52566786ca8177404be8b66fd7de94ac25fc49ea) ) ROM_LOAD16_BYTE( "9.s11", 0x00001, 0x20000, CRC(6952ef4d) SHA1(b4e5ec02e97df213fe0bd4cd8a2ca77d7ecf8ad5) ) ROM_LOAD16_BYTE( "7.u9", 0x40000, 0x20000, CRC(6e57a888) SHA1(8efe876ea3c788b83e8291f7fc6f55b90de158c8) ) ROM_LOAD16_BYTE( "10.u11", 0x40001, 0x20000, CRC(a5548dca) SHA1(9914e01c1739c3bfd868a01e53c9030726ced4ea) ) - ROM_REGION( 0x40000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x40000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "12.s13", 0x00000, 0x20000, CRC(992bc4af) SHA1(94570ebd1ee6acf1871cf914907acd12dca4026e) ) ROM_LOAD16_BYTE( "14.s14", 0x00001, 0x20000, CRC(a79abc85) SHA1(3e63dad11db9b7420331403a1d551d8c041c4cc2) ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* background tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* background tilemaps */ ROM_LOAD16_BYTE( "5.r9", 0x00000, 0x10000, CRC(4789bae8) SHA1(6ffecc16eb8c9c783b02c4ef68cb5098b01fafef) ) ROM_LOAD16_BYTE( "8.r11", 0x00001, 0x10000, CRC(92402b9a) SHA1(2ca8078d2687afbe7b6fc5412de16c6fbc11a650) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "11.r13", 0x00000, 0x10000, CRC(04b961de) SHA1(7a94c9d0800d79048660cf3758708a346ead33f9) ) - ROM_LOAD16_BYTE( "13.r14", 0x00001, 0x10000, CRC(6bdbd887) SHA1(a54f26f9ddd72b8b8f7a030610c1c4a5f94a3358) )ROM_END + ROM_LOAD16_BYTE( "13.r14", 0x00001, 0x10000, CRC(6bdbd887) SHA1(a54f26f9ddd72b8b8f7a030610c1c4a5f94a3358) ) +ROM_END ROM_START( lastdaya ) /* 90030003 PCB */ ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + 128k for banks */ @@ -1222,25 +1234,25 @@ ROM_START( lastdaya ) /* 90030003 PCB */ ROM_LOAD( "2.j4", 0x0000, 0x8000, CRC(83eb572c) SHA1(e915afd55d505bce202206c9ecfa89bad561ef6c) ) /* empty */ ROM_CONTINUE( 0x0000, 0x8000 ) - ROM_REGION( 0x40000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x40000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "16.d14", 0x00000, 0x20000, CRC(df503504) SHA1(daa58a7bc24415b5f59b7c7cc918bc85de9702a3) ) ROM_LOAD16_BYTE( "15.a14", 0x00001, 0x20000, CRC(cd990442) SHA1(891b2163db23ab0bb40cbadce6e06fc067d0532f) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_BYTE( "e6.s9", 0x00000, 0x20000, CRC(7623c443) SHA1(abfed648a8cc438dbb7de9c23a663082667ca366) ) ROM_LOAD16_BYTE( "e9.s11", 0x00001, 0x20000, CRC(717f6a0e) SHA1(0b2d98fa5b8734210df18bce7725972fd42a6e4a) ) ROM_LOAD16_BYTE( "7.u9", 0x40000, 0x20000, CRC(6e57a888) SHA1(8efe876ea3c788b83e8291f7fc6f55b90de158c8) ) ROM_LOAD16_BYTE( "10.u11", 0x40001, 0x20000, CRC(a5548dca) SHA1(9914e01c1739c3bfd868a01e53c9030726ced4ea) ) - ROM_REGION( 0x40000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x40000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "12.s13", 0x00000, 0x20000, CRC(992bc4af) SHA1(94570ebd1ee6acf1871cf914907acd12dca4026e) ) ROM_LOAD16_BYTE( "14.s14", 0x00001, 0x20000, CRC(a79abc85) SHA1(3e63dad11db9b7420331403a1d551d8c041c4cc2) ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* bg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* bg tilemaps */ ROM_LOAD16_BYTE( "e5.r9", 0x00000, 0x10000, CRC(5f801410) SHA1(382c1bcd69a6a5c245d2ba7603bc273fba840c8f) ) ROM_LOAD16_BYTE( "e8.r11", 0x00001, 0x10000, CRC(a7b8250b) SHA1(4bd79c09dacf69e1993353d7fcc7746d1324e9b0) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "11.r13", 0x00000, 0x10000, CRC(04b961de) SHA1(7a94c9d0800d79048660cf3758708a346ead33f9) ) ROM_LOAD16_BYTE( "13.r14", 0x00001, 0x10000, CRC(6bdbd887) SHA1(a54f26f9ddd72b8b8f7a030610c1c4a5f94a3358) ) ROM_END @@ -1258,25 +1270,25 @@ ROM_START( ddaydoo ) /* 90030003 PCB */ ROM_LOAD( "2.j4", 0x0000, 0x8000, CRC(83eb572c) SHA1(e915afd55d505bce202206c9ecfa89bad561ef6c) ) /* empty */ ROM_CONTINUE( 0x0000, 0x8000 ) - ROM_REGION( 0x40000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x40000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "16.d14", 0x00000, 0x20000, CRC(df503504) SHA1(daa58a7bc24415b5f59b7c7cc918bc85de9702a3) ) ROM_LOAD16_BYTE( "15.a14", 0x00001, 0x20000, CRC(cd990442) SHA1(891b2163db23ab0bb40cbadce6e06fc067d0532f) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_BYTE( "6.s9", 0x00000, 0x20000, CRC(1054361d) SHA1(52566786ca8177404be8b66fd7de94ac25fc49ea) ) ROM_LOAD16_BYTE( "9.s11", 0x00001, 0x20000, CRC(6952ef4d) SHA1(b4e5ec02e97df213fe0bd4cd8a2ca77d7ecf8ad5) ) ROM_LOAD16_BYTE( "7.u9", 0x40000, 0x20000, CRC(6e57a888) SHA1(8efe876ea3c788b83e8291f7fc6f55b90de158c8) ) ROM_LOAD16_BYTE( "10.u11", 0x40001, 0x20000, CRC(a5548dca) SHA1(9914e01c1739c3bfd868a01e53c9030726ced4ea) ) - ROM_REGION( 0x40000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x40000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "12.s13", 0x00000, 0x20000, CRC(992bc4af) SHA1(94570ebd1ee6acf1871cf914907acd12dca4026e) ) ROM_LOAD16_BYTE( "14.s14", 0x00001, 0x20000, CRC(a79abc85) SHA1(3e63dad11db9b7420331403a1d551d8c041c4cc2) ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* background tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* background tilemaps */ ROM_LOAD16_BYTE( "5.r9", 0x00000, 0x10000, CRC(4789bae8) SHA1(6ffecc16eb8c9c783b02c4ef68cb5098b01fafef) ) ROM_LOAD16_BYTE( "8.r11", 0x00001, 0x10000, CRC(92402b9a) SHA1(2ca8078d2687afbe7b6fc5412de16c6fbc11a650) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "11.r13", 0x00000, 0x10000, CRC(04b961de) SHA1(7a94c9d0800d79048660cf3758708a346ead33f9) ) ROM_LOAD16_BYTE( "13.r14", 0x00001, 0x10000, CRC(6bdbd887) SHA1(a54f26f9ddd72b8b8f7a030610c1c4a5f94a3358) ) ROM_END @@ -1292,27 +1304,27 @@ ROM_START( gulfstrm ) ROM_LOAD( "2.s4", 0x0000, 0x8000, CRC(c2d65a25) SHA1(a198b42c0737b253aca5bab6fb58ab561ccc1d5c) ) /* empty */ ROM_CONTINUE( 0x0000, 0x8000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "14.b1", 0x00000, 0x20000, CRC(67bdf73d) SHA1(3e357448b6f255fdec731f143afa3d3149523ed2) ) ROM_LOAD16_BYTE( "16.c1", 0x00001, 0x20000, CRC(7770a76f) SHA1(4f9f5245f59008b26ed60e636285ea85271744e7) ) ROM_LOAD16_BYTE( "15.b1", 0x40000, 0x20000, CRC(84803f7e) SHA1(74b694c0d20c5b016b9d7258b0296229972151d5) ) ROM_LOAD16_BYTE( "17.e1", 0x40001, 0x20000, CRC(94706500) SHA1(8f4a6f7ce20b1b50577271601c2c2632b5a2292c) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_BYTE( "4.d8", 0x00000, 0x20000, CRC(858fdbb6) SHA1(4c317ab6069a8509287d3df88cf4272f512a40a3) ) ROM_LOAD16_BYTE( "5.b9", 0x00001, 0x20000, CRC(c0a552e8) SHA1(31dcb14eb8815c609b0bf4d5f1ea17b26ab18aec) ) ROM_LOAD16_BYTE( "6.d8", 0x40000, 0x20000, CRC(20eedda3) SHA1(8c8b1284e07f5380037f8431f2649aa99fd47542) ) ROM_LOAD16_BYTE( "7.d9", 0x40001, 0x20000, CRC(294f8c40) SHA1(b7afb87510ab52682151ff2b13029427487589ec) ) - ROM_REGION( 0x40000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x40000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "12.r8", 0x00000, 0x20000, CRC(ec3ad3e7) SHA1(276da309b788091cd6e5faada2ff9e5b0df2caea) ) ROM_LOAD16_BYTE( "13.r9", 0x00001, 0x20000, CRC(c64090cb) SHA1(5dab576e5f454c62c7826d477b3f699e979753ad) ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* background tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* background tilemaps */ ROM_LOAD16_BYTE( "8.e8", 0x00000, 0x10000, CRC(8d7f4693) SHA1(a7c8573d9e54c8230decc3e88f76ae729d77b096) ) ROM_LOAD16_BYTE( "9.e9", 0x00001, 0x10000, CRC(34d440c4) SHA1(74b0e15e75f62106177234b6ea54a5d312628802) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "10.n8", 0x00000, 0x10000, CRC(b4f15bf4) SHA1(cb203390c3f917f213807a23c442e43bc6bcfc67) ) ROM_LOAD16_BYTE( "11.n9", 0x00001, 0x10000, CRC(7dfe4a9c) SHA1(40982b5b266e4a928544ab5ec330080935588c57) ) ROM_END @@ -1328,27 +1340,27 @@ ROM_START( gulfstrma ) ROM_LOAD( "2.s4", 0x0000, 0x8000, CRC(c2d65a25) SHA1(a198b42c0737b253aca5bab6fb58ab561ccc1d5c) ) /* empty */ ROM_CONTINUE( 0x0000, 0x8000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "14.b1", 0x00000, 0x20000, CRC(67bdf73d) SHA1(3e357448b6f255fdec731f143afa3d3149523ed2) ) ROM_LOAD16_BYTE( "16.c1", 0x00001, 0x20000, CRC(7770a76f) SHA1(4f9f5245f59008b26ed60e636285ea85271744e7) ) ROM_LOAD16_BYTE( "15.b1", 0x40000, 0x20000, CRC(84803f7e) SHA1(74b694c0d20c5b016b9d7258b0296229972151d5) ) ROM_LOAD16_BYTE( "17.e1", 0x40001, 0x20000, CRC(94706500) SHA1(8f4a6f7ce20b1b50577271601c2c2632b5a2292c) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_BYTE( "4.d8", 0x00000, 0x20000, CRC(858fdbb6) SHA1(4c317ab6069a8509287d3df88cf4272f512a40a3) ) ROM_LOAD16_BYTE( "5.b9", 0x00001, 0x20000, CRC(c0a552e8) SHA1(31dcb14eb8815c609b0bf4d5f1ea17b26ab18aec) ) ROM_LOAD16_BYTE( "6.d8", 0x40000, 0x20000, CRC(20eedda3) SHA1(8c8b1284e07f5380037f8431f2649aa99fd47542) ) ROM_LOAD16_BYTE( "7.d9", 0x40001, 0x20000, CRC(294f8c40) SHA1(b7afb87510ab52682151ff2b13029427487589ec) ) - ROM_REGION( 0x40000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x40000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "12.bin", 0x00000, 0x20000, CRC(3e3d3b57) SHA1(398a6cac7144ba7bacaa36c593bcb4b3c051eb0f) ) ROM_LOAD16_BYTE( "13.bin", 0x00001, 0x20000, CRC(66fcce80) SHA1(6ab2b7cd49447d374cde40b98db0a6209dcad461) ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* background tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* background tilemaps */ ROM_LOAD16_BYTE( "8.e8", 0x00000, 0x10000, CRC(8d7f4693) SHA1(a7c8573d9e54c8230decc3e88f76ae729d77b096) ) ROM_LOAD16_BYTE( "9.e9", 0x00001, 0x10000, CRC(34d440c4) SHA1(74b0e15e75f62106177234b6ea54a5d312628802) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "10.bin", 0x00000, 0x10000, CRC(08149140) SHA1(ff0094883ca0fc81bae991d6ea62d0064d6f7c47) ) ROM_LOAD16_BYTE( "11.bin", 0x00001, 0x10000, CRC(2ed7545b) SHA1(6a70743bbb03ef694310f2b5531f384209db62a1) ) ROM_END @@ -1364,27 +1376,27 @@ ROM_START( gulfstrmb ) ROM_LOAD( "2.s4", 0x0000, 0x8000, CRC(c2d65a25) SHA1(a198b42c0737b253aca5bab6fb58ab561ccc1d5c) ) /* empty */ ROM_CONTINUE( 0x0000, 0x8000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "14.b1", 0x00000, 0x20000, CRC(67bdf73d) SHA1(3e357448b6f255fdec731f143afa3d3149523ed2) ) ROM_LOAD16_BYTE( "16.c1", 0x00001, 0x20000, CRC(7770a76f) SHA1(4f9f5245f59008b26ed60e636285ea85271744e7) ) ROM_LOAD16_BYTE( "15.b1", 0x40000, 0x20000, CRC(84803f7e) SHA1(74b694c0d20c5b016b9d7258b0296229972151d5) ) ROM_LOAD16_BYTE( "17.e1", 0x40001, 0x20000, CRC(94706500) SHA1(8f4a6f7ce20b1b50577271601c2c2632b5a2292c) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_BYTE( "4.d8", 0x00000, 0x20000, CRC(858fdbb6) SHA1(4c317ab6069a8509287d3df88cf4272f512a40a3) ) ROM_LOAD16_BYTE( "5.b9", 0x00001, 0x20000, CRC(c0a552e8) SHA1(31dcb14eb8815c609b0bf4d5f1ea17b26ab18aec) ) ROM_LOAD16_BYTE( "6.d8", 0x40000, 0x20000, CRC(20eedda3) SHA1(8c8b1284e07f5380037f8431f2649aa99fd47542) ) ROM_LOAD16_BYTE( "7.d9", 0x40001, 0x20000, CRC(294f8c40) SHA1(b7afb87510ab52682151ff2b13029427487589ec) ) - ROM_REGION( 0x40000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x40000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "12.bin", 0x00000, 0x20000, CRC(3e3d3b57) SHA1(398a6cac7144ba7bacaa36c593bcb4b3c051eb0f) ) ROM_LOAD16_BYTE( "13.bin", 0x00001, 0x20000, CRC(66fcce80) SHA1(6ab2b7cd49447d374cde40b98db0a6209dcad461) ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* background tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* background tilemaps */ ROM_LOAD16_BYTE( "8.e8", 0x00000, 0x10000, CRC(8d7f4693) SHA1(a7c8573d9e54c8230decc3e88f76ae729d77b096) ) ROM_LOAD16_BYTE( "9.e9", 0x00001, 0x10000, CRC(34d440c4) SHA1(74b0e15e75f62106177234b6ea54a5d312628802) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "10.bin", 0x00000, 0x10000, CRC(08149140) SHA1(ff0094883ca0fc81bae991d6ea62d0064d6f7c47) ) ROM_LOAD16_BYTE( "11.bin", 0x00001, 0x10000, CRC(2ed7545b) SHA1(6a70743bbb03ef694310f2b5531f384209db62a1) ) ROM_END @@ -1400,27 +1412,27 @@ ROM_START( gulfstrmm ) ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(cb555d96) SHA1(ebc1dee91a09a829db2ae6fc1616c7c989f7f1c2) ) /* empty */ ROM_CONTINUE( 0x0000, 0x8000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "14.b1", 0x00000, 0x20000, CRC(67bdf73d) SHA1(3e357448b6f255fdec731f143afa3d3149523ed2) ) ROM_LOAD16_BYTE( "16.c1", 0x00001, 0x20000, CRC(7770a76f) SHA1(4f9f5245f59008b26ed60e636285ea85271744e7) ) ROM_LOAD16_BYTE( "15.b1", 0x40000, 0x20000, CRC(84803f7e) SHA1(74b694c0d20c5b016b9d7258b0296229972151d5) ) ROM_LOAD16_BYTE( "17.e1", 0x40001, 0x20000, CRC(94706500) SHA1(8f4a6f7ce20b1b50577271601c2c2632b5a2292c) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_BYTE( "4.d8", 0x00000, 0x20000, CRC(858fdbb6) SHA1(4c317ab6069a8509287d3df88cf4272f512a40a3) ) ROM_LOAD16_BYTE( "5.b9", 0x00001, 0x20000, CRC(c0a552e8) SHA1(31dcb14eb8815c609b0bf4d5f1ea17b26ab18aec) ) ROM_LOAD16_BYTE( "6.d8", 0x40000, 0x20000, CRC(20eedda3) SHA1(8c8b1284e07f5380037f8431f2649aa99fd47542) ) ROM_LOAD16_BYTE( "7.d9", 0x40001, 0x20000, CRC(294f8c40) SHA1(b7afb87510ab52682151ff2b13029427487589ec) ) - ROM_REGION( 0x40000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x40000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "12.bin", 0x00000, 0x20000, CRC(3e3d3b57) SHA1(398a6cac7144ba7bacaa36c593bcb4b3c051eb0f) ) ROM_LOAD16_BYTE( "13.bin", 0x00001, 0x20000, CRC(66fcce80) SHA1(6ab2b7cd49447d374cde40b98db0a6209dcad461) ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* background tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* background tilemaps */ ROM_LOAD16_BYTE( "8.e8", 0x00000, 0x10000, CRC(8d7f4693) SHA1(a7c8573d9e54c8230decc3e88f76ae729d77b096) ) ROM_LOAD16_BYTE( "9.e9", 0x00001, 0x10000, CRC(34d440c4) SHA1(74b0e15e75f62106177234b6ea54a5d312628802) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "10.bin", 0x00000, 0x10000, CRC(08149140) SHA1(ff0094883ca0fc81bae991d6ea62d0064d6f7c47) ) ROM_LOAD16_BYTE( "11.bin", 0x00001, 0x10000, CRC(2ed7545b) SHA1(6a70743bbb03ef694310f2b5531f384209db62a1) ) ROM_END @@ -1436,27 +1448,27 @@ ROM_START( gulfstrmk ) ROM_LOAD( "2.bin", 0x0000, 0x8000, CRC(cb555d96) SHA1(ebc1dee91a09a829db2ae6fc1616c7c989f7f1c2) ) /* empty */ ROM_CONTINUE( 0x0000, 0x8000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "14.b1", 0x00000, 0x20000, CRC(67bdf73d) SHA1(3e357448b6f255fdec731f143afa3d3149523ed2) ) ROM_LOAD16_BYTE( "16.c1", 0x00001, 0x20000, CRC(7770a76f) SHA1(4f9f5245f59008b26ed60e636285ea85271744e7) ) ROM_LOAD16_BYTE( "15.b1", 0x40000, 0x20000, CRC(84803f7e) SHA1(74b694c0d20c5b016b9d7258b0296229972151d5) ) ROM_LOAD16_BYTE( "17.e1", 0x40001, 0x20000, CRC(94706500) SHA1(8f4a6f7ce20b1b50577271601c2c2632b5a2292c) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_BYTE( "4.d8", 0x00000, 0x20000, CRC(858fdbb6) SHA1(4c317ab6069a8509287d3df88cf4272f512a40a3) ) ROM_LOAD16_BYTE( "5.b9", 0x00001, 0x20000, CRC(c0a552e8) SHA1(31dcb14eb8815c609b0bf4d5f1ea17b26ab18aec) ) ROM_LOAD16_BYTE( "6.d8", 0x40000, 0x20000, CRC(20eedda3) SHA1(8c8b1284e07f5380037f8431f2649aa99fd47542) ) ROM_LOAD16_BYTE( "7.d9", 0x40001, 0x20000, CRC(294f8c40) SHA1(b7afb87510ab52682151ff2b13029427487589ec) ) - ROM_REGION( 0x40000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x40000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "12.bin", 0x00000, 0x20000, CRC(3e3d3b57) SHA1(398a6cac7144ba7bacaa36c593bcb4b3c051eb0f) ) ROM_LOAD16_BYTE( "13.bin", 0x00001, 0x20000, CRC(66fcce80) SHA1(6ab2b7cd49447d374cde40b98db0a6209dcad461) ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* background tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* background tilemaps */ ROM_LOAD16_BYTE( "8.e8", 0x00000, 0x10000, CRC(8d7f4693) SHA1(a7c8573d9e54c8230decc3e88f76ae729d77b096) ) ROM_LOAD16_BYTE( "9.e9", 0x00001, 0x10000, CRC(34d440c4) SHA1(74b0e15e75f62106177234b6ea54a5d312628802) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "10.bin", 0x00000, 0x10000, CRC(08149140) SHA1(ff0094883ca0fc81bae991d6ea62d0064d6f7c47) ) ROM_LOAD16_BYTE( "11.bin", 0x00001, 0x10000, CRC(2ed7545b) SHA1(6a70743bbb03ef694310f2b5531f384209db62a1) ) ROM_END @@ -1472,22 +1484,22 @@ ROM_START( pollux ) ROM_LOAD( "pollux1.bin", 0x08000, 0x08000, CRC(7f7135da) SHA1(0f77841e52b3d7e731d5142fba9ed5cd57343305) ) ROM_CONTINUE( 0x00000, 0x08000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_WORD_SWAP( "dy-pl-m2_be023.bin", 0x00000, 0x80000, CRC(bdea6f7d) SHA1(b418710a6d12aa53037acf7bbec85a26dfac9ebe) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_WORD_SWAP( "dy-pl-m1_be015.bin", 0x00000, 0x80000, CRC(1d2dedd2) SHA1(9bcb1c80f05eabbca2c0738e409d3cadfc14b0c8) ) - ROM_REGION( 0x80000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "pollux6.bin", 0x00000, 0x20000, CRC(b0391db5) SHA1(0c522c5074dc7c0a639ebfb7b9a9eddc90314081) ) ROM_LOAD16_BYTE( "pollux7.bin", 0x00001, 0x20000, CRC(632f6e10) SHA1(a3605cbe7a9dc04cd8c1ab50110f72d93c78208b) ) ROM_FILL( 0x40000, 0x40000, 0xff ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* bg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* bg tilemaps */ ROM_LOAD16_BYTE( "pollux9.bin", 0x00000, 0x10000, CRC(378d8914) SHA1(ef95903971673bc26774fe2aff17e1581a7f0eb9) ) ROM_LOAD16_BYTE( "pollux8.bin", 0x00001, 0x10000, CRC(8859fa70) SHA1(7b1b9edde3f762c7ae1f0b847aa17e30140e9ffa) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "pollux5.bin", 0x00000, 0x10000, CRC(ac090d34) SHA1(6b554450d8d46165e25fd6f12ab4c4b9b63dcd35) ) ROM_LOAD16_BYTE( "pollux4.bin", 0x00001, 0x10000, CRC(2c6bd3be) SHA1(6648264be83588a01f264e7ec72d84e29e0d4795) ) ROM_END @@ -1503,22 +1515,22 @@ ROM_START( polluxa ) ROM_LOAD( "dooyong1.bin", 0x08000, 0x08000, CRC(a7d820b2) SHA1(bbcc3690f91a4bd4f0cff5da25cbfeceb7a19437) ) ROM_CONTINUE( 0x00000, 0x08000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_WORD_SWAP( "dy-pl-m2_be023.bin", 0x00000, 0x80000, CRC(bdea6f7d) SHA1(b418710a6d12aa53037acf7bbec85a26dfac9ebe) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_WORD_SWAP( "dy-pl-m1_be015.bin", 0x00000, 0x80000, CRC(1d2dedd2) SHA1(9bcb1c80f05eabbca2c0738e409d3cadfc14b0c8) ) - ROM_REGION( 0x80000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "pollux6.bin", 0x00000, 0x20000, CRC(b0391db5) SHA1(0c522c5074dc7c0a639ebfb7b9a9eddc90314081) ) ROM_LOAD16_BYTE( "pollux7.bin", 0x00001, 0x20000, CRC(632f6e10) SHA1(a3605cbe7a9dc04cd8c1ab50110f72d93c78208b) ) ROM_FILL( 0x40000, 0x40000, 0xff ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* bg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* bg tilemaps */ ROM_LOAD16_BYTE( "pollux9.bin", 0x00000, 0x10000, CRC(378d8914) SHA1(ef95903971673bc26774fe2aff17e1581a7f0eb9) ) ROM_LOAD16_BYTE( "pollux8.bin", 0x00001, 0x10000, CRC(8859fa70) SHA1(7b1b9edde3f762c7ae1f0b847aa17e30140e9ffa) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "pollux5.bin", 0x00000, 0x10000, CRC(ac090d34) SHA1(6b554450d8d46165e25fd6f12ab4c4b9b63dcd35) ) ROM_LOAD16_BYTE( "pollux4.bin", 0x00001, 0x10000, CRC(2c6bd3be) SHA1(6648264be83588a01f264e7ec72d84e29e0d4795) ) ROM_END @@ -1534,22 +1546,22 @@ ROM_START( polluxa2 ) ROM_LOAD( "dooyong1.bin", 0x08000, 0x08000, CRC(a7d820b2) SHA1(bbcc3690f91a4bd4f0cff5da25cbfeceb7a19437) ) ROM_CONTINUE( 0x00000, 0x08000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_WORD_SWAP( "dy-pl-m2_be023.bin", 0x00000, 0x80000, CRC(bdea6f7d) SHA1(b418710a6d12aa53037acf7bbec85a26dfac9ebe) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_WORD_SWAP( "dy-pl-m1_be015.bin", 0x00000, 0x80000, CRC(1d2dedd2) SHA1(9bcb1c80f05eabbca2c0738e409d3cadfc14b0c8) ) - ROM_REGION( 0x80000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "pollux6.bin", 0x00000, 0x20000, CRC(b0391db5) SHA1(0c522c5074dc7c0a639ebfb7b9a9eddc90314081) ) ROM_LOAD16_BYTE( "pollux7.bin", 0x00001, 0x20000, CRC(632f6e10) SHA1(a3605cbe7a9dc04cd8c1ab50110f72d93c78208b) ) ROM_FILL( 0x40000, 0x40000, 0xff ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* bg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* bg tilemaps */ ROM_LOAD16_BYTE( "pollux9.bin", 0x00000, 0x10000, CRC(378d8914) SHA1(ef95903971673bc26774fe2aff17e1581a7f0eb9) ) ROM_LOAD16_BYTE( "pollux8.bin", 0x00001, 0x10000, CRC(8859fa70) SHA1(7b1b9edde3f762c7ae1f0b847aa17e30140e9ffa) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "pollux5.bin", 0x00000, 0x10000, CRC(ac090d34) SHA1(6b554450d8d46165e25fd6f12ab4c4b9b63dcd35) ) ROM_LOAD16_BYTE( "pollux4.bin", 0x00001, 0x10000, CRC(2c6bd3be) SHA1(6648264be83588a01f264e7ec72d84e29e0d4795) ) ROM_END @@ -1565,22 +1577,22 @@ ROM_START( polluxn ) ROM_LOAD( "polluxntc_1.3r", 0x08000, 0x08000, CRC(7f7135da) SHA1(0f77841e52b3d7e731d5142fba9ed5cd57343305) ) ROM_CONTINUE( 0x00000, 0x08000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_WORD_SWAP( "polluxntc_dy-pl-m2_be023.3t", 0x00000, 0x80000, CRC(bdea6f7d) SHA1(b418710a6d12aa53037acf7bbec85a26dfac9ebe) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD16_WORD_SWAP( "polluxntc_dy-pl-m1_be002.8a", 0x00000, 0x80000, CRC(1d2dedd2) SHA1(9bcb1c80f05eabbca2c0738e409d3cadfc14b0c8) ) - ROM_REGION( 0x80000, "gfx4", 0 ) /* tiles */ + ROM_REGION16_BE( 0x80000, "gfx4", 0 ) /* tiles */ ROM_LOAD16_BYTE( "polluxntc_6.8m", 0x00000, 0x20000, CRC(b0391db5) SHA1(0c522c5074dc7c0a639ebfb7b9a9eddc90314081) ) ROM_LOAD16_BYTE( "polluxntc_7.8l", 0x00001, 0x20000, CRC(632f6e10) SHA1(a3605cbe7a9dc04cd8c1ab50110f72d93c78208b) ) ROM_FILL( 0x40000, 0x40000, 0xff ) - ROM_REGION( 0x20000, "gfx5", 0 ) /* bg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx5", 0 ) /* bg tilemaps */ ROM_LOAD16_BYTE( "polluxntc_9.8b", 0x00000, 0x10000, CRC(378d8914) SHA1(ef95903971673bc26774fe2aff17e1581a7f0eb9) ) ROM_LOAD16_BYTE( "polluxntc_8.8j", 0x00001, 0x10000, CRC(8859fa70) SHA1(7b1b9edde3f762c7ae1f0b847aa17e30140e9ffa) ) - ROM_REGION( 0x20000, "gfx6", 0 ) /* fg tilemaps */ + ROM_REGION16_BE( 0x20000, "gfx6", 0 ) /* fg tilemaps */ ROM_LOAD16_BYTE( "polluxntc_5.8p", 0x00000, 0x10000, CRC(ac090d34) SHA1(6b554450d8d46165e25fd6f12ab4c4b9b63dcd35) ) ROM_LOAD16_BYTE( "polluxntc_4.8r", 0x00001, 0x10000, BAD_DUMP CRC(0195dc4e) SHA1(c87c90a38b382f11ee3377683c0becda745341e0) ) // need to confirm as bad, the same as other sets except it has some bits of data blanked out with 0xFF ROM_END @@ -1596,16 +1608,16 @@ ROM_START( bluehawk ) ROM_REGION( 0x10000, "gfx1", 0 ) /* chars */ ROM_LOAD( "rom3", 0x00000, 0x10000, CRC(c192683f) SHA1(060372b21bf331671c135a074640868eeb5f13ec) ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_WORD_SWAP( "dy-bh-m3", 0x00000, 0x80000, CRC(8809d157) SHA1(7f86378f9fcb95ab83b68f37a29732bb8cb3d95a) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "dy-bh-m1", 0x00000, 0x80000, CRC(51816b2c) SHA1(72fb055de7979e40195316ef38a2e8c54be12e2b) ) - ROM_REGION( 0x80000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x80000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "dy-bh-m2", 0x00000, 0x80000, CRC(f9daace6) SHA1(5e7892bad170ab9bd52426629ad49843fbc31996) ) - ROM_REGION( 0x40000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x40000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "rom6", 0x00000, 0x20000, CRC(e6bd9daa) SHA1(3b478fd02b145d13e49539df5260191a5254be19) ) ROM_LOAD16_BYTE( "rom5", 0x00001, 0x20000, CRC(5c654dc6) SHA1(f10f64d7114adf7f18ec37c193c524ec80236201) ) @@ -1623,16 +1635,16 @@ ROM_START( bluehawkn ) ROM_REGION( 0x10000, "gfx1", 0 ) /* chars */ ROM_LOAD( "rom3ntc", 0x00000, 0x10000, CRC(31eb221a) SHA1(7b893972227047d2f609fd1f97cc006eba2c9579) ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_WORD_SWAP( "dy-bh-m3", 0x00000, 0x80000, CRC(8809d157) SHA1(7f86378f9fcb95ab83b68f37a29732bb8cb3d95a) ) // ROM7+ROM8+ROM13+ROM14 - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "dy-bh-m1", 0x00000, 0x80000, CRC(51816b2c) SHA1(72fb055de7979e40195316ef38a2e8c54be12e2b) ) // ROM9+ROM10+ROM15+ROM16 - ROM_REGION( 0x80000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x80000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "dy-bh-m2", 0x00000, 0x80000, CRC(f9daace6) SHA1(5e7892bad170ab9bd52426629ad49843fbc31996) ) // ROM11+ROM12+ROM17+ROM18 - ROM_REGION( 0x40000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x40000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "rom6", 0x00000, 0x20000, CRC(e6bd9daa) SHA1(3b478fd02b145d13e49539df5260191a5254be19) ) ROM_LOAD16_BYTE( "rom5", 0x00001, 0x20000, CRC(5c654dc6) SHA1(f10f64d7114adf7f18ec37c193c524ec80236201) ) @@ -1720,16 +1732,16 @@ ROM_START( flytiger ) ROM_LOAD( "2.4h", 0x08000, 0x08000, CRC(2fb72912) SHA1(34453e2b49cf3a6bc9e87a8400428d95f626b97a) ) ROM_CONTINUE( 0x00000, 0x8000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "16.4h", 0x00000, 0x20000, CRC(8a158b95) SHA1(ed09d9c40b76a27e06601381e463a00b16555f1e) ) ROM_LOAD16_BYTE( "15.2h", 0x00001, 0x20000, CRC(399f6043) SHA1(ea0debd6d0f8c61f0078809c2828734fc15e891d) ) ROM_LOAD16_BYTE( "14.4k", 0x40000, 0x20000, CRC(df66b6f3) SHA1(3a29ae69a09306c5a2a2786acbf227832b408152) ) ROM_LOAD16_BYTE( "13.2k", 0x40001, 0x20000, CRC(f24a5099) SHA1(408559057989a40ca298baa85d5fe7cbde72d2b8) ) - ROM_REGION( 0x80000, "gfx3",0 ) /* tiles + tilemaps */ + ROM_REGION16_BE( 0x80000, "gfx3",0 ) /* tiles + tilemaps */ ROM_LOAD16_WORD_SWAP( "dy-ft-m1.11n", 0x00000, 0x80000, CRC(f06589c2) SHA1(fb4aa12257e2e0162f2219ebea5177e8bb15e3f0) ) - ROM_REGION( 0x80000, "gfx4",0 ) /* tiles + tilemaps */ + ROM_REGION16_BE( 0x80000, "gfx4",0 ) /* tiles + tilemaps */ ROM_LOAD16_WORD_SWAP("dy-ft-m2.11g", 0x00000, 0x80000, CRC(7545f9c9) SHA1(dcab4d64a8fada5afd4a352f5a30c868676d2b57) ) ROM_REGION( 0x80000, "oki", 0 ) /* OKI6295 samples */ @@ -1747,19 +1759,19 @@ ROM_START( flytigera ) // alt pcb type ROM_LOAD( "ftiger_2.4h", 0x08000, 0x08000, CRC(ca9d6713) SHA1(645cccc06c7f6744b25e7917f414956856419b8a) ) ROM_CONTINUE( 0x00000, 0x8000 ) - ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */ ROM_LOAD16_BYTE( "ftiger_16.4h", 0x00000, 0x20000, CRC(8a158b95) SHA1(ed09d9c40b76a27e06601381e463a00b16555f1e) ) ROM_LOAD16_BYTE( "ftiger_15.2h", 0x00001, 0x20000, CRC(399f6043) SHA1(ea0debd6d0f8c61f0078809c2828734fc15e891d) ) ROM_LOAD16_BYTE( "ftiger_14.4k", 0x40000, 0x20000, CRC(df66b6f3) SHA1(3a29ae69a09306c5a2a2786acbf227832b408152) ) ROM_LOAD16_BYTE( "ftiger_13.2k", 0x40001, 0x20000, CRC(f24a5099) SHA1(408559057989a40ca298baa85d5fe7cbde72d2b8) ) - ROM_REGION( 0x80000, "gfx3",0 ) /* tiles + tilemaps */ // same data, but split + ROM_REGION16_BE( 0x80000, "gfx3",0 ) /* tiles + tilemaps */ // same data, but split ROM_LOAD16_BYTE( "ftiger_3.10p", 0x00001, 0x20000, CRC(9fc12ebd) SHA1(c8f03a20da01bd61a27813564eb79bb2e8483f28) ) ROM_LOAD16_BYTE( "ftiger_5.10l", 0x00000, 0x20000, CRC(06c9dd2a) SHA1(20235b7d55b9bc73ddb1fec5fd68e5ba32508d1b) ) ROM_LOAD16_BYTE( "ftiger_4.11p", 0x40001, 0x20000, CRC(fb30e884) SHA1(1f01ed15ae6cdebb120cc1f03ac65465c824dc89) ) ROM_LOAD16_BYTE( "ftiger_6.11l", 0x40000, 0x20000, CRC(dfb85152) SHA1(03a07e016d400c1c0e7a59716c08a61e23e5d60f) ) - ROM_REGION( 0x80000, "gfx4",0 ) /* tiles + tilemaps */ // same data, but split + ROM_REGION16_BE( 0x80000, "gfx4",0 ) /* tiles + tilemaps */ // same data, but split ROM_LOAD16_BYTE( "ftiger_8.11h", 0x00001, 0x20000, CRC(cbd8c22f) SHA1(e7e64c99990e99336abbdbd7ffadfa4c0f1a4c0f) ) ROM_LOAD16_BYTE( "ftiger_10.11f",0x00000, 0x20000, CRC(e2175f3b) SHA1(1ce17beb431bb3e8454bb1899f28d16c6a537183) ) ROM_LOAD16_BYTE( "ftiger_7.10h", 0x40001, 0x20000, CRC(be431c61) SHA1(3227912117700751370059c173e46d0a8367c5f8) ) @@ -1781,13 +1793,13 @@ ROM_START( sadari ) /* no sprites */ - ROM_REGION( 0x80000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "10.10l", 0x00000, 0x20000, CRC(70269ab1) SHA1(055ff484da028f11bb3097652ef4713603870f89) ) ROM_LOAD16_BYTE( "5.8l", 0x00001, 0x20000, CRC(ceceb4c3) SHA1(db08bbe9d23eb50d5c0603893a6e0368e2b6bbba) ) ROM_LOAD16_BYTE( "9.10n", 0x40000, 0x20000, CRC(21bd1bda) SHA1(a5c9df8b45b05130374a83e45b3fb7cce76b58f8) ) ROM_LOAD16_BYTE( "4.8n", 0x40001, 0x20000, CRC(cd318ae5) SHA1(457ccaf1d841ff763878dca8e534b9738510899a) ) - ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x80000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "11.10j", 0x00000, 0x20000, CRC(62a1d580) SHA1(4df60db9ad306a4d8776d10826e802cab27809f7) ) ROM_LOAD16_BYTE( "6.8j", 0x00001, 0x20000, CRC(c4b13ed7) SHA1(97a33d700a8372b0e4bb13e567afc5ef898e9351) ) ROM_LOAD16_BYTE( "12.10g", 0x40000, 0x20000, CRC(547b7645) SHA1(fdfe5cccdae1b88736aae702aa55fd642396ce01) ) @@ -1809,11 +1821,11 @@ ROM_START( gundl94 ) /* no sprites */ - ROM_REGION( 0x40000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x40000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "gd94_009.n9", 0x00000, 0x20000, CRC(40eabf55) SHA1(660f4318248001049369e1e715c7ff09d551c256) ) ROM_LOAD16_BYTE( "gd94_004.n7", 0x00001, 0x20000, CRC(0654abb9) SHA1(c0fcd8ba78db341f46acb523c670d053e3d82b16) ) - ROM_REGION( 0x40000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x40000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "gd94_012.g9", 0x00000, 0x20000, CRC(117c693c) SHA1(e08bd6fbbae8ac657e6a1f9df36983ace941da3a) ) ROM_LOAD16_BYTE( "gd94_007.g7", 0x00001, 0x20000, CRC(96a72c6d) SHA1(b79a746fc114eb8977591f147e4ea4a4e4f14526) ) @@ -1841,11 +1853,11 @@ ROM_START( primella ) /* no sprites */ - ROM_REGION( 0x40000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x40000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "7_n9.bin", 0x00000, 0x20000, CRC(20b6a574) SHA1(e180e8440bf2dc22c7d24707fc47d0c70433ecba) ) ROM_LOAD16_BYTE( "4_n7.bin", 0x00001, 0x20000, CRC(fe593666) SHA1(f511e4881f79de91c501b0026de2ac5b4a59f747) ) - ROM_REGION( 0x40000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x40000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "8_g9.bin", 0x00000, 0x20000, CRC(542ecb83) SHA1(0a4decaad9dde4681f7b6cdab0ae0e4951efc83d) ) ROM_LOAD16_BYTE( "5_g7.bin", 0x00001, 0x20000, CRC(058ecac6) SHA1(12f70f78b882b6ce08c56f6fa9a1211c3464bf9d) ) @@ -1923,19 +1935,19 @@ ROM_START( superx ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound */ ROM_LOAD( "1.5u", 0x0000, 0x10000, CRC(6894ce05) SHA1(9726fc3f1e9bebecf498c208ab03007f34936632) ) - ROM_REGION( 0x200000, "gfx1", 0 ) /* sprite */ + ROM_REGION16_BE( 0x200000, "gfx1", 0 ) /* sprite */ ROM_LOAD16_WORD_SWAP( "spxo-m05.10m", 0x00000, 0x200000, CRC(9120dd84) SHA1(bcf1fdc860d51b9bcfec1e84940ef21dfc41b5dc) ) - ROM_REGION( 0x100000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "spxb-m04.8f", 0x00000, 0x100000, CRC(91a7ac6e) SHA1(b7fb79c2e4f5eecb7128b86ee2b1070eed905d2a) ) // bomb - ROM_REGION( 0x100000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "spxb-m03.8j", 0x00000, 0x100000, CRC(8b42861b) SHA1(6eb1f6bfe0b8e987e624a6fe7e025c6918804cf9) ) // title logo - ROM_REGION( 0x100000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "spxb-m02.8a", 0x00000, 0x100000, CRC(21b8db78) SHA1(e7c51c9566ebce5b5db5af48f33e2194b518715f)) // title screen upper background - ROM_REGION( 0x100000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "spxb-m01.8c", 0x00000, 0x100000, CRC(60c69129) SHA1(6871b08e354c7cf5fb16b0ed4562c537e2ce9194) ) // title screen lower background ROM_REGION( 0x80000, "gfx6", 0 ) /* top 4 bits of tilemaps */ @@ -1958,19 +1970,19 @@ ROM_START( superxm ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound */ ROM_LOAD( "1_m.5u", 0x0000, 0x10000, CRC(319fa632) SHA1(b621ad080e8cf6611fc88d8fc2af5aa4e31e9e01) ) - ROM_REGION( 0x200000, "gfx1", 0 ) /* sprite */ + ROM_REGION16_BE( 0x200000, "gfx1", 0 ) /* sprite */ ROM_LOAD16_WORD_SWAP( "spxo-m05.10m", 0x00000, 0x200000, CRC(9120dd84) SHA1(bcf1fdc860d51b9bcfec1e84940ef21dfc41b5dc) ) - ROM_REGION( 0x100000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "spxb-m04.8f", 0x00000, 0x100000, CRC(91a7ac6e) SHA1(b7fb79c2e4f5eecb7128b86ee2b1070eed905d2a) ) // bomb - ROM_REGION( 0x100000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "spxb-m03.8j", 0x00000, 0x100000, CRC(8b42861b) SHA1(6eb1f6bfe0b8e987e624a6fe7e025c6918804cf9) ) // title logo - ROM_REGION( 0x100000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "spxb-m02.8a", 0x00000, 0x100000, CRC(21b8db78) SHA1(e7c51c9566ebce5b5db5af48f33e2194b518715f)) // title screen upper background - ROM_REGION( 0x100000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_WORD_SWAP( "spxb-m01.8c", 0x00000, 0x100000, CRC(60c69129) SHA1(6871b08e354c7cf5fb16b0ed4562c537e2ce9194) ) // title screen lower background ROM_REGION( 0x80000, "gfx6", 0 ) /* top 4 bits of tilemaps */ @@ -1992,25 +2004,25 @@ ROM_START( rshark ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound */ ROM_LOAD( "rse3.bin", 0x0000, 0x10000, CRC(03c8fd17) SHA1(d59a3d8b731484572384a9d6f24ef4cd200ef661) ) - ROM_REGION( 0x200000, "gfx1", 0 ) /* sprite */ + ROM_REGION16_BE( 0x200000, "gfx1", 0 ) /* sprite */ ROM_LOAD16_BYTE( "rse4.bin", 0x000000, 0x80000, CRC(b857e411) SHA1(14a8883243f3f1ee661395cbcce7d5d3c08caef8) ) ROM_LOAD16_BYTE( "rse5.bin", 0x000001, 0x80000, CRC(7822d77a) SHA1(25d34b508a25ab8052d3f73eeb60c7b9e6610db6) ) ROM_LOAD16_BYTE( "rse6.bin", 0x100000, 0x80000, CRC(80215c52) SHA1(6138804fc2f81cf1366cc1bcca7572e45845ca8a) ) ROM_LOAD16_BYTE( "rse7.bin", 0x100001, 0x80000, CRC(bd28bbdc) SHA1(b09ce8b21a08d129703f95b6fe9361e7f6614ee3) ) - ROM_REGION( 0x100000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "rse11.bin", 0x00000, 0x80000, CRC(8a0c572f) SHA1(218c4e4aeacedf459c6c08cc47dd2154b7dd4279) ) ROM_LOAD16_BYTE( "rse10.bin", 0x00001, 0x80000, CRC(139d5947) SHA1(e371f27091924c605962f0a88d9f1f3deb0c954e) ) - ROM_REGION( 0x100000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "rse15.bin", 0x00000, 0x80000, CRC(d188134d) SHA1(b0711657ad87166330b471fa449e95d63939b223) ) ROM_LOAD16_BYTE( "rse14.bin", 0x00001, 0x80000, CRC(0ef637a7) SHA1(827867831f751a5ed4022932b755e128fb5886b6) ) - ROM_REGION( 0x100000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx4", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "rse17.bin", 0x00000, 0x80000, CRC(7ff0f3c7) SHA1(033722dbf69745676b71f7002b413abd3c7bdf3c) ) ROM_LOAD16_BYTE( "rse16.bin", 0x00001, 0x80000, CRC(c176c8bc) SHA1(98ef043befd2e067012d24299196964a0957b2ea) ) - ROM_REGION( 0x100000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ + ROM_REGION16_BE( 0x100000, "gfx5", 0 ) /* tiles + tilemaps (together!) */ ROM_LOAD16_BYTE( "rse21.bin", 0x00000, 0x80000, CRC(2ea665af) SHA1(67445e525016c0873bc2d831230f908388dabd4d) ) ROM_LOAD16_BYTE( "rse20.bin", 0x00001, 0x80000, CRC(ef93e3ac) SHA1(397afe70c8039eb073589353bd5a9f469e8a6776) ) @@ -2073,17 +2085,17 @@ ROM_START( popbingo ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound */ ROM_LOAD( "rom1.3p", 0x0000, 0x10000, CRC(46e8d2c4) SHA1(a6fb55766e0bad321ac03977f33d3000ab7ab295) ) - ROM_REGION( 0x100000, "gfx1", 0 ) /* sprite */ + ROM_REGION16_BE( 0x100000, "gfx1", 0 ) /* sprite */ ROM_LOAD16_BYTE( "rom5.9m", 0x00000, 0x80000, CRC(e8d73e07) SHA1(4ed647eaa6b32b9f159fc49d30962ad20f97b245) ) ROM_LOAD16_BYTE( "rom6.9l", 0x00001, 0x80000, CRC(c3db3975) SHA1(bb085c9339d640585b18992dc8b861870920559a) ) - ROM_REGION( 0x200000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ - /* its probably actually 4 bpp layers that combine to form 1 8bpp layer */ - ROM_LOAD16_BYTE( "rom10.9a", 0x000000, 0x80000, CRC(135ab90a) SHA1(5911923ccf579edd0bf3449945a434fbf37b51aa) ) - ROM_LOAD16_BYTE( "rom9.9c", 0x000001, 0x80000, CRC(c9d90007) SHA1(ad457ef297797dcb9bb8dc1725fa207cd57eedfe) ) + ROM_REGION16_BE( 0x100000, "gfx2", 0 ) /* tiles + tilemaps (together!) */ + ROM_LOAD16_BYTE( "rom10.9a", 0x00000, 0x80000, CRC(135ab90a) SHA1(5911923ccf579edd0bf3449945a434fbf37b51aa) ) + ROM_LOAD16_BYTE( "rom9.9c", 0x00001, 0x80000, CRC(c9d90007) SHA1(ad457ef297797dcb9bb8dc1725fa207cd57eedfe) ) - ROM_LOAD16_BYTE( "rom7.9h", 0x100000, 0x80000, CRC(b2b4c13b) SHA1(37ddc9751860a85b809782c5cec4418bca71412c) ) - ROM_LOAD16_BYTE( "rom8.9e", 0x100001, 0x80000, CRC(66c4b00f) SHA1(ed416ec594fe065c0f169008fb8ce553813f6260) ) + ROM_REGION16_BE( 0x100000, "gfx3", 0 ) /* tiles + tilemaps (together!) */ + ROM_LOAD16_BYTE( "rom7.9h", 0x00000, 0x80000, CRC(b2b4c13b) SHA1(37ddc9751860a85b809782c5cec4418bca71412c) ) + ROM_LOAD16_BYTE( "rom8.9e", 0x00001, 0x80000, CRC(66c4b00f) SHA1(ed416ec594fe065c0f169008fb8ce553813f6260) ) ROM_REGION( 0x40000, "oki", 0 ) /* OKI6295 samples */ ROM_LOAD( "rom4.4r", 0x00000, 0x20000, CRC(0fdee034) SHA1(739d39b04c2e860c3c193ab32b30ccc39ff1a8c2) ) diff --git a/src/mame/drivers/dynax.cpp b/src/mame/drivers/dynax.cpp index 94fcd4bbf7a..0df75e50335 100644 --- a/src/mame/drivers/dynax.cpp +++ b/src/mame/drivers/dynax.cpp @@ -6430,8 +6430,8 @@ ROM_START( intrgirl ) ROM_LOAD( "ka-5.rom3", 0x80000, 0x40000, CRC(2ed30171) SHA1(883d9e96df4f234652b01599e065f7f1985d1748) ) ROM_REGION( 0x400, "proms", 0 ) // Color PROMs - ROM_LOAD( "n82s147n.uk15", 0x000, 0x200, NO_DUMP ) - ROM_LOAD( "n82s147n.uk16", 0x200, 0x200, NO_DUMP ) + ROM_LOAD( "n82s147n.uk16", 0x000, 0x200, CRC(17dd1678) SHA1(4ed1beea3de44a6b35c84fb49f65a3a258e716fd) ) + ROM_LOAD( "n82s147n.uk15", 0x200, 0x200, CRC(256e75bd) SHA1(63cb6e824742e8d45e8d69183b8f7693fc0fd6d4) ) ROM_REGION( 0x104, "pals", ROMREGION_ERASE00 ) ROM_LOAD( "pal16l8acn.ug6", 0x000, 0x104, NO_DUMP ) //read protected @@ -7509,5 +7509,5 @@ GAME( 1991, ougonpaib,ougonpai, tenkai, tenkai, driver_device, 0, ROT GAME( 1994, mjreach, 0, tenkai, mjreach, dynax_state, mjreach, ROT0, "bootleg / Dynax", "Mahjong Reach (bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1994, cdracula, 0, cdracula, cdracula, driver_device, 0, ROT0, "Yun Sung (Escape license)","Castle Of Dracula", MACHINE_SUPPORTS_SAVE ) // not a dynax board GAME( 1995, shpeng, 0, sprtmtch, drgpunch, driver_device, 0, ROT0, "WSAC Systems?", "Sea Hunter Penguin", MACHINE_NO_COCKTAIL | MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // not a dynax board. proms? -GAME( 1995, intrgirl, 0, sprtmtch, drgpunch, driver_device, 0, ROT0, "Barko", "Intergirl", MACHINE_NO_COCKTAIL | MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // not a dynax board. proms? +GAME( 1995, intrgirl, 0, sprtmtch, drgpunch, driver_device, 0, ROT0, "Barko", "Intergirl", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) // not a dynax board. GAME( 1996, majrjhdx, 0, majrjhdx, tenkai, driver_device, 0, ROT0, "Dynax", "Mahjong Raijinhai DX", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp index ae053d8b45a..ba2413dac21 100644 --- a/src/mame/drivers/model1.cpp +++ b/src/mame/drivers/model1.cpp @@ -1243,6 +1243,11 @@ ROM_START( vr ) ROM_REGION( 0x100, "nvram", 0 ) // default nvram ROM_LOAD( "vr_defaults.nv", 0x000, 0x100, CRC(5ccdc835) SHA1(7e809de470f78fb897b938ca2aee2e12f1c8f3a4) ) + + ROM_REGION ( 0x10000, "io_board", 0) + ROM_LOAD("epr-14869.25", 0x00000, 0x10000, CRC(6187cd7a) SHA1(b65fdd0ad31794a565a0ca4dc67a3f16b329fd71) ) + ROM_LOAD("epr-14869b.25", 0x00000, 0x10000, CRC(b410f22b) SHA1(75c5009ca4d21ebb53d54d4e3fb8aa55a4c74a07) ) + // there is also epr-14869c in model2 daytona ROM_END ROM_START( vformula ) diff --git a/src/mame/drivers/vector06.cpp b/src/mame/drivers/vector06.cpp index 0256eb1533f..caaa9399b64 100644 --- a/src/mame/drivers/vector06.cpp +++ b/src/mame/drivers/vector06.cpp @@ -6,7 +6,12 @@ 10/07/2008 Preliminary driver. -note: press F12 after initial boot was load (indicated in screen lower part) +boot from ROM cart: + hold F2 then system reset (press F11), then press F12 + +boot from FDD: + press F12 after initial boot was load (indicated in screen lower part) + hold Ctrl ("YC" key) during MicroDOS start to format RAM disk (required by some games) ****************************************************************************/ @@ -30,10 +35,10 @@ static ADDRESS_MAP_START(vector06_io, AS_IO, 8, vector06_state) AM_RANGE( 0x0C, 0x0C) AM_WRITE(vector06_color_set) AM_RANGE( 0x10, 0x10) AM_WRITE(vector06_ramdisk_w) AM_RANGE( 0x14, 0x15) AM_DEVREADWRITE("aysnd", ay8910_device, data_r, data_address_w) - AM_RANGE( 0x18, 0x18) AM_DEVREADWRITE("wd1793", fd1793_t, data_r, data_w) - AM_RANGE( 0x19, 0x19) AM_DEVREADWRITE("wd1793", fd1793_t, sector_r, sector_w) - AM_RANGE( 0x1a, 0x1a) AM_DEVREADWRITE("wd1793", fd1793_t, track_r, track_w) - AM_RANGE( 0x1b, 0x1b) AM_DEVREADWRITE("wd1793", fd1793_t, status_r, cmd_w) + AM_RANGE( 0x18, 0x18) AM_DEVREADWRITE("wd1793", kr1818vg93_t, data_r, data_w) + AM_RANGE( 0x19, 0x19) AM_DEVREADWRITE("wd1793", kr1818vg93_t, sector_r, sector_w) + AM_RANGE( 0x1a, 0x1a) AM_DEVREADWRITE("wd1793", kr1818vg93_t, track_r, track_w) + AM_RANGE( 0x1b, 0x1b) AM_DEVREADWRITE("wd1793", kr1818vg93_t, status_r, cmd_w) AM_RANGE( 0x1C, 0x1C) AM_WRITE(vector06_disc_w) ADDRESS_MAP_END @@ -179,7 +184,7 @@ static MACHINE_CONFIG_START( vector06, vector06_state ) MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED) - MCFG_FD1793_ADD("wd1793", XTAL_1MHz) + MCFG_KR1818VG93_ADD("wd1793", XTAL_1MHz) MCFG_FLOPPY_DRIVE_ADD("wd1793:0", vector06_floppies, "qd", vector06_state::floppy_formats) MCFG_FLOPPY_DRIVE_ADD("wd1793:1", vector06_floppies, "qd", vector06_state::floppy_formats) diff --git a/src/mame/includes/dooyong.h b/src/mame/includes/dooyong.h index 4c51451c986..b862287a96d 100644 --- a/src/mame/includes/dooyong.h +++ b/src/mame/includes/dooyong.h @@ -1,63 +1,143 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria +// copyright-holders:Nicola Salmoria,Vas Crabb #include "video/bufsprite.h" +#define MCFG_DOOYONG_ROM_TILEMAP_ADD(tag, gfx, num, rom, offset) \ + MCFG_DEVICE_ADD(tag, DOOYONG_ROM_TILEMAP, 0) \ + dooyong_rom_tilemap_device::static_set_gfxdecode_tag(*device, "^" gfx); \ + dooyong_rom_tilemap_device::static_set_tilerom_tag(*device, "^" rom); \ + dooyong_rom_tilemap_device::static_set_gfxnum(*device, (num)); \ + dooyong_rom_tilemap_device::static_set_tilerom_offset(*device, (offset)); +#define MCFG_DOOYONG_ROM_TILEMAP_TRANSPARENT_PEN(pen) \ + dooyong_rom_tilemap_device::static_set_transparent_pen(*device, (pen)); +#define MCFG_DOOYONG_ROM_TILEMAP_PRIMELLA_CODE_BITS(bits) \ + dooyong_rom_tilemap_device::static_set_primella_code_bits(*device, (bits)); + +#define MCFG_RSHARK_ROM_TILEMAP_ADD(tag, gfx, num, rom, offset, rom2, offset2) \ + MCFG_DEVICE_ADD(tag, RSHARK_ROM_TILEMAP, 0) \ + dooyong_rom_tilemap_device::static_set_gfxdecode_tag(*device, "^" gfx); \ + dooyong_rom_tilemap_device::static_set_tilerom_tag(*device, "^" rom); \ + dooyong_rom_tilemap_device::static_set_gfxnum(*device, (num)); \ + dooyong_rom_tilemap_device::static_set_tilerom_offset(*device, (offset)); \ + dooyong_rom_tilemap_device::static_set_primella_code_bits(*device, 13); \ + rshark_rom_tilemap_device::static_set_colorrom_tag(*device, "^" rom2); \ + rshark_rom_tilemap_device::static_set_colorrom_offset(*device, (offset2)); + + +extern device_type const DOOYONG_ROM_TILEMAP; +extern device_type const RSHARK_ROM_TILEMAP; + + +class dooyong_rom_tilemap_device : public device_t +{ +public: + dooyong_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock); + + static void static_set_gfxdecode_tag(device_t &device, char const *tag); + static void static_set_tilerom_tag(device_t &device, char const *tag); + static void static_set_gfxnum(device_t &device, int gfxnum); + static void static_set_tilerom_offset(device_t &device, int offset); + static void static_set_transparent_pen(device_t &device, unsigned pen); + static void static_set_primella_code_bits(device_t &device, unsigned bits); + + void draw(screen_device &screen, bitmap_ind16 &dest, rectangle const &cliprect, UINT32 flags, UINT8 priority); + + DECLARE_WRITE8_MEMBER(ctrl_w); + void set_palette_bank(UINT16 bank); + +protected: + dooyong_rom_tilemap_device( + machine_config const &mconfig, + device_type type, + char const *name, + char const *tag, + device_t *owner, + UINT32 clock, + char const *shortname, + char const *source); + + virtual void device_start() override; + + virtual TILE_GET_INFO_MEMBER(tile_info); + + gfx_element const &gfx() const + { return *m_gfxdecode->gfx(m_gfxnum); } + + tilemap_memory_index adjust_tile_index(tilemap_memory_index tile_index) const + { return tile_index + ((unsigned(m_registers[1]) * 256U / gfx().width()) * m_rows); } + + int m_rows; + +private: + required_device<gfxdecode_device> m_gfxdecode; + required_region_ptr<UINT16> m_tilerom; + int m_gfxnum; + int m_tilerom_offset; + unsigned m_transparent_pen; + unsigned m_primella_code_mask; + unsigned m_primella_color_mask; + unsigned m_primella_color_shift; + + tilemap_t *m_tilemap; + + UINT8 m_registers[0x10]; + UINT16 m_palette_bank; +}; + + +class rshark_rom_tilemap_device : public dooyong_rom_tilemap_device +{ +public: + rshark_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock); + + static void static_set_colorrom_tag(device_t &device, char const *tag); + static void static_set_colorrom_offset(device_t &device, int offset); + +protected: + virtual void device_start() override; + + virtual TILE_GET_INFO_MEMBER(tile_info) override; + +private: + required_region_ptr<UINT8> m_colorrom; + int m_colorrom_offset; +}; + + class dooyong_state : public driver_device { public: dooyong_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_palette_bank(0) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_audiocpu(*this, "audiocpu") + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") + , m_bg(*this, "bg") + , m_bg2(*this, "bg2") + , m_fg(*this, "fg") + , m_fg2(*this, "fg2") { } - DECLARE_WRITE8_MEMBER(bgscroll_w); - DECLARE_WRITE8_MEMBER(bg2scroll_w); - DECLARE_WRITE8_MEMBER(fgscroll_w); - DECLARE_WRITE8_MEMBER(fg2scroll_w); - TILE_GET_INFO_MEMBER(get_bg_tile_info); - TILE_GET_INFO_MEMBER(get_bg2_tile_info); - TILE_GET_INFO_MEMBER(get_fg_tile_info); - TILE_GET_INFO_MEMBER(get_fg2_tile_info); - inline void get_tile_info(tile_data &tileinfo, int tile_index, UINT8 const *tilerom, UINT8 const *scroll, int graphics); - inline void scroll8_w(offs_t offset, UINT8 data, UINT8 *scroll, tilemap_t *map); - - - tilemap_t *m_bg_tilemap; - tilemap_t *m_bg2_tilemap; - tilemap_t *m_fg_tilemap; - tilemap_t *m_fg2_tilemap; - tilemap_t *m_tx_tilemap; - UINT8 m_bgscroll8[0x10]; - UINT8 m_bg2scroll8[0x10]; - UINT8 m_fgscroll8[0x10]; - UINT8 m_fg2scroll8[0x10]; - UINT8 *m_bg_tilerom; - UINT8 *m_bg2_tilerom; - UINT8 *m_fg_tilerom; - UINT8 *m_fg2_tilerom; - int m_bg_gfx; - int m_bg2_gfx; - int m_fg_gfx; - int m_fg2_gfx; + tilemap_t *m_tx_tilemap = nullptr; required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; - UINT8 m_palette_bank; + optional_device<dooyong_rom_tilemap_device> m_bg; + optional_device<dooyong_rom_tilemap_device> m_bg2; + optional_device<dooyong_rom_tilemap_device> m_fg; + optional_device<dooyong_rom_tilemap_device> m_fg2; }; class dooyong_z80_state : public dooyong_state { public: dooyong_z80_state(const machine_config &mconfig, device_type type, const char *tag) - : dooyong_state(mconfig, type, tag), - m_txvideoram(*this, "txvideoram"), - m_spriteram(*this, "spriteram") + : dooyong_state(mconfig, type, tag) + , m_txvideoram(*this, "txvideoram") + , m_spriteram(*this, "spriteram") { } enum @@ -87,10 +167,11 @@ public: required_shared_ptr<UINT8> m_txvideoram; std::unique_ptr<UINT8[]> m_paletteram_flytiger; - UINT8 m_sprites_disabled; - UINT8 m_flytiger_pri; - UINT8 m_tx_pri; - int m_tx_tilemap_mode; + UINT8 m_sprites_disabled = 0; + UINT8 m_flytiger_pri = 0; + UINT8 m_tx_pri = 0; + UINT8 m_palette_bank = 0; + int m_tx_tilemap_mode = 0; optional_device<buffered_spriteram8_device> m_spriteram; }; @@ -115,36 +196,34 @@ public: DECLARE_VIDEO_START(gulfstrm); DECLARE_VIDEO_START(pollux); - int m_interrupt_line_1; - int m_interrupt_line_2; + int m_interrupt_line_1 = 0; + int m_interrupt_line_2 = 0; }; class dooyong_68k_state : public dooyong_state { public: dooyong_68k_state(const machine_config &mconfig, device_type type, const char *tag) - : dooyong_state(mconfig, type, tag), - m_spriteram(*this, "spriteram") + : dooyong_state(mconfig, type, tag) + , m_bg_bitmap() + , m_bg2_bitmap() + , m_screen(*this, "screen") + , m_spriteram(*this, "spriteram") { } DECLARE_WRITE16_MEMBER(ctrl_w); TIMER_DEVICE_CALLBACK_MEMBER(scanline); - TILE_GET_INFO_MEMBER(rshark_get_bg_tile_info); - TILE_GET_INFO_MEMBER(rshark_get_bg2_tile_info); - TILE_GET_INFO_MEMBER(rshark_get_fg_tile_info); - TILE_GET_INFO_MEMBER(rshark_get_fg2_tile_info); - inline void rshark_get_tile_info(tile_data &tileinfo, int tile_index, UINT8 const *tilerom1, UINT8 const *tilerom2, UINT8 const *scroll, int graphics); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_rshark(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_popbingo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_VIDEO_START(rshark); DECLARE_VIDEO_START(popbingo); - UINT8 *m_bg_tilerom2; - UINT8 *m_bg2_tilerom2; - UINT8 *m_fg_tilerom2; - UINT8 *m_fg2_tilerom2; - UINT16 m_bg2_priority; + UINT16 m_bg2_priority = 0; + + bitmap_ind16 m_bg_bitmap; + bitmap_ind16 m_bg2_bitmap; + required_device<screen_device> m_screen; required_device<buffered_spriteram16_device> m_spriteram; }; diff --git a/src/mame/includes/vector06.h b/src/mame/includes/vector06.h index d26ef6a4fbe..3d1730b26a6 100644 --- a/src/mame/includes/vector06.h +++ b/src/mame/includes/vector06.h @@ -87,7 +87,7 @@ private: required_device<speaker_sound_device> m_speaker; required_device<cassette_image_device> m_cassette; required_device<generic_slot_device> m_cart; - required_device<fd1793_t> m_fdc; + required_device<kr1818vg93_t> m_fdc; required_device<floppy_connector> m_floppy0; required_device<floppy_connector> m_floppy1; required_device<i8255_device> m_ppi; diff --git a/src/mame/machine/vector06.cpp b/src/mame/machine/vector06.cpp index ea9f7a4a0fa..7383f1506c0 100644 --- a/src/mame/machine/vector06.cpp +++ b/src/mame/machine/vector06.cpp @@ -68,8 +68,8 @@ WRITE8_MEMBER( vector06_state::vector06_color_set ) READ8_MEMBER( vector06_state::vector06_romdisk_portb_r ) { - UINT16 addr = (m_romdisk_msb << 8) | m_romdisk_lsb; - if (m_cart->exists() && addr < m_cart->get_rom_size()) + UINT16 addr = ((m_romdisk_msb & 0x7f) << 8) | m_romdisk_lsb; + if ((m_romdisk_msb & 0x80) && m_cart->exists() && addr < m_cart->get_rom_size()) return m_cart->read_rom(space, addr); else return m_ay->ay8910_read_ym(); diff --git a/src/mame/video/bfm_dm01.cpp b/src/mame/video/bfm_dm01.cpp index 2760e7c47a0..7391a031a3e 100644 --- a/src/mame/video/bfm_dm01.cpp +++ b/src/mame/video/bfm_dm01.cpp @@ -101,8 +101,8 @@ void bfmdm01_device::device_start() m_screen->register_screen_bitmap(m_tmpbitmap); m_palette->set_pen_color(0, rgb_t(0, 0, 0)); // background - m_palette->set_pen_color(1, rgb_t(32, 16, 0)); // off dot - m_palette->set_pen_color(2, rgb_t(255, 160, 0)); // on dot + m_palette->set_pen_color(1, rgb_t(15, 1, 1)); // off dot + m_palette->set_pen_color(2, rgb_t(255, 31, 31)); // on dot } diff --git a/src/mame/video/dooyong.cpp b/src/mame/video/dooyong.cpp index acfa4d9cff4..dc70f88e502 100644 --- a/src/mame/video/dooyong.cpp +++ b/src/mame/video/dooyong.cpp @@ -1,71 +1,228 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria +// copyright-holders:Nicola Salmoria,Vas Crabb #include "emu.h" #include "includes/dooyong.h" -inline void dooyong_state::scroll8_w(offs_t offset, UINT8 data, UINT8 *scroll, tilemap_t *map) +/* These games all have ROM-based tilemaps for the backgrounds, title + screens and sometimes "bosses" and special attacks. There are three + schemes for tilemap encoding. The scheme is chosen based on the + contents of the tilemap control variables declared above. + Note that although the tilemaps are arbitrarily wide (hundreds of + thousands of pixels, depending on the size of the ROM), we only + decode a 1024 pixel wide block at a time, and invalidate the tilemap + when the x scroll moves out of range (trying to decode the whole lot + at once uses hundreds of megabytes of RAM). */ + +device_type const DOOYONG_ROM_TILEMAP = &device_creator<dooyong_rom_tilemap_device>; +device_type const RSHARK_ROM_TILEMAP = &device_creator<rshark_rom_tilemap_device>; + + +dooyong_rom_tilemap_device::dooyong_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock) + : dooyong_rom_tilemap_device(mconfig, DOOYONG_ROM_TILEMAP, "Dooyong ROM Tilemap", tag, owner, clock, "dooyong_rom_tilemap", __FILE__) +{ +} + +dooyong_rom_tilemap_device::dooyong_rom_tilemap_device( + machine_config const &mconfig, + device_type type, + char const *name, + char const *tag, + device_t *owner, + UINT32 clock, + char const *shortname, + char const *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source) + , m_rows(8) + , m_gfxdecode(*this, finder_base::DUMMY_TAG) + , m_tilerom(*this, finder_base::DUMMY_TAG) + , m_gfxnum(0) + , m_tilerom_offset(0) + , m_transparent_pen(~0U) + , m_primella_code_mask(0x03ff) + , m_primella_color_mask(0x3c00) + , m_primella_color_shift(10) + , m_tilemap(nullptr) + , m_registers{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + , m_palette_bank(0) +{ +} + +void dooyong_rom_tilemap_device::static_set_gfxdecode_tag(device_t &device, char const *tag) +{ + downcast<dooyong_rom_tilemap_device &>(device).m_gfxdecode.set_tag(tag); +} + +void dooyong_rom_tilemap_device::static_set_tilerom_tag(device_t &device, char const *tag) +{ + downcast<dooyong_rom_tilemap_device &>(device).m_tilerom.set_tag(tag); +} + +void dooyong_rom_tilemap_device::static_set_gfxnum(device_t &device, int gfxnum) +{ + downcast<dooyong_rom_tilemap_device &>(device).m_gfxnum = gfxnum; +} + +void dooyong_rom_tilemap_device::static_set_tilerom_offset(device_t &device, int offset) +{ + downcast<dooyong_rom_tilemap_device &>(device).m_tilerom_offset = offset; +} + +void dooyong_rom_tilemap_device::static_set_transparent_pen(device_t &device, unsigned pen) +{ + downcast<dooyong_rom_tilemap_device &>(device).m_transparent_pen = pen; +} + +void dooyong_rom_tilemap_device::static_set_primella_code_bits(device_t &device, unsigned bits) +{ + dooyong_rom_tilemap_device &tilemap_device(downcast<dooyong_rom_tilemap_device &>(device)); + tilemap_device.m_primella_code_mask = (1U << bits) - 1U; + tilemap_device.m_primella_color_mask = ((1U << 14) - 1) & ~tilemap_device.m_primella_code_mask; + tilemap_device.m_primella_color_shift = bits; +} + +void dooyong_rom_tilemap_device::draw(screen_device &screen, bitmap_ind16 &dest, rectangle const &cliprect, UINT32 flags, UINT8 priority) { - UINT8 const old = scroll[offset]; + m_tilemap->draw(screen, dest, cliprect, flags, priority); +} + +WRITE8_MEMBER(dooyong_rom_tilemap_device::ctrl_w) +{ + UINT8 const old = m_registers[offset]; if (old != data) { - scroll[offset] = data; - if (map != nullptr) switch (offset) + m_registers[offset] = data; + switch (offset) { - case 0: /* Low byte of x scroll - scroll tilemap */ - map->set_scrollx(0, data); + case 0: // Low byte of x scroll - scroll tilemap + m_tilemap->set_scrollx(0, data); break; - case 1: /* High byte of x scroll - mark tilemap dirty so new tile gfx will be loaded */ - map->mark_all_dirty(); + case 1: // High byte of x scroll - mark tilemap dirty so new tile gfx will be loaded + m_tilemap->mark_all_dirty(); break; - case 3: /* Low byte of y scroll */ - case 4: /* High byte of y scroll */ - map->set_scrolly(0, (unsigned)scroll[3] | ((unsigned)scroll[4] << 8)); + case 3: // Low byte of y scroll + case 4: // High byte of y scroll + m_tilemap->set_scrolly(0, m_registers[3] | (unsigned(m_registers[4]) << 8)); break; - case 6: /* Tilemap enable and mode control */ - map->enable(!(data & 0x10)); - if ((data & 0x20) != (old & 0x20)) // This sets the tilemap data format - map->mark_all_dirty(); + case 6: // Tilemap enable and mode control + m_tilemap->enable(!BIT(data, 4)); + if (BIT(data ^ old, 5)) // This sets the tilemap data format + m_tilemap->mark_all_dirty(); break; - default: /* Other addresses are used but function is unknown */ - /* 0x05 and 0x07 are initialised on startup */ - /* 0x02 is initialised on startup by some games and written to continuously by others */ - /*{ - const char *name; - if (scroll == m_bgscroll8) name = "bg"; - else if (scroll == m_bg2scroll8) name = "bg2"; - else if (scroll == m_fgscroll8) name = "fg"; - else if (scroll == m_fg2scroll8) name = "fg2"; - else name = "unknown"; - printf("Unknown %s tilemap control: 0x%02x = 0x%02x\n", name, (unsigned)offset, (unsigned)data); - }*/ + default: // Other addresses are used but function is unknown + // 0x05 and 0x07 are initialised on startup + // 0x02 is initialised on startup by some games and written to continuously by others + // printf("Unknown %s tilemap control: 0x%02x = 0x%02x\n", tag(), unsigned(offset), unsigned(data)); break; } } } +void dooyong_rom_tilemap_device::set_palette_bank(UINT16 bank) +{ + if (bank != m_palette_bank) + { + m_palette_bank = bank; + m_tilemap->mark_all_dirty(); + } +} + +void dooyong_rom_tilemap_device::device_start() +{ + if (!m_gfxdecode->started()) + throw device_missing_dependencies(); + + m_tilemap = &machine().tilemap().create( + *m_gfxdecode, + tilemap_get_info_delegate(FUNC(dooyong_rom_tilemap_device::tile_info), this), + TILEMAP_SCAN_COLS, + gfx().width(), + gfx().height(), + 1024 / gfx().width(), + m_rows); + if (~m_transparent_pen) + m_tilemap->set_transparent_pen(m_transparent_pen); + + if (0 > m_tilerom_offset) + m_tilerom_offset = m_tilerom.length() + m_tilerom_offset; + + std::fill(std::begin(m_registers), std::end(m_registers), 0); + m_palette_bank = 0U; + + save_item(NAME(m_registers)); + save_item(NAME(m_palette_bank)); +} + +TILE_GET_INFO_MEMBER(dooyong_rom_tilemap_device::tile_info) +{ + unsigned const attr = m_tilerom[m_tilerom_offset + adjust_tile_index(tile_index)]; + unsigned code, color, flags; + if (BIT(m_registers[6], 5)) + { // lastday/gulfstrm/pollux/flytiger + // Tiles take one word in ROM: + // MSB LSB + // cCCC CYXc cccc cccc (bit 9 of gfx code, bits 3-0 of color, Y flip, X flip, bits 8-0 of gfx code) + // c = gfx code + // C = color code + // X = x flip + // Y = y flip + code = (BIT(attr, 15) << 9) | (attr & 0x01ff); + color = m_palette_bank | ((attr >> 11) & 0x0fU); + flags = TILE_FLIPYX((attr >> 9) & 0x03U); + } + else + { // primella/popbingo + // Tiles take one word in ROM: + // MSB LSB + // primella YXCC CCcc cccc cccc (Y flip, X flip, bits 3-0 of color code, bits 9-0 of gfx code) + // popbingo YX?? ?ccc cccc cccc (Y flip, X flip, bits 3-0 of color code, bits 10-0 of gfx code) + // rshark YX?c cccc cccc cccc (Y flip, X flip, bits 3-0 of color code, bits 12-0 of gfx code) + // c = gfx code + // C = color code + // X = x flip + // Y = y flip + // ? = unused? + color = (attr & m_primella_color_mask) >> m_primella_color_shift; + flags = TILE_FLIPYX((attr >> 14) & 0x03U); + code = attr & m_primella_code_mask; + } + + tileinfo.set(m_gfxnum, code, color, flags); +} + -/* These handle writes to the tilemap scroll registers. - There is one per tilemap, wrapping the above function that does the work. */ +rshark_rom_tilemap_device::rshark_rom_tilemap_device(machine_config const &mconfig, char const *tag, device_t *owner, UINT32 clock) + : dooyong_rom_tilemap_device(mconfig, RSHARK_ROM_TILEMAP, "R-Shark ROM Tilemap", tag, owner, clock, "rshark_rom_tilemap", __FILE__) + , m_colorrom(*this, finder_base::DUMMY_TAG) + , m_colorrom_offset(0) +{ + m_rows = 32; +} -WRITE8_MEMBER(dooyong_state::bgscroll_w) +void rshark_rom_tilemap_device::static_set_colorrom_tag(device_t &device, char const *tag) { - scroll8_w(offset, data, m_bgscroll8, m_bg_tilemap); + downcast<rshark_rom_tilemap_device &>(device).m_colorrom.set_tag(tag); } -WRITE8_MEMBER(dooyong_state::bg2scroll_w) +void rshark_rom_tilemap_device::static_set_colorrom_offset(device_t &device, int offset) { - scroll8_w(offset, data, m_bg2scroll8, m_bg2_tilemap); + downcast<rshark_rom_tilemap_device &>(device).m_colorrom_offset = offset; } -WRITE8_MEMBER(dooyong_state::fgscroll_w) +void rshark_rom_tilemap_device::device_start() { - scroll8_w(offset, data, m_fgscroll8, m_fg_tilemap); + dooyong_rom_tilemap_device::device_start(); + + if (0 > m_colorrom_offset) + m_colorrom_offset = m_colorrom.length() + m_colorrom_offset; } -WRITE8_MEMBER(dooyong_state::fg2scroll_w) +TILE_GET_INFO_MEMBER(rshark_rom_tilemap_device::tile_info) { - scroll8_w(offset, data, m_fg2scroll8, m_fg2_tilemap); + dooyong_rom_tilemap_device::tile_info(tilemap, tileinfo, tile_index); + + UINT8 const color = m_colorrom[m_colorrom_offset + adjust_tile_index(tile_index)] & 0x0fU; + tileinfo.palette_base = gfx().colorbase() + (gfx().granularity() * (color % gfx().colors())); } @@ -111,13 +268,12 @@ WRITE8_MEMBER(dooyong_z80_ym2203_state::pollux_ctrl_w) machine().bookkeeping().coin_counter_w(1, data & 0x40); /* bit 1 is used but unknown - palette banking (both write and display based on pollux bombs) */ - int last_palbank = m_palette_bank; - if (m_paletteram_flytiger) m_palette_bank = (data & 0x02)>>1; - + UINT8 const last_palbank = m_palette_bank; + if (m_paletteram_flytiger) m_palette_bank = BIT(data, 1); if (last_palbank != m_palette_bank) { - m_bg_tilemap->mark_all_dirty(); - m_fg_tilemap->mark_all_dirty(); + m_bg->set_palette_bank(m_palette_bank << 6); + m_fg->set_palette_bank(m_palette_bank << 6); m_tx_tilemap->mark_all_dirty(); } @@ -146,7 +302,7 @@ WRITE8_MEMBER(dooyong_z80_state::primella_ctrl_w) READ8_MEMBER(dooyong_z80_state::paletteram_flytiger_r) { - if (m_palette_bank) offset+= 0x800; + if (m_palette_bank) offset |= 0x800; return m_paletteram_flytiger[offset]; } @@ -154,7 +310,7 @@ READ8_MEMBER(dooyong_z80_state::paletteram_flytiger_r) WRITE8_MEMBER(dooyong_z80_state::paletteram_flytiger_w) { - if (m_palette_bank) offset+= 0x800; + if (m_palette_bank) offset |= 0x800; m_paletteram_flytiger[offset] = data; UINT16 const value = m_paletteram_flytiger[offset & ~1] | (m_paletteram_flytiger[offset | 1] << 8); @@ -170,13 +326,12 @@ WRITE8_MEMBER(dooyong_z80_state::flytiger_ctrl_w) /* bits 1, 2 used but unknown */ /* bit 3 palette banking */ - int last_palbank = m_palette_bank; - m_palette_bank = (data & 0x08)>>3; - + UINT8 const last_palbank = m_palette_bank; + m_palette_bank = BIT(data, 3); if (last_palbank != m_palette_bank) { - m_bg_tilemap->mark_all_dirty(); - m_fg_tilemap->mark_all_dirty(); + m_bg->set_palette_bank(m_palette_bank << 6); + m_fg->set_palette_bank(m_palette_bank << 6); m_tx_tilemap->mark_all_dirty(); } @@ -185,84 +340,6 @@ WRITE8_MEMBER(dooyong_z80_state::flytiger_ctrl_w) } -/* These games all have ROM-based tilemaps for the backgrounds, title - screens and sometimes "bosses" and special attacks. There are three - schemes for tilemap encoding. The scheme is chosen based on the - contents of the tilemap control variables declared above. - Note that although the tilemaps are arbitrarily wide (hundreds of - thousands of pixels, depending on the size of the ROM), we only - decode a 1024 pixel wide block at a time, and invalidate the tilemap - when the x scroll moves out of range (trying to decode the whole lot - at once uses hundreds of megabytes of RAM). */ - -inline void dooyong_state::get_tile_info(tile_data &tileinfo, int tile_index, - UINT8 const *tilerom, UINT8 const *scroll, int graphics) -{ - int const offs = (tile_index + ((int)scroll[1] << 6)) * 2; - int const attr = tilerom[offs]; - int code, color, flags; - if (scroll[6] & 0x20) - { /* lastday/gulfstrm/pollux/flytiger */ - /* Tiles take two bytes in ROM: - MSB LSB - [offs + 0x00] cCCC CYXc (bit 9 of gfx code, bits 3-0 of color, Y flip, X flip, bit 8 of gfx code) - [offs + 0x01] cccc cccc (bits 7-0 of gfx code) - c = gfx code - C = color code - X = x flip - Y = y flip */ - code = tilerom[offs + 1] | ((attr & 0x01) << 8) | ((attr & 0x80) << 2); - color = (attr & 0x78) >> 3; - color += m_palette_bank * 0x40; - flags = TILE_FLIPYX((attr & 0x06) >> 1); - } - else - { /* primella/popbingo */ - /* Tiles take two bytes in ROM: - MSB LSB - [offs + 0x00] YXCC CCcc (Y flip, X flip, bits 3-0 of color code, bits 9-8 of gfx code) - [offs + 0x01] cccc cccc (bits 7-0 of gfx code) - c = gfx code - C = color code - X = x flip - Y = y flip */ - int codemask = 0x03; - int palmask = 0x3c; - - if (m_gfxdecode->gfx(1)->depth() == 256) // pop bingo has an 8bpp layer and uses what would be the low palette bit to address more tiles (girls 4,5,6 in bonus game) - { - codemask = 0x07; - palmask = 0x00; - } - - code = tilerom[offs + 1] | ((attr & codemask) << 8); - color = (attr & palmask) >> 2; - flags = TILE_FLIPYX((attr & 0xC0) >> 6); - } - - tileinfo.set(graphics, code, color, flags); -} - -TILE_GET_INFO_MEMBER(dooyong_state::get_bg_tile_info) -{ - get_tile_info(tileinfo, tile_index, m_bg_tilerom, m_bgscroll8, m_bg_gfx); -} - -TILE_GET_INFO_MEMBER(dooyong_state::get_bg2_tile_info) -{ - get_tile_info(tileinfo, tile_index, m_bg2_tilerom, m_bg2scroll8, m_bg2_gfx); -} - -TILE_GET_INFO_MEMBER(dooyong_state::get_fg_tile_info) -{ - get_tile_info(tileinfo, tile_index, m_fg_tilerom, m_fgscroll8, m_fg_gfx); -} - -TILE_GET_INFO_MEMBER(dooyong_state::get_fg2_tile_info) -{ - get_tile_info(tileinfo, tile_index, m_fg2_tilerom, m_fg2scroll8, m_fg2_gfx); -} - TILE_GET_INFO_MEMBER(dooyong_z80_state::get_tx_tile_info) { /* Each tile takes two bytes of memory: @@ -285,7 +362,7 @@ TILE_GET_INFO_MEMBER(dooyong_z80_state::get_tx_tile_info) int const code = m_txvideoram[offs] | ((attr & 0x0f) << 8); int const color = (attr & 0xf0) >> 4; - tileinfo.set(0, code, color + m_palette_bank *0x40, 0); + tileinfo.set(0, code, color | (m_palette_bank << 6), 0); } @@ -359,7 +436,7 @@ void dooyong_z80_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap flipy = !flipy; } - color += m_palette_bank * 0x40; + color |= m_palette_bank << 6; for (int y = 0; y <= height; y++) { @@ -386,8 +463,8 @@ UINT32 dooyong_z80_ym2203_state::screen_update_lastday(screen_device &screen, bi else m_tx_tilemap->set_scrolly(0, -8); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 1); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 2); + m_bg->draw(screen, bitmap, cliprect, 0, 1); + m_fg->draw(screen, bitmap, cliprect, 0, 2); m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 4); if (!m_sprites_disabled) @@ -407,8 +484,8 @@ UINT32 dooyong_z80_ym2203_state::screen_update_gulfstrm(screen_device &screen, b else m_tx_tilemap->set_scrolly(0, -8); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 1); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 2); + m_bg->draw(screen, bitmap, cliprect, 0, 1); + m_fg->draw(screen, bitmap, cliprect, 0, 2); m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 4); draw_sprites(screen, bitmap, cliprect, SPRITE_12BIT); @@ -421,8 +498,8 @@ UINT32 dooyong_z80_ym2203_state::screen_update_pollux(screen_device &screen, bit bitmap.fill(m_palette->black_pen(), cliprect); screen.priority().fill(0, cliprect); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 1); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 2); + m_bg->draw(screen, bitmap, cliprect, 0, 1); + m_fg->draw(screen, bitmap, cliprect, 0, 2); m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 4); draw_sprites(screen, bitmap, cliprect, SPRITE_12BIT | SPRITE_HEIGHT); @@ -437,13 +514,13 @@ UINT32 dooyong_z80_state::screen_update_flytiger(screen_device &screen, bitmap_i if (m_flytiger_pri) { - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 1); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 2); + m_fg->draw(screen, bitmap, cliprect, 0, 1); + m_bg->draw(screen, bitmap, cliprect, 0, 2); } else { - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 1); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 2); + m_bg->draw(screen, bitmap, cliprect, 0, 1); + m_fg->draw(screen, bitmap, cliprect, 0, 2); } m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 4); @@ -458,9 +535,9 @@ UINT32 dooyong_z80_state::screen_update_bluehawk(screen_device &screen, bitmap_i bitmap.fill(m_palette->black_pen(), cliprect); screen.priority().fill(0, cliprect); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 1); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 2); - m_fg2_tilemap->draw(screen, bitmap, cliprect, 0, 4); + m_bg->draw(screen, bitmap, cliprect, 0, 1); + m_fg->draw(screen, bitmap, cliprect, 0, 2); + m_fg2->draw(screen, bitmap, cliprect, 0, 4); m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 4); draw_sprites(screen, bitmap, cliprect, SPRITE_12BIT | SPRITE_HEIGHT | SPRITE_YSHIFT_BLUEHAWK); @@ -472,9 +549,9 @@ UINT32 dooyong_z80_state::screen_update_primella(screen_device &screen, bitmap_i { bitmap.fill(m_palette->black_pen(), cliprect); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + m_bg->draw(screen, bitmap, cliprect, 0, 0); if (m_tx_pri) m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + m_fg->draw(screen, bitmap, cliprect, 0, 0); if (!m_tx_pri) m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; @@ -485,35 +562,17 @@ UINT32 dooyong_z80_state::screen_update_primella(screen_device &screen, bitmap_i VIDEO_START_MEMBER(dooyong_z80_ym2203_state, lastday) { /* Configure tilemap callbacks */ - m_bg_tilerom = memregion("gfx5")->base(); - m_fg_tilerom = memregion("gfx6")->base(); - m_bg_gfx = 2; - m_fg_gfx = 3; m_tx_tilemap_mode = 0; /* Create tilemaps */ - m_bg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); - m_fg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); m_tx_tilemap = &machine().tilemap().create( *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_z80_state::get_tx_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 64, 32); /* Configure tilemap transparency */ - m_fg_tilemap->set_transparent_pen(15); m_tx_tilemap->set_transparent_pen(15); - memset(m_bgscroll8, 0, 0x10); - memset(m_bg2scroll8, 0, 0x10); - memset(m_fgscroll8, 0, 0x10); - memset(m_fg2scroll8, 0, 0x10); - /* Register for save/restore */ - save_item(NAME(m_bgscroll8)); - save_item(NAME(m_fgscroll8)); save_item(NAME(m_sprites_disabled)); save_item(NAME(m_interrupt_line_1)); save_item(NAME(m_interrupt_line_2)); @@ -522,35 +581,20 @@ VIDEO_START_MEMBER(dooyong_z80_ym2203_state, lastday) VIDEO_START_MEMBER(dooyong_z80_ym2203_state, gulfstrm) { /* Configure tilemap callbacks */ - m_bg_tilerom = memregion("gfx5")->base(); - m_fg_tilerom = memregion("gfx6")->base(); - m_bg_gfx = 2; - m_fg_gfx = 3; m_tx_tilemap_mode = 0; /* Create tilemaps */ - m_bg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); - m_fg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); m_tx_tilemap = &machine().tilemap().create( *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_z80_state::get_tx_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 64, 32); /* Configure tilemap transparency */ - m_fg_tilemap->set_transparent_pen(15); m_tx_tilemap->set_transparent_pen(15); - memset(m_bgscroll8, 0, 0x10); - memset(m_bg2scroll8, 0, 0x10); - memset(m_fgscroll8, 0, 0x10); - memset(m_fg2scroll8, 0, 0x10); + m_palette_bank = 0; /* Register for save/restore */ - save_item(NAME(m_bgscroll8)); - save_item(NAME(m_fgscroll8)); + save_item(NAME(m_palette_bank)); save_item(NAME(m_interrupt_line_1)); save_item(NAME(m_interrupt_line_2)); } @@ -558,38 +602,23 @@ VIDEO_START_MEMBER(dooyong_z80_ym2203_state, gulfstrm) VIDEO_START_MEMBER(dooyong_z80_ym2203_state, pollux) { /* Configure tilemap callbacks */ - m_bg_tilerom = memregion("gfx5")->base(); - m_fg_tilerom = memregion("gfx6")->base(); - m_bg_gfx = 2; - m_fg_gfx = 3; m_tx_tilemap_mode = 0; m_paletteram_flytiger = make_unique_clear<UINT8[]>(0x1000); save_pointer(NAME(m_paletteram_flytiger.get()), 0x1000); /* Create tilemaps */ - m_bg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); - m_fg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); m_tx_tilemap = &machine().tilemap().create( *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_z80_state::get_tx_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 64, 32); /* Configure tilemap transparency */ - m_fg_tilemap->set_transparent_pen(15); m_tx_tilemap->set_transparent_pen(15); - memset(m_bgscroll8, 0, 0x10); - memset(m_bg2scroll8, 0, 0x10); - memset(m_fgscroll8, 0, 0x10); - memset(m_fg2scroll8, 0, 0x10); + m_palette_bank = 0; /* Register for save/restore */ - save_item(NAME(m_bgscroll8)); - save_item(NAME(m_fgscroll8)); + save_item(NAME(m_palette_bank)); save_item(NAME(m_interrupt_line_1)); save_item(NAME(m_interrupt_line_2)); } @@ -597,115 +626,54 @@ VIDEO_START_MEMBER(dooyong_z80_ym2203_state, pollux) VIDEO_START_MEMBER(dooyong_z80_state, bluehawk) { /* Configure tilemap callbacks */ - m_bg_tilerom = memregion("gfx3")->base() + 0x78000; - m_fg_tilerom = memregion("gfx4")->base() + 0x78000; - m_fg2_tilerom = memregion("gfx5")->base() + 0x38000; - m_bg_gfx = 2; - m_fg_gfx = 3; - m_fg2_gfx = 4; m_tx_tilemap_mode = 1; /* Create tilemaps */ - m_bg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); - m_fg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); - m_fg2_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_fg2_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); m_tx_tilemap = &machine().tilemap().create( *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_z80_state::get_tx_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 64, 32); /* Configure tilemap transparency */ - m_fg_tilemap->set_transparent_pen(15); - m_fg2_tilemap->set_transparent_pen(15); m_tx_tilemap->set_transparent_pen(15); - - memset(m_bgscroll8, 0, 0x10); - memset(m_bg2scroll8, 0, 0x10); - memset(m_fgscroll8, 0, 0x10); - memset(m_fg2scroll8, 0, 0x10); - - /* Register for save/restore */ - save_item(NAME(m_bgscroll8)); - save_item(NAME(m_fgscroll8)); - save_item(NAME(m_fg2scroll8)); } VIDEO_START_MEMBER(dooyong_z80_state, flytiger) { /* Configure tilemap callbacks */ - m_bg_tilerom = memregion("gfx3")->base() + 0x78000; - m_fg_tilerom = memregion("gfx4")->base() + 0x78000; - m_bg_gfx = 2; - m_fg_gfx = 3; m_tx_tilemap_mode = 0; m_paletteram_flytiger = make_unique_clear<UINT8[]>(0x1000); save_pointer(NAME(m_paletteram_flytiger.get()), 0x1000); /* Create tilemaps */ - m_bg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); - m_fg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); m_tx_tilemap = &machine().tilemap().create( *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_z80_state::get_tx_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 64, 32); /* Configure tilemap transparency */ - m_bg_tilemap->set_transparent_pen(15); - m_fg_tilemap->set_transparent_pen(15); m_tx_tilemap->set_transparent_pen(15); - memset(m_bgscroll8, 0, 0x10); - memset(m_bg2scroll8, 0, 0x10); - memset(m_fgscroll8, 0, 0x10); - memset(m_fg2scroll8, 0, 0x10); + m_palette_bank = 0; /* Register for save/restore */ - save_item(NAME(m_bgscroll8)); - save_item(NAME(m_fgscroll8)); + save_item(NAME(m_palette_bank)); save_item(NAME(m_flytiger_pri)); } VIDEO_START_MEMBER(dooyong_z80_state, primella) { /* Configure tilemap callbacks */ - m_bg_tilerom = memregion("gfx2")->base() + memregion("gfx2")->bytes() - 0x8000; - m_fg_tilerom = memregion("gfx3")->base() + memregion("gfx3")->bytes() - 0x8000; - m_bg_gfx = 1; - m_fg_gfx = 2; m_tx_tilemap_mode = 1; /* Create tilemaps */ - m_bg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); - m_fg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_fg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); m_tx_tilemap = &machine().tilemap().create( *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_z80_state::get_tx_tile_info),this), TILEMAP_SCAN_COLS, 8, 8, 64, 32); /* Configure tilemap transparency */ - m_fg_tilemap->set_transparent_pen(15); m_tx_tilemap->set_transparent_pen(15); - memset(m_bgscroll8, 0, 0x10); - memset(m_bg2scroll8, 0, 0x10); - memset(m_fgscroll8, 0, 0x10); - memset(m_fg2scroll8, 0, 0x10); - /* Register for save/restore */ - save_item(NAME(m_bgscroll8)); - save_item(NAME(m_fgscroll8)); save_item(NAME(m_tx_pri)); } @@ -725,47 +693,6 @@ WRITE16_MEMBER(dooyong_68k_state::ctrl_w) } -inline void dooyong_68k_state::rshark_get_tile_info(tile_data &tileinfo, int tile_index, - UINT8 const *tilerom1, UINT8 const *tilerom2, UINT8 const *scroll, int graphics) -{ - /* Tiles take two bytes in tile ROM 1: - MSB LSB - [offs + 0x00] YX?c cccc (Y flip, X flip, bits 12-8 of gfx code) - [offs + 0x01] cccc cccc (bits 7-0 of gfx code) - ? = unused/unknown - c = gfx code - X = x flip - Y = y flip */ - int const offs = tile_index + ((int)scroll[1] << 9); - int const attr = tilerom1[offs * 2]; - int const code = tilerom1[(offs * 2) + 1] | ((attr & 0x1f) << 8); - int const color = tilerom2[offs] & 0x0f; - int const flags = TILE_FLIPYX((attr & 0xC0) >> 6); - - tileinfo.set(graphics, code, color, flags); -} - -TILE_GET_INFO_MEMBER(dooyong_68k_state::rshark_get_bg_tile_info) -{ - rshark_get_tile_info(tileinfo, tile_index, m_bg_tilerom, m_bg_tilerom2, m_bgscroll8, m_bg_gfx); -} - -TILE_GET_INFO_MEMBER(dooyong_68k_state::rshark_get_bg2_tile_info) -{ - rshark_get_tile_info(tileinfo, tile_index, m_bg2_tilerom, m_bg2_tilerom2, m_bg2scroll8, m_bg2_gfx); -} - -TILE_GET_INFO_MEMBER(dooyong_68k_state::rshark_get_fg_tile_info) -{ - rshark_get_tile_info(tileinfo, tile_index, m_fg_tilerom, m_fg_tilerom2, m_fgscroll8, m_fg_gfx); -} - -TILE_GET_INFO_MEMBER(dooyong_68k_state::rshark_get_fg2_tile_info) -{ - rshark_get_tile_info(tileinfo, tile_index, m_fg2_tilerom, m_fg2_tilerom2, m_fg2scroll8, m_fg2_gfx); -} - - void dooyong_68k_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* Sprites take 8 16-bit words each in memory: @@ -835,10 +762,10 @@ UINT32 dooyong_68k_state::screen_update_rshark(screen_device &screen, bitmap_ind bitmap.fill(m_palette->black_pen(), cliprect); screen.priority().fill(0, cliprect); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 1); - m_bg2_tilemap->draw(screen, bitmap, cliprect, 0, (m_bg2_priority ? 2 : 1)); - m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 2); - m_fg2_tilemap->draw(screen, bitmap, cliprect, 0, 2); + m_bg->draw(screen, bitmap, cliprect, 0, 1); + m_bg2->draw(screen, bitmap, cliprect, 0, (m_bg2_priority ? 2 : 1)); + m_fg->draw(screen, bitmap, cliprect, 0, 2); + m_fg2->draw(screen, bitmap, cliprect, 0, 2); draw_sprites(screen, bitmap, cliprect); @@ -850,7 +777,20 @@ UINT32 dooyong_68k_state::screen_update_popbingo(screen_device &screen, bitmap_i bitmap.fill(m_palette->black_pen(), cliprect); screen.priority().fill(0, cliprect); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 1); + m_bg_bitmap.fill(m_palette->black_pen(), cliprect); + m_bg->draw(screen, m_bg_bitmap, cliprect, 0, 1); + + m_bg2_bitmap.fill(m_palette->black_pen(), cliprect); + m_bg2->draw(screen, m_bg2_bitmap, cliprect, 0, 1); + + for (int y = cliprect.min_y; cliprect.max_y >= y; y++) + { + UINT16 const *const bg_src(&m_bg_bitmap.pix16(y, 0)); + UINT16 const *const bg2_src(&m_bg2_bitmap.pix16(y, 0)); + UINT16 *const dst(&bitmap.pix16(y, 0)); + for (int x = cliprect.min_x; cliprect.max_x >= x; x++) + dst[x] = 0x100U | (bg_src[x] << 4) | bg2_src[x]; + } draw_sprites(screen, bitmap, cliprect); @@ -861,73 +801,15 @@ UINT32 dooyong_68k_state::screen_update_popbingo(screen_device &screen, bitmap_i VIDEO_START_MEMBER(dooyong_68k_state, rshark) { - /* Configure tilemap callbacks */ - m_bg_tilerom = memregion("gfx5")->base(); - m_bg2_tilerom = memregion("gfx4")->base(); - m_fg_tilerom = memregion("gfx3")->base(); - m_fg2_tilerom = memregion("gfx2")->base(); - m_bg_tilerom2 = memregion("gfx6")->base() + 0x60000; - m_bg2_tilerom2 = memregion("gfx6")->base() + 0x40000; - m_fg_tilerom2 = memregion("gfx6")->base() + 0x20000; - m_fg2_tilerom2 = memregion("gfx6")->base() + 0x00000; - m_bg_gfx = 4; - m_bg2_gfx = 3; - m_fg_gfx = 2; - m_fg2_gfx = 1; - - /* Create tilemaps */ - m_bg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_68k_state::rshark_get_bg_tile_info),this), TILEMAP_SCAN_COLS, - 16, 16, 64, 32); - m_bg2_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_68k_state::rshark_get_bg2_tile_info),this), TILEMAP_SCAN_COLS, - 16, 16, 64, 32); - m_fg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_68k_state::rshark_get_fg_tile_info),this), TILEMAP_SCAN_COLS, - 16, 16, 64, 32); - m_fg2_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_68k_state::rshark_get_fg2_tile_info),this), TILEMAP_SCAN_COLS, - 16, 16, 64, 32); - - /* Configure tilemap transparency */ - m_bg2_tilemap->set_transparent_pen(15); - m_fg_tilemap->set_transparent_pen(15); - m_fg2_tilemap->set_transparent_pen(15); - - memset(m_bgscroll8, 0, 0x10); - memset(m_bg2scroll8, 0, 0x10); - memset(m_fgscroll8, 0, 0x10); - memset(m_fg2scroll8, 0, 0x10); - /* Register for save/restore */ - save_item(NAME(m_bgscroll8)); - save_item(NAME(m_bg2scroll8)); - save_item(NAME(m_fgscroll8)); - save_item(NAME(m_fg2scroll8)); save_item(NAME(m_bg2_priority)); } VIDEO_START_MEMBER(dooyong_68k_state, popbingo) { - /* Configure tilemap callbacks */ - m_bg_tilerom = memregion("gfx2")->base(); - m_bg_gfx = 1; - - /* Create tilemaps */ - m_bg_tilemap = &machine().tilemap().create( - *m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS, - 32, 32, 32, 8); - m_bg2_tilemap = m_fg_tilemap = m_fg2_tilemap = nullptr; /* Stop scroll handler from crashing on these */ - - memset(m_bgscroll8, 0, 0x10); - memset(m_bg2scroll8, 0, 0x10); - memset(m_fgscroll8, 0, 0x10); - memset(m_fg2scroll8, 0, 0x10); + m_screen->register_screen_bitmap(m_bg_bitmap); + m_screen->register_screen_bitmap(m_bg2_bitmap); /* Register for save/restore */ - save_item(NAME(m_bgscroll8)); - save_item(NAME(m_bg2scroll8)); // Not used atm - save_item(NAME(m_fgscroll8)); // Not used atm - save_item(NAME(m_fg2scroll8)); // Not used atm - save_item(NAME(m_bg2_priority)); + save_item(NAME(m_bg2_priority)); // Not used atm } diff --git a/src/mame/video/seibuspi.cpp b/src/mame/video/seibuspi.cpp index 4a655c1d38b..39267043faf 100644 --- a/src/mame/video/seibuspi.cpp +++ b/src/mame/video/seibuspi.cpp @@ -751,6 +751,8 @@ void seibuspi_state::video_start() m_palette_ram = make_unique_clear<UINT32[]>(m_palette_ram_size/4); m_sprite_ram = make_unique_clear<UINT32[]>(m_sprite_ram_size/4); + m_palette->basemem().set(&m_palette_ram[0], m_palette_ram_size, 32, ENDIANNESS_LITTLE, 2); + m_text_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(seibuspi_state::get_text_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64,32); m_back_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(seibuspi_state::get_back_tile_info),this), TILEMAP_SCAN_COLS, 16,16,32,32); m_midl_layer = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(seibuspi_state::get_midl_tile_info),this), TILEMAP_SCAN_COLS, 16,16,32,32); @@ -813,6 +815,8 @@ VIDEO_START_MEMBER(seibuspi_state,sys386f) m_palette_ram = make_unique_clear<UINT32[]>(m_palette_ram_size/4); m_sprite_ram = make_unique_clear<UINT32[]>(m_sprite_ram_size/4); + m_palette->basemem().set(&m_palette_ram[0], m_palette_ram_size, 32, ENDIANNESS_LITTLE, 2); + memset(m_alpha_table, 0, 0x2000); // no alpha blending register_video_state(); diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index bad84bf2b1c..d1d8e2158a8 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -167,8 +167,6 @@ constexpr UINT64 little_endianize_int64(UINT64 x) { return flipendian_int64(x); #ifdef _MSC_VER #include <malloc.h> using ssize_t = std::make_signed_t<size_t>; -#define __LINE__Var 0 -#define _CRT_STDIO_LEGACY_WIDE_SPECIFIERS #endif #ifdef __GNUC__ diff --git a/src/osd/sdl/window.cpp b/src/osd/sdl/window.cpp index f878a283748..450b4b59550 100644 --- a/src/osd/sdl/window.cpp +++ b/src/osd/sdl/window.cpp @@ -64,6 +64,8 @@ #define WMSZ_RIGHT (7) #endif +#define SDL_VERSION_EQUALS(v1, vnum2) (SDL_VERSIONNUM(v1.major, v1.minor, v1.patch) == vnum2) + class SDL_DM_Wrapper { public: @@ -714,6 +716,24 @@ int sdl_window_info::complete_create() */ #endif + // We need to workaround an issue in SDL 2.0.4 for OS X where setting the + // relative mode on the mouse in fullscreen mode makes mouse events stop + // It is fixed in the latest revisions so we'll assume it'll be fixed + // in the next public SDL release as well +#if defined(SDLMAME_MACOSX) && SDL_VERSION_ATLEAST(2, 0, 2) // SDL_HINT_MOUSE_RELATIVE_MODE_WARP is introduced in 2.0.2 + SDL_version linked; + SDL_GetVersion(&linked); + int revision = SDL_GetRevisionNumber(); + + // If we're running the exact version of SDL 2.0.4 (revision 10001) from the + // SDL web site, we need to work around this issue and send the warp mode hint + if (SDL_VERSION_EQUALS(linked, SDL_VERSIONNUM(2, 0, 4)) && revision == 10001) + { + osd_printf_verbose("Using warp mode for relative mouse in OS X SDL 2.0.4\n"); + SDL_SetHint(SDL_HINT_MOUSE_RELATIVE_MODE_WARP, "1"); + } +#endif + // create the SDL window // soft driver also used | SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_MOUSE_FOCUS m_extra_flags |= (fullscreen() ? |