diff options
author | 2015-05-02 19:41:03 +0200 | |
---|---|---|
committer | 2015-05-02 19:41:03 +0200 | |
commit | cc3b682e52bf097d31db78032aad01d6a0b12e94 (patch) | |
tree | 860c97ca011b64c31a5ad277f5cea2b1d86eeaf0 /src | |
parent | 7df6a23ba2ae1c1df94ed8cc2398f2546f339997 (diff) | |
parent | a649a95488e1fc85813dda747dc74c596496bd1c (diff) |
Merge pull request #1 from mamedev/master
Sync to master
Diffstat (limited to 'src')
994 files changed, 25252 insertions, 10790 deletions
diff --git a/src/emu/addrmap.c b/src/emu/addrmap.c index 4453da2668f..83bcbaaadac 100644 --- a/src/emu/addrmap.c +++ b/src/emu/addrmap.c @@ -490,8 +490,7 @@ void address_map::uplift_submaps(running_machine &machine, device_t &device, dev { if (entry->m_read.m_type == AMH_DEVICE_SUBMAP) { - astring tag; - owner.subtag(tag, entry->m_read.m_tag); + std::string tag = owner.subtag(entry->m_read.m_tag); device_t *mapdevice = machine.device(tag.c_str()); if (mapdevice == NULL) { throw emu_fatalerror("Attempted to submap a non-existent device '%s' in space %d of device '%s'\n", tag.c_str(), m_spacenum, device.basetag()); diff --git a/src/emu/audit.c b/src/emu/audit.c index 72bb77684d2..b8ab208d6a0 100644 --- a/src/emu/audit.c +++ b/src/emu/audit.c @@ -11,7 +11,7 @@ #include "emu.h" #include "emuopts.h" #include "audit.h" -#include "harddisk.h" +#include "chd.h" #include "sound/samples.h" @@ -64,9 +64,9 @@ const char *driverpath = m_enumerator.config().root_device().searchpath(); for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region)) { // temporary hack: add the driver path & region name -astring combinedpath = astring(device->searchpath()).cat(";").cat(driverpath); +std::string combinedpath = std::string(device->searchpath()).append(";").append(driverpath); if (device->shortname()) - combinedpath.cat(";").cat(device->shortname()); + combinedpath.append(";").append(device->shortname()); m_searchpath = combinedpath.c_str(); for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom)) @@ -188,19 +188,19 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, soft // store validation for later m_validation = validation; - astring combinedpath(swinfo->shortname()); - combinedpath.cat(";"); - combinedpath.cat(list_name); - combinedpath.cat(PATH_SEPARATOR); - combinedpath.cat(swinfo->shortname()); - astring locationtag(list_name); - locationtag.cat("%"); - locationtag.cat(swinfo->shortname()); - locationtag.cat("%"); + std::string combinedpath(swinfo->shortname()); + combinedpath.append(";"); + combinedpath.append(list_name); + combinedpath.append(PATH_SEPARATOR); + combinedpath.append(swinfo->shortname()); + std::string locationtag(list_name); + locationtag.append("%"); + locationtag.append(swinfo->shortname()); + locationtag.append("%"); if (swinfo->parentname() != NULL) { - locationtag.cat(swinfo->parentname()); - combinedpath.cat(";").cat(swinfo->parentname()).cat(";").cat(list_name).cat(PATH_SEPARATOR).cat(swinfo->parentname()); + locationtag.append(swinfo->parentname()); + combinedpath.append(";").append(swinfo->parentname()).append(";").append(list_name).append(PATH_SEPARATOR).append(swinfo->parentname()); } m_searchpath = combinedpath.c_str(); @@ -274,12 +274,12 @@ media_auditor::summary media_auditor::audit_samples() for (samples_device *device = iter.first(); device != NULL; device = iter.next()) { // by default we just search using the driver name - astring searchpath(m_enumerator.driver().name); + std::string searchpath(m_enumerator.driver().name); // add the alternate path if present samples_iterator iter(*device); if (iter.altbasename() != NULL) - searchpath.cat(";").cat(iter.altbasename()); + searchpath.append(";").append(iter.altbasename()); // iterate over samples in this entry for (const char *samplename = iter.first(); samplename != NULL; samplename = iter.next()) @@ -292,7 +292,7 @@ media_auditor::summary media_auditor::audit_samples() // look for the files emu_file file(m_enumerator.options().sample_path(), OPEN_FLAG_READ | OPEN_FLAG_NO_PRELOAD); path_iterator path(searchpath.c_str()); - astring curpath; + std::string curpath; while (path.next(curpath, samplename)) { // attempt to access the file (.flac) or (.wav) @@ -327,7 +327,7 @@ media_auditor::summary media_auditor::audit_samples() // string format //------------------------------------------------- -media_auditor::summary media_auditor::summarize(const char *name, astring *output) +media_auditor::summary media_auditor::summarize(const char *name, std::string *output) { if (m_record_list.count() == 0) { @@ -347,37 +347,37 @@ media_auditor::summary media_auditor::summarize(const char *name, astring *outpu // output the game name, file name, and length (if applicable) if (output != NULL) { - output->catprintf("%-12s: %s", name, record->name()); + strcatprintf(*output,"%-12s: %s", name, record->name()); if (record->expected_length() > 0) - output->catprintf(" (%" I64FMT "d bytes)", record->expected_length()); - output->catprintf(" - "); + strcatprintf(*output," (%" I64FMT "d bytes)", record->expected_length()); + strcatprintf(*output," - "); } // use the substatus for finer details switch (record->substatus()) { case audit_record::SUBSTATUS_GOOD_NEEDS_REDUMP: - if (output != NULL) output->catprintf("NEEDS REDUMP\n"); + if (output != NULL) strcatprintf(*output,"NEEDS REDUMP\n"); best_new_status = BEST_AVAILABLE; break; case audit_record::SUBSTATUS_FOUND_NODUMP: - if (output != NULL) output->catprintf("NO GOOD DUMP KNOWN\n"); + if (output != NULL) strcatprintf(*output,"NO GOOD DUMP KNOWN\n"); best_new_status = BEST_AVAILABLE; break; case audit_record::SUBSTATUS_FOUND_BAD_CHECKSUM: if (output != NULL) { - astring tempstr; - output->catprintf("INCORRECT CHECKSUM:\n"); - output->catprintf("EXPECTED: %s\n", record->expected_hashes().macro_string(tempstr)); - output->catprintf(" FOUND: %s\n", record->actual_hashes().macro_string(tempstr)); + std::string tempstr; + strcatprintf(*output,"INCORRECT CHECKSUM:\n"); + strcatprintf(*output,"EXPECTED: %s\n", record->expected_hashes().macro_string(tempstr)); + strcatprintf(*output," FOUND: %s\n", record->actual_hashes().macro_string(tempstr)); } break; case audit_record::SUBSTATUS_FOUND_WRONG_LENGTH: - if (output != NULL) output->catprintf("INCORRECT LENGTH: %" I64FMT "d bytes\n", record->actual_length()); + if (output != NULL) strcatprintf(*output,"INCORRECT LENGTH: %" I64FMT "d bytes\n", record->actual_length()); break; case audit_record::SUBSTATUS_NOT_FOUND: @@ -385,20 +385,20 @@ media_auditor::summary media_auditor::summarize(const char *name, astring *outpu { device_t *shared_device = record->shared_device(); if (shared_device == NULL) - output->catprintf("NOT FOUND\n"); + strcatprintf(*output,"NOT FOUND\n"); else - output->catprintf("NOT FOUND (%s)\n", shared_device->shortname()); + strcatprintf(*output,"NOT FOUND (%s)\n", shared_device->shortname()); } best_new_status = NOTFOUND; break; case audit_record::SUBSTATUS_NOT_FOUND_NODUMP: - if (output != NULL) output->catprintf("NOT FOUND - NO GOOD DUMP KNOWN\n"); + if (output != NULL) strcatprintf(*output,"NOT FOUND - NO GOOD DUMP KNOWN\n"); best_new_status = BEST_AVAILABLE; break; case audit_record::SUBSTATUS_NOT_FOUND_OPTIONAL: - if (output != NULL) output->catprintf("NOT FOUND BUT OPTIONAL\n"); + if (output != NULL) strcatprintf(*output,"NOT FOUND BUT OPTIONAL\n"); best_new_status = BEST_AVAILABLE; break; @@ -430,7 +430,7 @@ audit_record *media_auditor::audit_one_rom(const rom_entry *rom) emu_file file(m_enumerator.options().media_path(), OPEN_FLAG_READ | OPEN_FLAG_NO_PRELOAD); file.set_restrict_to_mediapath(true); path_iterator path(m_searchpath); - astring curpath; + std::string curpath; while (path.next(curpath, record.name())) { // open the file if we can diff --git a/src/emu/audit.h b/src/emu/audit.h index f769cbb22b1..5989fe5a10e 100644 --- a/src/emu/audit.h +++ b/src/emu/audit.h @@ -149,7 +149,7 @@ public: summary audit_device(device_t *device, const char *validation = AUDIT_VALIDATE_FULL); summary audit_software(const char *list_name, software_info *swinfo, const char *validation = AUDIT_VALIDATE_FULL); summary audit_samples(); - summary summarize(const char *name,astring *output = NULL); + summary summarize(const char *name,std::string *output = NULL); private: // internal helpers diff --git a/src/emu/bus/a1bus/a1cassette.c b/src/emu/bus/a1bus/a1cassette.c index 3c27cc339a1..daa79b15ce5 100644 --- a/src/emu/bus/a1bus/a1cassette.c +++ b/src/emu/bus/a1bus/a1cassette.c @@ -78,8 +78,7 @@ void a1bus_cassette_device::device_start() { set_a1bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, CASSETTE_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(CASSETTE_ROM_REGION).c_str())->base(); install_device(0xc000, 0xc0ff, read8_delegate(FUNC(a1bus_cassette_device::cassette_r), this), write8_delegate(FUNC(a1bus_cassette_device::cassette_w), this)); install_bank(0xc100, 0xc1ff, 0, 0, (char *)"bank_a1cas", m_rom); diff --git a/src/emu/bus/a1bus/a1cffa.c b/src/emu/bus/a1bus/a1cffa.c index da73162547b..f67470bb5db 100644 --- a/src/emu/bus/a1bus/a1cffa.c +++ b/src/emu/bus/a1bus/a1cffa.c @@ -73,8 +73,7 @@ void a1bus_cffa_device::device_start() { set_a1bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, CFFA_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(CFFA_ROM_REGION).c_str())->base(); install_device(0xafe0, 0xafff, read8_delegate(FUNC(a1bus_cffa_device::cffa_r), this), write8_delegate(FUNC(a1bus_cffa_device::cffa_w), this)); install_bank(0x9000, 0xafdf, 0, 0, (char *)"bank_cffa1", m_rom); diff --git a/src/emu/bus/a2bus/a2applicard.c b/src/emu/bus/a2bus/a2applicard.c index 4552ee3dd62..224c7be6d20 100644 --- a/src/emu/bus/a2bus/a2applicard.c +++ b/src/emu/bus/a2bus/a2applicard.c @@ -97,8 +97,7 @@ void a2bus_applicard_device::device_start() set_a2bus_device(); // locate Z80 ROM - astring tempstring; - m_z80rom = device().machine().root_device().memregion(this->subtag(tempstring, Z80_ROM_REGION).c_str())->base(); + m_z80rom = device().machine().root_device().memregion(this->subtag(Z80_ROM_REGION).c_str())->base(); save_item(NAME(m_bROMAtZ80Zero)); save_item(NAME(m_z80stat)); diff --git a/src/emu/bus/a2bus/a2cffa.c b/src/emu/bus/a2bus/a2cffa.c index 484e121948a..ff3da1b21db 100644 --- a/src/emu/bus/a2bus/a2cffa.c +++ b/src/emu/bus/a2bus/a2cffa.c @@ -109,8 +109,7 @@ void a2bus_cffa2000_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, CFFA2_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(CFFA2_ROM_REGION).c_str())->base(); // patch default setting so slave device is enabled and up to 13 devices on both connectors m_rom[0x800] = 13; diff --git a/src/emu/bus/a2bus/a2corvus.c b/src/emu/bus/a2bus/a2corvus.c index 3f85c8446af..a770da679a9 100644 --- a/src/emu/bus/a2bus/a2corvus.c +++ b/src/emu/bus/a2bus/a2corvus.c @@ -122,8 +122,7 @@ void a2bus_corvus_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, CORVUS_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(CORVUS_ROM_REGION).c_str())->base(); } void a2bus_corvus_device::device_reset() diff --git a/src/emu/bus/a2bus/a2diskii.c b/src/emu/bus/a2bus/a2diskii.c index d48a4ccd7e2..1a94c699442 100644 --- a/src/emu/bus/a2bus/a2diskii.c +++ b/src/emu/bus/a2bus/a2diskii.c @@ -114,8 +114,7 @@ void a2bus_floppy_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, DISKII_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(DISKII_ROM_REGION).c_str())->base(); } void a2bus_floppy_device::device_reset() diff --git a/src/emu/bus/a2bus/a2diskiing.c b/src/emu/bus/a2bus/a2diskiing.c index 843b7cde714..d6d7b6c6089 100644 --- a/src/emu/bus/a2bus/a2diskiing.c +++ b/src/emu/bus/a2bus/a2diskiing.c @@ -84,8 +84,7 @@ void a2bus_diskiing_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, DISKII_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(DISKII_ROM_REGION).c_str())->base(); } void a2bus_diskiing_device::device_reset() diff --git a/src/emu/bus/a2bus/a2hsscsi.c b/src/emu/bus/a2bus/a2hsscsi.c index ef912a2ea7f..5463f48152f 100644 --- a/src/emu/bus/a2bus/a2hsscsi.c +++ b/src/emu/bus/a2bus/a2hsscsi.c @@ -136,8 +136,7 @@ void a2bus_hsscsi_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, SCSI_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(SCSI_ROM_REGION).c_str())->base(); memset(m_ram, 0, 8192); diff --git a/src/emu/bus/a2bus/a2memexp.c b/src/emu/bus/a2bus/a2memexp.c index 2ae514b6495..9da8130ce03 100644 --- a/src/emu/bus/a2bus/a2memexp.c +++ b/src/emu/bus/a2bus/a2memexp.c @@ -102,8 +102,7 @@ void a2bus_memexp_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, MEMEXP_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(MEMEXP_ROM_REGION).c_str())->base(); memset(m_ram, 0xff, 1024*1024*sizeof(UINT8)); diff --git a/src/emu/bus/a2bus/a2pic.c b/src/emu/bus/a2bus/a2pic.c index 19d5a442c6a..009aead5a01 100644 --- a/src/emu/bus/a2bus/a2pic.c +++ b/src/emu/bus/a2bus/a2pic.c @@ -127,8 +127,7 @@ void a2bus_pic_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, PIC_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(PIC_ROM_REGION).c_str())->base(); m_timer = timer_alloc(0, NULL); m_timer->adjust(attotime::never); diff --git a/src/emu/bus/a2bus/a2scsi.c b/src/emu/bus/a2bus/a2scsi.c index e85ccc53115..b7816a09d23 100644 --- a/src/emu/bus/a2bus/a2scsi.c +++ b/src/emu/bus/a2bus/a2scsi.c @@ -129,8 +129,7 @@ void a2bus_scsi_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, SCSI_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(SCSI_ROM_REGION).c_str())->base(); memset(m_ram, 0, 8192); diff --git a/src/emu/bus/a2bus/a2ssc.c b/src/emu/bus/a2bus/a2ssc.c index 8fcfd4d4b63..16c0050f702 100644 --- a/src/emu/bus/a2bus/a2ssc.c +++ b/src/emu/bus/a2bus/a2ssc.c @@ -154,8 +154,7 @@ void a2bus_ssc_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, SSC_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(SSC_ROM_REGION).c_str())->base(); } void a2bus_ssc_device::device_reset() diff --git a/src/emu/bus/a2bus/a2swyft.c b/src/emu/bus/a2bus/a2swyft.c index bbfb910d920..d998f57475a 100644 --- a/src/emu/bus/a2bus/a2swyft.c +++ b/src/emu/bus/a2bus/a2swyft.c @@ -64,8 +64,7 @@ void a2bus_swyft_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, SWYFT_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(SWYFT_ROM_REGION).c_str())->base(); save_item(NAME(m_rombank)); } diff --git a/src/emu/bus/a2bus/a2thunderclock.c b/src/emu/bus/a2bus/a2thunderclock.c index 34780319800..3bccff5788f 100644 --- a/src/emu/bus/a2bus/a2thunderclock.c +++ b/src/emu/bus/a2bus/a2thunderclock.c @@ -97,8 +97,7 @@ void a2bus_thunderclock_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, THUNDERCLOCK_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(THUNDERCLOCK_ROM_REGION).c_str())->base(); save_item(NAME(m_dataout)); } diff --git a/src/emu/bus/a2bus/a2ultraterm.c b/src/emu/bus/a2bus/a2ultraterm.c index dc078a62172..9dc0882b3b8 100644 --- a/src/emu/bus/a2bus/a2ultraterm.c +++ b/src/emu/bus/a2bus/a2ultraterm.c @@ -162,11 +162,9 @@ void a2bus_videx160_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, ULTRATERM_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(ULTRATERM_ROM_REGION).c_str())->base(); - astring tempstring2; - m_chrrom = device().machine().root_device().memregion(this->subtag(tempstring2, ULTRATERM_GFX_REGION).c_str())->base(); + m_chrrom = device().machine().root_device().memregion(this->subtag(ULTRATERM_GFX_REGION).c_str())->base(); memset(m_ram, 0, 256*16); diff --git a/src/emu/bus/a2bus/a2videoterm.c b/src/emu/bus/a2bus/a2videoterm.c index eeccd16bd78..5d6406a0ead 100644 --- a/src/emu/bus/a2bus/a2videoterm.c +++ b/src/emu/bus/a2bus/a2videoterm.c @@ -217,11 +217,9 @@ void a2bus_videx80_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, VIDEOTERM_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(VIDEOTERM_ROM_REGION).c_str())->base(); - astring tempstring2; - m_chrrom = device().machine().root_device().memregion(this->subtag(tempstring2, VIDEOTERM_GFX_REGION).c_str())->base(); + m_chrrom = device().machine().root_device().memregion(this->subtag(VIDEOTERM_GFX_REGION).c_str())->base(); memset(m_ram, 0, 4*512); diff --git a/src/emu/bus/a2bus/a2vulcan.c b/src/emu/bus/a2bus/a2vulcan.c index 52ffd8f0c9c..dae999c3932 100644 --- a/src/emu/bus/a2bus/a2vulcan.c +++ b/src/emu/bus/a2bus/a2vulcan.c @@ -138,8 +138,7 @@ void a2bus_vulcanbase_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, VULCAN_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(VULCAN_ROM_REGION).c_str())->base(); save_item(NAME(m_lastdata)); save_item(NAME(m_ram)); diff --git a/src/emu/bus/a2bus/a2zipdrive.c b/src/emu/bus/a2bus/a2zipdrive.c index d16bc099f04..8b4f7f04524 100644 --- a/src/emu/bus/a2bus/a2zipdrive.c +++ b/src/emu/bus/a2bus/a2zipdrive.c @@ -88,8 +88,7 @@ void a2bus_zipdrivebase_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, ZIPDRIVE_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(ZIPDRIVE_ROM_REGION).c_str())->base(); save_item(NAME(m_lastdata)); } diff --git a/src/emu/bus/a2bus/corvfdc01.c b/src/emu/bus/a2bus/corvfdc01.c index 9c8382513cc..d0fe1d9ed22 100644 --- a/src/emu/bus/a2bus/corvfdc01.c +++ b/src/emu/bus/a2bus/corvfdc01.c @@ -139,8 +139,7 @@ void a2bus_corvfdc01_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, FDC01_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(FDC01_ROM_REGION).c_str())->base(); save_item(NAME(m_fdc_local_status)); save_item(NAME(m_fdc_local_command)); diff --git a/src/emu/bus/a2bus/corvfdc02.c b/src/emu/bus/a2bus/corvfdc02.c index 8302a88343e..653098c54af 100644 --- a/src/emu/bus/a2bus/corvfdc02.c +++ b/src/emu/bus/a2bus/corvfdc02.c @@ -35,6 +35,7 @@ static SLOT_INTERFACE_START( corv_floppies ) SLOT_INTERFACE( "525dsqd", FLOPPY_525_QD ) SLOT_INTERFACE_END + MACHINE_CONFIG_FRAGMENT( fdc02 ) MCFG_UPD765A_ADD(FDC02_FDC_TAG, true, false) MCFG_UPD765_INTRQ_CALLBACK(WRITELINE(a2bus_corvfdc02_device, intrq_w)) @@ -108,8 +109,7 @@ void a2bus_corvfdc02_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, FDC02_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(FDC02_ROM_REGION).c_str())->base(); m_timer = timer_alloc(0); diff --git a/src/emu/bus/a2bus/mouse.c b/src/emu/bus/a2bus/mouse.c index 7327ed8dc96..816a8a28ffd 100644 --- a/src/emu/bus/a2bus/mouse.c +++ b/src/emu/bus/a2bus/mouse.c @@ -205,8 +205,7 @@ void a2bus_mouse_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, MOUSE_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(MOUSE_ROM_REGION).c_str())->base(); // allocate two timers: one for the 68705, one for the quadrature magic m_timer = timer_alloc(TIMER_68705, NULL); diff --git a/src/emu/bus/a2bus/timemasterho.c b/src/emu/bus/a2bus/timemasterho.c index 0639afa0b38..d93e6d97500 100644 --- a/src/emu/bus/a2bus/timemasterho.c +++ b/src/emu/bus/a2bus/timemasterho.c @@ -148,8 +148,7 @@ void a2bus_timemasterho_device::device_start() // set_a2bus_device makes m_slot valid set_a2bus_device(); - astring tempstring; - m_rom = device().machine().root_device().memregion(this->subtag(tempstring, TIMEMASTER_ROM_REGION).c_str())->base(); + m_rom = device().machine().root_device().memregion(this->subtag(TIMEMASTER_ROM_REGION).c_str())->base(); } void a2bus_timemasterho_device::device_reset() diff --git a/src/emu/bus/a7800/a78_slot.c b/src/emu/bus/a7800/a78_slot.c index 2db5871323f..64114d5de8f 100644 --- a/src/emu/bus/a7800/a78_slot.c +++ b/src/emu/bus/a7800/a78_slot.c @@ -66,9 +66,7 @@ void device_a78_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(A78SLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(A78SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; // setup other helpers @@ -530,7 +528,7 @@ int a78_cart_slot_device::verify_header(char *header) get default card software -------------------------------------------------*/ -void a78_cart_slot_device::get_default_card_software(astring &result) +void a78_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -588,7 +586,7 @@ void a78_cart_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); } else software_get_default_slot(result, "a78_rom"); @@ -733,75 +731,75 @@ void a78_cart_slot_device::internal_header_logging(UINT8 *header, UINT32 len) UINT8 head_ctrl1 = header[55]; UINT8 head_ctrl2 = header[56]; UINT8 head_ispal = header[57]; - astring cart_mapper, ctrl1, ctrl2; + std::string cart_mapper, ctrl1, ctrl2; memcpy(head_title, header + 0x11, 0x20); switch (head_mapper) { case 0x0000: - cart_mapper.cpy("No Bankswitch"); + cart_mapper.assign("No Bankswitch"); break; case 0x0001: - cart_mapper.cpy("No Bankswitch + POKEY"); + cart_mapper.assign("No Bankswitch + POKEY"); break; case 0x0002: - cart_mapper.cpy("SuperCart Bankswitch"); + cart_mapper.assign("SuperCart Bankswitch"); break; case 0x0003: - cart_mapper.cpy("SuperCart Bankswitch + POKEY"); + cart_mapper.assign("SuperCart Bankswitch + POKEY"); break; case 0x0006: - cart_mapper.cpy("SuperCart Bankswitch + RAM"); + cart_mapper.assign("SuperCart Bankswitch + RAM"); break; case 0x000a: - cart_mapper.cpy("SuperCart 9Banks"); + cart_mapper.assign("SuperCart 9Banks"); break; case 0x000b: - cart_mapper.cpy("SuperCart XM Compatible"); + cart_mapper.assign("SuperCart XM Compatible"); break; case 0x0020: - cart_mapper.cpy("SuperCart Bankswitch + 32K RAM"); + cart_mapper.assign("SuperCart Bankswitch + 32K RAM"); break; case 0x0100: - cart_mapper.cpy("Activision Bankswitch"); + cart_mapper.assign("Activision Bankswitch"); break; case 0x0200: - cart_mapper.cpy("Absolute Bankswitch"); + cart_mapper.assign("Absolute Bankswitch"); break; default: - cart_mapper.cpy("Unknown mapper"); + cart_mapper.assign("Unknown mapper"); break; } switch (head_ctrl1) { case 0x00: - ctrl1.cpy("None"); + ctrl1.assign("None"); break; case 0x01: - ctrl1.cpy("Joystick"); + ctrl1.assign("Joystick"); break; case 0x02: - ctrl1.cpy("Light Gun"); + ctrl1.assign("Light Gun"); break; default: - ctrl1.cpy("Unknown controller"); + ctrl1.assign("Unknown controller"); break; } switch (head_ctrl2) { case 0x00: - ctrl2.cpy("None"); + ctrl2.assign("None"); break; case 0x01: - ctrl2.cpy("Joystick"); + ctrl2.assign("Joystick"); break; case 0x02: - ctrl2.cpy("Light Gun"); + ctrl2.assign("Light Gun"); break; default: - ctrl2.cpy("Unknown controller"); + ctrl2.assign("Unknown controller"); break; } diff --git a/src/emu/bus/a7800/a78_slot.h b/src/emu/bus/a7800/a78_slot.h index 5fdecfc0c45..a42954677ce 100644 --- a/src/emu/bus/a7800/a78_slot.h +++ b/src/emu/bus/a7800/a78_slot.h @@ -114,7 +114,7 @@ public: virtual device_image_partialhash_func get_partial_hash() const { return &a78_partialhash; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_04xx); diff --git a/src/emu/bus/a800/a800_slot.c b/src/emu/bus/a800/a800_slot.c index 650ba7a02d6..028fa02b2a0 100644 --- a/src/emu/bus/a800/a800_slot.c +++ b/src/emu/bus/a800/a800_slot.c @@ -63,9 +63,7 @@ void device_a800_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(A800SLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(A800SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; // setup other helpers @@ -408,7 +406,7 @@ int a800_cart_slot_device::identify_cart_type(UINT8 *header) get default card software -------------------------------------------------*/ -void a800_cart_slot_device::get_default_card_software(astring &result) +void a800_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -438,14 +436,14 @@ void a800_cart_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); } else software_get_default_slot(result, "a800_8k"); } -void a5200_cart_slot_device::get_default_card_software(astring &result) +void a5200_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -460,8 +458,8 @@ void a5200_cart_slot_device::get_default_card_software(astring &result) core_fread(m_file, &head[0], 0x10); type = identify_cart_type(&head[0]); - astring info; - if (hashfile_extrainfo(*this, info) && info == "A13MIRRORING") + std::string info; + if (hashfile_extrainfo(*this, info) && info.compare("A13MIRRORING")==0) type = A5200_16K_2CHIPS; } if (type < A5200_4K) @@ -471,14 +469,14 @@ void a5200_cart_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); } else software_get_default_slot(result, "a5200"); } -void xegs_cart_slot_device::get_default_card_software(astring &result) +void xegs_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -506,7 +504,7 @@ void xegs_cart_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); } else software_get_default_slot(result, "xegs"); diff --git a/src/emu/bus/a800/a800_slot.h b/src/emu/bus/a800/a800_slot.h index 491daa03e60..9995083437d 100644 --- a/src/emu/bus/a800/a800_slot.h +++ b/src/emu/bus/a800/a800_slot.h @@ -113,7 +113,7 @@ public: virtual const char *file_extensions() const { return "bin,rom,car"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_80xx); @@ -142,7 +142,7 @@ public: virtual const char *file_extensions() const { return "bin,rom,car,a52"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); }; // ======================> xegs_cart_slot_device @@ -157,7 +157,7 @@ public: virtual const char *file_extensions() const { return "bin,rom,car"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); }; // device type definition diff --git a/src/emu/bus/abcbus/abc890.h b/src/emu/bus/abcbus/abc890.h index 0bc29b02ad7..3d808ec5a28 100644 --- a/src/emu/bus/abcbus/abc890.h +++ b/src/emu/bus/abcbus/abc890.h @@ -26,7 +26,7 @@ // ======================> abc890_t class abc890_t : public device_t, - public device_abcbus_card_interface + public device_abcbus_card_interface { public: // construction/destruction diff --git a/src/emu/bus/abcbus/fd2.c b/src/emu/bus/abcbus/fd2.c index a792b0d88ab..0d5d8c3d93b 100644 --- a/src/emu/bus/abcbus/fd2.c +++ b/src/emu/bus/abcbus/fd2.c @@ -100,7 +100,7 @@ WRITE8_MEMBER( abc_fd2_t::status_w ) 3 4 5 - 6 + 6 7 */ @@ -154,11 +154,11 @@ READ8_MEMBER( abc_fd2_t::pio_pb_r ) bit description - 0 - 1 - 2 - 3 - 4 + 0 + 1 + 2 + 3 + 4 5 DRQ 6 HLD 7 INTRQ @@ -185,9 +185,9 @@ WRITE8_MEMBER( abc_fd2_t::pio_pb_w ) 2 TG43 3 MON 4 HLT - 5 - 6 - 7 + 5 + 6 + 7 */ diff --git a/src/emu/bus/abcbus/fd2.h b/src/emu/bus/abcbus/fd2.h index e41fa8d66e5..d0774818dbb 100644 --- a/src/emu/bus/abcbus/fd2.h +++ b/src/emu/bus/abcbus/fd2.h @@ -31,7 +31,7 @@ // ======================> abc_fd2_t class abc_fd2_t : public device_t, - public device_abcbus_card_interface + public device_abcbus_card_interface { public: // construction/destruction diff --git a/src/emu/bus/abcbus/lux4105.c b/src/emu/bus/abcbus/lux4105.c index bebfbe04e04..8d3422d8913 100644 --- a/src/emu/bus/abcbus/lux4105.c +++ b/src/emu/bus/abcbus/lux4105.c @@ -177,14 +177,21 @@ inline void luxor_4105_device::update_trrq_int() // luxor_4105_device - constructor //------------------------------------------------- -luxor_4105_device::luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, LUXOR_4105, "Luxor 4105", tag, owner, clock, "lux4105", __FILE__), - device_abcbus_card_interface(mconfig, *this), - m_sasibus(*this, SASIBUS_TAG), - m_sasi_data_out(*this, "sasi_data_out"), - m_sasi_data_in(*this, "sasi_data_in"), - m_1e(*this, "1E"), - m_5e(*this, "5E") +luxor_4105_device::luxor_4105_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, LUXOR_4105, "Luxor 4105", tag, owner, clock, "lux4105", __FILE__), + device_abcbus_card_interface(mconfig, *this), + m_sasibus(*this, SASIBUS_TAG), + m_sasi_data_out(*this, "sasi_data_out"), + m_sasi_data_in(*this, "sasi_data_in"), + m_1e(*this, "1E"), + m_5e(*this, "5E"), + m_cs(false), + m_data(0), + m_dma(0), + m_sasi_bsy(0), + m_sasi_req(0), + m_sasi_cd(0), + m_sasi_io(0) { } @@ -208,7 +215,7 @@ void luxor_4105_device::device_start() void luxor_4105_device::device_reset() { - m_cs = 0; + m_cs = false; m_data = 0; m_dma = 0; @@ -264,10 +271,10 @@ UINT8 luxor_4105_device::abcbus_stat() */ - data = m_sasi_bsy; - data |= m_sasi_req << 2; - data |= m_sasi_cd << 3; - data |= m_sasi_io << 6; + data = !m_sasi_bsy; + data |= !m_sasi_req << 2; + data |= !m_sasi_cd << 3; + data |= !m_sasi_io << 6; } return data; diff --git a/src/emu/bus/abcbus/lux4105.h b/src/emu/bus/abcbus/lux4105.h index 39d05c7735a..d00511a727b 100644 --- a/src/emu/bus/abcbus/lux4105.h +++ b/src/emu/bus/abcbus/lux4105.h @@ -36,7 +36,7 @@ // ======================> luxor_4105_device class luxor_4105_device : public device_t, - public device_abcbus_card_interface + public device_abcbus_card_interface { public: // construction/destruction @@ -76,7 +76,7 @@ private: required_ioport m_1e; required_ioport m_5e; - int m_cs; + bool m_cs; UINT8 m_data; UINT8 m_dma; diff --git a/src/emu/bus/abcbus/memcard.h b/src/emu/bus/abcbus/memcard.h index d7b9aac41b4..e901ac5050c 100644 --- a/src/emu/bus/abcbus/memcard.h +++ b/src/emu/bus/abcbus/memcard.h @@ -26,7 +26,7 @@ // ======================> abc_memory_card_t class abc_memory_card_t : public device_t, - public device_abcbus_card_interface + public device_abcbus_card_interface { public: // construction/destruction diff --git a/src/emu/bus/abcbus/ram.h b/src/emu/bus/abcbus/ram.h index 3f3a1efda72..64f3265422d 100644 --- a/src/emu/bus/abcbus/ram.h +++ b/src/emu/bus/abcbus/ram.h @@ -26,7 +26,7 @@ // ======================> abc80_16kb_ram_card_t class abc80_16kb_ram_card_t : public device_t, - public device_abcbus_card_interface + public device_abcbus_card_interface { public: // construction/destruction diff --git a/src/emu/bus/adam/exp.c b/src/emu/bus/adam/exp.c index b6b59d79a5a..6cfc04ad7fe 100644 --- a/src/emu/bus/adam/exp.c +++ b/src/emu/bus/adam/exp.c @@ -127,7 +127,7 @@ bool adam_expansion_slot_device::call_softlist_load(software_list_device &swlist // get_default_card_software - //------------------------------------------------- -void adam_expansion_slot_device::get_default_card_software(astring &result) +void adam_expansion_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "standard"); } diff --git a/src/emu/bus/adam/exp.h b/src/emu/bus/adam/exp.h index 59a24cd7a09..c352eff6a77 100644 --- a/src/emu/bus/adam/exp.h +++ b/src/emu/bus/adam/exp.h @@ -90,7 +90,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); devcb_write_line m_write_irq; diff --git a/src/emu/bus/apf/slot.c b/src/emu/bus/apf/slot.c index 80e08a5753a..7d4df6a9a08 100644 --- a/src/emu/bus/apf/slot.c +++ b/src/emu/bus/apf/slot.c @@ -49,9 +49,7 @@ void device_apf_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(APFSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(APFSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -223,7 +221,7 @@ bool apf_cart_slot_device::call_softlist_load(software_list_device &swlist, cons get default card software -------------------------------------------------*/ -void apf_cart_slot_device::get_default_card_software(astring &result) +void apf_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -242,7 +240,7 @@ void apf_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/apf/slot.h b/src/emu/bus/apf/slot.h index ab0c054cf2b..53ea98be030 100644 --- a/src/emu/bus/apf/slot.h +++ b/src/emu/bus/apf/slot.h @@ -84,7 +84,7 @@ public: virtual const char *file_extensions() const { return "bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/emu/bus/arcadia/slot.c b/src/emu/bus/arcadia/slot.c index 119d5d2d883..4d3d5e26012 100644 --- a/src/emu/bus/arcadia/slot.c +++ b/src/emu/bus/arcadia/slot.c @@ -49,9 +49,7 @@ void device_arcadia_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(EA2001SLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(EA2001SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -232,7 +230,7 @@ bool arcadia_cart_slot_device::call_softlist_load(software_list_device &swlist, get default card software -------------------------------------------------*/ -void arcadia_cart_slot_device::get_default_card_software(astring &result) +void arcadia_cart_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "std"); } diff --git a/src/emu/bus/arcadia/slot.h b/src/emu/bus/arcadia/slot.h index ce9f6363dbd..52fa63ac8a6 100644 --- a/src/emu/bus/arcadia/slot.h +++ b/src/emu/bus/arcadia/slot.h @@ -73,7 +73,7 @@ public: virtual const char *file_extensions() const { return "bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/emu/bus/astrocde/slot.c b/src/emu/bus/astrocde/slot.c index 706f3a821de..222c0605e9e 100644 --- a/src/emu/bus/astrocde/slot.c +++ b/src/emu/bus/astrocde/slot.c @@ -49,9 +49,7 @@ void device_astrocade_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(ASTROCADESLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(ASTROCADESLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -200,7 +198,7 @@ bool astrocade_cart_slot_device::call_softlist_load(software_list_device &swlist get default card software -------------------------------------------------*/ -void astrocade_cart_slot_device::get_default_card_software(astring &result) +void astrocade_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -218,7 +216,7 @@ void astrocade_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/astrocde/slot.h b/src/emu/bus/astrocde/slot.h index 959043b1ef7..9ba2e194d19 100644 --- a/src/emu/bus/astrocde/slot.h +++ b/src/emu/bus/astrocde/slot.h @@ -74,7 +74,7 @@ public: virtual const char *file_extensions() const { return "bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/emu/bus/c64/exp.c b/src/emu/bus/c64/exp.c index 5f2f278f04d..c48d899dbf5 100644 --- a/src/emu/bus/c64/exp.c +++ b/src/emu/bus/c64/exp.c @@ -220,7 +220,7 @@ bool c64_expansion_slot_device::call_softlist_load(software_list_device &swlist, // get_default_card_software - //------------------------------------------------- -void c64_expansion_slot_device::get_default_card_software(astring &result) +void c64_expansion_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { diff --git a/src/emu/bus/c64/exp.h b/src/emu/bus/c64/exp.h index 6da81655e30..2374c89abce 100644 --- a/src/emu/bus/c64/exp.h +++ b/src/emu/bus/c64/exp.h @@ -152,7 +152,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); devcb_read8 m_read_dma_cd; devcb_write8 m_write_dma_cd; diff --git a/src/emu/bus/cbm2/exp.c b/src/emu/bus/cbm2/exp.c index 160c080d8fd..44ffd8ba2d2 100644 --- a/src/emu/bus/cbm2/exp.c +++ b/src/emu/bus/cbm2/exp.c @@ -158,7 +158,7 @@ bool cbm2_expansion_slot_device::call_softlist_load(software_list_device &swlist // get_default_card_software - //------------------------------------------------- -void cbm2_expansion_slot_device::get_default_card_software(astring &result) +void cbm2_expansion_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "standard"); } diff --git a/src/emu/bus/cbm2/exp.h b/src/emu/bus/cbm2/exp.h index 726f00a5bb3..cbdb79941bc 100644 --- a/src/emu/bus/cbm2/exp.h +++ b/src/emu/bus/cbm2/exp.h @@ -99,7 +99,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); device_cbm2_expansion_card_interface *m_card; }; diff --git a/src/emu/bus/cbmiec/c1541.c b/src/emu/bus/cbmiec/c1541.c index 18f78277524..94e594752f2 100644 --- a/src/emu/bus/cbmiec/c1541.c +++ b/src/emu/bus/cbmiec/c1541.c @@ -336,7 +336,7 @@ ROM_END const rom_entry *fsd1_device::device_rom_region() const { - return ROM_NAME( fsd1 ); + return ROM_NAME( fsd1 ); } @@ -353,6 +353,8 @@ ROM_START( fsd2 ) ROMX_LOAD( "fsd2b.u3", 0x0000, 0x4000, CRC(b39e4600) SHA1(991132fcc6e70e9a428062ae76055a150f2f7ac6), ROM_BIOS(2) ) ROM_SYSTEM_BIOS( 2, "jiffydos", "JiffyDOS v5.0" ) ROMX_LOAD( "jiffydos v5.0.u3", 0x0000, 0x4000, CRC(46c3302c) SHA1(e3623658cb7af30c9d3bce2ba3b6ad5ee89ac1b8), ROM_BIOS(3) ) + ROM_SYSTEM_BIOS( 3, "rexdos", "REX-DOS" ) + ROMX_LOAD( "rdos.bin", 0x0000, 0x4000, CRC(8ad6dba1) SHA1(f279d327d5e16ea1b62fb18514fb679d0b442941), ROM_BIOS(4) ) ROM_END @@ -473,7 +475,7 @@ ROM_END const rom_entry *indus_gt_t::device_rom_region() const { - return ROM_NAME( indusgt ); + return ROM_NAME( indusgt ); } @@ -1062,7 +1064,7 @@ sx1541_device::sx1541_device(const machine_config &mconfig, const char *tag, dev //------------------------------------------------- fsd1_device::fsd1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : base_c1541_device(mconfig, FSD1, "FSD-1", tag, owner, clock, "fsd1", __FILE__) { } + : base_c1541_device(mconfig, FSD1, "FSD-1", tag, owner, clock, "fsd1", __FILE__) { } //------------------------------------------------- diff --git a/src/emu/bus/chanf/slot.c b/src/emu/bus/chanf/slot.c index 136d135835c..e53b05c9eac 100644 --- a/src/emu/bus/chanf/slot.c +++ b/src/emu/bus/chanf/slot.c @@ -49,9 +49,7 @@ void device_channelf_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(CHANFSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(CHANFSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -219,7 +217,7 @@ bool channelf_cart_slot_device::call_softlist_load(software_list_device &swlist, get default card software -------------------------------------------------*/ -void channelf_cart_slot_device::get_default_card_software(astring &result) +void channelf_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -237,7 +235,7 @@ void channelf_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } software_get_default_slot(result, "chess"); diff --git a/src/emu/bus/chanf/slot.h b/src/emu/bus/chanf/slot.h index 123e3a4fafd..283b41f371c 100644 --- a/src/emu/bus/chanf/slot.h +++ b/src/emu/bus/chanf/slot.h @@ -87,7 +87,7 @@ public: virtual const char *file_extensions() const { return "bin,chf"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/emu/bus/coco/coco_dwsock.c b/src/emu/bus/coco/coco_dwsock.c index c0228bef3cc..4487af80034 100644 --- a/src/emu/bus/coco/coco_dwsock.c +++ b/src/emu/bus/coco/coco_dwsock.c @@ -89,17 +89,17 @@ void beckerport_device::device_start(void) /* format address string for opening the port */ snprintf(chAddress, sizeof(chAddress), "socket.%s:%d", m_hostname, m_dwtcpport); - fprintf(stderr, "Connecting to Drivewire server on %s:%d... ", m_hostname, m_dwtcpport); + osd_printf_verbose("Connecting to Drivewire server on %s:%d... ", m_hostname, m_dwtcpport); UINT64 filesize; // unused file_error filerr = osd_open(chAddress, 0, &m_pSocket, &filesize); if (filerr != FILERR_NONE) { - fprintf(stderr, "Error: osd_open returned error %i!\n", (int) filerr); + osd_printf_verbose("Error: osd_open returned error %i!\n", (int) filerr); return; } - fprintf(stderr, "Connected!\n"); + osd_printf_verbose("Connected!\n"); } /*------------------------------------------------- diff --git a/src/emu/bus/coco/cococart.c b/src/emu/bus/coco/cococart.c index 594e1f3f69c..626382b283b 100644 --- a/src/emu/bus/coco/cococart.c +++ b/src/emu/bus/coco/cococart.c @@ -362,7 +362,7 @@ bool cococart_slot_device::call_softlist_load(software_list_device &swlist, cons // get_default_card_software //------------------------------------------------- -void cococart_slot_device::get_default_card_software(astring &result) +void cococart_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "pak"); } diff --git a/src/emu/bus/coco/cococart.h b/src/emu/bus/coco/cococart.h index 128cdea8e48..05f50ff135c 100644 --- a/src/emu/bus/coco/cococart.h +++ b/src/emu/bus/coco/cococart.h @@ -100,7 +100,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing to $FF40-$FF7F DECLARE_READ8_MEMBER(read); diff --git a/src/emu/bus/coleco/exp.c b/src/emu/bus/coleco/exp.c index 47a0d49c0e3..68834faf4b1 100644 --- a/src/emu/bus/coleco/exp.c +++ b/src/emu/bus/coleco/exp.c @@ -115,7 +115,7 @@ bool colecovision_cartridge_slot_device::call_softlist_load(software_list_device // get_default_card_software - //------------------------------------------------- -void colecovision_cartridge_slot_device::get_default_card_software(astring &result) +void colecovision_cartridge_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "standard"); } diff --git a/src/emu/bus/coleco/exp.h b/src/emu/bus/coleco/exp.h index 4498b9bb6f2..8e5e7774cac 100644 --- a/src/emu/bus/coleco/exp.h +++ b/src/emu/bus/coleco/exp.h @@ -96,7 +96,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); device_colecovision_cartridge_interface *m_card; }; diff --git a/src/emu/bus/crvision/slot.c b/src/emu/bus/crvision/slot.c index eb3f63c3e4c..56f4b569b64 100644 --- a/src/emu/bus/crvision/slot.c +++ b/src/emu/bus/crvision/slot.c @@ -49,9 +49,7 @@ void device_crvision_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(CRVSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(CRVSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -231,7 +229,7 @@ bool crvision_cart_slot_device::call_softlist_load(software_list_device &swlist, get default card software -------------------------------------------------*/ -void crvision_cart_slot_device::get_default_card_software(astring &result) +void crvision_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -269,7 +267,7 @@ void crvision_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/crvision/slot.h b/src/emu/bus/crvision/slot.h index 4219c153d1f..6d81d885a91 100644 --- a/src/emu/bus/crvision/slot.h +++ b/src/emu/bus/crvision/slot.h @@ -78,7 +78,7 @@ public: virtual const char *file_extensions() const { return "bin,rom"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom40); diff --git a/src/emu/bus/gameboy/gb_slot.c b/src/emu/bus/gameboy/gb_slot.c index 0348efb6b65..e959234b7d7 100644 --- a/src/emu/bus/gameboy/gb_slot.c +++ b/src/emu/bus/gameboy/gb_slot.c @@ -61,9 +61,7 @@ void device_gb_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(GBSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(GBSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -600,7 +598,7 @@ int base_gb_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) get default card software -------------------------------------------------*/ -void base_gb_cart_slot_device::get_default_card_software(astring &result) +void base_gb_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -623,7 +621,7 @@ void base_gb_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } @@ -631,11 +629,11 @@ void base_gb_cart_slot_device::get_default_card_software(astring &result) } -void megaduck_cart_slot_device::get_default_card_software(astring &result) +void megaduck_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { - result.cpy("rom"); + result.assign("rom"); return; } diff --git a/src/emu/bus/gameboy/gb_slot.h b/src/emu/bus/gameboy/gb_slot.h index 7e01ce1e374..61a7a7d8350 100644 --- a/src/emu/bus/gameboy/gb_slot.h +++ b/src/emu/bus/gameboy/gb_slot.h @@ -69,7 +69,7 @@ public: void rom_map_setup(UINT32 size); void ram_map_setup(UINT8 banks); - virtual void set_additional_wirings(UINT8 mask, int shift) { } // MBC-1 will then overwrite this! + virtual void set_additional_wirings(UINT8 mask, int shift) { } // MBC-1 will then overwrite this! void set_has_timer(bool val) { has_timer = val; } void set_has_rumble(bool val) { has_rumble = val; } void set_has_battery(bool val) { has_battery = val; } @@ -139,7 +139,7 @@ public: virtual const char *file_extensions() const { return "bin,gb,gbc"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); @@ -180,7 +180,7 @@ public: virtual const char *file_extensions() const { return "bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); }; diff --git a/src/emu/bus/gameboy/mbc.c b/src/emu/bus/gameboy/mbc.c index ff6d6c794ab..9d1e5aef40e 100644 --- a/src/emu/bus/gameboy/mbc.c +++ b/src/emu/bus/gameboy/mbc.c @@ -25,7 +25,7 @@ const device_type GB_ROM_MBC7 = &device_creator<gb_rom_mbc7_device>; const device_type GB_ROM_M161_M12 = &device_creator<gb_rom_m161_device>; const device_type GB_ROM_MMM01 = &device_creator<gb_rom_mmm01_device>; const device_type GB_ROM_SACHEN1 = &device_creator<gb_rom_sachen1_device>; -const device_type GB_ROM_SACHEN2 = &device_creator<gb_rom_sachen1_device>; // Just a placeholder for the moment... +const device_type GB_ROM_SACHEN2 = &device_creator<gb_rom_sachen1_device>; // Just a placeholder for the moment... const device_type GB_ROM_188IN1 = &device_creator<gb_rom_188in1_device>; const device_type GB_ROM_SINTAX = &device_creator<gb_rom_sintax_device>; const device_type GB_ROM_CHONGWU = &device_creator<gb_rom_chongwu_device>; @@ -322,18 +322,18 @@ WRITE8_MEMBER(gb_rom_mbc1_device::write_bank) // the mapper only uses inputs A13-A15 switch (offset & 0xe000) { - case 0x0000: // RAM Enable Register + case 0x0000: // RAM Enable Register m_ram_enable = ((data & 0x0f) == 0x0a) ? 1 : 0; break; - case 0x2000: // ROM Bank Register + case 0x2000: // ROM Bank Register data &= 0x1f; m_latch_bank2 = data ? data : 1; m_latch_bank2 &= m_mask; break; - case 0x4000: // RAM Bank Register + case 0x4000: // RAM Bank Register m_ram_bank = data & 0x3; break; - case 0x6000: // MBC1 Mode Register + case 0x6000: // MBC1 Mode Register default: m_mode = (data & 0x1) ? MODE_4M_256k : MODE_16M_8k; break; @@ -638,22 +638,19 @@ WRITE8_MEMBER(gb_rom_mbc7_device::write_ram) READ8_MEMBER(gb_rom_m161_device::read_rom) { if (offset < 0x4000) - return m_rom[rom_bank_map[m_base_bank | m_latch_bank] * 0x4000 + offset]; + return m_rom[rom_bank_map[m_base_bank] * 0x4000 + offset]; else - return m_rom[rom_bank_map[m_base_bank | m_latch_bank2] * 0x4000 + (offset & 0x3fff)]; + return m_rom[rom_bank_map[m_base_bank] * 0x4000 + (offset & 0x3fff)]; } WRITE8_MEMBER(gb_rom_m161_device::write_bank) { switch (offset & 0xe000) { - case 0x2000: // ROM Bank Register? Tetris writes 1 here when selected... - data &= 0x1f; - m_latch_bank2 = data ? data : 1; - break; - case 0x4000: // Base Bank Register + case 0x4000: // Base Bank Register m_base_bank = data << 1; break; + case 0x2000: // Tetris writes 1 here when selected... default: break; } @@ -718,18 +715,18 @@ READ8_MEMBER(gb_rom_sachen1_device::read_rom) WRITE8_MEMBER(gb_rom_sachen1_device::write_bank) { - if (offset < 0x2000) // Base ROM Bank register + if (offset < 0x2000) // Base ROM Bank register { if ((m_latch_bank2 & 0x30) == 0x30 && data) m_base_bank = data & 0x0f; //logerror("write to base bank %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); } - else if (offset < 0x4000) // ROM Bank Register + else if (offset < 0x4000) // ROM Bank Register { m_latch_bank2 = data ? data : 1; //logerror("write to latch %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); } - else if (offset < 0x6000) // ROM bank mask register + else if (offset < 0x6000) // ROM bank mask register { if ((m_latch_bank2 & 0x30) == 0x30) m_mask = data; diff --git a/src/emu/bus/gameboy/mbc.h b/src/emu/bus/gameboy/mbc.h index bda06a65523..1d9e35c7ba9 100644 --- a/src/emu/bus/gameboy/mbc.h +++ b/src/emu/bus/gameboy/mbc.h @@ -33,12 +33,12 @@ public: class gb_rom_mbc1_device : public gb_rom_mbc_device { public: - + enum { MODE_16M_8k = 0, /// 16Mbit ROM, 8kBit RAM MODE_4M_256k = 1, /// 4Mbit ROM, 256kBit RAM }; - + // construction/destruction gb_rom_mbc1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); gb_rom_mbc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -46,7 +46,7 @@ public: // device-level overrides virtual void device_start() { shared_start(); save_item(NAME(m_mode)); }; virtual void device_reset() { shared_reset(); m_mode = MODE_16M_8k; }; - virtual void set_additional_wirings(UINT8 mask, int shift) { m_mask = mask; m_shift = shift; } // these get set at cart loading + virtual void set_additional_wirings(UINT8 mask, int shift) { m_mask = mask; m_shift = shift; } // these get set at cart loading virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -156,19 +156,19 @@ public: class gb_rom_m161_device : public gb_rom_mbc_device { public: - + // construction/destruction gb_rom_m161_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram) { return 0xff; } virtual DECLARE_WRITE8_MEMBER(write_ram) { } - + UINT8 m_base_bank; }; @@ -194,19 +194,19 @@ public: class gb_rom_sachen1_device : public gb_rom_mbc1_device { public: - + // construction/destruction gb_rom_sachen1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram) { return 0xff; } virtual DECLARE_WRITE8_MEMBER(write_ram) { } - + UINT8 m_base_bank, m_mask; }; diff --git a/src/emu/bus/gba/gba_slot.c b/src/emu/bus/gba/gba_slot.c index 30f50201a3f..bb0e1abfa31 100644 --- a/src/emu/bus/gba/gba_slot.c +++ b/src/emu/bus/gba/gba_slot.c @@ -48,10 +48,8 @@ void device_gba_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(GBASLOT_ROM_REGION_TAG); // we always alloc 32MB of rom region! - m_rom = (UINT32 *)device().machine().memory().region_alloc(tempstring.c_str(), 0x2000000, 4, ENDIANNESS_LITTLE)->base(); + m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(GBASLOT_ROM_REGION_TAG).c_str(), 0x2000000, 4, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -256,9 +254,9 @@ bool gba_cart_slot_device::call_softlist_load(software_list_device &swlist, cons fullpath -------------------------------------------------*/ -INLINE astring gba_chip_string( UINT32 chip ) +INLINE std::string gba_chip_string( UINT32 chip ) { - astring str; + std::string str; if (chip == 0) str += "NONE "; if (chip & GBA_CHIP_EEPROM) str += "EEPROM "; if (chip & GBA_CHIP_EEPROM_64K) str += "EEPROM_64K "; @@ -268,7 +266,8 @@ INLINE astring gba_chip_string( UINT32 chip ) if (chip & GBA_CHIP_FLASH_512) str += "FLASH_512 "; if (chip & GBA_CHIP_SRAM) str += "SRAM "; if (chip & GBA_CHIP_RTC) str += "RTC "; - return str.trimspace(); + strtrimspace(str); + return str; } @@ -399,7 +398,7 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) get default card software -------------------------------------------------*/ -void gba_cart_slot_device::get_default_card_software(astring &result) +void gba_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -416,7 +415,7 @@ void gba_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/gba/gba_slot.h b/src/emu/bus/gba/gba_slot.h index ede5f7321f8..384101f76dd 100644 --- a/src/emu/bus/gba/gba_slot.h +++ b/src/emu/bus/gba/gba_slot.h @@ -90,7 +90,7 @@ public: virtual const char *file_extensions() const { return "gba,bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ32_MEMBER(read_rom); diff --git a/src/emu/bus/gba/rom.c b/src/emu/bus/gba/rom.c index 19f08405259..556d55a63b1 100644 --- a/src/emu/bus/gba/rom.c +++ b/src/emu/bus/gba/rom.c @@ -253,12 +253,12 @@ gba_eeprom_device::gba_eeprom_device(running_machine &machine, UINT8 *eeprom, UI m_data_size = size; m_addr_bits = addr_bits; - state_save_register_item(machine, "GBA_EEPROM", NULL, 0, m_state); - state_save_register_item(machine, "GBA_EEPROM", NULL, 0, m_command); - state_save_register_item(machine, "GBA_EEPROM", NULL, 0, m_count); - state_save_register_item(machine, "GBA_EEPROM", NULL, 0, m_addr); - state_save_register_item(machine, "GBA_EEPROM", NULL, 0, m_bits); - state_save_register_item(machine, "GBA_EEPROM", NULL, 0, m_eep_data); + m_machine.save().save_item(m_state, "GBA_EEPROM/m_state"); + m_machine.save().save_item(m_command, "GBA_EEPROM/m_command"); + m_machine.save().save_item(m_count, "GBA_EEPROM/m_count"); + m_machine.save().save_item(m_addr, "GBA_EEPROM/m_addr"); + m_machine.save().save_item(m_bits, "GBA_EEPROM/m_bits"); + m_machine.save().save_item(m_eep_data, "GBA_EEPROM/m_eep_data"); } UINT32 gba_eeprom_device::read() diff --git a/src/emu/bus/generic/slot.c b/src/emu/bus/generic/slot.c index 9473e2aa3e0..cb65e9ba97b 100644 --- a/src/emu/bus/generic/slot.c +++ b/src/emu/bus/generic/slot.c @@ -59,9 +59,7 @@ void device_generic_cart_interface::rom_alloc(size_t size, int width, endianness { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(GENERIC_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, width, endian)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(GENERIC_ROM_REGION_TAG).c_str(), size, width, endian)->base(); m_rom_size = size; } } @@ -181,7 +179,7 @@ bool generic_slot_device::call_softlist_load(software_list_device &swlist, const get default card software -------------------------------------------------*/ -void generic_slot_device::get_default_card_software(astring &result) +void generic_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, m_default_card); } diff --git a/src/emu/bus/generic/slot.h b/src/emu/bus/generic/slot.h index 7223a388d45..3517974d119 100644 --- a/src/emu/bus/generic/slot.h +++ b/src/emu/bus/generic/slot.h @@ -124,7 +124,7 @@ public: virtual const char *file_extensions() const { return m_extensions; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/emu/bus/ieee488/c2040.c b/src/emu/bus/ieee488/c2040.c index d12be0795a3..273756742a5 100644 --- a/src/emu/bus/ieee488/c2040.c +++ b/src/emu/bus/ieee488/c2040.c @@ -11,6 +11,34 @@ /* + 2040/3040 disk initialization + ----------------------------- + You need to initialize each diskette before trying to access it + or you will get a DISK ID MISMATCH error upon disk commands. + On the 4040 this is done automatically by the DOS. + + open 15,8,15:print 15,"i":close 15 + + List directory + -------------- + directory / diR + + Format disk + ----------- + header "label,id",d0,i01 + + Load file + --------- + dload "name" / dL"name + + Save file + --------- + dsave "name" / dS"name + +*/ + +/* + TODO: - 2040/3040/4040 have a Shugart SA390 drive (FLOPPY_525_SSSD_35T) @@ -53,19 +81,14 @@ const device_type C4040 = &device_creator<c4040_device>; // ROM( c2040 ) //------------------------------------------------- -ROM_START( c2040 ) // schematic 320806 +ROM_START( c2040 ) // schematic 320806, DOS 1.0 ROM_REGION( 0x3000, M6502_TAG, 0 ) ROM_DEFAULT_BIOS("dos12") - ROM_SYSTEM_BIOS( 0, "dos10", "DOS 1.0" ) - ROMX_LOAD( "901468-xx.ul1", 0x1000, 0x1000, NO_DUMP, ROM_BIOS(1) ) - ROMX_LOAD( "901468-xx.uh1", 0x2000, 0x1000, NO_DUMP, ROM_BIOS(1) ) - ROM_SYSTEM_BIOS( 1, "dos12", "DOS 1.2" ) - ROMX_LOAD( "901468-06.ul1", 0x1000, 0x1000, CRC(25b5eed5) SHA1(4d9658f2e6ff3276e5c6e224611a66ce44b16fc7), ROM_BIOS(2) ) - ROMX_LOAD( "901468-07.uh1", 0x2000, 0x1000, CRC(9b09ae83) SHA1(6a51c7954938439ca8342fc295bda050c06e1791), ROM_BIOS(2) ) + ROM_LOAD( "901468-xx.ul1", 0x1000, 0x1000, NO_DUMP ) + ROM_LOAD( "901468-xx.uh1", 0x2000, 0x1000, NO_DUMP ) ROM_REGION( 0x400, M6504_TAG, 0 ) - ROMX_LOAD( "901466-01.uk3", 0x000, 0x400, CRC(9d1e25ce) SHA1(d539858f839f96393f218307df7394362a84a26a), ROM_BIOS(1) ) - ROMX_LOAD( "901466-02.uk3", 0x000, 0x400, CRC(9d1e25ce) SHA1(d539858f839f96393f218307df7394362a84a26a), ROM_BIOS(2) ) + ROM_LOAD( "901466-01.uk3", 0x000, 0x400, CRC(9d1e25ce) SHA1(d539858f839f96393f218307df7394362a84a26a) ) ROM_REGION( 0x800, "gcr", 0) ROM_LOAD( "901467.uk6", 0x000, 0x800, CRC(a23337eb) SHA1(97df576397608455616331f8e837cb3404363fa2) ) @@ -83,6 +106,33 @@ const rom_entry *c2040_device::device_rom_region() const //------------------------------------------------- +// ROM( c3040 ) +//------------------------------------------------- + +ROM_START( c3040 ) // schematic 320806, DOS 1.2 + ROM_REGION( 0x3000, M6502_TAG, 0 ) + ROM_LOAD( "901468-06.ul1", 0x1000, 0x1000, CRC(25b5eed5) SHA1(4d9658f2e6ff3276e5c6e224611a66ce44b16fc7) ) + ROM_LOAD( "901468-07.uh1", 0x2000, 0x1000, CRC(9b09ae83) SHA1(6a51c7954938439ca8342fc295bda050c06e1791) ) + + ROM_REGION( 0x400, M6504_TAG, 0 ) + ROM_LOAD( "901466-02.uk3", 0x000, 0x400, CRC(9d1e25ce) SHA1(d539858f839f96393f218307df7394362a84a26a) ) + + ROM_REGION( 0x800, "gcr", 0) + ROM_LOAD( "901467.uk6", 0x000, 0x800, CRC(a23337eb) SHA1(97df576397608455616331f8e837cb3404363fa2) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *c3040_device::device_rom_region() const +{ + return ROM_NAME( c3040 ); +} + + +//------------------------------------------------- // ROM( c4040 ) //------------------------------------------------- @@ -434,9 +484,28 @@ SLOT_INTERFACE_END //------------------------------------------------- FLOPPY_FORMATS_MEMBER( c2040_device::floppy_formats ) - FLOPPY_D64_FORMAT, - FLOPPY_G64_FORMAT, - FLOPPY_D67_FORMAT + FLOPPY_C3040_FORMAT, + FLOPPY_G64_FORMAT +FLOPPY_FORMATS_END + + +//------------------------------------------------- +// FLOPPY_FORMATS( floppy_formats ) +//------------------------------------------------- + +FLOPPY_FORMATS_MEMBER( c3040_device::floppy_formats ) + FLOPPY_C3040_FORMAT, + FLOPPY_G64_FORMAT +FLOPPY_FORMATS_END + + +//------------------------------------------------- +// FLOPPY_FORMATS( floppy_formats ) +//------------------------------------------------- + +FLOPPY_FORMATS_MEMBER( c4040_device::floppy_formats ) + FLOPPY_C4040_FORMAT, + FLOPPY_G64_FORMAT FLOPPY_FORMATS_END @@ -495,6 +564,60 @@ machine_config_constructor c2040_device::device_mconfig_additions() const //------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( c3040 ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( c3040 ) + // DOS + MCFG_CPU_ADD(M6502_TAG, M6502, XTAL_16MHz/16) + MCFG_CPU_PROGRAM_MAP(c2040_main_mem) + + MCFG_DEVICE_ADD(M6532_0_TAG, RIOT6532, XTAL_16MHz/16) + MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, dio_r)) + MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, dio_w)) + + MCFG_DEVICE_ADD(M6532_1_TAG, RIOT6532, XTAL_16MHz/16) + MCFG_RIOT6532_IN_PA_CB(READ8(c2040_device, riot1_pa_r)) + MCFG_RIOT6532_OUT_PA_CB(WRITE8(c2040_device, riot1_pa_w)) + MCFG_RIOT6532_IN_PB_CB(READ8(c2040_device, riot1_pb_r)) + MCFG_RIOT6532_OUT_PB_CB(WRITE8(c2040_device, riot1_pb_w)) + MCFG_RIOT6532_IRQ_CB(INPUTLINE(M6502_TAG, INPUT_LINE_IRQ0)) + + // controller + MCFG_CPU_ADD(M6504_TAG, M6504, XTAL_16MHz/16) + MCFG_CPU_PROGRAM_MAP(c2040_fdc_mem) + + MCFG_DEVICE_ADD(M6522_TAG, VIA6522, XTAL_16MHz/16) + MCFG_VIA6522_READPA_HANDLER(DEVREAD8(FDC_TAG, c2040_fdc_t, read)) + MCFG_VIA6522_WRITEPB_HANDLER(WRITE8(c2040_device, via_pb_w)) + MCFG_VIA6522_CA2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, mode_sel_w)) + MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(FDC_TAG, c2040_fdc_t, rw_sel_w)) + + MCFG_DEVICE_ADD(M6530_TAG, MOS6530, XTAL_16MHz/16) + MCFG_MOS6530_OUT_PA_CB(DEVWRITE8(FDC_TAG, c2040_fdc_t, write)) + MCFG_MOS6530_IN_PB_CB(READ8(c2040_device, miot_pb_r)) + MCFG_MOS6530_OUT_PB_CB(WRITE8(c2040_device, miot_pb_w)) + + MCFG_DEVICE_ADD(FDC_TAG, C2040_FDC, XTAL_16MHz) + MCFG_C2040_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1)) + MCFG_C2040_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1)) + MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c3040_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":1", c2040_floppies, "525ssqd", c3040_device::floppy_formats) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor c3040_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( c3040 ); +} + + +//------------------------------------------------- // MACHINE_CONFIG_FRAGMENT( c4040 ) //------------------------------------------------- @@ -532,8 +655,8 @@ static MACHINE_CONFIG_FRAGMENT( c4040 ) MCFG_DEVICE_ADD(FDC_TAG, C2040_FDC, XTAL_16MHz) MCFG_C2040_READY_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1)) MCFG_C2040_ERROR_CALLBACK(DEVWRITELINE(M6522_TAG, via6522_device, write_cb1)) - MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c2040_device::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":1", c2040_floppies, "525ssqd", c2040_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":0", c2040_floppies, "525ssqd", c4040_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(FDC_TAG":1", c2040_floppies, "525ssqd", c4040_device::floppy_formats) MACHINE_CONFIG_END @@ -605,24 +728,24 @@ inline void c2040_device::update_ieee_signals() // c2040_device - constructor //------------------------------------------------- -c2040_device::c2040_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) - : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_ieee488_interface(mconfig, *this), - m_maincpu(*this, M6502_TAG), - m_fdccpu(*this, M6504_TAG), - m_riot0(*this, M6532_0_TAG), - m_riot1(*this, M6532_1_TAG), - m_miot(*this, M6530_TAG), - m_via(*this, M6522_TAG), - m_floppy0(*this, FDC_TAG":0:525ssqd"), - m_floppy1(*this, FDC_TAG":1:525ssqd"), - m_fdc(*this, FDC_TAG), - m_gcr(*this, "gcr"), - m_address(*this, "ADDRESS"), - m_rfdo(1), - m_daco(1), - m_atna(1), - m_miot_irq(CLEAR_LINE) +c2040_device::c2040_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : + device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_ieee488_interface(mconfig, *this), + m_maincpu(*this, M6502_TAG), + m_fdccpu(*this, M6504_TAG), + m_riot0(*this, M6532_0_TAG), + m_riot1(*this, M6532_1_TAG), + m_miot(*this, M6530_TAG), + m_via(*this, M6522_TAG), + m_floppy0(*this, FDC_TAG":0:525ssqd"), + m_floppy1(*this, FDC_TAG":1:525ssqd"), + m_fdc(*this, FDC_TAG), + m_gcr(*this, "gcr"), + m_address(*this, "ADDRESS"), + m_rfdo(1), + m_daco(1), + m_atna(1), + m_miot_irq(CLEAR_LINE) { } @@ -652,16 +775,16 @@ c2040_device::c2040_device(const machine_config &mconfig, const char *tag, devic // c3040_device - constructor //------------------------------------------------- -c3040_device::c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : c2040_device(mconfig, C3040, "C3040", tag, owner, clock, "c3040", __FILE__) { } +c3040_device::c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + c2040_device(mconfig, C3040, "C3040", tag, owner, clock, "c3040", __FILE__) { } //------------------------------------------------- // c4040_device - constructor //------------------------------------------------- -c4040_device::c4040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : c2040_device(mconfig, C4040, "C4040", tag, owner, clock, "c4040", __FILE__) { } +c4040_device::c4040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + c2040_device(mconfig, C4040, "C4040", tag, owner, clock, "c4040", __FILE__) { } //------------------------------------------------- diff --git a/src/emu/bus/ieee488/c2040.h b/src/emu/bus/ieee488/c2040.h index c99731d27d9..2664a2ffdd8 100644 --- a/src/emu/bus/ieee488/c2040.h +++ b/src/emu/bus/ieee488/c2040.h @@ -107,6 +107,12 @@ class c3040_device : public c2040_device public: // construction/destruction c3040_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual const rom_entry *device_rom_region() const; + virtual machine_config_constructor device_mconfig_additions() const; + + DECLARE_FLOPPY_FORMATS( floppy_formats ); }; diff --git a/src/emu/bus/ieee488/c2040fdc.c b/src/emu/bus/ieee488/c2040fdc.c index 026d0a37757..3881ff643f6 100644 --- a/src/emu/bus/ieee488/c2040fdc.c +++ b/src/emu/bus/ieee488/c2040fdc.c @@ -11,7 +11,7 @@ /* - TODO: + TODO: - write protect - separate read/write methods diff --git a/src/emu/bus/ieee488/c2040fdc.h b/src/emu/bus/ieee488/c2040fdc.h index d64d2de7c01..382c540d4e4 100644 --- a/src/emu/bus/ieee488/c2040fdc.h +++ b/src/emu/bus/ieee488/c2040fdc.h @@ -15,8 +15,9 @@ #define __C2040_FLOPPY__ #include "emu.h" +#include "formats/c3040_dsk.h" +#include "formats/c4040_dsk.h" #include "formats/d64_dsk.h" -#include "formats/d67_dsk.h" #include "formats/g64_dsk.h" #include "imagedev/floppy.h" diff --git a/src/emu/bus/ieee488/c8050.c b/src/emu/bus/ieee488/c8050.c index e86b8f702f6..c8e314336bd 100644 --- a/src/emu/bus/ieee488/c8050.c +++ b/src/emu/bus/ieee488/c8050.c @@ -101,7 +101,7 @@ ROM_START( c8050 ) // schematic 8050001 ROM_LOAD_OPTIONAL( "901483-02.uk3", 0x000, 0x400, CRC(d7277f95) SHA1(7607f9357f3a08f2a9f20931058d60d9e3c17d39) ) // 6530-036 ROM_LOAD_OPTIONAL( "901483-03.uk3", 0x000, 0x400, CRC(9e83fa70) SHA1(e367ea8a5ddbd47f13570088427293138a10784b) ) // 6530-038 RIOT DOS 2.5 Micropolis ROM_LOAD_OPTIONAL( "901483-04.uk3", 0x000, 0x400, CRC(ae1c7866) SHA1(13bdf0bb387159167534c07a4554964734373f11) ) // 6530-039 RIOT DOS 2.5 Tandon - ROM_LOAD_OPTIONAL( "901884-01.uk3", 0x000, 0x400, NO_DUMP ) // 6530-40 RIOT DOS 2.7 Tandon + ROM_LOAD_OPTIONAL( "901884-01.uk3", 0x000, 0x400, CRC(9e9a9f90) SHA1(39498d7369a31ea7527b5044071acf35a84ea2ac) ) // 6530-40 RIOT DOS 2.7 Tandon ROM_LOAD_OPTIONAL( "901885-01.uk3", 0x000, 0x400, NO_DUMP ) // 6530-044 ROM_LOAD_OPTIONAL( "901885-04.uk3", 0x000, 0x400, CRC(bab998c9) SHA1(0dc9a3b60f1b866c63eebd882403532fc59fe57f) ) // 6530-47 RIOT DOS 2.7 Micropolis ROM_LOAD( "901869-01.uk3", 0x000, 0x400, CRC(2915327a) SHA1(3a9a80f72ce76e5f5c72513f8ef7553212912ae3) ) // 6530-48 RIOT DOS 2.7 MPI diff --git a/src/emu/bus/ieee488/c8050.h b/src/emu/bus/ieee488/c8050.h index 7d2ffdf0275..db87bffeab3 100644 --- a/src/emu/bus/ieee488/c8050.h +++ b/src/emu/bus/ieee488/c8050.h @@ -32,7 +32,7 @@ // ======================> c8050_device class c8050_device : public device_t, - public device_ieee488_interface + public device_ieee488_interface { public: // construction/destruction @@ -53,7 +53,7 @@ public: DECLARE_WRITE8_MEMBER( via_pb_w ); DECLARE_READ8_MEMBER( pi_r ); DECLARE_WRITE8_MEMBER( pi_w ); - + DECLARE_FLOPPY_FORMATS( floppy_formats ); protected: diff --git a/src/emu/bus/ieee488/c8050fdc.c b/src/emu/bus/ieee488/c8050fdc.c index 986d6de9126..86aea2522fc 100644 --- a/src/emu/bus/ieee488/c8050fdc.c +++ b/src/emu/bus/ieee488/c8050fdc.c @@ -11,11 +11,10 @@ /* - TODO: + TODO: - - write mode - write protect - - separate read/write methods + - 75,format speed error,01,00,0 */ @@ -28,6 +27,8 @@ //************************************************************************** #define LOG 0 +#define LOG_MORE 0 +#define LOG_BITS 0 #define GCR_DECODE(_e, _i) \ ((BIT(_e, 6) << 7) | (BIT(_i, 7) << 6) | (_e & 0x33) | (BIT(_e, 2) << 3) | (_i & 0x04)) @@ -74,7 +75,7 @@ const rom_entry *c8050_fdc_t::device_rom_region() const //------------------------------------------------- c8050_fdc_t::c8050_fdc_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, C8050_FDC, "C8050 FDC", tag, owner, clock, "c8050fdc", __FILE__), + device_t(mconfig, C8050_FDC, "Commodore 8050 FDC", tag, owner, clock, "c8050fdc", __FILE__), m_write_sync(*this), m_write_ready(*this), m_write_brdy(*this), @@ -89,7 +90,7 @@ c8050_fdc_t::c8050_fdc_t(const machine_config &mconfig, const char *tag, device_ m_ds(0), m_drv_sel(0), m_mode_sel(0), - m_rw_sel(0) + m_rw_sel(1) { cur_live.tm = attotime::never; cur_live.state = IDLE; @@ -210,7 +211,8 @@ void c8050_fdc_t::ds_w(int ds) { live_sync(); m_ds = cur_live.ds = ds; - pll_reset(cur_live.tm, attotime::from_hz(clock() / (16 - m_ds))); + pll_reset(cur_live.tm); + if (LOG) logerror("%s %s DS %u\n", machine().time().as_string(), machine().describe_context(), ds); checkpoint(); live_run(); } @@ -219,7 +221,7 @@ void c8050_fdc_t::ds_w(int ds) void c8050_fdc_t::set_floppy(floppy_connector *floppy0, floppy_connector *floppy1) { m_floppy0 = floppy0->get_device(); - + if (floppy1) { m_floppy1 = floppy1->get_device(); } @@ -240,22 +242,23 @@ void c8050_fdc_t::live_start() cur_live.rw_sel = m_rw_sel; cur_live.pi = m_pi; - pll_reset(cur_live.tm, attotime::from_hz(clock() / (16 - m_ds))); + pll_reset(cur_live.tm); checkpoint_live = cur_live; pll_save_checkpoint(); live_run(); } -void c8050_fdc_t::pll_reset(const attotime &when, const attotime &clock) +void c8050_fdc_t::pll_reset(const attotime &when) { cur_pll.reset(when); - cur_pll.set_clock(clock); + cur_pll.set_clock(attotime::from_hz(clock() / (16 - m_ds))); } void c8050_fdc_t::pll_start_writing(const attotime &tm) { cur_pll.start_writing(tm); + pll_reset(cur_live.tm); } void c8050_fdc_t::pll_commit(floppy_image_device *floppy, const attotime &tm) @@ -266,6 +269,7 @@ void c8050_fdc_t::pll_commit(floppy_image_device *floppy, const attotime &tm) void c8050_fdc_t::pll_stop_writing(floppy_image_device *floppy, const attotime &tm) { cur_pll.stop_writing(floppy, tm); + pll_reset(cur_live.tm); } void c8050_fdc_t::pll_save_checkpoint() @@ -285,7 +289,7 @@ int c8050_fdc_t::pll_get_next_bit(attotime &tm, floppy_image_device *floppy, con bool c8050_fdc_t::pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit) { - return cur_pll.write_next_bit_prev_cell(bit, tm, floppy, limit); + return cur_pll.write_next_bit(bit, tm, floppy, limit); } void c8050_fdc_t::checkpoint() @@ -366,10 +370,33 @@ void c8050_fdc_t::live_run(const attotime &limit) return; // read bit - int bit = pll_get_next_bit(cur_live.tm, get_floppy(), limit); - if(bit < 0) - return; + int bit = 0; + if (cur_live.rw_sel) { + bit = pll_get_next_bit(cur_live.tm, get_floppy(), limit); + if(bit < 0) + return; + } + + // write bit + int write_bit = BIT(cur_live.shift_reg_write, 9); + if (!cur_live.rw_sel) { // TODO WPS + /* + write precompensation + + UA5.A = UM6.Qc + UA5.B = !(!(!BRDY && UM6.Qa) && !(BRDY && E7)) + UA5.C0 = UA4.Qb = bit clock delayed 333ns + UA5.C1 = UA4.Qa = bit clock delayed 166ns + UA5.C2 = UA4.Qc = bit clock delayed 499ns + UA5.C3 = UA5.Qb = bit clock delayed 333ns + + DATA OUT = !(!BITCLK || !(UA5.Y && !(WRITE_ENABLE && !UM6.Qb))) + */ + if (pll_write_next_bit(write_bit, cur_live.tm, get_floppy(), limit)) + return; + } + // clock read shift register cur_live.shift_reg <<= 1; cur_live.shift_reg |= bit; cur_live.shift_reg &= 0x3ff; @@ -378,16 +405,9 @@ void c8050_fdc_t::live_run(const attotime &limit) int sync = !((cur_live.shift_reg == 0x3ff) && cur_live.rw_sel); // bit counter - if (cur_live.rw_sel) { - if (!sync) { - cur_live.bit_counter = 0; - } else if (cur_live.sync) { - cur_live.bit_counter++; - if (cur_live.bit_counter == 10) { - cur_live.bit_counter = 0; - } - } - } else { + if (!sync) { + cur_live.bit_counter = 0; + } else if (cur_live.sync) { cur_live.bit_counter++; if (cur_live.bit_counter == 10) { cur_live.bit_counter = 0; @@ -403,8 +423,6 @@ void c8050_fdc_t::live_run(const attotime &limit) cur_live.e = m_gcr_rom->base()[cur_live.i]; - if (LOG) logerror("%s cyl %u bit %u sync %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),bit,sync,cur_live.bit_counter,cur_live.shift_reg,cur_live.i,cur_live.e); - // byte ready int ready = !(cur_live.bit_counter == 9); // 74190 _RC, should be triggered on the falling edge of the clock int brdy = ready; // 74190 TC @@ -412,18 +430,19 @@ void c8050_fdc_t::live_run(const attotime &limit) // GCR error int error = !(ready || BIT(cur_live.e, 3)); - // write bit - if (!cur_live.rw_sel) { // TODO WPS - int write_bit = BIT(cur_live.shift_reg_write, 9); - if (LOG) logerror("%s writing bit %u sr %03x\n",cur_live.tm.as_string(),write_bit,cur_live.shift_reg_write); - pll_write_next_bit(write_bit, cur_live.tm, get_floppy(), limit); + if (LOG_BITS) { + if (cur_live.rw_sel) { + logerror("%s cyl %u bit %u sync %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),bit,sync,cur_live.bit_counter,cur_live.shift_reg,cur_live.i,cur_live.e); + } else { + logerror("%s cyl %u writing bit %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),write_bit,cur_live.bit_counter,cur_live.shift_reg_write,cur_live.i,cur_live.e); + } } if (!ready) { // load write shift register cur_live.shift_reg_write = GCR_ENCODE(cur_live.e, cur_live.i); - if (LOG) logerror("%s load write shift register %03x\n",cur_live.tm.as_string(),cur_live.shift_reg_write); + if (LOG_BITS) logerror("%s load write shift register %03x\n",cur_live.tm.as_string(),cur_live.shift_reg_write); } else { // clock write shift register cur_live.shift_reg_write <<= 1; @@ -431,13 +450,14 @@ void c8050_fdc_t::live_run(const attotime &limit) } if (ready != cur_live.ready) { - if (LOG) logerror("%s READY %u : %02x\n", cur_live.tm.as_string(),ready,GCR_DECODE(cur_live.e, cur_live.i)); + if (cur_live.rw_sel && !ready) + if (LOG) logerror("%s READY %u : %02x\n", cur_live.tm.as_string(),ready,GCR_DECODE(cur_live.e, cur_live.i)); cur_live.ready = ready; syncpoint = true; } if (brdy != cur_live.brdy) { - if (LOG) logerror("%s BRDY %u\n", cur_live.tm.as_string(), brdy); + if (LOG_MORE) logerror("%s BRDY %u\n", cur_live.tm.as_string(), brdy); cur_live.brdy = brdy; syncpoint = true; } @@ -449,7 +469,7 @@ void c8050_fdc_t::live_run(const attotime &limit) } if (error != cur_live.error) { - if (LOG) logerror("%s ERROR %u\n", cur_live.tm.as_string(), error); + if (LOG_MORE) logerror("%s ERROR %u\n", cur_live.tm.as_string(), error); cur_live.error = error; syncpoint = true; } @@ -462,10 +482,6 @@ void c8050_fdc_t::live_run(const attotime &limit) } case RUNNING_SYNCPOINT: { - if (LOG) { - if (!cur_live.sync) logerror("%s SYNC\n",cur_live.tm.as_string()); - if (!cur_live.ready && cur_live.bit_counter == 9) logerror("%s DATA %02x\n",cur_live.tm.as_string(),GCR_DECODE(cur_live.e,cur_live.i)); - } m_write_ready(cur_live.ready); m_write_brdy(cur_live.brdy); m_write_sync(cur_live.sync); @@ -484,21 +500,18 @@ READ8_MEMBER( c8050_fdc_t::read ) UINT8 e = checkpoint_live.e; offs_t i = checkpoint_live.i; - UINT8 data = GCR_DECODE(e, i); - - if (LOG)logerror("%s %s VIA reads data %02x (%03x)\n", machine().time().as_string(), machine().describe_context(), data, checkpoint_live.shift_reg); - - return data; + return GCR_DECODE(e, i); } WRITE8_MEMBER( c8050_fdc_t::write ) { + if (LOG) logerror("%s %s PI %02x\n", machine().time().as_string(), machine().describe_context(), data); + if (m_pi != data) { live_sync(); m_pi = cur_live.pi = data; checkpoint(); - if (LOG) logerror("%s %s PI %02x\n", machine().time().as_string(), machine().describe_context(), data); live_run(); } } @@ -548,9 +561,9 @@ WRITE_LINE_MEMBER( c8050_fdc_t::rw_sel_w ) checkpoint(); if (LOG) logerror("%s %s RW SEL %u\n", machine().time().as_string(), machine().describe_context(), state); if (m_rw_sel) { - pll_stop_writing(get_floppy(), machine().time()); + pll_stop_writing(get_floppy(), cur_live.tm); } else { - pll_start_writing(machine().time()); + pll_start_writing(cur_live.tm); } live_run(); } @@ -616,5 +629,5 @@ WRITE_LINE_MEMBER( c8050_fdc_t::odd_hd_w ) WRITE_LINE_MEMBER( c8050_fdc_t::pull_sync_w ) { - if (LOG) logerror("%s %s PULL SYNC %u\n", machine().time().as_string(), machine().describe_context(), state); + if (LOG_MORE) logerror("%s %s PULL SYNC %u\n", machine().time().as_string(), machine().describe_context(), state); } diff --git a/src/emu/bus/ieee488/c8050fdc.h b/src/emu/bus/ieee488/c8050fdc.h index fe41e7c73bc..9c4f9d665f1 100644 --- a/src/emu/bus/ieee488/c8050fdc.h +++ b/src/emu/bus/ieee488/c8050fdc.h @@ -150,7 +150,7 @@ protected: void live_start(); void checkpoint(); void rollback(); - void pll_reset(const attotime &when, const attotime &clock); + void pll_reset(const attotime &when); void pll_start_writing(const attotime &tm); void pll_commit(floppy_image_device *floppy, const attotime &tm); void pll_stop_writing(floppy_image_device *floppy, const attotime &tm); diff --git a/src/emu/bus/ieee488/c8280.c b/src/emu/bus/ieee488/c8280.c index 0bbd0d6c438..0265f0983d1 100644 --- a/src/emu/bus/ieee488/c8280.c +++ b/src/emu/bus/ieee488/c8280.c @@ -9,16 +9,6 @@ **********************************************************************/ -/* - - TODO: - - - format - - wd1772: track description 80x4e 12x00 3xf6 fc 50x4e 12x00 3xf5 fe 2x00 2x01 f7 22x4e 12x00 3xf5 fb 256xaa f7 54x4e - -*/ - #include "c8280.h" @@ -159,6 +149,7 @@ WRITE8_MEMBER( c8280_device::dio_w ) m_bus->dio_w(this, data); } + //------------------------------------------------- // riot6532 1 //------------------------------------------------- @@ -291,6 +282,10 @@ static SLOT_INTERFACE_START( c8280_floppies ) SLOT_INTERFACE( "8dsdd", FLOPPY_8_DSDD ) SLOT_INTERFACE_END +FLOPPY_FORMATS_MEMBER( c8280_device::floppy_formats ) + FLOPPY_C8280_FORMAT +FLOPPY_FORMATS_END + //------------------------------------------------- // MACHINE_CONFIG_FRAGMENT( c8280 ) @@ -314,11 +309,11 @@ static MACHINE_CONFIG_FRAGMENT( c8280 ) MCFG_CPU_ADD(M6502_FDC_TAG, M6502, XTAL_12MHz/8) MCFG_CPU_PROGRAM_MAP(c8280_fdc_mem) - MCFG_FD1797x_ADD(WD1797_TAG, XTAL_12MHz/6) // clock? + MCFG_FD1797x_ADD(WD1797_TAG, XTAL_12MHz/6) MCFG_WD_FDC_INTRQ_CALLBACK(INPUTLINE(M6502_FDC_TAG, M6502_IRQ_LINE)) MCFG_WD_FDC_DRQ_CALLBACK(INPUTLINE(M6502_FDC_TAG, M6502_SET_OVERFLOW)) - MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":0", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats) - MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG":1", c8280_floppies, "8dsdd", floppy_image_device::default_floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG ":0", c8280_floppies, "8dsdd", c8280_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD(WD1797_TAG ":1", c8280_floppies, "8dsdd", c8280_device::floppy_formats) MACHINE_CONFIG_END @@ -390,20 +385,20 @@ inline void c8280_device::update_ieee_signals() // c8280_device - constructor //------------------------------------------------- -c8280_device::c8280_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, C8280, "C8280", tag, owner, clock, "c8280", __FILE__), - device_ieee488_interface(mconfig, *this), - m_maincpu(*this, M6502_DOS_TAG), - m_fdccpu(*this, M6502_FDC_TAG), - m_riot0(*this, M6532_0_TAG), - m_riot1(*this, M6532_1_TAG), - m_fdc(*this, WD1797_TAG), - m_floppy0(*this, WD1797_TAG":0"), - m_floppy1(*this, WD1797_TAG":1"), - m_address(*this, "ADDRESS"), - m_rfdo(1), - m_daco(1), - m_atna(1) +c8280_device::c8280_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, C8280, "C8280", tag, owner, clock, "c8280", __FILE__), + device_ieee488_interface(mconfig, *this), + m_maincpu(*this, M6502_DOS_TAG), + m_fdccpu(*this, M6502_FDC_TAG), + m_riot0(*this, M6532_0_TAG), + m_riot1(*this, M6532_1_TAG), + m_fdc(*this, WD1797_TAG), + m_floppy0(*this, WD1797_TAG ":0"), + m_floppy1(*this, WD1797_TAG ":1"), + m_address(*this, "ADDRESS"), + m_rfdo(1), + m_daco(1), + m_atna(1) { } @@ -418,6 +413,7 @@ void c8280_device::device_start() save_item(NAME(m_rfdo)); save_item(NAME(m_daco)); save_item(NAME(m_atna)); + save_item(NAME(m_ifc)); save_item(NAME(m_fk5)); } @@ -481,12 +477,12 @@ READ8_MEMBER( c8280_device::fk5_r ) bit description - 0 DS1 - 1 DS2 - 2 _DDEN + 0 + 1 + 2 3 DCHG 4 TSID - 5 MOTOR ENABLE + 5 6 0 7 0 diff --git a/src/emu/bus/ieee488/c8280.h b/src/emu/bus/ieee488/c8280.h index 947d382dc7f..ecb519ace7d 100644 --- a/src/emu/bus/ieee488/c8280.h +++ b/src/emu/bus/ieee488/c8280.h @@ -14,10 +14,10 @@ #ifndef __C8280__ #define __C8280__ - #include "emu.h" #include "ieee488.h" #include "cpu/m6502/m6502.h" +#include "formats/c8280_dsk.h" #include "machine/6532riot.h" #include "machine/wd_fdc.h" @@ -51,6 +51,8 @@ public: DECLARE_READ8_MEMBER( fk5_r ); DECLARE_WRITE8_MEMBER( fk5_w ); + DECLARE_FLOPPY_FORMATS( floppy_formats ); + protected: // device-level overrides virtual void device_start(); diff --git a/src/emu/bus/intv/ecs.c b/src/emu/bus/intv/ecs.c index 7862b1cc1e2..67da5066caa 100644 --- a/src/emu/bus/intv/ecs.c +++ b/src/emu/bus/intv/ecs.c @@ -54,8 +54,8 @@ void intv_ecs_device::device_start() // if the ECS is mounted directly in the system, use device rom and alloc RAM if (m_rom == NULL) { - astring region_tag; - m_rom = memregion(region_tag.cpy(tag()).cat(":ecs").c_str())->base(); + std::string region_tag; + m_rom = memregion(region_tag.assign(tag()).append(":ecs").c_str())->base(); } if (m_ram.empty()) { diff --git a/src/emu/bus/intv/slot.c b/src/emu/bus/intv/slot.c index 2702247554b..834935bae68 100644 --- a/src/emu/bus/intv/slot.c +++ b/src/emu/bus/intv/slot.c @@ -118,9 +118,7 @@ void device_intv_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(INTVSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(INTVSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); memset(m_rom, 0xff, size); m_rom_size = size; } @@ -310,7 +308,7 @@ int intv_cart_slot_device::load_fullpath() // 7. extra = 1 ECS, 2 Intellivoice int start, size; int mapper, rom[5], ram, extra; - astring extrainfo; + std::string extrainfo; m_cart->rom_alloc(0x20000, tag()); ROM = (UINT8 *)m_cart->get_rom_base(); @@ -459,7 +457,7 @@ bool intv_cart_slot_device::call_softlist_load(software_list_device &swlist, con get default card software -------------------------------------------------*/ -void intv_cart_slot_device::get_default_card_software(astring &result) +void intv_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -479,7 +477,7 @@ void intv_cart_slot_device::get_default_card_software(astring &result) // assume it's .BIN and try to use .hsi file to determine type (just RAM) int start; int mapper, rom[5], ram, extra; - astring extrainfo; + std::string extrainfo; if (hashfile_extrainfo(*this, extrainfo)) { @@ -503,7 +501,7 @@ void intv_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } software_get_default_slot(result, "intv_rom"); diff --git a/src/emu/bus/intv/slot.h b/src/emu/bus/intv/slot.h index 4cdcc444b4b..44a50ce28b7 100644 --- a/src/emu/bus/intv/slot.h +++ b/src/emu/bus/intv/slot.h @@ -118,7 +118,7 @@ public: virtual const char *file_extensions() const { return "bin,int,rom,itv"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ16_MEMBER(read_rom04) { if (m_cart) return m_cart->read_rom04(space, offset, mem_mask); else return 0xffff; } diff --git a/src/emu/bus/iq151/iq151.c b/src/emu/bus/iq151/iq151.c index 51c3b576c56..842602aceb8 100644 --- a/src/emu/bus/iq151/iq151.c +++ b/src/emu/bus/iq151/iq151.c @@ -204,7 +204,7 @@ bool iq151cart_slot_device::call_softlist_load(software_list_device &swlist, con get default card software -------------------------------------------------*/ -void iq151cart_slot_device::get_default_card_software(astring &result) +void iq151cart_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "basic6"); } diff --git a/src/emu/bus/iq151/iq151.h b/src/emu/bus/iq151/iq151.h index 9b85ee9d3a2..4b9c5db9887 100644 --- a/src/emu/bus/iq151/iq151.h +++ b/src/emu/bus/iq151/iq151.h @@ -106,7 +106,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual void read(offs_t offset, UINT8 &data); diff --git a/src/emu/bus/isa/cga.c b/src/emu/bus/isa/cga.c index da5591d1a2c..c18a4c38940 100644 --- a/src/emu/bus/isa/cga.c +++ b/src/emu/bus/isa/cga.c @@ -362,8 +362,7 @@ void isa8_cga_device::device_start() } } - astring tempstring; - m_chr_gen_base = memregion(subtag(tempstring, "gfx1").c_str())->base(); + m_chr_gen_base = memregion(subtag("gfx1").c_str())->base(); m_chr_gen = m_chr_gen_base + m_chr_gen_offset[1]; save_item(NAME(m_framecnt)); @@ -845,7 +844,7 @@ MC6845_UPDATE_ROW( isa8_cga_device::cga_gfx_2bpp_update_row ) if ( y == 0 ) CGA_LOG(1,"cga_gfx_2bpp_update_row",("\n")); for ( i = 0; i < x_count; i++ ) { - UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( y & 1 ) << 13 ); + UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 1 ) << 13 ); UINT8 data = videoram[ offset ]; *p = palette[m_palette_lut_2bpp[ ( data >> 6 ) & 0x03 ]]; p++; @@ -1889,3 +1888,122 @@ const rom_entry *isa8_cga_mc1502_device::device_rom_region() const { return ROM_NAME( mc1502 ); } + +const device_type ISA8_CGA_M24 = &device_creator<isa8_cga_m24_device>; + +isa8_cga_m24_device::isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + isa8_cga_device( mconfig, ISA8_CGA_M24, "Olivetti M24 CGA", tag, owner, clock, "cga_m24", __FILE__) +{ + m_vram_size = 0x8000; +} + +void isa8_cga_m24_device::device_reset() +{ + isa8_cga_device::device_reset(); + m_mode2 = 0; + m_start_offset = 0; +} + +WRITE8_MEMBER( isa8_cga_m24_device::io_write ) +{ + mc6845_device *mc6845 = subdevice<mc6845_device>(CGA_MC6845_NAME); + switch(offset) + { + case 0: case 2: case 4: case 6: + m_index = data; + mc6845->address_w( space, offset, data ); + break; + case 1: case 3: case 5: case 7: + switch(m_index & 0x1f) // TODO: this is handled by a pal and prom + { + case 0: + data &= 0x7f; + break; + case 9: + if((data < 0x80) && (data != 3)) + data = (data << 1) + 1; + break; + case 10: + data = ((data << 1) & 0x1f) | (data & 0x60); + break; + case 11: + data <<= 1; + break; + } + mc6845->register_w( space, offset, data ); + break; + case 0x0e: + m_mode2 = data; + if((data & 8) && !(data & 1)) + m_start_offset = 0x4000; + else + m_start_offset = 0; + break; + default: + isa8_cga_device::io_write(space, offset, data); + break; + } +} + +READ8_MEMBER( isa8_cga_m24_device::io_read ) +{ + UINT8 data = 0xff; + + switch(offset) + { + case 0x0a: + data = 0xc0 | m_vsync | ( ( data & 0x40 ) >> 4 ) | m_hsync; // 0xc0 == no expansion + break; + case 0x0e: + data = m_mode2; + break; + default: + data = isa8_cga_device::io_read(space, offset); + break; + } + return data; +} + +MC6845_UPDATE_ROW( isa8_cga_m24_device::crtc_update_row ) +{ + if(m_mode2 & 1) + m24_gfx_1bpp_m24_update_row(bitmap, cliprect, ma, ra, y, x_count, cursor_x, de, hbp, vbp); + else + isa8_cga_device::crtc_update_row(bitmap, cliprect, ma, ra >> 1, y, x_count, cursor_x, de, hbp, vbp); +} + +MC6845_UPDATE_ROW( isa8_cga_m24_device::m24_gfx_1bpp_m24_update_row ) +{ + UINT8 *videoram = &m_vram[m_start_offset]; + UINT32 *p = &bitmap.pix32(y); + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + UINT8 fg = m_color_select & 0x0F; + int i; + + if ( y == 0 ) CGA_LOG(1,"m24_gfx_1bpp_m24_update_row",("\n")); + for ( i = 0; i < x_count; i++ ) + { + UINT16 offset = ( ( ( ma + i ) << 1 ) & 0x1fff ) | ( ( ra & 3 ) << 13 ); + UINT8 data = videoram[ offset ]; + + *p = palette[( data & 0x80 ) ? fg : 0]; p++; + *p = palette[( data & 0x40 ) ? fg : 0]; p++; + *p = palette[( data & 0x20 ) ? fg : 0]; p++; + *p = palette[( data & 0x10 ) ? fg : 0]; p++; + *p = palette[( data & 0x08 ) ? fg : 0]; p++; + *p = palette[( data & 0x04 ) ? fg : 0]; p++; + *p = palette[( data & 0x02 ) ? fg : 0]; p++; + *p = palette[( data & 0x01 ) ? fg : 0]; p++; + + data = videoram[ offset + 1 ]; + + *p = palette[( data & 0x80 ) ? fg : 0]; p++; + *p = palette[( data & 0x40 ) ? fg : 0]; p++; + *p = palette[( data & 0x20 ) ? fg : 0]; p++; + *p = palette[( data & 0x10 ) ? fg : 0]; p++; + *p = palette[( data & 0x08 ) ? fg : 0]; p++; + *p = palette[( data & 0x04 ) ? fg : 0]; p++; + *p = palette[( data & 0x02 ) ? fg : 0]; p++; + *p = palette[( data & 0x01 ) ? fg : 0]; p++; + } +} diff --git a/src/emu/bus/isa/cga.h b/src/emu/bus/isa/cga.h index cf889c4c22f..9f5c9227676 100644 --- a/src/emu/bus/isa/cga.h +++ b/src/emu/bus/isa/cga.h @@ -260,4 +260,25 @@ public: extern const device_type ISA8_CGA_MC1502; +class isa8_cga_m24_device : + public isa8_cga_device +{ +public: + // construction/destruction + isa8_cga_m24_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + // optional information overrides + //virtual const rom_entry *device_rom_region() const; + virtual DECLARE_READ8_MEMBER( io_read ); + virtual DECLARE_WRITE8_MEMBER( io_write ); + virtual MC6845_UPDATE_ROW( crtc_update_row ); + MC6845_UPDATE_ROW( m24_gfx_1bpp_m24_update_row ); +protected: + virtual void device_reset(); +private: + UINT8 m_mode2, m_index; +}; + +// device type definition +extern const device_type ISA8_CGA_M24; + #endif /* __ISA_CGA_H__ */ diff --git a/src/emu/bus/isa/ega.c b/src/emu/bus/isa/ega.c index 2f620fc0e62..0be504cdb0d 100644 --- a/src/emu/bus/isa/ega.c +++ b/src/emu/bus/isa/ega.c @@ -593,8 +593,6 @@ void isa8_ega_device::device_start() if (m_palette != NULL && !m_palette->started()) throw device_missing_dependencies(); - astring tempstring; - set_isa_device(); for (int i = 0; i < 64; i++ ) @@ -608,8 +606,8 @@ void isa8_ega_device::device_start() if(m_default_bios_tag != "iskr3104") { - UINT8 *dst = memregion(subtag(tempstring, "user2").c_str())->base() + 0x0000; - UINT8 *src = memregion(subtag(tempstring, "user1").c_str())->base() + 0x3fff; + UINT8 *dst = memregion(subtag("user2").c_str())->base() + 0x0000; + UINT8 *src = memregion(subtag("user1").c_str())->base() + 0x3fff; int i; /* Perform the EGA bios address line swaps */ @@ -619,10 +617,10 @@ void isa8_ega_device::device_start() } } else - memcpy(memregion(subtag(tempstring, "user2").c_str())->base(), memregion(subtag(tempstring, "user1").c_str())->base(), 0x4000); + memcpy(memregion(subtag("user2").c_str())->base(), memregion(subtag("user1").c_str())->base(), 0x4000); /* Install 256KB Video ram on our EGA card */ - m_vram = machine().memory().region_alloc(subtag(tempstring, "vram").c_str(), 256 * 1024, 1, ENDIANNESS_LITTLE); + m_vram = machine().memory().region_alloc(subtag("vram").c_str(), 256 * 1024, 1, ENDIANNESS_LITTLE); m_videoram = m_vram->base(); m_plane[0] = m_videoram + 0x00000; diff --git a/src/emu/bus/isa/hdc.c b/src/emu/bus/isa/hdc.c index 9376ab65952..b12303a20b5 100644 --- a/src/emu/bus/isa/hdc.c +++ b/src/emu/bus/isa/hdc.c @@ -257,14 +257,13 @@ void isa8_hdc_device::device_reset() hard_disk_file *isa8_hdc_device::pc_hdc_file(int id) { harddisk_image_device *img = NULL; - astring tempstring; switch( id ) { case 0: - img = dynamic_cast<harddisk_image_device *>(machine().device(subtag(tempstring, "primary").c_str())); + img = dynamic_cast<harddisk_image_device *>(machine().device(subtag("primary").c_str())); break; case 1: - img = dynamic_cast<harddisk_image_device *>(machine().device(subtag(tempstring, "slave").c_str())); + img = dynamic_cast<harddisk_image_device *>(machine().device(subtag("slave").c_str())); break; } if ( img == NULL ) diff --git a/src/emu/bus/isa/isa.c b/src/emu/bus/isa/isa.c index 68068691958..06e504d5b63 100644 --- a/src/emu/bus/isa/isa.c +++ b/src/emu/bus/isa/isa.c @@ -329,7 +329,6 @@ void isa8_device::unmap_bank(offs_t start, offs_t end, offs_t mask, offs_t mirro void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t mask, offs_t mirror, const char *tag, const char *region) { - astring tempstring; if (machine().root_device().memregion("isa")) { UINT8 *src = dev->memregion(region)->base(); UINT8 *dest = machine().root_device().memregion("isa")->base() + start - 0xc0000; @@ -337,7 +336,7 @@ void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, offs_t ma } else { m_prgspace->install_read_bank(start, end, mask, mirror, tag); m_prgspace->unmap_write(start, end, mask, mirror); - machine().root_device().membank(tag)->set_base(machine().root_device().memregion(dev->subtag(tempstring, region).c_str())->base()); + machine().root_device().membank(tag)->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base()); } } diff --git a/src/emu/bus/isa/isa_cards.c b/src/emu/bus/isa/isa_cards.c index 4bd09ba9c7f..4f1d133644b 100644 --- a/src/emu/bus/isa/isa_cards.c +++ b/src/emu/bus/isa/isa_cards.c @@ -15,6 +15,7 @@ SLOT_INTERFACE_START( pc_isa8_cards ) SLOT_INTERFACE("cga_ec1841", ISA8_EC1841_0002) SLOT_INTERFACE("cga_poisk2", ISA8_CGA_POISK2) SLOT_INTERFACE("cga_mc1502", ISA8_CGA_MC1502) + SLOT_INTERFACE("cga_m24", ISA8_CGA_M24) SLOT_INTERFACE("aga", ISA8_AGA) SLOT_INTERFACE("aga_pc200", ISA8_AGA_PC200) SLOT_INTERFACE("ega", ISA8_EGA) @@ -57,7 +58,6 @@ SLOT_INTERFACE_START( pc_isa16_cards ) SLOT_INTERFACE("ega", ISA8_EGA) SLOT_INTERFACE("vga", ISA8_VGA) SLOT_INTERFACE("svga_et4k", ISA8_SVGA_ET4K) - SLOT_INTERFACE("svga_dm",ISA8_SVGA_CIRRUS) SLOT_INTERFACE("num9rev",ISA8_NUM_9_REV) SLOT_INTERFACE("com", ISA8_COM) SLOT_INTERFACE("comat", ISA8_COM_AT) @@ -91,6 +91,8 @@ SLOT_INTERFACE_START( pc_isa16_cards ) SLOT_INTERFACE("s3virge", ISA16_S3VIRGE) SLOT_INTERFACE("s3virgedx", ISA16_S3VIRGEDX) SLOT_INTERFACE("dms3d2kp", ISA16_DMS3D2KPRO) + SLOT_INTERFACE("svga_dm",ISA16_SVGA_CIRRUS) + SLOT_INTERFACE("clgd542x",ISA16_SVGA_CIRRUS_GD542X) SLOT_INTERFACE("gfxultra", ISA16_VGA_GFXULTRA) SLOT_INTERFACE("gfxultrap", ISA16_SVGA_GFXULTRAPRO) SLOT_INTERFACE("tgui9680",ISA16_SVGA_TGUI9680) diff --git a/src/emu/bus/isa/mda.c b/src/emu/bus/isa/mda.c index f50b03602d7..5dd154919ec 100644 --- a/src/emu/bus/isa/mda.c +++ b/src/emu/bus/isa/mda.c @@ -195,8 +195,7 @@ void isa8_mda_device::device_reset() m_hsync = 0; m_pixel = 0; - astring tempstring; - m_chr_gen = memregion(subtag(tempstring, "gfx1").c_str())->base(); + m_chr_gen = memregion(subtag("gfx1").c_str())->base(); } /*************************************************************************** @@ -612,8 +611,7 @@ void isa8_hercules_device::device_reset() isa8_mda_device::device_reset(); m_configuration_switch = 0; - astring tempstring; - m_chr_gen = memregion(subtag(tempstring, "gfx1").c_str())->base(); + m_chr_gen = memregion(subtag("gfx1").c_str())->base(); } /*************************************************************************** diff --git a/src/emu/bus/isa/pc1640_iga.c b/src/emu/bus/isa/pc1640_iga.c index 0238301e6d8..9b052a47f64 100644 --- a/src/emu/bus/isa/pc1640_iga.c +++ b/src/emu/bus/isa/pc1640_iga.c @@ -85,8 +85,6 @@ void isa8_pc1640_iga_device::device_start() if (m_palette != NULL && !m_palette->started()) throw device_missing_dependencies(); - astring tempstring; - set_isa_device(); for (int i = 0; i < 64; i++ ) @@ -99,7 +97,7 @@ void isa8_pc1640_iga_device::device_start() } /* Install 256KB Video ram on our EGA card */ - m_vram = machine().memory().region_alloc(subtag(tempstring, "vram").c_str(), 256 * 1024, 1, ENDIANNESS_LITTLE); + m_vram = machine().memory().region_alloc(subtag("vram").c_str(), 256 * 1024, 1, ENDIANNESS_LITTLE); m_videoram = m_vram->base(); m_plane[0] = m_videoram + 0x00000; diff --git a/src/emu/bus/isa/svga_cirrus.c b/src/emu/bus/isa/svga_cirrus.c index 78e522c1531..03e2413e984 100644 --- a/src/emu/bus/isa/svga_cirrus.c +++ b/src/emu/bus/isa/svga_cirrus.c @@ -6,7 +6,6 @@ #include "emu.h" #include "svga_cirrus.h" -#include "video/pc_vga.h" ROM_START( dm_clgd5430 ) ROM_REGION(0x8000,"dm_clgd5430", 0) @@ -18,7 +17,8 @@ ROM_END // GLOBAL VARIABLES //************************************************************************** -const device_type ISA8_SVGA_CIRRUS = &device_creator<isa8_svga_cirrus_device>; +const device_type ISA16_SVGA_CIRRUS = &device_creator<isa16_svga_cirrus_device>; +const device_type ISA16_SVGA_CIRRUS_GD542X = &device_creator<isa16_svga_cirrus_gd542x_device>; static MACHINE_CONFIG_FRAGMENT( vga_cirrus ) MCFG_SCREEN_ADD("screen", RASTER) @@ -35,7 +35,7 @@ MACHINE_CONFIG_END // machine configurations //------------------------------------------------- -machine_config_constructor isa8_svga_cirrus_device::device_mconfig_additions() const +machine_config_constructor isa16_svga_cirrus_device::device_mconfig_additions() const { return MACHINE_CONFIG_NAME( vga_cirrus ); } @@ -44,7 +44,7 @@ machine_config_constructor isa8_svga_cirrus_device::device_mconfig_additions() c // rom_region - device-specific ROM region //------------------------------------------------- -const rom_entry *isa8_svga_cirrus_device::device_rom_region() const +const rom_entry *isa16_svga_cirrus_device::device_rom_region() const { return ROM_NAME( dm_clgd5430 ); } @@ -54,21 +54,21 @@ const rom_entry *isa8_svga_cirrus_device::device_rom_region() const //************************************************************************** //------------------------------------------------- -// isa8_vga_device - constructor +// isa16_vga_device - constructor //------------------------------------------------- -isa8_svga_cirrus_device::isa8_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, ISA8_SVGA_CIRRUS, "Diamond Multimedia Graphics Card", tag, owner, clock, "dm_clgd5430", __FILE__), - device_isa8_card_interface(mconfig, *this) +isa16_svga_cirrus_device::isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, ISA16_SVGA_CIRRUS, "Diamond Speedstar Pro SE ISA Graphics Card (BIOS v1.00)", tag, owner, clock, "dm_clgd5430", __FILE__), + device_isa16_card_interface(mconfig, *this) { } //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa8_svga_cirrus_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } +READ8_MEMBER(isa16_svga_cirrus_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } -void isa8_svga_cirrus_device::device_start() +void isa16_svga_cirrus_device::device_start() { set_isa_device(); @@ -79,7 +79,6 @@ void isa8_svga_cirrus_device::device_start() m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03b0_w),m_vga)); m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03c0_w),m_vga)); m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::port_03d0_w),m_vga)); -// m_isa->install_device(0x9ae8, 0x9aeb, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::s3_port_9ae8_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::s3_port_9ae8_w),m_vga)); m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(cirrus_gd5430_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_gd5430_device::mem_w),m_vga)); } @@ -88,6 +87,92 @@ void isa8_svga_cirrus_device::device_start() // device_reset - device-specific reset //------------------------------------------------- -void isa8_svga_cirrus_device::device_reset() +void isa16_svga_cirrus_device::device_reset() +{ +} + + +/* + Generic CL-GD542x video card +*/ + +ROM_START( clgd542x ) + ROM_REGION(0x08000, "clgd542x", 0) + ROM_LOAD16_BYTE("techyosd-isa-bios-v1.2.u8", 0x00000, 0x04000, CRC(6adf7e71) SHA1(2b07d964cc7c2c0aa560625b7c12f38d4537d652) ) + ROM_CONTINUE( 0x00001, 0x04000 ) +ROM_END + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +static MACHINE_CONFIG_FRAGMENT( vga_cirrus_gd542x ) + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) + MCFG_SCREEN_UPDATE_DEVICE("vga", cirrus_gd5428_device, screen_update) + + MCFG_PALETTE_ADD("palette", 0x100) + + MCFG_DEVICE_ADD("vga", CIRRUS_GD5428, 0) +MACHINE_CONFIG_END + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor isa16_svga_cirrus_gd542x_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( vga_cirrus_gd542x ); +} + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *isa16_svga_cirrus_gd542x_device::device_rom_region() const +{ + return ROM_NAME( clgd542x ); +} + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// isa16_vga_device - constructor +//------------------------------------------------- + +isa16_svga_cirrus_gd542x_device::isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, ISA16_SVGA_CIRRUS_GD542X, "Generic Cirrus Logic GD542x Graphics Card (BIOS v1.20)", tag, owner, clock, "clgd542x", __FILE__), + device_isa16_card_interface(mconfig, *this) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- +READ8_MEMBER(isa16_svga_cirrus_gd542x_device::input_port_0_r ) { return 0xff; } //return space.machine().root_device().ioport("IN0")->read(); } + +void isa16_svga_cirrus_gd542x_device::device_start() +{ + set_isa_device(); + + m_vga = subdevice<cirrus_gd5428_device>("vga"); + + m_isa->install_rom(this, 0xc0000, 0xc7fff, 0, 0, "svga", "clgd542x"); + + m_isa->install_device(0x03b0, 0x03bf, 0, 0, read8_delegate(FUNC(cirrus_gd5428_device::port_03b0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03b0_w),m_vga)); + m_isa->install_device(0x03c0, 0x03cf, 0, 0, read8_delegate(FUNC(cirrus_gd5428_device::port_03c0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03c0_w),m_vga)); + m_isa->install_device(0x03d0, 0x03df, 0, 0, read8_delegate(FUNC(cirrus_gd5428_device::port_03d0_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::port_03d0_w),m_vga)); + + m_isa->install_memory(0xa0000, 0xbffff, 0, 0, read8_delegate(FUNC(cirrus_gd5428_device::mem_r),m_vga), write8_delegate(FUNC(cirrus_gd5428_device::mem_w),m_vga)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void isa16_svga_cirrus_gd542x_device::device_reset() { } diff --git a/src/emu/bus/isa/svga_cirrus.h b/src/emu/bus/isa/svga_cirrus.h index c5f60d89fc3..17b39f1e98e 100644 --- a/src/emu/bus/isa/svga_cirrus.h +++ b/src/emu/bus/isa/svga_cirrus.h @@ -5,21 +5,19 @@ #include "emu.h" #include "isa.h" -#include "video/pc_vga.h" +#include "video/clgd542x.h" //************************************************************************** // TYPE DEFINITIONS //************************************************************************** -// ======================> isa8_vga_device - -class isa8_svga_cirrus_device : +class isa16_svga_cirrus_device : public device_t, - public device_isa8_card_interface + public device_isa16_card_interface { public: // construction/destruction - isa8_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // optional information overrides virtual machine_config_constructor device_mconfig_additions() const; @@ -34,8 +32,30 @@ private: cirrus_gd5430_device *m_vga; }; +class isa16_svga_cirrus_gd542x_device : + public device_t, + public device_isa16_card_interface +{ +public: + // construction/destruction + isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual const rom_entry *device_rom_region() const; + + DECLARE_READ8_MEMBER(input_port_0_r); +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); +private: + cirrus_gd5428_device *m_vga; +}; + // device type definition -extern const device_type ISA8_SVGA_CIRRUS; +extern const device_type ISA16_SVGA_CIRRUS; +extern const device_type ISA16_SVGA_CIRRUS_GD542X; #endif /* __ISA_VGA_H__ */ diff --git a/src/emu/bus/isa/trident.c b/src/emu/bus/isa/trident.c index 971d627068b..63d70492c5d 100644 --- a/src/emu/bus/isa/trident.c +++ b/src/emu/bus/isa/trident.c @@ -10,21 +10,6 @@ #include "trident.h" #include "debugger.h" -enum -{ - SCREEN_OFF = 0, - TEXT_MODE, - VGA_MODE, - EGA_MODE, - CGA_MODE, - MONO_MODE, - RGB8_MODE, - RGB15_MODE, - RGB16_MODE, - RGB24_MODE, - RGB32_MODE -}; - const device_type TRIDENT_VGA = &device_creator<trident_vga_device>; #define CRTC_PORT_ADDR ((vga.miscellaneous_output&1)?0x3d0:0x3b0) diff --git a/src/emu/bus/kc/kc.c b/src/emu/bus/kc/kc.c index ebef757e7b0..5ecc1b196b6 100644 --- a/src/emu/bus/kc/kc.c +++ b/src/emu/bus/kc/kc.c @@ -370,7 +370,7 @@ bool kccart_slot_device::call_softlist_load(software_list_device &swlist, const get default card software -------------------------------------------------*/ -void kccart_slot_device::get_default_card_software(astring &result) +void kccart_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "standard"); } diff --git a/src/emu/bus/kc/kc.h b/src/emu/bus/kc/kc.h index 1b9b4c7f5d5..def77ffd955 100644 --- a/src/emu/bus/kc/kc.h +++ b/src/emu/bus/kc/kc.h @@ -104,7 +104,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); }; // device type definition diff --git a/src/emu/bus/macpds/macpds.c b/src/emu/bus/macpds/macpds.c index 08355e2c47c..0a0f07eb3a1 100644 --- a/src/emu/bus/macpds/macpds.c +++ b/src/emu/bus/macpds/macpds.c @@ -187,9 +187,8 @@ void device_macpds_card_interface::install_bank(offs_t start, offs_t end, offs_t void device_macpds_card_interface::install_rom(device_t *dev, const char *romregion, UINT32 addr) { - astring tempstring; - UINT8 *rom = device().machine().root_device().memregion(dev->subtag(tempstring, romregion).c_str())->base(); - UINT32 romlen = device().machine().root_device().memregion(dev->subtag(tempstring, romregion).c_str())->bytes(); + UINT8 *rom = device().machine().root_device().memregion(dev->subtag(romregion).c_str())->base(); + UINT32 romlen = device().machine().root_device().memregion(dev->subtag(romregion).c_str())->bytes(); char bankname[128]; sprintf(bankname, "rom_%x", addr); diff --git a/src/emu/bus/macpds/pds_tpdfpd.c b/src/emu/bus/macpds/pds_tpdfpd.c index 1adcedcd680..fb46126eb62 100644 --- a/src/emu/bus/macpds/pds_tpdfpd.c +++ b/src/emu/bus/macpds/pds_tpdfpd.c @@ -88,7 +88,7 @@ macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, device_video_interface(mconfig, *this), device_macpds_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(SEDISPLAY_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(SEDISPLAY_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -97,7 +97,7 @@ macpds_sedisplay_device::macpds_sedisplay_device(const machine_config &mconfig, device_video_interface(mconfig, *this), device_macpds_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(SEDISPLAY_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(SEDISPLAY_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/macpds/pds_tpdfpd.h b/src/emu/bus/macpds/pds_tpdfpd.h index e33c505fb49..e62a9d74dff 100644 --- a/src/emu/bus/macpds/pds_tpdfpd.h +++ b/src/emu/bus/macpds/pds_tpdfpd.h @@ -43,7 +43,7 @@ public: UINT32 m_vbl_disable; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/megadrive/md_slot.c b/src/emu/bus/megadrive/md_slot.c index 383912da695..7fe2780440c 100644 --- a/src/emu/bus/megadrive/md_slot.c +++ b/src/emu/bus/megadrive/md_slot.c @@ -85,9 +85,7 @@ void device_md_cart_interface::rom_alloc(size_t size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(MDSLOT_ROM_REGION_TAG); - m_rom = (UINT16 *)device().machine().memory().region_alloc(tempstring.c_str(), size, 2, ENDIANNESS_LITTLE)->base(); + m_rom = (UINT16 *)device().machine().memory().region_alloc(std::string(tag).append(MDSLOT_ROM_REGION_TAG).c_str(), size, 2, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -900,7 +898,7 @@ int base_md_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) get default card software -------------------------------------------------*/ -void base_md_cart_slot_device::get_default_card_software(astring &result) +void base_md_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -919,7 +917,7 @@ void base_md_cart_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); } else software_get_default_slot(result, "rom"); @@ -989,7 +987,7 @@ void base_md_cart_slot_device::file_logging(UINT8 *ROM8, UINT32 rom_len, UINT32 UINT32 rom_start, rom_end, ram_start, ram_end, sram_start = 0, sram_end = 0; UINT16 checksum, csum = 0; bool valid_sram = FALSE, is_pico = FALSE; - astring ctrl(""), reg(""); + std::string ctrl(""), reg(""); // LOG FILE DETAILS logerror("FILE DETAILS\n"); @@ -1027,9 +1025,9 @@ void base_md_cart_slot_device::file_logging(UINT8 *ROM8, UINT32 rom_len, UINT32 { io[i] = ROM8[0x190 + (i ^ 1)]; if (io[i] == 'J') - ctrl.cat(" - Joypad 3 buttons [J]\n"); + ctrl.append(" - Joypad 3 buttons [J]\n"); if (io[i] == '6') - ctrl.cat(" - Joypad 6 buttons [6]\n"); + ctrl.append(" - Joypad 6 buttons [6]\n"); } rom_start = (ROM8[0x1a1] << 24 | ROM8[0x1a0] << 16 | ROM8[0x1a3] << 8 | ROM8[0x1a2]); @@ -1051,11 +1049,11 @@ void base_md_cart_slot_device::file_logging(UINT8 *ROM8, UINT32 rom_len, UINT32 { country[i] = ROM8[0x1f0 + (i ^ 1)]; if (country[i] == 'J') - reg.cat(" - Japan [J]\n"); + reg.append(" - Japan [J]\n"); if (country[i] == 'U') - reg.cat(" - USA [U]\n"); + reg.append(" - USA [U]\n"); if (country[i] == 'E') - reg.cat(" - Europe [E]\n"); + reg.append(" - Europe [E]\n"); } // compute cart checksum to compare with expected one diff --git a/src/emu/bus/megadrive/md_slot.h b/src/emu/bus/megadrive/md_slot.h index 8aa7e10987e..de7074537fd 100644 --- a/src/emu/bus/megadrive/md_slot.h +++ b/src/emu/bus/megadrive/md_slot.h @@ -159,7 +159,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); int get_type() { return m_type; } diff --git a/src/emu/bus/megadrive/stm95.c b/src/emu/bus/megadrive/stm95.c index e403b22deb5..9fc24c1532b 100644 --- a/src/emu/bus/megadrive/stm95.c +++ b/src/emu/bus/megadrive/stm95.c @@ -22,13 +22,13 @@ stm95_eeprom_device::stm95_eeprom_device(running_machine &machine, UINT8 *eeprom m_machine(machine) { eeprom_data = eeprom; - state_save_register_item(machine, "STM95", NULL, 0, latch); - state_save_register_item(machine, "STM95", NULL, 0, reset_line); - state_save_register_item(machine, "STM95", NULL, 0, sck_line); - state_save_register_item(machine, "STM95", NULL, 0, WEL); - state_save_register_item(machine, "STM95", NULL, 0, stream_pos); - state_save_register_item(machine, "STM95", NULL, 0, stream_data); - state_save_register_item(machine, "STM95", NULL, 0, eeprom_addr); + m_machine.save().save_item(latch, "STM95/latch"); + m_machine.save().save_item(reset_line, "STM95/reset_line"); + m_machine.save().save_item(sck_line, "STM95/sck_line"); + m_machine.save().save_item(WEL, "STM95/WEL"); + m_machine.save().save_item(stream_pos, "STM95/stream_pos"); + m_machine.save().save_item(stream_data, "STM95/stream_data"); + m_machine.save().save_item(eeprom_addr, "STM95/eeprom_addr"); } void stm95_eeprom_device::set_cs_line(int state) diff --git a/src/emu/bus/msx_slot/cartridge.c b/src/emu/bus/msx_slot/cartridge.c index 091bb9345f2..fde2470802c 100644 --- a/src/emu/bus/msx_slot/cartridge.c +++ b/src/emu/bus/msx_slot/cartridge.c @@ -166,7 +166,7 @@ bool msx_slot_cartridge_device::call_load() } // Check if there's some mapper related - astring extrainfo; + std::string extrainfo; if (hashfile_extrainfo(*this, extrainfo)) { } @@ -276,7 +276,7 @@ int msx_slot_cartridge_device::get_cart_type(UINT8 *rom, UINT32 length) } -void msx_slot_cartridge_device::get_default_card_software(astring &result) +void msx_slot_cartridge_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -286,7 +286,7 @@ void msx_slot_cartridge_device::get_default_card_software(astring &result) int type = NOMAPPER; // Check if there's some mapper related information in the hashfiles - astring extrainfo; + std::string extrainfo; if (hashfile_extrainfo(*this, extrainfo)) { int extrainfo_type = -1; @@ -334,7 +334,7 @@ void msx_slot_cartridge_device::get_default_card_software(astring &result) slot_string = msx_cart_get_slot_option(type); } - result.cpy(slot_string); + result.assign(slot_string); return; } software_get_default_slot(result, "nomapper"); diff --git a/src/emu/bus/msx_slot/cartridge.h b/src/emu/bus/msx_slot/cartridge.h index a086e3d9592..6543284d67b 100644 --- a/src/emu/bus/msx_slot/cartridge.h +++ b/src/emu/bus/msx_slot/cartridge.h @@ -53,7 +53,7 @@ public: virtual const char *file_extensions() const { return "mx1,bin,rom"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // msx_internal_slot-level overrides virtual DECLARE_READ8_MEMBER(read); diff --git a/src/emu/bus/neogeo/neogeo_slot.c b/src/emu/bus/neogeo/neogeo_slot.c index c96314fbb27..497b2b237bc 100644 --- a/src/emu/bus/neogeo/neogeo_slot.c +++ b/src/emu/bus/neogeo/neogeo_slot.c @@ -202,7 +202,7 @@ bool neogeo_cart_slot_device::call_softlist_load(software_list_device &swlist, c get default card software -------------------------------------------------*/ -void neogeo_cart_slot_device::get_default_card_software(astring &result) +void neogeo_cart_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "rom"); } diff --git a/src/emu/bus/neogeo/neogeo_slot.h b/src/emu/bus/neogeo/neogeo_slot.h index 8104ca9bc09..5fc1ab8f730 100644 --- a/src/emu/bus/neogeo/neogeo_slot.h +++ b/src/emu/bus/neogeo/neogeo_slot.h @@ -39,13 +39,13 @@ public: virtual const char *file_extensions() const { return "bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ16_MEMBER(read_rom); UINT16* get_rom_base() { if (m_cart) { return m_cart->get_rom_base(); } else { return 0; } } - UINT32 get_rom_size() { if (m_cart) { return m_cart->get_rom_size()*sizeof(UINT16); } else { return 0; } } + UINT32 get_rom_size() { if (m_cart) { return m_cart->get_rom_size(); } else { return 0; } } UINT8* get_fixed_base() { if (m_cart) { return m_cart->get_fixed_base(); } else { return 0; } } UINT32 get_fixed_size() { if (m_cart) { return m_cart->get_fixed_size(); } else { return 0; } } UINT8* get_sprites_base() { if (m_cart) { return m_cart->get_sprites_base(); } else { return 0; } } diff --git a/src/emu/bus/nes/aladdin.c b/src/emu/bus/nes/aladdin.c index 1c6b97219eb..cd5712bc926 100644 --- a/src/emu/bus/nes/aladdin.c +++ b/src/emu/bus/nes/aladdin.c @@ -141,7 +141,7 @@ bool nes_aladdin_slot_device::call_softlist_load(software_list_device &swlist, c return TRUE; } -void nes_aladdin_slot_device::get_default_card_software(astring &result) +void nes_aladdin_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -162,7 +162,7 @@ void nes_aladdin_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); } else software_get_default_slot(result, "algn"); diff --git a/src/emu/bus/nes/aladdin.h b/src/emu/bus/nes/aladdin.h index fad8ac15f27..a53816268cb 100644 --- a/src/emu/bus/nes/aladdin.h +++ b/src/emu/bus/nes/aladdin.h @@ -63,7 +63,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); virtual DECLARE_READ8_MEMBER(read); void write_prg(UINT32 offset, UINT8 data) { if (m_cart) m_cart->write_prg(offset, data); } diff --git a/src/emu/bus/nes/datach.c b/src/emu/bus/nes/datach.c index c8d826e8095..d0a9bed64ee 100644 --- a/src/emu/bus/nes/datach.c +++ b/src/emu/bus/nes/datach.c @@ -144,7 +144,7 @@ bool nes_datach_slot_device::call_softlist_load(software_list_device &swlist, co return TRUE; } -void nes_datach_slot_device::get_default_card_software(astring &result) +void nes_datach_slot_device::get_default_card_software(std::string &result) { // any way to detect the game with X24C01? software_get_default_slot(result, "datach_rom"); diff --git a/src/emu/bus/nes/datach.h b/src/emu/bus/nes/datach.h index 76a95a06395..69cd1a646bf 100644 --- a/src/emu/bus/nes/datach.h +++ b/src/emu/bus/nes/datach.h @@ -65,7 +65,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); virtual DECLARE_READ8_MEMBER(read); void write_prg_bank(UINT8 bank) { if (m_cart) m_cart->write_prg_bank(bank); } diff --git a/src/emu/bus/nes/karastudio.c b/src/emu/bus/nes/karastudio.c index 3f3d1b649b8..db926c131e0 100644 --- a/src/emu/bus/nes/karastudio.c +++ b/src/emu/bus/nes/karastudio.c @@ -133,7 +133,7 @@ bool nes_kstudio_slot_device::call_softlist_load(software_list_device &swlist, c return TRUE; } -void nes_kstudio_slot_device::get_default_card_software(astring &result) +void nes_kstudio_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "ks_exp"); } diff --git a/src/emu/bus/nes/karastudio.h b/src/emu/bus/nes/karastudio.h index bfa4c252ac7..8c4a28afe17 100644 --- a/src/emu/bus/nes/karastudio.h +++ b/src/emu/bus/nes/karastudio.h @@ -62,7 +62,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); virtual DECLARE_READ8_MEMBER(read); void write_prg_bank(UINT8 bank) { if (m_cart) m_cart->write_prg_bank(bank); } diff --git a/src/emu/bus/nes/nes_ines.inc b/src/emu/bus/nes/nes_ines.inc index 07b48cd7629..62ca924075d 100644 --- a/src/emu/bus/nes/nes_ines.inc +++ b/src/emu/bus/nes/nes_ines.inc @@ -342,7 +342,7 @@ void nes_cart_slot_device::call_load_ines() UINT8 header[0x10]; UINT8 mapper, submapper = 0, local_options; bool ines20 = FALSE, prg16k; - astring mapinfo; + std::string mapinfo; int pcb_id = 0, mapint1 = 0, mapint2 = 0, mapint3 = 0, mapint4 = 0; int crc_hack = 0; bool bus_conflict = FALSE; @@ -813,7 +813,7 @@ const char * nes_cart_slot_device::get_default_card_ines(UINT8 *ROM, UINT32 len) { UINT8 mapper, submapper = 0; bool ines20 = FALSE; - astring mapinfo; + std::string mapinfo; int pcb_id = 0, mapint1 = 0, mapint2 = 0, mapint3 = 0, mapint4 = 0; int crc_hack = 0; diff --git a/src/emu/bus/nes/nes_pcb.inc b/src/emu/bus/nes/nes_pcb.inc index 8674f6a1b6c..d96420d5cbd 100644 --- a/src/emu/bus/nes/nes_pcb.inc +++ b/src/emu/bus/nes/nes_pcb.inc @@ -313,7 +313,7 @@ static const nes_pcb pcb_list[] = { "bmc_hik_kof", UNSUPPORTED_BOARD }, { "onebus", UNSUPPORTED_BOARD }, { "coolboy", UNSUPPORTED_BOARD }, - { "btl_900218", UNSUPPORTED_BOARD }, // pirate The Lord of King, to be emulated soon + { "btl_900218", UNSUPPORTED_BOARD }, // pirate The Lord of King, to be emulated soon { "a9746", UNSUPPORTED_BOARD }, { "dance2k", UNSUPPORTED_BOARD }, { "pec586", UNSUPPORTED_BOARD }, diff --git a/src/emu/bus/nes/nes_slot.c b/src/emu/bus/nes/nes_slot.c index 5d8af191412..7c1827c487f 100644 --- a/src/emu/bus/nes/nes_slot.c +++ b/src/emu/bus/nes/nes_slot.c @@ -148,9 +148,7 @@ void device_nes_cart_interface::prg_alloc(size_t size, const char *tag) { if (m_prg == NULL) { - astring tempstring(tag); - tempstring.cat(NESSLOT_PRGROM_REGION_TAG); - m_prg = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_prg = device().machine().memory().region_alloc(std::string(tag).append(NESSLOT_PRGROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_prg_size = size; m_prg_chunks = size / 0x4000; if (size % 0x2000) @@ -217,8 +215,8 @@ void device_nes_cart_interface::vrom_alloc(size_t size, const char *tag) { if (m_vrom == NULL) { - astring tempstring(tag); - tempstring.cat(NESSLOT_CHRROM_REGION_TAG); + std::string tempstring(tag); + tempstring.append(NESSLOT_CHRROM_REGION_TAG); m_vrom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_vrom_size = size; m_vrom_chunks = size / 0x2000; @@ -912,7 +910,7 @@ bool nes_cart_slot_device::call_softlist_load(software_list_device &swlist, cons get default card software -------------------------------------------------*/ -void nes_cart_slot_device::get_default_card_software(astring &result) +void nes_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -930,7 +928,7 @@ void nes_cart_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); } else software_get_default_slot(result, "nrom"); diff --git a/src/emu/bus/nes/nes_slot.h b/src/emu/bus/nes/nes_slot.h index d946825ec63..2f8ec875f8c 100644 --- a/src/emu/bus/nes/nes_slot.h +++ b/src/emu/bus/nes/nes_slot.h @@ -361,7 +361,7 @@ public: virtual device_image_partialhash_func get_partial_hash() const { return &nes_partialhash; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); const char * get_default_card_ines(UINT8 *ROM, UINT32 len); const char * get_default_card_unif(UINT8 *ROM, UINT32 len); const char * nes_get_slot(int pcb_id); diff --git a/src/emu/bus/nes/sunsoft_dcs.c b/src/emu/bus/nes/sunsoft_dcs.c index b290e9611a8..4deb83e3e9a 100644 --- a/src/emu/bus/nes/sunsoft_dcs.c +++ b/src/emu/bus/nes/sunsoft_dcs.c @@ -112,7 +112,7 @@ bool nes_ntb_slot_device::call_softlist_load(software_list_device &swlist, const return TRUE; } -void nes_ntb_slot_device::get_default_card_software(astring &result) +void nes_ntb_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "ntbrom"); } diff --git a/src/emu/bus/nes/sunsoft_dcs.h b/src/emu/bus/nes/sunsoft_dcs.h index 02c32fc3f19..0203e316431 100644 --- a/src/emu/bus/nes/sunsoft_dcs.h +++ b/src/emu/bus/nes/sunsoft_dcs.h @@ -59,7 +59,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); virtual DECLARE_READ8_MEMBER(read); diff --git a/src/emu/bus/nes/txc.c b/src/emu/bus/nes/txc.c index 5d790f89cb9..bf2c983a486 100644 --- a/src/emu/bus/nes/txc.c +++ b/src/emu/bus/nes/txc.c @@ -219,11 +219,11 @@ READ8_MEMBER(nes_txc_mjblock_device::read_l) Bootleg Board 'Strike Wolf' by TXC - Games: Strike Wolf (also Policeman?? according to Nestopia) + Games: Strike Wolf and Policeman iNES: mapper 36 - In MESS: Supported. + In MESS: Partially Supported (Policeman has glitches) -------------------------------------------------*/ diff --git a/src/emu/bus/nubus/nubus.c b/src/emu/bus/nubus/nubus.c index c2f929cea59..e4c8a189af7 100644 --- a/src/emu/bus/nubus/nubus.c +++ b/src/emu/bus/nubus/nubus.c @@ -325,9 +325,8 @@ void device_nubus_card_interface::install_declaration_rom(device_t *dev, const c { bool inverted = false; - astring tempstring; - UINT8 *rom = device().machine().root_device().memregion(dev->subtag(tempstring, romregion).c_str())->base(); - UINT32 romlen = device().machine().root_device().memregion(dev->subtag(tempstring, romregion).c_str())->bytes(); + UINT8 *rom = device().machine().root_device().memregion(dev->subtag(romregion).c_str())->base(); + UINT32 romlen = device().machine().root_device().memregion(dev->subtag(romregion).c_str())->bytes(); // printf("ROM length is %x, last bytes are %02x %02x\n", romlen, rom[romlen-2], rom[romlen-1]); diff --git a/src/emu/bus/nubus/nubus_48gc.c b/src/emu/bus/nubus/nubus_48gc.c index e6a1283708b..5e450d84003 100644 --- a/src/emu/bus/nubus/nubus_48gc.c +++ b/src/emu/bus/nubus/nubus_48gc.c @@ -79,7 +79,7 @@ jmfb_device::jmfb_device(const machine_config &mconfig, device_type type, const device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(GC48_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(GC48_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/nubus_48gc.h b/src/emu/bus/nubus/nubus_48gc.h index b22c79b98f4..ad81b1b0fc1 100644 --- a/src/emu/bus/nubus/nubus_48gc.h +++ b/src/emu/bus/nubus/nubus_48gc.h @@ -45,7 +45,7 @@ public: UINT32 m_registers[0x100]; int m_xres, m_yres; bool m_is824; - astring m_assembled_tag; + std::string m_assembled_tag; }; class nubus_48gc_device : public jmfb_device diff --git a/src/emu/bus/nubus/nubus_m2hires.c b/src/emu/bus/nubus/nubus_m2hires.c index 3827b033ebc..bb222c15483 100644 --- a/src/emu/bus/nubus/nubus_m2hires.c +++ b/src/emu/bus/nubus/nubus_m2hires.c @@ -68,7 +68,7 @@ nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, const device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(M2HIRES_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(M2HIRES_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -77,7 +77,7 @@ nubus_m2hires_device::nubus_m2hires_device(const machine_config &mconfig, device device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(M2HIRES_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(M2HIRES_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/nubus_m2hires.h b/src/emu/bus/nubus/nubus_m2hires.h index ef389eff2b8..1d910d4bdf8 100644 --- a/src/emu/bus/nubus/nubus_m2hires.h +++ b/src/emu/bus/nubus/nubus_m2hires.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable, m_toggle; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/nubus/nubus_m2video.c b/src/emu/bus/nubus/nubus_m2video.c index da461776532..5719270df2d 100644 --- a/src/emu/bus/nubus/nubus_m2video.c +++ b/src/emu/bus/nubus/nubus_m2video.c @@ -69,7 +69,7 @@ nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, const device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(M2VIDEO_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(M2VIDEO_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -78,7 +78,7 @@ nubus_m2video_device::nubus_m2video_device(const machine_config &mconfig, device device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(M2VIDEO_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(M2VIDEO_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/nubus_m2video.h b/src/emu/bus/nubus/nubus_m2video.h index 228e6e229c7..6e048898d0f 100644 --- a/src/emu/bus/nubus/nubus_m2video.h +++ b/src/emu/bus/nubus/nubus_m2video.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable, m_toggle; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/nubus/nubus_radiustpd.c b/src/emu/bus/nubus/nubus_radiustpd.c index d78afdc8cf8..7710318b29e 100644 --- a/src/emu/bus/nubus/nubus_radiustpd.c +++ b/src/emu/bus/nubus/nubus_radiustpd.c @@ -68,7 +68,7 @@ nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, co device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(RADIUSTPD_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(RADIUSTPD_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -77,7 +77,7 @@ nubus_radiustpd_device::nubus_radiustpd_device(const machine_config &mconfig, de device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(RADIUSTPD_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(RADIUSTPD_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/nubus_radiustpd.h b/src/emu/bus/nubus/nubus_radiustpd.h index d25b4798b06..259cfbebd03 100644 --- a/src/emu/bus/nubus/nubus_radiustpd.h +++ b/src/emu/bus/nubus/nubus_radiustpd.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable, m_toggle; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/nubus/nubus_spec8.c b/src/emu/bus/nubus/nubus_spec8.c index 7d691129800..4447417aefb 100644 --- a/src/emu/bus/nubus/nubus_spec8.c +++ b/src/emu/bus/nubus/nubus_spec8.c @@ -70,7 +70,7 @@ nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, const device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(SPEC8S3_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(SPEC8S3_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -79,7 +79,7 @@ nubus_spec8s3_device::nubus_spec8s3_device(const machine_config &mconfig, device device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(SPEC8S3_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(SPEC8S3_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/nubus_spec8.h b/src/emu/bus/nubus/nubus_spec8.h index 9af67b9bdd4..de0628fc532 100644 --- a/src/emu/bus/nubus/nubus_spec8.h +++ b/src/emu/bus/nubus/nubus_spec8.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; private: //UINT32 m_7xxxxx_regs[0x100000/4]; diff --git a/src/emu/bus/nubus/nubus_specpdq.c b/src/emu/bus/nubus/nubus_specpdq.c index 582cd04262d..8a928177706 100644 --- a/src/emu/bus/nubus/nubus_specpdq.c +++ b/src/emu/bus/nubus/nubus_specpdq.c @@ -83,10 +83,10 @@ const rom_entry *nubus_specpdq_device::device_rom_region() const nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, NUBUS_SPECPDQ, "SuperMac Spectrum PDQ video card", tag, owner, clock, "nb_spdq", __FILE__), device_video_interface(mconfig, *this), - device_nubus_card_interface(mconfig, *this), + device_nubus_card_interface(mconfig, *this), m_palette(*this, "palette") { - m_assembled_tag = astring(tag).cat(":").cat(SPECPDQ_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(SPECPDQ_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -96,7 +96,7 @@ nubus_specpdq_device::nubus_specpdq_device(const machine_config &mconfig, device device_nubus_card_interface(mconfig, *this), m_palette(*this, "palette") { - m_assembled_tag = astring(tag).cat(":").cat(SPECPDQ_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(SPECPDQ_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/nubus_specpdq.h b/src/emu/bus/nubus/nubus_specpdq.h index d1267ec42f3..287297d2b11 100644 --- a/src/emu/bus/nubus/nubus_specpdq.h +++ b/src/emu/bus/nubus/nubus_specpdq.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable; UINT32 m_palette_val[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; private: UINT32 m_7xxxxx_regs[0x100000/4]; diff --git a/src/emu/bus/nubus/nubus_wsportrait.c b/src/emu/bus/nubus/nubus_wsportrait.c index 30a2a6e4bbb..9d2a1be3e0c 100644 --- a/src/emu/bus/nubus/nubus_wsportrait.c +++ b/src/emu/bus/nubus/nubus_wsportrait.c @@ -71,7 +71,7 @@ nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(WSPORTRAIT_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(WSPORTRAIT_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -80,7 +80,7 @@ nubus_wsportrait_device::nubus_wsportrait_device(const machine_config &mconfig, device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(WSPORTRAIT_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(WSPORTRAIT_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/nubus_wsportrait.h b/src/emu/bus/nubus/nubus_wsportrait.h index 16a675fb4fe..52cbbbf26eb 100644 --- a/src/emu/bus/nubus/nubus_wsportrait.h +++ b/src/emu/bus/nubus/nubus_wsportrait.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable, m_toggle; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/nubus/pds30_30hr.c b/src/emu/bus/nubus/pds30_30hr.c index a92044d1b98..21c3a79bf16 100644 --- a/src/emu/bus/nubus/pds30_30hr.c +++ b/src/emu/bus/nubus/pds30_30hr.c @@ -71,7 +71,7 @@ nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, co device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(XCEED30HR_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(XCEED30HR_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -80,7 +80,7 @@ nubus_xceed30hr_device::nubus_xceed30hr_device(const machine_config &mconfig, de device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(XCEED30HR_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(XCEED30HR_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/pds30_30hr.h b/src/emu/bus/nubus/pds30_30hr.h index 430a8e1249a..804877dd327 100644 --- a/src/emu/bus/nubus/pds30_30hr.h +++ b/src/emu/bus/nubus/pds30_30hr.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable, m_toggle; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/nubus/pds30_cb264.c b/src/emu/bus/nubus/pds30_cb264.c index 0497ed86531..0f2655ed741 100644 --- a/src/emu/bus/nubus/pds30_cb264.c +++ b/src/emu/bus/nubus/pds30_cb264.c @@ -64,7 +64,7 @@ nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, co device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(CB264SE30_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(CB264SE30_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -73,7 +73,7 @@ nubus_cb264se30_device::nubus_cb264se30_device(const machine_config &mconfig, de device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(CB264SE30_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(CB264SE30_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/pds30_cb264.h b/src/emu/bus/nubus/pds30_cb264.h index bb315c629a7..26766072889 100644 --- a/src/emu/bus/nubus/pds30_cb264.h +++ b/src/emu/bus/nubus/pds30_cb264.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable, m_toggle; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/nubus/pds30_mc30.c b/src/emu/bus/nubus/pds30_mc30.c index 0179589c9dd..43b078ed588 100644 --- a/src/emu/bus/nubus/pds30_mc30.c +++ b/src/emu/bus/nubus/pds30_mc30.c @@ -65,9 +65,9 @@ const rom_entry *nubus_xceedmc30_device::device_rom_region() const nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, PDS030_XCEEDMC30, "Micron/XCEED Technology MacroColor 30", tag, owner, clock, "pd3_mclr", __FILE__), device_video_interface(mconfig, *this), - device_nubus_card_interface(mconfig, *this) + device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(XCEEDMC30_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(XCEEDMC30_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -76,7 +76,7 @@ nubus_xceedmc30_device::nubus_xceedmc30_device(const machine_config &mconfig, de device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(XCEEDMC30_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(XCEEDMC30_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/pds30_mc30.h b/src/emu/bus/nubus/pds30_mc30.h index f5dd7999c3b..7882cff534d 100644 --- a/src/emu/bus/nubus/pds30_mc30.h +++ b/src/emu/bus/nubus/pds30_mc30.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable, m_toggle; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/nubus/pds30_procolor816.c b/src/emu/bus/nubus/pds30_procolor816.c index 7d09328632a..7fca7b81bfa 100644 --- a/src/emu/bus/nubus/pds30_procolor816.c +++ b/src/emu/bus/nubus/pds30_procolor816.c @@ -68,9 +68,9 @@ const rom_entry *nubus_procolor816_device::device_rom_region() const nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, PDS030_PROCOLOR816, "Lapis ProColor Server 8*16", tag, owner, clock, "pd3_pc16", __FILE__), device_video_interface(mconfig, *this), - device_nubus_card_interface(mconfig, *this) + device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(PROCOLOR816_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(PROCOLOR816_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -79,7 +79,7 @@ nubus_procolor816_device::nubus_procolor816_device(const machine_config &mconfig device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(PROCOLOR816_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(PROCOLOR816_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/pds30_procolor816.h b/src/emu/bus/nubus/pds30_procolor816.h index c8d39cf82fd..41cd02d8717 100644 --- a/src/emu/bus/nubus/pds30_procolor816.h +++ b/src/emu/bus/nubus/pds30_procolor816.h @@ -44,7 +44,7 @@ public: UINT32 m_mode, m_vbl_disable, m_toggle; UINT32 m_palette[256], m_colors[3], m_count, m_clutoffs; emu_timer *m_timer; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/nubus/pds30_sigmalview.c b/src/emu/bus/nubus/pds30_sigmalview.c index 78dbb29f58e..82824d18c2b 100644 --- a/src/emu/bus/nubus/pds30_sigmalview.c +++ b/src/emu/bus/nubus/pds30_sigmalview.c @@ -64,7 +64,7 @@ nubus_lview_device::nubus_lview_device(const machine_config &mconfig, const char device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(LVIEW_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(LVIEW_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } @@ -73,7 +73,7 @@ nubus_lview_device::nubus_lview_device(const machine_config &mconfig, device_typ device_video_interface(mconfig, *this), device_nubus_card_interface(mconfig, *this) { - m_assembled_tag = astring(tag).cat(":").cat(LVIEW_SCREEN_NAME); + m_assembled_tag = std::string(tag).append(":").append(LVIEW_SCREEN_NAME); m_screen_tag = m_assembled_tag.c_str(); } diff --git a/src/emu/bus/nubus/pds30_sigmalview.h b/src/emu/bus/nubus/pds30_sigmalview.h index 13bc9b013f0..b72f7f46485 100644 --- a/src/emu/bus/nubus/pds30_sigmalview.h +++ b/src/emu/bus/nubus/pds30_sigmalview.h @@ -45,7 +45,7 @@ public: UINT32 m_palette[256]; emu_timer *m_timer; int m_protstate; - astring m_assembled_tag; + std::string m_assembled_tag; }; diff --git a/src/emu/bus/odyssey2/slot.c b/src/emu/bus/odyssey2/slot.c index f5a8afc6b04..83194391232 100644 --- a/src/emu/bus/odyssey2/slot.c +++ b/src/emu/bus/odyssey2/slot.c @@ -49,9 +49,7 @@ void device_o2_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(O2SLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(O2SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -211,7 +209,7 @@ bool o2_cart_slot_device::call_softlist_load(software_list_device &swlist, const get default card software -------------------------------------------------*/ -void o2_cart_slot_device::get_default_card_software(astring &result) +void o2_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -229,7 +227,7 @@ void o2_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/odyssey2/slot.h b/src/emu/bus/odyssey2/slot.h index 9ca22730bbe..1e79b648041 100644 --- a/src/emu/bus/odyssey2/slot.h +++ b/src/emu/bus/odyssey2/slot.h @@ -84,7 +84,7 @@ public: virtual const char *file_extensions() const { return "bin,rom"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom04); diff --git a/src/emu/bus/oricext/jasmin.c b/src/emu/bus/oricext/jasmin.c index bb09ca39063..3391cf1539f 100644 --- a/src/emu/bus/oricext/jasmin.c +++ b/src/emu/bus/oricext/jasmin.c @@ -53,8 +53,7 @@ jasmin_device::~jasmin_device() void jasmin_device::device_start() { oricext_device::device_start(); - astring tempstring; - jasmin_rom = device().machine().root_device().memregion(this->subtag(tempstring, "jasmin").c_str())->base(); + jasmin_rom = device().machine().root_device().memregion(this->subtag("jasmin").c_str())->base(); cpu->space(AS_PROGRAM).install_device(0x0000, 0xffff, *this, &jasmin_device::map); for(int i=0; i<4; i++) { diff --git a/src/emu/bus/oricext/microdisc.c b/src/emu/bus/oricext/microdisc.c index 9c05d2e261c..740820b4ebd 100644 --- a/src/emu/bus/oricext/microdisc.c +++ b/src/emu/bus/oricext/microdisc.c @@ -48,8 +48,7 @@ microdisc_device::~microdisc_device() void microdisc_device::device_start() { oricext_device::device_start(); - astring tempstring; - microdisc_rom = device().machine().root_device().memregion(this->subtag(tempstring, "microdisc").c_str())->base(); + microdisc_rom = device().machine().root_device().memregion(this->subtag("microdisc").c_str())->base(); cpu->space(AS_PROGRAM).install_device(0x0000, 0xffff, *this, µdisc_device::map); for(int i=0; i<4; i++) { diff --git a/src/emu/bus/pce/pce_slot.c b/src/emu/bus/pce/pce_slot.c index f5c07c2780e..f9d438c04ef 100644 --- a/src/emu/bus/pce/pce_slot.c +++ b/src/emu/bus/pce/pce_slot.c @@ -51,9 +51,7 @@ void device_pce_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(PCESLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(PCESLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -339,7 +337,7 @@ int pce_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) get default card software -------------------------------------------------*/ -void pce_cart_slot_device::get_default_card_software(astring &result) +void pce_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -356,7 +354,7 @@ void pce_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/pce/pce_slot.h b/src/emu/bus/pce/pce_slot.h index 542151964fc..eb7d7b9e95c 100644 --- a/src/emu/bus/pce/pce_slot.h +++ b/src/emu/bus/pce/pce_slot.h @@ -87,7 +87,7 @@ public: virtual const char *file_extensions() const { return "pce,bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); diff --git a/src/emu/bus/plus4/exp.c b/src/emu/bus/plus4/exp.c index d49bb98b970..efdff1a1a70 100644 --- a/src/emu/bus/plus4/exp.c +++ b/src/emu/bus/plus4/exp.c @@ -160,7 +160,7 @@ bool plus4_expansion_slot_device::call_softlist_load(software_list_device &swlis // get_default_card_software - //------------------------------------------------- -void plus4_expansion_slot_device::get_default_card_software(astring &result) +void plus4_expansion_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "standard"); } diff --git a/src/emu/bus/plus4/exp.h b/src/emu/bus/plus4/exp.h index 64cdacc4dc2..2cbcf1a0a1a 100644 --- a/src/emu/bus/plus4/exp.h +++ b/src/emu/bus/plus4/exp.h @@ -138,7 +138,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); devcb_write_line m_write_irq; devcb_read8 m_read_dma_cd; diff --git a/src/emu/bus/ql/rom.c b/src/emu/bus/ql/rom.c index f3d6b6673e9..6d336f61dbc 100644 --- a/src/emu/bus/ql/rom.c +++ b/src/emu/bus/ql/rom.c @@ -117,7 +117,7 @@ bool ql_rom_cartridge_slot_t::call_softlist_load(software_list_device &swlist, c // get_default_card_software - //------------------------------------------------- -void ql_rom_cartridge_slot_t::get_default_card_software(astring &result) +void ql_rom_cartridge_slot_t::get_default_card_software(std::string &result) { software_get_default_slot(result, "standard"); } diff --git a/src/emu/bus/ql/rom.h b/src/emu/bus/ql/rom.h index 02e79f8f2d8..97311d82ebd 100644 --- a/src/emu/bus/ql/rom.h +++ b/src/emu/bus/ql/rom.h @@ -113,7 +113,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); device_ql_rom_cartridge_card_interface *m_card; }; diff --git a/src/emu/bus/saturn/sat_slot.c b/src/emu/bus/saturn/sat_slot.c index 77108f2fa01..ba9f4255307 100644 --- a/src/emu/bus/saturn/sat_slot.c +++ b/src/emu/bus/saturn/sat_slot.c @@ -58,9 +58,7 @@ void device_sat_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(SATSLOT_ROM_REGION_TAG); - m_rom = (UINT32 *)device().machine().memory().region_alloc(tempstring.c_str(), size, 4, ENDIANNESS_LITTLE)->base(); + m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(SATSLOT_ROM_REGION_TAG).c_str(), size, 4, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -219,7 +217,7 @@ bool sat_cart_slot_device::call_softlist_load(software_list_device &swlist, cons get default card software -------------------------------------------------*/ -void sat_cart_slot_device::get_default_card_software(astring &result) +void sat_cart_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "rom"); } diff --git a/src/emu/bus/saturn/sat_slot.h b/src/emu/bus/saturn/sat_slot.h index 04dc190c1d3..7f622bb456b 100644 --- a/src/emu/bus/saturn/sat_slot.h +++ b/src/emu/bus/saturn/sat_slot.h @@ -87,7 +87,7 @@ public: virtual const char *file_extensions() const { return "bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ32_MEMBER(read_rom); diff --git a/src/emu/bus/scv/slot.c b/src/emu/bus/scv/slot.c index bfad094a2ad..bd43192f9e4 100644 --- a/src/emu/bus/scv/slot.c +++ b/src/emu/bus/scv/slot.c @@ -49,9 +49,7 @@ void device_scv_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(SCVSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(SCVSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -261,7 +259,7 @@ int scv_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) get default card software -------------------------------------------------*/ -void scv_cart_slot_device::get_default_card_software(astring &result) +void scv_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -278,7 +276,7 @@ void scv_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/scv/slot.h b/src/emu/bus/scv/slot.h index 5d637275425..070418d6b8a 100644 --- a/src/emu/bus/scv/slot.h +++ b/src/emu/bus/scv/slot.h @@ -88,7 +88,7 @@ public: virtual const char *file_extensions() const { return "bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); diff --git a/src/emu/bus/sega8/sega8_slot.c b/src/emu/bus/sega8/sega8_slot.c index 95eb98037d3..5a090c00762 100644 --- a/src/emu/bus/sega8/sega8_slot.c +++ b/src/emu/bus/sega8/sega8_slot.c @@ -76,9 +76,7 @@ void device_sega8_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(S8SLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(S8SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; m_rom_page_count = size / 0x4000; if (!m_rom_page_count) @@ -603,7 +601,7 @@ int sega8_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) get default card software -------------------------------------------------*/ -void sega8_cart_slot_device::get_default_card_software(astring &result) +void sega8_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -623,7 +621,7 @@ void sega8_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/sega8/sega8_slot.h b/src/emu/bus/sega8/sega8_slot.h index 6409d7d5796..5bac375e6fb 100644 --- a/src/emu/bus/sega8/sega8_slot.h +++ b/src/emu/bus/sega8/sega8_slot.h @@ -138,7 +138,7 @@ public: virtual const char *file_extensions() const { return m_extensions; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_cart); diff --git a/src/emu/bus/snes/bsx.c b/src/emu/bus/snes/bsx.c index 6562793514a..5b4b7532325 100644 --- a/src/emu/bus/snes/bsx.c +++ b/src/emu/bus/snes/bsx.c @@ -116,10 +116,10 @@ void sns_rom_bsmempak_device::device_reset() BSX_base::BSX_base(running_machine &machine) : m_machine(machine) { - state_save_register_item(machine, "SNES_BSX", NULL, 0, regs); - state_save_register_item(machine, "SNES_BSX", NULL, 0, r2192_counter); - state_save_register_item(machine, "SNES_BSX", NULL, 0, r2192_hour); - state_save_register_item(machine, "SNES_BSX", NULL, 0, r2192_second); + m_machine.save().save_item(regs, "SNES_BSX/regs"); + m_machine.save().save_item(r2192_counter, "SNES_BSX/r2192_counter"); + m_machine.save().save_item(r2192_hour, "SNES_BSX/r2192_hour"); + m_machine.save().save_item(r2192_second, "SNES_BSX/r2192_second"); } void BSX_base::init() diff --git a/src/emu/bus/snes/snes_slot.c b/src/emu/bus/snes/snes_slot.c index 760f1b1e19d..a15ff01ec8c 100644 --- a/src/emu/bus/snes/snes_slot.c +++ b/src/emu/bus/snes/snes_slot.c @@ -90,9 +90,7 @@ void device_sns_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(SNSSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(SNSSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -796,7 +794,7 @@ void base_sns_cart_slot_device::setup_addon_from_fullpath() // otherwise, we need to use the legacy versions including DSP dump in device romset if (!m_cart->get_addon_bios_size()) { - astring region = astring(m_cart->device().tag()).cat(":addon"); + std::string region = std::string(m_cart->device().tag()).append(":addon"); UINT8 *ROM = NULL; switch (m_addon) @@ -999,7 +997,7 @@ void base_sns_cart_slot_device::get_cart_type_addon(UINT8 *ROM, UINT32 len, int get default card software -------------------------------------------------*/ -void base_sns_cart_slot_device::get_default_card_software(astring &result) +void base_sns_cart_slot_device::get_default_card_software(std::string &result) { bool fullpath = open_image_file(mconfig().options()); @@ -1058,7 +1056,7 @@ void base_sns_cart_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/snes/snes_slot.h b/src/emu/bus/snes/snes_slot.h index eafba459ef0..967011e7976 100644 --- a/src/emu/bus/snes/snes_slot.h +++ b/src/emu/bus/snes/snes_slot.h @@ -178,7 +178,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_l); diff --git a/src/emu/bus/snes/spc7110.c b/src/emu/bus/snes/spc7110.c index ed7dccc247a..e9f156a6f39 100644 --- a/src/emu/bus/snes/spc7110.c +++ b/src/emu/bus/snes/spc7110.c @@ -319,49 +319,49 @@ SPC7110_Decomp::SPC7110_Decomp(running_machine &machine) #undef map } - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_decomp_mode); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_decomp_offset); - state_save_register_item_pointer(machine, "SNES_SPC7110", NULL, 0, m_decomp_buffer, SPC7110_DECOMP_BUFFER_SIZE); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_decomp_buffer_rdoffset); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_decomp_buffer_wroffset); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_decomp_buffer_length); + m_machine.save().save_item(m_decomp_mode, "SNES_SPC7110/m_decomp_mode"); + m_machine.save().save_item(m_decomp_offset, "SNES_SPC7110/m_decomp_offset"); + m_machine.save().save_pointer(m_decomp_buffer, "SNES_SPC7110/m_decomp_buffer", SPC7110_DECOMP_BUFFER_SIZE); + m_machine.save().save_item(m_decomp_buffer_rdoffset, "SNES_SPC7110/m_decomp_buffer_rdoffset"); + m_machine.save().save_item(m_decomp_buffer_wroffset, "SNES_SPC7110/m_decomp_buffer_wroffset"); + m_machine.save().save_item(m_decomp_buffer_length, "SNES_SPC7110/m_decomp_buffer_length"); for (int i = 0; i < 32; i++) { - state_save_register_item(machine, "SNES_SPC7110", NULL, i, m_context[i].index); - state_save_register_item(machine, "SNES_SPC7110", NULL, i, m_context[i].invert); + m_machine.save().save_item(m_context[i].index, "SNES_SPC7110/m_context[i].index", i); + m_machine.save().save_item(m_context[i].invert, "SNES_SPC7110/m_context[i].invert", i); } - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m0_val); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m0_in); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m0_span); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m0_out); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m0_inverts); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m0_lps); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m0_in_count); - - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_pixelorder); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_realorder); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_val); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_in); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_span); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_out); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_inverts); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_lps); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m1_in_count); - - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_pixelorder); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_realorder); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_bitplanebuffer); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_buffer_index); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_val); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_in); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_span); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_out0); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_out1); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_inverts); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_lps); - state_save_register_item(machine, "SNES_SPC7110", NULL, 0, m_m2_in_count); + m_machine.save().save_item(m_m0_val, "SNES_SPC7110/m_m0_val"); + m_machine.save().save_item(m_m0_in, "SNES_SPC7110/m_m0_in"); + m_machine.save().save_item(m_m0_span, "SNES_SPC7110/m_m0_span"); + m_machine.save().save_item(m_m0_out, "SNES_SPC7110/m_m0_out"); + m_machine.save().save_item(m_m0_inverts, "SNES_SPC7110/m_m0_inverts"); + m_machine.save().save_item(m_m0_lps, "SNES_SPC7110/m_m0_lps"); + m_machine.save().save_item(m_m0_in_count, "SNES_SPC7110/m_m0_in_count"); + + m_machine.save().save_item(m_m1_pixelorder, "SNES_SPC7110/m_m1_pixelorder"); + m_machine.save().save_item(m_m1_realorder, "SNES_SPC7110/m_m1_realorder"); + m_machine.save().save_item(m_m1_val, "SNES_SPC7110/m_m1_val"); + m_machine.save().save_item(m_m1_in, "SNES_SPC7110/m_m1_in"); + m_machine.save().save_item(m_m1_span, "SNES_SPC7110/m_m1_span"); + m_machine.save().save_item(m_m1_out, "SNES_SPC7110/m_m1_out"); + m_machine.save().save_item(m_m1_inverts, "SNES_SPC7110/m_m1_inverts"); + m_machine.save().save_item(m_m1_lps, "SNES_SPC7110/m_m1_lps"); + m_machine.save().save_item(m_m1_in_count, "SNES_SPC7110/m_m1_in_count"); + + m_machine.save().save_item(m_m2_pixelorder, "SNES_SPC7110/m_m2_pixelorder"); + m_machine.save().save_item(m_m2_realorder, "SNES_SPC7110/m_m2_realorder"); + m_machine.save().save_item(m_m2_bitplanebuffer, "SNES_SPC7110/m_m2_bitplanebuffer"); + m_machine.save().save_item(m_m2_buffer_index, "SNES_SPC7110/m_m2_buffer_index"); + m_machine.save().save_item(m_m2_val, "SNES_SPC7110/m_m2_val"); + m_machine.save().save_item(m_m2_in, "SNES_SPC7110/m_m2_in"); + m_machine.save().save_item(m_m2_span, "SNES_SPC7110/m_m2_span"); + m_machine.save().save_item(m_m2_out0, "SNES_SPC7110/m_m2_out0"); + m_machine.save().save_item(m_m2_out1, "SNES_SPC7110/m_m2_out1"); + m_machine.save().save_item(m_m2_inverts, "SNES_SPC7110/m_m2_inverts"); + m_machine.save().save_item(m_m2_lps, "SNES_SPC7110/m_m2_lps"); + m_machine.save().save_item(m_m2_in_count, "SNES_SPC7110/m_m2_in_count"); } void SPC7110_Decomp::reset() diff --git a/src/emu/bus/ti99_peb/hfdc.c b/src/emu/bus/ti99_peb/hfdc.c index 983b53d2481..b4ca2c415b7 100644 --- a/src/emu/bus/ti99_peb/hfdc.c +++ b/src/emu/bus/ti99_peb/hfdc.c @@ -74,12 +74,12 @@ #define CLK_ADDR 0x0fe0 #define RAM_ADDR 0x1000 -#define TRACE_EMU 0 +#define TRACE_EMU 1 #define TRACE_CRU 0 #define TRACE_COMP 0 #define TRACE_RAM 0 #define TRACE_ROM 0 -#define TRACE_LINES 0 +#define TRACE_LINES 1 #define TRACE_MOTOR 0 #define TRACE_DMA 0 #define TRACE_INT 0 @@ -499,12 +499,32 @@ void myarc_hfdc_device::device_timer(emu_timer &timer, device_timer_id id, int p */ void myarc_hfdc_device::floppy_index_callback(floppy_image_device *floppy, int state) { - if (TRACE_LINES) if (state==1) logerror("%s: Index pulse\n", tag()); + if (TRACE_LINES) if (state==1) logerror("%s: Floppy index pulse\n", tag()); // m_status_latch = (state==ASSERT_LINE)? (m_status_latch | HDC_DS_INDEX) : (m_status_latch & ~HDC_DS_INDEX); set_bits(m_status_latch, HDC_DS_INDEX, (state==ASSERT_LINE)); signal_drive_status(); } +/* + This is called back from the hard disk when an index hole is passing by. +*/ +void myarc_hfdc_device::harddisk_index_callback(mfm_harddisk_device *harddisk, int state) +{ + /* if (TRACE_LINES) */ if (state==1) logerror("%s: HD index pulse\n", tag()); + set_bits(m_status_latch, HDC_DS_INDEX, (state==ASSERT_LINE)); + signal_drive_status(); +} + +/* + This is called back from the hard disk when seek_complete becomes asserted. +*/ +void myarc_hfdc_device::harddisk_skcom_callback(mfm_harddisk_device *harddisk, int state) +{ + /* if (TRACE_LINES) */ if (state==1) logerror("%s: HD seek complete\n", tag()); + set_bits(m_status_latch, HDC_DS_SKCOM, (state==ASSERT_LINE)); + signal_drive_status(); +} + void myarc_hfdc_device::set_bits(UINT8& byte, int mask, bool set) { if (set) byte |= mask; @@ -512,18 +532,16 @@ void myarc_hfdc_device::set_bits(UINT8& byte, int mask, bool set) } /* - Calculate the logarithm. This is needed to determine the index of a drive. - Returns -1 for value=0 + Maps the set bit to an index. The rightmost 1 bit is significant. When no + bit is set, returns -1. */ -int myarc_hfdc_device::slog2(int value) +int myarc_hfdc_device::bit_to_index(int value) { - int i=-1; - while (value!=0) - { - value >>= 1; - i++; - } - return i; + if (value & 0x01) return 0; + if (value & 0x02) return 1; + if (value & 0x04) return 2; + if (value & 0x08) return 3; + return -1; } /* @@ -554,10 +572,26 @@ void myarc_hfdc_device::signal_drive_status() // Check for TRK00* if ((m_current_floppy != NULL) && (!m_current_floppy->trk00_r())) - reply |= 0x10; + reply |= HDC_DS_TRK00; + } + else + { + if ((m_output1_latch & 0xe0)!=0) + { + if (m_current_harddisk != NULL) + { + if (m_current_harddisk->ready_r()==ASSERT_LINE) + { + m_status_latch |= HDC_DS_READY; + set_bits(m_status_latch, HDC_DS_SKCOM, m_current_harddisk->seek_complete_r()==ASSERT_LINE); + set_bits(m_status_latch, HDC_DS_TRK00, m_current_harddisk->trk00_r()==ASSERT_LINE); + } + } + // If WDS is selected but not connected, WDS.ready* and WDS.seekComplete* are 1, so Ready=SeekComplete=0 + else set_bits(m_status_latch, HDC_DS_READY | HDC_DS_SKCOM, false); + } } - // If WDS is selected but not connected, WDS.ready* and WDS.seekComplete* are 1, so Ready=SeekComplete=0 reply |= m_status_latch; m_hdc9234->auxbus_in(reply); @@ -598,27 +632,18 @@ WRITE8_MEMBER( myarc_hfdc_device::auxbus_out ) m_output1_latch = data; - if ((data & 0x10) != 0) - { - // Floppy selected - connect_floppy_unit(slog2(data & 0x0f)); - } + if ((data & 0x10) != 0) connect_floppy_unit(bit_to_index(data & 0x0f)); // Floppy selected else { - index = slog2((data>>4) & 0x0f); - if (index == -1) - { - if (TRACE_LINES) logerror("%s: Unselect all HD drives\n", tag()); - connect_floppy_unit(index); - } + index = bit_to_index((data>>4) & 0x0f); + + if (index > 0) connect_harddisk_unit(index-1); // HD selected; index >= 1 else { - // HD selected - if (TRACE_LINES) logerror("%s: Select hard disk WDS%d\n", tag(), index); - // if (index>=0) m_hdc9234->connect_hard_drive(m_harddisk_unit[index-1]); - } - if (m_current_harddisk==NULL) - { + disconnect_floppy_drives(); + disconnect_hard_drives(); + + // Turn off READY and SEEK COMPLETE set_bits(m_status_latch, HDC_DS_READY | HDC_DS_SKCOM, false); } } @@ -644,6 +669,13 @@ WRITE8_MEMBER( myarc_hfdc_device::auxbus_out ) m_current_floppy->stp_w((data & 0x10)==0); } + if (m_current_harddisk != NULL) + { + // Dir = 0 -> outward + m_current_harddisk->direction_in_w((data & 0x20)? ASSERT_LINE : CLEAR_LINE); + m_current_harddisk->step_w((data & 0x10)? ASSERT_LINE : CLEAR_LINE); + } + // We are pushing the drive status after OUTPUT2 signal_drive_status(); break; @@ -659,52 +691,74 @@ enum void myarc_hfdc_device::connect_floppy_unit(int index) { // Check if we have a new floppy - if (index>=0) + if (m_floppy_unit[index] != m_current_floppy) { - if (m_floppy_unit[index] != m_current_floppy) - { - if (TRACE_LINES) logerror("%s: Select floppy drive DSK%d\n", tag(), index+1); - if (m_current_floppy != NULL) - { - // Disconnect old drive from index line - if (TRACE_LINES) logerror("%s: Disconnect previous index callback DSK%d\n", tag(), index+1); - m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb()); - } - // Connect new drive - m_current_floppy = m_floppy_unit[index]; - - // We don't use the READY line of floppy drives. - // READY is asserted when DSKx = 1 - // The controller fetches the state with the auxbus access - if (TRACE_LINES) logerror("%s: Connect index callback DSK%d\n", tag(), index+1); - if (m_current_floppy != NULL) - m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(myarc_hfdc_device::floppy_index_callback), this)); - else - logerror("%s: Connection to DSK%d failed because no drive is connected\n", tag(), index+1); - m_hdc9234->connect_floppy_drive(m_floppy_unit[index]); - } + disconnect_floppy_drives(); + if (TRACE_LINES) logerror("%s: Select floppy drive DSK%d\n", tag(), index+1); + + // Connect new drive + m_current_floppy = m_floppy_unit[index]; + + // We don't use the READY line of floppy drives. + // READY is asserted when DSKx = 1 + // The controller fetches the state with the auxbus access + if (TRACE_LINES) logerror("%s: Connect index callback DSK%d\n", tag(), index+1); + if (m_current_floppy != NULL) + m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(myarc_hfdc_device::floppy_index_callback), this)); + else + logerror("%s: Connection to DSK%d failed because no drive is connected\n", tag(), index+1); + m_hdc9234->connect_floppy_drive(m_floppy_unit[index]); } - else + + // We can only run a floppy or a harddisk at a time, not both + disconnect_hard_drives(); +} + +void myarc_hfdc_device::connect_harddisk_unit(int index) +{ + if (m_harddisk_unit[index] != m_current_harddisk) { - if (TRACE_LINES) logerror("%s: Unselect all floppy drives\n", tag()); - // Disconnect current floppy - if (m_current_floppy != NULL) + disconnect_hard_drives(); + if (TRACE_LINES) logerror("%s: Select hard disk WDS%d\n", tag(), index+1); + + // Connect new drive + m_current_harddisk = m_harddisk_unit[index]; + + if (TRACE_LINES) logerror("%s: Connect index callback WDS%d\n", tag(), index+1); + if (m_current_harddisk != NULL) { - m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb()); - m_current_floppy = NULL; + m_current_harddisk->setup_index_pulse_cb(mfm_harddisk_device::index_pulse_cb(FUNC(myarc_hfdc_device::harddisk_index_callback), this)); + m_current_harddisk->setup_seek_complete_cb(mfm_harddisk_device::seek_complete_cb(FUNC(myarc_hfdc_device::harddisk_skcom_callback), this)); } + else + logerror("%s: Connection to WDS%d failed because no drive is connected\n", tag(), index+1); + m_hdc9234->connect_hard_drive(m_current_harddisk); } - // The drive status is supposed to be sampled after OUTPUT2 - // signal_drive_status(); + + // We can only run a floppy or a harddisk at a time, not both + disconnect_floppy_drives(); } -void myarc_hfdc_device::connect_harddisk_unit(int index) +void myarc_hfdc_device::disconnect_floppy_drives() +{ + if (TRACE_LINES) logerror("%s: Unselect floppy drives\n", tag()); + // Disconnect current floppy + if (m_current_floppy != NULL) + { + m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb()); + m_current_floppy = NULL; + } +} + +void myarc_hfdc_device::disconnect_hard_drives() { -// if (index < 0) -// { + if (TRACE_LINES) logerror("%s: Unselect hard drives\n", tag()); + if (m_current_harddisk != NULL) + { + m_current_harddisk->setup_index_pulse_cb(mfm_harddisk_device::index_pulse_cb()); + m_current_harddisk->setup_seek_complete_cb(mfm_harddisk_device::seek_complete_cb()); m_current_harddisk = NULL; -// } - // signal_drive_status(); + } } /* @@ -796,6 +850,7 @@ void myarc_hfdc_device::device_start() m_motor_on_timer = timer_alloc(MOTOR_TIMER); // The HFDC does not use READY; it has on-board RAM for DMA m_current_floppy = NULL; + m_current_harddisk = NULL; } void myarc_hfdc_device::device_reset() @@ -836,26 +891,45 @@ void myarc_hfdc_device::device_reset() for (int i=0; i < 4; i++) { if (m_floppy_unit[i] != NULL) - logerror("%s: Connector %d with %s\n", tag(), i, m_floppy_unit[i]->name()); + logerror("%s: FD connector %d with %s\n", tag(), i+1, m_floppy_unit[i]->name()); + else + logerror("%s: FD connector %d has no floppy attached\n", tag(), i+1); + } + + for (int i=0; i < 3; i++) + { + if (m_harddisk_unit[i] != NULL) + logerror("%s: HD connector %d with %s\n", tag(), i+1, m_harddisk_unit[i]->name()); else - logerror("%s: Connector %d has no floppy attached\n", tag(), i); + logerror("%s: HD connector %d has no drive attached\n", tag(), i+1); } // Disconnect all units - connect_floppy_unit(-1); - connect_harddisk_unit(-1); + disconnect_floppy_drives(); + disconnect_hard_drives(); } void myarc_hfdc_device::device_config_complete() { - for (int i=0; i < 4; i++) + for (int i=0; i < 3; i++) + { m_floppy_unit[i] = NULL; + m_harddisk_unit[i] = NULL; + } + m_floppy_unit[3] = NULL; // Seems to be null when doing a "-listslots" - if (subdevice("0")!=NULL) m_floppy_unit[0] = static_cast<floppy_image_device*>(subdevice("0")->first_subdevice()); - if (subdevice("1")!=NULL) m_floppy_unit[1] = static_cast<floppy_image_device*>(subdevice("1")->first_subdevice()); - if (subdevice("2")!=NULL) m_floppy_unit[2] = static_cast<floppy_image_device*>(subdevice("2")->first_subdevice()); - if (subdevice("3")!=NULL) m_floppy_unit[3] = static_cast<floppy_image_device*>(subdevice("3")->first_subdevice()); + if (subdevice("f1")!=NULL) + { + m_floppy_unit[0] = static_cast<floppy_connector*>(subdevice("f1"))->get_device(); + m_floppy_unit[1] = static_cast<floppy_connector*>(subdevice("f2"))->get_device(); + m_floppy_unit[2] = static_cast<floppy_connector*>(subdevice("f3"))->get_device(); + m_floppy_unit[3] = static_cast<floppy_connector*>(subdevice("f4"))->get_device(); + + m_harddisk_unit[0] = static_cast<mfm_harddisk_connector*>(subdevice("h1"))->get_device(); + m_harddisk_unit[1] = static_cast<mfm_harddisk_connector*>(subdevice("h2"))->get_device(); + m_harddisk_unit[2] = static_cast<mfm_harddisk_connector*>(subdevice("h3"))->get_device(); + } } /* @@ -918,6 +992,11 @@ static SLOT_INTERFACE_START( hfdc_floppies ) SLOT_INTERFACE( "35hd", FLOPPY_35_HD ) // 80 tracks 1.4 MiB SLOT_INTERFACE_END +static SLOT_INTERFACE_START( hfdc_harddisks ) + SLOT_INTERFACE( "generic", MFM_HD_GENERIC ) // Generic high-level emulation +// SLOT_INTERFACE( "seagatemfm", MFM_HD_SEAGATE ) // Seagate ST-225 and others +SLOT_INTERFACE_END + MACHINE_CONFIG_FRAGMENT( ti99_hfdc ) MCFG_DEVICE_ADD(FDC_TAG, HDC9234, 0) MCFG_HDC9234_INTRQ_CALLBACK(WRITELINE(myarc_hfdc_device, intrq_w)) @@ -927,10 +1006,15 @@ MACHINE_CONFIG_FRAGMENT( ti99_hfdc ) MCFG_HDC9234_DMA_IN_CALLBACK(READ8(myarc_hfdc_device, read_buffer)) MCFG_HDC9234_DMA_OUT_CALLBACK(WRITE8(myarc_hfdc_device, write_buffer)) - MCFG_FLOPPY_DRIVE_ADD("0", hfdc_floppies, "525dd", myarc_hfdc_device::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("1", hfdc_floppies, "525dd", myarc_hfdc_device::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("2", hfdc_floppies, NULL, myarc_hfdc_device::floppy_formats) - MCFG_FLOPPY_DRIVE_ADD("3", hfdc_floppies, NULL, myarc_hfdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("f1", hfdc_floppies, "525dd", myarc_hfdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("f2", hfdc_floppies, "525dd", myarc_hfdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("f3", hfdc_floppies, NULL, myarc_hfdc_device::floppy_formats) + MCFG_FLOPPY_DRIVE_ADD("f4", hfdc_floppies, NULL, myarc_hfdc_device::floppy_formats) + + // NB: Hard disks don't go without image (other than floppy drives) + MCFG_MFM_HARDDISK_ADD("h1", hfdc_harddisks, NULL) + MCFG_MFM_HARDDISK_ADD("h2", hfdc_harddisks, NULL) + MCFG_MFM_HARDDISK_ADD("h3", hfdc_harddisks, NULL) MCFG_DEVICE_ADD(CLOCK_TAG, MM58274C, 0) MCFG_MM58274C_MODE24(1) // 24 hour @@ -962,6 +1046,27 @@ ioport_constructor myarc_hfdc_device::device_input_ports() const const device_type TI99_HFDC = &device_creator<myarc_hfdc_device>; +mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock): + device_t(mconfig, MFM_HD_CONNECTOR, "MFM hard disk connector", tag, owner, clock, "mfm_hd_connector", __FILE__), + device_slot_interface(mconfig, *this) +{ +} + +mfm_harddisk_connector::~mfm_harddisk_connector() +{ +} + +mfm_harddisk_device *mfm_harddisk_connector::get_device() +{ + return dynamic_cast<mfm_harddisk_device *>(get_card_device()); +} + +void mfm_harddisk_connector::device_start() +{ +} + +const device_type MFM_HD_CONNECTOR = &device_creator<mfm_harddisk_connector>; + // ========================================================================= /* @@ -1252,7 +1357,7 @@ READ8_MEMBER( myarc_hfdc_legacy_device::auxbus_in ) { UINT8 state; index = slog2((m_output1_latch>>4) & 0x0f)-1; - mfm_harddisk_device *hd = m_harddisk_unit[index]; + mfm_harddisk_legacy_device *hd = m_harddisk_unit[index]; state = hd->get_status(); if (state & MFMHD_TRACK00) reply |= DS_TRK00; @@ -1373,6 +1478,8 @@ MACHINE_CONFIG_FRAGMENT( ti99_hfdc_legacy ) MCFG_DEVICE_ADD(CLOCK_TAG, MM58274C, 0) MCFG_MM58274C_MODE24(1) // 24 hour MCFG_MM58274C_DAY1(0) // sunday + + MCFG_MFMHD_3_DRIVES_ADD() // add hard disks MACHINE_CONFIG_END ROM_START( ti99_hfdc_legacy ) @@ -1461,9 +1568,9 @@ void myarc_hfdc_legacy_device::device_reset() m_floppy_unit[2] = static_cast<legacy_floppy_image_device *>(m_slot->get_drive(FLOPPY_2)); m_floppy_unit[3] = static_cast<legacy_floppy_image_device *>(m_slot->get_drive(FLOPPY_3)); - m_harddisk_unit[0] = static_cast<mfm_harddisk_device *>(m_slot->get_drive(MFMHD_0)); - m_harddisk_unit[1] = static_cast<mfm_harddisk_device *>(m_slot->get_drive(MFMHD_1)); - m_harddisk_unit[2] = static_cast<mfm_harddisk_device *>(m_slot->get_drive(MFMHD_2)); + m_harddisk_unit[0] = static_cast<mfm_harddisk_legacy_device *>(subdevice(MFMHD_0)); + m_harddisk_unit[1] = static_cast<mfm_harddisk_legacy_device *>(subdevice(MFMHD_1)); + m_harddisk_unit[2] = static_cast<mfm_harddisk_legacy_device *>(subdevice(MFMHD_2)); if (ioport("HFDCDIP")->read()&0x55) ti99_set_80_track_drives(TRUE); diff --git a/src/emu/bus/ti99_peb/hfdc.h b/src/emu/bus/ti99_peb/hfdc.h index cea2344f917..a22ede259d9 100644 --- a/src/emu/bus/ti99_peb/hfdc.h +++ b/src/emu/bus/ti99_peb/hfdc.h @@ -18,11 +18,12 @@ #define __HFDC__ #define HFDC_MAX_FLOPPY 4 -#define HFDC_MAX_HARD 4 +#define HFDC_MAX_HARD 3 #include "imagedev/floppy.h" #include "machine/mm58274c.h" #include "machine/hdc9234.h" +#include "machine/ti99_hd.h" extern const device_type TI99_HFDC; @@ -49,11 +50,13 @@ public: DECLARE_FLOPPY_FORMATS( floppy_formats ); +protected: + void device_config_complete(); + private: void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); void device_start(); void device_reset(); - void device_config_complete(); const rom_entry *device_rom_region() const; machine_config_constructor device_mconfig_additions() const; @@ -63,18 +66,24 @@ private: void debug_read(offs_t offset, UINT8* value); void debug_write(offs_t offset, UINT8 data); - // Callback for the index hole + // Callbacks for the index hole and seek complete void floppy_index_callback(floppy_image_device *floppy, int state); + void harddisk_index_callback(mfm_harddisk_device *harddisk, int state); + void harddisk_skcom_callback(mfm_harddisk_device *harddisk, int state); // Operate the floppy motors void set_floppy_motors_running(bool run); - // Connect or disconnect floppy drives + // Connect floppy drives void connect_floppy_unit(int index); - // Connect or disconnect harddisk drives + // Connect harddisk drives void connect_harddisk_unit(int index); + // Disconnect drives + void disconnect_floppy_drives(); + void disconnect_hard_drives(); + // Pushes the drive status to the HDC void signal_drive_status(); @@ -90,11 +99,14 @@ private: // Link to the attached floppy drives floppy_image_device* m_floppy_unit[4]; + // Link to the attached hard disks + mfm_harddisk_device* m_harddisk_unit[3]; + // Currently selected floppy drive floppy_image_device* m_current_floppy; // Currently selected hard drive - void* m_current_harddisk; + mfm_harddisk_device* m_current_harddisk; // True: Access to DIP switch settings, false: access to line states bool m_see_switches; @@ -159,8 +171,8 @@ private: // Signal motor_on. When TRUE, makes all drives turning. line_state m_MOTOR_ON; - // Calculates a simple version of a binary logarithm - int slog2(int value); + // Calculates the index from the bit + int bit_to_index(int value); // Utility function to set or unset bits in a byte void set_bits(UINT8& byte, int mask, bool set); @@ -170,6 +182,26 @@ private: int m_readyflags; }; +/* Connector for a MFM hard disk. See also floppy.c */ +class mfm_harddisk_connector : public device_t, + public device_slot_interface +{ +public: + mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ~mfm_harddisk_connector(); + + mfm_harddisk_device *get_device(); + +protected: + void device_start(); +}; + +extern const device_type MFM_HD_CONNECTOR; + +#define MCFG_MFM_HARDDISK_ADD(_tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, MFM_HD_CONNECTOR, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false); + // ========================================================================= /* @@ -250,7 +282,7 @@ private: legacy_floppy_image_device* m_floppy_unit[HFDC_MAX_FLOPPY]; /* Connected harddisk drives. */ - mfm_harddisk_device* m_harddisk_unit[HFDC_MAX_HARD]; + mfm_harddisk_legacy_device* m_harddisk_unit[HFDC_MAX_HARD]; /* DMA address latch */ UINT32 m_dma_address; diff --git a/src/emu/bus/ti99_peb/peribox.c b/src/emu/bus/ti99_peb/peribox.c index bcbc77b178c..8584cc1b189 100644 --- a/src/emu/bus/ti99_peb/peribox.c +++ b/src/emu/bus/ti99_peb/peribox.c @@ -467,8 +467,6 @@ MACHINE_CONFIG_FRAGMENT( peribox_device ) MCFG_DEVICE_ADD(FLOPPY_3, LEGACY_FLOPPY, 0) MCFG_DEVICE_CONFIG(ti99_4_floppy_interface) MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(peribox_device, indexhole)) - - MCFG_MFMHD_3_DRIVES_ADD() MACHINE_CONFIG_END machine_config_constructor peribox_device::device_mconfig_additions() const @@ -536,7 +534,6 @@ MACHINE_CONFIG_FRAGMENT( peribox_gen_device ) MCFG_DEVICE_ADD(FLOPPY_3, LEGACY_FLOPPY, 0) MCFG_DEVICE_CONFIG(ti99_4_floppy_interface) MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(peribox_device, indexhole)) - MCFG_MFMHD_3_DRIVES_ADD() MACHINE_CONFIG_END machine_config_constructor peribox_gen_device::device_mconfig_additions() const @@ -589,7 +586,6 @@ MACHINE_CONFIG_FRAGMENT( peribox_998_device ) MCFG_DEVICE_ADD(FLOPPY_3, LEGACY_FLOPPY, 0) MCFG_DEVICE_CONFIG(ti99_4_floppy_interface) MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(peribox_device, indexhole)) - MCFG_MFMHD_3_DRIVES_ADD() MACHINE_CONFIG_END machine_config_constructor peribox_998_device::device_mconfig_additions() const @@ -643,7 +639,6 @@ MACHINE_CONFIG_FRAGMENT( peribox_sg_device ) MCFG_DEVICE_ADD(FLOPPY_3, LEGACY_FLOPPY, 0) MCFG_DEVICE_CONFIG(ti99_4_floppy_interface) MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(peribox_device, indexhole)) - MCFG_MFMHD_3_DRIVES_ADD() MACHINE_CONFIG_END machine_config_constructor peribox_sg_device::device_mconfig_additions() const @@ -651,7 +646,6 @@ machine_config_constructor peribox_sg_device::device_mconfig_additions() const return MACHINE_CONFIG_NAME( peribox_sg_device ); } - /**************************************************************************** Another variant of the box; used for the TI with EVPC. The EVPC is obviously required. @@ -684,7 +678,6 @@ MACHINE_CONFIG_FRAGMENT( peribox_ev_device ) MCFG_DEVICE_ADD(FLOPPY_3, LEGACY_FLOPPY, 0) MCFG_DEVICE_CONFIG(ti99_4_floppy_interface) MCFG_LEGACY_FLOPPY_IDX_CB(WRITELINE(peribox_device, indexhole)) - MCFG_MFMHD_3_DRIVES_ADD() MACHINE_CONFIG_END machine_config_constructor peribox_ev_device::device_mconfig_additions() const diff --git a/src/emu/bus/vboy/slot.c b/src/emu/bus/vboy/slot.c index 2cf3441d656..2e3d4c86970 100644 --- a/src/emu/bus/vboy/slot.c +++ b/src/emu/bus/vboy/slot.c @@ -50,9 +50,7 @@ void device_vboy_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(VBOYSLOT_ROM_REGION_TAG); - m_rom = (UINT32 *)device().machine().memory().region_alloc(tempstring.c_str(), size, 4, ENDIANNESS_LITTLE)->base(); + m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(VBOYSLOT_ROM_REGION_TAG).c_str(), size, 4, ENDIANNESS_LITTLE)->base(); m_rom_size = size/4; m_rom_mask = m_rom_size - 1; } @@ -235,7 +233,7 @@ bool vboy_cart_slot_device::call_softlist_load(software_list_device &swlist, con get default card software -------------------------------------------------*/ -void vboy_cart_slot_device::get_default_card_software(astring &result) +void vboy_cart_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "vb_rom"); } diff --git a/src/emu/bus/vboy/slot.h b/src/emu/bus/vboy/slot.h index 9661716ce14..084c1ac5abd 100644 --- a/src/emu/bus/vboy/slot.h +++ b/src/emu/bus/vboy/slot.h @@ -84,7 +84,7 @@ public: virtual const char *file_extensions() const { return "vb,bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ32_MEMBER(read_cart); diff --git a/src/emu/bus/vc4000/slot.c b/src/emu/bus/vc4000/slot.c index c16d5b25aa0..d512f02edf5 100644 --- a/src/emu/bus/vc4000/slot.c +++ b/src/emu/bus/vc4000/slot.c @@ -49,9 +49,7 @@ void device_vc4000_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(VC4000SLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(VC4000SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -224,7 +222,7 @@ bool vc4000_cart_slot_device::call_softlist_load(software_list_device &swlist, c get default card software -------------------------------------------------*/ -void vc4000_cart_slot_device::get_default_card_software(astring &result) +void vc4000_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -243,7 +241,7 @@ void vc4000_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/vc4000/slot.h b/src/emu/bus/vc4000/slot.h index 3749801d4b6..c09821097b6 100644 --- a/src/emu/bus/vc4000/slot.h +++ b/src/emu/bus/vc4000/slot.h @@ -85,7 +85,7 @@ public: virtual const char *file_extensions() const { return "bin,rom"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/emu/bus/vcs/vcs_slot.c b/src/emu/bus/vcs/vcs_slot.c index 26086333a9a..ba63b05229f 100755 --- a/src/emu/bus/vcs/vcs_slot.c +++ b/src/emu/bus/vcs/vcs_slot.c @@ -51,9 +51,7 @@ void device_vcs_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(A26SLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(A26SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -779,7 +777,7 @@ int vcs_cart_slot_device::identify_cart_type(UINT8 *ROM, UINT32 len) get default card software -------------------------------------------------*/ -void vcs_cart_slot_device::get_default_card_software(astring &result) +void vcs_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -795,7 +793,7 @@ void vcs_cart_slot_device::get_default_card_software(astring &result) clear(); - result.cpy(slot_string); + result.assign(slot_string); } else software_get_default_slot(result, "a26_4k"); diff --git a/src/emu/bus/vcs/vcs_slot.h b/src/emu/bus/vcs/vcs_slot.h index e9a6b2ba60b..31cb03543e2 100755 --- a/src/emu/bus/vcs/vcs_slot.h +++ b/src/emu/bus/vcs/vcs_slot.h @@ -108,7 +108,7 @@ public: virtual const char *file_extensions() const { return "bin,a26"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/emu/bus/vectrex/slot.c b/src/emu/bus/vectrex/slot.c index 6af9228f56c..2d82172c7c7 100644 --- a/src/emu/bus/vectrex/slot.c +++ b/src/emu/bus/vectrex/slot.c @@ -49,9 +49,7 @@ void device_vectrex_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(VECSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(VECSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; } } @@ -219,7 +217,7 @@ bool vectrex_cart_slot_device::call_softlist_load(software_list_device &swlist, get default card software -------------------------------------------------*/ -void vectrex_cart_slot_device::get_default_card_software(astring &result) +void vectrex_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -240,7 +238,7 @@ void vectrex_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/vectrex/slot.h b/src/emu/bus/vectrex/slot.h index 10682f7204a..d6b55516c6b 100644 --- a/src/emu/bus/vectrex/slot.h +++ b/src/emu/bus/vectrex/slot.h @@ -84,7 +84,7 @@ public: virtual const char *file_extensions() const { return "bin,gam,vec"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom); diff --git a/src/emu/bus/vic10/exp.c b/src/emu/bus/vic10/exp.c index be18aaf8bfb..ea3b3e2009f 100644 --- a/src/emu/bus/vic10/exp.c +++ b/src/emu/bus/vic10/exp.c @@ -185,7 +185,7 @@ bool vic10_expansion_slot_device::call_softlist_load(software_list_device &swlis // get_default_card_software - //------------------------------------------------- -void vic10_expansion_slot_device::get_default_card_software(astring &result) +void vic10_expansion_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { diff --git a/src/emu/bus/vic10/exp.h b/src/emu/bus/vic10/exp.h index 7c93ef7b247..189ed376f93 100644 --- a/src/emu/bus/vic10/exp.h +++ b/src/emu/bus/vic10/exp.h @@ -137,7 +137,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); devcb_write_line m_write_irq; devcb_write_line m_write_res; diff --git a/src/emu/bus/vic20/exp.c b/src/emu/bus/vic20/exp.c index 0091f1368f2..a6f80554593 100644 --- a/src/emu/bus/vic20/exp.c +++ b/src/emu/bus/vic20/exp.c @@ -170,7 +170,7 @@ bool vic20_expansion_slot_device::call_softlist_load(software_list_device &swlis // get_default_card_software - //------------------------------------------------- -void vic20_expansion_slot_device::get_default_card_software(astring &result) +void vic20_expansion_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "standard"); } diff --git a/src/emu/bus/vic20/exp.h b/src/emu/bus/vic20/exp.h index 7fab2965790..13d3ccef43d 100644 --- a/src/emu/bus/vic20/exp.h +++ b/src/emu/bus/vic20/exp.h @@ -128,7 +128,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); devcb_write_line m_write_irq; devcb_write_line m_write_nmi; diff --git a/src/emu/bus/vidbrain/exp.c b/src/emu/bus/vidbrain/exp.c index eaac1a18155..e388aecbf03 100644 --- a/src/emu/bus/vidbrain/exp.c +++ b/src/emu/bus/vidbrain/exp.c @@ -157,7 +157,7 @@ bool videobrain_expansion_slot_device::call_softlist_load(software_list_device & // get_default_card_software - //------------------------------------------------- -void videobrain_expansion_slot_device::get_default_card_software(astring &result) +void videobrain_expansion_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "standard"); } diff --git a/src/emu/bus/vidbrain/exp.h b/src/emu/bus/vidbrain/exp.h index c4ec1ca1ffb..326ccfd43c4 100644 --- a/src/emu/bus/vidbrain/exp.h +++ b/src/emu/bus/vidbrain/exp.h @@ -153,7 +153,7 @@ protected: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); devcb_write_line m_write_extres; diff --git a/src/emu/bus/wswan/slot.c b/src/emu/bus/wswan/slot.c index 6acc8292d18..0ce55bac515 100644 --- a/src/emu/bus/wswan/slot.c +++ b/src/emu/bus/wswan/slot.c @@ -50,9 +50,7 @@ void device_ws_cart_interface::rom_alloc(UINT32 size, const char *tag) { if (m_rom == NULL) { - astring tempstring(tag); - tempstring.cat(WSSLOT_ROM_REGION_TAG); - m_rom = device().machine().memory().region_alloc(tempstring.c_str(), size, 1, ENDIANNESS_LITTLE)->base(); + m_rom = device().machine().memory().region_alloc(std::string(tag).append(WSSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base(); m_rom_size = size; m_bank_mask = ((m_rom_size >> 16) - 1); } @@ -306,7 +304,7 @@ int ws_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len, UINT32 &nvram_len get default card software -------------------------------------------------*/ -void ws_cart_slot_device::get_default_card_software(astring &result) +void ws_cart_slot_device::get_default_card_software(std::string &result) { if (open_image_file(mconfig().options())) { @@ -325,7 +323,7 @@ void ws_cart_slot_device::get_default_card_software(astring &result) //printf("type: %s\n", slot_string); clear(); - result.cpy(slot_string); + result.assign(slot_string); return; } diff --git a/src/emu/bus/wswan/slot.h b/src/emu/bus/wswan/slot.h index 94c093d0b05..6e0c9182369 100644 --- a/src/emu/bus/wswan/slot.h +++ b/src/emu/bus/wswan/slot.h @@ -94,7 +94,7 @@ public: virtual const char *file_extensions() const { return "ws,wsc,bin"; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read_rom20); diff --git a/src/emu/bus/x68k/x68k_scsiext.c b/src/emu/bus/x68k/x68k_scsiext.c index f7b89c8e305..9a7940a7597 100644 --- a/src/emu/bus/x68k/x68k_scsiext.c +++ b/src/emu/bus/x68k/x68k_scsiext.c @@ -65,12 +65,11 @@ void x68k_scsiext_device::device_start() { device_t* cpu = machine().device("maincpu"); UINT8* ROM; - astring temp; address_space& space = cpu->memory().space(AS_PROGRAM); m_slot = dynamic_cast<x68k_expansion_slot_device *>(owner()); space.install_read_bank(0xea0020,0xea1fff,0,0,"scsi_ext"); space.unmap_write(0xea0020,0xea1fff,0,0); - ROM = machine().root_device().memregion(subtag(temp, "scsiexrom").c_str())->base(); + ROM = machine().root_device().memregion(subtag("scsiexrom").c_str())->base(); machine().root_device().membank("scsi_ext")->set_base(ROM); space.install_readwrite_handler(0xea0000,0xea001f,0,0,read8_delegate(FUNC(x68k_scsiext_device::register_r),this),write8_delegate(FUNC(x68k_scsiext_device::register_w),this),0x00ff00ff); } diff --git a/src/emu/bus/z88/z88.c b/src/emu/bus/z88/z88.c index 460d4d7a6f7..b1c13865fb7 100644 --- a/src/emu/bus/z88/z88.c +++ b/src/emu/bus/z88/z88.c @@ -182,7 +182,7 @@ bool z88cart_slot_device::call_softlist_load(software_list_device &swlist, const get default card software -------------------------------------------------*/ -void z88cart_slot_device::get_default_card_software(astring &result) +void z88cart_slot_device::get_default_card_software(std::string &result) { software_get_default_slot(result, "128krom"); } diff --git a/src/emu/bus/z88/z88.h b/src/emu/bus/z88/z88.h index d899c69fe9a..bcba1671941 100644 --- a/src/emu/bus/z88/z88.h +++ b/src/emu/bus/z88/z88.h @@ -109,7 +109,7 @@ public: virtual const option_guide *create_option_guide() const { return NULL; } // slot interface overrides - virtual void get_default_card_software(astring &result); + virtual void get_default_card_software(std::string &result); // reading and writing virtual DECLARE_READ8_MEMBER(read); diff --git a/src/emu/cheat.c b/src/emu/cheat.c index 44d6693ac13..fc19df4e83c 100644 --- a/src/emu/cheat.c +++ b/src/emu/cheat.c @@ -101,25 +101,25 @@ // the format //------------------------------------------------- -inline const char *number_and_format::format(astring &str) const +inline const char *number_and_format::format(std::string &str) const { switch (m_format) { default: case XML_INT_FORMAT_DECIMAL: - str.printf("%d", (UINT32)m_value); + strprintf(str, "%d", (UINT32)m_value); break; case XML_INT_FORMAT_DECIMAL_POUND: - str.printf("#%d", (UINT32)m_value); + strprintf(str, "#%d", (UINT32)m_value); break; case XML_INT_FORMAT_HEX_DOLLAR: - str.printf("$%X", (UINT32)m_value); + strprintf(str, "$%X", (UINT32)m_value); break; case XML_INT_FORMAT_HEX_C: - str.printf("0x%X", (UINT32)m_value); + strprintf(str, "0x%X", (UINT32)m_value); break; } return str.c_str(); @@ -178,16 +178,16 @@ const char *cheat_parameter::text() { // are we a value cheat? if (!has_itemlist()) - m_curtext.format("%d (0x%X)", UINT32(m_value), UINT32(m_value)); + strprintf(m_curtext,"%d (0x%X)", UINT32(m_value), UINT32(m_value)); // if not, we're an item cheat else { - m_curtext.format("??? (%d)", UINT32(m_value)); + strprintf(m_curtext, "??? (%d)", UINT32(m_value)); for (item *curitem = m_itemlist.first(); curitem != NULL; curitem = curitem->next()) if (curitem->value() == m_value) { - m_curtext.cpy(curitem->text()); + m_curtext.assign(curitem->text()); break; } } @@ -205,7 +205,7 @@ void cheat_parameter::save(emu_file &cheatfile) const cheatfile.printf("\t\t<parameter"); // if no items, just output min/max/step - astring str; + std::string str; if (!has_itemlist()) { if (m_minval != 0) @@ -426,7 +426,7 @@ cheat_script::script_entry::script_entry(cheat_manager &manager, symbol_table &s const char *format = xml_get_attribute_string(&entrynode, "format", NULL); if (format == NULL || format[0] == 0) throw emu_fatalerror("%s.xml(%d): missing format in output tag\n", filename, entrynode.line); - m_format.cpy(format); + m_format.assign(format); // extract other attributes m_line = xml_get_attribute_int(&entrynode, "line", 0); @@ -498,7 +498,7 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde } // if there is a string to display, compute it - if (m_format) + if (!m_format.empty()) { // iterate over arguments and evaluate them UINT64 params[MAX_ARGUMENTS]; @@ -507,7 +507,7 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde curarg += arg->values(argindex, ¶ms[curarg]); // generate the astring - manager.get_output_astring(m_line, m_justify).printf(m_format.c_str(), + strprintf(manager.get_output_astring(m_line, m_justify), m_format.c_str(), (UINT32)params[0], (UINT32)params[1], (UINT32)params[2], (UINT32)params[3], (UINT32)params[4], (UINT32)params[5], (UINT32)params[6], (UINT32)params[7], (UINT32)params[8], (UINT32)params[9], (UINT32)params[10], (UINT32)params[11], @@ -526,10 +526,10 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde void cheat_script::script_entry::save(emu_file &cheatfile) const { - astring tempstring; + std::string tempstring; // output an action - if (!m_format) + if (m_format.empty()) { cheatfile.printf("\t\t\t<action"); if (!m_condition.is_empty()) @@ -660,7 +660,7 @@ int cheat_script::script_entry::output_argument::values(UINT64 &argindex, UINT64 void cheat_script::script_entry::output_argument::save(emu_file &cheatfile) const { - astring tempstring; + std::string tempstring; cheatfile.printf("\t\t\t\t<argument"); if (m_count != 1) @@ -709,9 +709,11 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons // create the symbol table m_symbols.add("argindex", symbol_table::READ_ONLY, &m_argindex); - astring tempname; - for (int curtemp = 0; curtemp < tempcount; curtemp++) - m_symbols.add(tempname.format("temp%d", curtemp).c_str(), symbol_table::READ_WRITE); + std::string tempname; + for (int curtemp = 0; curtemp < tempcount; curtemp++) { + strprintf(tempname,"temp%d", curtemp); + m_symbols.add(tempname.c_str(), symbol_table::READ_WRITE); + } // read the first comment node xml_data_node *commentnode = xml_get_sibling(cheatnode.child, "comment"); @@ -719,7 +721,7 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons { // set the value if not NULL if (commentnode->value != NULL && commentnode->value[0] != 0) - m_comment.cpy(commentnode->value); + m_comment.assign(commentnode->value); // only one comment is kept commentnode = xml_get_sibling(commentnode->next, "comment"); @@ -785,14 +787,14 @@ void cheat_entry::save(emu_file &cheatfile) const cheatfile.printf("\t<cheat desc=\"%s\"", m_description.c_str()); if (m_numtemp != DEFAULT_TEMP_VARIABLES) cheatfile.printf(" tempvariables=\"%d\"", m_numtemp); - if (!m_comment && m_parameter == NULL && !has_scripts) + if (m_comment.empty() && m_parameter == NULL && !has_scripts) cheatfile.printf(" />\n"); else { cheatfile.printf(">\n"); // save the comment - if (m_comment) + if (!m_comment.empty()) cheatfile.printf("\t\t<comment><![CDATA[\n%s\n\t\t]]></comment>\n", m_comment.c_str()); // output the parameter, if present @@ -951,33 +953,33 @@ bool cheat_entry::select_next_state() // this cheat in a menu item //------------------------------------------------- -void cheat_entry::menu_text(astring &description, astring &state, UINT32 &flags) +void cheat_entry::menu_text(std::string &description, std::string &state, UINT32 &flags) { // description is standard - description.cpy(m_description); - state.reset(); + description.assign(m_description); + state.clear(); flags = 0; // some cheat entries are just text for display if (is_text_only()) { - if (description) + if (!description.empty()) { - description.trimspace(); - if (!description) - description.cpy(MENU_SEPARATOR_ITEM); + strtrimspace(description); + if (description.empty()) + description.assign(MENU_SEPARATOR_ITEM); } flags = MENU_FLAG_DISABLE; } // if we have no parameter and no run or off script, it's a oneshot cheat else if (is_oneshot()) - state.cpy("Set"); + state.assign("Set"); // if we have no parameter, it's just on/off else if (is_onoff()) { - state.cpy((m_state == SCRIPT_STATE_RUN) ? "On" : "Off"); + state.assign((m_state == SCRIPT_STATE_RUN) ? "On" : "Off"); flags = (m_state != 0) ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW; } @@ -986,12 +988,12 @@ void cheat_entry::menu_text(astring &description, astring &state, UINT32 &flags) { if (m_state == SCRIPT_STATE_OFF) { - state.cpy(is_oneshot_parameter() ? "Set" : "Off"); + state.assign(is_oneshot_parameter() ? "Set" : "Off"); flags = MENU_FLAG_RIGHT_ARROW; } else { - state.cpy(m_parameter->text()); + state.assign(m_parameter->text()); flags = MENU_FLAG_LEFT_ARROW; if (!m_parameter->is_maximum()) flags |= MENU_FLAG_RIGHT_ARROW; @@ -1149,8 +1151,8 @@ void cheat_manager::reload() UINT32 crc = image->crc(); if (crc != 0) { - astring filename; - filename.printf("%08X", crc); + std::string filename; + strprintf(filename,"%08X", crc); load_cheats(filename.c_str()); break; } @@ -1218,7 +1220,7 @@ void cheat_manager::render_text(render_container &container) { // render any text and free it along the way for (int linenum = 0; linenum < ARRAY_LENGTH(m_output); linenum++) - if (m_output[linenum]) + if (!m_output[linenum].empty()) { // output the text machine().ui().draw_text_full(&container, m_output[linenum].c_str(), @@ -1235,7 +1237,7 @@ void cheat_manager::render_text(render_container &container) // justification //------------------------------------------------- -astring &cheat_manager::get_output_astring(int row, int justify) +std::string &cheat_manager::get_output_astring(int row, int justify) { // if the row is not specified, grab the next one if (row == 0) @@ -1263,34 +1265,34 @@ astring &cheat_manager::get_output_astring(int row, int justify) // document //------------------------------------------------- -const char *cheat_manager::quote_expression(astring &str, const parsed_expression &expression) +const char *cheat_manager::quote_expression(std::string &str, const parsed_expression &expression) { - str.cpy(expression.original_string()); + str.assign(expression.original_string()); - str.replace(0, " && ", " and "); - str.replace(0, " &&", " and "); - str.replace(0, "&& ", " and "); - str.replace(0, "&&", " and "); + strreplace(str, " && ", " and "); + strreplace(str, " &&", " and "); + strreplace(str, "&& ", " and "); + strreplace(str, "&&", " and "); - str.replace(0, " & ", " band "); - str.replace(0, " &", " band "); - str.replace(0, "& ", " band "); - str.replace(0, "&", " band "); + strreplace(str, " & ", " band "); + strreplace(str, " &", " band "); + strreplace(str, "& ", " band "); + strreplace(str, "&", " band "); - str.replace(0, " <= ", " le "); - str.replace(0, " <=", " le "); - str.replace(0, "<= ", " le "); - str.replace(0, "<=", " le "); + strreplace(str, " <= ", " le "); + strreplace(str, " <=", " le "); + strreplace(str, "<= ", " le "); + strreplace(str, "<=", " le "); - str.replace(0, " < ", " lt "); - str.replace(0, " <", " lt "); - str.replace(0, "< ", " lt "); - str.replace(0, "<", " lt "); + strreplace(str, " < ", " lt "); + strreplace(str, " <", " lt "); + strreplace(str, "< ", " lt "); + strreplace(str, "<", " lt "); - str.replace(0, " << ", " lshift "); - str.replace(0, " <<", " lshift "); - str.replace(0, "<< ", " lshift "); - str.replace(0, "<<", " lshift "); + strreplace(str, " << ", " lshift "); + strreplace(str, " <<", " lshift "); + strreplace(str, "<< ", " lshift "); + strreplace(str, "<<", " lshift "); return str.c_str(); } @@ -1347,7 +1349,7 @@ void cheat_manager::frame_update() m_numlines = floor(1.0f / machine().ui().get_line_height()); m_numlines = MIN(m_numlines, ARRAY_LENGTH(m_output)); for (int linenum = 0; linenum < ARRAY_LENGTH(m_output); linenum++) - m_output[linenum].reset(); + m_output[linenum].clear(); // iterate over running cheats and execute them for (cheat_entry *cheat = m_cheatlist.first(); cheat != NULL; cheat = cheat->next()) diff --git a/src/emu/cheat.h b/src/emu/cheat.h index 9e80b6c6bb1..816781a461d 100644 --- a/src/emu/cheat.h +++ b/src/emu/cheat.h @@ -56,7 +56,7 @@ public: operator const UINT64 &() const { return m_value; } // format the number according to its format - const char *format(astring &str) const; + const char *format(std::string &str) const; private: // internal state @@ -109,7 +109,7 @@ private: private: // internal state item * m_next; // next item in list - astring m_text; // name of the item + std::string m_text; // name of the item number_and_format m_value; // value of the item }; @@ -118,7 +118,7 @@ private: number_and_format m_maxval; // maximum value number_and_format m_stepval; // step value UINT64 m_value; // live value of the parameter - astring m_curtext; // holding for a value string + std::string m_curtext; // holding for a value string simple_list<item> m_itemlist; // list of items }; @@ -190,7 +190,7 @@ private: script_entry * m_next; // link to next entry parsed_expression m_condition; // condition under which this is executed parsed_expression m_expression; // expression to execute - astring m_format; // string format to print + std::string m_format; // string format to print simple_list<output_argument> m_arglist; // list of arguments INT8 m_line; // which line to print on UINT8 m_justify; // justification when printing @@ -252,7 +252,7 @@ public: void save(emu_file &cheatfile) const; // UI helpers - void menu_text(astring &description, astring &state, UINT32 &flags); + void menu_text(std::string &description, std::string &state, UINT32 &flags); // per-frame update void frame_update() { if (m_state == SCRIPT_STATE_RUN) execute_run_script(); } @@ -265,8 +265,8 @@ private: // internal state cheat_manager & m_manager; // reference to our manager cheat_entry * m_next; // next cheat entry - astring m_description; // string description/menu title - astring m_comment; // comment data + std::string m_description; // string description/menu title + std::string m_comment; // comment data auto_pointer<cheat_parameter> m_parameter; // parameter auto_pointer<cheat_script> m_on_script; // script to run when turning on auto_pointer<cheat_script> m_off_script; // script to run when turning off @@ -305,10 +305,10 @@ public: void render_text(render_container &container); // output helpers - astring &get_output_astring(int row, int justify); + std::string &get_output_astring(int row, int justify); // global helpers - static const char *quote_expression(astring &str, const parsed_expression &expression); + static const char *quote_expression(std::string &str, const parsed_expression &expression); static UINT64 execute_frombcd(symbol_table &table, void *ref, int params, const UINT64 *param); static UINT64 execute_tobcd(symbol_table &table, void *ref, int params, const UINT64 *param); @@ -321,7 +321,7 @@ private: running_machine & m_machine; // reference to our machine simple_list<cheat_entry> m_cheatlist; // cheat list UINT64 m_framecount; // frame count - astring m_output[UI_TARGET_FONT_ROWS*2]; // array of output strings + std::string m_output[UI_TARGET_FONT_ROWS * 2]; // array of output strings UINT8 m_justify[UI_TARGET_FONT_ROWS*2]; // justification for each string UINT8 m_numlines; // number of lines available for output INT8 m_lastline; // last line used for output diff --git a/src/emu/clifront.c b/src/emu/clifront.c index da44830a67c..bdb6988c0c6 100644 --- a/src/emu/clifront.c +++ b/src/emu/clifront.c @@ -107,7 +107,7 @@ int cli_frontend::execute(int argc, char **argv) try { // first parse options to be able to get software from it - astring option_errors; + std::string option_errors; m_options.parse_command_line(argc, argv, option_errors); if (*(m_options.software_name()) != 0) @@ -149,8 +149,8 @@ int cli_frontend::execute(int argc, char **argv) // mount only if not already mounted if (*option == 0) { - astring val; - val.printf("%s:%s:%s", swlistdev->list_name(), m_options.software_name(), swpart->name()); + std::string val; + strprintf(val, "%s:%s:%s", swlistdev->list_name(), m_options.software_name(), swpart->name()); // call this in order to set slot devices according to mounting m_options.parse_slot_devices(argc, argv, option_errors, image->instance_name(), val.c_str()); @@ -184,13 +184,13 @@ int cli_frontend::execute(int argc, char **argv) throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name()); // otherwise, error on the options - throw emu_fatalerror(MAMERR_INVALID_CONFIG, "%s", option_errors.trimspace().c_str()); + throw emu_fatalerror(MAMERR_INVALID_CONFIG, "%s", strtrimspace(option_errors).c_str()); } - if (option_errors) - osd_printf_error("Error in command line:\n%s\n", option_errors.trimspace().c_str()); + if (!option_errors.empty()) + osd_printf_error("Error in command line:\n%s\n", strtrimspace(option_errors).c_str()); // determine the base name of the EXE - astring exename; + std::string exename; core_filename_extract_base(exename, argv[0], true); // if we have a command, execute that @@ -207,8 +207,8 @@ int cli_frontend::execute(int argc, char **argv) m_options.revert(OPTION_PRIORITY_INI); m_options.parse_standard_inis(option_errors); } - if (option_errors) - osd_printf_error("Error in command line:\n%s\n", option_errors.trimspace().c_str()); + if (!option_errors.empty()) + osd_printf_error("Error in command line:\n%s\n", strtrimspace(option_errors).c_str()); // if we can't find it, give an appropriate error const game_driver *system = m_options.system(); @@ -225,8 +225,9 @@ int cli_frontend::execute(int argc, char **argv) // handle exceptions of various types catch (emu_fatalerror &fatal) { - astring str(fatal.string()); - osd_printf_error("%s\n", str.trimspace().c_str()); + std::string str(fatal.string()); + strtrimspace(str); + osd_printf_error("%s\n", str.c_str()); m_result = (fatal.exitcode() != 0) ? fatal.exitcode() : MAMERR_FATALERROR; // if a game was specified, wasn't a wildcard, and our error indicates this was the @@ -326,7 +327,7 @@ void cli_frontend::listsource(const char *gamename) throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "No matching games found for '%s'", gamename); // iterate through drivers and output the info - astring filename; + std::string filename; while (drivlist.next()) osd_printf_info("%-16s %s\n", drivlist.driver().name, core_filename_extract_base(filename, drivlist.driver().source_file).c_str()); } @@ -414,7 +415,7 @@ void cli_frontend::listbrothers(const char *gamename) // output the entries found drivlist.reset(); - astring filename; + std::string filename; while (drivlist.next()) { int clone_of = drivlist.clone(); @@ -465,7 +466,7 @@ void cli_frontend::listroms(const char *gamename) throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "No matching games found for '%s'", gamename); // iterate through matches - astring tempstr; + std::string tempstr; bool first = true; while (drivlist.next()) { @@ -722,17 +723,17 @@ void cli_frontend::listmedia(const char *gamename) for (const device_image_interface *imagedev = iter.first(); imagedev != NULL; imagedev = iter.next()) { // extract the shortname with parentheses - astring paren_shortname; - paren_shortname.format("(%s)", imagedev->brief_instance_name()); + std::string paren_shortname; + strprintf(paren_shortname,"(%s)", imagedev->brief_instance_name()); // output the line, up to the list of extensions printf("%-13s%-12s%-8s ", first ? drivlist.driver().name : "", imagedev->instance_name(), paren_shortname.c_str()); // get the extensions and print them - astring extensions(imagedev->file_extensions()); - for (int start = 0, end = extensions.chr(0, ','); ; start = end + 1, end = extensions.chr(start, ',')) + std::string extensions(imagedev->file_extensions()); + for (int start = 0, end = extensions.find_first_of(',');; start = end + 1, end = extensions.find_first_of(',', start)) { - astring curext(extensions, start, (end == -1) ? extensions.len() - start : end - start); + std::string curext(extensions, start, (end == -1) ? extensions.length() - start : end - start); printf(".%-5s", curext.c_str()); if (end == -1) break; @@ -780,7 +781,7 @@ void cli_frontend::verifyroms(const char *gamename) else { // output the summary of the audit - astring summary_string; + std::string summary_string; auditor.summarize(drivlist.driver().name,&summary_string); osd_printf_info("%s", summary_string.c_str()); @@ -840,7 +841,7 @@ void cli_frontend::verifyroms(const char *gamename) else if (summary != media_auditor::NONE_NEEDED) { // output the summary of the audit - astring summary_string; + std::string summary_string; auditor.summarize(dev->shortname(),&summary_string); osd_printf_info("%s", summary_string.c_str()); @@ -878,8 +879,8 @@ void cli_frontend::verifyroms(const char *gamename) { for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next()) { - astring temptag("_"); - temptag.cat(option->name()); + std::string temptag("_"); + temptag.append(option->name()); device_t *dev = const_cast<machine_config &>(config).device_add(&config.root_device(), temptag.c_str(), option->devtype(), 0); // notify this device and all its subdevices that they are now configured @@ -905,7 +906,7 @@ void cli_frontend::verifyroms(const char *gamename) else if(summary != media_auditor::NONE_NEEDED) { // output the summary of the audit - astring summary_string; + std::string summary_string; auditor.summarize(dev->shortname(),&summary_string); osd_printf_info("%s", summary_string.c_str()); @@ -1002,7 +1003,7 @@ void cli_frontend::verifysamples(const char *gamename) else if (summary != media_auditor::NONE_NEEDED) { // output the summary of the audit - astring summary_string; + std::string summary_string; auditor.summarize(drivlist.driver().name,&summary_string); osd_printf_info("%s", summary_string.c_str()); @@ -1120,7 +1121,7 @@ void cli_frontend::verifysamples(const char *gamename) void cli_frontend::output_single_softlist(FILE *out, software_list_device &swlistdev) { - astring tempstr; + std::string tempstr; fprintf(out, "\t<softwarelist name=\"%s\" description=\"%s\">\n", swlistdev.list_name(), xml_normalize_string(swlistdev.description())); for (software_info *swinfo = swlistdev.first_software_info(); swinfo != NULL; swinfo = swinfo->next()) @@ -1320,7 +1321,7 @@ void cli_frontend::verifysoftware(const char *gamename) else if(summary != media_auditor::NONE_NEEDED) { // output the summary of the audit - astring summary_string; + std::string summary_string; auditor.summarize(swinfo->shortname(), &summary_string); osd_printf_info("%s", summary_string.c_str()); @@ -1442,7 +1443,7 @@ void cli_frontend::verifysoftlist(const char *gamename) else if (summary != media_auditor::NONE_NEEDED) { // output the summary of the audit - astring summary_string; + std::string summary_string; auditor.summarize(swinfo->shortname(), &summary_string); osd_printf_info("%s", summary_string.c_str()); @@ -1538,7 +1539,7 @@ void cli_frontend::execute_commands(const char *exename) // showusage? if (strcmp(m_options.command(), CLICOMMAND_SHOWUSAGE) == 0) { - astring helpstring; + std::string helpstring; emulator_info::printf_usage(exename, emulator_info::get_gamenoun()); osd_printf_info("\n\nOptions:\n%s", m_options.output_help(helpstring)); return; @@ -1553,9 +1554,9 @@ void cli_frontend::execute_commands(const char *exename) } // other commands need the INIs parsed - astring option_errors; + std::string option_errors; m_options.parse_standard_inis(option_errors); - if (option_errors) + if (!option_errors.empty()) osd_printf_error("%s\n", option_errors.c_str()); // createconfig? @@ -1567,7 +1568,7 @@ void cli_frontend::execute_commands(const char *exename) throw emu_fatalerror("Unable to create file %s.ini\n",emulator_info::get_configname()); // generate the updated INI - astring initext; + std::string initext; file.puts(m_options.output_ini(initext)); return; } @@ -1576,7 +1577,7 @@ void cli_frontend::execute_commands(const char *exename) if (strcmp(m_options.command(), CLICOMMAND_SHOWCONFIG) == 0) { // print the INI text - astring initext; + std::string initext; printf("%s\n", m_options.output_ini(initext)); return; } @@ -1686,7 +1687,7 @@ void media_identifier::identify(const char *filename) for (const osd_directory_entry *entry = osd_readdir(directory); entry != NULL; entry = osd_readdir(directory)) if (entry->type == ENTTYPE_FILE) { - astring curfile = astring(filename).cat(PATH_SEPARATOR).cat(entry->name); + std::string curfile = std::string(filename).append(PATH_SEPARATOR).append(entry->name); identify(curfile.c_str()); } @@ -1778,7 +1779,7 @@ void media_identifier::identify_file(const char *name) if (core_filename_ends_with(name, ".chd")) { // output the name - astring basename; + std::string basename; osd_printf_info("%-20s", core_filename_extract_base(basename, name).c_str()); m_total++; @@ -1854,7 +1855,7 @@ void media_identifier::identify_data(const char *name, const UINT8 *data, int le // output the name m_total++; - astring basename; + std::string basename; osd_printf_info("%-20s", core_filename_extract_base(basename, name).c_str()); // see if we can find a match in the ROMs diff --git a/src/emu/cpu/8x300/8x300.c b/src/emu/cpu/8x300/8x300.c index fab5f9f9ab4..517e205c5a2 100644 --- a/src/emu/cpu/8x300/8x300.c +++ b/src/emu/cpu/8x300/8x300.c @@ -143,7 +143,7 @@ void n8x300_cpu_device::device_start() m_icountptr = &m_icount; } -void n8x300_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void n8x300_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { diff --git a/src/emu/cpu/8x300/8x300.h b/src/emu/cpu/8x300/8x300.h index 151d4fd49fc..116fef0119e 100644 --- a/src/emu/cpu/8x300/8x300.h +++ b/src/emu/cpu/8x300/8x300.h @@ -64,7 +64,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/adsp2100/adsp2100.c b/src/emu/cpu/adsp2100/adsp2100.c index 0a521b7898f..3c3a5e7049c 100644 --- a/src/emu/cpu/adsp2100/adsp2100.c +++ b/src/emu/cpu/adsp2100/adsp2100.c @@ -544,15 +544,15 @@ void adsp21xx_device::device_start() state_add(ADSP2100_SR0_SEC, "SR0_SEC", m_alt.sr.srx.sr0.u); state_add(ADSP2100_SR1_SEC, "SR1_SEC", m_alt.sr.srx.sr1.u); - astring tempstring; + std::string tempstring; for (int ireg = 0; ireg < 8; ireg++) - state_add(ADSP2100_I0 + ireg, tempstring.format("I%d", ireg).c_str(), m_i[ireg]).mask(0x3fff).callimport(); + state_add(ADSP2100_I0 + ireg, strformat(tempstring, "I%d", ireg).c_str(), m_i[ireg]).mask(0x3fff).callimport(); for (int lreg = 0; lreg < 8; lreg++) - state_add(ADSP2100_L0 + lreg, tempstring.format("L%d", lreg).c_str(), m_l[lreg]).mask(0x3fff).callimport(); + state_add(ADSP2100_L0 + lreg, strformat(tempstring, "L%d", lreg).c_str(), m_l[lreg]).mask(0x3fff).callimport(); for (int mreg = 0; mreg < 8; mreg++) - state_add(ADSP2100_M0 + mreg, tempstring.format("M%d", mreg).c_str(), m_m[mreg]).signed_mask(0x3fff); + state_add(ADSP2100_M0 + mreg, strformat(tempstring, "M%d", mreg).c_str(), m_m[mreg]).signed_mask(0x3fff); state_add(ADSP2100_PX, "PX", m_px); state_add(ADSP2100_CNTR, "CNTR", m_cntr).mask(0x3fff); @@ -571,7 +571,7 @@ void adsp21xx_device::device_start() for (int irqnum = 0; irqnum < 4; irqnum++) if (irqnum < 4 || m_chip_type == CHIP_TYPE_ADSP2100) - state_add(ADSP2100_IRQSTATE0 + irqnum, tempstring.format("IRQ%d", irqnum).c_str(), m_irq_state[irqnum]).mask(1).callimport(); + state_add(ADSP2100_IRQSTATE0 + irqnum, strformat(tempstring, "IRQ%d", irqnum).c_str(), m_irq_state[irqnum]).mask(1).callimport(); state_add(ADSP2100_FLAGIN, "FLAGIN", m_flagin).mask(1); state_add(ADSP2100_FLAGOUT, "FLAGOUT", m_flagout).mask(1); @@ -720,12 +720,12 @@ void adsp21xx_device::state_import(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void adsp21xx_device::state_string_export(const device_state_entry &entry, astring &str) +void adsp21xx_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_astat & 0x80 ? 'X':'.', m_astat & 0x40 ? 'M':'.', m_astat & 0x20 ? 'Q':'.', diff --git a/src/emu/cpu/adsp2100/adsp2100.h b/src/emu/cpu/adsp2100/adsp2100.h index 81a938d2c46..ee5e6b23871 100644 --- a/src/emu/cpu/adsp2100/adsp2100.h +++ b/src/emu/cpu/adsp2100/adsp2100.h @@ -237,7 +237,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/alph8201/alph8201.c b/src/emu/cpu/alph8201/alph8201.c index 922309c1fe6..6fb73a1eb4a 100644 --- a/src/emu/cpu/alph8201/alph8201.c +++ b/src/emu/cpu/alph8201/alph8201.c @@ -513,12 +513,12 @@ void alpha8201_cpu_device::state_export(const device_state_entry &entry) } -void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void alpha8201_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c", m_cf ? 'C' : '.', m_zf ? 'Z' : '.'); + strprintf(str, "%c%c", m_cf ? 'C' : '.', m_zf ? 'Z' : '.'); break; } } diff --git a/src/emu/cpu/alph8201/alph8201.h b/src/emu/cpu/alph8201/alph8201.h index 07544c29406..48f0f284a6a 100644 --- a/src/emu/cpu/alph8201/alph8201.h +++ b/src/emu/cpu/alph8201/alph8201.h @@ -61,7 +61,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/alto2/alto2cpu.c b/src/emu/cpu/alto2/alto2cpu.c index 02808d81115..a0299d95ec8 100644 --- a/src/emu/cpu/alto2/alto2cpu.c +++ b/src/emu/cpu/alto2/alto2cpu.c @@ -1004,15 +1004,15 @@ void alto2_cpu_device::device_start() // for the debugger //------------------------------------------------- -void alto2_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void alto2_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case A2_TASK: - str.printf("%s", task_name(m_task)); + strprintf(str, "%s", task_name(m_task)); break; case STATE_GENFLAGS: - str.printf("%s%s%s%s", + strprintf(str, "%s%s%s%s", m_aluc0 ? "C":"-", m_laluc0 ? "c":"-", m_shifter == 0 ? "0":"-", diff --git a/src/emu/cpu/alto2/alto2cpu.h b/src/emu/cpu/alto2/alto2cpu.h index fa1512e18e1..464ac5a594a 100644 --- a/src/emu/cpu/alto2/alto2cpu.h +++ b/src/emu/cpu/alto2/alto2cpu.h @@ -215,7 +215,7 @@ protected: //! device (P)ROMs virtual const rom_entry *device_rom_region() const; //! device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); //! device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/am29000/am29000.c b/src/emu/cpu/am29000/am29000.c index 8ebb37c014f..d100f44c351 100644 --- a/src/emu/cpu/am29000/am29000.c +++ b/src/emu/cpu/am29000/am29000.c @@ -402,12 +402,12 @@ void am29000_cpu_device::device_start() } -void am29000_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void am29000_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c|%3d", m_alu & ALU_V ? 'V' : '.', + strprintf(str, "%c%c%c%c%c%c%c%c%c|%3d", m_alu & ALU_V ? 'V' : '.', m_alu & ALU_Z ? 'Z' : '.', m_alu & ALU_N ? 'N' : '.', m_alu & ALU_C ? 'C' : '.', diff --git a/src/emu/cpu/am29000/am29000.h b/src/emu/cpu/am29000/am29000.h index 88662a71a5b..7e9d691fe91 100644 --- a/src/emu/cpu/am29000/am29000.h +++ b/src/emu/cpu/am29000/am29000.h @@ -460,7 +460,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/amis2000/amis2000.c b/src/emu/cpu/amis2000/amis2000.c index 44062fae621..1d3c198952f 100644 --- a/src/emu/cpu/amis2000/amis2000.c +++ b/src/emu/cpu/amis2000/amis2000.c @@ -72,12 +72,12 @@ amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const ch // disasm -void amis2000_base_device::state_string_export(const device_state_entry &entry, astring &str) +void amis2000_base_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c", m_f & 0x20 ? '6':'.', m_f & 0x10 ? '5':'.', m_f & 0x08 ? '4':'.', diff --git a/src/emu/cpu/amis2000/amis2000.h b/src/emu/cpu/amis2000/amis2000.h index a80a2b11c4b..ba565205b21 100644 --- a/src/emu/cpu/amis2000/amis2000.h +++ b/src/emu/cpu/amis2000/amis2000.h @@ -89,7 +89,7 @@ protected: virtual UINT32 disasm_min_opcode_bytes() const { return 1; } virtual UINT32 disasm_max_opcode_bytes() const { return 1; } virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); address_space_config m_program_config; address_space_config m_data_config; diff --git a/src/emu/cpu/amis2000/amis2000op.inc b/src/emu/cpu/amis2000/amis2000op.inc index 1b647b071bf..051cce70151 100644 --- a/src/emu/cpu/amis2000/amis2000op.inc +++ b/src/emu/cpu/amis2000/amis2000op.inc @@ -499,7 +499,7 @@ void amis2000_base_device::op_rf2() void amis2152_cpu_device::d2f_timer_clock() { // schedule next timeout (frequency is guessed) - attotime base = attotime::from_hz(unscaled_clock() / 4 / 64); + attotime base = attotime::from_ticks(4 * 64, unscaled_clock()); m_d2f_timer->adjust(base * (0x10 - m_d2f_latch)); } diff --git a/src/emu/cpu/apexc/apexc.c b/src/emu/cpu/apexc/apexc.c index 35a47c36463..218fd05404f 100644 --- a/src/emu/cpu/apexc/apexc.c +++ b/src/emu/cpu/apexc/apexc.c @@ -812,12 +812,12 @@ void apexc_cpu_device::state_export(const device_state_entry &entry) } -void apexc_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void apexc_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c", m_running ? 'R' : 'S'); + strprintf(str, "%c", m_running ? 'R' : 'S'); break; } } diff --git a/src/emu/cpu/apexc/apexc.h b/src/emu/cpu/apexc/apexc.h index f691ec1fa60..8142246c486 100644 --- a/src/emu/cpu/apexc/apexc.h +++ b/src/emu/cpu/apexc/apexc.h @@ -42,7 +42,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/arm/arm.c b/src/emu/cpu/arm/arm.c index 8de2e2471c1..77f1927f3e3 100644 --- a/src/emu/cpu/arm/arm.c +++ b/src/emu/cpu/arm/arm.c @@ -550,14 +550,14 @@ void arm_cpu_device::device_start() } -void arm_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void arm_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { static const char *s[4] = { "USER", "FIRQ", "IRQ ", "SVC " }; switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c %s", + strprintf(str, "%c%c%c%c%c%c %s", (m_sArmRegister[15] & N_MASK) ? 'N' : '-', (m_sArmRegister[15] & Z_MASK) ? 'Z' : '-', (m_sArmRegister[15] & C_MASK) ? 'C' : '-', diff --git a/src/emu/cpu/arm/arm.h b/src/emu/cpu/arm/arm.h index 490fe41b6b6..8a5cd9057fe 100644 --- a/src/emu/cpu/arm/arm.h +++ b/src/emu/cpu/arm/arm.h @@ -59,7 +59,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/arm7/arm7.c b/src/emu/cpu/arm7/arm7.c index dfc8cb7e035..2f32785e62f 100644 --- a/src/emu/cpu/arm7/arm7.c +++ b/src/emu/cpu/arm7/arm7.c @@ -574,12 +574,12 @@ void arm7_cpu_device::state_export(const device_state_entry &entry) } -void arm7_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void arm7_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c %s", + strprintf(str, "%c%c%c%c%c%c%c%c %s", (ARM7REG(eCPSR) & N_MASK) ? 'N' : '-', (ARM7REG(eCPSR) & Z_MASK) ? 'Z' : '-', (ARM7REG(eCPSR) & C_MASK) ? 'C' : '-', diff --git a/src/emu/cpu/arm7/arm7.h b/src/emu/cpu/arm7/arm7.h index ce78d0b6407..08fa9902ed9 100644 --- a/src/emu/cpu/arm7/arm7.h +++ b/src/emu/cpu/arm7/arm7.h @@ -97,7 +97,7 @@ protected: // device_state_interface overrides virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/asap/asap.c b/src/emu/cpu/asap/asap.c index b80398d421e..1402ef8e442 100644 --- a/src/emu/cpu/asap/asap.c +++ b/src/emu/cpu/asap/asap.c @@ -186,7 +186,7 @@ void asap_device::device_start() m_direct = &m_program->direct(); // register our state for the debugger - astring tempstr; + std::string tempstr; state_add(STATE_GENPC, "GENPC", m_pc).noshow(); state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow(); state_add(STATE_GENSP, "GENSP", m_src2val[REGBASE + 31]).noshow(); @@ -194,7 +194,7 @@ void asap_device::device_start() state_add(ASAP_PC, "PC", m_pc); state_add(ASAP_PS, "PS", m_flagsio).callimport().callexport(); for (int regnum = 0; regnum < 32; regnum++) - state_add(ASAP_R0 + regnum, tempstr.format("R%d", regnum).c_str(), m_src2val[REGBASE + regnum]); + state_add(ASAP_R0 + regnum, strformat(tempstr, "R%d", regnum).c_str(), m_src2val[REGBASE + regnum]); // register our state for saving save_item(NAME(m_pc)); @@ -281,12 +281,12 @@ void asap_device::state_export(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void asap_device::state_string_export(const device_state_entry &entry, astring &str) +void asap_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c", m_pflag ? 'P' : '.', m_iflag ? 'I' : '.', ((INT32)m_znflag < 0) ? 'N' : '.', diff --git a/src/emu/cpu/asap/asap.h b/src/emu/cpu/asap/asap.h index fc7bfadae48..6cac9ee4c36 100644 --- a/src/emu/cpu/asap/asap.h +++ b/src/emu/cpu/asap/asap.h @@ -48,7 +48,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/avr8/avr8.c b/src/emu/cpu/avr8/avr8.c index ad61eeae266..b8dc5ffd1d2 100644 --- a/src/emu/cpu/avr8/avr8.c +++ b/src/emu/cpu/avr8/avr8.c @@ -749,7 +749,7 @@ void avr8_device::device_start() m_io = &space(AS_IO); // register our state for the debugger - astring tempstr; + std::string tempstr; state_add(STATE_GENPC, "GENPC", m_shifted_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_r[AVR8_REGIDX_SREG]).callimport().callexport().formatstr("%8s").noshow(); state_add(AVR8_SREG, "STATUS", m_r[AVR8_REGIDX_SREG]).mask(0xff); @@ -902,12 +902,12 @@ const address_space_config *avr8_device::memory_space_config(address_spacenum sp // for the debugger //------------------------------------------------- -void avr8_device::state_string_export(const device_state_entry &entry, astring &str) +void avr8_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (m_r[AVR8_REGIDX_SREG] & 0x80) ? 'I' : '-', (m_r[AVR8_REGIDX_SREG] & 0x40) ? 'T' : '-', (m_r[AVR8_REGIDX_SREG] & 0x20) ? 'H' : '-', diff --git a/src/emu/cpu/avr8/avr8.h b/src/emu/cpu/avr8/avr8.h index 7ae7417279f..1d42d081ada 100644 --- a/src/emu/cpu/avr8/avr8.h +++ b/src/emu/cpu/avr8/avr8.h @@ -132,7 +132,7 @@ protected: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // address spaces const address_space_config m_program_config; diff --git a/src/emu/cpu/ccpu/ccpu.c b/src/emu/cpu/ccpu/ccpu.c index 1f31a8d3525..a06ac8e003e 100644 --- a/src/emu/cpu/ccpu/ccpu.c +++ b/src/emu/cpu/ccpu/ccpu.c @@ -139,12 +139,12 @@ void ccpu_cpu_device::device_start() } -void ccpu_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void ccpu_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c", TEST_A0 ? '0' : 'o', TEST_NC ? 'N' : 'n', TEST_LT ? 'L' : 'l', diff --git a/src/emu/cpu/ccpu/ccpu.h b/src/emu/cpu/ccpu/ccpu.h index b7dffc7a44d..96a0fac344a 100644 --- a/src/emu/cpu/ccpu/ccpu.h +++ b/src/emu/cpu/ccpu/ccpu.h @@ -82,7 +82,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/cop400/cop400.c b/src/emu/cpu/cop400/cop400.c index 26fbd8e21ef..2f3b0ba15f1 100644 --- a/src/emu/cpu/cop400/cop400.c +++ b/src/emu/cpu/cop400/cop400.c @@ -51,7 +51,6 @@ TODO: - - remove LBIOps - remove InstLen - run interrupt test suite - run production test suite @@ -104,20 +103,18 @@ const device_type COP445 = &device_creator<cop445_cpu_device>; #define ROM(a) m_direct->read_decrypted_byte(a) #define RAM_R(a) m_data->read_byte(a) #define RAM_W(a, v) m_data->write_byte(a, v) -#define IN(a) m_io->read_byte(a) -#define OUT(a, v) m_io->write_byte(a, v) -#define IN_G() (IN(COP400_PORT_G) & m_g_mask) -#define IN_L() IN(COP400_PORT_L) -#define IN_SI() BIT(IN(COP400_PORT_SIO), 0) -#define IN_CKO() BIT(IN(COP400_PORT_CKO), 0) -#define IN_IN() (m_in_mask ? IN(COP400_PORT_IN) : 0) +#define IN_G() (m_read_g(0, 0xff) & m_g_mask) +#define IN_L() m_read_l(0, 0xff) +#define IN_SI() BIT(m_read_si(), 0) +#define IN_CKO() BIT(m_read_cko(), 0) +#define IN_IN() (m_in_mask ? m_read_in(0, 0xff) : 0) -#define OUT_G(v) OUT(COP400_PORT_G, (v) & m_g_mask) -#define OUT_L(v) OUT(COP400_PORT_L, (v)) -#define OUT_D(v) OUT(COP400_PORT_D, (v) & m_d_mask) -#define OUT_SK(v) OUT(COP400_PORT_SK, (v)) -#define OUT_SO(v) OUT(COP400_PORT_SIO, (v)) +#define OUT_G(v) m_write_g(0, (v) & m_g_mask, 0xff) +#define OUT_L(v) m_write_l(0, v, 0xff) +#define OUT_D(v) m_write_d(0, (v) & m_d_mask, 0xff) +#define OUT_SK(v) m_write_sk(v) +#define OUT_SO(v) m_write_so(v) #define PC m_pc #define A m_a @@ -176,7 +173,16 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) , m_program_config("program", ENDIANNESS_LITTLE, 8, program_addr_bits, 0, internal_map_program) , m_data_config("data", ENDIANNESS_LITTLE, 8, data_addr_bits, 0, internal_map_data) // data width is really 4 - , m_io_config("io", ENDIANNESS_LITTLE, 8, 9, 0) + , m_read_l(*this) + , m_write_l(*this) + , m_read_g(*this) + , m_write_g(*this) + , m_write_d(*this) + , m_read_in(*this) + , m_read_si(*this) + , m_write_so(*this) + , m_write_sk(*this) + , m_read_cko(*this) , m_cki(COP400_CKI_DIVISOR_16) , m_cko(COP400_CKO_OSCILLATOR_OUTPUT) , m_microbus(COP400_MICROBUS_DISABLED) @@ -191,9 +197,6 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type /* initialize instruction length array */ for (i=0; i<256; i++) m_InstLen[i]=1; - /* initialize LBI opcode array */ - for (i=0x00; i<0x100; i++) m_LBIops[i] = 0; - for (i=0; i<256; i++) m_LBIops33[i] = 0; switch (featuremask) { @@ -203,11 +206,6 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type /* initialize instruction length array */ m_InstLen[0x60] = m_InstLen[0x61] = m_InstLen[0x68] = m_InstLen[0x69] = m_InstLen[0x33] = m_InstLen[0x23] = 2; - /* initialize LBI opcode array */ - for (i=0x08; i<0x10; i++) m_LBIops[i] = 1; - for (i=0x18; i<0x20; i++) m_LBIops[i] = 1; - for (i=0x28; i<0x30; i++) m_LBIops[i] = 1; - for (i=0x38; i<0x40; i++) m_LBIops[i] = 1; break; case COP420_FEATURE: @@ -217,12 +215,6 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type m_InstLen[0x60] = m_InstLen[0x61] = m_InstLen[0x62] = m_InstLen[0x63] = m_InstLen[0x68] = m_InstLen[0x69] = m_InstLen[0x6a] = m_InstLen[0x6b] = m_InstLen[0x33] = m_InstLen[0x23] = 2; - /* initialize LBI opcode array */ - for (i=0x08; i<0x10; i++) m_LBIops[i] = 1; - for (i=0x18; i<0x20; i++) m_LBIops[i] = 1; - for (i=0x28; i<0x30; i++) m_LBIops[i] = 1; - for (i=0x38; i<0x40; i++) m_LBIops[i] = 1; - for (i=0x80; i<0xc0; i++) m_LBIops33[i] = 1; break; case COP444_FEATURE: @@ -232,13 +224,6 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type m_InstLen[0x60] = m_InstLen[0x61] = m_InstLen[0x62] = m_InstLen[0x63] = m_InstLen[0x68] = m_InstLen[0x69] = m_InstLen[0x6a] = m_InstLen[0x6b] = m_InstLen[0x33] = m_InstLen[0x23] = 2; - /* initialize LBI opcode array */ - for (i=0x00; i<0x100; i++) m_LBIops[i] = 0; - for (i=0x08; i<0x10; i++) m_LBIops[i] = 1; - for (i=0x18; i<0x20; i++) m_LBIops[i] = 1; - for (i=0x28; i<0x30; i++) m_LBIops[i] = 1; - for (i=0x38; i<0x40; i++) m_LBIops[i] = 1; - for (i=0x80; i<0xc0; i++) m_LBIops33[i] = 1; break; default: @@ -952,12 +937,24 @@ void cop400_cpu_device::device_start() m_program = &space(AS_PROGRAM); m_direct = &m_program->direct(); m_data = &space(AS_DATA); - m_io = &space(AS_IO); + + /* find i/o handlers */ + + m_read_l.resolve_safe(0); + m_write_l.resolve_safe(); + m_read_g.resolve_safe(0); + m_write_g.resolve_safe(); + m_write_d.resolve_safe(); + m_read_in.resolve_safe(0); + m_read_si.resolve_safe(0); + m_write_so.resolve_safe(); + m_write_sk.resolve_safe(); + m_read_cko.resolve_safe(0); /* allocate serial timer */ m_serial_timer = timer_alloc(TIMER_SERIAL); - m_serial_timer->adjust(attotime::zero, 0, attotime::from_hz(clock() / 16)); + m_serial_timer->adjust(attotime::zero, 0, attotime::from_ticks(16, clock())); /* allocate counter timer */ @@ -965,7 +962,7 @@ void cop400_cpu_device::device_start() if (m_has_counter) { m_counter_timer = timer_alloc(TIMER_COUNTER); - m_counter_timer->adjust(attotime::zero, 0, attotime::from_hz(clock() / 16 / 4)); + m_counter_timer->adjust(attotime::zero, 0, attotime::from_ticks(16 * 4, clock())); } /* allocate IN latch timer */ @@ -974,7 +971,7 @@ void cop400_cpu_device::device_start() if (m_has_inil) { m_inil_timer = timer_alloc(TIMER_INIL); - m_inil_timer->adjust(attotime::zero, 0, attotime::from_hz(clock() / 16)); + m_inil_timer->adjust(attotime::zero, 0, attotime::from_ticks(16, clock())); } /* allocate Microbus timer */ @@ -983,7 +980,7 @@ void cop400_cpu_device::device_start() if (m_microbus == COP400_MICROBUS_ENABLED) { m_microbus_timer = timer_alloc(TIMER_MICROBUS); - m_microbus_timer->adjust(attotime::zero, 0, attotime::from_hz(clock() / 16)); + m_microbus_timer->adjust(attotime::zero, 0, attotime::from_ticks(16, clock())); } /* register for state saving */ @@ -1006,7 +1003,6 @@ void cop400_cpu_device::device_start() save_item(NAME(m_skl)); save_item(NAME(m_t)); save_item(NAME(m_skip)); - save_item(NAME(m_skip_lbi)); save_item(NAME(m_skt_latch)); save_item(NAME(m_si)); save_item(NAME(m_last_skip)); @@ -1074,7 +1070,6 @@ void cop400_cpu_device::device_start() m_il = 0; m_in[0] = m_in[1] = m_in[2] = m_in[3] = 0; m_si = 0; - m_skip_lbi = 0; m_last_skip = 0; m_microbus_int = 0; m_skip = 0; @@ -1099,6 +1094,7 @@ void cop400_cpu_device::device_reset() T = 0; m_skt_latch = 1; + m_last_opcode_function = INST(nop); m_halt = 0; m_idle = 0; } @@ -1109,8 +1105,6 @@ void cop400_cpu_device::device_reset() void cop400_cpu_device::execute_run() { - UINT8 opcode; - do { m_prevpc = PC; @@ -1128,87 +1122,61 @@ void cop400_cpu_device::execute_run() continue; } - opcode = ROM(PC); - if (m_skip_lbi) - { - int is_lbi = 0; + UINT8 opcode = ROM(PC); + int inst_cycles = m_opcode_map[opcode].cycles; - if (opcode == 0x33) - { - is_lbi = m_LBIops33[ROM(PC+1)]; - } - else - { - is_lbi = m_LBIops[opcode]; - } + PC++; - if (is_lbi) - { - m_icount -= m_opcode_map[opcode].cycles; + (this->*(m_opcode_map[opcode].function))(opcode); + m_last_opcode_function = m_opcode_map[opcode].function; + m_icount -= inst_cycles; - PC += m_InstLen[opcode]; - } - else - { - m_skip_lbi = 0; - } - } + // check for interrupt - if (!m_skip_lbi) + if (BIT(EN, 1) && BIT(IL, 1)) { - int inst_cycles = m_opcode_map[opcode].cycles; + cop400_opcode_func function = m_opcode_map[ROM(PC)].function; - PC++; + // all successive transfer of control instructions and successive LBIs have been completed + if ((function != INST(jp)) && (function != INST(jmp)) && (function != INST(jsr)) && !(m_last_opcode_function == INST(lbi) && function == INST(lbi))) + { + // store skip logic + m_last_skip = m_skip; + m_skip = 0; - (this->*(m_opcode_map[opcode].function))(opcode); - m_icount -= inst_cycles; + // push next PC + PUSH(PC); - // check for interrupt + // jump to interrupt service routine + PC = 0x0ff; - if (BIT(EN, 1) && BIT(IL, 1)) - { - cop400_opcode_func function = m_opcode_map[ROM(PC)].function; + // disable interrupt + EN &= ~0x02; + } - if ((function != INST(jp)) && (function != INST(jmp)) && (function != INST(jsr))) - { - // store skip logic - m_last_skip = m_skip; - m_skip = 0; + IL &= ~2; + } - // push next PC - PUSH(PC); + // skip next instruction? - // jump to interrupt service routine - PC = 0x0ff; + if (m_skip) + { + cop400_opcode_func function = m_opcode_map[ROM(PC)].function; - // disable interrupt - EN &= ~0x02; - } + opcode = ROM(PC); - IL &= ~2; + if ((function == INST(lqid)) || (function == INST(jid))) + { + m_icount -= 1; } - - // skip next instruction? - - if (m_skip) + else { - cop400_opcode_func function = m_opcode_map[ROM(PC)].function; - - opcode = ROM(PC); - - if ((function == INST(lqid)) || (function == INST(jid))) - { - m_icount -= 1; - } - else - { - m_icount -= m_opcode_map[opcode].cycles; - } + m_icount -= m_opcode_map[opcode].cycles; + } - PC += m_InstLen[opcode]; + PC += m_InstLen[opcode]; - m_skip = 0; - } + m_skip = 0; } } while (m_icount > 0); } @@ -1239,12 +1207,12 @@ void cop400_cpu_device::state_export(const device_state_entry &entry) } } -void cop400_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void cop400_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c", + strprintf(str, "%c%c%c", m_c ? 'C' : '.', m_skl ? 'S' : '.', m_skt_latch ? 'T' : '.'); diff --git a/src/emu/cpu/cop400/cop400.h b/src/emu/cpu/cop400/cop400.h index ada3d7d9e1a..5a53242754a 100644 --- a/src/emu/cpu/cop400/cop400.h +++ b/src/emu/cpu/cop400/cop400.h @@ -16,6 +16,43 @@ #ifndef __COP400__ #define __COP400__ +// i/o pins + +// L pins: 8-bit bi-directional +#define MCFG_COP400_READ_L_CB(_devcb) \ + cop400_cpu_device::set_read_l_callback(*device, DEVCB_##_devcb); +#define MCFG_COP400_WRITE_L_CB(_devcb) \ + cop400_cpu_device::set_write_l_callback(*device, DEVCB_##_devcb); + +// G pins: 4-bit bi-directional +#define MCFG_COP400_READ_G_CB(_devcb) \ + cop400_cpu_device::set_read_g_callback(*device, DEVCB_##_devcb); +#define MCFG_COP400_WRITE_G_CB(_devcb) \ + cop400_cpu_device::set_write_g_callback(*device, DEVCB_##_devcb); + +// D outputs: 4-bit general purpose output +#define MCFG_COP400_WRITE_D_CB(_devcb) \ + cop400_cpu_device::set_write_d_callback(*device, DEVCB_##_devcb); + +// IN inputs: 4-bit general purpose input +#define MCFG_COP400_READ_IN_CB(_devcb) \ + cop400_cpu_device::set_read_in_callback(*device, DEVCB_##_devcb); + +// SI/SO lines: serial in/out or counter/gen.purpose +#define MCFG_COP400_READ_SI_CB(_devcb) \ + cop400_cpu_device::set_read_si_callback(*device, DEVCB_##_devcb); +#define MCFG_COP400_WRITE_SO_CB(_devcb) \ + cop400_cpu_device::set_write_so_callback(*device, DEVCB_##_devcb); + +// SK output line: logic-controlled clock or gen.purpose +#define MCFG_COP400_WRITE_SK_CB(_devcb) \ + cop400_cpu_device::set_write_sk_callback(*device, DEVCB_##_devcb); + +// CKI/CKO lines: only CKO input here +#define MCFG_COP400_READ_CKO_CB(_devcb) \ + cop400_cpu_device::set_read_cko_callback(*device, DEVCB_##_devcb); + + /*************************************************************************** CONSTANTS ***************************************************************************/ @@ -44,20 +81,6 @@ enum COP400_GENSP = STATE_GENSP }; -/* special I/O space ports */ -enum -{ - COP400_PORT_L = 0x100, - COP400_PORT_G, - COP400_PORT_D, - COP400_PORT_H, - COP400_PORT_R, - COP400_PORT_IN, - COP400_PORT_SK, - COP400_PORT_SIO, - COP400_PORT_CKO -}; - /* input lines */ enum { @@ -112,6 +135,18 @@ public: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + // static configuration helpers + template<class _Object> static devcb_base &set_read_l_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_read_l.set_callback(object); } + template<class _Object> static devcb_base &set_write_l_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_write_l.set_callback(object); } + template<class _Object> static devcb_base &set_read_g_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_read_g.set_callback(object); } + template<class _Object> static devcb_base &set_write_g_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_write_g.set_callback(object); } + template<class _Object> static devcb_base &set_write_d_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_write_d.set_callback(object); } + template<class _Object> static devcb_base &set_read_in_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_read_in.set_callback(object); } + template<class _Object> static devcb_base &set_read_si_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_read_si.set_callback(object); } + template<class _Object> static devcb_base &set_write_so_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_write_so.set_callback(object); } + template<class _Object> static devcb_base &set_write_sk_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_write_sk.set_callback(object); } + template<class _Object> static devcb_base &set_read_cko_callback(device_t &device, _Object object) { return downcast<cop400_cpu_device &>(device).m_read_cko.set_callback(object); } + static void set_cki(device_t &device, cop400_cki_bond cki) { downcast<cop400_cpu_device &>(device).m_cki = cki; } static void set_cko(device_t &device, cop400_cko_bond cko) { downcast<cop400_cpu_device &>(device).m_cko = cko; } static void set_microbus(device_t &device, cop400_microbus microbus) { downcast<cop400_cpu_device &>(device).m_microbus = microbus; } @@ -132,14 +167,13 @@ protected: // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { - return (spacenum == AS_PROGRAM) ? &m_program_config : - ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) ); + return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); } // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } @@ -148,7 +182,18 @@ protected: address_space_config m_program_config; address_space_config m_data_config; - address_space_config m_io_config; + + // i/o handlers + devcb_read8 m_read_l; + devcb_write8 m_write_l; + devcb_read8 m_read_g; + devcb_write8 m_write_g; + devcb_write8 m_write_d; + devcb_read8 m_read_in; + devcb_read_line m_read_si; + devcb_write_line m_write_so; + devcb_write_line m_write_sk; + devcb_read_line m_read_cko; cop400_cki_bond m_cki; cop400_cko_bond m_cko; @@ -160,7 +205,6 @@ protected: address_space *m_program; direct_read_data *m_direct; address_space *m_data; - address_space *m_io; UINT8 m_featuremask; @@ -174,7 +218,7 @@ protected: UINT8 m_en; /* 4-bit enable register */ UINT8 m_g; /* 4-bit general purpose I/O port */ UINT8 m_q; /* 8-bit latch for L port */ - UINT16 m_sa, m_sb, m_sc; /* subroutine save registers (not present in COP440) */ + UINT16 m_sa, m_sb, m_sc; /* subroutine save registers (not present in COP440) */ UINT8 m_sio; /* 4-bit shift register and counter */ int m_skl; /* 1-bit latch for SK output */ UINT8 m_h; /* 4-bit general purpose I/O port (COP440 only) */ @@ -195,7 +239,6 @@ protected: /* skipping logic */ int m_skip; /* skip next instruction */ - int m_skip_lbi; /* skip until next non-LBI instruction */ int m_last_skip; /* last value of skip */ int m_halt; /* halt mode */ int m_idle; /* idle mode */ @@ -205,8 +248,6 @@ protected: /* execution logic */ int m_InstLen[256]; /* instruction length in bytes */ - int m_LBIops[256]; - int m_LBIops33[256]; int m_icount; /* instruction counter */ /* timers */ @@ -224,6 +265,7 @@ protected: }; const cop400_opcode_map *m_opcode_map; + cop400_opcode_func m_last_opcode_function; static const cop400_opcode_map COP410_OPCODE_23_MAP[]; static const cop400_opcode_map COP410_OPCODE_33_MAP[]; diff --git a/src/emu/cpu/cop400/cop400op.inc b/src/emu/cpu/cop400/cop400op.inc index 3be875f6fa7..421b1b17b6c 100644 --- a/src/emu/cpu/cop400/cop400op.inc +++ b/src/emu/cpu/cop400/cop400op.inc @@ -731,7 +731,7 @@ INSTRUCTION( xds ) A = t; Bd = ((B & 0x0f) - 1) & 0x0f; - B = (B & 0x30) | Bd; + B = (B & 0x70) | Bd; B = B ^ r; @@ -766,7 +766,7 @@ INSTRUCTION( xis ) A = t; Bd = ((B & 0x0f) + 1) & 0x0f; - B = (B & 0x30) | Bd; + B = (B & 0x70) | Bd; B = B ^ r; @@ -913,16 +913,19 @@ INSTRUCTION( cba ) INSTRUCTION( lbi ) { + if (m_last_opcode_function == INST(lbi)) + { + return; + } + if (opcode & 0x80) { - B = opcode & 0x3f; + B = opcode & 0x7f; } else { - B = (opcode & 0x70) | (((opcode & 0x0f) + 1) & 0x0f); + B = (opcode & 0x30) | (((opcode & 0x0f) + 1) & 0x0f); } - - m_skip_lbi = 1; } /* diff --git a/src/emu/cpu/cosmac/cosmac.c b/src/emu/cpu/cosmac/cosmac.c index 5afa7ec3e14..63747781f07 100644 --- a/src/emu/cpu/cosmac/cosmac.c +++ b/src/emu/cpu/cosmac/cosmac.c @@ -356,9 +356,9 @@ void cosmac_device::device_start() state_add(COSMAC_I, "I", m_i).mask(0xf); state_add(COSMAC_N, "N", m_n).mask(0xf); - astring tempstr; + std::string tempstr; for (int regnum = 0; regnum < 16; regnum++) - state_add(COSMAC_R0 + regnum, tempstr.format("R%x", regnum).c_str(), m_r[regnum]); + state_add(COSMAC_R0 + regnum, strformat(tempstr, "R%x", regnum).c_str(), m_r[regnum]); state_add(COSMAC_DF, "DF", m_df).mask(0x1).noshow(); state_add(COSMAC_IE, "IE", m_ie).mask(0x1).noshow(); @@ -472,12 +472,12 @@ void cosmac_device::state_export(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void cosmac_device::state_string_export(const device_state_entry &entry, astring &str) +void cosmac_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c", + strprintf(str, "%c%c%c", m_df ? 'D' : '.', m_ie ? 'I' : '.', m_q ? 'Q' : '.'); diff --git a/src/emu/cpu/cosmac/cosmac.h b/src/emu/cpu/cosmac/cosmac.h index f0b601dce02..897c4f027ed 100644 --- a/src/emu/cpu/cosmac/cosmac.h +++ b/src/emu/cpu/cosmac/cosmac.h @@ -235,7 +235,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/cp1610/cp1610.c b/src/emu/cpu/cp1610/cp1610.c index c2e905bb6fa..a52c795ede9 100644 --- a/src/emu/cpu/cp1610/cp1610.c +++ b/src/emu/cpu/cp1610/cp1610.c @@ -3427,12 +3427,12 @@ cp1610_cpu_device::cp1610_cpu_device(const machine_config &mconfig, const char * } -void cp1610_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void cp1610_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c", + strprintf(str, "%c%c%c%c", m_flags & 0x80 ? 'S':'.', m_flags & 0x40 ? 'Z':'.', m_flags & 0x20 ? 'V':'.', diff --git a/src/emu/cpu/cp1610/cp1610.h b/src/emu/cpu/cp1610/cp1610.h index 97a85fb86da..712378a20d3 100644 --- a/src/emu/cpu/cp1610/cp1610.h +++ b/src/emu/cpu/cp1610/cp1610.h @@ -64,7 +64,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.c b/src/emu/cpu/cubeqcpu/cubeqcpu.c index 10b21ec6c6e..d0bbe856df5 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.c +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.c @@ -345,12 +345,12 @@ void cquestrot_cpu_device::device_reset() } -void cquestrot_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void cquestrot_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c", m_cflag ? 'C' : '.', + strprintf(str, "%c%c%c", m_cflag ? 'C' : '.', m_vflag ? 'V' : '.', m_f ? '.' : 'Z'); break; @@ -469,12 +469,12 @@ void cquestlin_cpu_device::device_reset() } -void cquestlin_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void cquestlin_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c|%cG", m_cflag ? 'C' : '.', + strprintf(str, "%c%c%c|%cG", m_cflag ? 'C' : '.', m_vflag ? 'V' : '.', m_f ? '.' : 'Z', ( m_clkcnt & 3 ) ? 'B' : 'F'); diff --git a/src/emu/cpu/cubeqcpu/cubeqcpu.h b/src/emu/cpu/cubeqcpu/cubeqcpu.h index 677be9a4d43..ce19b86f559 100644 --- a/src/emu/cpu/cubeqcpu/cubeqcpu.h +++ b/src/emu/cpu/cubeqcpu/cubeqcpu.h @@ -230,7 +230,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 8; } @@ -314,7 +314,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 8; } diff --git a/src/emu/cpu/drcbex64.c b/src/emu/cpu/drcbex64.c index eb51d667b5e..64f2dd89bf0 100644 --- a/src/emu/cpu/drcbex64.c +++ b/src/emu/cpu/drcbex64.c @@ -654,7 +654,7 @@ drcbe_x64::drcbe_x64(drcuml_state &drcuml, device_t &device, drc_cache &cache, U // create the log if (device.machine().options().drc_log_native()) { - astring filename = astring("drcbex64_").cat(device.shortname()).cat(".asm"); + std::string filename = std::string("drcbex64_").append(device.shortname()).append(".asm"); m_log = x86log_create_context(filename.c_str()); } } @@ -787,7 +787,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3 x86code *dst = base; // generate code - astring tempstring; + std::string tempstring; const char *blockname = NULL; for (int inum = 0; inum < numinst; inum++) { @@ -797,7 +797,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3 // add a comment if (m_log != NULL) { - astring dasm; + std::string dasm; inst.disasm(dasm, &m_drcuml); x86log_add_comment(m_log, dst, "%s", dasm.c_str()); } @@ -808,7 +808,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3 if (inst.opcode() == OP_HANDLE) blockname = inst.param(0).handle().string(); else if (inst.opcode() == OP_HASH) - blockname = tempstring.format("Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str(); + blockname = strformat(tempstring, "Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str(); } // generate code diff --git a/src/emu/cpu/drcbex86.c b/src/emu/cpu/drcbex86.c index ca90329ac2d..b52ece2b0cc 100644 --- a/src/emu/cpu/drcbex86.c +++ b/src/emu/cpu/drcbex86.c @@ -568,7 +568,7 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, U // create the log if (device.machine().options().drc_log_native()) { - astring filename = astring("drcbex86_").cat(device.shortname()).cat(".asm"); + std::string filename = std::string("drcbex86_").append(device.shortname()).append(".asm"); m_log = x86log_create_context(filename.c_str()); } } @@ -770,7 +770,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3 x86code *dst = base; // generate code - astring tempstring; + std::string tempstring; const char *blockname = NULL; for (int inum = 0; inum < numinst; inum++) { @@ -780,7 +780,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3 // add a comment if (m_log != NULL) { - astring dasm; + std::string dasm; inst.disasm(dasm, &m_drcuml); x86log_add_comment(m_log, dst, "%s", dasm.c_str()); } @@ -791,7 +791,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3 if (inst.opcode() == OP_HANDLE) blockname = inst.param(0).handle().string(); else if (inst.opcode() == OP_HASH) - blockname = tempstring.format("Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str(); + blockname = strformat(tempstring, "Code: mode=%d PC=%08X", (UINT32)inst.param(0).immediate(), (offs_t)inst.param(1).immediate()).c_str(); } // generate code diff --git a/src/emu/cpu/drcuml.c b/src/emu/cpu/drcuml.c index 6d698e265b3..b7e3c3e0045 100644 --- a/src/emu/cpu/drcuml.c +++ b/src/emu/cpu/drcuml.c @@ -129,7 +129,7 @@ drcuml_state::drcuml_state(device_t &device, drc_cache &cache, UINT32 flags, int // if we're to log, create the logfile if (device.machine().options().drc_log_uml()) { - astring filename = astring("drcuml_").cat(m_device.shortname()).cat(".asm"); + std::string filename = std::string("drcuml_").append(m_device.shortname()).append(".asm"); m_umllog = fopen(filename.c_str(), "w"); } } @@ -386,14 +386,14 @@ uml::instruction &drcuml_block::append() void drcuml_block::append_comment(const char *format, ...) { // do the printf - astring temp; + std::string temp; va_list va; va_start(va, format); - temp.vprintf(format, va); + strvprintf(temp,format, va); va_end(va); // allocate space in the cache to hold the comment - char *comment = (char *)m_drcuml.cache().alloc_temporary(temp.len() + 1); + char *comment = (char *)m_drcuml.cache().alloc_temporary(temp.length() + 1); if (comment == NULL) return; strcpy(comment, temp.c_str()); @@ -457,8 +457,8 @@ void drcuml_block::optimize() void drcuml_block::disassemble() { - astring comment; - astring dasm; + std::string comment; + std::string dasm; // iterate over instructions and output int firstcomment = -1; @@ -520,15 +520,17 @@ void drcuml_block::disassemble() // associated with a comment or mapvar //------------------------------------------------- -const char *drcuml_block::get_comment_text(const instruction &inst, astring &comment) +const char *drcuml_block::get_comment_text(const instruction &inst, std::string &comment) { // comments return their strings if (inst.opcode() == OP_COMMENT) - return comment.cpy(inst.param(0).string()).c_str(); + return comment.assign(inst.param(0).string()).c_str(); // mapvars comment about their values - else if (inst.opcode() == OP_MAPVAR) - return comment.format("m%d = $%X", (int)inst.param(0).mapvar() - MAPVAR_M0, (UINT32)inst.param(1).immediate()).c_str(); + else if (inst.opcode() == OP_MAPVAR) { + strprintf(comment,"m%d = $%X", (int)inst.param(0).mapvar() - MAPVAR_M0, (UINT32)inst.param(1).immediate()); + return comment.c_str(); + } // everything else is NULL return NULL; diff --git a/src/emu/cpu/drcuml.h b/src/emu/cpu/drcuml.h index 98074e2424f..10652a224cc 100644 --- a/src/emu/cpu/drcuml.h +++ b/src/emu/cpu/drcuml.h @@ -121,7 +121,7 @@ private: // internal helpers void optimize(); void disassemble(); - const char *get_comment_text(const uml::instruction &inst, astring &comment); + const char *get_comment_text(const uml::instruction &inst, std::string &comment); // internal state drcuml_state & m_drcuml; // pointer back to the owning UML @@ -220,7 +220,7 @@ private: symbol * m_next; // link to the next symbol drccodeptr m_base; // base of the symbol UINT32 m_length; // length of the region covered - astring m_name; // name of the symbol + std::string m_name; // name of the symbol }; // internal state diff --git a/src/emu/cpu/dsp16/dsp16.c b/src/emu/cpu/dsp16/dsp16.c index 9520c125784..42913c5361d 100644 --- a/src/emu/cpu/dsp16/dsp16.c +++ b/src/emu/cpu/dsp16/dsp16.c @@ -212,26 +212,26 @@ const address_space_config *dsp16_device::memory_space_config(address_spacenum s // for the debugger //------------------------------------------------- -void dsp16_device::state_string_export(const device_state_entry &entry, astring &str) +void dsp16_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("(below)"); + strprintf(str, "(below)"); break; case DSP16_AUC: { - astring alignString; + std::string alignString; const UINT8 align = m_auc & 0x03; switch (align) { - case 0x00: alignString.printf("xy"); break; - case 0x01: alignString.printf("/4"); break; - case 0x02: alignString.printf("x4"); break; - case 0x03: alignString.printf(",,"); break; + case 0x00: strprintf(alignString,"xy"); break; + case 0x01: strprintf(alignString,"/4"); break; + case 0x02: strprintf(alignString,"x4"); break; + case 0x03: strprintf(alignString,",,"); break; } - str.printf("%c%c%c%c%c%s", + strprintf(str, "%c%c%c%c%c%s", m_auc & 0x40 ? 'Y':'.', m_auc & 0x20 ? '1':'.', m_auc & 0x10 ? '0':'.', @@ -242,7 +242,7 @@ void dsp16_device::state_string_export(const device_state_entry &entry, astring } case DSP16_PSW: - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", m_psw & 0x8000 ? 'M':'.', m_psw & 0x4000 ? 'E':'.', m_psw & 0x2000 ? 'L':'.', @@ -263,16 +263,16 @@ void dsp16_device::state_string_export(const device_state_entry &entry, astring case DSP16_PIOC: { - astring strobeString; + std::string strobeString; const UINT8 strobe = (m_pioc & 0x6000) >> 13; switch (strobe) { - case 0x00: strobeString.printf("1T"); break; - case 0x01: strobeString.printf("2T"); break; - case 0x02: strobeString.printf("3T"); break; - case 0x03: strobeString.printf("4T"); break; + case 0x00: strprintf(strobeString, "1T"); break; + case 0x01: strprintf(strobeString, "2T"); break; + case 0x02: strprintf(strobeString, "3T"); break; + case 0x03: strprintf(strobeString, "4T"); break; } - str.printf("%c%s%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%s%c%c%c%c%c%c%c%c%c%c%c%c%c", m_pioc & 0x8000 ? 'I':'.', strobeString.c_str(), m_pioc & 0x1000 ? 'O':'I', @@ -294,16 +294,16 @@ void dsp16_device::state_string_export(const device_state_entry &entry, astring // Placeholder for a better view later (TODO) case DSP16_SIOC: { - astring clkString; + std::string clkString; const UINT8 clk = (m_sioc & 0x0180) >> 7; switch (clk) { - case 0x00: clkString.printf("/4"); break; - case 0x01: clkString.printf("12"); break; - case 0x02: clkString.printf("16"); break; - case 0x03: clkString.printf("20"); break; + case 0x00: strprintf(clkString, "/4"); break; + case 0x01: strprintf(clkString, "12"); break; + case 0x02: strprintf(clkString, "16"); break; + case 0x03: strprintf(clkString, "20"); break; } - str.printf("%c%s%c%c%c%c%c%c%c", + strprintf(str, "%c%s%c%c%c%c%c%c%c", m_sioc & 0x0200 ? 'I':'O', clkString.c_str(), m_sioc & 0x0040 ? 'L':'M', diff --git a/src/emu/cpu/dsp16/dsp16.h b/src/emu/cpu/dsp16/dsp16.h index 56f800f9d4c..4d093ef010e 100644 --- a/src/emu/cpu/dsp16/dsp16.h +++ b/src/emu/cpu/dsp16/dsp16.h @@ -44,7 +44,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/dsp16/dsp16dis.c b/src/emu/cpu/dsp16/dsp16dis.c index 7db21ec7bf6..09d6e2d149a 100644 --- a/src/emu/cpu/dsp16/dsp16dis.c +++ b/src/emu/cpu/dsp16/dsp16dis.c @@ -1,34 +1,34 @@ #include "emu.h" #include "dsp16.h" -astring disasmF1Field(const UINT8& F1, const UINT8& D, const UINT8& S) +std::string disasmF1Field(const UINT8& F1, const UINT8& D, const UINT8& S) { - astring ret = ""; + std::string ret = ""; switch (F1) { - case 0x00: ret.printf("a%d = p, p = x*y", D); break; - case 0x01: ret.printf("a%d = a%d + p, p = x*y", D, S); break; - case 0x02: ret.printf("p = x*y"); break; - case 0x03: ret.printf("a%d = a%d - p, p = x*y", D, S); break; - case 0x04: ret.printf("a%d = p", D); break; - case 0x05: ret.printf("a%d = a%d + p", D, S); break; - case 0x06: ret.printf("NOP"); break; - case 0x07: ret.printf("a%d = a%d - p", D, S); break; - case 0x08: ret.printf("a%d = a%d | y", D, S); break; - case 0x09: ret.printf("a%d = a%d ^ y", D, S); break; - case 0x0a: ret.printf("a%d & y", S); break; - case 0x0b: ret.printf("a%d - y", S); break; - case 0x0c: ret.printf("a%d = y", D); break; - case 0x0d: ret.printf("a%d = a%d + y", D, S); break; - case 0x0e: ret.printf("a%d = a%d & y", D, S); break; - case 0x0f: ret.printf("a%d = a%d - y", D, S); break; + case 0x00: strprintf(ret, "a%d = p, p = x*y", D); break; + case 0x01: strprintf(ret, "a%d = a%d + p, p = x*y", D, S); break; + case 0x02: strprintf(ret, "p = x*y"); break; + case 0x03: strprintf(ret, "a%d = a%d - p, p = x*y", D, S); break; + case 0x04: strprintf(ret, "a%d = p", D); break; + case 0x05: strprintf(ret, "a%d = a%d + p", D, S); break; + case 0x06: strprintf(ret, "NOP"); break; + case 0x07: strprintf(ret, "a%d = a%d - p", D, S); break; + case 0x08: strprintf(ret, "a%d = a%d | y", D, S); break; + case 0x09: strprintf(ret, "a%d = a%d ^ y", D, S); break; + case 0x0a: strprintf(ret, "a%d & y", S); break; + case 0x0b: strprintf(ret, "a%d - y", S); break; + case 0x0c: strprintf(ret, "a%d = y", D); break; + case 0x0d: strprintf(ret, "a%d = a%d + y", D, S); break; + case 0x0e: strprintf(ret, "a%d = a%d & y", D, S); break; + case 0x0f: strprintf(ret, "a%d = a%d - y", D, S); break; default: return "UNKNOWN"; } return ret; } -astring disasmYField(const UINT8& Y) +std::string disasmYField(const UINT8& Y) { switch (Y) { @@ -58,7 +58,7 @@ astring disasmYField(const UINT8& Y) //return ""; } -astring disasmZField(const UINT8& Z) +std::string disasmZField(const UINT8& Z) { switch (Z) { @@ -88,35 +88,35 @@ astring disasmZField(const UINT8& Z) //return ""; } -astring disasmF2Field(const UINT8& F2, const UINT8& D, const UINT8& S) +std::string disasmF2Field(const UINT8& F2, const UINT8& D, const UINT8& S) { - astring ret = ""; + std::string ret = ""; switch (F2) { - case 0x00: ret.printf("a%d = a%d >> 1", D, S); break; - case 0x01: ret.printf("a%d = a%d << 1", D, S); break; - case 0x02: ret.printf("a%d = a%d >> 4", D, S); break; - case 0x03: ret.printf("a%d = a%d << 4", D, S); break; - case 0x04: ret.printf("a%d = a%d >> 8", D, S); break; - case 0x05: ret.printf("a%d = a%d << 8", D, S); break; - case 0x06: ret.printf("a%d = a%d >> 16", D, S); break; - case 0x07: ret.printf("a%d = a%d << 16", D, S); break; - - case 0x08: ret.printf("a%d = p", D); break; - case 0x09: ret.printf("a%dh = a%dh + 1", D, S); break; - case 0x0a: ret.printf("RESERVED"); break; - case 0x0b: ret.printf("a%d = rnd(a%d)", D, S); break; - case 0x0c: ret.printf("a%d = y", D); break; - case 0x0d: ret.printf("a%d = a%d + 1", D, S); break; - case 0x0e: ret.printf("a%d = a%d", D, S); break; - case 0x0f: ret.printf("a%d = -a%d", D, S); break; + case 0x00: strprintf(ret, "a%d = a%d >> 1", D, S); break; + case 0x01: strprintf(ret, "a%d = a%d << 1", D, S); break; + case 0x02: strprintf(ret, "a%d = a%d >> 4", D, S); break; + case 0x03: strprintf(ret, "a%d = a%d << 4", D, S); break; + case 0x04: strprintf(ret, "a%d = a%d >> 8", D, S); break; + case 0x05: strprintf(ret, "a%d = a%d << 8", D, S); break; + case 0x06: strprintf(ret, "a%d = a%d >> 16", D, S); break; + case 0x07: strprintf(ret, "a%d = a%d << 16", D, S); break; + + case 0x08: strprintf(ret, "a%d = p", D); break; + case 0x09: strprintf(ret, "a%dh = a%dh + 1", D, S); break; + case 0x0a: strprintf(ret, "RESERVED"); break; + case 0x0b: strprintf(ret, "a%d = rnd(a%d)", D, S); break; + case 0x0c: strprintf(ret, "a%d = y", D); break; + case 0x0d: strprintf(ret, "a%d = a%d + 1", D, S); break; + case 0x0e: strprintf(ret, "a%d = a%d", D, S); break; + case 0x0f: strprintf(ret, "a%d = -a%d", D, S); break; default: return "UNKNOWN"; } return ret; } -astring disasmCONField(const UINT8& CON) +std::string disasmCONField(const UINT8& CON) { switch (CON) { @@ -145,7 +145,7 @@ astring disasmCONField(const UINT8& CON) //return ""; } -astring disasmBField(const UINT8& B) +std::string disasmBField(const UINT8& B) { switch (B) { @@ -164,7 +164,7 @@ astring disasmBField(const UINT8& B) //return ""; } -astring disasmRImmediateField(const UINT8& R) +std::string disasmRImmediateField(const UINT8& R) { switch (R) { @@ -183,7 +183,7 @@ astring disasmRImmediateField(const UINT8& R) //return ""; } -astring disasmRField(const UINT8& R) +std::string disasmRField(const UINT8& R) { switch (R) { @@ -222,7 +222,7 @@ astring disasmRField(const UINT8& R) //return ""; } -astring disasmIField(const UINT8& I) +std::string disasmIField(const UINT8& I) { switch (I) { @@ -268,8 +268,8 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring yString = disasmYField(Y); - astring fString = disasmF1Field(F1, D, S); + std::string yString = disasmYField(Y); + std::string fString = disasmF1Field(F1, D, S); sprintf(buffer, "%s, %s", fString.c_str(), yString.c_str()); break; } @@ -281,10 +281,10 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring yString = disasmYField(Y); - astring fString = disasmF1Field(F1, D, S); - astring aString = (opcode == 0x1c) ? "a0" : "a1"; - astring xString = (X) ? "" : "l"; + std::string yString = disasmYField(Y); + std::string fString = disasmF1Field(F1, D, S); + std::string aString = (opcode == 0x1c) ? "a0" : "a1"; + std::string xString = (X) ? "" : "l"; sprintf(buffer, "%s = %s%s, %s", yString.c_str(), aString.c_str(), xString.c_str(), fString.c_str()); break; } @@ -295,8 +295,8 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring yString = disasmYField(Y); - astring fString = disasmF1Field(F1, D, S); + std::string yString = disasmYField(Y); + std::string fString = disasmF1Field(F1, D, S); sprintf(buffer, "%s, x = %s", fString.c_str(), yString.c_str()); break; } @@ -308,9 +308,9 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring yString = disasmYField(Y); - astring fString = disasmF1Field(F1, D, S); - astring xString = (X ? "y" : "y1"); + std::string yString = disasmYField(Y); + std::string fString = disasmF1Field(F1, D, S); + std::string xString = (X ? "y" : "y1"); sprintf(buffer, "%s, %s = %s", fString.c_str(), xString.c_str(), yString.c_str()); break; } @@ -322,9 +322,9 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring yString = disasmYField(Y); - astring fString = disasmF1Field(F1, D, S); - astring xString = (X ? "*pt++i" : "*pt++"); + std::string yString = disasmYField(Y); + std::string fString = disasmF1Field(F1, D, S); + std::string xString = (X ? "*pt++i" : "*pt++"); sprintf(buffer, "%s, y = %s, x = %s", fString.c_str(), yString.c_str(), xString.c_str()); break; } @@ -336,9 +336,9 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring fString = disasmF1Field(F1, D, S); - astring xString = (X ? "*pt++i" : "*pt++"); - astring aString = (opcode == 0x19) ? "a0" : "a1"; + std::string fString = disasmF1Field(F1, D, S); + std::string xString = (X ? "*pt++i" : "*pt++"); + std::string aString = (opcode == 0x19) ? "a0" : "a1"; sprintf(buffer, "%s, y = %s, x = %s", fString.c_str(), aString.c_str(), xString.c_str()); if (Y != 0x00) sprintf(buffer, "UNKNOWN"); break; @@ -351,9 +351,9 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring yString = disasmYField(Y); - astring xString = (X ? "y" : "y1"); - astring fString = disasmF1Field(F1, D, S); + std::string yString = disasmYField(Y); + std::string xString = (X ? "y" : "y1"); + std::string fString = disasmF1Field(F1, D, S); sprintf(buffer, "%s, %s = %s", fString.c_str(), yString.c_str(), xString.c_str()); break; } @@ -366,9 +366,9 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 aT = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring yString = disasmYField(Y); - astring atString = (aT ? "a0" : "a1"); - astring fString = disasmF1Field(F1, aT, S); + std::string yString = disasmYField(Y); + std::string atString = (aT ? "a0" : "a1"); + std::string fString = disasmF1Field(F1, aT, S); sprintf(buffer, "%s, %s = %s", fString.c_str(), atString.c_str(), yString.c_str()); break; } @@ -382,9 +382,9 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring zString = disasmZField(Z); - astring xString = (X ? "y" : "y1"); - astring fString = disasmF1Field(F1, D, S); + std::string zString = disasmZField(Z); + std::string xString = (X ? "y" : "y1"); + std::string fString = disasmF1Field(F1, D, S); sprintf(buffer, "%s, %s <=> %s", fString.c_str(), xString.c_str(), zString.c_str()); break; } @@ -396,9 +396,9 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring zString = disasmZField(Z); - astring xString = (X ? "*pt++i" : "*pt++"); - astring fString = disasmF1Field(F1, D, S); + std::string zString = disasmZField(Z); + std::string xString = (X ? "*pt++i" : "*pt++"); + std::string fString = disasmF1Field(F1, D, S); sprintf(buffer, "%s, %s <=> y, x = %s", fString.c_str(), zString.c_str(), xString.c_str()); break; } @@ -412,10 +412,10 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 aT = (op & 0x0400) >> 10; const UINT8 F1 = (op & 0x01e0) >> 5; - astring zString = disasmZField(Z); - astring atString = (aT ? "a0" : "a1"); + std::string zString = disasmZField(Z); + std::string atString = (aT ? "a0" : "a1"); atString += X ? "" : "1"; // TODO: Figure out unclear wording. - astring fString = disasmF1Field(F1, aT, S); + std::string fString = disasmF1Field(F1, aT, S); sprintf(buffer, "%s, %s <=> %s", fString.c_str(), zString.c_str(), atString.c_str()); break; } @@ -429,8 +429,8 @@ CPU_DISASSEMBLE( dsp16a ) const UINT8 S = (op & 0x0200) >> 9; const UINT8 D = (op & 0x0400) >> 10; const UINT8 F2 = (op & 0x01e0) >> 5; - astring fString = disasmF2Field(F2, D, S); - astring conString = disasmCONField(CON); + std::string fString = disasmF2Field(F2, D, S); + std::string conString = disasmCONField(CON); if (op & 0x0800) sprintf(buffer, "if %s : %s", conString.c_str(), fString.c_str()); else sprintf(buffer, "ifc %s : %s", conString.c_str(), fString.c_str()); break; @@ -457,7 +457,7 @@ CPU_DISASSEMBLE( dsp16a ) { // goto B const UINT8 B = (op & 0x0700) >> 8; - astring bString = disasmBField(B); + std::string bString = disasmBField(B); sprintf(buffer, "%s", bString.c_str()); break; } @@ -467,7 +467,7 @@ CPU_DISASSEMBLE( dsp16a ) { // if CON [goto/call/return] const UINT8 CON = (op & 0x001f); - astring conString = disasmCONField(CON); + std::string conString = disasmCONField(CON); sprintf(buffer, "if %s:", conString.c_str()); // TODO: Test for invalid ops // icall @@ -481,7 +481,7 @@ CPU_DISASSEMBLE( dsp16a ) // R = aS const UINT8 R = (op & 0x03f0) >> 4; const UINT8 S = (op & 0x1000) >> 12; - astring rString = disasmRField(R); + std::string rString = disasmRField(R); sprintf(buffer, "%s = %s", rString.c_str(), (S ? "a1" : "a0")); break; } @@ -490,7 +490,7 @@ CPU_DISASSEMBLE( dsp16a ) // aT = R const UINT8 R = (op & 0x03f0) >> 4; const UINT8 aT = (op & 0x0400) >> 10; - astring rString = disasmRField(R); + std::string rString = disasmRField(R); sprintf(buffer, "%s = %s", (aT ? "a0" : "a1"), rString.c_str()); break; } @@ -499,8 +499,8 @@ CPU_DISASSEMBLE( dsp16a ) // R = Y const UINT8 Y = (op & 0x000f); const UINT8 R = (op & 0x03f0) >> 4; - astring yString = disasmYField(Y); - astring rString = disasmRField(R); + std::string yString = disasmYField(Y); + std::string rString = disasmRField(R); sprintf(buffer, "%s = %s", rString.c_str(), yString.c_str()); // TODO: Special case the R == [y, y1, or x] case break; @@ -510,8 +510,8 @@ CPU_DISASSEMBLE( dsp16a ) // Y = R const UINT8 Y = (op & 0x000f); const UINT8 R = (op & 0x03f0) >> 4; - astring yString = disasmYField(Y); - astring rString = disasmRField(R); + std::string yString = disasmYField(Y); + std::string rString = disasmRField(R); // TODO: page 3-31 "special function encoding" sprintf(buffer, "%s = %s", yString.c_str(), rString.c_str()); break; @@ -521,8 +521,8 @@ CPU_DISASSEMBLE( dsp16a ) // Z : R const UINT8 Z = (op & 0x000f); const UINT8 R = (op & 0x03f0) >> 4; - astring zString = disasmZField(Z); - astring rString = disasmRField(R); + std::string zString = disasmZField(Z); + std::string rString = disasmRField(R); sprintf(buffer, "%s <=> %s", zString.c_str(), rString.c_str()); break; } @@ -532,7 +532,7 @@ CPU_DISASSEMBLE( dsp16a ) { // R = N const UINT8 R = (op & 0x03f0) >> 4; - astring rString = disasmRField(R); + std::string rString = disasmRField(R); sprintf(buffer, "%s = 0x%04x", rString.c_str(), op2); opSize = 2; break; @@ -544,7 +544,7 @@ CPU_DISASSEMBLE( dsp16a ) // R = M const UINT16 M = (op & 0x01ff); const UINT8 R = (op & 0x0e00) >> 9; - astring rString = disasmRImmediateField(R); + std::string rString = disasmRImmediateField(R); sprintf(buffer, "%s = 0x%04x", rString.c_str(), M); break; } diff --git a/src/emu/cpu/dsp32/dsp32.c b/src/emu/cpu/dsp32/dsp32.c index b41c9031c06..2de5e6f50d6 100644 --- a/src/emu/cpu/dsp32/dsp32.c +++ b/src/emu/cpu/dsp32/dsp32.c @@ -194,14 +194,14 @@ void dsp32c_device::device_start() m_direct = &m_program->direct(); // register our state for the debugger - astring tempstr; + std::string tempstr; state_add(STATE_GENPC, "GENPC", m_r[15]).noshow(); state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow(); state_add(STATE_GENSP, "GENSP", m_r[21]).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_iotemp).callimport().callexport().formatstr("%6s").noshow(); state_add(DSP32_PC, "PC", m_r[15]).mask(0xffffff); for (int regnum = 0; regnum <= 14; regnum++) - state_add(DSP32_R0 + regnum, tempstr.format("R%d", regnum).c_str(), m_r[regnum]).mask(0xffffff); + state_add(DSP32_R0 + regnum, strformat(tempstr, "R%d", regnum).c_str(), m_r[regnum]).mask(0xffffff); state_add(DSP32_R15, "R15", m_r[17]).mask(0xffffff); state_add(DSP32_R16, "R16", m_r[18]).mask(0xffffff); state_add(DSP32_R17, "R17", m_r[19]).mask(0xffffff); @@ -369,12 +369,12 @@ void dsp32c_device::state_export(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void dsp32c_device::state_string_export(const device_state_entry &entry, astring &str) +void dsp32c_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", NFLAG ? 'N':'.', ZFLAG ? 'Z':'.', UFLAG ? 'U':'.', @@ -389,7 +389,7 @@ void dsp32c_device::state_string_export(const device_state_entry &entry, astring case DSP32_A1: case DSP32_A2: case DSP32_A3: - str.printf("%8g", *(double *)entry.dataptr()); + strprintf(str, "%8g", *(double *)entry.dataptr()); break; } } diff --git a/src/emu/cpu/dsp32/dsp32.h b/src/emu/cpu/dsp32/dsp32.h index 643eef126b3..1ef1642f6c2 100644 --- a/src/emu/cpu/dsp32/dsp32.h +++ b/src/emu/cpu/dsp32/dsp32.h @@ -123,7 +123,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/dsp56k/dsp56k.c b/src/emu/cpu/dsp56k/dsp56k.c index bcdb2c85d32..2a5e94e135c 100644 --- a/src/emu/cpu/dsp56k/dsp56k.c +++ b/src/emu/cpu/dsp56k/dsp56k.c @@ -357,14 +357,14 @@ void dsp56k_device::device_start() } -void dsp56k_device::state_string_export(const device_state_entry &entry, astring &str) +void dsp56k_device::state_string_export(const device_state_entry &entry, std::string &str) { dsp56k_core *cpustate = &m_dsp56k_core; switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%s%s %s%s%s%s%s%s%s%s %s%s", + strprintf(str, "%s%s %s%s%s%s%s%s%s%s %s%s", /* Status Register */ LF_bit(cpustate) ? "L" : ".", FV_bit(cpustate) ? "F" : ".", @@ -384,19 +384,19 @@ void dsp56k_device::state_string_export(const device_state_entry &entry, astring break; case DSP56K_X: - str.printf("%04x %04x", X1, X0); + strprintf(str, "%04x %04x", X1, X0); break; case DSP56K_Y: - str.printf("%04x %04x", Y1, Y0); + strprintf(str, "%04x %04x", Y1, Y0); break; case DSP56K_A: - str.printf("%02x %04x %04x", A2, A1, A0); + strprintf(str, "%02x %04x %04x", A2, A1, A0); break; case DSP56K_B: - str.printf("%02x %04x %04x", B2, B1, B0); + strprintf(str, "%02x %04x %04x", B2, B1, B0); break; } } diff --git a/src/emu/cpu/dsp56k/dsp56k.h b/src/emu/cpu/dsp56k/dsp56k.h index cc2ea2b059f..c2fd831515d 100644 --- a/src/emu/cpu/dsp56k/dsp56k.h +++ b/src/emu/cpu/dsp56k/dsp56k.h @@ -232,7 +232,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/dsp56k/inst.h b/src/emu/cpu/dsp56k/inst.h index bad517ab171..fb9c55f89ad 100644 --- a/src/emu/cpu/dsp56k/inst.h +++ b/src/emu/cpu/dsp56k/inst.h @@ -29,7 +29,7 @@ public: virtual ~Instruction() {} virtual bool decode(const UINT16 word0, const UINT16 word1) = 0; - virtual void disassemble(astring& retString) const = 0; + virtual void disassemble(std::string& retString) const = 0; virtual void evaluate(dsp56k_core* cpustate) = 0; virtual size_t size() const = 0; @@ -77,7 +77,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "abs " + regIdAsString(m_destination); } @@ -100,7 +100,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "adc " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -123,7 +123,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "add " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -150,7 +150,7 @@ public: // TODO: m_opcode = "add"; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = m_opcode + " " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -159,8 +159,8 @@ public: size_t accumulatorBitsModified() const { return BM_HIGH | BM_MIDDLE | BM_LOW; } private: - astring m_opcode; - astring m_arg; // TODO: get rid of this Add|Sub thing. + std::string m_opcode; + std::string m_arg; // TODO: get rid of this Add|Sub thing. }; // AND : .... .... 0110 F1JJ : A-24 //////////////////////////////////////////// @@ -177,7 +177,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "and " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -201,11 +201,11 @@ public: decode_EE_table(BITSn(word0,0x0600), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "#$%x,%s", m_immediate, regIdAsString(m_destination).c_str()); - retString = "andi " + astring(temp); + retString = "andi " + std::string(temp); // NEW // sprintf(opcode_str, "and(i)"); } void evaluate(dsp56k_core* cpustate) {} @@ -229,7 +229,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "asl " + regIdAsString(m_destination); } @@ -251,7 +251,7 @@ public: decode_F_table(BITSn(word0,0x0008), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "asl4 " + regIdAsString(m_destination); } @@ -273,7 +273,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "asr " + regIdAsString(m_destination); } @@ -295,7 +295,7 @@ public: decode_F_table(BITSn(word0,0x0008), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "asr4 " + regIdAsString(m_destination); } @@ -317,7 +317,7 @@ public: decode_F_table(BITSn(word0,0x0008), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "asr16 " + regIdAsString(m_destination); } @@ -358,7 +358,7 @@ public: assemble_D_from_P_table(BITSn(word0,0x0020), BITSn(word0,0x001f), dString); - if (dString == "!!") + if (dString.compare("!!") == 0) return false; switch(BITSn(word1,0x1f00)) @@ -371,11 +371,11 @@ public: } return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "#$%x", m_iVal); - retString = m_opcode + " " + astring(temp) + "," + dString; + retString = m_opcode + " " + std::string(temp) + "," + dString; // NEW // sprintf(temp, "#$%04x", iVal); } void evaluate(dsp56k_core* cpustate) {} @@ -383,8 +383,8 @@ public: size_t accumulatorBitsModified() const { return BM_HIGH | BM_MIDDLE | BM_LOW; } private: UINT16 m_iVal; - astring m_opcode; - astring dString; + std::string m_opcode; + std::string dString; }; /* BFCHG : 0001 0100 101- --RR BBB1 0010 iiii iiii : A-38 */ @@ -432,14 +432,14 @@ public: } return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "#$%x", m_iVal); - astring source = temp; + std::string source = temp; sprintf(temp, "X:(%s)", regIdAsString(m_r).c_str()); - astring destination = temp; + std::string destination = temp; retString = m_opcode + " " + source + "," + destination; // NEW // sprintf(temp, "#$%04x", m_iVal); @@ -451,7 +451,7 @@ public: private: reg_id m_r; UINT16 m_iVal; - astring m_opcode; + std::string m_opcode; }; /* BFCHG : 0001 0100 100D DDDD BBB1 0010 iiii iiii : A-38 */ @@ -498,11 +498,11 @@ public: } return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "#$%x", m_iVal); - astring source = temp; + std::string source = temp; retString = m_opcode + " " + source + "," + regIdAsString(m_destination); // NEW // sprintf(temp, "#$%04x", m_iVal); @@ -513,7 +513,7 @@ public: private: UINT16 m_iVal; - astring m_opcode; + std::string m_opcode; }; // Bcc : 0000 0111 --11 cccc xxxx xxxx xxxx xxxx : A-48 //////////////////////// @@ -532,15 +532,15 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "b" + opMnemonicAsString(m_mnem); + std::string opcode = "b" + opMnemonicAsString(m_mnem); // NEW // sprintf(opcode_str, "b.%s", M); char temp[32]; sprintf(temp, ">*+$%x", 2 + m_immediate); // NEW // sprintf(temp, "$%04x (%d)", pc + 2 + (INT16)word1, (INT16)word1); - retString = opcode + " " + astring(temp); + retString = opcode + " " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -567,9 +567,9 @@ public: m_immediate = get_6_bit_signed_value(BITSn(word0,0x003f)); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "b" + opMnemonicAsString(m_mnem); + std::string opcode = "b" + opMnemonicAsString(m_mnem); // NEW // sprintf(opcode_str, "b.%s", M); char temp[32]; @@ -577,7 +577,7 @@ public: else sprintf(temp, "<*-$%x", 1 - m_immediate - 2); // NEW // sprintf(temp, "$%04x (%d)", pc + 1 + relativeInt, relativeInt); - retString = opcode + " " + astring(temp); + retString = opcode + " " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 1; } @@ -603,9 +603,9 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "b" + opMnemonicAsString(m_mnem); + std::string opcode = "b" + opMnemonicAsString(m_mnem); retString = opcode + " " + regIdAsString(m_destination); // NEW // sprintf(opcode_str, "b.%s", M); } @@ -631,12 +631,12 @@ public: m_immediate = (INT16)word1; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, ">*+$%x", 2 + m_immediate); // NEW // sprintf(temp, "$%04x (%d)", pc + 2 + word1, (INT16)word1); - retString = "bra " + astring(temp); + retString = "bra " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -660,13 +660,13 @@ public: m_immediate = (INT8)BITSn(word0,0x00ff); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; if (m_immediate >= 0) sprintf(temp, "<*+$%x", 1 + m_immediate); else sprintf(temp, "<*-$%x", 1 - m_immediate - 2); // NEW // sprintf(temp, "$%04x (%d)", pc + 1 + iVal, iVal); - retString = "bra " + astring(temp); + retString = "bra " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 1; } @@ -689,7 +689,7 @@ public: decode_RR_table(BITSn(word0,0x0003), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "bra " + regIdAsString(m_destination); } @@ -712,9 +712,9 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "brk" + opMnemonicAsString(m_mnem); + std::string opcode = "brk" + opMnemonicAsString(m_mnem); retString = opcode; // NEW // sprintf(opcode_str, "brk.%s", M); } @@ -742,9 +742,9 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "bs" + opMnemonicAsString(m_mnem); + std::string opcode = "bs" + opMnemonicAsString(m_mnem); // NEW // sprintf(opcode_str, "bs.%s", M); char temp[32]; @@ -752,7 +752,7 @@ public: else sprintf(temp, ">*-$%x", 1 - m_immediate - 1 - 2); //sprintf(temp, ">*+$%x", 2 + m_immediate); // NEW // sprintf(temp, "$%04x (%d)", pc + 2 + (INT16)word1, (INT16)word1); - retString = opcode + " " + astring(temp); + retString = opcode + " " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -779,9 +779,9 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "bs" + opMnemonicAsString(m_mnem); + std::string opcode = "bs" + opMnemonicAsString(m_mnem); retString = opcode + " " + regIdAsString(m_destination); // NEW // sprintf(opcode_str, "bs.%s", M); } @@ -808,13 +808,13 @@ public: m_immediate = (INT16)word1; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; if (m_immediate >= 0) sprintf(temp, ">*+$%x", 2 + m_immediate); else sprintf(temp, ">*-$%x", 1 - m_immediate - 1 - 2); // NEW // sprintf(temp, "$%04x (%d)", pc + 2 + (INT16)word1, (INT16)word1); - retString = "bsr " + astring(temp); + retString = "bsr " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -838,7 +838,7 @@ public: decode_RR_table(BITSn(word0,0x0003), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "bsr " + regIdAsString(m_destination); } @@ -860,7 +860,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "chkaau"; } @@ -882,7 +882,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "clr " + regIdAsString(m_destination); } @@ -904,7 +904,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "clr24 " + regIdAsString(m_destination); } @@ -929,7 +929,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "cmp " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -954,7 +954,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "cmpm " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -975,7 +975,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "debug"; } @@ -998,9 +998,9 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "debug" + opMnemonicAsString(m_mnem); + std::string opcode = "debug" + opMnemonicAsString(m_mnem); retString = opcode; // NEW // sprintf(opcode_str, "debug.%s", M); } @@ -1025,7 +1025,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "dec " + regIdAsString(m_destination); } @@ -1047,7 +1047,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "dec24 " + regIdAsString(m_destination); } @@ -1070,7 +1070,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "div " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -1098,9 +1098,9 @@ public: if (m_mnem == oINVALID) return false; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "dmac" + opMnemonicAsString(m_mnem); + std::string opcode = "dmac" + opMnemonicAsString(m_mnem); retString = opcode + " " + regIdAsString(m_source) + "," + @@ -1131,15 +1131,15 @@ public: decode_RR_table(BITSn(word0,0x0003), m_source); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "*+$%x", 2 + m_immediate); - astring destination = temp; + std::string destination = temp; // NEW // sprintf(temp, "X:(R%d),$%02x", Rnum, pc + 2 + word1); sprintf(temp, "X:(%s)", regIdAsString(m_source).c_str()); - astring source = temp; + std::string source = temp; retString = "do " + source + "," + destination; } @@ -1167,12 +1167,12 @@ public: m_displacement = word1; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "#<$%x,*+$%x", m_immediate, 2 + m_displacement); // NEW // sprintf(temp, "#$%02x,$%04x", BITSn(word0,0x00ff), pc + 2 + word1); - retString = "do " + astring(temp); + retString = "do " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -1201,12 +1201,12 @@ public: if (m_source == iINVALID) return false; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "*+$%x", 2 + m_displacement); // NEW // sprintf(temp, "%s,$%04x", S1, pc + 2 + word1); - retString = "do " + regIdAsString(m_source) + "," + astring(temp); + retString = "do " + regIdAsString(m_source) + "," + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -1230,13 +1230,13 @@ public: m_displacement = word1; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "*+$%x", m_displacement + 2); // NEW // sprintf(temp, "*+$%x", pc + word1); // NEW // sprintf(temp, "$%04x", pc + 2 + word1); - retString = "do forever, " + astring(temp); + retString = "do forever, " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -1258,7 +1258,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "enddo"; } @@ -1281,7 +1281,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "eor " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -1303,7 +1303,7 @@ public: decode_F_table(BITSn(word0,0x0008), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "ext " + regIdAsString(m_destination); } @@ -1324,7 +1324,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "illegal"; } @@ -1348,7 +1348,7 @@ public: m_source, m_source2, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "imac " + regIdAsString(m_source) + "," + @@ -1377,7 +1377,7 @@ public: m_source, m_source2, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "impy " + regIdAsString(m_source) + "," + @@ -1404,7 +1404,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "inc " + regIdAsString(m_destination); } @@ -1426,7 +1426,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "inc24 " + regIdAsString(m_destination); } @@ -1451,15 +1451,15 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "j" + opMnemonicAsString(m_mnem); + std::string opcode = "j" + opMnemonicAsString(m_mnem); // NEW // sprintf(opcode_str, "j.%s", M); char temp[32]; sprintf(temp, ">$%x", m_displacement); // NEW // sprintf(temp, "$%04x", word1); - retString = opcode + " " + astring(temp); + retString = opcode + " " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -1485,9 +1485,9 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "j" + opMnemonicAsString(m_mnem); + std::string opcode = "j" + opMnemonicAsString(m_mnem); retString = opcode + " " + regIdAsString(m_destination); // NEW // sprintf(opcode_str, "j.%s", M); } @@ -1513,12 +1513,12 @@ public: m_displacement = word1; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, ">$%x", m_displacement); // NEW // sprintf(temp, "$%04x", word1); - retString = "jmp " + astring(temp); + retString = "jmp " + std::string(temp); } void evaluate(dsp56k_core* cpustate) { @@ -1549,7 +1549,7 @@ public: decode_RR_table(BITSn(word0,0x0003), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "jmp " + regIdAsString(m_destination); } @@ -1584,15 +1584,15 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "js" + opMnemonicAsString(m_mnem); + std::string opcode = "js" + opMnemonicAsString(m_mnem); // NEW // sprintf(opcode_str, "js.%s", M); char temp[32]; sprintf(temp, ">$%x", m_displacement); // NEW // sprintf(temp, "$%04x", word1); - retString = opcode + " " + astring(temp); + retString = opcode + " " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -1619,9 +1619,9 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "js" + opMnemonicAsString(m_mnem); + std::string opcode = "js" + opMnemonicAsString(m_mnem); retString = opcode + " " + regIdAsString(m_destination); // NEW // sprintf(opcode_str, "js.%s", M); } @@ -1648,12 +1648,12 @@ public: m_displacement = word1; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, ">$%x", m_displacement); // NEW // sprintf(temp, "$%04x", word1); - retString = "jsr " + astring(temp); + retString = "jsr " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 2; } @@ -1678,12 +1678,12 @@ public: m_bAddr = BITSn(word0,0x00ff); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "<$%x", m_bAddr); // NEW // sprintf(temp, "#$%02x", BITSn(word0,0x00ff)); - retString = "jsr " + astring(temp); + retString = "jsr " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 1; } @@ -1707,7 +1707,7 @@ public: decode_RR_table(BITSn(word0,0x0003), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "jsr " + regIdAsString(m_destination); } @@ -1737,7 +1737,7 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { // HACK retString = "lea " + m_ea + "," + regIdAsString(m_destination); @@ -1747,7 +1747,7 @@ public: size_t accumulatorBitsModified() const { return BM_HIGH | BM_MIDDLE | BM_LOW; } private: - astring m_ea; + std::string m_ea; }; // LEA : 0000 0001 10NN MMRR : A-116 /////////////////////////////////////////// @@ -1769,7 +1769,7 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { // HACK retString = "lea " + m_ea + "," + regIdAsString(m_destination); @@ -1779,7 +1779,7 @@ public: size_t accumulatorBitsModified() const { return BM_HIGH | BM_MIDDLE | BM_LOW; } private: - astring m_ea; + std::string m_ea; }; // LSL : .... .... 0011 F011 : A-118 /////////////////////////////////////////// @@ -1795,7 +1795,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "lsl " + regIdAsString(m_destination); } @@ -1817,7 +1817,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "lsr " + regIdAsString(m_destination); } @@ -1844,10 +1844,10 @@ public: decode_kSign_table(BITSn(word0,0x40), m_sign); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring ts = m_sign; - if (ts != "-") ts = ""; + std::string ts = m_sign; + if (ts.compare("-") != 0) ts = ""; retString = "mac " + ts + regIdAsString(m_source) + "," + @@ -1859,7 +1859,7 @@ public: private: reg_id m_source2; - astring m_sign; + std::string m_sign; }; // MAC : 011m mKKK 1xx0 F1QQ : A-122 /////////////////////////////////////////// @@ -1877,7 +1877,7 @@ public: m_source, m_source2, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "mac " + regIdAsString(m_source) + "," + @@ -1906,7 +1906,7 @@ public: m_source, m_source2, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "mac " + regIdAsString(m_source) + "," + @@ -1938,10 +1938,10 @@ public: decode_kSign_table(BITSn(word0,0x40), m_sign); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring ts = m_sign; - if (ts != "-") ts = ""; + std::string ts = m_sign; + if (ts.compare("-") != 0) ts = ""; retString = "macr " + ts + regIdAsString(m_source) + "," + @@ -1952,7 +1952,7 @@ public: size_t accumulatorBitsModified() const { return BM_HIGH | BM_MIDDLE | BM_LOW; } private: - astring m_sign; + std::string m_sign; reg_id m_source2; }; @@ -1971,7 +1971,7 @@ public: m_source, m_source2, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "macr " + regIdAsString(m_source) + "," + @@ -2004,9 +2004,9 @@ public: decode_s_table(BITSn(word0,0x0004), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "mac" + opMnemonicAsString(m_mnem); + std::string opcode = "mac" + opMnemonicAsString(m_mnem); retString = opcode + " " + regIdAsString(m_source) + "," + @@ -2049,7 +2049,7 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { if (m_isNop) retString = "nop"; @@ -2083,7 +2083,7 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "move"; } @@ -2110,10 +2110,10 @@ public: decode_HHH_table(BITSn(word1,0x0e00), m_SD); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_reg_from_W_table(m_W, 'X', m_SD, m_b, source, destination); retString = "move " + source + "," + destination; } @@ -2148,10 +2148,10 @@ public: if (m_SD == iINVALID) return false; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_arguments_from_W_table(m_W, 'X', m_SD, m_ea, source, destination); retString = "move " + source + "," + destination; // NEW // sprintf(opcode_str, "move(c)"); @@ -2163,7 +2163,7 @@ public: private: INT8 m_W; reg_id m_SD; - astring m_ea; + std::string m_ea; }; // MOVE(C) : 0011 1WDD DDD1 q0RR : A-144 /////////////////////////////////////// @@ -2187,10 +2187,10 @@ public: if (m_SD == iINVALID) return false; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_arguments_from_W_table(m_W, 'X', m_SD, m_ea, source, destination); retString = "move " + source + "," + destination; // NEW // sprintf(opcode_str, "move(c)"); @@ -2202,7 +2202,7 @@ public: private: INT8 m_W; reg_id m_SD; - astring m_ea; + std::string m_ea; }; // MOVE(C) : 0011 1WDD DDD1 Z11- : A-144 /////////////////////////////////////// @@ -2225,10 +2225,10 @@ public: if (m_SD == iINVALID) return false; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_arguments_from_W_table(m_W, 'X', m_SD, m_ea, source, destination); retString = "move " + source + "," + destination; // NEW // sprintf(opcode_str, "move(c)"); @@ -2240,7 +2240,7 @@ public: private: INT8 m_W; reg_id m_SD; - astring m_ea; + std::string m_ea; }; // MOVE(C) : 0011 1WDD DDD1 t10- xxxx xxxx xxxx xxxx : A-144 /////////////////// @@ -2269,9 +2269,9 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring ea; + std::string ea; assemble_ea_from_t_table(m_t, m_value, ea); retString = "move "; @@ -2339,7 +2339,7 @@ public: if (m_source == iSSH && m_destination == iSSH) return false; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "move " + regIdAsString(m_source) + "," + regIdAsString(m_destination); // NEW // sprintf(opcode_str, "move(c)"); @@ -2368,10 +2368,10 @@ public: decode_DDDDD_table(BITSn(word1,0x03e0), m_SD); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_reg_from_W_table(m_W, 'X', m_SD, m_b, source, destination); retString = "move " + source + "," + destination; // NEW // opcode = "move(c)"; @@ -2402,7 +2402,7 @@ public: decode_DD_table(BITSn(word0,0x0300), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; if (m_immediate >= 0) sprintf(temp, "#<+$%x", m_immediate); @@ -2410,7 +2410,7 @@ public: // NEW // sprintf(temp, "#$%02x,%s", BITSn(word0,0x00ff), D1); retString = "move " + - astring(temp) + "," + regIdAsString(m_destination); + std::string(temp) + "," + regIdAsString(m_destination); // NEW // sprintf(opcode_str, "move(i)"); } void evaluate(dsp56k_core* cpustate) {} @@ -2441,10 +2441,10 @@ public: m_W = BITSn(word0,0x0100); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_arguments_from_W_table(m_W, 'P', m_SD, m_ea, source, destination); retString = "move " + source + "," + destination; // NEW // sprintf(opcode_str, "move(m)"); @@ -2456,7 +2456,7 @@ public: private: INT8 m_W; reg_id m_SD; - astring m_ea; + std::string m_ea; }; // MOVE(M) : 0000 001W RR11 mmRR : A-152 /////////////////////////////////////// @@ -2476,10 +2476,10 @@ public: assemble_eas_from_mm_table(BITSn(word0,0x000c), BITSn(word0,0x00c0), BITSn(word0,0x0003), m_ea, m_ea2); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; if (m_W) { source = "X:" + m_ea; @@ -2499,8 +2499,8 @@ public: private: UINT8 m_W; - astring m_ea; - astring m_ea2; + std::string m_ea; + std::string m_ea2; }; // MOVE(M) : 0000 0101 BBBB BBBB 0000 001W --0- -HHH : A-152 /////////////////// @@ -2521,10 +2521,10 @@ public: decode_HHH_table(BITSn(word1,0x0007), m_SD); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_reg_from_W_table(m_W, 'P', m_SD, m_b, source, destination); retString = "move " + source + "," + destination; // NEW // opcode = "move(m)"; @@ -2561,10 +2561,10 @@ public: m_W = BITSn(word0,0x0100); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_arguments_from_W_table(m_W, 'X', m_SD, m_ea, source, destination); retString = "movep " + source + "," + destination; // NEW // sprintf(opcode_str, "move(p)"); @@ -2576,7 +2576,7 @@ public: private: INT8 m_W; reg_id m_SD; - astring m_ea; + std::string m_ea; }; // MOVE(P) : 0000 110W RRmp pppp : A-156 /////////////////////////////////////// @@ -2596,7 +2596,7 @@ public: assemble_ea_from_m_table(BITSn(word0,0x0020), rNum, m_ea); - astring fullAddy; /* Convert Short Absolute Address to full 16-bit */ + std::string fullAddy; /* Convert Short Absolute Address to full 16-bit */ assemble_address_from_IO_short_address(BITSn(word0,0x001f), fullAddy); m_W = BITSn(word0,0x0100); @@ -2604,10 +2604,10 @@ public: // NEW // sprintf(SD, "X:$%s", fullAddy); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_arguments_from_W_table(m_W, 'X', m_SD, m_ea, source, destination); retString = "movep " + source + "," + destination; // NEW // sprintf(opcode_str, "move(p)*"); @@ -2618,8 +2618,8 @@ public: private: INT8 m_W; - astring m_SD; - astring m_ea; + std::string m_SD; + std::string m_ea; }; // MOVE(S) : 0001 100W HH0a aaaa : A-158 /////////////////////////////////////// @@ -2644,10 +2644,10 @@ public: m_W = BITSn(word0,0x0100); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source; - astring destination; + std::string source; + std::string destination; assemble_arguments_from_W_table(m_W, 'X', m_SD, m_ea, source, destination); retString = "moves " + source + "," + destination; // NEW // sprintf(opcode_str, "move(s)"); @@ -2659,7 +2659,7 @@ public: private: INT8 m_W; reg_id m_SD; - astring m_ea; + std::string m_ea; }; // MPY : .... .... 1k00 FQQQ : A-160 /////////////////////////////////////////// @@ -2682,10 +2682,10 @@ public: decode_kSign_table(BITSn(word0,0x40), m_sign); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring ts = m_sign; - if (ts != "-") ts = ""; + std::string ts = m_sign; + if (ts.compare("-")!=0) ts = ""; retString = "mpy " + ts + regIdAsString(m_source) + "," + @@ -2696,7 +2696,7 @@ public: size_t accumulatorBitsModified() const { return BM_HIGH | BM_MIDDLE | BM_LOW; } private: - astring m_sign; + std::string m_sign; reg_id m_source2; }; @@ -2715,7 +2715,7 @@ public: m_source, m_source2, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "mpy " + regIdAsString(m_source) + "," + @@ -2744,7 +2744,7 @@ public: m_source, m_source2, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "mpy " + regIdAsString(m_source) + "," + @@ -2778,10 +2778,10 @@ public: decode_kSign_table(BITSn(word0,0x40), m_sign); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring ts = m_sign; - if (ts != "-") ts = ""; + std::string ts = m_sign; + if (ts.compare("-") != 0) ts = ""; retString = "mpyr " + ts + regIdAsString(m_source) + "," + @@ -2792,7 +2792,7 @@ public: size_t accumulatorBitsModified() const { return BM_HIGH | BM_MIDDLE | BM_LOW; } private: - astring m_sign; + std::string m_sign; reg_id m_source2; }; @@ -2811,7 +2811,7 @@ public: m_source, m_source2, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "mpyr " + regIdAsString(m_source) + "," + @@ -2843,9 +2843,9 @@ public: decode_s_table(BITSn(word0,0x0004), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "mpy" + opMnemonicAsString(m_mnem); + std::string opcode = "mpy" + opMnemonicAsString(m_mnem); retString = opcode + " " + regIdAsString(m_source) + "," + @@ -2874,7 +2874,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "neg " + regIdAsString(m_destination); } @@ -2896,7 +2896,7 @@ public: decode_F_table(BITSn(word0,0x0008), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "negc " + regIdAsString(m_destination); } @@ -2917,7 +2917,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "nop"; } @@ -2941,7 +2941,7 @@ public: decode_RR_table(BITSn(word0,0x0003), m_source); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "norm " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -2963,7 +2963,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "not " + regIdAsString(m_destination); } @@ -2986,7 +2986,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "or " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -3010,12 +3010,12 @@ public: decode_EE_table(BITSn(word0,0x0600), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "#$%x", m_immediate); // NEW // sprintf(temp, "#$%02x", BITSn(word0,0x00ff)); - retString = "ori " + astring(temp) + "," + regIdAsString(m_destination); + retString = "ori " + std::string(temp) + "," + regIdAsString(m_destination); // NEW // sprintf(opcode_str, "or(i)"); } void evaluate(dsp56k_core* cpustate) {} @@ -3039,11 +3039,11 @@ public: decode_RR_table(BITSn(word0,0x0003), m_source); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "X:(%s)", regIdAsString(m_source).c_str()); - retString = "rep " + astring(temp); + retString = "rep " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 1; } @@ -3064,12 +3064,12 @@ public: m_immediate = BITSn(word0,0x00ff); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { char temp[32]; sprintf(temp, "#$%x", m_immediate); // NEW // sprintf(temp, "#$%02x (%d)", BITSn(word0,0x00ff), BITSn(word0,0x00ff)); - retString = "rep " + astring(temp); + retString = "rep " + std::string(temp); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 1; } @@ -3093,7 +3093,7 @@ public: if (m_source == iINVALID) return false; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "rep " + regIdAsString(m_source); } @@ -3116,9 +3116,9 @@ public: decode_cccc_table(BITSn(word0,0x000f), m_mnem); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "rep" + opMnemonicAsString(m_mnem); + std::string opcode = "rep" + opMnemonicAsString(m_mnem); retString = opcode; // NEW // sprintf(opcode_str, "rep.%s", M); } @@ -3142,7 +3142,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "reset"; } @@ -3164,7 +3164,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "rnd " + regIdAsString(m_destination); } @@ -3186,7 +3186,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "rol " + regIdAsString(m_destination); } @@ -3208,7 +3208,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "ror " + regIdAsString(m_destination); } @@ -3229,7 +3229,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "rti"; } @@ -3251,7 +3251,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "rts"; } @@ -3275,7 +3275,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "sbc " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -3296,7 +3296,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "stop"; } @@ -3319,7 +3319,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "sub " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -3345,7 +3345,7 @@ public: // TODO // m_opcode = "sub"; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = m_opcode + " " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -3354,7 +3354,7 @@ public: size_t accumulatorBitsModified() const { return BM_HIGH | BM_MIDDLE | BM_LOW; } private: - astring m_opcode; + std::string m_opcode; }; // SUBL : .... .... 0100 F001 : A-204 ////////////////////////////////////////// @@ -3380,7 +3380,7 @@ public: } return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "subl " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -3402,7 +3402,7 @@ public: decode_F_table(BITSn(word0,0x0008), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "swap " + regIdAsString(m_destination); } @@ -3423,7 +3423,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "swi"; } @@ -3457,17 +3457,17 @@ public: return false; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring opcode = "t" + opMnemonicAsString(m_mnem); + std::string opcode = "t" + opMnemonicAsString(m_mnem); // NEW // sprintf(opcode_str, "t.%s", M); retString = opcode; if (m_source != m_destination) - retString += astring(" ") + regIdAsString(m_source) + "," + regIdAsString(m_destination); + retString += std::string(" ") + regIdAsString(m_source) + "," + regIdAsString(m_destination); if (m_destination2 != iR0) - retString += astring(" R0,") + regIdAsString(m_destination2); + retString += std::string(" R0,") + regIdAsString(m_destination2); } void evaluate(dsp56k_core* cpustate) {} size_t size() const { return 1; } @@ -3492,7 +3492,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "tfr " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -3515,7 +3515,7 @@ public: m_source, m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "tfr " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -3538,7 +3538,7 @@ public: m_destination, m_source); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "tfr2 " + regIdAsString(m_source) + "," + regIdAsString(m_destination); } @@ -3575,10 +3575,10 @@ public: m_W = BITSn(word0,0x0100); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { - astring source2; - astring destination2; + std::string source2; + std::string destination2; assemble_arguments_from_W_table(m_W, 'X', m_SD, m_ea, source2, destination2); retString = "tfr3 " + regIdAsString(m_source) + "," + regIdAsString(m_destination) + " " + @@ -3591,7 +3591,7 @@ public: private: INT8 m_W; reg_id m_SD; - astring m_ea; + std::string m_ea; reg_id m_source2; reg_id m_destination2; }; @@ -3609,7 +3609,7 @@ public: decode_F_table(BITSn(word0,0x08), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "tst " + regIdAsString(m_destination); } @@ -3631,7 +3631,7 @@ public: decode_DD_table(BITSn(word0,0x0003), m_source); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "tst2 " + regIdAsString(m_source); } @@ -3652,7 +3652,7 @@ public: { return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "wait"; } @@ -3674,7 +3674,7 @@ public: decode_F_table(BITSn(word0,0x0008), m_destination); return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "zero " + regIdAsString(m_destination); } @@ -3713,7 +3713,7 @@ public: } return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "shfl " + regIdAsString(m_source) + "," + @@ -3757,7 +3757,7 @@ public: } return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = "shfr " + regIdAsString(m_source) + "," + diff --git a/src/emu/cpu/dsp56k/opcode.c b/src/emu/cpu/dsp56k/opcode.c index 58ade2b7b30..7943736580c 100644 --- a/src/emu/cpu/dsp56k/opcode.c +++ b/src/emu/cpu/dsp56k/opcode.c @@ -16,7 +16,7 @@ Opcode::~Opcode() } -astring Opcode::disassemble() const +std::string Opcode::disassemble() const { // Duck out early if there isn't a valid op if (!m_instruction) @@ -29,8 +29,8 @@ astring Opcode::disassemble() const return dcString(); // Disassemble what you can. - astring opString = ""; - astring pmString = ""; + std::string opString = ""; + std::string pmString = ""; if (m_instruction) m_instruction->disassemble(opString); if (m_parallelMove) m_parallelMove->disassemble(pmString); @@ -68,11 +68,11 @@ const reg_id& Opcode::instSource() const { return m_instruction->source(); } const reg_id& Opcode::instDestination() const { return m_instruction->destination(); } const size_t Opcode::instAccumulatorBitsModified() const { return m_instruction->accumulatorBitsModified(); } -astring Opcode::dcString() const +std::string Opcode::dcString() const { char tempStr[1024]; sprintf(tempStr, "dc $%x", m_word0); - return astring(tempStr); + return std::string(tempStr); } } diff --git a/src/emu/cpu/dsp56k/opcode.h b/src/emu/cpu/dsp56k/opcode.h index da6a8a87d1b..b258c0241a6 100644 --- a/src/emu/cpu/dsp56k/opcode.h +++ b/src/emu/cpu/dsp56k/opcode.h @@ -21,7 +21,7 @@ public: Opcode(UINT16 w0, UINT16 w1); virtual ~Opcode(); - astring disassemble() const; + std::string disassemble() const; void evaluate(dsp56k_core* cpustate) const; size_t size() const; size_t evalSize() const; @@ -38,7 +38,7 @@ private: UINT16 m_word0; //UINT16 m_word1; - astring dcString() const; + std::string dcString() const; }; } diff --git a/src/emu/cpu/dsp56k/pmove.h b/src/emu/cpu/dsp56k/pmove.h index 2a475975542..16c9de1a555 100644 --- a/src/emu/cpu/dsp56k/pmove.h +++ b/src/emu/cpu/dsp56k/pmove.h @@ -19,7 +19,7 @@ public: virtual ~ParallelMove() {} virtual bool decode(const UINT16 word0, const UINT16 word1) = 0; - virtual void disassemble(astring& retString) const = 0; + virtual void disassemble(std::string& retString) const = 0; virtual void evaluate() = 0; static ParallelMove* decodeParallelMove(const Opcode* opc, const UINT16 word0, const UINT16 word1); @@ -57,7 +57,7 @@ public: reg_id SD; decode_HHH_table(BITSn(word0,0x0e00), SD); - astring ea; + std::string ea; assemble_ea_from_m_table(BITSn(word0,0x4000), regIDAsNum(r), ea); assemble_arguments_from_W_table(BITSn(word0,0x0100), 'X', SD, ea, @@ -69,15 +69,15 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = m_source + "," + m_destination; } void evaluate() {} private: - astring m_source; - astring m_destination; + std::string m_source; + std::string m_destination; }; @@ -91,7 +91,7 @@ public: } bool decode(const UINT16 word0, const UINT16 word1) { - astring ea; + std::string ea; if (opDestination() == iB) ea = "(A1)"; else if (opDestination() == iA) @@ -111,15 +111,15 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = m_source + "," + m_destination; } void evaluate() {} private: - astring m_source; - astring m_destination; + std::string m_source; + std::string m_destination; }; @@ -136,8 +136,8 @@ public: reg_id r; reg_id D1; reg_id D2; - astring ea1 = ""; - astring ea2 = ""; + std::string ea1 = ""; + std::string ea2 = ""; decode_rr_table(BITSn(word0,0x0060), r); decode_KKK_table(BITSn(word0,0x0700), D1, D2); @@ -165,15 +165,15 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = parallelMove + " " + parallelMove2; } void evaluate() {} private: - astring parallelMove; - astring parallelMove2; + std::string parallelMove; + std::string parallelMove2; }; @@ -212,7 +212,7 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { // (?,?) is a parallel nop if (m_source == iWEIRD && m_destination == iWEIRD) @@ -259,15 +259,15 @@ public: pms2 = parallel_move_str2; return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = pms + " " + pms2; } void evaluate() {} private: - astring pms; // TODO - astring pms2; + std::string pms; // TODO + std::string pms2; }; @@ -288,14 +288,14 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = m_ea; } void evaluate() {} private: - astring m_ea; + std::string m_ea; }; @@ -313,7 +313,7 @@ public: { INT8 b; reg_id SD; - astring args; + std::string args; b = (char)(word0 & 0x00ff); decode_HHH_table(BITSn(word1,0x0e00), SD); @@ -321,15 +321,15 @@ public: return true; } - void disassemble(astring& retString) const + void disassemble(std::string& retString) const { retString = m_source + "," + m_destination; } void evaluate() {} private: - astring m_source; - astring m_destination; + std::string m_source; + std::string m_destination; }; } diff --git a/src/emu/cpu/dsp56k/tables.c b/src/emu/cpu/dsp56k/tables.c index 36af446cb96..a7db21acf44 100644 --- a/src/emu/cpu/dsp56k/tables.c +++ b/src/emu/cpu/dsp56k/tables.c @@ -283,7 +283,7 @@ void decode_JF_table(const UINT16 J, const UINT16 F, reg_id& S, reg_id& D) // NEW // } // NEW // } -void decode_kSign_table(const UINT16 k, astring& plusMinus) +void decode_kSign_table(const UINT16 k, std::string& plusMinus) { switch(k) { @@ -431,7 +431,7 @@ void decode_ss_table(const UINT16 ss, op_mnem& arithmetic) } } -void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, astring& arg, reg_id& S, reg_id& D) +void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, std::string& arg, reg_id& S, reg_id& D) { const UINT16 switchVal = (uuuu << 1) | F; @@ -473,7 +473,7 @@ void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, astring& arg, reg_id& } } -void decode_Z_table(const UINT16 Z, astring& ea) +void decode_Z_table(const UINT16 Z, std::string& ea) { /* This is fixed as per the Family Manual errata addendum */ switch(Z) @@ -483,7 +483,7 @@ void decode_Z_table(const UINT16 Z, astring& ea) } } -void assemble_ea_from_m_table(const UINT16 m, const int n, astring& ea) +void assemble_ea_from_m_table(const UINT16 m, const int n, std::string& ea) { char temp[32]; switch(m) @@ -494,7 +494,7 @@ void assemble_ea_from_m_table(const UINT16 m, const int n, astring& ea) ea = temp; } -void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, astring& ea1, astring& ea2) +void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, std::string& ea1, std::string& ea2) { char temp1[32]; char temp2[32]; @@ -513,7 +513,7 @@ void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, astring& ea1, astring ea2 = temp2; } -void assemble_ea_from_MM_table(UINT16 MM, int n, astring& ea) +void assemble_ea_from_MM_table(UINT16 MM, int n, std::string& ea) { char temp[32]; switch(MM) @@ -526,7 +526,7 @@ void assemble_ea_from_MM_table(UINT16 MM, int n, astring& ea) ea = temp; } -void assemble_ea_from_q_table(UINT16 q, int n, astring& ea) +void assemble_ea_from_q_table(UINT16 q, int n, std::string& ea) { char temp[32]; switch(q) @@ -537,7 +537,7 @@ void assemble_ea_from_q_table(UINT16 q, int n, astring& ea) ea = temp; } -void assemble_ea_from_t_table(UINT16 t, UINT16 val, astring& ea) +void assemble_ea_from_t_table(UINT16 t, UINT16 val, std::string& ea) { char temp[32]; switch(t) @@ -550,7 +550,7 @@ void assemble_ea_from_t_table(UINT16 t, UINT16 val, astring& ea) ea = temp; } -void assemble_ea_from_z_table(UINT16 z, int n, astring& ea) +void assemble_ea_from_z_table(UINT16 z, int n, std::string& ea) { char temp[32]; switch(z) @@ -561,10 +561,10 @@ void assemble_ea_from_z_table(UINT16 z, int n, astring& ea) ea = temp; } -void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, astring& D) +void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, std::string& D) { char temp[32]; - astring fullAddy; /* Convert Short Absolute Address to full 16-bit */ + std::string fullAddy; /* Convert Short Absolute Address to full 16-bit */ switch(P) { @@ -581,8 +581,8 @@ void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, astring& D) D = temp; } -void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const astring& ea, - astring& source, astring& destination) +void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const std::string& ea, + std::string& source, std::string& destination) { char temp[32]; sprintf(temp, "%c:%s", ma, ea.c_str()); @@ -593,8 +593,8 @@ void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const } } -void assemble_arguments_from_W_table(UINT16 W, char ma, const astring& SD, const astring& ea, - astring& source, astring& destination) +void assemble_arguments_from_W_table(UINT16 W, char ma, const std::string& SD, const std::string& ea, + std::string& source, std::string& destination) { char temp[32]; sprintf(temp, "%c:%s", ma, ea.c_str()); @@ -605,7 +605,7 @@ void assemble_arguments_from_W_table(UINT16 W, char ma, const astring& SD, const } } -void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, astring& S, astring& D) +void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, std::string& S, std::string& D) { UINT8 abs_xx; char temp[32]; @@ -627,7 +627,7 @@ void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 x } } -void assemble_address_from_IO_short_address(UINT16 pp, astring& ea) +void assemble_address_from_IO_short_address(UINT16 pp, std::string& ea) { char temp[32]; @@ -751,7 +751,7 @@ void setReg16(dsp56k_core* cpustate, const UINT16& value, const reg_id& reg) if (reg == iM3) M3 = value; } -astring regIdAsString(const reg_id& regId) +std::string regIdAsString(const reg_id& regId) { switch(regId) { @@ -799,7 +799,7 @@ astring regIdAsString(const reg_id& regId) return "INVALID_REG_ID"; } -astring opMnemonicAsString(const op_mnem& mnem) +std::string opMnemonicAsString(const op_mnem& mnem) { switch(mnem) { @@ -829,47 +829,47 @@ astring opMnemonicAsString(const op_mnem& mnem) return "INVALID_OPCODE_MNEMONIC"; } -reg_id stringAsRegID(const astring& str) -{ - if (str == "X") return iX; - if (str == "X0") return iX0; - if (str == "X1") return iX1; - if (str == "Y") return iY; - if (str == "Y0") return iY0; - if (str == "Y1") return iY1; - if (str == "A") return iA; - if (str == "A0") return iA0; - if (str == "A1") return iA1; - if (str == "A2") return iA2; - if (str == "B") return iB; - if (str == "B0") return iB0; - if (str == "B1") return iB1; - if (str == "B2") return iB2; - if (str == "R0") return iR0; - if (str == "R1") return iR1; - if (str == "R2") return iR2; - if (str == "R3") return iR3; - if (str == "N0") return iN0; - if (str == "N1") return iN1; - if (str == "N2") return iN2; - if (str == "N3") return iN3; - if (str == "M0") return iM0; - if (str == "M1") return iM1; - if (str == "M2") return iM2; - if (str == "M3") return iM3; - if (str == "LC") return iLC; - if (str == "SR") return iSR; - if (str == "OMR") return iOMR; - if (str == "SP") return iSP; - if (str == "SSH") return iSSH; - if (str == "SSL") return iSSL; - if (str == "LA") return iLA; - if (str == "MR") return iMR; - if (str == "CCR") return iCCR; - if (str == "F") return iF; - if (str == "^F") return iFHAT; - if (str == "!!") return iINVALID; - if (str == "?") return iWEIRD; +reg_id stringAsRegID(const std::string& str) +{ + if (str.compare("X")==0) return iX; + if (str.compare("X0") == 0) return iX0; + if (str.compare("X1") == 0) return iX1; + if (str.compare("Y") == 0) return iY; + if (str.compare("Y0") == 0) return iY0; + if (str.compare("Y1") == 0) return iY1; + if (str.compare("A") == 0) return iA; + if (str.compare("A0") == 0) return iA0; + if (str.compare("A1") == 0) return iA1; + if (str.compare("A2") == 0) return iA2; + if (str.compare("B") == 0) return iB; + if (str.compare("B0") == 0) return iB0; + if (str.compare("B1") == 0) return iB1; + if (str.compare("B2") == 0) return iB2; + if (str.compare("R0") == 0) return iR0; + if (str.compare("R1") == 0) return iR1; + if (str.compare("R2") == 0) return iR2; + if (str.compare("R3") == 0) return iR3; + if (str.compare("N0") == 0) return iN0; + if (str.compare("N1") == 0) return iN1; + if (str.compare("N2") == 0) return iN2; + if (str.compare("N3") == 0) return iN3; + if (str.compare("M0") == 0) return iM0; + if (str.compare("M1") == 0) return iM1; + if (str.compare("M2") == 0) return iM2; + if (str.compare("M3") == 0) return iM3; + if (str.compare("LC") == 0) return iLC; + if (str.compare("SR") == 0) return iSR; + if (str.compare("OMR") == 0) return iOMR; + if (str.compare("SP") == 0) return iSP; + if (str.compare("SSH") == 0) return iSSH; + if (str.compare("SSL") == 0) return iSSL; + if (str.compare("LA") == 0) return iLA; + if (str.compare("MR") == 0) return iMR; + if (str.compare("CCR") == 0) return iCCR; + if (str.compare("F") == 0) return iF; + if (str.compare("^F") == 0) return iFHAT; + if (str.compare("!!") == 0) return iINVALID; + if (str.compare("?") == 0)return iWEIRD; return iINVALID; } diff --git a/src/emu/cpu/dsp56k/tables.h b/src/emu/cpu/dsp56k/tables.h index 139d89403a0..dbe877f1431 100644 --- a/src/emu/cpu/dsp56k/tables.h +++ b/src/emu/cpu/dsp56k/tables.h @@ -46,7 +46,7 @@ void decode_IIIIx_table(const UINT16 IIII, const UINT16 x, reg_id& S, reg_id& D) void decode_JJJF_table(const UINT16 JJJ, const UINT16 F, reg_id& S, reg_id& D); void decode_JJF_table(const UINT16 JJ, const UINT16 F, reg_id& S, reg_id& D); void decode_JF_table(const UINT16 J, const UINT16 F, reg_id& S, reg_id& D); -void decode_kSign_table(const UINT16 k, astring& plusMinus); +void decode_kSign_table(const UINT16 k, std::string& plusMinus); void decode_KKK_table(const UINT16 KKK, reg_id& D1, reg_id& D2); void decode_NN_table(UINT16 NN, reg_id& ret); void decode_TT_table(UINT16 TT, reg_id& ret); @@ -57,20 +57,20 @@ void decode_RR_table(UINT16 RR, reg_id& ret); void decode_rr_table(UINT16 rr, reg_id& ret); void decode_s_table(const UINT16 s, op_mnem& arithmetic); void decode_ss_table(const UINT16 ss, op_mnem& arithmetic); -void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, astring& arg, reg_id& S, reg_id& D); -void decode_Z_table(const UINT16 Z, astring& ea); - -void assemble_ea_from_m_table(const UINT16 m, const int n, astring& ea); -void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, astring& ea1, astring& ea2); -void assemble_ea_from_MM_table(UINT16 MM, int n, astring& ea); -void assemble_ea_from_q_table(UINT16 q, int n, astring& ea); -void assemble_ea_from_t_table(UINT16 t, UINT16 val, astring& ea); -void assemble_ea_from_z_table(UINT16 z, int n, astring& ea); -void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, astring& D); -void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const astring& ea, astring& S, astring& D); -void assemble_arguments_from_W_table(UINT16 W, char ma, const astring& SD, const astring& ea, astring& S, astring& D); -void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, astring& S, astring& D); -void assemble_address_from_IO_short_address(UINT16 pp, astring& ea); +void decode_uuuuF_table(const UINT16 uuuu, const UINT16 F, std::string& arg, reg_id& S, reg_id& D); +void decode_Z_table(const UINT16 Z, std::string& ea); + +void assemble_ea_from_m_table(const UINT16 m, const int n, std::string& ea); +void assemble_eas_from_mm_table(UINT16 mm, int n1, int n2, std::string& ea1, std::string& ea2); +void assemble_ea_from_MM_table(UINT16 MM, int n, std::string& ea); +void assemble_ea_from_q_table(UINT16 q, int n, std::string& ea); +void assemble_ea_from_t_table(UINT16 t, UINT16 val, std::string& ea); +void assemble_ea_from_z_table(UINT16 z, int n, std::string& ea); +void assemble_D_from_P_table(UINT16 P, UINT16 ppppp, std::string& D); +void assemble_arguments_from_W_table(UINT16 W, char ma, const reg_id& SD, const std::string& ea, std::string& S, std::string& D); +void assemble_arguments_from_W_table(UINT16 W, char ma, const std::string& SD, const std::string& ea, std::string& S, std::string& D); +void assemble_reg_from_W_table(UINT16 W, char ma, const reg_id& SD, const INT8 xx, std::string& S, std::string& D); +void assemble_address_from_IO_short_address(UINT16 pp, std::string& ea); INT8 get_6_bit_signed_value(UINT16 bits); @@ -82,9 +82,9 @@ bool registerOverlap(const reg_id& r0, const size_t bmd, const reg_id& r1); UINT16 regValue16(dsp56k_core* cpustate, const reg_id& reg); void setReg16(dsp56k_core* cpustate, const UINT16& value, const reg_id& reg); -astring regIdAsString(const reg_id& regId); -astring opMnemonicAsString(const op_mnem& mnem); -reg_id stringAsRegID(const astring& str); +std::string regIdAsString(const reg_id& regId); +std::string opMnemonicAsString(const op_mnem& mnem); +reg_id stringAsRegID(const std::string& str); UINT8 regIDAsNum(const reg_id& regId); diff --git a/src/emu/cpu/e132xs/e132xs.c b/src/emu/cpu/e132xs/e132xs.c index 258f0642673..613bc57a03f 100644 --- a/src/emu/cpu/e132xs/e132xs.c +++ b/src/emu/cpu/e132xs/e132xs.c @@ -1560,7 +1560,7 @@ void hyperstone_device::init(int scale_mask) m_clock_scale_mask = scale_mask; // register our state for the debugger - astring tempstr; + std::string tempstr; state_add(STATE_GENPC, "GENPC", m_global_regs[0]).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_global_regs[1]).callimport().callexport().formatstr("%40s").noshow(); state_add(E132XS_PC, "PC", m_global_regs[0]).mask(0xffffffff); @@ -1847,12 +1847,12 @@ const address_space_config *hyperstone_device::memory_space_config(address_space // for the debugger //------------------------------------------------- -void hyperstone_device::state_string_export(const device_state_entry &entry, astring &str) +void hyperstone_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c FTE:%X FRM:%X ILC:%d FL:%d FP:%d", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c FTE:%X FRM:%X ILC:%d FL:%d FP:%d", GET_S ? 'S':'.', GET_P ? 'P':'.', GET_T ? 'T':'.', diff --git a/src/emu/cpu/e132xs/e132xs.h b/src/emu/cpu/e132xs/e132xs.h index 9ab10d1cec1..2d8bc976cf8 100644 --- a/src/emu/cpu/e132xs/e132xs.h +++ b/src/emu/cpu/e132xs/e132xs.h @@ -241,7 +241,7 @@ protected: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // address spaces const address_space_config m_program_config; diff --git a/src/emu/cpu/esrip/esrip.c b/src/emu/cpu/esrip/esrip.c index 8551a18c745..5bbcebeee08 100644 --- a/src/emu/cpu/esrip/esrip.c +++ b/src/emu/cpu/esrip/esrip.c @@ -191,7 +191,7 @@ void esrip_device::device_start() m_direct = &m_program->direct(); // register our state for the debugger - astring tempstr; + std::string tempstr; state_add(STATE_GENPC, "GENPC", m_rip_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_status).callimport().callexport().formatstr("%8s").noshow(); state_add(ESRIP_PC, "PC:", m_rip_pc).mask(0xffff); @@ -349,12 +349,12 @@ const address_space_config *esrip_device::memory_space_config(address_spacenum s // for the debugger //------------------------------------------------- -void esrip_device::state_string_export(const device_state_entry &entry, astring &str) +void esrip_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c", (m_status & 0x80) ? '3' : '.', (m_status & 0x40) ? '2' : '.', (m_status & 0x20) ? '1' : '.', diff --git a/src/emu/cpu/esrip/esrip.h b/src/emu/cpu/esrip/esrip.h index d772d37b093..2cf5b335aad 100644 --- a/src/emu/cpu/esrip/esrip.h +++ b/src/emu/cpu/esrip/esrip.h @@ -150,7 +150,7 @@ protected: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // address spaces const address_space_config m_program_config; diff --git a/src/emu/cpu/f8/f8.c b/src/emu/cpu/f8/f8.c index 52ca9747911..6c5db98e721 100644 --- a/src/emu/cpu/f8/f8.c +++ b/src/emu/cpu/f8/f8.c @@ -2057,12 +2057,12 @@ void f8_cpu_device::device_start() } -void f8_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void f8_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c", m_w & 0x10 ? 'I':'.', m_w & 0x08 ? 'O':'.', m_w & 0x04 ? 'Z':'.', diff --git a/src/emu/cpu/f8/f8.h b/src/emu/cpu/f8/f8.h index e888fc29608..e2045e42ff9 100644 --- a/src/emu/cpu/f8/f8.h +++ b/src/emu/cpu/f8/f8.h @@ -63,7 +63,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/g65816/g65816.c b/src/emu/cpu/g65816/g65816.c index d8d6538c0fc..feedb58ef59 100644 --- a/src/emu/cpu/g65816/g65816.c +++ b/src/emu/cpu/g65816/g65816.c @@ -955,12 +955,12 @@ void g65816_device::state_export(const device_state_entry &entry) } } -void g65816_device::state_string_export(const device_state_entry &entry, astring &str) +void g65816_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_flag_n & NFLAG_SET ? 'N':'.', m_flag_v & VFLAG_SET ? 'V':'.', m_flag_m & MFLAG_SET ? 'M':'.', diff --git a/src/emu/cpu/g65816/g65816.h b/src/emu/cpu/g65816/g65816.h index 565269331b7..2f6973ab195 100644 --- a/src/emu/cpu/g65816/g65816.h +++ b/src/emu/cpu/g65816/g65816.h @@ -85,7 +85,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/h6280/h6280.c b/src/emu/cpu/h6280/h6280.c index 5f3fccf9e04..ec6a11f6775 100644 --- a/src/emu/cpu/h6280/h6280.c +++ b/src/emu/cpu/h6280/h6280.c @@ -2189,12 +2189,12 @@ OP(op,ff) { h6280_cycles(4); bbs(7, rd_zpg()); } // 6/8 BBS7 ZPG,REL // for the debugger //------------------------------------------------- -void h6280_device::state_string_export(const device_state_entry &entry, astring &str) +void h6280_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (m_p & 0x80) ? 'N':'.', (m_p & 0x40) ? 'V':'.', (m_p & 0x20) ? 'R':'.', diff --git a/src/emu/cpu/h6280/h6280.h b/src/emu/cpu/h6280/h6280.h index decc1f20f01..892be50308c 100644 --- a/src/emu/cpu/h6280/h6280.h +++ b/src/emu/cpu/h6280/h6280.h @@ -96,7 +96,7 @@ protected: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // opcode accessors UINT8 program_read8(offs_t addr); diff --git a/src/emu/cpu/h8/h8.c b/src/emu/cpu/h8/h8.c index f9093e2b513..cd2f7ecd17f 100644 --- a/src/emu/cpu/h8/h8.c +++ b/src/emu/cpu/h8/h8.c @@ -243,12 +243,12 @@ void h8_device::state_export(const device_state_entry &entry) { } -void h8_device::state_string_export(const device_state_entry &entry, astring &str) +void h8_device::state_string_export(const device_state_entry &entry, std::string &str) { switch(entry.index()) { case STATE_GENFLAGS: if(has_exr) - str.printf("%c%c %c%c%c%c%c%c%c%c", + strprintf(str, "%c%c %c%c%c%c%c%c%c%c", (EXR & EXR_T) ? 'T' : '-', '0' + (EXR & EXR_I), (CCR & F_I) ? 'I' : '-', @@ -260,7 +260,7 @@ void h8_device::state_string_export(const device_state_entry &entry, astring &st (CCR & F_V) ? 'V' : '-', (CCR & F_C) ? 'C' : '-'); else - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (CCR & F_I) ? 'I' : '-', (CCR & F_UI) ? 'u' : '-', (CCR & F_H) ? 'H' : '-', @@ -279,7 +279,7 @@ void h8_device::state_string_export(const device_state_entry &entry, astring &st case H8_R6: case H8_R7: { int r = entry.index() - H8_R0; - str.printf("%04x %04x", R[r + 8], R[r]); + strprintf(str, "%04x %04x", R[r + 8], R[r]); break; } } diff --git a/src/emu/cpu/h8/h8.h b/src/emu/cpu/h8/h8.h index 957ddc63296..b3a7a072ec9 100644 --- a/src/emu/cpu/h8/h8.h +++ b/src/emu/cpu/h8/h8.h @@ -185,7 +185,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/hcd62121/hcd62121.c b/src/emu/cpu/hcd62121/hcd62121.c index fdeebc36a21..f446b80f921 100644 --- a/src/emu/cpu/hcd62121/hcd62121.c +++ b/src/emu/cpu/hcd62121/hcd62121.c @@ -361,16 +361,16 @@ void hcd62121_cpu_device::device_start() } -void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENPC: - str.printf("%06X", (m_cseg << 16) | m_ip); + strprintf(str, "%06X", (m_cseg << 16) | m_ip); break; case STATE_GENFLAGS: - str.printf("%s-%s-%s-%c-%c", + strprintf(str, "%s-%s-%s-%c-%c", m_f & _FLAG_ZH ? "ZH":"__", m_f & _FLAG_CL ? "CL":"__", m_f & _FLAG_ZL ? "ZL":"__", @@ -381,100 +381,100 @@ void hcd62121_cpu_device::state_string_export(const device_state_entry &entry, a break; case HCD62121_R00: - str.printf("%02X%02X%02X%02X", m_reg[0x00], m_reg[0x01], m_reg[0x02], m_reg[0x03]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x00], m_reg[0x01], m_reg[0x02], m_reg[0x03]); break; case HCD62121_R04: - str.printf("%02X%02X%02X%02X", m_reg[0x04], m_reg[0x05], m_reg[0x06], m_reg[0x07]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x04], m_reg[0x05], m_reg[0x06], m_reg[0x07]); break; case HCD62121_R08: - str.printf("%02X%02X%02X%02X", m_reg[0x08], m_reg[0x09], m_reg[0x0A], m_reg[0x0B]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x08], m_reg[0x09], m_reg[0x0A], m_reg[0x0B]); break; case HCD62121_R0C: - str.printf("%02X%02X%02X%02X", m_reg[0x0C], m_reg[0x0D], m_reg[0x0E], m_reg[0x0F]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x0C], m_reg[0x0D], m_reg[0x0E], m_reg[0x0F]); break; case HCD62121_R10: - str.printf("%02X%02X%02X%02X", m_reg[0x10], m_reg[0x11], m_reg[0x12], m_reg[0x13]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x10], m_reg[0x11], m_reg[0x12], m_reg[0x13]); break; case HCD62121_R14: - str.printf("%02X%02X%02X%02X", m_reg[0x14], m_reg[0x15], m_reg[0x16], m_reg[0x17]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x14], m_reg[0x15], m_reg[0x16], m_reg[0x17]); break; case HCD62121_R18: - str.printf("%02X%02X%02X%02X", m_reg[0x18], m_reg[0x19], m_reg[0x1A], m_reg[0x1B]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x18], m_reg[0x19], m_reg[0x1A], m_reg[0x1B]); break; case HCD62121_R1C: - str.printf("%02X%02X%02X%02X", m_reg[0x1C], m_reg[0x1D], m_reg[0x1E], m_reg[0x1F]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x1C], m_reg[0x1D], m_reg[0x1E], m_reg[0x1F]); break; case HCD62121_R20: - str.printf("%02X%02X%02X%02X", m_reg[0x20], m_reg[0x21], m_reg[0x22], m_reg[0x23]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x20], m_reg[0x21], m_reg[0x22], m_reg[0x23]); break; case HCD62121_R24: - str.printf("%02X%02X%02X%02X", m_reg[0x24], m_reg[0x25], m_reg[0x26], m_reg[0x27]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x24], m_reg[0x25], m_reg[0x26], m_reg[0x27]); break; case HCD62121_R28: - str.printf("%02X%02X%02X%02X", m_reg[0x28], m_reg[0x29], m_reg[0x2A], m_reg[0x2B]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x28], m_reg[0x29], m_reg[0x2A], m_reg[0x2B]); break; case HCD62121_R2C: - str.printf("%02X%02X%02X%02X", m_reg[0x2C], m_reg[0x2D], m_reg[0x2E], m_reg[0x2F]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x2C], m_reg[0x2D], m_reg[0x2E], m_reg[0x2F]); break; case HCD62121_R30: - str.printf("%02X%02X%02X%02X", m_reg[0x30], m_reg[0x31], m_reg[0x32], m_reg[0x33]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x30], m_reg[0x31], m_reg[0x32], m_reg[0x33]); break; case HCD62121_R34: - str.printf("%02X%02X%02X%02X", m_reg[0x34], m_reg[0x35], m_reg[0x36], m_reg[0x37]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x34], m_reg[0x35], m_reg[0x36], m_reg[0x37]); break; case HCD62121_R38: - str.printf("%02X%02X%02X%02X", m_reg[0x38], m_reg[0x39], m_reg[0x3A], m_reg[0x3B]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x38], m_reg[0x39], m_reg[0x3A], m_reg[0x3B]); break; case HCD62121_R3C: - str.printf("%02X%02X%02X%02X", m_reg[0x3C], m_reg[0x3D], m_reg[0x3E], m_reg[0x3F]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x3C], m_reg[0x3D], m_reg[0x3E], m_reg[0x3F]); break; case HCD62121_R40: - str.printf("%02X%02X%02X%02X", m_reg[0x40], m_reg[0x41], m_reg[0x42], m_reg[0x43]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x40], m_reg[0x41], m_reg[0x42], m_reg[0x43]); break; case HCD62121_R44: - str.printf("%02X%02X%02X%02X", m_reg[0x44], m_reg[0x45], m_reg[0x46], m_reg[0x47]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x44], m_reg[0x45], m_reg[0x46], m_reg[0x47]); break; case HCD62121_R48: - str.printf("%02X%02X%02X%02X", m_reg[0x48], m_reg[0x49], m_reg[0x4A], m_reg[0x4B]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x48], m_reg[0x49], m_reg[0x4A], m_reg[0x4B]); break; case HCD62121_R4C: - str.printf("%02X%02X%02X%02X", m_reg[0x4C], m_reg[0x4D], m_reg[0x4E], m_reg[0x4F]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x4C], m_reg[0x4D], m_reg[0x4E], m_reg[0x4F]); break; case HCD62121_R50: - str.printf("%02X%02X%02X%02X", m_reg[0x50], m_reg[0x51], m_reg[0x52], m_reg[0x53]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x50], m_reg[0x51], m_reg[0x52], m_reg[0x53]); break; case HCD62121_R54: - str.printf("%02X%02X%02X%02X", m_reg[0x54], m_reg[0x55], m_reg[0x56], m_reg[0x57]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x54], m_reg[0x55], m_reg[0x56], m_reg[0x57]); break; case HCD62121_R58: - str.printf("%02X%02X%02X%02X", m_reg[0x58], m_reg[0x59], m_reg[0x5A], m_reg[0x5B]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x58], m_reg[0x59], m_reg[0x5A], m_reg[0x5B]); break; case HCD62121_R5C: - str.printf("%02X%02X%02X%02X", m_reg[0x5C], m_reg[0x5D], m_reg[0x5E], m_reg[0x5F]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x5C], m_reg[0x5D], m_reg[0x5E], m_reg[0x5F]); break; case HCD62121_R60: - str.printf("%02X%02X%02X%02X", m_reg[0x60], m_reg[0x61], m_reg[0x62], m_reg[0x63]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x60], m_reg[0x61], m_reg[0x62], m_reg[0x63]); break; case HCD62121_R64: - str.printf("%02X%02X%02X%02X", m_reg[0x64], m_reg[0x65], m_reg[0x66], m_reg[0x67]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x64], m_reg[0x65], m_reg[0x66], m_reg[0x67]); break; case HCD62121_R68: - str.printf("%02X%02X%02X%02X", m_reg[0x68], m_reg[0x69], m_reg[0x6A], m_reg[0x6B]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x68], m_reg[0x69], m_reg[0x6A], m_reg[0x6B]); break; case HCD62121_R6C: - str.printf("%02X%02X%02X%02X", m_reg[0x6C], m_reg[0x6D], m_reg[0x6E], m_reg[0x6F]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x6C], m_reg[0x6D], m_reg[0x6E], m_reg[0x6F]); break; case HCD62121_R70: - str.printf("%02X%02X%02X%02X", m_reg[0x70], m_reg[0x71], m_reg[0x72], m_reg[0x73]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x70], m_reg[0x71], m_reg[0x72], m_reg[0x73]); break; case HCD62121_R74: - str.printf("%02X%02X%02X%02X", m_reg[0x74], m_reg[0x75], m_reg[0x76], m_reg[0x77]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x74], m_reg[0x75], m_reg[0x76], m_reg[0x77]); break; case HCD62121_R78: - str.printf("%02X%02X%02X%02X", m_reg[0x78], m_reg[0x79], m_reg[0x7A], m_reg[0x7B]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x78], m_reg[0x79], m_reg[0x7A], m_reg[0x7B]); break; case HCD62121_R7C: - str.printf("%02X%02X%02X%02X", m_reg[0x7C], m_reg[0x7D], m_reg[0x7E], m_reg[0x7F]); + strprintf(str, "%02X%02X%02X%02X", m_reg[0x7C], m_reg[0x7D], m_reg[0x7E], m_reg[0x7F]); break; } } diff --git a/src/emu/cpu/hcd62121/hcd62121.h b/src/emu/cpu/hcd62121/hcd62121.h index 938ba53f4d9..60a5f35c101 100644 --- a/src/emu/cpu/hcd62121/hcd62121.h +++ b/src/emu/cpu/hcd62121/hcd62121.h @@ -52,7 +52,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/hd61700/hd61700.c b/src/emu/cpu/hd61700/hd61700.c index a9b83620f33..9e8276c6bc0 100644 --- a/src/emu/cpu/hd61700/hd61700.c +++ b/src/emu/cpu/hd61700/hd61700.c @@ -183,8 +183,8 @@ void hd61700_cpu_device::device_start() for (int ireg=0; ireg<32; ireg++) { - astring tmpstr; - state_add(HD61700_MAINREG + ireg, tmpstr.format("R%d", ireg).c_str(), m_regmain[ireg]).callimport().callexport().formatstr("%02X"); + std::string tmpstr; + state_add(HD61700_MAINREG + ireg, strformat(tmpstr, "R%d", ireg).c_str(), m_regmain[ireg]).callimport().callexport().formatstr("%02X"); } state_add(STATE_GENPC, "curpc", m_curpc).callimport().callexport().formatstr("%8s").noshow(); @@ -271,12 +271,12 @@ void hd61700_cpu_device::state_import(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void hd61700_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void hd61700_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c", m_flags & FLAG_Z ? '.' : 'Z', m_flags & FLAG_C ? 'C' : '.', m_flags & FLAG_LZ ? '.' : 'L', diff --git a/src/emu/cpu/hd61700/hd61700.h b/src/emu/cpu/hd61700/hd61700.h index 445ae13b951..1b928e57922 100644 --- a/src/emu/cpu/hd61700/hd61700.h +++ b/src/emu/cpu/hd61700/hd61700.h @@ -92,7 +92,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } diff --git a/src/emu/cpu/hmcs40/hmcs40.c b/src/emu/cpu/hmcs40/hmcs40.c index 16d85efd6ad..b40e1299e06 100644 --- a/src/emu/cpu/hmcs40/hmcs40.c +++ b/src/emu/cpu/hmcs40/hmcs40.c @@ -144,12 +144,12 @@ hd44828_device::hd44828_device(const machine_config &mconfig, const char *tag, d // disasm -void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c", + strprintf(str, "%c%c", m_c ? 'C':'c', m_s ? 'S':'s' ); @@ -502,7 +502,7 @@ void hmcs40_cpu_device::execute_set_input(int line, int state) void hmcs40_cpu_device::reset_prescaler() { // reset 6-bit timer prescaler - attotime base = attotime::from_hz(unscaled_clock() / 4 / 64); + attotime base = attotime::from_ticks(4 * 64, unscaled_clock()); m_timer->adjust(base); } diff --git a/src/emu/cpu/hmcs40/hmcs40.h b/src/emu/cpu/hmcs40/hmcs40.h index cb5399137f7..b5967a4d640 100644 --- a/src/emu/cpu/hmcs40/hmcs40.h +++ b/src/emu/cpu/hmcs40/hmcs40.h @@ -159,7 +159,7 @@ protected: virtual UINT32 disasm_min_opcode_bytes() const { return 2; } virtual UINT32 disasm_max_opcode_bytes() const { return 2; } virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); address_space_config m_program_config; address_space_config m_data_config; diff --git a/src/emu/cpu/i386/i386.c b/src/emu/cpu/i386/i386.c index c473c82fc3c..589941d29d2 100644 --- a/src/emu/cpu/i386/i386.c +++ b/src/emu/cpu/i386/i386.c @@ -3468,60 +3468,60 @@ void i386_device::state_export(const device_state_entry &entry) } } -void i386_device::state_string_export(const device_state_entry &entry, astring &str) +void i386_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%08X", get_flags()); + strprintf(str, "%08X", get_flags()); break; case X87_ST0: - str.printf("%f", fx80_to_double(ST(0))); + strprintf(str, "%f", fx80_to_double(ST(0))); break; case X87_ST1: - str.printf("%f", fx80_to_double(ST(1))); + strprintf(str, "%f", fx80_to_double(ST(1))); break; case X87_ST2: - str.printf("%f", fx80_to_double(ST(2))); + strprintf(str, "%f", fx80_to_double(ST(2))); break; case X87_ST3: - str.printf("%f", fx80_to_double(ST(3))); + strprintf(str, "%f", fx80_to_double(ST(3))); break; case X87_ST4: - str.printf("%f", fx80_to_double(ST(4))); + strprintf(str, "%f", fx80_to_double(ST(4))); break; case X87_ST5: - str.printf("%f", fx80_to_double(ST(5))); + strprintf(str, "%f", fx80_to_double(ST(5))); break; case X87_ST6: - str.printf("%f", fx80_to_double(ST(6))); + strprintf(str, "%f", fx80_to_double(ST(6))); break; case X87_ST7: - str.printf("%f", fx80_to_double(ST(7))); + strprintf(str, "%f", fx80_to_double(ST(7))); break; case SSE_XMM0: - str.printf("%08x%08x%08x%08x", XMM(0).d[3], XMM(0).d[2], XMM(0).d[1], XMM(0).d[0]); + strprintf(str, "%08x%08x%08x%08x", XMM(0).d[3], XMM(0).d[2], XMM(0).d[1], XMM(0).d[0]); break; case SSE_XMM1: - str.printf("%08x%08x%08x%08x", XMM(1).d[3], XMM(1).d[2], XMM(1).d[1], XMM(1).d[0]); + strprintf(str, "%08x%08x%08x%08x", XMM(1).d[3], XMM(1).d[2], XMM(1).d[1], XMM(1).d[0]); break; case SSE_XMM2: - str.printf("%08x%08x%08x%08x", XMM(2).d[3], XMM(2).d[2], XMM(2).d[1], XMM(2).d[0]); + strprintf(str, "%08x%08x%08x%08x", XMM(2).d[3], XMM(2).d[2], XMM(2).d[1], XMM(2).d[0]); break; case SSE_XMM3: - str.printf("%08x%08x%08x%08x", XMM(3).d[3], XMM(3).d[2], XMM(3).d[1], XMM(3).d[0]); + strprintf(str, "%08x%08x%08x%08x", XMM(3).d[3], XMM(3).d[2], XMM(3).d[1], XMM(3).d[0]); break; case SSE_XMM4: - str.printf("%08x%08x%08x%08x", XMM(4).d[3], XMM(4).d[2], XMM(4).d[1], XMM(4).d[0]); + strprintf(str, "%08x%08x%08x%08x", XMM(4).d[3], XMM(4).d[2], XMM(4).d[1], XMM(4).d[0]); break; case SSE_XMM5: - str.printf("%08x%08x%08x%08x", XMM(5).d[3], XMM(5).d[2], XMM(5).d[1], XMM(5).d[0]); + strprintf(str, "%08x%08x%08x%08x", XMM(5).d[3], XMM(5).d[2], XMM(5).d[1], XMM(5).d[0]); break; case SSE_XMM6: - str.printf("%08x%08x%08x%08x", XMM(6).d[3], XMM(6).d[2], XMM(6).d[1], XMM(6).d[0]); + strprintf(str, "%08x%08x%08x%08x", XMM(6).d[3], XMM(6).d[2], XMM(6).d[1], XMM(6).d[0]); break; case SSE_XMM7: - str.printf("%08x%08x%08x%08x", XMM(7).d[3], XMM(7).d[2], XMM(7).d[1], XMM(7).d[0]); + strprintf(str, "%08x%08x%08x%08x", XMM(7).d[3], XMM(7).d[2], XMM(7).d[1], XMM(7).d[0]); break; } } diff --git a/src/emu/cpu/i386/i386.h b/src/emu/cpu/i386/i386.h index 4a9a9cfb613..5b2ed036b2a 100644 --- a/src/emu/cpu/i386/i386.h +++ b/src/emu/cpu/i386/i386.h @@ -58,7 +58,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/i4004/i4004.c b/src/emu/cpu/i4004/i4004.c index c219b402f45..23b1721df3a 100644 --- a/src/emu/cpu/i4004/i4004.c +++ b/src/emu/cpu/i4004/i4004.c @@ -419,15 +419,15 @@ void i4004_cpu_device::device_start() state_add(STATE_GENFLAGS, "GENFLAGS", m_flags).mask(0x0f).callimport().callexport().noshow().formatstr("%4s"); state_add(I4004_A, "A", m_A).mask(0x0f); - astring tempstr; + std::string tempstr; for (int regnum = 0; regnum < 8; regnum++) { - state_add(I4004_R01 + regnum, tempstr.format("R%X%X", regnum * 2, regnum * 2 + 1).c_str(), m_R[regnum]); + state_add(I4004_R01 + regnum, strformat(tempstr, "R%X%X", regnum * 2, regnum * 2 + 1).c_str(), m_R[regnum]); } for (int addrnum = 0; addrnum < 4; addrnum++) { - state_add(I4004_ADDR1 + addrnum, tempstr.format("ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff); + state_add(I4004_ADDR1 + addrnum, strformat(tempstr, "ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff); } state_add(I4004_RAM, "RAM", m_RAM.w.l).mask(0x0fff); @@ -507,12 +507,12 @@ void i4004_cpu_device::state_export(const device_state_entry &entry) } } -void i4004_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void i4004_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf(".%c%c%c", + strprintf(str, ".%c%c%c", (m_A==0) ? 'Z':'.', m_C ? 'C':'.', m_TEST ? 'T':'.'); diff --git a/src/emu/cpu/i4004/i4004.h b/src/emu/cpu/i4004/i4004.h index 1050ac2997e..956218f3723 100644 --- a/src/emu/cpu/i4004/i4004.h +++ b/src/emu/cpu/i4004/i4004.h @@ -57,7 +57,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/i8008/i8008.c b/src/emu/cpu/i8008/i8008.c index 066fddb4fd4..2bb5b9cf4b7 100644 --- a/src/emu/cpu/i8008/i8008.c +++ b/src/emu/cpu/i8008/i8008.c @@ -92,9 +92,9 @@ void i8008_device::device_start() state_add(I8008_H, "H", m_H); state_add(I8008_L, "L", m_L); - astring tempstr; + std::string tempstr; for (int addrnum = 0; addrnum < 8; addrnum++) - state_add(I8008_ADDR1 + addrnum, tempstr.format("ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff); + state_add(I8008_ADDR1 + addrnum, strformat(tempstr, "ADDR%d", addrnum + 1).c_str(), m_ADDR[addrnum].w.l).mask(0xfff); init_tables(); } @@ -187,12 +187,12 @@ void i8008_device::state_export(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void i8008_device::state_string_export(const device_state_entry &entry, astring &str) +void i8008_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c", + strprintf(str, "%c%c%c%c", m_CF ? 'C':'.', m_ZF ? 'Z':'.', m_SF ? 'S':'.', diff --git a/src/emu/cpu/i8008/i8008.h b/src/emu/cpu/i8008/i8008.h index 8d75cc90957..c9cbecce7aa 100644 --- a/src/emu/cpu/i8008/i8008.h +++ b/src/emu/cpu/i8008/i8008.h @@ -48,7 +48,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c index f3a768dddc9..ef44db0284f 100644 --- a/src/emu/cpu/i8085/i8085.c +++ b/src/emu/cpu/i8085/i8085.c @@ -1081,12 +1081,12 @@ void i8085a_cpu_device::state_export(const device_state_entry &entry) } } -void i8085a_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void i8085a_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_AF.b.l & 0x80 ? 'S':'.', m_AF.b.l & 0x40 ? 'Z':'.', m_AF.b.l & 0x20 ? 'X':'.', // X5 diff --git a/src/emu/cpu/i8085/i8085.h b/src/emu/cpu/i8085/i8085.h index 437d085cb67..63b340ddadd 100644 --- a/src/emu/cpu/i8085/i8085.h +++ b/src/emu/cpu/i8085/i8085.h @@ -82,7 +82,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); void state_export(const device_state_entry &entry); void state_import(const device_state_entry &entry); diff --git a/src/emu/cpu/i8089/i8089.c b/src/emu/cpu/i8089/i8089.c index d318dc6ce6c..03d5d9d2856 100644 --- a/src/emu/cpu/i8089/i8089.c +++ b/src/emu/cpu/i8089/i8089.c @@ -159,7 +159,7 @@ offs_t i8089_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op // for the debugger //------------------------------------------------- -void i8089_device::state_string_export(const device_state_entry &entry, astring &str) +void i8089_device::state_string_export(const device_state_entry &entry, std::string &str) { i8089_channel *ch = m_ch1; @@ -169,30 +169,30 @@ void i8089_device::state_string_export(const device_state_entry &entry, astring switch (entry.index()) { case SYSBUS: - str.printf("%c", sysbus_width() ? 'W' : '.'); + strprintf(str, "%c", sysbus_width() ? 'W' : '.'); break; case SOC: - str.printf("%c%c", remotebus_width() ? 'I' : '.', request_grant() ? 'R' : '.'); + strprintf(str, "%c%c", remotebus_width() ? 'I' : '.', request_grant() ? 'R' : '.'); break; case CH1_GA: case CH2_GA: - str.printf("%d %05X", ch->m_r[i8089_channel::GA].t & 1, ch->m_r[i8089_channel::GA].w); + strprintf(str, "%d %05X", ch->m_r[i8089_channel::GA].t & 1, ch->m_r[i8089_channel::GA].w); break; case CH1_GB: case CH2_GB: - str.printf("%d %05X", ch->m_r[i8089_channel::GB].t & 1, ch->m_r[i8089_channel::GB].w); + strprintf(str, "%d %05X", ch->m_r[i8089_channel::GB].t & 1, ch->m_r[i8089_channel::GB].w); break; case CH1_GC: case CH2_GC: - str.printf("%d %05X", ch->m_r[i8089_channel::GC].t & 1, ch->m_r[i8089_channel::GC].w); + strprintf(str, "%d %05X", ch->m_r[i8089_channel::GC].t & 1, ch->m_r[i8089_channel::GC].w); break; case CH1_TP: case CH2_TP: - str.printf("%d %05X", ch->m_r[i8089_channel::TP].t & 1, ch->m_r[i8089_channel::TP].w); + strprintf(str, "%d %05X", ch->m_r[i8089_channel::TP].t & 1, ch->m_r[i8089_channel::TP].w); break; case CH1_PSW: case CH2_PSW: - str.printf("%c%s%c%s%s%s%c%c", + strprintf(str, "%c%s%c%s%s%s%c%c", BIT(ch->m_r[i8089_channel::PSW].w, 7) ? 'P':'.', BIT(ch->m_r[i8089_channel::PSW].w, 6) ? "XF":"..", BIT(ch->m_r[i8089_channel::PSW].w, 5) ? 'B':'.', diff --git a/src/emu/cpu/i8089/i8089.h b/src/emu/cpu/i8089/i8089.h index 403550d173c..4f325a7ac4e 100644 --- a/src/emu/cpu/i8089/i8089.h +++ b/src/emu/cpu/i8089/i8089.h @@ -89,7 +89,7 @@ protected: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // optional information overrides virtual machine_config_constructor device_mconfig_additions() const; diff --git a/src/emu/cpu/i86/i286.c b/src/emu/cpu/i86/i286.c index d645ed2cad3..763794cb69a 100644 --- a/src/emu/cpu/i86/i286.c +++ b/src/emu/cpu/i86/i286.c @@ -275,18 +275,18 @@ void i80286_cpu_device::device_start() m_out_shutdown_func.resolve_safe(); } -void i80286_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void i80286_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENPC: - str.printf("%08X", pc()); + strprintf(str, "%08X", pc()); break; case STATE_GENFLAGS: { UINT16 flags = CompressFlags(); - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", flags & 0x8000 ? '0':'.', flags & 0x4000 ? 'N':'.', flags & 0x2000 ? 'I':'.', diff --git a/src/emu/cpu/i86/i286.h b/src/emu/cpu/i86/i286.h index 8d9f19fbe00..466c672ac78 100644 --- a/src/emu/cpu/i86/i286.h +++ b/src/emu/cpu/i86/i286.h @@ -75,7 +75,7 @@ protected: virtual void execute_run(); virtual void device_reset(); virtual void device_start(); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); virtual UINT32 execute_input_lines() const { return 1; } virtual void execute_set_input(int inputnum, int state); bool memory_translate(address_spacenum spacenum, int intention, offs_t &address); diff --git a/src/emu/cpu/i86/i86.c b/src/emu/cpu/i86/i86.c index 50c0c970ba9..3809610d819 100644 --- a/src/emu/cpu/i86/i86.c +++ b/src/emu/cpu/i86/i86.c @@ -310,18 +310,18 @@ i8086_common_cpu_device::i8086_common_cpu_device(const machine_config &mconfig, memset(m_sregs, 0x00, sizeof(m_sregs)); } -void i8086_common_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void i8086_common_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENPC: - str.printf("%08X", pc()); + strprintf(str, "%08X", pc()); break; case STATE_GENFLAGS: { UINT16 flags = CompressFlags(); - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", flags & 0x8000 ? '1':'.', flags & 0x4000 ? '1':'.', flags & 0x2000 ? '1':'.', diff --git a/src/emu/cpu/i86/i86.h b/src/emu/cpu/i86/i86.h index 7868d49de0e..8c0618e10d5 100644 --- a/src/emu/cpu/i86/i86.h +++ b/src/emu/cpu/i86/i86.h @@ -118,7 +118,7 @@ protected: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); virtual void interrupt(int int_num, int trap = 1); bool common_op(UINT8 op); diff --git a/src/emu/cpu/i960/i960.c b/src/emu/cpu/i960/i960.c index d8d6dac6434..a704a964cd9 100644 --- a/src/emu/cpu/i960/i960.c +++ b/src/emu/cpu/i960/i960.c @@ -2078,7 +2078,7 @@ void i960_cpu_device::device_start() m_icountptr = &m_icount; } -void i960_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void i960_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { static const char *const conditions[8] = { @@ -2088,7 +2088,7 @@ void i960_cpu_device::state_string_export(const device_state_entry &entry, astri switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%s", conditions[m_AC & 7]); + strprintf(str, "%s", conditions[m_AC & 7]); break; } } diff --git a/src/emu/cpu/i960/i960.h b/src/emu/cpu/i960/i960.h index b4e4cfc86f8..c8f791a73a7 100644 --- a/src/emu/cpu/i960/i960.h +++ b/src/emu/cpu/i960/i960.h @@ -93,7 +93,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/ie15/ie15.c b/src/emu/cpu/ie15/ie15.c index c41cffd223c..03e1f0a91ee 100644 --- a/src/emu/cpu/ie15/ie15.c +++ b/src/emu/cpu/ie15/ie15.c @@ -62,9 +62,9 @@ void ie15_device::device_start() state_add(STATE_GENFLAGS,"GENFLAGS", m_flags).mask(0x0f).callimport().callexport().noshow().formatstr("%4s"); state_add(IE15_A, "A", m_A); - astring tempstring; + std::string tempstring; for (int ireg = 0; ireg < 32; ireg++) - state_add(IE15_R0 + ireg, tempstring.format("R%d", ireg).c_str(), m_REGS[ireg]); + state_add(IE15_R0 + ireg, strformat(tempstring, "R%d", ireg).c_str(), m_REGS[ireg]); } //------------------------------------------------- @@ -131,12 +131,12 @@ void ie15_device::state_export(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void ie15_device::state_string_export(const device_state_entry &entry, astring &str) +void ie15_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c", + strprintf(str, "%c%c%c", m_CF ? 'C':'.', m_ZF ? 'Z':'.', m_RF ? 'R':'.'); diff --git a/src/emu/cpu/ie15/ie15.h b/src/emu/cpu/ie15/ie15.h index d4fa943418e..efaeb2bb167 100644 --- a/src/emu/cpu/ie15/ie15.h +++ b/src/emu/cpu/ie15/ie15.h @@ -46,7 +46,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/jaguar/jaguar.c b/src/emu/cpu/jaguar/jaguar.c index dc7f10a1531..6c1dd97b821 100644 --- a/src/emu/cpu/jaguar/jaguar.c +++ b/src/emu/cpu/jaguar/jaguar.c @@ -403,12 +403,12 @@ void jaguar_cpu_device::device_start() } -void jaguar_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void jaguar_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c", FLAGS & 0x8000 ? 'D':'.', FLAGS & 0x4000 ? 'A':'.', FLAGS & 0x0100 ? '4':'.', diff --git a/src/emu/cpu/jaguar/jaguar.h b/src/emu/cpu/jaguar/jaguar.h index 6e9a9c017aa..5139158861b 100644 --- a/src/emu/cpu/jaguar/jaguar.h +++ b/src/emu/cpu/jaguar/jaguar.h @@ -127,7 +127,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/lc8670/lc8670.c b/src/emu/cpu/lc8670/lc8670.c index 99f1119ae49..ac1fd1960d1 100644 --- a/src/emu/cpu/lc8670/lc8670.c +++ b/src/emu/cpu/lc8670/lc8670.c @@ -369,12 +369,12 @@ void lc8670_cpu_device::state_import(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void lc8670_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void lc8670_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%s%s%s%s", + strprintf(str, "%s%s%s%s", GET_CY ? "CY" : "..", GET_AC ? "AC" : "..", GET_OV ? "OV" : "..", diff --git a/src/emu/cpu/lc8670/lc8670.h b/src/emu/cpu/lc8670/lc8670.h index 4a27c871f03..e2668c1bacd 100644 --- a/src/emu/cpu/lc8670/lc8670.h +++ b/src/emu/cpu/lc8670/lc8670.h @@ -110,7 +110,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; diff --git a/src/emu/cpu/lh5801/lh5801.c b/src/emu/cpu/lh5801/lh5801.c index c3dba6be253..de02d12e49d 100644 --- a/src/emu/cpu/lh5801/lh5801.c +++ b/src/emu/cpu/lh5801/lh5801.c @@ -154,12 +154,12 @@ void lh5801_cpu_device::device_start() m_icountptr = &m_icount; } -void lh5801_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void lh5801_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_t&0x80?'1':'0', m_t&0x40?'1':'0', m_t&0x20?'1':'0', diff --git a/src/emu/cpu/lh5801/lh5801.h b/src/emu/cpu/lh5801/lh5801.h index 303a0fd8c2a..9ad564b1bab 100644 --- a/src/emu/cpu/lh5801/lh5801.h +++ b/src/emu/cpu/lh5801/lh5801.h @@ -101,7 +101,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/lr35902/lr35902.c b/src/emu/cpu/lr35902/lr35902.c index d78a59a7344..4b34883c4b5 100644 --- a/src/emu/cpu/lr35902/lr35902.c +++ b/src/emu/cpu/lr35902/lr35902.c @@ -178,16 +178,16 @@ void lr35902_cpu_device::device_start() } -void lr35902_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void lr35902_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case LR35902_SPEED: - str.printf("%02X", 0x7E | ((m_gb_speed - 1) << 7) | m_gb_speed_change_pending); + strprintf(str, "%02X", 0x7E | ((m_gb_speed - 1) << 7) | m_gb_speed_change_pending); break; case STATE_GENFLAGS: - str.printf("%c%c%c%c", + strprintf(str, "%c%c%c%c", m_F & FLAG_Z ? 'Z' : '.', m_F & FLAG_N ? 'N' : '.', m_F & FLAG_H ? 'H' : '.', diff --git a/src/emu/cpu/lr35902/lr35902.h b/src/emu/cpu/lr35902/lr35902.h index e2592388627..6e466f58171 100644 --- a/src/emu/cpu/lr35902/lr35902.h +++ b/src/emu/cpu/lr35902/lr35902.h @@ -68,7 +68,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/m37710/m37710.c b/src/emu/cpu/m37710/m37710.c index 73d41bdd402..454ee2a435e 100644 --- a/src/emu/cpu/m37710/m37710.c +++ b/src/emu/cpu/m37710/m37710.c @@ -1134,12 +1134,12 @@ void m37710_cpu_device::state_export(const device_state_entry &entry) } -void m37710_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void m37710_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_flag_n & NFLAG_SET ? 'N':'.', m_flag_v & VFLAG_SET ? 'V':'.', m_flag_m & MFLAG_SET ? 'M':'.', diff --git a/src/emu/cpu/m37710/m37710.h b/src/emu/cpu/m37710/m37710.h index 58e7d6d1b0a..118ea8af909 100644 --- a/src/emu/cpu/m37710/m37710.h +++ b/src/emu/cpu/m37710/m37710.h @@ -115,7 +115,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c index 90e738cf844..6368b6b991f 100644 --- a/src/emu/cpu/m6502/m6502.c +++ b/src/emu/cpu/m6502/m6502.c @@ -456,12 +456,12 @@ void m6502_device::state_export(const device_state_entry &entry) { } -void m6502_device::state_string_export(const device_state_entry &entry, astring &str) +void m6502_device::state_string_export(const device_state_entry &entry, std::string &str) { switch(entry.index()) { case STATE_GENFLAGS: case M6502_P: - str.printf("%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c", P & F_N ? 'N' : '.', P & F_V ? 'V' : '.', P & F_D ? 'D' : '.', diff --git a/src/emu/cpu/m6502/m6502.h b/src/emu/cpu/m6502/m6502.h index 2fe03782d29..db277522dc8 100644 --- a/src/emu/cpu/m6502/m6502.h +++ b/src/emu/cpu/m6502/m6502.h @@ -173,7 +173,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/m6502/m65ce02.c b/src/emu/cpu/m6502/m65ce02.c index cb3bb9a1651..0788683264a 100644 --- a/src/emu/cpu/m6502/m65ce02.c +++ b/src/emu/cpu/m6502/m65ce02.c @@ -104,12 +104,12 @@ void m65ce02_device::state_export(const device_state_entry &entry) { } -void m65ce02_device::state_string_export(const device_state_entry &entry, astring &str) +void m65ce02_device::state_string_export(const device_state_entry &entry, std::string &str) { switch(entry.index()) { case STATE_GENFLAGS: case M6502_P: - str.printf("%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c", P & F_N ? 'N' : '.', P & F_V ? 'V' : '.', P & F_E ? 'E' : '.', @@ -119,7 +119,7 @@ void m65ce02_device::state_string_export(const device_state_entry &entry, astrin P & F_C ? 'C' : '.'); break; case M65CE02_B: - str.printf("%02x", B >> 8); + strprintf(str, "%02x", B >> 8); break; } } diff --git a/src/emu/cpu/m6502/m65ce02.h b/src/emu/cpu/m6502/m65ce02.h index df715d72e9c..df0f1fbd996 100644 --- a/src/emu/cpu/m6502/m65ce02.h +++ b/src/emu/cpu/m6502/m65ce02.h @@ -63,7 +63,7 @@ protected: virtual void device_reset(); virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); inline void dec_SP_ce() { if(P & F_E) SP = set_l(SP, SP-1); else SP--; } inline void inc_SP_ce() { if(P & F_E) SP = set_l(SP, SP+1); else SP++; } diff --git a/src/emu/cpu/m6502/m740.c b/src/emu/cpu/m6502/m740.c index 330eff9f378..fc8b245b761 100644 --- a/src/emu/cpu/m6502/m740.c +++ b/src/emu/cpu/m6502/m740.c @@ -82,12 +82,12 @@ void m740_device::device_reset() SP = 0x00ff; } -void m740_device::state_string_export(const device_state_entry &entry, astring &str) +void m740_device::state_string_export(const device_state_entry &entry, std::string &str) { switch(entry.index()) { case STATE_GENFLAGS: case M6502_P: - str.printf("%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c", P & F_N ? 'N' : '.', P & F_V ? 'V' : '.', P & F_T ? 'T' : '.', diff --git a/src/emu/cpu/m6502/m740.h b/src/emu/cpu/m6502/m740.h index 29e690018db..232e661c755 100644 --- a/src/emu/cpu/m6502/m740.h +++ b/src/emu/cpu/m6502/m740.h @@ -73,7 +73,7 @@ public: static const disasm_entry disasm_entries[0x200]; - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); virtual void do_exec_full(); diff --git a/src/emu/cpu/m6800/m6800.c b/src/emu/cpu/m6800/m6800.c index e6d60ed56b8..56d456cfd81 100644 --- a/src/emu/cpu/m6800/m6800.c +++ b/src/emu/cpu/m6800/m6800.c @@ -1123,12 +1123,12 @@ void m6800_cpu_device::device_start() m_icountptr = &m_icount; } -void m6800_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void m6800_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_cc & 0x80 ? '?':'.', m_cc & 0x40 ? '?':'.', m_cc & 0x20 ? 'H':'.', diff --git a/src/emu/cpu/m6800/m6800.h b/src/emu/cpu/m6800/m6800.h index b3f458eb0a7..dcd343c19f4 100644 --- a/src/emu/cpu/m6800/m6800.h +++ b/src/emu/cpu/m6800/m6800.h @@ -85,7 +85,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO && m_has_io) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/m68000/m68000.h b/src/emu/cpu/m68000/m68000.h index 39ec43d96e7..29665c107b5 100644 --- a/src/emu/cpu/m68000/m68000.h +++ b/src/emu/cpu/m68000/m68000.h @@ -398,7 +398,7 @@ public: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_memory_interface overrides virtual bool memory_translate(address_spacenum space, int intention, offs_t &address); diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c index 269eae5b829..5c86f9aedc9 100644 --- a/src/emu/cpu/m68000/m68kcpu.c +++ b/src/emu/cpu/m68000/m68kcpu.c @@ -677,7 +677,7 @@ static void m68k_presave(m68000_base_device *m68k) static void m68k_postload(m68000_base_device *m68k) { m68ki_set_sr_noint_nosp(m68k, m68k->save_sr); - fprintf(stderr, "Reloaded, pc=%x\n", REG_PC(m68k)); + //fprintf(stderr, "Reloaded, pc=%x\n", REG_PC(m68k)); m68k->stopped = (m68k->save_stopped ? STOP_LEVEL_STOP : 0) | (m68k->save_halted ? STOP_LEVEL_HALT : 0); m68ki_jump(m68k, REG_PC(m68k)); } @@ -1173,47 +1173,47 @@ void m68000_base_device::state_export(const device_state_entry &entry) } } -void m68000_base_device::state_string_export(const device_state_entry &entry, astring &str) +void m68000_base_device::state_string_export(const device_state_entry &entry, std::string &str) { UINT16 sr; switch (entry.index()) { case M68K_FP0: - str.printf("%f", fx80_to_double(REG_FP(this)[0])); + strprintf(str,"%f", fx80_to_double(REG_FP(this)[0])); break; case M68K_FP1: - str.printf("%f", fx80_to_double(REG_FP(this)[1])); + strprintf(str,"%f", fx80_to_double(REG_FP(this)[1])); break; case M68K_FP2: - str.printf("%f", fx80_to_double(REG_FP(this)[2])); + strprintf(str,"%f", fx80_to_double(REG_FP(this)[2])); break; case M68K_FP3: - str.printf("%f", fx80_to_double(REG_FP(this)[3])); + strprintf(str,"%f", fx80_to_double(REG_FP(this)[3])); break; case M68K_FP4: - str.printf("%f", fx80_to_double(REG_FP(this)[4])); + strprintf(str,"%f", fx80_to_double(REG_FP(this)[4])); break; case M68K_FP5: - str.printf("%f", fx80_to_double(REG_FP(this)[5])); + strprintf(str,"%f", fx80_to_double(REG_FP(this)[5])); break; case M68K_FP6: - str.printf("%f", fx80_to_double(REG_FP(this)[6])); + strprintf(str,"%f", fx80_to_double(REG_FP(this)[6])); break; case M68K_FP7: - str.printf("%f", fx80_to_double(REG_FP(this)[7])); + strprintf(str,"%f", fx80_to_double(REG_FP(this)[7])); break; case STATE_GENFLAGS: sr = m68ki_get_sr(this); - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str,"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", sr & 0x8000 ? 'T':'.', sr & 0x4000 ? 't':'.', sr & 0x2000 ? 'S':'.', @@ -1737,11 +1737,15 @@ void m68000_base_device::define_state(void) state_add(M68K_MSP, "MSP", iotemp).callimport().callexport(); state_add(M68K_ISP, "ISP", iotemp).callimport().callexport(); - astring tempstr; - for (int regnum = 0; regnum < 8; regnum++) - state_add(M68K_D0 + regnum, tempstr.format("D%d", regnum).c_str(), dar[regnum]); - for (int regnum = 0; regnum < 8; regnum++) - state_add(M68K_A0 + regnum, tempstr.format("A%d", regnum).c_str(), dar[8 + regnum]); + std::string tempstr; + for (int regnum = 0; regnum < 8; regnum++) { + strprintf(tempstr,"D%d", regnum); + state_add(M68K_D0 + regnum, tempstr.c_str(), dar[regnum]); + } + for (int regnum = 0; regnum < 8; regnum++) { + strprintf(tempstr,"A%d", regnum); + state_add(M68K_A0 + regnum, tempstr.c_str(), dar[8 + regnum]); + } state_add(M68K_PREF_ADDR, "PREF_ADDR", pref_addr).mask(addrmask); state_add(M68K_PREF_DATA, "PREF_DATA", pref_data); @@ -1761,8 +1765,10 @@ void m68000_base_device::define_state(void) if (cpu_type & MASK_030_OR_LATER) { - for (int regnum = 0; regnum < 8; regnum++) - state_add(M68K_FP0 + regnum, tempstr.format("FP%d", regnum).c_str(), iotemp).callimport().callexport().formatstr("%10s"); + for (int regnum = 0; regnum < 8; regnum++) { + strprintf(tempstr,"FP%d", regnum); + state_add(M68K_FP0 + regnum, tempstr.c_str(), iotemp).callimport().callexport().formatstr("%10s"); + } state_add(M68K_FPSR, "FPSR", fpsr); state_add(M68K_FPCR, "FPCR", fpcr); } diff --git a/src/emu/cpu/m68000/m68kops.c b/src/emu/cpu/m68000/m68kops.c index cbb37a99d28..436df1df763 100644 --- a/src/emu/cpu/m68000/m68kops.c +++ b/src/emu/cpu/m68000/m68kops.c @@ -34882,5 +34882,3 @@ void m68ki_build_opcode_table(void) /* ======================================================================== */ /* ============================== END OF FILE ============================= */ /* ======================================================================== */ - - diff --git a/src/emu/cpu/m6805/m6805.c b/src/emu/cpu/m6805/m6805.c index f02b2ca4f09..1c7ed46056c 100644 --- a/src/emu/cpu/m6805/m6805.c +++ b/src/emu/cpu/m6805/m6805.c @@ -422,7 +422,7 @@ void m6805_base_device::device_start() m_icountptr = &m_icount; // register our state for the debugger - astring tempstr; + std::string tempstr; state_add(STATE_GENPC, "GENPC", m_pc.w.l).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_cc).callimport().callexport().formatstr("%8s").noshow(); state_add(M6805_A, "A", m_a).mask(0xff); @@ -492,12 +492,12 @@ const address_space_config *m6805_base_device::memory_space_config(address_space // for the debugger //------------------------------------------------- -void m6805_base_device::state_string_export(const device_state_entry &entry, astring &str) +void m6805_base_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (m_cc & 0x80) ? '?' : '.', (m_cc & 0x40) ? '?' : '.', (m_cc & 0x20) ? '?' : '.', diff --git a/src/emu/cpu/m6805/m6805.h b/src/emu/cpu/m6805/m6805.h index 49bd1f3cdea..8f40ed83c5b 100644 --- a/src/emu/cpu/m6805/m6805.h +++ b/src/emu/cpu/m6805/m6805.h @@ -49,7 +49,7 @@ protected: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); private: // opcode/condition tables diff --git a/src/emu/cpu/m6809/m6809.c b/src/emu/cpu/m6809/m6809.c index bca2f14aaad..df89f3951bb 100644 --- a/src/emu/cpu/m6809/m6809.c +++ b/src/emu/cpu/m6809/m6809.c @@ -127,7 +127,6 @@ void m6809_base_device::device_start() m_lic_func.resolve_safe(); // register our state for the debugger - astring tempstr; state_add(STATE_GENPC, "GENPC", m_pc.w).noshow(); state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc.w).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_cc).callimport().callexport().formatstr("%8s").noshow(); @@ -292,12 +291,12 @@ const address_space_config *m6809_base_device::memory_space_config(address_space // for the debugger //------------------------------------------------- -void m6809_base_device::state_string_export(const device_state_entry &entry, astring &str) +void m6809_base_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (m_cc & 0x80) ? 'E' : '.', (m_cc & 0x40) ? 'F' : '.', (m_cc & 0x20) ? 'H' : '.', diff --git a/src/emu/cpu/m6809/m6809.h b/src/emu/cpu/m6809/m6809.h index aba8a0775e1..805be7be9cf 100644 --- a/src/emu/cpu/m6809/m6809.h +++ b/src/emu/cpu/m6809/m6809.h @@ -61,7 +61,7 @@ protected: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // addressing modes enum diff --git a/src/emu/cpu/mb86233/mb86233.c b/src/emu/cpu/mb86233/mb86233.c index c2961d95cac..886f4a12496 100644 --- a/src/emu/cpu/mb86233/mb86233.c +++ b/src/emu/cpu/mb86233/mb86233.c @@ -158,12 +158,12 @@ void mb86233_cpu_device::device_start() } -void mb86233_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void mb86233_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c", (m_sr & SIGN_FLAG) ? 'N' : 'n', (m_sr & ZERO_FLAG) ? 'Z' : 'z'); + strprintf(str, "%c%c", (m_sr & SIGN_FLAG) ? 'N' : 'n', (m_sr & ZERO_FLAG) ? 'Z' : 'z'); break; } } diff --git a/src/emu/cpu/mb86233/mb86233.h b/src/emu/cpu/mb86233/mb86233.h index 5732cd3546c..d800e3ea49a 100644 --- a/src/emu/cpu/mb86233/mb86233.h +++ b/src/emu/cpu/mb86233/mb86233.h @@ -72,7 +72,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/mb86235/mb86235.c b/src/emu/cpu/mb86235/mb86235.c index 02d9b70eb83..891f9746a91 100644 --- a/src/emu/cpu/mb86235/mb86235.c +++ b/src/emu/cpu/mb86235/mb86235.c @@ -108,12 +108,12 @@ mb86235_cpu_device::mb86235_cpu_device(const machine_config &mconfig, const char } -void mb86235_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void mb86235_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c", + strprintf(str, "%c%c%c%c", m_flags & 0x80 ? 'S':'.', m_flags & 0x40 ? 'Z':'.', m_flags & 0x20 ? 'V':'.', diff --git a/src/emu/cpu/mb86235/mb86235.h b/src/emu/cpu/mb86235/mb86235.h index a53448bf65d..1a6d4c81a4b 100644 --- a/src/emu/cpu/mb86235/mb86235.h +++ b/src/emu/cpu/mb86235/mb86235.h @@ -42,7 +42,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 8; } diff --git a/src/emu/cpu/mb88xx/mb88xx.c b/src/emu/cpu/mb88xx/mb88xx.c index c724dfdcc08..6015091562d 100644 --- a/src/emu/cpu/mb88xx/mb88xx.c +++ b/src/emu/cpu/mb88xx/mb88xx.c @@ -267,12 +267,12 @@ void mb88_cpu_device::state_export(const device_state_entry &entry) } -void mb88_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void mb88_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c", TEST_ST() ? 'T' : 't', TEST_ZF() ? 'Z' : 'z', TEST_CF() ? 'C' : 'c', diff --git a/src/emu/cpu/mb88xx/mb88xx.h b/src/emu/cpu/mb88xx/mb88xx.h index c770dcdd6f9..56ee148181e 100644 --- a/src/emu/cpu/mb88xx/mb88xx.h +++ b/src/emu/cpu/mb88xx/mb88xx.h @@ -88,7 +88,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ) ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); void state_import(const device_state_entry &entry); void state_export(const device_state_entry &entry); diff --git a/src/emu/cpu/mc68hc11/mc68hc11.c b/src/emu/cpu/mc68hc11/mc68hc11.c index c0496c04d03..1f475beb8ba 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.c +++ b/src/emu/cpu/mc68hc11/mc68hc11.c @@ -448,12 +448,12 @@ void mc68hc11_cpu_device::device_start() } -void mc68hc11_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void mc68hc11_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (m_ccr & CC_S) ? 'S' : '.', (m_ccr & CC_X) ? 'X' : '.', (m_ccr & CC_H) ? 'H' : '.', diff --git a/src/emu/cpu/mc68hc11/mc68hc11.h b/src/emu/cpu/mc68hc11/mc68hc11.h index 999a40524d0..dddd9f00a55 100644 --- a/src/emu/cpu/mc68hc11/mc68hc11.h +++ b/src/emu/cpu/mc68hc11/mc68hc11.h @@ -68,7 +68,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/mcs48/mcs48.c b/src/emu/cpu/mcs48/mcs48.c index e3cd5a1b716..303745e444e 100644 --- a/src/emu/cpu/mcs48/mcs48.c +++ b/src/emu/cpu/mcs48/mcs48.c @@ -976,10 +976,11 @@ void mcs48_cpu_device::device_start() state_add(MCS48_P1, "P1", m_p1); state_add(MCS48_P2, "P2", m_p2); - astring tempstr; - for (int regnum = 0; regnum < 8; regnum++) - state_add(MCS48_R0 + regnum, tempstr.format("R%d", regnum).c_str(), m_rtemp).callimport().callexport(); - + std::string tempstr; + for (int regnum = 0; regnum < 8; regnum++) { + strprintf(tempstr, "R%d", regnum); + state_add(MCS48_R0 + regnum, tempstr.c_str(), m_rtemp).callimport().callexport(); + } state_add(MCS48_EA, "EA", m_ea).mask(0x1); if (m_feature_mask & UPI41_FEATURE) @@ -1295,12 +1296,12 @@ void mcs48_cpu_device::state_export(const device_state_entry &entry) } } -void mcs48_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void mcs48_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c %c%c%c%c%c%c%c%c", + strprintf(str, "%c%c %c%c%c%c%c%c%c%c", m_irq_state ? 'I':'.', m_a11 ? 'M':'.', m_psw & 0x80 ? 'C':'.', diff --git a/src/emu/cpu/mcs48/mcs48.h b/src/emu/cpu/mcs48/mcs48.h index 655c8111f07..7bdc32e75e6 100644 --- a/src/emu/cpu/mcs48/mcs48.h +++ b/src/emu/cpu/mcs48/mcs48.h @@ -150,7 +150,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/mcs51/mcs51.c b/src/emu/cpu/mcs51/mcs51.c index ce53db78330..f03c7decdf6 100644 --- a/src/emu/cpu/mcs51/mcs51.c +++ b/src/emu/cpu/mcs51/mcs51.c @@ -2223,12 +2223,12 @@ void mcs51_cpu_device::state_export(const device_state_entry &entry) } } -void mcs51_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void mcs51_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str,"%c%c%c%c%c%c%c%c", PSW & 0x80 ? 'C':'.', PSW & 0x40 ? 'A':'.', PSW & 0x20 ? 'F':'.', diff --git a/src/emu/cpu/mcs51/mcs51.h b/src/emu/cpu/mcs51/mcs51.h index 27f4fedf842..d02bb02797d 100644 --- a/src/emu/cpu/mcs51/mcs51.h +++ b/src/emu/cpu/mcs51/mcs51.h @@ -119,7 +119,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } @@ -150,7 +150,7 @@ protected: UINT8 m_irq_active; /* mask which irq levels are serviced */ UINT8 m_irq_prio[8]; /* interrupt priority */ - UINT8 m_forced_inputs[4]; /* allow read even if configured as output */ + UINT8 m_forced_inputs[4]; /* allow read even if configured as output */ int m_icount; diff --git a/src/emu/cpu/mcs96/mcs96.c b/src/emu/cpu/mcs96/mcs96.c index 942693b3088..b905c2db8b1 100644 --- a/src/emu/cpu/mcs96/mcs96.c +++ b/src/emu/cpu/mcs96/mcs96.c @@ -156,12 +156,12 @@ void mcs96_device::state_export(const device_state_entry &entry) { } -void mcs96_device::state_string_export(const device_state_entry &entry, astring &str) +void mcs96_device::state_string_export(const device_state_entry &entry, std::string &str) { switch(entry.index()) { case STATE_GENFLAGS: case MCS96_PSW: - str.printf("%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c", PSW & F_Z ? 'Z' : '.', PSW & F_N ? 'N' : '.', PSW & F_V ? 'V' : '.', @@ -181,7 +181,7 @@ void mcs96_device::state_string_export(const device_state_entry &entry, astring } } -astring mcs96_device::regname(UINT8 reg) +std::string mcs96_device::regname(UINT8 reg) { char res[32]; switch(reg) { diff --git a/src/emu/cpu/mcs96/mcs96.h b/src/emu/cpu/mcs96/mcs96.h index d80dcf372c7..4858d455ce6 100644 --- a/src/emu/cpu/mcs96/mcs96.h +++ b/src/emu/cpu/mcs96/mcs96.h @@ -114,7 +114,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; @@ -143,7 +143,7 @@ protected: virtual UINT16 io_r16(UINT8 adr) = 0; void recompute_bcount(UINT64 event_time); - static astring regname(UINT8 reg); + static std::string regname(UINT8 reg); inline void next(int cycles) { icount -= cycles_scaling*cycles; inst_state = STATE_FETCH; } inline void next_noirq(int cycles) { icount -= cycles_scaling*cycles; inst_state = STATE_FETCH_NOIRQ; } diff --git a/src/emu/cpu/minx/minx.c b/src/emu/cpu/minx/minx.c index 700de4bf874..85e450d5646 100644 --- a/src/emu/cpu/minx/minx.c +++ b/src/emu/cpu/minx/minx.c @@ -119,12 +119,12 @@ void minx_cpu_device::device_start() } -void minx_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void minx_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c-%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c-%c%c%c%c%c", m_F & FLAG_I ? 'I' : '.', m_F & FLAG_D ? 'D' : '.', m_F & FLAG_L ? 'L' : '.', diff --git a/src/emu/cpu/minx/minx.h b/src/emu/cpu/minx/minx.h index 3f833da028e..eb7dbe5e9e9 100644 --- a/src/emu/cpu/minx/minx.h +++ b/src/emu/cpu/minx/minx.h @@ -34,7 +34,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/mips/mips3.c b/src/emu/cpu/mips/mips3.c index 9baf8542c57..3ffdd64aac7 100644 --- a/src/emu/cpu/mips/mips3.c +++ b/src/emu/cpu/mips/mips3.c @@ -661,268 +661,268 @@ void mips3_device::state_export(const device_state_entry &entry) } -void mips3_device::state_string_export(const device_state_entry &entry, astring &str) +void mips3_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case MIPS3_FPS0: - str.printf("!%16g", *(float *)&m_core->cpr[1][0]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][0]); break; case MIPS3_FPD0: - str.printf("!%16g", *(double *)&m_core->cpr[1][0]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][0]); break; case MIPS3_FPS1: - str.printf("!%16g", *(float *)&m_core->cpr[1][1]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][1]); break; case MIPS3_FPD1: - str.printf("!%16g", *(double *)&m_core->cpr[1][1]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][1]); break; case MIPS3_FPS2: - str.printf("!%16g", *(float *)&m_core->cpr[1][2]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][2]); break; case MIPS3_FPD2: - str.printf("!%16g", *(double *)&m_core->cpr[1][2]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][2]); break; case MIPS3_FPS3: - str.printf("!%16g", *(float *)&m_core->cpr[1][3]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][3]); break; case MIPS3_FPD3: - str.printf("!%16g", *(double *)&m_core->cpr[1][3]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][3]); break; case MIPS3_FPS4: - str.printf("!%16g", *(float *)&m_core->cpr[1][4]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][4]); break; case MIPS3_FPD4: - str.printf("!%16g", *(double *)&m_core->cpr[1][4]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][4]); break; case MIPS3_FPS5: - str.printf("!%16g", *(float *)&m_core->cpr[1][5]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][5]); break; case MIPS3_FPD5: - str.printf("!%16g", *(double *)&m_core->cpr[1][5]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][5]); break; case MIPS3_FPS6: - str.printf("!%16g", *(float *)&m_core->cpr[1][6]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][6]); break; case MIPS3_FPD6: - str.printf("!%16g", *(double *)&m_core->cpr[1][6]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][6]); break; case MIPS3_FPS7: - str.printf("!%16g", *(float *)&m_core->cpr[1][7]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][7]); break; case MIPS3_FPD7: - str.printf("!%16g", *(double *)&m_core->cpr[1][7]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][7]); break; case MIPS3_FPS8: - str.printf("!%16g", *(float *)&m_core->cpr[1][8]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][8]); break; case MIPS3_FPD8: - str.printf("!%16g", *(double *)&m_core->cpr[1][8]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][8]); break; case MIPS3_FPS9: - str.printf("!%16g", *(float *)&m_core->cpr[1][9]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][9]); break; case MIPS3_FPD9: - str.printf("!%16g", *(double *)&m_core->cpr[1][9]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][9]); break; case MIPS3_FPS10: - str.printf("!%16g", *(float *)&m_core->cpr[1][10]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][10]); break; case MIPS3_FPD10: - str.printf("!%16g", *(double *)&m_core->cpr[1][10]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][10]); break; case MIPS3_FPS11: - str.printf("!%16g", *(float *)&m_core->cpr[1][11]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][11]); break; case MIPS3_FPD11: - str.printf("!%16g", *(double *)&m_core->cpr[1][11]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][11]); break; case MIPS3_FPS12: - str.printf("!%16g", *(float *)&m_core->cpr[1][12]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][12]); break; case MIPS3_FPD12: - str.printf("!%16g", *(double *)&m_core->cpr[1][12]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][12]); break; case MIPS3_FPS13: - str.printf("!%16g", *(float *)&m_core->cpr[1][13]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][13]); break; case MIPS3_FPD13: - str.printf("!%16g", *(double *)&m_core->cpr[1][13]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][13]); break; case MIPS3_FPS14: - str.printf("!%16g", *(float *)&m_core->cpr[1][14]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][14]); break; case MIPS3_FPD14: - str.printf("!%16g", *(double *)&m_core->cpr[1][14]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][14]); break; case MIPS3_FPS15: - str.printf("!%16g", *(float *)&m_core->cpr[1][15]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][15]); break; case MIPS3_FPD15: - str.printf("!%16g", *(double *)&m_core->cpr[1][15]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][15]); break; case MIPS3_FPS16: - str.printf("!%16g", *(float *)&m_core->cpr[1][16]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][16]); break; case MIPS3_FPD16: - str.printf("!%16g", *(double *)&m_core->cpr[1][16]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][16]); break; case MIPS3_FPS17: - str.printf("!%16g", *(float *)&m_core->cpr[1][17]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][17]); break; case MIPS3_FPD17: - str.printf("!%16g", *(double *)&m_core->cpr[1][17]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][17]); break; case MIPS3_FPS18: - str.printf("!%16g", *(float *)&m_core->cpr[1][18]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][18]); break; case MIPS3_FPD18: - str.printf("!%16g", *(double *)&m_core->cpr[1][18]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][18]); break; case MIPS3_FPS19: - str.printf("!%16g", *(float *)&m_core->cpr[1][19]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][19]); break; case MIPS3_FPD19: - str.printf("!%16g", *(double *)&m_core->cpr[1][19]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][19]); break; case MIPS3_FPS20: - str.printf("!%16g", *(float *)&m_core->cpr[1][20]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][20]); break; case MIPS3_FPD20: - str.printf("!%16g", *(double *)&m_core->cpr[1][20]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][20]); break; case MIPS3_FPS21: - str.printf("!%16g", *(float *)&m_core->cpr[1][21]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][21]); break; case MIPS3_FPD21: - str.printf("!%16g", *(double *)&m_core->cpr[1][21]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][21]); break; case MIPS3_FPS22: - str.printf("!%16g", *(float *)&m_core->cpr[1][22]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][22]); break; case MIPS3_FPD22: - str.printf("!%16g", *(double *)&m_core->cpr[1][22]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][22]); break; case MIPS3_FPS23: - str.printf("!%16g", *(float *)&m_core->cpr[1][23]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][23]); break; case MIPS3_FPD23: - str.printf("!%16g", *(double *)&m_core->cpr[1][23]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][23]); break; case MIPS3_FPS24: - str.printf("!%16g", *(float *)&m_core->cpr[1][24]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][24]); break; case MIPS3_FPD24: - str.printf("!%16g", *(double *)&m_core->cpr[1][24]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][24]); break; case MIPS3_FPS25: - str.printf("!%16g", *(float *)&m_core->cpr[1][25]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][25]); break; case MIPS3_FPD25: - str.printf("!%16g", *(double *)&m_core->cpr[1][25]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][25]); break; case MIPS3_FPS26: - str.printf("!%16g", *(float *)&m_core->cpr[1][26]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][26]); break; case MIPS3_FPD26: - str.printf("!%16g", *(double *)&m_core->cpr[1][26]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][26]); break; case MIPS3_FPS27: - str.printf("!%16g", *(float *)&m_core->cpr[1][27]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][27]); break; case MIPS3_FPD27: - str.printf("!%16g", *(double *)&m_core->cpr[1][27]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][27]); break; case MIPS3_FPS28: - str.printf("!%16g", *(float *)&m_core->cpr[1][28]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][28]); break; case MIPS3_FPD28: - str.printf("!%16g", *(double *)&m_core->cpr[1][28]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][28]); break; case MIPS3_FPS29: - str.printf("!%16g", *(float *)&m_core->cpr[1][29]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][29]); break; case MIPS3_FPD29: - str.printf("!%16g", *(double *)&m_core->cpr[1][29]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][29]); break; case MIPS3_FPS30: - str.printf("!%16g", *(float *)&m_core->cpr[1][30]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][30]); break; case MIPS3_FPD30: - str.printf("!%16g", *(double *)&m_core->cpr[1][30]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][30]); break; case MIPS3_FPS31: - str.printf("!%16g", *(float *)&m_core->cpr[1][31]); + strprintf(str, "!%16g", *(float *)&m_core->cpr[1][31]); break; case MIPS3_FPD31: - str.printf("!%16g", *(double *)&m_core->cpr[1][31]); + strprintf(str, "!%16g", *(double *)&m_core->cpr[1][31]); break; case STATE_GENFLAGS: - str.printf(" "); + strprintf(str, " "); break; } } diff --git a/src/emu/cpu/mips/mips3.h b/src/emu/cpu/mips/mips3.h index b9737128098..e527b4715b4 100644 --- a/src/emu/cpu/mips/mips3.h +++ b/src/emu/cpu/mips/mips3.h @@ -320,7 +320,7 @@ protected: // device_state_interface overrides virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } @@ -396,8 +396,8 @@ private: /* memory accesses */ bool m_bigendian; - UINT32 m_byte_xor; - UINT32 m_word_xor; + UINT32 m_byte_xor; + UINT32 m_word_xor; data_accessors m_memory; /* cache memory */ diff --git a/src/emu/cpu/mips/r3000.c b/src/emu/cpu/mips/r3000.c index 4214857f5b9..5e6fa280884 100644 --- a/src/emu/cpu/mips/r3000.c +++ b/src/emu/cpu/mips/r3000.c @@ -443,7 +443,7 @@ void r3000_device::state_export(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void r3000_device::state_string_export(const device_state_entry &entry, astring &str) +void r3000_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { diff --git a/src/emu/cpu/mips/r3000.h b/src/emu/cpu/mips/r3000.h index cfcc4e1e0f1..da008d2b213 100644 --- a/src/emu/cpu/mips/r3000.h +++ b/src/emu/cpu/mips/r3000.h @@ -126,7 +126,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/mn10200/mn10200.c b/src/emu/cpu/mn10200/mn10200.c index 01c8f3ecdab..4456a65e70e 100644 --- a/src/emu/cpu/mn10200/mn10200.c +++ b/src/emu/cpu/mn10200/mn10200.c @@ -174,12 +174,12 @@ void mn10200_device::device_start() } -void mn10200_device::state_string_export(const device_state_entry &entry, astring &str) +void mn10200_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("S=%d irq=%s im=%d %c%c%c%c %c%c%c%c", + strprintf(str, "S=%d irq=%s im=%d %c%c%c%c %c%c%c%c", (m_psw >> 12) & 3, m_psw & FLAG_IE ? "on " : "off", (m_psw >> 8) & 7, diff --git a/src/emu/cpu/mn10200/mn10200.h b/src/emu/cpu/mn10200/mn10200.h index 712334e1d3b..d5e072e3844 100644 --- a/src/emu/cpu/mn10200/mn10200.h +++ b/src/emu/cpu/mn10200/mn10200.h @@ -86,7 +86,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c index ea1593f7a1c..de109bfa176 100644 --- a/src/emu/cpu/nec/nec.c +++ b/src/emu/cpu/nec/nec.c @@ -435,14 +435,14 @@ void nec_common_device::device_start() m_icountptr = &m_icount; } -void nec_common_device::state_string_export(const device_state_entry &entry, astring &str) +void nec_common_device::state_string_export(const device_state_entry &entry, std::string &str) { UINT16 flags = CompressFlags(); switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", flags & 0x8000 ? 'N':'E', flags & 0x4000 ? '?':'.', flags & 0x2000 ? '?':'.', diff --git a/src/emu/cpu/nec/nec.h b/src/emu/cpu/nec/nec.h index 6cf7c9c0554..8321fcde1af 100644 --- a/src/emu/cpu/nec/nec.h +++ b/src/emu/cpu/nec/nec.h @@ -40,7 +40,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); diff --git a/src/emu/cpu/nec/v25.c b/src/emu/cpu/nec/v25.c index 2b542b84f45..b4cb319e7f8 100644 --- a/src/emu/cpu/nec/v25.c +++ b/src/emu/cpu/nec/v25.c @@ -523,14 +523,14 @@ void v25_common_device::device_start() } -void v25_common_device::state_string_export(const device_state_entry &entry, astring &str) +void v25_common_device::state_string_export(const device_state_entry &entry, std::string &str) { UINT16 flags = CompressFlags(); switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c %d %c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c %d %c%c%c%c%c%c%c%c%c%c%c%c", flags & 0x8000 ? 'N':'S', (flags & 0x7000) >> 12, flags & 0x0800 ? 'O':'.', diff --git a/src/emu/cpu/nec/v25.h b/src/emu/cpu/nec/v25.h index 7f467d891f1..be67e7fe7c9 100644 --- a/src/emu/cpu/nec/v25.h +++ b/src/emu/cpu/nec/v25.h @@ -57,7 +57,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); diff --git a/src/emu/cpu/nec/v53.c b/src/emu/cpu/nec/v53.c index 36e8d9da5a4..bbec2d042e3 100644 --- a/src/emu/cpu/nec/v53.c +++ b/src/emu/cpu/nec/v53.c @@ -477,8 +477,8 @@ static MACHINE_CONFIG_FRAGMENT( v53 ) MCFG_DEVICE_ADD("pit", PIT8254, 0) // functionality identical to uPD71054 MCFG_PIT8253_CLK0(16000000) // manual implicitly claims that these runs at same speed as the CPU - MCFG_PIT8253_CLK1(16000000) - MCFG_PIT8253_CLK2(16000000) + MCFG_PIT8253_CLK1(16000000) + MCFG_PIT8253_CLK2(16000000) MCFG_PIT8253_OUT0_HANDLER(WRITELINE( v53_base_device, tcu_out0_trampoline_cb )) MCFG_PIT8253_OUT1_HANDLER(WRITELINE( v53_base_device, tcu_out1_trampoline_cb )) MCFG_PIT8253_OUT2_HANDLER(WRITELINE( v53_base_device, tcu_out2_trampoline_cb )) diff --git a/src/emu/cpu/pdp1/pdp1.c b/src/emu/cpu/pdp1/pdp1.c index 96346ad71a7..c31313cf7b8 100644 --- a/src/emu/cpu/pdp1/pdp1.c +++ b/src/emu/cpu/pdp1/pdp1.c @@ -735,12 +735,12 @@ void pdp1_device::state_export(const device_state_entry &entry) } -void pdp1_device::state_string_export(const device_state_entry &entry, astring &str) +void pdp1_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c-%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c-%c%c%c%c%c%c", (FLAGS & 040) ? '1' : '.', (FLAGS & 020) ? '2' : '.', (FLAGS & 010) ? '3' : '.', diff --git a/src/emu/cpu/pdp1/pdp1.h b/src/emu/cpu/pdp1/pdp1.h index ba39bf8e4f7..d6b7fe1f2eb 100644 --- a/src/emu/cpu/pdp1/pdp1.h +++ b/src/emu/cpu/pdp1/pdp1.h @@ -105,7 +105,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c index b1f9b2aefc6..78be71b5499 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.c +++ b/src/emu/cpu/pic16c5x/pic16c5x.c @@ -921,16 +921,16 @@ void pic16c5x_device::state_export(const device_state_entry &entry) } } -void pic16c5x_device::state_string_export(const device_state_entry &entry, astring &str) +void pic16c5x_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case PIC16C5x_PSCL: - str.printf("%c%02X", ((m_OPTION & 0x08) ? 'W' : 'T'), m_prescaler); + strprintf(str, "%c%02X", ((m_OPTION & 0x08) ? 'W' : 'T'), m_prescaler); break; case STATE_GENFLAGS: - str.printf("%01x%c%c%c%c%c %c%c%c%03x", + strprintf(str, "%01x%c%c%c%c%c %c%c%c%03x", (STATUS & 0xe0) >> 5, STATUS & 0x10 ? '.':'O', /* WDT Overflow */ STATUS & 0x08 ? 'P':'D', /* Power/Down */ diff --git a/src/emu/cpu/pic16c5x/pic16c5x.h b/src/emu/cpu/pic16c5x/pic16c5x.h index fbf3815281b..41b1bb9ebd8 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.h +++ b/src/emu/cpu/pic16c5x/pic16c5x.h @@ -115,7 +115,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/pic16c62x/pic16c62x.c b/src/emu/cpu/pic16c62x/pic16c62x.c index 403fdd9ac04..4f6fa19fc75 100644 --- a/src/emu/cpu/pic16c62x/pic16c62x.c +++ b/src/emu/cpu/pic16c62x/pic16c62x.c @@ -979,16 +979,16 @@ void pic16c62x_device::state_export(const device_state_entry &entry) } } -void pic16c62x_device::state_string_export(const device_state_entry &entry, astring &str) +void pic16c62x_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case PIC16C62x_PSCL: - str.printf("%c%02X", ((m_OPTION & 0x08) ? 'W' : 'T'), m_prescaler); + strprintf(str, "%c%02X", ((m_OPTION & 0x08) ? 'W' : 'T'), m_prescaler); break; case STATE_GENFLAGS: - str.printf("%01x%c%c%c%c%c %c%c%c%03x", + strprintf(str, "%01x%c%c%c%c%c %c%c%c%03x", (STATUS & 0xe0) >> 5, STATUS & 0x10 ? '.':'O', /* WDT Overflow */ STATUS & 0x08 ? 'P':'D', /* Power/Down */ diff --git a/src/emu/cpu/pic16c62x/pic16c62x.h b/src/emu/cpu/pic16c62x/pic16c62x.h index 6ba54df93be..55c6f963728 100644 --- a/src/emu/cpu/pic16c62x/pic16c62x.h +++ b/src/emu/cpu/pic16c62x/pic16c62x.h @@ -86,7 +86,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/powerpc/ppc.h b/src/emu/cpu/powerpc/ppc.h index f3ef96a7fce..9fe6bcb6fe1 100644 --- a/src/emu/cpu/powerpc/ppc.h +++ b/src/emu/cpu/powerpc/ppc.h @@ -265,7 +265,7 @@ protected: // device_state_interface overrides virtual void state_export(const device_state_entry &entry); virtual void state_import(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/powerpc/ppccom.c b/src/emu/cpu/powerpc/ppccom.c index 1c528b3204a..6f91b4a96e8 100644 --- a/src/emu/cpu/powerpc/ppccom.c +++ b/src/emu/cpu/powerpc/ppccom.c @@ -1007,136 +1007,136 @@ void ppc_device::state_import(const device_state_entry &entry) } -void ppc_device::state_string_export(const device_state_entry &entry, astring &str) +void ppc_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case PPC_F0: - str.printf("%12f", m_core->f[0]); + strprintf(str, "%12f", m_core->f[0]); break; case PPC_F1: - str.printf("%12f", m_core->f[1]); + strprintf(str, "%12f", m_core->f[1]); break; case PPC_F2: - str.printf("%12f", m_core->f[2]); + strprintf(str, "%12f", m_core->f[2]); break; case PPC_F3: - str.printf("%12f", m_core->f[3]); + strprintf(str, "%12f", m_core->f[3]); break; case PPC_F4: - str.printf("%12f", m_core->f[4]); + strprintf(str, "%12f", m_core->f[4]); break; case PPC_F5: - str.printf("%12f", m_core->f[5]); + strprintf(str, "%12f", m_core->f[5]); break; case PPC_F6: - str.printf("%12f", m_core->f[6]); + strprintf(str, "%12f", m_core->f[6]); break; case PPC_F7: - str.printf("%12f", m_core->f[7]); + strprintf(str, "%12f", m_core->f[7]); break; case PPC_F8: - str.printf("%12f", m_core->f[8]); + strprintf(str, "%12f", m_core->f[8]); break; case PPC_F9: - str.printf("%12f", m_core->f[9]); + strprintf(str, "%12f", m_core->f[9]); break; case PPC_F10: - str.printf("%12f", m_core->f[10]); + strprintf(str, "%12f", m_core->f[10]); break; case PPC_F11: - str.printf("%12f", m_core->f[11]); + strprintf(str, "%12f", m_core->f[11]); break; case PPC_F12: - str.printf("%12f", m_core->f[12]); + strprintf(str, "%12f", m_core->f[12]); break; case PPC_F13: - str.printf("%12f", m_core->f[13]); + strprintf(str, "%12f", m_core->f[13]); break; case PPC_F14: - str.printf("%12f", m_core->f[14]); + strprintf(str, "%12f", m_core->f[14]); break; case PPC_F15: - str.printf("%12f", m_core->f[15]); + strprintf(str, "%12f", m_core->f[15]); break; case PPC_F16: - str.printf("%12f", m_core->f[16]); + strprintf(str, "%12f", m_core->f[16]); break; case PPC_F17: - str.printf("%12f", m_core->f[17]); + strprintf(str, "%12f", m_core->f[17]); break; case PPC_F18: - str.printf("%12f", m_core->f[18]); + strprintf(str, "%12f", m_core->f[18]); break; case PPC_F19: - str.printf("%12f", m_core->f[19]); + strprintf(str, "%12f", m_core->f[19]); break; case PPC_F20: - str.printf("%12f", m_core->f[20]); + strprintf(str, "%12f", m_core->f[20]); break; case PPC_F21: - str.printf("%12f", m_core->f[21]); + strprintf(str, "%12f", m_core->f[21]); break; case PPC_F22: - str.printf("%12f", m_core->f[22]); + strprintf(str, "%12f", m_core->f[22]); break; case PPC_F23: - str.printf("%12f", m_core->f[23]); + strprintf(str, "%12f", m_core->f[23]); break; case PPC_F24: - str.printf("%12f", m_core->f[24]); + strprintf(str, "%12f", m_core->f[24]); break; case PPC_F25: - str.printf("%12f", m_core->f[25]); + strprintf(str, "%12f", m_core->f[25]); break; case PPC_F26: - str.printf("%12f", m_core->f[26]); + strprintf(str, "%12f", m_core->f[26]); break; case PPC_F27: - str.printf("%12f", m_core->f[27]); + strprintf(str, "%12f", m_core->f[27]); break; case PPC_F28: - str.printf("%12f", m_core->f[28]); + strprintf(str, "%12f", m_core->f[28]); break; case PPC_F29: - str.printf("%12f", m_core->f[29]); + strprintf(str, "%12f", m_core->f[29]); break; case PPC_F30: - str.printf("%12f", m_core->f[30]); + strprintf(str, "%12f", m_core->f[30]); break; case PPC_F31: - str.printf("%12f", m_core->f[31]); + strprintf(str, "%12f", m_core->f[31]); break; } } diff --git a/src/emu/cpu/pps4/pps4.c b/src/emu/cpu/pps4/pps4.c index 47ea940d202..3a942aa6cca 100644 --- a/src/emu/cpu/pps4/pps4.c +++ b/src/emu/cpu/pps4/pps4.c @@ -1552,12 +1552,12 @@ void pps4_device::device_start() m_icountptr = &m_icount; } -void pps4_device::state_string_export(const device_state_entry &entry, astring &str) +void pps4_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c", + strprintf(str, "%c%c%c", m_C ? 'C':'.', m_FF1 ? '1':'.', m_FF2 ? '2':'.'); diff --git a/src/emu/cpu/pps4/pps4.h b/src/emu/cpu/pps4/pps4.h index cfa1fa50b6f..d459591a7c0 100644 --- a/src/emu/cpu/pps4/pps4.h +++ b/src/emu/cpu/pps4/pps4.h @@ -62,7 +62,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/psx/psx.c b/src/emu/cpu/psx/psx.c index 00aeb6fcfb5..bb0d07a13b6 100644 --- a/src/emu/cpu/psx/psx.c +++ b/src/emu/cpu/psx/psx.c @@ -2025,18 +2025,18 @@ void psxcpu_device::state_import( const device_state_entry &entry ) // for the debugger //------------------------------------------------- -void psxcpu_device::state_string_export( const device_state_entry &entry, astring &str ) +void psxcpu_device::state_string_export( const device_state_entry &entry, std::string &str ) { switch( entry.index() ) { case PSXCPU_DELAYR: if( m_delayr <= PSXCPU_DELAYR_NOTPC ) { - str.printf("%02x %-3s", m_delayr, delayn[m_delayr]); + strprintf(str, "%02x %-3s", m_delayr, delayn[m_delayr]); } else { - str.printf("%02x ---", m_delayr); + strprintf(str, "%02x ---", m_delayr); } break; } diff --git a/src/emu/cpu/psx/psx.h b/src/emu/cpu/psx/psx.h index 3839be8d21f..7fe938349eb 100644 --- a/src/emu/cpu/psx/psx.h +++ b/src/emu/cpu/psx/psx.h @@ -220,7 +220,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/psx/rcnt.c b/src/emu/cpu/psx/rcnt.c index cfe0f17c345..fe2bb9143ad 100644 --- a/src/emu/cpu/psx/rcnt.c +++ b/src/emu/cpu/psx/rcnt.c @@ -58,10 +58,10 @@ void psxrcnt_device::device_start() for( n = 0; n < 3; n++ ) { root_counter[ n ].timer = timer_alloc(n); - state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_count ); - state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_mode ); - state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_target ); - state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_start ); + save_item(NAME(root_counter[ n ].n_count), n); + save_item(NAME(root_counter[ n ].n_mode), n); + save_item(NAME(root_counter[ n ].n_target), n); + save_item(NAME(root_counter[ n ].n_start), n); root_counter[ n ].n_count = 0; root_counter[ n ].n_mode = 0; root_counter[ n ].n_target = 0; diff --git a/src/emu/cpu/rsp/rsp.c b/src/emu/cpu/rsp/rsp.c index 25b096cb45f..49ad29975b1 100644 --- a/src/emu/cpu/rsp/rsp.c +++ b/src/emu/cpu/rsp/rsp.c @@ -537,7 +537,7 @@ void rsp_device::state_export(const device_state_entry &entry) } } -void rsp_device::state_string_export(const device_state_entry &entry, astring &str) +void rsp_device::state_string_export(const device_state_entry &entry, std::string &str) { const int index = entry.index(); if (index >= RSP_V0 && index <= RSP_V31) @@ -546,7 +546,7 @@ void rsp_device::state_string_export(const device_state_entry &entry, astring &s } else if (index == STATE_GENFLAGS) { - str.printf("%s", ""); + strprintf(str, "%s", ""); } } diff --git a/src/emu/cpu/rsp/rsp.h b/src/emu/cpu/rsp/rsp.h index a7db6341b6f..dba8ff38b7b 100644 --- a/src/emu/cpu/rsp/rsp.h +++ b/src/emu/cpu/rsp/rsp.h @@ -185,7 +185,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/rsp/rspcp2.c b/src/emu/cpu/rsp/rspcp2.c index 225a6d31bca..681d503c878 100644 --- a/src/emu/cpu/rsp/rspcp2.c +++ b/src/emu/cpu/rsp/rspcp2.c @@ -171,105 +171,105 @@ void rsp_cop2::start() } } -void rsp_cop2::state_string_export(const int index, astring &str) +void rsp_cop2::state_string_export(const int index, std::string &str) { switch (index) { case RSP_V0: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 0, 0), (UINT16)VREG_S( 0, 1), (UINT16)VREG_S( 0, 2), (UINT16)VREG_S( 0, 3), (UINT16)VREG_S( 0, 4), (UINT16)VREG_S( 0, 5), (UINT16)VREG_S( 0, 6), (UINT16)VREG_S( 0, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 0, 0), (UINT16)VREG_S( 0, 1), (UINT16)VREG_S( 0, 2), (UINT16)VREG_S( 0, 3), (UINT16)VREG_S( 0, 4), (UINT16)VREG_S( 0, 5), (UINT16)VREG_S( 0, 6), (UINT16)VREG_S( 0, 7)); break; case RSP_V1: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 1, 0), (UINT16)VREG_S( 1, 1), (UINT16)VREG_S( 1, 2), (UINT16)VREG_S( 1, 3), (UINT16)VREG_S( 1, 4), (UINT16)VREG_S( 1, 5), (UINT16)VREG_S( 1, 6), (UINT16)VREG_S( 1, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 1, 0), (UINT16)VREG_S( 1, 1), (UINT16)VREG_S( 1, 2), (UINT16)VREG_S( 1, 3), (UINT16)VREG_S( 1, 4), (UINT16)VREG_S( 1, 5), (UINT16)VREG_S( 1, 6), (UINT16)VREG_S( 1, 7)); break; case RSP_V2: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 2, 0), (UINT16)VREG_S( 2, 1), (UINT16)VREG_S( 2, 2), (UINT16)VREG_S( 2, 3), (UINT16)VREG_S( 2, 4), (UINT16)VREG_S( 2, 5), (UINT16)VREG_S( 2, 6), (UINT16)VREG_S( 2, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 2, 0), (UINT16)VREG_S( 2, 1), (UINT16)VREG_S( 2, 2), (UINT16)VREG_S( 2, 3), (UINT16)VREG_S( 2, 4), (UINT16)VREG_S( 2, 5), (UINT16)VREG_S( 2, 6), (UINT16)VREG_S( 2, 7)); break; case RSP_V3: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 3, 0), (UINT16)VREG_S( 3, 1), (UINT16)VREG_S( 3, 2), (UINT16)VREG_S( 3, 3), (UINT16)VREG_S( 3, 4), (UINT16)VREG_S( 3, 5), (UINT16)VREG_S( 3, 6), (UINT16)VREG_S( 3, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 3, 0), (UINT16)VREG_S( 3, 1), (UINT16)VREG_S( 3, 2), (UINT16)VREG_S( 3, 3), (UINT16)VREG_S( 3, 4), (UINT16)VREG_S( 3, 5), (UINT16)VREG_S( 3, 6), (UINT16)VREG_S( 3, 7)); break; case RSP_V4: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 4, 0), (UINT16)VREG_S( 4, 1), (UINT16)VREG_S( 4, 2), (UINT16)VREG_S( 4, 3), (UINT16)VREG_S( 4, 4), (UINT16)VREG_S( 4, 5), (UINT16)VREG_S( 4, 6), (UINT16)VREG_S( 4, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 4, 0), (UINT16)VREG_S( 4, 1), (UINT16)VREG_S( 4, 2), (UINT16)VREG_S( 4, 3), (UINT16)VREG_S( 4, 4), (UINT16)VREG_S( 4, 5), (UINT16)VREG_S( 4, 6), (UINT16)VREG_S( 4, 7)); break; case RSP_V5: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 5, 0), (UINT16)VREG_S( 5, 1), (UINT16)VREG_S( 5, 2), (UINT16)VREG_S( 5, 3), (UINT16)VREG_S( 5, 4), (UINT16)VREG_S( 5, 5), (UINT16)VREG_S( 5, 6), (UINT16)VREG_S( 5, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 5, 0), (UINT16)VREG_S( 5, 1), (UINT16)VREG_S( 5, 2), (UINT16)VREG_S( 5, 3), (UINT16)VREG_S( 5, 4), (UINT16)VREG_S( 5, 5), (UINT16)VREG_S( 5, 6), (UINT16)VREG_S( 5, 7)); break; case RSP_V6: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 6, 0), (UINT16)VREG_S( 6, 1), (UINT16)VREG_S( 6, 2), (UINT16)VREG_S( 6, 3), (UINT16)VREG_S( 6, 4), (UINT16)VREG_S( 6, 5), (UINT16)VREG_S( 6, 6), (UINT16)VREG_S( 6, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 6, 0), (UINT16)VREG_S( 6, 1), (UINT16)VREG_S( 6, 2), (UINT16)VREG_S( 6, 3), (UINT16)VREG_S( 6, 4), (UINT16)VREG_S( 6, 5), (UINT16)VREG_S( 6, 6), (UINT16)VREG_S( 6, 7)); break; case RSP_V7: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 7, 0), (UINT16)VREG_S( 7, 1), (UINT16)VREG_S( 7, 2), (UINT16)VREG_S( 7, 3), (UINT16)VREG_S( 7, 4), (UINT16)VREG_S( 7, 5), (UINT16)VREG_S( 7, 6), (UINT16)VREG_S( 7, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 7, 0), (UINT16)VREG_S( 7, 1), (UINT16)VREG_S( 7, 2), (UINT16)VREG_S( 7, 3), (UINT16)VREG_S( 7, 4), (UINT16)VREG_S( 7, 5), (UINT16)VREG_S( 7, 6), (UINT16)VREG_S( 7, 7)); break; case RSP_V8: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 8, 0), (UINT16)VREG_S( 8, 1), (UINT16)VREG_S( 8, 2), (UINT16)VREG_S( 8, 3), (UINT16)VREG_S( 8, 4), (UINT16)VREG_S( 8, 5), (UINT16)VREG_S( 8, 6), (UINT16)VREG_S( 8, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 8, 0), (UINT16)VREG_S( 8, 1), (UINT16)VREG_S( 8, 2), (UINT16)VREG_S( 8, 3), (UINT16)VREG_S( 8, 4), (UINT16)VREG_S( 8, 5), (UINT16)VREG_S( 8, 6), (UINT16)VREG_S( 8, 7)); break; case RSP_V9: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 9, 0), (UINT16)VREG_S( 9, 1), (UINT16)VREG_S( 9, 2), (UINT16)VREG_S( 9, 3), (UINT16)VREG_S( 9, 4), (UINT16)VREG_S( 9, 5), (UINT16)VREG_S( 9, 6), (UINT16)VREG_S( 9, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 9, 0), (UINT16)VREG_S( 9, 1), (UINT16)VREG_S( 9, 2), (UINT16)VREG_S( 9, 3), (UINT16)VREG_S( 9, 4), (UINT16)VREG_S( 9, 5), (UINT16)VREG_S( 9, 6), (UINT16)VREG_S( 9, 7)); break; case RSP_V10: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(10, 0), (UINT16)VREG_S(10, 1), (UINT16)VREG_S(10, 2), (UINT16)VREG_S(10, 3), (UINT16)VREG_S(10, 4), (UINT16)VREG_S(10, 5), (UINT16)VREG_S(10, 6), (UINT16)VREG_S(10, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(10, 0), (UINT16)VREG_S(10, 1), (UINT16)VREG_S(10, 2), (UINT16)VREG_S(10, 3), (UINT16)VREG_S(10, 4), (UINT16)VREG_S(10, 5), (UINT16)VREG_S(10, 6), (UINT16)VREG_S(10, 7)); break; case RSP_V11: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(11, 0), (UINT16)VREG_S(11, 1), (UINT16)VREG_S(11, 2), (UINT16)VREG_S(11, 3), (UINT16)VREG_S(11, 4), (UINT16)VREG_S(11, 5), (UINT16)VREG_S(11, 6), (UINT16)VREG_S(11, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(11, 0), (UINT16)VREG_S(11, 1), (UINT16)VREG_S(11, 2), (UINT16)VREG_S(11, 3), (UINT16)VREG_S(11, 4), (UINT16)VREG_S(11, 5), (UINT16)VREG_S(11, 6), (UINT16)VREG_S(11, 7)); break; case RSP_V12: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(12, 0), (UINT16)VREG_S(12, 1), (UINT16)VREG_S(12, 2), (UINT16)VREG_S(12, 3), (UINT16)VREG_S(12, 4), (UINT16)VREG_S(12, 5), (UINT16)VREG_S(12, 6), (UINT16)VREG_S(12, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(12, 0), (UINT16)VREG_S(12, 1), (UINT16)VREG_S(12, 2), (UINT16)VREG_S(12, 3), (UINT16)VREG_S(12, 4), (UINT16)VREG_S(12, 5), (UINT16)VREG_S(12, 6), (UINT16)VREG_S(12, 7)); break; case RSP_V13: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(13, 0), (UINT16)VREG_S(13, 1), (UINT16)VREG_S(13, 2), (UINT16)VREG_S(13, 3), (UINT16)VREG_S(13, 4), (UINT16)VREG_S(13, 5), (UINT16)VREG_S(13, 6), (UINT16)VREG_S(13, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(13, 0), (UINT16)VREG_S(13, 1), (UINT16)VREG_S(13, 2), (UINT16)VREG_S(13, 3), (UINT16)VREG_S(13, 4), (UINT16)VREG_S(13, 5), (UINT16)VREG_S(13, 6), (UINT16)VREG_S(13, 7)); break; case RSP_V14: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(14, 0), (UINT16)VREG_S(14, 1), (UINT16)VREG_S(14, 2), (UINT16)VREG_S(14, 3), (UINT16)VREG_S(14, 4), (UINT16)VREG_S(14, 5), (UINT16)VREG_S(14, 6), (UINT16)VREG_S(14, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(14, 0), (UINT16)VREG_S(14, 1), (UINT16)VREG_S(14, 2), (UINT16)VREG_S(14, 3), (UINT16)VREG_S(14, 4), (UINT16)VREG_S(14, 5), (UINT16)VREG_S(14, 6), (UINT16)VREG_S(14, 7)); break; case RSP_V15: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(15, 0), (UINT16)VREG_S(15, 1), (UINT16)VREG_S(15, 2), (UINT16)VREG_S(15, 3), (UINT16)VREG_S(15, 4), (UINT16)VREG_S(15, 5), (UINT16)VREG_S(15, 6), (UINT16)VREG_S(15, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(15, 0), (UINT16)VREG_S(15, 1), (UINT16)VREG_S(15, 2), (UINT16)VREG_S(15, 3), (UINT16)VREG_S(15, 4), (UINT16)VREG_S(15, 5), (UINT16)VREG_S(15, 6), (UINT16)VREG_S(15, 7)); break; case RSP_V16: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(16, 0), (UINT16)VREG_S(16, 1), (UINT16)VREG_S(16, 2), (UINT16)VREG_S(16, 3), (UINT16)VREG_S(16, 4), (UINT16)VREG_S(16, 5), (UINT16)VREG_S(16, 6), (UINT16)VREG_S(16, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(16, 0), (UINT16)VREG_S(16, 1), (UINT16)VREG_S(16, 2), (UINT16)VREG_S(16, 3), (UINT16)VREG_S(16, 4), (UINT16)VREG_S(16, 5), (UINT16)VREG_S(16, 6), (UINT16)VREG_S(16, 7)); break; case RSP_V17: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(17, 0), (UINT16)VREG_S(17, 1), (UINT16)VREG_S(17, 2), (UINT16)VREG_S(17, 3), (UINT16)VREG_S(17, 4), (UINT16)VREG_S(17, 5), (UINT16)VREG_S(17, 6), (UINT16)VREG_S(17, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(17, 0), (UINT16)VREG_S(17, 1), (UINT16)VREG_S(17, 2), (UINT16)VREG_S(17, 3), (UINT16)VREG_S(17, 4), (UINT16)VREG_S(17, 5), (UINT16)VREG_S(17, 6), (UINT16)VREG_S(17, 7)); break; case RSP_V18: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(18, 0), (UINT16)VREG_S(18, 1), (UINT16)VREG_S(18, 2), (UINT16)VREG_S(18, 3), (UINT16)VREG_S(18, 4), (UINT16)VREG_S(18, 5), (UINT16)VREG_S(18, 6), (UINT16)VREG_S(18, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(18, 0), (UINT16)VREG_S(18, 1), (UINT16)VREG_S(18, 2), (UINT16)VREG_S(18, 3), (UINT16)VREG_S(18, 4), (UINT16)VREG_S(18, 5), (UINT16)VREG_S(18, 6), (UINT16)VREG_S(18, 7)); break; case RSP_V19: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(19, 0), (UINT16)VREG_S(19, 1), (UINT16)VREG_S(19, 2), (UINT16)VREG_S(19, 3), (UINT16)VREG_S(19, 4), (UINT16)VREG_S(19, 5), (UINT16)VREG_S(19, 6), (UINT16)VREG_S(19, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(19, 0), (UINT16)VREG_S(19, 1), (UINT16)VREG_S(19, 2), (UINT16)VREG_S(19, 3), (UINT16)VREG_S(19, 4), (UINT16)VREG_S(19, 5), (UINT16)VREG_S(19, 6), (UINT16)VREG_S(19, 7)); break; case RSP_V20: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(20, 0), (UINT16)VREG_S(20, 1), (UINT16)VREG_S(20, 2), (UINT16)VREG_S(20, 3), (UINT16)VREG_S(20, 4), (UINT16)VREG_S(20, 5), (UINT16)VREG_S(20, 6), (UINT16)VREG_S(20, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(20, 0), (UINT16)VREG_S(20, 1), (UINT16)VREG_S(20, 2), (UINT16)VREG_S(20, 3), (UINT16)VREG_S(20, 4), (UINT16)VREG_S(20, 5), (UINT16)VREG_S(20, 6), (UINT16)VREG_S(20, 7)); break; case RSP_V21: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(21, 0), (UINT16)VREG_S(21, 1), (UINT16)VREG_S(21, 2), (UINT16)VREG_S(21, 3), (UINT16)VREG_S(21, 4), (UINT16)VREG_S(21, 5), (UINT16)VREG_S(21, 6), (UINT16)VREG_S(21, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(21, 0), (UINT16)VREG_S(21, 1), (UINT16)VREG_S(21, 2), (UINT16)VREG_S(21, 3), (UINT16)VREG_S(21, 4), (UINT16)VREG_S(21, 5), (UINT16)VREG_S(21, 6), (UINT16)VREG_S(21, 7)); break; case RSP_V22: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(22, 0), (UINT16)VREG_S(22, 1), (UINT16)VREG_S(22, 2), (UINT16)VREG_S(22, 3), (UINT16)VREG_S(22, 4), (UINT16)VREG_S(22, 5), (UINT16)VREG_S(22, 6), (UINT16)VREG_S(22, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(22, 0), (UINT16)VREG_S(22, 1), (UINT16)VREG_S(22, 2), (UINT16)VREG_S(22, 3), (UINT16)VREG_S(22, 4), (UINT16)VREG_S(22, 5), (UINT16)VREG_S(22, 6), (UINT16)VREG_S(22, 7)); break; case RSP_V23: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(23, 0), (UINT16)VREG_S(23, 1), (UINT16)VREG_S(23, 2), (UINT16)VREG_S(23, 3), (UINT16)VREG_S(23, 4), (UINT16)VREG_S(23, 5), (UINT16)VREG_S(23, 6), (UINT16)VREG_S(23, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(23, 0), (UINT16)VREG_S(23, 1), (UINT16)VREG_S(23, 2), (UINT16)VREG_S(23, 3), (UINT16)VREG_S(23, 4), (UINT16)VREG_S(23, 5), (UINT16)VREG_S(23, 6), (UINT16)VREG_S(23, 7)); break; case RSP_V24: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(24, 0), (UINT16)VREG_S(24, 1), (UINT16)VREG_S(24, 2), (UINT16)VREG_S(24, 3), (UINT16)VREG_S(24, 4), (UINT16)VREG_S(24, 5), (UINT16)VREG_S(24, 6), (UINT16)VREG_S(24, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(24, 0), (UINT16)VREG_S(24, 1), (UINT16)VREG_S(24, 2), (UINT16)VREG_S(24, 3), (UINT16)VREG_S(24, 4), (UINT16)VREG_S(24, 5), (UINT16)VREG_S(24, 6), (UINT16)VREG_S(24, 7)); break; case RSP_V25: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(25, 0), (UINT16)VREG_S(25, 1), (UINT16)VREG_S(25, 2), (UINT16)VREG_S(25, 3), (UINT16)VREG_S(25, 4), (UINT16)VREG_S(25, 5), (UINT16)VREG_S(25, 6), (UINT16)VREG_S(25, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(25, 0), (UINT16)VREG_S(25, 1), (UINT16)VREG_S(25, 2), (UINT16)VREG_S(25, 3), (UINT16)VREG_S(25, 4), (UINT16)VREG_S(25, 5), (UINT16)VREG_S(25, 6), (UINT16)VREG_S(25, 7)); break; case RSP_V26: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(26, 0), (UINT16)VREG_S(26, 1), (UINT16)VREG_S(26, 2), (UINT16)VREG_S(26, 3), (UINT16)VREG_S(26, 4), (UINT16)VREG_S(26, 5), (UINT16)VREG_S(26, 6), (UINT16)VREG_S(26, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(26, 0), (UINT16)VREG_S(26, 1), (UINT16)VREG_S(26, 2), (UINT16)VREG_S(26, 3), (UINT16)VREG_S(26, 4), (UINT16)VREG_S(26, 5), (UINT16)VREG_S(26, 6), (UINT16)VREG_S(26, 7)); break; case RSP_V27: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(27, 0), (UINT16)VREG_S(27, 1), (UINT16)VREG_S(27, 2), (UINT16)VREG_S(27, 3), (UINT16)VREG_S(27, 4), (UINT16)VREG_S(27, 5), (UINT16)VREG_S(27, 6), (UINT16)VREG_S(27, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(27, 0), (UINT16)VREG_S(27, 1), (UINT16)VREG_S(27, 2), (UINT16)VREG_S(27, 3), (UINT16)VREG_S(27, 4), (UINT16)VREG_S(27, 5), (UINT16)VREG_S(27, 6), (UINT16)VREG_S(27, 7)); break; case RSP_V28: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(28, 0), (UINT16)VREG_S(28, 1), (UINT16)VREG_S(28, 2), (UINT16)VREG_S(28, 3), (UINT16)VREG_S(28, 4), (UINT16)VREG_S(28, 5), (UINT16)VREG_S(28, 6), (UINT16)VREG_S(28, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(28, 0), (UINT16)VREG_S(28, 1), (UINT16)VREG_S(28, 2), (UINT16)VREG_S(28, 3), (UINT16)VREG_S(28, 4), (UINT16)VREG_S(28, 5), (UINT16)VREG_S(28, 6), (UINT16)VREG_S(28, 7)); break; case RSP_V29: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(29, 0), (UINT16)VREG_S(29, 1), (UINT16)VREG_S(29, 2), (UINT16)VREG_S(29, 3), (UINT16)VREG_S(29, 4), (UINT16)VREG_S(29, 5), (UINT16)VREG_S(29, 6), (UINT16)VREG_S(29, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(29, 0), (UINT16)VREG_S(29, 1), (UINT16)VREG_S(29, 2), (UINT16)VREG_S(29, 3), (UINT16)VREG_S(29, 4), (UINT16)VREG_S(29, 5), (UINT16)VREG_S(29, 6), (UINT16)VREG_S(29, 7)); break; case RSP_V30: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(30, 0), (UINT16)VREG_S(30, 1), (UINT16)VREG_S(30, 2), (UINT16)VREG_S(30, 3), (UINT16)VREG_S(30, 4), (UINT16)VREG_S(30, 5), (UINT16)VREG_S(30, 6), (UINT16)VREG_S(30, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(30, 0), (UINT16)VREG_S(30, 1), (UINT16)VREG_S(30, 2), (UINT16)VREG_S(30, 3), (UINT16)VREG_S(30, 4), (UINT16)VREG_S(30, 5), (UINT16)VREG_S(30, 6), (UINT16)VREG_S(30, 7)); break; case RSP_V31: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(31, 0), (UINT16)VREG_S(31, 1), (UINT16)VREG_S(31, 2), (UINT16)VREG_S(31, 3), (UINT16)VREG_S(31, 4), (UINT16)VREG_S(31, 5), (UINT16)VREG_S(31, 6), (UINT16)VREG_S(31, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(31, 0), (UINT16)VREG_S(31, 1), (UINT16)VREG_S(31, 2), (UINT16)VREG_S(31, 3), (UINT16)VREG_S(31, 4), (UINT16)VREG_S(31, 5), (UINT16)VREG_S(31, 6), (UINT16)VREG_S(31, 7)); break; } } diff --git a/src/emu/cpu/rsp/rspcp2.h b/src/emu/cpu/rsp/rspcp2.h index 3f45d1e89c7..9b8c8d206a4 100644 --- a/src/emu/cpu/rsp/rspcp2.h +++ b/src/emu/cpu/rsp/rspcp2.h @@ -52,7 +52,7 @@ protected: virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; } virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc) { return TRUE; } - virtual void state_string_export(const int index, astring &str); + virtual void state_string_export(const int index, std::string &str); public: virtual ~rsp_cop2(); diff --git a/src/emu/cpu/rsp/rspcp2d.c b/src/emu/cpu/rsp/rspcp2d.c index 11dcd896203..75f5daae1a6 100644 --- a/src/emu/cpu/rsp/rspcp2d.c +++ b/src/emu/cpu/rsp/rspcp2d.c @@ -150,105 +150,105 @@ static void unimplemented_opcode(void *param) ((rsp_cop2 *)param)->cfunc_unimplemented_opcode(); } -void rsp_cop2_drc::state_string_export(const int index, astring &str) +void rsp_cop2_drc::state_string_export(const int index, std::string &str) { switch (index) { case RSP_V0: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 0, 0), (UINT16)VREG_S( 0, 1), (UINT16)VREG_S( 0, 2), (UINT16)VREG_S( 0, 3), (UINT16)VREG_S( 0, 4), (UINT16)VREG_S( 0, 5), (UINT16)VREG_S( 0, 6), (UINT16)VREG_S( 0, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 0, 0), (UINT16)VREG_S( 0, 1), (UINT16)VREG_S( 0, 2), (UINT16)VREG_S( 0, 3), (UINT16)VREG_S( 0, 4), (UINT16)VREG_S( 0, 5), (UINT16)VREG_S( 0, 6), (UINT16)VREG_S( 0, 7)); break; case RSP_V1: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 1, 0), (UINT16)VREG_S( 1, 1), (UINT16)VREG_S( 1, 2), (UINT16)VREG_S( 1, 3), (UINT16)VREG_S( 1, 4), (UINT16)VREG_S( 1, 5), (UINT16)VREG_S( 1, 6), (UINT16)VREG_S( 1, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 1, 0), (UINT16)VREG_S( 1, 1), (UINT16)VREG_S( 1, 2), (UINT16)VREG_S( 1, 3), (UINT16)VREG_S( 1, 4), (UINT16)VREG_S( 1, 5), (UINT16)VREG_S( 1, 6), (UINT16)VREG_S( 1, 7)); break; case RSP_V2: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 2, 0), (UINT16)VREG_S( 2, 1), (UINT16)VREG_S( 2, 2), (UINT16)VREG_S( 2, 3), (UINT16)VREG_S( 2, 4), (UINT16)VREG_S( 2, 5), (UINT16)VREG_S( 2, 6), (UINT16)VREG_S( 2, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 2, 0), (UINT16)VREG_S( 2, 1), (UINT16)VREG_S( 2, 2), (UINT16)VREG_S( 2, 3), (UINT16)VREG_S( 2, 4), (UINT16)VREG_S( 2, 5), (UINT16)VREG_S( 2, 6), (UINT16)VREG_S( 2, 7)); break; case RSP_V3: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 3, 0), (UINT16)VREG_S( 3, 1), (UINT16)VREG_S( 3, 2), (UINT16)VREG_S( 3, 3), (UINT16)VREG_S( 3, 4), (UINT16)VREG_S( 3, 5), (UINT16)VREG_S( 3, 6), (UINT16)VREG_S( 3, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 3, 0), (UINT16)VREG_S( 3, 1), (UINT16)VREG_S( 3, 2), (UINT16)VREG_S( 3, 3), (UINT16)VREG_S( 3, 4), (UINT16)VREG_S( 3, 5), (UINT16)VREG_S( 3, 6), (UINT16)VREG_S( 3, 7)); break; case RSP_V4: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 4, 0), (UINT16)VREG_S( 4, 1), (UINT16)VREG_S( 4, 2), (UINT16)VREG_S( 4, 3), (UINT16)VREG_S( 4, 4), (UINT16)VREG_S( 4, 5), (UINT16)VREG_S( 4, 6), (UINT16)VREG_S( 4, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 4, 0), (UINT16)VREG_S( 4, 1), (UINT16)VREG_S( 4, 2), (UINT16)VREG_S( 4, 3), (UINT16)VREG_S( 4, 4), (UINT16)VREG_S( 4, 5), (UINT16)VREG_S( 4, 6), (UINT16)VREG_S( 4, 7)); break; case RSP_V5: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 5, 0), (UINT16)VREG_S( 5, 1), (UINT16)VREG_S( 5, 2), (UINT16)VREG_S( 5, 3), (UINT16)VREG_S( 5, 4), (UINT16)VREG_S( 5, 5), (UINT16)VREG_S( 5, 6), (UINT16)VREG_S( 5, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 5, 0), (UINT16)VREG_S( 5, 1), (UINT16)VREG_S( 5, 2), (UINT16)VREG_S( 5, 3), (UINT16)VREG_S( 5, 4), (UINT16)VREG_S( 5, 5), (UINT16)VREG_S( 5, 6), (UINT16)VREG_S( 5, 7)); break; case RSP_V6: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 6, 0), (UINT16)VREG_S( 6, 1), (UINT16)VREG_S( 6, 2), (UINT16)VREG_S( 6, 3), (UINT16)VREG_S( 6, 4), (UINT16)VREG_S( 6, 5), (UINT16)VREG_S( 6, 6), (UINT16)VREG_S( 6, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 6, 0), (UINT16)VREG_S( 6, 1), (UINT16)VREG_S( 6, 2), (UINT16)VREG_S( 6, 3), (UINT16)VREG_S( 6, 4), (UINT16)VREG_S( 6, 5), (UINT16)VREG_S( 6, 6), (UINT16)VREG_S( 6, 7)); break; case RSP_V7: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 7, 0), (UINT16)VREG_S( 7, 1), (UINT16)VREG_S( 7, 2), (UINT16)VREG_S( 7, 3), (UINT16)VREG_S( 7, 4), (UINT16)VREG_S( 7, 5), (UINT16)VREG_S( 7, 6), (UINT16)VREG_S( 7, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 7, 0), (UINT16)VREG_S( 7, 1), (UINT16)VREG_S( 7, 2), (UINT16)VREG_S( 7, 3), (UINT16)VREG_S( 7, 4), (UINT16)VREG_S( 7, 5), (UINT16)VREG_S( 7, 6), (UINT16)VREG_S( 7, 7)); break; case RSP_V8: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 8, 0), (UINT16)VREG_S( 8, 1), (UINT16)VREG_S( 8, 2), (UINT16)VREG_S( 8, 3), (UINT16)VREG_S( 8, 4), (UINT16)VREG_S( 8, 5), (UINT16)VREG_S( 8, 6), (UINT16)VREG_S( 8, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 8, 0), (UINT16)VREG_S( 8, 1), (UINT16)VREG_S( 8, 2), (UINT16)VREG_S( 8, 3), (UINT16)VREG_S( 8, 4), (UINT16)VREG_S( 8, 5), (UINT16)VREG_S( 8, 6), (UINT16)VREG_S( 8, 7)); break; case RSP_V9: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 9, 0), (UINT16)VREG_S( 9, 1), (UINT16)VREG_S( 9, 2), (UINT16)VREG_S( 9, 3), (UINT16)VREG_S( 9, 4), (UINT16)VREG_S( 9, 5), (UINT16)VREG_S( 9, 6), (UINT16)VREG_S( 9, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S( 9, 0), (UINT16)VREG_S( 9, 1), (UINT16)VREG_S( 9, 2), (UINT16)VREG_S( 9, 3), (UINT16)VREG_S( 9, 4), (UINT16)VREG_S( 9, 5), (UINT16)VREG_S( 9, 6), (UINT16)VREG_S( 9, 7)); break; case RSP_V10: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(10, 0), (UINT16)VREG_S(10, 1), (UINT16)VREG_S(10, 2), (UINT16)VREG_S(10, 3), (UINT16)VREG_S(10, 4), (UINT16)VREG_S(10, 5), (UINT16)VREG_S(10, 6), (UINT16)VREG_S(10, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(10, 0), (UINT16)VREG_S(10, 1), (UINT16)VREG_S(10, 2), (UINT16)VREG_S(10, 3), (UINT16)VREG_S(10, 4), (UINT16)VREG_S(10, 5), (UINT16)VREG_S(10, 6), (UINT16)VREG_S(10, 7)); break; case RSP_V11: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(11, 0), (UINT16)VREG_S(11, 1), (UINT16)VREG_S(11, 2), (UINT16)VREG_S(11, 3), (UINT16)VREG_S(11, 4), (UINT16)VREG_S(11, 5), (UINT16)VREG_S(11, 6), (UINT16)VREG_S(11, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(11, 0), (UINT16)VREG_S(11, 1), (UINT16)VREG_S(11, 2), (UINT16)VREG_S(11, 3), (UINT16)VREG_S(11, 4), (UINT16)VREG_S(11, 5), (UINT16)VREG_S(11, 6), (UINT16)VREG_S(11, 7)); break; case RSP_V12: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(12, 0), (UINT16)VREG_S(12, 1), (UINT16)VREG_S(12, 2), (UINT16)VREG_S(12, 3), (UINT16)VREG_S(12, 4), (UINT16)VREG_S(12, 5), (UINT16)VREG_S(12, 6), (UINT16)VREG_S(12, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(12, 0), (UINT16)VREG_S(12, 1), (UINT16)VREG_S(12, 2), (UINT16)VREG_S(12, 3), (UINT16)VREG_S(12, 4), (UINT16)VREG_S(12, 5), (UINT16)VREG_S(12, 6), (UINT16)VREG_S(12, 7)); break; case RSP_V13: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(13, 0), (UINT16)VREG_S(13, 1), (UINT16)VREG_S(13, 2), (UINT16)VREG_S(13, 3), (UINT16)VREG_S(13, 4), (UINT16)VREG_S(13, 5), (UINT16)VREG_S(13, 6), (UINT16)VREG_S(13, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(13, 0), (UINT16)VREG_S(13, 1), (UINT16)VREG_S(13, 2), (UINT16)VREG_S(13, 3), (UINT16)VREG_S(13, 4), (UINT16)VREG_S(13, 5), (UINT16)VREG_S(13, 6), (UINT16)VREG_S(13, 7)); break; case RSP_V14: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(14, 0), (UINT16)VREG_S(14, 1), (UINT16)VREG_S(14, 2), (UINT16)VREG_S(14, 3), (UINT16)VREG_S(14, 4), (UINT16)VREG_S(14, 5), (UINT16)VREG_S(14, 6), (UINT16)VREG_S(14, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(14, 0), (UINT16)VREG_S(14, 1), (UINT16)VREG_S(14, 2), (UINT16)VREG_S(14, 3), (UINT16)VREG_S(14, 4), (UINT16)VREG_S(14, 5), (UINT16)VREG_S(14, 6), (UINT16)VREG_S(14, 7)); break; case RSP_V15: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(15, 0), (UINT16)VREG_S(15, 1), (UINT16)VREG_S(15, 2), (UINT16)VREG_S(15, 3), (UINT16)VREG_S(15, 4), (UINT16)VREG_S(15, 5), (UINT16)VREG_S(15, 6), (UINT16)VREG_S(15, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(15, 0), (UINT16)VREG_S(15, 1), (UINT16)VREG_S(15, 2), (UINT16)VREG_S(15, 3), (UINT16)VREG_S(15, 4), (UINT16)VREG_S(15, 5), (UINT16)VREG_S(15, 6), (UINT16)VREG_S(15, 7)); break; case RSP_V16: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(16, 0), (UINT16)VREG_S(16, 1), (UINT16)VREG_S(16, 2), (UINT16)VREG_S(16, 3), (UINT16)VREG_S(16, 4), (UINT16)VREG_S(16, 5), (UINT16)VREG_S(16, 6), (UINT16)VREG_S(16, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(16, 0), (UINT16)VREG_S(16, 1), (UINT16)VREG_S(16, 2), (UINT16)VREG_S(16, 3), (UINT16)VREG_S(16, 4), (UINT16)VREG_S(16, 5), (UINT16)VREG_S(16, 6), (UINT16)VREG_S(16, 7)); break; case RSP_V17: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(17, 0), (UINT16)VREG_S(17, 1), (UINT16)VREG_S(17, 2), (UINT16)VREG_S(17, 3), (UINT16)VREG_S(17, 4), (UINT16)VREG_S(17, 5), (UINT16)VREG_S(17, 6), (UINT16)VREG_S(17, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(17, 0), (UINT16)VREG_S(17, 1), (UINT16)VREG_S(17, 2), (UINT16)VREG_S(17, 3), (UINT16)VREG_S(17, 4), (UINT16)VREG_S(17, 5), (UINT16)VREG_S(17, 6), (UINT16)VREG_S(17, 7)); break; case RSP_V18: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(18, 0), (UINT16)VREG_S(18, 1), (UINT16)VREG_S(18, 2), (UINT16)VREG_S(18, 3), (UINT16)VREG_S(18, 4), (UINT16)VREG_S(18, 5), (UINT16)VREG_S(18, 6), (UINT16)VREG_S(18, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(18, 0), (UINT16)VREG_S(18, 1), (UINT16)VREG_S(18, 2), (UINT16)VREG_S(18, 3), (UINT16)VREG_S(18, 4), (UINT16)VREG_S(18, 5), (UINT16)VREG_S(18, 6), (UINT16)VREG_S(18, 7)); break; case RSP_V19: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(19, 0), (UINT16)VREG_S(19, 1), (UINT16)VREG_S(19, 2), (UINT16)VREG_S(19, 3), (UINT16)VREG_S(19, 4), (UINT16)VREG_S(19, 5), (UINT16)VREG_S(19, 6), (UINT16)VREG_S(19, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(19, 0), (UINT16)VREG_S(19, 1), (UINT16)VREG_S(19, 2), (UINT16)VREG_S(19, 3), (UINT16)VREG_S(19, 4), (UINT16)VREG_S(19, 5), (UINT16)VREG_S(19, 6), (UINT16)VREG_S(19, 7)); break; case RSP_V20: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(20, 0), (UINT16)VREG_S(20, 1), (UINT16)VREG_S(20, 2), (UINT16)VREG_S(20, 3), (UINT16)VREG_S(20, 4), (UINT16)VREG_S(20, 5), (UINT16)VREG_S(20, 6), (UINT16)VREG_S(20, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(20, 0), (UINT16)VREG_S(20, 1), (UINT16)VREG_S(20, 2), (UINT16)VREG_S(20, 3), (UINT16)VREG_S(20, 4), (UINT16)VREG_S(20, 5), (UINT16)VREG_S(20, 6), (UINT16)VREG_S(20, 7)); break; case RSP_V21: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(21, 0), (UINT16)VREG_S(21, 1), (UINT16)VREG_S(21, 2), (UINT16)VREG_S(21, 3), (UINT16)VREG_S(21, 4), (UINT16)VREG_S(21, 5), (UINT16)VREG_S(21, 6), (UINT16)VREG_S(21, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(21, 0), (UINT16)VREG_S(21, 1), (UINT16)VREG_S(21, 2), (UINT16)VREG_S(21, 3), (UINT16)VREG_S(21, 4), (UINT16)VREG_S(21, 5), (UINT16)VREG_S(21, 6), (UINT16)VREG_S(21, 7)); break; case RSP_V22: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(22, 0), (UINT16)VREG_S(22, 1), (UINT16)VREG_S(22, 2), (UINT16)VREG_S(22, 3), (UINT16)VREG_S(22, 4), (UINT16)VREG_S(22, 5), (UINT16)VREG_S(22, 6), (UINT16)VREG_S(22, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(22, 0), (UINT16)VREG_S(22, 1), (UINT16)VREG_S(22, 2), (UINT16)VREG_S(22, 3), (UINT16)VREG_S(22, 4), (UINT16)VREG_S(22, 5), (UINT16)VREG_S(22, 6), (UINT16)VREG_S(22, 7)); break; case RSP_V23: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(23, 0), (UINT16)VREG_S(23, 1), (UINT16)VREG_S(23, 2), (UINT16)VREG_S(23, 3), (UINT16)VREG_S(23, 4), (UINT16)VREG_S(23, 5), (UINT16)VREG_S(23, 6), (UINT16)VREG_S(23, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(23, 0), (UINT16)VREG_S(23, 1), (UINT16)VREG_S(23, 2), (UINT16)VREG_S(23, 3), (UINT16)VREG_S(23, 4), (UINT16)VREG_S(23, 5), (UINT16)VREG_S(23, 6), (UINT16)VREG_S(23, 7)); break; case RSP_V24: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(24, 0), (UINT16)VREG_S(24, 1), (UINT16)VREG_S(24, 2), (UINT16)VREG_S(24, 3), (UINT16)VREG_S(24, 4), (UINT16)VREG_S(24, 5), (UINT16)VREG_S(24, 6), (UINT16)VREG_S(24, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(24, 0), (UINT16)VREG_S(24, 1), (UINT16)VREG_S(24, 2), (UINT16)VREG_S(24, 3), (UINT16)VREG_S(24, 4), (UINT16)VREG_S(24, 5), (UINT16)VREG_S(24, 6), (UINT16)VREG_S(24, 7)); break; case RSP_V25: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(25, 0), (UINT16)VREG_S(25, 1), (UINT16)VREG_S(25, 2), (UINT16)VREG_S(25, 3), (UINT16)VREG_S(25, 4), (UINT16)VREG_S(25, 5), (UINT16)VREG_S(25, 6), (UINT16)VREG_S(25, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(25, 0), (UINT16)VREG_S(25, 1), (UINT16)VREG_S(25, 2), (UINT16)VREG_S(25, 3), (UINT16)VREG_S(25, 4), (UINT16)VREG_S(25, 5), (UINT16)VREG_S(25, 6), (UINT16)VREG_S(25, 7)); break; case RSP_V26: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(26, 0), (UINT16)VREG_S(26, 1), (UINT16)VREG_S(26, 2), (UINT16)VREG_S(26, 3), (UINT16)VREG_S(26, 4), (UINT16)VREG_S(26, 5), (UINT16)VREG_S(26, 6), (UINT16)VREG_S(26, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(26, 0), (UINT16)VREG_S(26, 1), (UINT16)VREG_S(26, 2), (UINT16)VREG_S(26, 3), (UINT16)VREG_S(26, 4), (UINT16)VREG_S(26, 5), (UINT16)VREG_S(26, 6), (UINT16)VREG_S(26, 7)); break; case RSP_V27: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(27, 0), (UINT16)VREG_S(27, 1), (UINT16)VREG_S(27, 2), (UINT16)VREG_S(27, 3), (UINT16)VREG_S(27, 4), (UINT16)VREG_S(27, 5), (UINT16)VREG_S(27, 6), (UINT16)VREG_S(27, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(27, 0), (UINT16)VREG_S(27, 1), (UINT16)VREG_S(27, 2), (UINT16)VREG_S(27, 3), (UINT16)VREG_S(27, 4), (UINT16)VREG_S(27, 5), (UINT16)VREG_S(27, 6), (UINT16)VREG_S(27, 7)); break; case RSP_V28: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(28, 0), (UINT16)VREG_S(28, 1), (UINT16)VREG_S(28, 2), (UINT16)VREG_S(28, 3), (UINT16)VREG_S(28, 4), (UINT16)VREG_S(28, 5), (UINT16)VREG_S(28, 6), (UINT16)VREG_S(28, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(28, 0), (UINT16)VREG_S(28, 1), (UINT16)VREG_S(28, 2), (UINT16)VREG_S(28, 3), (UINT16)VREG_S(28, 4), (UINT16)VREG_S(28, 5), (UINT16)VREG_S(28, 6), (UINT16)VREG_S(28, 7)); break; case RSP_V29: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(29, 0), (UINT16)VREG_S(29, 1), (UINT16)VREG_S(29, 2), (UINT16)VREG_S(29, 3), (UINT16)VREG_S(29, 4), (UINT16)VREG_S(29, 5), (UINT16)VREG_S(29, 6), (UINT16)VREG_S(29, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(29, 0), (UINT16)VREG_S(29, 1), (UINT16)VREG_S(29, 2), (UINT16)VREG_S(29, 3), (UINT16)VREG_S(29, 4), (UINT16)VREG_S(29, 5), (UINT16)VREG_S(29, 6), (UINT16)VREG_S(29, 7)); break; case RSP_V30: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(30, 0), (UINT16)VREG_S(30, 1), (UINT16)VREG_S(30, 2), (UINT16)VREG_S(30, 3), (UINT16)VREG_S(30, 4), (UINT16)VREG_S(30, 5), (UINT16)VREG_S(30, 6), (UINT16)VREG_S(30, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(30, 0), (UINT16)VREG_S(30, 1), (UINT16)VREG_S(30, 2), (UINT16)VREG_S(30, 3), (UINT16)VREG_S(30, 4), (UINT16)VREG_S(30, 5), (UINT16)VREG_S(30, 6), (UINT16)VREG_S(30, 7)); break; case RSP_V31: - str.printf("%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(31, 0), (UINT16)VREG_S(31, 1), (UINT16)VREG_S(31, 2), (UINT16)VREG_S(31, 3), (UINT16)VREG_S(31, 4), (UINT16)VREG_S(31, 5), (UINT16)VREG_S(31, 6), (UINT16)VREG_S(31, 7)); + strprintf(str, "%04X|%04X|%04X|%04X|%04X|%04X|%04X|%04X", (UINT16)VREG_S(31, 0), (UINT16)VREG_S(31, 1), (UINT16)VREG_S(31, 2), (UINT16)VREG_S(31, 3), (UINT16)VREG_S(31, 4), (UINT16)VREG_S(31, 5), (UINT16)VREG_S(31, 6), (UINT16)VREG_S(31, 7)); break; } } diff --git a/src/emu/cpu/rsp/rspcp2d.h b/src/emu/cpu/rsp/rspcp2d.h index 2cbdfd218b6..3fcb3572820 100644 --- a/src/emu/cpu/rsp/rspcp2d.h +++ b/src/emu/cpu/rsp/rspcp2d.h @@ -30,7 +30,7 @@ class rsp_cop2_drc : public rsp_cop2 virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc); virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc); - virtual void state_string_export(const int index, astring &str); + virtual void state_string_export(const int index, std::string &str); void cfunc_unimplemented_opcode(); public: diff --git a/src/emu/cpu/rsp/rspcp2s.c b/src/emu/cpu/rsp/rspcp2s.c index 01613ec7466..376d27b0a23 100644 --- a/src/emu/cpu/rsp/rspcp2s.c +++ b/src/emu/cpu/rsp/rspcp2s.c @@ -295,7 +295,7 @@ rsp_cop2_simd::rsp_cop2_simd(rsp_device &rsp, running_machine &machine) : rsp_co vec_flag_reverse = _mm_set_epi16(0x0100, 0x0302, 0x0504, 0x0706, 0x0908, 0x0b0a, 0x0d0c, 0x0f0e); } -void rsp_cop2_simd::state_string_export(const int index, astring &str) +void rsp_cop2_simd::state_string_export(const int index, std::string &str) { switch (index) { diff --git a/src/emu/cpu/rsp/rspcp2s.h b/src/emu/cpu/rsp/rspcp2s.h index dbc31e97c3c..4b164c5aefe 100644 --- a/src/emu/cpu/rsp/rspcp2s.h +++ b/src/emu/cpu/rsp/rspcp2s.h @@ -32,7 +32,7 @@ class rsp_cop2_simd : public rsp_cop2_drc virtual int generate_lwc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc); virtual int generate_swc2(drcuml_block *block, rsp_device::compiler_state *compiler, const opcode_desc *desc); - virtual void state_string_export(const int index, astring &str); + virtual void state_string_export(const int index, std::string &str); public: virtual void lbv(); diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c index f93f6313b8b..e2f6c289fb3 100644 --- a/src/emu/cpu/s2650/s2650.c +++ b/src/emu/cpu/s2650/s2650.c @@ -870,12 +870,12 @@ void s2650_device::state_export(const device_state_entry &entry) } } -void s2650_device::state_string_export(const device_state_entry &entry, astring &str) +void s2650_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", m_psu & 0x80 ? 'S':'.', m_psu & 0x40 ? 'O':'.', m_psu & 0x20 ? 'I':'.', diff --git a/src/emu/cpu/s2650/s2650.h b/src/emu/cpu/s2650/s2650.h index acdad88ae61..703058d1fca 100644 --- a/src/emu/cpu/s2650/s2650.h +++ b/src/emu/cpu/s2650/s2650.h @@ -60,7 +60,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/saturn/saturn.c b/src/emu/cpu/saturn/saturn.c index 0bd5b8c53de..cf82e50ac50 100644 --- a/src/emu/cpu/saturn/saturn.c +++ b/src/emu/cpu/saturn/saturn.c @@ -181,7 +181,7 @@ void saturn_device::device_start() m_icountptr = &m_icount; } -void saturn_device::state_string_export(const device_state_entry &entry, astring &str) +void saturn_device::state_string_export(const device_state_entry &entry, std::string &str) { #define Reg64Data(s) s[15],s[14],s[13],s[12],s[11],s[10],s[9],s[8],s[7],s[6],s[5],s[4],s[3],s[2],s[1],s[0] #define Reg64Format "%x %x%x%x%x%x%x%x %x%x%x %x%x%x%x%x" @@ -189,47 +189,47 @@ void saturn_device::state_string_export(const device_state_entry &entry, astring switch (entry.index()) { case SATURN_A: - str.printf( Reg64Format, Reg64Data(m_reg[A]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[A]) ); break; case SATURN_B: - str.printf( Reg64Format, Reg64Data(m_reg[B]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[B]) ); break; case SATURN_C: - str.printf( Reg64Format, Reg64Data(m_reg[C]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[C]) ); break; case SATURN_D: - str.printf( Reg64Format, Reg64Data(m_reg[D]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[D]) ); break; case SATURN_R0: - str.printf( Reg64Format, Reg64Data(m_reg[R0]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[R0]) ); break; case SATURN_R1: - str.printf( Reg64Format, Reg64Data(m_reg[R1]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[R1]) ); break; case SATURN_R2: - str.printf( Reg64Format, Reg64Data(m_reg[R2]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[R2]) ); break; case SATURN_R3: - str.printf( Reg64Format, Reg64Data(m_reg[R3]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[R3]) ); break; case SATURN_R4: - str.printf( Reg64Format, Reg64Data(m_reg[R4]) ); + strprintf(str, Reg64Format, Reg64Data(m_reg[R4]) ); break; case SATURN_IRQ_STATE: - str.printf( "%c%c%c%i", m_in_irq?'S':'.', m_irq_enable?'e':'.', m_pending_irq?'p':'.', m_irq_state ); + strprintf(str, "%c%c%c%i", m_in_irq?'S':'.', m_irq_enable?'e':'.', m_pending_irq?'p':'.', m_irq_state ); break; case STATE_GENFLAGS: - str.printf( "%c%c", m_decimal?'D':'.', m_carry ? 'C':'.' ); + strprintf(str, "%c%c", m_decimal?'D':'.', m_carry ? 'C':'.' ); break; } } diff --git a/src/emu/cpu/saturn/saturn.h b/src/emu/cpu/saturn/saturn.h index a54faaca164..cd9705cbbcd 100644 --- a/src/emu/cpu/saturn/saturn.h +++ b/src/emu/cpu/saturn/saturn.h @@ -117,7 +117,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c index ee4e33e931d..6d887ffe916 100644 --- a/src/emu/cpu/sc61860/sc61860.c +++ b/src/emu/cpu/sc61860/sc61860.c @@ -181,12 +181,12 @@ void sc61860_device::device_start() } -void sc61860_device::state_string_export(const device_state_entry &entry, astring &str) +void sc61860_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c", m_zero ? 'Z' : '.', m_carry ? 'C' : '.'); + strprintf(str, "%c%c", m_zero ? 'Z' : '.', m_carry ? 'C' : '.'); break; } } diff --git a/src/emu/cpu/sc61860/sc61860.h b/src/emu/cpu/sc61860/sc61860.h index 3966ada8a58..e4c4c7e7a9c 100644 --- a/src/emu/cpu/sc61860/sc61860.h +++ b/src/emu/cpu/sc61860/sc61860.h @@ -116,7 +116,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/scmp/scmp.c b/src/emu/cpu/scmp/scmp.c index a6a36dc604e..cbfaf6a82c2 100644 --- a/src/emu/cpu/scmp/scmp.c +++ b/src/emu/cpu/scmp/scmp.c @@ -547,12 +547,12 @@ void scmp_device::device_reset() COMMON STATE IMPORT/EXPORT ***************************************************************************/ -void scmp_device::state_string_export(const device_state_entry &entry, astring &str) +void scmp_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (m_SR & 0x80) ? 'C' : '.', (m_SR & 0x40) ? 'V' : '.', (m_SR & 0x20) ? 'B' : '.', diff --git a/src/emu/cpu/scmp/scmp.h b/src/emu/cpu/scmp/scmp.h index 56f99ee1361..86590f93546 100644 --- a/src/emu/cpu/scmp/scmp.h +++ b/src/emu/cpu/scmp/scmp.h @@ -56,7 +56,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/score/score.c b/src/emu/cpu/score/score.c index 59616854f22..3ecbbe6fb4c 100644 --- a/src/emu/cpu/score/score.c +++ b/src/emu/cpu/score/score.c @@ -80,16 +80,16 @@ void score7_cpu_device::device_start() // register state for debugger state_add(SCORE_PC , "PC" , m_pc).callimport().callexport().formatstr("%08X"); - astring tmp_string; + std::string tmp_string; for(int i=0; i<0x20; i++) - state_add(SCORE_GPR + i, tmp_string.format("r%d", i).c_str(), m_gpr[i]).callimport().callexport().formatstr("%08X"); + state_add(SCORE_GPR + i, strformat(tmp_string, "r%d", i).c_str(), m_gpr[i]).callimport().callexport().formatstr("%08X"); for(int i=0; i<0x20; i++) - state_add(SCORE_CR + i, tmp_string.format("cr%d", i).c_str(), m_cr[i]).callimport().callexport().formatstr("%08X"); + state_add(SCORE_CR + i, strformat(tmp_string, "cr%d", i).c_str(), m_cr[i]).callimport().callexport().formatstr("%08X"); for(int i=0; i<3; i++) - state_add(SCORE_SR + i, tmp_string.format("sr%d", i).c_str(), m_sr[i]).callimport().callexport().formatstr("%08X"); + state_add(SCORE_SR + i, strformat(tmp_string, "sr%d", i).c_str(), m_sr[i]).callimport().callexport().formatstr("%08X"); state_add(SCORE_CEH, "ceh", REG_CEH).callimport().callexport().formatstr("%08X"); state_add(SCORE_CEL, "cel", REG_CEL).callimport().callexport().formatstr("%08X"); @@ -132,12 +132,12 @@ void score7_cpu_device::device_reset() // for the debugger //------------------------------------------------- -void score7_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void score7_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%s%s%s%s%s", + strprintf(str, "%s%s%s%s%s", REG_CR & FLAG_V ? "V" : ".", REG_CR & FLAG_C ? "C" : ".", REG_CR & FLAG_Z ? "Z" : ".", diff --git a/src/emu/cpu/score/score.h b/src/emu/cpu/score/score.h index c3eeaba67b5..2fd8ca70ca3 100644 --- a/src/emu/cpu/score/score.h +++ b/src/emu/cpu/score/score.h @@ -47,7 +47,7 @@ protected: virtual void execute_set_input(int inputnum, int state); // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_memory_interface overrides virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const; diff --git a/src/emu/cpu/scudsp/scudsp.c b/src/emu/cpu/scudsp/scudsp.c index 416e3a54005..1c73999404c 100644 --- a/src/emu/cpu/scudsp/scudsp.c +++ b/src/emu/cpu/scudsp/scudsp.c @@ -1021,12 +1021,12 @@ scudsp_cpu_device::scudsp_cpu_device(const machine_config &mconfig, const char * } -void scudsp_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void scudsp_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%s%s%s%c%c%c%c%c%s%s%s", + strprintf(str, "%s%s%s%c%c%c%c%c%s%s%s", m_flags & 0x4000000 ? "PR":"..", m_flags & 0x2000000 ? "EP":"..", m_flags & 0x800000 ? "T0":"..", diff --git a/src/emu/cpu/scudsp/scudsp.h b/src/emu/cpu/scudsp/scudsp.h index df7364ac39e..a1ccb3a5ee1 100644 --- a/src/emu/cpu/scudsp/scudsp.h +++ b/src/emu/cpu/scudsp/scudsp.h @@ -94,7 +94,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/emu/cpu/se3208/se3208.c b/src/emu/cpu/se3208/se3208.c index 91e09033bb3..7dc842ad789 100644 --- a/src/emu/cpu/se3208/se3208.c +++ b/src/emu/cpu/se3208/se3208.c @@ -1795,12 +1795,12 @@ void se3208_device::device_start() } -void se3208_device::state_string_export(const device_state_entry &entry, astring &str) +void se3208_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c %c%c%c%c%c", + strprintf(str, "%c%c%c%c %c%c%c%c%c", m_SR&FLAG_C?'C':'.', m_SR&FLAG_V?'V':'.', m_SR&FLAG_S?'S':'.', diff --git a/src/emu/cpu/se3208/se3208.h b/src/emu/cpu/se3208/se3208.h index 9a61b4e3559..9be2316cc87 100644 --- a/src/emu/cpu/se3208/se3208.h +++ b/src/emu/cpu/se3208/se3208.h @@ -30,7 +30,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c index 3717cd28521..fb7161acffd 100644 --- a/src/emu/cpu/sh2/sh2.c +++ b/src/emu/cpu/sh2/sh2.c @@ -2610,12 +2610,12 @@ void sh2_device::device_start() } -void sh2_device::state_string_export(const device_state_entry &entry, astring &str) +void sh2_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%d%c%c", + strprintf(str, "%c%c%d%c%c", m_sh2_state->sr & M ? 'M':'.', m_sh2_state->sr & Q ? 'Q':'.', (m_sh2_state->sr & I) >> 4, diff --git a/src/emu/cpu/sh2/sh2.h b/src/emu/cpu/sh2/sh2.h index 59ba4c62bc0..495ff2540ab 100644 --- a/src/emu/cpu/sh2/sh2.h +++ b/src/emu/cpu/sh2/sh2.h @@ -156,7 +156,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c index 4d2a903a236..3b294fcf503 100644 --- a/src/emu/cpu/sh4/sh4.c +++ b/src/emu/cpu/sh4/sh4.c @@ -100,8 +100,8 @@ sh34_base_device::sh34_base_device(const machine_config &mconfig, device_type ty #if SH4_USE_FASTRAM_OPTIMIZATION , m_bigendian(endianness == ENDIANNESS_BIG) , m_byte_xor(m_bigendian ? BYTE8_XOR_BE(0) : BYTE8_XOR_LE(0)) - , m_word_xor(m_bigendian ? WORD2_XOR_BE(0) : WORD2_XOR_LE(0)) - , m_dword_xor(m_bigendian ? DWORD_XOR_BE(0) : DWORD_XOR_LE(0)) + , m_word_xor(m_bigendian ? WORD2_XOR_BE(0) : WORD2_XOR_LE(0)) + , m_dword_xor(m_bigendian ? DWORD_XOR_BE(0) : DWORD_XOR_LE(0)) , m_fastram_select(0) #endif { @@ -4445,7 +4445,7 @@ void sh34_base_device::state_export(const device_state_entry &entry) } } -void sh34_base_device::state_string_export(const device_state_entry &entry, astring &str) +void sh34_base_device::state_string_export(const device_state_entry &entry, std::string &str) { #ifdef LSB_FIRST UINT8 fpu_xor = m_fpu_pr; @@ -4456,7 +4456,7 @@ void sh34_base_device::state_string_export(const device_state_entry &entry, astr switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%s%s%s%s%c%c%d%c%c", + strprintf(str, "%s%s%s%s%c%c%d%c%c", m_sr & MD ? "MD ":" ", m_sr & sRB ? "RB ":" ", m_sr & BL ? "BL ":" ", @@ -4469,131 +4469,131 @@ void sh34_base_device::state_string_export(const device_state_entry &entry, astr break; case SH4_FR0: - str.printf("%08X %f", m_fr[0 ^ fpu_xor], (double)FP_RFS(0 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[0 ^ fpu_xor], (double)FP_RFS(0 ^ fpu_xor)); break; case SH4_FR1: - str.printf("%08X %f", m_fr[1 ^ fpu_xor], (double)FP_RFS(1 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[1 ^ fpu_xor], (double)FP_RFS(1 ^ fpu_xor)); break; case SH4_FR2: - str.printf("%08X %f", m_fr[2 ^ fpu_xor], (double)FP_RFS(2 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[2 ^ fpu_xor], (double)FP_RFS(2 ^ fpu_xor)); break; case SH4_FR3: - str.printf("%08X %f", m_fr[3 ^ fpu_xor], (double)FP_RFS(3 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[3 ^ fpu_xor], (double)FP_RFS(3 ^ fpu_xor)); break; case SH4_FR4: - str.printf("%08X %f", m_fr[4 ^ fpu_xor], (double)FP_RFS(4 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[4 ^ fpu_xor], (double)FP_RFS(4 ^ fpu_xor)); break; case SH4_FR5: - str.printf("%08X %f", m_fr[5 ^ fpu_xor], (double)FP_RFS(5 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[5 ^ fpu_xor], (double)FP_RFS(5 ^ fpu_xor)); break; case SH4_FR6: - str.printf("%08X %f", m_fr[6 ^ fpu_xor], (double)FP_RFS(6 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[6 ^ fpu_xor], (double)FP_RFS(6 ^ fpu_xor)); break; case SH4_FR7: - str.printf("%08X %f", m_fr[7 ^ fpu_xor], (double)FP_RFS(7 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[7 ^ fpu_xor], (double)FP_RFS(7 ^ fpu_xor)); break; case SH4_FR8: - str.printf("%08X %f", m_fr[8 ^ fpu_xor], (double)FP_RFS(8 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[8 ^ fpu_xor], (double)FP_RFS(8 ^ fpu_xor)); break; case SH4_FR9: - str.printf("%08X %f", m_fr[9 ^ fpu_xor], (double)FP_RFS(9 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[9 ^ fpu_xor], (double)FP_RFS(9 ^ fpu_xor)); break; case SH4_FR10: - str.printf("%08X %f", m_fr[10 ^ fpu_xor], (double)FP_RFS(10 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[10 ^ fpu_xor], (double)FP_RFS(10 ^ fpu_xor)); break; case SH4_FR11: - str.printf("%08X %f", m_fr[11 ^ fpu_xor], (double)FP_RFS(11 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[11 ^ fpu_xor], (double)FP_RFS(11 ^ fpu_xor)); break; case SH4_FR12: - str.printf("%08X %f", m_fr[12 ^ fpu_xor], (double)FP_RFS(12 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[12 ^ fpu_xor], (double)FP_RFS(12 ^ fpu_xor)); break; case SH4_FR13: - str.printf("%08X %f", m_fr[13 ^ fpu_xor], (double)FP_RFS(13 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[13 ^ fpu_xor], (double)FP_RFS(13 ^ fpu_xor)); break; case SH4_FR14: - str.printf("%08X %f", m_fr[14 ^ fpu_xor], (double)FP_RFS(14 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[14 ^ fpu_xor], (double)FP_RFS(14 ^ fpu_xor)); break; case SH4_FR15: - str.printf("%08X %f", m_fr[15 ^ fpu_xor], (double)FP_RFS(15 ^ fpu_xor)); + strprintf(str, "%08X %f", m_fr[15 ^ fpu_xor], (double)FP_RFS(15 ^ fpu_xor)); break; case SH4_XF0: - str.printf("%08X %f", m_xf[0 ^ fpu_xor], (double)FP_XFS(0 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[0 ^ fpu_xor], (double)FP_XFS(0 ^ fpu_xor)); break; case SH4_XF1: - str.printf("%08X %f", m_xf[1 ^ fpu_xor], (double)FP_XFS(1 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[1 ^ fpu_xor], (double)FP_XFS(1 ^ fpu_xor)); break; case SH4_XF2: - str.printf("%08X %f", m_xf[2 ^ fpu_xor], (double)FP_XFS(2 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[2 ^ fpu_xor], (double)FP_XFS(2 ^ fpu_xor)); break; case SH4_XF3: - str.printf("%08X %f", m_xf[3 ^ fpu_xor], (double)FP_XFS(3 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[3 ^ fpu_xor], (double)FP_XFS(3 ^ fpu_xor)); break; case SH4_XF4: - str.printf("%08X %f", m_xf[4 ^ fpu_xor], (double)FP_XFS(4 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[4 ^ fpu_xor], (double)FP_XFS(4 ^ fpu_xor)); break; case SH4_XF5: - str.printf("%08X %f", m_xf[5 ^ fpu_xor], (double)FP_XFS(5 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[5 ^ fpu_xor], (double)FP_XFS(5 ^ fpu_xor)); break; case SH4_XF6: - str.printf("%08X %f", m_xf[6 ^ fpu_xor], (double)FP_XFS(6 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[6 ^ fpu_xor], (double)FP_XFS(6 ^ fpu_xor)); break; case SH4_XF7: - str.printf("%08X %f", m_xf[7 ^ fpu_xor], (double)FP_XFS(7 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[7 ^ fpu_xor], (double)FP_XFS(7 ^ fpu_xor)); break; case SH4_XF8: - str.printf("%08X %f", m_xf[8 ^ fpu_xor], (double)FP_XFS(8 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[8 ^ fpu_xor], (double)FP_XFS(8 ^ fpu_xor)); break; case SH4_XF9: - str.printf("%08X %f", m_xf[9 ^ fpu_xor], (double)FP_XFS(9 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[9 ^ fpu_xor], (double)FP_XFS(9 ^ fpu_xor)); break; case SH4_XF10: - str.printf("%08X %f", m_xf[10 ^ fpu_xor], (double)FP_XFS(10 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[10 ^ fpu_xor], (double)FP_XFS(10 ^ fpu_xor)); break; case SH4_XF11: - str.printf("%08X %f", m_xf[11 ^ fpu_xor], (double)FP_XFS(11 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[11 ^ fpu_xor], (double)FP_XFS(11 ^ fpu_xor)); break; case SH4_XF12: - str.printf("%08X %f", m_xf[12 ^ fpu_xor], (double)FP_XFS(12 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[12 ^ fpu_xor], (double)FP_XFS(12 ^ fpu_xor)); break; case SH4_XF13: - str.printf("%08X %f", m_xf[13 ^ fpu_xor], (double)FP_XFS(13 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[13 ^ fpu_xor], (double)FP_XFS(13 ^ fpu_xor)); break; case SH4_XF14: - str.printf("%08X %f", m_xf[14 ^ fpu_xor], (double)FP_XFS(14 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[14 ^ fpu_xor], (double)FP_XFS(14 ^ fpu_xor)); break; case SH4_XF15: - str.printf("%08X %f", m_xf[15 ^ fpu_xor], (double)FP_XFS(15 ^ fpu_xor)); + strprintf(str, "%08X %f", m_xf[15 ^ fpu_xor], (double)FP_XFS(15 ^ fpu_xor)); break; } diff --git a/src/emu/cpu/sh4/sh4.h b/src/emu/cpu/sh4/sh4.h index 7f2055b6c36..5a621b8cfc7 100644 --- a/src/emu/cpu/sh4/sh4.h +++ b/src/emu/cpu/sh4/sh4.h @@ -218,7 +218,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } @@ -693,9 +693,9 @@ protected: #if SH4_USE_FASTRAM_OPTIMIZATION /* fast RAM */ bool m_bigendian; - UINT32 m_byte_xor; - UINT32 m_word_xor; - UINT32 m_dword_xor; + UINT32 m_byte_xor; + UINT32 m_word_xor; + UINT32 m_dword_xor; UINT32 m_fastram_select; struct { diff --git a/src/emu/cpu/sm8500/sm8500.c b/src/emu/cpu/sm8500/sm8500.c index e34c53c8178..0e8b6bea10f 100644 --- a/src/emu/cpu/sm8500/sm8500.c +++ b/src/emu/cpu/sm8500/sm8500.c @@ -139,48 +139,48 @@ void sm8500_cpu_device::device_start() } -void sm8500_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void sm8500_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case SM8500_PS: - str.printf( "%04X", ( m_PS0 << 8 ) | m_PS1 ); + strprintf(str, "%04X", ( m_PS0 << 8 ) | m_PS1 ); break; case SM8500_RR0: - str.printf( "%04X", mem_readword( 0x00 ) ); + strprintf(str, "%04X", mem_readword( 0x00 ) ); break; case SM8500_RR2: - str.printf( "%04X", mem_readword( 0x02 ) ); + strprintf(str, "%04X", mem_readword( 0x02 ) ); break; case SM8500_RR4: - str.printf( "%04X", mem_readword( 0x04 ) ); + strprintf(str, "%04X", mem_readword( 0x04 ) ); break; case SM8500_RR6: - str.printf( "%04X", mem_readword( 0x06 ) ); + strprintf(str, "%04X", mem_readword( 0x06 ) ); break; case SM8500_RR8: - str.printf( "%04X", mem_readword( 0x08 ) ); + strprintf(str, "%04X", mem_readword( 0x08 ) ); break; case SM8500_RR10: - str.printf( "%04X", mem_readword( 0x0a ) ); + strprintf(str, "%04X", mem_readword( 0x0a ) ); break; case SM8500_RR12: - str.printf( "%04X", mem_readword( 0x0c ) ); + strprintf(str, "%04X", mem_readword( 0x0c ) ); break; case SM8500_RR14: - str.printf( "%04X", mem_readword( 0x0e ) ); + strprintf(str, "%04X", mem_readword( 0x0e ) ); break; case STATE_GENFLAGS: - str.printf( "%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_PS1 & FLAG_C ? 'C' : '.', m_PS1 & FLAG_Z ? 'Z' : '.', m_PS1 & FLAG_S ? 'S' : '.', diff --git a/src/emu/cpu/sm8500/sm8500.h b/src/emu/cpu/sm8500/sm8500.h index 58b1cded478..0c56e82b7a2 100644 --- a/src/emu/cpu/sm8500/sm8500.h +++ b/src/emu/cpu/sm8500/sm8500.h @@ -69,7 +69,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/spc700/spc700.c b/src/emu/cpu/spc700/spc700.c index 94513ceed5b..0e385bb06ef 100644 --- a/src/emu/cpu/spc700/spc700.c +++ b/src/emu/cpu/spc700/spc700.c @@ -1242,12 +1242,12 @@ void spc700_device::device_start() } -void spc700_device::state_string_export(const device_state_entry &entry, astring &str) +void spc700_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (m_flag_n & 0x80) ? 'N':'.', ((m_flag_v & 0x80) >> 1) ? 'V':'.', (m_flag_p>>3) ? 'P':'.', diff --git a/src/emu/cpu/spc700/spc700.h b/src/emu/cpu/spc700/spc700.h index 053f2fbb9d3..192ec9ba6fe 100644 --- a/src/emu/cpu/spc700/spc700.h +++ b/src/emu/cpu/spc700/spc700.h @@ -28,7 +28,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/ssem/ssem.c b/src/emu/cpu/ssem/ssem.c index 93f7d5281b7..0bd4133a563 100644 --- a/src/emu/cpu/ssem/ssem.c +++ b/src/emu/cpu/ssem/ssem.c @@ -98,7 +98,7 @@ void ssem_device::device_start() m_program = &space(AS_PROGRAM); // register our state for the debugger - astring tempstr; + std::string tempstr; state_add(STATE_GENPC, "GENPC", m_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_halt).callimport().callexport().formatstr("%1s").noshow(); state_add(SSEM_PC, "PC", m_shifted_pc).mask(0xffff); @@ -148,12 +148,12 @@ const address_space_config *ssem_device::memory_space_config(address_spacenum sp // for the debugger //------------------------------------------------- -void ssem_device::state_string_export(const device_state_entry &entry, astring &str) +void ssem_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c", m_halt ? 'H' : '.'); + strprintf(str, "%c", m_halt ? 'H' : '.'); break; } } diff --git a/src/emu/cpu/ssem/ssem.h b/src/emu/cpu/ssem/ssem.h index 85a9df24583..251c7a29fd3 100644 --- a/src/emu/cpu/ssem/ssem.h +++ b/src/emu/cpu/ssem/ssem.h @@ -43,7 +43,7 @@ public: virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // address spaces const address_space_config m_program_config; diff --git a/src/emu/cpu/ssp1601/ssp1601.c b/src/emu/cpu/ssp1601/ssp1601.c index c37fc9fdd4a..a50aee5bfe0 100644 --- a/src/emu/cpu/ssp1601/ssp1601.c +++ b/src/emu/cpu/ssp1601/ssp1601.c @@ -548,12 +548,12 @@ void ssp1601_device::device_start() } -void ssp1601_device::state_string_export(const device_state_entry &entry, astring &str) +void ssp1601_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c", (rST&SSP_FLAG_N) ? 'N' : '.', (rST&SSP_FLAG_V) ? 'V' : '.', + strprintf(str, "%c%c%c%c", (rST&SSP_FLAG_N) ? 'N' : '.', (rST&SSP_FLAG_V) ? 'V' : '.', (rST&SSP_FLAG_Z)?'Z':'.', (rST&SSP_FLAG_L)?'L':'.' ); break; diff --git a/src/emu/cpu/ssp1601/ssp1601.h b/src/emu/cpu/ssp1601/ssp1601.h index 8bdeb2eab11..0c06d2785f0 100644 --- a/src/emu/cpu/ssp1601/ssp1601.h +++ b/src/emu/cpu/ssp1601/ssp1601.h @@ -38,7 +38,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : NULL); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/t11/t11.c b/src/emu/cpu/t11/t11.c index ed4667a8b32..46f82f9a627 100644 --- a/src/emu/cpu/t11/t11.c +++ b/src/emu/cpu/t11/t11.c @@ -275,12 +275,12 @@ void t11_device::device_start() m_icountptr = &m_icount; } -void t11_device::state_string_export(const device_state_entry &entry, astring &str) +void t11_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_psw.b.l & 0x80 ? '?':'.', m_psw.b.l & 0x40 ? 'I':'.', m_psw.b.l & 0x20 ? 'I':'.', diff --git a/src/emu/cpu/t11/t11.h b/src/emu/cpu/t11/t11.h index dd724f09ddd..2d7aa2aa180 100644 --- a/src/emu/cpu/t11/t11.h +++ b/src/emu/cpu/t11/t11.h @@ -56,7 +56,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/tlcs90/tlcs90.c b/src/emu/cpu/tlcs90/tlcs90.c index 4b320fd6831..118d7a93168 100644 --- a/src/emu/cpu/tlcs90/tlcs90.c +++ b/src/emu/cpu/tlcs90/tlcs90.c @@ -2761,12 +2761,12 @@ void tlcs90_device::device_start() } -void tlcs90_device::state_string_export(const device_state_entry &entry, astring &str) +void tlcs90_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", F & 0x80 ? 'S':'.', F & 0x40 ? 'Z':'.', F & 0x20 ? 'I':'.', diff --git a/src/emu/cpu/tlcs90/tlcs90.h b/src/emu/cpu/tlcs90/tlcs90.h index 7dd96f9e452..77f4f82d750 100644 --- a/src/emu/cpu/tlcs90/tlcs90.h +++ b/src/emu/cpu/tlcs90/tlcs90.h @@ -49,7 +49,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/tlcs900/tlcs900.c b/src/emu/cpu/tlcs900/tlcs900.c index 37fdea0c12b..05126275cc8 100644 --- a/src/emu/cpu/tlcs900/tlcs900.c +++ b/src/emu/cpu/tlcs900/tlcs900.c @@ -374,12 +374,12 @@ void tlcs900h_device::device_start() } -void tlcs900h_device::state_string_export(const device_state_entry &entry, astring &str) +void tlcs900h_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%d%c%d%c%c%c%c%c%c%c%c", + strprintf(str, "%c%d%c%d%c%c%c%c%c%c%c%c", m_sr.w.l & 0x8000 ? 'S' : 'U', ( m_sr.w.l & 0x7000 ) >> 12, m_sr.w.l & 0x0800 ? 'M' : 'N', diff --git a/src/emu/cpu/tlcs900/tlcs900.h b/src/emu/cpu/tlcs900/tlcs900.h index b550480cb27..11b61e532f1 100644 --- a/src/emu/cpu/tlcs900/tlcs900.h +++ b/src/emu/cpu/tlcs900/tlcs900.h @@ -70,7 +70,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/tms0980/tms0980.c b/src/emu/cpu/tms0980/tms0980.c index 93111b88dba..3c1db6c8a3d 100644 --- a/src/emu/cpu/tms0980/tms0980.c +++ b/src/emu/cpu/tms0980/tms0980.c @@ -4,6 +4,12 @@ TMS0980/TMS1000-family MCU cores + TODO: + - emulate TMS1600 L-pins + - fix debugger disasm view + - add pinout diagrams for reference + + The TMS0980 and TMS1000-family MCU cores are very similar. The TMS0980 has a slightly bigger addressable area and uses 9bit instructions where the TMS1000 family uses 8bit instruction. The instruction set themselves are very similar @@ -133,21 +139,27 @@ unknown cycle: CME, SSE, SSS // - 20-term output PLA(opla) at the top-left // - the ALU is between the opla and mpla const device_type TMS1000 = &device_creator<tms1000_cpu_device>; // 28-pin DIP, 11 R pins -const device_type TMS1070 = &device_creator<tms1070_cpu_device>; // almost same as tms1000, just supports higher voltage +const device_type TMS1070 = &device_creator<tms1070_cpu_device>; // high voltage version const device_type TMS1200 = &device_creator<tms1200_cpu_device>; // 40-pin DIP, 13 R pins // TMS1270 has 10 O pins, how does that work? // TMS1100 is nearly the same as TMS1000, some different opcodes, and with double the RAM and ROM const device_type TMS1100 = &device_creator<tms1100_cpu_device>; // 28-pin DIP, 11 R pins -const device_type TMS1170 = &device_creator<tms1170_cpu_device>; // almost same as tms1100, just supports higher voltage +const device_type TMS1170 = &device_creator<tms1170_cpu_device>; // high voltage version const device_type TMS1300 = &device_creator<tms1300_cpu_device>; // 40-pin DIP, 16 R pins -const device_type TMS1370 = &device_creator<tms1370_cpu_device>; // almost same as tms1300, just supports higher voltage +const device_type TMS1370 = &device_creator<tms1370_cpu_device>; // high voltage version // TMS1400 follows the TMS1100, it doubles the ROM size again (4 chapters of 16 pages), and adds a 3-level callstack // - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100 // - the opla size is increased from 20 to 32 terms -const device_type TMS1400 = &device_creator<tms1400_cpu_device>; // 28-pin DIP, 11 R pins -const device_type TMS1470 = &device_creator<tms1470_cpu_device>; // almost same as tms1400, just supports higher voltage +const device_type TMS1400 = &device_creator<tms1400_cpu_device>; // 28-pin DIP, 11 R pins (TMS1400CR is same, but with TMS1100 pinout) +const device_type TMS1470 = &device_creator<tms1470_cpu_device>; // high voltage version, 1 R pin removed for Vdd + +// TMS1600 adds more I/O to the TMS1400, input pins are doubled with added L1,2,4,8 +// - rotate the view and mirror the OR-mask to get the proper layout of the mpla, the default is identical to tms1100 +// - the opla size is increased from 20 to 32 terms +const device_type TMS1600 = &device_creator<tms1600_cpu_device>; // 40-pin DIP, 16 R pins +const device_type TMS1670 = &device_creator<tms1670_cpu_device>; // high voltage version // TMS0980 // - 64x9bit RAM array at the bottom-left (set up as 144x4) @@ -257,6 +269,19 @@ tms1470_cpu_device::tms1470_cpu_device(const machine_config &mconfig, const char { } +tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : tms1400_cpu_device(mconfig, TMS1600, "TMS1600", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1600", __FILE__) +{ } + +tms1600_cpu_device::tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source) + : tms1400_cpu_device(mconfig, type, name, tag, owner, clock, o_pins, r_pins, pc_bits, byte_bits, x_bits, prgwidth, program, datawidth, data, shortname, source) +{ } + +tms1670_cpu_device::tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : tms1600_cpu_device(mconfig, TMS1670, "TMS1670", tag, owner, clock, 8, 16, 6, 8, 3, 12, ADDRESS_MAP_NAME(program_12bit_8), 7, ADDRESS_MAP_NAME(data_128x4), "tms1670", __FILE__) +{ } + + tms0970_cpu_device::tms0970_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : tms1000_cpu_device(mconfig, TMS0970, "TMS0970", tag, owner, clock, 8, 11, 6, 8, 2, 10, ADDRESS_MAP_NAME(program_10bit_8), 6, ADDRESS_MAP_NAME(data_64x4), "tms0970", __FILE__) { } @@ -392,12 +417,12 @@ offs_t tms0980_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UIN return CPU_DISASSEMBLE_NAME(tms0980)(this, buffer, pc, oprom, opram, options); } -void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void tms1xxx_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENPC: - str.printf("%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0)); + strprintf(str, "%03X", m_rom_address << ((m_byte_bits > 8) ? 1 : 0)); break; } } diff --git a/src/emu/cpu/tms0980/tms0980.h b/src/emu/cpu/tms0980/tms0980.h index a5407e8cf62..a291c95de92 100644 --- a/src/emu/cpu/tms0980/tms0980.h +++ b/src/emu/cpu/tms0980/tms0980.h @@ -96,7 +96,7 @@ protected: virtual UINT32 disasm_min_opcode_bytes() const { return 1; } virtual UINT32 disasm_max_opcode_bytes() const { return 1; } - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); void next_pc(); @@ -295,6 +295,20 @@ public: }; +class tms1600_cpu_device : public tms1400_cpu_device +{ +public: + tms1600_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + tms1600_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, UINT8 o_pins, UINT8 r_pins, UINT8 pc_bits, UINT8 byte_bits, UINT8 x_bits, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data, const char *shortname, const char *source); +}; + +class tms1670_cpu_device : public tms1600_cpu_device +{ +public: + tms1670_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); +}; + + class tms0970_cpu_device : public tms1000_cpu_device { public: @@ -399,6 +413,8 @@ extern const device_type TMS1300; extern const device_type TMS1370; extern const device_type TMS1400; extern const device_type TMS1470; +extern const device_type TMS1600; +extern const device_type TMS1670; extern const device_type TMS0970; extern const device_type TMS1990; extern const device_type TMS0980; diff --git a/src/emu/cpu/tms32010/tms32010.c b/src/emu/cpu/tms32010/tms32010.c index 2b3053f38bb..28361c39e49 100644 --- a/src/emu/cpu/tms32010/tms32010.c +++ b/src/emu/cpu/tms32010/tms32010.c @@ -893,12 +893,12 @@ void tms32010_device::device_reset() } -void tms32010_device::state_string_export(const device_state_entry &entry, astring &str) +void tms32010_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", m_STR & 0x8000 ? 'O':'.', m_STR & 0x4000 ? 'M':'.', m_STR & 0x2000 ? 'I':'.', diff --git a/src/emu/cpu/tms32010/tms32010.h b/src/emu/cpu/tms32010/tms32010.h index cc305815f71..0b9448112f3 100644 --- a/src/emu/cpu/tms32010/tms32010.h +++ b/src/emu/cpu/tms32010/tms32010.h @@ -70,7 +70,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/tms32025/tms32025.c b/src/emu/cpu/tms32025/tms32025.c index 75a36da04c6..5e237b2f35d 100644 --- a/src/emu/cpu/tms32025/tms32025.c +++ b/src/emu/cpu/tms32025/tms32025.c @@ -1799,12 +1799,12 @@ void tms32025_device::state_export(const device_state_entry &entry) } -void tms32025_device::state_string_export(const device_state_entry &entry, astring &str) +void tms32025_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("arp%d%c%c%c%cdp%03x arb%d%c%c%c%c%c%c%c%c%c%c%cpm%d", + strprintf(str, "arp%d%c%c%c%cdp%03x arb%d%c%c%c%c%c%c%c%c%c%c%cpm%d", (m_STR0 & 0xe000) >> 13, m_STR0 & 0x1000 ? 'O':'.', m_STR0 & 0x0800 ? 'M':'.', diff --git a/src/emu/cpu/tms32025/tms32025.h b/src/emu/cpu/tms32025/tms32025.h index 09ad0c48d30..60d6cba9643 100644 --- a/src/emu/cpu/tms32025/tms32025.h +++ b/src/emu/cpu/tms32025/tms32025.h @@ -95,7 +95,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/tms32031/tms32031.c b/src/emu/cpu/tms32031/tms32031.c index 18dcaeb7577..df1f389e4c5 100644 --- a/src/emu/cpu/tms32031/tms32031.c +++ b/src/emu/cpu/tms32031/tms32031.c @@ -529,7 +529,7 @@ void tms3203x_device::state_export(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void tms3203x_device::state_string_export(const device_state_entry &entry, astring &str) +void tms3203x_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { @@ -541,12 +541,12 @@ void tms3203x_device::state_string_export(const device_state_entry &entry, astri case TMS3203X_R5F: case TMS3203X_R6F: case TMS3203X_R7F: - str.printf("%12g", m_r[TMR_R0 + (entry.index() - TMS3203X_R0F)].as_double()); + strprintf(str, "%12g", m_r[TMR_R0 + (entry.index() - TMS3203X_R0F)].as_double()); break; case STATE_GENFLAGS: UINT32 temp = m_r[TMR_ST].i32[0]; - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", (temp & 0x80) ? 'O':'.', (temp & 0x40) ? 'U':'.', (temp & 0x20) ? 'V':'.', diff --git a/src/emu/cpu/tms32031/tms32031.h b/src/emu/cpu/tms32031/tms32031.h index bcdc36cdea6..ce1189e6c7a 100644 --- a/src/emu/cpu/tms32031/tms32031.h +++ b/src/emu/cpu/tms32031/tms32031.h @@ -179,7 +179,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/tms32082/tms32082.c b/src/emu/cpu/tms32082/tms32082.c index 39e3e18b5fb..742694aa7f9 100644 --- a/src/emu/cpu/tms32082/tms32082.c +++ b/src/emu/cpu/tms32082/tms32082.c @@ -203,12 +203,12 @@ void tms32082_mp_device::device_start() m_icountptr = &m_icount; } -void tms32082_mp_device::state_string_export(const device_state_entry &entry, astring &str) +void tms32082_mp_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("?"); + strprintf(str, "?"); break; } } @@ -502,12 +502,12 @@ void tms32082_pp_device::device_start() m_icountptr = &m_icount; } -void tms32082_pp_device::state_string_export(const device_state_entry &entry, astring &str) +void tms32082_pp_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("?"); + strprintf(str, "?"); break; } } diff --git a/src/emu/cpu/tms32082/tms32082.h b/src/emu/cpu/tms32082/tms32082.h index a0d2b2c8cc1..9c496e73904 100644 --- a/src/emu/cpu/tms32082/tms32082.h +++ b/src/emu/cpu/tms32082/tms32082.h @@ -91,7 +91,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } @@ -181,7 +181,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 8; } diff --git a/src/emu/cpu/tms34010/tms34010.c b/src/emu/cpu/tms34010/tms34010.c index 2a8d023199e..53882e3a59e 100644 --- a/src/emu/cpu/tms34010/tms34010.c +++ b/src/emu/cpu/tms34010/tms34010.c @@ -590,14 +590,14 @@ void tms340x0_device::device_start() state_add(TMS34010_ST, "ST", m_st); state_add(STATE_GENFLAGS, "GENFLAGS", m_st).noshow().formatstr("%18s"); - astring tempstr; + std::string tempstr; for (int regnum = 0; regnum < 15; regnum++) { - state_add(TMS34010_A0 + regnum, tempstr.format("A%d", regnum).c_str(), m_regs[regnum].reg); + state_add(TMS34010_A0 + regnum, strformat(tempstr, "A%d", regnum).c_str(), m_regs[regnum].reg); } for (int regnum = 0; regnum < 15; regnum++) { - state_add(TMS34010_B0 + regnum, tempstr.format("B%d", regnum).c_str(), m_regs[30 - regnum].reg); + state_add(TMS34010_B0 + regnum, strformat(tempstr, "B%d", regnum).c_str(), m_regs[30 - regnum].reg); } } @@ -1596,12 +1596,12 @@ READ16_MEMBER( tms340x0_device::host_r ) } -void tms340x0_device::state_string_export(const device_state_entry &entry, astring &str) +void tms340x0_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", m_st & 0x80000000 ? 'N':'.', m_st & 0x40000000 ? 'C':'.', m_st & 0x20000000 ? 'Z':'.', diff --git a/src/emu/cpu/tms34010/tms34010.h b/src/emu/cpu/tms34010/tms34010.h index 990020f0a62..b9420def0ae 100644 --- a/src/emu/cpu/tms34010/tms34010.h +++ b/src/emu/cpu/tms34010/tms34010.h @@ -280,7 +280,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; } // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/tms7000/tms7000.c b/src/emu/cpu/tms7000/tms7000.c index 4b825f75d35..9eb1b3ee271 100644 --- a/src/emu/cpu/tms7000/tms7000.c +++ b/src/emu/cpu/tms7000/tms7000.c @@ -271,12 +271,12 @@ void tms7000_device::device_start() state_add(STATE_GENFLAGS, "GENFLAGS", m_sr).formatstr("%8s").noshow(); } -void tms7000_device::state_string_export(const device_state_entry &entry, astring &str) +void tms7000_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_sr & 0x80 ? 'C':'c', m_sr & 0x40 ? 'N':'n', m_sr & 0x20 ? 'Z':'z', diff --git a/src/emu/cpu/tms7000/tms7000.h b/src/emu/cpu/tms7000/tms7000.h index 0488355a8f6..2f30ce144ae 100644 --- a/src/emu/cpu/tms7000/tms7000.h +++ b/src/emu/cpu/tms7000/tms7000.h @@ -91,7 +91,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/tms9900/tms9900.c b/src/emu/cpu/tms9900/tms9900.c index ec5bbf797fc..0029d9cf392 100644 --- a/src/emu/cpu/tms9900/tms9900.c +++ b/src/emu/cpu/tms9900/tms9900.c @@ -349,7 +349,7 @@ void tms99xx_device::state_export(const device_state_entry &entry) /* state_string_export - export state as a string for the debugger */ -void tms99xx_device::state_string_export(const device_state_entry &entry, astring &str) +void tms99xx_device::state_string_export(const device_state_entry &entry, std::string &str) { static const char *statestr = "LAECOPX-----IIII"; char flags[17]; @@ -363,7 +363,7 @@ void tms99xx_device::state_string_export(const device_state_entry &entry, astrin val = (val >> 1) & 0x7fff; } } - str.cpy(flags); + str.assign(flags); } /**************************************************************************/ diff --git a/src/emu/cpu/tms9900/tms9900.h b/src/emu/cpu/tms9900/tms9900.h index f585a0a4cd3..8e7f19042c6 100644 --- a/src/emu/cpu/tms9900/tms9900.h +++ b/src/emu/cpu/tms9900/tms9900.h @@ -226,7 +226,7 @@ private: static const char* s_statename[]; void state_import(const device_state_entry &entry); void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // Interrupt handling void service_interrupt(); diff --git a/src/emu/cpu/tms9900/tms9995.c b/src/emu/cpu/tms9900/tms9995.c index df48a9c41e7..d561a0550c9 100644 --- a/src/emu/cpu/tms9900/tms9995.c +++ b/src/emu/cpu/tms9900/tms9995.c @@ -372,7 +372,7 @@ void tms9995_device::state_export(const device_state_entry &entry) /* state_string_export - export state as a string for the debugger */ -void tms9995_device::state_string_export(const device_state_entry &entry, astring &str) +void tms9995_device::state_string_export(const device_state_entry &entry, std::string &str) { static const char *statestr = "LAECOPX-----IIII"; char flags[17]; @@ -386,7 +386,7 @@ void tms9995_device::state_string_export(const device_state_entry &entry, astrin val = (val >> 1) & 0x7fff; } } - str.cpy(flags); + str.assign(flags); } /* diff --git a/src/emu/cpu/tms9900/tms9995.h b/src/emu/cpu/tms9900/tms9995.h index 0a08f6ebe58..81e2e560505 100644 --- a/src/emu/cpu/tms9900/tms9995.h +++ b/src/emu/cpu/tms9900/tms9995.h @@ -106,7 +106,7 @@ private: static const char* s_statename[]; void state_import(const device_state_entry &entry); void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); UINT16 read_workspace_register_debug(int reg); void write_workspace_register_debug(int reg, UINT16 data); diff --git a/src/emu/cpu/ucom4/ucom4.c b/src/emu/cpu/ucom4/ucom4.c index cb18beec37b..f8fbf383cb2 100644 --- a/src/emu/cpu/ucom4/ucom4.c +++ b/src/emu/cpu/ucom4/ucom4.c @@ -75,13 +75,13 @@ upd552_cpu_device::upd552_cpu_device(const machine_config &mconfig, const char * // disasm -void ucom4_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void ucom4_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { // obviously not from a single flags register case STATE_GENFLAGS: - str.printf("%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c", m_inte_f ? 'E':'e', m_int_f ? 'I':'i', m_timer_f ? 'T':'t', diff --git a/src/emu/cpu/ucom4/ucom4.h b/src/emu/cpu/ucom4/ucom4.h index cf412d59a2f..5c4cd18eac4 100644 --- a/src/emu/cpu/ucom4/ucom4.h +++ b/src/emu/cpu/ucom4/ucom4.h @@ -151,7 +151,7 @@ protected: virtual UINT32 disasm_max_opcode_bytes() const { return 2; } virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); address_space_config m_program_config; address_space_config m_data_config; diff --git a/src/emu/cpu/ucom4/ucom4op.inc b/src/emu/cpu/ucom4/ucom4op.inc index 8ac0a462145..4ef1db23923 100644 --- a/src/emu/cpu/ucom4/ucom4op.inc +++ b/src/emu/cpu/ucom4/ucom4op.inc @@ -720,7 +720,7 @@ void ucom4_cpu_device::op_stm() // on the default clockrate of 400kHz, the minimum time interval is // 630usec and the maximum interval is 40320usec(630*64) - attotime base = attotime::from_hz(unscaled_clock() / 4 / 63); + attotime base = attotime::from_ticks(4 * 63, unscaled_clock()); m_timer->adjust(base * ((m_arg & 0x3f) + 1)); if ((m_arg & 0xc0) != 0x80) diff --git a/src/emu/cpu/uml.c b/src/emu/cpu/uml.c index b1ca222771e..eef08cc7d47 100644 --- a/src/emu/cpu/uml.c +++ b/src/emu/cpu/uml.c @@ -740,7 +740,7 @@ void uml::instruction::simplify() /* if (LOG_SIMPLIFICATIONS && memcmp(&orig, inst, sizeof(orig)) != 0) { - astring disasm1, disasm2; + std::string disasm1, disasm2; orig.disasm(disasm1, block->drcuml); inst->disasm(disasm2, block->drcuml); osd_printf_debug("Simplified: %-50.50s -> %s\n", disasm1.c_str(), disasm2.c_str()); @@ -855,7 +855,7 @@ UINT8 uml::instruction::modified_flags() const // given buffer //------------------------------------------------- -const char *uml::instruction::disasm(astring &buffer, drcuml_state *drcuml) const +const char *uml::instruction::disasm(std::string &buffer, drcuml_state *drcuml) const { static const char *const conditions[] = { "z", "nz", "s", "ns", "c", "nc", "v", "nv", "u", "nu", "a", "be", "g", "le", "l", "ge" }; static const char *const pound_size[] = { "?", "?", "?", "?", "s", "?", "?", "?", "d" }; @@ -869,19 +869,19 @@ const char *uml::instruction::disasm(astring &buffer, drcuml_state *drcuml) cons assert(m_opcode != OP_INVALID && m_opcode < OP_MAX); // start with the raw mnemonic and substitute sizes - buffer.reset(); + buffer.clear(); for (const char *opsrc = opinfo.mnemonic; *opsrc != 0; opsrc++) if (*opsrc == '!') - buffer.catprintf("%s", bang_size[m_size]); + strcatprintf(buffer, "%s", bang_size[m_size]); else if (*opsrc == '#') - buffer.catprintf("%s", pound_size[m_size]); + strcatprintf(buffer, "%s", pound_size[m_size]); else - buffer.cat(*opsrc); + buffer.push_back(*opsrc); // pad to 8 spaces - int pad = 8 - buffer.len(); + int pad = 8 - buffer.length(); for (int ch = 0; ch < pad; ch++) - buffer.cat(' '); + buffer.push_back(' '); // iterate through parameters for (int pnum = 0; pnum < m_numparams; pnum++) @@ -890,7 +890,7 @@ const char *uml::instruction::disasm(astring &buffer, drcuml_state *drcuml) cons // start with a comma for all except the first parameter if (pnum != 0) - buffer.cat(','); + buffer.push_back(','); // ouput based on type switch (param.type()) @@ -918,20 +918,20 @@ const char *uml::instruction::disasm(astring &buffer, drcuml_state *drcuml) cons if (size == 2) value = (UINT16)value; if (size == 4) value = (UINT32)value; if ((UINT32)value == value) - buffer.catprintf("$%X", (UINT32)value); + strcatprintf(buffer, "$%X", (UINT32)value); else - buffer.catprintf("$%X%08X", (UINT32)(value >> 32), (UINT32)value); + strcatprintf(buffer, "$%X%08X", (UINT32)(value >> 32), (UINT32)value); } break; // immediates have several special cases case parameter::PTYPE_SIZE: - buffer.catprintf("%s", sizes[param.size()]); + strcatprintf(buffer, "%s", sizes[param.size()]); break; // size + address space immediate case parameter::PTYPE_SIZE_SPACE: - buffer.catprintf("%s_%s", spaces[param.space()], sizes[param.size()]); + strcatprintf(buffer, "%s_%s", spaces[param.space()], sizes[param.size()]); break; // size + scale immediate @@ -940,30 +940,30 @@ const char *uml::instruction::disasm(astring &buffer, drcuml_state *drcuml) cons int scale = param.scale(); int size = param.size(); if (scale == size) - buffer.catprintf("%s", sizes[size]); + strcatprintf(buffer, "%s", sizes[size]); else - buffer.catprintf("%s_x%d", sizes[size], 1 << scale); + strcatprintf(buffer, "%s_x%d", sizes[size], 1 << scale); } break; // fmod immediate case parameter::PTYPE_ROUNDING: - buffer.catprintf("%s", fmods[param.rounding()]); + strcatprintf(buffer, "%s", fmods[param.rounding()]); break; // integer registers case parameter::PTYPE_INT_REGISTER: - buffer.catprintf("i%d", param.ireg() - REG_I0); + strcatprintf(buffer, "i%d", param.ireg() - REG_I0); break; // floating point registers case parameter::PTYPE_FLOAT_REGISTER: - buffer.catprintf("f%d", param.freg() - REG_F0); + strcatprintf(buffer, "f%d", param.freg() - REG_F0); break; // map variables case parameter::PTYPE_MAPVAR: - buffer.catprintf("m%d", param.mapvar() - MAPVAR_M0); + strcatprintf(buffer, "m%d", param.mapvar() - MAPVAR_M0); break; // memory @@ -976,55 +976,55 @@ const char *uml::instruction::disasm(astring &buffer, drcuml_state *drcuml) cons if (drcuml != NULL && (symbol = drcuml->symbol_find(param.memory(), &symoffset)) != NULL) { if (symoffset == 0) - buffer.catprintf("[%s]", symbol); + strcatprintf(buffer, "[%s]", symbol); else - buffer.catprintf("[%s+$%X]", symbol, symoffset); + strcatprintf(buffer, "[%s+$%X]", symbol, symoffset); } // cache memory else if (drcuml != NULL && drcuml->cache().contains_pointer(param.memory())) - buffer.catprintf("[+$%X]", (UINT32)(FPTR)((drccodeptr)param.memory() - drcuml->cache().near())); + strcatprintf(buffer, "[+$%X]", (UINT32)(FPTR)((drccodeptr)param.memory() - drcuml->cache().near())); // general memory else - buffer.catprintf("[[$%p]]", param.memory()); + strcatprintf(buffer, "[[$%p]]", param.memory()); break; } // string pointer case parameter::PTYPE_STRING: - buffer.catprintf("%s", (const char *)(FPTR)param.string()); + strcatprintf(buffer, "%s", (const char *)(FPTR)param.string()); break; // handle pointer case parameter::PTYPE_CODE_HANDLE: - buffer.catprintf("%s", param.handle().string()); + strcatprintf(buffer, "%s", param.handle().string()); break; default: - buffer.catprintf("???"); + strcatprintf(buffer, "???"); break; } } // if there's a condition, append it if (m_condition != COND_ALWAYS) - buffer.catprintf(",%s", conditions[m_condition & 0x0f]); + strcatprintf(buffer, ",%s", conditions[m_condition & 0x0f]); // if there are flags, append them if (m_flags != 0) { - buffer.cat(','); + buffer.push_back(','); if (m_flags & FLAG_U) - buffer.cat('U'); + buffer.push_back('U'); if (m_flags & FLAG_S) - buffer.cat('S'); + buffer.push_back('S'); if (m_flags & FLAG_Z) - buffer.cat('Z'); + buffer.push_back('Z'); if (m_flags & FLAG_V) - buffer.cat('V'); + buffer.push_back('V'); if (m_flags & FLAG_C) - buffer.cat('C'); + buffer.push_back('C'); } return buffer.c_str(); } diff --git a/src/emu/cpu/uml.h b/src/emu/cpu/uml.h index ab94a949c98..6d1e6c2d89a 100644 --- a/src/emu/cpu/uml.h +++ b/src/emu/cpu/uml.h @@ -247,7 +247,7 @@ namespace uml private: // internal state drccodeptr * m_code; // pointer in the cache to the associated code - astring m_string; // pointer to string attached to handle + std::string m_string; // pointer to string attached to handle code_handle * m_next; // link to next handle in the list drcuml_state & m_drcuml; // pointer to owning object }; @@ -409,7 +409,7 @@ namespace uml void set_mapvar(int paramnum, UINT32 value) { assert(paramnum < m_numparams); assert(m_param[paramnum].is_mapvar()); m_param[paramnum] = value; } // misc - const char *disasm(astring &str, drcuml_state *drcuml = NULL) const; + const char *disasm(std::string &str, drcuml_state *drcuml = NULL) const; UINT8 input_flags() const; UINT8 output_flags() const; UINT8 modified_flags() const; diff --git a/src/emu/cpu/upd7725/upd7725.c b/src/emu/cpu/upd7725/upd7725.c index 30833ba254e..20cf81d20b2 100644 --- a/src/emu/cpu/upd7725/upd7725.c +++ b/src/emu/cpu/upd7725/upd7725.c @@ -67,7 +67,7 @@ void necdsp_device::device_start() m_direct = &m_program->direct(); // register our state for the debugger - astring tempstr; + std::string tempstr; state_add(STATE_GENPC, "GENPC", regs.pc).noshow(); state_add(UPD7725_PC, "PC", regs.pc); state_add(UPD7725_RP, "RP", regs.rp); @@ -201,12 +201,12 @@ void necdsp_device::state_export(const device_state_entry &entry) // for the debugger //------------------------------------------------- -void necdsp_device::state_string_export(const device_state_entry &entry, astring &str) +void necdsp_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case UPD7725_FLAGA: - str.printf("%s %s %c%c %s %s %s %s", + strprintf(str, "%s %s %c%c %s %s %s %s", regs.flaga.s1 ? "S1" : "s1", regs.flaga.s0 ? "S0" : "s0", regs.flaga.c ? 'C' : 'c', @@ -218,7 +218,7 @@ void necdsp_device::state_string_export(const device_state_entry &entry, astring break; case UPD7725_FLAGB: - str.printf("%s %s %c%c %s %s %s %s", + strprintf(str, "%s %s %c%c %s %s %s %s", regs.flagb.s1 ? "S1" : "s1", regs.flagb.s0 ? "S0" : "s0", regs.flagb.c ? 'C' : 'c', diff --git a/src/emu/cpu/upd7725/upd7725.h b/src/emu/cpu/upd7725/upd7725.h index e773b72a5ec..904e3771386 100644 --- a/src/emu/cpu/upd7725/upd7725.h +++ b/src/emu/cpu/upd7725/upd7725.h @@ -108,7 +108,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const; diff --git a/src/emu/cpu/upd7810/upd7810.c b/src/emu/cpu/upd7810/upd7810.c index ab847a83775..cf1ded0c32b 100644 --- a/src/emu/cpu/upd7810/upd7810.c +++ b/src/emu/cpu/upd7810/upd7810.c @@ -1732,12 +1732,12 @@ void upd78c05_device::device_start() } -void upd7810_device::state_string_export(const device_state_entry &entry, astring &str) +void upd7810_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%s:%s:%s:%s:%s:%s", + strprintf(str, "%s:%s:%s:%s:%s:%s", m_psw & 0x40 ? "ZF":"--", m_psw & 0x20 ? "SK":"--", m_psw & 0x10 ? "HC":"--", diff --git a/src/emu/cpu/upd7810/upd7810.h b/src/emu/cpu/upd7810/upd7810.h index 93e09ab98d0..adbfc21e733 100644 --- a/src/emu/cpu/upd7810/upd7810.h +++ b/src/emu/cpu/upd7810/upd7810.h @@ -168,7 +168,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/v30mz/v30mz.c b/src/emu/cpu/v30mz/v30mz.c index 8ecb338d2c0..c8fc839c856 100644 --- a/src/emu/cpu/v30mz/v30mz.c +++ b/src/emu/cpu/v30mz/v30mz.c @@ -183,18 +183,18 @@ void v30mz_cpu_device::device_start() } -void v30mz_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void v30mz_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENPC: - str.printf("%08X", pc()); + strprintf(str, "%08X", pc()); break; case STATE_GENFLAGS: { UINT16 flags = CompressFlags(); - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", flags & 0x8000 ? 'M':'.', flags & 0x4000 ? '?':'.', flags & 0x2000 ? '?':'.', diff --git a/src/emu/cpu/v30mz/v30mz.h b/src/emu/cpu/v30mz/v30mz.h index 1c195e6f581..40deaf1fa43 100644 --- a/src/emu/cpu/v30mz/v30mz.h +++ b/src/emu/cpu/v30mz/v30mz.h @@ -42,7 +42,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/v810/v810.c b/src/emu/cpu/v810/v810.c index 8d1189095ff..525447c481f 100644 --- a/src/emu/cpu/v810/v810.c +++ b/src/emu/cpu/v810/v810.c @@ -1317,12 +1317,12 @@ void v810_device::device_start() m_icountptr = &m_icount; } -void v810_device::state_string_export(const device_state_entry &entry, astring &str) +void v810_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", GET_AE ? 'A':'.', GET_NP ? 'N':'.', GET_EP ? 'E':'.', diff --git a/src/emu/cpu/v810/v810.h b/src/emu/cpu/v810/v810.h index 770e5cc4449..b2b87b7d247 100644 --- a/src/emu/cpu/v810/v810.h +++ b/src/emu/cpu/v810/v810.h @@ -99,7 +99,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : NULL); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } diff --git a/src/emu/cpu/x86log.c b/src/emu/cpu/x86log.c index 95013f1d579..4c311310d96 100644 --- a/src/emu/cpu/x86log.c +++ b/src/emu/cpu/x86log.c @@ -48,7 +48,7 @@ struct data_range_t /* the code logging context */ struct x86log_context { - astring filename; /* name of the file */ + std::string filename; /* name of the file */ FILE * file; /* file we are logging to */ data_range_t data_range[MAX_DATA_RANGES]; /* list of data ranges */ @@ -88,7 +88,7 @@ x86log_context *x86log_create_context(const char *filename) log = global_alloc_clear(x86log_context); /* allocate the filename */ - log->filename.cpy(filename); + log->filename.assign(filename); /* reset things */ reset_log(log); diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c index 446a83c903a..05a6ff6e5eb 100644 --- a/src/emu/cpu/z180/z180.c +++ b/src/emu/cpu/z180/z180.c @@ -2581,12 +2581,12 @@ void z180_device::state_export(const device_state_entry &entry) } } -void z180_device::state_string_export(const device_state_entry &entry, astring &str) +void z180_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", m_AF.b.l & 0x80 ? 'S':'.', m_AF.b.l & 0x40 ? 'Z':'.', m_AF.b.l & 0x20 ? '5':'.', diff --git a/src/emu/cpu/z180/z180.h b/src/emu/cpu/z180/z180.h index 98c53d773db..53479149502 100644 --- a/src/emu/cpu/z180/z180.h +++ b/src/emu/cpu/z180/z180.h @@ -157,7 +157,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/z8/z8.c b/src/emu/cpu/z8/z8.c index 0b5793deadd..47cc5531b65 100644 --- a/src/emu/cpu/z8/z8.c +++ b/src/emu/cpu/z8/z8.c @@ -678,9 +678,9 @@ void z8_device::device_start() state_add(Z8_T1, "T1", m_t1); state_add(STATE_GENFLAGS, "GENFLAGS", m_r[Z8_REGISTER_FLAGS]).noshow().formatstr("%6s"); - astring tempstr; + std::string tempstr; for (int regnum = 0; regnum < 16; regnum++) - state_add(Z8_R0 + regnum, tempstr.format("R%d", regnum).c_str(), m_fake_r[regnum]).callimport().callexport(); + state_add(Z8_R0 + regnum, strformat(tempstr, "R%d", regnum).c_str(), m_fake_r[regnum]).callimport().callexport(); } /* find address spaces */ @@ -807,11 +807,11 @@ void z8_device::state_export(const device_state_entry &entry) } } -void z8_device::state_string_export(const device_state_entry &entry, astring &str) +void z8_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { - case STATE_GENFLAGS: str.printf("%c%c%c%c%c%c", + case STATE_GENFLAGS: strprintf(str, "%c%c%c%c%c%c", m_r[Z8_REGISTER_FLAGS] & Z8_FLAGS_C ? 'C' : '.', m_r[Z8_REGISTER_FLAGS] & Z8_FLAGS_Z ? 'Z' : '.', m_r[Z8_REGISTER_FLAGS] & Z8_FLAGS_S ? 'S' : '.', diff --git a/src/emu/cpu/z8/z8.h b/src/emu/cpu/z8/z8.h index a3776d3a0e3..c9a653d58d3 100644 --- a/src/emu/cpu/z8/z8.h +++ b/src/emu/cpu/z8/z8.h @@ -60,7 +60,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c index c1dce14a44a..13f4a59ab6a 100644 --- a/src/emu/cpu/z80/z80.c +++ b/src/emu/cpu/z80/z80.c @@ -3666,12 +3666,12 @@ void z80_device::state_export( const device_state_entry &entry ) } } -void z80_device::state_string_export(const device_state_entry &entry, astring &str) +void z80_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c", F & 0x80 ? 'S':'.', F & 0x40 ? 'Z':'.', F & 0x20 ? 'Y':'.', diff --git a/src/emu/cpu/z80/z80.h b/src/emu/cpu/z80/z80.h index e60e796a07b..6c8d216c135 100644 --- a/src/emu/cpu/z80/z80.h +++ b/src/emu/cpu/z80/z80.h @@ -58,7 +58,7 @@ protected: // device_state_interface overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 1; } diff --git a/src/emu/cpu/z8000/z8000.c b/src/emu/cpu/z8000/z8000.c index f114f665faa..fc410a5595c 100644 --- a/src/emu/cpu/z8000/z8000.c +++ b/src/emu/cpu/z8000/z8000.c @@ -72,6 +72,7 @@ z8002_device::z8002_device(const machine_config &mconfig, const char *tag, devic : cpu_device(mconfig, Z8002, "Z8002", tag, owner, clock, "z8002", __FILE__) , m_program_config("program", ENDIANNESS_BIG, 16, 16, 0) , m_io_config("io", ENDIANNESS_BIG, 8, 16, 0) + , m_mo_out(*this) , m_vector_mult(1) { } @@ -81,6 +82,7 @@ z8002_device::z8002_device(const machine_config &mconfig, device_type type, cons : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) , m_program_config("program", ENDIANNESS_BIG, 16, 20, 0) , m_io_config("io", ENDIANNESS_BIG, 16, 16, 0) + , m_mo_out(*this) , m_vector_mult(2) { } @@ -316,8 +318,8 @@ UINT8 z8002_device::RDPORT_B(int mode, UINT16 addr) } else { - /* how to handle MMU reads? */ - return 0x00; + /* how to handle MMU reads? for now just do it */ + return m_io->read_byte(addr); } } @@ -339,7 +341,7 @@ UINT16 z8001_device::RDPORT_W(int mode, UINT16 addr) { if(mode == 0) { - return m_io->read_word((UINT16)addr); + return m_io->read_word_unaligned((UINT16)addr); } else { @@ -356,7 +358,8 @@ void z8002_device::WRPORT_B(int mode, UINT16 addr, UINT8 value) } else { - /* how to handle MMU writes? */ + /* how to handle MMU writes? for now just do it */ + m_io->write_byte(addr,value); } } @@ -377,7 +380,7 @@ void z8001_device::WRPORT_W(int mode, UINT16 addr, UINT16 value) { if(mode == 0) { - m_io->write_word((UINT16)addr, value); + m_io->write_word_unaligned((UINT16)addr, value); } else { @@ -648,12 +651,12 @@ void z8002_device::register_debug_state() state_add( STATE_GENSP, "GENSP", m_nspoff ).noshow(); } -void z8002_device::state_string_export(const device_state_entry &entry, astring &str) +void z8002_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", + strprintf(str, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", m_fcw & 0x8000 ? 'S':'s', m_fcw & 0x4000 ? 'n':'N', m_fcw & 0x2000 ? 'E':'e', @@ -701,6 +704,8 @@ void z8001_device::device_start() register_debug_state(); m_icountptr = &m_icount; + m_mo_out.resolve_safe(); + m_mi = CLEAR_LINE; } void z8002_device::device_start() @@ -726,6 +731,8 @@ void z8002_device::device_start() register_debug_state(); m_icountptr = &m_icount; + m_mo_out.resolve_safe(); + m_mi = CLEAR_LINE; } void z8001_device::device_reset() diff --git a/src/emu/cpu/z8000/z8000.h b/src/emu/cpu/z8000/z8000.h index 86a87fc7628..5eacb5c8e85 100644 --- a/src/emu/cpu/z8000/z8000.h +++ b/src/emu/cpu/z8000/z8000.h @@ -26,6 +26,8 @@ enum #define Z8000_SYSCALL 0x0200 /* system call (lsb is vector) */ #define Z8000_HALT 0x0100 /* halted flag */ +#define MCFG_Z8000_MO(_devcb) \ + devcb = &z8002_device::set_mo_callback(*device, DEVCB_##_devcb); class z8002_device : public cpu_device { @@ -35,6 +37,9 @@ public: z8002_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); ~z8002_device(); + template<class _Object> static devcb_base &set_mo_callback(device_t &device, _Object object) { return downcast<z8002_device &>(device).m_mo_out.set_callback(object); } + DECLARE_WRITE_LINE_MEMBER(mi_w) { m_mi = state; } // XXX: this has to apply in the middle of an insn for now + protected: // device-level overrides virtual void device_start(); @@ -60,7 +65,7 @@ protected: } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 2; } @@ -69,6 +74,7 @@ protected: address_space_config m_program_config; address_space_config m_io_config; + devcb_write_line m_mo_out; UINT32 m_op[4]; /* opcodes/data of current instruction */ UINT32 m_ppc; /* previous program counter */ @@ -91,6 +97,7 @@ protected: } m_regs; /* registers */ int m_nmi_state; /* NMI line state */ int m_irq_state[2]; /* IRQ line states (NVI, VI) */ + int m_mi; address_space *m_program; address_space *m_data; direct_read_data *m_direct; diff --git a/src/emu/cpu/z8000/z8000ops.inc b/src/emu/cpu/z8000/z8000ops.inc index 69cbddd97aa..cfb83557fae 100644 --- a/src/emu/cpu/z8000/z8000ops.inc +++ b/src/emu/cpu/z8000/z8000ops.inc @@ -4674,6 +4674,24 @@ void z8002_device::Z7B_dddd_1101() { CHECK_PRIVILEGED_INSTR(); /* test mu-I line, invert cascade to mu-0 */ + if (m_mi) + { + CLR_Z; + CLR_S; + m_mo_out(CLEAR_LINE); + return; + } + SET_Z; + m_mo_out(ASSERT_LINE); + if (m_mi) + { + SET_S; + } + else + { + CLR_S; + m_mo_out(CLEAR_LINE); + } } /****************************************** diff --git a/src/emu/debug/debugcmd.c b/src/emu/debug/debugcmd.c index 37383915e4c..50155dacbe0 100644 --- a/src/emu/debug/debugcmd.c +++ b/src/emu/debug/debugcmd.c @@ -1026,7 +1026,7 @@ static void execute_ignore(running_machine &machine, int ref, int params, const /* if there are no parameters, dump the ignore list */ if (params == 0) { - astring buffer; + std::string buffer; /* loop over all executable devices */ execute_interface_iterator iter(machine.root_device()); @@ -1035,15 +1035,15 @@ static void execute_ignore(running_machine &machine, int ref, int params, const /* build up a comma-separated list */ if (!exec->device().debug()->observing()) { - if (!buffer) - buffer.printf("Currently ignoring device '%s'", exec->device().tag()); + if (buffer.empty()) + strprintf(buffer, "Currently ignoring device '%s'", exec->device().tag()); else - buffer.catprintf(", '%s'", exec->device().tag()); + strcatprintf(buffer, ", '%s'", exec->device().tag()); } /* special message for none */ - if (!buffer) - buffer.printf("Not currently ignoring any devices"); + if (buffer.empty()) + strprintf(buffer, "Not currently ignoring any devices"); debug_console_printf(machine, "%s\n", buffer.c_str()); } @@ -1091,7 +1091,7 @@ static void execute_observe(running_machine &machine, int ref, int params, const /* if there are no parameters, dump the ignore list */ if (params == 0) { - astring buffer; + std::string buffer; /* loop over all executable devices */ execute_interface_iterator iter(machine.root_device()); @@ -1100,15 +1100,15 @@ static void execute_observe(running_machine &machine, int ref, int params, const /* build up a comma-separated list */ if (exec->device().debug()->observing()) { - if (!buffer) - buffer.printf("Currently observing CPU '%s'", exec->device().tag()); + if (buffer.empty()) + strprintf(buffer, "Currently observing CPU '%s'", exec->device().tag()); else - buffer.catprintf(", '%s'", exec->device().tag()); + strcatprintf(buffer, ", '%s'", exec->device().tag()); } /* special message for none */ - if (!buffer) - buffer.printf("Not currently observing any devices"); + if (buffer.empty()) + strprintf(buffer, "Not currently observing any devices"); debug_console_printf(machine, "%s\n", buffer.c_str()); } @@ -1315,7 +1315,7 @@ static void execute_bpdisenable(running_machine &machine, int ref, int params, c static void execute_bplist(running_machine &machine, int ref, int params, const char *param[]) { int printed = 0; - astring buffer; + std::string buffer; /* loop over all CPUs */ device_iterator iter(machine.root_device()); @@ -1327,11 +1327,11 @@ static void execute_bplist(running_machine &machine, int ref, int params, const /* loop over the breakpoints */ for (device_debug::breakpoint *bp = device->debug()->breakpoint_first(); bp != NULL; bp = bp->next()) { - buffer.printf("%c%4X @ %s", bp->enabled() ? ' ' : 'D', bp->index(), core_i64_hex_format(bp->address(), device->debug()->logaddrchars())); - if (astring(bp->condition()) != astring("1")) - buffer.catprintf(" if %s", bp->condition()); - if (astring(bp->action()) != astring("")) - buffer.catprintf(" do %s", bp->action()); + strprintf(buffer, "%c%4X @ %s", bp->enabled() ? ' ' : 'D', bp->index(), core_i64_hex_format(bp->address(), device->debug()->logaddrchars())); + if (std::string(bp->condition()).compare("1") != 0) + strcatprintf(buffer, " if %s", bp->condition()); + if (std::string(bp->action()).compare("") != 0) + strcatprintf(buffer, " do %s", bp->action()); debug_console_printf(machine, "%s\n", buffer.c_str()); printed++; } @@ -1478,7 +1478,7 @@ static void execute_wpdisenable(running_machine &machine, int ref, int params, c static void execute_wplist(running_machine &machine, int ref, int params, const char *param[]) { int printed = 0; - astring buffer; + std::string buffer; /* loop over all CPUs */ device_iterator iter(machine.root_device()); @@ -1494,14 +1494,14 @@ static void execute_wplist(running_machine &machine, int ref, int params, const /* loop over the watchpoints */ for (device_debug::watchpoint *wp = device->debug()->watchpoint_first(spacenum); wp != NULL; wp = wp->next()) { - buffer.printf("%c%4X @ %s-%s %s", wp->enabled() ? ' ' : 'D', wp->index(), + strprintf(buffer, "%c%4X @ %s-%s %s", wp->enabled() ? ' ' : 'D', wp->index(), core_i64_hex_format(wp->space().byte_to_address(wp->address()), wp->space().addrchars()), core_i64_hex_format(wp->space().byte_to_address_end(wp->address() + wp->length()) - 1, wp->space().addrchars()), types[wp->type() & 3]); - if (astring(wp->condition()) != astring("1")) - buffer.catprintf(" if %s", wp->condition()); - if (astring(wp->action()) != astring("")) - buffer.catprintf(" do %s", wp->action()); + if (std::string(wp->condition()).compare("1") != 0) + strcatprintf(buffer, " if %s", wp->condition()); + if (std::string(wp->action()).compare("") != 0) + strcatprintf(buffer, " do %s", wp->action()); debug_console_printf(machine, "%s\n", buffer.c_str()); printed++; } @@ -1625,7 +1625,7 @@ static void execute_rpdisenable(running_machine &machine, int ref, int params, c static void execute_rplist(running_machine &machine, int ref, int params, const char *param[]) { int printed = 0; - astring buffer; + std::string buffer; /* loop over all CPUs */ device_iterator iter(machine.root_device()); @@ -1637,10 +1637,10 @@ static void execute_rplist(running_machine &machine, int ref, int params, const /* loop over the breakpoints */ for (device_debug::registerpoint *rp = device->debug()->registerpoint_first(); rp != NULL; rp = rp->next()) { - buffer.printf("%c%4X ", rp->enabled() ? ' ' : 'D', rp->index()); - buffer.catprintf("if %s", rp->condition()); + strprintf(buffer, "%c%4X ", rp->enabled() ? ' ' : 'D', rp->index()); + strcatprintf(buffer, "if %s", rp->condition()); if (rp->action() != NULL) - buffer.catprintf(" do %s", rp->action()); + strcatprintf(buffer, " do %s", rp->action()); debug_console_printf(machine, "%s\n", buffer.c_str()); printed++; } @@ -1701,7 +1701,7 @@ static void execute_hotspot(running_machine &machine, int ref, int params, const static void execute_statesave(running_machine &machine, int ref, int params, const char *param[]) { - astring filename(param[0]); + std::string filename(param[0]); machine.immediate_save(filename.c_str()); debug_console_printf(machine, "State save attempted. Please refer to window message popup for results.\n"); } @@ -1713,7 +1713,7 @@ static void execute_statesave(running_machine &machine, int ref, int params, con static void execute_stateload(running_machine &machine, int ref, int params, const char *param[]) { - astring filename(param[0]); + std::string filename(param[0]); machine.immediate_load(filename.c_str()); // Clear all PC & memory tracks @@ -2571,10 +2571,10 @@ static void execute_trace_internal(running_machine &machine, int ref, int params device_t *cpu; FILE *f = NULL; const char *mode; - astring filename = param[0]; + std::string filename = param[0]; /* replace macros */ - filename.replace("{game}", machine.basename()); + strreplace(filename, "{game}", machine.basename()); /* validate parameters */ if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : NULL, &cpu)) @@ -2831,9 +2831,9 @@ static void execute_snap(running_machine &machine, int ref, int params, const ch return; } - astring fname(filename); - if (fname.find(0, ".png") == -1) - fname.cat(".png"); + std::string fname(filename); + if (fname.find(".png") == -1) + fname.append(".png"); emu_file file(machine.options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); file_error filerr = file.open(fname.c_str()); @@ -3096,7 +3096,7 @@ static void execute_dumpkbd(running_machine &machine, int ref, int params, const } // loop through all codes - astring buffer = machine.ioport().natkeyboard().dump(); + std::string buffer = machine.ioport().natkeyboard().dump(); // and output it as appropriate if (file != NULL) diff --git a/src/emu/debug/debugcon.c b/src/emu/debug/debugcon.c index 639e6e479db..669ce24c92e 100644 --- a/src/emu/debug/debugcon.c +++ b/src/emu/debug/debugcon.c @@ -475,11 +475,11 @@ const char *debug_cmderr_to_string(CMDERR error) void CLIB_DECL debug_console_printf(running_machine &machine, const char *format, ...) { - astring buffer; + std::string buffer; va_list arg; va_start(arg, format); - buffer.vprintf(format, arg); + strvprintf(buffer, format, arg); va_end(arg); text_buffer_print(console_textbuf, buffer.c_str()); @@ -497,9 +497,9 @@ void CLIB_DECL debug_console_printf(running_machine &machine, const char *format void CLIB_DECL debug_console_vprintf(running_machine &machine, const char *format, va_list args) { - astring buffer; + std::string buffer; - buffer.vprintf(format, args); + strvprintf(buffer, format, args); text_buffer_print(console_textbuf, buffer.c_str()); /* force an update of any console views */ @@ -515,11 +515,11 @@ void CLIB_DECL debug_console_vprintf(running_machine &machine, const char *forma void CLIB_DECL debug_console_printf_wrap(running_machine &machine, int wrapcol, const char *format, ...) { - astring buffer; + std::string buffer; va_list arg; va_start(arg, format); - buffer.vprintf(format, arg); + strvprintf(buffer, format, arg); va_end(arg); text_buffer_print_wrap(console_textbuf, buffer.c_str(), wrapcol); diff --git a/src/emu/debug/debugcpu.c b/src/emu/debug/debugcpu.c index 29a4d759552..9e3d8121344 100644 --- a/src/emu/debug/debugcpu.c +++ b/src/emu/debug/debugcpu.c @@ -1109,8 +1109,8 @@ static void process_source_file(running_machine &machine) static device_t *expression_get_device(running_machine &machine, const char *tag) { // convert to lowercase then lookup the name (tags are enforced to be all lower case) - astring fullname(tag); - fullname.makelower(); + std::string fullname(tag); + strmakelower(fullname); return machine.device(fullname.c_str()); } @@ -1666,9 +1666,11 @@ device_debug::device_debug(device_t &device) } // add all registers into it - astring tempstr; - for (const device_state_entry *entry = m_state->state_first(); entry != NULL; entry = entry->next()) - m_symtable.add(tempstr.cpy(entry->symbol()).makelower().c_str(), (void *)(FPTR)entry->index(), get_state, set_state); + std::string tempstr; + for (const device_state_entry *entry = m_state->state_first(); entry != NULL; entry = entry->next()) { + strmakelower(tempstr.assign(entry->symbol())); + m_symtable.add(tempstr.c_str(), (void *)(FPTR)entry->index(), get_state, set_state); + } } // set up execution-related stuff @@ -2681,7 +2683,7 @@ const char *device_debug::comment_text(offs_t addr) const bool device_debug::comment_export(xml_data_node &curnode) { // iterate through the comments - astring crc_buf; + std::string crc_buf; for (std::set<dasm_comment>::iterator item = m_comment_set.begin(); item != m_comment_set.end(); ++item) { xml_data_node *datanode = xml_add_child(&curnode, "comment", xml_normalize_string(item->m_text.c_str())); @@ -2689,7 +2691,7 @@ bool device_debug::comment_export(xml_data_node &curnode) return false; xml_set_attribute_int(datanode, "address", item->m_address); xml_set_attribute_int(datanode, "color", item->m_color); - crc_buf.printf("%08X", item->m_crc); + strprintf(crc_buf,"%08X", item->m_crc); xml_set_attribute(datanode, "crc", crc_buf.c_str()); } return true; @@ -2831,7 +2833,7 @@ void device_debug::compute_debug_flags() void device_debug::prepare_for_step_overout(offs_t pc) { // disassemble the current instruction and get the flags - astring dasmbuffer; + std::string dasmbuffer; offs_t dasmresult = dasm_wrapped(dasmbuffer, pc); // if flags are supported and it's a call-style opcode, set a temp breakpoint after that instruction @@ -2908,7 +2910,7 @@ void device_debug::breakpoint_check(offs_t pc) global->execution_state = EXECUTION_STATE_STOPPED; // if we hit, evaluate the action - if (bp->m_action) + if (!bp->m_action.empty()) debug_console_execute_command(m_device.machine(), bp->m_action.c_str(), 0); // print a notification, unless the action made us go again @@ -2927,7 +2929,7 @@ void device_debug::breakpoint_check(offs_t pc) global->execution_state = EXECUTION_STATE_STOPPED; // if we hit, evaluate the action - if (rp->m_action) + if (!rp->m_action.empty()) { debug_console_execute_command(m_device.machine(), rp->m_action.c_str(), 0); } @@ -3037,7 +3039,7 @@ void device_debug::watchpoint_check(address_space &space, int type, offs_t addre global->execution_state = EXECUTION_STATE_STOPPED; // if we hit, evaluate the action - if (wp->m_action) + if (!wp->m_action.empty()) debug_console_execute_command(space.machine(), wp->m_action.c_str(), 0); // print a notification, unless the action made us go again @@ -3048,18 +3050,18 @@ void device_debug::watchpoint_check(address_space &space, int type, offs_t addre "0bytes", "byte", "word", "3bytes", "dword", "5bytes", "6bytes", "7bytes", "qword" }; offs_t pc = (space.device().debug()->m_state != NULL) ? space.device().debug()->m_state->pc() : 0; - astring buffer; + std::string buffer; if (type & WATCHPOINT_WRITE) { - buffer.printf("Stopped at watchpoint %X writing %s to %08X (PC=%X)", wp->m_index, sizes[size], space.byte_to_address(address), pc); + strprintf(buffer, "Stopped at watchpoint %X writing %s to %08X (PC=%X)", wp->m_index, sizes[size], space.byte_to_address(address), pc); if (value_to_write >> 32) - buffer.catprintf(" (data=%X%08X)", (UINT32)(value_to_write >> 32), (UINT32)value_to_write); + strcatprintf(buffer, " (data=%X%08X)", (UINT32)(value_to_write >> 32), (UINT32)value_to_write); else - buffer.catprintf(" (data=%X)", (UINT32)value_to_write); + strcatprintf(buffer, " (data=%X)", (UINT32)value_to_write); } else - buffer.printf("Stopped at watchpoint %X reading %s from %08X (PC=%X)", wp->m_index, sizes[size], space.byte_to_address(address), pc); + strprintf(buffer,"Stopped at watchpoint %X reading %s from %08X (PC=%X)", wp->m_index, sizes[size], space.byte_to_address(address), pc); debug_console_printf(space.machine(), "%s\n", buffer.c_str()); space.device().debug()->compute_debug_flags(); } @@ -3121,7 +3123,7 @@ void device_debug::hotspot_check(address_space &space, offs_t address) // buffer and then disassembling them //------------------------------------------------- -UINT32 device_debug::dasm_wrapped(astring &buffer, offs_t pc) +UINT32 device_debug::dasm_wrapped(std::string &buffer, offs_t pc) { assert(m_memory != NULL && m_disasm != NULL); @@ -3142,7 +3144,7 @@ UINT32 device_debug::dasm_wrapped(astring &buffer, offs_t pc) char diasmbuf[200]; memset(diasmbuf, 0x00, 200); UINT32 result = disassemble(diasmbuf, pc, opbuf, argbuf); - buffer.cpy(diasmbuf); + buffer.assign(diasmbuf); return result; } @@ -3480,18 +3482,18 @@ void device_debug::tracer::update(offs_t pc) m_loops = 0; // execute any trace actions first - if (m_action) + if (!m_action.empty()) debug_console_execute_command(m_debug.m_device.machine(), m_action.c_str(), 0); // print the address - astring buffer; + std::string buffer; int logaddrchars = m_debug.logaddrchars(); - buffer.printf("%0*X: ", logaddrchars, pc); + strprintf(buffer,"%0*X: ", logaddrchars, pc); // print the disassembly - astring dasm; + std::string dasm; offs_t dasmresult = m_debug.dasm_wrapped(dasm, pc); - buffer.cat(dasm); + buffer.append(dasm); // output the result fprintf(&m_file, "%s\n", buffer.c_str()); diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h index cf92fda6f7c..2f1f90c4ef7 100644 --- a/src/emu/debug/debugcpu.h +++ b/src/emu/debug/debugcpu.h @@ -83,7 +83,7 @@ public: UINT8 m_enabled; // enabled? offs_t m_address; // execution address parsed_expression m_condition; // condition - astring m_action; // action + std::string m_action; // action }; // watchpoint class @@ -131,7 +131,7 @@ public: offs_t m_address; // start address offs_t m_length; // length of watch area parsed_expression m_condition; // condition - astring m_action; // action + std::string m_action; // action }; // registerpoint class @@ -158,7 +158,7 @@ public: int m_index; // user reported index UINT8 m_enabled; // enabled? parsed_expression m_condition; // condition - astring m_action; // action + std::string m_action; // action }; public: @@ -236,7 +236,7 @@ public: void registerpoint_enable_all(bool enable = true ); // hotspots - bool hotspot_tracking_enabled() const { return !m_hotspots.empty(); } + bool hotspot_tracking_enabled() const { return !m_hotspots.empty(); } void hotspot_track(int numspots, int threshhold); // comments @@ -278,7 +278,7 @@ private: // internal helpers void compute_debug_flags(); void prepare_for_step_overout(offs_t pc); - UINT32 dasm_wrapped(astring &buffer, offs_t pc); + UINT32 dasm_wrapped(std::string &buffer, offs_t pc); // breakpoint and watchpoint helpers void breakpoint_update_flags(); @@ -351,7 +351,7 @@ private: device_debug & m_debug; // reference to our owner FILE & m_file; // tracing file for this CPU - astring m_action; // action to perform during a trace + std::string m_action; // action to perform during a trace offs_t m_history[TRACE_LOOPS]; // history of recent PCs int m_loops; // number of instructions in a loop int m_nextdex; // next index @@ -399,7 +399,7 @@ private: public: dasm_comment(offs_t address, UINT32 crc, const char *text, rgb_t color); - astring m_text; // Stores comment text & color for a given address & crc32 + std::string m_text; // Stores comment text & color for a given address & crc32 rgb_t m_color; }; std::set<dasm_comment> m_comment_set; // collection of comments diff --git a/src/emu/debug/debugvw.c b/src/emu/debug/debugvw.c index dd568e81d3d..d04b48b162a 100644 --- a/src/emu/debug/debugvw.c +++ b/src/emu/debug/debugvw.c @@ -501,7 +501,7 @@ bool debug_view_expression::recompute() // if dirty, re-evaluate if (m_dirty) { - astring oldstring(m_parsed.original_string()); + std::string oldstring(m_parsed.original_string()); try { m_parsed.parse(m_string.c_str()); diff --git a/src/emu/debug/debugvw.h b/src/emu/debug/debugvw.h index 462316a19e4..248379eab3c 100644 --- a/src/emu/debug/debugvw.h +++ b/src/emu/debug/debugvw.h @@ -129,7 +129,7 @@ public: private: // internal state debug_view_source * m_next; // link to next item - astring m_name; // name of the source item + std::string m_name; // name of the source item device_t * m_device; // associated device (if applicable) bool m_is_octal; // is view in octal or hex }; @@ -271,7 +271,7 @@ public: // setters void mark_dirty() { m_dirty = true; } - void set_string(const char *string) { m_string.cpy(string); m_dirty = true; } + void set_string(const char *string) { m_string.assign(string); m_dirty = true; } void set_context(symbol_table *context); private: @@ -283,7 +283,7 @@ private: bool m_dirty; // true if the expression needs to be re-evaluated UINT64 m_result; // last result from the expression parsed_expression m_parsed; // parsed expression data - astring m_string; // copy of the expression string + std::string m_string; // copy of the expression string }; diff --git a/src/emu/debug/dvbpoints.c b/src/emu/debug/dvbpoints.c index db393556639..2e4e16de68f 100644 --- a/src/emu/debug/dvbpoints.c +++ b/src/emu/debug/dvbpoints.c @@ -132,8 +132,8 @@ void debug_view_breakpoints::enumerate_sources() disasm_interface_iterator iter(machine().root_device()); for (device_disasm_interface *dasm = iter.first(); dasm != NULL; dasm = iter.next()) { - astring name; - name.printf("%s '%s'", dasm->device().name(), dasm->device().tag()); + std::string name; + strprintf(name, "%s '%s'", dasm->device().name(), dasm->device().tag()); m_source_list.append(*global_alloc(debug_view_source(name.c_str(), &dasm->device()))); } @@ -187,16 +187,15 @@ void debug_view_breakpoints::view_click(const int button, const debug_view_xy& p } -void debug_view_breakpoints::pad_astring_to_length(astring& str, int len) +void debug_view_breakpoints::pad_astring_to_length(std::string& str, int len) { - int diff = len - str.len(); + int diff = len - str.length(); if (diff > 0) { - astring buffer; - buffer.expand(diff); + std::string buffer; for (int i = 0; i < diff; i++) - buffer.catprintf(" "); - str.catprintf("%s", buffer.c_str()); + strcatprintf(buffer, " "); + strcatprintf(str, "%s", buffer.c_str()); } } @@ -236,40 +235,40 @@ void debug_view_breakpoints::view_update() // Draw debug_view_char *dest = &m_viewdata[0]; - astring linebuf; + std::string linebuf; // Header if (m_visible.y > 0) { - linebuf.reset(); - linebuf.cat("ID"); - if (m_sortType == &cIndexAscending) linebuf.cat('\\'); - else if (m_sortType == &cIndexDescending) linebuf.cat('/'); + linebuf.clear(); + linebuf.append("ID"); + if (m_sortType == &cIndexAscending) linebuf.push_back('\\'); + else if (m_sortType == &cIndexDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[0]); - linebuf.cat("En"); - if (m_sortType == &cEnabledAscending) linebuf.cat('\\'); - else if (m_sortType == &cEnabledDescending) linebuf.cat('/'); + linebuf.append("En"); + if (m_sortType == &cEnabledAscending) linebuf.push_back('\\'); + else if (m_sortType == &cEnabledDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[1]); - linebuf.cat("CPU"); - if (m_sortType == &cCpuAscending) linebuf.cat('\\'); - else if (m_sortType == &cCpuDescending) linebuf.cat('/'); + linebuf.append("CPU"); + if (m_sortType == &cCpuAscending) linebuf.push_back('\\'); + else if (m_sortType == &cCpuDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[2]); - linebuf.cat("Address"); - if (m_sortType == &cAddressAscending) linebuf.cat('\\'); - else if (m_sortType == &cAddressDescending) linebuf.cat('/'); + linebuf.append("Address"); + if (m_sortType == &cAddressAscending) linebuf.push_back('\\'); + else if (m_sortType == &cAddressDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[3]); - linebuf.cat("Condition"); - if (m_sortType == &cConditionAscending) linebuf.cat('\\'); - else if (m_sortType == &cConditionDescending) linebuf.cat('/'); + linebuf.append("Condition"); + if (m_sortType == &cConditionAscending) linebuf.push_back('\\'); + else if (m_sortType == &cConditionDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[4]); - linebuf.cat("Action"); - if (m_sortType == &cActionAscending) linebuf.cat('\\'); - else if (m_sortType == &cActionDescending) linebuf.cat('/'); + linebuf.append("Action"); + if (m_sortType == &cActionAscending) linebuf.push_back('\\'); + else if (m_sortType == &cActionDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[5]); for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++) { - dest->byte = (i < linebuf.len()) ? linebuf[i] : ' '; + dest->byte = (i < linebuf.length()) ? linebuf[i] : ' '; dest->attrib = DCA_ANCILLARY; } } @@ -282,24 +281,24 @@ void debug_view_breakpoints::view_update() { device_debug::breakpoint *const bp = m_buffer[bpi]; - linebuf.reset(); - linebuf.catprintf("%2X", bp->index()); + linebuf.clear(); + strcatprintf(linebuf, "%2X", bp->index()); pad_astring_to_length(linebuf, tableBreaks[0]); - linebuf.cat(bp->enabled() ? 'X' : 'O'); + linebuf.push_back(bp->enabled() ? 'X' : 'O'); pad_astring_to_length(linebuf, tableBreaks[1]); - linebuf.cat(bp->debugInterface()->device().tag()); + linebuf.append(bp->debugInterface()->device().tag()); pad_astring_to_length(linebuf, tableBreaks[2]); - linebuf.cat(core_i64_hex_format(bp->address(), bp->debugInterface()->logaddrchars())); + linebuf.append(core_i64_hex_format(bp->address(), bp->debugInterface()->logaddrchars())); pad_astring_to_length(linebuf, tableBreaks[3]); if (strcmp(bp->condition(), "1")) - linebuf.cat(bp->condition()); + linebuf.append(bp->condition()); pad_astring_to_length(linebuf, tableBreaks[4]); - linebuf.cat(bp->action()); + linebuf.append(bp->action()); pad_astring_to_length(linebuf, tableBreaks[5]); for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++) { - dest->byte = (i < linebuf.len()) ? linebuf[i] : ' '; + dest->byte = (i < linebuf.length()) ? linebuf[i] : ' '; dest->attrib = DCA_NORMAL; // Color disabled breakpoints red diff --git a/src/emu/debug/dvbpoints.h b/src/emu/debug/dvbpoints.h index 59a446f8a03..1ee3cdcb510 100644 --- a/src/emu/debug/dvbpoints.h +++ b/src/emu/debug/dvbpoints.h @@ -46,7 +46,7 @@ protected: private: // internal helpers void enumerate_sources(); - void pad_astring_to_length(astring& str, int len); + void pad_astring_to_length(std::string& str, int len); void gather_breakpoints(); diff --git a/src/emu/debug/dvdisasm.c b/src/emu/debug/dvdisasm.c index 79453127662..d29ab590fd4 100644 --- a/src/emu/debug/dvdisasm.c +++ b/src/emu/debug/dvdisasm.c @@ -95,10 +95,10 @@ void debug_view_disasm::enumerate_sources() // iterate over devices with disassembly interfaces disasm_interface_iterator iter(machine().root_device()); - astring name; + std::string name; for (device_disasm_interface *dasm = iter.first(); dasm != NULL; dasm = iter.next()) { - name.printf("%s '%s'", dasm->device().name(), dasm->device().tag()); + strprintf(name,"%s '%s'", dasm->device().name(), dasm->device().tag()); m_source_list.append(*global_alloc(debug_view_disasm_source(name.c_str(), dasm->device()))); } diff --git a/src/emu/debug/dvmemory.c b/src/emu/debug/dvmemory.c index 7ccea671324..a81e032ce48 100644 --- a/src/emu/debug/dvmemory.c +++ b/src/emu/debug/dvmemory.c @@ -127,7 +127,7 @@ void debug_view_memory::enumerate_sources() { // start with an empty list m_source_list.reset(); - astring name; + std::string name; // first add all the devices' address spaces memory_interface_iterator iter(machine().root_device()); @@ -137,14 +137,14 @@ void debug_view_memory::enumerate_sources() if (memintf->has_space(spacenum)) { address_space &space = memintf->space(spacenum); - name.printf("%s '%s' %s space memory", memintf->device().name(), memintf->device().tag(), space.name()); + strprintf(name,"%s '%s' %s space memory", memintf->device().name(), memintf->device().tag(), space.name()); m_source_list.append(*global_alloc(debug_view_memory_source(name.c_str(), space))); } // then add all the memory regions for (memory_region *region = machine().memory().first_region(); region != NULL; region = region->next()) { - name.printf("Region '%s'", region->name()); + strprintf(name, "Region '%s'", region->name()); m_source_list.append(*global_alloc(debug_view_memory_source(name.c_str(), *region))); } @@ -162,7 +162,7 @@ void debug_view_memory::enumerate_sources() // also, don't trim the front of the name, it's important to know which VIA6522 we're looking at, e.g. if (strncmp(itemname, "timer/", 6)) { - name.cpy(itemname); + name.assign(itemname); m_source_list.append(*global_alloc(debug_view_memory_source(name.c_str(), base, valsize, valcount))); } } @@ -451,14 +451,14 @@ void debug_view_memory::recompute() else { m_maxaddr = source.m_length - 1; - addrchars = m_addrformat.printf("%X", m_maxaddr); + addrchars = strprintf(m_addrformat, "%X", m_maxaddr); } // generate an 8-byte aligned format for the address if (!m_reverse_view) - m_addrformat.printf("%*s%%0%dX", 8 - addrchars, "", addrchars); + strprintf(m_addrformat, "%*s%%0%dX", 8 - addrchars, "", addrchars); else - m_addrformat.printf("%%0%dX%*s", addrchars, 8 - addrchars, ""); + strprintf(m_addrformat, "%%0%dX%*s", addrchars, 8 - addrchars, ""); // if we are viewing a space with a minimum chunk size, clamp the bytes per chunk if (source.m_space != NULL && source.m_space->byte_to_address(1) > 1) diff --git a/src/emu/debug/dvmemory.h b/src/emu/debug/dvmemory.h index 69db37b3102..e3d743169a5 100644 --- a/src/emu/debug/dvmemory.h +++ b/src/emu/debug/dvmemory.h @@ -108,7 +108,7 @@ private: offs_t m_maxaddr; // (derived) maximum address to display UINT32 m_bytes_per_row; // (derived) number of bytes displayed per line UINT32 m_byte_offset; // (derived) offset of starting visible byte - astring m_addrformat; // (derived) format string to use to print addresses + std::string m_addrformat; // (derived) format string to use to print addresses struct section { diff --git a/src/emu/debug/dvstate.c b/src/emu/debug/dvstate.c index 4d5ab739d00..8e5906be416 100644 --- a/src/emu/debug/dvstate.c +++ b/src/emu/debug/dvstate.c @@ -75,10 +75,10 @@ void debug_view_state::enumerate_sources() // iterate over devices that have state interfaces state_interface_iterator iter(machine().root_device()); - astring name; + std::string name; for (device_state_interface *state = iter.first(); state != NULL; state = iter.next()) { - name.printf("%s '%s'", state->device().name(), state->device().tag()); + strprintf(name,"%s '%s'", state->device().name(), state->device().tag()); m_source_list.append(*global_alloc(debug_view_state_source(name.c_str(), state->device()))); } @@ -160,7 +160,7 @@ void debug_view_state::recompute() for (state_item *item = m_state_list; item != NULL; item = item->m_next) { count++; - maxtaglen = MAX(maxtaglen, item->m_symbol.len()); + maxtaglen = MAX(maxtaglen, item->m_symbol.length()); maxvallen = MAX(maxvallen, item->m_vallen); } @@ -223,7 +223,7 @@ void debug_view_state::view_update() UINT32 effcol = m_topleft.x; UINT8 attrib = DCA_NORMAL; UINT32 len = 0; - astring valstr; + std::string valstr; // get the effective string if (curitem->m_index >= REG_FRAME && curitem->m_index <= REG_DIVIDER) @@ -233,16 +233,16 @@ void debug_view_state::view_update() { case REG_DIVIDER: curitem->m_vallen = 0; - curitem->m_symbol.reset(); + curitem->m_symbol.clear(); for (int i = 0; i < m_total.x; i++) - curitem->m_symbol.cat("-"); + curitem->m_symbol.append("-"); break; case REG_CYCLES: if (source.m_execintf != NULL) { curitem->m_currval = source.m_execintf->cycles_remaining(); - valstr.printf("%-8d", (UINT32)curitem->m_currval); + strprintf(valstr, "%-8d", (UINT32)curitem->m_currval); } break; @@ -250,7 +250,7 @@ void debug_view_state::view_update() if (screen != NULL) { curitem->m_currval = screen->hpos(); - valstr.printf("%4d", (UINT32)curitem->m_currval); + strprintf(valstr, "%4d", (UINT32)curitem->m_currval); } break; @@ -258,7 +258,7 @@ void debug_view_state::view_update() if (screen != NULL) { curitem->m_currval = screen->vpos(); - valstr.printf("%4d", (UINT32)curitem->m_currval); + strprintf(valstr, "%4d", (UINT32)curitem->m_currval); } break; @@ -266,7 +266,7 @@ void debug_view_state::view_update() if (screen != NULL) { curitem->m_currval = screen->frame_number(); - valstr.printf("%6d", (UINT32)curitem->m_currval); + strprintf(valstr, "%6d", (UINT32)curitem->m_currval); } break; } @@ -285,14 +285,14 @@ void debug_view_state::view_update() // build up a string char temp[256]; - if (curitem->m_symbol.len() < m_divider - 1) + if (curitem->m_symbol.length() < m_divider - 1) { - memset(&temp[len], ' ', m_divider - 1 - curitem->m_symbol.len()); - len += m_divider - 1 - curitem->m_symbol.len(); + memset(&temp[len], ' ', m_divider - 1 - curitem->m_symbol.length()); + len += m_divider - 1 - curitem->m_symbol.length(); } - memcpy(&temp[len], curitem->m_symbol.c_str(), curitem->m_symbol.len()); - len += curitem->m_symbol.len(); + memcpy(&temp[len], curitem->m_symbol.c_str(), curitem->m_symbol.length()); + len += curitem->m_symbol.length(); temp[len++] = ' '; temp[len++] = ' '; diff --git a/src/emu/debug/dvstate.h b/src/emu/debug/dvstate.h index 932d4b80a41..88930587d7b 100644 --- a/src/emu/debug/dvstate.h +++ b/src/emu/debug/dvstate.h @@ -63,7 +63,7 @@ private: UINT64 m_currval; // current value int m_index; // index UINT8 m_vallen; // number of value chars - astring m_symbol; // symbol + std::string m_symbol; // symbol }; // internal helpers diff --git a/src/emu/debug/dvwpoints.c b/src/emu/debug/dvwpoints.c index d8b447a568a..2e5f89b24f3 100644 --- a/src/emu/debug/dvwpoints.c +++ b/src/emu/debug/dvwpoints.c @@ -154,8 +154,8 @@ void debug_view_watchpoints::enumerate_sources() disasm_interface_iterator iter(machine().root_device()); for (device_disasm_interface *dasm = iter.first(); dasm != NULL; dasm = iter.next()) { - astring name; - name.printf("%s '%s'", dasm->device().name(), dasm->device().tag()); + std::string name; + strprintf(name, "%s '%s'", dasm->device().name(), dasm->device().tag()); m_source_list.append(*global_alloc(debug_view_source(name.c_str(), &dasm->device()))); } @@ -211,16 +211,15 @@ void debug_view_watchpoints::view_click(const int button, const debug_view_xy& p } -void debug_view_watchpoints::pad_astring_to_length(astring& str, int len) +void debug_view_watchpoints::pad_astring_to_length(std::string& str, int len) { - int diff = len - str.len(); + int diff = len - str.length(); if (diff > 0) { - astring buffer; - buffer.expand(diff); + std::string buffer; for (int i = 0; i < diff; i++) - buffer.catprintf(" "); - str.catprintf("%s", buffer.c_str()); + buffer.append(" "); + strcatprintf(str, "%s", buffer.c_str()); } } @@ -263,48 +262,48 @@ void debug_view_watchpoints::view_update() // Draw debug_view_char *dest = &m_viewdata[0]; - astring linebuf; + std::string linebuf; // Header if (m_visible.y > 0) { - linebuf.reset(); - linebuf.cat("ID"); - if (m_sortType == &cIndexAscending) linebuf.cat('\\'); - else if (m_sortType == &cIndexDescending) linebuf.cat('/'); + linebuf.clear(); + linebuf.append("ID"); + if (m_sortType == &cIndexAscending) linebuf.push_back('\\'); + else if (m_sortType == &cIndexDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[0]); - linebuf.cat("En"); - if (m_sortType == &cEnabledAscending) linebuf.cat('\\'); - else if (m_sortType == &cEnabledDescending) linebuf.cat('/'); + linebuf.append("En"); + if (m_sortType == &cEnabledAscending) linebuf.push_back('\\'); + else if (m_sortType == &cEnabledDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[1]); - linebuf.cat("CPU"); - if (m_sortType == &cCpuAscending) linebuf.cat('\\'); - else if (m_sortType == &cCpuDescending) linebuf.cat('/'); + linebuf.append("CPU"); + if (m_sortType == &cCpuAscending) linebuf.push_back('\\'); + else if (m_sortType == &cCpuDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[2]); - linebuf.cat("Space"); - if (m_sortType == &cSpaceAscending) linebuf.cat('\\'); - else if (m_sortType == &cSpaceDescending) linebuf.cat('/'); + linebuf.append("Space"); + if (m_sortType == &cSpaceAscending) linebuf.push_back('\\'); + else if (m_sortType == &cSpaceDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[3]); - linebuf.cat("Addresses"); - if (m_sortType == &cAddressAscending) linebuf.cat('\\'); - else if (m_sortType == &cAddressDescending) linebuf.cat('/'); + linebuf.append("Addresses"); + if (m_sortType == &cAddressAscending) linebuf.push_back('\\'); + else if (m_sortType == &cAddressDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[4]); - linebuf.cat("Type"); - if (m_sortType == &cTypeAscending) linebuf.cat('\\'); - else if (m_sortType == &cTypeDescending) linebuf.cat('/'); + linebuf.append("Type"); + if (m_sortType == &cTypeAscending) linebuf.push_back('\\'); + else if (m_sortType == &cTypeDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[5]); - linebuf.cat("Condition"); - if (m_sortType == &cConditionAscending) linebuf.cat('\\'); - else if (m_sortType == &cConditionDescending) linebuf.cat('/'); + linebuf.append("Condition"); + if (m_sortType == &cConditionAscending) linebuf.push_back('\\'); + else if (m_sortType == &cConditionDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[6]); - linebuf.cat("Action"); - if (m_sortType == &cActionAscending) linebuf.cat('\\'); - else if (m_sortType == &cActionDescending) linebuf.cat('/'); + linebuf.append("Action"); + if (m_sortType == &cActionAscending) linebuf.push_back('\\'); + else if (m_sortType == &cActionDescending) linebuf.push_back('/'); pad_astring_to_length(linebuf, tableBreaks[7]); for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++) { - dest->byte = (i < linebuf.len()) ? linebuf[i] : ' '; + dest->byte = (i < linebuf.length()) ? linebuf[i] : ' '; dest->attrib = DCA_ANCILLARY; } } @@ -318,30 +317,30 @@ void debug_view_watchpoints::view_update() static char const *const types[] = { "unkn ", "read ", "write", "r/w " }; device_debug::watchpoint *const wp = m_buffer[wpi]; - linebuf.reset(); - linebuf.catprintf("%2X", wp->index()); + linebuf.clear(); + strcatprintf(linebuf, "%2X", wp->index()); pad_astring_to_length(linebuf, tableBreaks[0]); - linebuf.cat(wp->enabled() ? 'X' : 'O'); + linebuf.push_back(wp->enabled() ? 'X' : 'O'); pad_astring_to_length(linebuf, tableBreaks[1]); - linebuf.cat(wp->debugInterface()->device().tag()); + linebuf.append(wp->debugInterface()->device().tag()); pad_astring_to_length(linebuf, tableBreaks[2]); - linebuf.cat(wp->space().name()); + linebuf.append(wp->space().name()); pad_astring_to_length(linebuf, tableBreaks[3]); - linebuf.cat(core_i64_hex_format(wp->space().byte_to_address(wp->address()), wp->space().addrchars())); - linebuf.cat('-'); - linebuf.cat(core_i64_hex_format(wp->space().byte_to_address_end(wp->address() + wp->length()) - 1, wp->space().addrchars())); + linebuf.append(core_i64_hex_format(wp->space().byte_to_address(wp->address()), wp->space().addrchars())); + linebuf.push_back('-'); + linebuf.append(core_i64_hex_format(wp->space().byte_to_address_end(wp->address() + wp->length()) - 1, wp->space().addrchars())); pad_astring_to_length(linebuf, tableBreaks[4]); - linebuf.cat(types[wp->type() & 3]); + linebuf.append(types[wp->type() & 3]); pad_astring_to_length(linebuf, tableBreaks[5]); if (strcmp(wp->condition(), "1")) - linebuf.cat(wp->condition()); + linebuf.append(wp->condition()); pad_astring_to_length(linebuf, tableBreaks[6]); - linebuf.cat(wp->action()); + linebuf.append(wp->action()); pad_astring_to_length(linebuf, tableBreaks[7]); for (UINT32 i = m_topleft.x; i < (m_topleft.x + m_visible.x); i++, dest++) { - dest->byte = (i < linebuf.len()) ? linebuf[i] : ' '; + dest->byte = (i < linebuf.length()) ? linebuf[i] : ' '; dest->attrib = DCA_NORMAL; // Color disabled watchpoints red diff --git a/src/emu/debug/dvwpoints.h b/src/emu/debug/dvwpoints.h index fc6b641effc..e56c992cb8d 100644 --- a/src/emu/debug/dvwpoints.h +++ b/src/emu/debug/dvwpoints.h @@ -42,7 +42,7 @@ protected: private: // internal helpers void enumerate_sources(); - void pad_astring_to_length(astring& str, int len); + void pad_astring_to_length(std::string& str, int len); void gather_watchpoints(); diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c index 28b2e408e3b..a37a7796f5f 100644 --- a/src/emu/debug/express.c +++ b/src/emu/debug/express.c @@ -579,7 +579,7 @@ parsed_expression::parsed_expression(symbol_table *symtable, const char *express void parsed_expression::parse(const char *expression) { // copy the string and reset our parsing state - m_original_string.cpy(expression); + m_original_string.assign(expression); m_tokenlist.reset(); m_stringlist.reset(); @@ -598,8 +598,8 @@ void parsed_expression::parse(const char *expression) void parsed_expression::copy(const parsed_expression &src) { m_symtable = src.m_symtable; - m_original_string.cpy(src.m_original_string); - if (m_original_string) + m_original_string.assign(src.m_original_string); + if (!m_original_string.empty()) parse_string_into_tokens(); } @@ -861,14 +861,14 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *& { // accumulate a lower-case version of the symbol const char *stringstart = string; - astring buffer; + std::string buffer; while (1) { static const char valid[] = "abcdefghijklmnopqrstuvwxyz0123456789_$#.:"; char val = tolower((UINT8)string[0]); if (val == 0 || strchr(valid, val) == NULL) break; - buffer.cat(&val, 1); + buffer.append(&val, 1); string++; } @@ -880,49 +880,49 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *& } // empty string is automatically invalid - if (!buffer) + if (buffer.empty()) throw expression_error(expression_error::INVALID_TOKEN, token.offset()); // check for wordy variants on standard operators - if (buffer == "bnot") + if (buffer.compare("bnot")==0) { token.configure_operator(TVL_NOT, 2); return; } - if (buffer == "plus") + if (buffer.compare("plus") == 0) { token.configure_operator(TVL_ADD, 4); return; } - if (buffer == "minus") + if (buffer.compare("minus") == 0) { token.configure_operator(TVL_SUBTRACT, 4); return; } - if (buffer == "times" || buffer == "mul") + if (buffer.compare("times") == 0 || buffer.compare("mul") == 0) { token.configure_operator(TVL_MULTIPLY, 3); return; } - if (buffer == "div") + if (buffer.compare("div") == 0) { token.configure_operator(TVL_DIVIDE, 3); return; } - if (buffer == "mod") + if (buffer.compare("mod") == 0) { token.configure_operator(TVL_MODULO, 3); return; } - if (buffer == "lt") + if (buffer.compare("lt") == 0) { token.configure_operator(TVL_LESS, 6); return; } - if (buffer == "le") + if (buffer.compare("le") == 0) { token.configure_operator(TVL_LESSOREQUAL, 6); return; } - if (buffer == "gt") + if (buffer.compare("gt") == 0) { token.configure_operator(TVL_GREATER, 6); return; } - if (buffer == "ge") + if (buffer.compare("ge") == 0) { token.configure_operator(TVL_GREATEROREQUAL, 6); return; } - if (buffer == "eq") + if (buffer.compare("eq") == 0) { token.configure_operator(TVL_EQUAL, 7); return; } - if (buffer == "ne") + if (buffer.compare("ne") == 0) { token.configure_operator(TVL_NOTEQUAL, 7); return; } - if (buffer == "not") + if (buffer.compare("not") == 0) { token.configure_operator(TVL_COMPLEMENT, 2); return; } - if (buffer == "and") + if (buffer.compare("and") == 0) { token.configure_operator(TVL_LAND, 8); return; } - if (buffer == "band") + if (buffer.compare("band") == 0) { token.configure_operator(TVL_BAND, 8); return; } - if (buffer == "or") + if (buffer.compare("or") == 0) { token.configure_operator(TVL_LOR, 12); return; } - if (buffer == "bor") + if (buffer.compare("bor") == 0) { token.configure_operator(TVL_BOR, 10); return; } - if (buffer == "bxor") + if (buffer.compare("bxor") == 0) { token.configure_operator(TVL_BXOR, 9); return; } - if (buffer == "lshift") + if (buffer.compare("lshift") == 0) { token.configure_operator(TVL_LSHIFT, 5); return; } - if (buffer == "rshift") + if (buffer.compare("rshift") == 0) { token.configure_operator(TVL_RSHIFT, 5); return; } // if we have an 0x prefix, we must be a hex value @@ -1033,7 +1033,7 @@ void parsed_expression::parse_quoted_string(parse_token &token, const char *&str { // accumulate a copy of the quoted string string++; - astring buffer; + std::string buffer; while (string[0] != 0) { // allow "" to mean a nested double-quote @@ -1043,7 +1043,7 @@ void parsed_expression::parse_quoted_string(parse_token &token, const char *&str break; string++; } - buffer.cat(string++, 1); + buffer.append(string++, 1); } // if we didn't find the ending quote, report an error diff --git a/src/emu/debug/express.h b/src/emu/debug/express.h index 3063f5e9c04..37f357b0830 100644 --- a/src/emu/debug/express.h +++ b/src/emu/debug/express.h @@ -135,7 +135,7 @@ protected: symbol_entry * m_next; // link to next entry symbol_table & m_table; // pointer back to the owning table symbol_type m_type; // type of symbol - astring m_name; // name of the symbol + std::string m_name; // name of the symbol void * m_ref; // internal reference }; @@ -341,7 +341,7 @@ private: private: // internal state expression_string * m_next; // next string in list - astring m_string; // copy of the string + std::string m_string; // copy of the string }; // internal helpers @@ -373,7 +373,7 @@ private: // internal state symbol_table * m_symtable; // symbol table - astring m_original_string; // original string (prior to parsing) + std::string m_original_string; // original string (prior to parsing) simple_list<parse_token> m_tokenlist; // token list simple_list<expression_string> m_stringlist; // string list int m_token_stack_ptr; // stack pointer (used during execution) diff --git a/src/emu/devfind.h b/src/emu/devfind.h index 38f7705ca0a..2493a66782f 100644 --- a/src/emu/devfind.h +++ b/src/emu/devfind.h @@ -267,8 +267,9 @@ public: // construction/destruction ioport_array_finder(device_t &base, const char *basetag) { - for (int index = 0; index < _Count; index++) - m_array[index].reset(global_alloc(ioport_finder_type(base, m_tag[index].format("%s.%d", basetag, index).c_str()))); + for (int index = 0; index < _Count; index++) { + m_array[index].reset(global_alloc(ioport_finder_type(base, strformat(m_tag[index], "%s.%d", basetag, index).c_str()))); + } } ioport_array_finder(device_t &base, const char * const *tags) @@ -284,7 +285,7 @@ public: protected: // internal state auto_pointer<ioport_finder_type> m_array[_Count]; - astring m_tag[_Count]; + std::string m_tag[_Count]; }; // optional ioport array finder @@ -436,7 +437,7 @@ public: shared_ptr_array_finder(device_t &base, const char *basetag, UINT8 width = sizeof(_PointerType) * 8) { for (int index = 0; index < _Count; index++) - m_array[index].reset(global_alloc(shared_ptr_type(base, m_tag[index].format("%s.%d", basetag, index).c_str(), width))); + m_array[index].reset(global_alloc(shared_ptr_type(base, strformat(m_tag[index],"%s.%d", basetag, index).c_str(), width))); } // array accessors @@ -446,7 +447,7 @@ public: protected: // internal state auto_pointer<shared_ptr_type> m_array[_Count]; - astring m_tag[_Count]; + std::string m_tag[_Count]; }; // optional shared pointer array finder diff --git a/src/emu/device.c b/src/emu/device.c index 334505591b6..5eeee60c9a3 100644 --- a/src/emu/device.c +++ b/src/emu/device.c @@ -101,9 +101,9 @@ device_t::device_t(const machine_config &mconfig, device_type type, const char * m_auto_finder_list(NULL) { if (owner != NULL) - m_tag.cpy((owner->owner() == NULL) ? "" : owner->tag()).cat(":").cat(tag); + m_tag.assign((owner->owner() == NULL) ? "" : owner->tag()).append(":").append(tag); else - m_tag.cpy(":"); + m_tag.assign(":"); static_set_clock(*this, clock); } @@ -129,8 +129,7 @@ memory_region *device_t::memregion(const char *_tag) const return NULL; // build a fully-qualified name and look it up - astring fullpath; - return machine().memory().region(subtag(fullpath, _tag).c_str()); + return machine().memory().region(subtag(_tag).c_str()); } @@ -146,8 +145,7 @@ memory_share *device_t::memshare(const char *_tag) const return NULL; // build a fully-qualified name and look it up - astring fullpath; - return machine().memory().shared(subtag(fullpath, _tag).c_str()); + return machine().memory().shared(subtag(_tag).c_str()); } @@ -163,8 +161,7 @@ memory_bank *device_t::membank(const char *_tag) const return NULL; // build a fully-qualified name and look it up - astring fullpath; - return machine().memory().bank(subtag(fullpath, _tag).c_str()); + return machine().memory().bank(subtag(_tag).c_str()); } @@ -180,8 +177,7 @@ ioport_port *device_t::ioport(const char *tag) const return NULL; // build a fully-qualified name and look it up - astring fullpath; - return machine().ioport().port(subtag(fullpath, tag).c_str()); + return machine().ioport().port(subtag(tag).c_str()); } @@ -190,15 +186,14 @@ ioport_port *device_t::ioport(const char *tag) const // object for a given port name //------------------------------------------------- -astring device_t::parameter(const char *tag) const +std::string device_t::parameter(const char *tag) const { // safety first if (this == NULL) return NULL; // build a fully-qualified name and look it up - astring fullpath; - return machine().parameters().lookup(subtag(fullpath, tag)); + return machine().parameters().lookup(subtag(tag)); } @@ -695,8 +690,7 @@ void device_t::device_timer(emu_timer &timer, device_timer_id id, int param, voi device_t *device_t::subdevice_slow(const char *tag) const { // resolve the full path - astring fulltag; - subtag(fulltag, tag); + std::string fulltag = subtag(tag); // we presume the result is a rooted path; also doubled colons mess up our // tree walk, so catch them early @@ -705,12 +699,12 @@ device_t *device_t::subdevice_slow(const char *tag) const // walk the device list to the final path device_t *curdevice = &mconfig().root_device(); - if (fulltag.len() > 1) - for (int start = 1, end = fulltag.chr(start, ':'); start != 0 && curdevice != NULL; start = end + 1, end = fulltag.chr(start, ':')) + if (fulltag.length() > 1) + for (int start = 1, end = fulltag.find_first_of(':', start); start != 0 && curdevice != NULL; start = end + 1, end = fulltag.find_first_of(':', start)) { - astring part(fulltag, start, (end == -1) ? -1 : end - start); + std::string part(fulltag, start, (end == -1) ? -1 : end - start); for (curdevice = curdevice->m_subdevice_list.first(); curdevice != NULL; curdevice = curdevice->next()) - if (part == curdevice->m_basetag) + if (part.compare(curdevice->m_basetag)==0) break; } @@ -726,21 +720,22 @@ device_t *device_t::subdevice_slow(const char *tag) const // to our device based on the provided tag //------------------------------------------------- -astring &device_t::subtag(astring &result, const char *tag) const +std::string device_t::subtag(const char *tag) const { + std::string result; // if the tag begins with a colon, ignore our path and start from the root if (*tag == ':') { tag++; - result.cpy(":"); + result.assign(":"); } // otherwise, start with our path else { - result.cpy(m_tag); + result.assign(m_tag); if (result != ":") - result.cat(":"); + result.append(":"); } // iterate over the tag, look for special path characters to resolve @@ -748,30 +743,30 @@ astring &device_t::subtag(astring &result, const char *tag) const while ((caret = strchr(tag, '^')) != NULL) { // copy everything up to there - result.cat(tag, caret - tag); + result.append(tag, caret - tag); tag = caret + 1; // strip trailing colons - int len = result.len(); + int len = result.length(); while (result[--len] == ':') - result.substr(0, len); + result = result.substr(0, len); // remove the last path part, leaving the last colon if (result != ":") { - int lastcolon = result.rchr(0, ':'); + int lastcolon = result.find_last_of(':'); if (lastcolon != -1) - result.substr(0, lastcolon + 1); + result = result.substr(0, lastcolon + 1); } } // copy everything else - result.cat(tag); + result.append(tag); // strip trailing colons up to the root - int len = result.len(); + int len = result.length(); while (len > 1 && result[--len] == ':') - result.substr(0, len); + result = result.substr(0, len); return result; } diff --git a/src/emu/device.h b/src/emu/device.h index bdd3ef45234..b6b245c8490 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -129,8 +129,8 @@ public: ioport_constructor input_ports() const { return device_input_ports(); } UINT8 default_bios() const { return m_default_bios; } UINT8 system_bios() const { return m_system_bios; } - astring default_bios_tag() const { return m_default_bios_tag; } - astring parameter(const char *tag) const; + std::string default_bios_tag() const { return m_default_bios_tag; } + std::string parameter(const char *tag) const; // interface helpers device_interface *first_interface() const { return m_interface_list; } @@ -150,8 +150,8 @@ public: // owned object helpers device_t *first_subdevice() const { return m_subdevice_list.first(); } - astring &subtag(astring &dest, const char *tag) const; - astring &siblingtag(astring &dest, const char *tag) const { return (this != NULL && m_owner != NULL) ? m_owner->subtag(dest, tag) : dest.cpy(tag); } + std::string subtag(const char *tag) const; + std::string siblingtag(const char *tag) const { return (this != NULL && m_owner != NULL) ? m_owner->subtag(tag) : std::string(tag); } memory_region *memregion(const char *tag) const; memory_share *memshare(const char *tag) const; memory_bank *membank(const char *tag) const; @@ -166,7 +166,7 @@ public: static void static_set_clock(device_t &device, UINT32 clock); static void static_set_static_config(device_t &device, const void *config) { device.m_static_config = config; } static void static_set_input_default(device_t &device, const input_device_default *config) { device.m_input_defaults = config; } - static void static_set_default_bios_tag(device_t &device, const char *tag) { astring default_bios_tag(tag); device.m_default_bios_tag = default_bios_tag; } + static void static_set_default_bios_tag(device_t &device, const char *tag) { std::string default_bios_tag(tag); device.m_default_bios_tag = default_bios_tag; } // state helpers void config_complete(); @@ -238,10 +238,10 @@ protected: // core device properties const device_type m_type; // device type - astring m_name; // name of the device - astring m_shortname; // short name of the device - astring m_searchpath; // search path, used for media loading - astring m_source; // device source file name + std::string m_name; // name of the device + std::string m_shortname; // short name of the device + std::string m_searchpath; // search path, used for media loading + std::string m_source; // device source file name // device relationships device_t * m_owner; // device that owns us @@ -270,7 +270,7 @@ protected: UINT8 m_system_bios; // the system BIOS we wish to load UINT8 m_default_bios; // the default system BIOS - astring m_default_bios_tag; // tag of the default system BIOS + std::string m_default_bios_tag; // tag of the default system BIOS private: // private helpers @@ -282,8 +282,8 @@ private: // private state; accessor use required running_machine * m_machine; save_manager * m_save; - astring m_tag; // full tag for this instance - astring m_basetag; // base part of the tag + std::string m_tag; // full tag for this instance + std::string m_basetag; // base part of the tag bool m_config_complete; // have we completed our configuration? bool m_started; // true if the start function has succeeded finder_base * m_auto_finder_list; // list of objects to auto-find diff --git a/src/emu/diexec.c b/src/emu/diexec.c index 73148950ea8..d527dc88c39 100644 --- a/src/emu/diexec.c +++ b/src/emu/diexec.c @@ -547,8 +547,7 @@ void device_execute_interface::interface_post_reset() if (m_vblank_interrupt_screen != NULL) { // get the screen that will trigger the VBLANK - astring tempstring; - screen_device *screen = downcast<screen_device *>(device().machine().device(device().siblingtag(tempstring, m_vblank_interrupt_screen).c_str())); + screen_device *screen = downcast<screen_device *>(device().machine().device(device().siblingtag(m_vblank_interrupt_screen).c_str())); assert(screen != NULL); screen->register_vblank_callback(vblank_state_delegate(FUNC(device_execute_interface::on_vblank), this)); diff --git a/src/emu/digfx.c b/src/emu/digfx.c index b3bd0edb770..6b854f046ef 100644 --- a/src/emu/digfx.c +++ b/src/emu/digfx.c @@ -319,11 +319,11 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con if (region != NULL && GFXENTRY_ISROM(gfx.flags)) { // resolve the region - astring gfxregion; + std::string gfxregion; if (GFXENTRY_ISDEVICE(gfx.flags)) - device().subtag(gfxregion, region); + gfxregion = device().subtag(region); else - device().owner()->subtag(gfxregion, region); + gfxregion = device().owner()->subtag(region); UINT32 region_length = valid.region_length(gfxregion.c_str()); if (region_length == 0) diff --git a/src/emu/diimage.c b/src/emu/diimage.c index 42799b68c0b..e4c40167114 100644 --- a/src/emu/diimage.c +++ b/src/emu/diimage.c @@ -151,30 +151,31 @@ image_error_t device_image_interface::set_image_filename(const char *filename) { m_image_name = filename; zippath_parent(m_working_directory, filename); - m_basename.cpy(m_image_name); + m_basename.assign(m_image_name); - int loc1 = m_image_name.rchr(0,'\\'); - int loc2 = m_image_name.rchr(0,'/'); - int loc3 = m_image_name.rchr(0,':'); + int loc1 = m_image_name.find_last_of('\\'); + int loc2 = m_image_name.find_last_of('/'); + int loc3 = m_image_name.find_last_of(':'); int loc = MAX(loc1,MAX(loc2,loc3)); if (loc!=-1) { if (loc == loc3) { // temp workaround for softlists now that m_image_name contains the part name too (e.g. list:gamename:cart) - astring tmpstr = astring(m_basename.substr(0,loc)); - int tmploc = tmpstr.rchr(0,':'); + m_basename = m_basename.substr(0, loc); + std::string tmpstr = std::string(m_basename); + int tmploc = tmpstr.find_last_of(':'); m_basename = m_basename.substr(tmploc + 1,loc-tmploc); } else - m_basename = m_basename.substr(loc + 1,m_basename.len()-loc); + m_basename = m_basename.substr(loc + 1, m_basename.length() - loc); } - m_basename_noext = m_basename.cpy(m_basename); + m_basename_noext = m_basename.assign(m_basename); m_filetype = ""; - loc = m_basename_noext.rchr(0,'.'); + loc = m_basename_noext.find_last_of('.'); if (loc!=-1) { m_basename_noext = m_basename_noext.substr(0,loc); - m_filetype = m_basename.cpy(m_basename); - m_filetype = m_filetype.substr(loc + 1,m_filetype.len()-loc); + m_filetype = m_basename.assign(m_basename); + m_filetype = m_filetype.substr(loc + 1, m_filetype.length() - loc); } return IMAGE_ERROR_SUCCESS; @@ -210,9 +211,9 @@ const image_device_format *device_image_interface::device_get_named_creatable_fo void device_image_interface::clear_error() { m_err = IMAGE_ERROR_SUCCESS; - if (m_err_message) + if (!m_err_message.empty()) { - m_err_message.reset(); + m_err_message.clear(); } } @@ -236,7 +237,7 @@ static const char *const messages[] = const char *device_image_interface::error() { - return (m_err_message) ? m_err_message.c_str() : messages[m_err]; + return (!m_err_message.empty()) ? m_err_message.c_str() : messages[m_err]; } @@ -351,7 +352,7 @@ void device_image_interface::setup_working_directory() const char * device_image_interface::working_directory() { /* check to see if we've never initialized the working directory */ - if (!m_working_directory) + if (m_working_directory.empty()) setup_working_directory(); return m_working_directory.c_str(); @@ -500,13 +501,13 @@ UINT32 device_image_interface::crc() -------------------------------------------------*/ void device_image_interface::battery_load(void *buffer, int length, int fill) { - astring fname = astring(device().machine().system().name).cat(PATH_SEPARATOR).cat(m_basename_noext.c_str()).cat(".nv"); + std::string fname = std::string(device().machine().system().name).append(PATH_SEPARATOR).append(m_basename_noext.c_str()).append(".nv"); image_battery_load_by_name(device().machine().options(), fname.c_str(), buffer, length, fill); } void device_image_interface::battery_load(void *buffer, int length, void *def_buffer) { - astring fname = astring(device().machine().system().name).cat(PATH_SEPARATOR).cat(m_basename_noext.c_str()).cat(".nv"); + std::string fname = std::string(device().machine().system().name).append(PATH_SEPARATOR).append(m_basename_noext.c_str()).append(".nv"); image_battery_load_by_name(device().machine().options(), fname.c_str(), buffer, length, def_buffer); } @@ -518,7 +519,7 @@ void device_image_interface::battery_load(void *buffer, int length, void *def_bu -------------------------------------------------*/ void device_image_interface::battery_save(const void *buffer, int length) { - astring fname = astring(device().machine().system().name).cat(PATH_SEPARATOR).cat(m_basename_noext.c_str()).cat(".nv"); + std::string fname = std::string(device().machine().system().name).append(PATH_SEPARATOR).append(m_basename_noext.c_str()).append(".nv"); image_battery_save_by_name(device().machine().options(), fname.c_str(), buffer, length); } @@ -536,7 +537,7 @@ bool device_image_interface::uses_file_extension(const char *file_extension) con file_extension++; /* find the extensions */ - astring extensions(file_extensions()); + std::string extensions(file_extensions()); char *ext = strtok((char*)extensions.c_str(),","); while (ext != NULL) { @@ -573,7 +574,7 @@ image_error_t device_image_interface::load_image_by_path(UINT32 open_flags, cons { file_error filerr = FILERR_NOT_FOUND; image_error_t err = IMAGE_ERROR_FILENOTFOUND; - astring revised_path; + std::string revised_path; /* attempt to read the file */ filerr = zippath_fopen(path, open_flags, m_file, revised_path); @@ -627,7 +628,7 @@ int device_image_interface::reopen_for_write(const char *path) file_error filerr = FILERR_NOT_FOUND; image_error_t err = IMAGE_ERROR_FILENOTFOUND; - astring revised_path; + std::string revised_path; /* attempt to open the file for writing*/ filerr = zippath_fopen(path, OPEN_FLAG_READ|OPEN_FLAG_WRITE|OPEN_FLAG_CREATE, m_file, revised_path); @@ -703,7 +704,7 @@ void device_image_interface::determine_open_plan(int is_create, UINT32 *open_pla static void dump_wrong_and_correct_checksums(const hash_collection &hashes, const hash_collection &acthashes) { - astring tempstr; + std::string tempstr; osd_printf_error(" EXPECTED: %s\n", hashes.macro_string(tempstr)); osd_printf_error(" FOUND: %s\n", acthashes.macro_string(tempstr)); } @@ -727,7 +728,7 @@ static int verify_length_and_hash(emu_file *file, const char *name, UINT32 exple } /* If there is no good dump known, write it */ - astring tempstr; + std::string tempstr; hash_collection &acthashes = file->hashes(hashes.hash_types(tempstr)); if (hashes.flag(hash_collection::FLAG_NO_DUMP)) { @@ -755,9 +756,9 @@ static int verify_length_and_hash(emu_file *file, const char *name, UINT32 exple bool device_image_interface::load_software(software_list_device &swlist, const char *swname, const rom_entry *start) { - astring locationtag, breakstr("%"); + std::string locationtag, breakstr("%"); const rom_entry *region; - astring regiontag; + std::string regiontag; bool retVal = FALSE; int warningcount = 0; for (region = start; region != NULL; region = rom_next_region(region)) @@ -784,40 +785,40 @@ bool device_image_interface::load_software(software_list_device &swlist, const c if (supported == SOFTWARE_SUPPORTED_NO) osd_printf_error("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()); - // attempt reading up the chain through the parents and create a locationtag astring in the format + // attempt reading up the chain through the parents and create a locationtag std::string in the format // " swlist % clonename % parentname " // below, we have the code to split the elements and to create paths to load from while (swinfo != NULL) { - locationtag.cat(swinfo->shortname()).cat(breakstr); + locationtag.append(swinfo->shortname()).append(breakstr); const char *parentname = swinfo->parentname(); swinfo = (parentname != NULL) ? swlist.find(parentname) : NULL; } // strip the final '%' - locationtag.del(locationtag.len() - 1, 1); + locationtag.erase(locationtag.length() - 1, 1); // check if locationtag actually contains two locations separated by '%' // (i.e. check if we are dealing with a clone in softwarelist) - astring tag2, tag3, tag4(locationtag), tag5; - int separator = tag4.chr(0, '%'); + std::string tag2, tag3, tag4(locationtag), tag5; + int separator = tag4.find_first_of('%'); if (separator != -1) { // we are loading a clone through softlists, split the setname from the parentname - tag5.cpysubstr(tag4, separator + 1, tag4.len() - separator + 1); - tag4.del(separator, tag4.len() - separator); + tag5.assign(tag4.substr(separator + 1, tag4.length() - separator + 1)); + tag4.erase(separator, tag4.length() - separator); } // prepare locations where we have to load from: list/parentname & list/clonename - astring tag1(swlist.list_name()); - tag1.cat(PATH_SEPARATOR); - tag2.cpy(tag1.cat(tag4)); - tag1.cpy(swlist.list_name()); - tag1.cat(PATH_SEPARATOR); - tag3.cpy(tag1.cat(tag5)); - - if (tag5.chr(0, '%') != -1) + std::string tag1(swlist.list_name()); + tag1.append(PATH_SEPARATOR); + tag2.assign(tag1.append(tag4)); + tag1.assign(swlist.list_name()); + tag1.append(PATH_SEPARATOR); + tag3.assign(tag1.append(tag5)); + + if (tag5.find_first_of('%') != -1) fatalerror("We do not support clones of clones!\n"); // try to load from the available location(s): @@ -868,8 +869,8 @@ bool device_image_interface::load_internal(const char *path, bool is_create, int m_from_swlist = FALSE; // if the path contains no period, we are using softlists, so we won't create an image - astring pathstr(path); - bool filename_has_period = (pathstr.rchr(0, '.') != -1) ? TRUE : FALSE; + std::string pathstr(path); + bool filename_has_period = (pathstr.find_last_of('.') != -1) ? TRUE : FALSE; /* first unload the image */ unload(); @@ -895,12 +896,12 @@ bool device_image_interface::load_internal(const char *path, bool is_create, int if (softload) { m_software_info_ptr = &m_software_part_ptr->info(); - m_software_list_name.cpy(m_software_info_ptr->list().list_name()); - m_full_software_name.cpy(m_software_part_ptr->info().shortname()); + m_software_list_name.assign(m_software_info_ptr->list().list_name()); + m_full_software_name.assign(m_software_part_ptr->info().shortname()); // if we had launched from softlist with a specified part, e.g. "shortname:part" // we would have recorded the wrong name, so record it again based on software_info - if (m_software_info_ptr && m_full_software_name) + if (m_software_info_ptr && !m_full_software_name.empty()) m_err = set_image_filename(m_full_software_name.c_str()); // check if image should be read-only @@ -1094,21 +1095,21 @@ void device_image_interface::clear() } } - m_image_name.reset(); + m_image_name.clear(); m_readonly = false; m_created = false; - m_longname.reset(); - m_manufacturer.reset(); - m_year.reset(); - m_basename.reset(); - m_basename_noext.reset(); - m_filetype.reset(); + m_longname.clear(); + m_manufacturer.clear(); + m_year.clear(); + m_basename.clear(); + m_basename_noext.clear(); + m_filetype.clear(); - m_full_software_name.reset(); + m_full_software_name.clear(); m_software_info_ptr = NULL; m_software_part_ptr = NULL; - m_software_list_name.reset(); + m_software_list_name.clear(); } /*------------------------------------------------- @@ -1145,8 +1146,8 @@ void device_image_interface::update_names(const device_type device_type, const c const char *brief_name = (device_type!=NULL) ? brief : device_brieftypename(image_type()); if (count > 1) { - m_instance_name.printf("%s%d", inst_name , index + 1); - m_brief_instance_name.printf("%s%d", brief_name, index + 1); + strprintf(m_instance_name,"%s%d", inst_name, index + 1); + strprintf(m_brief_instance_name, "%s%d", brief_name, index + 1); } else { @@ -1171,18 +1172,18 @@ void device_image_interface::update_names(const device_type device_type, const c // case. //------------------------------------------------- -void device_image_interface::software_name_split(const char *swlist_swname, astring &swlist_name, astring &swname, astring &swpart) +void device_image_interface::software_name_split(const char *swlist_swname, std::string &swlist_name, std::string &swname, std::string &swpart) { // reset all output parameters - swlist_name.reset(); - swname.reset(); - swpart.reset(); + swlist_name.clear(); + swname.clear(); + swpart.clear(); // if no colon, this is the swname by itself const char *split1 = strchr(swlist_swname, ':'); if (split1 == NULL) { - swname.cpy(swlist_swname); + swname.assign(swlist_swname); return; } @@ -1190,22 +1191,22 @@ void device_image_interface::software_name_split(const char *swlist_swname, astr const char *split2 = strchr(split1 + 1, ':'); if (split2 == NULL) { - swname.cpy(swlist_swname, split1 - swlist_swname); - swpart.cpy(split1 + 1); + swname.assign(swlist_swname, split1 - swlist_swname); + swpart.assign(split1 + 1); return; } // if two colons present, split into 3 parts - swlist_name.cpy(swlist_swname, split1 - swlist_swname); - swname.cpy(split1 + 1, split2 - (split1 + 1)); - swpart.cpy(split2 + 1); + swlist_name.assign(swlist_swname, split1 - swlist_swname); + swname.assign(split1 + 1, split2 - (split1 + 1)); + swpart.assign(split2 + 1); } software_part *device_image_interface::find_software_item(const char *path, bool restrict_to_interface) { // split full software name into software list name and short software name - astring swlist_name, swinfo_name, swpart_name; + std::string swlist_name, swinfo_name, swpart_name; software_name_split(path, swlist_name, swinfo_name, swpart_name); // determine interface @@ -1217,7 +1218,7 @@ software_part *device_image_interface::find_software_item(const char *path, bool software_list_device_iterator deviter(device().mconfig().root_device()); for (software_list_device *swlistdev = deviter.first(); swlistdev != NULL; swlistdev = deviter.next()) { - if (swlist_name == swlistdev->list_name() || !(swlist_name.len() > 0)) + if (swlist_name.compare(swlistdev->list_name())==0 || !(swlist_name.length() > 0)) { software_info *info = swlistdev->find(swinfo_name.c_str()); if (info != NULL) @@ -1276,8 +1277,8 @@ bool device_image_interface::load_software_part(const char *path, software_part bool result = call_softlist_load(swpart->info().list(), swpart->info().shortname(), swpart->romdata()); // Tell the world which part we actually loaded - astring full_sw_name; - full_sw_name.printf("%s:%s:%s", swpart->info().list().list_name(), swpart->info().shortname(), swpart->name()); + std::string full_sw_name; + strprintf(full_sw_name,"%s:%s:%s", swpart->info().list().list_name(), swpart->info().shortname(), swpart->name()); // check compatibility if (!swpart->is_compatible(swpart->info().list())) @@ -1318,19 +1319,19 @@ bool device_image_interface::load_software_part(const char *path, software_part // software_get_default_slot //------------------------------------------------- -void device_image_interface::software_get_default_slot(astring &result, const char *default_card_slot) +void device_image_interface::software_get_default_slot(std::string &result, const char *default_card_slot) { const char *path = device().mconfig().options().value(instance_name()); - result.reset(); + result.clear(); if (strlen(path) > 0) { - result.cpy(default_card_slot); + result.assign(default_card_slot); software_part *swpart = find_software_item(path, true); if (swpart != NULL) { const char *slot = swpart->feature("slot"); if (slot != NULL) - result.cpy(slot); + result.assign(slot); } } } diff --git a/src/emu/diimage.h b/src/emu/diimage.h index 3878732dfbd..b8a7038f6e3 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -87,10 +87,10 @@ public: private: image_device_format *m_next; - astring m_name; - astring m_description; - astring m_extensions; - astring m_optspec; + std::string m_name; + std::string m_description; + std::string m_extensions; + std::string m_optspec; }; @@ -170,11 +170,11 @@ public: void seterror(image_error_t err, const char *message); void message(const char *format, ...) ATTR_PRINTF(2,3); - bool exists() { return m_image_name; } - const char *filename() { if (!m_image_name) return NULL; else return m_image_name.c_str(); } - const char *basename() { if (!m_basename) return NULL; else return m_basename.c_str(); } - const char *basename_noext() { if (!m_basename_noext) return NULL; else return m_basename_noext.c_str(); } - const char *filetype() { if (!m_filetype) return NULL; else return m_filetype.c_str(); } + bool exists() { return !m_image_name.empty(); } + const char *filename() { if (m_image_name.empty()) return NULL; else return m_image_name.c_str(); } + const char *basename() { if (m_basename.empty()) return NULL; else return m_basename.c_str(); } + const char *basename_noext() { if (m_basename_noext.empty()) return NULL; else return m_basename_noext.c_str(); } + const char *filetype() { if (m_filetype.empty()) return NULL; else return m_filetype.c_str(); } core_file *image_core_file() { return m_file; } UINT64 length() { check_for_file(); return core_fsize(m_file); } bool is_readonly() { return m_readonly; } @@ -234,7 +234,7 @@ public: bool load_software(software_list_device &swlist, const char *swname, const rom_entry *entry); int reopen_for_write(const char *path); - static void software_name_split(const char *swlist_swname, astring &swlist_name, astring &swname, astring &swpart); + static void software_name_split(const char *swlist_swname, std::string &swlist_name, std::string &swname, std::string &swpart); protected: bool load_internal(const char *path, bool is_create, int create_format, option_resolution *create_args, bool just_load); @@ -259,7 +259,7 @@ protected: software_part *find_software_item(const char *path, bool restrict_to_interface); bool load_software_part(const char *path, software_part *&swpart); - void software_get_default_slot(astring &result, const char *default_card_slot); + void software_get_default_slot(std::string &result, const char *default_card_slot); // derived class overrides @@ -269,29 +269,29 @@ protected: /* error related info */ image_error_t m_err; - astring m_err_message; + std::string m_err_message; /* variables that are only non-zero when an image is mounted */ core_file *m_file; emu_file *m_mame_file; - astring m_image_name; - astring m_basename; - astring m_basename_noext; - astring m_filetype; + std::string m_image_name; + std::string m_basename; + std::string m_basename_noext; + std::string m_filetype; /* working directory; persists across mounts */ - astring m_working_directory; + std::string m_working_directory; /* Software information */ - astring m_full_software_name; + std::string m_full_software_name; software_info *m_software_info_ptr; software_part *m_software_part_ptr; - astring m_software_list_name; + std::string m_software_list_name; /* info read from the hash file/software list */ - astring m_longname; - astring m_manufacturer; - astring m_year; + std::string m_longname; + std::string m_manufacturer; + std::string m_year; UINT32 m_supported; /* flags */ @@ -306,8 +306,8 @@ protected: hash_collection m_hash; - astring m_brief_instance_name; - astring m_instance_name; + std::string m_brief_instance_name; + std::string m_instance_name; /* creation info */ simple_list<image_device_format> m_formatlist; diff --git a/src/emu/dimemory.c b/src/emu/dimemory.c index c36a68531ea..1b10dd709b5 100644 --- a/src/emu/dimemory.c +++ b/src/emu/dimemory.c @@ -297,17 +297,14 @@ void device_memory_interface::interface_validity_check(validity_checker &valid) { // make sure we can resolve the full path to the region bool found = false; - astring entry_region; - entry->m_devbase.subtag(entry_region, entry->m_region); + std::string entry_region = entry->m_devbase.subtag(entry->m_region); // look for the region device_iterator deviter(device().mconfig().root_device()); for (device_t *device = deviter.first(); device != NULL; device = deviter.next()) for (const rom_entry *romp = rom_first_region(*device); romp != NULL && !found; romp = rom_next_region(romp)) { - astring fulltag; - rom_region_name(fulltag, *device, romp); - if (fulltag == entry_region) + if (rom_region_name(*device, romp) == entry_region) { // verify the address range is within the region's bounds offs_t length = ROMREGION_GETLENGTH(romp); @@ -326,13 +323,13 @@ void device_memory_interface::interface_validity_check(validity_checker &valid) // FIXME: This doesn't work! AMH_DEVICE_DELEGATE entries don't even set m_tag, the device tag is inside the proto-delegate if (entry->m_read.m_type == AMH_DEVICE_DELEGATE && entry->m_read.m_tag != NULL) { - astring temp(entry->m_read.m_tag); + std::string temp(entry->m_read.m_tag); if (device().siblingdevice(temp.c_str()) == NULL) osd_printf_error("%s space memory map entry references nonexistant device '%s'\n", spaceconfig->m_name, entry->m_read.m_tag); } if (entry->m_write.m_type == AMH_DEVICE_DELEGATE && entry->m_write.m_tag != NULL) { - astring temp(entry->m_write.m_tag); + std::string temp(entry->m_write.m_tag); if (device().siblingdevice(temp.c_str()) == NULL) osd_printf_error("%s space memory map entry references nonexistant device '%s'\n", spaceconfig->m_name, entry->m_write.m_tag); } diff --git a/src/emu/dislot.c b/src/emu/dislot.c index 22fc5c903f9..e0c07d206f1 100644 --- a/src/emu/dislot.c +++ b/src/emu/dislot.c @@ -64,7 +64,7 @@ device_t* device_slot_interface::get_card_device() { const char *subtag; device_t *dev = NULL; - astring temp; + std::string temp; if (!device().mconfig().options().exists(device().tag()+1)) { subtag = m_default_option; } else { diff --git a/src/emu/dislot.h b/src/emu/dislot.h index d7df2c451d5..77c7eb91bf0 100644 --- a/src/emu/dislot.h +++ b/src/emu/dislot.h @@ -116,7 +116,7 @@ public: const char *default_option() const { return m_default_option; } device_slot_option *first_option() const { return m_options.first(); } device_slot_option *option(const char *name) const { if (name) return m_options.find(name); return NULL; } - virtual void get_default_card_software(astring &result) { result.reset(); } + virtual void get_default_card_software(std::string &result) { result.clear(); } device_t *get_card_device(); private: diff --git a/src/emu/disound.h b/src/emu/disound.h index 3dd3737b35f..949d03ce29e 100644 --- a/src/emu/disound.h +++ b/src/emu/disound.h @@ -80,7 +80,7 @@ public: UINT32 m_input; // target input index UINT32 m_mixoutput; // target mixer output float m_gain; // gain - astring m_target; // target tag + std::string m_target; // target tag }; // construction/destruction diff --git a/src/emu/distate.c b/src/emu/distate.c index 9cafa069e37..79ec37e422b 100644 --- a/src/emu/distate.c +++ b/src/emu/distate.c @@ -78,13 +78,13 @@ device_state_entry::device_state_entry(int index, const char *symbol, void *data // override well-known symbols if (index == STATE_GENPC) - m_symbol.cpy("CURPC"); + m_symbol.assign("CURPC"); else if (index == STATE_GENPCBASE) - m_symbol.cpy("CURPCBASE"); + m_symbol.assign("CURPCBASE"); else if (index == STATE_GENSP) - m_symbol.cpy("CURSP"); + m_symbol.assign("CURSP"); else if (index == STATE_GENFLAGS) - m_symbol.cpy("CURFLAGS"); + m_symbol.assign("CURFLAGS"); } device_state_entry::device_state_entry(int index, device_state_interface *dev) @@ -108,12 +108,12 @@ device_state_entry::device_state_entry(int index, device_state_interface *dev) device_state_entry &device_state_entry::formatstr(const char *_format) { - m_format.cpy(_format); + m_format.assign(_format); m_default_format = false; // set the DSF_CUSTOM_STRING flag by formatting with a NULL string m_flags &= ~DSF_CUSTOM_STRING; - astring dummy; + std::string dummy; format(dummy, NULL); return *this; @@ -135,7 +135,7 @@ void device_state_entry::format_from_mask() int width = 0; for (UINT64 tempmask = m_datamask; tempmask != 0; tempmask >>= 4) width++; - m_format.printf("%%0%dX", width); + strprintf(m_format,"%%0%dX", width); } @@ -164,7 +164,7 @@ UINT64 device_state_entry::value() const // pieces of indexed state as a string //------------------------------------------------- -astring &device_state_entry::format(astring &dest, const char *string, bool maxout) const +std::string &device_state_entry::format(std::string &dest, const char *string, bool maxout) const { UINT64 result = value(); @@ -188,7 +188,7 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo // if we're not within a format, then anything other than a % outputs directly if (!percent && *fptr != '%') { - dest.cat(fptr, 1); + dest.append(fptr, 1); continue; } @@ -201,7 +201,7 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo percent = true; else { - dest.cat(fptr, 1); + dest.append(fptr, 1); percent = false; } break; @@ -232,7 +232,7 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo hitnonzero = false; while (leadzero && width > 16) { - dest.cat(" "); + dest.append(" "); width--; } for (int digitnum = 15; digitnum >= 0; digitnum--) @@ -241,11 +241,11 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo if (digit != 0) { static const char hexchars[] = "0123456789ABCDEF"; - dest.cat(&hexchars[digit], 1); + dest.append(&hexchars[digit], 1); hitnonzero = true; } else if (hitnonzero || (leadzero && digitnum < width) || digitnum == 0) - dest.cat("0"); + dest.append("0"); } reset = true; break; @@ -257,7 +257,7 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo hitnonzero = false; while (leadzero && width > 22) { - dest.cat(" "); + dest.append(" "); width--; } for (int digitnum = 21; digitnum >= 0; digitnum--) @@ -266,11 +266,11 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo if (digit != 0) { static const char octchars[] = "01234567"; - dest.cat(&octchars[digit], 1); + dest.append(&octchars[digit], 1); hitnonzero = true; } else if (hitnonzero || (leadzero && digitnum < width) || digitnum == 0) - dest.cat("0"); + dest.append("0"); } reset = true; break; @@ -282,12 +282,12 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo if ((result & m_datamask) > (m_datamask >> 1)) { result = -result & m_datamask; - dest.cat("-"); + dest.append("-"); width--; } else if (explicitsign) { - dest.cat("+"); + dest.append("+"); width--; } // fall through to unsigned case @@ -299,7 +299,7 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo hitnonzero = false; while (leadzero && width > ARRAY_LENGTH(k_decimal_divisor)) { - dest.cat(" "); + dest.append(" "); width--; } for (int digitnum = ARRAY_LENGTH(k_decimal_divisor) - 1; digitnum >= 0; digitnum--) @@ -308,11 +308,11 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo if (digit != 0) { static const char decchars[] = "0123456789"; - dest.cat(&decchars[digit], 1); + dest.append(&decchars[digit], 1); hitnonzero = true; } else if (hitnonzero || (leadzero && digitnum < width) || digitnum == 0) - dest.cat("0"); + dest.append("0"); } reset = true; break; @@ -328,13 +328,13 @@ astring &device_state_entry::format(astring &dest, const char *string, bool maxo } if (strlen(string) <= width) { - dest.cat(string); + dest.append(string); width -= strlen(string); while (width-- != 0) - dest.cat(" "); + dest.append(" "); } else - dest.cat(string, width); + dest.append(string, width); reset = true; break; @@ -436,15 +436,15 @@ UINT64 device_state_interface::state_int(int index) // pieces of indexed state as a string //------------------------------------------------- -astring &device_state_interface::state_string(int index, astring &dest) +std::string &device_state_interface::state_string(int index, std::string &dest) { // NULL or out-of-range entry returns bogus string const device_state_entry *entry = state_find_entry(index); if (entry == NULL) - return dest.cpy("???"); + return dest.assign("???"); // get the custom string if needed - astring custom; + std::string custom; if (entry->needs_custom_string()) state_string_export(*entry, custom); @@ -466,8 +466,8 @@ int device_state_interface::state_string_max_length(int index) return 3; // ask the entry to format itself maximally - astring tempstring; - return entry->format(tempstring, "", true).len(); + std::string tempstring; + return entry->format(tempstring, "", true).length(); } @@ -580,7 +580,7 @@ void device_state_interface::state_export(const device_state_entry &entry) // written to perform any post-processing //------------------------------------------------- -void device_state_interface::state_string_import(const device_state_entry &entry, astring &str) +void device_state_interface::state_string_import(const device_state_entry &entry, std::string &str) { // do nothing by default } @@ -591,7 +591,7 @@ void device_state_interface::state_string_import(const device_state_entry &entry // written to perform any post-processing //------------------------------------------------- -void device_state_interface::state_string_export(const device_state_entry &entry, astring &str) +void device_state_interface::state_string_export(const device_state_entry &entry, std::string &str) { // do nothing by default } diff --git a/src/emu/distate.h b/src/emu/distate.h index 8e660422be5..352a3c1337d 100644 --- a/src/emu/distate.h +++ b/src/emu/distate.h @@ -87,7 +87,7 @@ protected: // return the current value -- only for our friends who handle export bool needs_export() const { return ((m_flags & DSF_EXPORT) != 0); } UINT64 value() const; - astring &format(astring &dest, const char *string, bool maxout = false) const; + std::string &format(std::string &dest, const char *string, bool maxout = false) const; // set the current value -- only for our friends who handle import bool needs_import() const { return ((m_flags & DSF_IMPORT) != 0); } @@ -105,8 +105,8 @@ protected: UINT64 m_datamask; // mask that applies to the data UINT8 m_datasize; // size of the data UINT8 m_flags; // flags for this data - astring m_symbol; // symbol for display; all lower-case version for expressions - astring m_format; // supported formats + std::string m_symbol; // symbol for display; all lower-case version for expressions + std::string m_format; // supported formats bool m_default_format; // true if we are still using default format UINT64 m_sizemask; // mask derived from the data size }; @@ -128,7 +128,7 @@ public: // state getters UINT64 state_int(int index); - astring &state_string(int index, astring &dest); + std::string &state_string(int index, std::string &dest); int state_string_max_length(int index); offs_t pc() { return state_int(STATE_GENPC); } offs_t pcbase() { return state_int(STATE_GENPCBASE); } @@ -162,8 +162,8 @@ protected: // derived class overrides virtual void state_import(const device_state_entry &entry); virtual void state_export(const device_state_entry &entry); - virtual void state_string_import(const device_state_entry &entry, astring &str); - virtual void state_string_export(const device_state_entry &entry, astring &str); + virtual void state_string_import(const device_state_entry &entry, std::string &str); + virtual void state_string_export(const device_state_entry &entry, std::string &str); // internal operation overrides virtual void interface_post_start(); diff --git a/src/emu/drivenum.c b/src/emu/drivenum.c index 9491f223a2e..6d1590c030b 100644 --- a/src/emu/drivenum.c +++ b/src/emu/drivenum.c @@ -134,7 +134,7 @@ driver_enumerator::driver_enumerator(emu_options &options) m_included(s_driver_count), m_config(s_driver_count) { - memset(&m_included[0], 0, s_driver_count); + memset(&m_included[0], 0, s_driver_count); memset(&m_config[0], 0, s_driver_count*sizeof(m_config[0])); include_all(); } @@ -147,7 +147,7 @@ driver_enumerator::driver_enumerator(emu_options &options, const char *string) m_included(s_driver_count), m_config(s_driver_count) { - memset(&m_included[0], 0, s_driver_count); + memset(&m_included[0], 0, s_driver_count); memset(&m_config[0], 0, s_driver_count*sizeof(m_config[0])); filter(string); } @@ -160,7 +160,7 @@ driver_enumerator::driver_enumerator(emu_options &options, const game_driver &dr m_included(s_driver_count), m_config(s_driver_count) { - memset(&m_included[0], 0, s_driver_count); + memset(&m_included[0], 0, s_driver_count); memset(&m_config[0], 0, s_driver_count*sizeof(m_config[0])); filter(driver); } diff --git a/src/emu/driver.c b/src/emu/driver.c index 901f4587cc3..399a30c15c9 100644 --- a/src/emu/driver.c +++ b/src/emu/driver.c @@ -75,7 +75,7 @@ void driver_device::static_set_game(device_t &device, const game_driver &game) // and set the search path to include all parents driver.m_searchpath = game.name; for (int parent = driver_list::clone(game); parent != -1; parent = driver_list::clone(parent)) - driver.m_searchpath.cat(";").cat(driver_list::driver(parent).name); + driver.m_searchpath.append(";").append(driver_list::driver(parent).name); } diff --git a/src/emu/drivers/xtal.h b/src/emu/drivers/xtal.h index 495db259a71..8164e358610 100644 --- a/src/emu/drivers/xtal.h +++ b/src/emu/drivers/xtal.h @@ -110,7 +110,7 @@ enum XTAL_10_738635MHz = 10738635, /* TMS9918 family (3x NTSC subcarrier) */ XTAL_10_816MHz = 10816000, /* Universal 1979-1980 (Cosmic Alien, etc) */ XTAL_11MHz = 11000000, /* Mario I8039 sound */ - XTAL_11_0592MHz = 11059200, /* Lethal Justice, Ruleta RE-900 */ + XTAL_11_0592MHz = 11059200, /* Lethal Justice, Ruleta RE-900, DEC VT220 */ XTAL_11_2MHz = 11200000, /* New York, New York */ XTAL_11_289MHz = 11289000, /* Vanguard */ XTAL_11_4MHz = 11400000, /* HP 9845 */ diff --git a/src/emu/emucore.c b/src/emu/emucore.c index c7ad49a25b5..6588afd6a65 100644 --- a/src/emu/emucore.c +++ b/src/emu/emucore.c @@ -25,7 +25,7 @@ emu_fatalerror::emu_fatalerror(const char *format, ...) { va_list ap; va_start(ap, format); - vsprintf(text, format, ap); + vsnprintf(text, sizeof(text), format, ap); va_end(ap); } osd_break_into_debugger(text); @@ -40,7 +40,7 @@ emu_fatalerror::emu_fatalerror(const char *format, va_list ap) } else { - vsprintf(text, format, ap); + vsnprintf(text, sizeof(text), format, ap); } osd_break_into_debugger(text); } @@ -56,7 +56,7 @@ emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, ...) { va_list ap; va_start(ap, format); - vsprintf(text, format, ap); + vsnprintf(text, sizeof(text), format, ap); va_end(ap); } } @@ -70,7 +70,7 @@ emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, va_list ap) } else { - vsprintf(text, format, ap); + vsnprintf(text, sizeof(text), format, ap); } } diff --git a/src/emu/emucore.h b/src/emu/emucore.h index 7183c3ca838..bffac6e0bf6 100644 --- a/src/emu/emucore.h +++ b/src/emu/emucore.h @@ -31,11 +31,9 @@ // standard C++ includes #include <exception> #include <typeinfo> -#include <string> // core system includes #include "osdcomm.h" -#include "astring.h" #include "emualloc.h" #include "corestr.h" #include "bitmap.h" diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index e1142588300..c537ce6dc4e 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -271,9 +271,9 @@ void emu_options::update_slot_options() const char *name = slot->device().tag() + 1; if (exists(name) && slot->first_option() != NULL) { - astring defvalue; + std::string defvalue; slot->get_default_card_software(defvalue); - if (defvalue.len() > 0) + if (defvalue.length() > 0) { set_default_value(name, defvalue.c_str()); const device_slot_option *option = slot->option(defvalue.c_str()); @@ -310,10 +310,10 @@ void emu_options::add_device_options(bool isfirstpass) first = false; // retrieve info about the device instance - astring option_name; - option_name.printf("%s;%s", image->instance_name(), image->brief_instance_name()); + std::string option_name; + strprintf(option_name, "%s;%s", image->instance_name(), image->brief_instance_name()); if (strcmp(image->device_typename(image->image_type()), image->instance_name()) == 0) - option_name.catprintf(";%s1;%s1", image->instance_name(), image->brief_instance_name()); + strcatprintf(option_name, ";%s1;%s1", image->instance_name(), image->brief_instance_name()); // add the option if (!exists(image->instance_name())) @@ -347,7 +347,7 @@ void emu_options::remove_device_options() // and update slot and image devices //------------------------------------------------- -bool emu_options::parse_slot_devices(int argc, char *argv[], astring &error_string, const char *name, const char *value) +bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value) { // an initial parse to capture the initial set of values bool result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); @@ -382,7 +382,7 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], astring &error_stri // and update the devices //------------------------------------------------- -bool emu_options::parse_command_line(int argc, char *argv[], astring &error_string) +bool emu_options::parse_command_line(int argc, char *argv[], std::string &error_string) { // parse as normal core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); @@ -395,10 +395,10 @@ bool emu_options::parse_command_line(int argc, char *argv[], astring &error_stri // of INI files //------------------------------------------------- -void emu_options::parse_standard_inis(astring &error_string) +void emu_options::parse_standard_inis(std::string &error_string) { // start with an empty string - error_string.reset(); + error_string.clear(); // parse the INI file defined by the platform (e.g., "mame.ini") // we do this twice so that the first file can change the INI path @@ -442,8 +442,8 @@ void emu_options::parse_standard_inis(astring &error_string) } // next parse "source/<sourcefile>.ini"; if that doesn't exist, try <sourcefile>.ini - astring sourcename; - core_filename_extract_base(sourcename, cursystem->source_file, true).ins(0, "source" PATH_SEPARATOR); + std::string sourcename; + core_filename_extract_base(sourcename, cursystem->source_file, true).insert(0, "source" PATH_SEPARATOR); if (!parse_one_ini(sourcename.c_str(), OPTION_PRIORITY_SOURCE_INI, &error_string)) { core_filename_extract_base(sourcename, cursystem->source_file, true); @@ -471,7 +471,7 @@ void emu_options::parse_standard_inis(astring &error_string) const game_driver *emu_options::system() const { - astring tempstr; + std::string tempstr; int index = driver_list::find(core_filename_extract_base(tempstr, system_name(), true).c_str()); return (index != -1) ? &driver_list::driver(index) : NULL; } @@ -484,15 +484,15 @@ const game_driver *emu_options::system() const void emu_options::set_system_name(const char *name) { // remember the original system name - astring old_system_name(system_name()); + std::string old_system_name(system_name()); // if the system name changed, fix up the device options - if (old_system_name != name) + if (old_system_name.compare(name)!=0) { // first set the new name - astring error; + std::string error; set_value(OPTION_SYSTEMNAME, name, OPTION_PRIORITY_CMDLINE, error); - assert(!error); + assert(error.empty()); // remove any existing device options and then add them afresh remove_device_options(); @@ -513,7 +513,7 @@ void emu_options::set_system_name(const char *name) // parse_one_ini - parse a single INI file //------------------------------------------------- -bool emu_options::parse_one_ini(const char *basename, int priority, astring *error_string) +bool emu_options::parse_one_ini(const char *basename, int priority, std::string *error_string) { // don't parse if it has been disabled if (!read_config()) @@ -527,39 +527,39 @@ bool emu_options::parse_one_ini(const char *basename, int priority, astring *err // parse the file osd_printf_verbose("Parsing %s.ini\n", basename); - astring error; + std::string error; bool result = parse_ini_file(file, priority, OPTION_PRIORITY_DRIVER_INI, error); // append errors if requested - if (error && error_string != NULL) - error_string->catprintf("While parsing %s:\n%s\n", file.fullpath(), error.c_str()); + if (!error.empty() && error_string != NULL) + strcatprintf(*error_string, "While parsing %s:\n%s\n", file.fullpath(), error.c_str()); return result; } -const char *emu_options::main_value(astring &buffer, const char *name) const +const char *emu_options::main_value(std::string &buffer, const char *name) const { buffer = value(name); - int pos = buffer.chr(0, ','); + int pos = buffer.find_first_of(','); if (pos != -1) buffer = buffer.substr(0, pos); return buffer.c_str(); } -const char *emu_options::sub_value(astring &buffer, const char *name, const char *subname) const +const char *emu_options::sub_value(std::string &buffer, const char *name, const char *subname) const { - astring tmp = astring(",").cat(subname).cat("="); + std::string tmp = std::string(",").append(subname).append("="); buffer = value(name); - int pos = buffer.find(0, tmp.c_str()); + int pos = buffer.find(tmp.c_str()); if (pos != -1) { - int endpos = buffer.chr(pos + 1, ','); + int endpos = buffer.find_first_of(',', pos + 1); if (endpos == -1) - endpos = buffer.len(); - buffer = buffer.substr(pos + tmp.len(), endpos - pos - tmp.len()); + endpos = buffer.length(); + buffer = buffer.substr(pos + tmp.length(), endpos - pos - tmp.length()); } else - buffer.reset(); + buffer.clear(); return buffer.c_str(); } diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index aadb98a72c7..ac2f18ac767 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -203,9 +203,9 @@ public: emu_options(); // parsing wrappers - bool parse_command_line(int argc, char *argv[], astring &error_string); - void parse_standard_inis(astring &error_string); - bool parse_slot_devices(int argc, char *argv[], astring &error_string, const char *name, const char *value); + bool parse_command_line(int argc, char *argv[], std::string &error_string); + void parse_standard_inis(std::string &error_string); + bool parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value); // core options const char *system_name() const { return value(OPTION_SYSTEMNAME); } @@ -358,8 +358,8 @@ public: // FIXME: Couriersud: This should be in image_device_exit void remove_device_options(); - const char *main_value(astring &buffer, const char *option) const; - const char *sub_value(astring &buffer, const char *name, const char *subname) const; + const char *main_value(std::string &buffer, const char *option) const; + const char *sub_value(std::string &buffer, const char *name, const char *subname) const; bool add_slot_options(bool isfirst); private: @@ -368,7 +368,7 @@ private: void update_slot_options(); // INI parsing helper - bool parse_one_ini(const char *basename, int priority, astring *error_string = NULL); + bool parse_one_ini(const char *basename, int priority, std::string *error_string = NULL); static const options_entry s_option_entries[]; }; diff --git a/src/emu/emupal.c b/src/emu/emupal.c index b5f0c128f6a..c4190456567 100644 --- a/src/emu/emupal.c +++ b/src/emu/emupal.c @@ -408,7 +408,7 @@ void palette_device::device_start() if (share != NULL) { // find the extended (split) memory, if present - astring tag_ext = astring(tag()).cat("_ext"); + std::string tag_ext = std::string(tag()).append("_ext"); const memory_share *share_ext = memshare(tag_ext.c_str()); // make sure we have specified a format diff --git a/src/emu/fileio.c b/src/emu/fileio.c index a19368d7065..68efdb021a3 100644 --- a/src/emu/fileio.c +++ b/src/emu/fileio.c @@ -39,7 +39,7 @@ path_iterator::path_iterator(const char *rawsearchpath) // in a multipath sequence //------------------------------------------------- -bool path_iterator::next(astring &buffer, const char *name) +bool path_iterator::next(std::string &buffer, const char *name) { // if none left, return FALSE to indicate we are done if (m_index != 0 && *m_current == 0) @@ -49,16 +49,16 @@ bool path_iterator::next(astring &buffer, const char *name) const char *semi = strchr(m_current, ';'); if (semi == NULL) semi = m_current + strlen(m_current); - buffer.cpy(m_current, semi - m_current); + buffer.assign(m_current, semi - m_current); m_current = (*semi == 0) ? semi : semi + 1; // append the name if we have one if (name != NULL) { // compute the full pathname - if (buffer.len() > 0) - buffer.cat(PATH_SEPARATOR); - buffer.cat(name); + if (buffer.length() > 0) + buffer.append(PATH_SEPARATOR); + buffer.append(name); } // bump the index and return TRUE @@ -219,17 +219,17 @@ emu_file::operator core_file &() hash_collection &emu_file::hashes(const char *types) { // determine the hashes we already have - astring already_have; + std::string already_have; m_hashes.hash_types(already_have); // determine which hashes we need - astring needed; + std::string needed; for (const char *scan = types; *scan != 0; scan++) - if (already_have.chr(0, *scan) == -1) - needed.cat(*scan); + if (already_have.find_first_of(*scan) == -1) + needed.push_back(*scan); // if we need nothing, skip it - if (!needed) + if (needed.empty()) return m_hashes; // load the ZIP file if needed @@ -281,21 +281,21 @@ file_error emu_file::open(const char *name) file_error emu_file::open(const char *name1, const char *name2) { // concatenate the strings and do a standard open - astring name = astring(name1).cat(name2); + std::string name = std::string(name1).append(name2); return open(name.c_str()); } file_error emu_file::open(const char *name1, const char *name2, const char *name3) { // concatenate the strings and do a standard open - astring name = astring(name1).cat(name2).cat(name3); + std::string name = std::string(name1).append(name2).append(name3); return open(name.c_str()); } file_error emu_file::open(const char *name1, const char *name2, const char *name3, const char *name4) { // concatenate the strings and do a standard open - astring name = astring(name1).cat(name2).cat(name3).cat(name4); + std::string name = std::string(name1).append(name2).append(name3).append(name4); return open(name.c_str()); } @@ -314,21 +314,21 @@ file_error emu_file::open(const char *name, UINT32 crc) file_error emu_file::open(const char *name1, const char *name2, UINT32 crc) { // concatenate the strings and do a standard open - astring name = astring(name1).cat(name2); + std::string name = std::string(name1).append(name2); return open(name.c_str(), crc); } file_error emu_file::open(const char *name1, const char *name2, const char *name3, UINT32 crc) { // concatenate the strings and do a standard open - astring name = astring(name1).cat(name2).cat(name3); + std::string name = std::string(name1).append(name2).append(name3); return open(name.c_str(), crc); } file_error emu_file::open(const char *name1, const char *name2, const char *name3, const char *name4, UINT32 crc) { // concatenate the strings and do a standard open - astring name = astring(name1).cat(name2).cat(name3).cat(name4); + std::string name = std::string(name1).append(name2).append(name3).append(name4); return open(name.c_str(), crc); } @@ -356,7 +356,7 @@ file_error emu_file::open_next() // if we're opening for read-only we have other options if ((m_openflags & (OPEN_FLAG_READ | OPEN_FLAG_WRITE)) == OPEN_FLAG_READ) { - astring tempfullpath = m_fullpath; + std::string tempfullpath = m_fullpath; filerr = attempt_zipped(); if (filerr == FILERR_NONE) @@ -418,7 +418,7 @@ void emu_file::close() // reset our hashes and path as well m_hashes.reset(); - m_fullpath.reset(); + m_fullpath.clear(); } @@ -657,14 +657,15 @@ int emu_file::vprintf(const char *fmt, va_list va) // any media path //------------------------------------------------- -bool emu_file::part_of_mediapath(astring path) +bool emu_file::part_of_mediapath(std::string path) { bool result = false; - astring mediapath; + std::string mediapath; m_mediapaths.reset(); - while (m_mediapaths.next(mediapath, NULL) && !result) - if (path.cmpsubstr(mediapath, 0, mediapath.len())) + while (m_mediapaths.next(mediapath, NULL) && !result) { + if (path.compare(mediapath.substr(0, mediapath.length()))) result = true; + } return result; } @@ -674,13 +675,13 @@ bool emu_file::part_of_mediapath(astring path) file_error emu_file::attempt_zipped() { - astring filename; + std::string filename; // loop over directory parts up to the start of filename while (1) { // find the final path separator - int dirsep = m_fullpath.rchr(0, PATH_SEPARATOR[0]); + int dirsep = m_fullpath.find_last_of(PATH_SEPARATOR[0]); if (dirsep == -1) return FILERR_NOT_FOUND; @@ -689,19 +690,19 @@ file_error emu_file::attempt_zipped() return FILERR_NOT_FOUND; // insert the part from the right of the separator into the head of the filename - if (filename.len() > 0) - filename.ins(0, "/"); - filename.inssubstr(0, m_fullpath, dirsep + 1, -1); + if (filename.length() > 0) + filename.insert(0, "/"); + filename.insert(0, m_fullpath.substr(dirsep + 1, -1)); // remove this part of the filename and append a .zip extension - m_fullpath.substr(0, dirsep).cat(".zip"); + m_fullpath = m_fullpath.substr(0, dirsep).append(".zip"); // attempt to open the ZIP file zip_file *zip; zip_error ziperr = zip_file_open(m_fullpath.c_str(), &zip); // chop the .zip back off the filename before continuing - m_fullpath.substr(0, dirsep); + m_fullpath = m_fullpath.substr(0, dirsep); // if we failed to open this file, continue scanning if (ziperr != ZIPERR_NONE) @@ -785,10 +786,10 @@ file_error emu_file::load_zipped_file() // to expected filename, ignoring any directory //------------------------------------------------- -bool emu_file::zip_filename_match(const zip_file_header &header, const astring &filename) +bool emu_file::zip_filename_match(const zip_file_header &header, const std::string &filename) { - const char *zipfile = header.filename + header.filename_length - filename.len(); - return (zipfile >= header.filename && filename.icmp(zipfile) == 0 && (zipfile == header.filename || zipfile[-1] == '/')); + const char *zipfile = header.filename + header.filename_length - filename.length(); + return (zipfile >= header.filename && core_stricmp(filename.c_str(),zipfile) == 0 && (zipfile == header.filename || zipfile[-1] == '/')); } @@ -809,13 +810,13 @@ bool emu_file::zip_header_is_path(const zip_file_header &header) file_error emu_file::attempt__7zped() { - astring filename; + std::string filename; // loop over directory parts up to the start of filename while (1) { // find the final path separator - int dirsep = m_fullpath.rchr(0, PATH_SEPARATOR[0]); + int dirsep = m_fullpath.find_last_of(PATH_SEPARATOR[0]); if (dirsep == -1) return FILERR_NOT_FOUND; @@ -824,19 +825,19 @@ file_error emu_file::attempt__7zped() return FILERR_NOT_FOUND; // insert the part from the right of the separator into the head of the filename - if (filename.len() > 0) - filename.ins(0, "/"); - filename.inssubstr(0, m_fullpath, dirsep + 1, -1); + if (filename.length() > 0) + filename.insert(0, "/"); + filename.insert(0, m_fullpath.substr(dirsep + 1, -1)); // remove this part of the filename and append a .7z extension - m_fullpath.substr(0, dirsep).cat(".7z"); + m_fullpath = m_fullpath.substr(0, dirsep).append(".7z"); // attempt to open the _7Z file _7z_file *_7z; _7z_error _7zerr = _7z_file_open(m_fullpath.c_str(), &_7z); // chop the ._7z back off the filename before continuing - m_fullpath.substr(0, dirsep); + m_fullpath = m_fullpath.substr(0, dirsep); // if we failed to open this file, continue scanning if (_7zerr != _7ZERR_NONE) @@ -845,16 +846,16 @@ file_error emu_file::attempt__7zped() int fileno = -1; // see if we can find a file with the right name and (if available) crc - if (m_openflags & OPEN_FLAG_HAS_CRC) fileno = _7z_search_crc_match(_7z, m_crc, filename.c_str(), filename.len(), true, true); + if (m_openflags & OPEN_FLAG_HAS_CRC) fileno = _7z_search_crc_match(_7z, m_crc, filename.c_str(), filename.length(), true, true); // if that failed, look for a file with the right crc, but the wrong filename if (fileno==-1) - if (m_openflags & OPEN_FLAG_HAS_CRC) fileno = _7z_search_crc_match(_7z, m_crc, filename.c_str(), filename.len(), true, false); + if (m_openflags & OPEN_FLAG_HAS_CRC) fileno = _7z_search_crc_match(_7z, m_crc, filename.c_str(), filename.length(), true, false); // if that failed, look for a file with the right name; reporting a bad checksum // is more helpful and less confusing than reporting "rom not found" if (fileno==-1) - fileno = _7z_search_crc_match(_7z, m_crc, filename.c_str(), filename.len(), false, true); + fileno = _7z_search_crc_match(_7z, m_crc, filename.c_str(), filename.length(), false, true); if (fileno != -1) { diff --git a/src/emu/fileio.h b/src/emu/fileio.h index 2f2dee57214..1377eca6bb9 100644 --- a/src/emu/fileio.h +++ b/src/emu/fileio.h @@ -42,7 +42,7 @@ public: path_iterator(const char *searchpath); // getters - bool next(astring &buffer, const char *name = NULL); + bool next(std::string &buffer, const char *name = NULL); // reset void reset() { m_current = m_base; m_index = 0; } @@ -73,7 +73,7 @@ private: // internal state path_iterator m_iterator; osd_directory * m_curdir; - astring m_pathbuffer; + std::string m_pathbuffer; //int m_buflen; }; @@ -98,7 +98,7 @@ public: UINT32 openflags() const { return m_openflags; } hash_collection &hashes(const char *types); bool restrict_to_mediapath() { return m_restrict_to_mediapath; } - bool part_of_mediapath(astring path); + bool part_of_mediapath(std::string path); // setters void remove_on_close() { m_remove_on_close = true; } @@ -143,15 +143,15 @@ private: // internal helpers file_error attempt_zipped(); file_error load_zipped_file(); - bool zip_filename_match(const zip_file_header &header, const astring &filename); + bool zip_filename_match(const zip_file_header &header, const std::string &filename); bool zip_header_is_path(const zip_file_header &header); file_error attempt__7zped(); file_error load__7zped_file(); // internal state - astring m_filename; // original filename provided - astring m_fullpath; // full filename + std::string m_filename; // original filename provided + std::string m_fullpath; // full filename core_file * m_file; // core file pointer path_iterator m_iterator; // iterator for paths path_iterator m_mediapaths; // media-path iterator @@ -168,7 +168,7 @@ private: UINT64 m__7zlength; // 7Z file length bool m_remove_on_close; // flag: remove the file when closing - bool m_restrict_to_mediapath; // flag: restrict to paths inside the media-path + bool m_restrict_to_mediapath; // flag: restrict to paths inside the media-path }; diff --git a/src/emu/hash.c b/src/emu/hash.c index 9b64d18f299..1d92458d139 100644 --- a/src/emu/hash.c +++ b/src/emu/hash.c @@ -115,13 +115,13 @@ bool hash_collection::operator==(const hash_collection &rhs) const // a string //------------------------------------------------- -const char *hash_collection::hash_types(astring &buffer) const +const char *hash_collection::hash_types(std::string &buffer) const { - buffer.reset(); + buffer.clear(); if (m_has_crc32) - buffer.cat(HASH_CRC); + buffer.push_back(HASH_CRC); if (m_has_sha1) - buffer.cat(HASH_SHA1); + buffer.push_back(HASH_SHA1); return buffer.c_str(); } @@ -133,7 +133,7 @@ const char *hash_collection::hash_types(astring &buffer) const void hash_collection::reset() { - m_flags.reset(); + m_flags.clear(); m_has_crc32 = m_has_sha1 = false; delete m_creator; m_creator = NULL; @@ -190,21 +190,24 @@ bool hash_collection::remove(char type) // format //------------------------------------------------- -const char *hash_collection::internal_string(astring &buffer) const +const char *hash_collection::internal_string(std::string &buffer) const { - buffer.reset(); + buffer.clear(); // handle CRCs - astring temp; - if (m_has_crc32) - buffer.cat(HASH_CRC).cat(m_crc32.as_string(temp)); - + std::string temp; + if (m_has_crc32) { + buffer.push_back(HASH_CRC); + buffer.append(m_crc32.as_string(temp)); + } // handle SHA1s - if (m_has_sha1) - buffer.cat(HASH_SHA1).cat(m_sha1.as_string(temp)); + if (m_has_sha1) { + buffer.push_back(HASH_SHA1); + buffer.append(m_sha1.as_string(temp)); + } // append flags - return buffer.cat(m_flags).c_str(); + return buffer.append(m_flags).c_str(); } @@ -213,25 +216,26 @@ const char *hash_collection::internal_string(astring &buffer) const // flags to a string in the macroized format //------------------------------------------------- -const char *hash_collection::macro_string(astring &buffer) const +const char *hash_collection::macro_string(std::string &buffer) const { - buffer.reset(); + buffer.clear(); // handle CRCs - astring temp; + std::string temp; if (m_has_crc32) - buffer.cat("CRC(").cat(m_crc32.as_string(temp)).cat(") "); + buffer.append("CRC(").append(m_crc32.as_string(temp)).append(") "); // handle SHA1s if (m_has_sha1) - buffer.cat("SHA1(").cat(m_sha1.as_string(temp)).cat(") "); + buffer.append("SHA1(").append(m_sha1.as_string(temp)).append(") "); // append flags if (flag(FLAG_NO_DUMP)) - buffer.cat("NO_DUMP "); + buffer.append("NO_DUMP "); if (flag(FLAG_BAD_DUMP)) - buffer.cat("BAD_DUMP "); - return buffer.trimspace().c_str(); + buffer.append("BAD_DUMP "); + strtrimspace(buffer); + return buffer.c_str(); } @@ -240,25 +244,26 @@ const char *hash_collection::macro_string(astring &buffer) const // flags to a string in XML attribute format //------------------------------------------------- -const char *hash_collection::attribute_string(astring &buffer) const +const char *hash_collection::attribute_string(std::string &buffer) const { - buffer.reset(); + buffer.clear(); // handle CRCs - astring temp; + std::string temp; if (m_has_crc32) - buffer.cat("crc=\"").cat(m_crc32.as_string(temp)).cat("\" "); + buffer.append("crc=\"").append(m_crc32.as_string(temp)).append("\" "); // handle SHA1s if (m_has_sha1) - buffer.cat("sha1=\"").cat(m_sha1.as_string(temp)).cat("\" "); + buffer.append("sha1=\"").append(m_sha1.as_string(temp)).append("\" "); // append flags if (flag(FLAG_NO_DUMP)) - buffer.cat("status=\"nodump\"" ); + buffer.append("status=\"nodump\""); if (flag(FLAG_BAD_DUMP)) - buffer.cat("status=\"baddump\"" ); - return buffer.trimspace().c_str(); + buffer.append("status=\"baddump\""); + strtrimspace(buffer); + return buffer.c_str(); } @@ -319,7 +324,7 @@ bool hash_collection::from_internal_string(const char *string) else if (skip_digits != 0) errors = true; else - m_flags.cat(c); + m_flags.push_back(c); } return !errors; } diff --git a/src/emu/hash.h b/src/emu/hash.h index f08fe27562b..9dc12af136b 100644 --- a/src/emu/hash.h +++ b/src/emu/hash.h @@ -66,8 +66,8 @@ public: bool operator!=(const hash_collection &rhs) const { return !(*this == rhs); } // getters - bool flag(char flag) const { return (m_flags.chr(0, flag) != -1); } - const char *hash_types(astring &buffer) const; + bool flag(char flag) const { return (m_flags.find_first_of(flag) != -1); } + const char *hash_types(std::string &buffer) const; // hash manipulators void reset(); @@ -83,9 +83,9 @@ public: void add_sha1(sha1_t sha1) { m_has_sha1 = true; m_sha1 = sha1; } // string conversion - const char *internal_string(astring &buffer) const; - const char *macro_string(astring &buffer) const; - const char *attribute_string(astring &buffer) const; + const char *internal_string(std::string &buffer) const; + const char *macro_string(std::string &buffer) const; + const char *attribute_string(std::string &buffer) const; bool from_internal_string(const char *string); // creation @@ -99,7 +99,7 @@ private: void copyfrom(const hash_collection &src); // internal state - astring m_flags; + std::string m_flags; bool m_has_crc32; crc32_t m_crc32; bool m_has_sha1; diff --git a/src/emu/hashfile.c b/src/emu/hashfile.c index b20df1018d7..7b9bde5c346 100644 --- a/src/emu/hashfile.c +++ b/src/emu/hashfile.c @@ -51,7 +51,6 @@ struct hash_file { emu_file *file; object_pool *pool; - astring functions[IO_COUNT]; hash_info **preloaded_hashes; int preloaded_hash_count; @@ -176,7 +175,7 @@ static void start_handler(void *data, const char *tagname, const char **attribut hash_info *hi; char **text_dest; hash_collection hashes; - astring all_functions; + std::string all_functions; char functions; // iodevice_t device; int i; @@ -238,7 +237,7 @@ static void start_handler(void *data, const char *tagname, const char **attribut if (functions) { hashes.add_from_string(functions, attributes[1], strlen(attributes[1])); - all_functions.cat(functions); + all_functions.append(1, functions); } attributes += 2; @@ -493,7 +492,6 @@ struct hashlookup_params static int singular_selector_proc(hash_file *hashfile, void *param, const char *name, const hash_collection *hashes) { - astring tempstr; struct hashlookup_params *hlparams = (struct hashlookup_params *) param; return (*hashes == *hlparams->hashes); } @@ -537,7 +535,7 @@ const hash_info *hashfile_lookup(hash_file *hashfile, const hash_collection *has const char *extra_info = NULL; -bool read_hash_config(device_image_interface &image, const char *sysname, astring &result) +bool read_hash_config(device_image_interface &image, const char *sysname, std::string &result) { hash_file *hashfile = NULL; const hash_info *info = NULL; @@ -556,14 +554,14 @@ bool read_hash_config(device_image_interface &image, const char *sysname, astrin return false; } - result.cpy(info->extrainfo); + result.assign(info->extrainfo); /* copy the relevant entries */ hashfile_close(hashfile); return true; } -bool hashfile_extrainfo(device_image_interface &image, astring &result) +bool hashfile_extrainfo(device_image_interface &image, std::string &result) { /* now read the hash file */ image.crc(); diff --git a/src/emu/hashfile.h b/src/emu/hashfile.h index c462b5c74d3..9bc3c402592 100644 --- a/src/emu/hashfile.h +++ b/src/emu/hashfile.h @@ -12,6 +12,6 @@ #include "emu.h" -bool hashfile_extrainfo(device_image_interface &image, astring &result); +bool hashfile_extrainfo(device_image_interface &image, std::string &result); #endif /* __HASHFILE_H__ */ diff --git a/src/emu/image.c b/src/emu/image.c index 555294033bf..f17f2feb6c0 100644 --- a/src/emu/image.c +++ b/src/emu/image.c @@ -141,7 +141,7 @@ static int write_config(emu_options &options, const char *filename, const game_d file_error filerr = file.open(filename); if (filerr == FILERR_NONE) { - astring inistring; + std::string inistring; options.output_ini(inistring); file.puts(inistring.c_str()); retval = 0; @@ -167,7 +167,7 @@ static void image_options_extract(running_machine &machine) const char *filename = image->filename(); /* and set the option */ - astring error; + std::string error; machine.options().set_value(image->instance_name(), filename ? filename : "", OPTION_PRIORITY_CMDLINE, error); index++; @@ -224,8 +224,8 @@ void image_device_init(running_machine &machine) if (result) { /* retrieve image error message */ - astring image_err = astring(image->error()); - astring image_basename(image_name); + std::string image_err = std::string(image->error()); + std::string image_basename(image_name); /* unload all images */ image_unload_all(machine); @@ -244,15 +244,15 @@ void image_device_init(running_machine &machine) need an image to be loaded -------------------------------------------------*/ -astring &image_mandatory_scan(running_machine &machine, astring &mandatory) +std::string &image_mandatory_scan(running_machine &machine, std::string &mandatory) { - mandatory.reset(); + mandatory.clear(); // make sure that any required image has a mounted file image_interface_iterator iter(machine.root_device()); for (device_image_interface *image = iter.first(); image != NULL; image = iter.next()) { if (image->filename() == NULL && image->must_be_loaded()) - mandatory.cat("\"").cat(image->instance_name()).cat("\", "); + mandatory.append("\"").append(image->instance_name()).append("\", "); } return mandatory; } @@ -273,7 +273,7 @@ void image_postdevice_init(running_machine &machine) if (result) { /* retrieve image error message */ - astring image_err = astring(image->error()); + std::string image_err = std::string(image->error()); /* unload all images */ image_unload_all(machine); diff --git a/src/emu/image.h b/src/emu/image.h index 140a25473b7..a37012841b0 100644 --- a/src/emu/image.h +++ b/src/emu/image.h @@ -20,7 +20,7 @@ void image_init(running_machine &machine); void image_postdevice_init(running_machine &machine); -astring &image_mandatory_scan(running_machine &machine, astring &mandatory); +std::string &image_mandatory_scan(running_machine &machine, std::string &mandatory); extern struct io_procs image_ioprocs; diff --git a/src/emu/imagedev/cassette.c b/src/emu/imagedev/cassette.c index 60f5b0f4f57..5d204aa4613 100644 --- a/src/emu/imagedev/cassette.c +++ b/src/emu/imagedev/cassette.c @@ -273,14 +273,14 @@ bool cassette_image_device::call_load() { is_writable = !is_readonly(); cassette_flags = is_writable ? (CASSETTE_FLAG_READWRITE|CASSETTE_FLAG_SAVEONEXIT) : CASSETTE_FLAG_READONLY; - astring fname; + std::string fname; if (software_entry()==NULL) { extension = filetype(); } else { fname = m_mame_file->filename(); - int loc = fname.rchr(0,'.'); + int loc = fname.find_last_of('.'); if (loc!=-1) { - extension = fname.substr(loc + 1,fname.len()-loc).c_str(); + extension = fname.substr(loc + 1,fname.length()-loc).c_str(); } else { extension = ""; } diff --git a/src/emu/imagedev/chd_cd.c b/src/emu/imagedev/chd_cd.c index 54d360a1225..d153e889b41 100644 --- a/src/emu/imagedev/chd_cd.c +++ b/src/emu/imagedev/chd_cd.c @@ -96,7 +96,6 @@ bool cdrom_image_device::call_load() { chd_error err = (chd_error)0; chd_file *chd = NULL; - astring tempstring; if (m_cdrom_handle) cdrom_close(m_cdrom_handle); @@ -110,7 +109,7 @@ bool cdrom_image_device::call_load() chd = &m_self_chd; } } else { - chd = get_disk_handle(device().machine(), device().subtag(tempstring, "cdrom").c_str()); + chd = get_disk_handle(device().machine(), device().subtag("cdrom").c_str()); } /* open the CHD file */ diff --git a/src/emu/imagedev/diablo.c b/src/emu/imagedev/diablo.c index 1f4af5b3242..6dbaa941f4a 100644 --- a/src/emu/imagedev/diablo.c +++ b/src/emu/imagedev/diablo.c @@ -115,7 +115,7 @@ bool diablo_image_device::call_create(int create_format, option_resolution *crea int err; UINT32 sectorsize, hunksize; UINT32 cylinders, heads, sectors, totalsectors; - astring metadata; + std::string metadata; cylinders = option_resolution_lookup_int(create_args, 'C'); heads = option_resolution_lookup_int(create_args, 'H'); @@ -132,7 +132,7 @@ bool diablo_image_device::call_create(int create_format, option_resolution *crea goto error; /* if we created the image and hence, have metadata to set, set the metadata */ - metadata.format(HARD_DISK_METADATA_FORMAT, cylinders, heads, sectors, sectorsize); + strprintf(metadata,HARD_DISK_METADATA_FORMAT, cylinders, heads, sectors, sectorsize); err = m_origchd.write_metadata(HARD_DISK_METADATA_TAG, 0, metadata); m_origchd.close(); @@ -170,7 +170,7 @@ void diablo_image_device::call_unload() static chd_error open_disk_diff(emu_options &options, const char *name, chd_file &source, chd_file &diff_chd) { - astring fname = astring(name).cat(".dif"); + std::string fname = std::string(name).append(".dif"); /* try to open the diff */ //printf("Opening differencing image file: %s\n", fname.c_str()); @@ -178,7 +178,7 @@ static chd_error open_disk_diff(emu_options &options, const char *name, chd_file file_error filerr = diff_file.open(fname.c_str()); if (filerr == FILERR_NONE) { - astring fullpath(diff_file.fullpath()); + std::string fullpath(diff_file.fullpath()); diff_file.close(); //printf("Opening differencing image file: %s\n", fullpath.c_str()); @@ -191,7 +191,7 @@ static chd_error open_disk_diff(emu_options &options, const char *name, chd_file filerr = diff_file.open(fname.c_str()); if (filerr == FILERR_NONE) { - astring fullpath(diff_file.fullpath()); + std::string fullpath(diff_file.fullpath()); diff_file.close(); /* create the CHD */ @@ -209,7 +209,6 @@ static chd_error open_disk_diff(emu_options &options, const char *name, chd_file int diablo_image_device::internal_load_dsk() { - astring tempstring; chd_error err = CHDERR_NONE; m_chd = NULL; @@ -220,7 +219,7 @@ int diablo_image_device::internal_load_dsk() /* open the CHD file */ if (software_entry() != NULL) { - m_chd = get_disk_handle(device().machine(), device().subtag(tempstring, "harddriv").c_str()); + m_chd = get_disk_handle(device().machine(), device().subtag("harddriv").c_str()); } else { diff --git a/src/emu/imagedev/floppy.c b/src/emu/imagedev/floppy.c index baa5ea514a2..ea7e126e177 100644 --- a/src/emu/imagedev/floppy.c +++ b/src/emu/imagedev/floppy.c @@ -320,10 +320,10 @@ void floppy_image_device::device_timer(emu_timer &timer, device_timer_id id, int index_resync(); } -floppy_image_format_t *floppy_image_device::identify(astring filename) +floppy_image_format_t *floppy_image_device::identify(std::string filename) { core_file *fd; - astring revised_path; + std::string revised_path; file_error err = zippath_fopen(filename.c_str(), OPEN_FLAG_READ, fd, revised_path); if(err) { @@ -862,7 +862,7 @@ ui_menu_control_floppy_image::~ui_menu_control_floppy_image() void ui_menu_control_floppy_image::do_load_create() { floppy_image_device *fd = static_cast<floppy_image_device *>(image); - if(input_filename == "") { + if(input_filename.compare("")==0) { int err = fd->create(output_filename.c_str(), 0, NULL); if (err != 0) { popmessage("Error: %s", fd->error()); @@ -871,7 +871,7 @@ void ui_menu_control_floppy_image::do_load_create() fd->setup_write(output_format); } else { int err = fd->load(input_filename.c_str()); - if(!err && output_filename != "") + if (!err && output_filename.compare("") != 0) err = fd->reopen_for_write(output_filename.c_str()); if(err != 0) { popmessage("Error: %s", fd->error()); @@ -882,7 +882,7 @@ void ui_menu_control_floppy_image::do_load_create() } } -void ui_menu_control_floppy_image::hook_load(astring filename, bool softlist) +void ui_menu_control_floppy_image::hook_load(std::string filename, bool softlist) { if (softlist) { @@ -905,7 +905,7 @@ void ui_menu_control_floppy_image::hook_load(astring filename, bool softlist) bool can_in_place = input_format->supports_save(); if(can_in_place) { file_error filerr = FILERR_NOT_FOUND; - astring tmp_path; + std::string tmp_path; core_file *tmp_file; /* attempt to open the file for writing but *without* create */ filerr = zippath_fopen(filename.c_str(), OPEN_FLAG_READ | OPEN_FLAG_WRITE, tmp_file, tmp_path); diff --git a/src/emu/imagedev/floppy.h b/src/emu/imagedev/floppy.h index 17efab51cf8..b2acc7091dc 100644 --- a/src/emu/imagedev/floppy.h +++ b/src/emu/imagedev/floppy.h @@ -67,7 +67,7 @@ public: void set_formats(const floppy_format_type *formats); floppy_image_format_t *get_formats() const; floppy_image_format_t *get_load_format() const; - floppy_image_format_t *identify(astring filename); + floppy_image_format_t *identify(std::string filename); void set_rpm(float rpm); // image-level overrides @@ -197,10 +197,10 @@ protected: floppy_image_format_t **format_array; floppy_image_format_t *input_format, *output_format; - astring input_filename, output_filename; + std::string input_filename, output_filename; void do_load_create(); - virtual void hook_load(astring filename, bool softlist); + virtual void hook_load(std::string filename, bool softlist); }; diff --git a/src/emu/imagedev/harddriv.c b/src/emu/imagedev/harddriv.c index a34658600e7..9f88760f1d7 100644 --- a/src/emu/imagedev/harddriv.c +++ b/src/emu/imagedev/harddriv.c @@ -48,6 +48,20 @@ harddisk_image_device::harddisk_image_device(const machine_config &mconfig, cons } //------------------------------------------------- +// harddisk_image_device - constructor for subclasses +//------------------------------------------------- +harddisk_image_device::harddisk_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_image_interface(mconfig, *this), + m_chd(NULL), + m_hard_disk_handle(NULL), + m_device_image_load(device_image_load_delegate()), + m_device_image_unload(device_image_func_delegate()), + m_interface(NULL) +{ +} + +//------------------------------------------------- // harddisk_image_device - destructor //------------------------------------------------- @@ -121,7 +135,7 @@ bool harddisk_image_device::call_create(int create_format, option_resolution *cr int err; UINT32 sectorsize, hunksize; UINT32 cylinders, heads, sectors, totalsectors; - astring metadata; + std::string metadata; cylinders = option_resolution_lookup_int(create_args, 'C'); heads = option_resolution_lookup_int(create_args, 'H'); @@ -138,7 +152,7 @@ bool harddisk_image_device::call_create(int create_format, option_resolution *cr goto error; /* if we created the image and hence, have metadata to set, set the metadata */ - metadata.format(HARD_DISK_METADATA_FORMAT, cylinders, heads, sectors, sectorsize); + strprintf(metadata, HARD_DISK_METADATA_FORMAT, cylinders, heads, sectors, sectorsize); err = m_origchd.write_metadata(HARD_DISK_METADATA_TAG, 0, metadata); m_origchd.close(); @@ -176,7 +190,7 @@ void harddisk_image_device::call_unload() static chd_error open_disk_diff(emu_options &options, const char *name, chd_file &source, chd_file &diff_chd) { - astring fname = astring(name).cat(".dif"); + std::string fname = std::string(name).append(".dif"); /* try to open the diff */ //printf("Opening differencing image file: %s\n", fname.c_str()); @@ -184,7 +198,7 @@ static chd_error open_disk_diff(emu_options &options, const char *name, chd_file file_error filerr = diff_file.open(fname.c_str()); if (filerr == FILERR_NONE) { - astring fullpath(diff_file.fullpath()); + std::string fullpath(diff_file.fullpath()); diff_file.close(); //printf("Opening differencing image file: %s\n", fullpath.c_str()); @@ -197,11 +211,11 @@ static chd_error open_disk_diff(emu_options &options, const char *name, chd_file filerr = diff_file.open(fname.c_str()); if (filerr == FILERR_NONE) { - astring fullpath(diff_file.fullpath()); + std::string fullpath(diff_file.fullpath()); diff_file.close(); /* create the CHD */ - //printf("Creating differencing image file: %s\n", fullpath.c_str()); + //printf("Creating differencing image file: %s\n", fupointllpath.c_str()); chd_codec_type compression[4] = { CHD_CODEC_NONE }; chd_error err = diff_chd.create(fullpath.c_str(), source.logical_bytes(), source.hunk_bytes(), compression, source); if (err != CHDERR_NONE) @@ -215,7 +229,6 @@ static chd_error open_disk_diff(emu_options &options, const char *name, chd_file int harddisk_image_device::internal_load_hd() { - astring tempstring; chd_error err = CHDERR_NONE; m_chd = NULL; @@ -226,7 +239,7 @@ int harddisk_image_device::internal_load_hd() /* open the CHD file */ if (software_entry() != NULL) { - m_chd = get_disk_handle(device().machine(), device().subtag(tempstring, "harddriv").c_str()); + m_chd = get_disk_handle(device().machine(), device().subtag("harddriv").c_str()); } else { diff --git a/src/emu/imagedev/harddriv.h b/src/emu/imagedev/harddriv.h index 6ec48d327fb..84c2a37e1ff 100644 --- a/src/emu/imagedev/harddriv.h +++ b/src/emu/imagedev/harddriv.h @@ -51,6 +51,8 @@ public: chd_file *get_chd_file(); protected: + harddisk_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + // device-level overrides virtual void device_config_complete(); virtual void device_start(); diff --git a/src/emu/info.c b/src/emu/info.c index 67a31eae63b..462b94ab652 100644 --- a/src/emu/info.c +++ b/src/emu/info.c @@ -193,9 +193,9 @@ void info_xml_creator::output(FILE *out) // output the DTD fprintf(m_output, "<?xml version=\"1.0\"?>\n"); - astring dtd(s_dtd_string); - dtd.replace(0,"__XML_ROOT__", emulator_info::get_xml_root()); - dtd.replace(0,"__XML_TOP__", emulator_info::get_xml_top()); + std::string dtd(s_dtd_string); + strreplace(dtd, "__XML_ROOT__", emulator_info::get_xml_root()); + strreplace(dtd, "__XML_TOP__", emulator_info::get_xml_top()); fprintf(m_output, "%s\n\n", dtd.c_str()); @@ -239,7 +239,7 @@ void info_xml_creator::output_one() // allocate input ports machine_config &config = m_drivlist.config(); ioport_list portlist; - astring errors; + std::string errors; device_iterator iter(config.root_device()); for (device_t *device = iter.first(); device != NULL; device = iter.next()) portlist.append(*device, errors); @@ -325,7 +325,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag) has_speaker = TRUE; // generate input list ioport_list portlist; - astring errors; + std::string errors; device_iterator iptiter(device); for (device_t *dev = iptiter.first(); dev != NULL; dev = iptiter.next()) portlist.append(*dev, errors); @@ -341,8 +341,8 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag) // start to output info fprintf(m_output, "\t<%s", emulator_info::get_xml_top()); fprintf(m_output, " name=\"%s\"", xml_normalize_string(device.shortname())); - astring src(device.source()); - src.replace("../",""); + std::string src(device.source()); + strreplace(src,"../", ""); fprintf(m_output, " sourcefile=\"%s\"", xml_normalize_string(src.c_str())); fprintf(m_output, " isdevice=\"yes\""); fprintf(m_output, " runnable=\"no\""); @@ -402,8 +402,8 @@ void info_xml_creator::output_devices() { for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next()) { - astring temptag("_"); - temptag.cat(option->name()); + std::string temptag("_"); + temptag.append(option->name()); device_t *dev = const_cast<machine_config &>(m_drivlist.config()).device_add(&m_drivlist.config().root_device(), temptag.c_str(), option->devtype(), 0); // notify this device and all its subdevices that they are now configured @@ -534,53 +534,53 @@ void info_xml_creator::output_rom(device_t &device) } } - astring output; + std::string output; // opening tag if (!is_disk) - output.cat("\t\t<rom"); + output.append("\t\t<rom"); else - output.cat("\t\t<disk"); + output.append("\t\t<disk"); // add name, merge, bios, and size tags */ if (name != NULL && name[0] != 0) - output.catprintf(" name=\"%s\"", xml_normalize_string(name)); + strcatprintf(output," name=\"%s\"", xml_normalize_string(name)); if (merge_name != NULL) - output.catprintf(" merge=\"%s\"", xml_normalize_string(merge_name)); + strcatprintf(output," merge=\"%s\"", xml_normalize_string(merge_name)); if (bios_name[0] != 0) - output.catprintf(" bios=\"%s\"", xml_normalize_string(bios_name)); + strcatprintf(output," bios=\"%s\"", xml_normalize_string(bios_name)); if (!is_disk) - output.catprintf(" size=\"%d\"", rom_file_size(rom)); + strcatprintf(output," size=\"%d\"", rom_file_size(rom)); // dump checksum information only if there is a known dump if (!hashes.flag(hash_collection::FLAG_NO_DUMP)) { // iterate over hash function types and print m_output their values - astring tempstr; - output.catprintf(" %s", hashes.attribute_string(tempstr)); + std::string tempstr; + strcatprintf(output," %s", hashes.attribute_string(tempstr)); } else - output.cat(" status=\"nodump\""); + output.append(" status=\"nodump\""); // append a region name - output.catprintf(" region=\"%s\"", ROMREGION_GETTAG(region)); + strcatprintf(output," region=\"%s\"", ROMREGION_GETTAG(region)); // for non-disk entries, print offset if (!is_disk) - output.catprintf(" offset=\"%x\"", offset); + strcatprintf(output," offset=\"%x\"", offset); // for disk entries, add the disk index else { - output.catprintf(" index=\"%x\"", DISK_GETINDEX(rom)); - output.catprintf(" writable=\"%s\"", DISK_ISREADONLY(rom) ? "no" : "yes"); + strcatprintf(output," index=\"%x\"", DISK_GETINDEX(rom)); + strcatprintf(output," writable=\"%s\"", DISK_ISREADONLY(rom) ? "no" : "yes"); } // add optional flag if (ROM_ISOPTIONAL(rom)) - output.cat(" optional=\"yes\""); + output.append(" optional=\"yes\""); - output.cat("/>\n"); + output.append("/>\n"); fprintf(m_output, "%s", output.c_str()); } @@ -627,8 +627,8 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag) { if (strcmp(exec->device().tag(), device.tag())) { - astring newtag(exec->device().tag()), oldtag(":"); - newtag.substr(newtag.find(oldtag.cat(root_tag).c_str()) + oldtag.len()); + std::string newtag(exec->device().tag()), oldtag(":"); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); fprintf(m_output, "\t\t<chip"); fprintf(m_output, " type=\"cpu\""); @@ -645,8 +645,8 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag) { if (strcmp(sound->device().tag(), device.tag())) { - astring newtag(sound->device().tag()), oldtag(":"); - newtag.substr(newtag.find(oldtag.cat(root_tag).c_str()) + oldtag.len()); + std::string newtag(sound->device().tag()), oldtag(":"); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); fprintf(m_output, "\t\t<chip"); fprintf(m_output, " type=\"audio\""); @@ -673,8 +673,8 @@ void info_xml_creator::output_display(device_t &device, const char *root_tag) { if (strcmp(screendev->tag(), device.tag())) { - astring newtag(screendev->tag()), oldtag(":"); - newtag.substr(newtag.find(oldtag.cat(root_tag).c_str()) + oldtag.len()); + std::string newtag(screendev->tag()), oldtag(":"); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); fprintf(m_output, "\t\t<display"); fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag.c_str())); @@ -1077,24 +1077,24 @@ void info_xml_creator::output_switches(const ioport_list &portlist, const char * for (ioport_field *field = port->first_field(); field != NULL; field = field->next()) if (field->type() == type) { - astring output; + std::string output; - astring newtag(port->tag()), oldtag(":"); - newtag.substr(newtag.find(oldtag.cat(root_tag).c_str()) + oldtag.len()); + std::string newtag(port->tag()), oldtag(":"); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); // output the switch name information - astring normalized_field_name(xml_normalize_string(field->name())); - astring normalized_newtag(xml_normalize_string(newtag.c_str())); - output.catprintf("\t\t<%s name=\"%s\" tag=\"%s\" mask=\"%u\">\n", outertag, normalized_field_name.c_str(), normalized_newtag.c_str(), field->mask()); + std::string normalized_field_name(xml_normalize_string(field->name())); + std::string normalized_newtag(xml_normalize_string(newtag.c_str())); + strcatprintf(output,"\t\t<%s name=\"%s\" tag=\"%s\" mask=\"%u\">\n", outertag, normalized_field_name.c_str(), normalized_newtag.c_str(), field->mask()); // loop over settings for (ioport_setting *setting = field->first_setting(); setting != NULL; setting = setting->next()) { - output.catprintf("\t\t\t<%s name=\"%s\" value=\"%u\"%s/>\n", innertag, xml_normalize_string(setting->name()), setting->value(), setting->value() == field->defvalue() ? " default=\"yes\"" : ""); + strcatprintf(output,"\t\t\t<%s name=\"%s\" value=\"%u\"%s/>\n", innertag, xml_normalize_string(setting->name()), setting->value(), setting->value() == field->defvalue() ? " default=\"yes\"" : ""); } // terminate the switch entry - output.catprintf("\t\t</%s>\n", outertag); + strcatprintf(output,"\t\t</%s>\n", outertag); fprintf(m_output, "%s", output.c_str()); } @@ -1210,8 +1210,8 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag) { if (strcmp(imagedev->device().tag(), device.tag())) { - astring newtag(imagedev->device().tag()), oldtag(":"); - newtag.substr(newtag.find(oldtag.cat(root_tag).c_str()) + oldtag.len()); + std::string newtag(imagedev->device().tag()), oldtag(":"); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); // print m_output device type fprintf(m_output, "\t\t<device type=\"%s\"", xml_normalize_string(imagedev->image_type_name())); @@ -1238,7 +1238,7 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag) fprintf(m_output, " briefname=\"%s\"", xml_normalize_string(shortname)); fprintf(m_output, "/>\n"); - astring extensions(imagedev->file_extensions()); + std::string extensions(imagedev->file_extensions()); char *ext = strtok((char *)extensions.c_str(), ","); while (ext != NULL) @@ -1268,8 +1268,8 @@ void info_xml_creator::output_slots(device_t &device, const char *root_tag) if (strcmp(slot->device().tag(), device.tag())) { - astring newtag(slot->device().tag()), oldtag(":"); - newtag.substr(newtag.find(oldtag.cat(root_tag).c_str()) + oldtag.len()); + std::string newtag(slot->device().tag()), oldtag(":"); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); // print m_output device type fprintf(m_output, "\t\t<slot name=\"%s\">\n", xml_normalize_string(newtag.c_str())); @@ -1341,11 +1341,11 @@ void info_xml_creator::output_ramoptions() if (ram->extra_options() != NULL) { - astring options(ram->extra_options()); - for (int start = 0, end = options.chr(0, ','); ; start = end + 1, end = options.chr(start, ',')) + std::string options(ram->extra_options()); + for (int start = 0, end = options.find_first_of(',');; start = end + 1, end = options.find_first_of(',', start)) { - astring option; - option.cpysubstr(options, start, (end == -1) ? -1 : end - start); + std::string option; + option.assign(options.substr(start, (end == -1) ? -1 : end - start)); fprintf(m_output, "\t\t<ramoption>%u</ramoption>\n", ram_device::parse_string(option.c_str())); if (end == -1) break; diff --git a/src/emu/input.c b/src/emu/input.c index 0beb4b9e4ef..28337c7cf81 100644 --- a/src/emu/input.c +++ b/src/emu/input.c @@ -529,29 +529,29 @@ bool joystick_map::parse(const char *mapstring) // friendly display //------------------------------------------------- -const char *joystick_map::to_string(astring &str) const +const char *joystick_map::to_string(std::string &str) const { - str.printf("%s\n", m_origstring.c_str()); + strprintf(str, "%s\n", m_origstring.c_str()); for (int rownum = 0; rownum < 9; rownum++) { - str.catprintf(" "); + str.append(" "); for (int colnum = 0; colnum < 9; colnum++) switch (m_map[rownum][colnum]) { - case JOYSTICK_MAP_UP | JOYSTICK_MAP_LEFT: str.catprintf("7"); break; - case JOYSTICK_MAP_UP: str.catprintf("8"); break; - case JOYSTICK_MAP_UP | JOYSTICK_MAP_RIGHT: str.catprintf("9"); break; - case JOYSTICK_MAP_LEFT: str.catprintf("4"); break; - case JOYSTICK_MAP_NEUTRAL: str.catprintf("5"); break; - case JOYSTICK_MAP_RIGHT: str.catprintf("6"); break; - case JOYSTICK_MAP_DOWN | JOYSTICK_MAP_LEFT: str.catprintf("1"); break; - case JOYSTICK_MAP_DOWN: str.catprintf("2"); break; - case JOYSTICK_MAP_DOWN | JOYSTICK_MAP_RIGHT:str.catprintf("3"); break; - case JOYSTICK_MAP_STICKY: str.catprintf("s"); break; - default: str.catprintf("?"); break; + case JOYSTICK_MAP_UP | JOYSTICK_MAP_LEFT: str.append("7"); break; + case JOYSTICK_MAP_UP: str.append("8"); break; + case JOYSTICK_MAP_UP | JOYSTICK_MAP_RIGHT: str.append("9"); break; + case JOYSTICK_MAP_LEFT: str.append("4"); break; + case JOYSTICK_MAP_NEUTRAL: str.append("5"); break; + case JOYSTICK_MAP_RIGHT: str.append("6"); break; + case JOYSTICK_MAP_DOWN | JOYSTICK_MAP_LEFT: str.append("1"); break; + case JOYSTICK_MAP_DOWN: str.append("2"); break; + case JOYSTICK_MAP_DOWN | JOYSTICK_MAP_RIGHT:str.append("3"); break; + case JOYSTICK_MAP_STICKY: str.append("s"); break; + default: str.append("?"); break; } - str.catprintf("\n"); + str.append("\n"); } return str.c_str(); } @@ -808,7 +808,7 @@ input_device::input_device(input_class &_class, int devindex, const char *name, mapstring = joystick_map_8way; // parse it - astring tempstr; + std::string tempstr; if (!m_joymap.parse(mapstring)) { osd_printf_error("Invalid joystick map: %s\n", mapstring); @@ -1461,9 +1461,9 @@ input_code input_manager::code_from_itemid(input_item_id itemid) const // friendly name //------------------------------------------------- -const char *input_manager::code_name(astring &str, input_code code) const +const char *input_manager::code_name(std::string &str, input_code code) const { - str.reset(); + str.clear(); // if nothing there, return an empty string input_device_item *item = item_from_code(code); @@ -1474,19 +1474,19 @@ const char *input_manager::code_name(astring &str, input_code code) const const char *devclass = (*devclass_string_table)[code.device_class()]; // determine the devindex part - astring devindex; - devindex.printf("%d", code.device_index() + 1); + std::string devindex; + strprintf(devindex, "%d", code.device_index() + 1); // if we're unifying all devices, don't display a number if (!m_class[code.device_class()]->multi()) - devindex.reset(); + devindex.clear(); // keyboard 0 doesn't show a class or index if it is the only one input_device_class device_class = item->device().devclass(); if (device_class == DEVICE_CLASS_KEYBOARD && m_keyboard_class.maxindex() == 0) { devclass = ""; - devindex.reset(); + devindex.clear(); } // devcode part comes from the item name @@ -1501,16 +1501,17 @@ const char *input_manager::code_name(astring &str, input_code code) const devcode = ""; // concatenate the strings - str.cpy(devclass); - if (devindex) - str.cat(" ").cat(devindex); + str.assign(devclass); + if (!devindex.empty()) + str.append(" ").append(devindex); if (devcode[0] != 0) - str.cat(" ").cat(devcode); + str.append(" ").append(devcode); if (modifier != NULL) - str.cat(" ").cat(modifier); + str.append(" ").append(modifier); // delete any leading spaces - return str.trimspace().c_str(); + strtrimspace(str); + return str.c_str(); } @@ -1518,16 +1519,16 @@ const char *input_manager::code_name(astring &str, input_code code) const // code_to_token - create a token for a given code //------------------------------------------------- -const char *input_manager::code_to_token(astring &str, input_code code) const +const char *input_manager::code_to_token(std::string &str, input_code code) const { // determine the devclass part const char *devclass = (*devclass_token_table)[code.device_class()]; // determine the devindex part; keyboard 0 doesn't show an index - astring devindex; - devindex.printf("%d", code.device_index() + 1); + std::string devindex; + strprintf(devindex, "%d", code.device_index() + 1); if (code.device_class() == DEVICE_CLASS_KEYBOARD && code.device_index() == 0) - devindex.reset(); + devindex.clear(); // determine the itemid part; look up in the table if we don't have a token input_device_item *item = item_from_code(code); @@ -1542,15 +1543,15 @@ const char *input_manager::code_to_token(astring &str, input_code code) const itemclass = (*itemclass_token_table)[code.item_class()]; // concatenate the strings - str.cpy(devclass); - if (devindex) - str.cat("_").cat(devindex); + str.assign(devclass); + if (!devindex.empty()) + str.append("_").append(devindex); if (devcode[0] != 0) - str.cat("_").cat(devcode); + str.append("_").append(devcode); if (modifier != NULL) - str.cat("_").cat(modifier); + str.append("_").append(modifier); if (itemclass[0] != 0) - str.cat("_").cat(itemclass); + str.append("_").append(itemclass); return str.c_str(); } @@ -1563,13 +1564,13 @@ const char *input_manager::code_to_token(astring &str, input_code code) const input_code input_manager::code_from_token(const char *_token) { // copy the token and break it into pieces - astring token[6]; + std::string token[6]; int numtokens; for (numtokens = 0; numtokens < ARRAY_LENGTH(token); ) { // make a token up to the next underscore char *score = (char *)strchr(_token, '_'); - token[numtokens++].cpy(_token, (score == NULL) ? strlen(_token) : (score - _token)); + token[numtokens++].assign(_token, (score == NULL) ? strlen(_token) : (score - _token)); // if we hit the end, we're done, else advance our pointer if (score == NULL) @@ -1614,7 +1615,7 @@ input_code input_manager::code_from_token(const char *_token) for (itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); itemid++) { input_device_item *item = device->item(itemid); - if (item != NULL && token[curtok].cmp(item->token()) == 0) + if (item != NULL && token[curtok].compare(item->token()) == 0) { // take the itemclass from the item itemclass = item->itemclass(); @@ -1925,12 +1926,12 @@ bool input_manager::seq_poll() // sequence //------------------------------------------------- -const char *input_manager::seq_name(astring &str, const input_seq &seq) const +const char *input_manager::seq_name(std::string &str, const input_seq &seq) const { // make a copy of our sequence, removing any invalid bits input_code clean_codes[sizeof(seq) / sizeof(input_code)]; int clean_index = 0; - astring codestr; + std::string codestr; for (int codenum = 0; seq[codenum] != input_seq::end_code; codenum++) { // if this is a code item which is not valid, don't copy it and remove any preceding ORs/NOTs @@ -1946,28 +1947,28 @@ const char *input_manager::seq_name(astring &str, const input_seq &seq) const // special case: empty if (clean_index == 0) - return str.cpy((seq.length() == 0) ? "None" : "n/a").c_str(); + return str.assign((seq.length() == 0) ? "None" : "n/a").c_str(); // start with an empty buffer - str.reset(); + str.clear(); // loop until we hit the end for (int codenum = 0; codenum < clean_index; codenum++) { // append a space if not the first code if (codenum != 0) - str.cat(" "); + str.append(" "); // handle OR/NOT codes here input_code code = clean_codes[codenum]; if (code == input_seq::or_code) - str.cat("or"); + str.append("or"); else if (code == input_seq::not_code) - str.cat("not"); + str.append("not"); // otherwise, assume it is an input code and ask the input system to generate it else - str.cat(code_name(codestr, code)); + str.append(code_name(codestr, code)); } return str.c_str(); } @@ -1978,31 +1979,31 @@ const char *input_manager::seq_name(astring &str, const input_seq &seq) const // a sequence //------------------------------------------------- -const char *input_manager::seq_to_tokens(astring &str, const input_seq &seq) const +const char *input_manager::seq_to_tokens(std::string &str, const input_seq &seq) const { // start with an empty buffer - str.reset(); + str.clear(); // loop until we hit the end - astring codestr; + std::string codestr; for (int codenum = 0; seq[codenum] != input_seq::end_code; codenum++) { // append a space if not the first code if (codenum != 0) - str.cat(" "); + str.append(" "); // handle OR/NOT codes here input_code code = seq[codenum]; if (code == input_seq::or_code) - str.cat("OR"); + str.append("OR"); else if (code == input_seq::not_code) - str.cat("NOT"); + str.append("NOT"); else if (code == input_seq::default_code) - str.cat("DEFAULT"); + str.append("DEFAULT"); // otherwise, assume it is an input code and ask the input system to generate it else - str.cat(code_to_token(codestr, code)); + str.append(code_to_token(codestr, code)); } return str.c_str(); } @@ -2019,7 +2020,7 @@ void input_manager::seq_from_tokens(input_seq &seq, const char *string) seq.reset(); // loop until we're done - astring strcopy = string; + std::string strcopy = string; char *str = const_cast<char *>(strcopy.c_str()); while (1) { @@ -2072,7 +2073,7 @@ bool input_manager::set_global_joystick_map(const char *mapstring) if (!map.parse(mapstring)) return false; - astring tempstr; + std::string tempstr; osd_printf_verbose("Input: Changing default joystick map = %s\n", map.to_string(tempstr)); // iterate over joysticks and set the map @@ -2107,11 +2108,15 @@ input_device_item::input_device_item(input_device &device, const char *name, voi { // use a standard token name for know item IDs if (itemid <= ITEM_ID_MAXIMUM && (*itemid_token_table)[itemid] != NULL) - m_token.cpy((*itemid_token_table)[itemid]); + m_token.assign((*itemid_token_table)[itemid]); // otherwise, create a tokenized name - else - m_token.cpy(name).makeupper().delchr(' ').delchr('_'); + else { + m_token.assign(name); + strmakeupper(m_token); + strdelchr(m_token, ' '); + strdelchr(m_token, '_'); + } } diff --git a/src/emu/input.h b/src/emu/input.h index 7db18199a9a..6a67685907a 100644 --- a/src/emu/input.h +++ b/src/emu/input.h @@ -365,7 +365,7 @@ public: bool parse(const char *mapstring); // create a friendly string - const char *to_string(astring &str) const; + const char *to_string(std::string &str) const; // update the state of a live map UINT8 update(INT32 xaxisval, INT32 yaxisval); @@ -390,7 +390,7 @@ private: // internal state UINT8 m_map[9][9]; // 9x9 grid UINT8 m_lastmap; // last value returned (for sticky tracking) - astring m_origstring; // originally parsed string + std::string m_origstring; // originally parsed string }; @@ -520,12 +520,12 @@ public: protected: // internal state input_device & m_device; // reference to our owning device - astring m_name; // string name of item + std::string m_name; // string name of item void * m_internal; // internal callback pointer input_item_id m_itemid; // originally specified item id input_item_class m_itemclass; // class of the item item_get_state_func m_getstate; // get state callback - astring m_token; // tokenized name for non-standard items + std::string m_token; // tokenized name for non-standard items // live state INT32 m_current; // current raw value @@ -569,7 +569,7 @@ public: private: // internal state input_class & m_class; // reference to our class - astring m_name; // string name of device + std::string m_name; // string name of device int m_devindex; // device index of this device auto_pointer<input_device_item> m_item[ITEM_ID_ABSOLUTE_MAXIMUM+1]; // array of pointers to items input_item_id m_maxitem; // maximum item index @@ -655,8 +655,8 @@ public: input_device *device_from_code(input_code code) const; input_device_item *item_from_code(input_code code) const; input_code code_from_itemid(input_item_id itemid) const; - const char *code_name(astring &str, input_code code) const; - const char *code_to_token(astring &str, input_code code) const; + const char *code_name(std::string &str, input_code code) const; + const char *code_to_token(std::string &str, input_code code) const; input_code code_from_token(const char *_token); // input sequence readers @@ -669,8 +669,8 @@ public: const input_seq &seq_poll_final() const { return m_poll_seq; } // input sequence helpers - const char *seq_name(astring &str, const input_seq &seq) const; - const char *seq_to_tokens(astring &str, const input_seq &seq) const; + const char *seq_name(std::string &str, const input_seq &seq) const; + const char *seq_to_tokens(std::string &str, const input_seq &seq) const; void seq_from_tokens(input_seq &seq, const char *_token); // misc diff --git a/src/emu/ioport.c b/src/emu/ioport.c index 507ac6206ac..30f85ccb4fd 100644 --- a/src/emu/ioport.c +++ b/src/emu/ioport.c @@ -640,7 +640,7 @@ static const struct // to the current list //------------------------------------------------- -void ioport_list::append(device_t &device, astring &errorbuf) +void ioport_list::append(device_t &device, std::string &errorbuf) { // no constructor, no list ioport_constructor constructor = device.input_ports(); @@ -648,7 +648,7 @@ void ioport_list::append(device_t &device, astring &errorbuf) return; // reset error buffer - errorbuf.reset(); + errorbuf.clear(); // detokenize into the list (*constructor)(device, *this, errorbuf); @@ -897,7 +897,7 @@ void natural_keyboard::post(unicode_char ch) if (LOG_NATURAL_KEYBOARD) { const keycode_map_entry *code = find_code(ch); - astring tempstr; + std::string tempstr; logerror("natural_keyboard::post(): code=%i (%s) field->name='%s'\n", int(ch), unicode_to_string(tempstr, ch), (code != NULL && code->field[0] != NULL) ? code->field[0]->name() : "<null>"); } @@ -1101,7 +1101,7 @@ void natural_keyboard::build_codes(ioport_manager &manager) if (LOG_NATURAL_KEYBOARD) { - astring tempstr; + std::string tempstr; logerror("natural_keyboard: code=%i (%s) port=%p field->name='%s'\n", int(code), unicode_to_string(tempstr, code), port, field->name()); } } @@ -1234,23 +1234,23 @@ void natural_keyboard::timer(void *ptr, int param) // logging and debugging //------------------------------------------------- -const char *natural_keyboard::unicode_to_string(astring &buffer, unicode_char ch) +const char *natural_keyboard::unicode_to_string(std::string &buffer, unicode_char ch) { - buffer.reset(); + buffer.clear(); switch (ch) { // check some magic values - case '\0': buffer.cpy("\\0"); break; - case '\r': buffer.cpy("\\r"); break; - case '\n': buffer.cpy("\\n"); break; - case '\t': buffer.cpy("\\t"); break; + case '\0': buffer.assign("\\0"); break; + case '\r': buffer.assign("\\r"); break; + case '\n': buffer.assign("\\n"); break; + case '\t': buffer.assign("\\t"); break; default: // seven bit ASCII is easy if (ch >= 32 && ch < 128) { char temp[2] = { char(ch), 0 }; - buffer.cpy(temp); + buffer.assign(temp); } else if (ch >= UCHAR_MAMEKEY_BEGIN) { @@ -1260,8 +1260,8 @@ const char *natural_keyboard::unicode_to_string(astring &buffer, unicode_char ch } // did we fail to resolve? if so, we have a last resort - if (buffer.len() == 0) - buffer.format("U+%04X", unsigned(ch)); + if (buffer.length() == 0) + strprintf(buffer,"U+%04X", unsigned(ch)); break; } return buffer.c_str(); @@ -1307,13 +1307,13 @@ void natural_keyboard::frame_update(ioport_port &port, ioport_value &digital) // key_name - returns the name of a specific key //------------------------------------------------- -const char *natural_keyboard::key_name(astring &str, unicode_char ch) +const char *natural_keyboard::key_name(std::string &str, unicode_char ch) { // attempt to get the string from the character info table const char_info *ci = char_info::find(ch); const char *result = (ci != NULL) ? ci->name : NULL; if (result != NULL) - str.cpy(result); + str.assign(result); // if that doesn't work, convert to UTF-8 else if (ch > 0x7F || isprint(ch)) @@ -1321,12 +1321,12 @@ const char *natural_keyboard::key_name(astring &str, unicode_char ch) char buf[10]; int count = utf8_from_uchar(buf, ARRAY_LENGTH(buf), ch); buf[count] = 0; - str.cpy(buf); + str.assign(buf); } // otherwise, opt for question marks else - str.cpy("???"); + str.assign("???"); return str.c_str(); } @@ -1335,9 +1335,9 @@ const char *natural_keyboard::key_name(astring &str, unicode_char ch) // dump - dumps info to string //------------------------------------------------- -astring natural_keyboard::dump() +std::string natural_keyboard::dump() { - astring buffer, tempstr; + std::string buffer, tempstr; const size_t left_column_width = 24; // loop through all codes @@ -1345,18 +1345,18 @@ astring natural_keyboard::dump() { // describe the character code const natural_keyboard::keycode_map_entry &code = m_keycode_map[index]; - buffer.catprintf("%08X (%s) ", code.ch, unicode_to_string(tempstr, code.ch)); + strcatprintf(buffer,"%08X (%s) ", code.ch, unicode_to_string(tempstr, code.ch)); // pad with spaces - while (buffer.len() < left_column_width) - buffer.cat(' '); + while (buffer.length() < left_column_width) + buffer.push_back(' '); // identify the keys used for (int field = 0; field < ARRAY_LENGTH(code.field) && code.field[field] != 0; field++) - buffer.catprintf("%s'%s'", (field > 0) ? ", " : "", code.field[field]->name()); + strcatprintf(buffer, "%s'%s'", (field > 0) ? ", " : "", code.field[field]->name()); // carriage return - buffer.cat('\n'); + buffer.push_back('\n'); } return buffer; @@ -1488,9 +1488,8 @@ ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value def if (def != NULL) { const char *fulltag = port.tag(); - astring fullpath; for ( ; def->tag != NULL; def++) - if (device().subtag(fullpath, def->tag) == fulltag && def->mask == m_mask) + if (device().subtag(def->tag) == fulltag && def->mask == m_mask) m_defvalue = def->defvalue & m_mask; } } @@ -1519,7 +1518,7 @@ ioport_field::~ioport_field() const char *ioport_field::name() const { // if we have a non-default name, use that - if (m_live != NULL && m_live->name) + if (m_live != NULL && !m_live->name.empty()) return m_live->name.c_str(); if (m_name != NULL) return m_name; @@ -2041,7 +2040,7 @@ void ioport_field::crosshair_position(float &x, float &y, bool &gotx, bool &goty // descriptions //------------------------------------------------- -void ioport_field::expand_diplocation(const char *location, astring &errorbuf) +void ioport_field::expand_diplocation(const char *location, std::string &errorbuf) { // if nothing present, bail if (location == NULL) @@ -2050,7 +2049,7 @@ void ioport_field::expand_diplocation(const char *location, astring &errorbuf) m_diploclist.reset(); // parse the string - astring name; // Don't move this variable inside the loop, lastname's lifetime depends on it being outside + std::string name; // Don't move this variable inside the loop, lastname's lifetime depends on it being outside const char *lastname = NULL; const char *curentry = location; int entries = 0; @@ -2062,8 +2061,8 @@ void ioport_field::expand_diplocation(const char *location, astring &errorbuf) comma = curentry + strlen(curentry); // extract it to tempbuf - astring tempstr; - tempstr.cpy(curentry, comma - curentry); + std::string tempstr; + tempstr.assign(curentry, comma - curentry); // first extract the switch name if present const char *number = tempstr.c_str(); @@ -2072,7 +2071,7 @@ void ioport_field::expand_diplocation(const char *location, astring &errorbuf) // allocate and copy the name if it is present if (colon != NULL) { - lastname = name.cpy(number, colon - number).c_str(); + lastname = name.assign(number, colon - number).c_str(); number = colon + 1; } @@ -2081,10 +2080,10 @@ void ioport_field::expand_diplocation(const char *location, astring &errorbuf) { if (lastname == NULL) { - errorbuf.catprintf("Switch location '%s' missing switch name!\n", location); + strcatprintf(errorbuf, "Switch location '%s' missing switch name!\n", location); lastname = (char *)"UNK"; } - name.cpy(lastname); + name.assign(lastname); } // if the number is preceded by a '!' it's active high @@ -2098,7 +2097,7 @@ void ioport_field::expand_diplocation(const char *location, astring &errorbuf) // now scan the switch number int swnum = -1; if (sscanf(number, "%d", &swnum) != 1) - errorbuf.catprintf("Switch location '%s' has invalid format!\n", location); + strcatprintf(errorbuf, "Switch location '%s' has invalid format!\n", location); // allocate a new entry m_diploclist.append(*global_alloc(ioport_diplocation(name.c_str(), swnum, invert))); @@ -2116,7 +2115,7 @@ void ioport_field::expand_diplocation(const char *location, astring &errorbuf) for (bits = 0, temp = m_mask; temp != 0 && bits < 32; bits++) temp &= temp - 1; if (bits != entries) - errorbuf.catprintf("Switch location '%s' does not describe enough bits for mask %X\n", location, m_mask); + strcatprintf(errorbuf, "Switch location '%s' does not describe enough bits for mask %X\n", location, m_mask); } @@ -2174,21 +2173,21 @@ ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog) if (field.type_class() == INPUT_CLASS_KEYBOARD && field.specific_name() == NULL) { // loop through each character on the field - astring tempstr; + std::string tempstr; for (int which = 0; ; which++) { unicode_char ch = field.keyboard_code(which); if (ch == 0) break; - name.catprintf("%-*s ", MAX(SPACE_COUNT - 1, 0), field.manager().natkeyboard().key_name(tempstr, ch)); + strcatprintf(name, "%-*s ", MAX(SPACE_COUNT - 1, 0), field.manager().natkeyboard().key_name(tempstr, ch)); } // trim extra spaces - name.trimspace(); + strtrimspace(name); // special case - if (name.len() == 0) - name.cpy("Unnamed Key"); + if (name.length() == 0) + name.assign("Unnamed Key"); } } @@ -2321,7 +2320,7 @@ void ioport_port::frame_update(ioport_field *mouse_field) // wholly overlapped by other fields //------------------------------------------------- -void ioport_port::collapse_fields(astring &errorbuf) +void ioport_port::collapse_fields(std::string &errorbuf) { ioport_value maskbits = 0; int lastmodcount = -1; @@ -2350,13 +2349,13 @@ void ioport_port::collapse_fields(astring &errorbuf) // for errors //------------------------------------------------- -void ioport_port::insert_field(ioport_field &newfield, ioport_value &disallowedbits, astring &errorbuf) +void ioport_port::insert_field(ioport_field &newfield, ioport_value &disallowedbits, std::string &errorbuf) { // verify against the disallowed bits, but only if we are condition-free if (newfield.condition().none()) { if ((newfield.mask() & disallowedbits) != 0) - errorbuf.catprintf("INPUT_TOKEN_FIELD specifies duplicate port bits (port=%s mask=%X)\n", tag(), newfield.mask()); + strcatprintf(errorbuf, "INPUT_TOKEN_FIELD specifies duplicate port bits (port=%s mask=%X)\n", tag(), newfield.mask()); disallowedbits |= newfield.mask(); } @@ -2479,9 +2478,9 @@ time_t ioport_manager::initialize() device_iterator iter(machine().root_device()); for (device_t *device = iter.first(); device != NULL; device = iter.next()) { - astring errors; + std::string errors; m_portlist.append(*device, errors); - if (errors) + if (!errors.empty()) osd_printf_error("Input port errors:\n%s", errors.c_str()); } @@ -3169,9 +3168,9 @@ void ioport_manager::save_config(int config_type, xml_data_node *parentnode) void ioport_manager::save_sequence(xml_data_node *parentnode, input_seq_type type, ioport_type porttype, const input_seq &seq) { // get the string for the sequence - astring seqstring; + std::string seqstring; if (seq.length() == 0) - seqstring.cpy("NONE"); + seqstring.assign("NONE"); else machine().input().seq_to_tokens(seqstring, seq); @@ -3231,7 +3230,7 @@ void ioport_manager::save_default_inputs(xml_data_node *parentnode) if (portnode != NULL) { // add the port information and attributes - astring tempstr; + std::string tempstr; xml_set_attribute(portnode, "type", input_type_to_token(tempstr, entry->type(), entry->player())); // add only the sequences that have changed from the defaults @@ -3286,7 +3285,7 @@ void ioport_manager::save_game_inputs(xml_data_node *parentnode) if (portnode != NULL) { // add the identifying information and attributes - astring tempstr; + std::string tempstr; xml_set_attribute(portnode, "tag", port->tag()); xml_set_attribute(portnode, "type", input_type_to_token(tempstr, field->type(), field->player())); xml_set_attribute_int(portnode, "mask", field->mask()); @@ -3629,7 +3628,7 @@ void ioport_manager::record_port(ioport_port &port) // ioport_configurer - constructor //------------------------------------------------- -ioport_configurer::ioport_configurer(device_t &owner, ioport_list &portlist, astring &errorbuf) +ioport_configurer::ioport_configurer(device_t &owner, ioport_list &portlist, std::string &errorbuf) : m_owner(owner), m_portlist(portlist), m_errorbuf(errorbuf), @@ -3681,8 +3680,7 @@ const char *ioport_configurer::string_from_token(const char *string) void ioport_configurer::port_alloc(const char *tag) { // create the full tag - astring fulltag; - m_owner.subtag(fulltag, tag); + std::string fulltag = m_owner.subtag(tag); // add it to the list, and reset current field/setting m_curport = &m_portlist.append(fulltag.c_str(), *global_alloc(ioport_port(m_owner, fulltag.c_str()))); @@ -3699,8 +3697,7 @@ void ioport_configurer::port_alloc(const char *tag) void ioport_configurer::port_modify(const char *tag) { // create the full tag - astring fulltag; - m_owner.subtag(fulltag, tag); + std::string fulltag = m_owner.subtag(tag); // find the existing port m_curport = m_portlist.find(fulltag.c_str()); @@ -4397,15 +4394,15 @@ ioport_type ioport_manager::token_to_input_type(const char *string, int &player) // type and player to a string token //------------------------------------------------- -const char *ioport_manager::input_type_to_token(astring &str, ioport_type type, int player) +const char *ioport_manager::input_type_to_token(std::string &str, ioport_type type, int player) { // look up the port and return the token input_type_entry *entry = m_type_to_entry[type][player]; if (entry != NULL) - return str.cpy(entry->token()).c_str(); + return str.assign(entry->token()).c_str(); // if that fails, carry on - return str.format("TYPE_OTHER(%d,%d)", type, player).c_str(); + return strformat(str, "TYPE_OTHER(%d,%d)", type, player).c_str(); } diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 49058ab061d..27f1e22b71f 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -667,7 +667,7 @@ struct xml_data_node; class analog_field; // constructor function pointer -typedef void (*ioport_constructor)(device_t &owner, ioport_list &portlist, astring &errorbuf); +typedef void(*ioport_constructor)(device_t &owner, ioport_list &portlist, std::string &errorbuf); // I/O port callback function delegates typedef device_delegate<ioport_value (ioport_field &, void *)> ioport_field_read_delegate; @@ -830,10 +830,10 @@ public: void post_coded(const char *text, size_t length = 0, const attotime &rate = attotime::zero); void frame_update(ioport_port &port, ioport_value &digital); - const char *key_name(astring &str, unicode_char ch); + const char *key_name(std::string &str, unicode_char ch); // debugging - astring dump(); + std::string dump(); private: // internal keyboard code information @@ -850,7 +850,7 @@ private: attotime choose_delay(unicode_char ch); void internal_post(unicode_char ch); void timer(void *ptr, int param); - const char *unicode_to_string(astring &buffer, unicode_char ch); + const char *unicode_to_string(std::string &buffer, unicode_char ch); const keycode_map_entry *find_code(unicode_char ch) const; // internal state @@ -975,7 +975,7 @@ public: private: ioport_diplocation * m_next; // pointer to the next bit - astring m_name; // name of the physical DIP switch + std::string m_name; // name of the physical DIP switch UINT8 m_number; // physical switch number bool m_invert; // is this an active-high DIP? }; @@ -1093,7 +1093,7 @@ public: void set_user_settings(const user_settings &settings); private: - void expand_diplocation(const char *location, astring &errorbuf); + void expand_diplocation(const char *location, std::string &errorbuf); // internal state ioport_field * m_next; // pointer to next field in sequence @@ -1158,7 +1158,7 @@ struct ioport_field_live bool last; // were we pressed last time? bool toggle; // current toggle setting digital_joystick::direction_t joydir; // digital joystick direction index - astring name; // overridden name + std::string name; // overridden name }; @@ -1173,7 +1173,7 @@ public: ioport_list() { } using tagged_list<ioport_port>::append; - void append(device_t &device, astring &errorbuf); + void append(device_t &device, std::string &errorbuf); }; @@ -1211,18 +1211,18 @@ public: // other operations ioport_field *field(ioport_value mask); - void collapse_fields(astring &errorbuf); + void collapse_fields(std::string &errorbuf); void frame_update(ioport_field *mouse_field); void init_live_state(); private: - void insert_field(ioport_field &newfield, ioport_value &disallowedbits, astring &errorbuf); + void insert_field(ioport_field &newfield, ioport_value &disallowedbits, std::string &errorbuf); // internal state ioport_port * m_next; // pointer to next port device_t & m_device; // associated device simple_list<ioport_field> m_fieldlist; // list of ioport_fields - astring m_tag; // copy of this port's tag + std::string m_tag; // copy of this port's tag int m_modcount; // modification count ioport_value m_active; // mask of active bits in the port auto_pointer<ioport_port_live> m_live; // live state of port (NULL if not live) @@ -1397,7 +1397,7 @@ public: void setup_natural_keyboard(ioport_queue_chars_delegate queue_chars, ioport_accept_char_delegate accept_char, ioport_charqueue_empty_delegate charqueue_empty); INT32 frame_interpolate(INT32 oldval, INT32 newval); ioport_type token_to_input_type(const char *string, int &player) const; - const char *input_type_to_token(astring &str, ioport_type type, int player); + const char *input_type_to_token(std::string &str, ioport_type type, int player); private: // internal helpers @@ -1473,7 +1473,7 @@ class ioport_configurer { public: // construction/destruction - ioport_configurer(device_t &owner, ioport_list &portlist, astring &errorbuf); + ioport_configurer(device_t &owner, ioport_list &portlist, std::string &errorbuf); // static helpers static const char *string_from_token(const char *string); @@ -1521,7 +1521,7 @@ private: // internal state device_t & m_owner; ioport_list & m_portlist; - astring & m_errorbuf; + std::string & m_errorbuf; ioport_port * m_curport; ioport_field * m_curfield; @@ -1566,7 +1566,7 @@ private: // start of table #define INPUT_PORTS_START(_name) \ -ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, astring &errorbuf) \ +ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, std::string &errorbuf) \ { \ ioport_configurer configurer(owner, portlist, errorbuf); // end of table @@ -1575,7 +1575,7 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, a // aliasing #define INPUT_PORTS_EXTERN(_name) \ - extern void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, astring &errorbuf) + extern void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, std::string &errorbuf) // including #define PORT_INCLUDE(_name) \ diff --git a/src/emu/luaengine.c b/src/emu/luaengine.c index 12be9947cae..25d3b25d7e7 100644 --- a/src/emu/luaengine.c +++ b/src/emu/luaengine.c @@ -130,7 +130,7 @@ lua_engine::hook::hook() cb = -1; } -#if (defined(__sun__) && defined(__svr4__)) || defined(__ANDROID__) +#if (defined(__sun__) && defined(__svr4__)) || defined(__ANDROID__) || defined(__OpenBSD__) #undef _L #endif @@ -642,10 +642,10 @@ int lua_engine::lua_screen::l_draw_box(lua_State *L) int sc_width = sc->visible_area().width(); int sc_height = sc->visible_area().height(); float x1, y1, x2, y2; - x1 = MIN(MAX(0, lua_tointeger(L, 2)), sc_width-1) / static_cast<float>(sc_width); - y1 = MIN(MAX(0, lua_tointeger(L, 3)), sc_height-1) / static_cast<float>(sc_height); - x2 = MIN(MAX(0, lua_tointeger(L, 4)), sc_width-1) / static_cast<float>(sc_width); - y2 = MIN(MAX(0, lua_tointeger(L, 5)), sc_height-1) / static_cast<float>(sc_height); + x1 = MIN(MAX(0, lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); + y1 = MIN(MAX(0, lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); + x2 = MIN(MAX(0, lua_tonumber(L, 4)), sc_width-1) / static_cast<float>(sc_width); + y2 = MIN(MAX(0, lua_tonumber(L, 5)), sc_height-1) / static_cast<float>(sc_height); UINT32 bgcolor = lua_tounsigned(L, 6); UINT32 fgcolor = lua_tounsigned(L, 7); @@ -680,10 +680,10 @@ int lua_engine::lua_screen::l_draw_line(lua_State *L) int sc_width = sc->visible_area().width(); int sc_height = sc->visible_area().height(); float x1, y1, x2, y2; - x1 = MIN(MAX(0, lua_tointeger(L, 2)), sc_width-1) / static_cast<float>(sc_width); - y1 = MIN(MAX(0, lua_tointeger(L, 3)), sc_height-1) / static_cast<float>(sc_height); - x2 = MIN(MAX(0, lua_tointeger(L, 4)), sc_width-1) / static_cast<float>(sc_width); - y2 = MIN(MAX(0, lua_tointeger(L, 5)), sc_height-1) / static_cast<float>(sc_height); + x1 = MIN(MAX(0, lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); + y1 = MIN(MAX(0, lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); + x2 = MIN(MAX(0, lua_tonumber(L, 4)), sc_width-1) / static_cast<float>(sc_width); + y2 = MIN(MAX(0, lua_tonumber(L, 5)), sc_height-1) / static_cast<float>(sc_height); UINT32 color = lua_tounsigned(L, 6); // draw the line @@ -707,20 +707,24 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L) luaL_argcheck(L, lua_isnumber(L, 2), 2, "x (integer) expected"); luaL_argcheck(L, lua_isnumber(L, 3), 3, "y (integer) expected"); luaL_argcheck(L, lua_isstring(L, 4), 4, "message (string) expected"); + luaL_argcheck(L, lua_isinteger(L, 5) || lua_isnone(L, 5), 5, "optional argument: text color, integer expected (default: 0xffffffff)"); // retrieve all parameters int sc_width = sc->visible_area().width(); int sc_height = sc->visible_area().height(); - float x = MIN(MAX(0, lua_tointeger(L, 2)), sc_width-1) / static_cast<float>(sc_width); - float y = MIN(MAX(0, lua_tointeger(L, 3)), sc_height-1) / static_cast<float>(sc_height); + float x = MIN(MAX(0, lua_tonumber(L, 2)), sc_width-1) / static_cast<float>(sc_width); + float y = MIN(MAX(0, lua_tonumber(L, 3)), sc_height-1) / static_cast<float>(sc_height); const char *msg = luaL_checkstring(L,4); - // TODO: add optional parameters (colors, etc.) + rgb_t textcolor = UI_TEXT_COLOR; + if (!lua_isnone(L, 5)) { + textcolor = rgb_t(lua_tounsigned(L, 5)); + } // draw the text render_container &rc = sc->container(); ui_manager &ui = sc->machine().ui(); ui.draw_text_full(&rc, msg, x, y , (1.0f - x), - JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, + JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, textcolor, UI_TEXT_BG_COLOR, NULL, NULL); return 0; @@ -798,9 +802,9 @@ int lua_engine::luaopen_ioport(lua_State *L) } struct msg { - astring text; + std::string text; int ready; - astring response; + std::string response; int status; int done; } msg; @@ -813,7 +817,7 @@ void lua_engine::serve_lua() printf("%s v%s - %s\n%s\n%s\n\n", emulator_info::get_applongname(),build_version,emulator_info::get_fulllongname(),emulator_info::get_copyright_info(),LUA_COPYRIGHT); fflush(stdout); char buff[LUA_MAXINPUT]; - astring oldbuff; + std::string oldbuff; const char *b = LUA_PROMPT; @@ -826,8 +830,8 @@ void lua_engine::serve_lua() osd_lock_acquire(lock); if (msg.ready == 0) { msg.text = oldbuff; - if (oldbuff.len()!=0) msg.text.cat("\n"); - msg.text.cat(buff); + if (oldbuff.length()!=0) msg.text.append("\n"); + msg.text.append(buff); msg.ready = 1; msg.done = 0; } diff --git a/src/emu/machine.c b/src/emu/machine.c index e85f39d03cd..d225dda1a27 100644 --- a/src/emu/machine.c +++ b/src/emu/machine.c @@ -190,10 +190,10 @@ const char *running_machine::describe_context() { cpu_device *cpu = dynamic_cast<cpu_device *>(&executing->device()); if (cpu != NULL) - m_context.printf("'%s' (%s)", cpu->tag(), core_i64_format(cpu->pc(), cpu->space(AS_PROGRAM).logaddrchars(), cpu->is_octal())); + strprintf(m_context, "'%s' (%s)", cpu->tag(), core_i64_format(cpu->pc(), cpu->space(AS_PROGRAM).logaddrchars(), cpu->is_octal())); } else - m_context.cpy("(no context)"); + m_context.assign("(no context)"); return m_context.c_str(); } @@ -204,9 +204,9 @@ TIMER_CALLBACK_MEMBER(running_machine::autoboot_callback) manager().lua()->load_script(options().autoboot_script()); } else if (strlen(options().autoboot_command())!=0) { - astring cmd = astring(options().autoboot_command()); - cmd.replace("'","\\'"); - astring val = astring("emu.keypost('").cat(cmd.c_str()).cat("')").c_str(); + std::string cmd = std::string(options().autoboot_command()); + strreplace(cmd, "'", "\\'"); + std::string val = std::string("emu.keypost('").append(cmd.c_str()).append("')").c_str(); manager().lua()->load_string(val.c_str()); } } @@ -545,36 +545,36 @@ void running_machine::schedule_soft_reset() // software //------------------------------------------------- -astring running_machine::get_statename(const char *option) +std::string running_machine::get_statename(const char *option) { - astring statename_str(""); + std::string statename_str(""); if (option == NULL || option[0] == 0) - statename_str.cpy("%g"); + statename_str.assign("%g"); else - statename_str.cpy(option); + statename_str.assign(option); // strip any extension in the provided statename - int index = statename_str.rchr(0, '.'); + int index = statename_str.find_last_of('.'); if (index != -1) - statename_str.substr(0, index); + statename_str = statename_str.substr(0, index); // handle %d in the template (for image devices) - astring statename_dev("%d_"); - int pos = statename_str.find(0, statename_dev.c_str()); + std::string statename_dev("%d_"); + int pos = statename_str.find(statename_dev.c_str()); if (pos != -1) { // if more %d are found, revert to default and ignore them all - if (statename_str.find(pos + 3, statename_dev.c_str()) != -1) - statename_str.cpy("%g"); + if (statename_str.find(statename_dev.c_str(), pos + 3) != -1) + statename_str.assign("%g"); // else if there is a single %d, try to create the correct snapname else { int name_found = 0; // find length of the device name - int end1 = statename_str.find(pos + 3, "/"); - int end2 = statename_str.find(pos + 3, "%"); + int end1 = statename_str.find("/", pos + 3); + int end2 = statename_str.find("%", pos + 3); int end = -1; if ((end1 != -1) && (end2 != -1)) @@ -584,14 +584,14 @@ astring running_machine::get_statename(const char *option) else if (end2 != -1) end = end2; else - end = statename_str.len(); + end = statename_str.length(); if (end - pos < 3) fatalerror("Something very wrong is going on!!!\n"); - // copy the device name to an astring - astring devname_str; - devname_str.cpysubstr(statename_str, pos + 3, end - pos - 3); + // copy the device name to an std::string + std::string devname_str; + devname_str.assign(statename_str.substr(pos + 3, end - pos - 3)); //printf("check template: %s\n", devname_str.c_str()); // verify that there is such a device for this system @@ -599,19 +599,19 @@ astring running_machine::get_statename(const char *option) for (device_image_interface *image = iter.first(); image != NULL; image = iter.next()) { // get the device name - astring tempdevname(image->brief_instance_name()); + std::string tempdevname(image->brief_instance_name()); //printf("check device: %s\n", tempdevname.c_str()); - if (devname_str.cmp(tempdevname) == 0) + if (devname_str.compare(tempdevname) == 0) { // verify that such a device has an image mounted if (image->basename_noext() != NULL) { - astring filename(image->basename_noext()); + std::string filename(image->basename_noext()); // setup snapname and remove the %d_ - statename_str.replace(0, devname_str.c_str(), filename.c_str()); - statename_str.del(pos, 3); + strreplace(statename_str, devname_str.c_str(), filename.c_str()); + statename_str.erase(pos, 3); //printf("check image: %s\n", filename.c_str()); name_found = 1; @@ -621,13 +621,13 @@ astring running_machine::get_statename(const char *option) // or fallback to default if (name_found == 0) - statename_str.cpy("%g"); + statename_str.assign("%g"); } } // substitute path and gamename up front - statename_str.replace(0, "/", PATH_SEPARATOR); - statename_str.replace(0, "%g", basename()); + strreplace(statename_str, "/", PATH_SEPARATOR); + strreplace(statename_str, "%g", basename()); return statename_str; } @@ -643,15 +643,15 @@ void running_machine::set_saveload_filename(const char *filename) if (osd_is_absolute_path(filename)) { m_saveload_searchpath = NULL; - m_saveload_pending_file.cpy(filename); + m_saveload_pending_file.assign(filename); } else { m_saveload_searchpath = options().state_directory(); // take into account the statename option const char *stateopt = options().state_name(); - astring statename = get_statename(stateopt); - m_saveload_pending_file.cpy(statename.c_str()).cat(PATH_SEPARATOR).cat(filename).cat(".sta"); + std::string statename = get_statename(stateopt); + m_saveload_pending_file.assign(statename.c_str()).append(PATH_SEPARATOR).append(filename).append(".sta"); } } @@ -892,7 +892,7 @@ void running_machine::handle_saveload() // if no name, bail emu_file file(m_saveload_searchpath, openflags); - if (!m_saveload_pending_file) + if (m_saveload_pending_file.empty()) goto cancel; // if there are anonymous timers, we can't save just yet, and we can't load yet either @@ -955,7 +955,7 @@ void running_machine::handle_saveload() // unschedule the operation cancel: - m_saveload_pending_file.reset(); + m_saveload_pending_file.clear(); m_saveload_searchpath = NULL; m_saveload_schedule = SLS_NONE; } @@ -1203,12 +1203,12 @@ const char *running_machine::image_parent_basename(device_t *device) NVRAM depending of selected BIOS -------------------------------------------------*/ -astring &running_machine::nvram_filename(astring &result, device_t &device) +std::string &running_machine::nvram_filename(std::string &result, device_t &device) { // start with either basename or basename_biosnum - result.cpy(basename()); + result.assign(basename()); if (root_device().system_bios() != 0 && root_device().default_bios() != root_device().system_bios()) - result.catprintf("_%d", root_device().system_bios() - 1); + strcatprintf(result, "_%d", root_device().system_bios() - 1); // device-based NVRAM gets its own name in a subdirectory if (&device != &root_device()) @@ -1217,11 +1217,12 @@ astring &running_machine::nvram_filename(astring &result, device_t &device) const char *software = image_parent_basename(&device); if (software!=NULL && strlen(software)>0) { - result.cat(PATH_SEPARATOR).cat(software); + result.append(PATH_SEPARATOR).append(software); } - astring tag(device.tag()); - tag.del(0, 1).replacechr(':', '_'); - result.cat(PATH_SEPARATOR).cat(tag); + std::string tag(device.tag()); + tag.erase(0, 1); + strreplacechr(tag,':', '_'); + result.append(PATH_SEPARATOR).append(tag); } return result; } @@ -1235,7 +1236,7 @@ void running_machine::nvram_load() nvram_interface_iterator iter(root_device()); for (device_nvram_interface *nvram = iter.first(); nvram != NULL; nvram = iter.next()) { - astring filename; + std::string filename; emu_file file(options().nvram_directory(), OPEN_FLAG_READ); if (file.open(nvram_filename(filename, nvram->device()).c_str()) == FILERR_NONE) { @@ -1257,7 +1258,7 @@ void running_machine::nvram_save() nvram_interface_iterator iter(root_device()); for (device_nvram_interface *nvram = iter.first(); nvram != NULL; nvram = iter.next()) { - astring filename; + std::string filename; emu_file file(options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); if (file.open(nvram_filename(filename, nvram->device()).c_str()) == FILERR_NONE) { diff --git a/src/emu/machine.h b/src/emu/machine.h index 9fb264f9963..a989ba2c874 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -182,7 +182,7 @@ public: bool ui_active() const { return m_ui_active; } const char *basename() const { return m_basename.c_str(); } int sample_rate() const { return m_sample_rate; } - bool save_or_load_pending() const { return m_saveload_pending_file; } + bool save_or_load_pending() const { return !m_saveload_pending_file.empty(); } screen_device *first_screen() const { return primary_screen; } // additional helpers @@ -253,14 +253,14 @@ private: // internal helpers void start(); void set_saveload_filename(const char *filename); - astring get_statename(const char *statename_opt); + std::string get_statename(const char *statename_opt); void fill_systime(system_time &systime, time_t t); void handle_saveload(); void soft_reset(void *ptr = NULL, INT32 param = 0); void watchdog_fired(void *ptr = NULL, INT32 param = 0); void watchdog_vblank(screen_device &screen, bool vblank_state); const char *image_parent_basename(device_t *device); - astring &nvram_filename(astring &result, device_t &device); + std::string &nvram_filename(std::string &result, device_t &device); void nvram_load(); void nvram_save(); @@ -306,8 +306,8 @@ private: UINT32 m_rand_seed; // current random number seed bool m_ui_active; // ui active or not (useful for games / systems with keyboard inputs) time_t m_base_time; // real time at initial emulation time - astring m_basename; // basename used for game-related paths - astring m_context; // context string buffer + std::string m_basename; // basename used for game-related paths + std::string m_context; // context string buffer int m_sample_rate; // the digital audio sample rate auto_pointer<emu_file> m_logfile; // pointer to the active log file @@ -320,7 +320,7 @@ private: }; saveload_schedule m_saveload_schedule; attotime m_saveload_schedule_time; - astring m_saveload_pending_file; + std::string m_saveload_pending_file; const char * m_saveload_searchpath; // notifier callbacks diff --git a/src/emu/machine/bcreader.c b/src/emu/machine/bcreader.c index 954adfd5448..d8560ea600d 100644 --- a/src/emu/machine/bcreader.c +++ b/src/emu/machine/bcreader.c @@ -73,13 +73,13 @@ barcode_reader_device::barcode_reader_device(const machine_config &mconfig, cons void barcode_reader_device::device_start() { - state_save_register_item(machine(), "DATACH", this->tag(), 0, m_byte_data); - state_save_register_item(machine(), "DATACH", this->tag(), 0, m_pixel_data); - state_save_register_item(machine(), "DATACH", this->tag(), 0, m_byte_length); - state_save_register_item(machine(), "DATACH", this->tag(), 0, m_pixel_length); - state_save_register_item(machine(), "DATACH", this->tag(), 0, m_byte_count); - state_save_register_item(machine(), "DATACH", this->tag(), 0, m_pixel_count); - state_save_register_item(machine(), "DATACH", this->tag(), 0, m_new_code); + save_item(m_byte_data, "DATACH/m_byte_data"); + save_item(m_pixel_data, "DATACH/m_pixel_data"); + save_item(m_byte_length, "DATACH/m_byte_length"); + save_item(m_pixel_length, "DATACH/m_pixel_length"); + save_item(m_byte_count, "DATACH/m_byte_count"); + save_item(m_pixel_count, "DATACH/m_pixel_count"); + save_item(m_new_code, "DATACH/m_new_code"); } diff --git a/src/emu/machine/fdc_pll.c b/src/emu/machine/fdc_pll.c index a035a9c868b..e0cd8338ef2 100644 --- a/src/emu/machine/fdc_pll.c +++ b/src/emu/machine/fdc_pll.c @@ -1,6 +1,6 @@ #include "fdc_pll.h" -astring fdc_pll_t::tts(attotime t) +std::string fdc_pll_t::tts(attotime t) { char buf[256]; bool neg = t.seconds < 0; @@ -22,7 +22,6 @@ void fdc_pll_t::set_clock(const attotime &_period) void fdc_pll_t::reset(const attotime &when) { ctime = when; - write_ctime = when; phase_adjust = attotime::zero; freq_hist = 0; write_position = 0; @@ -66,7 +65,6 @@ int fdc_pll_t::get_next_bit(attotime &tm, floppy_image_device *floppy, const att if(next > limit) return -1; - write_ctime = ctime; ctime = next; tm = next; @@ -132,20 +130,3 @@ bool fdc_pll_t::write_next_bit(bool bit, attotime &tm, floppy_image_device *flop ctime = etime; return false; } - -bool fdc_pll_t::write_next_bit_prev_cell(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit) -{ - if(write_start_time.is_never()) { - write_start_time = write_ctime; - write_position = 0; - } - - attotime etime = write_ctime + period; - if(etime > limit) - return true; - - if(bit && write_position < ARRAY_LENGTH(write_buffer)) - write_buffer[write_position++] = write_ctime + period/2; - - return false; -} diff --git a/src/emu/machine/fdc_pll.h b/src/emu/machine/fdc_pll.h index 0cb08bba8cf..7bb04e0be33 100644 --- a/src/emu/machine/fdc_pll.h +++ b/src/emu/machine/fdc_pll.h @@ -12,7 +12,6 @@ class fdc_pll_t { public: attotime ctime, period, min_period, max_period, period_adjust_base, phase_adjust; - attotime write_ctime; attotime write_start_time; attotime write_buffer[32]; int write_position; @@ -22,12 +21,11 @@ public: void reset(const attotime &when); int get_next_bit(attotime &tm, floppy_image_device *floppy, const attotime &limit); bool write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit); - bool write_next_bit_prev_cell(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit); void start_writing(const attotime &tm); void commit(floppy_image_device *floppy, const attotime &tm); void stop_writing(floppy_image_device *floppy, const attotime &tm); - astring tts(attotime tm); + std::string tts(attotime tm); }; #endif diff --git a/src/emu/machine/hdc9234.c b/src/emu/machine/hdc9234.c index 6267e184ad7..c77783e463c 100644 --- a/src/emu/machine/hdc9234.c +++ b/src/emu/machine/hdc9234.c @@ -24,37 +24,37 @@ #include "hdc9234.h" // Per-command debugging -#define TRACE_SELECT 0 -#define TRACE_STEP 0 -#define TRACE_RESTORE 0 -#define TRACE_SUBSTATES 0 -#define TRACE_READ 0 -#define TRACE_WRITE 0 -#define TRACE_READREG 0 -#define TRACE_SETREG 0 -#define TRACE_SETPTR 0 -#define TRACE_FORMAT 0 -#define TRACE_READTRACK 0 +#define TRACE_SELECT 1 +#define TRACE_STEP 1 +#define TRACE_RESTORE 1 +#define TRACE_SUBSTATES 1 +#define TRACE_READ 1 +#define TRACE_WRITE 1 +#define TRACE_READREG 1 +#define TRACE_SETREG 1 +#define TRACE_SETPTR 1 +#define TRACE_FORMAT 1 +#define TRACE_READTRACK 1 // Common states -#define TRACE_READID 0 -#define TRACE_VERIFY 0 -#define TRACE_TRANSFER 0 +#define TRACE_READID 1 +#define TRACE_VERIFY 1 +#define TRACE_TRANSFER 1 // Live states debugging -#define TRACE_LIVE 0 -#define TRACE_SHIFT 0 -#define TRACE_SYNC 0 +#define TRACE_LIVE 1 +#define TRACE_SHIFT 1 +#define TRACE_SYNC 1 // Misc debugging #define TRACE_DELAY 0 -#define TRACE_INT 0 -#define TRACE_LINES 0 -#define TRACE_INDEX 0 -#define TRACE_DMA 0 -#define TRACE_DONE 0 -#define TRACE_FAIL 0 -#define TRACE_AUXBUS 0 +#define TRACE_INT 1 +#define TRACE_LINES 1 +#define TRACE_INDEX 1 +#define TRACE_DMA 1 +#define TRACE_DONE 1 +#define TRACE_FAIL 1 +#define TRACE_AUXBUS 1 #define TRACE_DETAIL 0 @@ -239,8 +239,8 @@ enum enum { GEN_TIMER = 1, - COM_TIMER, - LIVE_TIMER + COM_TIMER /*, + LIVE_TIMER */ }; /* @@ -1027,6 +1027,7 @@ void hdc9234_device::drive_deselect() { if (TRACE_SELECT) logerror("%s: DESELECT command\n", tag()); m_selected_drive_number = NODRIVE; + m_output1 = 0x00; set_command_done(TC_SUCCESS); } @@ -1066,7 +1067,7 @@ void hdc9234_device::restore_drive() // Track 0 has not been reached yet if ((m_register_r[DRIVE_STATUS] & HDC_DS_READY)==0) { - if (TRACE_RESTORE) logerror("%s: restore command: drive not ready\n", tag()); + if (TRACE_RESTORE) logerror("%s: restore command: Drive not ready\n", tag()); // Does not look like a success, but this takes into account // that if a drive is not connected we do not want an error message cont = SUCCESS; @@ -1081,6 +1082,7 @@ void hdc9234_device::restore_drive() // When we have buffered steps, the seek limit will be reached // before TRK00 is asserted. In that case we have to wait for // SEEK_COMPLETE. We also wait as soon as TRK00 is asserted. + if (TRACE_RESTORE) logerror("%s: restore using buffered steps\n", tag()); wait_line(SEEKCOMP_LINE, ASSERT_LINE, SEEK_COMPLETE, false); cont = WAIT; } @@ -1765,7 +1767,7 @@ void hdc9234_device::write_sectors() =========================================================================== */ -astring hdc9234_device::tts(const attotime &t) +std::string hdc9234_device::tts(const attotime &t) { char buf[256]; int nsec = t.attoseconds / ATTOSECONDS_PER_NANOSECOND; @@ -1773,7 +1775,7 @@ astring hdc9234_device::tts(const attotime &t) return buf; } -astring hdc9234_device::ttsn() +std::string hdc9234_device::ttsn() { return tts(machine().time()); } @@ -1809,7 +1811,8 @@ void hdc9234_device::live_start(int state) void hdc9234_device::live_run() { - live_run_until(attotime::never); + if (using_floppy()) live_run_until(attotime::never); + else live_run_hd_until(attotime::never); } /* @@ -1817,6 +1820,8 @@ void hdc9234_device::live_run() the requested data are read. limit: if unlimited (attotime::never), run up to the end of the track and wait there otherwise, used to replay the read/write operation up to the point where the event happened + + THIS IS THE FLOPPY-ONLY LIVE_RUN */ void hdc9234_device::live_run_until(attotime limit) { @@ -2623,6 +2628,40 @@ void hdc9234_device::live_run_until(attotime limit) } /* + The main method of the live state machine. We stay in this method until + the requested data are read. + limit: if unlimited (attotime::never), run up to the end of the track and wait there + otherwise, used to replay the read/write operation up to the point where the event happened + + THIS IS THE HARDDISK-ONLY LIVE_RUN +*/ +void hdc9234_device::live_run_hd_until(attotime limit) +{ +// int slot = 0; + logerror("%s: live_run_hd\n", tag()); + + if (m_live_state.state == IDLE || m_live_state.next_state != -1) + return; + + if (TRACE_LIVE) + { + if (limit == attotime::never) + logerror("%s: [%s] live_run_hd, live_state=%d, mode=%s\n", tag(), tts(m_live_state.time).c_str(), m_live_state.state, fm_mode()? "FM":"MFM"); + else + logerror("%s: [%s] live_run_hd until %s, live_state=%d, mode=%s\n", tag(), tts(m_live_state.time).c_str(), tts(limit).c_str(), m_live_state.state, fm_mode()? "FM":"MFM"); + } + while (true) + { + switch (m_live_state.state) + { + case SEARCH_IDAM: + break; + } + return; + } +} + +/* Synchronize the live position on the track with the real time. Results in a new checkpoint and a live position at machine time or behind. As a side effect, portions of the track may be re-read @@ -3269,7 +3308,7 @@ void hdc9234_device::auxbus_out() m_output2 = (m_output2 & 0xb0) | desired_head(); if (m_reduced_write_current) m_output2 |= OUT2_REDWRT; - if (TRACE_AUXBUS) logerror("%s: Setting OUTPUT2 to %02x\n", tag(), m_output2); + if (TRACE_AUXBUS) logerror("%s: [%s] Setting OUTPUT1=%02x, OUTPUT2=%02x\n", tag(), ttsn().c_str(), m_output1, m_output2); if (m_output1 != m_output1_old || m_output2 != m_output2_old) { @@ -3338,6 +3377,14 @@ void hdc9234_device::connect_floppy_drive(floppy_image_device* floppy) } /* + Connect the current hard drive. +*/ +void hdc9234_device::connect_hard_drive(mfm_harddisk_device* harddisk) +{ + m_harddisk = harddisk; +} + +/* Clock divider. This input line actually belongs to the data separator which is a separate circuit. Maybe we will take it out of this implementation at some time and make it a device of its own. @@ -3363,9 +3410,9 @@ void hdc9234_device::device_timer(emu_timer &timer, device_timer_id id, int para case COM_TIMER: process_command(); break; - case LIVE_TIMER: - live_run(); - break; + /* case LIVE_TIMER: + live_run(); + break; */ } } @@ -3393,7 +3440,7 @@ void hdc9234_device::device_start() // allocate timers m_timer = timer_alloc(GEN_TIMER); m_cmd_timer = timer_alloc(COM_TIMER); - m_live_timer = timer_alloc(LIVE_TIMER); + // m_live_timer = timer_alloc(LIVE_TIMER); m_live_state.state = IDLE; } diff --git a/src/emu/machine/hdc9234.h b/src/emu/machine/hdc9234.h index cd96fdc7db2..8317545c552 100644 --- a/src/emu/machine/hdc9234.h +++ b/src/emu/machine/hdc9234.h @@ -10,6 +10,7 @@ #include "emu.h" #include "imagedev/floppy.h" #include "fdc_pll.h" +#include "ti99_hd.h" extern const device_type HDC9234; @@ -109,6 +110,9 @@ public: // is changed outside of the controller, and by this way we let it know. void connect_floppy_drive(floppy_image_device *floppy); + // Used to reconfigure the drive connections. See connect_floppy_drive. + void connect_hard_drive(mfm_harddisk_device *harddisk); + protected: void device_start(); void device_reset(); @@ -134,6 +138,9 @@ private: // Currently connected floppy floppy_image_device* m_floppy; + // Currently connected harddisk + mfm_harddisk_device* m_harddisk; + // internal register OUTPUT1 UINT8 m_output1, m_output1_old; @@ -161,7 +168,7 @@ private: // Timers to delay execution/completion of commands */ emu_timer *m_timer; emu_timer *m_cmd_timer; - emu_timer *m_live_timer; + // emu_timer *m_live_timer; // Timer callback void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); @@ -177,10 +184,10 @@ private: void wait_line(int line, line_state level, int substate, bool stopwrite); // Converts attotime to a string - astring tts(const attotime &t); + std::string tts(const attotime &t); // Current time - astring ttsn(); + std::string ttsn(); // Utility routine to set or reset bits void set_bits(UINT8& byte, int mask, bool set); @@ -221,6 +228,9 @@ private: // Analyses the track until the given time void live_run_until(attotime limit); + // Same for hard disks + void live_run_hd_until(attotime limit); + // Live run until next index pulse void live_run(); diff --git a/src/emu/machine/ins8250.c b/src/emu/machine/ins8250.c index a104286845b..91e3a7460ce 100644 --- a/src/emu/machine/ins8250.c +++ b/src/emu/machine/ins8250.c @@ -324,7 +324,15 @@ WRITE8_MEMBER( ins8250_uart_device::ins8250_w ) break; case 6: - // modem status register is read only + /* + This register can be written, but if you write a 1 bit into any of + bits 3 - 0, you could cause an interrupt if the appropriate IER bit + is set. + */ + m_regs.msr = data; + + if ( m_regs.msr & 0x0f ) + trigger_int(COM_INT_PENDING_MODEM_STATUS_REGISTER); break; case 7: m_regs.scr = data; @@ -485,20 +493,25 @@ void ins8250_uart_device::tra_callback() void ins8250_uart_device::update_msr() { UINT8 data; + int change; if (m_regs.mcr & 0x10) - data = ((m_regs.mcr & 0x0c) << 4) | ((m_regs.mcr & 0x01) << 5) | ((m_regs.mcr & 0x02) << 3); + { + data = (((m_regs.mcr & 0x0c) << 4) | ((m_regs.mcr & 0x01) << 5) | ((m_regs.mcr & 0x02) << 3)); + change = (m_regs.msr ^ data) >> 4; + if(!(m_regs.msr & 0x40) && (data & 0x40)) + change &= ~4; + } else + { data = (!m_dcd << 7) | (!m_ri << 6) | (!m_dsr << 5) | (!m_cts << 4); + change = (m_regs.msr ^ data) >> 4; + } - int change = (m_regs.msr ^ data) >> 4; - - if (change) - { - m_regs.msr = data | (m_regs.msr & 0xf) | change; + m_regs.msr = data | change; + if(change) trigger_int(COM_INT_PENDING_MODEM_STATUS_REGISTER); - } } WRITE_LINE_MEMBER(ins8250_uart_device::dcd_w) diff --git a/src/emu/machine/laserdsc.c b/src/emu/machine/laserdsc.c index 809422871a4..a027ac62271 100644 --- a/src/emu/machine/laserdsc.c +++ b/src/emu/machine/laserdsc.c @@ -755,7 +755,7 @@ void laserdisc_device::init_disc() throw emu_fatalerror("Laserdisc video must be compressed with the A/V codec!"); // read the metadata - astring metadata; + std::string metadata; chd_error err = m_disc->read_metadata(AV_METADATA_TAG, 0, metadata); if (err != CHDERR_NONE) throw emu_fatalerror("Non-A/V CHD file specified"); diff --git a/src/emu/machine/mos6530n.c b/src/emu/machine/mos6530n.c index 70af89279bd..64e13126a1c 100644 --- a/src/emu/machine/mos6530n.c +++ b/src/emu/machine/mos6530n.c @@ -247,7 +247,7 @@ void mos6530_t::update_pb() } else { - m_out_pb_cb(data); + m_out_pb_cb(data); } } diff --git a/src/emu/machine/mos6530n.h b/src/emu/machine/mos6530n.h index 88cd4a56558..22be75989b4 100644 --- a/src/emu/machine/mos6530n.h +++ b/src/emu/machine/mos6530n.h @@ -46,7 +46,7 @@ //************************************************************************** #define MCFG_MOS6530n_IRQ_CB(_write) \ - devcb = &mos6530_t::set_irq_wr_callback(*device, DEVCB_##_write); + devcb = &mos6530_t::set_irq_wr_callback(*device, DEVCB_##_write); #define MCFG_MOS6530n_IN_PA_CB(_read) \ devcb = &mos6530_t::set_pa_rd_callback(*device, DEVCB_##_read); diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c index ae88104f605..daf08a61598 100644 --- a/src/emu/machine/netlist.c +++ b/src/emu/machine/netlist.c @@ -370,7 +370,8 @@ void netlist_mame_device_t::device_clock_changed() //printf("device_clock_changed\n"); m_div = netlist_time::from_hz(clock()).as_raw(); //m_rem = 0; - NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clockfreq, m_div)); + //NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clock(), m_div)); + NL_VERBOSE_OUT(("Setting clock %d and divisor %d\n", clock(), m_div)); //printf("Setting clock %d and divisor %d\n", clock(), m_div); } @@ -535,18 +536,16 @@ ATTR_COLD offs_t netlist_mame_cpu_device_t::disasm_disassemble(char *buffer, off //char tmp[16]; unsigned startpc = pc; int relpc = pc - m_genPC; - //UINT16 opcode = (oprom[pc - startpc] << 8) | oprom[pc+1 - startpc]; - //UINT8 inst = opcode >> 13; - if (relpc >= 0 && relpc < netlist().queue().count()) { - // sprintf(buffer, "%04x %02d %s", pc, relpc, netlist().queue()[netlist().queue().count() - relpc - 1].object().name().cstr()); int dpc = netlist().queue().count() - relpc - 1; - sprintf(buffer, "%c %s @%10.7f", (relpc == 0) ? '*' : ' ', netlist().queue()[dpc].object()->name().cstr(), + // FIXME: 50 below fixes crash in mame-debugger. It's based on try on error. + snprintf(buffer, 50, "%c %s @%10.7f", (relpc == 0) ? '*' : ' ', netlist().queue()[dpc].object()->name().cstr(), netlist().queue()[dpc].exec_time().as_double()); } else sprintf(buffer, "%s", ""); + pc+=1; return (pc - startpc); } diff --git a/src/emu/machine/netlist.h b/src/emu/machine/netlist.h index 214b95c4b92..ae3bbab7cbf 100644 --- a/src/emu/machine/netlist.h +++ b/src/emu/machine/netlist.h @@ -268,14 +268,14 @@ protected: // device_state_interface overrides - virtual void state_string_export(const device_state_entry &entry, astring &str) + virtual void state_string_export(const device_state_entry &entry, std::string &str) { if (entry.index() >= 0) { if (entry.index() & 1) - str.format("%10.6f", *((double *)entry.dataptr())); + strprintf(str,"%10.6f", *((double *)entry.dataptr())); else - str.format("%d", *((netlist_sig_t *)entry.dataptr())); + strprintf(str, "%d", *((netlist_sig_t *)entry.dataptr())); } } @@ -561,10 +561,12 @@ public: { register_input("IN", m_in); m_cpu_device = downcast<netlist_mame_cpu_device_t *>(&downcast<netlist_mame_t &>(netlist()).parent()); + save(NLNAME(m_last)); } ATTR_COLD void reset() { + m_last = 0.0; } ATTR_COLD void register_callback(netlist_analog_output_delegate callback) @@ -574,15 +576,24 @@ public: ATTR_HOT void update() { - m_cpu_device->update_time_x(); - m_callback(INPANALOG(m_in), m_cpu_device->local_time()); - m_cpu_device->check_mame_abort_slice(); + nl_double cur = INPANALOG(m_in); + + // FIXME: make this a parameter + // avoid calls due to noise + if (fabs(cur - m_last) > 1e-6) + { + m_cpu_device->update_time_x(); + m_callback(cur, m_cpu_device->local_time()); + m_cpu_device->check_mame_abort_slice(); + m_last = cur; + } } private: netlist_analog_input_t m_in; netlist_analog_output_delegate m_callback; netlist_mame_cpu_device_t *m_cpu_device; + netlist_state_t<nl_double> m_last; }; // ---------------------------------------------------------------------------------------- diff --git a/src/emu/machine/pci.c b/src/emu/machine/pci.c index f4681aaaf9e..c61d2045d20 100644 --- a/src/emu/machine/pci.c +++ b/src/emu/machine/pci.c @@ -133,7 +133,7 @@ READ32_MEMBER(pci_device::address_base_r) if(bank_reg_infos[offset].hi) return bank_infos[bid].adr >> 32; int flags = bank_infos[bid].flags; - return bank_infos[bid].adr | (flags & M_IO ? 1 : 0) | (flags & M_64A ? 4 : 0) | (flags & M_PREF ? 8 : 0); + return (bank_infos[bid].adr & ~(bank_infos[bid].size - 1)) | (flags & M_IO ? 1 : 0) | (flags & M_64A ? 4 : 0) | (flags & M_PREF ? 8 : 0); } WRITE32_MEMBER(pci_device::address_base_w) @@ -147,7 +147,6 @@ WRITE32_MEMBER(pci_device::address_base_w) if(bank_reg_infos[offset].hi) bank_infos[bid].adr = (bank_infos[bid].adr & 0xffffffff) | (UINT64(data) << 32); else { - data &= ~(bank_infos[bid].size - 1); bank_infos[bid].adr = (bank_infos[bid].adr & U64(0xffffffff00000000)) | data; } remap_cb(); @@ -257,19 +256,20 @@ void pci_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end { for(int i=0; i<bank_count; i++) { bank_info &bi = bank_infos[i]; - if(bi.adr==-1) + if(UINT32(bi.adr) == 0xffffffff) continue; - if(UINT32(bi.adr) == UINT32(~(bi.size - 1))) + if(!bi.size || (bi.flags & M_DISABLED)) continue; - UINT64 start; address_space *space; + UINT64 start = bi.adr & ~(bi.size - 1); + if(bi.flags & M_IO) { space = io_space; - start = bi.adr + io_offset; + start += io_offset; } else { space = memory_space; - start = bi.adr + memory_offset; + start += memory_offset; } UINT64 end = start + bi.size-1; switch(i) { @@ -280,6 +280,7 @@ void pci_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end case 4: space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(pci_device::unmapped4_r), this), write32_delegate(FUNC(pci_device::unmapped4_w), this)); break; case 5: space->install_readwrite_handler(start, end, 0, 0, read32_delegate(FUNC(pci_device::unmapped5_r), this), write32_delegate(FUNC(pci_device::unmapped5_w), this)); break; } + space->install_device_delegate(start, end, *this, bi.map); logerror("%s: map %s at %0*x-%0*x\n", tag(), bi.map.name(), bi.flags & M_IO ? 4 : 8, UINT32(start), bi.flags & M_IO ? 4 : 8, UINT32(end)); } @@ -337,7 +338,7 @@ void pci_device::add_map(UINT64 size, int flags, address_map_delegate &map) bank_reg_infos[breg].hi = 0; } - logerror("Device %s (%s) has 0x%" I64FMT "x bytes of %s named %s\n", tag(), name(), size, flags & M_IO ? "io" : "memory", map.name()); + logerror("Device %s (%s) has 0x%" I64FMT "x bytes of %s named %s\n", tag(), name(), size, flags & M_IO ? "io" : "memory", bank_infos[bid].map.name()); } void pci_device::add_rom(const UINT8 *rom, UINT32 size) @@ -352,6 +353,24 @@ void pci_device::add_rom_from_region() add_rom(m_region->base(), m_region->bytes()); } +void pci_device::set_map_address(int id, UINT64 adr) +{ + bank_infos[id].adr = adr; + remap_cb(); +} + +void pci_device::set_map_size(int id, UINT64 size) +{ + bank_infos[id].size = size; + remap_cb(); +} + +void pci_device::set_map_flags(int id, int flags) +{ + bank_infos[id].flags = flags; + remap_cb(); +} + agp_device::agp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : pci_device(mconfig, type, name, tag, owner, clock, shortname, source) { diff --git a/src/emu/machine/pci.h b/src/emu/machine/pci.h index 67aad0e0038..e678b2eb689 100644 --- a/src/emu/machine/pci.h +++ b/src/emu/machine/pci.h @@ -85,11 +85,14 @@ protected: M_IO = 1, M_64D = 2, M_64A = 4, - M_PREF = 8 + M_PREF = 8, + M_DISABLED = 16 }; struct bank_info { + // One of the two address_map_delegate map; + UINT64 adr; UINT32 size; int flags; @@ -124,6 +127,14 @@ protected: void add_rom(const UINT8 *data, UINT32 size); void add_rom_from_region(); + + void set_map_address(int id, UINT64 adr); + void set_map_size(int id, UINT64 size); + void set_map_flags(int id, int flags); + +private: + void add_map_finish(int bid, UINT64 size, int flags); + }; class agp_device : public pci_device { diff --git a/src/emu/machine/pci9050.c b/src/emu/machine/pci9050.c index 4ca85648e27..ed8e58e2497 100644 --- a/src/emu/machine/pci9050.c +++ b/src/emu/machine/pci9050.c @@ -1,9 +1,9 @@ /********************************************************************* pci9050.c - PLX PCI9050 PCI to 4x Local Bus Bridge - - by R. Belmont - + + by R. Belmont + PCI spaces: 0 - (config memory) not used 1 - (config I/O) config regs @@ -11,12 +11,12 @@ 3 - local bus 2 window 4 - local bus 3 window 5 - local bus 4 window - + PCI9050 is located, mapped, and initialized at BFC00700. - - The boot ROM then copies ROM to RAM, jumps to RAM, and starts trying to + + The boot ROM then copies ROM to RAM, jumps to RAM, and starts trying to access Zeus 2 video through the mapped windows. - + *********************************************************************/ #include "pci9050.h" @@ -24,45 +24,57 @@ const device_type PCI9050 = &device_creator<pci9050_device>; DEVICE_ADDRESS_MAP_START(map, 32, pci9050_device) - AM_RANGE(0x00, 0x5f) AM_READWRITE(reg_r, reg_w) + AM_RANGE(0x00, 0x0f) AM_READWRITE(lasrr_r, lasrr_w ) + AM_RANGE(0x10, 0x13) AM_READWRITE(eromrr_r, eromrr_w ) + AM_RANGE(0x14, 0x23) AM_READWRITE(lasba_r, lasba_w ) + AM_RANGE(0x24, 0x27) AM_READWRITE(eromba_r, eromba_w ) + AM_RANGE(0x28, 0x37) AM_READWRITE(lasbrd_r, lasbrd_w ) + AM_RANGE(0x38, 0x3b) AM_READWRITE(erombrd_r, erombrd_w) + AM_RANGE(0x3c, 0x4b) AM_READWRITE(csbase_r, csbase_w ) + AM_RANGE(0x4c, 0x4f) AM_READWRITE(intcsr_r, intcsr_w ) + AM_RANGE(0x50, 0x53) AM_READWRITE(cntrl_r, cntrl_w ) +ADDRESS_MAP_END + +DEVICE_ADDRESS_MAP_START(empty, 32, pci9050_device) ADDRESS_MAP_END pci9050_device::pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : pci_device(mconfig, PCI9050, "PLX PCI9050 PCI to Local Bus Bridge", tag, owner, clock, "pci9050", __FILE__) { + for(int i=0; i<4; i++) { + m_devices[i] = NULL; + m_names[i] = NULL; + } } -enum -{ - CFG_LS0_RANGE = 0, - CFG_LS1_RANGE, - CFG_LS2_RANGE, - CFG_LS3_RANGE, - CFG_ROM_RANGE, - CFG_LS0_BASE, - CFG_LS1_BASE, - CFG_LS2_BASE, - CFG_LS3_BASE, - CFG_ROM_BASE, - CFG_LS0_DESCRIPTORS, - CFG_LS1_DESCRIPTORS, - CFG_LS2_DESCRIPTORS, - CFG_LS3_DESCRIPTORS, - CFG_ROM_DESCRIPTORS, - CFG_CS0_BASE, - CFG_CS1_BASE, - CFG_CS2_BASE, - CFG_CS3_BASE, - CFG_IRQ_CTRL_STATUS, - CFG_MISC_CTRL -}; +void pci9050_device::set_map(int id, address_map_constructor map, const char *name, device_t *device) +{ + m_maps[id] = map; + m_names[id] = name; + m_devices[id] = device; +} void pci9050_device::device_start() { + typedef void (pci9050_device::*tramp_t)(address_map &, device_t &); + static const tramp_t trampolines[4] = { + &pci9050_device::map_trampoline<0>, + &pci9050_device::map_trampoline<1>, + &pci9050_device::map_trampoline<2>, + &pci9050_device::map_trampoline<3> + }; + pci_device::device_start(); - skip_map_regs(1); // we don't use map 0 - add_map(0x60, M_IO, FUNC(pci9050_device::map)); // map 1 is our config registers + add_map(0x100, M_MEM, FUNC(pci9050_device::map)); // map 0 is our config registers, mem space + add_map(0x100, M_IO, FUNC(pci9050_device::map)); // map 1 is our config registers, i/o space + + for(int i=0; i<4; i++) + if(m_names[i]) + // add_map(0, M_MEM | M_DISABLED, m_maps[i], m_names[i], m_devices[i]); + add_map(0, M_MEM | M_DISABLED, trampolines[i], m_names[i]); + else + add_map(0, M_MEM | M_DISABLED, FUNC(pci9050_device::empty)); } void pci9050_device::device_config_complete() @@ -72,110 +84,169 @@ void pci9050_device::device_config_complete() void pci9050_device::device_reset() { pci_device::device_reset(); + set_map_address(0, 0); + set_map_address(1, 0); + for(int i=0; i<4; i++) { + m_lasrr[i] = i ? 0 : 0x0ff00000; + m_lasba[i] = 0; + m_lasbrd[i] = 0x00800000; + m_csbase[i] = 0; + set_map_flags(i+2, M_MEM | M_DISABLED); + } + m_eromrr = 0x07ff8000; + m_eromba = 0x00080000; + m_erombrd = 0x00800000; + m_intcsr = 0; + m_cntrl = 0; } -READ32_MEMBER (pci9050_device::reg_r) -{ - UINT32 result = m_regs[offset]; - - logerror("%06X:PCI9050 read from reg %02x = %08x (mask %08x)\n", space.device().safe_pc(), offset*4, result, mem_mask); - - return result; -} - -WRITE32_MEMBER(pci9050_device::reg_w) +void pci9050_device::remap_local(int id) { - m_regs[offset] = data; + UINT32 csbase = m_csbase[id]; + UINT32 lasrr = m_lasrr[id]; + logerror("%d csbase=%08x lasrr=%08x\n", id, csbase, lasrr); - switch (offset) - { - case CFG_LS0_RANGE: - logerror("%06X:PCI9050 local bus 0 range %08x: %s flags %d pf %d addr bits 27-4 %08x\n", space.device().safe_pc(), data, (data & 1) ? "I/O" : "MEM", (data & 6)>>1, (data & 8)>>3, data & 0xfffffff); - break; + if(!(csbase & 1)) { + set_map_flags(id+2, M_MEM | M_DISABLED); + return; + } + int lsize; + for(lsize=1; lsize<28 && !(csbase & (1<<lsize)); lsize++); + if(lsize == 28) { + set_map_flags(id+2, M_MEM | M_DISABLED); + return; + } + int size = 2 << lsize; + if(csbase & 0x0fffffff & ~(size-1)) { + logerror("PCI9050 local bus %d disabled due to unimplemented post-decode remapping\n", id); + // set_map_flags(id+2, M_MEM | M_DISABLED); + // return; + } - case CFG_LS1_RANGE: - logerror("%06X:PCI9050 local bus 1 range %08x: %s flags %d pf %d addr bits 27-4 %08x\n", space.device().safe_pc(), data, (data & 1) ? "I/O" : "MEM", (data & 6)>>1, (data & 8)>>3, data & 0xfffffff); - break; + UINT32 mask = ~(size - 1); + if(lasrr & 1) + mask &= 0x0ffffffc; + else + mask &= 0x0ffffff0; - case CFG_LS2_RANGE: - logerror("%06X:PCI9050 local bus 2 range %08x: %s flags %d pf %d addr bits 27-4 %08x\n", space.device().safe_pc(), data, (data & 1) ? "I/O" : "MEM", (data & 6)>>1, (data & 8)>>3, data & 0xfffffff); - break; + if((lasrr & mask) != mask) { + logerror("PCI9050 local bus %d disabled due to unimplemented pci mirroring\n", id); + // set_map_flags(id+2, M_MEM | M_DISABLED); + // return; + } - case CFG_LS3_RANGE: - logerror("%06X:PCI9050 local bus 3 range %08x: %s flags %d pf %d addr bits 27-4 %08x\n", space.device().safe_pc(), data, (data & 1) ? "I/O" : "MEM", (data & 6)>>1, (data & 8)>>3, data & 0xfffffff); - break; + set_map_size(id+2, size); + set_map_flags(id+2, lasrr & 1 ? M_IO : lasrr & 8 ? M_MEM | M_PREF : M_MEM); +} - case CFG_ROM_RANGE: - logerror("%06X:PCI9050 ROM range %08x: addr bits 27-11 %08x\n", space.device().safe_pc(), data, data & 0xfffff800); - break; +void pci9050_device::remap_rom() +{ +} - case CFG_LS0_BASE: - logerror("%06X:PCI9050 local bus 0 base %08x: enable %d remap %08x\n", space.device().safe_pc(), data, data&1, data & 0x0ffffffe); - break; +READ32_MEMBER (pci9050_device::lasrr_r) +{ + return m_lasrr[offset]; +} - case CFG_LS1_BASE: - logerror("%06X:PCI9050 local bus 1 base %08x: enable %d remap %08x\n", space.device().safe_pc(), data, data&1, data & 0x0ffffffe); - break; +WRITE32_MEMBER(pci9050_device::lasrr_w) +{ + logerror("%06X:PCI9050 local bus %d range %08x: %s flags %d pf %d addr bits 27-4 %08x\n", space.device().safe_pc(), offset, data, (data & 1) ? "I/O" : "MEM", (data & 6)>>1, (data & 8)>>3, data & 0xfffffff); + m_lasrr[offset] = data; + remap_local(offset); +} - case CFG_LS2_BASE: - logerror("%06X:PCI9050 local bus 2 base %08x: enable %d remap %08x\n", space.device().safe_pc(), data, data&1, data & 0x0ffffffe); - break; +READ32_MEMBER (pci9050_device::eromrr_r) +{ + return m_eromrr; +} - case CFG_LS3_BASE: - logerror("%06X:PCI9050 local bus 3 base %08x: enable %d remap %08x\n", space.device().safe_pc(), data, data&1, data & 0x0ffffffe); - break; +WRITE32_MEMBER(pci9050_device::eromrr_w) +{ + logerror("%06X:PCI9050 ROM range %08x: addr bits 27-11 %08x\n", space.device().safe_pc(), data, data & 0xfffff800); + m_eromrr = data; + remap_rom(); +} - case CFG_ROM_BASE: - logerror("%06X:PCI9050 ROM base %08x: remap %08x\n", space.device().safe_pc(), data, data & 0x0ffff800); - break; +READ32_MEMBER (pci9050_device::lasba_r) +{ + return m_lasba[offset]; +} - case CFG_LS0_DESCRIPTORS: - logerror("%06X:PCI9050 local bus 0 descriptors %08x: burst %d prefetch %d width %d, endian %s, endian mode %d\n", space.device().safe_pc(), data, data&1, (data >> 5) & 1, (data >> 22) & 3, ((data >> 24) & 1) ? "BE" : "LE", (data >> 25) & 1); - break; +WRITE32_MEMBER(pci9050_device::lasba_w) +{ + logerror("%06X:PCI9050 local bus %d base %08x: enable %d remap %08x\n", space.device().safe_pc(), offset, data, data&1, data & 0x0ffffffe); + m_lasba[offset] = data; + remap_local(offset); +} - case CFG_LS1_DESCRIPTORS: - logerror("%06X:PCI9050 local bus 1 descriptors %08x: burst %d prefetch %d width %d, endian %s, endian mode %d\n", space.device().safe_pc(), data, data&1, (data >> 5) & 1, (data >> 22) & 3, ((data >> 24) & 1) ? "BE" : "LE", (data >> 25) & 1); - break; +READ32_MEMBER (pci9050_device::eromba_r) +{ + return m_eromba; +} - case CFG_LS2_DESCRIPTORS: - logerror("%06X:PCI9050 local bus 2 descriptors %08x: burst %d prefetch %d width %d, endian %s, endian mode %d\n", space.device().safe_pc(), data, data&1, (data >> 5) & 1, (data >> 22) & 3, ((data >> 24) & 1) ? "BE" : "LE", (data >> 25) & 1); - break; +WRITE32_MEMBER(pci9050_device::eromba_w) +{ + logerror("%06X:PCI9050 ROM base %08x: remap %08x\n", space.device().safe_pc(), data, data & 0x0ffff800); + m_eromba = data; + remap_rom(); +} - case CFG_LS3_DESCRIPTORS: - logerror("%06X:PCI9050 local bus 3 descriptors %08x: burst %d prefetch %d width %d, endian %s, endian mode %d\n", space.device().safe_pc(), data, data&1, (data >> 5) & 1, (data >> 22) & 3, ((data >> 24) & 1) ? "BE" : "LE", (data >> 25) & 1); - break; +READ32_MEMBER (pci9050_device::lasbrd_r) +{ + return m_lasbrd[offset]; +} - case CFG_ROM_DESCRIPTORS: - logerror("%06X:PCI9050 ROM descriptors %08x: burst %d prefetch %d bits %d, endian %s, endian mode %d\n", space.device().safe_pc(), data, data&1, (data >> 5) & 1, (data >> 22) & 3, ((data >> 24) & 1) ? "BE" : "LE", (data >> 25) & 1); - break; +WRITE32_MEMBER(pci9050_device::lasbrd_w) +{ + logerror("%06X:PCI9050 local bus %d descriptors %08x: burst %d prefetch %d width %d, endian %s, endian mode %d\n", space.device().safe_pc(), offset, data, data&1, (data >> 5) & 1, (data >> 22) & 3, ((data >> 24) & 1) ? "BE" : "LE", (data >> 25) & 1); + m_lasbrd[offset] = data; + remap_local(offset); +} - case CFG_CS0_BASE: - logerror("%06X:PCI9050 chip select 0 base %08x: enable %d size %08x\n", space.device().safe_pc(), data, data&1, data&0xfffffffe); - break; +READ32_MEMBER (pci9050_device::erombrd_r) +{ + return m_erombrd; +} - case CFG_CS1_BASE: - logerror("%06X:PCI9050 chip select 1 base %08x: enable %d size %08x\n", space.device().safe_pc(), data, data&1, data&0xfffffffe); - break; +WRITE32_MEMBER(pci9050_device::erombrd_w) +{ + logerror("%06X:PCI9050 ROM descriptors %08x: burst %d prefetch %d bits %d, endian %s, endian mode %d\n", space.device().safe_pc(), data, data&1, (data >> 5) & 1, (data >> 22) & 3, ((data >> 24) & 1) ? "BE" : "LE", (data >> 25) & 1); + m_erombrd = data; + remap_rom(); +} - case CFG_CS2_BASE: - logerror("%06X:PCI9050 chip select 2 base %08x: enable %d size %08x\n", space.device().safe_pc(), data, data&1, data&0xfffffffe); - break; +READ32_MEMBER (pci9050_device::csbase_r) +{ + return m_csbase[offset]; +} - case CFG_CS3_BASE: - logerror("%06X:PCI9050 chip select 3 base %08x: enable %d size %08x\n", space.device().safe_pc(), data, data&1, data&0xfffffffe); - break; +WRITE32_MEMBER(pci9050_device::csbase_w) +{ + logerror("%06X:PCI9050 chip select %d base %08x: enable %d size %08x\n", space.device().safe_pc(), offset, data, data&1, data&0xfffffffe); + m_csbase[offset] = data; + remap_local(offset); +} - case CFG_IRQ_CTRL_STATUS: - logerror("%06X:PCI9050 IRQ control %08x\n", space.device().safe_pc(), data); - break; +READ32_MEMBER (pci9050_device::intcsr_r) +{ + return m_intcsr; +} - case CFG_MISC_CTRL: - logerror("%06X:PCI9050 misc control %08x\n", space.device().safe_pc(), data); - break; +WRITE32_MEMBER(pci9050_device::intcsr_w) +{ + logerror("%06X:PCI9050 IRQ control %08x\n", space.device().safe_pc(), data); + m_intcsr = data; + remap_rom(); +} - default: - logerror("%06X:PCI9050 write to offset %02x = %08x (mask %08x)\n", space.device().safe_pc(), offset*4, data, mem_mask); - break; - } +READ32_MEMBER (pci9050_device::cntrl_r) +{ + return m_cntrl; +} +WRITE32_MEMBER(pci9050_device::cntrl_w) +{ + logerror("%06X:PCI9050 IRQ control %08x\n", space.device().safe_pc(), data); + m_cntrl = data; + remap_rom(); } diff --git a/src/emu/machine/pci9050.h b/src/emu/machine/pci9050.h index fc55f2b5e8f..556290ad81c 100644 --- a/src/emu/machine/pci9050.h +++ b/src/emu/machine/pci9050.h @@ -1,9 +1,9 @@ /********************************************************************* pci9050.h - PLX PCI9050 PCI to 4x Local Bus Bridge - - by R. Belmont - + + by R. Belmont + *********************************************************************/ #ifndef _PCI9050_H @@ -14,15 +14,36 @@ #define MCFG_PCI9050_ADD(_tag) \ MCFG_PCI_DEVICE_ADD(_tag, PCI9050, 0x10b59050, 0x01, 0x06800000, 0x10b59050) -class pci9050_device : +#define MCFG_PCI9050_SET_MAP(id, map) \ + downcast<pci9050_device *>(device)->set_map(id, ADDRESS_MAP_NAME(map), #map, owner); + +class pci9050_device : public pci_device { public: pci9050_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // PCI9050 I/O register space handlers - DECLARE_READ32_MEMBER(reg_r); - DECLARE_WRITE32_MEMBER(reg_w); + DECLARE_READ32_MEMBER( lasrr_r ); + DECLARE_WRITE32_MEMBER(lasrr_w ); + DECLARE_READ32_MEMBER( eromrr_r ); + DECLARE_WRITE32_MEMBER(eromrr_w ); + DECLARE_READ32_MEMBER( lasba_r ); + DECLARE_WRITE32_MEMBER(lasba_w ); + DECLARE_READ32_MEMBER( eromba_r ); + DECLARE_WRITE32_MEMBER(eromba_w ); + DECLARE_READ32_MEMBER( lasbrd_r ); + DECLARE_WRITE32_MEMBER(lasbrd_w ); + DECLARE_READ32_MEMBER( erombrd_r); + DECLARE_WRITE32_MEMBER(erombrd_w); + DECLARE_READ32_MEMBER( csbase_r ); + DECLARE_WRITE32_MEMBER(csbase_w ); + DECLARE_READ32_MEMBER( intcsr_r ); + DECLARE_WRITE32_MEMBER(intcsr_w ); + DECLARE_READ32_MEMBER( cntrl_r ); + DECLARE_WRITE32_MEMBER(cntrl_w ); + + void set_map(int id, address_map_constructor map, const char *name, device_t *device); protected: virtual void device_start(); @@ -31,11 +52,21 @@ protected: private: DECLARE_ADDRESS_MAP(map, 32); + DECLARE_ADDRESS_MAP(empty, 32); + + const char *m_names[4]; + device_t *m_devices[4]; + address_map_constructor m_maps[4]; + + UINT32 m_lasrr[4], m_lasba[4], m_lasbrd[4], m_csbase[4]; + UINT32 m_eromrr, m_eromba, m_erombrd, m_intcsr, m_cntrl; -// address_space_config m_as0_config, m_as1_config, m_as2_config, m_as3_config; -// address_space *m_as0, *m_as1, *m_as2, *m_as3; + void remap_local(int id); + void remap_rom(); - UINT32 m_regs[0x54/4]; + template<int id> void map_trampoline(address_map &map, device_t &device) { + m_maps[id](map, *m_devices[id]); + } }; extern const device_type PCI9050; diff --git a/src/emu/machine/pic8259.c b/src/emu/machine/pic8259.c index 6d404d654c5..d86b25dd30c 100644 --- a/src/emu/machine/pic8259.c +++ b/src/emu/machine/pic8259.c @@ -152,11 +152,6 @@ READ8_MEMBER( pic8259_device::read ) if ( m_ocw3 & 0x04 ) { /* Polling mode */ - if ( m_isr & ~m_imr ) - { - acknowledge(); - } - if ( m_irr & ~m_imr ) { /* check the various IRQs */ @@ -168,6 +163,7 @@ READ8_MEMBER( pic8259_device::read ) break; } } + acknowledge(); } } else diff --git a/src/emu/machine/ram.c b/src/emu/machine/ram.c index 47d53a48082..6f5d3c4ec27 100644 --- a/src/emu/machine/ram.c +++ b/src/emu/machine/ram.c @@ -154,21 +154,21 @@ void ram_device::device_validity_check(validity_checker &valid) const if (!is_valid) { - astring output; - output.catprintf("Cannot recognize the RAM option %s", ramsize_string); - output.catprintf(" (valid options are %s", m_default_size); + std::string output; + strcatprintf(output, "Cannot recognize the RAM option %s", ramsize_string); + strcatprintf(output, " (valid options are %s", m_default_size); if (m_extra_options != NULL) - output.catprintf(",%s).\n", m_extra_options); + strcatprintf(output, ",%s).\n", m_extra_options); else - output.catprintf(").\n"); + strcatprintf(output, ").\n"); osd_printf_error("%s", output.c_str()); osd_printf_warning("Setting value to default %s\n",m_default_size); - astring error; + std::string error; mconfig().options().set_value(OPTION_RAMSIZE, m_default_size, OPTION_PRIORITY_CMDLINE, error); - assert(!error); + assert(error.empty()); } } diff --git a/src/emu/machine/smc92x4.c b/src/emu/machine/smc92x4.c index a6581dd6baf..e6091ef14f9 100644 --- a/src/emu/machine/smc92x4.c +++ b/src/emu/machine/smc92x4.c @@ -1991,7 +1991,7 @@ void smc92x4_device::connect_floppy_drive(legacy_floppy_image_device *drive) else LOG("smc92x4: Connect drive %s\n", drive->tag()); } } -void smc92x4_device::connect_hard_drive(mfm_harddisk_device *drive) +void smc92x4_device::connect_hard_drive(mfm_harddisk_legacy_device *drive) { m_harddisk = drive; if (VERBOSE>3) diff --git a/src/emu/machine/smc92x4.h b/src/emu/machine/smc92x4.h index 5140929b151..defe39100ee 100644 --- a/src/emu/machine/smc92x4.h +++ b/src/emu/machine/smc92x4.h @@ -99,7 +99,7 @@ public: // Used to reconfigure the drive connections. Drive selection is done // using the select lines and maybe also the user-programmable outputs. void connect_floppy_drive(legacy_floppy_image_device *drive); - void connect_hard_drive(mfm_harddisk_device *drive); + void connect_hard_drive(mfm_harddisk_legacy_device *drive); void reset(); @@ -223,7 +223,7 @@ private: // We expect the embedding board to replace the drive according to the // select lines. legacy_floppy_image_device *m_drive; - mfm_harddisk_device *m_harddisk; + mfm_harddisk_legacy_device *m_harddisk; }; #endif diff --git a/src/emu/machine/ti99_hd.c b/src/emu/machine/ti99_hd.c index 77d37ca07de..96627f0978d 100644 --- a/src/emu/machine/ti99_hd.c +++ b/src/emu/machine/ti99_hd.c @@ -2,23 +2,21 @@ // copyright-holders:Michael Zapf /************************************************************************* - Hard disk support - - This device wraps the plain image device as that device does not allow - for internal states (like head position) - The plain device is a subdevice ("drive") of this device, so we - get names like "mfmhd0:drive" + Hard disk emulation Michael Zapf April 2010 February 2012: Rewritten as class + April 2015: Rewritten with deeper emulation detail + + References: + [1] ST225 OEM Manual, Seagate **************************************************************************/ #include "emu.h" #include "formats/imageutl.h" #include "harddisk.h" -#include "smc92x4.h" #include "ti99_hd.h" @@ -33,8 +31,216 @@ #define GAP4 340 #define SYNC 13 -mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) -: device_t(mconfig, TI99_MFMHD, "MFM Harddisk", tag, owner, clock, "mfm_harddisk", __FILE__) +enum +{ + INDEX_TM = 0, + SPINUP_TM, + SEEK_TM +}; + +enum +{ + STEP_COLLECT = 0, + STEP_MOVING, + STEP_SETTLE +}; + +mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : harddisk_image_device(mconfig, type, name, tag, owner, clock, shortname, source), + device_slot_card_interface(mconfig, *this) +{ +} + +void mfm_harddisk_device::device_start() +{ + m_index_timer = timer_alloc(INDEX_TM); + m_spinup_timer = timer_alloc(SPINUP_TM); + m_seek_timer = timer_alloc(SEEK_TM); + + // MFM drives have a revolution rate of 3600 rpm (i.e. 60/sec) + m_index_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60)); + + // Spinup may take up to 24 seconds + m_spinup_timer->adjust(attotime::from_msec(8000)); + + m_current_cylinder = 10; // for test purpose +} + +void mfm_harddisk_device::device_reset() +{ + m_autotruncation = false; + m_ready = false; + m_seek_complete = true; + m_seek_inward = false; + m_track_delta = 0; + m_step_line = CLEAR_LINE; +} + +void mfm_harddisk_device::setup_index_pulse_cb(index_pulse_cb cb) +{ + m_index_pulse_cb = cb; +} + +void mfm_harddisk_device::setup_seek_complete_cb(seek_complete_cb cb) +{ + m_seek_complete_cb = cb; +} + +void mfm_harddisk_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + switch (id) + { + case INDEX_TM: + /* Simple index hole handling. We assume that there is only a short pulse. */ + if (!m_index_pulse_cb.isnull()) + { + m_index_pulse_cb(this, ASSERT_LINE); + m_index_pulse_cb(this, CLEAR_LINE); + } + break; + case SPINUP_TM: + m_ready = true; + logerror("%s: Spinup complete, drive is ready\n", tag()); + break; + case SEEK_TM: + switch (m_step_phase) + { + case STEP_COLLECT: + // Collect timer has expired; start moving head + head_move(); + break; + case STEP_MOVING: + // Head has reached final position + // Check whether we have a new delta + if (m_track_delta == 0) + { + // Start the settle timer + m_step_phase = STEP_SETTLE; + m_seek_timer->adjust(attotime::from_usec(16800)); + logerror("%s: Arrived at target track %d, settling ...\n", tag(), m_current_cylinder); + } + break; + case STEP_SETTLE: + // Do we have new step pulses? + if (m_track_delta != 0) head_move(); + else + { + // Seek completed + logerror("%s: Settling done at cylinder %d, seek complete\n", tag(), m_current_cylinder); + m_seek_complete = true; + m_seek_complete_cb(this, ASSERT_LINE); + m_step_phase = STEP_COLLECT; + } + break; + } + } +} + +void mfm_harddisk_device::head_move() +{ + int steps = m_track_delta; + if (steps < 0) steps = -steps; + logerror("%s: Moving head by %d step(s) %s\n", tag(), steps, (m_track_delta<0)? "outward" : "inward"); + + int disttime = steps*200; + m_step_phase = STEP_MOVING; + m_seek_timer->adjust(attotime::from_usec(disttime)); + // We pretend that we already arrived + // TODO: Check auto truncation? + m_current_cylinder += m_track_delta; + if (m_current_cylinder < 0) m_current_cylinder = 0; + if (m_current_cylinder > 670) m_current_cylinder = 670; + m_track_delta = 0; +} + +void mfm_harddisk_device::direction_in_w(line_state line) +{ + m_seek_inward = (line == ASSERT_LINE); + logerror("%s: Setting seek direction %s\n", tag(), m_seek_inward? "inward" : "outward"); +} + +/* + According to the specs [1]: + + "4.3.1 BUFFERED SEEK: To minimize access time, pulses may be issued at an + accelerated rate and buffered in a counter. Initiation of a seek starts + immediately after the first pulse is received. Head motion occurs during + pulse accumulation, and the seek is completed following receipt of all pulses." + + "8.1.3 SEEKING: Upon receiving a Step pulse, the MPU (microprocessor unit) + pauses for 250 usec to allow for additional pulses before executing the seek + operation. Every incoming pulse resets the 250 usec timer. The seek will + not begin until the last pulse is received." + + WTF? Oh come on, Seagate, be consistent at least in a single document. + + ================================ + + Step behaviour: + During all waiting times, further step_w invocations increase the counter + + - Leading edge increments the counter c and sets the timer to 250us (mode=collect) + - When the timer expires (mode=collect): + (1)- Calculate the stepping time: time = c*200us; save the counter + - Start the timer (mode=move) + - When the timer expires (mode=move) + - Add the track delta to the current track position + - Subtract the delta from the current counter + - When the counter is not zero (pulses arrived in the meantime), go to (1) + - When the counter is zero, set the timer to 16.8 ms (mode=settle) + - When the timer expires (mode=settle) + - When the counter is not zero, go to (1) + - When the counter is zero, signal seek_complete; done + + Step timing: + per track = 20 ms max, full seek: 150 ms max (615 tracks); both including settling time + We assume t(1) = 17; t(615)=140 + t(i) = s+d*i + s=(615*t(1)-t(615))/614 + d=t(1)-s + s=16800 us, d=200 us +*/ + +void mfm_harddisk_device::step_w(line_state line) +{ + // Leading edge + if (line == ASSERT_LINE && m_step_line == CLEAR_LINE) + { + if (m_seek_complete) + { + m_step_phase = STEP_COLLECT; + m_seek_complete = false; + m_seek_complete_cb(this, CLEAR_LINE); + } + + // Counter will be adjusted according to the direction (+-1) + m_track_delta += (m_seek_inward)? +1 : -1; + logerror("%s: Got seek pulse; track delta %d\n", tag(), m_track_delta); + if (m_track_delta < -670 || m_track_delta > 670) + { + logerror("%s: Excessive step pulses - doing auto-truncation\n", tag()); + m_autotruncation = true; + } + m_seek_timer->adjust(attotime::from_usec(250)); + } + m_step_line = line; +} + +mfm_hd_generic_device::mfm_hd_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +: mfm_harddisk_device(mconfig, MFM_HD_GENERIC, "Generic MFM hard disk (byte level)", tag, owner, clock, "mfm_harddisk", __FILE__) +{ +} + +const device_type MFM_HD_GENERIC = &device_creator<mfm_hd_generic_device>; + +// =========================================================================== +// Legacy implementation +// =========================================================================== + +#include "smc92x4.h" + +mfm_harddisk_legacy_device::mfm_harddisk_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +: device_t(mconfig, TI99_MFMHD_LEG, "MFM Harddisk LEGACY", tag, owner, clock, "mfm_harddisk_leg", __FILE__) { } @@ -43,7 +249,7 @@ mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, const ch define idents beyond cylinder 1023, but formatting programs seem to continue with 0xfd for cylinders between 1024 and 2047. */ -UINT8 mfm_harddisk_device::cylinder_to_ident(int cylinder) +UINT8 mfm_harddisk_legacy_device::cylinder_to_ident(int cylinder) { if (cylinder < 256) return 0xfe; if (cylinder < 512) return 0xff; @@ -55,7 +261,7 @@ UINT8 mfm_harddisk_device::cylinder_to_ident(int cylinder) /* Returns the linear sector number, given the CHS data. */ -bool mfm_harddisk_device::harddisk_chs_to_lba(hard_disk_file *hdfile, int cylinder, int head, int sector, UINT32 *lba) +bool mfm_harddisk_legacy_device::harddisk_chs_to_lba(hard_disk_file *hdfile, int cylinder, int head, int sector, UINT32 *lba) { const hard_disk_info *info; @@ -77,7 +283,7 @@ bool mfm_harddisk_device::harddisk_chs_to_lba(hard_disk_file *hdfile, int cylind } /* Accessor functions */ -void mfm_harddisk_device::read_sector(int cylinder, int head, int sector, UINT8 *buf) +void mfm_harddisk_legacy_device::read_sector(int cylinder, int head, int sector, UINT8 *buf) { UINT32 lba; if (VERBOSE>5) LOG("ti99_hd: read_sector(%d, %d, %d)\n", cylinder, head, sector); @@ -109,7 +315,7 @@ void mfm_harddisk_device::read_sector(int cylinder, int head, int sector, UINT8 m_status |= MFMHD_READY; } -void mfm_harddisk_device::write_sector(int cylinder, int head, int sector, UINT8 *buf) +void mfm_harddisk_legacy_device::write_sector(int cylinder, int head, int sector, UINT8 *buf) { UINT32 lba; if (VERBOSE>5) LOG("ti99_hd: write_sector(%d, %d, %d)\n", cylinder, head, sector); @@ -142,7 +348,7 @@ void mfm_harddisk_device::write_sector(int cylinder, int head, int sector, UINT8 Searches a block containing number * byte, starting at the given position. Returns the position of the first byte of the block. */ -int mfm_harddisk_device::find_block(const UINT8 *buffer, int start, int stop, UINT8 byte, size_t number) +int mfm_harddisk_legacy_device::find_block(const UINT8 *buffer, int start, int stop, UINT8 byte, size_t number) { int i = start; size_t current = number; @@ -165,7 +371,7 @@ int mfm_harddisk_device::find_block(const UINT8 *buffer, int start, int stop, UI return TI99HD_BLOCKNOTFOUND; } -int mfm_harddisk_device::get_track_length() +int mfm_harddisk_legacy_device::get_track_length() { int count; int size; @@ -187,7 +393,7 @@ int mfm_harddisk_device::get_track_length() WARNING: This function is untested! We need to create a suitable application program for the TI which makes use of it. */ -void mfm_harddisk_device::read_track(int head, UINT8 *trackdata) +void mfm_harddisk_legacy_device::read_track(int head, UINT8 *trackdata) { /* We assume an interleave of 3 for 32 sectors. */ int step = 3; @@ -291,7 +497,7 @@ void mfm_harddisk_device::read_track(int head, UINT8 *trackdata) Writes a track to the image. We need to isolate the sector contents. This is basically done in the same way as in the SDF format in ti99_dsk. */ -void mfm_harddisk_device::write_track(int head, UINT8 *track_image, int data_count) +void mfm_harddisk_legacy_device::write_track(int head, UINT8 *track_image, int data_count) { int current_pos = 0; bool found; @@ -401,7 +607,7 @@ void mfm_harddisk_device::write_track(int head, UINT8 *track_image, int data_cou } } -UINT8 mfm_harddisk_device::get_status() +UINT8 mfm_harddisk_legacy_device::get_status() { UINT8 status = 0; hard_disk_file *file = m_drive->get_hard_disk_file(); @@ -422,7 +628,7 @@ UINT8 mfm_harddisk_device::get_status() return status; } -void mfm_harddisk_device::seek(int direction) +void mfm_harddisk_legacy_device::seek(int direction) { const hard_disk_info *info; hard_disk_file *file = m_drive->get_hard_disk_file(); @@ -449,7 +655,7 @@ void mfm_harddisk_device::seek(int direction) m_seeking = false; } -void mfm_harddisk_device::get_next_id(int head, chrn_id_hd *id) +void mfm_harddisk_legacy_device::get_next_id(int head, chrn_id_hd *id) { const hard_disk_info *info; hard_disk_file *file; @@ -479,13 +685,13 @@ void mfm_harddisk_device::get_next_id(int head, chrn_id_hd *id) id->flags = 0; } -void mfm_harddisk_device::device_start() +void mfm_harddisk_legacy_device::device_start() { m_current_cylinder = 0; m_current_head = 0; } -void mfm_harddisk_device::device_reset() +void mfm_harddisk_legacy_device::device_reset() { m_drive = static_cast<harddisk_image_device *>(subdevice("drive")); m_seeking = false; @@ -497,9 +703,9 @@ MACHINE_CONFIG_FRAGMENT( mfmhd ) MCFG_HARDDISK_ADD("drive") MACHINE_CONFIG_END -machine_config_constructor mfm_harddisk_device::device_mconfig_additions() const +machine_config_constructor mfm_harddisk_legacy_device::device_mconfig_additions() const { return MACHINE_CONFIG_NAME( mfmhd ); } -const device_type TI99_MFMHD = &device_creator<mfm_harddisk_device>; +const device_type TI99_MFMHD_LEG = &device_creator<mfm_harddisk_legacy_device>; diff --git a/src/emu/machine/ti99_hd.h b/src/emu/machine/ti99_hd.h index e3175e4723f..bdeb80c8118 100644 --- a/src/emu/machine/ti99_hd.h +++ b/src/emu/machine/ti99_hd.h @@ -17,11 +17,65 @@ #include "emu.h" #include "imagedev/harddriv.h" +class mfm_harddisk_device : public harddisk_image_device, + public device_slot_card_interface +{ +public: + mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + + typedef delegate<void (mfm_harddisk_device*, int)> index_pulse_cb; + typedef delegate<void (mfm_harddisk_device*, int)> seek_complete_cb; + + void setup_index_pulse_cb(index_pulse_cb cb); + void setup_seek_complete_cb(seek_complete_cb cb); + + // Active low lines. We're using ASSERT=0 / CLEAR=1 + line_state ready_r() { return m_ready? ASSERT_LINE : CLEAR_LINE; } + line_state seek_complete_r() { return m_seek_complete? ASSERT_LINE : CLEAR_LINE; } ; + line_state trk00_r() { return m_current_cylinder==0? ASSERT_LINE : CLEAR_LINE; } + + // Step + void step_w(line_state line); + void direction_in_w(line_state line); + +protected: + void device_start(); + void device_reset(); + emu_timer *m_index_timer, *m_spinup_timer, *m_seek_timer; + index_pulse_cb m_index_pulse_cb; + seek_complete_cb m_seek_complete_cb; + void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + +private: + bool m_ready; + int m_current_cylinder; + int m_track_delta; + int m_step_phase; + bool m_seek_complete; + bool m_seek_inward; + //bool m_seeking; + bool m_autotruncation; + line_state m_step_line; // keep the last state + + void head_move(); +}; + +class mfm_hd_generic_device : public mfm_harddisk_device +{ +public: + mfm_hd_generic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); +}; + +extern const device_type MFM_HD_GENERIC; + +// =========================================================================== +// Legacy implementation +// =========================================================================== #define MFMHD_0 "mfmhd0" #define MFMHD_1 "mfmhd1" #define MFMHD_2 "mfmhd2" -extern const device_type TI99_MFMHD; +extern const device_type TI99_MFMHD_LEG; /* Needed to adapt to higher cylinder numbers. Floppies do not have such @@ -37,10 +91,10 @@ struct chrn_id_hd unsigned long flags; }; -class mfm_harddisk_device : public device_t +class mfm_harddisk_legacy_device : public device_t { public: - mfm_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + mfm_harddisk_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); void read_sector(int cylinder, int head, int sector, UINT8 *buf); void write_sector(int cylinder, int head, int sector, UINT8 *buf); @@ -52,9 +106,9 @@ public: int get_track_length(); protected: - virtual void device_start(); - virtual void device_reset(); - virtual machine_config_constructor device_mconfig_additions() const; + void device_start(); + void device_reset(); + machine_config_constructor device_mconfig_additions() const; private: int find_block(const UINT8 *buffer, int start, int stop, UINT8 byte, size_t number); @@ -70,10 +124,10 @@ private: harddisk_image_device *m_drive; }; -class ide_harddisk_device : public device_t +class ide_harddisk_legacy_device : public device_t { public: - ide_harddisk_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ide_harddisk_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); protected: virtual void device_start() { }; virtual void device_reset() { }; @@ -81,8 +135,8 @@ protected: }; #define MCFG_MFMHD_3_DRIVES_ADD() \ - MCFG_DEVICE_ADD(MFMHD_0, TI99_MFMHD, 0) \ - MCFG_DEVICE_ADD(MFMHD_1, TI99_MFMHD, 0) \ - MCFG_DEVICE_ADD(MFMHD_2, TI99_MFMHD, 0) + MCFG_DEVICE_ADD(MFMHD_0, TI99_MFMHD_LEG, 0) \ + MCFG_DEVICE_ADD(MFMHD_1, TI99_MFMHD_LEG, 0) \ + MCFG_DEVICE_ADD(MFMHD_2, TI99_MFMHD_LEG, 0) #endif diff --git a/src/emu/machine/upd765.c b/src/emu/machine/upd765.c index 214e10f8614..2e19c8a2cb1 100644 --- a/src/emu/machine/upd765.c +++ b/src/emu/machine/upd765.c @@ -379,7 +379,7 @@ void upd765_family_device::set_rate(int rate) READ8_MEMBER(upd765_family_device::fifo_r) { - UINT8 r = 0; + UINT8 r = 0xff; switch(main_phase) { case PHASE_EXEC: if(internal_drq) @@ -2181,7 +2181,7 @@ bool upd765_family_device::get_irq() const return cur_irq; } -astring upd765_family_device::tts(attotime t) +std::string upd765_family_device::tts(attotime t) { char buf[256]; const char *sign = ""; @@ -2194,7 +2194,7 @@ astring upd765_family_device::tts(attotime t) return buf; } -astring upd765_family_device::ttsn() +std::string upd765_family_device::ttsn() { return tts(machine().time()); } diff --git a/src/emu/machine/upd765.h b/src/emu/machine/upd765.h index 27ed83a7122..d692686be65 100644 --- a/src/emu/machine/upd765.h +++ b/src/emu/machine/upd765.h @@ -329,8 +329,8 @@ protected: emu_timer *poll_timer; - static astring tts(attotime t); - astring ttsn(); + static std::string tts(attotime t); + std::string ttsn(); enum { C_CONFIGURE, diff --git a/src/emu/machine/vrc4373.h b/src/emu/machine/vrc4373.h index 51c774d4f9a..b620e9f6d20 100644 --- a/src/emu/machine/vrc4373.h +++ b/src/emu/machine/vrc4373.h @@ -45,15 +45,15 @@ #define NREG_PCIEN (0x074/4) #define NREG_PMIR (0x078/4) -#define DMA_BUSY 0x80000000 -#define DMA_INT_EN 0x40000000 -#define DMA_RW 0x20000000 -#define DMA_GO 0x10000000 -#define DMA_SUS 0x08000000 -#define DMA_INC 0x04000000 -#define DMA_MIO 0x02000000 -#define DMA_RST 0x01000000 -#define DMA_BLK_SIZE 0x000fffff +#define DMA_BUSY 0x80000000 +#define DMA_INT_EN 0x40000000 +#define DMA_RW 0x20000000 +#define DMA_GO 0x10000000 +#define DMA_SUS 0x08000000 +#define DMA_INC 0x04000000 +#define DMA_MIO 0x02000000 +#define DMA_RST 0x01000000 +#define DMA_BLK_SIZE 0x000fffff class vrc4373_device : public pci_host_device { diff --git a/src/emu/machine/wd_fdc.c b/src/emu/machine/wd_fdc.c index 6205f92f973..79e766da362 100644 --- a/src/emu/machine/wd_fdc.c +++ b/src/emu/machine/wd_fdc.c @@ -188,7 +188,7 @@ void wd_fdc_t::dden_w(bool _dden) } } -astring wd_fdc_t::tts(const attotime &t) +std::string wd_fdc_t::tts(const attotime &t) { char buf[256]; int nsec = t.attoseconds / ATTOSECONDS_PER_NANOSECOND; @@ -196,7 +196,7 @@ astring wd_fdc_t::tts(const attotime &t) return buf; } -astring wd_fdc_t::ttsn() +std::string wd_fdc_t::ttsn() { return tts(machine().time()); } diff --git a/src/emu/machine/wd_fdc.h b/src/emu/machine/wd_fdc.h index 36cf9f63edf..39467ffd2c4 100644 --- a/src/emu/machine/wd_fdc.h +++ b/src/emu/machine/wd_fdc.h @@ -368,10 +368,10 @@ private: UINT8 format_last_byte; int format_last_byte_count; - astring format_description_string; + std::string format_description_string; - static astring tts(const attotime &t); - astring ttsn(); + static std::string tts(const attotime &t); + std::string ttsn(); void delay_cycles(emu_timer *tm, int cycles); diff --git a/src/emu/machine/wozfdc.c b/src/emu/machine/wozfdc.c index f43620ff427..7486d17816e 100644 --- a/src/emu/machine/wozfdc.c +++ b/src/emu/machine/wozfdc.c @@ -63,8 +63,7 @@ appleiii_fdc::appleiii_fdc(const machine_config &mconfig, const char *tag, devic void wozfdc_device::device_start() { - astring tempstring; - m_rom_p6 = machine().root_device().memregion(this->subtag(tempstring, DISKII_P6_REGION).c_str())->base(); + m_rom_p6 = machine().root_device().memregion(this->subtag(DISKII_P6_REGION).c_str())->base(); timer = timer_alloc(0); delay_timer = timer_alloc(1); diff --git a/src/emu/machine/z80pio.c b/src/emu/machine/z80pio.c index b53b3fe6158..ea5da25e221 100644 --- a/src/emu/machine/z80pio.c +++ b/src/emu/machine/z80pio.c @@ -11,9 +11,9 @@ /* - TODO: + TODO: - - if port A is bidirectional, port B does not issue interrupts in bit mode + - if port A is bidirectional, port B does not issue interrupts in bit mode */ @@ -255,7 +255,7 @@ void z80pio_device::check_interrupts() for (int index = PORT_A; index < PORT_COUNT; index++) { if (LOG) logerror("Z80PIO '%s' Port %c IE %s IP %s IUS %s\n", tag(), 'A' + index, m_port[index].m_ie ? "1":"0", m_port[index].m_ip ? "1":"0", m_port[index].m_ius ? "1":"0"); - + if (!ius && m_port[index].m_ie && m_port[index].m_ip) { state = ASSERT_LINE; diff --git a/src/emu/mame.c b/src/emu/mame.c index 9632ab04a79..1af6ccff012 100644 --- a/src/emu/mame.c +++ b/src/emu/mame.c @@ -199,7 +199,7 @@ int machine_manager::execute() if (m_options.read_config()) { m_options.revert(OPTION_PRIORITY_INI); - astring errors; + std::string errors; m_options.parse_standard_inis(errors); } @@ -225,8 +225,8 @@ int machine_manager::execute() // check the state of the machine if (m_new_driver_pending) { - astring old_system_name(m_options.system_name()); - bool new_system = (old_system_name != m_new_driver_pending->name); + std::string old_system_name(m_options.system_name()); + bool new_system = (old_system_name.compare(m_new_driver_pending->name)!=0); // first: if we scheduled a new system, remove device options of the old system // notice that, if we relaunch the same system, there is no effect on the emulation if (new_system) @@ -236,7 +236,7 @@ int machine_manager::execute() // third: if we scheduled a new system, take also care of ramsize options if (new_system) { - astring error_string; + std::string error_string; m_options.set_value(OPTION_RAMSIZE, "", OPTION_PRIORITY_CMDLINE, error_string); } firstrun = true; @@ -276,16 +276,16 @@ void CLIB_DECL popmessage(const char *format, ...) // otherwise, generate the buffer and call the UI to display the message else { - astring temp; + std::string temp; va_list arg; // dump to the buffer va_start(arg, format); - temp.vprintf(format, arg); + strvprintf(temp,format, arg); va_end(arg); // pop it in the UI - machine_manager::instance()->machine()->ui().popup_time(temp.len() / 40 + 2, "%s", temp.c_str()); + machine_manager::instance()->machine()->ui().popup_time(temp.length() / 40 + 2, "%s", temp.c_str()); /* // also write to error.log diff --git a/src/emu/mconfig.c b/src/emu/mconfig.c index 9a87c269328..55dd19148f3 100644 --- a/src/emu/mconfig.c +++ b/src/emu/mconfig.c @@ -38,7 +38,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options) for (device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next()) { device_t &owner = slot->device(); - astring temp; + std::string temp; const char *selval = options.main_value(temp, owner.tag()+1); bool isdefault = (options.priority(owner.tag()+1)==OPTION_PRIORITY_DEFAULT); if (!is_selected_driver || !options.exists(owner.tag()+1)) @@ -122,10 +122,10 @@ device_t *machine_config::device_add(device_t *owner, const char *tag, device_ty { const char *next = strchr(tag, ':'); assert(next != tag); - astring part(tag, next-tag); + std::string part(tag, next-tag); device_t *curdevice; for (curdevice = owner->m_subdevice_list.first(); curdevice != NULL; curdevice = curdevice->next()) - if (part == curdevice->m_basetag) + if (part.compare(curdevice->m_basetag)==0) break; if (!curdevice) throw emu_fatalerror("Could not find %s when looking up path for device %s\n", diff --git a/src/emu/mconfig.h b/src/emu/mconfig.h index 76e439625ea..053890f73e6 100644 --- a/src/emu/mconfig.h +++ b/src/emu/mconfig.h @@ -59,7 +59,7 @@ public: // public state attotime m_minimum_quantum; // minimum scheduling quantum - astring m_perfect_cpu_quantum; // tag of CPU to use for "perfect" scheduling + std::string m_perfect_cpu_quantum; // tag of CPU to use for "perfect" scheduling INT32 m_watchdog_vblank_count; // number of VBLANKs until the watchdog kills us attotime m_watchdog_time; // length of time until the watchdog kills us @@ -132,7 +132,7 @@ ATTR_COLD device_t *MACHINE_CONFIG_NAME(_name)(machine_config &config, device_t #define MCFG_QUANTUM_TIME(_time) \ config.m_minimum_quantum = _time; #define MCFG_QUANTUM_PERFECT_CPU(_cputag) \ - owner->subtag(config.m_perfect_cpu_quantum, _cputag); + config.m_perfect_cpu_quantum = owner->subtag(_cputag); // watchdog configuration diff --git a/src/emu/memory.c b/src/emu/memory.c index c802d428e9a..fe38d0595b6 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -1835,8 +1835,8 @@ void address_space::prepare_map() if (entry->m_share != NULL) { // if we can't find it, add it to our map - astring fulltag; - if (manager().m_sharelist.find(entry->m_devbase.subtag(fulltag, entry->m_share).c_str()) == NULL) + std::string fulltag = entry->m_devbase.subtag(entry->m_share); + if (manager().m_sharelist.find(fulltag.c_str()) == NULL) { VPRINTF(("Creating share '%s' of length 0x%X\n", fulltag.c_str(), entry->m_byteend + 1 - entry->m_bytestart)); memory_share *share = global_alloc(memory_share(m_map->m_databits, entry->m_byteend + 1 - entry->m_bytestart, endianness())); @@ -1859,8 +1859,7 @@ void address_space::prepare_map() if (entry->m_region != NULL && entry->m_share == NULL) { // determine full tag - astring fulltag; - entry->m_devbase.subtag(fulltag, entry->m_region); + std::string fulltag = entry->m_devbase.subtag(entry->m_region); // find the region memory_region *region = machine().root_device().memregion(fulltag.c_str()); @@ -1876,8 +1875,7 @@ void address_space::prepare_map() if (entry->m_region != NULL) { // determine full tag - astring fulltag; - entry->m_devbase.subtag(fulltag, entry->m_region); + std::string fulltag = entry->m_devbase.subtag(entry->m_region); // set the memory address entry->m_memory = machine().root_device().memregion(fulltag.c_str())->base() + entry->m_rgnoffs; @@ -1932,7 +1930,7 @@ void address_space::populate_from_map(address_map *map) void address_space::populate_map_entry(const address_map_entry &entry, read_or_write readorwrite) { const map_handler_data &data = (readorwrite == ROW_READ) ? entry.m_read : entry.m_write; - astring fulltag; + std::string fulltag; // based on the handler type, alter the bits, name, funcptr, and object switch (data.m_type) @@ -2153,8 +2151,8 @@ address_map_entry *address_space::block_assign_intersecting(offs_t bytestart, of // if we haven't assigned this block yet, see if we have a mapped shared pointer for it if (entry->m_memory == NULL && entry->m_share != NULL) { - astring fulltag; - memory_share *share = manager().m_sharelist.find(entry->m_devbase.subtag(fulltag, entry->m_share).c_str()); + std::string fulltag = entry->m_devbase.subtag(entry->m_share); + memory_share *share = manager().m_sharelist.find(fulltag.c_str()); if (share != NULL && share->ptr() != NULL) { entry->m_memory = share->ptr(); @@ -2176,8 +2174,8 @@ address_map_entry *address_space::block_assign_intersecting(offs_t bytestart, of // if we're the first match on a shared pointer, assign it now if (entry->m_memory != NULL && entry->m_share != NULL) { - astring fulltag; - memory_share *share = manager().m_sharelist.find(entry->m_devbase.subtag(fulltag, entry->m_share).c_str()); + std::string fulltag = entry->m_devbase.subtag(entry->m_share); + memory_share *share = manager().m_sharelist.find(fulltag.c_str()); if (share != NULL && share->ptr() == NULL) { share->set_ptr(entry->m_memory); @@ -2292,8 +2290,7 @@ void address_space::install_readwrite_port(offs_t addrstart, offs_t addrend, off if (rtag != NULL) { // find the port - astring fulltag; - ioport_port *port = machine().root_device().ioport(device().siblingtag(fulltag, rtag).c_str()); + ioport_port *port = machine().root_device().ioport(device().siblingtag(rtag).c_str()); if (port == NULL) throw emu_fatalerror("Attempted to map non-existent port '%s' for read in space %s of device '%s'\n", rtag, m_name, m_device.tag()); @@ -2304,8 +2301,7 @@ void address_space::install_readwrite_port(offs_t addrstart, offs_t addrend, off if (wtag != NULL) { // find the port - astring fulltag; - ioport_port *port = machine().root_device().ioport(device().siblingtag(fulltag, wtag).c_str()); + ioport_port *port = machine().root_device().ioport(device().siblingtag(wtag).c_str()); if (port == NULL) fatalerror("Attempted to map non-existent port '%s' for write in space %s of device '%s'\n", wtag, m_name, m_device.tag()); @@ -2333,8 +2329,7 @@ void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_ // map the read bank if (rtag != NULL) { - astring fulltag; - device().siblingtag(fulltag, rtag); + std::string fulltag = device().siblingtag(rtag); memory_bank &bank = bank_find_or_allocate(fulltag.c_str(), addrstart, addrend, addrmask, addrmirror, ROW_READ); read().map_range(addrstart, addrend, addrmask, addrmirror, bank.index()); } @@ -2342,8 +2337,7 @@ void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_ // map the write bank if (wtag != NULL) { - astring fulltag; - device().siblingtag(fulltag, wtag); + std::string fulltag = device().siblingtag(wtag); memory_bank &bank = bank_find_or_allocate(fulltag.c_str(), addrstart, addrend, addrmask, addrmirror, ROW_WRITE); write().map_range(addrstart, addrend, addrmask, addrmirror, bank.index()); } @@ -2612,8 +2606,8 @@ bool address_space::needs_backing_store(const address_map_entry *entry) // if we are sharing, and we don't have a pointer yet, create one if (entry->m_share != NULL) { - astring fulltag; - memory_share *share = manager().m_sharelist.find(entry->m_devbase.subtag(fulltag, entry->m_share).c_str()); + std::string fulltag = entry->m_devbase.subtag(entry->m_share); + memory_share *share = manager().m_sharelist.find(fulltag.c_str()); if (share != NULL && share->ptr() == NULL) return true; } @@ -2679,9 +2673,11 @@ memory_bank &address_space::bank_find_or_allocate(const char *tag, offs_t addrst // if no tag, create a unique one membank = global_alloc(memory_bank(*this, banknum, bytestart, byteend, tag)); - astring temptag; - if (tag == NULL) - tag = temptag.format("anon_%p", membank).c_str(); + std::string temptag; + if (tag == NULL) { + strprintf(temptag, "anon_%p", membank); + tag = temptag.c_str(); + } manager().m_banklist.append(tag, *membank); } @@ -3877,8 +3873,8 @@ memory_block::memory_block(address_space &space, offs_t bytestart, offs_t byteen if (region == NULL) { int bytes_per_element = space.data_width() / 8; - astring name; - name.printf("%08x-%08x", bytestart, byteend); + std::string name; + strprintf(name,"%08x-%08x", bytestart, byteend); space.machine().save().save_memory(NULL, "memory", space.device().tag(), space.spacenum(), name.c_str(), m_data, bytes_per_element, (UINT32)(byteend + 1 - bytestart) / bytes_per_element); } } @@ -3916,13 +3912,13 @@ memory_bank::memory_bank(address_space &space, int index, offs_t bytestart, offs // generate an internal tag if we don't have one if (tag == NULL) { - m_tag.printf("~%d~", index); - m_name.printf("Internal bank #%d", index); + strprintf(m_tag,"~%d~", index); + strprintf(m_name,"Internal bank #%d", index); } else { - m_tag.cpy(tag); - m_name.printf("Bank '%s'", tag); + m_tag.assign(tag); + strprintf(m_name,"Bank '%s'", tag); } if (!m_anonymous && space.machine().save().registration_allowed()) diff --git a/src/emu/memory.h b/src/emu/memory.h index fff49dd6d0c..7503301453e 100644 --- a/src/emu/memory.h +++ b/src/emu/memory.h @@ -626,9 +626,9 @@ private: offs_t m_bytestart; // byte-adjusted start offset offs_t m_byteend; // byte-adjusted end offset int m_curentry; // current entry - std::vector<bank_entry> m_entry; // array of entries (dynamically allocated) - astring m_name; // friendly name for this bank - astring m_tag; // tag for this bank + std::vector<bank_entry> m_entry; // array of entries (dynamically allocated) + std::string m_name; // friendly name for this bank + std::string m_tag; // tag for this bank simple_list<bank_reference> m_reflist; // linked list of address spaces referencing this bank }; @@ -712,7 +712,7 @@ private: // internal data running_machine & m_machine; memory_region * m_next; - astring m_name; + std::string m_name; dynamic_buffer m_buffer; endianness_t m_endianness; UINT8 m_bitwidth; diff --git a/src/emu/netlist/analog/nld_solver.c b/src/emu/netlist/analog/nld_solver.c index 22a10ea1a3d..e254f6587a1 100644 --- a/src/emu/netlist/analog/nld_solver.c +++ b/src/emu/netlist/analog/nld_solver.c @@ -400,25 +400,28 @@ NETLIB_UPDATE(solver) { #pragma omp for nowait for (int i = 0; i < t_cnt; i++) - { - this_resched[i] = m_mat_solvers[i]->solve(); - } + if (m_mat_solvers[i]->is_timestep()) + { + // Ignore return value + ATTR_UNUSED const nl_double ts = m_mat_solvers[i]->solve(); + } } } else for (int i = 0; i < t_cnt; i++) - { - if (do_full || (m_mat_solvers[i]->is_timestep())) - this_resched[i] = m_mat_solvers[i]->solve(); - } -#else - for (int i = 0; i < t_cnt; i++) - { - if (m_mat_solvers[i]->is_timestep()) + if (m_mat_solvers[i]->is_timestep()) { // Ignore return value ATTR_UNUSED const nl_double ts = m_mat_solvers[i]->solve(); } +#else + for (int i = 0; i < t_cnt; i++) + { + if (m_mat_solvers[i]->is_timestep()) + { + // Ignore return value + ATTR_UNUSED const nl_double ts = m_mat_solvers[i]->solve(); + } } #endif diff --git a/src/emu/netlist/analog/nld_switches.c b/src/emu/netlist/analog/nld_switches.c index 8e3a6d490fe..45d45f6ad83 100644 --- a/src/emu/netlist/analog/nld_switches.c +++ b/src/emu/netlist/analog/nld_switches.c @@ -9,6 +9,51 @@ #define R_OFF (1.0 / netlist().gmin()) #define R_ON 0.01 +// ---------------------------------------------------------------------------------------- +// SWITCH +// ---------------------------------------------------------------------------------------- + +NETLIB_START(switch1) +{ + register_sub(m_R, "R"); + + register_param("POS", m_POS, 0); + + register_subalias("1", m_R.m_P); + register_subalias("2", m_R.m_N); +} + +NETLIB_RESET(switch1) +{ + m_R.do_reset(); + + m_R.set_R(R_OFF); +} + +NETLIB_UPDATE(switch1) +{ + if (m_POS.Value() == 0) + { + m_R.set_R(R_OFF); + } + else + { + m_R.set_R(R_ON); + } + + m_R.update_dev(); +} + +NETLIB_UPDATE_PARAM(switch1) +{ + update(); +} + +// ---------------------------------------------------------------------------------------- +// SWITCH2 +// ---------------------------------------------------------------------------------------- + + NETLIB_START(switch2) { register_sub(m_R[0], "R1"); diff --git a/src/emu/netlist/analog/nld_switches.h b/src/emu/netlist/analog/nld_switches.h index 5d8cf535379..0465eea44ce 100644 --- a/src/emu/netlist/analog/nld_switches.h +++ b/src/emu/netlist/analog/nld_switches.h @@ -17,6 +17,9 @@ // Macros // ---------------------------------------------------------------------------------------- +#define SWITCH(_name) \ + NET_REGISTER_DEV(switch1, _name) + #define SWITCH2(_name) \ NET_REGISTER_DEV(switch2, _name) @@ -24,6 +27,12 @@ // Devices ... // ---------------------------------------------------------------------------------------- +NETLIB_DEVICE_WITH_PARAMS(switch1, + NETLIB_NAME(R_base) m_R; + + netlist_param_int_t m_POS; +); + NETLIB_DEVICE_WITH_PARAMS(switch2, NETLIB_NAME(R_base) m_R[2]; @@ -32,5 +41,4 @@ NETLIB_DEVICE_WITH_PARAMS(switch2, - #endif /* NLD_SWITCHES_H_ */ diff --git a/src/emu/netlist/analog/nld_twoterm.c b/src/emu/netlist/analog/nld_twoterm.c index 04100759dc8..c11cea1a4aa 100644 --- a/src/emu/netlist/analog/nld_twoterm.c +++ b/src/emu/netlist/analog/nld_twoterm.c @@ -173,6 +173,51 @@ NETLIB_UPDATE_PARAM(POT) } // ---------------------------------------------------------------------------------------- +// nld_POT2 +// ---------------------------------------------------------------------------------------- + +NETLIB_START(POT2) +{ + register_sub(m_R1, "R1"); + + register_subalias("1", m_R1.m_P); + register_subalias("2", m_R1.m_N); + + register_param("R", m_R, 1.0 / netlist().gmin()); + register_param("DIAL", m_Dial, 0.5); + register_param("REVERSE", m_Reverse, 0); + register_param("DIALLOG", m_DialIsLog, 0); + +} + +NETLIB_RESET(POT2) +{ + m_R1.do_reset(); +} + +NETLIB_UPDATE(POT2) +{ + m_R1.update_dev(); +} + +NETLIB_UPDATE_PARAM(POT2) +{ + nl_double v = m_Dial.Value(); + + if (m_DialIsLog.Value()) + v = (exp(v) - 1.0) / (exp(1.0) - 1.0); + if (m_Reverse.Value()) + v = 1.0 - v; + + // FIXME: Only attached nets should be brought up to current time + //netlist().solver()->update_to_current_time(); // bring up current time + + m_R1.update_dev(); + + m_R1.set_R(MAX(m_R.Value() * v, netlist().gmin())); +} + +// ---------------------------------------------------------------------------------------- // nld_C // ---------------------------------------------------------------------------------------- diff --git a/src/emu/netlist/analog/nld_twoterm.h b/src/emu/netlist/analog/nld_twoterm.h index beeaf14e36f..991e646a1ad 100644 --- a/src/emu/netlist/analog/nld_twoterm.h +++ b/src/emu/netlist/analog/nld_twoterm.h @@ -47,6 +47,11 @@ NET_REGISTER_DEV(POT, _name) \ NETDEV_PARAMI(_name, R, _R) +/* Does not have pin 3 connected */ +#define POT2(_name, _R) \ + NET_REGISTER_DEV(POT2, _name) \ + NETDEV_PARAMI(_name, R, _R) + #define CAP(_name, _C) \ NET_REGISTER_DEV(C, _name) \ @@ -161,6 +166,15 @@ NETLIB_DEVICE_WITH_PARAMS(POT, netlist_param_logic_t m_DialIsLog; ); +NETLIB_DEVICE_WITH_PARAMS(POT2, + NETLIB_NAME(R_base) m_R1; + + netlist_param_double_t m_R; + netlist_param_double_t m_Dial; + netlist_param_logic_t m_DialIsLog; + netlist_param_logic_t m_Reverse; +); + // ---------------------------------------------------------------------------------------- // nld_C diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c index 8dc1d6760fb..6d2167f9bb6 100644 --- a/src/emu/netlist/devices/net_lib.c +++ b/src/emu/netlist/devices/net_lib.c @@ -72,6 +72,7 @@ void nl_initialize_factory(netlist_factory_t &factory) { ENTRY(R, RES, "R") ENTRY(POT, POT, "R") + ENTRY(POT2, POT2, "R") ENTRY(C, CAP, "C") ENTRY(D, DIODE, "model") ENTRY(VCVS, VCVS, "-") // FIXME: STD parameters ? @@ -88,9 +89,12 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(clock, CLOCK, "FREQ") ENTRY(mainclock, MAINCLOCK, "FREQ") ENTRY(solver, SOLVER, "FREQ") + ENTRY(res_sw, RES_SWITCH, "+IN,P1,P2") ENTRY(gnd, GND, "-") + ENTRY(switch1, SWITCH, "-") ENTRY(switch2, SWITCH2, "-") ENTRY(nicRSFF, NETDEV_RSFF, "+S,R") + ENTRY(nicDelay, NETDEV_DELAY, "-") ENTRY(4020, CD_4020, "+IP,RESET,VDD,VSS") //ENTRY(4066, CD_4066, "+A,B") ENTRY(7400, TTL_7400_NAND, "+A,B") @@ -116,11 +120,19 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(74107A, TTL_74107A, "+CLK,J,K,CLRQ") ENTRY(74123, TTL_74123, "-") ENTRY(74153, TTL_74153, "+C0,C1,C2,C3,A,B,G") + ENTRY(74175, TTL_74175, "-") + ENTRY(74192, TTL_74192, "-") + ENTRY(74193, TTL_74193, "-") + //ENTRY(74279, TTL_74279, "-") // only dip available ENTRY(SN74LS629, SN74LS629, "CAP") + ENTRY(82S16, TTL_82S16, "-") + ENTRY(9310, TTL_9310, "-") + ENTRY(9312, TTL_9312, "-") ENTRY(9316, TTL_9316, "+CLK,ENP,ENT,CLRQ,LOADQ,A,B,C,D") ENTRY(NE555, NE555, "-") ENTRY(r2r_dac, R2R_DAC, "+VIN,R,N") ENTRY(4020_dip, CD_4020_DIP, "-") + ENTRY(4016_dip, CD_4016_DIP, "-") ENTRY(4066_dip, CD_4066_DIP, "-") ENTRY(7400_dip, TTL_7400_DIP, "-") ENTRY(7402_dip, TTL_7402_DIP, "-") @@ -144,6 +156,14 @@ void nl_initialize_factory(netlist_factory_t &factory) ENTRY(74107_dip, TTL_74107_DIP, "-") ENTRY(74123_dip, TTL_74123_DIP, "-") ENTRY(74153_dip, TTL_74153_DIP, "-") + ENTRY(74175_dip, TTL_74175_DIP, "-") + ENTRY(74192_dip, TTL_74192_DIP, "-") + ENTRY(74193_dip, TTL_74193_DIP, "-") + ENTRY(74279_dip, TTL_74279_DIP, "-") + ENTRY(82S16_dip, TTL_82S16_DIP, "-") + ENTRY(9602_dip, TTL_9602_DIP, "-") + ENTRY(9310_dip, TTL_9310_DIP, "-") + ENTRY(9312_dip, TTL_9312_DIP, "-") ENTRY(9316_dip, TTL_9316_DIP, "-") ENTRY(SN74LS629_dip, SN74LS629_DIP, "1.CAP1,2.CAP2") ENTRY(NE555_dip, NE555_DIP, "-") diff --git a/src/emu/netlist/devices/net_lib.h b/src/emu/netlist/devices/net_lib.h index f3db97584fe..42efb0f19dd 100644 --- a/src/emu/netlist/devices/net_lib.h +++ b/src/emu/netlist/devices/net_lib.h @@ -78,7 +78,14 @@ #include "nld_74107.h" #include "nld_74123.h" #include "nld_74153.h" +#include "nld_74175.h" +#include "nld_74192.h" +#include "nld_74193.h" +#include "nld_74279.h" #include "nld_74ls629.h" +#include "nld_82S16.h" +#include "nld_9310.h" +#include "nld_9312.h" #include "nld_9316.h" #include "nld_ne555.h" diff --git a/src/emu/netlist/devices/nld_4066.c b/src/emu/netlist/devices/nld_4066.c index 760dc2d76ef..f512fdd598d 100644 --- a/src/emu/netlist/devices/nld_4066.c +++ b/src/emu/netlist/devices/nld_4066.c @@ -10,6 +10,7 @@ NETLIB_START(4066) { register_input("CTL", m_control); register_sub(m_R, "R"); + m_base_r = 270.0; } NETLIB_RESET(4066) @@ -23,17 +24,31 @@ NETLIB_UPDATE(4066) nl_double low = 0.45 * sup; nl_double high = 0.55 * sup; nl_double in = INPANALOG(m_control) - m_supply.get()->vss(); - nl_double rON = 270.0 * 5.0 / sup; + nl_double rON = m_base_r * 5.0 / sup; + nl_double R = -1.0; if (in < low) { - m_R.set_R(1.0 / netlist().gmin()); - m_R.update_dev(); + R = 1.0 / netlist().gmin(); } else if (in > high) { - m_R.set_R(rON); - m_R.update_dev(); + R = rON; + } + if (R > 0.0) + { + // We only need to update the net first if this is a time stepping net + if (1) // m_R.m_P.net().as_analog().solver()->is_timestep()) + { + m_R.update_dev(); + m_R.set_R(R); + m_R.m_P.schedule_after(NLTIME_FROM_NS(1)); + } + else + { + m_R.set_R(R); + m_R.update_dev(); + } } } @@ -47,6 +62,8 @@ NETLIB_START(4066_dip) register_sub(m_C, "C"); register_sub(m_D, "D"); + m_A.m_base_r = m_B.m_base_r = m_C.m_base_r = m_D.m_base_r = 270; + register_subalias("1", m_A.m_R.m_P); register_subalias("2", m_A.m_R.m_N); register_subalias("3", m_B.m_R.m_P); @@ -81,3 +98,21 @@ NETLIB_UPDATE(4066_dip) m_C.update_dev(); m_D.update_dev(); } + +NETLIB_START(4016_dip) +{ + NETLIB_NAME(4066_dip)::start(); + + m_A.m_base_r = m_B.m_base_r = m_C.m_base_r = m_D.m_base_r = 1000.0; +} + +NETLIB_RESET(4016_dip) +{ + NETLIB_NAME(4066_dip)::reset(); +} + +NETLIB_UPDATE(4016_dip) +{ + /* only called during startup */ + NETLIB_NAME(4066_dip)::update(); +} diff --git a/src/emu/netlist/devices/nld_4066.h b/src/emu/netlist/devices/nld_4066.h index 23e9afdd5b2..63bb7b764e3 100644 --- a/src/emu/netlist/devices/nld_4066.h +++ b/src/emu/netlist/devices/nld_4066.h @@ -30,6 +30,9 @@ #define CD_4066_DIP(_name) \ NET_REGISTER_DEV(4066_dip, _name) +#define CD_4016_DIP(_name) \ + NET_REGISTER_DEV(4016_dip, _name) + NETLIB_SUBDEVICE(4066, NETLIB_LOGIC_FAMILY(CD4000) public: @@ -38,6 +41,7 @@ public: NETLIB_NAME(R) m_R; netlist_state_t<NETLIB_NAME(vdd_vss) *>m_supply; + netlist_state_t<nl_double> m_base_r; ); NETLIB_DEVICE(4066_dip, @@ -50,4 +54,7 @@ NETLIB_DEVICE(4066_dip, NETLIB_NAME(vdd_vss) m_supply; ); +NETLIB_DEVICE_DERIVED(4016_dip, 4066_dip, +); + #endif /* NLD_4066_H_ */ diff --git a/src/emu/netlist/devices/nld_7400.c b/src/emu/netlist/devices/nld_7400.c index bf0952a6a9f..32122aa4aa2 100644 --- a/src/emu/netlist/devices/nld_7400.c +++ b/src/emu/netlist/devices/nld_7400.c @@ -5,9 +5,10 @@ #include "nld_7400.h" -#if 0 +#if (USE_TRUTHTABLE) nld_7400::truthtable_t nld_7400::m_ttbl; +#if 0 const char *nld_7400::m_desc[] = { "A,B,PQ,PA,PB|Q", "0,X,X,X,X|1|22", @@ -15,6 +16,15 @@ const char *nld_7400::m_desc[] = { "1,1,X,X,X|0|15", "" }; +#else +const char *nld_7400::m_desc[] = { + "A , B | Q ", + "0,X|1|22", + "X,0|1|22", + "1,1|0|15", + "" +}; +#endif #endif diff --git a/src/emu/netlist/devices/nld_7400.h b/src/emu/netlist/devices/nld_7400.h index e39a485fd1a..73f5ffe33f8 100644 --- a/src/emu/netlist/devices/nld_7400.h +++ b/src/emu/netlist/devices/nld_7400.h @@ -39,11 +39,11 @@ NET_CONNECT(_name, A, _A) \ NET_CONNECT(_name, B, _B) -#if 1 -NETLIB_SIGNAL(7400, 2, 0, 0); -#else +#if (USE_TRUTHTABLE) #include "nld_truthtable.h" NETLIB_TRUTHTABLE(7400, 2, 1, 0); +#else +NETLIB_SIGNAL(7400, 2, 0, 0); #endif diff --git a/src/emu/netlist/devices/nld_74123.c b/src/emu/netlist/devices/nld_74123.c index 1bf4b07d8ae..df7f7eaacb7 100644 --- a/src/emu/netlist/devices/nld_74123.c +++ b/src/emu/netlist/devices/nld_74123.c @@ -10,6 +10,8 @@ NETLIB_START(74123) { + m_dev_type = 74123; + register_sub(m_RP, "RP"); register_sub(m_RN, "RN"); @@ -19,18 +21,24 @@ NETLIB_START(74123) register_output("Q", m_Q); register_output("QQ", m_QQ); + register_output("_RP_Q", m_RP_Q); // internal + register_output("_RN_Q", m_RN_Q); // internal + register_input("_CV", m_CV); // internal - register_subalias("GND", m_RN.m_N); - register_subalias("VCC", m_RP.m_P); - register_subalias("C", m_RN.m_N); - register_subalias("RC", m_RN.m_P); + register_subalias("GND", m_RN.m_R.m_N); + register_subalias("VCC", m_RP.m_R.m_P); + register_subalias("C", m_RN.m_R.m_N); + register_subalias("RC", m_RN.m_R.m_P); register_param("K", m_K, 0.4); register_param("RI", m_RI, 400.0); // around 250 for HC series, 400 on LS/TTL, estimated from datasheets - connect(m_RN.m_P, m_RP.m_N); - connect(m_CV, m_RN.m_P); + connect(m_RP_Q, m_RP.m_I); + connect(m_RN_Q, m_RN.m_I); + + connect(m_RN.m_R.m_P, m_RP.m_R.m_N); + connect(m_CV, m_RN.m_R.m_P); save(NLNAME(m_last_trig)); save(NLNAME(m_state)); @@ -41,7 +49,13 @@ NETLIB_START(74123) NETLIB_UPDATE(74123) { - const netlist_sig_t m_trig = (INPLOGIC(m_A) ^ 1) & INPLOGIC(m_B) & INPLOGIC(m_CLRQ); + netlist_sig_t m_trig; + + if (m_dev_type == 74123) + m_trig = (INPLOGIC(m_A) ^ 1) & INPLOGIC(m_B) & INPLOGIC(m_CLRQ); + else + // 9602 + m_trig = (INPLOGIC(m_A) ^ 1) | INPLOGIC(m_B); if (!INPLOGIC(m_CLRQ)) { @@ -51,8 +65,8 @@ NETLIB_UPDATE(74123) /* FIXME: SGS datasheet shows quick charge to 5V, * though schematics indicate quick charge to Vhigh only. */ - m_RP.set_R(R_ON); - m_RN.set_R(R_OFF); + OUTLOGIC(m_RP_Q, 1, NLTIME_FROM_NS(10)); // R_ON + OUTLOGIC(m_RN_Q, 0, NLTIME_FROM_NS(10)); // R_OFF m_state = 2; //charging (quick) } else if (!m_last_trig && m_trig) @@ -60,8 +74,10 @@ NETLIB_UPDATE(74123) // FIXME: Timing! OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(10)); OUTLOGIC(m_QQ, 0, NLTIME_FROM_NS(10)); - m_RN.set_R(R_ON); - m_RP.set_R(R_OFF); + + OUTLOGIC(m_RN_Q, 1, NLTIME_FROM_NS(10)); // R_ON + OUTLOGIC(m_RP_Q, 0, NLTIME_FROM_NS(10)); // R_OFF + m_state = 1; // discharging } @@ -69,19 +85,20 @@ NETLIB_UPDATE(74123) if (m_state == 1) { - const nl_double vLow = m_KP * TERMANALOG(m_RP.m_P); + const nl_double vLow = m_KP * TERMANALOG(m_RP.m_R.m_P); if (INPANALOG(m_CV) < vLow) { - m_RN.set_R(R_OFF); + OUTLOGIC(m_RN_Q, 0, NLTIME_FROM_NS(10)); // R_OFF m_state = 2; // charging } } - else if (m_state == 2) + if (m_state == 2) { - const nl_double vHigh = TERMANALOG(m_RP.m_P) * (1.0 - m_KP); + const nl_double vHigh = TERMANALOG(m_RP.m_R.m_P) * (1.0 - m_KP); if (INPANALOG(m_CV) > vHigh) { - m_RP.set_R(R_OFF); + OUTLOGIC(m_RP_Q, 0, NLTIME_FROM_NS(10)); // R_OFF + OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(10)); OUTLOGIC(m_QQ, 1, NLTIME_FROM_NS(10)); m_state = 0; // waiting @@ -94,36 +111,37 @@ NETLIB_RESET(74123) m_RP.do_reset(); m_RN.do_reset(); - m_RP.set_R(R_OFF); - m_RN.set_R(R_OFF); + //m_RP.set_R(R_OFF); + //m_RN.set_R(R_OFF); m_last_trig = 0; m_state = 0; - m_QQ.initial(1); } NETLIB_START(74123_dip) { -#if 0 register_sub(m_1, "1"); register_sub(m_2, "2"); - register_sub(m_3, "3"); - - register_subalias("1", m_1.m_i[0]); - register_subalias("2", m_1.m_i[1]); - register_subalias("3", m_2.m_i[0]); - register_subalias("4", m_2.m_i[1]); - register_subalias("5", m_2.m_i[2]); - register_subalias("6", m_2.m_Q); - - register_subalias("8", m_3.m_Q); - register_subalias("9", m_3.m_i[0]); - register_subalias("10", m_3.m_i[1]); - register_subalias("11", m_3.m_i[2]); - - register_subalias("12", m_1.m_Q); - register_subalias("13", m_1.m_i[2]); -#endif + + register_subalias("1", m_1.m_A); + register_subalias("2", m_1.m_B); + register_subalias("3", m_1.m_CLRQ); + register_subalias("4", m_1.m_QQ); + register_subalias("5", m_2.m_Q); + register_subalias("6", m_2.m_RN.m_R.m_N); + register_subalias("7", m_2.m_RN.m_R.m_P); + register_subalias("8", m_1.m_RN.m_R.m_N); + connect(m_1.m_RN.m_R.m_N, m_2.m_RN.m_R.m_N); + + register_subalias("9", m_2.m_A); + register_subalias("10", m_2.m_B); + register_subalias("11", m_2.m_CLRQ); + register_subalias("12", m_2.m_QQ); + register_subalias("13", m_1.m_Q); + register_subalias("14", m_1.m_RN.m_R.m_N); + register_subalias("15", m_1.m_RN.m_R.m_P); + register_subalias("16", m_1.m_RP.m_R.m_P); + connect(m_1.m_RP.m_R.m_P, m_2.m_RP.m_R.m_P); } NETLIB_UPDATE(74123_dip) @@ -138,3 +156,45 @@ NETLIB_RESET(74123_dip) m_1.do_reset(); m_2.do_reset(); } + +NETLIB_START(9602_dip) +{ + register_sub(m_1, "1"); + register_sub(m_2, "2"); + + m_1.m_dev_type = 9602; + m_2.m_dev_type = 9602; + + register_subalias("1", m_1.m_RN.m_R.m_N); // C1 + register_subalias("2", m_1.m_RN.m_R.m_P); // RC1 + register_subalias("3", m_1.m_CLRQ); + register_subalias("4", m_1.m_B); + register_subalias("5", m_1.m_A); + register_subalias("6", m_1.m_Q); + register_subalias("7", m_1.m_QQ); + register_subalias("8", m_1.m_RN.m_R.m_N); + connect(m_1.m_RN.m_R.m_N, m_2.m_RN.m_R.m_N); + + register_subalias("9", m_2.m_QQ); + register_subalias("10", m_2.m_Q); + register_subalias("11", m_2.m_A); + register_subalias("12", m_2.m_B); + register_subalias("13", m_2.m_CLRQ); + register_subalias("14", m_2.m_RN.m_R.m_P); // RC2 + register_subalias("15", m_2.m_RN.m_R.m_N); // C2 + register_subalias("16", m_1.m_RP.m_R.m_P); + connect(m_1.m_RP.m_R.m_P, m_2.m_RP.m_R.m_P); +} + +NETLIB_UPDATE(9602_dip) +{ + /* only called during startup */ + m_1.update_dev(); + m_2.update_dev(); +} + +NETLIB_RESET(9602_dip) +{ + m_1.do_reset(); + m_2.do_reset(); +} diff --git a/src/emu/netlist/devices/nld_74123.h b/src/emu/netlist/devices/nld_74123.h index 25704e96211..de030f38db4 100644 --- a/src/emu/netlist/devices/nld_74123.h +++ b/src/emu/netlist/devices/nld_74123.h @@ -18,12 +18,25 @@ * * Naming conventions follow Fairchild Semiconductor datasheet * + * DM9602: Dual Retriggerable, Resettable One Shots + * + * +--------------+ + * C1 |1 ++ 16| VCC + * RC1 |2 15| C2 + * CLR1 |3 14| RC2 + * B1 |4 9602 13| CLR2 + * A1 |5 12| B2 + * Q1 |6 11| A2 + * Q1Q |7 10| Q2 + * GND |8 9| Q2Q + * +--------------+ */ #ifndef NLD_74123_H_ #define NLD_74123_H_ #include "../nl_base.h" +#include "nld_system.h" #include "../analog/nld_twoterm.h" #define TTL_74123(_name) \ @@ -32,8 +45,11 @@ NETLIB_DEVICE(74123, public: - NETLIB_NAME(R) m_RP; - NETLIB_NAME(R) m_RN; + NETLIB_NAME(res_sw) m_RP; + NETLIB_NAME(res_sw) m_RN; + + netlist_ttl_output_t m_RP_Q; + netlist_ttl_output_t m_RN_Q; netlist_ttl_input_t m_A; netlist_ttl_input_t m_B; @@ -50,6 +66,7 @@ public: netlist_param_double_t m_K; netlist_param_double_t m_RI; + int m_dev_type; ); #define TTL_74123_DIP(_name) \ @@ -62,5 +79,19 @@ NETLIB_DEVICE(74123_dip, ); +/* The 9602 is very similar to the 123. Input triggering is slightly different + * THe 9602 uses an OR gate instead of an AND gate. + */ + +#define TTL_9602_DIP(_name) \ + NET_REGISTER_DEV(9602_dip, _name) + +NETLIB_DEVICE(9602_dip, + + NETLIB_NAME(74123) m_1; + NETLIB_NAME(74123) m_2; + +); + #endif /* NLD_74123_H_ */ diff --git a/src/emu/netlist/devices/nld_74175.c b/src/emu/netlist/devices/nld_74175.c new file mode 100644 index 00000000000..43b9c33089d --- /dev/null +++ b/src/emu/netlist/devices/nld_74175.c @@ -0,0 +1,131 @@ +/* + * nld_74175.c + * + */ + +#include "nld_74175.h" + +static const netlist_time delay[2] = { NLTIME_FROM_NS(25), NLTIME_FROM_NS(25) }; +static const netlist_time delay_clear[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; + +NETLIB_START(74175_sub) +{ + register_input("CLK", m_CLK); + + register_output("Q1", m_Q[0]); + register_output("Q1Q", m_QQ[0]); + register_output("Q2", m_Q[1]); + register_output("Q2Q", m_QQ[1]); + register_output("Q3", m_Q[2]); + register_output("Q3Q", m_QQ[2]); + register_output("Q4", m_Q[3]); + register_output("Q4Q", m_QQ[3]); + + save(NLNAME(m_clrq)); + save(NLNAME(m_data)); +} + +NETLIB_RESET(74175_sub) +{ + m_CLK.set_state(netlist_input_t::STATE_INP_LH); + m_clrq = 0; + m_data = 0; +} + +NETLIB_UPDATE(74175_sub) +{ + if (m_clrq) + { + for (int i=0; i<4; i++) + { + UINT8 d = (m_data >> i) & 1; + OUTLOGIC(m_Q[i], d, delay[d]); + OUTLOGIC(m_QQ[i], d ^ 1, delay[d ^ 1]); + } + } +} + +NETLIB_UPDATE(74175) +{ + if (!INPLOGIC(m_CLRQ)) + { + for (int i=0; i<4; i++) + { + OUTLOGIC(m_sub.m_Q[i], 0, delay_clear[0]); + OUTLOGIC(m_sub.m_QQ[i], 1, delay_clear[1]); + } + } + m_sub.m_clrq = INPLOGIC(m_CLRQ); + UINT8 d = 0; + for (int i=0; i<4; i++) + { + d |= (INPLOGIC(m_D[i]) << i); + } + m_sub.m_data = d; +} + +NETLIB_START(74175) +{ + register_sub(m_sub, "sub"); + + register_subalias("CLK", m_sub.m_CLK); + + register_input("CLRQ", m_CLRQ); + + register_input("D1", m_D[0]); + register_subalias("Q1", m_sub.m_Q[0]); + register_subalias("Q1Q", m_sub.m_QQ[0]); + + register_input("D2", m_D[1]); + register_subalias("Q2", m_sub.m_Q[1]); + register_subalias("Q2Q", m_sub.m_QQ[1]); + + register_input("D3", m_D[2]); + register_subalias("Q3", m_sub.m_Q[2]); + register_subalias("Q3Q", m_sub.m_QQ[2]); + + register_input("D4", m_D[3]); + register_subalias("Q4", m_sub.m_Q[3]); + register_subalias("Q4Q", m_sub.m_QQ[3]); + +} + +NETLIB_RESET(74175) +{ + m_sub.do_reset(); +} + +NETLIB_START(74175_dip) +{ + register_sub(m_sub, "sub"); + + register_subalias("9", m_sub.m_CLK); + register_input("1", m_CLRQ); + + register_input("4", m_D[0]); + register_subalias("2", m_sub.m_Q[0]); + register_subalias("3", m_sub.m_QQ[0]); + + register_input("5", m_D[1]); + register_subalias("7", m_sub.m_Q[1]); + register_subalias("6", m_sub.m_QQ[1]); + + register_input("12", m_D[2]); + register_subalias("10", m_sub.m_Q[2]); + register_subalias("11", m_sub.m_QQ[2]); + + register_input("13", m_D[3]); + register_subalias("15", m_sub.m_Q[3]); + register_subalias("14", m_sub.m_QQ[3]); + +} + +NETLIB_RESET(74175_dip) +{ + NETLIB_NAME(74175)::reset(); +} + +NETLIB_UPDATE(74175_dip) +{ + NETLIB_NAME(74175)::update(); +} diff --git a/src/emu/netlist/devices/nld_74175.h b/src/emu/netlist/devices/nld_74175.h new file mode 100644 index 00000000000..4656bff24ab --- /dev/null +++ b/src/emu/netlist/devices/nld_74175.h @@ -0,0 +1,68 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74175.h + * + * DM74175: Quad D Flip-Flops with Clear + * + * +--------------+ + * CLR |1 ++ 16| VCC + * Q1 |2 15| Q4 + * Q1Q |3 14| Q4Q + * D1 |4 74175 13| D4 + * D2 |5 12| D3 + * Q2Q |6 11| Q3Q + * Q2 |7 10| Q3 + * GND |8 9| CLK + * +--------------+ + * + * +-----+-----+---++---+-----+ + * | CLR | CLK | D || Q | QQ | + * +=====+=====+===++===+=====+ + * | 0 | X | X || 0 | 1 | + * | 1 | R | 1 || 1 | 0 | + * | 1 | R | 0 || 0 | 1 | + * | 1 | 0 | X || Q0| Q0Q | + * +-----+-----+---++---+-----+ + * + * Q0 The output logic level of Q before the indicated input conditions were established + * + * R: 0 --> 1 + * + * Naming conventions follow National Semiconductor datasheet + * + */ + +#ifndef NLD_74175_H_ +#define NLD_74175_H_ + +#include "nld_signal.h" + +#define TTL_74175(_name) \ + NET_REGISTER_DEV(74175, _name) +#define TTL_74175_DIP(_name) \ + NET_REGISTER_DEV(74175_dip, _name) + + +NETLIB_SUBDEVICE(74175_sub, + + netlist_ttl_input_t m_CLK; + netlist_ttl_output_t m_Q[4]; + netlist_ttl_output_t m_QQ[4]; + + netlist_state_t<netlist_sig_t> m_clrq; + netlist_state_t<netlist_sig_t> m_data; +); + +NETLIB_DEVICE(74175, + + NETLIB_NAME(74175_sub) m_sub; + netlist_ttl_input_t m_D[4]; + netlist_ttl_input_t m_CLRQ; +); + +NETLIB_DEVICE_DERIVED(74175_dip, 74175, + +); + +#endif /* NLD_74175_H_ */ diff --git a/src/emu/netlist/devices/nld_74192.c b/src/emu/netlist/devices/nld_74192.c new file mode 100644 index 00000000000..0ca39513b0d --- /dev/null +++ b/src/emu/netlist/devices/nld_74192.c @@ -0,0 +1,130 @@ +/* + * nld_74192.c + * + */ + +#define MAXCNT 9 + +#include "nld_74192.h" + +NETLIB_START(74192) +{ + register_input("A", m_A); + register_input("B", m_B); + register_input("C", m_C); + register_input("D", m_D); + register_input("CLEAR", m_CLEAR); + register_input("LOADQ", m_LOADQ); + register_input("CU", m_CU); + register_input("CD", m_CD); + + register_output("QA", m_Q[0]); + register_output("QB", m_Q[1]); + register_output("QC", m_Q[2]); + register_output("QD", m_Q[3]); + register_output("BORROWQ", m_BORROWQ); + register_output("CARRYQ", m_CARRYQ); + + save(NLNAME(m_cnt)); + save(NLNAME(m_last_CU)); + save(NLNAME(m_last_CD)); + +} + +NETLIB_RESET(74192) +{ + m_cnt = 0; + m_last_CU = 0; + m_last_CD = 0; +} + +// FIXME: Timing +static const netlist_time delay[4] = +{ + NLTIME_FROM_NS(40), + NLTIME_FROM_NS(40), + NLTIME_FROM_NS(40), + NLTIME_FROM_NS(40) +}; + +NETLIB_UPDATE(74192) +{ + int tCarry = 1; + int tBorrow = 1; + if (INPLOGIC(m_CLEAR)) + { + m_cnt = 0; + } + else if (!INPLOGIC(m_LOADQ)) + { + m_cnt = (INPLOGIC(m_D) << 3) | (INPLOGIC(m_C) << 2) + | (INPLOGIC(m_B) << 1) | (INPLOGIC(m_A) << 0); + } + else + { + if (INPLOGIC(m_CD) && !m_last_CU && INPLOGIC(m_CU)) + { + m_cnt++; + if (m_cnt > MAXCNT) + m_cnt = 0; + } + if (INPLOGIC(m_CU) && !m_last_CD && INPLOGIC(m_CD)) + { + if (m_cnt > 0) + m_cnt--; + else + m_cnt = MAXCNT; + } + } + + if (!INPLOGIC(m_CU) && (m_cnt == MAXCNT)) + tCarry = 0; + + if (!INPLOGIC(m_CD) && (m_cnt == 0)) + tBorrow = 0; + + m_last_CD = INPLOGIC(m_CD); + m_last_CU = INPLOGIC(m_CU); + + for (int i=0; i<4; i++) + OUTLOGIC(m_Q[i], (m_cnt >> i) & 1, delay[i]); + + OUTLOGIC(m_BORROWQ, tBorrow, NLTIME_FROM_NS(20)); //FIXME + OUTLOGIC(m_CARRYQ, tCarry, NLTIME_FROM_NS(20)); //FIXME +} + +NETLIB_FUNC_VOID(74192, update_outputs, (void)) +{ +} + +NETLIB_START(74192_dip) +{ + NETLIB_NAME(74192)::start(); + + register_subalias("1", m_B); + register_subalias("2", m_Q[1]); + register_subalias("3", m_Q[0]); + register_subalias("4", m_CD); + register_subalias("5", m_CU); + register_subalias("6", m_Q[2]); + register_subalias("7", m_Q[3]); + + register_subalias("9", m_D); + register_subalias("10", m_C); + register_subalias("11", m_LOADQ); + register_subalias("12", m_CARRYQ); + register_subalias("13", m_BORROWQ); + register_subalias("14", m_CLEAR); + register_subalias("15", m_A); + +} + +NETLIB_UPDATE(74192_dip) +{ + NETLIB_NAME(74192)::update(); +} + +NETLIB_RESET(74192_dip) +{ + NETLIB_NAME(74192)::reset(); +} diff --git a/src/emu/netlist/devices/nld_74192.h b/src/emu/netlist/devices/nld_74192.h new file mode 100644 index 00000000000..bc4a11a5360 --- /dev/null +++ b/src/emu/netlist/devices/nld_74192.h @@ -0,0 +1,64 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74192.h + * + * DM74192: Synchronous 4-Bit Binary Counter with Dual Clock + * Decade counter + * + * FIXME: This should be merged with the 74193 which counts to 16 + * + * +--------------+ + * B |1 ++ 16| VCC + * QB |2 15| A + * QA |3 14| CLEAR + * CD |4 74192 13| BORROWQ + * CU |5 12| CARRYQ + * QC |6 11| LOADQ + * QD |7 10| C + * GND |8 9| D + * +--------------+ + * + * CD: Count up + * CU: Count down + * + * Naming conventions follow National Semiconductor datasheet + * + */ + +#ifndef NLD_74192_H_ +#define NLD_74192_H_ + +#include "../nl_base.h" + +#define TTL_74192(_name) \ + NET_REGISTER_DEV(74192, _name) + +#define TTL_74192_DIP(_name) \ + NET_REGISTER_DEV(74192_dip, _name) + +NETLIB_DEVICE(74192, + ATTR_HOT void update_outputs(); + + netlist_ttl_input_t m_A; + netlist_ttl_input_t m_B; + netlist_ttl_input_t m_C; + netlist_ttl_input_t m_D; + netlist_ttl_input_t m_CLEAR; + netlist_ttl_input_t m_LOADQ; + netlist_ttl_input_t m_CU; + netlist_ttl_input_t m_CD; + + netlist_state_t<INT8> m_cnt; + netlist_state_t<UINT8> m_last_CU; + netlist_state_t<UINT8> m_last_CD; + + netlist_ttl_output_t m_Q[4]; + netlist_ttl_output_t m_BORROWQ; + netlist_ttl_output_t m_CARRYQ; +); + +NETLIB_DEVICE_DERIVED(74192_dip, 74192, +); + +#endif /* NLD_74192_H_ */ diff --git a/src/emu/netlist/devices/nld_74193.c b/src/emu/netlist/devices/nld_74193.c new file mode 100644 index 00000000000..8b67a22340d --- /dev/null +++ b/src/emu/netlist/devices/nld_74193.c @@ -0,0 +1,130 @@ +/* + * nld_74193.c + * + */ + +#define MAXCNT 15 + +#include "nld_74193.h" + +NETLIB_START(74193) +{ + register_input("A", m_A); + register_input("B", m_B); + register_input("C", m_C); + register_input("D", m_D); + register_input("CLEAR", m_CLEAR); + register_input("LOADQ", m_LOADQ); + register_input("CU", m_CU); + register_input("CD", m_CD); + + register_output("QA", m_Q[0]); + register_output("QB", m_Q[1]); + register_output("QC", m_Q[2]); + register_output("QD", m_Q[3]); + register_output("BORROWQ", m_BORROWQ); + register_output("CARRYQ", m_CARRYQ); + + save(NLNAME(m_cnt)); + save(NLNAME(m_last_CU)); + save(NLNAME(m_last_CD)); + +} + +NETLIB_RESET(74193) +{ + m_cnt = 0; + m_last_CU = 0; + m_last_CD = 0; +} + +// FIXME: Timing +static const netlist_time delay[4] = +{ + NLTIME_FROM_NS(40), + NLTIME_FROM_NS(40), + NLTIME_FROM_NS(40), + NLTIME_FROM_NS(40) +}; + +NETLIB_UPDATE(74193) +{ + int tCarry = 1; + int tBorrow = 1; + if (INPLOGIC(m_CLEAR)) + { + m_cnt = 0; + } + else if (!INPLOGIC(m_LOADQ)) + { + m_cnt = (INPLOGIC(m_D) << 3) | (INPLOGIC(m_C) << 2) + | (INPLOGIC(m_B) << 1) | (INPLOGIC(m_A) << 0); + } + else + { + if (INPLOGIC(m_CD) && !m_last_CU && INPLOGIC(m_CU)) + { + m_cnt++; + if (m_cnt > MAXCNT) + m_cnt = 0; + } + if (INPLOGIC(m_CU) && !m_last_CD && INPLOGIC(m_CD)) + { + if (m_cnt > 0) + m_cnt--; + else + m_cnt = MAXCNT; + } + } + + if (!INPLOGIC(m_CU) && (m_cnt == MAXCNT)) + tCarry = 0; + + if (!INPLOGIC(m_CD) && (m_cnt == 0)) + tBorrow = 0; + + m_last_CD = INPLOGIC(m_CD); + m_last_CU = INPLOGIC(m_CU); + + for (int i=0; i<4; i++) + OUTLOGIC(m_Q[i], (m_cnt >> i) & 1, delay[i]); + + OUTLOGIC(m_BORROWQ, tBorrow, NLTIME_FROM_NS(20)); //FIXME + OUTLOGIC(m_CARRYQ, tCarry, NLTIME_FROM_NS(20)); //FIXME +} + +NETLIB_FUNC_VOID(74193, update_outputs, (void)) +{ +} + +NETLIB_START(74193_dip) +{ + NETLIB_NAME(74193)::start(); + + register_subalias("1", m_B); + register_subalias("2", m_Q[1]); + register_subalias("3", m_Q[0]); + register_subalias("4", m_CD); + register_subalias("5", m_CU); + register_subalias("6", m_Q[2]); + register_subalias("7", m_Q[3]); + + register_subalias("9", m_D); + register_subalias("10", m_C); + register_subalias("11", m_LOADQ); + register_subalias("12", m_CARRYQ); + register_subalias("13", m_BORROWQ); + register_subalias("14", m_CLEAR); + register_subalias("15", m_A); + +} + +NETLIB_UPDATE(74193_dip) +{ + NETLIB_NAME(74193)::update(); +} + +NETLIB_RESET(74193_dip) +{ + NETLIB_NAME(74193)::reset(); +} diff --git a/src/emu/netlist/devices/nld_74193.h b/src/emu/netlist/devices/nld_74193.h new file mode 100644 index 00000000000..fc2a7de8105 --- /dev/null +++ b/src/emu/netlist/devices/nld_74193.h @@ -0,0 +1,61 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74193.h + * + * DM74193: Synchronous 4-Bit Binary Counter with Dual Clock + * + * +--------------+ + * B |1 ++ 16| VCC + * QB |2 15| A + * QA |3 14| CLEAR + * CD |4 74193 13| BORROWQ + * CU |5 12| CARRYQ + * QC |6 11| LOADQ + * QD |7 10| C + * GND |8 9| D + * +--------------+ + * + * CD: Count up + * CU: Count down + * + * Naming conventions follow National Semiconductor datasheet + * + */ + +#ifndef NLD_74193_H_ +#define NLD_74193_H_ + +#include "../nl_base.h" + +#define TTL_74193(_name) \ + NET_REGISTER_DEV(74193, _name) + +#define TTL_74193_DIP(_name) \ + NET_REGISTER_DEV(74193_dip, _name) + +NETLIB_DEVICE(74193, + ATTR_HOT void update_outputs(); + + netlist_ttl_input_t m_A; + netlist_ttl_input_t m_B; + netlist_ttl_input_t m_C; + netlist_ttl_input_t m_D; + netlist_ttl_input_t m_CLEAR; + netlist_ttl_input_t m_LOADQ; + netlist_ttl_input_t m_CU; + netlist_ttl_input_t m_CD; + + netlist_state_t<INT8> m_cnt; + netlist_state_t<UINT8> m_last_CU; + netlist_state_t<UINT8> m_last_CD; + + netlist_ttl_output_t m_Q[4]; + netlist_ttl_output_t m_BORROWQ; + netlist_ttl_output_t m_CARRYQ; +); + +NETLIB_DEVICE_DERIVED(74193_dip, 74193, +); + +#endif /* NLD_74193_H_ */ diff --git a/src/emu/netlist/devices/nld_74279.c b/src/emu/netlist/devices/nld_74279.c new file mode 100644 index 00000000000..163bf1c593f --- /dev/null +++ b/src/emu/netlist/devices/nld_74279.c @@ -0,0 +1,75 @@ +/* + * nld_74279.c + * + */ + +#include "nld_74279.h" + +nld_74279A::truthtable_t nld_74279A::m_ttbl; + +const char *nld_74279A::m_desc[] = { + "S,R,PQ,PS,PR|Q", + "0,0,X,X,X|1|22", + "0,1,X,X,X|1|22", + "1,0,X,X,X|0|15", + "1,1,0,X,X|0|15", + "1,1,1,X,X|1|22", + "" +}; + +nld_74279B::truthtable_t nld_74279B::m_ttbl; + +const char *nld_74279B::m_desc[] = { + "S1,S2,R,PQ,PS1,PS2,PR|Q", + "0,X,0,X,X,X,X|1|22", + "X,0,0,X,X,X,X|1|22", + "0,X,1,X,X,X,X|1|22", + "X,0,1,X,X,X,X|1|22", + "1,1,0,X,X,X,X|0|15", + "1,1,1,0,X,X,X|0|15", + "1,1,1,1,X,X,X|1|22", + "" +}; + +NETLIB_START(74279_dip) +{ + register_sub(m_1, "1"); + register_sub(m_2, "2"); + register_sub(m_3, "3"); + register_sub(m_4, "4"); + + register_subalias("1", m_1.m_i[2]); //R + register_subalias("2", m_1.m_i[0]); + register_subalias("3", m_1.m_i[1]); + register_subalias("4", m_1.m_Q[0]); + + register_subalias("5", m_2.m_i[1]); //R + register_subalias("6", m_2.m_i[0]); + register_subalias("7", m_2.m_Q[0]); + + register_subalias("9", m_3.m_Q[0]); + register_subalias("10", m_3.m_i[2]); //R + register_subalias("11", m_3.m_i[0]); + register_subalias("12", m_3.m_i[1]); + + register_subalias("13", m_4.m_Q[0]); + register_subalias("14", m_4.m_i[1]); //R + register_subalias("15", m_4.m_i[0]); +} + +NETLIB_UPDATE(74279_dip) +{ + /* only called during startup */ + m_1.update_dev(); + m_2.update_dev(); + m_3.update_dev(); + m_4.update_dev(); +} + +NETLIB_RESET(74279_dip) +{ + m_1.do_reset(); + m_2.do_reset(); + m_3.do_reset(); + m_4.do_reset(); +} diff --git a/src/emu/netlist/devices/nld_74279.h b/src/emu/netlist/devices/nld_74279.h new file mode 100644 index 00000000000..ae5020394de --- /dev/null +++ b/src/emu/netlist/devices/nld_74279.h @@ -0,0 +1,55 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_74279.h + * + * DM74279: Triple 3-Input NAND Gates + * + * +--------------+ + * 1R |1 ++ 16| VCC + * 1S1 |2 15| 4S + * 1S2 |3 14| 4R + * 1Q |4 74279 13| 4Q + * 2R |5 12| 3S2 + * 2S |6 11| 3S1 + * 2Q |7 10| 3R + * GND |8 9| 3Q + * +--------------+ + * ___ + * + * +---+---+---++---+ + * |S1 |S2 | R || Q | + * +===+===+===++===+ + * | 0 | 0 | 0 || 1 | + * | 0 | 1 | 1 || 1 | + * | 1 | 0 | 1 || 1 | + * | 1 | 1 | 0 || 0 | + * | 1 | 1 | 1 ||QP | + * +---+---+---++---+ + * + * QP: Previous Q + * + * Naming conventions follow Fairchild Semiconductor datasheet + * + */ + +#ifndef NLD_74279_H_ +#define NLD_74279_H_ + +#include "nld_truthtable.h" + +NETLIB_TRUTHTABLE(74279A, 2, 1, 1); +NETLIB_TRUTHTABLE(74279B, 3, 1, 1); + +#define TTL_74279_DIP(_name) \ + NET_REGISTER_DEV(74279_dip, _name) + +NETLIB_DEVICE(74279_dip, + + NETLIB_NAME(74279B) m_1; + NETLIB_NAME(74279A) m_2; + NETLIB_NAME(74279B) m_3; + NETLIB_NAME(74279A) m_4; +); + +#endif /* NLD_74279_H_ */ diff --git a/src/emu/netlist/devices/nld_7432.c b/src/emu/netlist/devices/nld_7432.c index 163b51a82d9..95c6326991c 100644 --- a/src/emu/netlist/devices/nld_7432.c +++ b/src/emu/netlist/devices/nld_7432.c @@ -12,21 +12,21 @@ NETLIB_START(7432_dip) register_sub(m_3, "3"); register_sub(m_4, "4"); - register_subalias("1", m_1.m_Q[0]); - register_subalias("2", m_1.m_i[0]); - register_subalias("3", m_1.m_i[1]); + register_subalias("3", m_1.m_Q[0]); + register_subalias("1", m_1.m_i[0]); + register_subalias("2", m_1.m_i[1]); - register_subalias("4", m_2.m_Q[0]); - register_subalias("5", m_2.m_i[0]); - register_subalias("6", m_2.m_i[1]); + register_subalias("6", m_2.m_Q[0]); + register_subalias("4", m_2.m_i[0]); + register_subalias("5", m_2.m_i[1]); - register_subalias("8", m_3.m_i[0]); - register_subalias("9", m_3.m_i[1]); - register_subalias("10", m_3.m_Q[0]); + register_subalias("9", m_3.m_i[0]); + register_subalias("10", m_3.m_i[1]); + register_subalias("8", m_3.m_Q[0]); - register_subalias("11", m_4.m_i[0]); - register_subalias("12", m_4.m_i[1]); - register_subalias("13", m_4.m_Q[0]); + register_subalias("12", m_4.m_i[0]); + register_subalias("13", m_4.m_i[1]); + register_subalias("11", m_4.m_Q[0]); } NETLIB_UPDATE(7432_dip) diff --git a/src/emu/netlist/devices/nld_7432.h b/src/emu/netlist/devices/nld_7432.h index dede93f25c5..97992807857 100644 --- a/src/emu/netlist/devices/nld_7432.h +++ b/src/emu/netlist/devices/nld_7432.h @@ -6,13 +6,13 @@ * DM7432: Quad 2-Input OR Gates * * +--------------+ - * Y1 |1 ++ 14| VCC - * A1 |2 13| Y4 - * B1 |3 12| B4 - * Y2 |4 7432 11| A4 - * A2 |5 10| Y3 - * B2 |6 9| B3 - * GND |7 8| A3 + * A1 |1 ++ 14| VCC + * B1 |2 13| B4 + * Y1 |3 12| A4 + * A2 |4 7432 11| Y4 + * B2 |5 10| B3 + * Y2 |6 9| A3 + * GND |7 8| Y3 * +--------------+ * ___ * Y = A+B diff --git a/src/emu/netlist/devices/nld_7474.c b/src/emu/netlist/devices/nld_7474.c index a56207dc8f9..d04238c0d7e 100644 --- a/src/emu/netlist/devices/nld_7474.c +++ b/src/emu/netlist/devices/nld_7474.c @@ -85,8 +85,8 @@ NETLIB_RESET(7474sub) m_nextD = 0; /* FIXME: required by pong doubles - need a mechanism to set this from netlist */ - m_Q.initial(1); - m_QQ.initial(1); + //m_Q.initial(1); + //m_QQ.initial(1); } NETLIB_START(7474_dip) diff --git a/src/emu/netlist/devices/nld_7474.h b/src/emu/netlist/devices/nld_7474.h index 1c209d3a4e0..3452400dd54 100644 --- a/src/emu/netlist/devices/nld_7474.h +++ b/src/emu/netlist/devices/nld_7474.h @@ -4,7 +4,7 @@ * nld_7474.h * * DM7474: Dual Positive-Edge-Triggered D Flip-Flops - * with Preset Clear and Complementary Outputs + * with Preset, Clear and Complementary Outputs * * +--------------+ * CLR1 |1 ++ 14| VCC diff --git a/src/emu/netlist/devices/nld_82S16.c b/src/emu/netlist/devices/nld_82S16.c new file mode 100644 index 00000000000..3b2c0fb8e81 --- /dev/null +++ b/src/emu/netlist/devices/nld_82S16.c @@ -0,0 +1,97 @@ +/* + * nld_82S16.c + * + */ + +#include "nld_82S16.h" + +static const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; + +// FIXME: timing! +// FIXME: optimize device (separate address decoder!) +NETLIB_UPDATE(82S16) +{ + if (INPLOGIC(m_CE1Q) || INPLOGIC(m_CE2Q) || INPLOGIC(m_CE3Q)) + { + // FIXME: Outputs are tristate. This needs to be properly implemented + OUTLOGIC(m_DOUTQ, 1, NLTIME_FROM_NS(20)); + for (int i=0; i<8; i++) + m_A[i].inactivate(); + } + else + { + int adr = 0; + for (int i=0; i<8; i++) + { + m_A[i].activate(); + adr |= (INPLOGIC(m_A[i]) << i); + } + + if (!INPLOGIC(m_WEQ)) + { + m_ram[adr] = INPLOGIC(m_DIN); + } + OUTLOGIC(m_DOUTQ, m_ram[adr] ^ 1, NLTIME_FROM_NS(20)); + } +} + +NETLIB_START(82S16) +{ + register_input("A0", m_A[0]); + register_input("A1", m_A[1]); + register_input("A2", m_A[2]); + register_input("A3", m_A[3]); + register_input("A4", m_A[4]); + register_input("A5", m_A[5]); + register_input("A6", m_A[6]); + register_input("A7", m_A[7]); + + register_input("CE1Q", m_CE1Q); + register_input("CE2Q", m_CE2Q); + register_input("CE3Q", m_CE3Q); + + register_input("WEQ", m_WEQ); + register_input("DIN", m_DIN); + + register_output("DOUTQ",m_DOUTQ); + + save(NLNAME(m_ram)); +} + +NETLIB_RESET(82S16) +{ + for (int i=0; i<256; i++) + { + m_ram[i] = 0; + } +} + +NETLIB_START(82S16_dip) +{ + register_input("2", m_A[0]); + register_input("1", m_A[1]); + register_input("15", m_A[2]); + register_input("14", m_A[3]); + register_input("7", m_A[4]); + register_input("9", m_A[5]); + register_input("10", m_A[6]); + register_input("11", m_A[7]); + + register_input("3", m_CE1Q); + register_input("4", m_CE2Q); + register_input("5", m_CE3Q); + + register_input("12", m_WEQ); + register_input("13", m_DIN); + + register_output("6", m_DOUTQ);} + +NETLIB_RESET(82S16_dip) +{ + NETLIB_NAME(82S16)::reset(); +} + +NETLIB_UPDATE(82S16_dip) +{ + NETLIB_NAME(82S16)::update(); +} diff --git a/src/emu/netlist/devices/nld_82S16.h b/src/emu/netlist/devices/nld_82S16.h new file mode 100644 index 00000000000..6992e252ca3 --- /dev/null +++ b/src/emu/netlist/devices/nld_82S16.h @@ -0,0 +1,50 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_82S16.h + * + * DM82S16: 256 Bit bipolar ram + * + * +--------------+ + * A1 |1 ++ 16| VCC + * A0 |2 15| A2 + * CE1Q |3 14| A3 + * CE2Q |4 82S16 13| DIN + * CE3Q |5 12| WEQ + * DOUTQ |6 11| A7 + * A4 |7 10| A6 + * GND |8 9| A5 + * +--------------+ + * + * + * Naming conventions follow Signetics datasheet + * + */ + +#ifndef NLD_82S16_H_ +#define NLD_82S16_H_ + +#include "../nl_base.h" + +#define TTL_82S16(_name) \ + NET_REGISTER_DEV(82S16, _name) +#define TTL_82S16_DIP(_name) \ + NET_REGISTER_DEV(82S16_dip, _name) + +NETLIB_DEVICE(82S16, + + UINT8 m_ram[256]; + netlist_ttl_input_t m_A[8]; + netlist_ttl_input_t m_CE1Q; + netlist_ttl_input_t m_CE2Q; + netlist_ttl_input_t m_CE3Q; + netlist_ttl_input_t m_WEQ; + netlist_ttl_input_t m_DIN; + netlist_ttl_output_t m_DOUTQ; +); + +NETLIB_DEVICE_DERIVED(82S16_dip, 82S16, + +); + +#endif /* NLD_82S16_H_ */ diff --git a/src/emu/netlist/devices/nld_9310.c b/src/emu/netlist/devices/nld_9310.c new file mode 100644 index 00000000000..f6d35ac92e6 --- /dev/null +++ b/src/emu/netlist/devices/nld_9310.c @@ -0,0 +1,228 @@ +/* + * nld_9310.c + * + */ + +#include "nld_9310.h" + +#define MAXCNT 9 + +NETLIB_START(9310) +{ + register_sub(subABCD, "subABCD"); + sub.m_ABCD = &subABCD; + register_sub(sub, "sub"); + + register_subalias("CLK", sub.m_CLK); + + register_input("ENP", m_ENP); + register_input("ENT", m_ENT); + register_input("CLRQ", m_CLRQ); + register_input("LOADQ", m_LOADQ); + + register_subalias("A", subABCD.m_A); + register_subalias("B", subABCD.m_B); + register_subalias("C", subABCD.m_C); + register_subalias("D", subABCD.m_D); + + register_subalias("QA", sub.m_QA); + register_subalias("QB", sub.m_QB); + register_subalias("QC", sub.m_QC); + register_subalias("QD", sub.m_QD); + register_subalias("RC", sub.m_RC); + +} + +NETLIB_RESET(9310) +{ + sub.do_reset(); + subABCD.do_reset(); +} + +NETLIB_START(9310_subABCD) +{ + register_input("A", m_A); + register_input("B", m_B); + register_input("C", m_C); + register_input("D", m_D); + +} + +NETLIB_RESET(9310_subABCD) +{ + m_A.inactivate(); + m_B.inactivate(); + m_C.inactivate(); + m_D.inactivate(); +} + +ATTR_HOT inline UINT8 NETLIB_NAME(9310_subABCD::read_ABCD)() +{ + return (INPLOGIC_PASSIVE(m_D) << 3) | (INPLOGIC_PASSIVE(m_C) << 2) | (INPLOGIC_PASSIVE(m_B) << 1) | (INPLOGIC_PASSIVE(m_A) << 0); +} + +NETLIB_UPDATE(9310_subABCD) +{ +} + +NETLIB_START(9310_sub) +{ + register_input("CLK", m_CLK); + + register_output("QA", m_QA); + register_output("QB", m_QB); + register_output("QC", m_QC); + register_output("QD", m_QD); + register_output("RC", m_RC); + + save(NLNAME(m_cnt.ref())); + save(NLNAME(m_loadq.ref())); + save(NLNAME(m_ent.ref())); +} + +NETLIB_RESET(9310_sub) +{ + m_CLK.set_state(netlist_input_t::STATE_INP_LH); + m_cnt = 0; + m_loadq = 1; + m_ent = 1; +} + +NETLIB_UPDATE(9310_sub) +{ + UINT8 cnt = m_cnt; + if (m_loadq) + { + cnt++; + if (cnt > MAXCNT) + cnt = 0; + update_outputs(cnt); + OUTLOGIC(m_RC, m_ent & (cnt == MAXCNT), NLTIME_FROM_NS(20)); +#if 0 + if (cnt == 0x0f) + OUTLOGIC(m_RC, m_ent, NLTIME_FROM_NS(20)); + else if (cnt == 0) + OUTLOGIC(m_RC, 0, NLTIME_FROM_NS(20)); +#endif + } + else + { + cnt = m_ABCD.get()->read_ABCD(); + update_outputs_all(cnt); + OUTLOGIC(m_RC, m_ent & (cnt == MAXCNT), NLTIME_FROM_NS(20)); + } + m_cnt = cnt; +} + +NETLIB_UPDATE(9310) +{ + sub.m_loadq = INPLOGIC(m_LOADQ); + sub.m_ent = INPLOGIC(m_ENT); + const netlist_sig_t clrq = INPLOGIC(m_CLRQ); + + if ((!sub.m_loadq || (sub.m_ent & INPLOGIC(m_ENP))) && clrq) + { + sub.m_CLK.activate_lh(); + } + else + { + UINT8 cnt = sub.m_cnt; + sub.m_CLK.inactivate(); + if (!clrq && (cnt>0)) + { + cnt = 0; + sub.update_outputs(cnt); + //OUTLOGIC(sub.m_RC, 0, NLTIME_FROM_NS(20)); + sub.m_cnt = cnt; + //return; + } + } + OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == MAXCNT), NLTIME_FROM_NS(20)); +} + +inline NETLIB_FUNC_VOID(9310_sub, update_outputs_all, (const UINT8 cnt)) +{ + const netlist_time out_delay = NLTIME_FROM_NS(20); + OUTLOGIC(m_QA, (cnt >> 0) & 1, out_delay); + OUTLOGIC(m_QB, (cnt >> 1) & 1, out_delay); + OUTLOGIC(m_QC, (cnt >> 2) & 1, out_delay); + OUTLOGIC(m_QD, (cnt >> 3) & 1, out_delay); +} + +inline NETLIB_FUNC_VOID(9310_sub, update_outputs, (const UINT8 cnt)) +{ + const netlist_time out_delay = NLTIME_FROM_NS(20); +#if 1 +// for (int i=0; i<4; i++) +// OUTLOGIC(m_Q[i], (cnt >> i) & 1, delay[i]); + OUTLOGIC(m_QA, (cnt >> 0) & 1, out_delay); + OUTLOGIC(m_QB, (cnt >> 1) & 1, out_delay); + OUTLOGIC(m_QC, (cnt >> 2) & 1, out_delay); + OUTLOGIC(m_QD, (cnt >> 3) & 1, out_delay); +#else + if ((cnt & 1) == 1) + OUTLOGIC(m_QA, 1, out_delay); + else + { + OUTLOGIC(m_QA, 0, out_delay); + switch (cnt) + { + case 0x00: + OUTLOGIC(m_QB, 0, out_delay); + OUTLOGIC(m_QC, 0, out_delay); + OUTLOGIC(m_QD, 0, out_delay); + break; + case 0x02: + case 0x06: + case 0x0A: + case 0x0E: + OUTLOGIC(m_QB, 1, out_delay); + break; + case 0x04: + case 0x0C: + OUTLOGIC(m_QB, 0, out_delay); + OUTLOGIC(m_QC, 1, out_delay); + break; + case 0x08: + OUTLOGIC(m_QB, 0, out_delay); + OUTLOGIC(m_QC, 0, out_delay); + OUTLOGIC(m_QD, 1, out_delay); + break; + } + + } +#endif +} + +NETLIB_START(9310_dip) +{ + NETLIB_NAME(9310)::start(); + + register_subalias("1", m_CLRQ); + register_subalias("2", sub.m_CLK); + register_subalias("3", subABCD.m_A); + register_subalias("4", subABCD.m_B); + register_subalias("5", subABCD.m_C); + register_subalias("6", subABCD.m_D); + register_subalias("7", m_ENP); + // register_subalias("8", ); --> GND + + register_subalias("9", m_LOADQ); + register_subalias("10", m_ENT); + register_subalias("11", sub.m_QD); + register_subalias("12", sub.m_QC); + register_subalias("13", sub.m_QB); + register_subalias("14", sub.m_QA); + register_subalias("15", sub.m_RC); + // register_subalias("16", ); --> VCC +} + +NETLIB_UPDATE(9310_dip) +{ + NETLIB_NAME(9310)::update(); +} + +NETLIB_RESET(9310_dip) +{ + NETLIB_NAME(9310)::reset(); +} diff --git a/src/emu/netlist/devices/nld_9310.h b/src/emu/netlist/devices/nld_9310.h new file mode 100644 index 00000000000..ce83b1e1a69 --- /dev/null +++ b/src/emu/netlist/devices/nld_9310.h @@ -0,0 +1,104 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_9310.h + * + * DM9310: Synchronous 4-Bit Counters + * + * FIXME: This should be merged with the 9316. The only difference is MAXCNT! + * + * +--------------+ + * CLEAR |1 ++ 16| VCC + * CLOCK |2 15| RC (Ripple Carry) + * A |3 14| QA + * B |4 9310 13| QB + * C |5 12| QC + * D |6 11| QD + * Enable P |7 10| Enable T + * GND |8 9| LOAD + * +--------------+ + * + * Counter Sequence + * + * +-------++----+----+----+----+----+ + * | COUNT || QD | QC | QB | QA | RC | + * +=======++====+====+====+====+====+ + * | 0 || 0 | 0 | 0 | 0 | 0 | + * | 1 || 0 | 0 | 0 | 1 | 0 | + * | 2 || 0 | 0 | 1 | 0 | 0 | + * | 3 || 0 | 0 | 1 | 1 | 0 | + * | 4 || 0 | 1 | 0 | 0 | 0 | + * | 5 || 0 | 1 | 0 | 1 | 0 | + * | 6 || 0 | 1 | 1 | 0 | 0 | + * | 7 || 0 | 1 | 1 | 1 | 0 | + * | 8 || 1 | 0 | 0 | 0 | 0 | + * | 9 || 1 | 0 | 0 | 1 | 0 | + * +-------++----+----+----+----+----+ + * + * Reset count function: Please refer to + * National Semiconductor datasheet (timing diagramm) + * + * Naming conventions follow National Semiconductor datasheet + * + */ + +#ifndef NLD_9310_H_ +#define NLD_9310_H_ + +#include "../nl_base.h" + +#define TTL_9310(_name, _CLK, _ENP, _ENT, _CLRQ, _LOADQ, _A, _B, _C, _D) \ + NET_REGISTER_DEV(9310, _name) \ + NET_CONNECT(_name, CLK, _CLK) \ + NET_CONNECT(_name, ENP, _ENP) \ + NET_CONNECT(_name, ENT, _ENT) \ + NET_CONNECT(_name, CLRQ, _CLRQ) \ + NET_CONNECT(_name, LOADQ,_LOADQ) \ + NET_CONNECT(_name, A, _A) \ + NET_CONNECT(_name, B, _B) \ + NET_CONNECT(_name, C, _C) \ + NET_CONNECT(_name, D, _D) + +#define TTL_9310_DIP(_name) \ + NET_REGISTER_DEV(9310_dip, _name) + +NETLIB_SUBDEVICE(9310_subABCD, + netlist_ttl_input_t m_A; + netlist_ttl_input_t m_B; + netlist_ttl_input_t m_C; + netlist_ttl_input_t m_D; + + ATTR_HOT inline UINT8 read_ABCD(); +); + +NETLIB_SUBDEVICE(9310_sub, + ATTR_HOT void update_outputs_all(const UINT8 cnt); + ATTR_HOT void update_outputs(const UINT8 cnt); + + netlist_ttl_input_t m_CLK; + + netlist_state_t<UINT8> m_cnt; + netlist_state_t<NETLIB_NAME(9310_subABCD) *> m_ABCD; + netlist_state_t<netlist_sig_t> m_loadq; + netlist_state_t<netlist_sig_t> m_ent; + + netlist_ttl_output_t m_QA; + netlist_ttl_output_t m_QB; + netlist_ttl_output_t m_QC; + netlist_ttl_output_t m_QD; + netlist_ttl_output_t m_RC; +); + +NETLIB_DEVICE(9310, + NETLIB_NAME(9310_sub) sub; + NETLIB_NAME(9310_subABCD) subABCD; + netlist_ttl_input_t m_ENP; + netlist_ttl_input_t m_ENT; + netlist_ttl_input_t m_CLRQ; + netlist_ttl_input_t m_LOADQ; +); + +NETLIB_DEVICE_DERIVED(9310_dip, 9310, +); + +#endif /* NLD_9310_H_ */ diff --git a/src/emu/netlist/devices/nld_9312.c b/src/emu/netlist/devices/nld_9312.c new file mode 100644 index 00000000000..2bdaf0714d5 --- /dev/null +++ b/src/emu/netlist/devices/nld_9312.c @@ -0,0 +1,87 @@ +/* + * nld_9312.c + * + */ + +/* + * +---+---+---+---++---+---+ + * | C | B | A | G || Y | YQ| + * +===+===+===+===++===+===+ + * | X | X | X | 1 || 0| 1 | + * | 0 | 0 | 0 | 0 || D0|D0Q| + * | 0 | 0 | 1 | 0 || D1|D1Q| + * | 0 | 1 | 0 | 0 || D2|D2Q| + * | 0 | 1 | 1 | 0 || D3|D3Q| + * | 1 | 0 | 0 | 0 || D4|D4Q| + * | 1 | 0 | 1 | 0 || D5|D5Q| + * | 1 | 1 | 0 | 0 || D6|D6Q| + * | 1 | 1 | 1 | 0 || D7|D7Q| + * +---+---+---+---++---+---+ +*/ +#include "nld_9312.h" + +//#if (USE_TRUTHTABLE) +nld_9312::truthtable_t nld_9312::m_ttbl; + +/* FIXME: Data changes are propagating faster than changing selects A,B,C + * Please refer to data sheet. + * This would require a state machine, thus we do not + * do this right now. + */ + +const char *nld_9312::m_desc[] = { + " C, B, A, G,D0,D1,D2,D3,D4,D5,D6,D7| Y,YQ", + " X, X, X, 1, X, X, X, X, X, X, X, X| 0, 1|33,19", + " 0, 0, 0, 0, 0, X, X, X, X, X, X, X| 0, 1|33,28", + " 0, 0, 0, 0, 1, X, X, X, X, X, X, X| 1, 0|33,28", + " 0, 0, 1, 0, X, 0, X, X, X, X, X, X| 0, 1|33,28", + " 0, 0, 1, 0, X, 1, X, X, X, X, X, X| 1, 0|33,28", + " 0, 1, 0, 0, X, X, 0, X, X, X, X, X| 0, 1|33,28", + " 0, 1, 0, 0, X, X, 1, X, X, X, X, X| 1, 0|33,28", + " 0, 1, 1, 0, X, X, X, 0, X, X, X, X| 0, 1|33,28", + " 0, 1, 1, 0, X, X, X, 1, X, X, X, X| 1, 0|33,28", + " 1, 0, 0, 0, X, X, X, X, 0, X, X, X| 0, 1|33,28", + " 1, 0, 0, 0, X, X, X, X, 1, X, X, X| 1, 0|33,28", + " 1, 0, 1, 0, X, X, X, X, X, 0, X, X| 0, 1|33,28", + " 1, 0, 1, 0, X, X, X, X, X, 1, X, X| 1, 0|33,28", + " 1, 1, 0, 0, X, X, X, X, X, X, 0, X| 0, 1|33,28", + " 1, 1, 0, 0, X, X, X, X, X, X, 1, X| 1, 0|33,28", + " 1, 1, 1, 0, X, X, X, X, X, X, X, 0| 0, 1|33,28", + " 1, 1, 1, 0, X, X, X, X, X, X, X, 1| 1, 0|33,28", + "" +}; +//#endif + + +NETLIB_START(9312_dip) +{ + register_sub(m_sub, "1"); + + register_subalias("13", m_sub.m_i[0]); + register_subalias("12", m_sub.m_i[1]); + register_subalias("11", m_sub.m_i[2]); + register_subalias("10", m_sub.m_i[3]); + + register_subalias("1", m_sub.m_i[4]); + register_subalias("2", m_sub.m_i[5]); + register_subalias("3", m_sub.m_i[6]); + register_subalias("4", m_sub.m_i[7]); + register_subalias("5", m_sub.m_i[8]); + register_subalias("6", m_sub.m_i[9]); + register_subalias("7", m_sub.m_i[10]); + register_subalias("9", m_sub.m_i[11]); + + register_subalias("15", m_sub.m_Q[0]); // Y + register_subalias("14", m_sub.m_Q[1]); // YQ +} + +NETLIB_UPDATE(9312_dip) +{ + /* only called during startup */ + m_sub.update_dev(); +} + +NETLIB_RESET(9312_dip) +{ + m_sub.do_reset(); +} diff --git a/src/emu/netlist/devices/nld_9312.h b/src/emu/netlist/devices/nld_9312.h new file mode 100644 index 00000000000..677197d00cf --- /dev/null +++ b/src/emu/netlist/devices/nld_9312.h @@ -0,0 +1,57 @@ +// license:GPL-2.0+ +// copyright-holders:Couriersud +/* + * nld_9312.h + * + * DM9312: One of Eight Line Data Selectors/Multiplexers + * + * +--------------+ + * D0 |1 ++ 16| VCC + * D1 |2 15| Y + * D2 |3 14| YQ + * D3 |4 9312 13| C + * D4 |5 12| B + * D5 |6 11| A + * D6 |7 10| G Strobe + * GND |8 9| D7 + * +--------------+ + * __ + * +---+---+---+---++---+---+ + * | C | B | A | G || Y | YQ| + * +===+===+===+===++===+===+ + * | X | X | X | 1 || 0| 1 | + * | 0 | 0 | 0 | 0 || D0|D0Q| + * | 0 | 0 | 1 | 0 || D1|D1Q| + * | 0 | 1 | 0 | 0 || D2|D2Q| + * | 0 | 1 | 1 | 0 || D3|D3Q| + * | 1 | 0 | 0 | 0 || D4|D4Q| + * | 1 | 0 | 1 | 0 || D5|D5Q| + * | 1 | 1 | 0 | 0 || D6|D6Q| + * | 1 | 1 | 1 | 0 || D7|D7Q| + * +---+---+---+---++---+---+ + * + * Naming conventions follow National Semiconductor datasheet + * + */ + +#ifndef NLD_9312_H_ +#define NLD_9312_H_ + +#include "nld_signal.h" + +#define TTL_9312(_name) \ + NET_REGISTER_DEV(9312, _name) +//#if (USE_TRUTHTABLE) +#include "nld_truthtable.h" +NETLIB_TRUTHTABLE(9312, 12, 2, 0); +//#endif + + +#define TTL_9312_DIP(_name) \ + NET_REGISTER_DEV(9312_dip, _name) + +NETLIB_DEVICE(9312_dip, + NETLIB_NAME(9312) m_sub; +); + +#endif /* NLD_9312_H_ */ diff --git a/src/emu/netlist/devices/nld_9316.c b/src/emu/netlist/devices/nld_9316.c index 017ee599f26..62201d14ead 100644 --- a/src/emu/netlist/devices/nld_9316.c +++ b/src/emu/netlist/devices/nld_9316.c @@ -5,6 +5,8 @@ #include "nld_9316.h" +#define MAXCNT 15 + NETLIB_START(9316) { register_sub(subABCD, "subABCD"); @@ -73,9 +75,9 @@ NETLIB_START(9316_sub) register_output("QD", m_QD); register_output("RC", m_RC); - save(NLNAME(m_cnt.ref())); - save(NLNAME(m_loadq.ref())); - save(NLNAME(m_ent.ref())); + save(NLNAME(m_cnt)); + save(NLNAME(m_loadq)); + save(NLNAME(m_ent)); } NETLIB_RESET(9316_sub) @@ -88,26 +90,37 @@ NETLIB_RESET(9316_sub) NETLIB_UPDATE(9316_sub) { - UINT8 cnt = m_cnt; if (m_loadq) { - cnt = ( cnt + 1) & 0x0f; - update_outputs(cnt); - OUTLOGIC(m_RC, m_ent & (cnt == 0x0f), NLTIME_FROM_NS(20)); #if 0 - if (cnt == 0x0f) - OUTLOGIC(m_RC, m_ent, NLTIME_FROM_NS(20)); - else if (cnt == 0) - OUTLOGIC(m_RC, 0, NLTIME_FROM_NS(20)); + m_cnt = (m_cnt < MAXCNT) ? m_cnt + 1 : 0; + update_outputs(m_cnt); + OUTLOGIC(m_RC, m_ent & (m_cnt == MAXCNT), NLTIME_FROM_NS(20)); +#else + switch (m_cnt.get()) + { + case 0x0e: + m_cnt = 0x0f; + OUTLOGIC(m_RC, m_ent, NLTIME_FROM_NS(20)); + OUTLOGIC(m_QA, 1, NLTIME_FROM_NS(20)); + break; + case 0x0f: + OUTLOGIC(m_RC, 0, NLTIME_FROM_NS(20)); + m_cnt = 0; + update_outputs_all(m_cnt); + break; + default: + m_cnt++; + update_outputs(m_cnt); + } #endif } else { - cnt = m_ABCD.get()->read_ABCD(); - update_outputs_all(cnt); - OUTLOGIC(m_RC, m_ent & (cnt == 0x0f), NLTIME_FROM_NS(20)); + m_cnt = m_ABCD.get()->read_ABCD(); + update_outputs_all(m_cnt); + OUTLOGIC(m_RC, m_ent & (m_cnt == MAXCNT), NLTIME_FROM_NS(20)); } - m_cnt = cnt; } NETLIB_UPDATE(9316) @@ -119,21 +132,19 @@ NETLIB_UPDATE(9316) if ((!sub.m_loadq || (sub.m_ent & INPLOGIC(m_ENP))) && clrq) { sub.m_CLK.activate_lh(); + OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == MAXCNT), NLTIME_FROM_NS(20)); } else { - UINT8 cnt = sub.m_cnt; sub.m_CLK.inactivate(); - if (!clrq && (cnt>0)) + if (!clrq && (sub.m_cnt>0)) { - cnt = 0; - sub.update_outputs(cnt); - //OUTLOGIC(sub.m_RC, 0, NLTIME_FROM_NS(20)); - sub.m_cnt = cnt; + sub.update_outputs(0); + sub.m_cnt = 0; //return; } + OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == MAXCNT), NLTIME_FROM_NS(20)); } - OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == 0x0f), NLTIME_FROM_NS(20)); } inline NETLIB_FUNC_VOID(9316_sub, update_outputs_all, (const UINT8 cnt)) @@ -147,8 +158,8 @@ inline NETLIB_FUNC_VOID(9316_sub, update_outputs_all, (const UINT8 cnt)) inline NETLIB_FUNC_VOID(9316_sub, update_outputs, (const UINT8 cnt)) { - const netlist_time out_delay = NLTIME_FROM_NS(20); -#if 1 + static const netlist_time out_delay = NLTIME_FROM_NS(20); +#if 0 // for (int i=0; i<4; i++) // OUTLOGIC(m_Q[i], (cnt >> i) & 1, delay[i]); OUTLOGIC(m_QA, (cnt >> 0) & 1, out_delay); diff --git a/src/emu/netlist/devices/nld_legacy.c b/src/emu/netlist/devices/nld_legacy.c index e73aff6530b..554476c52c3 100644 --- a/src/emu/netlist/devices/nld_legacy.c +++ b/src/emu/netlist/devices/nld_legacy.c @@ -33,3 +33,38 @@ NETLIB_UPDATE(nicRSFF) OUTLOGIC(m_QQ, 1, NLTIME_FROM_NS(20)); } } + +NETLIB_START(nicDelay) +{ + register_input("1", m_I); + register_output("2", m_Q); + + register_param("L_TO_H", m_L_to_H, 10); + register_param("H_TO_L", m_H_to_L, 10); + + save(NLNAME(m_last)); + +} + +NETLIB_RESET(nicDelay) +{ + m_Q.initial(0); +} + +NETLIB_UPDATE_PARAM(nicDelay) +{ +} + +NETLIB_UPDATE(nicDelay) +{ + if (INPLOGIC(m_I) && !m_last) + { + // L_to_H + OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(m_L_to_H.Value())); + } + else if (!INPLOGIC(m_I) && m_last) + { + OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(m_H_to_L.Value())); + } + m_last = INPLOGIC(m_I); +} diff --git a/src/emu/netlist/devices/nld_legacy.h b/src/emu/netlist/devices/nld_legacy.h index 3ea50f601fd..f9e085bf65f 100644 --- a/src/emu/netlist/devices/nld_legacy.h +++ b/src/emu/netlist/devices/nld_legacy.h @@ -22,6 +22,9 @@ #define NETDEV_RSFF(_name) \ NET_REGISTER_DEV(nicRSFF, _name) +#define NETDEV_DELAY(_name) \ + NET_REGISTER_DEV(nicDelay, _name) + // ---------------------------------------------------------------------------------------- // Devices ... // ---------------------------------------------------------------------------------------- @@ -35,4 +38,16 @@ NETLIB_DEVICE(nicRSFF, ); +NETLIB_DEVICE_WITH_PARAMS(nicDelay, + netlist_ttl_input_t m_I; + + netlist_ttl_output_t m_Q; + + netlist_param_int_t m_L_to_H; + netlist_param_int_t m_H_to_L; + + netlist_state_t<UINT8> m_last; +); + + #endif /* NLD_LEGACY_H_ */ diff --git a/src/emu/netlist/devices/nld_ne555.c b/src/emu/netlist/devices/nld_ne555.c index d7cef43fa34..3a3646a01c8 100644 --- a/src/emu/netlist/devices/nld_ne555.c +++ b/src/emu/netlist/devices/nld_ne555.c @@ -43,6 +43,7 @@ NETLIB_START(NE555) connect(m_RDIS.m_N, m_R3.m_N); save(NLNAME(m_last_out)); + save(NLNAME(m_ff)); } NETLIB_RESET(NE555) @@ -63,33 +64,35 @@ NETLIB_RESET(NE555) NETLIB_UPDATE(NE555) { // FIXME: assumes GND is connected to 0V. + // FIXME: Hookup RESET! nl_double vt = clamp(TERMANALOG(m_R2.m_P), 0.7, 1.4); bool bthresh = (INPANALOG(m_THRES) > vt); bool btrig = (INPANALOG(m_TRIG) > clamp(TERMANALOG(m_R2.m_N), 0.7, 1.4)); - bool out = m_last_out; if (!btrig) { - out = true; + m_ff = true; } else if (bthresh) { - out = false; + m_ff = false; } - if (!m_last_out && out) + bool out = (!INPLOGIC(m_RESET) ? false : m_ff.get()); + + if (m_last_out && !out) { m_RDIS.update_dev(); - // FIXME: Should be delayed by 100ns - OUTANALOG(m_OUT, TERMANALOG(m_R1.m_P)); - m_RDIS.set_R(R_OFF); + OUTANALOG(m_OUT, TERMANALOG(m_R3.m_N)); + m_RDIS.set_R(R_ON); } - else if (m_last_out && !out) + else if (!m_last_out && out) { m_RDIS.update_dev(); - OUTANALOG(m_OUT, TERMANALOG(m_R3.m_N)); - m_RDIS.set_R(R_ON); + // FIXME: Should be delayed by 100ns + OUTANALOG(m_OUT, TERMANALOG(m_R1.m_P)); + m_RDIS.set_R(R_OFF); } m_last_out = out; } diff --git a/src/emu/netlist/devices/nld_ne555.h b/src/emu/netlist/devices/nld_ne555.h index e8175fb7bcd..1d70dc9e170 100644 --- a/src/emu/netlist/devices/nld_ne555.h +++ b/src/emu/netlist/devices/nld_ne555.h @@ -38,6 +38,7 @@ NETLIB_DEVICE(NE555, netlist_analog_output_t m_OUT; netlist_state_t<bool> m_last_out; + netlist_state_t<bool> m_ff; inline nl_double clamp(const nl_double v, const nl_double a, const nl_double b); diff --git a/src/emu/netlist/devices/nld_signal.h b/src/emu/netlist/devices/nld_signal.h index 2f703e955da..591d45287bc 100644 --- a/src/emu/netlist/devices/nld_signal.h +++ b/src/emu/netlist/devices/nld_signal.h @@ -49,13 +49,13 @@ public: ATTR_COLD void reset() { - m_Q[0].initial(1); + m_Q[0].initial(0); m_active = 1; } -#if (USE_DEACTIVE_DEVICE) ATTR_HOT void inc_active() { + nl_assert(netlist().use_deactivate()); if (++m_active == 1) { update(); @@ -64,21 +64,21 @@ public: ATTR_HOT void dec_active() { + nl_assert(netlist().use_deactivate()); if (--m_active == 0) { for (int i = 0; i< _numdev; i++) m_i[i].inactivate(); } } -#endif virtual void update() { const netlist_time times[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22)}; // FIXME: this check is needed because update is called during startup as well - if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0)) - return; + //if (m_active == 0 && netlist().use_deactivate()) + // return; for (int i = 0; i< _numdev; i++) { @@ -123,13 +123,13 @@ public: ATTR_COLD void reset() { - m_Q[0].initial(1); + m_Q[0].initial(0); m_active = 1; } -#if (USE_DEACTIVE_DEVICE) ATTR_HOT virtual void inc_active() { + nl_assert(netlist().use_deactivate()); if (++m_active == 1) { update(); @@ -138,21 +138,21 @@ public: ATTR_HOT virtual void dec_active() { + nl_assert(netlist().use_deactivate()); if (--m_active == 0) { m_i[0].inactivate(); m_i[1].inactivate(); } } -#endif ATTR_HOT ATTR_ALIGN void update() { const netlist_time times[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22)}; // FIXME: this check is needed because update is called during startup as well - if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0)) - return; + //if (m_active == 0 && netlist().use_deactivate()) + // return; m_i[0].activate(); m_i[1].activate(); diff --git a/src/emu/netlist/devices/nld_system.c b/src/emu/netlist/devices/nld_system.c index 4d02f5e9157..b4232819f05 100644 --- a/src/emu/netlist/devices/nld_system.c +++ b/src/emu/netlist/devices/nld_system.c @@ -135,3 +135,55 @@ ATTR_HOT ATTR_ALIGN void nld_d_to_a_proxy::update() } } } + + +// ----------------------------------------------------------------------------- +// nld_res_sw +// ----------------------------------------------------------------------------- + +NETLIB_START(res_sw) +{ + register_sub(m_R, "R"); + register_input("I", m_I); + register_param("RON", m_RON, 1.0); + register_param("ROFF", m_ROFF, 1.0E20); + + register_subalias("1", m_R.m_P); + register_subalias("2", m_R.m_N); + + save(NLNAME(m_last_state)); +} + +NETLIB_RESET(res_sw) +{ + m_last_state = 0; + m_R.set_R(m_ROFF.Value()); +} + +NETLIB_UPDATE(res_sw) +{ + const int state = INPLOGIC(m_I); + if (state != m_last_state) + { + m_last_state = state; + const nl_double R = state ? m_RON.Value() : m_ROFF.Value(); + + // We only need to update the net first if this is a time stepping net + if (1) // m_R.m_P.net().as_analog().solver()->is_timestep()) + { + m_R.update_dev(); + m_R.set_R(R); + m_R.m_P.schedule_after(NLTIME_FROM_NS(1)); + } + else + { + m_R.set_R(R); + m_R.update_dev(); + } + } +} + +NETLIB_UPDATE_PARAM(res_sw) +{ + // nothing, not intended to be called +} diff --git a/src/emu/netlist/devices/nld_system.h b/src/emu/netlist/devices/nld_system.h index 644264eea13..40edb1eb310 100644 --- a/src/emu/netlist/devices/nld_system.h +++ b/src/emu/netlist/devices/nld_system.h @@ -43,6 +43,14 @@ NET_REGISTER_DEV(frontier, _name) \ NET_C(_IN, _name.I) \ NET_C(_OUT, _name.Q) + +#define RES_SWITCH(_name, _IN, _P1, _P2) \ + NET_REGISTER_DEV(res_sw, _name) \ + NET_C(_IN, _name.I) \ + NET_C(_P1, _name.1) \ + NET_C(_P2, _name.2) \ + + // ----------------------------------------------------------------------------- // mainclock // ----------------------------------------------------------------------------- @@ -186,6 +194,34 @@ private: }; +// ----------------------------------------------------------------------------- +// nld_res_sw +// ----------------------------------------------------------------------------- + +class NETLIB_NAME(res_sw) : public netlist_device_t +{ +public: + ATTR_COLD NETLIB_NAME(res_sw)() + : netlist_device_t() { } + + ATTR_COLD virtual ~NETLIB_NAME(res_sw)() {} + + netlist_param_double_t m_RON; + netlist_param_double_t m_ROFF; + netlist_ttl_input_t m_I; + NETLIB_NAME(R) m_R; + +protected: + + ATTR_COLD void start(); + ATTR_COLD void reset(); + ATTR_HOT ATTR_ALIGN void update(); + ATTR_HOT ATTR_ALIGN void update_param(); + +private: + netlist_state_t<UINT8> m_last_state; +}; + // ----------------------------------------------------------------------------- // netdev_a_to_d diff --git a/src/emu/netlist/devices/nld_truthtable.h b/src/emu/netlist/devices/nld_truthtable.h index be5d0703445..a503a77d856 100644 --- a/src/emu/netlist/devices/nld_truthtable.h +++ b/src/emu/netlist/devices/nld_truthtable.h @@ -50,19 +50,19 @@ public: { nl_util::pstring_list io = nl_util::split(ttline,"|"); // checks - nl_assert(io.count() == 2); + nl_assert_always(io.count() == 2, "too many '|'"); nl_util::pstring_list inout = nl_util::split(io[0], ","); - nl_assert(inout.count() == m_num_bits); + nl_assert_always(inout.count() == m_num_bits, "bitcount wrong"); nl_util::pstring_list out = nl_util::split(io[1], ","); - nl_assert(out.count() == m_NO); + nl_assert_always(out.count() == m_NO, "output count wrong"); for (int i=0; i < m_NI; i++) { - register_input(inout[i], m_i[i]); + register_input(inout[i].trim(), m_i[i]); } for (int i=0; i < m_NO; i++) { - register_output(out[i], m_Q[i]); + register_output(out[i].trim(), m_Q[i]); } } setup_tt(); @@ -72,7 +72,7 @@ public: ATTR_COLD void help(int cur, nl_util::pstring_list list, UINT64 state, UINT64 ignore, UINT16 val, UINT8 timing_index[m_NO]) { - pstring elem = list[cur]; + pstring elem = list[cur].trim(); int start = 0; int end = 0; int ign = 0; @@ -93,6 +93,8 @@ public: end = 1; ign = 1; } + else + nl_assert_always(false, "unknown input value (not 0, 1, or X)"); for (int i = start; i <= end; i++) { const UINT64 nstate = state | (i << cur); @@ -133,21 +135,24 @@ public: { nl_util::pstring_list io = nl_util::split(ttline,"|"); // checks - nl_assert(io.count() == 3); + nl_assert_always(io.count() == 3, "io.count mismatch"); nl_util::pstring_list inout = nl_util::split(io[0], ","); - nl_assert(inout.count() == m_num_bits); + nl_assert_always(inout.count() == m_num_bits, "number of bits not matching"); nl_util::pstring_list out = nl_util::split(io[1], ","); - nl_assert(out.count() == m_NO); + nl_assert_always(out.count() == m_NO, "output count not matching"); nl_util::pstring_list times = nl_util::split(io[2], ","); - nl_assert(times.count() == m_NO); + nl_assert_always(times.count() == m_NO, "timing count not matching"); UINT16 val = 0; UINT8 tindex[m_NO]; for (int j=0; j<m_NO; j++) { - if (out[j].equals("1")) + pstring outs = out[j].trim(); + if (outs.equals("1")) val = val | (1 << j); - netlist_time t = netlist_time::from_nsec(times[j].as_long()); + else + nl_assert_always(outs.equals("0"), "Unknown value (not 0 or 1"); + netlist_time t = netlist_time::from_nsec(times[j].trim().as_long()); int k=0; while (m_ttp->m_timing_nt[k] != netlist_time::zero && m_ttp->m_timing_nt[k] != t) k++; @@ -159,12 +164,13 @@ public: ttline = pstring(truthtable[0]); truthtable++; } +#if 0 for (int j=0; j < m_size; j++) printf("%05x %04x %04x %04x\n", j, m_ttp->m_outs[j] & ((1 << m_NO)-1), m_ttp->m_outs[j] >> m_NO, m_ttp->m_timing[j][0]); for (int k=0; m_ttp->m_timing_nt[k] != netlist_time::zero; k++) printf("%d %f\n", k, m_ttp->m_timing_nt[k].as_double() * 1000000.0); - +#endif m_ttp->m_initialized = true; } @@ -178,38 +184,35 @@ public: ATTR_HOT ATTR_ALIGN void update() { - //const netlist_time times[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22)}; - // FIXME: this check is needed because update is called during startup as well - if (UNEXPECTED(USE_DEACTIVE_DEVICE && m_active == 0)) - return; + //if (m_active == 0 && UNEXPECTED(netlist().use_deactivate())) + // return; UINT32 state = 0; - for (int i=0; i< m_NI; i++) + for (int i = 0; i < m_NI; i++) { m_i[i].activate(); - state = state | (INPLOGIC(m_i[i]) << i); + state |= (INPLOGIC(m_i[i]) << i); } - const UINT32 nstate = (has_state ? state | (m_last_state << m_NI) : state); + const UINT32 nstate = state | (has_state ? (m_last_state << m_NI) : 0); const UINT32 out = m_ttp->m_outs[nstate] & ((1 << m_NO) - 1); const UINT32 ign = m_ttp->m_outs[nstate] >> m_NO; - if (has_state) m_last_state = (state << m_NO) | out; + if (has_state) + m_last_state = (state << m_NO) | out; - for (int i=0; i< m_NI; i++) + for (int i = 0; i < m_NI; i++) if (ign & (1 << i)) m_i[i].inactivate(); - for (int i=0; i<m_NO; i++) -// OUTLOGIC(m_Q[i], (out >> i) & 1, times[(out >> i) & 1]);// ? 22000 : 15000); - OUTLOGIC(m_Q[i], (out >> i) & 1, m_ttp->m_timing_nt[m_ttp->m_timing[nstate][i]]);// ? 22000 : 15000); - + for (int i = 0; i < m_NO; i++) + OUTLOGIC(m_Q[i], (out >> i) & 1, m_ttp->m_timing_nt[m_ttp->m_timing[nstate][i]]); } -#if (USE_DEACTIVE_DEVICE) ATTR_HOT void inc_active() { + nl_assert(netlist().use_deactivate()); if (++m_active == 1) { update(); @@ -218,13 +221,13 @@ public: ATTR_HOT void dec_active() { + nl_assert(netlist().use_deactivate()); if (--m_active == 0) { for (int i = 0; i< m_NI; i++) m_i[i].inactivate(); } } -#endif netlist_ttl_input_t m_i[m_NI]; netlist_ttl_output_t m_Q[m_NO]; diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c index 8a4d0089c7b..8ff545dbfa3 100644 --- a/src/emu/netlist/nl_base.c +++ b/src/emu/netlist/nl_base.c @@ -137,6 +137,9 @@ ATTR_COLD void netlist_owned_object_t::init_object(netlist_core_device_t &dev, netlist_base_t::netlist_base_t() : netlist_object_t(NETLIST, GENERIC), + m_stop(netlist_time::zero), + // FIXME:: Use a parameter to set this on a schematics per schematics basis + m_use_deactivate(USE_DEACTIVE_DEVICE), m_time(netlist_time::zero), m_queue(*this), m_mainclock(NULL), @@ -179,6 +182,8 @@ ATTR_COLD void netlist_base_t::start() { /* find the main clock and solver ... */ + NL_VERBOSE_OUT(("Searching for mainclock and solver ...\n")); + m_mainclock = get_single_device<NETLIB_NAME(mainclock)>("mainclock"); m_solver = get_single_device<NETLIB_NAME(solver)>("solver"); m_gnd = get_single_device<NETLIB_NAME(gnd)>("gnd"); @@ -249,7 +254,7 @@ ATTR_COLD void netlist_base_t::reset() } -ATTR_HOT ATTR_ALIGN void netlist_base_t::process_queue(const netlist_time delta) +ATTR_HOT ATTR_ALIGN void netlist_base_t::process_queue(const netlist_time &delta) { m_stop = m_time + delta; @@ -335,6 +340,10 @@ ATTR_COLD void netlist_base_t::log(const char *format, ...) const ATTR_COLD netlist_core_device_t::netlist_core_device_t(const family_t afamily) : netlist_object_t(DEVICE, afamily) +#if (NL_KEEP_STATISTICS) + , total_time(0) + , stat_count(0) +#endif { } @@ -494,26 +503,28 @@ ATTR_HOT void netlist_net_t::inc_active(netlist_core_terminal_t &term) m_list_active.insert(term); - if (USE_DEACTIVE_DEVICE) + if (m_active == 1) { - if (m_active == 1 && m_in_queue > 0) + if (m_in_queue == 0) { - railterminal().netdev().inc_active(); - m_cur_Q = m_new_Q; - } - } - - if (m_active == 1 && m_in_queue == 0) - { - if (m_time > netlist().time()) - { - m_in_queue = 1; /* pending */ - netlist().push_to_queue(this, m_time); + if (m_time > netlist().time()) + { + m_in_queue = 1; /* pending */ + netlist().push_to_queue(*this, m_time); + } + else + { + m_cur_Q = m_new_Q; + m_in_queue = 2; + } } else { - m_cur_Q = m_new_Q; - m_in_queue = 2; + if (netlist().use_deactivate()) + { + railterminal().netdev().inc_active(); + m_cur_Q = m_new_Q; + } } } } @@ -523,11 +534,8 @@ ATTR_HOT void netlist_net_t::dec_active(netlist_core_terminal_t &term) m_active--; m_list_active.remove(term); - if (USE_DEACTIVE_DEVICE) - { - if (m_active == 0) + if (m_active == 0 && netlist().use_deactivate()) railterminal().netdev().dec_active(); - } } ATTR_COLD void netlist_net_t::register_railterminal(netlist_output_t &mr) @@ -565,7 +573,7 @@ ATTR_HOT ATTR_ALIGN static inline void update_dev(const netlist_core_terminal_t begin_timing(netdev.total_time); inc_stat(netdev.stat_count); netdev.update_dev(); - end_timing(netdev().total_time); + end_timing(netdev.total_time); } } @@ -671,6 +679,7 @@ ATTR_COLD void netlist_net_t::merge_net(netlist_net_t *othernet) } } + // ---------------------------------------------------------------------------------------- // netlist_logic_net_t // ---------------------------------------------------------------------------------------- @@ -1001,3 +1010,13 @@ NETLIB_UPDATE(mainclock) net.toggle_new_Q(); net.set_time(netlist().time() + m_inc); } + +ATTR_HOT void netlist_base_t::push_to_queue(netlist_net_t &out, const netlist_time &attime) +{ + m_queue.push(netlist_queue_t::entry_t(attime, &out)); +} + +ATTR_HOT void netlist_base_t::remove_from_queue(netlist_net_t &out) +{ + m_queue.remove(&out); +} diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h index d8af15e53f8..4e83546c184 100644 --- a/src/emu/netlist/nl_base.h +++ b/src/emu/netlist/nl_base.h @@ -166,7 +166,9 @@ // Type definitions // ---------------------------------------------------------------------------------------- -typedef UINT8 netlist_sig_t; +//typedef UINT8 netlist_sig_t; + +#define netlist_sig_t UINT8 class netlist_core_device_t; @@ -619,14 +621,14 @@ public: ATTR_HOT void update_devs(); - ATTR_HOT inline const netlist_time time() const { return m_time; } - ATTR_HOT inline void set_time(const netlist_time ntime) { m_time = ntime; } + ATTR_HOT inline const netlist_time &time() const { return m_time; } + ATTR_HOT inline void set_time(const netlist_time &ntime) { m_time = ntime; } ATTR_HOT inline bool isRailNet() const { return !(m_railterminal == NULL); } ATTR_HOT inline const netlist_core_terminal_t & RESTRICT railterminal() const { return *m_railterminal; } - ATTR_HOT inline void push_to_queue(const netlist_time delay); - ATTR_HOT inline void reschedule_in_queue(const netlist_time delay); + ATTR_HOT inline void push_to_queue(const netlist_time &delay); + ATTR_HOT inline void reschedule_in_queue(const netlist_time &delay); ATTR_HOT bool inline is_queued() const { return m_in_queue == 1; } ATTR_HOT inline int num_cons() const { return m_core_terms.count(); } @@ -685,7 +687,7 @@ public: return m_new_Q; } - ATTR_HOT inline void set_Q(const netlist_sig_t newQ, const netlist_time delay) + ATTR_HOT inline void set_Q(const netlist_sig_t &newQ, const netlist_time &delay) { if (EXPECTED(newQ != m_new_Q)) { @@ -806,7 +808,7 @@ public: ATTR_COLD nld_base_d_to_a_proxy *get_proxy() const { return m_proxy; } ATTR_COLD void set_proxy(nld_base_d_to_a_proxy *proxy) { m_proxy = proxy; } - ATTR_HOT inline void set_Q(const netlist_sig_t newQ, const netlist_time delay) + ATTR_HOT inline void set_Q(const netlist_sig_t newQ, const netlist_time &delay) { net().as_logic().set_Q(newQ, delay); } @@ -992,7 +994,7 @@ public: return inp.Q(); } - ATTR_HOT inline void OUTLOGIC(netlist_logic_output_t &out, const netlist_sig_t val, const netlist_time delay) + ATTR_HOT inline void OUTLOGIC(netlist_logic_output_t &out, const netlist_sig_t val, const netlist_time &delay) { out.set_Q(val, delay); } @@ -1117,24 +1119,19 @@ public: ATTR_HOT inline const netlist_queue_t &queue() const { return m_queue; } ATTR_HOT inline netlist_queue_t &queue() { return m_queue; } - ATTR_HOT inline const netlist_time time() const { return m_time; } + ATTR_HOT inline const netlist_time &time() const { return m_time; } ATTR_HOT inline NETLIB_NAME(solver) *solver() const { return m_solver; } ATTR_HOT inline NETLIB_NAME(gnd) *gnd() const { return m_gnd; } ATTR_HOT const nl_double gmin() const; - ATTR_HOT inline void push_to_queue(netlist_net_t *out, const netlist_time attime) - { - m_queue.push(netlist_queue_t::entry_t(attime, out)); - } + ATTR_HOT void push_to_queue(netlist_net_t &out, const netlist_time &attime); + ATTR_HOT void remove_from_queue(netlist_net_t &out); - ATTR_HOT inline void remove_from_queue(netlist_net_t *out) - { - m_queue.remove(out); - } - - ATTR_HOT void process_queue(const netlist_time delta); + ATTR_HOT void process_queue(const netlist_time &delta); ATTR_HOT inline void abort_current_queue_slice() { m_stop = netlist_time::zero; } + ATTR_HOT inline const bool &use_deactivate() const { return m_use_deactivate; } + ATTR_COLD void rebuild_lists(); /* must be called after post_load ! */ ATTR_COLD void set_setup(netlist_setup_t *asetup) { m_setup = asetup; } @@ -1219,6 +1216,7 @@ protected: private: netlist_time m_stop; // target time for current queue processing + bool m_use_deactivate; netlist_time m_time; netlist_queue_t m_queue; @@ -1322,7 +1320,7 @@ ATTR_HOT inline void netlist_logic_input_t::activate_lh() } -ATTR_HOT inline void netlist_net_t::push_to_queue(const netlist_time delay) +ATTR_HOT inline void netlist_net_t::push_to_queue(const netlist_time &delay) { //if (UNEXPECTED(m_num_cons == 0 || is_queued())) if (!is_queued()) @@ -1331,22 +1329,22 @@ ATTR_HOT inline void netlist_net_t::push_to_queue(const netlist_time delay) m_in_queue = (m_active > 0); /* queued ? */ if (EXPECTED(m_in_queue)) { - netlist().push_to_queue(this, m_time); + netlist().push_to_queue(*this, m_time); } } } -ATTR_HOT inline void netlist_net_t::reschedule_in_queue(const netlist_time delay) +ATTR_HOT inline void netlist_net_t::reschedule_in_queue(const netlist_time &delay) { //if (UNEXPECTED(m_num_cons == 0 || is_queued())) if (is_queued()) - netlist().remove_from_queue(this); + netlist().remove_from_queue(*this); m_time = netlist().time() + delay; m_in_queue = (m_active > 0); /* queued ? */ if (EXPECTED(m_in_queue)) { - netlist().push_to_queue(this, m_time); + netlist().push_to_queue(*this, m_time); } } diff --git a/src/emu/netlist/nl_config.h b/src/emu/netlist/nl_config.h index 966163bb053..4398e992fe1 100644 --- a/src/emu/netlist/nl_config.h +++ b/src/emu/netlist/nl_config.h @@ -8,10 +8,11 @@ #ifndef NLCONFIG_H_ #define NLCONFIG_H_ -/* FIXME: at some time, make it compile on it's own */ +/* FIXME: at some time, make it compile on its own */ #include "osdcore.h" #include "corealloc.h" +#include "eminline.h" #include <math.h> #include <exception> #include <typeinfo> @@ -35,11 +36,16 @@ * */ +// FIXME: breakout doesn't like this #define USE_DEACTIVE_DEVICE (0) +#define USE_TRUTHTABLE (0) + // The following adds about 10% performance ... +#if !defined(USE_OPENMP) #define USE_OPENMP (0) +#endif // !defined(USE_OPENMP) // Use nano-second resolution - Sufficient for now #define NETLIST_INTERNAL_RES (U64(1000000000)) @@ -101,8 +107,8 @@ #if NL_KEEP_STATISTICS #define add_to_stat(v,x) do { v += (x); } while (0) #define inc_stat(v) add_to_stat(v, 1) -#define begin_timing(v) do { (v) -= get_profile_ticks(); } while (0) -#define end_timing(v) do { (v) += get_profile_ticks(); } while (0) +#define begin_timing(v) do { v -= get_profile_ticks(); } while (0) +#define end_timing(v) do { v += get_profile_ticks(); } while (0) #else #define add_to_stat(v,x) do { } while (0) #define inc_stat(v) add_to_stat(v, 1) @@ -242,7 +248,7 @@ __extension__ typedef signed long long INT64; #if (USE_OPENMP) #if (!(HAS_OPENMP)) -#warning To use openmp compile and link with "-fopenmp" +#error To use openmp compile and link with "-fopenmp" #endif #endif diff --git a/src/emu/netlist/nl_dice_compat.h b/src/emu/netlist/nl_dice_compat.h index 001170cd14b..552797cfbc9 100644 --- a/src/emu/netlist/nl_dice_compat.h +++ b/src/emu/netlist/nl_dice_compat.h @@ -35,8 +35,12 @@ #define CIRCUIT_LAYOUT_END NETLIST_END() +#define OHM(x) (x) #define K_OHM(x) ((x) * 1000.0) +#define M_OHM(x) ((x) * 1.0e6) #define U_FARAD(x) ((x) * 1.0e-6) +#define N_FARAD(x) ((x) * 1.0e-9) +#define P_FARAD(x) ((x) * 1.0e-12) struct Mono555Desc { @@ -46,6 +50,23 @@ public: Mono555Desc(nl_double res, nl_double cap) : r(res), c(cap) { } }; +struct Astable555Desc +{ +public: + nl_double r1, r2, c; + + Astable555Desc(nl_double res1, nl_double res2, nl_double cap) : r1(res1), r2(res2), c(cap) { } +}; + +struct Mono9602Desc +{ +public: + nl_double r1, c1, r2, c2; + + Mono9602Desc(nl_double res1, nl_double cap1, nl_double res2, nl_double cap2) + : r1(res1), c1(cap1), r2(res2), c2(cap2) { } +}; + struct SeriesRCDesc { public: @@ -54,6 +75,12 @@ public: SeriesRCDesc(nl_double res, nl_double cap) : r(res), c(cap) { } }; +struct CapacitorDesc : public SeriesRCDesc +{ +public: + CapacitorDesc(nl_double cap) : SeriesRCDesc(0.0, cap) { } +}; + #define CHIP_555_Mono(_name, _pdesc) \ CHIP(# _name, NE555) \ NET_C(_name.6, _name.7) \ @@ -66,6 +93,38 @@ public: NET_C(_name.8, V5) \ NET_CSTR(# _name ".1", "GND") +#define CHIP_555_Astable(_name, _pdesc) \ + CHIP(# _name, NE555) \ + RES(_name ## _R1, (_pdesc)->r1) \ + RES(_name ## _R2, (_pdesc)->r2) \ + CAP(_name ## _C, (_pdesc)->c) \ + NET_C(_name.7, _name ## _R1.1) \ + NET_C(_name.7, _name ## _R2.1) \ + NET_C(_name.6, _name ## _R2.2) \ + NET_C(_name.6, _name ## _C.1) \ + NET_C(_name.2, _name ## _C.1) \ + NET_C(_name ## _R1.2, V5) \ + NET_CSTR(# _name "_C.2", "GND") \ + NET_C(_name.8, V5) \ + NET_CSTR(# _name ".1", "GND") + +#define CHIP_9602_Mono(_name, _pdesc) \ + CHIP(# _name, 9602) \ + NET_C(VCC, _name.16) \ + NET_C(GND, _name.8) \ + RES(_name ## _R1, (_pdesc)->r1) \ + CAP(_name ## _C1, (_pdesc)->c1) \ + RES(_name ## _R2, (_pdesc)->r2) \ + NET_C(_name.1, _name ## _C1.1) \ + NET_C(_name.2, _name ## _C1.2) \ + NET_C(_name.2, _name ## _R1.2) \ + NET_C(VCC, _name ## _R1.1) \ + if (((_pdesc)->c2)>1e-15) { \ + CAP(_name ## _C2, (_pdesc)->c2) \ + NET_C(_name.15, _name ## _C2.1) \ + NET_C(_name.14, _name ## _C2.2) }\ + NET_C(_name.14, _name ## _R2.2) \ + NET_C(VCC, _name ## _R2.1) #define CHIP_SERIES_RC(_name, _pdesc) \ RES(_name ## _R, (_pdesc)->r) \ CAP(_name ## _C, (_pdesc)->c) \ @@ -92,6 +151,20 @@ public: ALIAS(_name.2, _name.S) \ ALIAS(_name.3, _name.QQ) +/* FIXME: Alternative implementation using capacitor. + * This is a transitional implementation + */ +inline int CAPACITOR_tc(const double c, const double r) +{ + static const double TIME_CONSTANT = -log((3.4 - 2.0) / 3.4); + int ret = (int) (TIME_CONSTANT * (130.0 + r) * c * 1e9 * 0.1); // 0.1 avoids bricks with shadow + return ret; +} + +#define CHIP_CAPACITOR(_name, _pdesc) \ + NETDEV_DELAY(_name) \ + NETDEV_PARAMI(_name, L_TO_H, CAPACITOR_tc((_pdesc)->c, (_pdesc)->r)) \ + NETDEV_PARAMI(_name, H_TO_HL, CAPACITOR_tc((_pdesc)->c, (_pdesc)->r)) #endif /* NL_DICE_COMPAT_H_ */ diff --git a/src/emu/netlist/nl_lists.h b/src/emu/netlist/nl_lists.h index ea2cf597e1b..b0bfdd9b517 100644 --- a/src/emu/netlist/nl_lists.h +++ b/src/emu/netlist/nl_lists.h @@ -27,14 +27,20 @@ public: { public: ATTR_HOT inline entry_t() - : m_exec_time(), m_object() {} - ATTR_HOT inline entry_t(const _Time atime, const _Element elem) : m_exec_time(atime), m_object(elem) {} + : m_object(), m_exec_time() {} + ATTR_HOT inline entry_t(const _Time &atime, const _Element &elem) : m_object(elem), m_exec_time(atime) {} ATTR_HOT inline const _Time exec_time() const { return m_exec_time; } ATTR_HOT inline const _Element object() const { return m_object; } + ATTR_HOT inline entry_t &operator=(const entry_t &right) { + m_object = right.m_object; + m_exec_time = right.m_exec_time; + return *this; + } + private: - _Time m_exec_time; _Element m_object; + _Time m_exec_time; }; netlist_timed_queue() @@ -47,11 +53,10 @@ public: ATTR_HOT inline bool is_empty() const { return (m_end == &m_list[0]); } ATTR_HOT inline bool is_not_empty() const { return (m_end > &m_list[0]); } - ATTR_HOT ATTR_ALIGN void push(const entry_t &e) + ATTR_HOT /*ATTR_ALIGN*/ void push(const entry_t &e) { entry_t * i = m_end++; - const _Time e_time = e.exec_time(); - while ((i > &m_list[0]) && (e_time > (i - 1)->exec_time()) ) + while ((i > &m_list[0]) && (e.exec_time() > (i - 1)->exec_time()) ) { *(i) = *(i-1); i--; @@ -72,7 +77,7 @@ public: return (m_end-1); } - ATTR_HOT inline void remove(const _Element elem) + ATTR_HOT /*inline*/ void remove(const _Element &elem) { entry_t * i = m_end - 1; while (i > &m_list[0]) diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c index 9bcb763f14d..0aaf161c887 100644 --- a/src/emu/netlist/nl_setup.c +++ b/src/emu/netlist/nl_setup.c @@ -281,11 +281,9 @@ void netlist_setup_t::register_link_arr(const pstring &terms) nl_util::pstring_list list = nl_util::split(terms,", "); if (list.count() < 2) netlist().error("You must pass at least 2 terminals to NET_C"); - pstring last = list[0]; for (int i = 1; i < list.count(); i++) { - register_link(last, list[i]); - last = list[i]; + register_link(list[0], list[i]); } } @@ -713,9 +711,6 @@ void netlist_setup_t::start_devices() } } - - NL_VERBOSE_OUT(("Searching for mainclock and solver ...\n")); - netlist().start(); } @@ -729,10 +724,10 @@ void netlist_setup_t::print_stats() const { #if (NL_KEEP_STATISTICS) { - for (netlist_setup_t::devices_list_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry)) + for (netlist_device_t * const *entry = netlist().m_devices.first(); entry != NULL; entry = netlist().m_devices.next(entry)) { //entry->object()->s - printf("Device %20s : %12d %15ld\n", entry->object()->name().cstr(), entry->object()->stat_count, (long int) entry->object()->total_time / (entry->object()->stat_count + 1)); + printf("Device %20s : %12d %15ld\n", (*entry)->name().cstr(), (*entry)->stat_count, (long int) (*entry)->total_time / ((*entry)->stat_count + 1)); } printf("Queue Start %15d\n", m_netlist.queue().m_prof_start); printf("Queue End %15d\n", m_netlist.queue().m_prof_end); diff --git a/src/emu/netlist/plists.h b/src/emu/netlist/plists.h index 8f8987d414c..2165be50196 100644 --- a/src/emu/netlist/plists.h +++ b/src/emu/netlist/plists.h @@ -199,7 +199,7 @@ private: // pnamedlist_t: a simple list // ---------------------------------------------------------------------------------------- -#if (defined(__sun__) && defined(__svr4__)) || defined(__ANDROID__) +#if (defined(__sun__) && defined(__svr4__)) || defined(__ANDROID__) || defined(__OpenBSD__) #undef _C #endif diff --git a/src/emu/netlist/pstring.c b/src/emu/netlist/pstring.c index e60f950be1d..3f19cc16a89 100644 --- a/src/emu/netlist/pstring.c +++ b/src/emu/netlist/pstring.c @@ -88,6 +88,53 @@ pstring pstring::ucase() const return ret; } +int pstring::find_first_not_of(const pstring no) const +{ + for (int i=0; i < len(); i++) + { + bool f = true; + for (int j=0; j < no.len(); j++) + if (m_ptr->m_str[i] == no.m_ptr->m_str[j]) + f = false; + if (f) + return i; + } + return -1; +} + +int pstring::find_last_not_of(const pstring no) const +{ + for (int i=len() - 1; i >= 0; i--) + { + bool f = true; + for (int j=0; j < no.len(); j++) + if (m_ptr->m_str[i] == no.m_ptr->m_str[j]) + f = false; + if (f) + return i; + } + return -1; +} + + +pstring pstring::ltrim(const pstring ws) const +{ + int f = find_first_not_of(ws); + if (f>=0) + return substr(f); + else + return ""; +} + +pstring pstring::rtrim(const pstring ws) const +{ + int f = find_last_not_of(ws); + if (f>=0) + return left(f+1); + else + return ""; +} + //------------------------------------------------- // pcmpi - compare a character array to an nstring //------------------------------------------------- diff --git a/src/emu/netlist/pstring.h b/src/emu/netlist/pstring.h index b2b5cd0ae91..6ed539e0c13 100644 --- a/src/emu/netlist/pstring.h +++ b/src/emu/netlist/pstring.h @@ -155,6 +155,15 @@ public: inline pstring left(unsigned int count) const { return substr(0, count); } inline pstring right(unsigned int count) const { return substr(len() - count, count); } + int find_first_not_of(const pstring no) const; + int find_last_not_of(const pstring no) const; + + pstring ltrim(const pstring ws = " \t\n\r") const; + pstring rtrim(const pstring ws = " \t\n\r") const; + + + inline pstring trim(const pstring ws = " \t\n\r") const { return this->ltrim(ws).rtrim(ws); } + pstring ucase() const; // conversions diff --git a/src/emu/output.c b/src/emu/output.c index 842473b25cc..883a3922b2a 100644 --- a/src/emu/output.c +++ b/src/emu/output.c @@ -45,7 +45,7 @@ public: struct output_item { output_item * next; /* next item in list */ - astring name; /* string name of the item */ + std::string name; /* string name of the item */ UINT32 hash; /* hash for this item name */ UINT32 id; /* unique ID for this item */ INT32 value; /* current value */ @@ -117,7 +117,7 @@ INLINE output_item *create_new_item(const char *outname, INT32 value) /* fill in the data */ item->next = itemtable[hash % HASH_SIZE]; - item->name.cpy(outname); + item->name.assign(outname); item->hash = hash; item->id = uniqueid++; item->value = value; diff --git a/src/emu/parameters.c b/src/emu/parameters.c index 5fb8a051223..cdc32b6e468 100644 --- a/src/emu/parameters.c +++ b/src/emu/parameters.c @@ -15,12 +15,12 @@ parameters_manager::parameters_manager(running_machine &machine) { } -astring parameters_manager::lookup(astring tag) const +std::string parameters_manager::lookup(std::string tag) const { return m_parameters.find(tag.c_str()); } -void parameters_manager::add(astring tag, astring value) +void parameters_manager::add(std::string tag, std::string value) { m_parameters.add(tag.c_str(), value); } diff --git a/src/emu/parameters.h b/src/emu/parameters.h index 03c41386769..f24b4055053 100644 --- a/src/emu/parameters.h +++ b/src/emu/parameters.h @@ -34,15 +34,15 @@ public: // getters running_machine &machine() const { return m_machine; } - astring lookup(astring tag) const; + std::string lookup(std::string tag) const; // setters - void add(astring tag, astring value); + void add(std::string tag, std::string value); private: // internal state running_machine & m_machine; // reference to owning machine - tagmap_t<astring> m_parameters; + tagmap_t<std::string> m_parameters; }; #endif // __INPTPORT_H__ */ diff --git a/src/emu/profiler.c b/src/emu/profiler.c index 6da529325f0..50e289e8d46 100644 --- a/src/emu/profiler.c +++ b/src/emu/profiler.c @@ -112,7 +112,7 @@ void real_profiler_state::reset(bool enabled) //------------------------------------------------- -// text - return the current text in an astring +// text - return the current text in an std::string //------------------------------------------------- const char *real_profiler_state::text(running_machine &machine) @@ -136,7 +136,7 @@ const char *real_profiler_state::text(running_machine &machine) //------------------------------------------------- -// update_text - update the current astring +// update_text - update the current std::string //------------------------------------------------- void real_profiler_state::update_text(running_machine &machine) @@ -185,7 +185,7 @@ void real_profiler_state::update_text(running_machine &machine) // this becomes the total; if we end up with 0 for anything, we were just started, so return empty UINT64 total = computed; - m_text.reset(); + m_text.clear(); if (total == 0 || normalize == 0) { return; @@ -202,25 +202,25 @@ void real_profiler_state::update_text(running_machine &machine) if (computed != 0) { // start with the un-normalized percentage - m_text.catprintf("%02d%% ", (int)((computed * 100 + total/2) / total)); + strcatprintf(m_text, "%02d%% ", (int)((computed * 100 + total / 2) / total)); // followed by the normalized percentage for everything but profiler and idle if (curtype < PROFILER_PROFILER) - m_text.catprintf("%02d%% ", (int)((computed * 100 + normalize/2) / normalize)); + strcatprintf(m_text, "%02d%% ", (int)((computed * 100 + normalize / 2) / normalize)); // and then the text if (curtype >= PROFILER_DEVICE_FIRST && curtype <= PROFILER_DEVICE_MAX) - m_text.catprintf("'%s'", iter.byindex(curtype - PROFILER_DEVICE_FIRST)->tag()); + strcatprintf(m_text, "'%s'", iter.byindex(curtype - PROFILER_DEVICE_FIRST)->tag()); else for (int nameindex = 0; nameindex < ARRAY_LENGTH(names); nameindex++) if (names[nameindex].type == curtype) { - m_text.cat(names[nameindex].string); + m_text.append(names[nameindex].string); break; } // followed by a carriage return - m_text.cat("\n"); + m_text.append("\n"); } } diff --git a/src/emu/profiler.h b/src/emu/profiler.h index ee4292f24b9..25cd2b4d7ce 100644 --- a/src/emu/profiler.h +++ b/src/emu/profiler.h @@ -167,7 +167,7 @@ private: // internal state filo_entry * m_filoptr; // current FILO index - astring m_text; // profiler text + std::string m_text; // profiler text attotime m_text_time; // profiler text last update filo_entry m_filo[32]; // array of FILO entries osd_ticks_t m_data[PROFILER_TOTAL + 1]; // array of data diff --git a/src/emu/render.c b/src/emu/render.c index ed4a7b7d1a0..30a0b992215 100644 --- a/src/emu/render.c +++ b/src/emu/render.c @@ -1571,9 +1571,9 @@ bool render_target::load_layout_file(const char *dirname, const char *filename) else { // build the path and optionally prepend the directory - astring fname = astring(filename).cat(".lay"); + std::string fname = std::string(filename).append(".lay"); if (dirname != NULL) - fname.ins(0, PATH_SEPARATOR).ins(0, dirname); + fname.insert(0, PATH_SEPARATOR).insert(0, dirname); // attempt to open the file; bail if we can't emu_file layoutfile(manager().machine().options().art_path(), OPEN_FLAG_READ); diff --git a/src/emu/rendfont.c b/src/emu/rendfont.c index 62a0581f9ab..2011119979c 100644 --- a/src/emu/rendfont.c +++ b/src/emu/rendfont.c @@ -392,8 +392,8 @@ bool render_font::load_cached_bdf(const char *filename) UINT32 hash = crc32(0, (const UINT8 *)&m_rawdata[0], bytes) ^ (UINT32)m_rawsize; // create the cached filename, changing the 'F' to a 'C' on the extension - astring cachedname(filename); - cachedname.del(cachedname.len() - 3, 3).cat("bdc"); + std::string cachedname(filename); + cachedname.erase(cachedname.length() - 3, 3).append("bdc"); // attempt to open the cached version of the font { diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c index 9ac68126fa3..a3b5f48e8b1 100644 --- a/src/emu/rendlay.c +++ b/src/emu/rendlay.c @@ -626,19 +626,19 @@ layout_element::component::component(running_machine &machine, xml_data_node &co { m_type = CTYPE_REEL; - astring symbollist = xml_get_attribute_string_with_subst(machine, compnode, "symbollist", "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"); + std::string symbollist = xml_get_attribute_string_with_subst(machine, compnode, "symbollist", "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"); // split out position names from string and figure out our number of symbols int location = -1; m_numstops = 0; - location=symbollist.find(0,","); + location=symbollist.find(","); while (location!=-1) { m_stopnames[m_numstops] = symbollist; - m_stopnames[m_numstops].substr(0, location); - symbollist.substr(location+1, symbollist.len()-(location-1)); + m_stopnames[m_numstops] = m_stopnames[m_numstops].substr(0, location); + symbollist = symbollist.substr(location+1, symbollist.length()-(location-1)); m_numstops++; - location=symbollist.find(0,","); + location=symbollist.find(","); } m_stopnames[m_numstops++] = symbollist; @@ -648,12 +648,12 @@ layout_element::component::component(running_machine &machine, xml_data_node &co for (int i=0;i<m_numstops;i++) { - location=m_stopnames[i].find(0,":"); + location=m_stopnames[i].find(":"); if (location!=-1) { m_imagefile[i] = m_stopnames[i]; - m_stopnames[i].substr(0, location); - m_imagefile[i].substr(location+1, m_imagefile[i].len()-(location-1)); + m_stopnames[i] = m_stopnames[i].substr(0, location); + m_imagefile[i] = m_imagefile[i].substr(location+1, m_imagefile[i].length()-(location-1)); //m_alphafile[i] = m_file[i].reset(global_alloc(emu_file(machine.options().art_path(), OPEN_FLAG_READ))); @@ -987,7 +987,7 @@ void layout_element::component::draw_simplecounter(running_machine &machine, bit { char temp[256]; sprintf(temp, "%0*d", m_digits, state); - m_string = astring(temp); + m_string = std::string(temp); draw_text(machine, dest, bounds); } @@ -1313,7 +1313,7 @@ void layout_element::component::load_bitmap() m_hasalpha[0] = render_load_png(m_bitmap[0], *m_file[0], m_dirname.c_str(), m_imagefile[0].c_str()); // load the alpha bitmap if specified - if (m_bitmap[0].valid() && m_alphafile[0]) + if (m_bitmap[0].valid() && !m_alphafile[0].empty()) render_load_png(m_bitmap[0], *m_file[0], m_dirname.c_str(), m_alphafile[0].c_str(), true); // if we can't load the bitmap, allocate a dummy one and report an error @@ -1327,7 +1327,7 @@ void layout_element::component::load_bitmap() m_bitmap[0].pix32((step + line) % 100, line % 100) = rgb_t(0xff,0xff,0xff,0xff); // log an error - if (!m_alphafile[0]) + if (m_alphafile[0].empty()) osd_printf_warning("Unable to load component bitmap '%s'\n", m_imagefile[0].c_str()); else osd_printf_warning("Unable to load component bitmap '%s'/'%s'\n", m_imagefile[0].c_str(), m_alphafile[0].c_str()); diff --git a/src/emu/rendlay.h b/src/emu/rendlay.h index 5d59be7e08e..a288e0ab09d 100644 --- a/src/emu/rendlay.h +++ b/src/emu/rendlay.h @@ -134,20 +134,20 @@ private: int m_state; // state where this component is visible (-1 means all states) render_bounds m_bounds; // bounds of the element render_color m_color; // color of the element - astring m_string; // string for text components + std::string m_string; // string for text components int m_digits; // number of digits for simple counters int m_textalign; // text alignment to box bitmap_argb32 m_bitmap[MAX_BITMAPS]; // source bitmap for images - astring m_dirname; // directory name of image file (for lazy loading) + std::string m_dirname; // directory name of image file (for lazy loading) auto_pointer<emu_file> m_file[MAX_BITMAPS]; // file object for reading image/alpha files - astring m_imagefile[MAX_BITMAPS]; // name of the image file (for lazy loading) - astring m_alphafile[MAX_BITMAPS]; // name of the alpha file (for lazy loading) + std::string m_imagefile[MAX_BITMAPS]; // name of the image file (for lazy loading) + std::string m_alphafile[MAX_BITMAPS]; // name of the alpha file (for lazy loading) bool m_hasalpha[MAX_BITMAPS]; // is there any alpha component present? // stuff for fruit machine reels // basically made up of multiple text strings / gfx int m_numstops; - astring m_stopnames[MAX_BITMAPS]; + std::string m_stopnames[MAX_BITMAPS]; int m_stateoffset; int m_reelreversed; int m_numsymbolsvisible; @@ -172,7 +172,7 @@ private: // internal state layout_element * m_next; // link to next element running_machine & m_machine; // reference to the owning machine - astring m_name; // name of this element + std::string m_name; // name of this element simple_list<component> m_complist; // list of components int m_defstate; // default state of this element int m_maxstate; // maximum state value for all components @@ -207,7 +207,7 @@ public: const render_color &color() const { return m_color; } int orientation() const { return m_orientation; } render_container *screen_container(running_machine &machine) const; - bool has_input() const { return bool(m_input_tag); } + bool has_input() const { return !m_input_tag.empty(); } const char *input_tag_and_mask(ioport_value &mask) const { mask = m_input_mask; return m_input_tag.c_str(); } // fetch state based on configured source @@ -217,8 +217,8 @@ public: // internal state item * m_next; // link to next item layout_element * m_element; // pointer to the associated element (non-screens only) - astring m_output_name; // name of this item - astring m_input_tag; // input tag of this item + std::string m_output_name; // name of this item + std::string m_input_tag; // input tag of this item ioport_value m_input_mask; // input mask of this item screen_device * m_screen; // pointer to screen int m_orientation; // orientation of this item @@ -248,7 +248,7 @@ public: private: // internal state layout_view * m_next; // pointer to next layout in the list - astring m_name; // name of the layout + std::string m_name; // name of the layout float m_aspect; // X/Y of the layout float m_scraspect; // X/Y of the screen areas render_screen_list m_screens; // list of active screens diff --git a/src/emu/rendutil.c b/src/emu/rendutil.c index 59f4fb4b55d..5eb7c012521 100644 --- a/src/emu/rendutil.c +++ b/src/emu/rendutil.c @@ -537,11 +537,11 @@ bool render_load_png(bitmap_argb32 &bitmap, emu_file &file, const char *dirname, bitmap.reset(); // open the file - astring fname; + std::string fname; if (dirname == NULL) - fname.cpy(filename); + fname.assign(filename); else - fname.cpy(dirname).cat(PATH_SEPARATOR).cat(filename); + fname.assign(dirname).append(PATH_SEPARATOR).append(filename); file_error filerr = file.open(fname.c_str()); if (filerr != FILERR_NONE) return false; diff --git a/src/emu/romload.c b/src/emu/romload.c index 5dd7c641ab9..fc6ef629bf5 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -13,7 +13,7 @@ #include "emuopts.h" #include "drivenum.h" #include "png.h" -#include "harddisk.h" +#include "chd.h" #include "config.h" #include "ui/ui.h" @@ -51,7 +51,7 @@ public: private: open_chd * m_next; /* pointer to next in the list */ - astring m_region; /* disk region we came from */ + std::string m_region; /* disk region we came from */ chd_file m_origchd; /* handle to the original CHD */ chd_file m_diffchd; /* handle to the diff CHD */ }; @@ -77,8 +77,8 @@ struct romload_private memory_region * region; /* info about current region */ - astring errorstring; /* error string */ - astring softwarningstring; /* software warning string */ + std::string errorstring; /* error string */ + std::string softwarningstring; /* software warning string */ }; @@ -254,9 +254,9 @@ const rom_entry *rom_next_parameter(const rom_entry *romp) for a rom region -------------------------------------------------*/ -astring &rom_region_name(astring &result, const device_t &device, const rom_entry *romp) +std::string rom_region_name(const device_t &device, const rom_entry *romp) { - return device.subtag(result, ROM_GETNAME(romp)); + return device.subtag(ROM_GETNAME(romp)); } @@ -265,9 +265,9 @@ astring &rom_region_name(astring &result, const device_t &device, const rom_entr for a per-game parameter -------------------------------------------------*/ -astring &rom_parameter_name(astring &result, const device_t &device, const rom_entry *romp) +std::string rom_parameter_name(const device_t &device, const rom_entry *romp) { - return device.subtag(result, romp->_name); + return device.subtag(romp->_name); } @@ -276,9 +276,9 @@ astring &rom_parameter_name(astring &result, const device_t &device, const rom_e per-game parameter -------------------------------------------------*/ -astring rom_parameter_value(const rom_entry *romp) +std::string rom_parameter_value(const rom_entry *romp) { - return romp->_hashdata; + return std::string(romp->_hashdata); } @@ -373,7 +373,7 @@ static void determine_bios_rom(romload_private *romdata, device_t *device, const /* if we got neither an empty string nor 'default' then warn the user */ if (specbios[0] != 0 && strcmp(specbios, "default") != 0 && romdata != NULL) { - romdata->errorstring.catprintf("%s: invalid bios\n", specbios); + strcatprintf(romdata->errorstring, "%s: invalid bios\n", specbios); romdata->errors++; } @@ -428,12 +428,12 @@ static void fill_random(running_machine &machine, UINT8 *base, UINT32 length) for missing files -------------------------------------------------*/ -static void handle_missing_file(romload_private *romdata, const rom_entry *romp, astring tried_file_names, chd_error chderr) +static void handle_missing_file(romload_private *romdata, const rom_entry *romp, std::string tried_file_names, chd_error chderr) { - if(tried_file_names.len() != 0) + if(tried_file_names.length() != 0) tried_file_names = " (tried in " + tried_file_names + ")"; - astring name(ROM_GETNAME(romp)); + std::string name(ROM_GETNAME(romp)); bool is_chd = (chderr != CHDERR_NONE); if (is_chd) @@ -441,13 +441,13 @@ static void handle_missing_file(romload_private *romdata, const rom_entry *romp, bool is_chd_error = (is_chd && chderr != CHDERR_FILE_NOT_FOUND); if (is_chd_error) - romdata->errorstring.catprintf("%s CHD ERROR: %s\n", name.c_str(), chd_file::error_string(chderr)); + strcatprintf(romdata->errorstring, "%s CHD ERROR: %s\n", name.c_str(), chd_file::error_string(chderr)); /* optional files are okay */ if (ROM_ISOPTIONAL(romp)) { if (!is_chd_error) - romdata->errorstring.catprintf("OPTIONAL %s NOT FOUND%s\n", name.c_str(), tried_file_names.c_str()); + strcatprintf(romdata->errorstring, "OPTIONAL %s NOT FOUND%s\n", name.c_str(), tried_file_names.c_str()); romdata->warnings++; } @@ -455,7 +455,7 @@ static void handle_missing_file(romload_private *romdata, const rom_entry *romp, else if (hash_collection(ROM_GETHASHDATA(romp)).flag(hash_collection::FLAG_NO_DUMP)) { if (!is_chd_error) - romdata->errorstring.catprintf("%s NOT FOUND (NO GOOD DUMP KNOWN)%s\n", name.c_str(), tried_file_names.c_str()); + strcatprintf(romdata->errorstring, "%s NOT FOUND (NO GOOD DUMP KNOWN)%s\n", name.c_str(), tried_file_names.c_str()); romdata->knownbad++; } @@ -463,7 +463,7 @@ static void handle_missing_file(romload_private *romdata, const rom_entry *romp, else { if (!is_chd_error) - romdata->errorstring.catprintf("%s NOT FOUND%s\n", name.c_str(), tried_file_names.c_str()); + strcatprintf(romdata->errorstring, "%s NOT FOUND%s\n", name.c_str(), tried_file_names.c_str()); romdata->errors++; } } @@ -477,9 +477,9 @@ static void handle_missing_file(romload_private *romdata, const rom_entry *romp, static void dump_wrong_and_correct_checksums(romload_private *romdata, const hash_collection &hashes, const hash_collection &acthashes) { - astring tempstr; - romdata->errorstring.catprintf(" EXPECTED: %s\n", hashes.macro_string(tempstr)); - romdata->errorstring.catprintf(" FOUND: %s\n", acthashes.macro_string(tempstr)); + std::string tempstr; + strcatprintf(romdata->errorstring, " EXPECTED: %s\n", hashes.macro_string(tempstr)); + strcatprintf(romdata->errorstring, " FOUND: %s\n", acthashes.macro_string(tempstr)); } @@ -498,30 +498,30 @@ static void verify_length_and_hash(romload_private *romdata, const char *name, U UINT32 actlength = romdata->file->size(); if (explength != actlength) { - romdata->errorstring.catprintf("%s WRONG LENGTH (expected: %08x found: %08x)\n", name, explength, actlength); + strcatprintf(romdata->errorstring, "%s WRONG LENGTH (expected: %08x found: %08x)\n", name, explength, actlength); romdata->warnings++; } /* If there is no good dump known, write it */ - astring tempstr; + std::string tempstr; hash_collection &acthashes = romdata->file->hashes(hashes.hash_types(tempstr)); if (hashes.flag(hash_collection::FLAG_NO_DUMP)) { - romdata->errorstring.catprintf("%s NO GOOD DUMP KNOWN\n", name); + strcatprintf(romdata->errorstring, "%s NO GOOD DUMP KNOWN\n", name); romdata->knownbad++; } /* verify checksums */ else if (hashes != acthashes) { /* otherwise, it's just bad */ - romdata->errorstring.catprintf("%s WRONG CHECKSUMS:\n", name); + strcatprintf(romdata->errorstring, "%s WRONG CHECKSUMS:\n", name); dump_wrong_and_correct_checksums(romdata, hashes, acthashes); romdata->warnings++; } /* If it matches, but it is actually a bad dump, write it */ else if (hashes.flag(hash_collection::FLAG_BAD_DUMP)) { - romdata->errorstring.catprintf("%s ROM NEEDS REDUMP\n",name); + strcatprintf(romdata->errorstring, "%s ROM NEEDS REDUMP\n",name); romdata->knownbad++; } } @@ -567,9 +567,9 @@ static void display_rom_load_results(romload_private *romdata, bool from_list) /* if we had warnings, output them, but continue */ if ((romdata-> warnings) || (romdata->knownbad)) { - romdata->errorstring.cat("WARNING: the "); - romdata->errorstring.cat(emulator_info::get_gamenoun()); - romdata->errorstring.cat(" might not run correctly."); + romdata->errorstring.append("WARNING: the "); + romdata->errorstring.append(emulator_info::get_gamenoun()); + romdata->errorstring.append(" might not run correctly."); osd_printf_warning("%s\n", romdata->errorstring.c_str()); } } @@ -622,7 +622,7 @@ static void region_post_process(romload_private *romdata, const char *rgntag, bo up the parent and loading by checksum -------------------------------------------------*/ -static int open_rom_file(romload_private *romdata, const char *regiontag, const rom_entry *romp, astring &tried_file_names, bool from_list) +static int open_rom_file(romload_private *romdata, const char *regiontag, const rom_entry *romp, std::string &tried_file_names, bool from_list) { file_error filerr = FILERR_NOT_FOUND; UINT32 romsize = rom_file_size(romp); @@ -639,7 +639,7 @@ static int open_rom_file(romload_private *romdata, const char *regiontag, const attempts any kind of load by checksum supported by the archives. */ romdata->file = NULL; for (int drv = driver_list::find(romdata->machine().system()); romdata->file == NULL && drv != -1; drv = driver_list::clone(drv)) { - if(tried_file_names.len() != 0) + if (tried_file_names.length() != 0) tried_file_names += " "; tried_file_names += driver_list::driver(drv).name; filerr = common_process_file(romdata->machine().options(), driver_list::driver(drv).name, has_crc, crc, romp, &romdata->file); @@ -651,42 +651,42 @@ static int open_rom_file(romload_private *romdata, const char *regiontag, const // check if we are dealing with softwarelists. if so, locationtag // is actually a concatenation of: listname + setname + parentname // separated by '%' (parentname being present only for clones) - astring tag1(regiontag), tag2, tag3, tag4, tag5; + std::string tag1(regiontag), tag2, tag3, tag4, tag5; bool is_list = FALSE; bool has_parent = FALSE; - int separator1 = tag1.chr(0, '%'); + int separator1 = tag1.find_first_of('%'); if (separator1 != -1) { is_list = TRUE; // we are loading through softlists, split the listname from the regiontag - tag4.cpysubstr(tag1, separator1 + 1, tag1.len() - separator1 + 1); - tag1.del(separator1, tag1.len() - separator1); - tag1.cat(PATH_SEPARATOR); + tag4.assign(tag1.substr(separator1 + 1, tag1.length() - separator1 + 1)); + tag1.erase(separator1, tag1.length() - separator1); + tag1.append(PATH_SEPARATOR); // check if we are loading a clone (if this is the case also tag1 have a separator '%') - int separator2 = tag4.chr(0, '%'); + int separator2 = tag4.find_first_of('%'); if (separator2 != -1) { has_parent = TRUE; // we are loading a clone through softlists, split the setname from the parentname - tag5.cpysubstr(tag4, separator2 + 1, tag4.len() - separator2 + 1); - tag4.del(separator2, tag4.len() - separator2); + tag5.assign(tag4.substr(separator2 + 1, tag4.length() - separator2 + 1)); + tag4.erase(separator2, tag4.length() - separator2); } // prepare locations where we have to load from: list/parentname & list/clonename - astring swlist(tag1.c_str()); - tag2.cpy(swlist.cat(tag4)); + std::string swlist(tag1.c_str()); + tag2.assign(swlist.append(tag4)); if (has_parent) { - swlist.cpy(tag1); - tag3.cpy(swlist.cat(tag5)); + swlist.assign(tag1); + tag3.assign(swlist.append(tag5)); } } - if (tag5.chr(0, '%') != -1) + if (tag5.find_first_of('%') != -1) fatalerror("We do not support clones of clones!\n"); // try to load from the available location(s): @@ -966,7 +966,7 @@ static void process_rom_entries(romload_private *romdata, const char *regiontag, /* open the file if it is a non-BIOS or matches the current BIOS */ LOG(("Opening ROM file: %s\n", ROM_GETNAME(romp))); - astring tried_file_names; + std::string tried_file_names; if (!irrelevantbios && !open_rom_file(romdata, regiontag, romp, tried_file_names, from_list)) handle_missing_file(romdata, romp, tried_file_names, CHDERR_NONE); @@ -1052,42 +1052,42 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_ // check if we are dealing with softwarelists. if so, locationtag // is actually a concatenation of: listname + setname + parentname // separated by '%' (parentname being present only for clones) - astring tag1(locationtag), tag2, tag3, tag4, tag5; + std::string tag1(locationtag), tag2, tag3, tag4, tag5; bool is_list = FALSE; bool has_parent = FALSE; - int separator1 = tag1.chr(0, '%'); + int separator1 = tag1.find_first_of('%'); if (separator1 != -1) { is_list = TRUE; // we are loading through softlists, split the listname from the regiontag - tag4.cpysubstr(tag1, separator1 + 1, tag1.len() - separator1 + 1); - tag1.del(separator1, tag1.len() - separator1); - tag1.cat(PATH_SEPARATOR); + tag4.assign(tag1.substr(separator1 + 1, tag1.length() - separator1 + 1)); + tag1.erase(separator1, tag1.length() - separator1); + tag1.append(PATH_SEPARATOR); // check if we are loading a clone (if this is the case also tag1 have a separator '%') - int separator2 = tag4.chr(0, '%'); + int separator2 = tag4.find_first_of('%'); if (separator2 != -1) { has_parent = TRUE; // we are loading a clone through softlists, split the setname from the parentname - tag5.cpysubstr(tag4, separator2 + 1, tag4.len() - separator2 + 1); - tag4.del(separator2, tag4.len() - separator2); + tag5.assign(tag4.substr(separator2 + 1, tag4.length() - separator2 + 1)); + tag4.erase(separator2, tag4.length() - separator2); } // prepare locations where we have to load from: list/parentname (if any) & list/clonename - astring swlist(tag1.c_str()); - tag2.cpy(swlist.cat(tag4)); + std::string swlist(tag1.c_str()); + tag2.assign(swlist.append(tag4)); if (has_parent) { - swlist.cpy(tag1); - tag3.cpy(swlist.cat(tag5)); + swlist.assign(tag1); + tag3.assign(swlist.append(tag5)); } } - if (tag5.chr(0, '%') != -1) + if (tag5.find_first_of('%') != -1) fatalerror("We do not support clones of clones!\n"); // try to load from the available location(s): @@ -1112,7 +1112,7 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_ // only for CHD we also try to load from list/ if ((filerr != FILERR_NONE) && (tag1.c_str() != NULL)) { - tag1.del(tag1.len() - 1, 1); // remove the PATH_SEPARATOR + tag1.erase(tag1.length() - 1, 1); // remove the PATH_SEPARATOR filerr = common_process_file(options, tag1.c_str(), ".chd", romp, image_file); } } @@ -1121,7 +1121,7 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_ /* did the file open succeed? */ if (filerr == FILERR_NONE) { - astring fullpath(image_file.fullpath()); + std::string fullpath(image_file.fullpath()); image_file.close(); /* try to open the CHD */ @@ -1159,7 +1159,7 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_ /* did the file open succeed? */ if (filerr == FILERR_NONE) { - astring fullpath(image_file.fullpath()); + std::string fullpath(image_file.fullpath()); image_file.close(); /* try to open the CHD */ @@ -1179,7 +1179,7 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_ static chd_error open_disk_diff(emu_options &options, const rom_entry *romp, chd_file &source, chd_file &diff_chd) { - astring fname = astring(ROM_GETNAME(romp)).cat(".dif"); + std::string fname = std::string(ROM_GETNAME(romp)).append(".dif"); /* try to open the diff */ LOG(("Opening differencing image file: %s\n", fname.c_str())); @@ -1187,7 +1187,7 @@ static chd_error open_disk_diff(emu_options &options, const rom_entry *romp, chd file_error filerr = diff_file.open(fname.c_str()); if (filerr == FILERR_NONE) { - astring fullpath(diff_file.fullpath()); + std::string fullpath(diff_file.fullpath()); diff_file.close(); LOG(("Opening differencing image file: %s\n", fullpath.c_str())); @@ -1200,7 +1200,7 @@ static chd_error open_disk_diff(emu_options &options, const rom_entry *romp, chd filerr = diff_file.open(fname.c_str()); if (filerr == FILERR_NONE) { - astring fullpath(diff_file.fullpath()); + std::string fullpath(diff_file.fullpath()); diff_file.close(); /* create the CHD */ @@ -1236,14 +1236,14 @@ static void process_disk_entries(romload_private *romdata, const char *regiontag chd_error err; /* make the filename of the source */ - astring filename = astring(ROM_GETNAME(romp)).cat(".chd"); + std::string filename = std::string(ROM_GETNAME(romp)).append(".chd"); /* first open the source drive */ LOG(("Opening disk image: %s\n", filename.c_str())); err = chd_error(open_disk_image(romdata->machine().options(), &romdata->machine().system(), romp, chd->orig_chd(), locationtag)); if (err != CHDERR_NONE) { - handle_missing_file(romdata, romp, astring(), err); + handle_missing_file(romdata, romp, std::string(), err); global_free(chd); continue; } @@ -1255,13 +1255,13 @@ static void process_disk_entries(romload_private *romdata, const char *regiontag /* verify the hash */ if (hashes != acthashes) { - romdata->errorstring.catprintf("%s WRONG CHECKSUMS:\n", filename.c_str()); + strcatprintf(romdata->errorstring, "%s WRONG CHECKSUMS:\n", filename.c_str()); dump_wrong_and_correct_checksums(romdata, hashes, acthashes); romdata->warnings++; } else if (hashes.flag(hash_collection::FLAG_BAD_DUMP)) { - romdata->errorstring.catprintf("%s CHD NEEDS REDUMP\n", filename.c_str()); + strcatprintf(romdata->errorstring, "%s CHD NEEDS REDUMP\n", filename.c_str()); romdata->knownbad++; } @@ -1272,7 +1272,7 @@ static void process_disk_entries(romload_private *romdata, const char *regiontag err = open_disk_diff(romdata->machine().options(), romp, chd->orig_chd(), chd->diff_chd()); if (err != CHDERR_NONE) { - romdata->errorstring.catprintf("%s DIFF CHD ERROR: %s\n", filename.c_str(), chd_file::error_string(err)); + strcatprintf(romdata->errorstring, "%s DIFF CHD ERROR: %s\n", filename.c_str(), chd_file::error_string(err)); romdata->errors++; global_free(chd); continue; @@ -1335,13 +1335,13 @@ static void normalize_flags_for_device(running_machine &machine, const char *rgn void load_software_part_region(device_t &device, software_list_device &swlist, const char *swname, const rom_entry *start_region) { - astring locationtag(swlist.list_name()), breakstr("%"); + std::string locationtag(swlist.list_name()), breakstr("%"); romload_private *romdata = device.machine().romload_data; const rom_entry *region; - astring regiontag; + std::string regiontag; - romdata->errorstring.reset(); - romdata->softwarningstring.reset(); + romdata->errorstring.clear(); + romdata->softwarningstring.clear(); romdata->romstotal = 0; romdata->romstotalsize = 0; @@ -1353,29 +1353,29 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c UINT32 supported = swinfo->supported(); if (supported == SOFTWARE_SUPPORTED_PARTIAL) { - romdata->errorstring.catprintf("WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name()); - romdata->softwarningstring.catprintf("Support for software %s (in list %s) is only partial\n", swname, swlist.list_name()); + strcatprintf(romdata->errorstring, "WARNING: support for software %s (in list %s) is only partial\n", swname, swlist.list_name()); + strcatprintf(romdata->softwarningstring, "Support for software %s (in list %s) is only partial\n", swname, swlist.list_name()); } if (supported == SOFTWARE_SUPPORTED_NO) { - romdata->errorstring.catprintf("WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()); - romdata->softwarningstring.catprintf("Support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()); + strcatprintf(romdata->errorstring, "WARNING: support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()); + strcatprintf(romdata->softwarningstring, "Support for software %s (in list %s) is only preliminary\n", swname, swlist.list_name()); } - // attempt reading up the chain through the parents and create a locationtag astring in the format + // attempt reading up the chain through the parents and create a locationtag std::string in the format // " swlist % clonename % parentname " // open_rom_file contains the code to split the elements and to create paths to load from - locationtag.cat(breakstr); + locationtag.append(breakstr); while (swinfo != NULL) { - locationtag.cat(swinfo->shortname()).cat(breakstr); + locationtag.append(swinfo->shortname()).append(breakstr); const char *parentname = swinfo->parentname(); swinfo = (parentname != NULL) ? swlist.find(parentname) : NULL; } // strip the final '%' - locationtag.del(locationtag.len() - 1, 1); + locationtag.erase(locationtag.length() - 1, 1); } @@ -1384,7 +1384,7 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c { UINT32 regionlength = ROMREGION_GETLENGTH(region); - device.subtag(regiontag, ROMREGION_GETTAG(region)); + regiontag = device.subtag(ROMREGION_GETTAG(region)); LOG(("Processing region \"%s\" (length=%X)\n", regiontag.c_str(), regionlength)); /* the first entry must be a region */ @@ -1438,7 +1438,7 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c /* now go back and post-process all the regions */ for (region = start_region; region != NULL; region = rom_next_region(region)) { - device.subtag(regiontag, ROMREGION_GETTAG(region)); + regiontag = device.subtag(ROMREGION_GETTAG(region)); region_post_process(romdata, regiontag.c_str(), ROMREGION_ISINVERTED(region)); } @@ -1453,7 +1453,7 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c static void process_region_list(romload_private *romdata) { - astring regiontag; + std::string regiontag; /* loop until we hit the end */ device_iterator deviter(romdata->machine().root_device()); @@ -1462,7 +1462,7 @@ static void process_region_list(romload_private *romdata) { UINT32 regionlength = ROMREGION_GETLENGTH(region); - rom_region_name(regiontag, *device, region); + regiontag = rom_region_name(*device, region); LOG(("Processing region \"%s\" (length=%X)\n", regiontag.c_str(), regionlength)); /* the first entry must be a region */ @@ -1505,7 +1505,7 @@ static void process_region_list(romload_private *romdata) for (device_t *device = deviter.first(); device != NULL; device = deviter.next()) for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region)) { - rom_region_name(regiontag, *device, region); + regiontag = rom_region_name(*device, region); region_post_process(romdata, regiontag.c_str(), ROMREGION_ISINVERTED(region)); } @@ -1513,7 +1513,7 @@ static void process_region_list(romload_private *romdata) for (device_t *device = deviter.first(); device != NULL; device = deviter.next()) for (const rom_entry *param = rom_first_parameter(*device); param != NULL; param = rom_next_parameter(param)) { - rom_parameter_name(regiontag, *device, param); + regiontag = rom_parameter_name(*device, param); romdata->machine().parameters().add(regiontag, rom_parameter_value(param)); } } @@ -1542,7 +1542,7 @@ void rom_init(running_machine &machine) for (device_t *device = deviter.first(); device != NULL; device = deviter.next()) { if (device->rom_region()) { const char *specbios; - astring temp; + std::string temp; if (strcmp(device->tag(),":")==0) { specbios = romdata->machine().options().bios(); } else { @@ -1594,7 +1594,7 @@ int rom_load_warnings(running_machine &machine) software load warnings we generated -------------------------------------------------*/ -astring& software_load_warnings_message(running_machine &machine) +std::string& software_load_warnings_message(running_machine &machine) { return machine.romload_data->softwarningstring; } diff --git a/src/emu/romload.h b/src/emu/romload.h index 290a8ba447b..33fe06e3d48 100644 --- a/src/emu/romload.h +++ b/src/emu/romload.h @@ -268,7 +268,7 @@ void rom_init(running_machine &machine); /* return the number of warnings we generated */ int rom_load_warnings(running_machine &machine); -astring& software_load_warnings_message(running_machine &machine); +std::string& software_load_warnings_message(running_machine &machine); /* return the number of BAD_DUMP/NO_DUMP warnings we generated */ int rom_load_knownbad(running_machine &machine); @@ -297,7 +297,7 @@ const rom_entry *rom_next_file(const rom_entry *romp); UINT32 rom_file_size(const rom_entry *romp); /* return the appropriate name for a rom region */ -astring &rom_region_name(astring &result, const device_t &device, const rom_entry *romp); +std::string rom_region_name(const device_t &device, const rom_entry *romp); /* return pointer to the first per-game parameter */ const rom_entry *rom_first_parameter(const device_t &device); @@ -306,10 +306,10 @@ const rom_entry *rom_first_parameter(const device_t &device); const rom_entry *rom_next_parameter(const rom_entry *romp); /* return the appropriate name for a per-game parameter */ -astring &rom_parameter_name(astring &result, const device_t &device, const rom_entry *romp); +std::string rom_parameter_name(const device_t &device, const rom_entry *romp); /* return the value for a per-game parameter */ -astring rom_parameter_value(const rom_entry *romp); +std::string rom_parameter_value(const rom_entry *romp); /* ----- disk handling ----- */ diff --git a/src/emu/save.c b/src/emu/save.c index c4a93a0cefd..3efeea2856d 100644 --- a/src/emu/save.c +++ b/src/emu/save.c @@ -162,23 +162,23 @@ void save_manager::save_memory(device_t *device, const char *module, const char } // create the full name - astring totalname; + std::string totalname; if (tag != NULL) - totalname.printf("%s/%s/%X/%s", module, tag, index, name); + strprintf(totalname, "%s/%s/%X/%s", module, tag, index, name); else - totalname.printf("%s/%X/%s", module, index, name); + strprintf(totalname, "%s/%X/%s", module, index, name); // look for duplicates and an entry to insert in front of state_entry *insert_after = NULL; for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next()) { // stop when we find an entry whose name is after ours - if (entry->m_name > totalname) + if (entry->m_name.compare(totalname)>0) break; insert_after = entry; // error if we are equal - if (entry->m_name == totalname) + if (entry->m_name.compare(totalname)==0) fatalerror("Duplicate save state registration entry (%s)\n", totalname.c_str()); } @@ -333,7 +333,7 @@ UINT32 save_manager::signature() const for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next()) { // add the entry name to the CRC - crc = crc32(crc, (UINT8 *)entry->m_name.c_str(), entry->m_name.len()); + crc = crc32(crc, (UINT8 *)entry->m_name.c_str(), entry->m_name.length()); // add the type and size to the CRC UINT32 temp[2]; diff --git a/src/emu/save.h b/src/emu/save.h index 8b6e0d4f167..c2d4e0bd6c1 100644 --- a/src/emu/save.h +++ b/src/emu/save.h @@ -54,24 +54,6 @@ typedef delegate<void ()> save_prepost_delegate; template<> inline void save_manager::save_item(device_t *device, const char *module, const char *tag, int index, std::vector<TYPE> &value, const char *name) { save_memory(device, module, tag, index, name, &value[0], sizeof(TYPE), value.size()); } -// register items with explicit tags -#define state_save_register_item(_mach, _mod, _tag, _index, _val) \ - (_mach).save().save_item(NULL, _mod, _tag, _index, _val, #_val) - -#define state_save_register_item_pointer(_mach, _mod, _tag, _index, _val, _count) \ - (_mach).save().save_pointer(NULL, _mod, _tag, _index, _val, #_val, _count) - -#define state_save_register_item_array(_mach, _mod, _tag, _index, _val) \ - (_mach).save().save_item(NULL, _mod, _tag, _index, _val, #_val) - -#define state_save_register_item_2d_array(_mach, _mod, _tag, _index, _val) \ - (_mach).save().save_item(NULL, _mod, _tag, _index, _val, #_val) - -#define state_save_register_item_bitmap(_mach, _mod, _tag, _index, _val) \ - (_mach).save().save_item(NULL, _mod, _tag, _index, *(_val), #_val) - - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -91,10 +73,10 @@ public: // state state_entry * m_next; // pointer to next entry void * m_data; // pointer to the memory to save/restore - astring m_name; // full name + std::string m_name; // full name device_t * m_device; // associated device, NULL if none - astring m_module; // module name - astring m_tag; // tag name + std::string m_module; // module name + std::string m_tag; // tag name int m_index; // index UINT8 m_typesize; // size of the raw data type UINT32 m_typecount; // number of items @@ -267,9 +249,9 @@ inline void save_manager::save_item(device_t *device, const char *module, const template<> inline void save_manager::save_item(device_t *device, const char *module, const char *tag, int index, attotime &value, const char *name) { - astring tempstr = astring(name).cat(".attoseconds"); + std::string tempstr = std::string(name).append(".attoseconds"); save_memory(device, module, tag, index, tempstr.c_str(), &value.attoseconds, sizeof(value.attoseconds)); - tempstr.cpy(name).cat(".seconds"); + tempstr.assign(name).append(".seconds"); save_memory(device, module, tag, index, tempstr.c_str(), &value.seconds, sizeof(value.seconds)); } diff --git a/src/emu/schedule.c b/src/emu/schedule.c index d777f1d1b41..1695936fa26 100644 --- a/src/emu/schedule.c +++ b/src/emu/schedule.c @@ -239,7 +239,7 @@ void emu_timer::register_save() { // determine our instance number and name int index = 0; - astring name; + std::string name; // for non-device timers, it is an index based on the callback function name if (m_device == NULL) @@ -253,7 +253,7 @@ void emu_timer::register_save() // for device timers, it is an index based on the device and timer ID else { - name.printf("%s/%d", m_device->tag(), m_id); + strprintf(name,"%s/%d", m_device->tag(), m_id); for (emu_timer *curtimer = machine().scheduler().first_timer(); curtimer != NULL; curtimer = curtimer->next()) if (!curtimer->m_temporary && curtimer->m_device != NULL && curtimer->m_device == m_device && curtimer->m_id == m_id) index++; @@ -753,7 +753,7 @@ void device_scheduler::rebuild_execute_list() min_quantum = attotime::from_hz(60); // if the configuration specifies a device to make perfect, pick that as the minimum - if (machine().config().m_perfect_cpu_quantum) + if (!machine().config().m_perfect_cpu_quantum.empty()) { device_t *device = machine().device(machine().config().m_perfect_cpu_quantum.c_str()); if (device == NULL) diff --git a/src/emu/screen.c b/src/emu/screen.c index 9648eef6069..0690695efd5 100644 --- a/src/emu/screen.c +++ b/src/emu/screen.c @@ -1046,11 +1046,11 @@ void screen_device::finalize_burnin() void screen_device::load_effect_overlay(const char *filename) { // ensure that there is a .png extension - astring fullname(filename); - int extension = fullname.rchr(0, '.'); + std::string fullname(filename); + int extension = fullname.find_last_of('.'); if (extension != -1) - fullname.del(extension, -1); - fullname.cat(".png"); + fullname.erase(extension, -1); + fullname.append(".png"); // load the file emu_file file(machine().options().art_path(), OPEN_FLAG_READ); diff --git a/src/emu/softlist.c b/src/emu/softlist.c index 1528304339d..ed41ca05560 100644 --- a/src/emu/softlist.c +++ b/src/emu/softlist.c @@ -30,7 +30,7 @@ class softlist_parser { public: // construction (== execution) - softlist_parser(software_list_device &list, astring &errors); + softlist_parser(software_list_device &list, std::string &errors); private: enum parse_position @@ -76,11 +76,11 @@ private: // internal parsing state software_list_device & m_list; - astring & m_errors; + std::string & m_errors; XML_Parser m_parser; bool m_done; bool m_data_accum_expected; - astring m_data_accum; + std::string m_data_accum; software_info * m_current_info; software_part * m_current_part; parse_position m_pos; @@ -149,14 +149,14 @@ bool software_part::is_compatible(const software_list_device &swlistdev) const return true; // copy the comma-delimited strings and ensure they end with a final comma - astring comp = astring(compatibility).cat(","); - astring filt = astring(filter).cat(","); + std::string comp = std::string(compatibility).append(","); + std::string filt = std::string(filter).append(","); // iterate over filter items and see if they exist in the compatibility list; if so, return true - for (int start = 0, end = filt.chr(start, ','); end != -1; start = end + 1, end = filt.chr(start, ',')) + for (int start = 0, end = filt.find_first_of(',',start); end != -1; start = end + 1, end = filt.find_first_of(',', start)) { - astring token(filt, start, end - start + 1); - if (comp.find(0, token.c_str()) != -1) + std::string token(filt, start, end - start + 1); + if (comp.find(token.c_str()) != -1) return true; } return false; @@ -175,11 +175,11 @@ bool software_part::matches_interface(const char *interface_list) const return true; // copy the comma-delimited interface list and ensure it ends with a final comma - astring interfaces = astring(interface_list).cat(","); + std::string interfaces = std::string(interface_list).append(","); // then add a comma to the end of our interface and return true if we find it in the list string - astring our_interface = astring(m_interface).cat(","); - return (interfaces.find(0, our_interface.c_str()) != -1); + std::string our_interface = std::string(m_interface).append(","); + return (interfaces.find(our_interface.c_str()) != -1); } @@ -290,7 +290,7 @@ software_list_device::software_list_device(const machine_config &mconfig, const void software_list_device::static_set_type(device_t &device, const char *list, softlist_type list_type) { software_list_device &swlistdev = downcast<software_list_device &>(device); - swlistdev.m_list_name.cpy(list); + swlistdev.m_list_name.assign(list); swlistdev.m_list_type = list_type; } @@ -376,7 +376,7 @@ void software_list_device::release() osd_printf_verbose("Resetting %s\n", m_file.filename()); m_parsed = false; m_description = NULL; - m_errors.reset(); + m_errors.clear(); m_infolist.reset(); m_stringpool.reset(); } @@ -473,7 +473,7 @@ void software_list_device::parse() return; // reset the errors - m_errors.reset(); + m_errors.clear(); // attempt to open the file file_error filerr = m_file.open(m_list_name.c_str(), ".xml"); @@ -484,7 +484,7 @@ void software_list_device::parse() m_file.close(); } else - m_errors.printf("Error opening file: %s\n", filename()); + strprintf(m_errors, "Error opening file: %s\n", filename()); // indicate that we've been parsed m_parsed = true; @@ -500,7 +500,7 @@ void software_list_device::device_validity_check(validity_checker &valid) const { // add to the global map whenever we check a list so we don't re-check // it in the future - if (valid.already_checked(astring("softlist/").cat(m_list_name.c_str()).c_str())) + if (valid.already_checked(std::string("softlist/").append(m_list_name.c_str()).c_str())) return; // do device validation only in case of validate command @@ -526,7 +526,7 @@ void software_list_device::internal_validity_check(validity_checker &valid) for (software_info *swinfo = first_software_info(); swinfo != NULL; swinfo = swinfo->next()) { // first parse and output core errors if any - if (m_errors.len() > 0) + if (m_errors.length() > 0) { osd_printf_error("%s: Errors parsing software list:\n%s", filename(), errors_string()); break; @@ -565,7 +565,8 @@ void software_list_device::internal_validity_check(validity_checker &valid) } // check for duplicate descriptions - if (descriptions.add(astring(swinfo->longname()).makelower().c_str(), swinfo, false) == TMERR_DUPLICATE) + std::string longname = std::string(swinfo->longname()); + if (descriptions.add(strmakelower(longname).c_str(), swinfo, false) == TMERR_DUPLICATE) osd_printf_error("%s: %s is a duplicate description (%s)\n", filename(), swinfo->longname(), swinfo->shortname()); bool is_clone = false; @@ -645,7 +646,7 @@ void software_list_device::internal_validity_check(validity_checker &valid) // softlist_parser - constructor //------------------------------------------------- -softlist_parser::softlist_parser(software_list_device &list, astring &errors) +softlist_parser::softlist_parser(software_list_device &list, std::string &errors) : m_list(list), m_errors(errors), m_done(false), @@ -724,16 +725,16 @@ void softlist_parser::expat_free(void *ptr) void ATTR_PRINTF(2,3) softlist_parser::parse_error(const char *fmt, ...) { // always start with filename(line.column): - m_errors.catprintf("%s(%d.%d): ", filename(), line(), column()); + strcatprintf(m_errors, "%s(%d.%d): ", filename(), line(), column()); // append the remainder of the string va_list va; va_start(va, fmt); - m_errors.catvprintf(fmt, va); + strcatvprintf(m_errors, fmt, va); va_end(va); // append a newline at the end - m_errors.cat("\n"); + m_errors.append("\n"); } @@ -867,7 +868,7 @@ void softlist_parser::end_handler(void *data, const char *name) // stop accumulating state->m_data_accum_expected = false; - state->m_data_accum.reset(); + state->m_data_accum.clear(); } @@ -879,9 +880,9 @@ void softlist_parser::data_handler(void *data, const XML_Char *s, int len) { softlist_parser *state = reinterpret_cast<softlist_parser *>(data); - // if we have an astring to accumulate data in, do it + // if we have an std::string to accumulate data in, do it if (state->m_data_accum_expected) - state->m_data_accum.cat(s, len); + state->m_data_accum.append(s, len); // otherwise, report an error if the data is non-blank else @@ -1146,17 +1147,17 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu bool baddump = (status != NULL && strcmp(status, "baddump") == 0); bool nodump = (status != NULL && strcmp(status, "nodump") == 0); - astring hashdata; + std::string hashdata; if (nodump) { - hashdata.printf("%s", NO_DUMP); + strprintf(hashdata, "%s", NO_DUMP); if (crc != NULL && sha1 != NULL) parse_error("No need for hash definition"); } else { if (crc != NULL && sha1 != NULL) - hashdata.printf("%c%s%c%s%s", hash_collection::HASH_CRC, crc, hash_collection::HASH_SHA1, sha1, (baddump ? BAD_DUMP : "")); + strprintf(hashdata, "%c%s%c%s%s", hash_collection::HASH_CRC, crc, hash_collection::HASH_SHA1, sha1, (baddump ? BAD_DUMP : "")); else parse_error("Incomplete rom hash definition"); } @@ -1199,8 +1200,8 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu bool baddump = (status != NULL && strcmp(status, "baddump") == 0); bool nodump = (status != NULL && strcmp(status, "nodump" ) == 0); bool writeable = (writeablestr != NULL && strcmp(writeablestr, "yes") == 0); - astring hashdata; - hashdata.printf( "%c%s%s", hash_collection::HASH_SHA1, sha1, (nodump ? NO_DUMP : (baddump ? BAD_DUMP : ""))); + std::string hashdata; + strprintf(hashdata, "%c%s%s", hash_collection::HASH_SHA1, sha1, (nodump ? NO_DUMP : (baddump ? BAD_DUMP : ""))); add_rom_entry(name, hashdata.c_str(), 0, 0, ROMENTRYTYPE_ROM | (writeable ? DISK_READWRITE : DISK_READONLY)); } diff --git a/src/emu/softlist.h b/src/emu/softlist.h index 7e6abc19246..77ed72437b2 100644 --- a/src/emu/softlist.h +++ b/src/emu/softlist.h @@ -227,7 +227,7 @@ protected: virtual void device_validity_check(validity_checker &valid) const ATTR_COLD; // configuration state - astring m_list_name; + std::string m_list_name; softlist_type m_list_type; const char * m_filter; @@ -235,7 +235,7 @@ protected: bool m_parsed; emu_file m_file; const char * m_description; - astring m_errors; + std::string m_errors; simple_list<software_info> m_infolist; const_string_pool m_stringpool; }; diff --git a/src/emu/sound.c b/src/emu/sound.c index 6c8f4b74da2..b4179336582 100644 --- a/src/emu/sound.c +++ b/src/emu/sound.c @@ -75,8 +75,8 @@ sound_stream::sound_stream(device_t &device, int inputs, int outputs, int sample m_callback = stream_update_delegate(FUNC(device_sound_interface::sound_stream_update),(device_sound_interface *)sound); // create a unique tag for saving - astring state_tag; - state_tag.printf("%d", m_device.machine().sound().m_stream_list.count()); + std::string state_tag; + strprintf(state_tag, "%d", m_device.machine().sound().m_stream_list.count()); m_device.machine().save().save_item(&m_device, "stream", state_tag.c_str(), 0, NAME(m_sample_rate)); m_device.machine().save().register_postload(save_prepost_delegate(FUNC(sound_stream::postload), this)); @@ -163,17 +163,17 @@ float sound_stream::output_gain(int outputnum) const // on a given stream's input //------------------------------------------------- -const char *sound_stream::input_name(int inputnum, astring &str) const +const char *sound_stream::input_name(int inputnum, std::string &str) const { // start with our device name and tag assert(inputnum >= 0 && inputnum < m_input.size()); - str.printf("%s '%s': ", m_device.name(), m_device.tag()); + strprintf(str, "%s '%s': ", m_device.name(), m_device.tag()); // if we have a source, indicate where the sound comes from by device name and tag if (m_input[inputnum].m_source != NULL && m_input[inputnum].m_source->m_stream != NULL) { device_t &source = m_input[inputnum].m_source->m_stream->device(); - str.catprintf("%s '%s'", source.name(), source.tag()); + strcatprintf(str, "%s '%s'", source.name(), source.tag()); // get the sound interface; if there is more than 1 output we need to figure out which one device_sound_interface *sound; @@ -186,7 +186,7 @@ const char *sound_stream::input_name(int inputnum, astring &str) const for (int outputnum = 0; (outstream = sound->output_to_stream_output(outputnum, streamoutputnum)) != NULL; outputnum++) if (outstream == m_input[inputnum].m_source->m_stream && m_input[inputnum].m_source == &outstream->m_output[streamoutputnum]) { - str.catprintf(" Ch.%d", outputnum); + strcatprintf(str, " Ch.%d", outputnum); break; } } @@ -598,6 +598,8 @@ void sound_stream::postload() void sound_stream::generate_samples(int samples) { + stream_sample_t **inputs = NULL; + stream_sample_t **outputs = NULL; // if we're already there, skip it if (samples <= 0) return; @@ -616,6 +618,11 @@ void sound_stream::generate_samples(int samples) m_input_array[inputnum] = generate_resampled_data(input, samples); } + if (!m_input.empty()) + { + inputs = &m_input_array[0]; + } + // loop over all outputs and compute the output pointer for (unsigned int outputnum = 0; outputnum < m_output.size(); outputnum++) { @@ -623,9 +630,14 @@ void sound_stream::generate_samples(int samples) m_output_array[outputnum] = &output.m_buffer[m_output_sampindex - m_output_base_sampindex]; } + if (!m_output.empty()) + { + outputs = &m_output_array[0]; + } + // run the callback VPRINTF((" callback(%p, %d)\n", this, samples)); - m_callback(*this, &m_input_array[0], &m_output_array[0], samples); + m_callback(*this, inputs, outputs, samples); VPRINTF((" callback done\n")); } diff --git a/src/emu/sound.h b/src/emu/sound.h index f025f70787d..557d4242fa6 100644 --- a/src/emu/sound.h +++ b/src/emu/sound.h @@ -106,7 +106,7 @@ public: attotime sample_period() const { return attotime(0, m_attoseconds_per_sample); } int input_count() const { return m_input.size(); } int output_count() const { return m_output.size(); } - const char *input_name(int inputnum, astring &str) const; + const char *input_name(int inputnum, std::string &str) const; device_t *input_source_device(int inputnum) const; int input_source_outputnum(int inputnum) const; float user_gain(int inputnum) const; diff --git a/src/emu/sound/2610intf.c b/src/emu/sound/2610intf.c index 7bd00040d38..fb3b8f0e6b7 100644 --- a/src/emu/sound/2610intf.c +++ b/src/emu/sound/2610intf.c @@ -143,7 +143,7 @@ void ym2610_device::device_start() int rate = clock()/72; void *pcmbufa,*pcmbufb; int pcmsizea,pcmsizeb; - astring name; + std::string name(tag()); m_irq_handler.resolve(); @@ -156,7 +156,7 @@ void ym2610_device::device_start() /* setup adpcm buffers */ pcmbufa = region()->base(); pcmsizea = region()->bytes(); - name.printf("%s.deltat", tag()); + name.append(".deltat"); pcmbufb = (void *)(machine().root_device().memregion(name.c_str())->base()); pcmsizeb = machine().root_device().memregion(name.c_str())->bytes(); if (pcmbufb == NULL || pcmsizeb == 0) diff --git a/src/emu/sound/disc_inp.inc b/src/emu/sound/disc_inp.inc index 36af37c6583..98fabfa7bf8 100644 --- a/src/emu/sound/disc_inp.inc +++ b/src/emu/sound/disc_inp.inc @@ -62,8 +62,7 @@ DISCRETE_RESET(dss_adjustment) { double min, max; - astring fulltag; - m_port = m_device->machine().root_device().ioport(m_device->siblingtag(fulltag, (const char *)this->custom_data()).c_str()); + m_port = m_device->machine().root_device().ioport(m_device->siblingtag((const char *)this->custom_data()).c_str()); if (m_port == NULL) fatalerror("DISCRETE_ADJUSTMENT - NODE_%d has invalid tag\n", this->index()); diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h index 621ad77749c..ef674da5e8d 100644 --- a/src/emu/sound/discrete.h +++ b/src/emu/sound/discrete.h @@ -4128,7 +4128,7 @@ enum { #define IS_VALUE_A_NODE(val) (((val) > NODE_START) && ((val) <= NODE_END)) // Optional node such as used in CR_FILTER -#define OPT_NODE(val) (int) val +#define OPT_NODE(val) (int) val /************************************* * * Enumerated values for Node types diff --git a/src/emu/sound/es1373.c b/src/emu/sound/es1373.c index af4054e241e..8b4a65456d4 100644 --- a/src/emu/sound/es1373.c +++ b/src/emu/sound/es1373.c @@ -2,7 +2,7 @@ #define LOG_ES (0) #define LOG_ES_REG (0) -#define LOG_ES_FILE (0) +#define LOG_ES_FILE (0) static MACHINE_CONFIG_FRAGMENT( es1373 ) @@ -122,7 +122,6 @@ void es1373_device::device_timer(emu_timer &timer, device_timer_id tid, int para //------------------------------------------------- void es1373_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { - if (m_dac1.enable) { logerror("%s: sound_stream_update DAC1 not implemented yet\n", tag()); } diff --git a/src/emu/sound/es1373.h b/src/emu/sound/es1373.h index ad30b0d8c67..4436c9ffdc0 100644 --- a/src/emu/sound/es1373.h +++ b/src/emu/sound/es1373.h @@ -66,10 +66,10 @@ #define SCTRL_P2_S_MASK 0x0000000C #define SCTRL_P1_S_MASK 0x00000003 -#define SCTRL_8BIT_MONO 0x0 -#define SCTRL_8BIT_STEREO 0x1 -#define SCTRL_16BIT_MONO 0x2 -#define SCTRL_16BIT_STEREO 0x3 +#define SCTRL_8BIT_MONO 0x0 +#define SCTRL_8BIT_STEREO 0x1 +#define SCTRL_16BIT_MONO 0x2 +#define SCTRL_16BIT_STEREO 0x3 #define ES_PCI_READ 0 #define ES_PCI_WRITE 1 diff --git a/src/emu/sound/fm.c b/src/emu/sound/fm.c index a7a66c91e46..3563594a6a1 100644 --- a/src/emu/sound/fm.c +++ b/src/emu/sound/fm.c @@ -3673,14 +3673,13 @@ void ym2610_reset_chip(void *chip) FM_OPN *OPN = &F2610->OPN; YM_DELTAT *DELTAT = &F2610->deltaT; - astring name; device_t* dev = F2610->OPN.ST.device; + std::string name(dev->tag()); /* setup PCM buffers again */ - name.printf("%s",dev->tag()); F2610->pcmbuf = (const UINT8 *)dev->machine().root_device().memregion(name.c_str())->base(); F2610->pcm_size = dev->machine().root_device().memregion(name.c_str())->bytes(); - name.printf("%s.deltat",dev->tag()); + name.append(".deltat"); F2610->deltaT.memory = (UINT8 *)dev->machine().root_device().memregion(name.c_str())->base(); if(F2610->deltaT.memory == NULL) { diff --git a/src/emu/sound/l7a1045_l6028_dsp_a.c b/src/emu/sound/l7a1045_l6028_dsp_a.c index d53e2085d4a..8d8effe6d2a 100644 --- a/src/emu/sound/l7a1045_l6028_dsp_a.c +++ b/src/emu/sound/l7a1045_l6028_dsp_a.c @@ -1,84 +1,84 @@ /*************************************************************************** L7A1045 L6028 DSP-A - (QFP120 package) + (QFP120 package) - this is the audio chip used on the following - SNK Hyper NeoGeo 64 (arcade platform) - AKAI MPC3000 (synth) + this is the audio chip used on the following + SNK Hyper NeoGeo 64 (arcade platform) + AKAI MPC3000 (synth) - both are driven by a V53, the MPC3000 isn't dumped. + both are driven by a V53, the MPC3000 isn't dumped. - appears to write a register number and channel/voice using - l7a1045_sound_select_w (offset 0) - format: + appears to write a register number and channel/voice using + l7a1045_sound_select_w (offset 0) + format: - ---- rrrr ---c cccc - r = register, c = channel + ---- rrrr ---c cccc + r = register, c = channel - the channel select appears to address 32 different voices (5-bits) - the register select appears to use 4-bits with 0x0 to 0xa being valid + the channel select appears to address 32 different voices (5-bits) + the register select appears to use 4-bits with 0x0 to 0xa being valid - the registers data is written / read using offsets 1,2,3 after - setting the register + channel, this gives 3 16-bit values for - each register. + the registers data is written / read using offsets 1,2,3 after + setting the register + channel, this gives 3 16-bit values for + each register. - register format: + register format: - offset 3 offset 2 offset 1 - fedcba9876543210 | fedcba9876543210 | fedcba9876543210 + offset 3 offset 2 offset 1 + fedcba9876543210 | fedcba9876543210 | fedcba9876543210 - 0 ---------------- ---------------- ---------------- + 0 ---------------- ---------------- ---------------- - 1 ---------------- ---------------- ---------------- + 1 ---------------- ---------------- ---------------- - 2 ---------------- ---------------- ---------------- + 2 ---------------- ---------------- ---------------- - 3 ---------------- ---------------- ---------------- + 3 ---------------- ---------------- ---------------- - 4 ---------------- ---------------- ---------------- + 4 ---------------- ---------------- ---------------- - 5 ---------------- ---------------- ---------------- + 5 ---------------- ---------------- ---------------- - 6 ---------------- ---------------- ---------------- + 6 ---------------- ---------------- ---------------- - 7 ---------------- ---------------- llllllllrrrrrrrr left/right volume + 7 ---------------- ---------------- llllllllrrrrrrrr left/right volume - 8 ---------------- ---------------- ---------------- (read only?) + 8 ---------------- ---------------- ---------------- (read only?) - 9 ---------------- ---------------- ---------------- (read only?) + 9 ---------------- ---------------- ---------------- (read only?) - a ---------------- ---------------- ---------------- + a ---------------- ---------------- ---------------- - Registers are not yet understood. + Registers are not yet understood. - probably sample start, end, loop positions, panning etc. - like CPS3, Qsound etc. + probably sample start, end, loop positions, panning etc. + like CPS3, Qsound etc. - case 0x00: - case 0x01: - case 0x02: - case 0x03: // 00003fffffff (startup only?) - case 0x04: // doesn't use 6 - case 0x05: // 00003fffffff (mostly, often) - case 0x06: // 00007ff0ffff mostly - case 0x07: // 0000000f0708 etc. (low values) - case 0x08: // doesn't write to 2/4/6 with this set?? - case 0x09: // doesn't write to 2/4/6 with this set?? - case 0x0a: // random looking values + case 0x00: + case 0x01: + case 0x02: + case 0x03: // 00003fffffff (startup only?) + case 0x04: // doesn't use 6 + case 0x05: // 00003fffffff (mostly, often) + case 0x06: // 00007ff0ffff mostly + case 0x07: // 0000000f0708 etc. (low values) + case 0x08: // doesn't write to 2/4/6 with this set?? + case 0x09: // doesn't write to 2/4/6 with this set?? + case 0x0a: // random looking values - Some of the other ports on the HNG64 sound CPU may also be tied - to this chip, this isn't yet clear. - Port $8 bit 8 is keyon, low byte is sound status related (masked with 0x7f) + Some of the other ports on the HNG64 sound CPU may also be tied + to this chip, this isn't yet clear. + Port $8 bit 8 is keyon, low byte is sound status related (masked with 0x7f) - Sample data format TBA + Sample data format TBA + + TODO: + - Sample format needs to be double checked; + - Octave Control/BPM/Pitch, right now XRally Network BGM wants 66150 Hz which is definitely too fast for Terry Bogard speech; + - Key Off; + - ADSR (registers 2 & 4?); - TODO: - - Sample format needs to be double checked; - - Octave Control/BPM/Pitch, right now XRally Network BGM wants 66150 Hz which is definitely too fast for Terry Bogard speech; - - Key Off; - - ADSR (registers 2 & 4?); - ***************************************************************************/ #include "emu.h" @@ -132,7 +132,7 @@ void l7a1045_sound_device::sound_stream_update(sound_stream &stream, stream_samp /* Clear the buffers */ memset(outputs[0], 0, samples*sizeof(*outputs[0])); memset(outputs[1], 0, samples*sizeof(*outputs[1])); - + for (int i = 0; i < 32; i++) { if (m_key & (1 << i)) @@ -142,7 +142,7 @@ void l7a1045_sound_device::sound_stream_update(sound_stream &stream, stream_samp UINT32 start = vptr->start; UINT32 end = vptr->end; UINT32 step = 0x400; - + UINT32 pos = vptr->pos; UINT32 frac = vptr->frac; @@ -150,7 +150,7 @@ void l7a1045_sound_device::sound_stream_update(sound_stream &stream, stream_samp { INT32 sample; UINT8 data; - + pos += (frac >> 12); frac &= 0xfff; @@ -205,7 +205,7 @@ READ16_MEMBER( l7a1045_sound_device::l7a1045_sound_r ) printf("sound_select_r?\n"); else return sound_data_r(space,offset -1,mem_mask); - + return 0xffff; } @@ -238,7 +238,7 @@ WRITE16_MEMBER(l7a1045_sound_device::sound_data_w) l7a1045_voice *vptr = &m_voice[m_audiochannel]; //if(m_audioregister != 0 && m_audioregister != 1 && m_audioregister != 7) - // printf("%04x %04x (%04x %04x)\n",offset,data,m_audioregister,m_audiochannel); + // printf("%04x %04x (%04x %04x)\n",offset,data,m_audioregister,m_audiochannel); m_audiodat[m_audioregister][m_audiochannel].dat[offset] = data; @@ -277,9 +277,9 @@ WRITE16_MEMBER(l7a1045_sound_device::sound_data_w) vptr->end &= m_rom_size - 1; } - + break; - + case 0x07: vptr->r_volume = (m_audiodat[m_audioregister][m_audiochannel].dat[0] & 0xff); @@ -302,11 +302,11 @@ READ16_MEMBER(l7a1045_sound_device::sound_data_r) switch(m_audioregister) { - case 0x00: + case 0x00: { UINT32 current_addr; UINT16 res; - + current_addr = vptr->start + vptr->pos; if(offset == 0) res = (current_addr & 0xf) << 12; // TODO: frac @@ -314,11 +314,11 @@ READ16_MEMBER(l7a1045_sound_device::sound_data_r) res = (current_addr & 0xffff0) >> 4; else res = (current_addr & 0xf00000) >> 20; - + return res; } } - + return 0; } @@ -333,16 +333,14 @@ WRITE16_MEMBER(l7a1045_sound_device::sound_status_w) { printf("%08x START\n",vptr->start); printf("%08x END\n",vptr->end); - + for(int i=0;i<0x10;i++) printf("%02x (%02x) = %04x%04x%04x\n",m_audiochannel,i,m_audiodat[i][m_audiochannel].dat[2],m_audiodat[i][m_audiochannel].dat[1],m_audiodat[i][m_audiochannel].dat[0]); } #endif - + vptr->frac = 0; vptr->pos = 0; m_key |= 1 << m_audiochannel; } } - - diff --git a/src/emu/sound/l7a1045_l6028_dsp_a.h b/src/emu/sound/l7a1045_l6028_dsp_a.h index 1754556e855..da0cbb41c13 100644 --- a/src/emu/sound/l7a1045_l6028_dsp_a.h +++ b/src/emu/sound/l7a1045_l6028_dsp_a.h @@ -30,7 +30,7 @@ public: l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~l7a1045_sound_device() { } -// void set_base(INT8* base) { m_base = base; } +// void set_base(INT8* base) { m_base = base; } DECLARE_WRITE16_MEMBER( l7a1045_sound_w ); DECLARE_READ16_MEMBER( l7a1045_sound_r ); diff --git a/src/emu/tilemap.c b/src/emu/tilemap.c index 4d1ec2cba5f..6f61210355b 100644 --- a/src/emu/tilemap.c +++ b/src/emu/tilemap.c @@ -1787,7 +1787,7 @@ void tilemap_device::device_start() m_basemem.set(*share, m_bytes_per_entry); // look for an extension entry - astring tag_ext = astring(tag()).cat("_ext"); + std::string tag_ext = std::string(tag()).append("_ext"); share = memshare(tag_ext.c_str()); if (share != NULL) m_extmem.set(*share, m_bytes_per_entry); diff --git a/src/emu/ui/barcode.c b/src/emu/ui/barcode.c index ee556b305f2..ef26c6244a4 100644 --- a/src/emu/ui/barcode.c +++ b/src/emu/ui/barcode.c @@ -52,7 +52,7 @@ void ui_menu_barcode_reader::populate() { if (current_device()) { - astring buffer; + std::string buffer; const char *new_barcode; // selected device @@ -61,7 +61,7 @@ void ui_menu_barcode_reader::populate() // append the "New Barcode" item if (get_selection() == ITEMREF_NEW_BARCODE) { - buffer.cat(m_barcode_buffer); + buffer.append(m_barcode_buffer); new_barcode = buffer.c_str(); } else @@ -112,13 +112,13 @@ void ui_menu_barcode_reader::handle() case IPT_UI_SELECT: if (event->itemref == ITEMREF_ENTER_BARCODE) { - astring tmp_file(m_barcode_buffer); + std::string tmp_file(m_barcode_buffer); //printf("code %s\n", m_barcode_buffer); - if (!current_device()->is_valid(tmp_file.len())) + if (!current_device()->is_valid(tmp_file.length())) machine().ui().popup_time(5, "Barcode length invalid!"); else { - current_device()->write_code(tmp_file.c_str(), tmp_file.len()); + current_device()->write_code(tmp_file.c_str(), tmp_file.length()); // if sending was successful, reset char buffer if (m_barcode_buffer[0] != '\0') memset(m_barcode_buffer, '\0', ARRAY_LENGTH(m_barcode_buffer)); diff --git a/src/emu/ui/cheatopt.c b/src/emu/ui/cheatopt.c index b14ae03a963..4932fc23133 100644 --- a/src/emu/ui/cheatopt.c +++ b/src/emu/ui/cheatopt.c @@ -109,8 +109,8 @@ ui_menu_cheat::ui_menu_cheat(running_machine &machine, render_container *contain void ui_menu_cheat::populate() { /* iterate over cheats */ - astring text; - astring subtext; + std::string text; + std::string subtext; for (cheat_entry *curcheat = machine().cheat().first(); curcheat != NULL; curcheat = curcheat->next()) { UINT32 flags; diff --git a/src/emu/ui/devctrl.h b/src/emu/ui/devctrl.h index 81fe091315b..b5b008e4baa 100644 --- a/src/emu/ui/devctrl.h +++ b/src/emu/ui/devctrl.h @@ -37,7 +37,7 @@ protected: int current_index(); void previous(); void next(); - astring current_display_name(); + std::string current_display_name(); UINT32 current_display_flags(); private: @@ -122,15 +122,15 @@ void ui_menu_device_control<_DeviceType>::next() //------------------------------------------------- template<class _DeviceType> -astring ui_menu_device_control<_DeviceType>::current_display_name() +std::string ui_menu_device_control<_DeviceType>::current_display_name() { - astring display_name; - display_name.cpy(current_device()->name()); + std::string display_name; + display_name.assign(current_device()->name()); if (count() > 1) { - astring temp; - temp.printf(" %d", current_index() + 1); - display_name.cat(temp); + std::string temp; + strprintf(temp, " %d", current_index() + 1); + display_name.append(temp); } return display_name; } diff --git a/src/emu/ui/devopt.c b/src/emu/ui/devopt.c index b203eb24324..c009dc539db 100644 --- a/src/emu/ui/devopt.c +++ b/src/emu/ui/devopt.c @@ -20,8 +20,8 @@ ui_menu_device_config::ui_menu_device_config(running_machine &machine, render_container *container, device_slot_interface *slot, device_slot_option *option) : ui_menu(machine, container) { - astring tmp_tag; - tmp_tag.cpy(slot->device().tag()).cat(":").cat(option->name()); + std::string tmp_tag; + tmp_tag.assign(slot->device().tag()).append(":").append(option->name()); m_option = option; m_owner = slot; m_mounted = false; @@ -39,25 +39,25 @@ ui_menu_device_config::ui_menu_device_config(running_machine &machine, render_co void ui_menu_device_config::populate() { - astring str; + std::string str; device_t *dev; - str.printf("[This option is%s currently mounted in the running system]\n\n", m_mounted ? "" : " NOT"); - str.catprintf("Option: %s\n", m_option->name()); + strprintf(str,"[This option is%s currently mounted in the running system]\n\n", m_mounted ? "" : " NOT"); + strcatprintf(str,"Option: %s\n", m_option->name()); dev = const_cast<machine_config &>(machine().config()).device_add(&machine().config().root_device(), m_option->name(), m_option->devtype(), 0); - str.catprintf("Device: %s\n", dev->name()); + strcatprintf(str,"Device: %s\n", dev->name()); if (!m_mounted) - str.cat("\nIf you select this option, the following items will be enabled:\n"); + str.append("\nIf you select this option, the following items will be enabled:\n"); else - str.cat("\nThe selected option enables the following items:\n"); + str.append("\nThe selected option enables the following items:\n"); // loop over all CPUs execute_interface_iterator execiter(*dev); if (execiter.count() > 0) { - str.cat("* CPU:\n"); + str.append("* CPU:\n"); tagmap_t<UINT8> exectags; for (device_execute_interface *exec = execiter.first(); exec != NULL; exec = execiter.next()) { @@ -80,16 +80,16 @@ void ui_menu_device_config::populate() // if more than one, prepend a #x in front of the CPU name if (count > 1) - str.catprintf(" %d" UTF8_MULTIPLY, count); + strcatprintf(str," %d" UTF8_MULTIPLY, count); else - str.cat(" "); - str.cat(name); + str.append(" "); + str.append(name); // display clock in kHz or MHz if (clock >= 1000000) - str.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); + strcatprintf(str," %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); else - str.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); + strcatprintf(str," %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); } } @@ -97,18 +97,18 @@ void ui_menu_device_config::populate() screen_device_iterator scriter(*dev); if (scriter.count() > 0) { - str.cat("* Video:\n"); + str.append("* Video:\n"); for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next()) { - str.catprintf(" Screen '%s': ", screen->tag()); + strcatprintf(str," Screen '%s': ", screen->tag()); if (screen->screen_type() == SCREEN_TYPE_VECTOR) - str.cat("Vector\n"); + str.append("Vector\n"); else { const rectangle &visarea = screen->visible_area(); - str.catprintf("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", + strcatprintf(str,"%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", visarea.width(), visarea.height(), (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H", ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds)); @@ -120,7 +120,7 @@ void ui_menu_device_config::populate() sound_interface_iterator snditer(*dev); if (snditer.count() > 0) { - str.cat("* Sound:\n"); + str.append("* Sound:\n"); tagmap_t<UINT8> soundtags; for (device_sound_interface *sound = snditer.first(); sound != NULL; sound = snditer.next()) { @@ -138,19 +138,19 @@ void ui_menu_device_config::populate() } // if more than one, prepend a #x in front of the CPU name if (count > 1) - str.catprintf(" %d" UTF8_MULTIPLY, count); + strcatprintf(str," %d" UTF8_MULTIPLY, count); else - str.cat(" "); - str.cat(sound->device().name()); + str.append(" "); + str.append(sound->device().name()); // display clock in kHz or MHz int clock = sound->device().clock(); if (clock >= 1000000) - str.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); + strcatprintf(str," %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); else if (clock != 0) - str.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); + strcatprintf(str," %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); else - str.cat("\n"); + str.append("\n"); } } @@ -158,11 +158,11 @@ void ui_menu_device_config::populate() int bios = 0; if (dev->rom_region()) { - astring bios_str; + std::string bios_str; // first loop through roms in search of default bios (shortname) for (const rom_entry *rom = dev->rom_region(); !ROMENTRY_ISEND(rom); rom++) if (ROMENTRY_ISDEFAULT_BIOS(rom)) - bios_str.cpy(ROM_GETNAME(rom)); + bios_str.assign(ROM_GETNAME(rom)); // then loop again to count bios options and to get the default bios complete name for (const rom_entry *rom = dev->rom_region(); !ROMENTRY_ISEND(rom); rom++) @@ -170,18 +170,18 @@ void ui_menu_device_config::populate() if (ROMENTRY_ISSYSTEM_BIOS(rom)) { bios++; - if (bios_str == ROM_GETNAME(rom)) - bios_str.cpy(ROM_GETHASHDATA(rom)); + if (bios_str.compare(ROM_GETNAME(rom))==0) + bios_str.assign(ROM_GETHASHDATA(rom)); } } if (bios) - str.catprintf("* BIOS settings:\n %d options [default: %s]\n", bios, bios_str.c_str()); + strcatprintf(str,"* BIOS settings:\n %d options [default: %s]\n", bios, bios_str.c_str()); } int input = 0, input_mj = 0, input_hana = 0, input_gamble = 0, input_analog = 0, input_adjust = 0; int input_keypad = 0, input_keyboard = 0, dips = 0, confs = 0; - astring errors, dips_opt, confs_opt; + std::string errors, dips_opt, confs_opt; ioport_list portlist; device_iterator iptiter(*dev); for (device_t *iptdev = iptiter.first(); iptdev != NULL; iptdev = iptiter.next()) @@ -210,12 +210,12 @@ void ui_menu_device_config::populate() else if (field->type() == IPT_DIPSWITCH) { dips++; - dips_opt.cat(" ").cat(field->name()); + dips_opt.append(" ").append(field->name()); for (ioport_setting *setting = field->first_setting(); setting != NULL; setting = setting->next()) { if (setting->value() == field->defvalue()) { - dips_opt.catprintf(" [default: %s]\n", setting->name()); + strcatprintf(dips_opt, " [default: %s]\n", setting->name()); break; } } @@ -223,12 +223,12 @@ void ui_menu_device_config::populate() else if (field->type() == IPT_CONFIG) { confs++; - confs_opt.cat(" ").cat(field->name()); + confs_opt.append(" ").append(field->name()); for (ioport_setting *setting = field->first_setting(); setting != NULL; setting = setting->next()) { if (setting->value() == field->defvalue()) { - confs_opt.catprintf(" [default: %s]\n", setting->name()); + strcatprintf(confs_opt," [default: %s]\n", setting->name()); break; } } @@ -236,47 +236,47 @@ void ui_menu_device_config::populate() } if (dips) - str.cat("* Dispwitch settings:\n").cat(dips_opt); + str.append("* Dispwitch settings:\n").append(dips_opt); if (confs) - str.cat("* Configuration settings:\n").cat(confs_opt); + str.append("* Configuration settings:\n").append(confs_opt); if (input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) - str.cat("* Input device(s):\n"); + str.append("* Input device(s):\n"); if (input) - str.catprintf(" User inputs [%d inputs]\n", input); + strcatprintf(str," User inputs [%d inputs]\n", input); if (input_mj) - str.catprintf(" Mahjong inputs [%d inputs]\n", input_mj); + strcatprintf(str," Mahjong inputs [%d inputs]\n", input_mj); if (input_hana) - str.catprintf(" Hanafuda inputs [%d inputs]\n", input_hana); + strcatprintf(str," Hanafuda inputs [%d inputs]\n", input_hana); if (input_gamble) - str.catprintf(" Gambling inputs [%d inputs]\n", input_gamble); + strcatprintf(str," Gambling inputs [%d inputs]\n", input_gamble); if (input_analog) - str.catprintf(" Analog inputs [%d inputs]\n", input_analog); + strcatprintf(str," Analog inputs [%d inputs]\n", input_analog); if (input_adjust) - str.catprintf(" Adjuster inputs [%d inputs]\n", input_adjust); + strcatprintf(str," Adjuster inputs [%d inputs]\n", input_adjust); if (input_keypad) - str.catprintf(" Keypad inputs [%d inputs]\n", input_keypad); + strcatprintf(str," Keypad inputs [%d inputs]\n", input_keypad); if (input_keyboard) - str.catprintf(" Keyboard inputs [%d inputs]\n", input_keyboard); + strcatprintf(str," Keyboard inputs [%d inputs]\n", input_keyboard); image_interface_iterator imgiter(*dev); if (imgiter.count() > 0) { - str.cat("* Media Options:\n"); + str.append("* Media Options:\n"); for (const device_image_interface *imagedev = imgiter.first(); imagedev != NULL; imagedev = imgiter.next()) - str.catprintf(" %s [tag: %s]\n", imagedev->image_type_name(), imagedev->device().tag()); + strcatprintf(str," %s [tag: %s]\n", imagedev->image_type_name(), imagedev->device().tag()); } slot_interface_iterator slotiter(*dev); if (slotiter.count() > 0) { - str.cat("* Slot Options:\n"); + str.append("* Slot Options:\n"); for (const device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next()) - str.catprintf(" %s [default: %s]\n", slot->device().tag(), slot->default_option() ? slot->default_option() : "----"); + strcatprintf(str," %s [default: %s]\n", slot->device().tag(), slot->default_option() ? slot->default_option() : "----"); } if ((execiter.count() + scriter.count() + snditer.count() + imgiter.count() + slotiter.count() + bios + dips + confs + input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0) - str.cat("[None]\n"); + str.append("[None]\n"); const_cast<machine_config &>(machine().config()).device_remove(&machine().config().root_device(), m_option->name()); item_append(str.c_str(), NULL, MENU_FLAG_MULTILINE, NULL); diff --git a/src/emu/ui/filemngr.c b/src/emu/ui/filemngr.c index 38e4a55a9c7..578721b233b 100644 --- a/src/emu/ui/filemngr.c +++ b/src/emu/ui/filemngr.c @@ -30,9 +30,9 @@ ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_cont // This warning string is used when accessing from the force_file_manager call, i.e. // when the file manager is loaded top front in the case of mandatory image devices if (warnings) - m_warnings.cpy(warnings); + m_warnings.assign(warnings); else - m_warnings.reset(); + m_warnings.clear(); m_curr_selected = FALSE; } @@ -62,15 +62,15 @@ void ui_menu_file_manager::custom_render(void *selectedref, float top, float bot } -void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring &instance, astring &filename) +void ui_menu_file_manager::fill_image_line(device_image_interface *img, std::string &instance, std::string &filename) { // get the image type/id - instance.printf("%s (%s)", img->instance_name(), img->brief_instance_name()); + strprintf(instance,"%s (%s)", img->instance_name(), img->brief_instance_name()); // get the base name if (img->basename() != NULL) { - filename.cpy(img->basename()); + filename.assign(img->basename()); // if the image has been loaded through softlist, also show the loaded part if (img->part_entry() != NULL) @@ -78,20 +78,20 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring const software_part *tmp = img->part_entry(); if (tmp->name() != NULL) { - filename.cat(" ("); - filename.cat(tmp->name()); + filename.append(" ("); + filename.append(tmp->name()); // also check if this part has a specific part_id (e.g. "Map Disc", "Bonus Disc", etc.), and in case display it if (img->get_feature("part_id") != NULL) { - filename.cat(": "); - filename.cat(img->get_feature("part_id")); + filename.append(": "); + filename.append(img->get_feature("part_id")); } - filename.cat(")"); + filename.append(")"); } } } else - filename.cpy("---"); + filename.assign("---"); } //------------------------------------------------- @@ -100,11 +100,11 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring void ui_menu_file_manager::populate() { - astring buffer, tmp_inst, tmp_name; + std::string buffer, tmp_inst, tmp_name; bool first_entry = true; - astring prev_owner; + std::string prev_owner; - if (m_warnings) + if (!m_warnings.empty()) { item_append(m_warnings.c_str(), NULL, MENU_FLAG_DISABLE, NULL); item_append("", NULL, MENU_FLAG_DISABLE, NULL); @@ -138,7 +138,7 @@ void ui_menu_file_manager::populate() first_entry = false; else item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); - buffer.printf("[root%s]", dev->tag()); + strprintf(buffer, "[root%s]", dev->tag()); item_append(buffer.c_str(), NULL, 0, NULL); tag_appended = true; } diff --git a/src/emu/ui/filemngr.h b/src/emu/ui/filemngr.h index a2d7fbca74f..dbc4c72e50d 100644 --- a/src/emu/ui/filemngr.h +++ b/src/emu/ui/filemngr.h @@ -16,8 +16,8 @@ class ui_menu_file_manager : public ui_menu { public: - astring current_directory; - astring current_file; + std::string current_directory; + std::string current_file; device_image_interface *selected_device; static void force_file_manager(running_machine &machine, render_container *container, const char *warnings); @@ -28,10 +28,10 @@ public: virtual void handle(); virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2); - void fill_image_line(device_image_interface *img, astring &instance, astring &filename); + void fill_image_line(device_image_interface *img, std::string &instance, std::string &filename); private: - astring m_warnings; + std::string m_warnings; bool m_curr_selected; }; diff --git a/src/emu/ui/filesel.c b/src/emu/ui/filesel.c index 6828e29ae35..01dff2708b4 100644 --- a/src/emu/ui/filesel.c +++ b/src/emu/ui/filesel.c @@ -219,7 +219,7 @@ static int is_valid_filename_char(unicode_char unichar) // ctor //------------------------------------------------- -ui_menu_file_create::ui_menu_file_create(running_machine &machine, render_container *container, device_image_interface *image, astring ¤t_directory, astring ¤t_file, bool *ok) +ui_menu_file_create::ui_menu_file_create(running_machine &machine, render_container *container, device_image_interface *image, std::string ¤t_directory, std::string ¤t_file, bool *ok) : ui_menu(machine, container), m_current_directory(current_directory), m_current_file(current_file) @@ -257,14 +257,14 @@ void ui_menu_file_create::custom_render(void *selectedref, float top, float bott void ui_menu_file_create::populate() { - astring buffer; + std::string buffer; const image_device_format *format; const char *new_image_name; // append the "New Image Name" item if (get_selection() == ITEMREF_NEW_IMAGE_NAME) { - buffer.cat(m_filename_buffer).cat("_"); + buffer.append(m_filename_buffer).append("_"); new_image_name = buffer.c_str(); } else @@ -307,10 +307,10 @@ void ui_menu_file_create::handle() case IPT_UI_SELECT: if ((event->itemref == ITEMREF_CREATE) || (event->itemref == ITEMREF_NEW_IMAGE_NAME)) { - astring tmp_file(m_filename_buffer); - if (tmp_file.find(".") != -1 && tmp_file.find(".") < tmp_file.len() - 1) + std::string tmp_file(m_filename_buffer); + if (tmp_file.find(".") != -1 && tmp_file.find(".") < tmp_file.length() - 1) { - m_current_file.cpy(m_filename_buffer); + m_current_file.append(m_filename_buffer); ui_menu::stack_pop(machine()); } else @@ -344,7 +344,7 @@ void ui_menu_file_create::handle() // ctor //------------------------------------------------- -ui_menu_file_selector::ui_menu_file_selector(running_machine &machine, render_container *container, device_image_interface *image, astring ¤t_directory, astring ¤t_file, bool has_empty, bool has_softlist, bool has_create, int *result) +ui_menu_file_selector::ui_menu_file_selector(running_machine &machine, render_container *container, device_image_interface *image, std::string ¤t_directory, std::string ¤t_file, bool has_empty, bool has_softlist, bool has_create, int *result) : ui_menu(machine, container), m_current_directory(current_directory), m_current_file(current_file) @@ -456,7 +456,7 @@ ui_menu_file_selector::file_selector_entry *ui_menu_file_selector::append_entry( ui_menu_file_selector::file_selector_entry *ui_menu_file_selector::append_dirent_entry(const osd_directory_entry *dirent) { - astring buffer; + std::string buffer; file_selector_entry_type entry_type; file_selector_entry *entry; @@ -664,13 +664,13 @@ void ui_menu_file_selector::handle() machine().ui().popup_time(1, "Error accessing %s", entry->fullpath); break; } - m_current_directory.cpy(entry->fullpath); + m_current_directory.assign(entry->fullpath); reset((ui_menu_reset_options)0); break; case SELECTOR_ENTRY_TYPE_FILE: // file - m_current_file.cpy(entry->fullpath); + m_current_file.assign(entry->fullpath); *m_result = R_FILE; ui_menu::stack_pop(machine()); break; diff --git a/src/emu/ui/filesel.h b/src/emu/ui/filesel.h index d06b8853e41..13db951f49a 100644 --- a/src/emu/ui/filesel.h +++ b/src/emu/ui/filesel.h @@ -34,7 +34,7 @@ private: class ui_menu_file_create : public ui_menu { public: - ui_menu_file_create(running_machine &machine, render_container *container, device_image_interface *image, astring ¤t_directory, astring ¤t_file, bool *ok); + ui_menu_file_create(running_machine &machine, render_container *container, device_image_interface *image, std::string ¤t_directory, std::string ¤t_file, bool *ok); virtual ~ui_menu_file_create(); virtual void populate(); virtual void handle(); @@ -42,8 +42,8 @@ public: private: device_image_interface * m_image; - astring & m_current_directory; - astring & m_current_file; + std::string & m_current_directory; + std::string & m_current_file; const image_device_format * m_current_format; char m_filename_buffer[1024]; @@ -58,7 +58,7 @@ class ui_menu_file_selector : public ui_menu { public: enum { R_EMPTY, R_SOFTLIST, R_CREATE, R_FILE }; - ui_menu_file_selector(running_machine &machine, render_container *container, device_image_interface *image, astring ¤t_directory, astring ¤t_file, bool has_empty, bool has_softlist, bool has_create, int *result); + ui_menu_file_selector(running_machine &machine, render_container *container, device_image_interface *image, std::string ¤t_directory, std::string ¤t_file, bool has_empty, bool has_softlist, bool has_create, int *result); virtual ~ui_menu_file_selector(); virtual void populate(); virtual void handle(); @@ -86,8 +86,8 @@ private: // internal state device_image_interface * m_image; - astring & m_current_directory; - astring & m_current_file; + std::string & m_current_directory; + std::string & m_current_file; bool m_has_empty; bool m_has_softlist; bool m_has_create; diff --git a/src/emu/ui/imgcntrl.c b/src/emu/ui/imgcntrl.c index bb1d54f0220..132bf2662c5 100644 --- a/src/emu/ui/imgcntrl.c +++ b/src/emu/ui/imgcntrl.c @@ -46,7 +46,7 @@ ui_menu_control_device_image::ui_menu_control_device_image(running_machine &mach if(swi) { state = START_OTHER_PART; - current_directory.cpy(image->working_directory()); + current_directory.assign(image->working_directory()); } else { @@ -55,14 +55,14 @@ ui_menu_control_device_image::ui_menu_control_device_image(running_machine &mach /* if the image exists, set the working directory to the parent directory */ if (image->exists()) { - current_file.cpy(image->filename()); + current_file.assign(image->filename()); zippath_parent(current_directory, current_file.c_str()); } else - current_directory.cpy(image->working_directory()); + current_directory.assign(image->working_directory()); /* check to see if the path exists; if not clear it */ if (zippath_opendir(current_directory.c_str(), NULL) != FILERR_NONE) - current_directory.reset(); + current_directory.clear(); } } @@ -82,7 +82,7 @@ ui_menu_control_device_image::~ui_menu_control_device_image() void ui_menu_control_device_image::test_create(bool &can_create, bool &need_confirm) { - astring path; + std::string path; osd_directory_entry *entry; osd_dir_entry_type file_type; @@ -132,7 +132,7 @@ void ui_menu_control_device_image::test_create(bool &can_create, bool &need_conf void ui_menu_control_device_image::load_software_part() { - astring temp_name = astring(sld->list_name()).cat(":").cat(swi->shortname()).cat(":").cat(swp->name()); + std::string temp_name = std::string(sld->list_name()).append(":").append(swi->shortname()).append(":").append(swp->name()); driver_enumerator drivlist(machine().options(), machine().options().system_name()); media_auditor auditor(drivlist); @@ -152,7 +152,7 @@ void ui_menu_control_device_image::load_software_part() // hook_load //------------------------------------------------- -void ui_menu_control_device_image::hook_load(astring name, bool softlist) +void ui_menu_control_device_image::hook_load(std::string name, bool softlist) { if (image->is_reset_on_load()) image->set_init_phase(); image->load(name.c_str()); @@ -330,7 +330,7 @@ void ui_menu_control_device_image::handle() break; case DO_CREATE: { - astring path; + std::string path; zippath_combine(path, current_directory.c_str(), current_file.c_str()); int err = image->create(path.c_str(), 0, NULL); if (err != 0) diff --git a/src/emu/ui/imgcntrl.h b/src/emu/ui/imgcntrl.h index 62912ce6922..d2db9404187 100644 --- a/src/emu/ui/imgcntrl.h +++ b/src/emu/ui/imgcntrl.h @@ -37,11 +37,11 @@ protected: int state; device_image_interface *image; int submenu_result; - astring current_directory; - astring current_file; + std::string current_directory; + std::string current_file; // methods - virtual void hook_load(astring filename, bool softlist); + virtual void hook_load(std::string filename, bool softlist); bool create_ok; @@ -52,7 +52,7 @@ private: const software_info *swi; const software_part *swp; class software_list_device *sld; - astring software_info_name; + std::string software_info_name; // methods void test_create(bool &can_create, bool &need_confirm); diff --git a/src/emu/ui/info.c b/src/emu/ui/info.c index 8ff2c7d50fb..caee68b8bce 100644 --- a/src/emu/ui/info.c +++ b/src/emu/ui/info.c @@ -29,7 +29,7 @@ ui_menu_game_info::~ui_menu_game_info() void ui_menu_game_info::populate() { - astring tempstring; + std::string tempstring; item_append(machine().ui().game_info_astring(tempstring).c_str(), NULL, MENU_FLAG_MULTILINE, NULL); } @@ -85,13 +85,13 @@ void ui_menu_image_info::image_info(device_image_interface *image) // if image has been loaded through softlist, let's add some more info if (image->software_entry()) { - astring str; + std::string str; // display long filename item_append(image->longname(), "", MENU_FLAG_DISABLE, NULL); // display manufacturer and year - str.catprintf("%s, %s", image->manufacturer(), image->year()); + strcatprintf(str, "%s, %s", image->manufacturer(), image->year()); item_append(str.c_str(), "", MENU_FLAG_DISABLE, NULL); // display supported information, if available diff --git a/src/emu/ui/inputmap.c b/src/emu/ui/inputmap.c index 06f1fa748d0..129d933ae92 100644 --- a/src/emu/ui/inputmap.c +++ b/src/emu/ui/inputmap.c @@ -92,7 +92,7 @@ void ui_menu_input_general::populate() { input_item_data *itemlist = NULL; int suborder[SEQ_TYPE_TOTAL]; - astring tempstring; + std::string tempstring; int sortorder = 1; /* create a mini lookup table for sort order based on sequence type */ @@ -155,7 +155,7 @@ void ui_menu_input_specific::populate() { input_item_data *itemlist = NULL; int suborder[SEQ_TYPE_TOTAL]; - astring tempstring; + std::string tempstring; int port_count = 0; /* create a mini lookup table for sort order based on sequence type */ @@ -382,9 +382,9 @@ void ui_menu_input::populate_and_sort(input_item_data *itemlist) const char *nameformat[INPUT_TYPE_TOTAL] = { 0 }; input_item_data **itemarray, *item; int numitems = 0, curitem; - astring text; - astring subtext; - astring prev_owner; + std::string text; + std::string subtext; + std::string prev_owner; bool first_entry = true; /* create a mini lookup table for name format based on type */ @@ -420,17 +420,17 @@ void ui_menu_input::populate_and_sort(input_item_data *itemlist) first_entry = false; else item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); - text.printf("[root%s]", item->owner_name); + strprintf(text, "[root%s]", item->owner_name); item_append(text.c_str(), NULL, 0, NULL); - prev_owner.cpy(item->owner_name); + prev_owner.assign(item->owner_name); } - text.printf(nameformat[item->type], item->name); + strprintf(text, nameformat[item->type], item->name); /* if we're polling this item, use some spaces with left/right arrows */ if (pollingref == item->ref) { - subtext.cpy(" "); + subtext.assign(" "); flags |= MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW; } @@ -545,7 +545,7 @@ void ui_menu_settings::populate() ioport_field *field; ioport_port *port; dip_descriptor **diplist_tailptr; - astring prev_owner; + std::string prev_owner; bool first_entry = true; /* reset the dip switch tracking */ @@ -559,7 +559,7 @@ void ui_menu_settings::populate() if (field->type() == type && field->enabled()) { UINT32 flags = 0; - astring name; + std::string name; /* set the left/right flags appropriately */ if (field->has_previous_setting()) @@ -574,12 +574,12 @@ void ui_menu_settings::populate() first_entry = false; else item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); - name.printf("[root%s]", field->device().tag()); + strprintf(name, "[root%s]", field->device().tag()); item_append(name.c_str(), NULL, 0, NULL); - prev_owner.cpy(field->device().tag()); + prev_owner.assign(field->device().tag()); } - name.cpy(field->name()); + name.assign(field->name()); item_append(name.c_str(), field->setting_name(), flags, (void *)field); @@ -825,9 +825,9 @@ void ui_menu_analog::populate() { ioport_field *field; ioport_port *port; - astring text; - astring subtext; - astring prev_owner; + std::string text; + std::string subtext; + std::string prev_owner; bool first_entry = true; /* loop over input ports and add the items */ @@ -871,19 +871,19 @@ void ui_menu_analog::populate() { analog_item_data *data; UINT32 flags = 0; - astring name; + std::string name; if (strcmp(field->device().tag(), prev_owner.c_str()) != 0) { if (first_entry) first_entry = false; else item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); - name.printf("[root%s]", field->device().tag()); + strprintf(name,"[root%s]", field->device().tag()); item_append(name.c_str(), NULL, 0, NULL); - prev_owner.cpy(field->device().tag()); + prev_owner.assign(field->device().tag()); } - name.cpy(field->name()); + name.assign(field->name()); /* allocate a data item for tracking what this menu item refers to */ data = (analog_item_data *)m_pool_alloc(sizeof(*data)); @@ -895,8 +895,8 @@ void ui_menu_analog::populate() { default: case ANALOG_ITEM_KEYSPEED: - text.printf("%s Digital Speed", name.c_str()); - subtext.printf("%d", settings.delta); + strprintf(text, "%s Digital Speed", name.c_str()); + strprintf(subtext, "%d", settings.delta); data->min = 0; data->max = 255; data->cur = settings.delta; @@ -904,8 +904,8 @@ void ui_menu_analog::populate() break; case ANALOG_ITEM_CENTERSPEED: - text.printf("%s Autocenter Speed", name.c_str()); - subtext.printf("%d", settings.centerdelta); + strprintf(text, "%s Autocenter Speed", name.c_str()); + strprintf(subtext, "%d", settings.centerdelta); data->min = 0; data->max = 255; data->cur = settings.centerdelta; @@ -913,8 +913,8 @@ void ui_menu_analog::populate() break; case ANALOG_ITEM_REVERSE: - text.printf("%s Reverse", name.c_str()); - subtext.cpy(settings.reverse ? "On" : "Off"); + strprintf(text, "%s Reverse", name.c_str()); + subtext.assign(settings.reverse ? "On" : "Off"); data->min = 0; data->max = 1; data->cur = settings.reverse; @@ -922,8 +922,8 @@ void ui_menu_analog::populate() break; case ANALOG_ITEM_SENSITIVITY: - text.printf("%s Sensitivity", name.c_str()); - subtext.printf("%d", settings.sensitivity); + strprintf(text, "%s Sensitivity", name.c_str()); + strprintf(subtext, "%d", settings.sensitivity); data->min = 1; data->max = 255; data->cur = settings.sensitivity; diff --git a/src/emu/ui/mainmenu.c b/src/emu/ui/mainmenu.c index be8ca14f9a3..9e122ba7a2b 100644 --- a/src/emu/ui/mainmenu.c +++ b/src/emu/ui/mainmenu.c @@ -50,12 +50,12 @@ ui_menu_main::ui_menu_main(running_machine &machine, render_container *container void ui_menu_main::populate() { - astring menu_text; + std::string menu_text; /* add input menu items */ item_append("Input (general)", NULL, 0, (void *)INPUT_GROUPS); - menu_text.printf("Input (this %s)",emulator_info::get_capstartgamenoun()); + strprintf(menu_text, "Input (this %s)", emulator_info::get_capstartgamenoun()); item_append(menu_text.c_str(), NULL, 0, (void *)INPUT_SPECIFIC); /* add optional input-related menus */ @@ -65,7 +65,7 @@ void ui_menu_main::populate() item_append("Dip Switches", NULL, 0, (void *)SETTINGS_DIP_SWITCHES); if (machine().ioport().has_configs()) { - menu_text.printf("%s Configuration",emulator_info::get_capstartgamenoun()); + strprintf(menu_text, "%s Configuration", emulator_info::get_capstartgamenoun()); item_append(menu_text.c_str(), NULL, 0, (void *)SETTINGS_DRIVER_CONFIG); } @@ -73,7 +73,7 @@ void ui_menu_main::populate() item_append("Bookkeeping Info", NULL, 0, (void *)BOOKKEEPING); /* add game info menu */ - menu_text.printf("%s Information",emulator_info::get_capstartgamenoun()); + strprintf(menu_text, "%s Information", emulator_info::get_capstartgamenoun()); item_append(menu_text.c_str(), NULL, 0, (void *)GAME_INFO); image_interface_iterator imgiter(machine().root_device()); @@ -134,7 +134,7 @@ void ui_menu_main::populate() item_append("Cheat", NULL, 0, (void *)CHEAT); /* add reset and exit menus */ - menu_text.printf("Select New %s",emulator_info::get_capstartgamenoun()); + strprintf(menu_text, "Select New %s", emulator_info::get_capstartgamenoun()); item_append(menu_text.c_str(), NULL, 0, (void *)SELECT_GAME); } diff --git a/src/emu/ui/menu.c b/src/emu/ui/menu.c index 1ae7c2d2145..906aa507087 100644 --- a/src/emu/ui/menu.c +++ b/src/emu/ui/menu.c @@ -180,8 +180,8 @@ void ui_menu::reset(ui_menu_reset_options options) numitems = 0; visitems = 0; selected = 0; - astring backtext; - backtext.printf("Return to %s",emulator_info::get_capstartgamenoun()); + std::string backtext; + strprintf(backtext, "Return to %s", emulator_info::get_capstartgamenoun()); // add an item to return if (parent == NULL) diff --git a/src/emu/ui/miscmenu.c b/src/emu/ui/miscmenu.c index a3f55b31cd7..e06b8933de0 100644 --- a/src/emu/ui/miscmenu.c +++ b/src/emu/ui/miscmenu.c @@ -120,16 +120,16 @@ void ui_menu_bios_selection::handle() if (val>cnt) val=1; dev->set_system_bios(val); if (strcmp(dev->tag(),":")==0) { - astring error; + std::string error; machine().options().set_value("bios", val-1, OPTION_PRIORITY_CMDLINE, error); - assert(!error); + assert(error.empty()); } else { - astring error; - astring value; - astring temp; - value.printf("%s,bios=%d",machine().options().main_value(temp,dev->owner()->tag()+1),val-1); + std::string error; + std::string value; + std::string temp; + strprintf(value,"%s,bios=%d",machine().options().main_value(temp,dev->owner()->tag()+1),val-1); machine().options().set_value(dev->owner()->tag()+1, value.c_str(), OPTION_PRIORITY_CMDLINE, error); - assert(!error); + assert(error.empty()); } reset(UI_MENU_RESET_REMEMBER_REF); } @@ -233,18 +233,18 @@ ui_menu_bookkeeping::~ui_menu_bookkeeping() void ui_menu_bookkeeping::populate() { int tickets = get_dispensed_tickets(machine()); - astring tempstring; + std::string tempstring; int ctrnum; /* show total time first */ if (prevtime.seconds >= 60 * 60) - tempstring.catprintf("Uptime: %d:%02d:%02d\n\n", prevtime.seconds / (60*60), (prevtime.seconds / 60) % 60, prevtime.seconds % 60); + strcatprintf(tempstring, "Uptime: %d:%02d:%02d\n\n", prevtime.seconds / (60 * 60), (prevtime.seconds / 60) % 60, prevtime.seconds % 60); else - tempstring.catprintf("Uptime: %d:%02d\n\n", (prevtime.seconds / 60) % 60, prevtime.seconds % 60); + strcatprintf(tempstring,"Uptime: %d:%02d\n\n", (prevtime.seconds / 60) % 60, prevtime.seconds % 60); /* show tickets at the top */ if (tickets > 0) - tempstring.catprintf("Tickets dispensed: %d\n\n", tickets); + strcatprintf(tempstring,"Tickets dispensed: %d\n\n", tickets); /* loop over coin counters */ for (ctrnum = 0; ctrnum < COIN_COUNTERS; ctrnum++) @@ -252,18 +252,18 @@ void ui_menu_bookkeeping::populate() int count = coin_counter_get_count(machine(), ctrnum); /* display the coin counter number */ - tempstring.catprintf("Coin %c: ", ctrnum + 'A'); + strcatprintf(tempstring,"Coin %c: ", ctrnum + 'A'); /* display how many coins */ if (count == 0) - tempstring.cat("NA"); + tempstring.append("NA"); else - tempstring.catprintf("%d", count); + strcatprintf(tempstring, "%d", count); /* display whether or not we are locked out */ if (coin_lockout_get_state(machine(), ctrnum)) - tempstring.cat(" (locked)"); - tempstring.cat("\n"); + tempstring.append(" (locked)"); + tempstring.append("\n"); } /* append the single item */ diff --git a/src/emu/ui/selgame.c b/src/emu/ui/selgame.c index 8a78d8a5c4f..45faeac207a 100644 --- a/src/emu/ui/selgame.c +++ b/src/emu/ui/selgame.c @@ -232,8 +232,8 @@ void ui_menu_select_game::populate() // if nothing there, add a single multiline item and return if (matchcount == 0) { - astring txt; - txt.printf("No %s found. Please check the rompath specified in the %s.ini file.\n\n" + std::string txt; + strprintf(txt, "No %s found. Please check the rompath specified in the %s.ini file.\n\n" "If this is your first time using %s, please see the config.txt file in " "the docs directory for information on configuring %s.", emulator_info::get_gamesnoun(), @@ -282,15 +282,15 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott const game_driver *driver; float width, maxwidth; float x1, y1, x2, y2; - astring tempbuf[5]; + std::string tempbuf[5]; rgb_t color; int line; // display the current typeahead if (m_search[0] != 0) - tempbuf[0].printf("Type name or select: %s_", m_search); + strprintf(tempbuf[0], "Type name or select: %s_", m_search); else - tempbuf[0].printf("Type name or select: (random)"); + strprintf(tempbuf[0],"Type name or select: (random)"); // get the size of the text machine().ui().draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE, @@ -324,21 +324,21 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott const char *gfxstat, *soundstat; // first line is game name - tempbuf[0].printf("%-.100s", driver->description); + strprintf(tempbuf[0],"%-.100s", driver->description); // next line is year, manufacturer - tempbuf[1].printf("%s, %-.100s", driver->year, driver->manufacturer); + strprintf(tempbuf[1], "%s, %-.100s", driver->year, driver->manufacturer); // next line source path - tempbuf[2].printf("Driver: %-.100s", core_filename_extract_base(tempbuf[3], driver->source_file).c_str()); + strprintf(tempbuf[2],"Driver: %-.100s", core_filename_extract_base(tempbuf[3], driver->source_file).c_str()); // next line is overall driver status if (driver->flags & GAME_NOT_WORKING) - tempbuf[3].cpy("Overall: NOT WORKING"); + tempbuf[3].assign("Overall: NOT WORKING"); else if (driver->flags & GAME_UNEMULATED_PROTECTION) - tempbuf[3].cpy("Overall: Unemulated Protection"); + tempbuf[3].assign("Overall: Unemulated Protection"); else - tempbuf[3].cpy("Overall: Working"); + tempbuf[3].assign("Overall: Working"); // next line is graphics, sound status if (driver->flags & (GAME_IMPERFECT_GRAPHICS | GAME_WRONG_COLORS | GAME_IMPERFECT_COLORS)) @@ -353,7 +353,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott else soundstat = "OK"; - tempbuf[4].printf("Gfx: %s, Sound: %s", gfxstat, soundstat); + strprintf(tempbuf[4], "Gfx: %s, Sound: %s", gfxstat, soundstat); } else { @@ -361,13 +361,13 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott line = 0; // first line is version string - tempbuf[line++].printf("%s %s", emulator_info::get_applongname(), build_version); + strprintf(tempbuf[line++], "%s %s", emulator_info::get_applongname(), build_version); // output message while (line < ARRAY_LENGTH(tempbuf)) { if (!(*s == 0 || *s == '\n')) - tempbuf[line].cat(*s); + tempbuf[line].push_back(*s); if (*s == '\n') { diff --git a/src/emu/ui/sliders.c b/src/emu/ui/sliders.c index 73b077e7c08..e547538bc76 100644 --- a/src/emu/ui/sliders.c +++ b/src/emu/ui/sliders.c @@ -130,7 +130,7 @@ void ui_menu_sliders::handle() void ui_menu_sliders::populate() { - astring tempstring; + std::string tempstring; /* add UI sliders */ for (const slider_state *curslider = machine().ui().get_slider_list(); curslider != NULL; curslider = curslider->next) @@ -175,7 +175,7 @@ void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom, float bar_left, bar_area_top, bar_width, bar_area_height, bar_top, bar_bottom, default_x, current_x; float line_height = machine().ui().get_line_height(); float percentage, default_percentage; - astring tempstring; + std::string tempstring; float text_height; INT32 curval; @@ -187,7 +187,7 @@ void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom, default_percentage = (float)(curslider->defval - curslider->minval) / (float)(curslider->maxval - curslider->minval); /* assemble the text */ - tempstring.ins(0, " ").ins(0, curslider->description); + tempstring.insert(0, " ").insert(0, curslider->description); /* move us to the bottom of the screen, and expand to full width */ y2 = 1.0f - UI_BOX_TB_BORDER; diff --git a/src/emu/ui/slotopt.c b/src/emu/ui/slotopt.c index ff1d7a54482..5a2314591a6 100644 --- a/src/emu/ui/slotopt.c +++ b/src/emu/ui/slotopt.c @@ -28,7 +28,7 @@ device_slot_option *ui_menu_slot_devices::slot_get_current_option(device_slot_in } else { - astring temp; + std::string temp; current = machine().options().main_value(temp, slot->device().tag() + 1); } @@ -134,9 +134,9 @@ const char *ui_menu_slot_devices::slot_get_option(device_slot_interface *slot, i void ui_menu_slot_devices::set_slot_device(device_slot_interface *slot, const char *val) { - astring error; + std::string error; machine().options().set_value(slot->device().tag()+1, val, OPTION_PRIORITY_CMDLINE, error); - assert(!error); + assert(error.empty()); } /*------------------------------------------------- @@ -156,14 +156,14 @@ void ui_menu_slot_devices::populate() { /* record the menu item */ const device_slot_option *option = slot_get_current_option(slot); - astring opt_name; + std::string opt_name; if (option == NULL) - opt_name.cpy("------"); + opt_name.assign("------"); else { - opt_name.cpy(option->name()); + opt_name.assign(option->name()); if (slot->fixed() || slot_get_length(slot) == 0) - opt_name.cat(" [internal]"); + opt_name.append(" [internal]"); } item_append(slot->device().tag() + 1, opt_name.c_str(), (slot->fixed() || slot_get_length(slot) == 0) ? 0 : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), (void *)slot); diff --git a/src/emu/ui/swlist.c b/src/emu/ui/swlist.c index 5917b552ea4..847483edcc1 100644 --- a/src/emu/ui/swlist.c +++ b/src/emu/ui/swlist.c @@ -82,9 +82,9 @@ void ui_menu_software_parts::populate() software_part_menu_entry *entry = (software_part_menu_entry *) m_pool_alloc(sizeof(*entry)); // check if the available parts have specific part_id to be displayed (e.g. "Map Disc", "Bonus Disc", etc.) // if not, we simply display "part_name"; if yes we display "part_name (part_id)" - astring menu_part_name(swpart->name()); + std::string menu_part_name(swpart->name()); if (swpart->feature("part_id") != NULL) - menu_part_name.cat(" (").cat(swpart->feature("part_id")).cat(")"); + menu_part_name.append(" (").append(swpart->feature("part_id")).append(")"); entry->type = T_ENTRY; entry->part = swpart; item_append(m_info->shortname(), menu_part_name.c_str(), 0, entry); @@ -120,7 +120,7 @@ void ui_menu_software_parts::handle() // ctor //------------------------------------------------- -ui_menu_software_list::ui_menu_software_list(running_machine &machine, render_container *container, software_list_device *swlist, const char *interface, astring &result) +ui_menu_software_list::ui_menu_software_list(running_machine &machine, render_container *container, software_list_device *swlist, const char *interface, std::string &result) : ui_menu(machine, container), m_result(result) { m_swlist = swlist; diff --git a/src/emu/ui/swlist.h b/src/emu/ui/swlist.h index 8d234e11ee8..7ca6f7513b8 100644 --- a/src/emu/ui/swlist.h +++ b/src/emu/ui/swlist.h @@ -41,7 +41,7 @@ private: class ui_menu_software_list : public ui_menu { public: - ui_menu_software_list(running_machine &machine, render_container *container, software_list_device *swlist, const char *interface, astring &result); + ui_menu_software_list(running_machine &machine, render_container *container, software_list_device *swlist, const char *interface, std::string &result); virtual ~ui_menu_software_list(); virtual void populate(); virtual void handle(); @@ -57,7 +57,7 @@ private: // variables software_list_device * m_swlist; // currently selected list const char * m_interface; - astring & m_result; + std::string & m_result; entry_info * m_entrylist; char m_filename_buffer[1024]; bool m_ordered_by_shortname; diff --git a/src/emu/ui/tapectrl.c b/src/emu/ui/tapectrl.c index 2de59a87767..c4bd850e232 100644 --- a/src/emu/ui/tapectrl.c +++ b/src/emu/ui/tapectrl.c @@ -62,7 +62,7 @@ void ui_menu_tape_control::populate() if (current_device()->exists()) { - astring timepos; + std::string timepos; cassette_state state; double t0 = current_device()->get_position(); double t1 = current_device()->get_length(); @@ -163,7 +163,7 @@ void ui_menu_tape_control::handle() // representation of the time //------------------------------------------------- -void ui_menu_tape_control::get_time_string(astring &dest, cassette_image_device *cassette, int *curpos, int *endpos) +void ui_menu_tape_control::get_time_string(std::string &dest, cassette_image_device *cassette, int *curpos, int *endpos) { double t0, t1; @@ -171,9 +171,9 @@ void ui_menu_tape_control::get_time_string(astring &dest, cassette_image_device t1 = cassette->get_length(); if (t1) - dest.printf("%04d/%04d", (int) t0, (int) t1); + strprintf(dest, "%04d/%04d", (int)t0, (int)t1); else - dest.printf("%04d/%04d", 0, (int) t1); + strprintf(dest, "%04d/%04d", 0, (int)t1); if (curpos != NULL) *curpos = t0; diff --git a/src/emu/ui/tapectrl.h b/src/emu/ui/tapectrl.h index b1c36c73dcd..dadaca63f6a 100644 --- a/src/emu/ui/tapectrl.h +++ b/src/emu/ui/tapectrl.h @@ -25,7 +25,7 @@ public: virtual void handle(); private: - static void get_time_string(astring &dest, cassette_image_device *cassette, int *curpos, int *endpos); + static void get_time_string(std::string &dest, cassette_image_device *cassette, int *curpos, int *endpos); }; #endif /* __UI_TAPECTRL_H__ */ diff --git a/src/emu/ui/ui.c b/src/emu/ui/ui.c index c3041a7d885..5ca1b3ddb13 100644 --- a/src/emu/ui/ui.c +++ b/src/emu/ui/ui.c @@ -92,7 +92,7 @@ static const input_item_id non_char_keys[] = ***************************************************************************/ // messagebox buffer -static astring messagebox_text; +static std::string messagebox_text; static rgb_t messagebox_backcolor; // slider info @@ -107,28 +107,28 @@ static slider_state *slider_current; // slider controls static slider_state *slider_alloc(running_machine &machine, const char *title, INT32 minval, INT32 defval, INT32 maxval, INT32 incval, slider_update update, void *arg); static slider_state *slider_init(running_machine &machine); -static INT32 slider_volume(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_mixervol(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_adjuster(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_overclock(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_refresh(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_brightness(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_contrast(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_gamma(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_xscale(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_yscale(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_xoffset(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_yoffset(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_overxscale(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_overyscale(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_flicker(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_beam(running_machine &machine, void *arg, astring *str, INT32 newval); +static INT32 slider_volume(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_mixervol(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_adjuster(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_overclock(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_refresh(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_brightness(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_contrast(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_gamma(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_xscale(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_yscale(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_xoffset(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_yoffset(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_overxscale(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_overyscale(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_flicker(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_beam(running_machine &machine, void *arg, std::string *str, INT32 newval); static char *slider_get_screen_desc(screen_device &screen); #ifdef MAME_DEBUG -static INT32 slider_crossscale(running_machine &machine, void *arg, astring *str, INT32 newval); -static INT32 slider_crossoffset(running_machine &machine, void *arg, astring *str, INT32 newval); +static INT32 slider_crossscale(running_machine &machine, void *arg, std::string *str, INT32 newval); +static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string *str, INT32 newval); #endif @@ -335,12 +335,12 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) switch (state) { case 0: - if (show_disclaimer && disclaimer_string(messagebox_text).len() > 0) + if (show_disclaimer && disclaimer_string(messagebox_text).length() > 0) set_handler(handler_messagebox_ok, 0); break; case 1: - if (show_warnings && warnings_string(messagebox_text).len() > 0) + if (show_warnings && warnings_string(messagebox_text).length() > 0) { set_handler(handler_messagebox_ok, 0); if (machine().system().flags & (GAME_WRONG_COLORS | GAME_IMPERFECT_COLORS | GAME_REQUIRES_ARTWORK | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_KEYBOARD | GAME_NO_SOUND)) @@ -351,15 +351,15 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) break; case 2: - if (show_gameinfo && game_info_astring(messagebox_text).len() > 0) + if (show_gameinfo && game_info_astring(messagebox_text).length() > 0) set_handler(handler_messagebox_anykey, 0); break; case 3: - if (show_mandatory_fileman && image_mandatory_scan(machine(), messagebox_text).len() > 0) + if (show_mandatory_fileman && image_mandatory_scan(machine(), messagebox_text).length() > 0) { - astring warning; - warning.cpy("This driver requires images to be loaded in the following device(s): ").cat(messagebox_text.substr(0, messagebox_text.len() - 2)); + std::string warning; + warning.assign("This driver requires images to be loaded in the following device(s): ").append(messagebox_text.substr(0, messagebox_text.length() - 2)); ui_menu_file_manager::force_file_manager(machine(), &machine().render().ui_container(), warning.c_str()); } break; @@ -398,7 +398,7 @@ void ui_manager::set_startup_text(const char *text, bool force) osd_ticks_t curtime = osd_ticks(); // copy in the new text - messagebox_text.cpy(text); + messagebox_text.assign(text); messagebox_backcolor = UI_BACKGROUND_COLOR; // don't update more than 4 times/second @@ -694,6 +694,9 @@ void ui_manager::draw_text_full(render_container *container, const char *origs, break; curwidth -= get_font()->char_width(lineheight, aspect, schar); + // if back to 0, there is no space to draw even a single char + if (curwidth <= 0) + break; } } @@ -866,7 +869,7 @@ void CLIB_DECL ui_manager::popup_time(int seconds, const char *text, ...) // extract the text va_start(arg,text); - messagebox_text.vprintf(text, arg); + strvprintf(messagebox_text, text, arg); messagebox_backcolor = UI_BACKGROUND_COLOR; va_end(arg); @@ -989,11 +992,11 @@ bool ui_manager::is_menu_active(void) // text to the given buffer //------------------------------------------------- -astring &ui_manager::disclaimer_string(astring &str) +std::string &ui_manager::disclaimer_string(std::string &str) { - str.cpy("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"); - str.catprintf("IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine().system().description); - str.cat("Otherwise, type OK or move the joystick left then right to continue"); + str.assign("Usage of emulators in conjunction with ROMs you don't own is forbidden by copyright law.\n\n"); + strcatprintf(str, "IF YOU ARE NOT LEGALLY ENTITLED TO PLAY \"%s\" ON THIS EMULATOR, PRESS ESC.\n\n", machine().system().description); + str.append("Otherwise, type OK or move the joystick left then right to continue"); return str; } @@ -1003,7 +1006,7 @@ astring &ui_manager::disclaimer_string(astring &str) // text to the given buffer //------------------------------------------------- -astring &ui_manager::warnings_string(astring &str) +std::string &ui_manager::warnings_string(std::string &str) { #define WARNING_FLAGS ( GAME_NOT_WORKING | \ GAME_UNEMULATED_PROTECTION | \ @@ -1017,79 +1020,79 @@ astring &ui_manager::warnings_string(astring &str) GAME_IMPERFECT_KEYBOARD | \ GAME_NO_COCKTAIL) - str.reset(); + str.clear(); // if no warnings, nothing to return - if (rom_load_warnings(machine()) == 0 && rom_load_knownbad(machine()) == 0 && !(machine().system().flags & WARNING_FLAGS) && software_load_warnings_message(machine()).len()==0) + if (rom_load_warnings(machine()) == 0 && rom_load_knownbad(machine()) == 0 && !(machine().system().flags & WARNING_FLAGS) && software_load_warnings_message(machine()).length() == 0) return str; // add a warning if any ROMs were loaded with warnings if (rom_load_warnings(machine()) > 0) { - str.cat("One or more ROMs/CHDs for this game are incorrect. The "); - str.cat(emulator_info::get_gamenoun()); - str.cat(" may not run correctly.\n"); + str.append("One or more ROMs/CHDs for this game are incorrect. The "); + str.append(emulator_info::get_gamenoun()); + str.append(" may not run correctly.\n"); if (machine().system().flags & WARNING_FLAGS) - str.cat("\n"); + str.append("\n"); } - if (software_load_warnings_message(machine()).len()>0) { - str.cat(software_load_warnings_message(machine())); + if (software_load_warnings_message(machine()).length()>0) { + str.append(software_load_warnings_message(machine())); if (machine().system().flags & WARNING_FLAGS) - str.cat("\n"); + str.append("\n"); } // if we have at least one warning flag, print the general header if ((machine().system().flags & WARNING_FLAGS) || rom_load_knownbad(machine()) > 0) { - str.cat("There are known problems with this "); - str.cat(emulator_info::get_gamenoun()); - str.cat("\n\n"); + str.append("There are known problems with this "); + str.append(emulator_info::get_gamenoun()); + str.append("\n\n"); // add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP if (rom_load_knownbad(machine()) > 0) { - str.cat("One or more ROMs/CHDs for this "); - str.cat(emulator_info::get_gamenoun()); - str.cat(" have not been correctly dumped.\n"); + str.append("One or more ROMs/CHDs for this "); + str.append(emulator_info::get_gamenoun()); + str.append(" have not been correctly dumped.\n"); } // add one line per warning flag if (machine().system().flags & GAME_IMPERFECT_KEYBOARD) - str.cat("The keyboard emulation may not be 100% accurate.\n"); + str.append("The keyboard emulation may not be 100% accurate.\n"); if (machine().system().flags & GAME_IMPERFECT_COLORS) - str.cat("The colors aren't 100% accurate.\n"); + str.append("The colors aren't 100% accurate.\n"); if (machine().system().flags & GAME_WRONG_COLORS) - str.cat("The colors are completely wrong.\n"); + str.append("The colors are completely wrong.\n"); if (machine().system().flags & GAME_IMPERFECT_GRAPHICS) - str.cat("The video emulation isn't 100% accurate.\n"); + str.append("The video emulation isn't 100% accurate.\n"); if (machine().system().flags & GAME_IMPERFECT_SOUND) - str.cat("The sound emulation isn't 100% accurate.\n"); + str.append("The sound emulation isn't 100% accurate.\n"); if (machine().system().flags & GAME_NO_SOUND) - str.cat("The game lacks sound.\n"); + str.append("The game lacks sound.\n"); if (machine().system().flags & GAME_NO_COCKTAIL) - str.cat("Screen flipping in cocktail mode is not supported.\n"); + str.append("Screen flipping in cocktail mode is not supported.\n"); // check if external artwork is present before displaying this warning? if (machine().system().flags & GAME_REQUIRES_ARTWORK) - str.cat("The game requires external artwork files\n"); + str.append("The game requires external artwork files\n"); // if there's a NOT WORKING, UNEMULATED PROTECTION or GAME MECHANICAL warning, make it stronger if (machine().system().flags & (GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_MECHANICAL)) { // add the strings for these warnings if (machine().system().flags & GAME_UNEMULATED_PROTECTION) - str.cat("The game has protection which isn't fully emulated.\n"); + str.append("The game has protection which isn't fully emulated.\n"); if (machine().system().flags & GAME_NOT_WORKING) { - str.cat("\nTHIS "); - str.cat(emulator_info::get_capgamenoun()); - str.cat(" DOESN'T WORK. The emulation for this game is not yet complete. " + str.append("\nTHIS "); + str.append(emulator_info::get_capgamenoun()); + str.append(" DOESN'T WORK. The emulation for this game is not yet complete. " "There is nothing you can do to fix this problem except wait for the developers to improve the emulation.\n"); } if (machine().system().flags & GAME_MECHANICAL) { - str.cat("\nCertain elements of this "); - str.cat(emulator_info::get_gamenoun()); - str.cat(" cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " + str.append("\nCertain elements of this "); + str.append(emulator_info::get_gamenoun()); + str.append(" cannot be emulated as it requires actual physical interaction or consists of mechanical devices. " "It is not possible to fully play this "); - str.cat(emulator_info::get_gamenoun()); - str.cat(".\n"); + str.append(emulator_info::get_gamenoun()); + str.append(".\n"); } // find the parent of this driver @@ -1107,34 +1110,34 @@ astring &ui_manager::warnings_string(astring &str) { // this one works, add a header and display the name of the clone if (!foundworking) - str.cat("\n\nThere are working clones of this game: "); + str.append("\n\nThere are working clones of this game: "); else - str.cat(", "); - str.cat(drivlist.driver().name); + str.append(", "); + str.append(drivlist.driver().name); foundworking = true; } if (foundworking) - str.cat("\n"); + str.append("\n"); } } // add the 'press OK' string - str.cat("\n\nType OK or move the joystick left then right to continue"); + str.append("\n\nType OK or move the joystick left then right to continue"); return str; } //------------------------------------------------- -// game_info_astring - populate an allocated +// game_info_std::string - populate an allocated // string with the game info text //------------------------------------------------- -astring &ui_manager::game_info_astring(astring &str) +std::string &ui_manager::game_info_astring(std::string &str) { // print description, manufacturer, and CPU: - astring tempstr; - str.printf("%s\n%s %s\nDriver: %s\n\nCPU:\n", machine().system().description, machine().system().year, machine().system().manufacturer, core_filename_extract_base(tempstr, machine().system().source_file).c_str()); + std::string tempstr; + strprintf(str, "%s\n%s %s\nDriver: %s\n\nCPU:\n", machine().system().description, machine().system().year, machine().system().manufacturer, core_filename_extract_base(tempstr, machine().system().source_file).c_str()); // loop over all CPUs execute_interface_iterator execiter(machine().root_device()); @@ -1159,14 +1162,14 @@ astring &ui_manager::game_info_astring(astring &str) // if more than one, prepend a #x in front of the CPU name if (count > 1) - str.catprintf("%d" UTF8_MULTIPLY, count); - str.cat(name); + strcatprintf(str, "%d" UTF8_MULTIPLY, count); + str.append(name); // display clock in kHz or MHz if (clock >= 1000000) - str.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); + strcatprintf(str, " %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); else - str.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); + strcatprintf(str, " %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); } // loop over all sound chips @@ -1180,7 +1183,7 @@ astring &ui_manager::game_info_astring(astring &str) // append the Sound: string if (!found_sound) - str.cat("\nSound:\n"); + str.append("\nSound:\n"); found_sound = true; // count how many identical sound chips we have @@ -1194,42 +1197,42 @@ astring &ui_manager::game_info_astring(astring &str) } // if more than one, prepend a #x in front of the CPU name if (count > 1) - str.catprintf("%d" UTF8_MULTIPLY, count); - str.cat(sound->device().name()); + strcatprintf(str, "%d" UTF8_MULTIPLY, count); + str.append(sound->device().name()); // display clock in kHz or MHz int clock = sound->device().clock(); if (clock >= 1000000) - str.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); + strcatprintf(str, " %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000); else if (clock != 0) - str.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); + strcatprintf(str, " %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000); else - str.cat("\n"); + str.append("\n"); } // display screen information - str.cat("\nVideo:\n"); + str.append("\nVideo:\n"); screen_device_iterator scriter(machine().root_device()); int scrcount = scriter.count(); if (scrcount == 0) - str.cat("None\n"); + str.append("None\n"); else { for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next()) { if (scrcount > 1) { - str.cat(slider_get_screen_desc(*screen)); - str.cat(": "); + str.append(slider_get_screen_desc(*screen)); + str.append(": "); } if (screen->screen_type() == SCREEN_TYPE_VECTOR) - str.cat("Vector\n"); + str.append("Vector\n"); else { const rectangle &visarea = screen->visible_area(); - str.catprintf("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", + strcatprintf(str, "%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n", visarea.width(), visarea.height(), (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H", ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds)); @@ -1468,7 +1471,7 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co // first draw the FPS counter if (machine.ui().show_fps_counter()) { - astring tempstring; + std::string tempstring; machine.ui().draw_text_full(container, machine.video().speed_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL); } @@ -1748,16 +1751,16 @@ void ui_manager::request_quit() UINT32 ui_manager::handler_confirm_quit(running_machine &machine, render_container *container, UINT32 state) { // get the text for 'UI Select' - astring ui_select_text; + std::string ui_select_text; machine.input().seq_name(ui_select_text, machine.ioport().type_seq(IPT_UI_SELECT, 0, SEQ_TYPE_STANDARD)); // get the text for 'UI Cancel' - astring ui_cancel_text; + std::string ui_cancel_text; machine.input().seq_name(ui_cancel_text, machine.ioport().type_seq(IPT_UI_CANCEL, 0, SEQ_TYPE_STANDARD)); // assemble the quit message - astring quit_message; - quit_message.printf( + std::string quit_message; + strprintf(quit_message, "Are you sure you want to quit?\n\n" "Press ''%s'' to quit,\n" "Press ''%s'' to return to emulation.", @@ -1828,7 +1831,7 @@ static slider_state *slider_init(running_machine &machine) ioport_port *port; slider_state *listhead = NULL; slider_state **tailptr = &listhead; - astring str; + std::string str; int item; // add overall volume @@ -1843,7 +1846,7 @@ static slider_state *slider_init(running_machine &machine) INT32 defval = 1000; info.stream->input_name(info.inputnum, str); - str.cat(" Volume"); + str.append(" Volume"); *tailptr = slider_alloc(machine, str.c_str(), 0, defval, maxval, 20, slider_mixervol, (void *)(FPTR)item); tailptr = &(*tailptr)->next; } @@ -1865,7 +1868,7 @@ static slider_state *slider_init(running_machine &machine) for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next()) { void *param = (void *)&exec->device(); - str.printf("Overclock CPU %s", exec->device().tag()); + strprintf(str, "Overclock CPU %s", exec->device().tag()); *tailptr = slider_alloc(machine, str.c_str(), 10, 1000, 2000, 1, slider_overclock, param); tailptr = &(*tailptr)->next; } @@ -1884,33 +1887,33 @@ static slider_state *slider_init(running_machine &machine) // add refresh rate tweaker if (machine.options().cheat()) { - str.printf("%s Refresh Rate", slider_get_screen_desc(*screen)); + strprintf(str, "%s Refresh Rate", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, str.c_str(), -10000, 0, 10000, 1000, slider_refresh, param); tailptr = &(*tailptr)->next; } // add standard brightness/contrast/gamma controls per-screen - str.printf("%s Brightness", slider_get_screen_desc(*screen)); + strprintf(str, "%s Brightness", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 2000, 10, slider_brightness, param); tailptr = &(*tailptr)->next; - str.printf("%s Contrast", slider_get_screen_desc(*screen)); + strprintf(str, "%s Contrast", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 2000, 50, slider_contrast, param); tailptr = &(*tailptr)->next; - str.printf("%s Gamma", slider_get_screen_desc(*screen)); + strprintf(str,"%s Gamma", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, str.c_str(), 100, 1000, 3000, 50, slider_gamma, param); tailptr = &(*tailptr)->next; // add scale and offset controls per-screen - str.printf("%s Horiz Stretch", slider_get_screen_desc(*screen)); + strprintf(str,"%s Horiz Stretch", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, str.c_str(), 500, defxscale, 1500, 2, slider_xscale, param); tailptr = &(*tailptr)->next; - str.printf("%s Horiz Position", slider_get_screen_desc(*screen)); + strprintf(str,"%s Horiz Position", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, str.c_str(), -500, defxoffset, 500, 2, slider_xoffset, param); tailptr = &(*tailptr)->next; - str.printf("%s Vert Stretch", slider_get_screen_desc(*screen)); + strprintf(str,"%s Vert Stretch", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, str.c_str(), 500, defyscale, 1500, 2, slider_yscale, param); tailptr = &(*tailptr)->next; - str.printf("%s Vert Position", slider_get_screen_desc(*screen)); + strprintf(str,"%s Vert Position", slider_get_screen_desc(*screen)); *tailptr = slider_alloc(machine, str.c_str(), -500, defyoffset, 500, 2, slider_yoffset, param); tailptr = &(*tailptr)->next; } @@ -1928,16 +1931,16 @@ static slider_state *slider_init(running_machine &machine) void *param = (void *)laserdisc; // add scale and offset controls per-overlay - str.printf("Laserdisc '%s' Horiz Stretch", laserdisc->tag()); + strprintf(str,"Laserdisc '%s' Horiz Stretch", laserdisc->tag()); *tailptr = slider_alloc(machine, str.c_str(), 500, (defxscale == 0) ? 1000 : defxscale, 1500, 2, slider_overxscale, param); tailptr = &(*tailptr)->next; - str.printf("Laserdisc '%s' Horiz Position", laserdisc->tag()); + strprintf(str,"Laserdisc '%s' Horiz Position", laserdisc->tag()); *tailptr = slider_alloc(machine, str.c_str(), -500, defxoffset, 500, 2, slider_overxoffset, param); tailptr = &(*tailptr)->next; - str.printf("Laserdisc '%s' Vert Stretch", laserdisc->tag()); + strprintf(str,"Laserdisc '%s' Vert Stretch", laserdisc->tag()); *tailptr = slider_alloc(machine, str.c_str(), 500, (defyscale == 0) ? 1000 : defyscale, 1500, 2, slider_overyscale, param); tailptr = &(*tailptr)->next; - str.printf("Laserdisc '%s' Vert Position", laserdisc->tag()); + strprintf(str,"Laserdisc '%s' Vert Position", laserdisc->tag()); *tailptr = slider_alloc(machine, str.c_str(), -500, defyoffset, 500, 2, slider_overyoffset, param); tailptr = &(*tailptr)->next; } @@ -1960,10 +1963,10 @@ static slider_state *slider_init(running_machine &machine) if (field->crosshair_axis() != CROSSHAIR_AXIS_NONE && field->player() == 0) { void *param = (void *)field; - str.printf("Crosshair Scale %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); + strprintf(str,"Crosshair Scale %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); *tailptr = slider_alloc(machine, str.c_str(), -3000, 1000, 3000, 100, slider_crossscale, param); tailptr = &(*tailptr)->next; - str.printf("Crosshair Offset %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); + strprintf(str,"Crosshair Offset %s", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y"); *tailptr = slider_alloc(machine, str.c_str(), -3000, 0, 3000, 100, slider_crossoffset, param); tailptr = &(*tailptr)->next; } @@ -1977,12 +1980,12 @@ static slider_state *slider_init(running_machine &machine) // slider_volume - global volume slider callback //------------------------------------------------- -static INT32 slider_volume(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_volume(running_machine &machine, void *arg, std::string *str, INT32 newval) { if (newval != SLIDER_NOCHANGE) machine.sound().set_attenuation(newval); if (str != NULL) - str->printf("%3ddB", machine.sound().attenuation()); + strprintf(*str,"%3ddB", machine.sound().attenuation()); return machine.sound().attenuation(); } @@ -1992,7 +1995,7 @@ static INT32 slider_volume(running_machine &machine, void *arg, astring *str, IN // slider callback //------------------------------------------------- -static INT32 slider_mixervol(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_mixervol(running_machine &machine, void *arg, std::string *str, INT32 newval) { mixer_input info; if (!machine.sound().indexed_mixer_input((FPTR)arg, info)) @@ -2004,7 +2007,7 @@ static INT32 slider_mixervol(running_machine &machine, void *arg, astring *str, info.stream->set_user_gain(info.inputnum, (float)newval * 0.001f); } if (str != NULL) - str->printf("%4.2f", info.stream->user_gain(info.inputnum)); + strprintf(*str,"%4.2f", info.stream->user_gain(info.inputnum)); return floor(info.stream->user_gain(info.inputnum) * 1000.0f + 0.5f); } @@ -2014,7 +2017,7 @@ static INT32 slider_mixervol(running_machine &machine, void *arg, astring *str, // callback //------------------------------------------------- -static INT32 slider_adjuster(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_adjuster(running_machine &machine, void *arg, std::string *str, INT32 newval) { ioport_field *field = (ioport_field *)arg; ioport_field::user_settings settings; @@ -2026,7 +2029,7 @@ static INT32 slider_adjuster(running_machine &machine, void *arg, astring *str, field->set_user_settings(settings); } if (str != NULL) - str->printf("%d%%", settings.value); + strprintf(*str,"%d%%", settings.value); return settings.value; } @@ -2036,13 +2039,13 @@ static INT32 slider_adjuster(running_machine &machine, void *arg, astring *str, // callback //------------------------------------------------- -static INT32 slider_overclock(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_overclock(running_machine &machine, void *arg, std::string *str, INT32 newval) { device_t *cpu = (device_t *)arg; if (newval != SLIDER_NOCHANGE) cpu->set_clock_scale((float)newval * 0.001f); if (str != NULL) - str->printf("%3.0f%%", floor(cpu->clock_scale() * 100.0f + 0.5f)); + strprintf(*str,"%3.0f%%", floor(cpu->clock_scale() * 100.0f + 0.5f)); return floor(cpu->clock_scale() * 1000.0f + 0.5f); } @@ -2051,7 +2054,7 @@ static INT32 slider_overclock(running_machine &machine, void *arg, astring *str, // slider_refresh - refresh rate slider callback //------------------------------------------------- -static INT32 slider_refresh(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_refresh(running_machine &machine, void *arg, std::string *str, INT32 newval) { screen_device *screen = reinterpret_cast<screen_device *>(arg); double defrefresh = ATTOSECONDS_TO_HZ(screen->refresh_attoseconds()); @@ -2065,7 +2068,7 @@ static INT32 slider_refresh(running_machine &machine, void *arg, astring *str, I screen->configure(width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001)); } if (str != NULL) - str->printf("%.3ffps", ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds)); + strprintf(*str,"%.3ffps", ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds)); refresh = ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds); return floor((refresh - defrefresh) * 1000.0f + 0.5f); } @@ -2076,7 +2079,7 @@ static INT32 slider_refresh(running_machine &machine, void *arg, astring *str, I // callback //------------------------------------------------- -static INT32 slider_brightness(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_brightness(running_machine &machine, void *arg, std::string *str, INT32 newval) { screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container::user_settings settings; @@ -2088,7 +2091,7 @@ static INT32 slider_brightness(running_machine &machine, void *arg, astring *str screen->container().set_user_settings(settings); } if (str != NULL) - str->printf("%.3f", settings.m_brightness); + strprintf(*str,"%.3f", settings.m_brightness); return floor(settings.m_brightness * 1000.0f + 0.5f); } @@ -2098,7 +2101,7 @@ static INT32 slider_brightness(running_machine &machine, void *arg, astring *str // callback //------------------------------------------------- -static INT32 slider_contrast(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_contrast(running_machine &machine, void *arg, std::string *str, INT32 newval) { screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container::user_settings settings; @@ -2110,7 +2113,7 @@ static INT32 slider_contrast(running_machine &machine, void *arg, astring *str, screen->container().set_user_settings(settings); } if (str != NULL) - str->printf("%.3f", settings.m_contrast); + strprintf(*str,"%.3f", settings.m_contrast); return floor(settings.m_contrast * 1000.0f + 0.5f); } @@ -2119,7 +2122,7 @@ static INT32 slider_contrast(running_machine &machine, void *arg, astring *str, // slider_gamma - screen gamma slider callback //------------------------------------------------- -static INT32 slider_gamma(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_gamma(running_machine &machine, void *arg, std::string *str, INT32 newval) { screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container::user_settings settings; @@ -2131,7 +2134,7 @@ static INT32 slider_gamma(running_machine &machine, void *arg, astring *str, INT screen->container().set_user_settings(settings); } if (str != NULL) - str->printf("%.3f", settings.m_gamma); + strprintf(*str,"%.3f", settings.m_gamma); return floor(settings.m_gamma * 1000.0f + 0.5f); } @@ -2141,7 +2144,7 @@ static INT32 slider_gamma(running_machine &machine, void *arg, astring *str, INT // callback //------------------------------------------------- -static INT32 slider_xscale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_xscale(running_machine &machine, void *arg, std::string *str, INT32 newval) { screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container::user_settings settings; @@ -2153,7 +2156,7 @@ static INT32 slider_xscale(running_machine &machine, void *arg, astring *str, IN screen->container().set_user_settings(settings); } if (str != NULL) - str->printf("%.3f", settings.m_xscale); + strprintf(*str,"%.3f", settings.m_xscale); return floor(settings.m_xscale * 1000.0f + 0.5f); } @@ -2163,7 +2166,7 @@ static INT32 slider_xscale(running_machine &machine, void *arg, astring *str, IN // callback //------------------------------------------------- -static INT32 slider_yscale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_yscale(running_machine &machine, void *arg, std::string *str, INT32 newval) { screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container::user_settings settings; @@ -2175,7 +2178,7 @@ static INT32 slider_yscale(running_machine &machine, void *arg, astring *str, IN screen->container().set_user_settings(settings); } if (str != NULL) - str->printf("%.3f", settings.m_yscale); + strprintf(*str,"%.3f", settings.m_yscale); return floor(settings.m_yscale * 1000.0f + 0.5f); } @@ -2185,7 +2188,7 @@ static INT32 slider_yscale(running_machine &machine, void *arg, astring *str, IN // slider callback //------------------------------------------------- -static INT32 slider_xoffset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_xoffset(running_machine &machine, void *arg, std::string *str, INT32 newval) { screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container::user_settings settings; @@ -2197,7 +2200,7 @@ static INT32 slider_xoffset(running_machine &machine, void *arg, astring *str, I screen->container().set_user_settings(settings); } if (str != NULL) - str->printf("%.3f", settings.m_xoffset); + strprintf(*str,"%.3f", settings.m_xoffset); return floor(settings.m_xoffset * 1000.0f + 0.5f); } @@ -2207,7 +2210,7 @@ static INT32 slider_xoffset(running_machine &machine, void *arg, astring *str, I // slider callback //------------------------------------------------- -static INT32 slider_yoffset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_yoffset(running_machine &machine, void *arg, std::string *str, INT32 newval) { screen_device *screen = reinterpret_cast<screen_device *>(arg); render_container::user_settings settings; @@ -2219,7 +2222,7 @@ static INT32 slider_yoffset(running_machine &machine, void *arg, astring *str, I screen->container().set_user_settings(settings); } if (str != NULL) - str->printf("%.3f", settings.m_yoffset); + strprintf(*str,"%.3f", settings.m_yoffset); return floor(settings.m_yoffset * 1000.0f + 0.5f); } @@ -2229,7 +2232,7 @@ static INT32 slider_yoffset(running_machine &machine, void *arg, astring *str, I // callback //------------------------------------------------- -static INT32 slider_overxscale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_overxscale(running_machine &machine, void *arg, std::string *str, INT32 newval) { laserdisc_device *laserdisc = (laserdisc_device *)arg; laserdisc_overlay_config settings; @@ -2241,7 +2244,7 @@ static INT32 slider_overxscale(running_machine &machine, void *arg, astring *str laserdisc->set_overlay_config(settings); } if (str != NULL) - str->printf("%.3f", settings.m_overscalex); + strprintf(*str,"%.3f", settings.m_overscalex); return floor(settings.m_overscalex * 1000.0f + 0.5f); } @@ -2251,7 +2254,7 @@ static INT32 slider_overxscale(running_machine &machine, void *arg, astring *str // callback //------------------------------------------------- -static INT32 slider_overyscale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_overyscale(running_machine &machine, void *arg, std::string *str, INT32 newval) { laserdisc_device *laserdisc = (laserdisc_device *)arg; laserdisc_overlay_config settings; @@ -2263,7 +2266,7 @@ static INT32 slider_overyscale(running_machine &machine, void *arg, astring *str laserdisc->set_overlay_config(settings); } if (str != NULL) - str->printf("%.3f", settings.m_overscaley); + strprintf(*str,"%.3f", settings.m_overscaley); return floor(settings.m_overscaley * 1000.0f + 0.5f); } @@ -2273,7 +2276,7 @@ static INT32 slider_overyscale(running_machine &machine, void *arg, astring *str // slider callback //------------------------------------------------- -static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string *str, INT32 newval) { laserdisc_device *laserdisc = (laserdisc_device *)arg; laserdisc_overlay_config settings; @@ -2285,7 +2288,7 @@ static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *st laserdisc->set_overlay_config(settings); } if (str != NULL) - str->printf("%.3f", settings.m_overposx); + strprintf(*str,"%.3f", settings.m_overposx); return floor(settings.m_overposx * 1000.0f + 0.5f); } @@ -2295,7 +2298,7 @@ static INT32 slider_overxoffset(running_machine &machine, void *arg, astring *st // slider callback //------------------------------------------------- -static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string *str, INT32 newval) { laserdisc_device *laserdisc = (laserdisc_device *)arg; laserdisc_overlay_config settings; @@ -2307,7 +2310,7 @@ static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *st laserdisc->set_overlay_config(settings); } if (str != NULL) - str->printf("%.3f", settings.m_overposy); + strprintf(*str,"%.3f", settings.m_overposy); return floor(settings.m_overposy * 1000.0f + 0.5f); } @@ -2317,13 +2320,13 @@ static INT32 slider_overyoffset(running_machine &machine, void *arg, astring *st // callback //------------------------------------------------- -static INT32 slider_flicker(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_flicker(running_machine &machine, void *arg, std::string *str, INT32 newval) { vector_device *vector = NULL; if (newval != SLIDER_NOCHANGE) vector->set_flicker((float)newval * 0.1f); if (str != NULL) - str->printf("%1.2f", vector->get_flicker()); + strprintf(*str,"%1.2f", vector->get_flicker()); return floor(vector->get_flicker() * 10.0f + 0.5f); } @@ -2333,13 +2336,13 @@ static INT32 slider_flicker(running_machine &machine, void *arg, astring *str, I // callback //------------------------------------------------- -static INT32 slider_beam(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_beam(running_machine &machine, void *arg, std::string *str, INT32 newval) { vector_device *vector = NULL; if (newval != SLIDER_NOCHANGE) vector->set_beam((float)newval * 0.01f); if (str != NULL) - str->printf("%1.2f", vector->get_beam()); + strprintf(*str,"%1.2f", vector->get_beam()); return floor(vector->get_beam() * 100.0f + 0.5f); } @@ -2369,14 +2372,14 @@ static char *slider_get_screen_desc(screen_device &screen) //------------------------------------------------- #ifdef MAME_DEBUG -static INT32 slider_crossscale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_crossscale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ioport_field *field = (ioport_field *)arg; if (newval != SLIDER_NOCHANGE) field->set_crosshair_scale(float(newval) * 0.001); if (str != NULL) - str->printf("%s %s %1.3f", "Crosshair Scale", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); + strprintf(*str,"%s %s %1.3f", "Crosshair Scale", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); return floor(field->crosshair_scale() * 1000.0f + 0.5f); } #endif @@ -2388,14 +2391,14 @@ static INT32 slider_crossscale(running_machine &machine, void *arg, astring *str //------------------------------------------------- #ifdef MAME_DEBUG -static INT32 slider_crossoffset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string *str, INT32 newval) { ioport_field *field = (ioport_field *)arg; if (newval != SLIDER_NOCHANGE) field->set_crosshair_offset(float(newval) * 0.001f); if (str != NULL) - str->printf("%s %s %1.3f", "Crosshair Offset", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); + strprintf(*str,"%s %s %1.3f", "Crosshair Offset", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f); return field->crosshair_offset(); } #endif @@ -2420,7 +2423,7 @@ bool ui_manager::use_natural_keyboard() const void ui_manager::set_use_natural_keyboard(bool use_natural_keyboard) { m_use_natural_keyboard = use_natural_keyboard; - astring error; + std::string error; machine().options().set_value(OPTION_NATURAL_KEYBOARD, use_natural_keyboard, OPTION_PRIORITY_CMDLINE, error); - assert(!error); + assert(error.empty()); } diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h index e63b00339df..3f74eac6097 100644 --- a/src/emu/ui/ui.h +++ b/src/emu/ui/ui.h @@ -93,7 +93,7 @@ enum typedef UINT32 (*ui_callback)(running_machine &, render_container *, UINT32); -typedef INT32 (*slider_update)(running_machine &machine, void *arg, astring *str, INT32 newval); +typedef INT32(*slider_update)(running_machine &machine, void *arg, std::string *str, INT32 newval); struct slider_state { @@ -160,7 +160,7 @@ public: void request_quit(); // print the game info string into a buffer - astring &game_info_astring(astring &str); + std::string &game_info_astring(std::string &str); // slider controls const slider_state *get_slider_list(void); @@ -185,8 +185,8 @@ private: bool m_mouse_show; // text generators - astring &disclaimer_string(astring &buffer); - astring &warnings_string(astring &buffer); + std::string &disclaimer_string(std::string &buffer); + std::string &warnings_string(std::string &buffer); // UI handlers static UINT32 handler_messagebox(running_machine &machine, render_container *container, UINT32 state); diff --git a/src/emu/ui/videoopt.c b/src/emu/ui/videoopt.c index d0788527b2e..57e25ce5edc 100644 --- a/src/emu/ui/videoopt.c +++ b/src/emu/ui/videoopt.c @@ -174,7 +174,7 @@ ui_menu_video_options::ui_menu_video_options(running_machine &machine, render_co void ui_menu_video_options::populate() { const char *subtext = ""; - astring tempstring; + std::string tempstring; int viewnum; int enabled; @@ -186,7 +186,8 @@ void ui_menu_video_options::populate() break; /* create a string for the item, replacing underscores with spaces */ - tempstring.cpy(name).replace(0, "_", " "); + tempstring.assign(name); + strreplace(tempstring, "_", " "); item_append(tempstring.c_str(), NULL, 0, (void *)(FPTR)(VIDEO_ITEM_VIEW + viewnum)); } diff --git a/src/emu/validity.c b/src/emu/validity.c index 2bf05137dd1..28ba842df85 100644 --- a/src/emu/validity.c +++ b/src/emu/validity.c @@ -198,16 +198,16 @@ void validity_checker::check_all() // if we had warnings or errors, output if (m_errors > 0 || m_warnings > 0) { - astring tempstr; + std::string tempstr; output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Core: %d errors, %d warnings\n", m_errors, m_warnings); if (m_errors > 0) { - m_error_text.replace("\n", "\n "); + strreplace(m_error_text, "\n", "\n "); output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Errors:\n %s", m_error_text.c_str()); } if (m_warnings > 0) { - m_warning_text.replace("\n", "\n "); + strreplace(m_warning_text, "\n", "\n "); output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Warnings:\n %s", m_warning_text.c_str()); } output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "\n"); @@ -276,8 +276,8 @@ void validity_checker::validate_one(const game_driver &driver) // reset error/warning state int start_errors = m_errors; int start_warnings = m_warnings; - m_error_text.reset(); - m_warning_text.reset(); + m_error_text.clear(); + m_warning_text.clear(); // wrap in try/except to catch fatalerrors try @@ -298,16 +298,16 @@ void validity_checker::validate_one(const game_driver &driver) // if we had warnings or errors, output if (m_errors > start_errors || m_warnings > start_warnings) { - astring tempstr; + std::string tempstr; output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Driver %s (file %s): %d errors, %d warnings\n", driver.name, core_filename_extract_base(tempstr, driver.source_file).c_str(), m_errors - start_errors, m_warnings - start_warnings); if (m_errors > start_errors) { - m_error_text.replace("\n", "\n "); + strreplace(m_error_text, "\n", "\n "); output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Errors:\n %s", m_error_text.c_str()); } if (m_warnings > start_warnings) { - m_warning_text.replace("\n", "\n "); + strreplace(m_warning_text, "\n", "\n "); output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Warnings:\n %s", m_warning_text.c_str()); } output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "\n"); @@ -519,7 +519,7 @@ void validity_checker::validate_inlines() void validity_checker::validate_driver() { // check for duplicate names - astring tempstr; + std::string tempstr; if (m_names_map.add(m_current_driver->name, m_current_driver, false) == TMERR_DUPLICATE) { const game_driver *match = m_names_map.find(m_current_driver->name); @@ -639,8 +639,7 @@ void validity_checker::validate_roms() validate_tag(basetag); // generate the full tag - astring fulltag; - rom_region_name(fulltag, *device, romp); + std::string fulltag = rom_region_name(*device, romp); // attempt to add it to the map, reporting duplicates as errors current_length = ROMREGION_GETLENGTH(romp); @@ -848,11 +847,8 @@ void validity_checker::validate_dip_settings(ioport_field &field) void validity_checker::validate_condition(ioport_condition &condition, device_t &device, int_map &port_map) { // resolve the tag - astring porttag; - device.subtag(porttag, condition.tag()); - // then find a matching port - if (port_map.find(porttag.c_str()) == 0) + if (port_map.find(device.subtag(condition.tag()).c_str()) == 0) osd_printf_error("Condition referencing non-existent ioport tag '%s'\n", condition.tag()); } @@ -878,11 +874,11 @@ void validity_checker::validate_inputs() // allocate the input ports ioport_list portlist; - astring errorbuf; + std::string errorbuf; portlist.append(*device, errorbuf); // report any errors during construction - if (errorbuf) + if (!errorbuf.empty()) osd_printf_error("I/O port error during construction:\n%s\n", errorbuf.c_str()); // do a first pass over ports to add their names and find duplicates @@ -1008,8 +1004,8 @@ void validity_checker::validate_devices() { for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next()) { - astring temptag("_"); - temptag.cat(option->name()); + std::string temptag("_"); + temptag.append(option->name()); device_t *dev = const_cast<machine_config &>(*m_current_config).device_add(&m_current_config->root_device(), temptag.c_str(), option->devtype(), 0); // notify this device and all its subdevices that they are now configured @@ -1036,18 +1032,18 @@ void validity_checker::validate_devices() // and device //------------------------------------------------- -void validity_checker::build_output_prefix(astring &str) +void validity_checker::build_output_prefix(std::string &str) { // start empty - str.reset(); + str.clear(); // if we have a current device, indicate that if (m_current_device != NULL) - str.cat(m_current_device->name()).cat(" device '").cat(m_current_device->tag()).cat("': "); + str.append(m_current_device->name()).append(" device '").append(m_current_device->tag()).append("': "); // if we have a current port, indicate that as well if (m_current_ioport != NULL) - str.cat("ioport '").cat(m_current_ioport).cat("': "); + str.append("ioport '").append(m_current_ioport).append("': "); } @@ -1057,7 +1053,7 @@ void validity_checker::build_output_prefix(astring &str) void validity_checker::output_callback(osd_output_channel channel, const char *msg, va_list args) { - astring output; + std::string output; switch (channel) { case OSD_OUTPUT_CHANNEL_ERROR: @@ -1068,8 +1064,8 @@ void validity_checker::output_callback(osd_output_channel channel, const char *m build_output_prefix(output); // generate the string - output.catvprintf(msg, args); - m_error_text.cat(output); + strcatvprintf(output, msg, args); + m_error_text.append(output); break; case OSD_OUTPUT_CHANNEL_WARNING: // count the error @@ -1079,8 +1075,8 @@ void validity_checker::output_callback(osd_output_channel channel, const char *m build_output_prefix(output); // generate the string and output to the original target - output.catvprintf(msg, args); - m_warning_text.cat(output); + strcatvprintf(output, msg, args); + m_warning_text.append(output); break; default: chain_output(channel, msg, args); diff --git a/src/emu/validity.h b/src/emu/validity.h index 6ba3f1ad6c7..64984433ecf 100644 --- a/src/emu/validity.h +++ b/src/emu/validity.h @@ -79,7 +79,7 @@ private: void validate_devices(); // output helpers - void build_output_prefix(astring &str); + void build_output_prefix(std::string &str); void output_via_delegate(osd_output_channel channel, const char *format, ...) ATTR_PRINTF(3,4); // internal driver list @@ -88,8 +88,8 @@ private: // error tracking int m_errors; int m_warnings; - astring m_error_text; - astring m_warning_text; + std::string m_error_text; + std::string m_warning_text; // maps for finding duplicates game_driver_map m_names_map; diff --git a/src/emu/video.c b/src/emu/video.c index caa0138455f..55e596d36bc 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -257,30 +257,30 @@ void video_manager::frame_update(bool debug) // into a string buffer //------------------------------------------------- -astring &video_manager::speed_text(astring &str) +std::string &video_manager::speed_text(std::string &str) { - str.reset(); + str.clear(); // if we're paused, just display Paused bool paused = machine().paused(); if (paused) - str.cat("paused"); + str.append("paused"); // if we're fast forwarding, just display Fast-forward else if (m_fastforward) - str.cat("fast "); + str.append("fast "); // if we're auto frameskipping, display that plus the level else if (effective_autoframeskip()) - str.catprintf("auto%2d/%d", effective_frameskip(), MAX_FRAMESKIP); + strcatprintf(str, "auto%2d/%d", effective_frameskip(), MAX_FRAMESKIP); // otherwise, just display the frameskip plus the level else - str.catprintf("skip %d/%d", effective_frameskip(), MAX_FRAMESKIP); + strcatprintf(str, "skip %d/%d", effective_frameskip(), MAX_FRAMESKIP); // append the speed for all cases except paused if (!paused) - str.catprintf("%4d%%", (int)(100 * m_speed_percent + 0.5)); + strcatprintf(str, "%4d%%", (int)(100 * m_speed_percent + 0.5)); // display the number of partial updates as well int partials = 0; @@ -288,7 +288,7 @@ astring &video_manager::speed_text(astring &str) for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next()) partials += screen->partial_updates(); if (partials > 1) - str.catprintf("\n%d partial updates", partials); + strcatprintf(str, "\n%d partial updates", partials); return str; } @@ -308,8 +308,8 @@ void video_manager::save_snapshot(screen_device *screen, emu_file &file) create_snapshot_bitmap(screen); // add two text entries describing the image - astring text1 = astring(emulator_info::get_appname()).cat(" ").cat(build_version); - astring text2 = astring(machine().system().manufacturer).cat(" ").cat(machine().system().description); + std::string text1 = std::string(emulator_info::get_appname()).append(" ").append(build_version); + std::string text2 = std::string(machine().system().manufacturer).append(" ").append(machine().system().description); png_info pnginfo = { 0 }; png_add_text(&pnginfo, "Software", text1.c_str()); png_add_text(&pnginfo, "System", text2.c_str()); @@ -398,7 +398,7 @@ void video_manager::begin_recording(const char *name, movie_format format) // create a new temporary movie file file_error filerr; - astring fullpath; + std::string fullpath; { emu_file tempfile(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); if (name != NULL) @@ -1117,30 +1117,30 @@ file_error video_manager::open_next(emu_file &file, const char *extension) if (snapname == NULL || snapname[0] == 0) snapname = "%g/%i"; - astring snapstr(snapname); + std::string snapstr(snapname); // strip any extension in the provided name - int index = snapstr.rchr(0, '.'); + int index = snapstr.find_last_of('.'); if (index != -1) - snapstr.substr(0, index); + snapstr = snapstr.substr(0, index); // handle %d in the template (for image devices) - astring snapdev("%d_"); - int pos = snapstr.find(0, snapdev.c_str()); + std::string snapdev("%d_"); + int pos = snapstr.find(snapdev.c_str()); if (pos != -1) { // if more %d are found, revert to default and ignore them all - if (snapstr.find(pos + 3, snapdev.c_str()) != -1) - snapstr.cpy("%g/%i"); + if (snapstr.find(snapdev.c_str(), pos + 3) != -1) + snapstr.assign("%g/%i"); // else if there is a single %d, try to create the correct snapname else { int name_found = 0; // find length of the device name - int end1 = snapstr.find(pos + 3, "/"); - int end2 = snapstr.find(pos + 3, "%"); + int end1 = snapstr.find("/", pos + 3); + int end2 = snapstr.find("%", pos + 3); int end = -1; if ((end1 != -1) && (end2 != -1)) @@ -1150,14 +1150,14 @@ file_error video_manager::open_next(emu_file &file, const char *extension) else if (end2 != -1) end = end2; else - end = snapstr.len(); + end = snapstr.length(); if (end - pos < 3) fatalerror("Something very wrong is going on!!!\n"); - // copy the device name to an astring - astring snapdevname; - snapdevname.cpysubstr(snapstr, pos + 3, end - pos - 3); + // copy the device name to an std::string + std::string snapdevname; + snapdevname.assign(snapstr.substr(pos + 3, end - pos - 3)); //printf("check template: %s\n", snapdevname.c_str()); // verify that there is such a device for this system @@ -1165,22 +1165,22 @@ file_error video_manager::open_next(emu_file &file, const char *extension) for (device_image_interface *image = iter.first(); image != NULL; image = iter.next()) { // get the device name - astring tempdevname(image->brief_instance_name()); + std::string tempdevname(image->brief_instance_name()); //printf("check device: %s\n", tempdevname.c_str()); - if (snapdevname.cmp(tempdevname) == 0) + if (snapdevname.compare(tempdevname) == 0) { // verify that such a device has an image mounted if (image->basename() != NULL) { - astring filename(image->basename()); + std::string filename(image->basename()); // strip extension - filename.substr(0, filename.rchr(0, '.')); + filename = filename.substr(0, filename.find_last_of('.')); // setup snapname and remove the %d_ - snapstr.replace(0, snapdevname.c_str(), filename.c_str()); - snapstr.del(pos, 3); + strreplace(snapstr, snapdevname.c_str(), filename.c_str()); + snapstr.erase(pos, 3); //printf("check image: %s\n", filename.c_str()); name_found = 1; @@ -1190,32 +1190,34 @@ file_error video_manager::open_next(emu_file &file, const char *extension) // or fallback to default if (name_found == 0) - snapstr.cpy("%g/%i"); + snapstr.assign("%g/%i"); } } // add our own extension - snapstr.cat(".").cat(extension); + snapstr.append(".").append(extension); // substitute path and gamename up front - snapstr.replace(0, "/", PATH_SEPARATOR); - snapstr.replace(0, "%g", machine().basename()); + strreplace(snapstr, "/", PATH_SEPARATOR); + strreplace(snapstr, "%g", machine().basename()); // determine if the template has an index; if not, we always use the same name - astring fname; - if (snapstr.find(0, "%i") == -1) - fname.cpy(snapstr); + std::string fname; + if (snapstr.find("%i") == -1) + fname.assign(snapstr); // otherwise, we scan for the next available filename else { // try until we succeed - astring seqtext; + std::string seqtext; file.set_openflags(OPEN_FLAG_READ); for (int seq = 0; ; seq++) { // build up the filename - fname.cpy(snapstr).replace(0, "%i", seqtext.format("%04d", seq).c_str()); + fname.assign(snapstr); + strprintf(seqtext, "%04d", seq); + strreplace(fname, "%i", seqtext.c_str()); // try to open the file; stop when we fail file_error filerr = file.open(fname.c_str()); @@ -1278,8 +1280,8 @@ void video_manager::record_frame() png_info pnginfo = { 0 }; if (m_mng_frame == 0) { - astring text1 = astring(emulator_info::get_appname()).cat(" ").cat(build_version); - astring text2 = astring(machine().system().manufacturer).cat(" ").cat(machine().system().description); + std::string text1 = std::string(emulator_info::get_appname()).append(" ").append(build_version); + std::string text2 = std::string(machine().system().manufacturer).append(" ").append(machine().system().description); png_add_text(&pnginfo, "Software", text1.c_str()); png_add_text(&pnginfo, "System", text2.c_str()); } diff --git a/src/emu/video.h b/src/emu/video.h index a26c7e468bf..4286f774d03 100644 --- a/src/emu/video.h +++ b/src/emu/video.h @@ -81,7 +81,7 @@ public: void frame_update(bool debug = false); // current speed helpers - astring &speed_text(astring &str); + std::string &speed_text(std::string &str); double speed_percent() const { return m_speed_percent; } // snapshots diff --git a/src/emu/video/315_5124.c b/src/emu/video/315_5124.c index d8f27838df6..dbea7d5c287 100644 --- a/src/emu/video/315_5124.c +++ b/src/emu/video/315_5124.c @@ -1573,8 +1573,6 @@ void sega315_5124_device::device_start() m_pause_cb.resolve(); /* Allocate video RAM */ - astring tempstring; - m_frame_timing = (m_is_pal) ? pal_192 : ntsc_192; /* Make temp bitmap for rendering */ diff --git a/src/emu/video/clgd542x.c b/src/emu/video/clgd542x.c new file mode 100644 index 00000000000..54f9a148b87 --- /dev/null +++ b/src/emu/video/clgd542x.c @@ -0,0 +1,1302 @@ +/* + + Cirrus Logic GD542x/3x video chipsets + +*/ + +#include "clgd542x.h" + +#define LOG_REG 0 +#define LOG_BLIT 1 + +#define CRTC_PORT_ADDR ((vga.miscellaneous_output&1)?0x3d0:0x3b0) + +//#define TEXT_LINES (LINES_HELPER) +#define LINES (vga.crtc.vert_disp_end+1) +#define TEXT_LINES (vga.crtc.vert_disp_end+1) + +#define GRAPHIC_MODE (vga.gc.alpha_dis) /* else text mode */ + +#define EGA_COLUMNS (vga.crtc.horz_disp_end+1) +#define EGA_START_ADDRESS (vga.crtc.start_addr) +#define EGA_LINE_LENGTH (vga.crtc.offset<<1) + +#define VGA_COLUMNS (vga.crtc.horz_disp_end+1) +#define VGA_START_ADDRESS (vga.crtc.start_addr) +#define VGA_LINE_LENGTH (vga.crtc.offset<<3) + +#define IBM8514_LINE_LENGTH (m_vga->offset()) + +#define CHAR_WIDTH ((vga.sequencer.data[1]&1)?8:9) + +#define TEXT_COLUMNS (vga.crtc.horz_disp_end+1) +#define TEXT_START_ADDRESS (vga.crtc.start_addr<<3) +#define TEXT_LINE_LENGTH (vga.crtc.offset<<1) + +#define TEXT_COPY_9COLUMN(ch) (((ch & 0xe0) == 0xc0)&&(vga.attribute.data[0x10]&4)) + +const device_type CIRRUS_GD5428 = &device_creator<cirrus_gd5428_device>; +const device_type CIRRUS_GD5430 = &device_creator<cirrus_gd5430_device>; + + +cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : svga_device(mconfig, CIRRUS_GD5428, "Cirrus Logic GD5428", tag, owner, clock, "clgd5428", __FILE__) +{ +} + +cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : svga_device(mconfig, type, name, tag, owner, clock, shortname, source) +{ +} + +cirrus_gd5430_device::cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : cirrus_gd5428_device(mconfig, CIRRUS_GD5430, "Cirrus Logic GD5430", tag, owner, clock, "clgd5430", __FILE__) +{ +} + +MACHINE_CONFIG_FRAGMENT( pcvideo_cirrus_gd5428 ) + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) + MCFG_SCREEN_UPDATE_DEVICE("vga", cirrus_gd5428_device, screen_update) + + MCFG_PALETTE_ADD("palette", 0x100) + MCFG_DEVICE_ADD("vga", CIRRUS_GD5428, 0) +MACHINE_CONFIG_END + +MACHINE_CONFIG_FRAGMENT( pcvideo_cirrus_gd5430 ) + MCFG_SCREEN_ADD("screen", RASTER) + MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) + MCFG_SCREEN_UPDATE_DEVICE("vga", cirrus_gd5430_device, screen_update) + + MCFG_PALETTE_ADD("palette", 0x100) + MCFG_DEVICE_ADD("vga", CIRRUS_GD5430, 0) +MACHINE_CONFIG_END + +void cirrus_gd5428_device::device_start() +{ + zero(); + + int i; + for (i = 0; i < 0x100; i++) + m_palette->set_pen_color(i, 0, 0, 0); + + // Avoid an infinite loop when displaying. 0 is not possible anyway. + vga.crtc.maximum_scan_line = 1; + + // copy over interfaces + vga.read_dipswitch = read8_delegate(); //read_dipswitch; + vga.svga_intf.seq_regcount = 0x1f; + vga.svga_intf.crtc_regcount = 0x2d; + vga.svga_intf.vram_size = 0x200000; + + vga.memory.resize(vga.svga_intf.vram_size); + memset(&vga.memory[0], 0, vga.svga_intf.vram_size); + save_item(NAME(vga.memory)); + save_pointer(vga.crtc.data,"CRTC Registers",0x100); + save_pointer(vga.sequencer.data,"Sequencer Registers",0x100); + save_pointer(vga.attribute.data,"Attribute Registers", 0x15); + save_item(NAME(m_chip_id)); + + m_vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vga_device::vblank_timer_cb),this)); + + m_chip_id = 0x98; // GD5428 - Rev 0 +} + +void cirrus_gd5430_device::device_start() +{ + cirrus_gd5428_device::device_start(); + m_chip_id = 0xa0; // GD5430 - Rev 0 +} + +void cirrus_gd5428_device::device_reset() +{ + vga_device::device_reset(); + gc_locked = true; + gc_mode_ext = 0; + gc_bank_0 = gc_bank_1 = 0; + m_lock_reg = 0; + m_blt_status = 0; + m_cursor_attr = 0x00; // disable hardware cursor and extra palette + m_cursor_x = m_cursor_y = 0; + m_cursor_addr = 0; + m_scratchpad1 = m_scratchpad2 = m_scratchpad3 = 0; + m_cr19 = m_cr1a = m_cr1b = 0; + m_vclk_num[0] = 0x4a; + m_vclk_denom[0] = 0x2b; + m_vclk_num[1] = 0x5b; + m_vclk_denom[1] = 0x2f; + m_blt_source = m_blt_dest = m_blt_source_current = m_blt_dest_current = 0; + memset(m_ext_palette, 0, sizeof(m_ext_palette)); + m_ext_palette_enabled = false; + m_blt_system_transfer = false; +} + +UINT32 cirrus_gd5428_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + int x,y,bit; + UINT32 ptr = (vga.svga_intf.vram_size - 0x4000); // cursor patterns are stored in the last 16kB of VRAM + svga_device::screen_update(screen, bitmap, cliprect); + + /*UINT8 cur_mode =*/ pc_vga_choosevideomode(); + if(m_cursor_attr & 0x01) // hardware cursor enabled + { + // draw hardware graphics cursor + if(m_cursor_attr & 0x04) // 64x64 + { + ptr += ((m_cursor_addr & 0x3c) * 256); + for(y=0;y<64;y++) + { + for(x=0;x<64;x+=8) + { + for(bit=0;bit<8;bit++) + { + UINT8 pixel1 = vga.memory[ptr % vga.svga_intf.vram_size] >> (7-bit); + UINT8 pixel2 = vga.memory[(ptr+512) % vga.svga_intf.vram_size] >> (7-bit); + UINT8 output = ((pixel1 & 0x01) << 1) | (pixel2 & 0x01); + switch(output) + { + case 0: // transparent - do nothing + break; + case 1: // background + bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = (m_ext_palette[0].red << 16) | (m_ext_palette[0].green << 8) | (m_ext_palette[0].blue); + break; + case 2: // XOR + bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = ~bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit); + break; + case 3: // foreground + bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = (m_ext_palette[15].red << 16) | (m_ext_palette[15].green << 8) | (m_ext_palette[15].blue); + break; + } + } + } + } + } + else + { + ptr += ((m_cursor_addr & 0x3f) * 256); + for(y=0;y<32;y++) + { + for(x=0;x<32;x+=8) + { + for(bit=0;bit<8;bit++) + { + UINT8 pixel1 = vga.memory[ptr % vga.svga_intf.vram_size] >> (7-bit); + UINT8 pixel2 = vga.memory[(ptr+128) % vga.svga_intf.vram_size] >> (7-bit); + UINT8 output = ((pixel1 & 0x01) << 1) | (pixel2 & 0x01); + switch(output) + { + case 0: // transparent - do nothing + break; + case 1: // background + bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = (m_ext_palette[0].red << 18) | (m_ext_palette[0].green << 10) | (m_ext_palette[0].blue << 2); + break; + case 2: // XOR + bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = ~bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit); + break; + case 3: // foreground + bitmap.pix32(m_cursor_y+y,m_cursor_x+x+bit) = (m_ext_palette[15].red << 18) | (m_ext_palette[15].green << 10) | (m_ext_palette[15].blue << 2); + break; + } + } + ptr++; + } + } + } + } + return 0; +} + +void cirrus_gd5428_device::cirrus_define_video_mode() +{ + UINT8 divisor = 1; + float clock; + UINT8 clocksel = (vga.miscellaneous_output & 0xc) >> 2; + + svga.rgb8_en = 0; + svga.rgb15_en = 0; + svga.rgb16_en = 0; + svga.rgb24_en = 0; + svga.rgb32_en = 0; + + if(gc_locked || m_vclk_num[clocksel] == 0 || m_vclk_denom[clocksel] == 0) + clock = (vga.miscellaneous_output & 0xc) ? XTAL_28_63636MHz : XTAL_25_1748MHz; + else + { + int numerator = m_vclk_num[clocksel] & 0x7f; + int denominator = (m_vclk_denom[clocksel] & 0x3e) >> 1; + int mul = m_vclk_denom[clocksel] & 0x01 ? 2 : 1; + clock = 14.31818f * ((float)numerator / ((float)denominator * mul)); + clock *= 1000000; + } + + if (!gc_locked && (vga.sequencer.data[0x07] & 0x01)) + { + switch(vga.sequencer.data[0x07] & 0x0E) + { + case 0x00: svga.rgb8_en = 1; break; + case 0x02: svga.rgb16_en = 1; divisor = 2; break; //double VCLK + case 0x04: svga.rgb24_en = 1; divisor = 3; break; + case 0x06: svga.rgb16_en = 1; break; + case 0x08: svga.rgb32_en = 1; break; + } + } + recompute_params_clock(divisor, (int)clock); +} + +UINT16 cirrus_gd5428_device::offset() +{ + UINT16 off = vga_device::offset(); + + if (svga.rgb8_en == 1) // guess + off <<= 2; +// popmessage("Offset: %04x %s %s ** -- actual: %04x",vga.crtc.offset,vga.crtc.dw?"DW":"--",vga.crtc.word_mode?"BYTE":"WORD",off); + return off; +} + +void cirrus_gd5428_device::start_bitblt() +{ + UINT32 x,y; + + if(LOG_BLIT) logerror("CL: BitBLT started: Src: %06x Dst: %06x Width: %i Height %i ROP: %02x Mode: %02x\n",m_blt_source,m_blt_dest,m_blt_width,m_blt_height,m_blt_rop,m_blt_mode); + + m_blt_source_current = m_blt_source; + m_blt_dest_current = m_blt_dest; + + for(y=0;y<=m_blt_height;y++) + { + for(x=0;x<=m_blt_width;x++) + { + if(m_blt_mode & 0x80) // colour expand + { + UINT8 pixel = (vga.memory[m_blt_source_current % vga.svga_intf.vram_size] >> (7-(x % 8)) & 0x01) ? vga.gc.enable_set_reset : vga.gc.set_reset; // use GR0/1/10/11 background/foreground regs + + copy_pixel(pixel, vga.memory[m_blt_dest_current % vga.svga_intf.vram_size]); + if(x % 8) + m_blt_source_current++; + } + else + { + copy_pixel(vga.memory[m_blt_source_current % vga.svga_intf.vram_size], vga.memory[m_blt_dest_current % vga.svga_intf.vram_size]); + m_blt_source_current++; + } + m_blt_dest_current++; + if(m_blt_mode & 0x40 && (x % 8) == 7) // 8x8 pattern - reset pattern source location + m_blt_source_current = m_blt_source + (8*(y % 8)); // patterns are linear data + } + if(m_blt_mode & 0x40) // 8x8 pattern + m_blt_source_current = m_blt_source + (8*(y % 8)); // patterns are linear data + else + m_blt_source_current = m_blt_source + (m_blt_source_pitch*y); + m_blt_dest_current = m_blt_dest + (m_blt_dest_pitch*(y+1)); + } + m_blt_status &= ~0x02; +} + +void cirrus_gd5428_device::start_system_bitblt() +{ + if(LOG_BLIT) logerror("CL: BitBLT from system memory started: Src: %06x Dst: %06x Width: %i Height %i ROP: %02x Mode: %02x\n",m_blt_source,m_blt_dest,m_blt_width,m_blt_height,m_blt_rop,m_blt_mode); + m_blt_system_transfer = true; + m_blt_system_count = 0; + m_blt_system_buffer = 0; + m_blt_pixel_count = m_blt_scan_count = 0; + m_blt_source_current = m_blt_source; + m_blt_dest_current = m_blt_dest; + m_blt_status |= 0x01; +} + +void cirrus_gd5428_device::blit_dword() +{ + // TODO: add support for reverse direction + UINT8 x,pixel; + if(m_blt_mode & 0x80) // colour expand + { + for(x=0;x<32;x++) + { + pixel = ((m_blt_system_buffer & (0x00000001 << x)) >> x) ? vga.gc.enable_set_reset : vga.gc.set_reset; // use GR0/1/10/11 background/foreground regs + if(m_blt_pixel_count <= m_blt_width) + copy_pixel(pixel,vga.memory[m_blt_dest_current % vga.svga_intf.vram_size]); + m_blt_dest_current++; + m_blt_pixel_count++; + } + } + else + { + for(x=0;x<32;x+=8) + { + pixel = ((m_blt_system_buffer & (0x000000ff << x)) >> x); + if(m_blt_pixel_count <= m_blt_width) + copy_pixel(pixel,vga.memory[m_blt_dest_current % vga.svga_intf.vram_size]); + m_blt_dest_current++; + m_blt_pixel_count++; + } + } + if(m_blt_pixel_count > m_blt_width) + { + m_blt_pixel_count = 0; + m_blt_scan_count++; + m_blt_dest_current = m_blt_dest + (m_blt_dest_pitch*m_blt_scan_count); + } + if(m_blt_scan_count > m_blt_height) + { + m_blt_system_transfer = false; // BitBLT complete + m_blt_status &= ~0x03; + } +} + +void cirrus_gd5428_device::copy_pixel(UINT8 src, UINT8 dst) +{ + if(m_blt_mode & 0x40) // enable 8x8 pattern + { + if(m_blt_mode & 0x80) // colour expand + src = (vga.memory[m_blt_source % vga.svga_intf.vram_size] >> (abs((int)(m_blt_source_current - m_blt_source)) % 8)) & 0x01 ? vga.gc.enable_set_reset : vga.gc.set_reset; + } + + switch(m_blt_rop) + { + case 0x00: // BLACK + vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = 0x00; + break; + case 0x0b: // DSTINVERT + vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = ~dst; + break; + case 0x0d: // SRC + vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = src; + break; + case 0x0e: // WHITE + vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = 0xff; + break; + case 0x59: // SRCINVERT + vga.memory[m_blt_dest_current % vga.svga_intf.vram_size] = dst ^ src; + break; + default: + popmessage("CL: Unsupported BitBLT ROP mode %02x",m_blt_rop); + } +} + +UINT8 cirrus_gd5428_device::cirrus_seq_reg_read(UINT8 index) +{ + UINT8 res; + + res = 0xff; + + switch(index) + { + case 0x02: + if(gc_mode_ext & 0x08) + res = vga.sequencer.map_mask & 0xff; + else + res = vga.sequencer.map_mask & 0x0f; + break; + case 0x06: + if(gc_locked) + return 0x0f; + else + return m_lock_reg; + break; + case 0x09: + //printf("%02x\n",index); + res = vga.sequencer.data[index]; + break; + case 0x0a: + res = m_scratchpad1; + break; + case 0x0b: + case 0x0c: + case 0x0d: + case 0x0e: + res = m_vclk_num[index-0x0b]; + break; + case 0x0f: + res = vga.sequencer.data[index] & 0xe7; + res |= 0x18; // 32-bit DRAM data bus width (1MB-2MB) + break; + case 0x12: + res = m_cursor_attr; + break; + case 0x14: + res = m_scratchpad2; + break; + case 0x15: + res = m_scratchpad3; + break; + case 0x1b: + case 0x1c: + case 0x1d: + case 0x1e: + res = m_vclk_denom[index-0x1b]; + break; + default: + res = vga.sequencer.data[index]; + } + + return res; +} + +void cirrus_gd5428_device::cirrus_seq_reg_write(UINT8 index, UINT8 data) +{ + if(LOG_REG) logerror("CL: SEQ write %02x to SR%02x\n",data,index); + switch(index) + { + case 0x02: + if(gc_mode_ext & 0x08) + vga.sequencer.map_mask = data & 0xff; + else + vga.sequencer.map_mask = data & 0x0f; + break; + case 0x06: + // Note: extensions are always enabled on the GD5429 + if((data & 0x17) == 0x12) // bits 3,5,6,7 ignored + { + gc_locked = false; + logerror("Cirrus register extensions unlocked\n"); + } + else + { + gc_locked = true; + logerror("Cirrus register extensions locked\n"); + } + m_lock_reg = data & 0x17; + break; + case 0x07: + if((data & 0xf0) != 0) + popmessage("1MB framebuffer window enabled at %iMB (%02x)",data >> 4,data); + vga.sequencer.data[vga.sequencer.index] = data; + break; + case 0x09: + //printf("%02x %02x\n",index,data); + vga.sequencer.data[vga.sequencer.index] = data; + break; + case 0x0a: + m_scratchpad1 = data; // GD5402/GD542x BIOS writes VRAM size here. + break; + case 0x0b: + case 0x0c: + case 0x0d: + case 0x0e: + m_vclk_num[index-0x0b] = data; + break; + case 0x10: + case 0x30: + case 0x50: + case 0x70: + case 0x90: + case 0xb0: + case 0xd0: + case 0xf0: // bits 5-7 of the register index are the low bits of the X co-ordinate + m_cursor_x = (data << 3) | ((index & 0xe0) >> 5); + break; + case 0x11: + case 0x31: + case 0x51: + case 0x71: + case 0x91: + case 0xb1: + case 0xd1: + case 0xf1: // bits 5-7 of the register index are the low bits of the Y co-ordinate + m_cursor_y = (data << 3) | ((index & 0xe0) >> 5); + break; + case 0x12: + // bit 0 - enable cursor + // bit 1 - enable extra palette (cursor colours are there) + // bit 2 - 64x64 cursor (32x32 if clear, GD5422+) + // bit 7 - overscan colour protect - if set, use colour 2 in the extra palette for the border (GD5424+) + m_cursor_attr = data; + m_ext_palette_enabled = data & 0x02; + break; + case 0x13: + m_cursor_addr = data; // bits 0 and 1 are ignored if using 64x64 cursor + break; + case 0x14: + m_scratchpad2 = data; + break; + case 0x15: + m_scratchpad3 = data; // GD543x BIOS writes VRAM size here + break; + case 0x1b: + case 0x1c: + case 0x1d: + case 0x1e: + m_vclk_denom[index-0x1b] = data; + break; + default: + vga.sequencer.data[vga.sequencer.index] = data; + seq_reg_write(vga.sequencer.index,data); + } +} + +UINT8 cirrus_gd5428_device::cirrus_gc_reg_read(UINT8 index) +{ + UINT8 res = 0xff; + + switch(index) + { + case 0x00: + if(gc_mode_ext & 0x02) + res = vga.gc.set_reset & 0xff; + else + res = vga.gc.set_reset & 0x0f; + break; + case 0x01: + if(gc_mode_ext & 0x02) + res = vga.gc.enable_set_reset & 0xff; + else + res = vga.gc.enable_set_reset & 0x0f; + break; + case 0x05: + res = (vga.gc.shift256 & 1) << 6; + res |= (vga.gc.shift_reg & 1) << 5; + res |= (vga.gc.host_oe & 1) << 4; + res |= (vga.gc.read_mode & 1) << 3; + if(gc_mode_ext & 0x04) + res |= (vga.gc.write_mode & 7); + else + res |= (vga.gc.write_mode & 3); + break; + case 0x09: // Offset register 0 + res = gc_bank_0; + break; + case 0x0a: // Offset register 1 + res = gc_bank_1; + break; + case 0x0b: // Graphics controller mode extensions + res = gc_mode_ext; + break; + case 0x0c: // Colour Key + break; + case 0x0d: // Colour Key Mask + break; + case 0x0e: // Miscellaneous Control + break; + case 0x10: // Foreground Colour Byte 1 + break; + case 0x11: // Background Colour Byte 1 + break; + case 0x20: // BLT Width 0 + res = m_blt_width & 0x00ff; + break; + case 0x21: // BLT Width 1 + res = m_blt_width >> 8; + break; + case 0x22: // BLT Height 0 + res = m_blt_height & 0x00ff; + break; + case 0x23: // BLT Height 1 + res = m_blt_height >> 8; + break; + case 0x24: // BLT Destination Pitch 0 + res = m_blt_dest_pitch & 0x00ff; + break; + case 0x25: // BLT Destination Pitch 1 + res = m_blt_dest_pitch >> 8; + break; + case 0x26: // BLT Source Pitch 0 + res = m_blt_source_pitch & 0x00ff; + break; + case 0x27: // BLT Source Pitch 1 + res = m_blt_source_pitch >> 8; + break; + case 0x28: // BLT Destination start 0 + res = m_blt_dest & 0x000000ff; + break; + case 0x29: // BLT Destination start 1 + res = (m_blt_dest & 0x0000ff00) >> 8; + break; + case 0x2a: // BLT Destination start 2 + res = (m_blt_dest & 0x00ff0000) >> 16; + break; + case 0x2c: // BLT source start 0 + res = m_blt_source & 0x000000ff; + break; + case 0x2d: // BLT source start 1 + res = (m_blt_source & 0x0000ff00) >> 8; + break; + case 0x2e: // BLT source start 2 + res = (m_blt_source & 0x00ff0000) >> 16; + break; + case 0x2f: // BLT destination write mask (GD5430/36/40) + // TODO + break; + case 0x30: // BLT Mode + res = m_blt_mode; + break; + case 0x31: // BitBLT Start / Status + res = m_blt_status; + break; + case 0x32: // BitBLT ROP mode + res = m_blt_rop; + break; + default: + res = gc_reg_read(index); + } + + return res; +} + +void cirrus_gd5428_device::cirrus_gc_reg_write(UINT8 index, UINT8 data) +{ + if(LOG_REG) logerror("CL: GC write %02x to GR%02x\n",data,index); + switch(index) + { + case 0x00: // if extended writes are enabled (bit 2 of index 0bh), then index 0 and 1 are extended to 8 bits + if(gc_mode_ext & 0x04) + vga.gc.set_reset = data & 0xff; + else + vga.gc.set_reset = data & 0x0f; + break; + case 0x01: + if(gc_mode_ext & 0x04) + vga.gc.enable_set_reset = data & 0xff; + else + vga.gc.enable_set_reset = data & 0x0f; + break; + case 0x05: + vga.gc.shift256 = (data & 0x40) >> 6; + vga.gc.shift_reg = (data & 0x20) >> 5; + vga.gc.host_oe = (data & 0x10) >> 4; + vga.gc.read_mode = (data & 8) >> 3; + if(gc_mode_ext & 0x04) + vga.gc.write_mode = data & 7; + else + vga.gc.write_mode = data & 3; + break; + case 0x09: // Offset register 0 + gc_bank_0 = data; + logerror("CL: Offset register 0 set to %i\n",data); + break; + case 0x0a: // Offset register 1 + gc_bank_1 = data; + logerror("CL: Offset register 1 set to %i\n",data); + break; + case 0x0b: // Graphics controller mode extensions + gc_mode_ext = data; + if(!(data & 0x02)) + { + vga.gc.set_reset &= 0x0f; + vga.gc.enable_set_reset &= 0x0f; + } + if(!(data & 0x08)) + vga.sequencer.map_mask &= 0x0f; + break; + case 0x0c: // Colour Key + break; + case 0x0d: // Colour Key Mask + break; + case 0x0e: // Miscellaneous Control + break; + case 0x10: // Foreground Colour Byte 1 + break; + case 0x11: // Background Colour Byte 1 + break; + case 0x20: // BLT Width 0 + m_blt_width = (m_blt_width & 0xff00) | data; + break; + case 0x21: // BLT Width 1 + m_blt_width = (m_blt_width & 0x00ff) | (data << 8); + break; + case 0x22: // BLT Height 0 + m_blt_height = (m_blt_height & 0xff00) | data; + break; + case 0x23: // BLT Height 1 + m_blt_height = (m_blt_height & 0x00ff) | (data << 8); + break; + case 0x24: // BLT Destination Pitch 0 + m_blt_dest_pitch = (m_blt_dest_pitch & 0xff00) | data; + break; + case 0x25: // BLT Destination Pitch 1 + m_blt_dest_pitch = (m_blt_dest_pitch & 0x00ff) | (data << 8); + break; + case 0x26: // BLT Source Pitch 0 + m_blt_source_pitch = (m_blt_source_pitch & 0xff00) | data; + break; + case 0x27: // BLT Source Pitch 1 + m_blt_source_pitch = (m_blt_source_pitch & 0x00ff) | (data << 8); + break; + case 0x28: // BLT Destination start 0 + m_blt_dest = (m_blt_dest & 0xffffff00) | data; + break; + case 0x29: // BLT Destination start 1 + m_blt_dest = (m_blt_dest & 0xffff00ff) | (data << 8); + break; + case 0x2a: // BLT Destination start 2 + m_blt_dest = (m_blt_dest & 0xff00ffff) | (data << 16); + break; + case 0x2c: // BLT source start 0 + m_blt_source = (m_blt_source & 0xffffff00) | data; + break; + case 0x2d: // BLT source start 1 + m_blt_source = (m_blt_source & 0xffff00ff) | (data << 8); + break; + case 0x2e: // BLT source start 2 + m_blt_source = (m_blt_source & 0xff00ffff) | (data << 16); + break; + case 0x2f: // BLT destination write mask (GD5430/36/40) + // TODO + break; + case 0x30: // BLT Mode + m_blt_mode = data; + break; + case 0x31: // BitBLT Start / Status + m_blt_status = data & ~0xf2; + if(data & 0x02) + { + if(m_blt_mode & 0x04) // blit source is system memory + start_system_bitblt(); + else + start_bitblt(); + } + break; + case 0x32: // BitBLT ROP mode + m_blt_rop = data; + break; + default: + gc_reg_write(index,data); + } +} + +READ8_MEMBER(cirrus_gd5428_device::port_03c0_r) +{ + UINT8 res = 0xff; + + switch(offset) + { + case 0x05: + res = cirrus_seq_reg_read(vga.sequencer.index); + break; + case 0x09: + if(!m_ext_palette_enabled) + res = vga_device::port_03c0_r(space,offset,mem_mask); + else + { + if (vga.dac.read) + { + switch (vga.dac.state++) + { + case 0: + res = m_ext_palette[vga.dac.read_index & 0x0f].red; + break; + case 1: + res = m_ext_palette[vga.dac.read_index & 0x0f].green; + break; + case 2: + res = m_ext_palette[vga.dac.read_index & 0x0f].blue; + break; + } + + if (vga.dac.state==3) + { + vga.dac.state = 0; + vga.dac.read_index++; + } + } + } + break; + case 0x0f: + res = cirrus_gc_reg_read(vga.gc.index); + break; + default: + res = vga_device::port_03c0_r(space,offset,mem_mask); + break; + } + + return res; +} + +WRITE8_MEMBER(cirrus_gd5428_device::port_03c0_w) +{ + switch(offset) + { + case 0x05: + cirrus_seq_reg_write(vga.sequencer.index,data); + break; + case 0x09: + if(!m_ext_palette_enabled) + vga_device::port_03c0_w(space,offset,data,mem_mask); + else + { + if (!vga.dac.read) + { + switch (vga.dac.state++) { + case 0: + m_ext_palette[vga.dac.write_index & 0x0f].red=data; + break; + case 1: + m_ext_palette[vga.dac.write_index & 0x0f].green=data; + break; + case 2: + m_ext_palette[vga.dac.write_index & 0x0f].blue=data; + break; + } + vga.dac.dirty=1; + if (vga.dac.state==3) + { + vga.dac.state=0; + vga.dac.write_index++; + } + } + } + break; + case 0x0f: + cirrus_gc_reg_write(vga.gc.index,data); + break; + default: + vga_device::port_03c0_w(space,offset,data,mem_mask); + break; + } + cirrus_define_video_mode(); +} + +READ8_MEMBER(cirrus_gd5428_device::port_03b0_r) +{ + UINT8 res = 0xff; + + if (CRTC_PORT_ADDR == 0x3b0) + { + switch(offset) + { + case 5: + res = cirrus_crtc_reg_read(vga.crtc.index); + break; + default: + res = vga_device::port_03b0_r(space,offset,mem_mask); + break; + } + } + + return res; +} + +READ8_MEMBER(cirrus_gd5428_device::port_03d0_r) +{ + UINT8 res = 0xff; + + if (CRTC_PORT_ADDR == 0x3d0) + { + switch(offset) + { + case 5: + res = cirrus_crtc_reg_read(vga.crtc.index); + break; + default: + res = vga_device::port_03d0_r(space,offset,mem_mask); + break; + } + } + + return res; +} + +WRITE8_MEMBER(cirrus_gd5428_device::port_03b0_w) +{ + if (CRTC_PORT_ADDR == 0x3b0) + { + switch(offset) + { + case 5: + vga.crtc.data[vga.crtc.index] = data; + cirrus_crtc_reg_write(vga.crtc.index,data); + break; + default: + vga_device::port_03b0_w(space,offset,data,mem_mask); + break; + } + } + cirrus_define_video_mode(); +} + +WRITE8_MEMBER(cirrus_gd5428_device::port_03d0_w) +{ + if (CRTC_PORT_ADDR == 0x3d0) + { + switch(offset) + { + case 5: + vga.crtc.data[vga.crtc.index] = data; + cirrus_crtc_reg_write(vga.crtc.index,data); + break; + default: + vga_device::port_03d0_w(space,offset,data,mem_mask); + break; + } + } + cirrus_define_video_mode(); +} + +UINT8 cirrus_gd5428_device::cirrus_crtc_reg_read(UINT8 index) +{ + UINT8 res = 0xff; + + switch(index) + { + case 0x16: // VGA Vertical Blank end - some SVGA chipsets use all 8 bits, and this is one of them (according to MFGTST CRTC tests) + res = vga.crtc.vert_blank_end & 0x00ff; + break; + case 0x19: + res = m_cr19; + break; + case 0x1a: + res = m_cr1a; + break; + case 0x1b: + res = m_cr1b; + break; + case 0x27: + res = m_chip_id; + break; + default: + res = crtc_reg_read(index); + break; + } + + return res; +} + +void cirrus_gd5428_device::cirrus_crtc_reg_write(UINT8 index, UINT8 data) +{ + if(LOG_REG) logerror("CL: CRTC write %02x to CR%02x\n",data,index); + switch(index) + { + case 0x16: // VGA Vertical Blank end - some SVGA chipsets use all 8 bits, and this is one of them (according to MFGTST CRTC tests) + vga.crtc.vert_blank_end &= ~0x00ff; + vga.crtc.vert_blank_end |= data; + break; + case 0x19: + m_cr19 = data; + break; + case 0x1a: + m_cr1a = data; + vga.crtc.horz_blank_end = (vga.crtc.horz_blank_end & 0xff3f) | ((data & 0x30) << 2); + vga.crtc.vert_blank_end = (vga.crtc.vert_blank_end & 0xfcff) | ((data & 0xc0) << 2); + break; + case 0x1b: + m_cr1b = data; + vga.crtc.start_addr_latch &= ~0x070000; + vga.crtc.start_addr_latch |= ((data & 0x01) << 16); + vga.crtc.start_addr_latch |= ((data & 0x0c) << 15); + vga.crtc.offset = (vga.crtc.offset & 0x00ff) | ((data & 0x10) << 4); + cirrus_define_video_mode(); + break; + case 0x1d: + //vga.crtc.start_addr_latch = (vga.crtc.start_addr_latch & 0xf7ffff) | ((data & 0x01) << 16); // GD543x + break; + case 0x27: + // Do nothing, read only + break; + default: + crtc_reg_write(index,data); + break; + } + +} + +inline UINT8 cirrus_gd5428_device::cirrus_vga_latch_write(int offs, UINT8 data) +{ + UINT8 res = 0; + UINT8 mode_mask = (gc_mode_ext & 0x04) ? 0x07 : 0x03; + + switch (vga.gc.write_mode & mode_mask) { + case 0: + data = rotate_right(data); + if(vga.gc.enable_set_reset & 1<<offs) + res = vga_logical_op((vga.gc.set_reset & 1<<offs) ? vga.gc.bit_mask : 0, offs,vga.gc.bit_mask); + else + res = vga_logical_op(data, offs, vga.gc.bit_mask); + break; + case 1: + res = vga.gc.latch[offs]; + break; + case 2: + res = vga_logical_op((data & 1<<offs) ? 0xff : 0x00,offs,vga.gc.bit_mask); + break; + case 3: + data = rotate_right(data); + res = vga_logical_op((vga.gc.set_reset & 1<<offs) ? 0xff : 0x00,offs,data&vga.gc.bit_mask); + break; + case 4: + res = vga.gc.latch[offs]; + popmessage("CL: Unimplemented VGA write mode 4 enabled"); + break; + case 5: + res = vga.gc.latch[offs]; + popmessage("CL: Unimplemented VGA write mode 5 enabled"); + break; + } + + return res; +} + +READ8_MEMBER(cirrus_gd5428_device::mem_r) +{ + UINT32 addr; + UINT8 bank; + UINT8 cur_mode = pc_vga_choosevideomode(); + + if(gc_locked || offset >= 0x10000 || cur_mode == TEXT_MODE || cur_mode == SCREEN_OFF) + return vga_device::mem_r(space,offset,mem_mask); + + if(offset >= 0x8000 && offset < 0x10000 && (gc_mode_ext & 0x01)) // if accessing bank 1 (if enabled) + bank = gc_bank_1; + else + bank = gc_bank_0; + + if(gc_mode_ext & 0x20) // 16kB bank granularity + addr = bank * 0x4000; + else // 4kB bank granularity + addr = bank * 0x1000; + + // Is the display address adjusted automatically when not using Chain-4 addressing? The GD542x BIOS doesn't do it, but Virtual Pool expects it. + if(!(vga.sequencer.data[4] & 0x8)) + addr <<= 2; + + if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) + { + UINT8 data = 0; + if(gc_mode_ext & 0x01) + { + if(offset & 0x10000) + return 0; + if(offset < 0x8000) + offset &= 0x7fff; + else + { + offset -= 0x8000; + offset &= 0x7fff; + } + } + else + offset &= 0xffff; + + if(vga.sequencer.data[4] & 0x8) + data = vga.memory[(offset+addr) % vga.svga_intf.vram_size]; + else + { + { + int i; + + for(i=0;i<4;i++) + { + if(vga.sequencer.map_mask & 1 << i) + data |= vga.memory[((offset*4+i)+addr) % vga.svga_intf.vram_size]; + } + } + return data; + } + } + + switch(vga.gc.memory_map_sel & 0x03) + { + case 0: break; + case 1: if(gc_mode_ext & 0x01) offset &= 0x7fff; else offset &= 0x0ffff; break; + case 2: offset -= 0x10000; offset &= 0x07fff; break; + case 3: offset -= 0x18000; offset &= 0x07fff; break; + } + + if(vga.sequencer.data[4] & 4) + { + int data; + if (!space.debugger_access()) + { + vga.gc.latch[0]=vga.memory[(offset+addr) % vga.svga_intf.vram_size]; + vga.gc.latch[1]=vga.memory[((offset+addr)+0x10000) % vga.svga_intf.vram_size]; + vga.gc.latch[2]=vga.memory[((offset+addr)+0x20000) % vga.svga_intf.vram_size]; + vga.gc.latch[3]=vga.memory[((offset+addr)+0x30000) % vga.svga_intf.vram_size]; + } + + if (vga.gc.read_mode) + { + UINT8 byte,layer; + UINT8 fill_latch; + data=0; + + for(byte=0;byte<8;byte++) + { + fill_latch = 0; + for(layer=0;layer<4;layer++) + { + if(vga.gc.latch[layer] & 1 << byte) + fill_latch |= 1 << layer; + } + fill_latch &= vga.gc.color_dont_care; + if(fill_latch == vga.gc.color_compare) + data |= 1 << byte; + } + } + else + data=vga.gc.latch[vga.gc.read_map_sel]; + + return data; + } + else + { + // TODO: Lines up in 16-colour mode, likely different for 256-colour modes (docs say video addresses are shifted right 3 places) + UINT8 i,data; +// UINT8 bits = ((gc_mode_ext & 0x08) && (vga.gc.write_mode == 1)) ? 8 : 4; + + data = 0; + //printf("%08x\n",offset); + + if(gc_mode_ext & 0x02) + { + for(i=0;i<8;i++) + { + if(vga.sequencer.map_mask & 1 << i) + data |= vga.memory[(((offset+addr))+i*0x10000) % vga.svga_intf.vram_size]; + } + } + else + { + for(i=0;i<4;i++) + { + if(vga.sequencer.map_mask & 1 << i) + data |= vga.memory[(((offset+addr))+i*0x10000) % vga.svga_intf.vram_size]; + } + } + + return data; + } +} + +WRITE8_MEMBER(cirrus_gd5428_device::mem_w) +{ + UINT32 addr; + UINT8 bank; + UINT8 cur_mode = pc_vga_choosevideomode(); + + if(m_blt_system_transfer) + { + m_blt_system_buffer &= ~(0x000000ff << (m_blt_system_count * 8)); + m_blt_system_buffer |= (data << (m_blt_system_count * 8)); + m_blt_system_count++; + if(m_blt_system_count >= 4) + { + blit_dword(); + m_blt_system_count = 0; + } + return; + } + + if(gc_locked || offset >= 0x10000 || cur_mode == TEXT_MODE || cur_mode == SCREEN_OFF) + { + vga_device::mem_w(space,offset,data,mem_mask); + return; + } + + if(offset >= 0x8000 && offset < 0x10000 && (gc_mode_ext & 0x01)) // if accessing bank 1 (if enabled) + bank = gc_bank_1; + else + bank = gc_bank_0; + + if(gc_mode_ext & 0x20) // 16kB bank granularity + addr = bank * 0x4000; + else // 4kB bank granularity + addr = bank * 0x1000; + + // Is the display address adjusted automatically when using Chain-4 addressing? The GD542x BIOS doesn't do it, but Virtual Pool expects it. + if(!(vga.sequencer.data[4] & 0x8)) + addr <<= 2; + + if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) + { + if(offset & 0x10000) + return; + if(gc_mode_ext & 0x01) + { + if(offset < 0x8000) + offset &= 0x7fff; + else + { + offset -= 0x8000; + offset &= 0x7fff; + } + } + else + offset &= 0xffff; + + if(vga.gc.write_mode == 4) + { + int i; + + for(i=0;i<8;i++) + { + if(data & (0x01 << (7-i))) + vga.memory[((addr+offset)*8+i) % vga.svga_intf.vram_size] = vga.gc.enable_set_reset; // GR1 (and GR11 in 16bpp modes) = foreground colour in write modes 4 or 5 + } + return; + } + + if(vga.gc.write_mode == 5) + { + int i; + + for(i=0;i<8;i++) + { + if(data & (0x01 << (7-i))) + vga.memory[((addr+offset)*8+i) % vga.svga_intf.vram_size] = vga.gc.enable_set_reset; // GR1 (and GR11 in 16bpp modes) = foreground colour in write modes 4 or 5 + else + vga.memory[((addr+offset)*8+i) % vga.svga_intf.vram_size] = vga.gc.set_reset; // GR0 (and GR10 in 16bpp modes) = background colour in write mode 5 + } + return; + } + + if(vga.sequencer.data[4] & 0x8) + vga.memory[(offset+addr) % vga.svga_intf.vram_size] = data; + else + { + int i; + for(i=0;i<4;i++) + { + if(vga.sequencer.map_mask & 1 << i) + vga.memory[((offset*4+i)+addr) % vga.svga_intf.vram_size] = data; + } + } + } + else + { + //Inside each case must prevent writes to non-mapped VGA memory regions, not only mask the offset. + switch(vga.gc.memory_map_sel & 0x03) + { + case 0: break; + case 1: + if(offset & 0x10000) + return; + + if(gc_mode_ext & 0x01) + offset &= 0x7fff; + else + offset &= 0xffff; + break; + case 2: + if((offset & 0x18000) != 0x10000) + return; + + offset &= 0x07fff; + break; + case 3: + if((offset & 0x18000) != 0x18000) + return; + + offset &= 0x07fff; + break; + } + + { + // TODO: Lines up in 16-colour mode, likely different for 256-colour modes (docs say video addresses are shifted right 3 places) + UINT8 i; +// UINT8 bits = ((gc_mode_ext & 0x08) && (vga.gc.write_mode == 1)) ? 8 : 4; + + for(i=0;i<4;i++) + { + if(vga.sequencer.map_mask & 1 << i) + { + if(gc_mode_ext & 0x02) + { + vga.memory[(((offset+addr) << 1)+i*0x10000) % vga.svga_intf.vram_size] = (vga.sequencer.data[4] & 4) ? cirrus_vga_latch_write(i,data) : data; + vga.memory[(((offset+addr) << 1)+i*0x10000+1) % vga.svga_intf.vram_size] = (vga.sequencer.data[4] & 4) ? cirrus_vga_latch_write(i,data) : data; + } + else + vga.memory[(((offset+addr))+i*0x10000) % vga.svga_intf.vram_size] = (vga.sequencer.data[4] & 4) ? cirrus_vga_latch_write(i,data) : data; + } + } + return; + } + } +} diff --git a/src/emu/video/clgd542x.h b/src/emu/video/clgd542x.h new file mode 100644 index 00000000000..8482d6fe0a9 --- /dev/null +++ b/src/emu/video/clgd542x.h @@ -0,0 +1,106 @@ +/* + + Cirrus Logic GD542x/3x video chipsets + +*/ + +#include "emu.h" +#include "video/pc_vga.h" + +MACHINE_CONFIG_EXTERN( pcvideo_cirrus_gd5428 ); +MACHINE_CONFIG_EXTERN( pcvideo_cirrus_gd5430 ); + +class cirrus_gd5428_device : public svga_device +{ +public: + // construction/destruction + cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + virtual READ8_MEMBER(port_03c0_r); + virtual WRITE8_MEMBER(port_03c0_w); + virtual READ8_MEMBER(port_03b0_r); + virtual WRITE8_MEMBER(port_03b0_w); + virtual READ8_MEMBER(port_03d0_r); + virtual WRITE8_MEMBER(port_03d0_w); + virtual READ8_MEMBER(mem_r); + virtual WRITE8_MEMBER(mem_w); + + virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + virtual UINT16 offset(); + + UINT8 m_chip_id; + + UINT8 gc_mode_ext; + UINT8 gc_bank_0; + UINT8 gc_bank_1; + bool gc_locked; + UINT8 m_lock_reg; + + UINT8 m_cr19; + UINT8 m_cr1a; + UINT8 m_cr1b; + + // hardware cursor + UINT16 m_cursor_x; + UINT16 m_cursor_y; + UINT16 m_cursor_addr; + UINT8 m_cursor_attr; + bool m_ext_palette_enabled; + struct { UINT8 red, green, blue; } m_ext_palette[16]; // extra palette, colour 0 is cursor background, colour 15 is cursor foreground, colour 2 is overscan border colour + + // BitBLT engine + UINT8 m_blt_status; + UINT8 m_blt_rop; + UINT8 m_blt_mode; + UINT32 m_blt_source; + UINT32 m_blt_dest; + UINT16 m_blt_source_pitch; + UINT16 m_blt_dest_pitch; + UINT16 m_blt_height; + UINT16 m_blt_width; + UINT32 m_blt_source_current; + UINT32 m_blt_dest_current; + + bool m_blt_system_transfer; // blit from system memory + UINT8 m_blt_system_count; + UINT32 m_blt_system_buffer; + UINT16 m_blt_pixel_count; + UINT16 m_blt_scan_count; + + UINT8 m_scratchpad1; + UINT8 m_scratchpad2; + UINT8 m_scratchpad3; + UINT8 m_vclk_num[4]; + UINT8 m_vclk_denom[4]; + + inline UINT8 cirrus_vga_latch_write(int offs, UINT8 data); +private: + void cirrus_define_video_mode(); + UINT8 cirrus_seq_reg_read(UINT8 index); + void cirrus_seq_reg_write(UINT8 index, UINT8 data); + UINT8 cirrus_gc_reg_read(UINT8 index); + void cirrus_gc_reg_write(UINT8 index, UINT8 data); + UINT8 cirrus_crtc_reg_read(UINT8 index); + void cirrus_crtc_reg_write(UINT8 index, UINT8 data); + + void start_bitblt(); + void start_system_bitblt(); + void blit_dword(); + void copy_pixel(UINT8 src, UINT8 dst); +}; + +class cirrus_gd5430_device : public cirrus_gd5428_device +{ +public: + cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); +protected: + virtual void device_start(); +}; + +// device type definition +extern const device_type CIRRUS_GD5428; +extern const device_type CIRRUS_GD5430; diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c index f43d77c5c51..0f1808b548a 100644 --- a/src/emu/video/fixfreq.c +++ b/src/emu/video/fixfreq.c @@ -45,7 +45,8 @@ fixedfreq_device::fixedfreq_device(const machine_config &mconfig, device_type ty m_vsync(492), m_vbackporch(525), m_fieldcount(2), - m_sync_threshold(0.3) + m_sync_threshold(0.3), + m_gain(1.0 / 3.7) { } @@ -63,7 +64,8 @@ fixedfreq_device::fixedfreq_device(const machine_config &mconfig, const char *ta m_vsync(492), m_vbackporch(525), m_fieldcount(2), - m_sync_threshold(0.3) + m_sync_threshold(0.3), + m_gain(1.0 / 3.7) { } @@ -247,10 +249,11 @@ NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_vid) rgb_t col; if (m_vid < m_sync_threshold) + // Mark sync areas col = rgb_t(255, 0, 0); else { - int colv = (int) ((m_vid - m_sync_threshold) / 3.7 * 255.0); + int colv = (int) ((m_vid - m_sync_threshold) * m_gain * 255.0); if (colv > 255) colv = 255; col = rgb_t(colv, colv, colv); @@ -272,6 +275,7 @@ NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_vid) if (sync & 2) { VERBOSE_OUT(("HSYNC up %d\n", pixels)); + //if (m_last_y == 27) printf("HSYNC up %d %d\n", m_last_y, pixels); } if (sync & 4) { @@ -287,7 +291,8 @@ NETDEV_ANALOG_CALLBACK_MEMBER(fixedfreq_device::update_vid) m_last_vsync_time = time; } - if ((sync & 2) && !m_sig_vsync) + // FIXME: pixels > 50 filters some spurious hysnc on line 27 in breakout + if ((sync & 2) && !m_sig_vsync && (pixels > 50)) { m_last_y += m_fieldcount; m_last_x = 0; diff --git a/src/emu/video/fixfreq.h b/src/emu/video/fixfreq.h index fa9703cd2b4..37fef7871bb 100644 --- a/src/emu/video/fixfreq.h +++ b/src/emu/video/fixfreq.h @@ -40,6 +40,9 @@ #define MCFG_FIXFREQ_SYNC_THRESHOLD(_threshold) \ fixedfreq_device::set_threshold(*device, _threshold); +#define MCFG_FIXFREQ_GAIN(_gain) \ + fixedfreq_device::set_gain(*device, _gain); + // pre-defined configurations //ModeLine "720x480@30i" 13.5 720 736 799 858 480 486 492 525 interlace -hsync -vsync @@ -73,6 +76,7 @@ public: static void set_minitor_clock(device_t &device, UINT32 clock) { downcast<fixedfreq_device &>(device).m_monitor_clock = clock; } static void set_fieldcount(device_t &device, int count) { downcast<fixedfreq_device &>(device).m_fieldcount = count; } static void set_threshold(device_t &device, double threshold) { downcast<fixedfreq_device &>(device).m_sync_threshold = threshold; } + static void set_gain(device_t &device, double gain) { downcast<fixedfreq_device &>(device).m_gain = gain; } static void set_horz_params(device_t &device, int visible, int frontporch, int sync, int backporch) { fixedfreq_device &dev = downcast<fixedfreq_device &>(device); @@ -135,6 +139,7 @@ private: int m_vbackporch; int m_fieldcount; double m_sync_threshold; + double m_gain; /* sync separator */ double m_vint; diff --git a/src/emu/video/i8275.c b/src/emu/video/i8275.c index 53218f2cc4b..cf7b5d022ea 100644 --- a/src/emu/video/i8275.c +++ b/src/emu/video/i8275.c @@ -309,13 +309,14 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, m_vsp = (m_stored_attr & FAC_B) ? 1 : 0; m_gpa = (m_stored_attr & FAC_GG) >> 2; m_rvv = (m_stored_attr & FAC_R) ? 1 : 0; - m_lten = (m_stored_attr & FAC_U) ? 1 : 0; + m_lten = ((m_stored_attr & FAC_U) != 0) && (lc == UNDERLINE) ? 1 : 0; for (int sx = 0; sx < CHARACTERS_PER_ROW; sx++) { int m_lineattr = 0; int lten = 0; int vsp = 0; + int rvv = 0; UINT8 data = m_buffer[!m_buffer_dma][sx]; @@ -328,7 +329,7 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, m_vsp = (data & FAC_B) ? 1 : 0; m_gpa = (data & FAC_GG) >> 2; m_rvv = (data & FAC_R) ? 1 : 0; - m_lten = (data & FAC_U) ? 1 : 0; + m_lten = ((data & FAC_U) != 0) && (lc == UNDERLINE) ? 1 : 0; if ((SCANLINES_PER_ROW - lc)==1) m_stored_attr = data; @@ -412,7 +413,7 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, } else { - lten = vis; + rvv = vis; } } @@ -429,7 +430,7 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, (data & 0x7f), // char code to be displayed m_lineattr, // line attribute code lten | m_lten, // light enable signal - m_rvv, // reverse video signal + rvv ^ m_rvv, // reverse video signal vsp, // video suppression m_gpa, // general purpose attribute code m_hlgt // highlight diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c index 92e1e4fe130..82302bef6ec 100644 --- a/src/emu/video/pc_vga.c +++ b/src/emu/video/pc_vga.c @@ -122,8 +122,6 @@ const device_type TSENG_VGA = &device_creator<tseng_vga_device>; const device_type S3_VGA = &device_creator<s3_vga_device>; const device_type GAMTOR_VGA = &device_creator<gamtor_vga_device>; const device_type ATI_VGA = &device_creator<ati_vga_device>; -const device_type CIRRUS_GD5428 = &device_creator<cirrus_gd5428_device>; -const device_type CIRRUS_GD5430 = &device_creator<cirrus_gd5430_device>; const device_type IBM8514A = &device_creator<ibm8514a_device>; const device_type MACH8 = &device_creator<mach8_device>; @@ -174,21 +172,6 @@ ati_vga_device::ati_vga_device(const machine_config &mconfig, device_type type, { } -cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : svga_device(mconfig, CIRRUS_GD5428, "Cirrus Logic GD5428", tag, owner, clock, "clgd5428", __FILE__) -{ -} - -cirrus_gd5428_device::cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) - : svga_device(mconfig, type, name, tag, owner, clock, shortname, source) -{ -} - -cirrus_gd5430_device::cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : cirrus_gd5428_device(mconfig, CIRRUS_GD5430, "Cirrus Logic GD5430", tag, owner, clock, "clgd5430", __FILE__) -{ -} - ibm8514a_device::ibm8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, IBM8514A, "IBM8514A Video", tag, owner, clock, "ibm8514a", __FILE__) { @@ -272,42 +255,6 @@ void svga_device::device_start() memset(&svga, 0, sizeof(svga)); } -void cirrus_gd5428_device::device_start() -{ - zero(); - - int i; - for (i = 0; i < 0x100; i++) - m_palette->set_pen_color(i, 0, 0, 0); - - // Avoid an infinite loop when displaying. 0 is not possible anyway. - vga.crtc.maximum_scan_line = 1; - - // copy over interfaces - vga.read_dipswitch = read8_delegate(); //read_dipswitch; - vga.svga_intf.seq_regcount = 0x1f; - vga.svga_intf.crtc_regcount = 0x2d; - vga.svga_intf.vram_size = 0x200000; - - vga.memory.resize(vga.svga_intf.vram_size); - memset(&vga.memory[0], 0, vga.svga_intf.vram_size); - save_item(NAME(vga.memory)); - save_pointer(vga.crtc.data,"CRTC Registers",0x100); - save_pointer(vga.sequencer.data,"Sequencer Registers",0x100); - save_pointer(vga.attribute.data,"Attribute Registers", 0x15); - save_item(NAME(m_chip_id)); - - m_vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vga_device::vblank_timer_cb),this)); - - m_chip_id = 0x98; // GD5428 - Rev 0 -} - -void cirrus_gd5430_device::device_start() -{ - cirrus_gd5428_device::device_start(); - m_chip_id = 0xa0; // GD5430 - Rev 0 -} - void ati_vga_device::device_start() { svga_device::device_start(); @@ -351,7 +298,7 @@ void ibm8514a_device::device_start() void ibm8514a_device::device_config_complete() { - if(m_vga_tag.len() != 0) + if(m_vga_tag.length() != 0) { m_vga = machine().device<vga_device>(m_vga_tag.c_str()); } @@ -651,7 +598,6 @@ void svga_device::svga_vh_rgb8(bitmap_rgb32 &bitmap, const rectangle &cliprect) /* line compare is screen sensitive */ mask_comp = 0x3ff; curr_addr = 0; - // if(vga.crtc.dw) // line_length = vga.crtc.offset << 3; // doubleword mode // else @@ -660,7 +606,6 @@ void svga_device::svga_vh_rgb8(bitmap_rgb32 &bitmap, const rectangle &cliprect) // } start_shift = (!(vga.sequencer.data[4] & 0x08)) ? 2 : 0; - { for (addr = VGA_START_ADDRESS << start_shift, line=0; line<LINES; line+=height, addr+=offset(), curr_addr+=offset()) { @@ -859,21 +804,6 @@ void svga_device::svga_vh_rgb32(bitmap_rgb32 &bitmap, const rectangle &cliprect) } } -enum -{ - SCREEN_OFF = 0, - TEXT_MODE, - VGA_MODE, - EGA_MODE, - CGA_MODE, - MONO_MODE, - RGB8_MODE, - RGB15_MODE, - RGB16_MODE, - RGB24_MODE, - RGB32_MODE -}; - UINT8 vga_device::pc_vga_choosevideomode() { int i; @@ -1165,112 +1095,9 @@ UINT32 s3_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, return 0; } -UINT32 cirrus_gd5428_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - int x,y,bit; - UINT32 ptr = (vga.svga_intf.vram_size - 0x4000); // cursor patterns are stored in the last 16kB of VRAM - svga_device::screen_update(screen, bitmap, cliprect); - - /*UINT8 cur_mode =*/ pc_vga_choosevideomode(); - - if(m_cursor_attr & 0x01) // hardware cursor enabled - { - // draw hardware graphics cursor - if(m_cursor_attr & 0x04) // 64x64 - { - ptr += ((m_cursor_addr & 0x3c) * 256); - for(y=0;y<64;y++) - { - for(x=0;x<64;x+=8) - { - for(bit=0;bit<8;bit++) - { - UINT8 pixel1 = vga.memory[ptr] >> (7-bit); - UINT8 pixel2 = vga.memory[ptr+256] >> (7-bit); - UINT8 output = ((pixel1 & 0x01) << 1) | (pixel2 & 0x01); - switch(output) - { - case 0: // transparent - do nothing - break; - case 1: // background - bitmap.pix32(y,x+bit) = (m_ext_palette[0].red << 16) | (m_ext_palette[0].green << 8) | (m_ext_palette[0].blue); - break; - case 2: // XOR - bitmap.pix32(y,x+bit) = ~bitmap.pix32(y,x+bit); - break; - case 3: // foreground - bitmap.pix32(y,x+bit) = (m_ext_palette[15].red << 16) | (m_ext_palette[15].green << 8) | (m_ext_palette[15].blue); - break; - } - } - } - } - } - else - { - ptr += ((m_cursor_addr & 0x3f) * 256); - for(y=0;y<32;y++) - { - for(x=0;x<32;x+=8) - { - for(bit=0;bit<8;bit++) - { - UINT8 pixel1 = vga.memory[ptr] >> (7-bit); - UINT8 pixel2 = vga.memory[ptr+128] >> (7-bit); - UINT8 output = ((pixel1 & 0x01) << 1) | (pixel2 & 0x01); - switch(output) - { - case 0: // transparent - do nothing - break; - case 1: // background - bitmap.pix32(y,x+bit) = (m_ext_palette[0].red << 16) | (m_ext_palette[0].green << 8) | (m_ext_palette[0].blue); - break; - case 2: // XOR - bitmap.pix32(y,x+bit) = ~bitmap.pix32(y,x+bit); - break; - case 3: // foreground - bitmap.pix32(y,x+bit) = (m_ext_palette[15].red << 16) | (m_ext_palette[15].green << 8) | (m_ext_palette[15].blue); - break; - } - } - ptr++; - } - } - } - } - return 0; -} /***************************************************************************/ -inline UINT8 vga_device::rotate_right(UINT8 val) -{ - return (val >> vga.gc.rotate_count) | (val << (8 - vga.gc.rotate_count)); -} - -inline UINT8 vga_device::vga_logical_op(UINT8 data, UINT8 plane, UINT8 mask) -{ - UINT8 res = 0; - - switch(vga.gc.logical_op & 3) - { - case 0: /* NONE */ - res = (data & mask) | (vga.gc.latch[plane] & ~mask); - break; - case 1: /* AND */ - res = (data | ~mask) & (vga.gc.latch[plane]); - break; - case 2: /* OR */ - res = (data & mask) | (vga.gc.latch[plane]); - break; - case 3: /* XOR */ - res = (data & mask) ^ (vga.gc.latch[plane]); - break; - } - - return res; -} - inline UINT8 vga_device::vga_latch_write(int offs, UINT8 data) { UINT8 res = 0; @@ -1335,7 +1162,6 @@ UINT8 vga_device::crtc_reg_read(UINT8 index) res = (vga.crtc.line_compare & 0x100) >> 4; res |= (vga.crtc.vert_retrace_start & 0x200) >> 2; res |= (vga.crtc.vert_disp_end & 0x200) >> 3; - res |= (vga.crtc.vert_retrace_start & 0x200) >> 6; res |= (vga.crtc.vert_total & 0x200) >> 4; res |= (vga.crtc.vert_blank_start & 0x100) >> 5; res |= (vga.crtc.vert_retrace_start & 0x100) >> 6; @@ -1347,7 +1173,7 @@ UINT8 vga_device::crtc_reg_read(UINT8 index) res |= (vga.crtc.preset_row_scan & 0x1f); break; case 0x09: // Maximum Scan Line Register - res = (vga.crtc.maximum_scan_line & 0x1f) - 1; + res = (vga.crtc.maximum_scan_line - 1) & 0x1f; res |= (vga.crtc.scan_doubling & 1) << 7; res |= (vga.crtc.line_compare & 0x200) >> 3; res |= (vga.crtc.vert_blank_start & 0x200) >> 4; @@ -1375,6 +1201,8 @@ UINT8 vga_device::crtc_reg_read(UINT8 index) res = (vga.crtc.protect_enable & 1) << 7; res |= (vga.crtc.bandwidth & 1) << 6; res |= (vga.crtc.vert_retrace_end & 0xf); + res |= (vga.crtc.irq_clear & 1) << 4; + res |= (vga.crtc.irq_disable & 1) << 5; break; case 0x12: res = vga.crtc.vert_disp_end & 0xff; @@ -1553,6 +1381,8 @@ void vga_device::crtc_reg_write(UINT8 index, UINT8 data) vga.crtc.protect_enable = (data & 0x80) >> 7; vga.crtc.bandwidth = (data & 0x40) >> 6; vga.crtc.vert_retrace_end = data & 0x0f; + vga.crtc.irq_clear = (data & 0x10) >> 4; + vga.crtc.irq_disable = (data & 0x20) >> 5; break; case 0x12: vga.crtc.vert_disp_end &= ~0xff; @@ -2122,21 +1952,6 @@ void s3_vga_device::device_reset() s3.sr11 = 0x41; } -void cirrus_gd5428_device::device_reset() -{ - vga_device::device_reset(); - gc_locked = true; - gc_mode_ext = 0; - gc_bank_0 = gc_bank_1 = 0; - gc_blt_status = 0; - m_cursor_attr = 0x00; // disable hardware cursor and extra palette - m_cursor_x = m_cursor_y = 0; - m_cursor_addr = 0; - m_scratchpad1 = m_scratchpad2 = m_scratchpad3 = 0; - m_cr19 = m_cr1a = m_cr1b = 0; - memset(m_ext_palette, 0, sizeof(m_ext_palette)); -} - READ8_MEMBER(vga_device::mem_r) { /* TODO: check me */ @@ -2270,24 +2085,6 @@ MACHINE_CONFIG_FRAGMENT( pcvideo_trident_vga ) MCFG_DEVICE_ADD("vga", TRIDENT_VGA, 0) MACHINE_CONFIG_END -MACHINE_CONFIG_FRAGMENT( pcvideo_cirrus_gd5428 ) - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) - MCFG_SCREEN_UPDATE_DEVICE("vga", cirrus_gd5428_device, screen_update) - - MCFG_PALETTE_ADD("palette", 0x100) - MCFG_DEVICE_ADD("vga", CIRRUS_GD5428, 0) -MACHINE_CONFIG_END - -MACHINE_CONFIG_FRAGMENT( pcvideo_cirrus_gd5430 ) - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) - MCFG_SCREEN_UPDATE_DEVICE("vga", cirrus_gd5430_device, screen_update) - - MCFG_PALETTE_ADD("palette", 0x100) - MCFG_DEVICE_ADD("vga", CIRRUS_GD5430, 0) -MACHINE_CONFIG_END - MACHINE_CONFIG_FRAGMENT( pcvideo_gamtor_vga ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(XTAL_25_1748MHz,900,0,640,526,0,480) @@ -5750,659 +5547,3 @@ READ16_MEMBER(mach8_device::mach8_config2_r) { return 0x0002; } - -/****************************************** - -Cirrus SVGA card implementation - -******************************************/ - -void cirrus_gd5428_device::cirrus_define_video_mode() -{ - svga.rgb8_en = 0; - svga.rgb15_en = 0; - svga.rgb16_en = 0; - svga.rgb24_en = 0; - svga.rgb32_en = 0; - if (!gc_locked && (vga.sequencer.data[0x07] & 0x01)) - { - switch(vga.sequencer.data[0x07] & 0x0E) - { - case 0x00: svga.rgb8_en = 1; break; - case 0x02: svga.rgb16_en = 1; break; //double VCLK - case 0x04: svga.rgb24_en = 1; break; - case 0x06: svga.rgb16_en = 1; break; - case 0x08: svga.rgb32_en = 1; break; - } - } - recompute_params_clock(1, (vga.miscellaneous_output & 0xc) ? XTAL_28_63636MHz : XTAL_25_1748MHz); -} - -UINT16 cirrus_gd5428_device::offset() -{ - //popmessage("Offset: %04x %s %s **",vga.crtc.offset,vga.crtc.dw?"DW":"--",vga.crtc.word_mode?"BYTE":"WORD"); - if(gc_mode_ext & 0x10) - return vga.crtc.offset << 3; - if ( svga.rgb8_en == 1 ) // guess - return vga.crtc.offset << 3; - return vga_device::offset(); -} - -UINT8 cirrus_gd5428_device::cirrus_seq_reg_read(UINT8 index) -{ - UINT8 res; - - res = 0xff; - - switch(index) - { - case 0x02: - if(gc_mode_ext & 0x08) - res = vga.sequencer.map_mask & 0xff; - else - res = vga.sequencer.map_mask & 0x0f; - break; - case 0x06: - if(gc_locked) - return 0x0f; - else - return m_lock_reg; - break; - case 0x09: - //printf("%02x\n",index); - res = vga.sequencer.data[index]; - break; - case 0x0a: - res = m_scratchpad1; - break; - case 0x14: - res = m_scratchpad2; - break; - case 0x15: - res = m_scratchpad3; - break; - default: - res = vga.sequencer.data[index]; - } - - return res; -} - -void cirrus_gd5428_device::cirrus_seq_reg_write(UINT8 index, UINT8 data) -{ - switch(index) - { - case 0x02: - if(gc_mode_ext & 0x08) - vga.sequencer.map_mask = data & 0xff; - else - vga.sequencer.map_mask = data & 0x0f; - break; - case 0x06: - // Note: extensions are always enabled on the GD5429 - if((data & 0x17) == 0x12) // bits 3,5,6,7 ignored - { - gc_locked = false; - logerror("Cirrus register extensions unlocked\n"); - } - else - { - gc_locked = true; - logerror("Cirrus register extensions locked\n"); - } - m_lock_reg = data & 0x17; - break; - case 0x07: - if((data & 0xf0) != 0) - popmessage("1MB framebuffer window enabled at %iMB (%02x)",data >> 4,data); - vga.sequencer.data[vga.sequencer.index] = data; - break; - case 0x09: - //printf("%02x %02x\n",index,data); - vga.sequencer.data[vga.sequencer.index] = data; - break; - case 0x0a: - m_scratchpad1 = data; // GD5402/GD542x BIOS writes VRAM size here. - break; - case 0x10: - case 0x30: - case 0x50: - case 0x70: - case 0x90: - case 0xb0: - case 0xd0: - case 0xf0: // bits 5-7 of the register index are the low bits of the X co-ordinate - m_cursor_x = (data << 3) | ((index & 0xe0) >> 5); - break; - case 0x11: - case 0x31: - case 0x51: - case 0x71: - case 0x91: - case 0xb1: - case 0xd1: - case 0xf1: // bits 5-7 of the register index are the low bits of the Y co-ordinate - m_cursor_y = (data << 3) | ((index & 0xe0) >> 5); - break; - case 0x12: - // bit 0 - enable cursor - // bit 1 - enable extra palette (cursor colours are there) - // bit 2 - 64x64 cursor (32x32 if clear, GD5422+) - // bit 7 - overscan colour protect - if set, use colour 2 in the extra palette for the border (GD5424+) - m_cursor_attr = data; - break; - case 0x13: - m_cursor_addr = data; // bits 0 and 1 are ignored if using 64x64 cursor - break; - case 0x14: - m_scratchpad2 = data; - break; - case 0x15: - m_scratchpad3 = data; // GD543x BIOS writes VRAM size here - break; - default: - vga.sequencer.data[vga.sequencer.index] = data; - seq_reg_write(vga.sequencer.index,data); - } -} - -UINT8 cirrus_gd5428_device::cirrus_gc_reg_read(UINT8 index) -{ - UINT8 res = 0xff; - - switch(index) - { - case 0x00: - if(gc_mode_ext & 0x02) - res = vga.gc.set_reset & 0xff; - else - res = vga.gc.set_reset & 0x0f; - break; - case 0x01: - if(gc_mode_ext & 0x02) - res = vga.gc.enable_set_reset & 0xff; - else - res = vga.gc.enable_set_reset & 0x0f; - break; - case 0x09: // Offset register 0 - res = gc_bank_0; - break; - case 0x0a: // Offset register 1 - res = gc_bank_1; - break; - case 0x0b: // Graphics controller mode extensions - res = gc_mode_ext; - break; - case 0x0c: // Colour Key - break; - case 0x0d: // Colour Key Mask - break; - case 0x0e: // Miscellaneous Control - break; - case 0x10: // Foreground Colour Byte 1 - break; - case 0x11: // Background Colour Byte 1 - break; - // later registers are related to the BitBLT hardware - case 0x31: // BitBLT Start / Status - res = gc_blt_status; - break; - default: - res = gc_reg_read(index); - } - - return res; -} - -void cirrus_gd5428_device::cirrus_gc_reg_write(UINT8 index, UINT8 data) -{ - logerror("CL: GC write %02x to GR%02x\n",data,index); - switch(index) - { - case 0x00: // if extended writes are enabled (bit 2 of index 0bh), then index 0 and 1 are extended to 8 bits - if(gc_mode_ext & 0x02) - vga.gc.set_reset = data & 0xff; - else - vga.gc.set_reset = data & 0x0f; - break; - case 0x01: - if(gc_mode_ext & 0x02) - vga.gc.enable_set_reset = data & 0xff; - else - vga.gc.enable_set_reset = data & 0x0f; - break; - case 0x09: // Offset register 0 - gc_bank_0 = data; - logerror("CL: Offset register 0 set to %i\n",data); - break; - case 0x0a: // Offset register 1 - gc_bank_1 = data; - logerror("CL: Offset register 1 set to %i\n",data); - break; - case 0x0b: // Graphics controller mode extensions - gc_mode_ext = data; - break; - case 0x0c: // Colour Key - break; - case 0x0d: // Colour Key Mask - break; - case 0x0e: // Miscellaneous Control - break; - case 0x10: // Foreground Colour Byte 1 - break; - case 0x11: // Background Colour Byte 1 - break; - // later registers are related to the BitBLT hardware - case 0x31: // BitBLT Start / Status - gc_blt_status = data & 0xf2; - if(data != 0) - popmessage("BitBLT start %02x",data); - break; - default: - gc_reg_write(index,data); - } -} - -READ8_MEMBER(cirrus_gd5428_device::port_03c0_r) -{ - UINT8 res = 0xff; - - switch(offset) - { - case 0x05: - res = cirrus_seq_reg_read(vga.sequencer.index); - break; - case 0x09: - if(!(m_cursor_attr & 0x02)) - res = vga_device::port_03c0_r(space,offset,mem_mask); - else - { - if (vga.dac.read) - { - switch (vga.dac.state++) - { - case 0: - res = m_ext_palette[vga.dac.read_index & 0x0f].red; - break; - case 1: - res = m_ext_palette[vga.dac.read_index & 0x0f].green; - break; - case 2: - res = m_ext_palette[vga.dac.read_index & 0x0f].blue; - break; - } - - if (vga.dac.state==3) - { - vga.dac.state = 0; - vga.dac.read_index++; - } - } - } - break; - case 0x0f: - res = cirrus_gc_reg_read(vga.gc.index); - break; - default: - res = vga_device::port_03c0_r(space,offset,mem_mask); - break; - } - - return res; -} - -WRITE8_MEMBER(cirrus_gd5428_device::port_03c0_w) -{ - switch(offset) - { - case 0x05: - cirrus_seq_reg_write(vga.sequencer.index,data); - break; - case 0x09: - if(!(m_cursor_attr & 0x02)) - vga_device::port_03c0_w(space,offset,data,mem_mask); - else - { - if (!vga.dac.read) - { - switch (vga.dac.state++) { - case 0: - m_ext_palette[vga.dac.write_index & 0x0f].red=data; - break; - case 1: - m_ext_palette[vga.dac.write_index & 0x0f].green=data; - break; - case 2: - m_ext_palette[vga.dac.write_index & 0x0f].blue=data; - break; - } - vga.dac.dirty=1; - if (vga.dac.state==3) { - vga.dac.state=0; vga.dac.write_index++; - } - } - } - break; - case 0x0f: - cirrus_gc_reg_write(vga.gc.index,data); - break; - default: - vga_device::port_03c0_w(space,offset,data,mem_mask); - break; - } - cirrus_define_video_mode(); -} - -READ8_MEMBER(cirrus_gd5428_device::port_03b0_r) -{ - UINT8 res = 0xff; - - if (CRTC_PORT_ADDR == 0x3b0) - { - switch(offset) - { - case 5: - res = cirrus_crtc_reg_read(vga.crtc.index); - break; - default: - res = vga_device::port_03b0_r(space,offset,mem_mask); - break; - } - } - - return res; -} - -READ8_MEMBER(cirrus_gd5428_device::port_03d0_r) -{ - UINT8 res = 0xff; - - if (CRTC_PORT_ADDR == 0x3d0) - { - switch(offset) - { - case 5: - res = cirrus_crtc_reg_read(vga.crtc.index); - break; - default: - res = vga_device::port_03d0_r(space,offset,mem_mask); - break; - } - } - - return res; -} - -WRITE8_MEMBER(cirrus_gd5428_device::port_03b0_w) -{ - if (CRTC_PORT_ADDR == 0x3b0) - { - switch(offset) - { - case 5: - vga.crtc.data[vga.crtc.index] = data; - cirrus_crtc_reg_write(vga.crtc.index,data); - break; - default: - vga_device::port_03b0_w(space,offset,data,mem_mask); - break; - } - } - cirrus_define_video_mode(); -} - -WRITE8_MEMBER(cirrus_gd5428_device::port_03d0_w) -{ - if (CRTC_PORT_ADDR == 0x3d0) - { - switch(offset) - { - case 5: - vga.crtc.data[vga.crtc.index] = data; - cirrus_crtc_reg_write(vga.crtc.index,data); - break; - default: - vga_device::port_03d0_w(space,offset,data,mem_mask); - break; - } - } - cirrus_define_video_mode(); -} - -UINT8 cirrus_gd5428_device::cirrus_crtc_reg_read(UINT8 index) -{ - UINT8 res = 0xff; - - if(index <= 0x18) - return crtc_reg_read(index); - - switch(index) - { - case 0x19: - res = m_cr19; - break; - case 0x1a: - res = m_cr1a; - break; - case 0x1b: - res = m_cr1b; - break; - case 0x27: - res = m_chip_id; - break; - default: - logerror("CL: Unhandled extended CRTC register CR%02x read\n",index); - } - - return res; -} - -void cirrus_gd5428_device::cirrus_crtc_reg_write(UINT8 index, UINT8 data) -{ - if(index <= 0x18) - { - crtc_reg_write(index,data); - return; - } - switch(index) - { - case 0x19: - m_cr19 = data; - break; - case 0x1a: - m_cr1a = data; - break; - case 0x1b: - m_cr1b = data; - break; - case 0x27: - // Do nothing, read only - break; - default: - logerror("CL: Unhandled extended CRTC register CR%02x write %02x\n",index,data); - } - -} - -READ8_MEMBER(cirrus_gd5428_device::mem_r) -{ - UINT32 addr; - UINT8 bank; - UINT8 cur_mode = pc_vga_choosevideomode(); - - if(gc_locked || cur_mode == TEXT_MODE || cur_mode == SCREEN_OFF) - return vga_device::mem_r(space,offset,mem_mask); - - if(offset >= 0x8000 && offset < 0x10000 && (gc_mode_ext & 0x01)) // if accessing bank 1 (if enabled) - bank = gc_bank_1; - else - bank = gc_bank_0; - - if(gc_mode_ext & 0x20) // 16kB bank granularity - addr = bank * 0x4000; - else // 4kB bank granularity - addr = bank * 0x1000; - - if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) - { - if(gc_mode_ext & 0x01) - offset &= 0x7fff; - else - offset &= 0xffff; - return vga.memory[(offset+addr) % vga.svga_intf.vram_size]; - } - - switch(vga.gc.memory_map_sel & 0x03) - { - case 0: break; - case 1: if(gc_mode_ext & 0x01) offset &= 0x7fff; else offset &= 0x0ffff; break; - case 2: offset -= 0x10000; offset &= 0x07fff; break; - case 3: offset -= 0x18000; offset &= 0x07fff; break; - } - - if(vga.sequencer.data[4] & 4) - { - int data; - if (!space.debugger_access()) - { - vga.gc.latch[0]=vga.memory[(offset+addr)]; - vga.gc.latch[1]=vga.memory[(offset+addr)+0x10000]; - vga.gc.latch[2]=vga.memory[(offset+addr)+0x20000]; - vga.gc.latch[3]=vga.memory[(offset+addr)+0x30000]; - } - - if (vga.gc.read_mode) - { - UINT8 byte,layer; - UINT8 fill_latch; - data=0; - - for(byte=0;byte<8;byte++) - { - fill_latch = 0; - for(layer=0;layer<4;layer++) - { - if(vga.gc.latch[layer] & 1 << byte) - fill_latch |= 1 << layer; - } - fill_latch &= vga.gc.color_dont_care; - if(fill_latch == vga.gc.color_compare) - data |= 1 << byte; - } - } - else - data=vga.gc.latch[vga.gc.read_map_sel]; - - return data; - } - else - { - // TODO: Lines up in 16-colour mode, likely different for 256-colour modes (docs say video addresses are shifted right 3 places) - UINT8 i,data; -// UINT8 bits = ((gc_mode_ext & 0x08) && (vga.gc.write_mode == 1)) ? 8 : 4; - - data = 0; - //printf("%08x\n",offset); - - if(gc_mode_ext & 0x02) - { - for(i=0;i<8;i++) - { - if(vga.sequencer.map_mask & 1 << i) - data |= vga.memory[((offset+addr))+i*0x10000]; - } - } - else - { - for(i=0;i<4;i++) - { - if(vga.sequencer.map_mask & 1 << i) - data |= vga.memory[((offset+addr))+i*0x10000]; - } - } - - return data; - } -} - -WRITE8_MEMBER(cirrus_gd5428_device::mem_w) -{ - UINT32 addr; - UINT8 bank; - UINT8 cur_mode = pc_vga_choosevideomode(); - - if(gc_locked || cur_mode == TEXT_MODE || cur_mode == SCREEN_OFF) - { - vga_device::mem_w(space,offset,data,mem_mask); - return; - } - - if(offset >= 0x8000 && offset < 0x10000 && (gc_mode_ext & 0x01)) // if accessing bank 1 (if enabled) - bank = gc_bank_1; - else - bank = gc_bank_0; - - if(gc_mode_ext & 0x20) // 16kB bank granularity - addr = bank * 0x4000; - else // 4kB bank granularity - addr = bank * 0x1000; - - if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) - { - if(gc_mode_ext & 0x01) - offset &= 0x7fff; - else - offset &= 0xffff; - vga.memory[(offset+addr) % vga.svga_intf.vram_size] = data; - } - else - { - //Inside each case must prevent writes to non-mapped VGA memory regions, not only mask the offset. - switch(vga.gc.memory_map_sel & 0x03) - { - case 0: break; - case 1: - if(offset & 0x10000) - return; - - if(gc_mode_ext & 0x01) - offset &= 0x7fff; - else - offset &= 0xffff; - break; - case 2: - if((offset & 0x18000) != 0x10000) - return; - - offset &= 0x07fff; - break; - case 3: - if((offset & 0x18000) != 0x18000) - return; - - offset &= 0x07fff; - break; - } - - { - // TODO: Lines up in 16-colour mode, likely different for 256-colour modes (docs say video addresses are shifted right 3 places) - UINT8 i; -// UINT8 bits = ((gc_mode_ext & 0x08) && (vga.gc.write_mode == 1)) ? 8 : 4; - - for(i=0;i<4;i++) - { - if(vga.sequencer.map_mask & 1 << i) - { - if(gc_mode_ext & 0x02) - { - vga.memory[((offset+addr) << 1)+i*0x10000] = (vga.sequencer.data[4] & 4) ? vga_latch_write(i,data) : data; - vga.memory[((offset+addr) << 1)+i*0x10000+1] = (vga.sequencer.data[4] & 4) ? vga_latch_write(i,data) : data; - } - else - vga.memory[((offset+addr))+i*0x10000] = (vga.sequencer.data[4] & 4) ? vga_latch_write(i,data) : data; - } - } - return; - } - } -} diff --git a/src/emu/video/pc_vga.h b/src/emu/video/pc_vga.h index 2d9df7ad88f..c88b995ecab 100644 --- a/src/emu/video/pc_vga.h +++ b/src/emu/video/pc_vga.h @@ -12,10 +12,23 @@ MACHINE_CONFIG_EXTERN( pcvideo_vga ); MACHINE_CONFIG_EXTERN( pcvideo_trident_vga ); MACHINE_CONFIG_EXTERN( pcvideo_gamtor_vga ); -MACHINE_CONFIG_EXTERN( pcvideo_cirrus_gd5428 ); -MACHINE_CONFIG_EXTERN( pcvideo_cirrus_gd5430 ); MACHINE_CONFIG_EXTERN( pcvideo_s3_vga ); +enum +{ + SCREEN_OFF = 0, + TEXT_MODE, + VGA_MODE, + EGA_MODE, + CGA_MODE, + MONO_MODE, + RGB8_MODE, + RGB15_MODE, + RGB16_MODE, + RGB24_MODE, + RGB32_MODE +}; + // ======================> vga_device class vga_device : public device_t @@ -65,11 +78,31 @@ protected: void gc_reg_write(UINT8 index,UINT8 data); virtual UINT16 offset(); inline UINT8 vga_latch_write(int offs, UINT8 data); -private: - inline UINT8 rotate_right(UINT8 val); - inline UINT8 vga_logical_op(UINT8 data, UINT8 plane, UINT8 mask); + inline UINT8 rotate_right(UINT8 val) { return (val >> vga.gc.rotate_count) | (val << (8 - vga.gc.rotate_count)); } + inline UINT8 vga_logical_op(UINT8 data, UINT8 plane, UINT8 mask) + { + UINT8 res = 0; + + switch(vga.gc.logical_op & 3) + { + case 0: /* NONE */ + res = (data & mask) | (vga.gc.latch[plane] & ~mask); + break; + case 1: /* AND */ + res = (data | ~mask) & (vga.gc.latch[plane]); + break; + case 2: /* OR */ + res = (data & mask) | (vga.gc.latch[plane]); + break; + case 3: /* XOR */ + res = (data & mask) ^ (vga.gc.latch[plane]); + break; + } + + return res; + } + -protected: struct { read8_delegate read_dipswitch; @@ -135,13 +168,15 @@ protected: /**/ UINT8 dw; /**/ UINT8 div4; /**/ UINT8 underline_loc; - /**/ UINT8 vert_blank_end; + /**/ UINT16 vert_blank_end; UINT8 sync_en; /**/ UINT8 aw; /**/ UINT8 div2; /**/ UINT8 sldiv; /**/ UINT8 map14; /**/ UINT8 map13; + /**/ UINT8 irq_clear; + /**/ UINT8 irq_disable; } crtc; struct @@ -237,7 +272,7 @@ public: ibm8514a_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); ibm8514a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - void set_vga(const char* tag) { m_vga_tag.cpy(tag); } + void set_vga(const char* tag) { m_vga_tag.assign(tag); } void set_vga_owner() { m_vga = dynamic_cast<vga_device*>(owner()); } void enabled(); @@ -343,7 +378,7 @@ protected: virtual void device_start(); virtual void device_config_complete(); vga_device* m_vga; // for pass-through - astring m_vga_tag; // pass-through device tag + std::string m_vga_tag; // pass-through device tag private: void ibm8514_draw_vector(UINT8 len, UINT8 dir, bool draw); void ibm8514_wait_draw_ssv(); @@ -622,75 +657,6 @@ private: // device type definition extern const device_type GAMTOR_VGA; -// ======================> cirrus_vga_device - -class cirrus_gd5428_device : public svga_device -{ -public: - // construction/destruction - cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - cirrus_gd5428_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); - virtual READ8_MEMBER(port_03c0_r); - virtual WRITE8_MEMBER(port_03c0_w); - virtual READ8_MEMBER(port_03b0_r); - virtual WRITE8_MEMBER(port_03b0_w); - virtual READ8_MEMBER(port_03d0_r); - virtual WRITE8_MEMBER(port_03d0_w); - virtual READ8_MEMBER(mem_r); - virtual WRITE8_MEMBER(mem_w); - - virtual UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); -protected: - // device-level overrides - virtual void device_start(); - virtual void device_reset(); - virtual UINT16 offset(); - - UINT8 m_chip_id; - - UINT8 gc_mode_ext; - UINT8 gc_bank_0; - UINT8 gc_bank_1; - UINT8 gc_blt_status; - bool gc_locked; - UINT8 m_lock_reg; - - UINT8 m_cr19; - UINT8 m_cr1a; - UINT8 m_cr1b; - - // hardware cursor - UINT16 m_cursor_x; - UINT16 m_cursor_y; - UINT16 m_cursor_addr; - UINT8 m_cursor_attr; - struct { UINT8 red, green, blue; } m_ext_palette[16]; // extra palette, colour 0 is cursor background, colour 15 is cursor foreground, colour 2 is overscan border colour - - UINT8 m_scratchpad1; - UINT8 m_scratchpad2; - UINT8 m_scratchpad3; -private: - void cirrus_define_video_mode(); - UINT8 cirrus_seq_reg_read(UINT8 index); - void cirrus_seq_reg_write(UINT8 index, UINT8 data); - UINT8 cirrus_gc_reg_read(UINT8 index); - void cirrus_gc_reg_write(UINT8 index, UINT8 data); - UINT8 cirrus_crtc_reg_read(UINT8 index); - void cirrus_crtc_reg_write(UINT8 index, UINT8 data); -}; - -class cirrus_gd5430_device : public cirrus_gd5428_device -{ -public: - cirrus_gd5430_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); -protected: - virtual void device_start(); -}; - -// device type definition -extern const device_type CIRRUS_GD5428; -extern const device_type CIRRUS_GD5430; - /* pega notes (paradise) build in amstrad pc1640 diff --git a/src/emu/video/tms9928a.c b/src/emu/video/tms9928a.c index 28a7b51e3ce..a48862f93b2 100644 --- a/src/emu/video/tms9928a.c +++ b/src/emu/video/tms9928a.c @@ -635,8 +635,6 @@ void tms9928a_device::set_palette() void tms9928a_device::device_start() { - astring tempstring; - m_top_border = m_50hz ? TMS9928A_VERT_DISPLAY_START_PAL : TMS9928A_VERT_DISPLAY_START_NTSC; m_vertical_size = m_50hz ? TMS9928A_TOTAL_VERT_PAL : TMS9928A_TOTAL_VERT_NTSC; diff --git a/src/emu/video/vooddefs.h b/src/emu/video/vooddefs.h index 819c285f290..094b6f0eb32 100644 --- a/src/emu/video/vooddefs.h +++ b/src/emu/video/vooddefs.h @@ -3086,13 +3086,28 @@ do else \ { \ int exp = count_leading_zeros(temp); \ + temp &=0x7fff0000; \ wfloat = ((exp << 12) | ((~temp >> (19 - exp)) & 0xfff)) + 1; \ } \ } \ + /* add the bias for fog selection*/ \ + if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \ + { \ + wfloat += (INT16)(VV)->reg[zaColor].u; \ + CLAMP(wfloat, 0, 0xffff); \ + } \ \ /* compute depth value (W or Z) for this pixel */ \ if (FBZMODE_WBUFFER_SELECT(FBZMODE) == 0) \ + { \ CLAMPED_Z(ITERZ, FBZCOLORPATH, depthval); \ + /* add the bias */ \ + if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \ + { \ + depthval += (INT16)(VV)->reg[zaColor].u; \ + CLAMP(depthval, 0, 0xffff); \ + } \ + } \ else if (FBZMODE_DEPTH_FLOAT_SELECT(FBZMODE) == 0) \ depthval = wfloat; \ else \ @@ -3107,17 +3122,18 @@ do else \ { \ int exp = count_leading_zeros(temp); \ + temp &=0x7fff0000; \ depthval = ((exp << 12) | ((~temp >> (19 - exp)) & 0xfff)) + 1; \ } \ } \ + /* add the bias */ \ + if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \ + { \ + depthval += (INT16)(VV)->reg[zaColor].u; \ + CLAMP(depthval, 0, 0xffff); \ + } \ } \ \ - /* add the bias */ \ - if (FBZMODE_ENABLE_DEPTH_BIAS(FBZMODE)) \ - { \ - depthval += (INT16)(VV)->reg[zaColor].u; \ - CLAMP(depthval, 0, 0xffff); \ - } \ \ /* handle depth buffer testing */ \ if (FBZMODE_ENABLE_DEPTHBUF(FBZMODE)) \ diff --git a/src/emu/video/voodoo.c b/src/emu/video/voodoo.c index d84fef0261f..a29bb711570 100644 --- a/src/emu/video/voodoo.c +++ b/src/emu/video/voodoo.c @@ -3248,7 +3248,12 @@ static INT32 lfb_w(voodoo_state *v, offs_t offset, UINT32 data, UINT32 mem_mask, if (mask & 0x0f) { stats_block *stats = &v->fbi.lfb_stats; - INT64 iterw = sw[pix] << (30-16); + INT64 iterw; + if (LFBMODE_WRITE_W_SELECT(v->reg[lfbMode].u)) { + iterw = (UINT32) (v->reg[zaColor].u & 0xffff) << 16; + } else { + iterw = (UINT32) sw[pix] << 16; + } INT32 iterz = sw[pix] << 12; rgb_union color; diff --git a/src/emu/webengine.c b/src/emu/webengine.c index 70c6e50f43b..ad6d1928a7e 100644 --- a/src/emu/webengine.c +++ b/src/emu/webengine.c @@ -69,7 +69,7 @@ int web_engine::json_game_handler(struct mg_connection *conn) data["ispaused"] = m_machine->paused(); Json::FastWriter writer; - const char *json = writer.write(data).c_str(); + std::string json = writer.write(data); // Send HTTP reply to the client mg_printf(conn, "HTTP/1.1 200 OK\r\n" @@ -77,7 +77,7 @@ int web_engine::json_game_handler(struct mg_connection *conn) "Content-Length: %d\r\n" // Always set Content-Length "\r\n" "%s", - (int)strlen(json), json); + (int)json.length(), json.c_str()); // Returning non-zero tells mongoose that our function has replied to // the client, and mongoose should not send client any more data. @@ -88,7 +88,7 @@ int web_engine::json_game_handler(struct mg_connection *conn) int web_engine::json_slider_handler(struct mg_connection *conn) { const slider_state *curslider; - astring tempstring; + std::string tempstring; Json::Value array(Json::arrayValue); // add all sliders @@ -119,7 +119,7 @@ int web_engine::json_slider_handler(struct mg_connection *conn) array.append(data); } Json::FastWriter writer; - const char *json = writer.write(array).c_str(); + std::string json = writer.write(array); // Send HTTP reply to the client mg_printf(conn, "HTTP/1.1 200 OK\r\n" @@ -127,7 +127,7 @@ int web_engine::json_slider_handler(struct mg_connection *conn) "Content-Length: %d\r\n" // Always set Content-Length "\r\n" "%s", - (int)strlen(json), json); + (int)json.length(), json.c_str()); return MG_TRUE; } @@ -260,7 +260,7 @@ static int filename_endswith(const char *str, const char *suffix) // This function will be called by mongoose on every new request. int web_engine::begin_request_handler(struct mg_connection *conn) { - astring file_path = astring(mg_get_option(m_server, "document_root")).cat(PATH_SEPARATOR).cat(conn->uri); + std::string file_path = std::string(mg_get_option(m_server, "document_root")).append(PATH_SEPARATOR).append(conn->uri); if (filename_endswith(file_path.c_str(), ".lp")) { FILE *fp = NULL; @@ -440,7 +440,7 @@ int web_engine::begin_request_handler(struct mg_connection *conn) return 0; } - astring fname("screenshot.png"); + std::string fname("screenshot.png"); emu_file file(m_machine->options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); file_error filerr = file.open(fname.c_str()); @@ -450,7 +450,7 @@ int web_engine::begin_request_handler(struct mg_connection *conn) } m_machine->video().save_snapshot(screen, file); - astring fullpath(file.fullpath()); + std::string fullpath(file.fullpath()); file.close(); mg_send_header(conn, "Cache-Control", "no-cache, no-store, must-revalidate"); mg_send_header(conn, "Pragma", "no-cache"); diff --git a/src/ldplayer/ldplayer.c b/src/ldplayer/ldplayer.c index da94f8331bf..2c954ef4b75 100644 --- a/src/ldplayer/ldplayer.c +++ b/src/ldplayer/ldplayer.c @@ -137,7 +137,7 @@ protected: }; // internal state - astring m_filename; + std::string m_filename; ioport_value m_last_controls; bool m_playing; }; @@ -229,14 +229,14 @@ chd_file *ldplayer_state::get_disc() file_error filerr = image_file.open(dir->name); if (filerr == FILERR_NONE) { - astring fullpath(image_file.fullpath()); + std::string fullpath(image_file.fullpath()); image_file.close(); // try to open the CHD if (set_disk_handle(machine(), "laserdisc", fullpath.c_str()) == CHDERR_NONE) { - m_filename.cpy(dir->name); + m_filename.assign(dir->name); found = TRUE; break; } diff --git a/src/lib/formats/c3040_dsk.c b/src/lib/formats/c3040_dsk.c new file mode 100644 index 00000000000..9fb6669ab20 --- /dev/null +++ b/src/lib/formats/c3040_dsk.c @@ -0,0 +1,101 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c3040_dsk.c + + Commodore 3040 sector disk image format + +*********************************************************************/ + +#include <assert.h> + +#include "formats/c3040_dsk.h" + +c3040_format::c3040_format() : d64_format(file_formats) +{ +} + +const char *c3040_format::name() const +{ + return "c3040"; +} + +const char *c3040_format::description() const +{ + return "Commodore 3040 disk image"; +} + +const char *c3040_format::extensions() const +{ + return "d67"; +} + +const c3040_format::format c3040_format::file_formats[] = { + { // d67, dos 1, 35 tracks, head 48 tpi, stepper 96 tpi + floppy_image::FF_525, floppy_image::SSSD, 690, 35, 1, 256, 9, 8 + }, + {} +}; + +const int c3040_format::c3040_sectors_per_track[] = +{ + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, // 1-17 + 20, 20, 20, 20, 20, 20, 20, // 18-24 + 18, 18, 18, 18, 18, 18, // 25-30 + 17, 17, 17, 17, 17, // 31-35 + 17, 17, 17, 17, 17, // 36-40 + 17, 17 // 41-42 +}; + +const int c3040_format::c3040_gap2[] = +{ + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, // 1-17 + 8, 8, 8, 8, 8, 8, 8, // 18-24 + 15, 15, 15, 15, 15, 15, // 25-30 + 12, 12, 12, 12, 12 // 31-35 +}; + +floppy_image_format_t::desc_e* c3040_format::get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2) +{ + static floppy_image_format_t::desc_e desc[] = { + /* 00 */ { SECTOR_LOOP_START, 0, -1 }, + /* 01 */ { SYNC_GCR5, 2 }, + /* 02 */ { GCR5, 0x08, 1 }, + /* 03 */ { CRC, 1 }, + /* 04 */ { CRC_CBM_START, 1 }, + /* 05 */ { SECTOR_ID_GCR5 }, + /* 06 */ { TRACK_ID_DOS2_GCR5 }, + /* 07 */ { GCR5, id2, 1 }, + /* 08 */ { GCR5, id1, 1 }, + /* 09 */ { CRC_END, 1 }, + /* 10 */ { GCR5, 0x00, f.gap_1 }, + /* 11 */ { SYNC_GCR5, 2 }, + /* 12 */ { GCR5, 0x07, 1 }, + /* 13 */ { CRC_CBM_START, 2 }, + /* 14 */ { SECTOR_DATA_GCR5, -1 }, + /* 15 */ { CRC_END, 2 }, + /* 16 */ { CRC, 2 }, + /* 17 */ { GCR5, 0x00, gap_2 }, + /* 18 */ { SECTOR_LOOP_END }, + /* 19 */ { GCR5, 0x00, 0 }, + /* 20 */ { RAWBITS, 0x14a, 0 }, + /* 21 */ { END } + }; + + desc[17].p2 = gap_2; // TODO why?!? + + current_size = 20 + (1+1+4)*10 + f.gap_1*10 + 20 + (1+f.sector_base_size+1)*10 + gap_2*10; + + current_size *= sector_count; + return desc; +} + +void c3040_format::fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size) +{ + desc[19].p2 = remaining_size / 10; + desc[20].p2 = remaining_size % 10; + desc[20].p1 >>= remaining_size & 0x01; +} + +const floppy_format_type FLOPPY_C3040_FORMAT = &floppy_image_format_creator<c3040_format>; diff --git a/src/lib/formats/c3040_dsk.h b/src/lib/formats/c3040_dsk.h new file mode 100644 index 00000000000..cbf320273a8 --- /dev/null +++ b/src/lib/formats/c3040_dsk.h @@ -0,0 +1,40 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c3040_dsk.h + + Commodore 3040 sector disk image format + +*********************************************************************/ + +#ifndef C3040_DSK_H_ +#define C3040_DSK_H_ + +#include "d64_dsk.h" + +class c3040_format : public d64_format { +public: + c3040_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +protected: + virtual int get_sectors_per_track(const format &f, int track) { return c3040_sectors_per_track[track]; } + virtual floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); + virtual int get_gap2(const format &f, int head, int track) { return c3040_gap2[track]; } + virtual void fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size); + + static const format file_formats[]; + + static const int c3040_gap2[]; + static const int c3040_sectors_per_track[]; +}; + +extern const floppy_format_type FLOPPY_C3040_FORMAT; + + + +#endif diff --git a/src/lib/formats/c4040_dsk.c b/src/lib/formats/c4040_dsk.c new file mode 100644 index 00000000000..9e6dff7f627 --- /dev/null +++ b/src/lib/formats/c4040_dsk.c @@ -0,0 +1,91 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c4040_dsk.c + + Commodore 4040 sector disk image format + +*********************************************************************/ + +#include <assert.h> + +#include "formats/c4040_dsk.h" + +c4040_format::c4040_format() : d64_format(file_formats) +{ +} + +const char *c4040_format::name() const +{ + return "c4040"; +} + +const char *c4040_format::description() const +{ + return "Commodore 4040 disk image"; +} + +const char *c4040_format::extensions() const +{ + return "d64"; +} + +const c4040_format::format c4040_format::file_formats[] = { + { // c4040, dos 2, 35 tracks, head 48 tpi, stepper 96 tpi + floppy_image::FF_525, floppy_image::SSSD, 683, 35, 1, 256, 9, 8 + }, + {} +}; + +const int c4040_format::c4040_gap2[] = +{ + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, // 1-17 + 19, 19, 19, 19, 19, 19, 19, // 18-24 + 15, 15, 15, 15, 15, 15, // 25-30 + 12, 12, 12, 12, 12 // 31-35 +}; + +floppy_image_format_t::desc_e* c4040_format::get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2) +{ + static floppy_image_format_t::desc_e desc[] = { + /* 00 */ { SECTOR_LOOP_START, 0, -1 }, + /* 01 */ { SYNC_GCR5, 4 }, + /* 02 */ { GCR5, 0x08, 1 }, + /* 03 */ { CRC, 1 }, + /* 04 */ { CRC_CBM_START, 1 }, + /* 05 */ { SECTOR_ID_GCR5 }, + /* 06 */ { TRACK_ID_DOS2_GCR5 }, + /* 07 */ { GCR5, id2, 1 }, + /* 08 */ { GCR5, id1, 1 }, + /* 09 */ { CRC_END, 1 }, + /* 10 */ { GCR5, 0x00, f.gap_1 }, + /* 11 */ { SYNC_GCR5, 4 }, + /* 12 */ { GCR5, 0x07, 1 }, + /* 13 */ { CRC_CBM_START, 2 }, + /* 14 */ { SECTOR_DATA_GCR5, -1 }, + /* 15 */ { CRC_END, 2 }, + /* 16 */ { CRC, 2 }, + /* 17 */ { GCR5, 0x00, gap_2 }, + /* 18 */ { SECTOR_LOOP_END }, + /* 19 */ { GCR5, 0x00, 0 }, + /* 20 */ { RAWBITS, 0x14a, 0 }, + /* 21 */ { END } + }; + + desc[17].p2 = gap_2; // TODO why?!? + + current_size = 40 + (1+1+4)*10 + f.gap_1*10 + 40 + (1+f.sector_base_size+1)*10 + gap_2*10; + + current_size *= sector_count; + return desc; +} + +void c4040_format::fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size) +{ + desc[19].p2 = remaining_size / 10; + desc[20].p2 = remaining_size % 10; + desc[20].p1 >>= remaining_size & 0x01; +} + +const floppy_format_type FLOPPY_C4040_FORMAT = &floppy_image_format_creator<c4040_format>; diff --git a/src/lib/formats/c4040_dsk.h b/src/lib/formats/c4040_dsk.h new file mode 100644 index 00000000000..231b961c765 --- /dev/null +++ b/src/lib/formats/c4040_dsk.h @@ -0,0 +1,38 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c4040_dsk.h + + Commodore 4040 sector disk image format + +*********************************************************************/ + +#ifndef C4040_DSK_H_ +#define C4040_DSK_H_ + +#include "d64_dsk.h" + +class c4040_format : public d64_format { +public: + c4040_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +protected: + virtual floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); + virtual int get_gap2(const format &f, int head, int track) { return c4040_gap2[track]; } + virtual void fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size); + + static const format file_formats[]; + + static const int c4040_gap2[]; +}; + +extern const floppy_format_type FLOPPY_C4040_FORMAT; + + + +#endif diff --git a/src/lib/formats/c8280_dsk.c b/src/lib/formats/c8280_dsk.c new file mode 100644 index 00000000000..cb39b5c3ea5 --- /dev/null +++ b/src/lib/formats/c8280_dsk.c @@ -0,0 +1,69 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c8280_dsk.c + + Commodore 8280 disk image format + +*********************************************************************/ + +#include "formats/c8280_dsk.h" + +c8280_format::c8280_format() : wd177x_format(formats) +{ +} + +const char *c8280_format::name() const +{ + return "c8280"; +} + +const char *c8280_format::description() const +{ + return "Commodore 8280 disk image"; +} + +const char *c8280_format::extensions() const +{ + return "dsk"; +} + +const c8280_format::format c8280_format::formats[] = { + // 80x4e 12x00 3xf6 fc + // 50x4e 12x00 3xf5 fe 2x00 01 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 02 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 03 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 04 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 05 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 06 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 07 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 08 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 09 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0a 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0b 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0c 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0d 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0e 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 0f 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 10 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 11 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 12 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 13 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 14 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 15 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 16 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 17 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 18 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 19 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 54x4e 12x00 3xf5 fe 2x00 1a 01 f7 22x4e 12x00 3xf5 fb 256xaa f7 + // 653x4e + { + floppy_image::FF_8, floppy_image::DSDD, floppy_image::MFM, + 1200, 26, 77, 2, 256, {}, 1, {}, 50, 22, 54 + }, + + {} +}; + +const floppy_format_type FLOPPY_C8280_FORMAT = &floppy_image_format_creator<c8280_format>; diff --git a/src/lib/formats/c8280_dsk.h b/src/lib/formats/c8280_dsk.h new file mode 100644 index 00000000000..eed34f5d846 --- /dev/null +++ b/src/lib/formats/c8280_dsk.h @@ -0,0 +1,30 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************* + + formats/c8280_dsk.h + + Commodore 8280 disk image format + +*********************************************************************/ + +#ifndef C8280_DSK_H_ +#define C8280_DSK_H_ + +#include "wd177x_dsk.h" + +class c8280_format : public wd177x_format { +public: + c8280_format(); + + virtual const char *name() const; + virtual const char *description() const; + virtual const char *extensions() const; + +private: + static const format formats[]; +}; + +extern const floppy_format_type FLOPPY_C8280_FORMAT; + +#endif diff --git a/src/lib/formats/cbm_crt.c b/src/lib/formats/cbm_crt.c index 3be90b29ab1..dce20d6e603 100644 --- a/src/lib/formats/cbm_crt.c +++ b/src/lib/formats/cbm_crt.c @@ -122,7 +122,7 @@ static const char * CRT_C64_SLOT_NAMES[_CRT_C64_COUNT] = // cbm_crt_get_card - get slot interface card //------------------------------------------------- -void cbm_crt_get_card(astring &result, core_file *file) +void cbm_crt_get_card(std::string &result, core_file *file) { // read the header cbm_crt_header header; @@ -132,11 +132,11 @@ void cbm_crt_get_card(astring &result, core_file *file) { UINT16 hardware = pick_integer_be(header.hardware, 0, 2); - result.cpy(CRT_C64_SLOT_NAMES[hardware]); + result.assign(CRT_C64_SLOT_NAMES[hardware]); return; } - result.reset(); + result.clear(); } diff --git a/src/lib/formats/cbm_crt.h b/src/lib/formats/cbm_crt.h index 8049ddacff7..9be37bc0740 100644 --- a/src/lib/formats/cbm_crt.h +++ b/src/lib/formats/cbm_crt.h @@ -135,7 +135,7 @@ struct cbm_crt_chip // FUNCTION PROTOTYPES //************************************************************************** -void cbm_crt_get_card(astring &result, core_file *file); +void cbm_crt_get_card(std::string &result, core_file *file); bool cbm_crt_read_header(core_file* file, size_t *roml_size, size_t *romh_size, int *exrom, int *game); bool cbm_crt_read_data(core_file* file, UINT8 *roml, UINT8 *romh); diff --git a/src/lib/formats/ccvf_dsk.c b/src/lib/formats/ccvf_dsk.c index 03ee6fd0dbc..44d919bc88e 100644 --- a/src/lib/formats/ccvf_dsk.c +++ b/src/lib/formats/ccvf_dsk.c @@ -93,18 +93,18 @@ bool ccvf_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) dynamic_buffer img(size); io_generic_read(io, &img[0], 0, size); - astring ccvf = astring((const char *)&img[0], size); + std::string ccvf = std::string((const char *)&img[0], size); dynamic_buffer bytes(78720); int start = 0, end = 0; - astring line; + std::string line; UINT32 byteoffs = 0; char hex[3] = {0}; do { - end = ccvf.chr(start, 10); - line.cpysubstr(ccvf, start, end); - if (line.find(0, "Compucolor Virtual Floppy Disk Image") && line.find(0, "Label") && line.find(0, "Track")) { + end = ccvf.find_first_of(10, start); + line.assign(ccvf.substr(start, end)); + if (line.find("Compucolor Virtual Floppy Disk Image") != std::string::npos && line.find("Label") != std::string::npos && line.find("Track") != std::string::npos) { for (int byte = 0; byte < 32; byte++) { if (byteoffs==78720) break; hex[0]=line[byte * 2]; diff --git a/src/lib/formats/d64_dsk.c b/src/lib/formats/d64_dsk.c index 3bcbee87727..531ce441b99 100644 --- a/src/lib/formats/d64_dsk.c +++ b/src/lib/formats/d64_dsk.c @@ -122,6 +122,25 @@ void d64_format::get_disk_id(const format &f, io_generic *io, UINT8 &id1, UINT8 id2 = id[1]; } +int d64_format::get_image_offset(const format &f, int _head, int _track) +{ + int offset = 0; + if (_head) { + for (int track = 0; track < f.track_count; track++) { + offset += compute_track_size(f, track); + } + } + for (int track = 0; track < _track; track++) { + offset += compute_track_size(f, track); + } + return offset; +} + +int d64_format::compute_track_size(const format &f, int track) +{ + return this->get_sectors_per_track(f, track) * f.sector_base_size; +} + UINT32 d64_format::get_cell_size(const format &f, int track) { return cell_size[speed_zone[track]]; @@ -220,8 +239,9 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) int physical_track = this->get_physical_track(f, head, track); int sector_count = this->get_sectors_per_track(f, track); int track_size = sector_count*f.sector_base_size; + int gap2 = this->get_gap2(f, head, track); - floppy_image_format_t::desc_e *desc = this->get_sector_desc(f, current_size, sector_count, id1, id2, f.gap_2); + floppy_image_format_t::desc_e *desc = this->get_sector_desc(f, current_size, sector_count, id1, id2, gap2); int remaining_size = total_size - current_size; if(remaining_size < 0) @@ -244,9 +264,51 @@ bool d64_format::load(io_generic *io, UINT32 form_factor, floppy_image *image) return true; } -bool d64_format::supports_save() const +bool d64_format::save(io_generic *io, floppy_image *image) +{ + const format &f = formats[0]; + + for(int head=0; head < f.head_count; head++) { + for(int track=0; track < f.track_count; track++) { + int sector_count = this->get_sectors_per_track(f, track); + int track_size = compute_track_size(f, track); + UINT8 sectdata[40*256] = { 0 }; + desc_s sectors[40]; + int offset = get_image_offset(f, head, track); + + build_sector_description(f, sectdata, 0, 0, sectors, sector_count); + extract_sectors(image, f, sectors, track, head, sector_count); + io_generic_write(io, sectdata, offset, track_size); + } + } + + return true; +} + +void d64_format::extract_sectors(floppy_image *image, const format &f, desc_s *sdesc, int track, int head, int sector_count) { - return false; + UINT8 bitstream[500000/8]; + UINT8 sectdata[50000]; + desc_xs sectors[256]; + int physical_track = this->get_physical_track(f, head, track); + int cell_size = this->get_cell_size(f, track); + int track_size; + + // Extract the sectors + generate_bitstream_from_track(physical_track, head, cell_size, bitstream, track_size, image); + extract_sectors_from_bitstream_gcr5(bitstream, track_size, sectors, sectdata, sizeof(sectdata), head, f.track_count); + + for(int i=0; i<sector_count; i++) { + desc_s &ds = sdesc[i]; + desc_xs &xs = sectors[ds.sector_id]; + if(!xs.data) + memset((void *)ds.data, 0, ds.size); + else if(xs.size < ds.size) { + memcpy((void *)ds.data, xs.data, xs.size); + memset((UINT8 *)ds.data + xs.size, 0, xs.size - ds.size); + } else + memcpy((void *)ds.data, xs.data, ds.size); + } } const floppy_format_type FLOPPY_D64_FORMAT = &floppy_image_format_creator<d64_format>; diff --git a/src/lib/formats/d64_dsk.h b/src/lib/formats/d64_dsk.h index 573bbab4cbc..558d4ebf1c2 100644 --- a/src/lib/formats/d64_dsk.h +++ b/src/lib/formats/d64_dsk.h @@ -36,7 +36,8 @@ public: virtual int identify(io_generic *io, UINT32 form_factor); virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image); - virtual bool supports_save() const; + virtual bool save(io_generic *io, floppy_image *image); + virtual bool supports_save() const { return true; } protected: enum @@ -63,9 +64,13 @@ protected: virtual int get_sectors_per_track(const format &f, int track); virtual int get_disk_id_offset(const format &f); void get_disk_id(const format &f, io_generic *io, UINT8 &id1, UINT8 &id2); + virtual int get_image_offset(const format &f, int head, int track); + int compute_track_size(const format &f, int track); + virtual int get_gap2(const format &f, int head, int track) { return f.gap_2; } virtual floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count, UINT8 id1, UINT8 id2, int gap_2); void build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, UINT32 error_offs, desc_s *sectors, int sector_count) const; virtual void fix_end_gap(floppy_image_format_t::desc_e* desc, int remaining_size); + void extract_sectors(floppy_image *image, const format &f, desc_s *sdesc, int track, int head, int sector_count); static const format file_formats[]; diff --git a/src/lib/formats/d67_dsk.c b/src/lib/formats/d67_dsk.c deleted file mode 100644 index b512e55b694..00000000000 --- a/src/lib/formats/d67_dsk.c +++ /dev/null @@ -1,56 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************* - - formats/d67_dsk.c - - Commodore 2040 sector disk image format - -*********************************************************************/ - -#include <assert.h> - -#include "formats/d67_dsk.h" - -d67_format::d67_format() : d64_format(file_formats) -{ -} - -const char *d67_format::name() const -{ - return "d67"; -} - -const char *d67_format::description() const -{ - return "Commodore 2040 disk image"; -} - -const char *d67_format::extensions() const -{ - return "d67"; -} - -const d67_format::format d67_format::file_formats[] = { - { // d67, dos 1, 35 tracks, head 48 tpi, stepper 96 tpi - floppy_image::FF_525, floppy_image::SSSD, 690, 35, 1, 256, 9, 8 - }, - {} -}; - -const int d67_format::d67_sectors_per_track[] = -{ - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, // 1-17 - 20, 20, 20, 20, 20, 20, 20, // 18-24 - 18, 18, 18, 18, 18, 18, // 25-30 - 17, 17, 17, 17, 17, // 31-35 - 17, 17, 17, 17, 17, // 36-40 - 17, 17 // 41-42 -}; - -int d67_format::get_sectors_per_track(const format &f, int track) -{ - return d67_sectors_per_track[track]; -} - -const floppy_format_type FLOPPY_D67_FORMAT = &floppy_image_format_creator<d67_format>; diff --git a/src/lib/formats/d67_dsk.h b/src/lib/formats/d67_dsk.h deleted file mode 100644 index c28c1a4d37f..00000000000 --- a/src/lib/formats/d67_dsk.h +++ /dev/null @@ -1,36 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Curt Coder -/********************************************************************* - - formats/d67_dsk.h - - Commodore 2040 sector disk image format - -*********************************************************************/ - -#ifndef D67_DSK_H_ -#define D67_DSK_H_ - -#include "d64_dsk.h" - -class d67_format : public d64_format { -public: - d67_format(); - - virtual const char *name() const; - virtual const char *description() const; - virtual const char *extensions() const; - -protected: - virtual int get_sectors_per_track(const format &f, int track); - - static const format file_formats[]; - - static const int d67_sectors_per_track[]; -}; - -extern const floppy_format_type FLOPPY_D67_FORMAT; - - - -#endif diff --git a/src/lib/formats/flopimg.c b/src/lib/formats/flopimg.c index 0f17c7e3b4d..35ab1af359d 100644 --- a/src/lib/formats/flopimg.c +++ b/src/lib/formats/flopimg.c @@ -2366,6 +2366,16 @@ UINT8 floppy_image_format_t::sbyte_mfm_r(const UINT8 *bitstream, int &pos, int t return res; } +UINT8 floppy_image_format_t::sbyte_gcr5_r(const UINT8 *bitstream, int &pos, int track_size) +{ + UINT16 gcr = 0; + for(int i=0; i<10; i++) { + if(sbit_rp(bitstream, pos, track_size)) + gcr |= 0x200 >> i; + } + + return (gcr5bw_tb[gcr >> 5] << 4) | gcr5bw_tb[gcr & 0x1f]; +} void floppy_image_format_t::extract_sectors_from_bitstream_mfm_pc(const UINT8 *bitstream, int track_size, desc_xs *sectors, UINT8 *sectdata, int sectdata_size) { @@ -2801,3 +2811,147 @@ void floppy_image_format_t::build_pc_track_mfm(int track, int head, floppy_image generate_track_from_levels(track, head, track_data, 0, image); } + +void floppy_image_format_t::extract_sectors_from_bitstream_gcr5(const UINT8 *bitstream, int track_size, desc_xs *sectors, UINT8 *sectdata, int sectdata_size, int head, int tracks) +{ + memset(sectors, 0, 256*sizeof(desc_xs)); + + // Don't bother if it's just too small + if(track_size < 100) + return; + + // Start by detecting all id and data blocks + int hblk[100], dblk[100]; + int hblk_count = 0, dblk_count = 0; + + // Precharge the shift register to detect over-the-index stuff + UINT16 shift_reg = 0; + for(int i=0; i<16; i++) + if(sbit_r(bitstream, track_size-16+i)) + shift_reg |= 0x8000 >> i; + + // Scan the bitstream for sync marks and follow them to check for blocks + bool sync = false; + for(int i=0; i<track_size; i++) { + int bit = sbit_r(bitstream, i); + shift_reg = ((shift_reg << 1) | bit) & 0x3ff; + + if (sync && !bit) { + UINT8 id = sbyte_gcr5_r(bitstream, i, track_size); + + switch (id) { + case 0x08: + if(hblk_count < 100) + hblk[hblk_count++] = i-10; + break; + + case 0x07: + if(dblk_count < 100) + dblk[dblk_count++] = i-10; + break; + } + } + + sync = (shift_reg == 0x3ff); + } + + // Then extract the sectors + int sectdata_pos = 0; + for(int i=0; i<hblk_count; i++) { + int pos = hblk[i]; + ATTR_UNUSED UINT8 block_id = sbyte_gcr5_r(bitstream, pos, track_size); + UINT8 crc = sbyte_gcr5_r(bitstream, pos, track_size); + UINT8 sector = sbyte_gcr5_r(bitstream, pos, track_size); + UINT8 track = sbyte_gcr5_r(bitstream, pos, track_size); + UINT8 id2 = sbyte_gcr5_r(bitstream, pos, track_size); + UINT8 id1 = sbyte_gcr5_r(bitstream, pos, track_size); + + if (crc ^ sector ^ track ^ id2 ^ id1) { + // header crc mismatch + } + + pos = dblk[i]; + block_id = sbyte_gcr5_r(bitstream, pos, track_size); + + if (track > tracks) track -= tracks; + sectors[sector].track = track; + sectors[sector].head = head; + sectors[sector].size = 256; + sectors[sector].data = sectdata + sectdata_pos; + UINT8 data_crc = 0; + for(int j=0; j<sectors[sector].size; j++) { + UINT8 data = sbyte_gcr5_r(bitstream, pos, track_size); + data_crc ^= data; + sectdata[sectdata_pos++] = data; + } + data_crc ^= sbyte_gcr5_r(bitstream, pos, track_size); + if (data_crc) { + // data crc mismatch + } + } +} + +void floppy_image_format_t::extract_sectors_from_bitstream_victor_gcr5(const UINT8 *bitstream, int track_size, desc_xs *sectors, UINT8 *sectdata, int sectdata_size) +{ + memset(sectors, 0, 256*sizeof(desc_xs)); + + // Don't bother if it's just too small + if(track_size < 100) + return; + + // Start by detecting all id and data blocks + int hblk[100], dblk[100]; + int hblk_count = 0, dblk_count = 0; + + // Precharge the shift register to detect over-the-index stuff + UINT16 shift_reg = 0; + for(int i=0; i<16; i++) + if(sbit_r(bitstream, track_size-16+i)) + shift_reg |= 0x8000 >> i; + + // Scan the bitstream for sync marks and follow them to check for blocks + bool sync = false; + for(int i=0; i<track_size; i++) { + int bit = sbit_r(bitstream, i); + shift_reg = ((shift_reg << 1) | bit) & 0x3ff; + + if (sync && !bit) { + UINT8 id = sbyte_gcr5_r(bitstream, i, track_size); + + switch (id) { + case 0x07: + if(hblk_count < 100) + hblk[hblk_count++] = i-10; + break; + + case 0x08: + if(dblk_count < 100) + dblk[dblk_count++] = i-10; + break; + } + } + + sync = (shift_reg == 0x3ff); + } + + // Then extract the sectors + int sectdata_pos = 0; + for(int i=0; i<hblk_count; i++) { + int pos = hblk[i]; + ATTR_UNUSED UINT8 block_id = sbyte_gcr5_r(bitstream, pos, track_size); + UINT8 track = sbyte_gcr5_r(bitstream, pos, track_size); + UINT8 sector = sbyte_gcr5_r(bitstream, pos, track_size); + + pos = dblk[i]; + block_id = sbyte_gcr5_r(bitstream, pos, track_size); + + sectors[sector].track = track & 0x7f; + sectors[sector].head = BIT(track, 7); + sectors[sector].size = 512; + sectors[sector].data = sectdata + sectdata_pos; + for(int j=0; j<sectors[sector].size; j++) { + UINT8 data = sbyte_gcr5_r(bitstream, pos, track_size); + sectdata[sectdata_pos++] = data; + } + } +} diff --git a/src/lib/formats/flopimg.h b/src/lib/formats/flopimg.h index aaae76530ac..59b652643b6 100644 --- a/src/lib/formats/flopimg.h +++ b/src/lib/formats/flopimg.h @@ -471,6 +471,7 @@ protected: C1541 tr 18-24 3.50 300 3500 C1541 tr 25-30 3.75 300 3750 C1541 tr 31+ 4.00 300 4000 + 8" DD 1 360 1200 5.25" SD 4 300 4000 5.25" DD 2 300 2000 5.25" HD 1 360 1200 @@ -519,6 +520,10 @@ protected: void extract_sectors_from_bitstream_mfm_pc(const UINT8 *bitstream, int track_size, desc_xs *sectors, UINT8 *sectdata, int sectdata_size); //! PC-type sectors with FM encoding void extract_sectors_from_bitstream_fm_pc(const UINT8 *bitstream, int track_size, desc_xs *sectors, UINT8 *sectdata, int sectdata_size); + //! Commodore type sectors with GCR5 encoding + void extract_sectors_from_bitstream_gcr5(const UINT8 *bitstream, int track_size, desc_xs *sectors, UINT8 *sectdata, int sectdata_size, int head, int tracks); + //! Victor 9000 type sectors with GCR5 encoding + void extract_sectors_from_bitstream_victor_gcr5(const UINT8 *bitstream, int track_size, desc_xs *sectors, UINT8 *sectdata, int sectdata_size); //! @brief Get a geometry (including sectors) from an image. @@ -572,6 +577,7 @@ protected: void gcr6_decode(UINT8 e0, UINT8 e1, UINT8 e2, UINT8 e3, UINT8 &va, UINT8 &vb, UINT8 &vc); UINT8 sbyte_mfm_r(const UINT8 *bitstream, int &pos, int track_size); + UINT8 sbyte_gcr5_r(const UINT8 *bitstream, int &pos, int track_size); private: enum { CRC_NONE, CRC_AMIGA, CRC_CBM, CRC_CCITT, CRC_CCITT_FM, CRC_MACHEAD, CRC_FCS, CRC_VICTOR_HDR, CRC_VICTOR_DATA }; diff --git a/src/lib/formats/imd_dsk.c b/src/lib/formats/imd_dsk.c index 463b5b771d2..8600590c735 100644 --- a/src/lib/formats/imd_dsk.c +++ b/src/lib/formats/imd_dsk.c @@ -135,6 +135,91 @@ static floperr_t imd_read_indexed_sector(floppy_image_legacy *floppy, int head, return internal_imd_read_sector(floppy, head, track, sector, TRUE, buffer, buflen); } +static floperr_t imd_expand_file(floppy_image_legacy *floppy , UINT64 offset , size_t amount) +{ + if (amount == 0) { + return FLOPPY_ERROR_SUCCESS; + } + + UINT64 file_size = floppy_image_size(floppy); + + if (offset > file_size) { + return FLOPPY_ERROR_INTERNAL; + } + + UINT64 size_after_off = file_size - offset; + + if (size_after_off == 0) { + return FLOPPY_ERROR_SUCCESS; + } + + UINT8 *buffer = global_alloc_array(UINT8 , size_after_off); + + // Read the part of file after offset + floppy_image_read(floppy , buffer , offset , size_after_off); + + // Add zeroes + floppy_image_write_filler(floppy , 0 , offset , amount); + + // Write back the part of file after offset + floppy_image_write(floppy, buffer, offset + amount, size_after_off); + + global_free_array(buffer); + + // Update track offsets + struct imddsk_tag *tag = get_tag(floppy); + for (int track = 0; track < tag->tracks; track++) { + for (int head = 0; head < tag->heads; head++) { + UINT64 *track_off = &(tag->track_offsets[ (track << 1) + head ]); + if (*track_off >= offset) { + *track_off += amount; + } + } + } + + return FLOPPY_ERROR_SUCCESS; +} + +static floperr_t imd_write_indexed_sector(floppy_image_legacy *floppy, int head, int track, int sector_index, const void *buffer, size_t buflen, int ddam) +{ + UINT64 offset; + floperr_t err; + UINT8 header[1]; + + // take sector offset + err = get_offset(floppy, head, track, sector_index, TRUE, &offset); + if (err) + return err; + + floppy_image_read(floppy, header, offset, 1); + + switch (header[ 0 ]) { + case 0: + return FLOPPY_ERROR_SEEKERROR; + + default: + // Expand image file (from 1 byte to a whole sector) + err = imd_expand_file(floppy , offset , buflen - 1); + if (err) { + return err; + } + // Fall through! + + case 1: + case 3: + case 5: + case 7: + // Turn every kind of sector into type 1 (normal data) + header[ 0 ] = 1; + floppy_image_write(floppy, header, offset, 1); + // Write sector + floppy_image_write(floppy, buffer, offset + 1, buflen); + break; + } + + return FLOPPY_ERROR_SUCCESS; +} + static floperr_t imd_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length) { floperr_t err; @@ -266,6 +351,7 @@ FLOPPY_CONSTRUCT( imd_dsk_construct ) callbacks = floppy_callbacks(floppy); callbacks->read_sector = imd_read_sector; callbacks->read_indexed_sector = imd_read_indexed_sector; + callbacks->write_indexed_sector = imd_write_indexed_sector; callbacks->get_sector_length = imd_get_sector_length; callbacks->get_heads_per_disk = imd_get_heads_per_disk; callbacks->get_tracks_per_disk = imd_get_tracks_per_disk; diff --git a/src/lib/formats/victor9k_dsk.c b/src/lib/formats/victor9k_dsk.c index 7376b3208a7..21dc6397e8e 100644 --- a/src/lib/formats/victor9k_dsk.c +++ b/src/lib/formats/victor9k_dsk.c @@ -298,14 +298,28 @@ bool victor9k_format::load(io_generic *io, UINT32 form_factor, floppy_image *ima return true; } -bool victor9k_format::supports_save() const +int victor9k_format::get_rpm(int head, int track) { - return false; + return rpm[speed_zone[head][track]]; } -int victor9k_format::get_rpm(int head, int track) +int victor9k_format::get_image_offset(const format &f, int _head, int _track) { - return rpm[speed_zone[head][track]]; + int offset = 0; + if (_head) { + for (int track = 0; track < f.track_count; track++) { + offset += compute_track_size(f, _head, track); + } + } + for (int track = 0; track < _track; track++) { + offset += compute_track_size(f, _head, track); + } + return offset; +} + +int victor9k_format::compute_track_size(const format &f, int head, int track) +{ + return sectors_per_track[head][track] * f.sector_base_size; } const victor9k_format::format victor9k_format::formats[] = { @@ -376,4 +390,49 @@ const int victor9k_format::rpm[9] = 252, 267, 283, 300, 320, 342, 368, 401, 417 }; +bool victor9k_format::save(io_generic *io, floppy_image *image) +{ + const format &f = formats[0]; + + for(int head=0; head < f.head_count; head++) { + for(int track=0; track < f.track_count; track++) { + int sector_count = sectors_per_track[head][track]; + int track_size = compute_track_size(f, head, track); + UINT8 sectdata[40*512]; + desc_s sectors[40]; + int offset = get_image_offset(f, head, track); + + build_sector_description(f, sectdata, 0, sectors, sector_count); + extract_sectors(image, f, sectors, track, head, sector_count); + io_generic_write(io, sectdata, offset, track_size); + } + } + + return true; +} + +void victor9k_format::extract_sectors(floppy_image *image, const format &f, desc_s *sdesc, int track, int head, int sector_count) +{ + UINT8 bitstream[500000/8]; + UINT8 sectdata[50000]; + desc_xs sectors[256]; + int track_size; + + // Extract the sectors + generate_bitstream_from_track(track, head, cell_size[speed_zone[head][track]], bitstream, track_size, image); + extract_sectors_from_bitstream_victor_gcr5(bitstream, track_size, sectors, sectdata, sizeof(sectdata)); + + for(int i=0; i<sector_count; i++) { + desc_s &ds = sdesc[i]; + desc_xs &xs = sectors[ds.sector_id]; + if(!xs.data) + memset((void *)ds.data, 0, ds.size); + else if(xs.size < ds.size) { + memcpy((void *)ds.data, xs.data, xs.size); + memset((UINT8 *)ds.data + xs.size, 0, xs.size - ds.size); + } else + memcpy((void *)ds.data, xs.data, ds.size); + } +} + const floppy_format_type FLOPPY_VICTOR_9000_FORMAT = &floppy_image_format_creator<victor9k_format>; diff --git a/src/lib/formats/victor9k_dsk.h b/src/lib/formats/victor9k_dsk.h index 22f43fa7e3b..1564f1474f7 100644 --- a/src/lib/formats/victor9k_dsk.h +++ b/src/lib/formats/victor9k_dsk.h @@ -31,13 +31,10 @@ public: virtual const char *description() const; virtual const char *extensions() const; - int find_size(io_generic *io, UINT32 form_factor); virtual int identify(io_generic *io, UINT32 form_factor); - void log_boot_sector(UINT8 *data); - floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count); - void build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, desc_s *sectors, int sector_count) const; virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image); - virtual bool supports_save() const; + virtual bool save(io_generic *io, floppy_image *image); + virtual bool supports_save() const { return true; } static int get_rpm(int head, int track); @@ -48,6 +45,14 @@ protected: static const int sectors_per_track[2][80]; static const int speed_zone[2][80]; static const int rpm[9]; + + int find_size(io_generic *io, UINT32 form_factor); + void log_boot_sector(UINT8 *data); + floppy_image_format_t::desc_e* get_sector_desc(const format &f, int ¤t_size, int sector_count); + void build_sector_description(const format &f, UINT8 *sectdata, UINT32 sect_offs, desc_s *sectors, int sector_count) const; + int get_image_offset(const format &f, int head, int track); + int compute_track_size(const format &f, int head, int track); + void extract_sectors(floppy_image *image, const format &f, desc_s *sdesc, int track, int head, int sector_count); }; extern const floppy_format_type FLOPPY_VICTOR_9000_FORMAT; diff --git a/src/lib/util/astring.c b/src/lib/util/astring.c deleted file mode 100644 index 7f2b3411adf..00000000000 --- a/src/lib/util/astring.c +++ /dev/null @@ -1,483 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -/*************************************************************************** - - astring.c - - Allocated string manipulation functions. - -****************************************************************************/ - -#include "astring.h" -#include "osdcore.h" - -#include <string.h> -#include <stdarg.h> -#include <stdlib.h> -#include <ctype.h> -#include <new> - - -/*************************************************************************** - GLOBAL VARIABLES -***************************************************************************/ - -static const astring dummy_astring; - - - -//************************************************************************** -// INLINE FUNCTIONS -//************************************************************************** - -//------------------------------------------------- -// ensure_room - ensure we have room for a -// given string, or else reallocate our buffer -//------------------------------------------------- - -bool astring::ensure_room(int length) -{ - // always fail to expand the dummy - if (this == &dummy_astring) - return false; - - // if we have the room, do nothing - if (m_alloclen >= length + 1) - return true; - - // allocate a new buffer with some slop - int alloclen = length + 256; - char *newbuf = new char[alloclen]; - - // swap in the new buffer and free the old one - char *oldbuf = (m_text == m_smallbuf) ? NULL : m_text; - m_text = strcpy(newbuf, m_text); - m_len = strlen(m_text); - m_alloclen = alloclen; - delete[] oldbuf; - - return true; -} - - -//------------------------------------------------- -// safe_string_base - return a "safe" string -// base for a given start index -//------------------------------------------------- - -inline char *astring::safe_string_base(int start) const -{ - int max = len(); - return (start >= 0 && start < max) ? m_text + start : m_text + max; -} - - -//------------------------------------------------- -// normalize_substr - normalize substr parameters -//------------------------------------------------- - -inline void astring::normalize_substr(int &start, int &count, int length) const -{ - // limit start - if (start < 0) - start = 0; - else if (start > length) - start = length; - - // update count - if (count == -1 || start + count > length) - count = length - start; -} - - - -//************************************************************************** -// ASTRING ALLOCATION -//************************************************************************** - -//------------------------------------------------- -// init - constructor helper -//------------------------------------------------- - -astring &astring::init() -{ - // initialize ourselves to point to the internal buffer - m_text = m_smallbuf; - m_alloclen = ARRAY_LENGTH(m_smallbuf); - m_smallbuf[0] = 0; - m_len = 0; - return *this; -} - - -//------------------------------------------------- -// ~astring - destructor -//------------------------------------------------- - -astring::~astring() -{ - if (m_text != m_smallbuf) - delete[] m_text; -} - - - -/*************************************************************************** - INLINE ASTRING CHANGES -***************************************************************************/ - -//------------------------------------------------- -// cpy - copy a character array into an astring -//------------------------------------------------- - -astring &astring::cpy(const char *src, int count) -{ - // make room; if we fail or if we are the dummy, do nothing - if (!ensure_room(count)) - return *this; - - // copy the raw data and NULL-terminate - if (count > 0 && m_text != src) - memcpy(m_text, src, count); - m_text[count] = 0; - m_len = count; - return *this; -} - - -//------------------------------------------------- -// cpysubstr - copy a substring of one string to -// another -//------------------------------------------------- - -astring &astring::cpysubstr(const astring &src, int start, int count) -{ - normalize_substr(start, count, src.len()); - return cpy(src.m_text + start, count); -} - - -//------------------------------------------------- -// ins - insert a character array into an astring -//------------------------------------------------- - -astring &astring::ins(int insbefore, const char *src, int count) -{ - // make room; if we fail or if we are the dummy, do nothing - int dstlength = len(); - if (!ensure_room(dstlength + count)) - return *this; - - // adjust insbefore to be logical - if (insbefore < 0 || insbefore > dstlength) - insbefore = dstlength; - - // copy the data an NULL-terminate - if (insbefore < dstlength) - memmove(m_text + insbefore + count, m_text + insbefore, dstlength - insbefore); - memcpy(m_text + insbefore, src, count); - m_text[dstlength + count] = 0; - m_len = dstlength + count; - return *this; -} - - -//------------------------------------------------- -// inssubstr - insert a substring of one string -// into another -//------------------------------------------------- - -astring &astring::inssubstr(int insbefore, const astring &src, int start, int count) -{ - normalize_substr(start, count, src.len()); - return ins(insbefore, src.m_text + start, count); -} - - -//------------------------------------------------- -// substr - extract a substring of ourself, -// removing everything else -//------------------------------------------------- - -astring &astring::substr(int start, int count) -{ - // ignore attempts to do this on the dummy - if (this == &dummy_astring) - return *this; - - // normalize parameters - normalize_substr(start, count, len()); - - // move the data and NULL-terminate - if (count > 0 && start > 0) - memmove(m_text, m_text + start, count); - m_text[count] = 0; - m_len = count; - return *this; -} - - -//------------------------------------------------- -// del - delete a substring of ourself, keeping -// everything else -//------------------------------------------------- - -astring &astring::del(int start, int count) -{ - // ignore attempts to do this on the dummy - if (this == &dummy_astring) - return *this; - - // normalize parameters - int strlength = len(); - normalize_substr(start, count, strlength); - - // move the data and NULL-terminate - if (count > 0) - memmove(m_text + start, m_text + start + count, strlength - (start + count)); - m_text[strlength - count] = 0; - m_len = strlength - count; - return *this; -} - - -//------------------------------------------------- -// vprintf - vprintf text into an astring -//-------------------------------------------------*/ - -int astring::vprintf(const char *format, va_list args) -{ - // sprintf into the temporary buffer - char tempbuf[4096]; - int result = vsprintf(tempbuf, format, args); - - // set the result - cpy(tempbuf); - return result; -} - - -//------------------------------------------------- -// catprintf - formatted vprintf to the end of -// an astring -//------------------------------------------------- - -int astring::catvprintf(const char *format, va_list args) -{ - // sprintf into the temporary buffer - char tempbuf[4096]; - int result = vsprintf(tempbuf, format, args); - - // append the result - cat(tempbuf); - return result; -} - - - -/*************************************************************************** - ASTRING QUERIES -***************************************************************************/ - -//------------------------------------------------- -// cmp - compare a character array to an astring -//------------------------------------------------- - -int astring::cmp(const char *str2, int count) const -{ - // loop while equal until we hit the end of strings - int index; - for (index = 0; index < count; index++) - if (m_text[index] == 0 || m_text[index] != str2[index]) - break; - - // determine the final result - if (index < count) - return m_text[index] - str2[index]; - if (m_text[index] == 0) - return 0; - return 1; -} - - -//------------------------------------------------- -// cmpsubstr - compare a substring to an astring -//------------------------------------------------- - -int astring::cmpsubstr(const astring &str2, int start, int count) const -{ - normalize_substr(start, count, str2.len()); - return cmp(str2.m_text + start, count); -} - - -//------------------------------------------------- -// icmp - compare a character array to an astring -//------------------------------------------------- - -int astring::icmp(const char *str2, int count) const -{ - // loop while equal until we hit the end of strings - int index; - for (index = 0; index < count; index++) - if (m_text[index] == 0 || tolower(m_text[index]) != tolower(str2[index])) - break; - - // determine the final result - if (index < count) - return tolower(m_text[index]) - tolower(str2[index]); - if (m_text[index] == 0) - return 0; - return 1; -} - - -//------------------------------------------------- -// icmpsubstr - compare a substring to an astring -//------------------------------------------------- - -int astring::icmpsubstr(const astring &str2, int start, int count) const -{ - normalize_substr(start, count, str2.len()); - return icmp(str2.m_text + start, count); -} - - -//------------------------------------------------- -// chr - return the index of a character in an -// astring -//------------------------------------------------- - -int astring::chr(int start, int ch) const -{ - char *result = strchr(safe_string_base(start), ch); - return (result != NULL) ? (result - m_text) : -1; -} - - -//------------------------------------------------- -// rchr - return the index of a character in an -// astring, searching from the end -//------------------------------------------------- - -int astring::rchr(int start, int ch) const -{ - char *result = strrchr(safe_string_base(start), ch); - return (result != NULL) ? (result - m_text) : -1; -} - - -//------------------------------------------------- -// find - find a C string in an astring -//-------------------------------------------------*/ - -int astring::find(int start, const char *search) const -{ - char *result = strstr(safe_string_base(start), search); - return (result != NULL) ? (result - m_text) : -1; -} - - -//------------------------------------------------- -// replacec - search in an astring for a C string, -// replacing all instances with another C string -// and returning the number of matches -//------------------------------------------------- - -int astring::replace(int start, const char *search, const char *replace) -{ - int searchlen = strlen(search); - int replacelen = strlen(replace); - int matches = 0; - - for (int curindex = find(start, search); curindex != -1; curindex = find(curindex + replacelen, search)) - { - matches++; - del(curindex, searchlen).ins(curindex, replace); - } - return matches; -} - - - -//************************************************************************** -// ASTRING UTILITIES -//************************************************************************** - -//------------------------------------------------- -// delchr - delete all instances of 'ch' -//------------------------------------------------- - -astring &astring::delchr(int ch) -{ - // simple deletion - char *dst = m_text; - for (char *src = m_text; *src != 0; src++) - if (*src != ch) - *dst++ = *src; - *dst = 0; - m_len = strlen(m_text); - return *this; -} - - -//------------------------------------------------- -// replacechr - replace all instances of 'ch' -// with 'newch' -//------------------------------------------------- - -astring &astring::replacechr(int ch, int newch) -{ - // simple replacement - for (char *text = m_text; *text != 0; text++) - if (*text == ch) - *text = newch; - return *this; -} - - -//------------------------------------------------- -// makeupper - convert string to all upper-case -//------------------------------------------------- - -astring &astring::makeupper() -{ - // just makeupper() on all characters - for (char *text = m_text; *text != 0; text++) - *text = toupper((UINT8)*text); - return *this; -} - - -//------------------------------------------------- -// makelower - convert string to all lower-case -//------------------------------------------------- - -astring &astring::makelower() -{ - // just tolower() on all characters - for (char *text = m_text; *text != 0; text++) - *text = tolower((UINT8)*text); - return *this; -} - - -//------------------------------------------------- -// trimspace - remove all space characters from -// beginning/end -//------------------------------------------------- - -astring &astring::trimspace() -{ - // first remove stuff from the end - for (char *ptr = m_text + len() - 1; ptr >= m_text && (!(*ptr & 0x80) && isspace(UINT8(*ptr))); ptr--) - *ptr = 0; - - // then count how much to remove from the beginning - char *ptr; - for (ptr = m_text; *ptr != 0 && (!(*ptr & 0x80) && isspace(UINT8(*ptr))); ptr++) ; - if (ptr > m_text) - substr(ptr - m_text); - m_len = strlen(m_text); - return *this; -} diff --git a/src/lib/util/astring.h b/src/lib/util/astring.h deleted file mode 100644 index 089ee585dae..00000000000 --- a/src/lib/util/astring.h +++ /dev/null @@ -1,156 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Aaron Giles -/*************************************************************************** - - astring.h - - Allocated string manipulation functions. - -***************************************************************************/ - -#pragma once - -#ifndef __ASTRING_H__ -#define __ASTRING_H__ - -#include <stdarg.h> -#include <ctype.h> -#include "osdcomm.h" - - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// basic allocated string class -class astring -{ -public: - // simple construction/destruction - astring() { init(); } - ~astring(); - - // construction with copy - astring(const char *string) { init(); if(string) cpy(string); } - astring(const char *string, int length) { init().cpy(string, length); } - astring(const astring &string) { init().cpy(string); } - astring(const astring &string, int start, int count = -1) { init().cpysubstr(string, start, count); } - - // assignment operators - astring &operator=(const char *string) { return cpy(string); } - astring &operator=(const astring &string) { return cpy(string); } - - // concatenation operators - astring& operator+=(const astring &string) { return cat(string); } - friend astring operator+(const astring &lhs, const astring &rhs) { return astring(lhs) += rhs; } - friend astring operator+(const astring &lhs, const char *rhs) { return astring(lhs) += rhs; } - friend astring operator+(const char *lhs, const astring &rhs) { return astring(lhs) += rhs; } - - // comparison operators - bool operator==(const char *string) const { return (cmp(string) == 0); } - bool operator==(const astring &string) const { return (cmp(string) == 0); } - bool operator!=(const char *string) const { return (cmp(string) != 0); } - bool operator!=(const astring &string) const { return (cmp(string) != 0); } - bool operator<(const char *string) const { return (cmp(string) < 0); } - bool operator<(const astring &string) const { return (cmp(string) < 0); } - bool operator<=(const char *string) const { return (cmp(string) <= 0); } - bool operator<=(const astring &string) const { return (cmp(string) <= 0); } - bool operator>(const char *string) const { return (cmp(string) > 0); } - bool operator>(const astring &string) const { return (cmp(string) > 0); } - bool operator>=(const char *string) const { return (cmp(string) >= 0); } - bool operator>=(const astring &string) const { return (cmp(string) >= 0); } - - // character access operators - char operator[](int index) const { return (index < len()) ? m_text[index] : 0; } - - // implicit boolean conversion operators - operator bool() { return m_text[0] != 0; } - operator bool() const { return m_text[0] != 0; } - - // C string conversion operators and helpers - const char *c_str() const { return m_text; } - - // buffer management - astring &reset() { return cpy(""); } - astring &expand(int length) { ensure_room(length); return *this; } - - // length query - int len() const { return m_len; } - - // copy helpers - astring &cpy(const char *src, int count); - astring &cpysubstr(const astring &src, int start, int count = -1); - astring &cpy(const astring &src) { return cpy(src.c_str(), src.len()); } - astring &cpy(const char *src) { return cpy(src, strlen(src)); } - - // insertion helpers - astring &ins(int insbefore, const char *src, int count); - astring &inssubstr(int insbefore, const astring &src, int start, int count = -1); - astring &ins(int insbefore, const astring &src) { return ins(insbefore, src.c_str(), src.len()); } - astring &ins(int insbefore, const char *src) { return ins(insbefore, src, strlen(src)); } - - // concatenation helpers (== insert at end) - astring &cat(const char *src, int count) { return ins(-1, src, count); } - astring &catsubstr(const astring &src, int start, int count = -1) { return inssubstr(-1, src, start, count); } - astring &cat(const astring &src) { return ins(-1, src.c_str(), src.len()); } - astring &cat(const char *src) { return ins(-1, src, strlen(src)); } - astring &cat(char ch) { return ins(-1, &ch, 1); } - - // substring helpers - astring &substr(int start, int count = -1); - astring &del(int start, int count = -1); - - // formatted string helpers - int vprintf(const char *format, va_list args); - int catvprintf(const char *format, va_list args); - int printf(const char *format, ...) ATTR_PRINTF(2,3) { va_list ap; va_start(ap, format); int result = this->vprintf(format, ap); va_end(ap); return result; } - int catprintf(const char *format, ...) ATTR_PRINTF(2,3) { va_list ap; va_start(ap, format); int result = catvprintf(format, ap); va_end(ap); return result; } - astring &format(const char *format, ...) ATTR_PRINTF(2,3) { va_list ap; va_start(ap, format); this->vprintf(format, ap); va_end(ap); return *this; } - astring &catformat(const char *format, ...) ATTR_PRINTF(2,3) { va_list ap; va_start(ap, format); catvprintf(format, ap); va_end(ap); return *this; } - - // comparison helpers - int cmp(const char *str2, int count) const; - int cmpsubstr(const astring &str2, int start, int count = -1) const; - int cmp(const astring &str2) const { return cmp(str2.c_str(), str2.len()); } - int cmp(const char *str2) const { return cmp(str2, strlen(str2)); } - - // case-insensitive comparison helpers - int icmp(const char *str2, int count) const; - int icmpsubstr(const astring &str2, int start, int count = -1) const; - int icmp(const astring &str2) const { return icmp(str2.c_str(), str2.len()); } - int icmp(const char *str2) const { return icmp(str2, strlen(str2)); } - - // character searching helpers - int chr(int start, int ch) const; - int rchr(int start, int ch) const; - - // string searching/replacing helpers - int find(int start, const char *search) const; - int find(const char *search) const { return find(0, search); } - int replace(int start, const char *search, const char *replace); - int replace(const char *search, const char *_replace) { return replace(0, search, _replace); } - - // misc utilities - astring &delchr(int ch); - astring &replacechr(int ch, int newch); - astring &makeupper(); - astring &makelower(); - astring &trimspace(); - -private: - // internal helpers - astring &init(); - char *safe_string_base(int start) const; - bool ensure_room(int length); - void normalize_substr(int &start, int &count, int length) const; - - // internal state - char * m_text; - int m_alloclen; - char m_smallbuf[64]; - int m_len; -}; - - -#endif /* __ASTRING_H__ */ diff --git a/src/lib/util/cdrom.c b/src/lib/util/cdrom.c index ce9a0e7b130..6655418583a 100644 --- a/src/lib/util/cdrom.c +++ b/src/lib/util/cdrom.c @@ -811,7 +811,7 @@ const char *cdrom_get_subtype_string(UINT32 subtype) chd_error cdrom_parse_metadata(chd_file *chd, cdrom_toc *toc) { - astring metadata; + std::string metadata; chd_error err; int i; @@ -983,7 +983,7 @@ chd_error cdrom_write_metadata(chd_file *chd, const cdrom_toc *toc) /* write the metadata */ for (i = 0; i < toc->numtrks; i++) { - astring metadata; + std::string metadata; if (!(toc->flags & CD_FLAG_GDROM)) { char submode[32]; @@ -998,7 +998,7 @@ chd_error cdrom_write_metadata(chd_file *chd, const cdrom_toc *toc) strcpy(submode, cdrom_get_type_string(toc->tracks[i].pgtype)); } - metadata.format(CDROM_TRACK_METADATA2_FORMAT, i + 1, cdrom_get_type_string(toc->tracks[i].trktype), + strprintf(metadata, CDROM_TRACK_METADATA2_FORMAT, i + 1, cdrom_get_type_string(toc->tracks[i].trktype), cdrom_get_subtype_string(toc->tracks[i].subtype), toc->tracks[i].frames, toc->tracks[i].pregap, submode, cdrom_get_subtype_string(toc->tracks[i].pgsub), toc->tracks[i].postgap); @@ -1006,7 +1006,7 @@ chd_error cdrom_write_metadata(chd_file *chd, const cdrom_toc *toc) } else { - metadata.format(GDROM_TRACK_METADATA_FORMAT, i + 1, cdrom_get_type_string(toc->tracks[i].trktype), + strprintf(metadata, GDROM_TRACK_METADATA_FORMAT, i + 1, cdrom_get_type_string(toc->tracks[i].trktype), cdrom_get_subtype_string(toc->tracks[i].subtype), toc->tracks[i].frames, toc->tracks[i].padframes, toc->tracks[i].pregap, cdrom_get_type_string(toc->tracks[i].pgtype), cdrom_get_subtype_string(toc->tracks[i].pgsub), toc->tracks[i].postgap); diff --git a/src/lib/util/chd.c b/src/lib/util/chd.c index 9c5674e7559..3dd088c0121 100644 --- a/src/lib/util/chd.c +++ b/src/lib/util/chd.c @@ -1039,7 +1039,7 @@ chd_error chd_file::write_bytes(UINT64 offset, const void *buffer, UINT32 bytes) // of the given type //------------------------------------------------- -chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, astring &output) +chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::string &output) { // wrap this for clean reporting try @@ -1054,7 +1054,7 @@ chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex char* metabuf = new char[metaentry.length+1]; memset(metabuf, 0x00, metaentry.length+1); file_read(metaentry.offset + METADATA_HEADER_SIZE, metabuf, metaentry.length); - output.cpy(metabuf); + output.assign(metabuf); delete[] metabuf; return CHDERR_NONE; } @@ -1409,7 +1409,7 @@ const char *chd_file::error_string(chd_error err) UINT32 chd_file::guess_unitbytes() { // look for hard disk metadata; if found, then the unit size == sector size - astring metadata; + std::string metadata; int i0, i1, i2, i3; if (read_metadata(HARD_DISK_METADATA_TAG, 0, metadata) == CHDERR_NONE && sscanf(metadata.c_str(), HARD_DISK_METADATA_FORMAT, &i0, &i1, &i2, &i3) == 4) return i3; diff --git a/src/lib/util/chd.h b/src/lib/util/chd.h index 5062ca9c23a..d767c0889e0 100644 --- a/src/lib/util/chd.h +++ b/src/lib/util/chd.h @@ -15,7 +15,8 @@ #include "osdcore.h" #include "coretmpl.h" -#include "astring.h" +#include "corestr.h" +#include <string> #include "bitmap.h" #include "corefile.h" #include "hashing.h" @@ -347,12 +348,12 @@ public: chd_error write_bytes(UINT64 offset, const void *buffer, UINT32 bytes); // metadata management - chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, astring &output); + chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, std::string &output); chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output); chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, void *output, UINT32 outputlen, UINT32 &resultlen); chd_error read_metadata(chd_metadata_tag searchtag, UINT32 searchindex, dynamic_buffer &output, chd_metadata_tag &resulttag, UINT8 &resultflags); chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const void *inputbuf, UINT32 inputlen, UINT8 flags = CHD_MDFLAGS_CHECKSUM); - chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const astring &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, input.c_str(), input.len() + 1, flags); } + chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const std::string &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, input.c_str(), input.length() + 1, flags); } chd_error write_metadata(chd_metadata_tag metatag, UINT32 metaindex, const dynamic_buffer &input, UINT8 flags = CHD_MDFLAGS_CHECKSUM) { return write_metadata(metatag, metaindex, &input[0], input.size(), flags); } chd_error delete_metadata(chd_metadata_tag metatag, UINT32 metaindex); chd_error clone_all_metadata(chd_file &source); diff --git a/src/lib/util/chdcd.c b/src/lib/util/chdcd.c index 0720a6b9aa0..992c95bfeae 100644 --- a/src/lib/util/chdcd.c +++ b/src/lib/util/chdcd.c @@ -38,13 +38,13 @@ static char linebuffer[512]; IMPLEMENTATION ***************************************************************************/ -static astring get_file_path(astring &path) +static std::string get_file_path(std::string &path) { - int pos = path.rchr( 0, '\\'); + int pos = path.find_last_of('\\'); if (pos!=-1) { path = path.substr(0,pos+1); } else { - pos = path.rchr( 0, '/'); + pos = path.find_last_of('/'); path = path.substr(0,pos+1); } return path; @@ -360,7 +360,7 @@ chd_error chdcd_parse_nero(const char *tocfname, cdrom_toc &outtoc, chdcd_track_ UINT32 chain_offs, chunk_size; int done = 0; - astring path = astring(tocfname); + std::string path = std::string(tocfname); infile = fopen(tocfname, "rb"); path = get_file_path(path); @@ -437,7 +437,7 @@ chd_error chdcd_parse_nero(const char *tocfname, cdrom_toc &outtoc, chdcd_track_ track_end = read_uint64(infile); // printf("Track %d: sector size %d mode %x index0 %llx index1 %llx track_end %llx (pregap %d sectors, length %d sectors)\n", track, size, mode, index0, index1, track_end, (UINT32)(index1-index0)/size, (UINT32)(track_end-index1)/size); - outinfo.track[track-1].fname.cpy(tocfname); + outinfo.track[track-1].fname.assign(tocfname); outinfo.track[track-1].offset = offset + (UINT32)(index1-index0); outinfo.track[track-1].idx0offs = 0; outinfo.track[track-1].idx1offs = 0; @@ -530,7 +530,7 @@ chd_error chdcd_parse_nero(const char *tocfname, cdrom_toc &outtoc, chdcd_track_ chd_error chdcd_parse_iso(const char *tocfname, cdrom_toc &outtoc, chdcd_track_input_info &outinfo) { FILE *infile; - astring path = astring(tocfname); + std::string path = std::string(tocfname); infile = fopen(tocfname, "rb"); path = get_file_path(path); @@ -597,7 +597,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc &outtoc, chdcd_ FILE *infile; int i, numtracks; - astring path = astring(tocfname); + std::string path = std::string(tocfname); infile = fopen(tocfname, "rt"); path = get_file_path(path); @@ -663,7 +663,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc &outtoc, chdcd_ outinfo.track[trknum].swap = true; } - astring name; + std::string name; tok=strtok(NULL," "); name = tok; @@ -675,9 +675,9 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc &outtoc, chdcd_ name += tok; } } while(tok!=NULL && (strrchr(tok,'"')-tok !=(strlen(tok)-1))); - name = name.delchr('"'); + strdelchr(name,'"'); } - outinfo.track[trknum].fname.cpy(path).cat(name); + outinfo.track[trknum].fname.assign(path).append(name); sz = get_file_size(outinfo.track[trknum].fname.c_str()); @@ -717,9 +717,9 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i FILE *infile; int i, trknum; static char token[512]; - astring lastfname; + std::string lastfname; UINT32 wavlen, wavoffs; - astring path = astring(tocfname); + std::string path = std::string(tocfname); infile = fopen(tocfname, "rt"); path = get_file_path(path); @@ -753,7 +753,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i TOKENIZE /* keep the filename */ - lastfname.cpy(path).cat(token); + lastfname.assign(path).append(token); /* get the file type */ TOKENIZE @@ -810,7 +810,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i outinfo.track[trknum].idx0offs = -1; outinfo.track[trknum].idx1offs = 0; - outinfo.track[trknum].fname.cpy(lastfname); // default filename to the last one + outinfo.track[trknum].fname.assign(lastfname); // default filename to the last one // printf("trk %d: fname %s offset %d\n", trknum, outinfo.track[trknum].fname.c_str(), outinfo.track[trknum].offset); @@ -925,7 +925,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i if (trknum == (outtoc.numtrks-1)) { /* if we have the same filename as the last track, do it that way */ - if (trknum != 0 && outinfo.track[trknum].fname == outinfo.track[trknum-1].fname) + if (trknum != 0 && (outinfo.track[trknum].fname.compare(outinfo.track[trknum-1].fname)==0)) { tlen = get_file_size(outinfo.track[trknum].fname.c_str()); if (tlen == 0) @@ -952,7 +952,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i else { /* if we have the same filename as the next track, do it that way */ - if (outinfo.track[trknum].fname == outinfo.track[trknum+1].fname) + if (outinfo.track[trknum].fname.compare(outinfo.track[trknum+1].fname)==0) { outtoc.tracks[trknum].frames = outinfo.track[trknum+1].idx0offs - outinfo.track[trknum].idx0offs; @@ -1028,7 +1028,7 @@ chd_error chdcd_parse_toc(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i return chdcd_parse_iso(tocfname, outtoc, outinfo); } - astring path = astring(tocfname); + std::string path = std::string(tocfname); infile = fopen(tocfname, "rt"); path = get_file_path(path); @@ -1064,7 +1064,7 @@ chd_error chdcd_parse_toc(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i TOKENIZE /* keep the filename */ - outinfo.track[trknum].fname.cpy(path).cat(token); + outinfo.track[trknum].fname.assign(path).append(token); /* get either the offset or the length */ TOKENIZE diff --git a/src/lib/util/chdcd.h b/src/lib/util/chdcd.h index d32fc6c0c73..b0f3623ce61 100644 --- a/src/lib/util/chdcd.h +++ b/src/lib/util/chdcd.h @@ -17,9 +17,9 @@ struct chdcd_track_input_entry { chdcd_track_input_entry() { reset(); } - void reset() { fname.reset(); offset = idx0offs = idx1offs = 0; swap = false; } + void reset() { fname.clear(); offset = idx0offs = idx1offs = 0; swap = false; } - astring fname; // filename for each track + std::string fname; // filename for each track UINT32 offset; // offset in the data file for each track bool swap; // data needs to be byte swapped UINT32 idx0offs; diff --git a/src/lib/util/chdcodec.c b/src/lib/util/chdcodec.c index df253489f7e..3a7781fced8 100644 --- a/src/lib/util/chdcodec.c +++ b/src/lib/util/chdcodec.c @@ -1619,7 +1619,7 @@ UINT32 chd_avhuff_compressor::compress(const UINT8 *src, UINT32 srclen, UINT8 *d void chd_avhuff_compressor::postinit() { // get the metadata - astring metadata; + std::string metadata; chd_error err = chd().read_metadata(AV_METADATA_TAG, 0, metadata); if (err != CHDERR_NONE) throw err; diff --git a/src/lib/util/corefile.c b/src/lib/util/corefile.c index 491c35cacbf..4ada0f36aae 100644 --- a/src/lib/util/corefile.c +++ b/src/lib/util/corefile.c @@ -888,7 +888,7 @@ int CLIB_DECL core_fprintf(core_file *f, const char *fmt, ...) assumptions about path separators -------------------------------------------------*/ -astring &core_filename_extract_base(astring &result, const char *name, bool strip_extension) +std::string &core_filename_extract_base(std::string &result, const char *name, bool strip_extension) { /* find the start of the name */ const char *start = name + strlen(name); @@ -896,11 +896,11 @@ astring &core_filename_extract_base(astring &result, const char *name, bool stri start--; /* copy the rest into an astring */ - result.cpy(start); + result.assign(start); /* chop the extension if present */ if (strip_extension) - result.substr(0, result.rchr(0, '.')); + result = result.substr(0, result.find_last_of('.')); return result; } diff --git a/src/lib/util/corefile.h b/src/lib/util/corefile.h index 07ac491e1f2..42dfd70aef8 100644 --- a/src/lib/util/corefile.h +++ b/src/lib/util/corefile.h @@ -14,7 +14,8 @@ #define __COREFILE_H__ #include <stdarg.h> -#include "astring.h" +#include "corestr.h" +#include <string> #include "coretmpl.h" @@ -121,7 +122,7 @@ int CLIB_DECL core_fprintf(core_file *f, const char *fmt, ...) ATTR_PRINTF(2,3); /* ----- filename utilities ----- */ /* extract the base part of a filename (remove extensions and paths) */ -astring &core_filename_extract_base(astring &result, const char *name, bool strip_extension = false); +std::string &core_filename_extract_base(std::string &result, const char *name, bool strip_extension = false); /* true if the given filename ends with a particular extension */ int core_filename_ends_with(const char *filename, const char *extension); diff --git a/src/lib/util/corestr.c b/src/lib/util/corestr.c index a8e49f9b1f6..8a78a672ac6 100644 --- a/src/lib/util/corestr.c +++ b/src/lib/util/corestr.c @@ -191,3 +191,125 @@ char *core_i64_format(UINT64 value, UINT8 mindigits, bool is_octal) { return is_octal ? core_i64_oct_format(value,mindigits) : core_i64_hex_format(value,mindigits); } + +/*------------------------------------------------- + std::string helpers +-------------------------------------------------*/ + +#include <algorithm> + +int strvprintf(std::string &str, const char *format, va_list args) +{ + char tempbuf[4096]; + int result = vsprintf(tempbuf, format, args); + + // set the result + str.assign(tempbuf); + return result; +} + +int strprintf(std::string &str, const char *format, ...) +{ + va_list ap; + va_start(ap, format); + int retVal = strvprintf(str, format, ap); + va_end(ap); + return retVal; +} + +std::string strformat(std::string &str, const char *format, ...) +{ + std::string retVal; + va_list ap; + va_start(ap, format); + strvprintf(str, format, ap); + va_end(ap); + retVal.assign(str); + return retVal; +} + +int strcatvprintf(std::string &str, const char *format, va_list args) +{ + char tempbuf[4096]; + int result = vsprintf(tempbuf, format, args); + + // set the result + str.append(tempbuf); + return result; +} + +int strcatprintf(std::string &str, const char *format, ...) +{ + va_list ap; + va_start(ap, format); + int retVal = strcatvprintf(str, format, ap); + va_end(ap); + return retVal; +} + +void strdelchr(std::string& str, char chr) +{ + for (size_t i = 0; i < str.length(); i++) + { + if (str[i] == chr) + { + str.erase(i, 1); + i--; + } + } +} + +void strreplacechr(std::string& str, char ch, char newch) +{ + for (size_t i = 0; i < str.length(); i++) + { + if (str[i] == ch) str[i] = newch; + } +} + +std::string strtrimspace(std::string& str) +{ + int start = 0; + for (size_t i = 0; i < str.length(); i++) + { + if (!isspace(UINT8(str[i]))) break; + start++; + } + int end = str.length(); + if (end > 0) + { + for (size_t i = str.length() - 1; i > 0; i--) + { + if (!isspace(UINT8(str[i]))) break; + end--; + } + } + str = str.substr(start, end-start); + return str; +} + +std::string strmakeupper(std::string& str) +{ + std::transform(str.begin(), str.end(), str.begin(), ::toupper); + return str; +} + +std::string strmakelower(std::string& str) +{ + std::transform(str.begin(), str.end(), str.begin(), ::tolower); + return str; +} + +int strreplace(std::string &str, const std::string& search, const std::string& replace) +{ + int searchlen = search.length(); + int replacelen = replace.length(); + int matches = 0; + + for (int curindex = str.find(search, 0); curindex != -1; curindex = str.find(search, curindex + replacelen)) + { + matches++; + str.erase(curindex, searchlen).insert(curindex, replace); + } + return matches; +} diff --git a/src/lib/util/corestr.h b/src/lib/util/corestr.h index e9750b5f85f..519e1edc849 100644 --- a/src/lib/util/corestr.h +++ b/src/lib/util/corestr.h @@ -62,4 +62,19 @@ char *core_i64_format(UINT64 value, UINT8 mindigits, bool is_octal); char *core_i64_hex_format(UINT64 value, UINT8 mindigits); char *core_i64_oct_format(UINT64 value, UINT8 mindigits); +#include <string> + +int strvprintf(std::string &str, const char *format, va_list args); +int strcatvprintf(std::string &str, const char *format, va_list args); +int strprintf(std::string &str, const char *format, ...) ATTR_PRINTF(2, 3); +int strcatprintf(std::string &str, const char *format, ...) ATTR_PRINTF(2, 3); +std::string strformat(std::string &str, const char *format, ...) ATTR_PRINTF(2, 3); + +void strdelchr(std::string& str, char chr); +void strreplacechr(std::string& str, char ch, char newch); +std::string strtrimspace(std::string& str); +std::string strmakeupper(std::string& str); +std::string strmakelower(std::string& str); +int strreplace(std::string &str, const std::string& search, const std::string& replace); + #endif /* __CORESTR_H__ */ diff --git a/src/lib/util/harddisk.c b/src/lib/util/harddisk.c index 7fce13ca638..4760a5fd51f 100644 --- a/src/lib/util/harddisk.c +++ b/src/lib/util/harddisk.c @@ -40,7 +40,7 @@ hard_disk_file *hard_disk_open(chd_file *chd) { int cylinders, heads, sectors, sectorbytes; hard_disk_file *file; - astring metadata; + std::string metadata; chd_error err; /* punt if no CHD */ diff --git a/src/lib/util/hashing.c b/src/lib/util/hashing.c index d7be3af1427..1481de34a12 100644 --- a/src/lib/util/hashing.c +++ b/src/lib/util/hashing.c @@ -79,11 +79,11 @@ bool sha1_t::from_string(const char *string, int length) // as_string - convert to a string //------------------------------------------------- -const char *sha1_t::as_string(astring &buffer) const +const char *sha1_t::as_string(std::string &buffer) const { - buffer.reset(); + buffer.clear(); for (int i = 0; i < ARRAY_LENGTH(m_raw); i++) - buffer.catformat("%02x", m_raw[i]); + strcatprintf(buffer, "%02x", m_raw[i]); return buffer.c_str(); } @@ -122,11 +122,11 @@ bool md5_t::from_string(const char *string, int length) // as_string - convert to a string //------------------------------------------------- -const char *md5_t::as_string(astring &buffer) const +const char *md5_t::as_string(std::string &buffer) const { - buffer.reset(); + buffer.clear(); for (int i = 0; i < ARRAY_LENGTH(m_raw); i++) - buffer.catformat("%02x", m_raw[i]); + strcatprintf(buffer, "%02x", m_raw[i]); return buffer.c_str(); } @@ -166,9 +166,10 @@ bool crc32_t::from_string(const char *string, int length) // as_string - convert to a string //------------------------------------------------- -const char *crc32_t::as_string(astring &buffer) const +const char *crc32_t::as_string(std::string &buffer) const { - return buffer.format("%08x", m_raw).c_str(); + strprintf(buffer, "%08x", m_raw); + return buffer.c_str(); } @@ -218,9 +219,10 @@ bool crc16_t::from_string(const char *string, int length) // as_string - convert to a string //------------------------------------------------- -const char *crc16_t::as_string(astring &buffer) const +const char *crc16_t::as_string(std::string &buffer) const { - return buffer.format("%04x", m_raw).c_str(); + strprintf(buffer, "%04x", m_raw); + return buffer.c_str(); } diff --git a/src/lib/util/hashing.h b/src/lib/util/hashing.h index 78e02c6e145..b0de6a5c3c8 100644 --- a/src/lib/util/hashing.h +++ b/src/lib/util/hashing.h @@ -14,7 +14,8 @@ #define __HASHING_H__ #include "osdcore.h" -#include "astring.h" +#include "corestr.h" +#include <string> #include "md5.h" #include "sha1.h" @@ -33,7 +34,7 @@ struct sha1_t bool operator!=(const sha1_t &rhs) const { return memcmp(m_raw, rhs.m_raw, sizeof(m_raw)) != 0; } operator UINT8 *() { return m_raw; } bool from_string(const char *string, int length = -1); - const char *as_string(astring &buffer) const; + const char *as_string(std::string &buffer) const; UINT8 m_raw[20]; static const sha1_t null; }; @@ -84,7 +85,7 @@ struct md5_t bool operator!=(const md5_t &rhs) const { return memcmp(m_raw, rhs.m_raw, sizeof(m_raw)) != 0; } operator UINT8 *() { return m_raw; } bool from_string(const char *string, int length = -1); - const char *as_string(astring &buffer) const; + const char *as_string(std::string &buffer) const; UINT8 m_raw[16]; static const md5_t null; }; @@ -135,7 +136,7 @@ struct crc32_t crc32_t &operator=(const UINT32 crc) { m_raw = crc; return *this; } operator UINT32() const { return m_raw; } bool from_string(const char *string, int length = -1); - const char *as_string(astring &buffer) const; + const char *as_string(std::string &buffer) const; UINT32 m_raw; static const crc32_t null; }; @@ -181,7 +182,7 @@ struct crc16_t crc16_t &operator=(const UINT16 crc) { m_raw = crc; return *this; } operator UINT16() const { return m_raw; } bool from_string(const char *string, int length = -1); - const char *as_string(astring &buffer) const; + const char *as_string(std::string &buffer) const; UINT16 m_raw; static const crc16_t null; }; diff --git a/src/lib/util/options.c b/src/lib/util/options.c index f5beddf1d71..d229624017a 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -13,7 +13,8 @@ #include <ctype.h> #include <assert.h> #include "options.h" -#include "astring.h" +#include "corestr.h" +#include <string> @@ -63,24 +64,24 @@ core_options::entry::entry(const char *name, const char *description, UINT32 fla if (name != NULL) { // first extract any range - astring namestr(name); - int lparen = namestr.chr(0, '('); - int dash = namestr.chr(lparen + 1, '-'); - int rparen = namestr.chr(dash + 1, ')'); + std::string namestr(name); + int lparen = namestr.find_first_of('(',0); + int dash = namestr.find_first_of('-',lparen + 1); + int rparen = namestr.find_first_of(')',dash + 1); if (lparen != -1 && dash != -1 && rparen != -1) { - m_minimum.cpysubstr(namestr, lparen + 1, dash - (lparen + 1)).trimspace(); - m_maximum.cpysubstr(namestr, dash + 1, rparen - (dash + 1)).trimspace(); - namestr.del(lparen, rparen + 1 - lparen); + strtrimspace(m_minimum.assign(namestr.substr(lparen + 1, dash - (lparen + 1)))); + strtrimspace(m_maximum.assign(namestr.substr(dash + 1, rparen - (dash + 1)))); + namestr.erase(lparen, rparen + 1 - lparen); } // then chop up any semicolon-separated names int semi; int nameindex = 0; - while ((semi = namestr.chr(0, ';')) != -1 && nameindex < ARRAY_LENGTH(m_name)) + while ((semi = namestr.find_first_of(';')) != -1 && nameindex < ARRAY_LENGTH(m_name)) { - m_name[nameindex++].cpysubstr(namestr, 0, semi); - namestr.del(0, semi + 1); + m_name[nameindex++].assign(namestr.substr(0, semi)); + namestr.erase(0, semi + 1); } // finally add the last item @@ -332,11 +333,11 @@ void core_options::set_description(const char *name, const char *description) // command line arguments //------------------------------------------------- -bool core_options::parse_command_line(int argc, char **argv, int priority, astring &error_string) +bool core_options::parse_command_line(int argc, char **argv, int priority, std::string &error_string) { // reset the errors and the command - error_string.reset(); - m_command.reset(); + error_string.clear(); + m_command.clear(); // iterate through arguments int unadorned_index = 0; @@ -352,7 +353,7 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, astri entry *curentry = m_entrymap.find(optionname); if (curentry == NULL) { - error_string.catprintf("Error: unknown option: %s\n", curarg); + strcatprintf(error_string, "Error: unknown option: %s\n", curarg); retval = false; if (!is_unadorned) arg++; continue; @@ -362,9 +363,9 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, astri if (curentry->type() == OPTION_COMMAND) { // can only have one command - if (m_command) + if (!m_command.empty()) { - error_string.catprintf("Error: multiple commands specified -%s and %s\n", m_command.c_str(), curarg); + strcatprintf(error_string,"Error: multiple commands specified -%s and %s\n", m_command.c_str(), curarg); return false; } m_command = curentry->name(); @@ -381,7 +382,7 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, astri newdata = argv[++arg]; else { - error_string.catprintf("Error: option %s expected a parameter\n", curarg); + strcatprintf(error_string, "Error: option %s expected a parameter\n", curarg); return false; } @@ -397,7 +398,7 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, astri // an INI file //------------------------------------------------- -bool core_options::parse_ini_file(core_file &inifile, int priority, int ignore_priority, astring &error_string) +bool core_options::parse_ini_file(core_file &inifile, int priority, int ignore_priority, std::string &error_string) { // loop over lines in the file char buffer[4096]; @@ -422,7 +423,7 @@ bool core_options::parse_ini_file(core_file &inifile, int priority, int ignore_p // if we hit the end early, print a warning and continue if (*temp == 0) { - error_string.catprintf("Warning: invalid line in INI: %s", buffer); + strcatprintf(error_string,"Warning: invalid line in INI: %s", buffer); continue; } @@ -446,7 +447,7 @@ bool core_options::parse_ini_file(core_file &inifile, int priority, int ignore_p if (curentry == NULL) { if (priority >= ignore_priority) - error_string.catprintf("Warning: unknown option in INI: %s\n", optionname); + strcatprintf(error_string, "Warning: unknown option in INI: %s\n", optionname); continue; } @@ -476,10 +477,10 @@ void core_options::revert(int priority) // the optional diff //------------------------------------------------- -const char *core_options::output_ini(astring &buffer, const core_options *diff) +const char *core_options::output_ini(std::string &buffer, const core_options *diff) { // INI files are complete, so always start with a blank buffer - buffer.reset(); + buffer.clear(); int num_valid_headers = 0; int unadorned_index = 0; @@ -515,8 +516,8 @@ const char *core_options::output_ini(astring &buffer, const core_options *diff) if (last_header != NULL) { if (num_valid_headers++) - buffer.catprintf("\n"); - buffer.catprintf("#\n# %s\n#\n", last_header); + strcatprintf(buffer,"\n"); + strcatprintf(buffer, "#\n# %s\n#\n", last_header); last_header = NULL; } @@ -524,9 +525,9 @@ const char *core_options::output_ini(astring &buffer, const core_options *diff) if (!is_unadorned) { if (strchr(value, ' ') != NULL) - buffer.catprintf("%-25s \"%s\"\n", name, value); + strcatprintf(buffer,"%-25s \"%s\"\n", name, value); else - buffer.catprintf("%-25s %s\n", name, value); + strcatprintf(buffer,"%-25s %s\n", name, value); } } } @@ -540,21 +541,21 @@ const char *core_options::output_ini(astring &buffer, const core_options *diff) // output_help - output option help to a string //------------------------------------------------- -const char *core_options::output_help(astring &buffer) +const char *core_options::output_help(std::string &buffer) { // start empty - buffer.reset(); + buffer.clear(); // loop over all items for (entry *curentry = m_entrylist.first(); curentry != NULL; curentry = curentry->next()) { // header: just print if (curentry->is_header()) - buffer.catprintf("\n#\n# %s\n#\n", curentry->description()); + strcatprintf(buffer,"\n#\n# %s\n#\n", curentry->description()); // otherwise, output entries for all non-deprecated items else if (curentry->description() != NULL) - buffer.catprintf("-%-20s%s\n", curentry->name(), curentry->description()); + strcatprintf(buffer,"-%-20s%s\n", curentry->name(), curentry->description()); } return buffer.c_str(); } @@ -617,13 +618,13 @@ bool core_options::exists(const char *name) const // set_value - set the raw option value //------------------------------------------------- -bool core_options::set_value(const char *name, const char *value, int priority, astring &error_string) +bool core_options::set_value(const char *name, const char *value, int priority, std::string &error_string) { // find the entry first entry *curentry = m_entrymap.find(name); if (curentry == NULL) { - error_string.catprintf("Attempted to set unknown option %s\n", name); + strcatprintf(error_string, "Attempted to set unknown option %s\n", name); return false; } @@ -631,17 +632,17 @@ bool core_options::set_value(const char *name, const char *value, int priority, return validate_and_set_data(*curentry, value, priority, error_string); } -bool core_options::set_value(const char *name, int value, int priority, astring &error_string) +bool core_options::set_value(const char *name, int value, int priority, std::string &error_string) { - astring tempstr; - tempstr.printf("%d", value); + std::string tempstr; + strprintf(tempstr,"%d", value); return set_value(name, tempstr.c_str(), priority, error_string); } -bool core_options::set_value(const char *name, float value, int priority, astring &error_string) +bool core_options::set_value(const char *name, float value, int priority, std::string &error_string) { - astring tempstr; - tempstr.printf("%f", value); + std::string tempstr; + strprintf(tempstr, "%f", value); return set_value(name, tempstr.c_str(), priority, error_string); } @@ -687,7 +688,7 @@ void core_options::append_entry(core_options::entry &newentry) // for boolean options add a "no" variant as well if (newentry.type() == OPTION_BOOLEAN) - m_entrymap.add(astring("no").cat(newentry.name(name)).c_str(), &newentry); + m_entrymap.add(std::string("no").append(newentry.name(name)).c_str(), &newentry); } } @@ -701,7 +702,7 @@ void core_options::remove_entry(core_options::entry &delentry) { // remove all names from the map for (int name = 0; name < ARRAY_LENGTH(delentry.m_name); name++) - if (delentry.m_name[name]) + if (!delentry.m_name[name].empty()) m_entrymap.remove(delentry.m_name[name].c_str()); // remove the entry from the list @@ -730,17 +731,18 @@ void core_options::copyfrom(const core_options &src) // then set it //------------------------------------------------- -bool core_options::validate_and_set_data(core_options::entry &curentry, const char *newdata, int priority, astring &error_string) +bool core_options::validate_and_set_data(core_options::entry &curentry, const char *newdata, int priority, std::string &error_string) { // trim any whitespace - astring data(newdata); - data.trimspace(); + std::string data(newdata); + strtrimspace(data); + // trim quotes - if (data.chr(0, '"') == 0 && data.rchr(0, '"') == data.len() - 1) + if (data.find_first_of('"') == 0 && data.find_last_of('"') == data.length() - 1) { - data.del(0, 1); - data.del(data.len() - 1, 1); + data.erase(0, 1); + data.erase(data.length() - 1, 1); } // validate the type of data and optionally the range @@ -752,7 +754,7 @@ bool core_options::validate_and_set_data(core_options::entry &curentry, const ch case OPTION_BOOLEAN: if (sscanf(data.c_str(), "%d", &ival) != 1 || ival < 0 || ival > 1) { - error_string.catprintf("Illegal boolean value for %s: \"%s\"; reverting to %s\n", curentry.name(), data.c_str(), curentry.value()); + strcatprintf(error_string, "Illegal boolean value for %s: \"%s\"; reverting to %s\n", curentry.name(), data.c_str(), curentry.value()); return false; } break; @@ -761,12 +763,12 @@ bool core_options::validate_and_set_data(core_options::entry &curentry, const ch case OPTION_INTEGER: if (sscanf(data.c_str(), "%d", &ival) != 1) { - error_string.catprintf("Illegal integer value for %s: \"%s\"; reverting to %s\n", curentry.name(), data.c_str(), curentry.value()); + strcatprintf(error_string, "Illegal integer value for %s: \"%s\"; reverting to %s\n", curentry.name(), data.c_str(), curentry.value()); return false; } if (curentry.has_range() && (ival < atoi(curentry.minimum()) || ival > atoi(curentry.maximum()))) { - error_string.catprintf("Out-of-range integer value for %s: \"%s\" (must be between %s and %s); reverting to %s\n", curentry.name(), data.c_str(), curentry.minimum(), curentry.maximum(), curentry.value()); + strcatprintf(error_string, "Out-of-range integer value for %s: \"%s\" (must be between %s and %s); reverting to %s\n", curentry.name(), data.c_str(), curentry.minimum(), curentry.maximum(), curentry.value()); return false; } break; @@ -775,12 +777,12 @@ bool core_options::validate_and_set_data(core_options::entry &curentry, const ch case OPTION_FLOAT: if (sscanf(data.c_str(), "%f", &fval) != 1) { - error_string.catprintf("Illegal float value for %s: \"%s\"; reverting to %s\n", curentry.name(), data.c_str(), curentry.value()); + strcatprintf(error_string, "Illegal float value for %s: \"%s\"; reverting to %s\n", curentry.name(), data.c_str(), curentry.value()); return false; } if (curentry.has_range() && (fval < atof(curentry.minimum()) || fval > atof(curentry.maximum()))) { - error_string.catprintf("Out-of-range float value for %s: \"%s\" (must be between %s and %s); reverting to %s\n", curentry.name(), data.c_str(), curentry.minimum(), curentry.maximum(), curentry.value()); + strcatprintf(error_string, "Out-of-range float value for %s: \"%s\" (must be between %s and %s); reverting to %s\n", curentry.name(), data.c_str(), curentry.minimum(), curentry.maximum(), curentry.value()); return false; } break; @@ -793,7 +795,7 @@ bool core_options::validate_and_set_data(core_options::entry &curentry, const ch case OPTION_INVALID: case OPTION_HEADER: default: - error_string.catprintf("Attempted to set invalid option %s\n", curentry.name()); + strcatprintf(error_string, "Attempted to set invalid option %s\n", curentry.name()); return false; } diff --git a/src/lib/util/options.h b/src/lib/util/options.h index 1b9528ff433..1ef4636e1e6 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -75,7 +75,7 @@ public: public: // getters entry *next() const { return m_next; } - const char *name(int index = 0) const { return (index < ARRAY_LENGTH(m_name) && m_name[index]) ? m_name[index].c_str() : NULL; } + const char *name(int index = 0) const { return (index < ARRAY_LENGTH(m_name) && !m_name[index].empty()) ? m_name[index].c_str() : NULL; } const char *description() const { return m_description; } const char *value() const { return m_data.c_str(); } const char *default_value() const { return m_defdata.c_str(); } @@ -87,7 +87,7 @@ public: bool is_header() const { return type() == OPTION_HEADER; } bool is_command() const { return type() == OPTION_COMMAND; } bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; } - bool has_range() const { return (m_minimum && m_maximum); } + bool has_range() const { return (!m_minimum.empty() && !m_maximum.empty()); } int priority() const { return m_priority; } // setters @@ -105,11 +105,11 @@ public: bool m_error_reported; // have we reported an error on this option yet? int m_priority; // priority of the data set const char * m_description; // description for this item - astring m_name[4]; // up to 4 names for the item - astring m_data; // data for this item - astring m_defdata; // default data for this item - astring m_minimum; // minimum value - astring m_maximum; // maximum value + std::string m_name[4]; // up to 4 names for the item + std::string m_data; // data for this item + std::string m_defdata; // default data for this item + std::string m_minimum; // minimum value + std::string m_maximum; // maximum value }; // construction/destruction @@ -138,15 +138,15 @@ public: void remove_entry(entry &delentry); // parsing/input - bool parse_command_line(int argc, char **argv, int priority, astring &error_string); - bool parse_ini_file(core_file &inifile, int priority, int ignore_priority, astring &error_string); + bool parse_command_line(int argc, char **argv, int priority, std::string &error_string); + bool parse_ini_file(core_file &inifile, int priority, int ignore_priority, std::string &error_string); // reverting void revert(int priority = OPTION_PRIORITY_MAXIMUM); // output - const char *output_ini(astring &buffer, const core_options *diff = NULL); - const char *output_help(astring &buffer); + const char *output_ini(std::string &buffer, const core_options *diff = NULL); + const char *output_help(std::string &buffer); // reading const char *value(const char *option) const; @@ -160,9 +160,9 @@ public: // setting void set_command(const char *command); - bool set_value(const char *name, const char *value, int priority, astring &error_string); - bool set_value(const char *name, int value, int priority, astring &error_string); - bool set_value(const char *name, float value, int priority, astring &error_string); + bool set_value(const char *name, const char *value, int priority, std::string &error_string); + bool set_value(const char *name, int value, int priority, std::string &error_string); + bool set_value(const char *name, float value, int priority, std::string &error_string); void set_flag(const char *name, UINT32 mask, UINT32 flags); // misc @@ -174,12 +174,12 @@ private: void reset(); void append_entry(entry &newentry); void copyfrom(const core_options &src); - bool validate_and_set_data(entry &curentry, const char *newdata, int priority, astring &error_string); + bool validate_and_set_data(entry &curentry, const char *newdata, int priority, std::string &error_string); // internal state simple_list<entry> m_entrylist; // head of list of entries tagmap_t<entry *> m_entrymap; // map for fast lookup - astring m_command; // command found + std::string m_command; // command found static const char *const s_option_unadorned[]; // array of unadorned option "names" }; diff --git a/src/lib/util/tagmap.h b/src/lib/util/tagmap.h index a2b82e2da96..50550f3e6c3 100644 --- a/src/lib/util/tagmap.h +++ b/src/lib/util/tagmap.h @@ -15,7 +15,7 @@ #include "osdcore.h" #include "coretmpl.h" -#include "astring.h" +#include <string> #ifdef MAME_DEBUG #include "eminline.h" #endif @@ -67,7 +67,7 @@ public: m_object(object) { } // accessors - const astring &tag() const { return m_tag; } + const std::string &tag() const { return m_tag; } _ElementType object() const { return m_object; } // setters @@ -81,7 +81,7 @@ public: // internal state entry_t * m_next; UINT32 m_fullhash; - astring m_tag; + std::string m_tag; _ElementType m_object; }; diff --git a/src/lib/util/xmlfile.c b/src/lib/util/xmlfile.c index e03893134f9..8635cfc427f 100644 --- a/src/lib/util/xmlfile.c +++ b/src/lib/util/xmlfile.c @@ -698,7 +698,7 @@ static void expat_data(void *data, const XML_Char *s, int len) if ((*curnode)->value != NULL) { memcpy(newdata, (*curnode)->value, oldlen); - free((*curnode)->value); + free((void *)(*curnode)->value); } (*curnode)->value = newdata; diff --git a/src/lib/util/zippath.c b/src/lib/util/zippath.c index 4872f379135..e4433ac0fc4 100644 --- a/src/lib/util/zippath.c +++ b/src/lib/util/zippath.c @@ -23,7 +23,7 @@ struct zippath_returned_directory { zippath_returned_directory *next; - astring name; + std::string name; }; @@ -48,7 +48,7 @@ public: /* specific to ZIP directories */ bool called_zip_first; zip_file *zipfile; - astring zipprefix; + std::string zipprefix; zippath_returned_directory *returned_dirlist; }; @@ -109,13 +109,19 @@ static void parse_parent_path(const char *path, int *beginpos, int *endpos) zippath_parent - retrieves the parent directory -------------------------------------------------*/ -astring &zippath_parent(astring &dst, const char *path) +std::string &zippath_parent(std::string &dst, const char *path) { int pos; parse_parent_path(path, &pos, NULL); /* return the result */ - return (pos >= 0) ? dst.cpy(path, pos + 1) : dst.reset(); + if (pos >= 0) { + dst.assign(path, pos + 1); + } + else { + dst.clear(); + } + return dst; } @@ -125,12 +131,12 @@ astring &zippath_parent(astring &dst, const char *path) directory basename -------------------------------------------------*/ -astring &zippath_parent_basename(astring &dst, const char *path) +std::string &zippath_parent_basename(std::string &dst, const char *path) { int beginpos, endpos; parse_parent_path(path, &beginpos, &endpos); - - return dst.cpy(path + beginpos + 1, endpos - beginpos); + dst.copy((char*)(path + beginpos + 1), endpos - beginpos); + return dst; } @@ -139,11 +145,11 @@ astring &zippath_parent_basename(astring &dst, const char *path) zippath_combine - combines two paths -------------------------------------------------*/ -astring &zippath_combine(astring &dst, const char *path1, const char *path2) +std::string &zippath_combine(std::string &dst, const char *path1, const char *path2) { if (!strcmp(path2, ".")) { - dst.cpy(path1); + dst.assign(path1); } else if (!strcmp(path2, "..")) { @@ -151,15 +157,15 @@ astring &zippath_combine(astring &dst, const char *path1, const char *path2) } else if (osd_is_absolute_path(path2)) { - dst.cpy(path2); + dst.assign(path2); } else if ((path1[0] != '\0') && !is_path_separator(path1[strlen(path1) - 1])) { - dst.cpy(path1).cat(PATH_SEPARATOR).cat(path2); + dst.assign(path1).append(PATH_SEPARATOR).append(path2); } else { - dst.cpy(path1).cat(path2); + dst.assign(path1).append(path2); } return dst; } @@ -243,7 +249,7 @@ done: zippath_fopen - opens a zip path file -------------------------------------------------*/ -file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&file, astring &revised_path) +file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&file, std::string &revised_path) { file_error filerr = FILERR_NOT_FOUND; zip_error ziperr; @@ -254,13 +260,13 @@ file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&fil int len; /* first, set up the two types of paths */ - astring mainpath(filename); - astring subpath; + std::string mainpath(filename); + std::string subpath; file = NULL; /* loop through */ - while((file == NULL) && (mainpath.len() > 0) - && ((openflags == OPEN_FLAG_READ) || (subpath.len() == 0))) + while((file == NULL) && (mainpath.length() > 0) + && ((openflags == OPEN_FLAG_READ) || (subpath.length() == 0))) { /* is the mainpath a ZIP path? */ if (is_zip_file(mainpath.c_str())) @@ -276,7 +282,7 @@ file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&fil goto done; } - if (subpath.len() > 0) + if (subpath.length() > 0) header = zippath_find_sub_path(zip, subpath.c_str(), &entry_type); else header = zip_file_first_file(zip); @@ -293,8 +299,8 @@ file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&fil goto done; /* update subpath, if appropriate */ - if (subpath.len() == 0) - subpath.cpy(header->filename); + if (subpath.length() == 0) + subpath.assign(header->filename); /* we're done */ goto done; @@ -306,7 +312,7 @@ file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&fil goto done; } - if (subpath.len() == 0) + if (subpath.length() == 0) filerr = core_fopen(filename, openflags, &file); else filerr = FILERR_NOT_FOUND; @@ -315,40 +321,44 @@ file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&fil if (filerr != FILERR_NONE) { /* go up a directory */ - astring temp; + std::string temp; zippath_parent(temp, mainpath.c_str()); /* append to the sub path */ - if (subpath.len() > 0) + if (subpath.length() > 0) { - astring temp2; - temp2.cpysubstr(mainpath, temp.len()).cat(PATH_SEPARATOR).cat(subpath); - subpath.cpy(temp2); + std::string temp2; + mainpath = mainpath.substr(temp.length()); + temp2.assign(mainpath).append(PATH_SEPARATOR).append(subpath); + subpath.assign(temp2); } else - subpath.cpysubstr(mainpath, temp.len()); - + { + mainpath = mainpath.substr(temp.length()); + subpath.assign(mainpath); + } /* get the new main path, truncating path separators */ - len = temp.len(); + len = temp.length(); while (len > 0 && is_zip_file_separator(temp[len - 1])) len--; - mainpath.cpysubstr(temp, 0, len); + temp = temp.substr(0, len); + mainpath.assign(temp); } } done: /* store the revised path */ - revised_path.reset(); + revised_path.clear(); if (filerr == FILERR_NONE) { /* cannonicalize mainpath */ filerr = osd_get_full_path(&alloc_fullpath, mainpath.c_str()); if (filerr == FILERR_NONE) { - if (subpath.len() > 0) - revised_path.cpy(alloc_fullpath).cat(PATH_SEPARATOR).cat(subpath); + if (subpath.length() > 0) + revised_path.assign(alloc_fullpath).append(PATH_SEPARATOR).append(subpath); else - revised_path.cpy(alloc_fullpath); + revised_path.assign(alloc_fullpath); } } @@ -534,7 +544,7 @@ static const zip_file_header *zippath_find_sub_path(zip_file *zipfile, const cha true path and ZIP entry components -------------------------------------------------*/ -static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_type, zip_file *&zipfile, astring &newpath) +static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_type, zip_file *&zipfile, std::string &newpath) { file_error err; osd_directory_entry *current_entry = NULL; @@ -542,21 +552,22 @@ static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_ty int went_up = FALSE; int i; - newpath.reset(); + newpath.clear(); /* be conservative */ entry_type = ENTTYPE_NONE; zipfile = NULL; - astring apath(path); - astring apath_trimmed; + std::string apath(path); + std::string apath_trimmed; do { /* trim the path of trailing path separators */ - i = apath.len(); + i = apath.length(); while (i > 1 && is_path_separator(apath[i - 1])) i--; - apath_trimmed.cpysubstr(apath, 0, i); + apath = apath.substr(0, i); + apath_trimmed.assign(apath); /* stat the path */ current_entry = osd_stat(apath_trimmed.c_str()); @@ -574,8 +585,8 @@ static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_ty /* if we have not found the file or directory, go up */ current_entry_type = ENTTYPE_NONE; went_up = TRUE; - astring parent; - apath.cpy(zippath_parent(parent, apath.c_str())); + std::string parent; + apath.assign(zippath_parent(parent, apath.c_str())); } } while (current_entry_type == ENTTYPE_NONE && !is_root(apath.c_str())); @@ -591,10 +602,10 @@ static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_ty if ((current_entry_type == ENTTYPE_FILE) && is_zip_file(apath_trimmed.c_str()) && (zip_file_open(apath_trimmed.c_str(), &zipfile) == ZIPERR_NONE)) { - i = strlen(path + apath.len()); - while (i > 0 && is_zip_path_separator(path[apath.len() + i - 1])) + i = strlen(path + apath.length()); + while (i > 0 && is_zip_path_separator(path[apath.length() + i - 1])) i--; - newpath.cpy(path + apath.len(), i); + newpath.assign(path + apath.length(), i); /* this was a true ZIP path - attempt to identify the type of path */ zippath_find_sub_path(zipfile, newpath.c_str(), ¤t_entry_type); @@ -612,7 +623,7 @@ static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_ty err = FILERR_NOT_FOUND; goto done; } - newpath.cpy(path); + newpath.assign(path); } /* success! */ @@ -716,7 +727,7 @@ void zippath_closedir(zippath_directory *directory) static const char *get_relative_path(zippath_directory *directory, const zip_file_header *header) { const char *result = NULL; - int len = directory->zipprefix.len(); + int len = directory->zipprefix.length(); if ((len <= strlen(header->filename)) && !strncmp(directory->zipprefix.c_str(), header->filename, len)) @@ -807,7 +818,7 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory) /* we've found a new directory; add this to returned_dirlist */ rdent = new zippath_returned_directory; rdent->next = directory->returned_dirlist; - rdent->name.cpy(relpath, separator - relpath); + rdent->name.assign(relpath, separator - relpath); directory->returned_dirlist = rdent; /* ...and return it */ diff --git a/src/lib/util/zippath.h b/src/lib/util/zippath.h index 12c7546ae9a..ff79409f0e8 100644 --- a/src/lib/util/zippath.h +++ b/src/lib/util/zippath.h @@ -12,7 +12,7 @@ #define __ZIPPATH_H__ #include "corefile.h" -#include "astring.h" +#include <string> #include "unzip.h" @@ -31,19 +31,19 @@ class zippath_directory; /* ----- path operations ----- */ /* retrieves the parent directory */ -astring &zippath_parent(astring &dst, const char *path); +std::string &zippath_parent(std::string &dst, const char *path); /* retrieves the parent directory basename */ -astring &zippath_parent_basename(astring &dst, const char *path); +std::string &zippath_parent_basename(std::string &dst, const char *path); /* combines two paths */ -astring &zippath_combine(astring &dst, const char *path1, const char *path2); +std::string &zippath_combine(std::string &dst, const char *path1, const char *path2); /* ----- file operations ----- */ /* opens a zip path file */ -file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&file, astring &revised_path); +file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&file, std::string &revised_path); /* ----- directory operations ----- */ diff --git a/src/mame/audio/aztarac.c b/src/mame/audio/aztarac.c index 058d9ca5165..1e9ec5f293e 100644 --- a/src/mame/audio/aztarac.c +++ b/src/mame/audio/aztarac.c @@ -9,12 +9,12 @@ #include "includes/aztarac.h" -READ16_MEMBER(aztarac_state::aztarac_sound_r) +READ16_MEMBER(aztarac_state::sound_r) { return m_sound_status & 0x01; } -WRITE16_MEMBER(aztarac_state::aztarac_sound_w) +WRITE16_MEMBER(aztarac_state::sound_w) { if (ACCESSING_BITS_0_7) { @@ -26,24 +26,24 @@ WRITE16_MEMBER(aztarac_state::aztarac_sound_w) } } -READ8_MEMBER(aztarac_state::aztarac_snd_command_r) +READ8_MEMBER(aztarac_state::snd_command_r) { m_sound_status |= 0x01; m_sound_status &= ~0x20; return soundlatch_byte_r(space,offset); } -READ8_MEMBER(aztarac_state::aztarac_snd_status_r) +READ8_MEMBER(aztarac_state::snd_status_r) { return m_sound_status & ~0x01; } -WRITE8_MEMBER(aztarac_state::aztarac_snd_status_w) +WRITE8_MEMBER(aztarac_state::snd_status_w) { m_sound_status &= ~0x10; } -INTERRUPT_GEN_MEMBER(aztarac_state::aztarac_snd_timed_irq) +INTERRUPT_GEN_MEMBER(aztarac_state::snd_timed_irq) { m_sound_status ^= 0x10; diff --git a/src/mame/audio/hng64.c b/src/mame/audio/hng64.c index 4c765318501..b2ce91fe6ef 100644 --- a/src/mame/audio/hng64.c +++ b/src/mame/audio/hng64.c @@ -353,7 +353,7 @@ WRITE_LINE_MEMBER(hng64_state::tcu_tm2_cb) //m_audiocpu->set_input_line(1, state? ASSERT_LINE :CLEAR_LINE); //m_audiocpu->set_input_line(2, state? ASSERT_LINE :CLEAR_LINE); - + // NOT ACCURATE, just so that all the interrupts get triggered for now. #if 0 static int i; diff --git a/src/mame/audio/segasnd.c b/src/mame/audio/segasnd.c index bf24e91bbe5..181e600347d 100644 --- a/src/mame/audio/segasnd.c +++ b/src/mame/audio/segasnd.c @@ -316,11 +316,11 @@ void usb_sound_device::device_start() configure_filter(&m_final_filter, 100e3, 4.7e-6); /* register for save states */ - state_save_register_item(machine(), "usb", NULL, 0, m_in_latch); - state_save_register_item(machine(), "usb", NULL, 0, m_out_latch); - state_save_register_item(machine(), "usb", NULL, 0, m_last_p2_value); - state_save_register_item(machine(), "usb", NULL, 0, m_work_ram_bank); - state_save_register_item(machine(), "usb", NULL, 0, m_t1_clock); + save_item(NAME(m_in_latch)); + save_item(NAME(m_out_latch)); + save_item(NAME(m_last_p2_value)); + save_item(NAME(m_work_ram_bank)); + save_item(NAME(m_t1_clock)); for (tgroup = 0; tgroup < 3; tgroup++) { @@ -328,36 +328,36 @@ void usb_sound_device::device_start() for (tchan = 0; tchan < 3; tchan++) { timer8253_channel *channel = &group->chan[tchan]; - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->holding); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->latchmode); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->latchtoggle); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->clockmode); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->bcdmode); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->output); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->lastgate); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->gate); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->subcount); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->count); - state_save_register_item(machine(), "usb", NULL, tgroup * 3 + tchan, channel->remain); + save_item(NAME(channel->holding), tgroup * 3 + tchan); + save_item(NAME(channel->latchmode), tgroup * 3 + tchan); + save_item(NAME(channel->latchtoggle), tgroup * 3 + tchan); + save_item(NAME(channel->clockmode), tgroup * 3 + tchan); + save_item(NAME(channel->bcdmode), tgroup * 3 + tchan); + save_item(NAME(channel->output), tgroup * 3 + tchan); + save_item(NAME(channel->lastgate), tgroup * 3 + tchan); + save_item(NAME(channel->gate), tgroup * 3 + tchan); + save_item(NAME(channel->subcount), tgroup * 3 + tchan); + save_item(NAME(channel->count), tgroup * 3 + tchan); + save_item(NAME(channel->remain), tgroup * 3 + tchan); } - state_save_register_item_array(machine(), "usb", NULL, tgroup, group->env); - state_save_register_item(machine(), "usb", NULL, tgroup, group->chan_filter[0].capval); - state_save_register_item(machine(), "usb", NULL, tgroup, group->chan_filter[1].capval); - state_save_register_item(machine(), "usb", NULL, tgroup, group->gate1.capval); - state_save_register_item(machine(), "usb", NULL, tgroup, group->gate2.capval); - state_save_register_item(machine(), "usb", NULL, tgroup, group->config); + save_item(NAME(group->env), tgroup); + save_item(NAME(group->chan_filter[0].capval), tgroup); + save_item(NAME(group->chan_filter[1].capval), tgroup); + save_item(NAME(group->gate1.capval), tgroup); + save_item(NAME(group->gate2.capval), tgroup); + save_item(NAME(group->config), tgroup); } - state_save_register_item_array(machine(), "usb", NULL, 0, m_timer_mode); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_shift); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_state); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_subcount); - state_save_register_item(machine(), "usb", NULL, 0, m_final_filter.capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[0].capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[1].capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[2].capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[3].capval); - state_save_register_item(machine(), "usb", NULL, 0, m_noise_filters[4].capval); + save_item(NAME(m_timer_mode)); + save_item(NAME(m_noise_shift)); + save_item(NAME(m_noise_state)); + save_item(NAME(m_noise_subcount)); + save_item(NAME(m_final_filter.capval)); + save_item(NAME(m_noise_filters[0].capval)); + save_item(NAME(m_noise_filters[1].capval)); + save_item(NAME(m_noise_filters[2].capval)); + save_item(NAME(m_noise_filters[3].capval)); + save_item(NAME(m_noise_filters[4].capval)); } //------------------------------------------------- diff --git a/src/mame/audio/tiamc1.c b/src/mame/audio/tiamc1.c index f88f9636ac0..5cca16190dc 100644 --- a/src/mame/audio/tiamc1.c +++ b/src/mame/audio/tiamc1.c @@ -85,15 +85,15 @@ void tiamc1_sound_device::device_start() for (j = 0; j < 3; j++) { - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].count); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].cnval); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].bcdMode); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].cntMode); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].valMode); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].gate); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].output); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].loadCnt); - state_save_register_item(machine(), "channel", NULL, i * 3 + j, t->channel[j].enable); + save_item(NAME(t->channel[j].count), i * 3 + j); + save_item(NAME(t->channel[j].cnval), i * 3 + j); + save_item(NAME(t->channel[j].bcdMode), i * 3 + j); + save_item(NAME(t->channel[j].cntMode), i * 3 + j); + save_item(NAME(t->channel[j].valMode), i * 3 + j); + save_item(NAME(t->channel[j].gate), i * 3 + j); + save_item(NAME(t->channel[j].output), i * 3 + j); + save_item(NAME(t->channel[j].loadCnt), i * 3 + j); + save_item(NAME(t->channel[j].enable), i * 3 + j); } } diff --git a/src/mame/audio/wiping.c b/src/mame/audio/wiping.c index d47980e8a8a..307134b212c 100644 --- a/src/mame/audio/wiping.c +++ b/src/mame/audio/wiping.c @@ -69,9 +69,9 @@ void wiping_sound_device::device_start() voice->wave = &m_sound_prom[0]; voice->counter = 0; } - + save_item(NAME(m_soundregs)); - + for (int i = 0; i < MAX_VOICES; i++) { save_item(NAME(m_channel_list[i].frequency), i); diff --git a/src/mame/audio/wiping.h b/src/mame/audio/wiping.h index e87b7399568..7be62108cd4 100644 --- a/src/mame/audio/wiping.h +++ b/src/mame/audio/wiping.h @@ -27,7 +27,7 @@ protected: // sound stream update overrides virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); - + private: // internal state diff --git a/src/mame/drivers/24cdjuke.c b/src/mame/drivers/24cdjuke.c index b77e86606b9..3dd1d34237d 100644 --- a/src/mame/drivers/24cdjuke.c +++ b/src/mame/drivers/24cdjuke.c @@ -84,7 +84,7 @@ public: DECLARE_WRITE8_MEMBER(kb_col_w); DECLARE_WRITE8_MEMBER(digit_w); - DECLARE_READ8_MEMBER(rand_r){ return machine().rand(); } + DECLARE_READ8_MEMBER(unknown_r) { return machine().rand(); } private: UINT8 m_kb_col; @@ -134,7 +134,7 @@ static ADDRESS_MAP_START( midcoin24cdjuke_io, AS_IO, 8, midcoin24cdjuke_state ) AM_RANGE(0x04, 0x07) AM_DEVREADWRITE("ic11", i8255_device, read, write) AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE("ic25", i8255_device, read, write) AM_RANGE(0x0c, 0x0c) AM_WRITENOP - AM_RANGE(0x10, 0x1f) AM_READ(rand_r) + AM_RANGE(0x10, 0x1f) AM_READ(unknown_r) ADDRESS_MAP_END static INPUT_PORTS_START( midcoin24cdjuke ) diff --git a/src/mame/drivers/4enlinea.c b/src/mame/drivers/4enlinea.c index 004f8b4902d..7090edd3f59 100644 --- a/src/mame/drivers/4enlinea.c +++ b/src/mame/drivers/4enlinea.c @@ -320,8 +320,7 @@ void isa8_cga_4enlinea_device::device_start() } } -// std::string tempstring; -// m_chr_gen_base = memregion(subtag(tempstring, "gfx1"))->base(); +// m_chr_gen_base = memregion(subtag("gfx1"))->base(); // m_chr_gen = m_chr_gen_base + m_chr_gen_offset[1]; } diff --git a/src/mame/drivers/5clown.c b/src/mame/drivers/5clown.c index 189413abd84..dbf5dd4710e 100644 --- a/src/mame/drivers/5clown.c +++ b/src/mame/drivers/5clown.c @@ -9,9 +9,9 @@ Games running on this hardware: - * Five Clown (english, set 1), 1993, IGS. - * Five Clown (english, set 2), 1993, IGS. - * Five Clown (spanish hack), 1993, IGS. + * Five Clown (English, set 1), 1993, IGS. + * Five Clown (English, set 2), 1993, IGS. + * Five Clown (Spanish, hack), 1993, IGS. This hardware seems to be based on Bonanza's Golden Poker, but on steroids... diff --git a/src/mame/drivers/aleck64.c b/src/mame/drivers/aleck64.c index 31593ed582f..c34ce631a80 100644 --- a/src/mame/drivers/aleck64.c +++ b/src/mame/drivers/aleck64.c @@ -367,6 +367,9 @@ static ADDRESS_MAP_START( rsp_map, AS_PROGRAM, 32, aleck64_state ) ADDRESS_MAP_END static INPUT_PORTS_START( aleck64 ) + PORT_START("input") + PORT_BIT( 0xff, 0x05, IPT_SPECIAL ) // Tell base driver to expect two gamepads + PORT_START("P1") PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) // Button A PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) // Button B @@ -497,14 +500,10 @@ static INPUT_PORTS_START( 11beat ) INPUT_PORTS_END static INPUT_PORTS_START( mtetrisc ) + // The basic N64 controls are unused in this game - PORT_START("P1") - PORT_START("P1_ANALOG_X") - PORT_START("P1_ANALOG_Y") - PORT_START("P2") - PORT_START("P2_ANALOG_X") - PORT_START("P2_ANALOG_Y") - PORT_START("INMJ") + PORT_START("input") + PORT_BIT( 0xff, 0x00, IPT_SPECIAL ) PORT_START("IN0") PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -534,6 +533,9 @@ static INPUT_PORTS_START( mtetrisc ) INPUT_PORTS_END static INPUT_PORTS_START( starsldr ) + PORT_START("input") + PORT_BIT( 0xff, 0x05, IPT_SPECIAL ) // Tell base driver to expect two gamepads + PORT_START("P1") PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) // Button A PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) // Button B @@ -636,13 +638,9 @@ static INPUT_PORTS_START( starsldr ) PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_COIN1 ) INPUT_PORTS_END - static INPUT_PORTS_START( doncdoon ) - PORT_START("P1") - PORT_START("P1_ANALOG_X") - PORT_START("P1_ANALOG_Y") - PORT_START("P2") - PORT_START("P2_ANALOG_X") - PORT_START("P2_ANALOG_Y") +static INPUT_PORTS_START( doncdoon ) + PORT_START("input") + PORT_BIT( 0xff, 0x00, IPT_SPECIAL ) // Disable standard N64 controls PORT_START("IN0") PORT_BIT(0xfcff8080, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -685,13 +683,8 @@ static INPUT_PORTS_START( kurufev ) INPUT_PORTS_END static INPUT_PORTS_START( twrshaft ) - PORT_START("P1") - PORT_START("P1_ANALOG_X") - PORT_START("P1_ANALOG_Y") - PORT_START("P2") - PORT_START("P2_ANALOG_X") - PORT_START("P2_ANALOG_Y") - PORT_START("INMJ") + PORT_START("input") + PORT_BIT( 0xff, 0x00, IPT_SPECIAL ) // Disable standard N64 controls PORT_START("IN0") PORT_BIT(0xff7fffe0, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -713,14 +706,10 @@ static INPUT_PORTS_START( twrshaft ) INPUT_PORTS_END static INPUT_PORTS_START( hipai ) - PORT_START("P1") - PORT_START("P1_ANALOG_X") - PORT_START("P1_ANALOG_Y") - PORT_START("P2") - PORT_START("P2_ANALOG_X") - PORT_START("P2_ANALOG_Y") + PORT_START("input") + PORT_BIT( 0xff, 0x00, IPT_SPECIAL ) // Disable standard N64 controls -PORT_START("INMJ") + PORT_START("INMJ") PORT_BIT( 0xe1c1c0c1, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_MAHJONG_A ) diff --git a/src/mame/drivers/atarittl.c b/src/mame/drivers/atarittl.c index c1c8ab9f31a..ec2c3c6f790 100644 --- a/src/mame/drivers/atarittl.c +++ b/src/mame/drivers/atarittl.c @@ -359,10 +359,6 @@ ROM_END /* // 100% TTL - NO ROMS -ROM_START( breakout ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) -ROM_END - ROM_START( goal4 ) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) ROM_END @@ -431,7 +427,6 @@ GAME(1974, tank, 0, atarikee, 0, driver_device, 0, ROT0, "Ata //GAME(1974, quack, 0, atarikee, 0, driver_device, 0, ROT0, "Atari", "Qwak!/Quack [TTL]", GAME_IS_SKELETON) // 100% TLL -//GAME(1976, breakout, 0, atarikee, 0, driver_device, 0, ROT0, "Atari", "Breakout [TTL]",GAME_IS_SKELETON) //GAME(1974, coupedem, 0, atarikee, 0, driver_device, 0, ROT0, "Atari", "Coupe De Monde [TTL]",GAME_IS_SKELETON) //GAME(1975, goal4, 0, atarikee, 0, driver_device, 0, ROT0, "Atari", "Goal 4/World Cup/Coupe De Monde [TTL]",GAME_IS_SKELETON) //GAME(1973, gotchaat, 0, atarikee, 0, driver_device, 0, ROT0, "Atari", "Gotcha [TTL]",GAME_IS_SKELETON) //? diff --git a/src/mame/drivers/atlantis.c b/src/mame/drivers/atlantis.c index f6753c80554..c7b9c6c8e43 100644 --- a/src/mame/drivers/atlantis.c +++ b/src/mame/drivers/atlantis.c @@ -53,8 +53,48 @@ public: UINT32 screen_update_mwskins(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device<mips3_device> m_maincpu; required_device<dcs2_audio_denver_device> m_dcs; + + READ32_MEMBER (red_r); + WRITE32_MEMBER(red_w); + READ32_MEMBER (green_r); + WRITE32_MEMBER(green_w); + READ32_MEMBER (blue_r); + WRITE32_MEMBER(blue_w); }; +READ32_MEMBER (atlantis_state::red_r) +{ + logerror("red_r %x\n", offset); + return 0; +} + +WRITE32_MEMBER(atlantis_state::red_w) +{ + logerror("red_w %x,%x\n", offset, data); +} + +READ32_MEMBER (atlantis_state::green_r) +{ + logerror("green_r %x\n", offset); + return 0; +} + +WRITE32_MEMBER(atlantis_state::green_w) +{ + logerror("green_w %x,%x\n", offset, data); +} + +READ32_MEMBER (atlantis_state::blue_r) +{ + logerror("blue_r %x\n", offset); + return 0; +} + +WRITE32_MEMBER(atlantis_state::blue_w) +{ + logerror("blue_w %x,%x\n", offset, data); +} + /************************************* * @@ -103,6 +143,17 @@ UINT32 atlantis_state::screen_update_mwskins(screen_device &screen, bitmap_ind16 * *************************************/ +static ADDRESS_MAP_START( map0, AS_PROGRAM, 32, atlantis_state ) + AM_RANGE(0x000000, 0xffffff) AM_READWRITE(red_r, red_w) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( map1, AS_PROGRAM, 32, atlantis_state ) + AM_RANGE(0x000000, 0xffffff) AM_READWRITE(green_r, green_w) +ADDRESS_MAP_END + +static ADDRESS_MAP_START( map3, AS_PROGRAM, 32, atlantis_state ) + AM_RANGE(0x000000, 0xffffff) AM_READWRITE(blue_r, blue_w) +ADDRESS_MAP_END /************************************* * @@ -129,6 +180,9 @@ static MACHINE_CONFIG_START( mwskins, atlantis_state ) MCFG_PCI_ROOT_ADD( ":pci") MCFG_VRC4373_ADD( ":pci:00.0", ":maincpu") MCFG_PCI9050_ADD( ":pci:0b.0") + MCFG_PCI9050_SET_MAP(0, map0) + MCFG_PCI9050_SET_MAP(1, map1) // 2 skipped for testing + MCFG_PCI9050_SET_MAP(3, map3) MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true) diff --git a/src/mame/drivers/aztarac.c b/src/mame/drivers/aztarac.c index 9919dd4e92e..574170a8a0d 100644 --- a/src/mame/drivers/aztarac.c +++ b/src/mame/drivers/aztarac.c @@ -28,14 +28,15 @@ * *************************************/ -IRQ_CALLBACK_MEMBER(aztarac_state::aztarac_irq_callback) +IRQ_CALLBACK_MEMBER(aztarac_state::irq_callback) { return 0xc; } -void aztarac_state::machine_reset() +void aztarac_state::machine_start() { + save_item(NAME(m_sound_status)); } @@ -78,11 +79,11 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, aztarac_state ) AM_RANGE(0x022000, 0x0220ff) AM_READ(nvram_r) AM_WRITEONLY AM_SHARE("nvram") AM_RANGE(0x027000, 0x027001) AM_READ(joystick_r) AM_RANGE(0x027004, 0x027005) AM_READ_PORT("INPUTS") - AM_RANGE(0x027008, 0x027009) AM_READWRITE(aztarac_sound_r, aztarac_sound_w) + AM_RANGE(0x027008, 0x027009) AM_READWRITE(sound_r, sound_w) AM_RANGE(0x02700c, 0x02700d) AM_READ_PORT("DIAL") AM_RANGE(0x02700e, 0x02700f) AM_READ(watchdog_reset16_r) AM_RANGE(0xff8000, 0xffafff) AM_RAM AM_SHARE("vectorram") - AM_RANGE(0xffb000, 0xffb001) AM_WRITE(aztarac_ubr_w) + AM_RANGE(0xffb000, 0xffb001) AM_WRITE(ubr_w) AM_RANGE(0xffe000, 0xffffff) AM_RAM ADDRESS_MAP_END @@ -97,12 +98,12 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, aztarac_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0x8800, 0x8800) AM_READ(aztarac_snd_command_r) + AM_RANGE(0x8800, 0x8800) AM_READ(snd_command_r) AM_RANGE(0x8c00, 0x8c01) AM_DEVREADWRITE("ay1", ay8910_device, data_r, data_address_w) AM_RANGE(0x8c02, 0x8c03) AM_DEVREADWRITE("ay2", ay8910_device, data_r, data_address_w) AM_RANGE(0x8c04, 0x8c05) AM_DEVREADWRITE("ay3", ay8910_device, data_r, data_address_w) AM_RANGE(0x8c06, 0x8c07) AM_DEVREADWRITE("ay4", ay8910_device, data_r, data_address_w) - AM_RANGE(0x9000, 0x9000) AM_READWRITE(aztarac_snd_status_r, aztarac_snd_status_w) + AM_RANGE(0x9000, 0x9000) AM_READWRITE(snd_status_r, snd_status_w) ADDRESS_MAP_END @@ -148,11 +149,11 @@ static MACHINE_CONFIG_START( aztarac, aztarac_state ) MCFG_CPU_ADD("maincpu", M68000, 8000000) MCFG_CPU_PROGRAM_MAP(main_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", aztarac_state, irq4_line_hold) - MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(aztarac_state,aztarac_irq_callback) + MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(aztarac_state, irq_callback) MCFG_CPU_ADD("audiocpu", Z80, 2000000) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_CPU_PERIODIC_INT_DRIVER(aztarac_state, aztarac_snd_timed_irq, 100) + MCFG_CPU_PERIODIC_INT_DRIVER(aztarac_state, snd_timed_irq, 100) MCFG_NVRAM_ADD_1FILL("nvram") @@ -217,4 +218,4 @@ ROM_END * *************************************/ -GAME( 1983, aztarac, 0, aztarac, aztarac, driver_device, 0, ROT0, "Centuri", "Aztarac", 0 ) +GAME( 1983, aztarac, 0, aztarac, aztarac, driver_device, 0, ROT0, "Centuri", "Aztarac", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/bagman.c b/src/mame/drivers/bagman.c index 39d036e6eeb..8afc75a859e 100644 --- a/src/mame/drivers/bagman.c +++ b/src/mame/drivers/bagman.c @@ -63,14 +63,34 @@ DIP locations verified for: #include "emu.h" #include "cpu/z80/z80.h" #include "sound/ay8910.h" -#include "sound/tms5110.h" #include "includes/bagman.h" -WRITE8_MEMBER(bagman_state::bagman_ls259_w) +void bagman_state::machine_start() { - tmsprom_device *tmsprom = machine().device<tmsprom_device>("tmsprom"); - bagman_pal16r6_w(space, offset,data); /*this is just a simulation*/ + save_item(NAME(m_irq_mask)); + save_item(NAME(m_columnvalue)); +} + +MACHINE_START_MEMBER(bagman_state, bagman) +{ + bagman_state::machine_start(); + save_item(NAME(m_ls259_buf)); +} + +MACHINE_START_MEMBER(bagman_state, squaitsa) +{ + bagman_state::machine_start(); + save_item(NAME(m_p1_res)); + save_item(NAME(m_p1_old_val)); + save_item(NAME(m_p2_res)); + save_item(NAME(m_p2_old_val)); +} + + +WRITE8_MEMBER(bagman_state::ls259_w) +{ + pal16r6_w(space, offset,data); /*this is just a simulation*/ if (m_ls259_buf[offset] != (data&1) ) { @@ -81,22 +101,22 @@ WRITE8_MEMBER(bagman_state::bagman_ls259_w) case 0: case 1: case 2: - tmsprom->bit_w(space, 0, 7 - ((m_ls259_buf[0]<<2) | (m_ls259_buf[1]<<1) | (m_ls259_buf[2]<<0))); + m_tmsprom->bit_w(space, 0, 7 - ((m_ls259_buf[0]<<2) | (m_ls259_buf[1]<<1) | (m_ls259_buf[2]<<0))); break; case 3: - tmsprom->enable_w(m_ls259_buf[offset]); + m_tmsprom->enable_w(m_ls259_buf[offset]); break; case 4: - tmsprom->rom_csq_w(space, 0, m_ls259_buf[offset]); + m_tmsprom->rom_csq_w(space, 0, m_ls259_buf[offset]); break; case 5: - tmsprom->rom_csq_w(space, 1, m_ls259_buf[offset]); + m_tmsprom->rom_csq_w(space, 1, m_ls259_buf[offset]); break; } } } -WRITE8_MEMBER(bagman_state::bagman_coin_counter_w) +WRITE8_MEMBER(bagman_state::coincounter_w) { coin_counter_w(machine(), offset,data); } @@ -109,20 +129,20 @@ WRITE8_MEMBER(bagman_state::irq_mask_w) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, bagman_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x6000, 0x67ff) AM_RAM - AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(bagman_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x9800, 0x9bff) AM_RAM_WRITE(bagman_colorram_w) AM_SHARE("colorram") + AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x9800, 0x9bff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") AM_RANGE(0x9c00, 0x9fff) AM_WRITENOP /* written to, but unused */ - AM_RANGE(0xa000, 0xa000) AM_READ(bagman_pal16r6_r) + AM_RANGE(0xa000, 0xa000) AM_READ(pal16r6_r) //AM_RANGE(0xa800, 0xa805) AM_READ(bagman_ls259_r) /*just for debugging purposes*/ AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_mask_w) - AM_RANGE(0xa001, 0xa002) AM_WRITE(bagman_flipscreen_w) + AM_RANGE(0xa001, 0xa002) AM_WRITE(flipscreen_w) AM_RANGE(0xa003, 0xa003) AM_WRITEONLY AM_SHARE("video_enable") AM_RANGE(0xc000, 0xffff) AM_ROM /* Super Bagman only */ AM_RANGE(0x9800, 0x981f) AM_WRITEONLY AM_SHARE("spriteram") /* hidden portion of color RAM */ /* here only to initialize the pointer, */ - /* writes are handled by bagman_colorram_w */ - AM_RANGE(0xa800, 0xa805) AM_WRITE(bagman_ls259_w) /* TMS5110 driving state machine */ - AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w) + /* writes are handled by colorram_w */ + AM_RANGE(0xa800, 0xa805) AM_WRITE(ls259_w) /* TMS5110 driving state machine */ + AM_RANGE(0xa004, 0xa004) AM_WRITE(coincounter_w) AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW") AM_RANGE(0xb800, 0xb800) AM_READNOP /* looks like watchdog from schematics */ @@ -138,16 +158,16 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pickin_map, AS_PROGRAM, 8, bagman_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x7000, 0x77ff) AM_RAM - AM_RANGE(0x8800, 0x8bff) AM_RAM_WRITE(bagman_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x9800, 0x9bff) AM_RAM_WRITE(bagman_colorram_w) AM_SHARE("colorram") + AM_RANGE(0x8800, 0x8bff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x9800, 0x9bff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") AM_RANGE(0x9800, 0x981f) AM_WRITEONLY AM_SHARE("spriteram") /* hidden portion of color RAM */ /* here only to initialize the pointer, */ - /* writes are handled by bagman_colorram_w */ + /* writes are handled by colorram_w */ AM_RANGE(0x9c00, 0x9fff) AM_WRITENOP /* written to, but unused */ AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_mask_w) - AM_RANGE(0xa001, 0xa002) AM_WRITE(bagman_flipscreen_w) + AM_RANGE(0xa001, 0xa002) AM_WRITE(flipscreen_w) AM_RANGE(0xa003, 0xa003) AM_WRITEONLY AM_SHARE("video_enable") - AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w) + AM_RANGE(0xa004, 0xa004) AM_WRITE(coincounter_w) AM_RANGE(0xa800, 0xa800) AM_READ_PORT("DSW") @@ -389,7 +409,7 @@ GFXDECODE_END /* squaitsa doesn't map the dial directly, instead it polls the results of the dial through an external circuitry. - I don't know if the following is correct, there can possbily be multiple solutions for the same problem. */ + I don't know if the following is correct, there can possibly be multiple solutions for the same problem. */ READ8_MEMBER(bagman_state::dial_input_p1_r) { UINT8 dial_val; @@ -445,19 +465,18 @@ static MACHINE_CONFIG_START( bagman, bagman_state ) MCFG_CPU_IO_MAP(main_portmap) MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq) - MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman) + MCFG_MACHINE_START_OVERRIDE(bagman_state, bagman) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(BAGMAN_HCLK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) - MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update_bagman) + MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", bagman) MCFG_PALETTE_ADD("palette", 64) MCFG_PALETTE_INIT_OWNER(bagman_state,bagman) - MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman) MCFG_DEVICE_ADD("tmsprom", TMSPROM, 640000 / 2) /* rom clock */ MCFG_TMSPROM_REGION("5110ctrl") /* prom memory region - sound region is automatically assigned */ @@ -495,19 +514,16 @@ static MACHINE_CONFIG_START( pickin, bagman_state ) MCFG_CPU_IO_MAP(main_portmap) MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq) - MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman) - /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(BAGMAN_HCLK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) - MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update_bagman) + MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", pickin) MCFG_PALETTE_ADD("palette", 64) MCFG_PALETTE_INIT_OWNER(bagman_state,bagman) - MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -548,19 +564,16 @@ static MACHINE_CONFIG_START( botanic, bagman_state ) MCFG_CPU_IO_MAP(main_portmap) MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq) - MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman) - /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_RAW_PARAMS(BAGMAN_HCLK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) - MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update_bagman) + MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", bagman) MCFG_PALETTE_ADD("palette", 64) MCFG_PALETTE_INIT_OWNER(bagman_state,bagman) - MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -575,6 +588,8 @@ static MACHINE_CONFIG_START( botanic, bagman_state ) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( squaitsa, botanic ) + MCFG_MACHINE_START_OVERRIDE(bagman_state, squaitsa) + MCFG_SOUND_MODIFY("aysnd") MCFG_AY8910_PORT_A_READ_CB(READ8(bagman_state, dial_input_p1_r)) MCFG_AY8910_PORT_B_READ_CB(READ8(bagman_state, dial_input_p2_r)) @@ -976,19 +991,19 @@ DRIVER_INIT_MEMBER(bagman_state,bagman) } -GAME( 1982, bagman, 0, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Bagman", 0 ) -GAME( 1982, bagnard, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Le Bagnard (set 1)", 0 ) -GAME( 1982, bagnarda, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Le Bagnard (set 2)", 0 ) -GAME( 1982, bagnardi, bagman, bagman, bagman, bagman_state, bagman, ROT90, "Valadon Automation (Itisa license)", "Le Bagnard (Itisa, Spain)", 0 ) -GAME( 1982, bagmans, bagman, bagman, bagmans, bagman_state, bagman, ROT270, "Valadon Automation (Stern Electronics license)", "Bagman (Stern Electronics, set 1)", 0 ) -GAME( 1982, bagmans2, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation (Stern Electronics license)", "Bagman (Stern Electronics, set 2)", 0 ) +GAME( 1982, bagman, 0, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Bagman", GAME_SUPPORTS_SAVE ) +GAME( 1982, bagnard, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Le Bagnard (set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1982, bagnarda, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Le Bagnard (set 2)", GAME_SUPPORTS_SAVE ) +GAME( 1982, bagnardi, bagman, bagman, bagman, bagman_state, bagman, ROT90, "Valadon Automation (Itisa license)", "Le Bagnard (Itisa, Spain)", GAME_SUPPORTS_SAVE ) +GAME( 1982, bagmans, bagman, bagman, bagmans, bagman_state, bagman, ROT270, "Valadon Automation (Stern Electronics license)", "Bagman (Stern Electronics, set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1982, bagmans2, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation (Stern Electronics license)", "Bagman (Stern Electronics, set 2)", GAME_SUPPORTS_SAVE ) -GAME( 1984, sbagman, 0, bagman, sbagman, driver_device, 0, ROT270, "Valadon Automation", "Super Bagman", 0 ) -GAME( 1984, sbagmans, sbagman, bagman, sbagman, driver_device, 0, ROT270, "Valadon Automation (Stern Electronics license)", "Super Bagman (Stern Electronics)", 0 ) +GAME( 1984, sbagman, 0, bagman, sbagman, driver_device, 0, ROT270, "Valadon Automation", "Super Bagman", GAME_SUPPORTS_SAVE ) +GAME( 1984, sbagmans, sbagman, bagman, sbagman, driver_device, 0, ROT270, "Valadon Automation (Stern Electronics license)", "Super Bagman (Stern Electronics)", GAME_SUPPORTS_SAVE ) -GAME( 1983, pickin, 0, pickin, pickin, driver_device, 0, ROT270, "Valadon Automation", "Pickin'", 0 ) +GAME( 1983, pickin, 0, pickin, pickin, driver_device, 0, ROT270, "Valadon Automation", "Pickin'", GAME_SUPPORTS_SAVE ) -GAME( 1983, botanic, 0, botanic, botanici,driver_device, 0, ROT90, "Itisa", "Botanic (English / Spanish)", 0 ) -GAME( 1984, botanicf, botanic, botanic, botanicf,driver_device, 0, ROT270, "Itisa (Valadon Automation license)", "Botanic (French)", 0 ) +GAME( 1983, botanic, 0, botanic, botanici,driver_device, 0, ROT90, "Itisa", "Botanic (English / Spanish)", GAME_SUPPORTS_SAVE ) +GAME( 1984, botanicf, botanic, botanic, botanicf,driver_device, 0, ROT270, "Itisa (Valadon Automation license)", "Botanic (French)", GAME_SUPPORTS_SAVE ) -GAME( 1984, squaitsa, 0, squaitsa,squaitsa, driver_device,0, ROT0, "Itisa", "Squash (Itisa)", 0 ) +GAME( 1984, squaitsa, 0, squaitsa,squaitsa, driver_device,0, ROT0, "Itisa", "Squash (Itisa)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/berzerk.c b/src/mame/drivers/berzerk.c index 29313a57459..a9fe7218dbb 100644 --- a/src/mame/drivers/berzerk.c +++ b/src/mame/drivers/berzerk.c @@ -1191,12 +1191,12 @@ We need to have actual verfied rom labels for all the sets below (other then voi ROM_START( berzerk ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "1c-0", 0x0000, 0x0800, CRC(ca566dbc) SHA1(fae2647f12f1cd82826db61b53b116a5e0c9f995) ) - ROM_LOAD( "1d-1", 0x1000, 0x0800, CRC(7ba69fde) SHA1(69af170c4a39a3494dcd180737e5c87b455f9203) ) - ROM_LOAD( "3d-2", 0x1800, 0x0800, CRC(a1d5248b) SHA1(a0b7842f6a5f86c16d80d78e7012c78b3ea11d1d) ) - ROM_LOAD( "5d-3", 0x2000, 0x0800, CRC(fcaefa95) SHA1(07f849aa39f1e3db938187ffde4a46a588156ddc) ) - ROM_LOAD( "6d-4", 0x2800, 0x0800, CRC(1e35b9a0) SHA1(5a5e549ec0e4803ab2d1eac6b3e7171aedf28244) ) - ROM_LOAD( "5c-5", 0x3000, 0x0800, CRC(c8c665e5) SHA1(e9eca4b119549e0061384abf52327c14b0d56624) ) + ROM_LOAD( "berzerk_rc31_1c.rom0.1c", 0x0000, 0x0800, CRC(ca566dbc) SHA1(fae2647f12f1cd82826db61b53b116a5e0c9f995) ) + ROM_LOAD( "berzerk_rc31_1d.rom1.1d", 0x1000, 0x0800, CRC(7ba69fde) SHA1(69af170c4a39a3494dcd180737e5c87b455f9203) ) + ROM_LOAD( "berzerk_rc31_3d.rom2.3d", 0x1800, 0x0800, CRC(a1d5248b) SHA1(a0b7842f6a5f86c16d80d78e7012c78b3ea11d1d) ) + ROM_LOAD( "berzerk_rc31_5d.rom3.5d", 0x2000, 0x0800, CRC(fcaefa95) SHA1(07f849aa39f1e3db938187ffde4a46a588156ddc) ) + ROM_LOAD( "berzerk_rc31_6d.rom4.6d", 0x2800, 0x0800, CRC(1e35b9a0) SHA1(5a5e549ec0e4803ab2d1eac6b3e7171aedf28244) ) + ROM_LOAD( "berzerk_rc31_5c.rom5.5c", 0x3000, 0x0800, CRC(c8c665e5) SHA1(e9eca4b119549e0061384abf52327c14b0d56624) ) /* rom socket ROM6 at 3C is unpopulated */ ROM_FILL( 0x3800, 0x0800, 0xff ) @@ -1207,7 +1207,7 @@ ROM_END ROM_START( berzerk1 ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "rom0.1c", 0x0000, 0x0800, CRC(5b7eb77d) SHA1(8de488e279036fe40d6fb4c0dde16075309342fd) ) + ROM_LOAD( "rom0.1c", 0x0000, 0x0800, CRC(5b7eb77d) SHA1(8de488e279036fe40d6fb4c0dde16075309342fd) ) /* is this set RC32 ? */ ROM_LOAD( "rom1.1d", 0x1000, 0x0800, CRC(e58c8678) SHA1(a11f08448b457d690b270512c9f02fcf1e41d9e0) ) ROM_LOAD( "rom2.3d", 0x1800, 0x0800, CRC(705bb339) SHA1(845191df90cd7d80f8fed3d2b69305301d921549) ) ROM_LOAD( "rom3.5d", 0x2000, 0x0800, CRC(6a1936b4) SHA1(f1635e9d2f25514c35559d2a247c3bc4b4034c19) ) diff --git a/src/mame/drivers/bfm_sc4.c b/src/mame/drivers/bfm_sc4.c index 7d8bb54cb95..948467f9541 100644 --- a/src/mame/drivers/bfm_sc4.c +++ b/src/mame/drivers/bfm_sc4.c @@ -13260,7 +13260,12 @@ ROM_START( sc4s6ce ) sc_s6c_others ROM_END - +ROM_START( sc4s6cf ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD16_BYTE( "club_super_six_95400336_vssix_1.9_lo.bin", 0x000000, 0x080000, CRC(828e1e1a) SHA1(00d7ab13e89a28f49dddf5755e09a8a1d23de440) ) + ROM_LOAD16_BYTE( "club_super_six_95400337_vssix_1.9_hi.bin", 0x000001, 0x080000, CRC(2bed3af5) SHA1(56c232cd9d7d8fa0bc02e314edd315f50d07764f) ) + sc_s6c_others +ROM_END ROM_START( sc4sdr ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) @@ -13986,6 +13991,15 @@ ROM_START( sc4ticlbc ) ROM_END +ROM_START( sc4ticlbd ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD16_BYTE( "club_treasure_island_95400361_lo.bin", 0x000001, 0x080000, CRC(15910e0f) SHA1(0ff9614de9a9333510ca269fca7f9b08db2695f9) ) + ROM_LOAD16_BYTE( "club_treasure_island_95400362_hi.bin", 0x000000, 0x080000, CRC(c0e6b3f7) SHA1(1c74fe6a5d6cae9486cf311e9b1c4c69e4552b42) ) + sc_ticlb_others + + sc_ticlb_matrix +ROM_END + ROM_START( sc4ttomb ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95406814.lo", 0x00001, 0x080000, CRC(9892b8b8) SHA1(c337a325def655a8878a1d04bdb5ddd73d01bf85) ) @@ -14835,6 +14849,12 @@ ROM_START( sc4legg ) sc_leg_others ROM_END +ROM_START( sc4legh ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD16_BYTE( "legionnaire_std_1.5_402862_lo.bin", 0x000001, 0x080000, CRC(598bf2ba) SHA1(f3b02be06458e01bbacfdf4e0fcc3800102a88cd) ) + ROM_LOAD16_BYTE( "legionnaire_std_1.5_402863_hi.bin", 0x000000, 0x080000, CRC(f9c5c16e) SHA1(08c2a937980c4d1183044f5b29680cab918fbdaa) ) + sc_leg_others +ROM_END ROM_START( sc4legcb ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) @@ -31307,6 +31327,9 @@ GAMEL( 200?, sc4lege ,sc4leg, sc4_200_5rb, sc4leg, sc4_state, sc4leg, ROT GAMEL( 200?, sc4legf ,sc4leg, sc4_200_5rb, sc4leg, sc4_state, sc4leg, ROT0, "BFM","Who Wants To Be A Legionnaire (Bellfruit) (Scorpion 4) (set 7)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_bfm_sc4 ) GAMEL( 200?, sc4legg ,sc4leg, sc4_200_5rb, sc4leg, sc4_state, sc4leg, ROT0, "BFM","Who Wants To Be A Legionnaire (Bellfruit) (Scorpion 4) (set 8)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_bfm_sc4 ) +GAMEL( 200?, sc4legh ,sc4leg, sc4_200_5rb, sc4leg, sc4_state, sc4leg, ROT0, "BFM","Who Wants To Be A Legionnaire (Bellfruit) (Scorpion 4) (set 9)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_bfm_sc4 ) // doesn't do anything? + + DRIVER_INIT_MEMBER(sc4_state,sc4cleg) { DRIVER_INIT_CALL(sc4); @@ -48954,6 +48977,8 @@ GAMEL( 200?, sc4s6cc ,sc4s6c, sc4, sc4, sc4_state, sc4s6c, ROT0, "BFM","S GAMEL( 200?, sc4s6cd ,sc4s6c, sc4, sc4, sc4_state, sc4s6c, ROT0, "BFM","Super 6 Club (Bellfruit) (Scorpion 4) (set 3)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_bfm_sc4 ) GAMEL( 200?, sc4s6ce ,sc4s6c, sc4, sc4, sc4_state, sc4s6c, ROT0, "BFM","Super 6 Club (Bellfruit) (Scorpion 4) (set 4)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_bfm_sc4 ) +GAMEL( 200?, sc4s6cf ,sc4s6c, sc4, sc4, sc4_state, sc4s6c, ROT0, "BFM","Super 6 Club (Bellfruit) (Scorpion 4) (set 5)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_bfm_sc4 ) + @@ -49001,6 +49026,7 @@ GAMEL( 200?, sc4ticlbb ,sc4ticlb, sc4dmd, sc4, sc4_state, sc4ticlb, ROT0, "BF GAMEL( 200?, sc4ticlba ,sc4ticlb, sc4dmd, sc4, sc4_state, sc4ticlb, ROT0, "BFM","Treasure Island Club (Bellfruit) (Scorpion 4) (set 1)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_sc4_dmd ) GAMEL( 200?, sc4ticlbc ,sc4ticlb, sc4dmd, sc4, sc4_state, sc4ticlb, ROT0, "BFM","Treasure Island Club (Bellfruit) (Scorpion 4) (set 2)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_sc4_dmd ) +GAMEL( 200?, sc4ticlbd ,sc4ticlb, sc4dmd, sc4, sc4_state, sc4ticlb, ROT0, "BFM","Treasure Island Club (Bellfruit) (Scorpion 4) (set 3)", GAME_NOT_WORKING | GAME_CLICKABLE_ARTWORK, layout_sc4_dmd ) diff --git a/src/mame/drivers/bfm_sc45_helper.c b/src/mame/drivers/bfm_sc45_helper.c index d46afca2d12..ce7d40f7e9d 100644 --- a/src/mame/drivers/bfm_sc45_helper.c +++ b/src/mame/drivers/bfm_sc45_helper.c @@ -126,7 +126,7 @@ int find_project_string(running_machine &machine, int addrxor, int mode) struct sc4inputinfo { - astring name; + std::string name; bool used; }; @@ -193,7 +193,7 @@ int find_input_strings(running_machine &machine) UINT32 stringaddr = (rom[j + 2] << 16) | rom[j + 3]; sc45helperlog("(port %02x position %02x) unk %04x addr %08x ", port,pos, unk2, stringaddr); - astring tempstring; + std::string tempstring; for (int k = stringaddr; k < stringaddr + 6; k++) { @@ -205,13 +205,13 @@ int find_input_strings(running_machine &machine) } else { - tempstring.cat(chr); + tempstring.push_back(chr); } } - tempstring.trimspace(); - tempstring.makelower(); + strtrimspace(tempstring); + strmakelower(tempstring); //if (pos <= 5) @@ -226,8 +226,8 @@ int find_input_strings(running_machine &machine) { printf("position already used?\n"); - sc4inputs[port][pos].name.cat(" OR "); - sc4inputs[port][pos].name.cat(tempstring); + sc4inputs[port][pos].name.append(" OR "); + sc4inputs[port][pos].name.append(tempstring); } } //else @@ -371,20 +371,20 @@ int find_input_strings(running_machine &machine) struct lampinfo { - astring lampname; - astring lampname_alt; + std::string lampname; + std::string lampname_alt; bool used; int x, y; int width, height; bool draw_label; - astring lamptypename; + std::string lamptypename; int clickport; int clickmask; }; lampinfo lamps[16][16]; -void set_clickable_temp(running_machine &machine, const astring &teststring, int clickport, int clickmask) +void set_clickable_temp(running_machine &machine, const std::string &teststring, int clickport, int clickmask) { for (int y = 0; y < 16; y++) { @@ -438,7 +438,7 @@ int find_lamp_strings(running_machine &machine) sprintf(tmp, "(%02d:%02d)", y, x); - lamps[y][x].lampname = astring(tmp); + lamps[y][x].lampname = std::string(tmp); lamps[y][x].used = false; lamps[y][x].y = (y * 28); lamps[y][x].x = 380 + (x * 24); @@ -476,7 +476,7 @@ int find_lamp_strings(running_machine &machine) //sc45helperlog("(row %02d, col %02d, unused %02x) addr %08x ", row,col, (portpos&0xff00)>>8, stringaddr); - astring tempstring; + std::string tempstring; for (int k = stringaddr; k < stringaddr + 10; k++) { @@ -488,7 +488,7 @@ int find_lamp_strings(running_machine &machine) } else { - tempstring.cat(chr); + tempstring.push_back(chr); } } @@ -499,8 +499,8 @@ int find_lamp_strings(running_machine &machine) lamps[row][col].lampname = tempstring; lamps[row][col].lamptypename = "matrixlamp"; - lamps[row][col].lampname.trimspace(); - lamps[row][col].lampname.makelower(); + strtrimspace(lamps[row][col].lampname); + strmakelower(lamps[row][col].lampname); } else { @@ -879,7 +879,7 @@ int find_reel_strings(running_machine &machine) //sc45helperlog("addr %08x ", stringaddr); - astring tempstring; + std::string tempstring; for (int k = stringaddr; k < stringaddr + 10; k++) { @@ -891,18 +891,18 @@ int find_reel_strings(running_machine &machine) } else { - tempstring.cat(chr); + tempstring.push_back(chr); } } - tempstring.trimspace(); - tempstring.makelower(); + strtrimspace(tempstring); + strmakelower(tempstring); if (tempstring[0] == '!') { - tempstring.delchr('!'); - tempstring.cat("PND"); + strdelchr(tempstring,'!'); + tempstring.append("PND"); } sc45helperlog("%s", tempstring.c_str()); diff --git a/src/mame/drivers/bfm_sc5sw.c b/src/mame/drivers/bfm_sc5sw.c index 08fd3642ca9..010d8cbefa0 100644 --- a/src/mame/drivers/bfm_sc5sw.c +++ b/src/mame/drivers/bfm_sc5sw.c @@ -1008,6 +1008,20 @@ ROM_START( sc5cfcpw ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429136.lo", 0x000001, 0x080000, CRC(e4b3712e) SHA1(316fc8076b39e333661af7bb75db6c8fb940d88d) ) ROM_LOAD16_BYTE( "95429137.hi", 0x000000, 0x080000, CRC(a8e66586) SHA1(840e48e675c3d78280791f6410438f5039fedc69) ) + // todo: split + ROM_LOAD16_BYTE( "95428326.lo", 0x000001, 0x080000, CRC(e8e1890d) SHA1(e25ca03a88ef2b935fc2423c7d398ee8a768ef3b) ) + ROM_LOAD16_BYTE( "95428327.hi", 0x000000, 0x080000, CRC(22637cd4) SHA1(95c33db530cdf3cd972c71eea88b1ff89d0f6635) ) + ROM_LOAD16_BYTE( "95428498.lo", 0x000001, 0x080000, CRC(134922c8) SHA1(6861d92af4614124a2e3d5e25ba4bf1d4e6deab0) ) + ROM_LOAD16_BYTE( "95428499.hi", 0x000000, 0x080000, CRC(fa008c29) SHA1(b90355a9f886ed3a2de002a948101348a6263858) ) + ROM_LOAD16_BYTE( "95428522.lo", 0x000001, 0x080000, CRC(9193a102) SHA1(af17f3fc20a4d229edc1e81e7eeabc98f0e88afb) ) + ROM_LOAD16_BYTE( "95428523.hi", 0x000000, 0x080000, CRC(1f266065) SHA1(e628ede7658089d989b983f7e7ad0f7e9c06ef19) ) + ROM_LOAD16_BYTE( "95429326.lo", 0x000001, 0x080000, CRC(b2a392c8) SHA1(7aa14d551fde0bf1a841ae40d10ac3001a858b7a) ) + ROM_LOAD16_BYTE( "95429327.hi", 0x000000, 0x080000, CRC(9a261fc5) SHA1(74c90f923c048c755ac1b99ac81bfa6d29096d1c) ) + ROM_LOAD16_BYTE( "95429498.lo", 0x000001, 0x080000, CRC(f4d210e9) SHA1(d63d454eb755a4b1a28e2a2dafa9dd298e8f8349) ) + ROM_LOAD16_BYTE( "95429499.hi", 0x000000, 0x080000, CRC(fc637afa) SHA1(64de640acbb582a2ffcd74b0f38161269a7810f6) ) + ROM_LOAD16_BYTE( "95429522.lo", 0x000001, 0x080000, CRC(334c15f8) SHA1(e0e50374a52a8cf425b891bec3030442ad99e61b) ) + ROM_LOAD16_BYTE( "95429523.hi", 0x000000, 0x080000, CRC(5b0c24ec) SHA1(12242ec39e90350a0a0b13623a9e8cf2da0db74d) ) + sc_cfcp_others ROM_END @@ -1291,7 +1305,19 @@ ROM_START( sc5dndbok ) sc_dndbo_others ROM_END +ROM_START( sc5dndbol ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD16_BYTE( "95428292.lo", 0x000001, 0x080000, CRC(b32a25df) SHA1(a1951b02460d09657a3ae541fd3362af5fa87cf4) ) + ROM_LOAD16_BYTE( "95428293.hi", 0x000000, 0x080000, CRC(d17d1eb8) SHA1(fb784472f510cafa05c5fae971a21d90859f368d) ) + sc_dndbo_others +ROM_END +ROM_START( sc5dndbom ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD16_BYTE( "95429292.lo", 0x000001, 0x080000, CRC(5b73d6da) SHA1(67212f0544d8b6a14eee58715f076091763fc31b) ) + ROM_LOAD16_BYTE( "95429293.hi", 0x000000, 0x080000, CRC(08e69d3c) SHA1(524fcf541a5c120d50beec58c3794500ba3608b6) ) + sc_dndbo_others +ROM_END ROM_START( sc5dndbl ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) @@ -1517,6 +1543,12 @@ ROM_START( sc5dndcre ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429054.lo", 0x000001, 0x080000, CRC(0529e2c5) SHA1(908d4e0451f53255f34f897bd713b5a1a05b1c23) ) ROM_LOAD16_BYTE( "95429055.hi", 0x000000, 0x080000, CRC(58f9e8e7) SHA1(60960a581a5e9ff9d03466e5cfb8c6f49bd39157) ) + // todo: split + ROM_LOAD16_BYTE( "95428594.lo", 0x000001, 0x080000, CRC(ecafe817) SHA1(346537563c50f17936566d9a3deb5333c09ed4b1) ) + ROM_LOAD16_BYTE( "95428595.hi", 0x000000, 0x080000, CRC(24c51a81) SHA1(c28edf474b34f7361caa5f5cfabcd51ad9a258dd) ) + ROM_LOAD16_BYTE( "95429594.lo", 0x000001, 0x080000, CRC(9efc372b) SHA1(e14fa453fde441793c84b2e4e19a6c623961936f) ) + ROM_LOAD16_BYTE( "95429595.hi", 0x000000, 0x080000, CRC(3004c304) SHA1(a5a451e9e77e3d4e2d1b447658ef19b559a8476d) ) + sc_dndcr_others ROM_END @@ -1576,6 +1608,25 @@ ROM_START( sc5dnddeg ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429116.lo", 0x000001, 0x080000, CRC(c6356d32) SHA1(e9597fff078307fe12983655f7953ba1151afd83) ) ROM_LOAD16_BYTE( "95429117.hi", 0x000000, 0x080000, CRC(e91ef06b) SHA1(3eb32c410e375a077d23d0b61d544f23ab0d44a5) ) + // todo: split + ROM_LOAD16_BYTE( "95428368.lo", 0x000001, 0x080000, CRC(7991f620) SHA1(723ed3f32bcbb78853436c0ed6ac9c1ceeee881f) ) + ROM_LOAD16_BYTE( "95428369.hi", 0x000000, 0x080000, CRC(3fb79ea6) SHA1(d1a81d039775463be858dea38f67f613b8e0f47c) ) + ROM_LOAD16_BYTE( "95428452.lo", 0x000001, 0x080000, CRC(f83c1661) SHA1(6b342839577fd53496e388abc1ee99cf97daa6be) ) + ROM_LOAD16_BYTE( "95428453.hi", 0x000000, 0x080000, CRC(e22f7ebc) SHA1(1e7b89c453c2563d84f0f6b2b628ff123f7fd079) ) + ROM_LOAD16_BYTE( "95428608.lo", 0x000001, 0x080000, CRC(e4fa9ee8) SHA1(24a1ad59cd1fa2e519796bc3812ebdda89869bf7) ) + ROM_LOAD16_BYTE( "95428609.hi", 0x000000, 0x080000, CRC(7b494659) SHA1(34048d4ae3f86fe32da84434afb03ef11f7e69aa) ) + ROM_LOAD16_BYTE( "95429368.lo", 0x000001, 0x080000, CRC(fda5c354) SHA1(b1ddd3a3aad31aab0bf191ff5a52adce9d8d4ada) ) + ROM_LOAD16_BYTE( "95429369.hi", 0x000000, 0x080000, CRC(dfe20a5d) SHA1(2289dbc08568af5ff1f674f494e670e0a608e450) ) + ROM_LOAD16_BYTE( "95429452.lo", 0x000001, 0x080000, CRC(b687cb4c) SHA1(e3edfcd898d1bcf3991af6ed0b49b8e61e8f62d7) ) + ROM_LOAD16_BYTE( "95429453.hi", 0x000000, 0x080000, CRC(4933a9a8) SHA1(fdad796a7837b7bcd644347124b707e2241bdd7b) ) + ROM_LOAD16_BYTE( "95429608.lo", 0x000001, 0x080000, CRC(c935f504) SHA1(8bc94d2e5d013c0c7e1a973aa3313cfcdbc95c95) ) + ROM_LOAD16_BYTE( "95429609.hi", 0x000000, 0x080000, CRC(e865acc9) SHA1(54105457d99ef0176998f91c4678e9323febb379) ) + // todo: split + ROM_LOAD16_BYTE( "95428662.lo", 0x000001, 0x080000, CRC(f43077ca) SHA1(365c2bee1ff21f2b6ca167ab4730f862a4bdd6be) ) + ROM_LOAD16_BYTE( "95428663.hi", 0x000000, 0x080000, CRC(a04ca75d) SHA1(9c013f2cf1ddc983b1cb6ba01a86d96fe7ff25b7) ) + ROM_LOAD16_BYTE( "95429662.lo", 0x000001, 0x080000, CRC(d07e691b) SHA1(66c1b397cc4aa5ab91632641c85ebf03a4c331c4) ) + ROM_LOAD16_BYTE( "95429663.hi", 0x000000, 0x080000, CRC(c188b7a0) SHA1(f247637594e91cbf9731f1bad1ecdae8f2f924ef) ) + sc_dndde_others ROM_END @@ -1839,6 +1890,12 @@ ROM_START( sc5dndglk ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "p3310s72.hi", 0x00000, 0x080000, CRC(20e3f24a) SHA1(31c346a92d20f4c486cff3938d73391dda45ad0f) ) ROM_LOAD16_BYTE( "p3310s72.lo", 0x00001, 0x080000, CRC(ee262128) SHA1(15323bf6d5ef8ce0c126cf30fe0b9ae869bc2e1e) ) + // todo: split + ROM_LOAD16_BYTE( "95428312.lo", 0x000001, 0x080000, CRC(2d2ac5ad) SHA1(74f3f8824b88b331ebcade2821b0e0d7359c2ed2) ) + ROM_LOAD16_BYTE( "95428313.hi", 0x000000, 0x080000, CRC(f2bd46f7) SHA1(4b8e56bf5be96c726d23c31273650c96c9a54960) ) + ROM_LOAD16_BYTE( "95429312.lo", 0x000001, 0x080000, CRC(870626b9) SHA1(48846909fb3b8d8444df5acdaf8054029ccc1cc7) ) + ROM_LOAD16_BYTE( "95429313.hi", 0x000000, 0x080000, CRC(90d1ad8d) SHA1(6377c727a5186adb4a51d371d32b21b89f290c25) ) + sc_dndgl_others ROM_END @@ -1870,6 +1927,23 @@ ROM_START( sc5dndldc ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429060.lo", 0x000001, 0x080000, CRC(8b8aff5c) SHA1(f7d5e99109760d47dbc0922d7e477c33cbac3478) ) ROM_LOAD16_BYTE( "95429061.hi", 0x000000, 0x080000, CRC(d292724d) SHA1(17ac02eae5c10fe55dea5603d7e2f44405dae798) ) + // todo: split + ROM_LOAD16_BYTE( "95428061.lo", 0x000001, 0x080000, CRC(c434bac2) SHA1(b626b757535d47a6ed9e08239ff38957305982b5) ) + ROM_LOAD16_BYTE( "95428062.hi", 0x000000, 0x080000, CRC(8cb0cc65) SHA1(308391e3ca3b95b4e9804be299b416b969b2bbc3) ) + ROM_LOAD16_BYTE( "95428416.lo", 0x000001, 0x080000, CRC(c7ff4430) SHA1(e33d27ad6e880cf08d54bb837f0a2262528328ed) ) + ROM_LOAD16_BYTE( "95428417.hi", 0x000000, 0x080000, CRC(2dfe7223) SHA1(ed8dd0df734fda150d7e14b7629c4464c7c221f0) ) + ROM_LOAD16_BYTE( "95428548.lo", 0x000001, 0x080000, CRC(d0d5e3ed) SHA1(ca49815db70d450c19b0fbce87faccbb48015739) ) + ROM_LOAD16_BYTE( "95428549.hi", 0x000000, 0x080000, CRC(7917b539) SHA1(f88d78f1c778d865bc1d9b85cb9e961a72bb39d4) ) + ROM_LOAD16_BYTE( "95428684.lo", 0x000001, 0x080000, CRC(3d9780cb) SHA1(61963d4ba814070825866a4c9f9916bff74a19d0) ) + ROM_LOAD16_BYTE( "95428685.hi", 0x000000, 0x080000, CRC(683780b9) SHA1(b6c3f1e665db647dd938563dbfb0e9cff24067be) ) + ROM_LOAD16_BYTE( "95429416.lo", 0x000001, 0x080000, CRC(1c6b3d05) SHA1(6be4695f8baff5169c5159692882ac3f55336767) ) + ROM_LOAD16_BYTE( "95429417.hi", 0x000000, 0x080000, CRC(e8a2b099) SHA1(a48f4e81356913ee33c528823e9fc4ec78081762) ) + ROM_LOAD16_BYTE( "95429548.lo", 0x000001, 0x080000, CRC(3ad7f2c4) SHA1(1b1c9f71e4fdf63061ce70a48e212397e0d8851a) ) + ROM_LOAD16_BYTE( "95429549.hi", 0x000000, 0x080000, CRC(b9a3f204) SHA1(a9670b93c6301301329f7441380e494a87693c5a) ) + ROM_LOAD16_BYTE( "95429684.lo", 0x000001, 0x080000, CRC(639477fa) SHA1(43b990d7cc6dd2f5d849c5cac66e1e3eb2fa8722) ) + ROM_LOAD16_BYTE( "95429685.hi", 0x000000, 0x080000, CRC(754ba54a) SHA1(0ac535fd92e59cdc562b179a96265edb518da018) ) + + sc_dndld_others ROM_END @@ -1955,6 +2029,12 @@ ROM_START( sc5dndmbk ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "p3407s13.hi", 0x00000, 0x080000, CRC(cbbb0081) SHA1(17553777cfba64e9af5536e24b361d68335cbf86) ) ROM_LOAD16_BYTE( "p3407s13.lo", 0x00001, 0x080000, CRC(c68c23c0) SHA1(837bae53f2884a8c09d9e923572448abc34711e1) ) + // todo: split + ROM_LOAD16_BYTE( "95428598.lo", 0x000001, 0x080000, CRC(3f2e7d97) SHA1(51899d4058fc1fbae7cd6540d00fa8fd906b45e8) ) + ROM_LOAD16_BYTE( "95428599.hi", 0x000000, 0x080000, CRC(82997002) SHA1(f93c877c5970a650e161b547c298ff2649a52f8f) ) + ROM_LOAD16_BYTE( "95429598.lo", 0x000001, 0x080000, CRC(986d8350) SHA1(abab4ba80fe8ef7cc0d8a0ca28ac62ebb027c82a) ) + ROM_LOAD16_BYTE( "95429599.hi", 0x000000, 0x080000, CRC(f7815ca1) SHA1(38af6204c84637060364f77b25561b50f190b6e1) ) + sc_dndmb_others ROM_END @@ -2102,6 +2182,21 @@ ROM_START( sc5ddptgc ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95427936.lo", 0x00001, 0x080000, CRC(3f290768) SHA1(97f9b9a38bf7409a652afb7ce7315e6a96906dc7) ) ROM_LOAD16_BYTE( "95427937.hi", 0x00000, 0x080000, CRC(0477abf3) SHA1(df52a3ae072139c698b842896ffa3b80be48990d) ) + // todo: split + ROM_LOAD16_BYTE( "95428490.lo", 0x000001, 0x080000, CRC(f4172eed) SHA1(8b6a0bc9aa9e9eec0a9d5e80cc07a2195ffbe25e) ) + ROM_LOAD16_BYTE( "95428491.hi", 0x000000, 0x080000, CRC(93e00b60) SHA1(a7c04fb66c4c26734fe1918cc6353a6e7abdb840) ) + ROM_LOAD16_BYTE( "95428554.lo", 0x000001, 0x080000, CRC(2ebc4d9a) SHA1(e7504d9d259c90519784fddfbbe0bd137c92372d) ) + ROM_LOAD16_BYTE( "95428555.hi", 0x000000, 0x080000, CRC(900960b3) SHA1(be3ec7c43d806af73769f6580c5b95d7c804b389) ) + ROM_LOAD16_BYTE( "95428666.lo", 0x000001, 0x080000, CRC(e48feb3f) SHA1(aa7ab2f620edf9b95f3483b216ba3707c0fb6b25) ) + ROM_LOAD16_BYTE( "95428667.hi", 0x000000, 0x080000, CRC(897db7aa) SHA1(0c84e8e85d5dd9c8e4db23ba123ed21fd36d0406) ) + ROM_LOAD16_BYTE( "95429490.lo", 0x000001, 0x080000, CRC(410d62b1) SHA1(012c85abb6cc24355c60c00ff46fd1b06589a632) ) + ROM_LOAD16_BYTE( "95429491.hi", 0x000000, 0x080000, CRC(c33b1ef8) SHA1(1e497e8b47225a5ee8f55e6dbc4b5220205d0e15) ) + ROM_LOAD16_BYTE( "95429554.lo", 0x000001, 0x080000, CRC(33b4cc8c) SHA1(2d25181d3608499ddf017244011f999d8b57e339) ) + ROM_LOAD16_BYTE( "95429555.hi", 0x000000, 0x080000, CRC(491e654a) SHA1(c575a99e51a57c646a5e45bf26b07efb8fb41c72) ) + ROM_LOAD16_BYTE( "95429666.lo", 0x000001, 0x080000, CRC(75268fdc) SHA1(3479a038757cbf9654b65bc08ebd0195dd3a9a90) ) + ROM_LOAD16_BYTE( "95429667.hi", 0x000000, 0x080000, CRC(aacfdce5) SHA1(ce133efd6c5763b759e84d1f3affef3e63205514) ) + + sc_ddptg_others ROM_END @@ -2293,6 +2388,12 @@ ROM_START( sc5dndpde ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95427944.lo", 0x000001, 0x080000, CRC(4504a4e1) SHA1(858ec6b6a1eaeebfbfae1868befd556f248735d2) ) ROM_LOAD16_BYTE( "95427945.hi", 0x000000, 0x080000, CRC(e597188a) SHA1(f0d887d09ff597b3bead97eb0b9ceef12a48f9a6) ) + // todo: split + ROM_LOAD16_BYTE( "95428596.lo", 0x000001, 0x080000, CRC(1be13d1d) SHA1(777344e1636b660366bc67b6c5627e25c9c4ebe8) ) + ROM_LOAD16_BYTE( "95428597.hi", 0x000000, 0x080000, CRC(ca2c127c) SHA1(557ba44793f56a13d7b3fbfd8c6cf77cd5abc3c2) ) + ROM_LOAD16_BYTE( "95429596.lo", 0x000001, 0x080000, CRC(c8a7adaa) SHA1(780e048ed640f9980878cb7def4fefe410d7bce7) ) + ROM_LOAD16_BYTE( "95429597.hi", 0x000000, 0x080000, CRC(3c3c2dfc) SHA1(3a594e5b5a5da59b181ba2f51576370b1be5972c) ) + sc_dndpd_others ROM_END @@ -3631,6 +3732,12 @@ ROM_START( sc5cpen1c ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429066.lo", 0x000001, 0x080000, CRC(4026308e) SHA1(6f3bbf07145eba547a20481cf5a934f3fd894924) ) ROM_LOAD16_BYTE( "95429067.hi", 0x000000, 0x080000, CRC(90c825a1) SHA1(3a9457d8bbe9b792e4320880728967d1c2fb724f) ) + // todo: split + ROM_LOAD16_BYTE( "95428504.lo", 0x000001, 0x080000, CRC(93ca32a9) SHA1(673386a931f5ad14be4b787cf42ffbbedc72acd7) ) + ROM_LOAD16_BYTE( "95428505.hi", 0x000000, 0x080000, CRC(26ca3655) SHA1(345addadd6af2f51cb38241414c8095b3b809f58) ) + ROM_LOAD16_BYTE( "95429504.lo", 0x000001, 0x080000, CRC(dcfe9ba0) SHA1(5a06cf9a004b3c1e09ca24ee566e85a5aa87bc54) ) + ROM_LOAD16_BYTE( "95429505.hi", 0x000000, 0x080000, CRC(d2320a28) SHA1(b467474c7af12ca699c57e126107965b2e1145b1) ) + sc_cpen1_others ROM_END @@ -3869,6 +3976,13 @@ ROM_START( sc5sftsc ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "g95425656.lo", 0x00001, 0x080000, CRC(406fa07c) SHA1(e564b331f0b409d967c4ef6ccc17bb37e633d3c8) ) ROM_LOAD16_BYTE( "g95425657.hi", 0x00000, 0x080000, CRC(3103d2e9) SHA1(f4f5694dc1dbfbe4bd10561adfb517e768d832fb) ) + // todo: split + ROM_LOAD16_BYTE( "g95424684.lo", 0x000001, 0x080000, CRC(ceb10bc6) SHA1(99d0019aceab7c48062fd348db4904a770a6848a) ) + ROM_LOAD16_BYTE( "g95424685.hi", 0x000000, 0x080000, CRC(599418b0) SHA1(c36c2ee601870090985b91f07dcf0ae95683452c) ) + ROM_LOAD16_BYTE( "g95425684.lo", 0x000001, 0x080000, CRC(26927175) SHA1(32d9795a73e3cd12f18e6519b05f93ab2e007276) ) + ROM_LOAD16_BYTE( "g95425685.hi", 0x000000, 0x080000, CRC(73f4a57d) SHA1(0acf9e2701dd44200c1dac31248b9faf38c8e3be) ) + + sc_sfts_others ROM_END @@ -4371,6 +4485,12 @@ ROM_START( sc5pirclg ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95427990.lo", 0x000001, 0x080000, CRC(d1e915a9) SHA1(39cf6d9d2fdd2f06ef0bd3f6b9ba581016af12bf) ) ROM_LOAD16_BYTE( "95427991.hi", 0x000000, 0x080000, CRC(97808fd3) SHA1(507148b65cfaaf76600df3f13c3347c9421b4fb3) ) + // tood: split + ROM_LOAD16_BYTE( "95428508.lo", 0x000001, 0x080000, CRC(55048646) SHA1(132b74e86989fcabc76826fb3617c8e73b418135) ) + ROM_LOAD16_BYTE( "95428509.hi", 0x000000, 0x080000, CRC(e89acafb) SHA1(ed330006e6f5fe61a3232e88ef54e3e9d54d9796) ) + ROM_LOAD16_BYTE( "95429508.lo", 0x000001, 0x080000, CRC(e8d3cfe0) SHA1(e66078ab586da14152adc469c9782ada4d327997) ) + ROM_LOAD16_BYTE( "95429509.hi", 0x000000, 0x080000, CRC(dbe59abe) SHA1(047d2f44e9dad3dbcd39458ee04bbc55f258a130) ) + sc_pircl_others ROM_END @@ -5580,6 +5700,12 @@ ROM_START( sc5crnjwb ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "c_jewels.hi", 0x00000, 0x080000, CRC(b1ddedd3) SHA1(e5eb9f25a4e385e17c97c1fd67cba991c5f832bd) ) ROM_LOAD16_BYTE( "c_jewels.lo", 0x00001, 0x080000, CRC(3e8812bc) SHA1(66ad13ef56a6d95a82565e3de53b199f0426a156) ) + // todo: split + ROM_LOAD16_BYTE( "g95428322.lo", 0x000001, 0x080000, CRC(3dcda45f) SHA1(709be6608ca05756d4cfadc0f9b97ea5036486a4) ) + ROM_LOAD16_BYTE( "g95428323.hi", 0x000000, 0x080000, CRC(be6849a9) SHA1(7871c0b4a04ef6bbdcd28ad4090a8a9a10612e84) ) + ROM_LOAD16_BYTE( "g95429322.lo", 0x000001, 0x080000, CRC(ebee27b3) SHA1(e5faa28b2850c902c43ba12776c389d03e528af0) ) + ROM_LOAD16_BYTE( "g95429323.hi", 0x000000, 0x080000, CRC(88080651) SHA1(9dea5527a7cb2b5125626bf3448b8e46541d76cc) ) + sc_crnjw_others ROM_END @@ -6361,6 +6487,12 @@ ROM_START( sc5dndhfu ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429084.lo", 0x000001, 0x080000, CRC(2bd33f07) SHA1(391e2f0ae65c0800ee0b75cdb195aea1c86eab43) ) ROM_LOAD16_BYTE( "95429085.hi", 0x000000, 0x080000, CRC(b09f820f) SHA1(7663f28a6bbf2241648578cd0644983a2a24dd3d) ) + // todo: split + ROM_LOAD16_BYTE( "95428602.lo", 0x000001, 0x080000, CRC(4e8af609) SHA1(7740a0e5d974040d78c44a73574022361e2c665d) ) + ROM_LOAD16_BYTE( "95428603.hi", 0x000000, 0x080000, CRC(ef0fadea) SHA1(67e6c56ea15d5114e587ebef4de37804c19ad5e0) ) + ROM_LOAD16_BYTE( "95429602.lo", 0x000001, 0x080000, CRC(e58838a8) SHA1(84c6ec542714050377ebe2a60014bebbe127d0f9) ) + ROM_LOAD16_BYTE( "95429603.hi", 0x000000, 0x080000, CRC(bad0fa71) SHA1(5c4ff45902e3432a39519e8774fc9904f60263ef) ) + sc_dndhf_others ROM_END @@ -11358,6 +11490,12 @@ ROM_START( sc5vivama ) ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "p3010s41.hi", 0x00000, 0x080000, CRC(1003cf54) SHA1(34e47911517a77dfd113af14bae4f335207f30be) ) ROM_LOAD16_BYTE( "p3010s41.lo", 0x00001, 0x080000, CRC(89c37841) SHA1(9b2d313c2498a1d05903490adbf9b0157a14e65f) ) + // todo: split + ROM_LOAD16_BYTE( "95410054.lo", 0x000001, 0x080000, CRC(417799dc) SHA1(571114e3e42b0c0e5937327ec44347729db6cbf1) ) + ROM_LOAD16_BYTE( "95410055.hi", 0x000000, 0x080000, CRC(63a69f11) SHA1(688dfff158ff86b461986346a11f445f97364702) ) + ROM_LOAD16_BYTE( "95411054.lo", 0x000001, 0x080000, CRC(e319fc4c) SHA1(fca648076437d9ef81b3041e25fd544c88467dd5) ) + ROM_LOAD16_BYTE( "95411055.hi", 0x000000, 0x080000, CRC(65c1bcdc) SHA1(b24a457a8b7465209542a45798f6bf9f76abe952) ) + PR3010_VIVA_MEXICO_SOUNDS11 ROM_END @@ -12078,130 +12216,10 @@ ROM_START( sc5nunsme ) sc_nunsm_others ROM_END -#if 0 -// this is all orphaned roms where we only have sound roms, but no program, as well as what appear to be some more -// recent bits possibly on a newer platform, acknowledge they exists but just ignore them for the time being -ROM_START( sc5unsrt ) - ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) - // MAZOOMA 'LOLLYWOOD SOUNDS' - ROM_LOAD( "95004332.bin", 0x0000, 0x0a5e3d, CRC(266d4371) SHA1(8e72022db71b432f53826720aac79901e8ba37af) ) - // MAZOOMA 'SAM SOUNDS' - ROM_LOAD( "95004360.bin", 0x0000, 0x03ab65, CRC(b357535e) SHA1(b9c03ca1c29f6414ac18e454a2a98ed24799fa92) ) - // MAZOOMA 'SWAGSND' - ROM_LOAD( "95008377.bin", 0x0000, 0x0f6813, CRC(55fad813) SHA1(efa07cd5aa68e1372e8de6bb955ee114cf74ae9c) ) - // MAZOOMA 'DOWNMEXICOWAYSND' - ROM_LOAD( "95008379.bin", 0x0000, 0x0f1c34, CRC(3d18e770) SHA1(cdcc600a14329c645ff35fefc355a9ff6b845224) ) - // MAZOOMA 'GRIDLOCKSND' - ROM_LOAD( "95008401.bin", 0x0000, 0x0e486b, CRC(d81d7736) SHA1(8046b95482058ea55735a278dd3b71f708d66b1a) ) - // QPS 'CASHSPLASHSND' - ROM_LOAD( "95008403.bin", 0x0000, 0x0facbf, CRC(cf3969bb) SHA1(4cb6fb4e536882a11bb6c1548ffb94daea70ca5f) ) - // MAZOOMA 'REVO_SOUNDS' - ROM_LOAD( "95008871.bin", 0x0000, 0x0fd182, CRC(e4f3b731) SHA1(ef829105e1b45c307546127ba85f5e0e5403ab98) ) - // miss PR1032 game (Fire Cracker, but not sc4fcc) - // PR1032 SND - ROM_LOAD( "95004262.bin", 0x0000, 0x080000, CRC(3f5fad9e) SHA1(528a2803baa155d66cb896f643f858238aa7f189) ) - // PR1032 unknown (what are these?) - ROM_LOAD( "95712394.bin", 0x000, 0x800, CRC(2658fedf) SHA1(32125bc5a58ddd49f8be36c7cb2ebbbdf2cb292b) ) - ROM_LOAD( "95712395.bin", 0x800, 0x800, CRC(d5df2317) SHA1(66f25a2a11657653f5eed3e8196d9b52119236c3) ) - // miss PR1131 game - // PR1331 SND - ROM_LOAD( "95004278.bin", 0x0000, 0x080000, CRC(c21ff246) SHA1(56345ee0af02a51a96df98ed01ffb6202b8cd772) ) - // miss PR1026 game - // PR1026 SND - ROM_LOAD( "95008183.bin", 0x000000, 0x080000, CRC(ab29f841) SHA1(908603184c3f7ead278dabd224d60e5362cdafbe) ) - ROM_LOAD( "95008184.bin", 0x080000, 0x080000, CRC(45ef95ea) SHA1(1e1126b542621e723eaf6e38918162fe701247e0) ) - // miss 95008551 PR1666 game - // 95008551 PR1666 SND - ROM_LOAD( "95008551.bin", 0x000000, 0x100000, CRC(2d89a52a) SHA1(244101df7f6beae545f9b823750f908f532ac1e4) ) - // miss PR1236 game - // PR1236 SND - ROM_LOAD( "95008298.bin", 0x0000, 0x100000, CRC(96a487da) SHA1(491c5133757d6f26c106d122a29cd7ed454c2353) ) - // miss PR1407 game - // PR1407 SND - ROM_LOAD( "95008382.bin", 0x000000, 0x100000, CRC(cbf27ec8) SHA1(5be29fb836688e63d90e5a5108c6bdec09dd12a5) ) - // miss PR1367 game - // PR1367 SND - ROM_LOAD( "95008334.bin", 0x000000, 0x100000, CRC(0c334241) SHA1(3e5bde03330a5684a2a40fa94b33345039cd3755) ) - // miss PR1618 game - // PR1618 SND - ROM_LOAD( "95008517.bin", 0x000000, 0x100000, CRC(8092eaeb) SHA1(fea226ea7fb97226c79132aa67b89078f67cd920) ) - ROM_LOAD( "95008518.bin", 0x100000, 0x100000, CRC(6ac28d4e) SHA1(cdf50c856324130156115259efbfb7553480c749) ) - // miss PR1409 game - // PR1409 SND - ROM_LOAD( "95008402.bin", 0x000000, 0x100000, CRC(d9cbc877) SHA1(aa35f9da3d7d470ebc712a958ee2f2d2646c0cce) ) - // miss PR1414 game - // PR1414 SND - ROM_LOAD( "95008404.bin", 0x000000, 0x100000, CRC(4197f3d1) SHA1(5529090d7d396054b0b4bdf251c6c86c76ed6648) ) - // miss PR1410 game - // PR1410 SND - ROM_LOAD( "95008420.bin", 0x000000, 0x100000, CRC(cce5f09a) SHA1(8b1f30eb1c48a3e3c6c403f28e97918ddac51033) ) - // miss PR1415 game - // PR1415 SND - ROM_LOAD( "95008422.bin", 0x000000, 0x100000, CRC(5d9a6af7) SHA1(b32fd97d0e248f59b199c143f8fc2deddb4ec5fc) ) - // miss PR1635 game - // PR1635 SND - ROM_LOAD( "95008451.bin", 0x000000, 0x100000, CRC(061d309e) SHA1(588d0ecf6e27815054f4e164c44f3f1464be832b) ) - ROM_LOAD( "95008452.bin", 0x100000, 0x100000, CRC(08c35e66) SHA1(531f532e55303621d17e497cddc9398745a18211) ) - // miss PR1409 game - // PR1409 SND - ROM_LOAD( "95008458.bin", 0x000000, 0x100000, CRC(845b4fec) SHA1(4f4089bd4db0fbb50594d0e96e7d6198d85c81ba) ) - // miss PR1626 game - // PR1626 SND - ROM_LOAD( "95008497.bin", 0x000000, 0x100000, CRC(4f7907bd) SHA1(cf5dab2a40a07293b727e8a6f35dc1a57cdec6fc) ) - // miss PR1624 game - // PR1624 SND - ROM_LOAD( "95008501.bin", 0x000000, 0x080000, CRC(dd7937a8) SHA1(7aef4f451f307d0074992cdda3401fde0112b977) ) - // miss PR1630 game - // PR1630 SND - ROM_LOAD( "95008513.bin", 0x000000, 0x080000, CRC(e57f076a) SHA1(9c9c4686cc39849748f212e073a0959ff93d0ed3) ) - // miss PR1703 game - // PR1703 SND - ROM_LOAD( "95008534.bin", 0x000000, 0x100000, CRC(fe599d0a) SHA1(f5f31ea43bfc446f2b3ed1c0c88b718428addbdf) ) - // miss PR1705 game - // PR1705 SND - ROM_LOAD( "95008545.bin", 0x000000, 0x100000, CRC(8ec806e1) SHA1(1af9dd83e4da4848b7d84ee23bee29f9bcf2b404) ) - // miss PR1709 game - // PR1709 SND - ROM_LOAD( "95008558.bin", 0x000000, 0x100000, CRC(6c032de9) SHA1(3aed801f8b6f2d62fffa03054afd8ff1c3ff3ac3) ) - // miss PR1717 game - // PR1717 SND - ROM_LOAD( "95008580.bin", 0x000000, 0x100000, CRC(f6019676) SHA1(535896a199047e61274d82413904580572523e2a) ) - // miss PR1902 game - // PR1902 SND - ROM_LOAD( "95008591.bin", 0x000000, 0x100000, CRC(1cecf466) SHA1(7c54acf00b8dd4272843a7b3b3d60dc683a5f6d8) ) - // miss PR000061 GAME - // PR000061 SND - ROM_LOAD( "95009220.bin", 0x000000, 0x100000, CRC(fcfba3bf) SHA1(a06055394330e08c37d31871bafe6dbfaf9c8156) ) - ROM_LOAD( "95009221.bin", 0x100000, 0x100000, CRC(675cde24) SHA1(34dd7c654c1ec5f77a0e77840a368b084c1c302a) ) - // miss PR1014 game - // PR1014 SND - ROM_LOAD( "95008179.bin", 0x000000, 0x100000, CRC(14b735fa) SHA1(7533510de6687747fc635a5bf66da0a58c6fc718) ) - ROM_LOAD( "95008180.bin", 0x100000, 0x100000, CRC(ec441f54) SHA1(7e8bec5cd293f29fca2363e5f1ab278a532b8a47) ) - // miss PR1002 game - // PR1002 SND - ROM_LOAD( "95008115.bin", 0x000000, 0x100000, CRC(c3b2faac) SHA1(2c54d48f5798178006e82654abed42df43457e25) ) - ROM_LOAD( "95008116.bin", 0x100000, 0x100000, CRC(84e663f0) SHA1(cb0275cc3761aa16640ac5383125e2098ba80850) ) - // miss PR1008 game - // PR1008 SND - ROM_LOAD( "95008135.bin", 0x000000, 0x100000, CRC(08d7040d) SHA1(c62ce0de0d57451d0c02f0796573eef1edcab947) ) - ROM_LOAD( "95008136.bin", 0x100000, 0x100000, CRC(456cc709) SHA1(85ae7a81fbd1dc13b4395baefea82ba31e6c4d3f) ) - // miss PR1009 game - // PR1009 SND - ROM_LOAD( "95008147.bin", 0x000000, 0x100000, CRC(c74ce6b4) SHA1(426ac64234bc07ba676570b90e28fa7439d68eaa) ) - ROM_LOAD( "95008148.bin", 0x100000, 0x100000, CRC(ea146768) SHA1(2ef2e619d0c48f150619ba2176aed0fc42d43ef8) ) - // miss PR7116 game - // PR7116 SND - ROM_LOAD( "95008077.bin", 0x000000, 0x100000, CRC(32a34d15) SHA1(c23ebd30165ebc80098fd956755b98cb433a3e28) ) - ROM_LOAD( "95008078.bin", 0x100000, 0x100000, CRC(d4832994) SHA1(bdde017bb2f876252d8984a0c5b60950669f579e) ) - // miss PR1018 game - // PR1018 SND - ROM_LOAD( "95008106.bin", 0x000000, 0x100000, CRC(403935bb) SHA1(471cbc822dc2765e5c32948f7b25b2301ddab990) ) - // miss PR1004 game - // PR1004 SND - ROM_LOAD( "95008125.bin", 0x000000, 0x100000, CRC(ad1d69d5) SHA1(66d07488fdec6b1c65b41e20d74d5add22746334) ) - ROM_LOAD( "95008126.bin", 0x100000, 0x100000, CRC(28f979a8) SHA1(ce480ab19b3066343bf88d2fda78dc6a71cd61e2) ) - // PR3512 + +ROM_START( sc5_3512 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95426966.lo", 0x000001, 0x080000, CRC(70401984) SHA1(30c409ecba15e8ca8eedc67b677808ec2afde83a) ) ROM_LOAD16_BYTE( "95426967.hi", 0x000000, 0x080000, CRC(582785a3) SHA1(a8f96b6888429cf1ef6ecd74c3082121b444018d) ) ROM_LOAD16_BYTE( "95427966.lo", 0x000001, 0x080000, CRC(7f62f051) SHA1(450d282ae599eaba2cb390f69a6b889d082e4971) ) @@ -12214,10 +12232,27 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95426929.hi", 0x000000, 0x080000, CRC(ce67f814) SHA1(bf25901bd42f2aa0f9e823f77d2ce489ada93bcf) ) ROM_LOAD16_BYTE( "95427928.lo", 0x000001, 0x080000, CRC(acd1254c) SHA1(3981ed29eebe77607e3ef6d9d10c8d8cf4eb2321) ) ROM_LOAD16_BYTE( "95427929.hi", 0x000000, 0x080000, CRC(c2eef558) SHA1(5f24b5c49a96ffc6e3b3ee6a6a7f58631cc99641) ) - // PR3512 SND + + ROM_LOAD16_BYTE( "95428588.lo", 0x000001, 0x080000, CRC(4856d82d) SHA1(20f4db8c3635951e8193fcc27b761deaaca5beb1) ) + ROM_LOAD16_BYTE( "95428589.hi", 0x000000, 0x080000, CRC(fd67f2d3) SHA1(f4ec914b05896c6d6805e56a8b3c013102b4d884) ) + ROM_LOAD16_BYTE( "95428606.lo", 0x000001, 0x080000, CRC(2e5cf9ba) SHA1(0c7750cba222d577c56cc500d061fdf80c38862a) ) + ROM_LOAD16_BYTE( "95428607.hi", 0x000000, 0x080000, CRC(5ff2de2d) SHA1(259c2b1b058eb4af6985de16318b4615e382e1a9) ) + ROM_LOAD16_BYTE( "95428660.lo", 0x000001, 0x080000, CRC(c1bf933f) SHA1(d00316af07053537146f5f6c4be67f60810643e9) ) + ROM_LOAD16_BYTE( "95428661.hi", 0x000000, 0x080000, CRC(77fae0d4) SHA1(186d7bf7c37b68d99e92f4cb5ac8ba4de4a6de34) ) + ROM_LOAD16_BYTE( "95429588.lo", 0x000001, 0x080000, CRC(4279670b) SHA1(20dbce1174b2956872f1214fcc25a4e985002008) ) + ROM_LOAD16_BYTE( "95429589.hi", 0x000000, 0x080000, CRC(9b899203) SHA1(91fcd78c6fbc0ad7428097b569ae306cb097f1b8) ) + ROM_LOAD16_BYTE( "95429606.lo", 0x000001, 0x080000, CRC(0ace1695) SHA1(d51c340a6a496282ae74fcaef07437b993d39b9c) ) + ROM_LOAD16_BYTE( "95429607.hi", 0x000000, 0x080000, CRC(dce91689) SHA1(563622a2f897b39bfab9b75ad34c72677f42ec49) ) + ROM_LOAD16_BYTE( "95429660.lo", 0x000001, 0x080000, CRC(4b872485) SHA1(2cff823663de5f2beea49326e7b66d3c75bf51f7) ) + ROM_LOAD16_BYTE( "95429661.hi", 0x000000, 0x080000, CRC(7d793392) SHA1(4e7dfffc2e09d1c5fed042da133d193a3240f0c6) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009065.bin", 0x000000, 0x100000, CRC(bc5b0987) SHA1(f480f72f816b09ba2a584d4da11506fdbc3750bb) ) ROM_LOAD( "95009066.bin", 0x100000, 0x100000, CRC(8e7257ab) SHA1(8fec36322e22e1529b565bb07897ad690c50a9d4) ) - // PR3437 +ROM_END + +ROM_START( sc5_3437 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95426997.hi", 0x000000, 0x080000, CRC(cfc530b6) SHA1(38ed5f638befe9c840aa594588b5e14ea7d2aa56) ) ROM_LOAD16_BYTE( "95426996.lo", 0x000001, 0x080000, CRC(af2d7070) SHA1(a71e5e4e0cfdd157fec94a42fa7f3983e83d393a) ) ROM_LOAD16_BYTE( "95427997.hi", 0x000000, 0x080000, CRC(dc22f47a) SHA1(97e4d3de91a526dc66de1866b322cc591c4505d9) ) @@ -12242,10 +12277,19 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95429109.hi", 0x000000, 0x080000, CRC(7a97b417) SHA1(bc60009e5fa8d3a58963c2324492a7cc7085e73b) ) ROM_LOAD16_BYTE( "95429148.lo", 0x000001, 0x080000, CRC(d3bf8cec) SHA1(e0517392a0835bc91dc96fbe57a575b9e9e2e2f3) ) ROM_LOAD16_BYTE( "95429149.hi", 0x000000, 0x080000, CRC(fb6af2dd) SHA1(abf9ea20095d16a1a00d9ed8131804b80db3da05) ) - // PR3437 SND + ROM_LOAD16_BYTE( "95428500.lo", 0x000001, 0x080000, CRC(f7b19d39) SHA1(a95b726d76e8411efc7a3f2ab9e22a88fc41b52a) ) + ROM_LOAD16_BYTE( "95428501.hi", 0x000000, 0x080000, CRC(94d28bf2) SHA1(ed983cbe23aac4f317ca533f0818008066a7584d) ) + ROM_LOAD16_BYTE( "95429500.lo", 0x000001, 0x080000, CRC(27605877) SHA1(3fc02fc75184d6e851721a83579269fb078e0e55) ) + ROM_LOAD16_BYTE( "95429501.hi", 0x000000, 0x080000, CRC(e1871bb2) SHA1(3d7bb74094cf18466afd4ba37600ccc501878d1e) ) + + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009069.bin", 0x000000, 0x100000, CRC(ad83ccaa) SHA1(c979f00e53e15c1d5e4663a2dec30157b78ff3e5) ) ROM_LOAD( "95009070.bin", 0x100000, 0x100000, CRC(79b3d50f) SHA1(1b322d4df4f4a08632f0d6515928ac23815b7d8f) ) - // PR3438 +ROM_END + +ROM_START( sc5_3438 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95426999.hi", 0x000000, 0x080000, CRC(e3e6ece1) SHA1(bf130fb9be14bf92a487b283c3d7c469d4013e83) ) ROM_LOAD16_BYTE( "95426998.lo", 0x000001, 0x080000, CRC(7b2931ad) SHA1(3c86cc47878f53fec27208390900269b91a6d14c) ) ROM_LOAD16_BYTE( "95427999.hi", 0x000000, 0x080000, CRC(5eb0e390) SHA1(ed1f3a487b8736bcbd28be8ccf148b5b215a161f) ) @@ -12266,23 +12310,49 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95429107.hi", 0x000000, 0x080000, CRC(0ca72191) SHA1(1b38b285c3b19119dd3c45f97bc60829eea916f2) ) ROM_LOAD16_BYTE( "95429146.lo", 0x000001, 0x080000, CRC(f732a9d1) SHA1(c6ba08bfcdea9f7bf6656bee8048bacc0317d7f4) ) ROM_LOAD16_BYTE( "95429147.hi", 0x000000, 0x080000, CRC(218b3e3d) SHA1(77b5782b35b62f8f79551d164ec01da911edf0b7) ) - // PR3438 SND + ROM_LOAD16_BYTE( "95428502.lo", 0x000001, 0x080000, CRC(9e375c4d) SHA1(5c7d795e43c5fab98f1f348242669c6c5d32f7d0) ) + ROM_LOAD16_BYTE( "95428503.hi", 0x000000, 0x080000, CRC(4a664721) SHA1(0a8d74bb7847022795b035bb3f3f468c0fb6bdd7) ) + ROM_LOAD16_BYTE( "95429502.lo", 0x000001, 0x080000, CRC(2b4d2760) SHA1(9a15af2b207572a64c2a85821f96acee5309380b) ) + ROM_LOAD16_BYTE( "95429503.hi", 0x000000, 0x080000, CRC(60b5a184) SHA1(fc7764b52b2c7847909ed7d3889d5eeb2c01d40f) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009071.bin", 0x000000, 0x100000, CRC(6a5428ff) SHA1(6b3e541568c991c90c35fe7021ab6cbcd46b8555) ) ROM_LOAD( "95009072.bin", 0x100000, 0x100000, CRC(bf03e5b0) SHA1(f455664360617d8a2bc9ffce5603c59bc9bffbce) ) - // PR3508 +ROM_END + +ROM_START( sc5_3508 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428036.lo", 0x000001, 0x080000, CRC(2d58806c) SHA1(019af35be4f9bba7b8fa5b1c040f2f5e288811e3) ) ROM_LOAD16_BYTE( "95428037.hi", 0x000000, 0x080000, CRC(a0cabede) SHA1(e82e49d770d5c99fac4e24049090c10c553f4545) ) ROM_LOAD16_BYTE( "95429036.lo", 0x000001, 0x080000, CRC(e0d12a00) SHA1(c8a16ef6c751caac686da5d2cd95c096dd1ef861) ) ROM_LOAD16_BYTE( "95429037.hi", 0x000000, 0x080000, CRC(fdff30d8) SHA1(1e7da87f29c852913fcb2add449a0892acd7f01b) ) - // PR3529 (PR3508) - ROM_LOAD16_BYTE( "95428098.lo", 0x000001, 0x080000, CRC(1a83405b) SHA1(227c9d055103519243d37595ce446a3b2a9f703f) ) + ROM_LOAD16_BYTE( "95428098.lo", 0x000001, 0x080000, CRC(1a83405b) SHA1(227c9d055103519243d37595ce446a3b2a9f703f) ) // // PR3529 (PR3508) ROM_LOAD16_BYTE( "95428099.hi", 0x000000, 0x080000, CRC(1a8c5d39) SHA1(396ecb0adffa71ff156f8475572c1e13f91ac8e2) ) ROM_LOAD16_BYTE( "95429098.lo", 0x000001, 0x080000, CRC(cf0b27f6) SHA1(d6a7e2edf632dde814ea20210323d954b0ba2006) ) ROM_LOAD16_BYTE( "95429099.hi", 0x000000, 0x080000, CRC(ec9de330) SHA1(761130037ca1fcc058fb843c15de2be6f9948eed) ) - // PR3508 SND + + ROM_LOAD16_BYTE( "95428442.lo", 0x000001, 0x080000, CRC(b63718dd) SHA1(001839529ef48572948af7249f16d9c259ddd06c) ) + ROM_LOAD16_BYTE( "95428443.hi", 0x000000, 0x080000, CRC(de392b26) SHA1(38eb653cab184aa294bcef79b80ffb1f663e2e54) ) + ROM_LOAD16_BYTE( "95428604.lo", 0x000001, 0x080000, CRC(154030b1) SHA1(f024b1a5f8606b5fa2a5a33f8baa5cb5e700d518) ) + ROM_LOAD16_BYTE( "95428605.hi", 0x000000, 0x080000, CRC(38a62850) SHA1(4fcd8e3625ca1ccc4ced375c76615d5609af3406) ) + ROM_LOAD16_BYTE( "95428686.lo", 0x000001, 0x080000, CRC(fc2077ae) SHA1(4d12c2caa49ec68c39a26332b5d86e2c23623944) ) + ROM_LOAD16_BYTE( "95428687.hi", 0x000000, 0x080000, CRC(a57115f6) SHA1(41f122bc678693cb3d9b48795a460105a9f2dd56) ) + ROM_LOAD16_BYTE( "95429604.lo", 0x000001, 0x080000, CRC(cac0f8c9) SHA1(178d23f07c675aabce7b5f2ba2dfe27c1b62baf9) ) + ROM_LOAD16_BYTE( "95429605.hi", 0x000000, 0x080000, CRC(d3d13f51) SHA1(fcb02327e6fda77e3f5c49cd7912d3c82d91f0af) ) + ROM_LOAD16_BYTE( "95429686.lo", 0x000001, 0x080000, CRC(962b5efa) SHA1(92eb13c1292ac3e16515f6527800fa2288d3f2e0) ) + ROM_LOAD16_BYTE( "95429687.hi", 0x000000, 0x080000, CRC(16605908) SHA1(348ee69f5bd557139bfd9b201436fbc467a44404) ) + + ROM_LOAD16_BYTE( "95429442.lo", 0x000001, 0x080000, CRC(97954c6d) SHA1(c30d4830bb561ff26eb03e5c4709624e55cbd0e3) ) + ROM_LOAD16_BYTE( "95429443.hi", 0x000000, 0x080000, CRC(29eca234) SHA1(226f30afc1f2ba8101fe21f66c8fe667ff873f11) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009051.bin", 0x000000, 0x100000, CRC(7906b397) SHA1(a15fed14c0b1473e039210e28ff15a16ffd04b3e) ) ROM_LOAD( "95009052.bin", 0x100000, 0x100000, CRC(84d83879) SHA1(c2ad06bd24579392372d9ef592e2c26f5618a75b) ) - // PR3514 +ROM_END + + +ROM_START( sc5_3514 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428069.hi", 0x000000, 0x080000, CRC(f9b93bb5) SHA1(149c3bece4d0fcb093c956c9f654649865fe851d) ) ROM_LOAD16_BYTE( "95428068.lo", 0x000001, 0x080000, CRC(e5fef6c8) SHA1(ed91eb0877ca271c8efadb17f52c812b0ec8d490) ) ROM_LOAD16_BYTE( "95428156.lo", 0x000001, 0x080000, CRC(7d9067b2) SHA1(663b438ae6ebde5a7846000d2b956adbd2d517ba) ) @@ -12295,10 +12365,31 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "p3514p72.hi", 0x000000, 0x080000, CRC(8f50ff98) SHA1(1add4691cc7777b54eb88c3a3396ba6684cb6667) ) ROM_LOAD16_BYTE( "p3514s72.lo", 0x000001, 0x080000, CRC(1472f2a9) SHA1(b6282ccdafda1feb642af7e9e51308cea67d1b3d) ) ROM_LOAD16_BYTE( "p3514s72.hi", 0x000000, 0x080000, CRC(1b90a20a) SHA1(5d49199483c8cb79c3b4e81dade49038a7abec22) ) - // PR3514 SND + + ROM_LOAD16_BYTE( "95428438.lo", 0x000001, 0x080000, CRC(e9acb1fa) SHA1(f5bffa109a105efae03c149a0c5a700202be35f0) ) + ROM_LOAD16_BYTE( "95428439.hi", 0x000000, 0x080000, CRC(f910fdf2) SHA1(0bfbfb3bec12b29f69fb08721e4b9382129a2b48) ) + ROM_LOAD16_BYTE( "95428472.lo", 0x000001, 0x080000, CRC(bfacdf26) SHA1(ac71aebed8e8ab9a266b887051c865af7674b86a) ) + ROM_LOAD16_BYTE( "95428473.hi", 0x000000, 0x080000, CRC(10457e38) SHA1(9cbd94c1d88d75b51e2a176ddc941f7d7477a562) ) + ROM_LOAD16_BYTE( "95428570.lo", 0x000001, 0x080000, CRC(99f97b3c) SHA1(7f0dd3ef7ff23885b4f58233e1e54e0e7c82652e) ) + ROM_LOAD16_BYTE( "95428571.hi", 0x000000, 0x080000, CRC(74deb911) SHA1(de42ef4a007eceb587ed647dbf6711b425fd47cf) ) + ROM_LOAD16_BYTE( "95428650.lo", 0x000001, 0x080000, CRC(69a1ac92) SHA1(96771975b015d3bef7fed6c05d30e608cb27a5fa) ) + ROM_LOAD16_BYTE( "95428651.hi", 0x000000, 0x080000, CRC(ad0df019) SHA1(8bb460c48d6dfdff542fdf87189e838123508deb) ) + ROM_LOAD16_BYTE( "95429438.lo", 0x000001, 0x080000, CRC(49fef851) SHA1(5616b2ce1556087abe852ec987dbdb88328d7b72) ) + ROM_LOAD16_BYTE( "95429439.hi", 0x000000, 0x080000, CRC(d2771f7b) SHA1(013a2663ae3ce32714c2439a94b65001a7a1750e) ) + ROM_LOAD16_BYTE( "95429472.lo", 0x000001, 0x080000, CRC(754918b7) SHA1(5b044ae556ed46d0611009d88678e4b7e6453eee) ) + ROM_LOAD16_BYTE( "95429473.hi", 0x000000, 0x080000, CRC(289269f8) SHA1(0994726c5c543605c29e3e7b7f70cc8ad9d3e592) ) + ROM_LOAD16_BYTE( "95429570.lo", 0x000001, 0x080000, CRC(8d88dfd6) SHA1(16f59e000a086a41c3aa6aa23d24ecad91642633) ) + ROM_LOAD16_BYTE( "95429571.hi", 0x000000, 0x080000, CRC(30f05a14) SHA1(e13f373da31762f970acb1fc3c66c611c49c818e) ) + ROM_LOAD16_BYTE( "95429650.lo", 0x000001, 0x080000, CRC(b1323fa7) SHA1(ac707119cab1bfaed5b7a626b4aa5c6521167c3a) ) + ROM_LOAD16_BYTE( "95429651.hi", 0x000000, 0x080000, CRC(eb5fcb0b) SHA1(9c9ff4e73a4f2971095993fc4785b7f612fc6a8a) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009083.bin", 0x000000, 0x100000, CRC(f88b86e7) SHA1(626f6aaeb5e71de113e0b7715cf68386adbe5f86) ) ROM_LOAD( "95009084.bin", 0x100000, 0x100000, CRC(db16a8ff) SHA1(0fb5b7a5cc16e30a17cd85279b31443215135657) ) - // PR3517 +ROM_END + +ROM_START( sc5_3517 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428070.lo", 0x000001, 0x080000, CRC(f367368d) SHA1(80be2ab2bae77e7d2eb275a09c0f66e88c61431f) ) ROM_LOAD16_BYTE( "95428071.hi", 0x000000, 0x080000, CRC(bdb6d356) SHA1(cff74b60f52393424273c78bdc946b2e21a92f1f) ) ROM_LOAD16_BYTE( "95428216.lo", 0x000001, 0x080000, CRC(357a34c6) SHA1(f1d3d695fe4a3ad7de8e67153193894ab2b5a291) ) @@ -12307,10 +12398,26 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95429071.hi", 0x000000, 0x080000, CRC(6eda6da6) SHA1(87e5dd26f77af56278e548f10a831a85f9f8197c) ) ROM_LOAD16_BYTE( "95429216.lo", 0x000001, 0x080000, CRC(7cb97ad7) SHA1(5eec34cdfb49c107be139196722a9eb224e6388b) ) ROM_LOAD16_BYTE( "95429217.hi", 0x000000, 0x080000, CRC(84d4ca2c) SHA1(d53a4a85a14b211d45e5ca611bda471ad1cbfb48) ) - // PR3517 SND + ROM_LOAD16_BYTE( "95428424.lo", 0x000001, 0x080000, CRC(201a3f90) SHA1(0957415866a3768bbc1b85362932fa8346bf9976) ) + ROM_LOAD16_BYTE( "95428425.hi", 0x000000, 0x080000, CRC(1ed269c2) SHA1(627064372b19b8300de691c59dc36fbc2e90ddfc) ) + ROM_LOAD16_BYTE( "95428568.lo", 0x000001, 0x080000, CRC(6fa147a6) SHA1(2435ebb26012ed7166903528a132728be0bdb166) ) + ROM_LOAD16_BYTE( "95428569.hi", 0x000000, 0x080000, CRC(cdd0b319) SHA1(a55f104ffc2219c6d94e6982a503e51a5a012485) ) + ROM_LOAD16_BYTE( "95428652.lo", 0x000001, 0x080000, CRC(ffa3d953) SHA1(3b6809614a873885e7a46c37e0cc2ad00fed1fcd) ) + ROM_LOAD16_BYTE( "95428653.hi", 0x000000, 0x080000, CRC(85955c67) SHA1(d756c4b91f1a53a2bcc2ec1110709faa87b0198b) ) + ROM_LOAD16_BYTE( "95429424.lo", 0x000001, 0x080000, CRC(e3a73517) SHA1(63406b3d7564c078537685b4acd8222df9e04919) ) + ROM_LOAD16_BYTE( "95429425.hi", 0x000000, 0x080000, CRC(4234f965) SHA1(3ce0bd77b2dae81f669600e0a2557ae40a5687dd) ) + ROM_LOAD16_BYTE( "95429568.lo", 0x000001, 0x080000, CRC(65c626b4) SHA1(e4826584cf541fb61b14143724d77bf2c134b3a8) ) + ROM_LOAD16_BYTE( "95429569.hi", 0x000000, 0x080000, CRC(6fc2de34) SHA1(a985d74fe0981c6463c1be061e1c5c6b0c8fc3aa) ) + ROM_LOAD16_BYTE( "95429652.lo", 0x000001, 0x080000, CRC(19ff4276) SHA1(cdf7c7d0af73bc8b72fdb1849e38ea00837fc3fe) ) + ROM_LOAD16_BYTE( "95429653.hi", 0x000000, 0x080000, CRC(dce77f11) SHA1(74997df691ff396504254a4c7355a6f448579072) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009087.bin", 0x000000, 0x100000, CRC(f6c4afa6) SHA1(0891cf1e8514fea6f676c27e0fef3e1098315f9d) ) ROM_LOAD( "95009088.bin", 0x100000, 0x100000, CRC(03340dd1) SHA1(71043502f18e0d74794700abf0a479d0da8a2718) ) - // PR3524 +ROM_END + +ROM_START( sc5_3524 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428074.lo", 0x000001, 0x080000, CRC(56c27552) SHA1(99a10071112cdb8096f9f82c07925ee246ba309d) ) ROM_LOAD16_BYTE( "95428075.hi", 0x000000, 0x080000, CRC(c6f115fe) SHA1(82fa853628e63dd6b18b167d1b93a25538e7e0ee) ) ROM_LOAD16_BYTE( "95429074.lo", 0x000001, 0x080000, CRC(b70d6faa) SHA1(fd65f817a05d9769571293715c15d9f970bc67f8) ) @@ -12319,18 +12426,24 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95426977.hi", 0x000000, 0x080000, CRC(3199fa1c) SHA1(fc00f47e91b85d1278dde9828462975d39ce28c5) ) ROM_LOAD16_BYTE( "95427976.lo", 0x000001, 0x080000, CRC(60eef37a) SHA1(46d261cba4c90d606c50269078c3cbb434991ae7) ) ROM_LOAD16_BYTE( "95427977.hi", 0x000000, 0x080000, CRC(48eae9b2) SHA1(29a8dd329e9939e505537b4789654a3036a75610) ) - // PR3524 SND + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009075.bin", 0x000000, 0x100000, CRC(ebf64ae7) SHA1(c7e696acdbf2565959d9b7c76544738d467747f8) ) ROM_LOAD( "95009076.bin", 0x100000, 0x100000, CRC(c066ee96) SHA1(ded6c8e778fe2f7055a006a49cc500184902d14b) ) - // PR3515 +ROM_END + +ROM_START( sc5_3515 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428102.lo", 0x000001, 0x080000, CRC(928d7368) SHA1(fe0f0e267086c70396a7767010ccb63fc04314a1) ) ROM_LOAD16_BYTE( "95428103.hi", 0x000000, 0x080000, CRC(085f53a4) SHA1(25d0bbfaeb5734bfc601e9972e367b53136155cb) ) ROM_LOAD16_BYTE( "95429102.lo", 0x000001, 0x080000, CRC(1c3adf38) SHA1(284bc2d4599b183a3363dbc084900b9fa42ef753) ) ROM_LOAD16_BYTE( "95429103.hi", 0x000000, 0x080000, CRC(04517fe4) SHA1(7f72272709dd24d5d3c7cb87fdda45d0e58dd122) ) - // PR3515 SND + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009096.bin", 0x000000, 0x100000, CRC(169abeea) SHA1(86e5509ac9b8d4c683e518cbcbadf7cfc5513a03) ) ROM_LOAD( "95009097.bin", 0x100000, 0x100000, CRC(ead286a6) SHA1(823e59c7c4ddecf65f84011dcc2ec37533cfcd5c) ) - // PR3548 (PR3511) +ROM_END + +ROM_START( sc5_3511 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) // PR3548 (PR3511) ROM_LOAD16_BYTE( "95428124.lo", 0x000001, 0x080000, CRC(1fe615f3) SHA1(1a78c964824e01c8bd1ab44dd81feb8229d85cb9) ) ROM_LOAD16_BYTE( "95428125.hi", 0x000000, 0x080000, CRC(07c479f1) SHA1(28fe1cd5cd436e7a291ec3ffbc6c922d3a94b7e3) ) ROM_LOAD16_BYTE( "95429124.lo", 0x000001, 0x080000, CRC(004745f8) SHA1(a0674e198d92eab830b199d4e379d11d605a7726) ) @@ -12347,10 +12460,30 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95428119.hi", 0x000000, 0x080000, CRC(6fc46dc7) SHA1(600ebcf7ee8bd60a110ebc4440ff42e26327c47d) ) ROM_LOAD16_BYTE( "95429118.lo", 0x000001, 0x080000, CRC(457f5ed0) SHA1(92259ec19e813157cd950312bb972b3b782226c8) ) ROM_LOAD16_BYTE( "95429119.hi", 0x000000, 0x080000, CRC(0ba31071) SHA1(33411bb55ab890d96dfb2ebf74eab8032395526a) ) - // PR3511 SND + ROM_LOAD16_BYTE( "95428366.lo", 0x000001, 0x080000, CRC(0f43514c) SHA1(24254451aeb5f194a703ea83a95cefcf28314263) ) + ROM_LOAD16_BYTE( "95428367.hi", 0x000000, 0x080000, CRC(acb9a9c2) SHA1(23e6cf11c50861838ed27900c4bd343b48f920cd) ) + ROM_LOAD16_BYTE( "95428448.lo", 0x000001, 0x080000, CRC(f0c91adc) SHA1(532c7f9bb993ae47896cfeb67197b342fd55aa8f) ) + ROM_LOAD16_BYTE( "95428449.hi", 0x000000, 0x080000, CRC(a3ccfd56) SHA1(218ed9712d791cc8563031a1de2dbdf07568f94f) ) + ROM_LOAD16_BYTE( "95428600.lo", 0x000001, 0x080000, CRC(02a43981) SHA1(20721a6414f9f8149ea1f9fac7d94f63dd7ec98d) ) + ROM_LOAD16_BYTE( "95428601.hi", 0x000000, 0x080000, CRC(99aa304d) SHA1(7c26d4c6733104fe2c4d5bf9f0c60627bcddcf71) ) + ROM_LOAD16_BYTE( "95428646.lo", 0x000001, 0x080000, CRC(ddd56e80) SHA1(c4332855a5d34ad302ffeffb3311b2df9633c380) ) + ROM_LOAD16_BYTE( "95428647.hi", 0x000000, 0x080000, CRC(ff77b6c2) SHA1(23762dac240bf0f4407a0fd98211fd5e0c0f9020) ) + ROM_LOAD16_BYTE( "95429366.lo", 0x000001, 0x080000, CRC(0989b128) SHA1(02a9a89f0954ff637671f97595144287ecfe91bb) ) + ROM_LOAD16_BYTE( "95429367.hi", 0x000000, 0x080000, CRC(3f5ebb32) SHA1(3829d59b92d8d885c2f45fc4534d43c9774509ef) ) + ROM_LOAD16_BYTE( "95429448.lo", 0x000001, 0x080000, CRC(d7ef6ed3) SHA1(db1d780a072ac735f928ca748e3389e8c4ad7e5a) ) + ROM_LOAD16_BYTE( "95429449.hi", 0x000000, 0x080000, CRC(006cfbab) SHA1(90a8c367310b6e6578c28e0dc8aba83f8ab77e87) ) + ROM_LOAD16_BYTE( "95429600.lo", 0x000001, 0x080000, CRC(a472eff3) SHA1(971c70dd38f2ac6cc2c8d71473464727dc4e90e9) ) + ROM_LOAD16_BYTE( "95429601.hi", 0x000000, 0x080000, CRC(fa47b8a6) SHA1(a2f8be18fbe6adee42ec5c235444ef5220f5635b) ) + ROM_LOAD16_BYTE( "95429646.lo", 0x000001, 0x080000, CRC(88f3900c) SHA1(49c7c760b39ff3f6db2c478aa7a9c70a780c4c3d) ) + ROM_LOAD16_BYTE( "95429647.hi", 0x000000, 0x080000, CRC(d2915c17) SHA1(bbfbbd1d67366c85fe19959e2f10611e03ef6c12) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009059.bin", 0x000000, 0x100000, CRC(a3264545) SHA1(94b324c93edad7975ee152a7daaf7f6d7b91cb5e) ) ROM_LOAD( "95009060.bin", 0x100000, 0x100000, CRC(3cb58cf3) SHA1(f1eaeba8633c42ef43b4b32deb154f0683d8d42a) ) - // PR3513 +ROM_END + +ROM_START( sc5_3513 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428134.lo", 0x000001, 0x080000, CRC(2ea5ea17) SHA1(beb98a46a03a46a9a9d8c25dbd65b44b1f006148) ) ROM_LOAD16_BYTE( "95428135.hi", 0x000000, 0x080000, CRC(1acf4c22) SHA1(f1b0363136e022dd8fe943ae9796b064f6b8fd13) ) ROM_LOAD16_BYTE( "95428138.lo", 0x000001, 0x080000, CRC(0600a569) SHA1(e1b23441bc61f02894a886fb684dcb50cba796fd) ) @@ -12367,26 +12500,68 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95428073.hi", 0x000000, 0x080000, CRC(8d4483d4) SHA1(be034806dcf6ae0cb05f46d2b1118a15929fa1af) ) ROM_LOAD16_BYTE( "95429072.lo", 0x000001, 0x080000, CRC(3ea6b56b) SHA1(1644611cf0e3cff45ccbc2f5c124eb8cafa15c98) ) ROM_LOAD16_BYTE( "95429073.hi", 0x000000, 0x080000, CRC(a14b4977) SHA1(6f51b919609b510a65198cca9a472875ff4b7d63) ) - // PR3513 SND + ROM_LOAD16_BYTE( "95428446.lo", 0x000001, 0x080000, CRC(21c2fa01) SHA1(8bd875fc7e15c9bdcc3cbb3f6080c7b2927b8652) ) + ROM_LOAD16_BYTE( "95428447.hi", 0x000000, 0x080000, CRC(5c535706) SHA1(0c57b56247d1b82728aac89bf0096fcdc5ffbd9a) ) + ROM_LOAD16_BYTE( "95428488.lo", 0x000001, 0x080000, CRC(16eed273) SHA1(8bdb5d4b81e007ec480b6002a5db13f97cfa1d1f) ) + ROM_LOAD16_BYTE( "95428489.hi", 0x000000, 0x080000, CRC(7ca472bc) SHA1(3272ee513c6a94cde7c76271a1d27c98343dcf1c) ) + ROM_LOAD16_BYTE( "95428564.lo", 0x000001, 0x080000, CRC(b88a066c) SHA1(dcc05c222a6b97d3b7d14e68b8809c3223b26640) ) + ROM_LOAD16_BYTE( "95428565.hi", 0x000000, 0x080000, CRC(937ae70c) SHA1(3ef26cada09077fd50194078eaba56421a63224e) ) + ROM_LOAD16_BYTE( "95428658.lo", 0x000001, 0x080000, CRC(c6db9d12) SHA1(4b2909e326ece31bf708f6560751a2aee3ff0017) ) + ROM_LOAD16_BYTE( "95428659.hi", 0x000000, 0x080000, CRC(586375e7) SHA1(1f476f50de7f76ac89acd4f012e3e85758514446) ) + ROM_LOAD16_BYTE( "95429446.lo", 0x000001, 0x080000, CRC(9800db82) SHA1(5477784ef41beb667127631e90890edeeeddd50e) ) + ROM_LOAD16_BYTE( "95429447.hi", 0x000000, 0x080000, CRC(08562982) SHA1(e7f2d283115fe96adb3927102854588d71a3faf1) ) + ROM_LOAD16_BYTE( "95429488.lo", 0x000001, 0x080000, CRC(b89dcb24) SHA1(69e6e5616f83c0d2add936fe3dbfdabdb8fee73c) ) + ROM_LOAD16_BYTE( "95429489.hi", 0x000000, 0x080000, CRC(735daa6d) SHA1(3b2bcccea88da4b6370c98f687bfb90401b35ef7) ) + ROM_LOAD16_BYTE( "95429564.lo", 0x000001, 0x080000, CRC(97de43d5) SHA1(640d97495debabe12d06870908506134d56c92a3) ) + ROM_LOAD16_BYTE( "95429565.hi", 0x000000, 0x080000, CRC(62e38b1c) SHA1(4dcb62ba46b1efeb9a8e4c3acf01415f536f2d79) ) + ROM_LOAD16_BYTE( "95429658.lo", 0x000001, 0x080000, CRC(f9262a50) SHA1(59ce98a90ca7363a4de87a03a68d30c5f2b0d132) ) + ROM_LOAD16_BYTE( "95429659.hi", 0x000000, 0x080000, CRC(f9b73665) SHA1(ca695961083d9030b9cbc248c37f71546e90e4c9) ) + + + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009079.bin", 0x000000, 0x100000, CRC(4c7d4c93) SHA1(0660160ced0b43c420ed8abd3572c11feb45065a) ) ROM_LOAD( "95009080.bin", 0x100000, 0x100000, CRC(08052a11) SHA1(44f76e02edaedf9ee4a11d7eb433df3127133c91) ) - // PR3516 +ROM_END + +ROM_START( sc5_3516 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428155.hi", 0x000000, 0x080000, CRC(07def814) SHA1(34aaa04ea1e5b3c3c2ce86a2405cc367ed1c1c49) ) ROM_LOAD16_BYTE( "95428154.lo", 0x000001, 0x080000, CRC(2a3bcc53) SHA1(d1ed8ab07e0bab008fc17829a3399b4efe74a888) ) ROM_LOAD16_BYTE( "95429155.hi", 0x000000, 0x080000, CRC(37dea4ed) SHA1(49f0227ba54ac2a95692d0474fd9b09c7508e2a1) ) ROM_LOAD16_BYTE( "95429154.lo", 0x000001, 0x080000, CRC(9d0ecc83) SHA1(40d4255526ac43f11696a96ad881277229444d8b) ) - // PR3516 SND + ROM_LOAD16_BYTE( "95428220.lo", 0x000001, 0x080000, CRC(8cfe4eca) SHA1(1f5af5bce4830bec29555665d861293ac8785b48) ) + ROM_LOAD16_BYTE( "95428221.hi", 0x000000, 0x080000, CRC(878470c5) SHA1(1455680540fe69610aa7ee578587b4006107b091) ) + ROM_LOAD16_BYTE( "95428552.lo", 0x000001, 0x080000, CRC(4b930061) SHA1(9e7d4e8b5641dd9967c9790c08517f3c11f50699) ) + ROM_LOAD16_BYTE( "95428553.hi", 0x000000, 0x080000, CRC(a6df5e0c) SHA1(6fd9c089b7ab0cbd2a727c10825bf1bb97a8a64c) ) + ROM_LOAD16_BYTE( "95428656.lo", 0x000001, 0x080000, CRC(d653003e) SHA1(9809bcff2e4900936e213a0e7b3be4e2d5fa0ae4) ) + ROM_LOAD16_BYTE( "95428657.hi", 0x000000, 0x080000, CRC(fee27b31) SHA1(7a2932951746a3878fbbb4175de028db82641545) ) + ROM_LOAD16_BYTE( "95429220.lo", 0x000001, 0x080000, CRC(c11004d8) SHA1(4c9b2a4f71c8b830a501e8843b9bfd4722334c4b) ) + ROM_LOAD16_BYTE( "95429221.hi", 0x000000, 0x080000, CRC(6582ecdc) SHA1(0c4ac62d290e10c16b544179391bd047e3a9bbd8) ) + ROM_LOAD16_BYTE( "95429656.lo", 0x000001, 0x080000, CRC(01d24e48) SHA1(6a096f5382b547004749dcb3878f8506244ee92a) ) + ROM_LOAD16_BYTE( "95429657.hi", 0x000000, 0x080000, CRC(bb2701fb) SHA1(918edc856f72fedd2165841db0b0aae334022e7b) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009085.bin", 0x000000, 0x100000, CRC(b1d06a53) SHA1(f552a8996bb6da21493e742e274edadbfc39a7ce) ) ROM_LOAD( "95009086.bin", 0x100000, 0x100000, CRC(d686d21c) SHA1(041aa809d97a29a9cf9677ecf58bee0d3b33d3c9) ) - // PR3530 +ROM_END + +ROM_START( sc5_3530 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428215.hi", 0x000000, 0x080000, CRC(28786a84) SHA1(b7567de67523a8999f08ec92ae5001a3105d2792) ) ROM_LOAD16_BYTE( "95428214.lo", 0x000001, 0x080000, CRC(36c60f3e) SHA1(39e92bc3f13a31eed20520025ef2a0ee0b5b8847) ) ROM_LOAD16_BYTE( "95429215.hi", 0x000000, 0x080000, CRC(f4175b05) SHA1(7d2e176933a7c42d9560640dd053daa74074095b) ) ROM_LOAD16_BYTE( "95429214.lo", 0x000001, 0x080000, CRC(bd3a6383) SHA1(5e64da2dd7729efd7469116db6753ce52adf5799) ) - // PR3530 SND + ROM_LOAD16_BYTE( "95429552.lo", 0x000001, 0x080000, CRC(776fa5bc) SHA1(e8103e0304cd07aba10dec26e31a841c9da911b7) ) + ROM_LOAD16_BYTE( "95429553.hi", 0x000000, 0x080000, CRC(c17cf1d5) SHA1(b13e4f392a52fd85c64786f71f0b508b0617acbb) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009226.bin", 0x000000, 0x100000, CRC(d2a48a2b) SHA1(16f5e56af424ba78bc3378984ef5caaa65dcd8ae) ) ROM_LOAD( "95009227.bin", 0x100000, 0x100000, CRC(f6eae9c0) SHA1(73092581d314e91e3472d95aa1a4cf0fea03d333) ) - // PR3552 +ROM_END + +ROM_START( sc5_3552 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429183.hi", 0x000000, 0x080000, CRC(728e5461) SHA1(2151eecc457bd88902dd89b7ad0483618968076f) ) ROM_LOAD16_BYTE( "95429182.lo", 0x000001, 0x080000, CRC(780379b4) SHA1(5bd4ebc146f5685664c67b3e6ff1b82d4d2e5253) ) ROM_LOAD16_BYTE( "95429178.lo", 0x000001, 0x080000, CRC(b450a87e) SHA1(e92eee85a87adf71f76796d5c2a3804ae2b624fd) ) @@ -12397,10 +12572,13 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95428229.hi", 0x000000, 0x080000, CRC(4654985b) SHA1(3265d7948c5546a77af48a972ea088154fe862d8) ) ROM_LOAD16_BYTE( "95429228.lo", 0x000001, 0x080000, CRC(3fc56849) SHA1(035de2fd128a3a857d34674399a0c09c913fe504) ) ROM_LOAD16_BYTE( "95429229.hi", 0x000000, 0x080000, CRC(4ac6f75d) SHA1(a212018d963ad62b83074f9716df7b9e76c4cfbf) ) - // PR3552 SND + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009218.bin", 0x000000, 0x100000, CRC(07abc1b6) SHA1(b180e47dc0c17feb447563c3dc907aee2f10940f) ) ROM_LOAD( "95009219.bin", 0x100000, 0x100000, CRC(ba796f0a) SHA1(f0e772b0bde828c8491f19a52d42591749aea79a) ) - // PR3551 +ROM_END + +ROM_START( sc5_3551 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429166.lo", 0x000001, 0x080000, CRC(6a3e04bd) SHA1(337293ae08aa701fb69d8611c272dade257a06a7) ) ROM_LOAD16_BYTE( "95429167.hi", 0x000000, 0x080000, CRC(043e2a42) SHA1(3303057d13e003478593c0613ca5b72d9c0fa816) ) ROM_LOAD16_BYTE( "95428166.lo", 0x000001, 0x080000, CRC(79bc8e6a) SHA1(cd6d4bbd69fc62d42246b8323e2d6cdb89539daa) ) @@ -12413,10 +12591,35 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95428151.hi", 0x000000, 0x080000, CRC(9953d2cf) SHA1(846cca1f51bc39aa2d04476e54c06f7ef258a9ba) ) ROM_LOAD16_BYTE( "95429150.lo", 0x000001, 0x080000, CRC(5a9c54bf) SHA1(cd5b44419a3677b9bc53541ddb45256b0cb6ece7) ) ROM_LOAD16_BYTE( "95429151.hi", 0x000000, 0x080000, CRC(63f465a2) SHA1(cedb38529e38272cb289f78d4e19aa77e93cc85f) ) - // PR3551 SND + + ROM_LOAD16_BYTE( "95428360.lo", 0x000001, 0x080000, CRC(464de7b6) SHA1(6c86c22c08d107be852d7cab0f3a9e57c7e75a29) ) + ROM_LOAD16_BYTE( "95428361.hi", 0x000000, 0x080000, CRC(fd0726a0) SHA1(30dcbe460c301648daf0b2aa455bb73f02039073) ) + ROM_LOAD16_BYTE( "95428380.lo", 0x000001, 0x080000, CRC(791dfbec) SHA1(c8e8e978d8cc8501c055a307466a4cab662f9b3c) ) + ROM_LOAD16_BYTE( "95428381.hi", 0x000000, 0x080000, CRC(d94c1977) SHA1(1ce6dc80627beb5ab07386a6cc344d47d3ebfd9b) ) + ROM_LOAD16_BYTE( "95428494.lo", 0x000001, 0x080000, CRC(4d2b30c3) SHA1(42a8f0daf3a8a9fe969f992af9781d65479bc7bd) ) + ROM_LOAD16_BYTE( "95428495.hi", 0x000000, 0x080000, CRC(460da726) SHA1(15acdbae9adb33511b89bab13d8c146a7c7a041f) ) + ROM_LOAD16_BYTE( "95428580.lo", 0x000001, 0x080000, CRC(5fd66db4) SHA1(63a4d5779ffcd36bca3f6f99ca972756fe86280a) ) + ROM_LOAD16_BYTE( "95428581.hi", 0x000000, 0x080000, CRC(1a2b9b1b) SHA1(ab0728b5b490e25a9b6890586ed325efc562b516) ) + ROM_LOAD16_BYTE( "95428644.lo", 0x000001, 0x080000, CRC(0fc8ba6d) SHA1(1d83ead26a707cfda5cc34c6fb80e5e3a2599da8) ) + ROM_LOAD16_BYTE( "95428645.hi", 0x000000, 0x080000, CRC(beb85b50) SHA1(110c1c956d9903a218c096fb7a9996385a3034cf) ) + ROM_LOAD16_BYTE( "95429360.lo", 0x000001, 0x080000, CRC(e98edab7) SHA1(b700fb25a20e45a925ff0fbd41553f8ccc9bb6d8) ) + ROM_LOAD16_BYTE( "95429361.hi", 0x000000, 0x080000, CRC(fa5c1c40) SHA1(db43625ec940544a6c44333ac20d43d04dcb815e) ) + ROM_LOAD16_BYTE( "95429380.lo", 0x000001, 0x080000, CRC(bb87ec99) SHA1(024678d6d824dad46e7470db89d510f3273d83c1) ) + ROM_LOAD16_BYTE( "95429381.hi", 0x000000, 0x080000, CRC(6a7f096f) SHA1(710e5815e7b3639a1d539087610de80af9a5e0dc) ) + ROM_LOAD16_BYTE( "95429494.lo", 0x000001, 0x080000, CRC(b97684b8) SHA1(d7f9bb957f6b80c23a6dc15e02e7f6853aaed04f) ) + ROM_LOAD16_BYTE( "95429495.hi", 0x000000, 0x080000, CRC(ca868ab0) SHA1(bd03321510a1a72bfeada937f2dc341e9caede22) ) + ROM_LOAD16_BYTE( "95429580.lo", 0x000001, 0x080000, CRC(bb278135) SHA1(5a619ff8b63998eb24ed9759df606486ea3389ec) ) + ROM_LOAD16_BYTE( "95429581.hi", 0x000000, 0x080000, CRC(b27a722a) SHA1(c7596d84d89ebe031814aa23806e118659e09612) ) + ROM_LOAD16_BYTE( "95429644.lo", 0x000001, 0x080000, CRC(45a215c3) SHA1(d4895df79737aaefc734cce596241b4923a57ee6) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009210.bin", 0x000000, 0x100000, CRC(ac43a79b) SHA1(e987337506d10f0d430eebbe9e736c905ea06ffd) ) ROM_LOAD( "95009211.bin", 0x100000, 0x100000, CRC(f2cc0e0f) SHA1(29fbf4cc573bd5eceda6d8b722b2708f5b2fb3d5) ) - // PR3525 +ROM_END + + +ROM_START( sc5_3525 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429200.lo", 0x000001, 0x080000, CRC(d3d165cb) SHA1(e948e486859e8398ac27688a3370ac5b089539f9) ) ROM_LOAD16_BYTE( "95429201.hi", 0x000000, 0x080000, CRC(239f02fc) SHA1(3e26ffa6a5618db211c9de56ee13d5f453fd0e03) ) ROM_LOAD16_BYTE( "95428200.lo", 0x000001, 0x080000, CRC(0c8e5f3e) SHA1(c5b3e724ff1493afc74f93d7697dd8ba967f86a5) ) @@ -12425,26 +12628,73 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95428240.lo", 0x000001, 0x080000, CRC(e0903e18) SHA1(9de804958205ccbd5bc40f0f788eaaeacebb0330) ) ROM_LOAD16_BYTE( "95429241.hi", 0x000000, 0x080000, CRC(008c38e7) SHA1(1b84f830c98eecaeffb70291fbda374642ea06c6) ) ROM_LOAD16_BYTE( "95429240.lo", 0x000001, 0x080000, CRC(8005f150) SHA1(ec90466684cb5c9854f6778e2fd33d40b2ff8b97) ) - // PR3525 SND + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009214.bin", 0x000000, 0x100000, CRC(0802e651) SHA1(6ef9e02fb62693109119f69315615cc854a9ec06) ) ROM_LOAD( "95009215.bin", 0x100000, 0x100000, CRC(7b7796a3) SHA1(4283a74ff62d0ecf4beaae5e1c8805e3bf8a2e25) ) - // PR3516 (PR3553) +ROM_END + +ROM_START( sc5_3553 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428244.lo", 0x000001, 0x080000, CRC(7963fb2a) SHA1(3ab98e4fd1fe5e82ba828f552ccb559e23f2a606) ) ROM_LOAD16_BYTE( "95428245.hi", 0x000000, 0x080000, CRC(71d6865d) SHA1(8167b473215e5e914f323da86ec9a2138be2c455) ) ROM_LOAD16_BYTE( "95429244.lo", 0x000001, 0x080000, CRC(a8979a3d) SHA1(284eb03d4cb93a2aa1f2f8e59ddbbfc20de759e5) ) ROM_LOAD16_BYTE( "95429245.hi", 0x000000, 0x080000, CRC(d27ef12c) SHA1(dcbc5bb36af9088607fc4894b5786c5cac41b6d7) ) - // PR3553 SND + ROM_LOAD16_BYTE( "95428444.lo", 0x000001, 0x080000, CRC(4d383b72) SHA1(90e57a5249c154828f3efdf0f4ae3c08782d05f4) ) + ROM_LOAD16_BYTE( "95428445.hi", 0x000000, 0x080000, CRC(d78a50d5) SHA1(506907fd98a4693111b68eb63d562412cc72f7f9) ) + ROM_LOAD16_BYTE( "95428480.lo", 0x000001, 0x080000, CRC(6d1d6ff3) SHA1(937522860f095e36d5cf95fd54747211e6180dd0) ) + ROM_LOAD16_BYTE( "95428481.hi", 0x000000, 0x080000, CRC(e2fca9d1) SHA1(f23baf9a3d59cfd5458f2e900af8d01237f19e6a) ) + ROM_LOAD16_BYTE( "95428574.lo", 0x000001, 0x080000, CRC(0a5a4728) SHA1(1eb8c2ceb0a3f18e66bd66eda1065d566d8c376c) ) + ROM_LOAD16_BYTE( "95428575.hi", 0x000000, 0x080000, CRC(de88f5f8) SHA1(a76b7b12161357b21bb4d05fc0d6adc9f1920c82) ) + ROM_LOAD16_BYTE( "95428638.lo", 0x000001, 0x080000, CRC(f4135740) SHA1(82078278f99213839dbe79b7ebdbbeb12c500e2b) ) + ROM_LOAD16_BYTE( "95428639.hi", 0x000000, 0x080000, CRC(7b2fd9e5) SHA1(4bec59e1e296b35408e1ce1c3a95b368fdd25c0d) ) + ROM_LOAD16_BYTE( "95429444.lo", 0x000001, 0x080000, CRC(3983392c) SHA1(cc9f364b5ba799e5792388ba7c2726ca8d125958) ) + ROM_LOAD16_BYTE( "95429445.hi", 0x000000, 0x080000, CRC(89e5208f) SHA1(22f500a296de055a55c5896800b9116080f7e22d) ) + ROM_LOAD16_BYTE( "95429480.lo", 0x000001, 0x080000, CRC(50704123) SHA1(aec43e17bec4d50baa085cdda1cde0a0ee1aab61) ) + ROM_LOAD16_BYTE( "95429481.hi", 0x000000, 0x080000, CRC(a067258e) SHA1(9088f4e30210427aa132aadbead5b7911999d42d) ) + ROM_LOAD16_BYTE( "95429574.lo", 0x000001, 0x080000, CRC(f120f8ec) SHA1(472bfe4a5e5ea5795e9da953c21fc79b8494b42c) ) + ROM_LOAD16_BYTE( "95429575.hi", 0x000000, 0x080000, CRC(3a514f6e) SHA1(0f42d787702ec81e0e6ea0dd11e258e279c2ba7b) ) + ROM_LOAD16_BYTE( "95429638.lo", 0x000001, 0x080000, CRC(e6e0fb00) SHA1(fcd1efc3dc1af76ecd01934d5790897882b4fa9c) ) + ROM_LOAD16_BYTE( "95429639.hi", 0x000000, 0x080000, CRC(a455839b) SHA1(5604b7a8a440a938c7f916ee0e9844ffb57a787b) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009234.bin", 0x000000, 0x100000, CRC(5604cf0e) SHA1(48d04af6e6bfa77828bd26fdcf60a9b70cfc7f84) ) ROM_LOAD( "95009235.bin", 0x100000, 0x100000, CRC(ec2f7228) SHA1(2921c80c29bff886c7a35b382b5569dd9636cd67) ) - // PR3555 +ROM_END + +ROM_START( sc5_3555 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428246.lo", 0x000001, 0x080000, CRC(f83110b9) SHA1(9cd761594c14be016eff4156433913ea5c70ff3a) ) ROM_LOAD16_BYTE( "95428247.hi", 0x000000, 0x080000, CRC(d467e5aa) SHA1(be8b08ed917545c0d72927784959cddc758cbef8) ) ROM_LOAD16_BYTE( "95429246.lo", 0x000001, 0x080000, CRC(74a9c38d) SHA1(2b5d4a29d498b89102f91fceae270f677517b063) ) ROM_LOAD16_BYTE( "95429247.hi", 0x000000, 0x080000, CRC(9b2244be) SHA1(77aa424b352af1341349895f4d333e3e01dcad7b) ) - // PR3555 SND + + ROM_LOAD16_BYTE( "95428414.lo", 0x000001, 0x080000, CRC(ffa1472f) SHA1(4cc3bad57536e4a4050bca2c7a52ff4525e103d4) ) + ROM_LOAD16_BYTE( "95428415.hi", 0x000000, 0x080000, CRC(ac926a48) SHA1(a7ee52f17174fd0ec044a1f446d4930042ac283d) ) + ROM_LOAD16_BYTE( "95428476.lo", 0x000001, 0x080000, CRC(c93be62a) SHA1(6bb06dcb5cc8eae85a221efe185f0226a7cbd397) ) + ROM_LOAD16_BYTE( "95428477.hi", 0x000000, 0x080000, CRC(f622c36e) SHA1(d272fcdcf4a735df83ae85ca1d587e101b7167c9) ) + ROM_LOAD16_BYTE( "95428562.lo", 0x000001, 0x080000, CRC(8a504868) SHA1(342846a744731d2e5297fea5eae14c0f6cdb6529) ) + ROM_LOAD16_BYTE( "95428563.hi", 0x000000, 0x080000, CRC(4c65f157) SHA1(fa2a17c335fb51fc0e7ff263f3b8de312757793e) ) + ROM_LOAD16_BYTE( "95428640.lo", 0x000001, 0x080000, CRC(ed183b17) SHA1(ec447ff6a438f01a7cb0d8d2bc34026eaef7cb24) ) + ROM_LOAD16_BYTE( "95428641.hi", 0x000000, 0x080000, CRC(76bf1bd5) SHA1(bdf4791d6659a871f19151f131719a19c05fe87b) ) + ROM_LOAD16_BYTE( "95429414.lo", 0x000001, 0x080000, CRC(64d87c68) SHA1(c2ee29b9efc1d41173b3ea53ff030652b043dfdf) ) + ROM_LOAD16_BYTE( "95429415.hi", 0x000000, 0x080000, CRC(0c969b2e) SHA1(d96d14004b820310b816235626cf0fe9da973afb) ) + ROM_LOAD16_BYTE( "95429476.lo", 0x000001, 0x080000, CRC(060c40d2) SHA1(704371ae7b6fd46f4af00087502686af96a23397) ) + ROM_LOAD16_BYTE( "95429477.hi", 0x000000, 0x080000, CRC(16385f39) SHA1(435e9848eead0239f0925736c43d16d7e1fbf04b) ) + ROM_LOAD16_BYTE( "95429562.lo", 0x000001, 0x080000, CRC(a7374c46) SHA1(9538c9cd241faac351fad6a76550d4385e247e2a) ) + ROM_LOAD16_BYTE( "95429563.hi", 0x000000, 0x080000, CRC(249cb6b6) SHA1(79309125e4f3a93006d22618d7f4abd90897a873) ) + ROM_LOAD16_BYTE( "95429640.lo", 0x000001, 0x080000, CRC(e40fa053) SHA1(199ccb9fc716aad41d26020f7e8879b9586e5d0c) ) + ROM_LOAD16_BYTE( "95429641.hi", 0x000000, 0x080000, CRC(be10f743) SHA1(5111678deb7747d4b30d8e763b99dedf86052b30) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009236.bin", 0x000000, 0x100000, CRC(b0d13b6c) SHA1(67338e149b1f48f2c796c708928dbade234b99ba) ) ROM_LOAD( "95009237.bin", 0x100000, 0x100000, CRC(14e9f22a) SHA1(a2a2c65f0dc5e28b54f8f9c0b0b61d8f1eee9070) ) - // PR3519 + + ROM_LOAD( "95009242.bin", 0x000000, 0x100000, CRC(d8695bed) SHA1(26225772f008c52a8e4af239bb19f68911ea09dc) ) + ROM_LOAD( "95009243.bin", 0x000000, 0x100000, CRC(16d039ce) SHA1(097dfc1bbcbd0c2ce096246f4f4a82110b989fd0) ) +ROM_END + +ROM_START( sc5_3519 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428248.lo", 0x000001, 0x080000, CRC(d1ea8b9c) SHA1(c0f17c092eadf14da4e1a919dbaf523290c0d594) ) ROM_LOAD16_BYTE( "95428249.hi", 0x000000, 0x080000, CRC(5de2d32a) SHA1(789374f7b14d23093def97985eff78448187e76f) ) ROM_LOAD16_BYTE( "95429248.lo", 0x000001, 0x080000, CRC(0457d4b5) SHA1(2d4080b94482c94e5789675eb5a57b3720312202) ) @@ -12453,10 +12703,30 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95428133.hi", 0x000000, 0x080000, CRC(50e21705) SHA1(0a8683150b48be0001830225fe2d5f7b169f16d8) ) ROM_LOAD16_BYTE( "95429132.lo", 0x000001, 0x080000, CRC(0c14244b) SHA1(e08d057237c5bac4fd138a343d1033afce4e65cf) ) ROM_LOAD16_BYTE( "95429133.hi", 0x000000, 0x080000, CRC(4f923ae6) SHA1(237a8771cb42a2965c92b0ceb16461d34575f721) ) - // PR3519 SND + ROM_LOAD16_BYTE( "95428420.lo", 0x000001, 0x080000, CRC(65391625) SHA1(8770ec0810f87948df1a82ff69ddecb003bb1cf2) ) + ROM_LOAD16_BYTE( "95428421.hi", 0x000000, 0x080000, CRC(adb8b7c2) SHA1(89e62732a0af1727e18fa2c2ca2e730dcbff48e3) ) + ROM_LOAD16_BYTE( "95428468.lo", 0x000001, 0x080000, CRC(1b068ef6) SHA1(a021f58eb0c14a12a8225e58cdf0505b99ca9d5a) ) + ROM_LOAD16_BYTE( "95428469.hi", 0x000000, 0x080000, CRC(8300bc6c) SHA1(7504a283abb3ae327fa1fc654088c93a451ded9e) ) + ROM_LOAD16_BYTE( "95428578.lo", 0x000001, 0x080000, CRC(4bd6b975) SHA1(69636e313b4f455e6eb7edfd3c2fca700c9850af) ) + ROM_LOAD16_BYTE( "95428579.hi", 0x000000, 0x080000, CRC(87540b7f) SHA1(3974ea2d65a18dfeda3e85ec868a291eaa553e07) ) + ROM_LOAD16_BYTE( "95428654.lo", 0x000001, 0x080000, CRC(79993d87) SHA1(6d596f05061095f68895605528272cee878a9bb0) ) + ROM_LOAD16_BYTE( "95428655.hi", 0x000000, 0x080000, CRC(7ea63f3d) SHA1(b1161cfba0356eda60eea560f129b077b607d643) ) + ROM_LOAD16_BYTE( "95429420.lo", 0x000001, 0x080000, CRC(eb9de598) SHA1(d0ad0cf8af12ec82bc69d76cbdb6f4b8dbc52ac4) ) + ROM_LOAD16_BYTE( "95429421.hi", 0x000000, 0x080000, CRC(4ba14b4b) SHA1(d353c8b3d077b6b2d9270900118737eeaded38da) ) + ROM_LOAD16_BYTE( "95429468.lo", 0x000001, 0x080000, CRC(0b75a529) SHA1(70199a2417b578a1ecf581a01f5c52e3d6537466) ) + ROM_LOAD16_BYTE( "95429469.hi", 0x000000, 0x080000, CRC(cdc0e4b4) SHA1(50b4239076f1d5837887bbace8410907e90ef9ec) ) + ROM_LOAD16_BYTE( "95429578.lo", 0x000001, 0x080000, CRC(635c6731) SHA1(0cee5fd7985c89721d501c477272be63ea0c5190) ) + ROM_LOAD16_BYTE( "95429579.hi", 0x000000, 0x080000, CRC(6a34c87a) SHA1(b530eef4bda6f366d987de72f3b409b0a02eb08c) ) + ROM_LOAD16_BYTE( "95429654.lo", 0x000001, 0x080000, CRC(a2b039f1) SHA1(016a4d44f9b9eddfb52236d6a2c7eb8448647721) ) + ROM_LOAD16_BYTE( "95429655.hi", 0x000000, 0x080000, CRC(a0a8b9fb) SHA1(96a2613821b13854ddbfca87970d9415b308f238) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009208.bin", 0x000000, 0x100000, CRC(f6450dbf) SHA1(3c48a2ca3cd08bff0d47e7b98c7d1d16b537b216) ) ROM_LOAD( "95009209.bin", 0x100000, 0x100000, CRC(c4b8b089) SHA1(e305f4fbaad2f4b6f96303fcefe2caf60fa8566d) ) - // PR3510 +ROM_END + +ROM_START( sc5_3510 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428250.lo", 0x000001, 0x080000, CRC(e701b624) SHA1(1a035ba991004e011576626dd3e98a8c6a0dfd98) ) ROM_LOAD16_BYTE( "95428251.hi", 0x000000, 0x080000, CRC(a2f096bf) SHA1(208e44098afe1be5d086b3645be60d4599be7515) ) ROM_LOAD16_BYTE( "95429250.lo", 0x000001, 0x080000, CRC(c1034889) SHA1(b77388120546089344cb982efa7e1bac743ba7cd) ) @@ -12473,28 +12743,61 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "p3510p73.lo", 0x000001, 0x080000, CRC(bd2ed4a6) SHA1(17956840cc1b7b2e1ed5412d0db4564d3a6e5806) ) ROM_LOAD16_BYTE( "p3510s73.hi", 0x000000, 0x080000, CRC(4c86bf9a) SHA1(24ae2f8a12cc8b2bef8eb6843755d622544f7057) ) ROM_LOAD16_BYTE( "p3510s73.lo", 0x000001, 0x080000, CRC(ff96daaa) SHA1(92db4be80a509c5f68532c772b7408041ae4983a) ) - // PR3510 SND + ROM_LOAD16_BYTE( "95428450.lo", 0x000001, 0x080000, CRC(41ab1e2d) SHA1(f115da303cbb5aa484d8343c9016eb09da44e8c1) ) + ROM_LOAD16_BYTE( "95428451.hi", 0x000000, 0x080000, CRC(12e293aa) SHA1(0eb91b57511bccae3a82a15c9c54c8f53c166e41) ) + ROM_LOAD16_BYTE( "95428550.lo", 0x000001, 0x080000, CRC(28c391fc) SHA1(4a853ff3edc8c96fe2f7054db62745e3a8d050a0) ) + ROM_LOAD16_BYTE( "95428551.hi", 0x000000, 0x080000, CRC(3ef42d25) SHA1(702b0139374aeb39fd96997c2f2f86601a3e8092) ) + ROM_LOAD16_BYTE( "95428664.lo", 0x000001, 0x080000, CRC(a4a03e53) SHA1(8857912a3ce2c723ce3629023d6d9b3ada0c550e) ) + ROM_LOAD16_BYTE( "95428665.hi", 0x000000, 0x080000, CRC(3ab2d07a) SHA1(3463e7817b266ca9dd430af3349989febf9337d1) ) + ROM_LOAD16_BYTE( "95429450.lo", 0x000001, 0x080000, CRC(14c131ec) SHA1(12156bd98db1f3fed28e5255c00f9882440a254e) ) + ROM_LOAD16_BYTE( "95429451.hi", 0x000000, 0x080000, CRC(c3760b9f) SHA1(83a97a3a2b71a069c4b0f437967468c075405c4e) ) + ROM_LOAD16_BYTE( "95429550.lo", 0x000001, 0x080000, CRC(6efbf6de) SHA1(13a4699b21ad15d14409c12fada770a0e18ba140) ) + ROM_LOAD16_BYTE( "95429551.hi", 0x000000, 0x080000, CRC(28141bce) SHA1(81f9b60a320d4814eed89039ce8d5a2565e2f7d1) ) + ROM_LOAD16_BYTE( "95429664.lo", 0x000001, 0x080000, CRC(6f1b7a89) SHA1(e213e6761598e2ccd757efb8e422ac20f16c1d90) ) + ROM_LOAD16_BYTE( "95429665.hi", 0x000000, 0x080000, CRC(ce895399) SHA1(258c21a16b9ba896cd337f9235fe82d58e7ac04f) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009063.bin", 0x000000, 0x100000, CRC(52b4e9a1) SHA1(2ff66ed13b2307ebc24500b920585f9cf04b0f4e) ) ROM_LOAD( "95009064.bin", 0x100000, 0x100000, CRC(1a94524b) SHA1(f5fa0904682888131ae359671ceeff0336adf5dd) ) - // PR3557 +ROM_END + +ROM_START( sc5_3557 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428254.lo", 0x000001, 0x080000, CRC(8d0edd28) SHA1(b79024c2ed55722d420db66ab7875143ac0d992d) ) ROM_LOAD16_BYTE( "95428255.hi", 0x000000, 0x080000, CRC(a5133c40) SHA1(76d8668c64d2ef3068c6e872bc2633ab22d196f0) ) ROM_LOAD16_BYTE( "95429254.lo", 0x000001, 0x080000, CRC(97c3527b) SHA1(6cbd2aa5207ae59affd5686e0156abc09f964ebf) ) ROM_LOAD16_BYTE( "95429255.hi", 0x000000, 0x080000, CRC(0bb71578) SHA1(5154ad4735de0ad667505a155d103d1fd51e2043) ) - // PR3557 SND + ROM_LOAD16_BYTE( "95428470.lo", 0x000001, 0x080000, CRC(b29e2077) SHA1(80018262590790bef6339bcb875e98f0e3066d67) ) + ROM_LOAD16_BYTE( "95428471.hi", 0x000000, 0x080000, CRC(c36e6093) SHA1(223da711f21bec98e37fb325a887e72694c77d43) ) + ROM_LOAD16_BYTE( "95428572.lo", 0x000001, 0x080000, CRC(a06ccb05) SHA1(1cc9d44369ad9c2c70c5afd232ff3dcfce352a3c) ) + ROM_LOAD16_BYTE( "95428573.hi", 0x000000, 0x080000, CRC(f7f83502) SHA1(8923c8b6b1fb9e9d739055420d69a0582c61641b) ) + ROM_LOAD16_BYTE( "95428636.lo", 0x000001, 0x080000, CRC(8295d7c9) SHA1(4bf7f8b911f07cf4e467611221c86e2cbd4dfa54) ) + ROM_LOAD16_BYTE( "95428637.hi", 0x000000, 0x080000, CRC(2145c947) SHA1(b273ad1ff79e6304cffe6948efc46239756b4b4d) ) + ROM_LOAD16_BYTE( "95429470.lo", 0x000001, 0x080000, CRC(38c02f23) SHA1(eed9b876d048580946e5cf57d82e3108f24f0ade) ) + ROM_LOAD16_BYTE( "95429471.hi", 0x000000, 0x080000, CRC(1844927b) SHA1(0ab532a0270697e8bfba0ad48b61154164eddc4d) ) + ROM_LOAD16_BYTE( "95429636.lo", 0x000001, 0x080000, CRC(5f968e1e) SHA1(732ec1551fdfe1eadefe319e8df352cc145742d8) ) + ROM_LOAD16_BYTE( "95429637.hi", 0x000000, 0x080000, CRC(7f61c66c) SHA1(63dfb7b3957ef8a926cdaf6d019b6ad439460cdc) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009238.bin", 0x000000, 0x100000, CRC(fba0d54b) SHA1(e1dc6404f54b08a6c20c37fae135ff550574d523) ) ROM_LOAD( "95009239.bin", 0x100000, 0x100000, CRC(f7770307) SHA1(00363906064bdd67e800944df3f8d85236d8bc4c) ) - // PR3451 +ROM_END + +ROM_START( sc5_3451 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428183.hi", 0x000000, 0x080000, CRC(03a9fc4b) SHA1(b2b604469679bd670fd86f6cf201d320cbaae291) ) ROM_LOAD16_BYTE( "95428182.lo", 0x000001, 0x080000, CRC(63f2313a) SHA1(a50710a7fb102f07d18d6c4134b961231c2b634f) ) ROM_LOAD16_BYTE( "95428256.lo", 0x000001, 0x080000, CRC(80d7e8ca) SHA1(b157a73d40586415ff78c6b8b050e8117ff4b2ef) ) ROM_LOAD16_BYTE( "95428257.hi", 0x000000, 0x080000, CRC(da9724f2) SHA1(9900e971ccc149a6877d7da06a2839b236ae6dfc) ) ROM_LOAD16_BYTE( "95429256.lo", 0x000001, 0x080000, CRC(36a23035) SHA1(318de90205b23553a1f2f18bac6a98270701ff37) ) ROM_LOAD16_BYTE( "95429257.hi", 0x000000, 0x080000, CRC(368e2e72) SHA1(36e1459dae22ee92c3f17cd92f4772dbf6d1b352) ) - // PR3451 SND + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009222.bin", 0x000000, 0x100000, CRC(9c2f31b1) SHA1(1677701d9dd9fe3afd483d09effa02a4b84a99d2) ) ROM_LOAD( "95009223.bin", 0x100000, 0x100000, CRC(2dc9cf5d) SHA1(27ecfa037aa200d0a67b03b9d9e591c14f1c6a2d) ) - // PR3450 +ROM_END + +ROM_START( sc5_3450 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429185.hi", 0x000000, 0x080000, CRC(ce4c85a1) SHA1(cec72a0f76338c9d995330f445364727b75718af) ) ROM_LOAD16_BYTE( "95429184.lo", 0x000001, 0x080000, CRC(cffffe96) SHA1(23030bd866d181f7a2fb6e46a55b540e9359ad31) ) ROM_LOAD16_BYTE( "95428185.hi", 0x000000, 0x080000, CRC(f93dbb24) SHA1(57a858f552bfad7703bcab9dc52c84fe65fd3bb9) ) @@ -12503,10 +12806,13 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95428275.hi", 0x000000, 0x080000, CRC(f539b93d) SHA1(13af44f858e0cf95df4ef590d46a1b76e7c048ac) ) ROM_LOAD16_BYTE( "95429274.lo", 0x000001, 0x080000, CRC(7121d4aa) SHA1(0559e473ee43aef4d0ab4eafc27613914f05fd3c) ) ROM_LOAD16_BYTE( "95429275.hi", 0x000000, 0x080000, CRC(5eb4252f) SHA1(ec3fd055f0da1d6272845261477909ecd0f6b663) ) - // PR3450 SND + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009212.bin", 0x000000, 0x100000, CRC(c838d238) SHA1(854d938eae4e717c46fc48cfcbe7127df0804d86) ) ROM_LOAD( "95009213.bin", 0x100000, 0x100000, CRC(bb2b77fe) SHA1(8ed40fdf10b61e0553a6b37af6467c9e2f9d3596) ) - // PR3435 +ROM_END + +ROM_START( sc5_3435 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429171.hi", 0x000000, 0x080000, CRC(f8476169) SHA1(7230cee8c0b170ad886d3c592e11fa60d166b319) ) ROM_LOAD16_BYTE( "95429170.lo", 0x000001, 0x080000, CRC(34006f6a) SHA1(15a72f241a46fb62db59705a02b5ed423f0a5102) ) ROM_LOAD16_BYTE( "95428171.hi", 0x000000, 0x080000, CRC(e4cb47f1) SHA1(d83a50b34b820eb4d427350ea108d1def29a3e76) ) @@ -12523,13 +12829,22 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95429101.hi", 0x000000, 0x080000, CRC(c4e7ef55) SHA1(2f51086ae0f28733a023773867ff50da54a2d483) ) ROM_LOAD16_BYTE( "95429140.lo", 0x000001, 0x080000, CRC(6c1d3be4) SHA1(bd66ab9bc2d16e2a2fa8e8c91a4671da611bbcd3) ) ROM_LOAD16_BYTE( "95429141.hi", 0x000000, 0x080000, CRC(5d935ca4) SHA1(8338054ae6338d0247f46b6740ffdbac8951c707) ) + ROM_LOAD16_BYTE( "95428524.lo", 0x000001, 0x080000, CRC(ea54c555) SHA1(b22cfc308623af78e8d2c4ca1c160df4bcbe6a7f) ) + ROM_LOAD16_BYTE( "95428525.hi", 0x000000, 0x080000, CRC(896bbb27) SHA1(3758f48405422a1745f825ecb22e9e9f3eb696ed) ) + ROM_LOAD16_BYTE( "95429524.lo", 0x000001, 0x080000, CRC(0bd9ace0) SHA1(027c87a56e26659137e4e3ecfa120b2d7adad762) ) + ROM_LOAD16_BYTE( "95429525.hi", 0x000000, 0x080000, CRC(280c5b14) SHA1(0d5486e4939977d82a089c24570137e318e1f837) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) // PR3435 SND11 ROM_LOAD( "95009089.bin", 0x000000, 0x100000, CRC(38575a28) SHA1(ae7e0c9bcdc62290bd246abfe2a5f43d42048589) ) ROM_LOAD( "95009090.bin", 0x100000, 0x100000, CRC(63816b52) SHA1(860b6bb695abb7afc1517b6ed827af8c7d3617f7) ) // PR3435 SND12 ROM_LOAD( "95009216.bin", 0x000000, 0x100000, CRC(91f02b7d) SHA1(de7e81cef8cb985bb6d55630090c04e36b2713f3) ) ROM_LOAD( "95009217.bin", 0x100000, 0x100000, CRC(65dc36a4) SHA1(48e58a2d266630b6d2f1d98dd8bb322470fa1e06) ) - // PR3520 +ROM_END + +ROM_START( sc5_3520 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428278.lo", 0x000001, 0x080000, CRC(22102e42) SHA1(9eae87d856175a73aa5585737ffbfa1fd05c02d6) ) ROM_LOAD16_BYTE( "95428279.hi", 0x000000, 0x080000, CRC(41d3a29c) SHA1(30287015891a151a1d5124268a36f146a7b854fb) ) ROM_LOAD16_BYTE( "95429278.lo", 0x000001, 0x080000, CRC(febe3410) SHA1(ead0b6aa3a50e73168bf7042ab532244f1845d31) ) @@ -12538,10 +12853,38 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95428127.hi", 0x000000, 0x080000, CRC(c5bfe982) SHA1(3b87cf8a33a4a396abb4cf313f19630840b8dd74) ) ROM_LOAD16_BYTE( "95429126.lo", 0x000001, 0x080000, CRC(08897201) SHA1(9c56317059157818af3291d72cc777c0b9724c6c) ) ROM_LOAD16_BYTE( "95429127.hi", 0x000000, 0x080000, CRC(4511fc76) SHA1(8f36905527683c5bbb0d28ad3f88c3a9d83cfc7e) ) - // PR3520 SND + ROM_LOAD16_BYTE( "95428310.lo", 0x000001, 0x080000, CRC(2234ac28) SHA1(dc88d4dfbbd35cd0a369882d62d4c87c5cdbb633) ) + ROM_LOAD16_BYTE( "95428311.hi", 0x000000, 0x080000, CRC(b07506b9) SHA1(672b606371c73debd4e5a7670cae521b44276704) ) + ROM_LOAD16_BYTE( "95428376.lo", 0x000001, 0x080000, CRC(f88b187b) SHA1(3d43e8bc9a2d76ae55b445ff0b48f5d2f4c08aa1) ) + ROM_LOAD16_BYTE( "95428377.hi", 0x000000, 0x080000, CRC(251c5891) SHA1(df2fae724e285a031ad31d0f0c6e79c350414d5e) ) + ROM_LOAD16_BYTE( "95428422.lo", 0x000001, 0x080000, CRC(a8b33ed6) SHA1(8ebdc7b1f671b04e62fa56056a4f9b4e3d04c56a) ) + ROM_LOAD16_BYTE( "95428423.hi", 0x000000, 0x080000, CRC(38880c2f) SHA1(15d5f35ce6adc945921de85e32f6ca9a5a1a23b8) ) + ROM_LOAD16_BYTE( "95428478.lo", 0x000001, 0x080000, CRC(c8a8c996) SHA1(494b404f327569de6ab3dd62b271c0ba94c296b6) ) + ROM_LOAD16_BYTE( "95428479.hi", 0x000000, 0x080000, CRC(780cc512) SHA1(6c77cc082d17bc1b97c0884f402e92b163d9f1db) ) + ROM_LOAD16_BYTE( "95428576.lo", 0x000001, 0x080000, CRC(092eb8af) SHA1(00682819f65952f173ec2ff92928ece7aa598fd0) ) + ROM_LOAD16_BYTE( "95428577.hi", 0x000000, 0x080000, CRC(8a05bd01) SHA1(8615652c4dd027cc63154cb47a51e02cc09ffcf1) ) + ROM_LOAD16_BYTE( "95428642.lo", 0x000001, 0x080000, CRC(be14999d) SHA1(063276b1755d9e0fd7060d89cfb83630b16b1814) ) + ROM_LOAD16_BYTE( "95428643.hi", 0x000000, 0x080000, CRC(8d934d6a) SHA1(0a777ad645a5791e55fd54040d9ef9c6d69660f7) ) + ROM_LOAD16_BYTE( "95429310.lo", 0x000001, 0x080000, CRC(104b4bce) SHA1(bc61f8e29ec2cd47e5cb622e417bbe5b0f9ceda2) ) + ROM_LOAD16_BYTE( "95429311.hi", 0x000000, 0x080000, CRC(9fb03c5c) SHA1(ed1cf4044645f922636cfba03f5516e50e3a76a7) ) + ROM_LOAD16_BYTE( "95429376.lo", 0x000001, 0x080000, CRC(67efefd7) SHA1(4e6fc0be9f780ea1045e63fe2a35a6fdc9b8b54e) ) + ROM_LOAD16_BYTE( "95429377.hi", 0x000000, 0x080000, CRC(bcd469fb) SHA1(640e25d92240bfbd4222b899ed6b87ee5fc25c29) ) + ROM_LOAD16_BYTE( "95429422.lo", 0x000001, 0x080000, CRC(9bc0e547) SHA1(c2f4e597013ae05f32c217c5b462b864a3022f39) ) + ROM_LOAD16_BYTE( "95429423.hi", 0x000000, 0x080000, CRC(8bbe4b2f) SHA1(98f59d7237fe397836e65624181a52f61b1d68ab) ) + ROM_LOAD16_BYTE( "95429478.lo", 0x000001, 0x080000, CRC(619f61a1) SHA1(38c7e4b022dbee39bf2ceae3246ab6dc1b30b6c4) ) + ROM_LOAD16_BYTE( "95429479.hi", 0x000000, 0x080000, CRC(9124a83c) SHA1(5398c4d08dd49c3108df0977a080837605d9df77) ) + ROM_LOAD16_BYTE( "95429576.lo", 0x000001, 0x080000, CRC(4e8770ff) SHA1(1e10ddacc32318b809f34b66cbae7cbfb425aa5c) ) + ROM_LOAD16_BYTE( "95429577.hi", 0x000000, 0x080000, CRC(04287216) SHA1(67e43bfbef9225994b6acd83ebeb564ac369d6e3) ) + ROM_LOAD16_BYTE( "95429642.lo", 0x000001, 0x080000, CRC(bb2b7d6f) SHA1(b2c7a58a9e63b095c28f4fbdd5bd10b268247a19) ) + ROM_LOAD16_BYTE( "95429643.hi", 0x000000, 0x080000, CRC(94ea3afd) SHA1(58d7e63afb69d48466abd4c256552e7e357dfcbd) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009206.bin", 0x000000, 0x100000, CRC(46910a1e) SHA1(e0b5dc6a2d0567bacf37261c523a45dc15e7dadf) ) ROM_LOAD( "95009207.bin", 0x100000, 0x100000, CRC(2200a071) SHA1(bb1f1a4c51768dca2d0a221da1f7ccbad6932e0a) ) - // PR3434 +ROM_END + +ROM_START( sc5_3434 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95428280.lo", 0x000001, 0x080000, CRC(bcbfed84) SHA1(e93a4be9ab8f6a677c246d511595a76f7e0072d6) ) ROM_LOAD16_BYTE( "95428281.hi", 0x000000, 0x080000, CRC(d0f2f2f0) SHA1(822fb563d8680f411362c9e457dc4832fb2b0e74) ) ROM_LOAD16_BYTE( "95429280.lo", 0x000001, 0x080000, CRC(aa7f4ba4) SHA1(38a5b444c7ed88ece824a8d536eee0f5d66de420) ) @@ -12554,9 +12897,18 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95429065.hi", 0x000000, 0x080000, CRC(436243d3) SHA1(731a6a62de5c2b790e2d0a3e5fd5c424c1ed6b57) ) ROM_LOAD16_BYTE( "95429142.lo", 0x000001, 0x080000, CRC(1542fa69) SHA1(6e7e2bd82222fe7c8a480f696156a4f9894250d3) ) ROM_LOAD16_BYTE( "95429143.hi", 0x000000, 0x080000, CRC(f933e597) SHA1(305f7385a38485d9745c1889c8370bde17d07984) ) - // PR3434 SND + + ROM_LOAD16_BYTE( "95428298.lo", 0x000001, 0x080000, CRC(2494efed) SHA1(a41b0ece4044d7f2db6e2665585796558794ea87) ) + ROM_LOAD16_BYTE( "95428299.hi", 0x000000, 0x080000, CRC(001d30ea) SHA1(920e8f664d5ef69e3e3a0a5744142a8dd99d3bb6) ) + ROM_LOAD16_BYTE( "95429298.lo", 0x000001, 0x080000, CRC(46bca6eb) SHA1(9eeb88481ec540a709977904a10d8f422eec0d0a) ) + ROM_LOAD16_BYTE( "95429299.hi", 0x000000, 0x080000, CRC(44f9c1aa) SHA1(743ab3bf7b6d8cd8d0e24ffe1f367d064a60b71e) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009093.bin", 0x000000, 0x100000, CRC(97e2e023) SHA1(5405fd2ad34ca74d608005d31c279074e5eed9cd) ) - // Z059 (PR000059) +ROM_END + +ROM_START( sc5_z059 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "g95424662.lo", 0x000001, 0x080000, CRC(c0d0ec66) SHA1(8fde84a3b88eb9217a040741aa92c8c896981ae5) ) ROM_LOAD16_BYTE( "g95424663.hi", 0x000000, 0x080000, CRC(3e456253) SHA1(ba509f0d25368f1833d0afb2682eb119fb0dd4e9) ) ROM_LOAD16_BYTE( "g95424664.lo", 0x000001, 0x080000, CRC(1b56d182) SHA1(cf21a27e298f4eeb703cc7e13d302f5548132c45) ) @@ -12565,34 +12917,53 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "g95425663.hi", 0x000000, 0x080000, CRC(edf71e7d) SHA1(70884ffb87adbcf71487a7a44318990f34e5e924) ) ROM_LOAD16_BYTE( "g95425664.lo", 0x000001, 0x080000, CRC(7eb5a7e2) SHA1(94e45e88d8fc89f2c1291089377dce16f30f844e) ) ROM_LOAD16_BYTE( "g95425665.hi", 0x000000, 0x080000, CRC(bec47b36) SHA1(f8f318e0118024cb4f6da7764507c94e3875dc7a) ) + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) // miss PR000059 SND - // Z058 (PR000058) +ROM_END + +ROM_START( sc5_z058 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "g95424667.hi", 0x000000, 0x080000, CRC(438326ef) SHA1(96d1b1202fbfc65eed2e88c49d94152abbd98e6c) ) ROM_LOAD16_BYTE( "g95424666.lo", 0x000001, 0x080000, CRC(64776a5c) SHA1(639b31eea214c76afd643ae86edd9add4abe8bd7) ) ROM_LOAD16_BYTE( "g95425667.hi", 0x000000, 0x080000, CRC(15906e4e) SHA1(ed41de08538f20d1fcf42d8d99ec5e8d869fc0ab) ) ROM_LOAD16_BYTE( "g95425666.lo", 0x000001, 0x080000, CRC(7ebc857a) SHA1(9a5c804fe6d572b6bd0547ae7cc8dd35d0296c6a) ) + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) // miss PR000058 SND - // Z060 (PR000060) +ROM_END + +ROM_START( sc5_z060 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "g95424668.lo", 0x000001, 0x080000, CRC(67a7ee0b) SHA1(2b5111624990a28f674b23af9113b5102c161f5e) ) ROM_LOAD16_BYTE( "g95424669.hi", 0x000000, 0x080000, CRC(f804fb64) SHA1(bf3487340dbf74583d1ac86509f5921ee5b4bce0) ) ROM_LOAD16_BYTE( "g95425668.lo", 0x000001, 0x080000, CRC(b07ef4f4) SHA1(50d0c94c4389c7bb54f7920b0eaca89361771c24) ) ROM_LOAD16_BYTE( "g95425669.hi", 0x000000, 0x080000, CRC(95de0faa) SHA1(4688417026c0cd18365d09b60675bf766e0e6255) ) + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) // miss PR000060 SND - // Z057 (PR000057) +ROM_END + +ROM_START( sc5_z057 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "g95424880.lo", 0x000001, 0x080000, CRC(d7863b7b) SHA1(0093c799479342ae6a5431e9b683321797ce8af4) ) ROM_LOAD16_BYTE( "g95424881.hi", 0x000000, 0x080000, CRC(265ac609) SHA1(36246f74621a434057d2547c7b644a1e44cbeebe) ) ROM_LOAD16_BYTE( "g95425880.lo", 0x000001, 0x080000, CRC(289836e3) SHA1(8987a525c0007f6859caad6d5889317c7cec3c90) ) ROM_LOAD16_BYTE( "g95425881.hi", 0x000000, 0x080000, CRC(fd4142aa) SHA1(149910ed083ee3a5632226c1451c362815d47d85) ) - // PR000057 SND + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009073.bin", 0x000000, 0x100000, CRC(8aa1bbb1) SHA1(fe7a0f7b24c595a71bbc4389fbcf235181ea7f2b) ) ROM_LOAD( "95009074.bin", 0x100000, 0x100000, CRC(4e80d070) SHA1(649815a1c3dbb10e30593db3372bf047e7fbb6da) ) - // PR3414 +ROM_END + +ROM_START( sc5_3414 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "p3414p72.lo", 0x000001, 0x080000, CRC(3079b576) SHA1(dbfccd791247d36d798236afd2d718ab1cc21270) ) ROM_LOAD16_BYTE( "p3414p72.hi", 0x000000, 0x080000, CRC(3dd0d659) SHA1(67b767c41f271d3298e3fce923f6b491cd69df50) ) ROM_LOAD16_BYTE( "p3414s72.lo", 0x000001, 0x080000, CRC(d82d6368) SHA1(937aa3aacda81db157935175be57ec1c34275894) ) ROM_LOAD16_BYTE( "p3414s72.hi", 0x000000, 0x080000, CRC(20a0f375) SHA1(af104c3faac72afe8ab9053b16ce41c75b4754ad) ) + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) // miss PR3414 SND - // PR3518 +ROM_END + +ROM_START( sc5_3518 ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "95429164.lo", 0x000001, 0x080000, CRC(cf578097) SHA1(cfb8f8cd5f14e8d53b3907fa876408e741c59de8) ) ROM_LOAD16_BYTE( "95429165.hi", 0x000000, 0x080000, CRC(883592f8) SHA1(ee1fa02df89caa9fb5087670d3c0fb671bb2f6cd) ) ROM_LOAD16_BYTE( "95428164.lo", 0x000001, 0x080000, CRC(b3107171) SHA1(aff472eb60b4919110c898683a96b4c0d5d81422) ) @@ -12605,12 +12976,140 @@ ROM_START( sc5unsrt ) ROM_LOAD16_BYTE( "95429077.hi", 0x000000, 0x080000, CRC(e19b89a4) SHA1(c4f7a147c639515bbe372739a2cc9fd0a90954fe) ) ROM_LOAD16_BYTE( "95429152.lo", 0x000001, 0x080000, CRC(e78901b0) SHA1(6e2c59bf12db63dcbdd350101578327f5100ce5d) ) ROM_LOAD16_BYTE( "95429153.hi", 0x000000, 0x080000, CRC(a5980144) SHA1(7fde32148408aa3f7fedeb27c08dac40d7e9e6a1) ) - // PR3518 SND + ROM_LOAD16_BYTE( "95428648.lo", 0x000001, 0x080000, CRC(f47bdf1b) SHA1(762502381af913c591115f8b7b93572f43932d74) ) + ROM_LOAD16_BYTE( "95428649.hi", 0x000000, 0x080000, CRC(d452251f) SHA1(4b5521fd4ce338b8aa143b65221b7609f2a1f992) ) + ROM_LOAD16_BYTE( "95429648.lo", 0x000001, 0x080000, CRC(8bf10b65) SHA1(5607f2bab174f69db07184b22745f1a51dc6df29) ) + ROM_LOAD16_BYTE( "95429649.hi", 0x000000, 0x080000, CRC(2a60c173) SHA1(36a94b48584b0998cce0d0ee8eb879aac567905c) ) + + ROM_REGION( 0x400000, "ymz", ROMREGION_ERASE00 ) ROM_LOAD( "95009094.bin", 0x000000, 0x100000, CRC(709bafca) SHA1(8ccf03e84cdbde20befb36cd79d6c883a3073bb0) ) ROM_LOAD( "95009095.bin", 0x100000, 0x100000, CRC(a5eb937b) SHA1(6247722041e250141acbec644e9a02133f2adeef) ) ROM_END -#endif +#if 0 +// this is all orphaned roms where we only have sound roms, but no program, as well as what appear to be some more +// recent bits possibly on a newer platform, acknowledge they exists but just ignore them for the time being +ROM_START( sc5unsrt ) + ROM_REGION( 0x400000, "maincpu", ROMREGION_ERASEFF ) + // MAZOOMA 'LOLLYWOOD SOUNDS' + ROM_LOAD( "95004332.bin", 0x0000, 0x0a5e3d, CRC(266d4371) SHA1(8e72022db71b432f53826720aac79901e8ba37af) ) + // MAZOOMA 'SAM SOUNDS' + ROM_LOAD( "95004360.bin", 0x0000, 0x03ab65, CRC(b357535e) SHA1(b9c03ca1c29f6414ac18e454a2a98ed24799fa92) ) + // MAZOOMA 'SWAGSND' + ROM_LOAD( "95008377.bin", 0x0000, 0x0f6813, CRC(55fad813) SHA1(efa07cd5aa68e1372e8de6bb955ee114cf74ae9c) ) + // MAZOOMA 'DOWNMEXICOWAYSND' + ROM_LOAD( "95008379.bin", 0x0000, 0x0f1c34, CRC(3d18e770) SHA1(cdcc600a14329c645ff35fefc355a9ff6b845224) ) + // MAZOOMA 'GRIDLOCKSND' + ROM_LOAD( "95008401.bin", 0x0000, 0x0e486b, CRC(d81d7736) SHA1(8046b95482058ea55735a278dd3b71f708d66b1a) ) + // QPS 'CASHSPLASHSND' + ROM_LOAD( "95008403.bin", 0x0000, 0x0facbf, CRC(cf3969bb) SHA1(4cb6fb4e536882a11bb6c1548ffb94daea70ca5f) ) + // MAZOOMA 'REVO_SOUNDS' + ROM_LOAD( "95008871.bin", 0x0000, 0x0fd182, CRC(e4f3b731) SHA1(ef829105e1b45c307546127ba85f5e0e5403ab98) ) + // miss PR1032 game (Fire Cracker, but not sc4fcc) + // PR1032 SND + ROM_LOAD( "95004262.bin", 0x0000, 0x080000, CRC(3f5fad9e) SHA1(528a2803baa155d66cb896f643f858238aa7f189) ) + // PR1032 unknown (what are these?) + ROM_LOAD( "95712394.bin", 0x000, 0x800, CRC(2658fedf) SHA1(32125bc5a58ddd49f8be36c7cb2ebbbdf2cb292b) ) + ROM_LOAD( "95712395.bin", 0x800, 0x800, CRC(d5df2317) SHA1(66f25a2a11657653f5eed3e8196d9b52119236c3) ) + // miss PR1131 game + // PR1331 SND + ROM_LOAD( "95004278.bin", 0x0000, 0x080000, CRC(c21ff246) SHA1(56345ee0af02a51a96df98ed01ffb6202b8cd772) ) + // miss PR1026 game + // PR1026 SND + ROM_LOAD( "95008183.bin", 0x000000, 0x080000, CRC(ab29f841) SHA1(908603184c3f7ead278dabd224d60e5362cdafbe) ) + ROM_LOAD( "95008184.bin", 0x080000, 0x080000, CRC(45ef95ea) SHA1(1e1126b542621e723eaf6e38918162fe701247e0) ) + // miss 95008551 PR1666 game + // 95008551 PR1666 SND + ROM_LOAD( "95008551.bin", 0x000000, 0x100000, CRC(2d89a52a) SHA1(244101df7f6beae545f9b823750f908f532ac1e4) ) + // miss PR1236 game + // PR1236 SND + ROM_LOAD( "95008298.bin", 0x0000, 0x100000, CRC(96a487da) SHA1(491c5133757d6f26c106d122a29cd7ed454c2353) ) + // miss PR1407 game + // PR1407 SND + ROM_LOAD( "95008382.bin", 0x000000, 0x100000, CRC(cbf27ec8) SHA1(5be29fb836688e63d90e5a5108c6bdec09dd12a5) ) + // miss PR1367 game + // PR1367 SND + ROM_LOAD( "95008334.bin", 0x000000, 0x100000, CRC(0c334241) SHA1(3e5bde03330a5684a2a40fa94b33345039cd3755) ) + // miss PR1618 game + // PR1618 SND + ROM_LOAD( "95008517.bin", 0x000000, 0x100000, CRC(8092eaeb) SHA1(fea226ea7fb97226c79132aa67b89078f67cd920) ) + ROM_LOAD( "95008518.bin", 0x100000, 0x100000, CRC(6ac28d4e) SHA1(cdf50c856324130156115259efbfb7553480c749) ) + // miss PR1409 game + // PR1409 SND + ROM_LOAD( "95008402.bin", 0x000000, 0x100000, CRC(d9cbc877) SHA1(aa35f9da3d7d470ebc712a958ee2f2d2646c0cce) ) + // miss PR1414 game + // PR1414 SND + ROM_LOAD( "95008404.bin", 0x000000, 0x100000, CRC(4197f3d1) SHA1(5529090d7d396054b0b4bdf251c6c86c76ed6648) ) + // miss PR1410 game + // PR1410 SND + ROM_LOAD( "95008420.bin", 0x000000, 0x100000, CRC(cce5f09a) SHA1(8b1f30eb1c48a3e3c6c403f28e97918ddac51033) ) + // miss PR1415 game + // PR1415 SND + ROM_LOAD( "95008422.bin", 0x000000, 0x100000, CRC(5d9a6af7) SHA1(b32fd97d0e248f59b199c143f8fc2deddb4ec5fc) ) + // miss PR1635 game + // PR1635 SND + ROM_LOAD( "95008451.bin", 0x000000, 0x100000, CRC(061d309e) SHA1(588d0ecf6e27815054f4e164c44f3f1464be832b) ) + ROM_LOAD( "95008452.bin", 0x100000, 0x100000, CRC(08c35e66) SHA1(531f532e55303621d17e497cddc9398745a18211) ) + // miss PR1409 game + // PR1409 SND + ROM_LOAD( "95008458.bin", 0x000000, 0x100000, CRC(845b4fec) SHA1(4f4089bd4db0fbb50594d0e96e7d6198d85c81ba) ) + // miss PR1626 game + // PR1626 SND + ROM_LOAD( "95008497.bin", 0x000000, 0x100000, CRC(4f7907bd) SHA1(cf5dab2a40a07293b727e8a6f35dc1a57cdec6fc) ) + // miss PR1624 game + // PR1624 SND + ROM_LOAD( "95008501.bin", 0x000000, 0x080000, CRC(dd7937a8) SHA1(7aef4f451f307d0074992cdda3401fde0112b977) ) + // miss PR1630 game + // PR1630 SND + ROM_LOAD( "95008513.bin", 0x000000, 0x080000, CRC(e57f076a) SHA1(9c9c4686cc39849748f212e073a0959ff93d0ed3) ) + // miss PR1703 game + // PR1703 SND + ROM_LOAD( "95008534.bin", 0x000000, 0x100000, CRC(fe599d0a) SHA1(f5f31ea43bfc446f2b3ed1c0c88b718428addbdf) ) + // miss PR1705 game + // PR1705 SND + ROM_LOAD( "95008545.bin", 0x000000, 0x100000, CRC(8ec806e1) SHA1(1af9dd83e4da4848b7d84ee23bee29f9bcf2b404) ) + // miss PR1709 game + // PR1709 SND + ROM_LOAD( "95008558.bin", 0x000000, 0x100000, CRC(6c032de9) SHA1(3aed801f8b6f2d62fffa03054afd8ff1c3ff3ac3) ) + // miss PR1717 game + // PR1717 SND + ROM_LOAD( "95008580.bin", 0x000000, 0x100000, CRC(f6019676) SHA1(535896a199047e61274d82413904580572523e2a) ) + // miss PR1902 game + // PR1902 SND + ROM_LOAD( "95008591.bin", 0x000000, 0x100000, CRC(1cecf466) SHA1(7c54acf00b8dd4272843a7b3b3d60dc683a5f6d8) ) + // miss PR000061 GAME + // PR000061 SND + ROM_LOAD( "95009220.bin", 0x000000, 0x100000, CRC(fcfba3bf) SHA1(a06055394330e08c37d31871bafe6dbfaf9c8156) ) + ROM_LOAD( "95009221.bin", 0x100000, 0x100000, CRC(675cde24) SHA1(34dd7c654c1ec5f77a0e77840a368b084c1c302a) ) + // miss PR1014 game + // PR1014 SND + ROM_LOAD( "95008179.bin", 0x000000, 0x100000, CRC(14b735fa) SHA1(7533510de6687747fc635a5bf66da0a58c6fc718) ) + ROM_LOAD( "95008180.bin", 0x100000, 0x100000, CRC(ec441f54) SHA1(7e8bec5cd293f29fca2363e5f1ab278a532b8a47) ) + // miss PR1002 game + // PR1002 SND + ROM_LOAD( "95008115.bin", 0x000000, 0x100000, CRC(c3b2faac) SHA1(2c54d48f5798178006e82654abed42df43457e25) ) + ROM_LOAD( "95008116.bin", 0x100000, 0x100000, CRC(84e663f0) SHA1(cb0275cc3761aa16640ac5383125e2098ba80850) ) + // miss PR1008 game + // PR1008 SND + ROM_LOAD( "95008135.bin", 0x000000, 0x100000, CRC(08d7040d) SHA1(c62ce0de0d57451d0c02f0796573eef1edcab947) ) + ROM_LOAD( "95008136.bin", 0x100000, 0x100000, CRC(456cc709) SHA1(85ae7a81fbd1dc13b4395baefea82ba31e6c4d3f) ) + // miss PR1009 game + // PR1009 SND + ROM_LOAD( "95008147.bin", 0x000000, 0x100000, CRC(c74ce6b4) SHA1(426ac64234bc07ba676570b90e28fa7439d68eaa) ) + ROM_LOAD( "95008148.bin", 0x100000, 0x100000, CRC(ea146768) SHA1(2ef2e619d0c48f150619ba2176aed0fc42d43ef8) ) + // miss PR7116 game + // PR7116 SND + ROM_LOAD( "95008077.bin", 0x000000, 0x100000, CRC(32a34d15) SHA1(c23ebd30165ebc80098fd956755b98cb433a3e28) ) + ROM_LOAD( "95008078.bin", 0x100000, 0x100000, CRC(d4832994) SHA1(bdde017bb2f876252d8984a0c5b60950669f579e) ) + // miss PR1018 game + // PR1018 SND + ROM_LOAD( "95008106.bin", 0x000000, 0x100000, CRC(403935bb) SHA1(471cbc822dc2765e5c32948f7b25b2301ddab990) ) + // miss PR1004 game + // PR1004 SND + ROM_LOAD( "95008125.bin", 0x000000, 0x100000, CRC(ad1d69d5) SHA1(66d07488fdec6b1c65b41e20d74d5add22746334) ) + ROM_LOAD( "95008126.bin", 0x100000, 0x100000, CRC(28f979a8) SHA1(ce480ab19b3066343bf88d2fda78dc6a71cd61e2) ) +ROM_END +#endif extern int find_project_string(running_machine &machine, int addrxor, int mode); @@ -12892,6 +13391,8 @@ GAME( 200?, sc5dndboh ,sc5dndbo, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, GAME( 200?, sc5dndboi ,sc5dndbo, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal Or No Deal Banker's Bonus (Bellfruit) (Scorpion 5) (set 10)", GAME_IS_SKELETON_MECHANICAL ) GAME( 200?, sc5dndboj ,sc5dndbo, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal Or No Deal Banker's Bonus (Bellfruit) (Scorpion 5) (set 11)", GAME_IS_SKELETON_MECHANICAL ) GAME( 200?, sc5dndbok ,sc5dndbo, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal Or No Deal Banker's Bonus (Bellfruit) (Scorpion 5) (set 12)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5dndbol ,sc5dndbo, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal Or No Deal Banker's Bonus (Bellfruit) (Scorpion 5) (set 13)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5dndbom ,sc5dndbo, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal Or No Deal Banker's Bonus (Bellfruit) (Scorpion 5) (set 14)", GAME_IS_SKELETON_MECHANICAL ) // PR3068 CLUB BEAT THE BANKER BEAT THE BANKER CLUB PR3068 BEAT THE BANKER SOUNDS11 GAME( 200?, sc5dndbl ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal Or No Deal Beat The Banker Club (Bellfruit) (Scorpion 5) (set 1)", GAME_IS_SKELETON_MECHANICAL ) @@ -14914,3 +15415,36 @@ GAME( 200?, sc5nunsmb ,sc5nunsm, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, GAME( 200?, sc5nunsmc ,sc5nunsm, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "Mazooma","Nuns 'n' Roses (Mazooma) (Scorpion 5) (set 4)", GAME_IS_SKELETON_MECHANICAL ) GAME( 200?, sc5nunsmd ,sc5nunsm, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "Mazooma","Nuns 'n' Roses (Mazooma) (Scorpion 5) (set 5)", GAME_IS_SKELETON_MECHANICAL ) GAME( 200?, sc5nunsme ,sc5nunsm, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "Mazooma","Nuns 'n' Roses (Mazooma) (Scorpion 5) (set 6)", GAME_IS_SKELETON_MECHANICAL ) + +GAME( 200?, sc5_3512 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Monopoly Gold (Bellfruit) (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3437 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Red Hot Silly Peppers Community Party (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3438 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Juicy Gems Community Party (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3508 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Club DOND Red Mist (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3514 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Rapid Round (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3517 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal East and West Wing (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3524 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Cluedo Prime Suspect (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3515 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","777 Heaven (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3511 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Spank the Banker (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3513 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Right Deal Right Time (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3516 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Cash Ahoy (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3530 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Club Cash Ahoy (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3552 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Snakes and Ladders (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3551 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Seal the Deal (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3525 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Happy Hour (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3553 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Go All the Way (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3555 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Family Guy The Drunken Clam (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3519 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Eliminator (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3510 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Red Hot (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3557 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Live (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3451 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Gold (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3450 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Let's Play (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3435 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Monopoly Street Party (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3520 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Cops 'n' Robbers Street Wise (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3434 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Monopoly Takeover (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3518 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Deal or no Deal Bank On It (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_3414 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Bullseye Hot Arrows (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +// 3rd party +GAME( 200?, sc5_z057 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Quidsia (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_z058 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Wok 'n' Roll (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_z059 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Aladdin (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) +GAME( 200?, sc5_z060 ,0, bfm_sc5, bfm_sc5, bfm_sc5_state, sc5, ROT0, "BFM","Hard Dk (Scorpion 5)", GAME_IS_SKELETON_MECHANICAL ) diff --git a/src/mame/drivers/bingoc.c b/src/mame/drivers/bingoc.c index 9212a1fac60..fad26e49fc5 100644 --- a/src/mame/drivers/bingoc.c +++ b/src/mame/drivers/bingoc.c @@ -46,10 +46,10 @@ public: m_upd7759(*this, "upd") { } UINT8 m_x; - DECLARE_READ16_MEMBER(bingoc_rand_r); + DECLARE_READ16_MEMBER(unknown_r); DECLARE_READ8_MEMBER(sound_test_r); DECLARE_WRITE16_MEMBER(main_sound_latch_w); - DECLARE_WRITE8_MEMBER(bingoc_play_w); + DECLARE_WRITE8_MEMBER(sound_play_w); virtual void video_start(); UINT32 screen_update_bingoc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device<cpu_device> m_maincpu; @@ -69,7 +69,7 @@ UINT32 bingoc_state::screen_update_bingoc(screen_device &screen, bitmap_ind16 &b return 0; } -READ16_MEMBER(bingoc_state::bingoc_rand_r) +READ16_MEMBER(bingoc_state::unknown_r) { return 0xffff; } @@ -103,7 +103,7 @@ WRITE16_MEMBER(bingoc_state::main_sound_latch_w) } #endif -WRITE8_MEMBER(bingoc_state::bingoc_play_w) +WRITE8_MEMBER(bingoc_state::sound_play_w) { /* ---- --x- sound rom banking @@ -117,8 +117,8 @@ WRITE8_MEMBER(bingoc_state::bingoc_play_w) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, bingoc_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x100000, 0x10007f) AM_READ(bingoc_rand_r) //comms? lamps? - AM_RANGE(0x180000, 0x18007f) AM_READ(bingoc_rand_r) //comms? lamps? + AM_RANGE(0x100000, 0x10007f) AM_READ(unknown_r) //comms? lamps? + AM_RANGE(0x180000, 0x18007f) AM_READ(unknown_r) //comms? lamps? #if !SOUND_TEST AM_RANGE(0x180010, 0x180011) AM_WRITE(main_sound_latch_w) //WRONG there... #endif @@ -133,7 +133,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io, AS_IO, 8, bingoc_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE("ymsnd", ym2151_device, read, write) - AM_RANGE(0x40, 0x40) AM_WRITE(bingoc_play_w) + AM_RANGE(0x40, 0x40) AM_WRITE(sound_play_w) AM_RANGE(0x80, 0x80) AM_DEVWRITE("upd", upd7759_device, port_w) #if !SOUND_TEST AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) //soundlatch diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c index b6e7b0f6ae4..d01e6f31d26 100644 --- a/src/mame/drivers/boogwing.c +++ b/src/mame/drivers/boogwing.c @@ -448,6 +448,50 @@ ROM_START( boogwing ) /* VER 1.5 EUR 92.12.07 */ ROM_LOAD( "kj-00.15n", 0x000000, 0x00400, CRC(add4d50b) SHA1(080e5a8192a146d5141aef5c8d9996ddf8cd3ab4) ) ROM_END +ROM_START( boogwingu ) /* VER 1.7 USA 92.12.14 */ + ROM_REGION( 0x100000, "maincpu", 0 ) /* DE102 code (encrypted) */ + ROM_LOAD16_BYTE( "kl_00.2b", 0x000000, 0x040000, CRC(4dc14798) SHA1(f991edf8e308087ed7222b3b4e3bc959980f8f66) ) + ROM_LOAD16_BYTE( "kl_02.2e", 0x000001, 0x040000, CRC(3bb3b0a0) SHA1(ba892ea52b6bb8d110050efdaa5effd8447c1b2a) ) + ROM_LOAD16_BYTE( "kl_01.4b", 0x080000, 0x040000, CRC(d109ba13) SHA1(93fcda71e260ba94141e2d4d6b248f2cb8530b61) ) + ROM_LOAD16_BYTE( "kl_03.4e", 0x080001, 0x040000, CRC(fef2a176) SHA1(b0505466237fe17b6aaa7eea47e309cd679208d1) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "kl06.18p", 0x00000, 0x10000, CRC(3e8bc4e1) SHA1(7e4c357afefa47b8f101727e06485eb9ebae635d) ) /* same as other sets but labeled KL */ + + ROM_REGION( 0x20000, "tiles1", 0 ) /* Tiles 1 */ + ROM_LOAD16_BYTE( "kl05.9e", 0x00000, 0x010000, CRC(d10aef95) SHA1(a611a35ab312caee19c31da079c647679d31673d) ) /* same as other sets but labeled KL */ + ROM_LOAD16_BYTE( "kl04.8e", 0x00001, 0x010000, CRC(329323a8) SHA1(e2ec7b059301c0a2e052dfc683e044c808ad9b33) ) /* same as other sets but labeled KL */ + + ROM_REGION( 0x300000, "tiles2", 0 ) /* Tiles 2 */ + ROM_LOAD( "mbd-01.9b", 0x000000, 0x100000, CRC(d7de4f4b) SHA1(4747f8795e277ed8106667b6f68e1176d95db684) ) + ROM_LOAD( "mbd-00.8b", 0x100000, 0x100000, CRC(adb20ba9) SHA1(2ffa1dd19a438a4d2f5743b1050a8037183a3e7d) ) + /* 0x100000 bytes expanded from mbd-02.10e copied here later */ + + ROM_REGION( 0x200000, "tiles3", 0 ) /* Tiles 3 */ + ROM_LOAD( "mbd-03.13b", 0x000000, 0x100000, CRC(cf798f2c) SHA1(f484a22679d6a4d4b0dcac820de3f1a37cbc478f) ) + ROM_LOAD( "mbd-04.14b", 0x100000, 0x100000, CRC(d9764d0b) SHA1(74d6f09d65d073606a6e10556cedf740aa50ff08) ) + + ROM_REGION( 0x400000, "sprites1", 0 ) /* Sprites 1 */ + ROM_LOAD16_BYTE( "mbd-05.16b", 0x000001, 0x200000, CRC(1768c66a) SHA1(06bf3bb187c65db9dcce959a43a7231e2ac45c17) ) + ROM_LOAD16_BYTE( "mbd-06.17b", 0x000000, 0x200000, CRC(7750847a) SHA1(358266ed68a9816094e7aab0905d958284c8ce98) ) + + ROM_REGION( 0x400000, "sprites2", 0 ) /* Sprites 2 */ + ROM_LOAD16_BYTE( "mbd-07.18b", 0x000001, 0x200000, CRC(241faac1) SHA1(588be0cf2647c1d185a99c987a5a20ab7ad8dea8) ) + ROM_LOAD16_BYTE( "mbd-08.19b", 0x000000, 0x200000, CRC(f13b1e56) SHA1(f8f5e8c4e6c159f076d4e6505bd901ade5c6a0ca) ) + + ROM_REGION( 0x0100000, "gfx6", 0 ) /* 1bpp graphics */ + ROM_LOAD16_BYTE( "mbd-02.10e", 0x000000, 0x080000, CRC(b25aa721) SHA1(efe800759080bd1dac2da93bd79062a48c5da2b2) ) + + ROM_REGION( 0x80000, "oki1", 0 ) /* Oki samples 1 */ + ROM_LOAD( "mbd-10.17p", 0x000000, 0x080000, CRC(f159f76a) SHA1(0b1ea69fecdd151e2b1fa96a21eade492499691d) ) + + ROM_REGION( 0x80000, "oki2", 0 ) /* Oki samples 1 */ + ROM_LOAD( "mbd-09.16p", 0x000000, 0x080000, CRC(f44f2f87) SHA1(d941520bdfc9e6d88c45462bc1f697c18f33498e) ) + + ROM_REGION( 0x000400, "proms", 0 ) /* Priority (not used) */ + ROM_LOAD( "kj-00.15n", 0x000000, 0x00400, CRC(add4d50b) SHA1(080e5a8192a146d5141aef5c8d9996ddf8cd3ab4) ) +ROM_END + ROM_START( boogwinga ) /* VER 1.5 ASA 92.12.07 */ ROM_REGION( 0x100000, "maincpu", 0 ) /* DE102 code (encrypted) */ ROM_LOAD16_BYTE( "km_00-2.2b", 0x000000, 0x040000, CRC(71ab71c6) SHA1(00bfd71dd9ae5f12c574ab0ecc07d85898930c4b) ) @@ -594,6 +638,7 @@ DRIVER_INIT_MEMBER(boogwing_state,boogwing) } GAME( 1992, boogwing, 0, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (Euro v1.5, 92.12.07)", GAME_SUPPORTS_SAVE ) +GAME( 1992, boogwingu,boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (USA v1.7, 92.12.14)", GAME_SUPPORTS_SAVE ) GAME( 1992, boogwinga,boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "Boogie Wings (Asia v1.5, 92.12.07)", GAME_SUPPORTS_SAVE ) GAME( 1992, ragtime, boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "The Great Ragtime Show (Japan v1.5, 92.12.07)", GAME_SUPPORTS_SAVE ) GAME( 1992, ragtimea, boogwing, boogwing, boogwing, boogwing_state, boogwing, ROT0, "Data East Corporation", "The Great Ragtime Show (Japan v1.3, 92.11.26)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/cardline.c b/src/mame/drivers/cardline.c index fe70e1b88d4..5f51b6eff64 100644 --- a/src/mame/drivers/cardline.c +++ b/src/mame/drivers/cardline.c @@ -14,7 +14,7 @@ XTAL 4 MHz TODO: - Hook up MC6845P + Really understand ASIC chip ***********************************/ @@ -37,56 +37,117 @@ public: m_colorram(*this, "colorram"), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_screen(*this, "screen") + { } - int m_video; required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_colorram; - int m_var; + + UINT8 m_video; + UINT8 m_hsync_q; + DECLARE_WRITE8_MEMBER(vram_w); DECLARE_WRITE8_MEMBER(attr_w); DECLARE_WRITE8_MEMBER(video_w); - DECLARE_READ8_MEMBER(unk_r); + DECLARE_READ8_MEMBER(hsync_r); DECLARE_WRITE8_MEMBER(lamps_w); + + DECLARE_READ8_MEMBER(asic_r); + DECLARE_WRITE8_MEMBER(asic_w); + DECLARE_WRITE8_MEMBER(a3003_w); + DECLARE_PALETTE_INIT(cardline); - UINT32 screen_update_cardline(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + virtual void machine_start(); + + DECLARE_WRITE_LINE_MEMBER(hsync_changed); + DECLARE_WRITE_LINE_MEMBER(vsync_changed); + MC6845_BEGIN_UPDATE(crtc_begin_update); + MC6845_UPDATE_ROW(crtc_update_row); + required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; + required_device<screen_device> m_screen; }; +void cardline_state::machine_start() +{ + m_video = 0; + m_hsync_q = 1; + for (int i=0; i < 0x2000; i++) + m_maincpu.target()->space(AS_IO).write_byte(i, 0x73); + save_item(NAME(m_video)); + save_item(NAME(m_hsync_q)); +} -#define DRAW_TILE(machine, offset, transparency) m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,\ - (m_videoram[index+offset] | (m_colorram[index+offset]<<8))&0x3fff,\ - (m_colorram[index+offset]&0x80)>>7,\ - 0,0,\ - x<<3, y<<3,\ - transparency?transparency:(UINT32)-1); +MC6845_BEGIN_UPDATE( cardline_state::crtc_begin_update ) +{ +} + -UINT32 cardline_state::screen_update_cardline(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +MC6845_UPDATE_ROW( cardline_state::crtc_update_row ) { - int x,y; - bitmap.fill(0, cliprect); - for(y=0;y<32;y++) + UINT8 *gfx; + UINT16 x = 0; + int gfx_ofs; + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + + gfx_ofs = 0; + + // bits 0 and 1 seem to be chip select lines. None of those selected + // most likely would put the output lines into a floating (threestate) + // state. The next statement doesn't add functioality but documents + // how this works. + + if(m_video & 1) + gfx_ofs = 0; + + if(m_video & 2) + gfx_ofs = 0x1000; + + gfx = memregion("gfx1")->base(); + + for (UINT8 cx = 0; cx < x_count; cx++) { - for(x=0;x<64;x++) + int bg_tile = (m_videoram[ma + gfx_ofs] | (m_colorram[ma + gfx_ofs]<<8)) & 0x3fff; + int bg_pal_ofs = ((m_colorram[ma + gfx_ofs] & 0x80) ? 256 : 0); + int fg_tile = (m_videoram[ma + gfx_ofs + 0x800] | (m_colorram[ma + gfx_ofs + 0x800]<<8)) & 0x3fff; + int fg_pal_ofs = ((m_colorram[ma + gfx_ofs + 0x800] & 0x80) ? 256 : 0); + for (int i = 0; i < 8; i++) { - int index=y*64+x; - if(m_video&1) - { - DRAW_TILE(machine(),0,0); - DRAW_TILE(machine(),0x800,1); - } - - if(m_video&2) - { - DRAW_TILE(machine(),0x1000,0); - DRAW_TILE(machine(),0x1800,1); - } + int bg_col = gfx[bg_tile * 64 + ra * 8 + i]; + int fg_col = gfx[fg_tile * 64 + ra * 8 + i]; + + if (fg_col == 1) + bitmap.pix32(y, x) = palette[bg_pal_ofs + bg_col]; + else + bitmap.pix32(y, x) = palette[fg_pal_ofs + fg_col]; + + x++; } + ma++; } - return 0; +} + + +WRITE_LINE_MEMBER(cardline_state::hsync_changed) +{ + /* update any video up to the current scanline */ + m_hsync_q = (state ? 0x00 : 0x10); + m_screen->update_now(); +} + +WRITE_LINE_MEMBER(cardline_state::vsync_changed) +{ + //m_maincpu->set_input_line(0, state ? ASSERT_LINE : CLEAR_LINE); +} + +WRITE8_MEMBER(cardline_state::a3003_w) +{ + /* seems a generate a signal when address is written to */ } WRITE8_MEMBER(cardline_state::vram_w) @@ -95,6 +156,23 @@ WRITE8_MEMBER(cardline_state::vram_w) m_videoram[offset]=data; } +READ8_MEMBER(cardline_state::asic_r) +{ + static int t=0; + //printf("asic read %02x\n", offset); + // change "if (0)" to "if (1)" to get "ASIC is ERROR!" message + if (0) + return t++; + else + return 0xaa; +} + +WRITE8_MEMBER(cardline_state::asic_w) +{ + //printf("asic write %02x %02x\n", offset, data); +} + + WRITE8_MEMBER(cardline_state::attr_w) { offset+=0x1000*((m_video&2)>>1); @@ -107,14 +185,9 @@ WRITE8_MEMBER(cardline_state::video_w) //printf("m_video %x\n", m_video); } -READ8_MEMBER(cardline_state::unk_r) +READ8_MEMBER(cardline_state::hsync_r) { - /* TODO: Certainly a hack. Most likely video related. - * Using VBLANK makes screen updates to slow. May be hblank. - */ - m_var^=0x10; - //printf("var %x\n",m_var); - return m_var; + return m_hsync_q; } WRITE8_MEMBER(cardline_state::lamps_w) @@ -140,18 +213,19 @@ static ADDRESS_MAP_START( mem_io, AS_IO, 8, cardline_state ) AM_RANGE(0x2005, 0x2005) AM_READ_PORT("IN1") AM_RANGE(0x2006, 0x2006) AM_READ_PORT("DSW") AM_RANGE(0x2007, 0x2007) AM_WRITE(lamps_w) - AM_RANGE(0x2008, 0x2008) AM_NOP - AM_RANGE(0x2080, 0x213f) AM_NOP + AM_RANGE(0x2008, 0x2008) AM_NOP // set to 1 during coin input + //AM_RANGE(0x2080, 0x213f) AM_NOP // ???? + AM_RANGE(0x2100, 0x213f) AM_READWRITE(asic_r, asic_w) AM_RANGE(0x2400, 0x2400) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x2800, 0x2800) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x2801, 0x2801) AM_DEVWRITE("crtc", mc6845_device, register_w) - AM_RANGE(0x2840, 0x2840) AM_NOP - AM_RANGE(0x2880, 0x2880) AM_NOP - AM_RANGE(0x3003, 0x3003) AM_NOP + //AM_RANGE(0x2840, 0x2840) AM_NOP // ??? + //AM_RANGE(0x2880, 0x2880) AM_NOP // ??? + AM_RANGE(0x3003, 0x3003) AM_WRITE(a3003_w) AM_RANGE(0xc000, 0xdfff) AM_WRITE(vram_w) AM_SHARE("videoram") AM_RANGE(0xe000, 0xffff) AM_WRITE(attr_w) AM_SHARE("colorram") /* Ports */ - AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_READWRITE(unk_r, video_w) + AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_READWRITE(hsync_r, video_w) ADDRESS_MAP_END @@ -248,8 +322,9 @@ static MACHINE_CONFIG_START( cardline, cardline_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 35*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 0*8, 32*8-1) - MCFG_SCREEN_UPDATE_DRIVER(cardline_state, screen_update_cardline) - MCFG_SCREEN_PALETTE("palette") + //MCFG_SCREEN_UPDATE_DRIVER(cardline_state, screen_update_cardline) + //MCFG_SCREEN_PALETTE("palette") + MCFG_SCREEN_UPDATE_DEVICE("crtc", mc6845_device, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", cardline) MCFG_PALETTE_ADD("palette", 512) @@ -258,6 +333,10 @@ static MACHINE_CONFIG_START( cardline, cardline_state ) MCFG_MC6845_ADD("crtc", MC6845, "screen", MASTER_CLOCK/8) /* divisor guessed - result is 56 Hz */ MCFG_MC6845_SHOW_BORDER_AREA(false) MCFG_MC6845_CHAR_WIDTH(8) + MCFG_MC6845_BEGIN_UPDATE_CB(cardline_state, crtc_begin_update) + MCFG_MC6845_UPDATE_ROW_CB(cardline_state, crtc_update_row) + MCFG_MC6845_OUT_HSYNC_CB(WRITELINE(cardline_state, hsync_changed)) + MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(cardline_state, vsync_changed)) MCFG_DEFAULT_LAYOUT(layout_cardline) @@ -292,4 +371,4 @@ ROM_START( cardline ) ROM_END -GAME( 199?, cardline, 0, cardline, cardline, driver_device, 0, ROT0, "Veltmeijer", "Card Line" , 0) +GAME( 199?, cardline, 0, cardline, cardline, driver_device, 0, ROT0, "Veltmeijer", "Card Line" , GAME_SUPPORTS_SAVE) diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c index 88801490976..ad4d93de403 100644 --- a/src/mame/drivers/centiped.c +++ b/src/mame/drivers/centiped.c @@ -619,7 +619,7 @@ WRITE8_MEMBER(centiped_state::led_w) } -READ8_MEMBER(centiped_state::caterplr_rand_r) +READ8_MEMBER(centiped_state::caterplr_unknown_r) { return machine().rand() % 0xff; } @@ -712,7 +712,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( caterplr_map, AS_PROGRAM, 8, centiped_state ) AM_IMPORT_FROM(centiped_base_map) - AM_RANGE(0x1780, 0x1780) AM_READ(caterplr_rand_r) + AM_RANGE(0x1780, 0x1780) AM_READ(caterplr_unknown_r) AM_RANGE(0x1000, 0x100f) AM_READWRITE(caterplr_AY8910_r, caterplr_AY8910_w) ADDRESS_MAP_END @@ -1743,7 +1743,7 @@ static MACHINE_CONFIG_DERIVED( centipdb, centiped ) /* sound hardware */ MCFG_SOUND_REPLACE("pokey", AY8910, 12096000/8) - MCFG_AY8910_PORT_A_READ_CB(READ8(centiped_state, caterplr_rand_r)) + MCFG_AY8910_PORT_A_READ_CB(READ8(centiped_state, caterplr_unknown_r)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0) MACHINE_CONFIG_END @@ -1759,7 +1759,7 @@ static MACHINE_CONFIG_DERIVED( magworm, centiped_base ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("pokey", AY8910, 12096000/8) - MCFG_AY8910_PORT_A_READ_CB(READ8(centiped_state, caterplr_rand_r)) + MCFG_AY8910_PORT_A_READ_CB(READ8(centiped_state, caterplr_unknown_r)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0) MACHINE_CONFIG_END diff --git a/src/mame/drivers/cidelsa.c b/src/mame/drivers/cidelsa.c index 6d9e88e4cc7..24f6dfd6f12 100644 --- a/src/mame/drivers/cidelsa.c +++ b/src/mame/drivers/cidelsa.c @@ -196,15 +196,6 @@ static ADDRESS_MAP_START( draco_sound_map, AS_PROGRAM, 8, draco_state ) AM_RANGE(0x000, 0x3ff) AM_ROMBANK("bank1") ADDRESS_MAP_END -static ADDRESS_MAP_START( draco_sound_io_map, AS_IO, 8, draco_state ) - AM_RANGE(COP400_PORT_D, COP400_PORT_D) AM_WRITE(sound_bankswitch_w) - AM_RANGE(COP400_PORT_G, COP400_PORT_G) AM_WRITE(sound_g_w) - AM_RANGE(COP400_PORT_L, COP400_PORT_L) AM_READWRITE(psg_r, psg_w) - AM_RANGE(COP400_PORT_IN, COP400_PORT_IN) AM_READ(sound_in_r) - AM_RANGE(COP400_PORT_SIO, COP400_PORT_SIO) AM_NOP - AM_RANGE(COP400_PORT_SK, COP400_PORT_SK) AM_WRITENOP -ADDRESS_MAP_END - /* Input Ports */ READ_LINE_MEMBER( cidelsa_state::cdp1869_pcb_r ) @@ -469,8 +460,12 @@ static MACHINE_CONFIG_START( draco, draco_state ) MCFG_CPU_ADD(COP402N_TAG, COP402, DRACO_SND_CHR1) MCFG_CPU_PROGRAM_MAP(draco_sound_map) - MCFG_CPU_IO_MAP(draco_sound_io_map) MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED ) + MCFG_COP400_WRITE_D_CB(WRITE8(draco_state, sound_bankswitch_w)) + MCFG_COP400_WRITE_G_CB(WRITE8(draco_state, sound_g_w)) + MCFG_COP400_READ_L_CB(READ8(draco_state, psg_r)) + MCFG_COP400_WRITE_L_CB(WRITE8(draco_state, psg_w)) + MCFG_COP400_READ_IN_CB(READ8(draco_state, sound_in_r)) /* input/output hardware */ MCFG_DEVICE_ADD("ic29", CDP1852, 0) // clock is really tied to CDP1869 CMSEL (pin 37) diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c index 9f0307c9ce5..b1d5da9af1d 100644 --- a/src/mame/drivers/cninja.c +++ b/src/mame/drivers/cninja.c @@ -1877,8 +1877,60 @@ ROM_START( robocop2 ) ROM_LOAD( "go-12.v7", 0x00000, 0x400, CRC(278f674f) SHA1(d4f5b9770d6d2ddebf1b999e291c80a3e274d492) ) /* Priority Unused */ ROM_END + ROM_START( robocop2u ) ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ + ROM_LOAD16_BYTE( "gp03-3.k1", 0x00000, 0x20000, CRC(c016a84b) SHA1(3ac4c61fd87899831e093596ffd7e8a213b946a2) ) + ROM_LOAD16_BYTE( "gp07-3.k3", 0x00001, 0x20000, CRC(54c541ae) SHA1(c9aa46bdc182aceff3cfb1ad958965deabb335e3) ) + ROM_LOAD16_BYTE( "gp02-3.j1", 0x40000, 0x20000, CRC(6777b8a0) SHA1(9081bd187c3b5923efab3e4abde952e9ab29d946) ) // == gq-02.j1 in 'robocop2' + ROM_LOAD16_BYTE( "gp06-3.j3", 0x40001, 0x20000, CRC(73b8cf96) SHA1(6c651db1d4322946529569f3e516f382f1becde7) ) + ROM_LOAD16_BYTE( "gp01-.h1", 0x80000, 0x20000, CRC(ab5356c0) SHA1(297a89b4d9212c916745997bbb959b0ed660f909) ) // no '-1' but matches other '-1' roms we have + ROM_LOAD16_BYTE( "gp05-.h3", 0x80001, 0x20000, CRC(ce21bda5) SHA1(615701d4abdb56d50da44589e6e03909f4b28d45) ) + ROM_LOAD16_BYTE( "gp00-.f1", 0xc0000, 0x20000, CRC(a93369ea) SHA1(9e13c36112eb7ebc97dc919e24d0b2955c57e10e) ) + ROM_LOAD16_BYTE( "gp04-.f3", 0xc0001, 0x20000, CRC(ee2f6ad9) SHA1(3abc07792f444a3415fd32e50d6855843e900b1d) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_LOAD( "gp-09.k13", 0x00000, 0x10000, CRC(4a4e0f8d) SHA1(5408465667d2854bbade23a26ba619d42a0c22f8) ) + + ROM_REGION( 0x020000, "gfx1", 0 ) + ROM_LOAD16_BYTE( "gp10-1.y6", 0x00001, 0x10000, CRC(d25d719c) SHA1(be874cf403ec0e607eb9b54b7cfff0a53f4d59a2) ) /* chars */ + ROM_LOAD16_BYTE( "gp11-1.z6", 0x00000, 0x10000, CRC(030ded47) SHA1(59ded540b2601ec37255e871e38ac71a47c8d007) ) + + ROM_REGION( 0x100000, "gfx2", 0 ) + ROM_LOAD( "mah-04.z4", 0x000000, 0x40000, CRC(9b6ca18c) SHA1(29a20200ea50b9e8e79da072c1b6e580e6ca180f) ) + ROM_CONTINUE( 0x080000, 0x40000 ) + ROM_LOAD( "mah-03.y4", 0x040000, 0x40000, CRC(37894ddc) SHA1(ee08440b3b2023ec6ee2af6d509b642bcead2e60) ) + ROM_CONTINUE( 0x0c0000, 0x40000 ) + + ROM_REGION( 0x180000, "gfx3", 0 ) + ROM_LOAD( "mah-01.z1", 0x000000, 0x40000, CRC(26e0dfff) SHA1(8cca2dbcda64f4bc6ee0842486da7dc7df3046fd) ) + ROM_CONTINUE( 0x0c0000, 0x40000 ) + ROM_LOAD( "mah-00.y1", 0x040000, 0x40000, CRC(7bd69e41) SHA1(296adbf7d40f1092bf38599b3bad51f39d8093b2) ) + ROM_CONTINUE( 0x100000, 0x40000 ) + ROM_LOAD( "mah-02.a1", 0x080000, 0x40000, CRC(328a247d) SHA1(879f75452dc7c327fd5b35c960c58bc0c0efd33c) ) + ROM_CONTINUE( 0x140000, 0x40000 ) + + ROM_REGION( 0x300000, "gfx4", 0 ) + ROM_LOAD16_BYTE( "mah-05.y9", 0x000000, 0x80000, CRC(6773e613) SHA1(ee6cb4272bb9f80e0d918dc059b40e0a47db0876) ) + ROM_LOAD16_BYTE( "mah-08.y12", 0x000001, 0x80000, CRC(88d310a5) SHA1(82d249f331f51b7c72f9114ecf4e835ccdae7e97) ) + ROM_LOAD16_BYTE( "mah-06.z9", 0x100000, 0x80000, CRC(27a8808a) SHA1(cb14992d1073de38406e36f5884d77933dd6b765) ) + ROM_LOAD16_BYTE( "mah-09.z12", 0x100001, 0x80000, CRC(a58c43a7) SHA1(0b7f743cf0443d998479b7d5d95b8f2aaf1ef136) ) + ROM_LOAD16_BYTE( "mah-07.a9", 0x200000, 0x80000, CRC(526f4190) SHA1(23cb79230ec267b8e4236381b5a596d7af8ec5b3) ) + ROM_LOAD16_BYTE( "mah-10.a12", 0x200001, 0x80000, CRC(14b770da) SHA1(6d57da630da1ec457ebaeed8c251e85bd737e97c) ) + + ROM_REGION( 0x40000, "oki1", 0 ) /* Oki samples */ + ROM_LOAD( "gp-08.j13", 0x00000, 0x20000, CRC(365183b1) SHA1(7d3c201c49981c3ac84022283b048e380cbb7ec3) ) + + ROM_REGION( 0x80000, "oki2", 0 ) /* Extra Oki samples */ + ROM_LOAD( "mah-11.f13", 0x00000, 0x80000, CRC(642bc692) SHA1(8d9e446b7633bb6acc46d9f92044a69b99a0ccc9) ) /* banked */ + + ROM_REGION( 1024, "proms", 0 ) + ROM_LOAD( "go-12.v7", 0x00000, 0x400, CRC(278f674f) SHA1(d4f5b9770d6d2ddebf1b999e291c80a3e274d492) ) /* Priority Unused */ +ROM_END + + +ROM_START( robocop2ua ) + ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 code */ ROM_LOAD16_BYTE( "robo03.k1", 0x00000, 0x20000, CRC(f4c96cc9) SHA1(2eb58aca1134c33f2084267e65a565f9adc6ba49) ) ROM_LOAD16_BYTE( "robo07.k3", 0x00001, 0x20000, CRC(11e53a7c) SHA1(cdeb7f1983a771238d9d2000f99aed35ae4a06ee) ) ROM_LOAD16_BYTE( "robo02.j1", 0x40000, 0x20000, CRC(fa086a0d) SHA1(34a3f9c6890e1fbacbde3e39a861e42d511cd8ec) ) @@ -2230,6 +2282,7 @@ GAME( 1990, edrandy, 0, edrandy, edrandy, driver_device, 0, ROT0 GAME( 1990, edrandy2, edrandy, edrandy, edrandc, driver_device, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (World ver 2)", GAME_SUPPORTS_SAVE ) GAME( 1990, edrandy1, edrandy, edrandy, edrandc, driver_device, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (World ver 1)", GAME_SUPPORTS_SAVE ) GAME( 1990, edrandyj, edrandy, edrandy, edrandc, driver_device, 0, ROT0, "Data East Corporation", "The Cliffhanger - Edward Randy (Japan ver 3)", GAME_SUPPORTS_SAVE ) + GAME( 1991, cninja, 0, cninja, cninja, cninja_state, cninja, ROT0, "Data East Corporation", "Caveman Ninja (World ver 4)", GAME_SUPPORTS_SAVE ) GAME( 1991, cninja1, cninja, cninja, cninja, cninja_state, cninja, ROT0, "Data East Corporation", "Caveman Ninja (World ver 1)", GAME_SUPPORTS_SAVE ) GAME( 1991, cninjau, cninja, cninja, cninjau, cninja_state, cninja, ROT0, "Data East Corporation", "Caveman Ninja (US ver 4)", GAME_SUPPORTS_SAVE ) @@ -2237,9 +2290,12 @@ GAME( 1991, joemac, cninja, cninja, cninja, cninja_state, cninja, ROT0 GAME( 1991, stoneage, cninja, stoneage, cninja, cninja_state, stoneage, ROT0, "bootleg", "Stoneage (bootleg of Caveman Ninja)", GAME_SUPPORTS_SAVE ) GAME( 1991, cninjabl, cninja, cninjabl, cninja, driver_device, 0, ROT0, "bootleg", "Caveman Ninja (bootleg)", GAME_SUPPORTS_SAVE ) GAME( 1991, cninjabl2,cninja, cninjabl, cninja, driver_device, 0, ROT0, "bootleg", "Caveman Ninja (bootleg, alt)", GAME_NOT_WORKING ) + GAME( 1991, robocop2, 0, robocop2, robocop2, driver_device, 0, ROT0, "Data East Corporation", "Robocop 2 (Euro/Asia v0.10)", GAME_SUPPORTS_SAVE ) -GAME( 1991, robocop2u,robocop2,robocop2, robocop2, driver_device, 0, ROT0, "Data East Corporation", "Robocop 2 (US v0.05)", GAME_SUPPORTS_SAVE ) +GAME( 1991, robocop2u,robocop2,robocop2, robocop2, driver_device, 0, ROT0, "Data East Corporation", "Robocop 2 (US v0.10)", GAME_SUPPORTS_SAVE ) +GAME( 1991, robocop2ua,robocop2,robocop2,robocop2, driver_device, 0, ROT0, "Data East Corporation", "Robocop 2 (US v0.05)", GAME_SUPPORTS_SAVE ) GAME( 1991, robocop2j,robocop2,robocop2, robocop2, driver_device, 0, ROT0, "Data East Corporation", "Robocop 2 (Japan v0.11)", GAME_SUPPORTS_SAVE ) + GAME( 1992, mutantf, 0, mutantf, mutantf, cninja_state, mutantf, ROT0, "Data East Corporation", "Mutant Fighter (World ver EM-5)", GAME_SUPPORTS_SAVE ) GAME( 1992, mutantf4, mutantf, mutantf, mutantf, cninja_state, mutantf, ROT0, "Data East Corporation", "Mutant Fighter (World ver EM-4)", GAME_SUPPORTS_SAVE ) GAME( 1992, mutantf3, mutantf, mutantf, mutantf, cninja_state, mutantf, ROT0, "Data East Corporation", "Mutant Fighter (World ver EM-3)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/cps3.c b/src/mame/drivers/cps3.c index 21a05f72d53..9df931edfe4 100644 --- a/src/mame/drivers/cps3.c +++ b/src/mame/drivers/cps3.c @@ -777,10 +777,10 @@ void cps3_state::init_common(void) m_nops[0] = 0x00090009; // flash roms - astring tempstr; + std::string tempstr; for (int simmnum = 0; simmnum < 7; simmnum++) for (int chipnum = 0; chipnum < 8; chipnum++) - m_simm[simmnum][chipnum] = machine().device<fujitsu_29f016a_device>(tempstr.format("simm%d.%d", simmnum + 1, chipnum).c_str()); + m_simm[simmnum][chipnum] = machine().device<fujitsu_29f016a_device>(strformat(tempstr,"simm%d.%d", simmnum + 1, chipnum).c_str()); m_eeprom = auto_alloc_array(machine(), UINT32, 0x400/4); machine().device<nvram_device>("eeprom")->set_base(m_eeprom, 0x400); diff --git a/src/mame/drivers/cv1k.c b/src/mame/drivers/cv1k.c index fa09d9fd124..3d807e588d5 100644 --- a/src/mame/drivers/cv1k.c +++ b/src/mame/drivers/cv1k.c @@ -193,7 +193,7 @@ public: m_eepromout(*this, "EEPROMOUT"), m_idleramoffs(0), m_idlepc(0) - { } + { } required_device<sh34_base_device> m_maincpu; required_device<epic12_device> m_blitter; diff --git a/src/mame/drivers/darkseal.c b/src/mame/drivers/darkseal.c index 7c6bd773c51..5667defa5bc 100644 --- a/src/mame/drivers/darkseal.c +++ b/src/mame/drivers/darkseal.c @@ -23,7 +23,7 @@ /******************************************************************************/ -WRITE16_MEMBER(darkseal_state::darkseal_control_w) +WRITE16_MEMBER(darkseal_state::control_w) { switch (offset<<1) { case 6: /* DMA flag */ @@ -38,7 +38,7 @@ WRITE16_MEMBER(darkseal_state::darkseal_control_w) } } -READ16_MEMBER(darkseal_state::darkseal_control_r) +READ16_MEMBER(darkseal_state::control_r) { switch (offset<<1) { @@ -61,9 +61,9 @@ static ADDRESS_MAP_START( darkseal_map, AS_PROGRAM, 16, darkseal_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0x100000, 0x103fff) AM_RAM AM_SHARE("ram") AM_RANGE(0x120000, 0x1207ff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE(darkseal_palette_24bit_rg_w) AM_SHARE("paletteram") - AM_RANGE(0x141000, 0x141fff) AM_RAM_WRITE(darkseal_palette_24bit_b_w) AM_SHARE("paletteram2") - AM_RANGE(0x180000, 0x18000f) AM_READWRITE(darkseal_control_r, darkseal_control_w) + AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE(palette_24bit_rg_w) AM_SHARE("paletteram") + AM_RANGE(0x141000, 0x141fff) AM_RAM_WRITE(palette_24bit_b_w) AM_SHARE("paletteram2") + AM_RANGE(0x180000, 0x18000f) AM_READWRITE(control_r, control_w) AM_RANGE(0x200000, 0x201fff) AM_DEVREADWRITE("tilegen2", deco16ic_device, pf1_data_r, pf1_data_w) AM_RANGE(0x202000, 0x203fff) AM_DEVREADWRITE("tilegen2", deco16ic_device, pf2_data_r, pf2_data_w) @@ -236,7 +236,7 @@ static MACHINE_CONFIG_START( darkseal, darkseal_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) - MCFG_SCREEN_UPDATE_DRIVER(darkseal_state, screen_update_darkseal) + MCFG_SCREEN_UPDATE_DRIVER(darkseal_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", darkseal) @@ -467,8 +467,8 @@ DRIVER_INIT_MEMBER(darkseal_state,darkseal) /******************************************************************************/ -GAME( 1990, darkseal, 0, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Dark Seal (World revision 3)", 0 ) -GAME( 1990, darkseal1, darkseal, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Dark Seal (World revision 1)", 0 ) -GAME( 1990, darksealj, darkseal, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Dark Seal (Japan revision 4)", 0 ) -GAME( 1990, gatedoom, darkseal, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Gate of Doom (US revision 4)", 0 ) -GAME( 1990, gatedoom1, darkseal, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Gate of Doom (US revision 1)", 0 ) +GAME( 1990, darkseal, 0, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Dark Seal (World revision 3)", GAME_SUPPORTS_SAVE ) +GAME( 1990, darkseal1, darkseal, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Dark Seal (World revision 1)", GAME_SUPPORTS_SAVE ) +GAME( 1990, darksealj, darkseal, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Dark Seal (Japan revision 4)", GAME_SUPPORTS_SAVE ) +GAME( 1990, gatedoom, darkseal, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Gate of Doom (US revision 4)", GAME_SUPPORTS_SAVE ) +GAME( 1990, gatedoom1, darkseal, darkseal, darkseal, darkseal_state, darkseal, ROT0, "Data East Corporation", "Gate of Doom (US revision 1)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c index 07fb8c73f9d..4a43c2b766d 100644 --- a/src/mame/drivers/ddragon.c +++ b/src/mame/drivers/ddragon.c @@ -1674,6 +1674,44 @@ ROM_START( ddragon2 ) ROM_LOAD( "prom.16", 0x0000, 0x0200, CRC(46339529) SHA1(64f4c42a826d67b7cbaa8a23a45ebc4eb6248891) ) /* sprite timing (same as ddragon) */ ROM_END +// came from a dead board, 2 of the program roms were failing +// if you attempt to use ROMs from another set it fails on Game Over due to code which should be different at 0x1800 in ic63 +ROM_START( ddragon2j ) + ROM_REGION( 0x30000, "maincpu", 0 ) + ROM_LOAD( "26a9-0_j.ic38", 0x08000, 0x8000, CRC(5e4fcdff) SHA1(78bf79a0b4f248c3355fef40448c76eb028f9163) ) + ROM_LOAD( "26aa-0_j.ic52", 0x10000, 0x8000, CRC(bfb4ee04) SHA1(3692bbdef7d5b7cc3eb76362945b91b4a0f6ad4b) ) + ROM_LOAD( "26ab-0.ic53", 0x18000, 0x8000, NO_DUMP) // proper dump might match other sets + ROM_LOAD( "26ac-0_j.ic63", 0x20000, 0x8000, NO_DUMP) // should be different + + ROM_REGION( 0x10000, "sub", 0 ) /* sprite CPU 64kb (Upper 16kb = 0) */ + ROM_LOAD( "26ae-0.bin", 0x00000, 0x10000, CRC(ea437867) SHA1(cd910203af0565f981b9bdef51ea6e9c33ee82d3) ) + + ROM_REGION( 0x10000, "soundcpu", 0 ) /* music CPU, 64kb */ + ROM_LOAD( "26ad-0.ic41", 0x00000, 0x8000, CRC(3788af3b) SHA1(7f8833b01522553c767c470a9c27d24e638f37b9) ) // why is this different, label was the same + + ROM_REGION( 0x10000, "gfx1", 0 ) + ROM_LOAD( "26a8-0e.19", 0x00000, 0x10000, CRC(4e80cd36) SHA1(dcae0709f27f32effb359f6b943f61b102749f2a) ) /* chars */ + + ROM_REGION( 0xc0000, "gfx2", 0 ) + ROM_LOAD( "26j0-0.bin", 0x00000, 0x20000, CRC(db309c84) SHA1(ee095e4a3bc86737539784945decb1f63da47b9b) ) /* sprites */ + ROM_LOAD( "26j1-0.bin", 0x20000, 0x20000, CRC(c3081e0c) SHA1(c4a9ae151aae21073a2c79c5ac088c72d4f3d9db) ) + ROM_LOAD( "26af-0.bin", 0x40000, 0x20000, CRC(3a615aad) SHA1(ec90a35224a177d00327de6fd1a299df38abd790) ) + ROM_LOAD( "26j2-0.bin", 0x60000, 0x20000, CRC(589564ae) SHA1(1e6e0ef623545615e8409b6d3ba586a71e2612b6) ) + ROM_LOAD( "26j3-0.bin", 0x80000, 0x20000, CRC(daf040d6) SHA1(ab0fd5482625dbe64f0f0b0baff5dcde05309b81) ) + ROM_LOAD( "26a10-0.bin", 0xa0000, 0x20000, CRC(6d16d889) SHA1(3bc62b3e7f4ddc3200a9cf8469239662da80c854) ) + + ROM_REGION( 0x40000, "gfx3", 0 ) + ROM_LOAD( "26j4-0.bin", 0x00000, 0x20000, CRC(a8c93e76) SHA1(54d64f052971e7fa0d21c5ce12f87b0fa2b648d6) ) /* tiles */ + ROM_LOAD( "26j5-0.bin", 0x20000, 0x20000, CRC(ee555237) SHA1(f9698f3e57f933a43e508f60667c860dee034d05) ) + + ROM_REGION( 0x40000, "oki", 0 ) /* adpcm samples */ + ROM_LOAD( "26j6-0.bin", 0x00000, 0x20000, CRC(a84b2a29) SHA1(9cb529e4939c16a0a42f45dd5547c76c2f86f07b) ) + ROM_LOAD( "26j7-0.bin", 0x20000, 0x20000, CRC(bc6a48d5) SHA1(04c434f8cd42a8f82a263548183569396f9b684d) ) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD( "prom.16", 0x0000, 0x0200, CRC(46339529) SHA1(64f4c42a826d67b7cbaa8a23a45ebc4eb6248891) ) /* sprite timing (same as ddragon) */ +ROM_END + ROM_START( ddragon2u ) ROM_REGION( 0x30000, "maincpu", 0 ) ROM_LOAD( "26a9-04.bin", 0x08000, 0x8000, CRC(f2cfc649) SHA1(d3f1e0bae02472914a940222e4f600170a91736d) ) @@ -2101,8 +2139,10 @@ GAME( 1987, ddragonb, ddragon, ddragonb, ddragon, ddragon_state, ddragon, GAME( 1987, ddragonba, ddragon, ddragonba, ddragon, ddragon_state, ddragon, ROT0, "bootleg", "Double Dragon (bootleg with M6803)", GAME_SUPPORTS_SAVE ) GAME( 1987, ddragon6809, ddragon, ddragon6809, ddragon, ddragon_state, ddragon6809, ROT0, "bootleg", "Double Dragon (bootleg with 3xM6809, set 1)", GAME_NOT_WORKING ) GAME( 1987, ddragon6809a,ddragon, ddragon6809, ddragon, ddragon_state, ddragon6809, ROT0, "bootleg", "Double Dragon (bootleg with 3xM6809, set 2)", GAME_NOT_WORKING ) + GAME( 1988, ddragon2, 0, ddragon2, ddragon2, ddragon_state, ddragon2, ROT0, "Technos Japan", "Double Dragon II - The Revenge (World)", GAME_SUPPORTS_SAVE ) GAME( 1988, ddragon2u, ddragon2, ddragon2, ddragon2, ddragon_state, ddragon2, ROT0, "Technos Japan", "Double Dragon II - The Revenge (US)", GAME_SUPPORTS_SAVE ) +GAME( 1988, ddragon2j, ddragon2, ddragon2, ddragon2, ddragon_state, ddragon2, ROT0, "Technos Japan", "Double Dragon II - The Revenge (Japan)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // bad dump /* these were conversions of double dragon */ GAME( 1991, tstrike, 0, darktowr, tstrike, ddragon_state, darktowr, ROT0, "East Coast Coin Company", "Thunder Strike (set 1)", GAME_SUPPORTS_SAVE ) // same manufacturer as The Game Room? @@ -2113,5 +2153,6 @@ GAME( 1992, darktowr, 0, darktowr, darktowr, ddragon_state, darktowr, ROT /* these run on their own board, but are basically the same game. Toffy even has 'dangerous dungeons' text in it */ GAME( 1993, toffy, 0, toffy, toffy, ddragon_state, toffy, ROT0, "Midas", "Toffy", GAME_SUPPORTS_SAVE ) + GAME( 1994, stoffy, 0, toffy, toffy, ddragon_state, toffy, ROT0, "Midas", "Super Toffy", GAME_SUPPORTS_SAVE ) GAME( 1994, stoffyu, stoffy, toffy, toffy, ddragon_state, toffy, ROT0, "Midas (Unico license)", "Super Toffy (Unico license)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c index 859ccc328bb..e1cbc84b339 100644 --- a/src/mame/drivers/deco32.c +++ b/src/mame/drivers/deco32.c @@ -2922,8 +2922,8 @@ ROM_END ROM_START( fghthistu ) /* DE-0395-1 PCB */ ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ - ROM_LOAD32_WORD( "le-00.1f", 0x000000, 0x80000, CRC(a5c410eb) SHA1(e2b0cb2351782e1155ecc4029010beb7326fd874) ) /* Version 42-05, US */ - ROM_LOAD32_WORD( "le-01.2f", 0x000002, 0x80000, CRC(7e148aa2) SHA1(b21e16604c4d29611f91d629deb9f041eaf41e9b) ) + ROM_LOAD32_WORD( "le00-1.1f", 0x000000, 0x80000, CRC(fccacafb) SHA1(b7236a90a09dbd5870a16aa4e4eac5ab5c098418) ) /* Version 42-06, US */ + ROM_LOAD32_WORD( "le01-1.2f", 0x000002, 0x80000, CRC(06a3c326) SHA1(3d8842fb69def93fc544e89fd0e56ada416157dc) ) ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */ ROM_LOAD( "le02.18k", 0x00000, 0x10000, CRC(5fd2309c) SHA1(2fb7af54d5cd9bf7dd6fb4f6b82aa52b03294f1f) ) @@ -2954,7 +2954,41 @@ ROM_START( fghthistu ) /* DE-0395-1 PCB */ ROM_LOAD( "ve-01a.4d", 0x0200, 0x0104, NO_DUMP ) /* PAL16L8 is read protected */ ROM_END -ROM_START( fghthistua ) /* DE-0380-2 PCB */ +ROM_START( fghthistua ) /* DE-0395-1 PCB */ + ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ + ROM_LOAD32_WORD( "le00.1f", 0x000000, 0x80000, CRC(a5c410eb) SHA1(e2b0cb2351782e1155ecc4029010beb7326fd874) ) /* Version 42-05, US */ + ROM_LOAD32_WORD( "le01.2f", 0x000002, 0x80000, CRC(7e148aa2) SHA1(b21e16604c4d29611f91d629deb9f041eaf41e9b) ) + + ROM_REGION(0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_LOAD( "le02.18k", 0x00000, 0x10000, CRC(5fd2309c) SHA1(2fb7af54d5cd9bf7dd6fb4f6b82aa52b03294f1f) ) + + ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_LOAD( "mbf00-8.8a", 0x000000, 0x100000, CRC(d3e9b580) SHA1(fc4676e0ecc6c32441ff66fa1f990cc3158237db) ) /* Encrypted tiles */ + + ROM_REGION( 0x100000, "gfx2", 0 ) + ROM_LOAD( "mbf01-8.9a", 0x000000, 0x100000, CRC(0c6ed2eb) SHA1(8e37ef4b1f0b6d3370a08758bfd602cb5f221282) ) /* Encrypted tiles */ + + ROM_REGION( 0x800000, "gfx3", 0 ) /* Sprites */ + ROM_LOAD16_BYTE( "mbf02-16.16d", 0x000001, 0x200000, CRC(c19c5953) SHA1(e6ed26f932c6c86bbd1fc4c000aa2f510c268009) ) + ROM_LOAD16_BYTE( "mbf04-16.18d", 0x000000, 0x200000, CRC(f6a23fd7) SHA1(74e5559f17cd591aa25d2ed6c34ac9ed89e2e9ba) ) + ROM_LOAD16_BYTE( "mbf03-16.17d", 0x400001, 0x200000, CRC(37d25c75) SHA1(8219d31091b4317190618edd8acc49f97cba6a1e) ) + ROM_LOAD16_BYTE( "mbf05-16.19d", 0x400000, 0x200000, CRC(137be66d) SHA1(3fde345183ce04a7a65b4cedfd050d771df7d026) ) + + ROM_REGION(0x80000, "oki1", 0 ) + ROM_LOAD( "mbf06.15k", 0x000000, 0x80000, CRC(fb513903) SHA1(7727a49ff7977f159ed36d097020edef3b5b36ba) ) + + ROM_REGION(0x80000, "oki2", 0 ) + ROM_LOAD( "mbf07.16k", 0x000000, 0x80000, CRC(51d4adc7) SHA1(22106ed7a05db94adc5a783ce34529e29d24d41a) ) + + ROM_REGION(512, "proms", 0 ) + ROM_LOAD( "kt-00.8j", 0, 512, CRC(7294354b) SHA1(14fe42ad5d26d022c0fe9a46a4a9017af2296f40) ) /* MB7124H type prom */ + + ROM_REGION( 0x0400, "plds", 0 ) + ROM_LOAD( "ve-00.3d", 0x0000, 0x0104, NO_DUMP ) /* PAL16L8 is read protected */ + ROM_LOAD( "ve-01a.4d", 0x0200, 0x0104, NO_DUMP ) /* PAL16L8 is read protected */ +ROM_END + +ROM_START( fghthistub ) /* DE-0380-2 PCB */ ROM_REGION(0x100000, "maincpu", 0 ) /* ARM 32 bit code */ ROM_LOAD32_WORD( "kz00-1.1f", 0x000000, 0x80000, CRC(3a3dd15c) SHA1(689b51adf73402b12191a75061b8e709468c91bc) ) /* Version 42-03, US */ ROM_LOAD32_WORD( "kz01-1.2f", 0x000002, 0x80000, CRC(86796cd6) SHA1(c397c07d7a1d03ba96ccb2fe7a0ad25b8331e945) ) @@ -3749,8 +3783,9 @@ GAME( 1991, captavenua, captaven, captaven, captaven, deco32_state, captaven, GAME( 1991, captavenj, captaven, captaven, captaven, deco32_state, captaven, ROT0, "Data East Corporation", "Captain America and The Avengers (Japan Rev 0.2)", 0 ) GAME( 1993, fghthist, 0, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (World ver 43-07, DE-0380-2 PCB)", 0 ) -GAME( 1993, fghthistu, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-05, DE-0395-1 PCB)", 0 ) -GAME( 1993, fghthistua, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-03, DE-0380-2 PCB)", 0 ) +GAME( 1993, fghthistu, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-06, DE-0395-1 PCB)", 0 ) +GAME( 1993, fghthistua, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-05, DE-0395-1 PCB)", 0 ) +GAME( 1993, fghthistub, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (US ver 42-03, DE-0380-2 PCB)", 0 ) GAME( 1993, fghthistj, fghthist, fghthsta, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (Japan ver 41-07, DE-0395-1 PCB)", 0 ) GAME( 1993, fghthistja, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (Japan ver 41-05, DE-0380-2 PCB)", 0 ) GAME( 1993, fghthistjb, fghthist, fghthist, fghthist, deco32_state, fghthist, ROT0, "Data East Corporation", "Fighter's History (Japan ver 41-04, DE-0380-1 PCB)", 0 ) diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index 52dca8d880f..d3d19d933dd 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -1171,7 +1171,14 @@ static INPUT_PORTS_START( dkongjr ) PORT_INCLUDE( dkong_in0_4 ) PORT_INCLUDE( dkong_in1_4 ) PORT_INCLUDE( dkong_in2 ) + PORT_INCLUDE( dkong_dsw0 ) + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:!3,!4" ) + PORT_DIPSETTING( 0x00, "10000" ) + PORT_DIPSETTING( 0x04, "15000" ) + PORT_DIPSETTING( 0x08, "20000" ) + PORT_DIPSETTING( 0x0c, "25000" ) #if DEBUG_DISC_SOUND PORT_START("TST") /* TST */ diff --git a/src/mame/drivers/exidy.c b/src/mame/drivers/exidy.c index 29a9ec6f2a3..dee3157159f 100644 --- a/src/mame/drivers/exidy.c +++ b/src/mame/drivers/exidy.c @@ -639,16 +639,16 @@ static INPUT_PORTS_START( pepper2 ) PORT_START("DSW") PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:2,3") - PORT_DIPSETTING( 0x06, "40000" ) - PORT_DIPSETTING( 0x04, "50000" ) - PORT_DIPSETTING( 0x02, "60000" ) - PORT_DIPSETTING( 0x00, "70000" ) - PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7") + PORT_DIPSETTING( 0x06, "40000 and 80000" ) + PORT_DIPSETTING( 0x04, "50000 and 100000" ) + PORT_DIPSETTING( 0x02, "70000 and 140000" ) // 1st Edition manual lists 60000 + PORT_DIPSETTING( 0x00, "90000 and 180000" ) // 1st Edition manual lists 70000 + PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7") PORT_DIPSETTING( 0x60, "2" ) PORT_DIPSETTING( 0x40, "3" ) PORT_DIPSETTING( 0x20, "4" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5,8") + PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5,8") PORT_DIPSETTING( 0x90, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x00, "Coin A 2C/1C Coin B 1C/3C" ) PORT_DIPSETTING( 0x98, DEF_STR( 1C_1C ) ) diff --git a/src/mame/drivers/exidy440.c b/src/mame/drivers/exidy440.c index 39aad94c4f9..b35de1fe770 100644 --- a/src/mame/drivers/exidy440.c +++ b/src/mame/drivers/exidy440.c @@ -1651,59 +1651,59 @@ ROM_END ROM_START( whodunit ) /* Version 9 */ ROM_REGION( 0x50000, "maincpu", 0 ) /* 64k for code for the first CPU, plus lots of banked ROMs */ - ROM_LOAD( "wdl-9_1-a_2764.bin", 0x08000, 0x2000, CRC(903e45f6) SHA1(3c5d3f0ec851331febf7da493bfa3b33ac5aaff3) ) - ROM_LOAD( "wdl8.3a", 0x0a000, 0x2000, CRC(5d1530f8) SHA1(258d19c14a757497e0ce95a3ab8332168d97e67c) ) // WDL-9_3-A_2764.bin - ROM_LOAD( "wdl-9_4-a_2764.bin", 0x0c000, 0x2000, CRC(96c6b81f) SHA1(c4775b7cdbd2c977131b0df99aef75834a68559f) ) - ROM_LOAD( "wdl-9_6-a_2764.bin", 0x0e000, 0x2000, CRC(c9a864ec) SHA1(2f67b8b711101818888bb9624be8a33d98ddc811) ) - ROM_LOAD( "wdl-9_4-e_2764.bin", 0x14000, 0x2000, CRC(246c836f) SHA1(1c39b61dbbde5df2a79a9c96ed2a85eaf870b46c) ) - ROM_LOAD( "wdl-9_6-e_2764.bin", 0x16000, 0x2000, CRC(65d551c0) SHA1(7ad3c2567ad7f64b8c3b9fade01296bad1ffff89) ) - ROM_LOAD( "wdl-9_7-e_2764.bin", 0x18000, 0x2000, CRC(aee7a237) SHA1(e12a5cc825944c95461b436041631bc64ae7f0c3) ) - ROM_LOAD( "wdl-9_8-e_2764.bin", 0x1a000, 0x2000, CRC(a1c1e995) SHA1(7fdd54102ba3d1a4e1612d1e63ac435317184c03) ) - ROM_LOAD( "wdl8.10e", 0x1c000, 0x2000, CRC(f24adde5) SHA1(e4b22da75341a70c75fa245e26e965f1f7cbf3a1) ) // WDL-9_10-E_2764.bin - ROM_LOAD( "wdl8.11e", 0x1e000, 0x2000, CRC(ad6fe69e) SHA1(039baebb3a232cbd2c497cfe8aba234469e16ada) ) // WDL-9_11-E_2764.bin - ROM_LOAD( "wdl6.1d", 0x20000, 0x2000, CRC(3572fb71) SHA1(dcc5b04c8a4c0db62eeffe8524f67574142f1a19) ) // WDL-9_1-D_2764.bin - ROM_LOAD( "wdl6.3d", 0x22000, 0x2000, CRC(158074f4) SHA1(d4520017973a4476ba9ed7b5ed7cbfc3f5302f3a) ) // WDL-9_3-D_2764.bin - ROM_LOAD( "wdl8.4d", 0x24000, 0x2000, CRC(601d8bd0) SHA1(118e5d7358034c98a1e4e87b1e523e574c8264bb) ) // WDL-9_4-D_2764.bin - ROM_LOAD( "wdl8.6d", 0x26000, 0x2000, CRC(b72e8f63) SHA1(bdb5b379d5c14123e59cd186499703ca2096027c) ) // WDL-9_6-D_2764.bin - ROM_LOAD( "wdl6.7d", 0x28000, 0x2000, CRC(e3f55a4b) SHA1(9d3e4fc68f9b8c7228ef407f039849fdcdb1d9ef) ) // WDL-9_7-D_2764.bin - ROM_LOAD( "wdl6.8d", 0x2a000, 0x2000, CRC(932689c8) SHA1(9b65db2c4ce544331290f3dd57fde3b6aab905ff) ) // WDL-9_8-D_2764.bin - ROM_LOAD( "wdl6.10d", 0x2c000, 0x2000, CRC(0c4348f2) SHA1(19a3919dccf198c2189e310545aa15b319990579) ) // WDL-9_10-D_2764.bin - ROM_LOAD( "wdl8.11d", 0x2e000, 0x2000, CRC(92391ffe) SHA1(1f4bb288ec80af3eb452ca8fe67cba862e23977b) ) // WDL-9_11-D_2764.bin - ROM_LOAD( "wdl8.1c", 0x30000, 0x2000, CRC(21c62c90) SHA1(98dbf416e9d88383bf3e0e17a71861671046aa20) ) // WDL-9_1-C_2764.bin - ROM_LOAD( "wdl-9_3-c_2764.bin", 0x32000, 0x2000, CRC(b221188e) SHA1(0f488e7a46489e38da322769189c2f992bb3e1e7) ) - ROM_LOAD( "wdl6.4c", 0x34000, 0x2000, CRC(7b58dfac) SHA1(b52566a9bfcd30510accc7e32c3535b99bf3372c) ) // WDL-9_4-C_2764.bin - ROM_LOAD( "wdl-9_6-c_2764.bin", 0x36000, 0x2000, CRC(abe0ba57) SHA1(9dfcdf8f7b8f09d6d2e90e1bb1fda9064215fe14) ) - ROM_LOAD( "wdl6.7c", 0x38000, 0x2000, CRC(3cb3faae) SHA1(de719bc4806aa54ff73a723e3dfffed8bb394da0) ) // WDL-9_7-C_2764.bin - ROM_LOAD( "wdl6.8c", 0x3a000, 0x2000, CRC(51e95d91) SHA1(091dca2360456988da9ed39e757918ec58118258) ) // WDL-9_8-C_2764.bin - ROM_LOAD( "wdl6.10c", 0x3c000, 0x2000, CRC(eab12084) SHA1(aa75dfdeece07baa6cf72cecfc006af958768acf) ) // WDL-9_10-C_2764.bin - ROM_LOAD( "wdl6.11c", 0x3e000, 0x2000, CRC(fe2c532f) SHA1(199334fdc4c92ecacf4d4337bbe7419a53b78067) ) // WDL-9_11-C_2764.bin - ROM_LOAD( "wdl6.1b", 0x40000, 0x2000, CRC(cdaa5ca0) SHA1(1232e54cd61293f1cb7a8c628bb811bfd527ba93) ) // WDL-9_1-B_2764.bin - ROM_LOAD( "wdl6.3b", 0x42000, 0x2000, CRC(9bbc8161) SHA1(a4849ff8c957904a87f53edf79961a035e9b7c6b) ) // WDL-9_3-B_2764.bin - ROM_LOAD( "wdl8.4b", 0x44000, 0x2000, CRC(eb7dc583) SHA1(fe61e1eb16be246493db40f90090317d60a21bbf) ) // WDL-9_4-B_2764.bin - ROM_LOAD( "wdl8.6b", 0x46000, 0x2000, CRC(91c049a5) SHA1(8c6ae1e80925526902f80a2c549c6739353cdb86) ) // WDL-9_6-B_2764.bin - ROM_LOAD( "wdl6.7b", 0x48000, 0x2000, CRC(fe0a2d00) SHA1(a8649a95567f6c1f6513461a19250455b8cfe3ed) ) // WDL-9_7-B_2764.bin - ROM_LOAD( "wdl8.8b", 0x4a000, 0x2000, CRC(33792758) SHA1(408da288288f54f7446b083b14dc74d43ef4ab9f) ) // WDL-9_8-B_2764.bin - ROM_LOAD( "wdl-9_10-b_2764.bin",0x4c000, 0x2000, CRC(c5ab5805) SHA1(fd7c47e50eb4005b81309a73afae2e04a823d00b) ) + ROM_LOAD( "wdl-9_1-a.1a", 0x08000, 0x2000, CRC(903e45f6) SHA1(3c5d3f0ec851331febf7da493bfa3b33ac5aaff3) ) // all these ROMs are 2764 eproms + ROM_LOAD( "wdl-9_3-a.3a", 0x0a000, 0x2000, CRC(5d1530f8) SHA1(258d19c14a757497e0ce95a3ab8332168d97e67c) ) + ROM_LOAD( "wdl-9_4-a.4a", 0x0c000, 0x2000, CRC(96c6b81f) SHA1(c4775b7cdbd2c977131b0df99aef75834a68559f) ) + ROM_LOAD( "wdl-9_6-a.6a", 0x0e000, 0x2000, CRC(c9a864ec) SHA1(2f67b8b711101818888bb9624be8a33d98ddc811) ) + ROM_LOAD( "wdl-9_4-e.4e", 0x14000, 0x2000, CRC(246c836f) SHA1(1c39b61dbbde5df2a79a9c96ed2a85eaf870b46c) ) + ROM_LOAD( "wdl-9_6-e.6e", 0x16000, 0x2000, CRC(65d551c0) SHA1(7ad3c2567ad7f64b8c3b9fade01296bad1ffff89) ) + ROM_LOAD( "wdl-9_7-e.7e", 0x18000, 0x2000, CRC(aee7a237) SHA1(e12a5cc825944c95461b436041631bc64ae7f0c3) ) + ROM_LOAD( "wdl-9_8-e.8e", 0x1a000, 0x2000, CRC(a1c1e995) SHA1(7fdd54102ba3d1a4e1612d1e63ac435317184c03) ) + ROM_LOAD( "wdl-9_10-e.10e", 0x1c000, 0x2000, CRC(f24adde5) SHA1(e4b22da75341a70c75fa245e26e965f1f7cbf3a1) ) + ROM_LOAD( "wdl-9_11-e.11e", 0x1e000, 0x2000, CRC(ad6fe69e) SHA1(039baebb3a232cbd2c497cfe8aba234469e16ada) ) + ROM_LOAD( "wdl-9_1-d.1d", 0x20000, 0x2000, CRC(3572fb71) SHA1(dcc5b04c8a4c0db62eeffe8524f67574142f1a19) ) + ROM_LOAD( "wdl-9_3-d.3d", 0x22000, 0x2000, CRC(158074f4) SHA1(d4520017973a4476ba9ed7b5ed7cbfc3f5302f3a) ) + ROM_LOAD( "wdl-9_4-d.4d", 0x24000, 0x2000, CRC(601d8bd0) SHA1(118e5d7358034c98a1e4e87b1e523e574c8264bb) ) + ROM_LOAD( "wdl-9_6-d.6d", 0x26000, 0x2000, CRC(b72e8f63) SHA1(bdb5b379d5c14123e59cd186499703ca2096027c) ) + ROM_LOAD( "wdl-9_7-d.7d", 0x28000, 0x2000, CRC(e3f55a4b) SHA1(9d3e4fc68f9b8c7228ef407f039849fdcdb1d9ef) ) + ROM_LOAD( "wdl-9_8-d.8d", 0x2a000, 0x2000, CRC(932689c8) SHA1(9b65db2c4ce544331290f3dd57fde3b6aab905ff) ) + ROM_LOAD( "wdl-9_10-d.10d", 0x2c000, 0x2000, CRC(0c4348f2) SHA1(19a3919dccf198c2189e310545aa15b319990579) ) + ROM_LOAD( "wdl-9_11-d.11d", 0x2e000, 0x2000, CRC(92391ffe) SHA1(1f4bb288ec80af3eb452ca8fe67cba862e23977b) ) + ROM_LOAD( "wdl-9_1-c.1c", 0x30000, 0x2000, CRC(21c62c90) SHA1(98dbf416e9d88383bf3e0e17a71861671046aa20) ) + ROM_LOAD( "wdl-9_3-c.3c", 0x32000, 0x2000, CRC(b221188e) SHA1(0f488e7a46489e38da322769189c2f992bb3e1e7) ) + ROM_LOAD( "wdl-9_4-c.4c", 0x34000, 0x2000, CRC(7b58dfac) SHA1(b52566a9bfcd30510accc7e32c3535b99bf3372c) ) + ROM_LOAD( "wdl-9_6-c.6c", 0x36000, 0x2000, CRC(abe0ba57) SHA1(9dfcdf8f7b8f09d6d2e90e1bb1fda9064215fe14) ) + ROM_LOAD( "wdl-9_7-c.7c", 0x38000, 0x2000, CRC(3cb3faae) SHA1(de719bc4806aa54ff73a723e3dfffed8bb394da0) ) + ROM_LOAD( "wdl-9_8-c.8c", 0x3a000, 0x2000, CRC(51e95d91) SHA1(091dca2360456988da9ed39e757918ec58118258) ) + ROM_LOAD( "wdl-9_10-c.10c", 0x3c000, 0x2000, CRC(eab12084) SHA1(aa75dfdeece07baa6cf72cecfc006af958768acf) ) + ROM_LOAD( "wdl-9_11-c.11c", 0x3e000, 0x2000, CRC(fe2c532f) SHA1(199334fdc4c92ecacf4d4337bbe7419a53b78067) ) + ROM_LOAD( "wdl-9_1-b.1b", 0x40000, 0x2000, CRC(cdaa5ca0) SHA1(1232e54cd61293f1cb7a8c628bb811bfd527ba93) ) + ROM_LOAD( "wdl-9_3-b.3b", 0x42000, 0x2000, CRC(9bbc8161) SHA1(a4849ff8c957904a87f53edf79961a035e9b7c6b) ) + ROM_LOAD( "wdl-9_4-b.4b", 0x44000, 0x2000, CRC(eb7dc583) SHA1(fe61e1eb16be246493db40f90090317d60a21bbf) ) + ROM_LOAD( "wdl-9_6-b.6b", 0x46000, 0x2000, CRC(91c049a5) SHA1(8c6ae1e80925526902f80a2c549c6739353cdb86) ) + ROM_LOAD( "wdl-9_7-b.7b", 0x48000, 0x2000, CRC(fe0a2d00) SHA1(a8649a95567f6c1f6513461a19250455b8cfe3ed) ) + ROM_LOAD( "wdl-9_8-b.8b", 0x4a000, 0x2000, CRC(33792758) SHA1(408da288288f54f7446b083b14dc74d43ef4ab9f) ) + ROM_LOAD( "wdl-9_10-b.10b", 0x4c000, 0x2000, CRC(c5ab5805) SHA1(fd7c47e50eb4005b81309a73afae2e04a823d00b) ) ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "wda-9_h-1_2764.bin", 0x0e000, 0x2000, CRC(dc4b36f0) SHA1(1ddd47dbd7f3e360aae830b67a13dd6a1d7a6497) ) + ROM_LOAD( "wda-9_h-1.h1", 0x0e000, 0x2000, CRC(dc4b36f0) SHA1(1ddd47dbd7f3e360aae830b67a13dd6a1d7a6497) ) // This ROM is a 2764 eprom ROM_REGION( 0x20000, "cvsd", 0 ) - ROM_LOAD( "wda6.k2", 0x00000, 0x2000, CRC(d4951375) SHA1(88616a7cb587748b366ece6126185a85e7375659) ) // WDL-9_2-K_2764.bin - ROM_LOAD( "wda6.l2", 0x02000, 0x2000, CRC(be8dcf07) SHA1(9a6e9b256da07be50feb81b27e53d86b3f016f4e) ) // WDL-9_2-L_2764.bin - ROM_LOAD( "wda6.m2", 0x04000, 0x2000, CRC(fb389e2d) SHA1(8ee1be233429d6b7cbb56a13586e2db49dffaca1) ) // WDL-9_2-M_2764.bin - ROM_LOAD( "wda6.n2", 0x06000, 0x2000, CRC(3849bc78) SHA1(2b5bffec6919c3f4dfd3618f715445b02905cc1d) ) // WDL-9_2-N_2764.bin - ROM_LOAD( "wda6.p2", 0x08000, 0x2000, CRC(d0dcea80) SHA1(ac3305eab146f1741d38678a6f473474bef05ade) ) // WDL-9_2-P_2764.bin - ROM_LOAD( "wda6.r2", 0x0a000, 0x2000, CRC(748b0930) SHA1(f7e06ca6bef86d2bc8fa4569bcfc8d2ec199e4bd) ) // WDL-9_2-R_2764.bin - ROM_LOAD( "wda6.s2", 0x0c000, 0x2000, CRC(23d5c5a9) SHA1(ab8997556b6a9c4a011c367a2035aeba3c752be1) ) // WDL-9_2-S_2764.bin - ROM_LOAD( "wda6.t2", 0x0e000, 0x2000, CRC(a807536d) SHA1(154564c189c7e6f755acda95178db503991ecbaa) ) // WDL-9_2-T_2764.bin - ROM_LOAD( "wda8.l1", 0x12000, 0x2000, CRC(27b856bd) SHA1(f66f6f898d2a7f044b7d331290a7bf32715b5587) ) // WDL-9_1-L_2764.bin - ROM_LOAD( "wda8.m1", 0x14000, 0x2000, CRC(8e15c601) SHA1(924b10523cf8ff802c0907dae96cbc9bae9fe4b0) ) // WDL-9_1-M_2764.bin - ROM_LOAD( "xba1.1n", 0x16000, 0x2000, CRC(2e855698) SHA1(fa4c3ec03fdd1c569c0ca2418899ffa81b5259ec) ) // WDL-9_1-N_2764.bin - ROM_LOAD( "wda6.p1", 0x18000, 0x2000, CRC(3ffaaa22) SHA1(a0848c0f4d799c3b6e9fe8e8f89e7e36754174f6) ) // WDL-9_1-P_2764.bin - ROM_LOAD( "wda6.r1", 0x1a000, 0x2000, CRC(0579a3b8) SHA1(554bced664c12547a766ee6df1278b967714b5ae) ) // WDL-9_1-R_2764.bin - ROM_LOAD( "wda6.s1", 0x1c000, 0x2000, CRC(f55c3c6e) SHA1(54878fe1106986e9aa26c6141921429119703990) ) // WDL-9_1-S_2764.bin - ROM_LOAD( "wda6.t1", 0x1e000, 0x2000, CRC(38363b52) SHA1(4b1c3225a32882e35e5af742f1c6b1e665722fd4) ) // WDL-9_1-T_2764.bin + ROM_LOAD( "wda-9_2-k.2k", 0x00000, 0x2000, CRC(d4951375) SHA1(88616a7cb587748b366ece6126185a85e7375659) ) // all these ROMs are 2764 eproms + ROM_LOAD( "wda-9_2-l.2l", 0x02000, 0x2000, CRC(be8dcf07) SHA1(9a6e9b256da07be50feb81b27e53d86b3f016f4e) ) + ROM_LOAD( "wda-9_2-m.2m", 0x04000, 0x2000, CRC(fb389e2d) SHA1(8ee1be233429d6b7cbb56a13586e2db49dffaca1) ) + ROM_LOAD( "wda-9_2-n.2n", 0x06000, 0x2000, CRC(3849bc78) SHA1(2b5bffec6919c3f4dfd3618f715445b02905cc1d) ) + ROM_LOAD( "wda-9_2-p.2p", 0x08000, 0x2000, CRC(d0dcea80) SHA1(ac3305eab146f1741d38678a6f473474bef05ade) ) + ROM_LOAD( "wda-9_2-r.2r", 0x0a000, 0x2000, CRC(748b0930) SHA1(f7e06ca6bef86d2bc8fa4569bcfc8d2ec199e4bd) ) + ROM_LOAD( "wda-9_2-s.2s", 0x0c000, 0x2000, CRC(23d5c5a9) SHA1(ab8997556b6a9c4a011c367a2035aeba3c752be1) ) + ROM_LOAD( "wda-9_2-t.2t", 0x0e000, 0x2000, CRC(a807536d) SHA1(154564c189c7e6f755acda95178db503991ecbaa) ) + ROM_LOAD( "wda-9_1-l.1l", 0x12000, 0x2000, CRC(27b856bd) SHA1(f66f6f898d2a7f044b7d331290a7bf32715b5587) ) + ROM_LOAD( "wda-9_1-m.1m", 0x14000, 0x2000, CRC(8e15c601) SHA1(924b10523cf8ff802c0907dae96cbc9bae9fe4b0) ) + ROM_LOAD( "wda-9_1-n.1n", 0x16000, 0x2000, CRC(2e855698) SHA1(fa4c3ec03fdd1c569c0ca2418899ffa81b5259ec) ) + ROM_LOAD( "wda-9_1-p.1p", 0x18000, 0x2000, CRC(3ffaaa22) SHA1(a0848c0f4d799c3b6e9fe8e8f89e7e36754174f6) ) + ROM_LOAD( "wda-9_1-r.1r", 0x1a000, 0x2000, CRC(0579a3b8) SHA1(554bced664c12547a766ee6df1278b967714b5ae) ) + ROM_LOAD( "wda-9_1-s.1s", 0x1c000, 0x2000, CRC(f55c3c6e) SHA1(54878fe1106986e9aa26c6141921429119703990) ) + ROM_LOAD( "wda-9_1-t.1t", 0x1e000, 0x2000, CRC(38363b52) SHA1(4b1c3225a32882e35e5af742f1c6b1e665722fd4) ) ROM_REGION( 0x01100, "user1", 0 ) /* vertical sync timing */ @@ -1794,55 +1794,55 @@ ROM_END ROM_START( showdown ) ROM_REGION( 0x50000, "maincpu", 0 ) /* 64k for code for the first CPU, plus lots of banked ROMs */ - ROM_LOAD( "showda1.bin", 0x08000, 0x2000, CRC(e4031507) SHA1(3d5183cd049be843fd38e3d1bd2d0a305df723bd) ) - ROM_LOAD( "showd3a.bin", 0x0a000, 0x2000, CRC(e7de171e) SHA1(881a2b596949de3b4bb1263e2aa08faeb3051a6e) ) - ROM_LOAD( "showd4a.bin", 0x0c000, 0x2000, CRC(5c8683c9) SHA1(81d0880fcbd3c1662ea4dd1662d6987adbdb4f71) ) - ROM_LOAD( "showd6a.bin", 0x0e000, 0x2000, CRC(4a408379) SHA1(1ec83b7416f948bc31bafa8ddaa87c23490bce16) ) - ROM_LOAD( "showd11e.bin", 0x1e000, 0x2000, CRC(1c6b34e5) SHA1(ae5ddd80d5fdc89274f44a30c4ec1aa325b26cc7) ) - ROM_LOAD( "showd1d.bin", 0x20000, 0x2000, CRC(db4c8cf6) SHA1(11fb37afb87b926f94f23abf90fb537a3a867aec) ) - ROM_LOAD( "showd3d.bin", 0x22000, 0x2000, CRC(24242867) SHA1(aa109231cad5fcb9e24578b567ff0fe50a72be44) ) - ROM_LOAD( "showd4d.bin", 0x24000, 0x2000, CRC(36f247e9) SHA1(749f5ea3307bfc02bced9535ebd733bb1297a0ae) ) - ROM_LOAD( "showd6d.bin", 0x26000, 0x2000, CRC(c9b14d8d) SHA1(48e66f5a4dc63c3948e32aeb0a151c8f9d2082b2) ) - ROM_LOAD( "showd7d.bin", 0x28000, 0x2000, CRC(fd054cd2) SHA1(a7fcedd30c088d2cb9fe013eaa1214b48f3569ab) ) - ROM_LOAD( "showd8d.bin", 0x2a000, 0x2000, CRC(8bf32822) SHA1(91a1ab0bc6aac3dfe7b7e60e3d35e7d4909aa09d) ) - ROM_LOAD( "showd10d.bin", 0x2c000, 0x2000, CRC(a2051da2) SHA1(f879459a90a00c9dc4ba0b1e8895bc1352286a8a) ) - ROM_LOAD( "showd11d.bin", 0x2e000, 0x2000, CRC(0748f345) SHA1(c435cd0769aa44162b3f7aa1bc230cadf572ca73) ) - ROM_LOAD( "showd1c.bin", 0x30000, 0x2000, CRC(c016cf73) SHA1(30221e5f878354933b8caf8c644f2c6f1e5dcd30) ) - ROM_LOAD( "showd3c.bin", 0x32000, 0x2000, CRC(652503ee) SHA1(90c76bb5d59ce0626d1d7f3feaea05ef984f9551) ) - ROM_LOAD( "showd4c.bin", 0x34000, 0x2000, CRC(b4dab193) SHA1(e028d2c865e7607f43bb7b4f2afe75082618a47b) ) - ROM_LOAD( "showd6c.bin", 0x36000, 0x2000, CRC(a1e6a2b3) SHA1(b75a0355e1245a8ca0dc438c66a96c064b7ab40a) ) - ROM_LOAD( "showd7c.bin", 0x38000, 0x2000, CRC(bc1bea93) SHA1(77fcfef6c509186af394f0ad67717c11ca447fb7) ) - ROM_LOAD( "showd8c.bin", 0x3a000, 0x2000, CRC(337dd7fa) SHA1(4df916968f5a2e12cdc8bab585f58b6f6a9d2f4c) ) - ROM_LOAD( "showd10c.bin", 0x3c000, 0x2000, CRC(3ad32d71) SHA1(1a032eb136c56b97305e64572730a40c40d9c52b) ) - ROM_LOAD( "showd11c.bin", 0x3e000, 0x2000, CRC(5fe91932) SHA1(f4f880c55e72159a6754f7c939b4dbb16522e3ad) ) - ROM_LOAD( "showd1b.bin", 0x40000, 0x2000, CRC(54ff987e) SHA1(ea50a6e2b6c409403cec035f96f4672814e153e2) ) - ROM_LOAD( "showd3b.bin", 0x42000, 0x2000, CRC(e302e915) SHA1(cb2413c24503fd2363f6e717e8de558f771427a4) ) - ROM_LOAD( "showd4b.bin", 0x44000, 0x2000, CRC(1b981516) SHA1(16c417c9c1918a00dee976f3513925f8f28e6f41) ) - ROM_LOAD( "showd6b.bin", 0x46000, 0x2000, CRC(4ee00996) SHA1(7201aef40f6ea3b73d0c009117c174f19d97b98e) ) - ROM_LOAD( "showd7b.bin", 0x48000, 0x2000, CRC(018b7c00) SHA1(04879f476687e087d21bd8d5f439f3e45d39d142) ) - ROM_LOAD( "showd8b.bin", 0x4a000, 0x2000, CRC(024fe6ee) SHA1(4287091e65c58aec75c54e320c534d41def951f9) ) - ROM_LOAD( "showd10b.bin", 0x4c000, 0x2000, CRC(0b318dfe) SHA1(feb65530ea3aea6b0786875dc48d96e07d579636) ) + ROM_LOAD( "sld-5_1-a.1a", 0x08000, 0x2000, CRC(e4031507) SHA1(3d5183cd049be843fd38e3d1bd2d0a305df723bd) ) + ROM_LOAD( "sld-5_3-a.3a", 0x0a000, 0x2000, CRC(e7de171e) SHA1(881a2b596949de3b4bb1263e2aa08faeb3051a6e) ) + ROM_LOAD( "sld-5_4-a.4a", 0x0c000, 0x2000, CRC(5c8683c9) SHA1(81d0880fcbd3c1662ea4dd1662d6987adbdb4f71) ) + ROM_LOAD( "sld-5_6-a.6a", 0x0e000, 0x2000, CRC(4a408379) SHA1(1ec83b7416f948bc31bafa8ddaa87c23490bce16) ) + ROM_LOAD( "sld-5_11-e.11e", 0x1e000, 0x2000, CRC(1c6b34e5) SHA1(ae5ddd80d5fdc89274f44a30c4ec1aa325b26cc7) ) + ROM_LOAD( "sld-5_1-d.1d", 0x20000, 0x2000, CRC(db4c8cf6) SHA1(11fb37afb87b926f94f23abf90fb537a3a867aec) ) + ROM_LOAD( "sld-5_3-d.3d", 0x22000, 0x2000, CRC(24242867) SHA1(aa109231cad5fcb9e24578b567ff0fe50a72be44) ) + ROM_LOAD( "sld-5_4-d.4d", 0x24000, 0x2000, CRC(36f247e9) SHA1(749f5ea3307bfc02bced9535ebd733bb1297a0ae) ) + ROM_LOAD( "sld-5_6-d.6d", 0x26000, 0x2000, CRC(c9b14d8d) SHA1(48e66f5a4dc63c3948e32aeb0a151c8f9d2082b2) ) + ROM_LOAD( "sld-5_7-d.7d", 0x28000, 0x2000, CRC(fd054cd2) SHA1(a7fcedd30c088d2cb9fe013eaa1214b48f3569ab) ) + ROM_LOAD( "sld-5_8-d.8d", 0x2a000, 0x2000, CRC(8bf32822) SHA1(91a1ab0bc6aac3dfe7b7e60e3d35e7d4909aa09d) ) + ROM_LOAD( "sld-5_10-d.10d", 0x2c000, 0x2000, CRC(a2051da2) SHA1(f879459a90a00c9dc4ba0b1e8895bc1352286a8a) ) + ROM_LOAD( "sld-5_11-d.11d", 0x2e000, 0x2000, CRC(0748f345) SHA1(c435cd0769aa44162b3f7aa1bc230cadf572ca73) ) + ROM_LOAD( "sld-5_1-c.1c", 0x30000, 0x2000, CRC(c016cf73) SHA1(30221e5f878354933b8caf8c644f2c6f1e5dcd30) ) + ROM_LOAD( "sld-5_3-c.3c", 0x32000, 0x2000, CRC(652503ee) SHA1(90c76bb5d59ce0626d1d7f3feaea05ef984f9551) ) + ROM_LOAD( "sld-5_4-c.4c", 0x34000, 0x2000, CRC(b4dab193) SHA1(e028d2c865e7607f43bb7b4f2afe75082618a47b) ) + ROM_LOAD( "sld-5_6-c.6c", 0x36000, 0x2000, CRC(a1e6a2b3) SHA1(b75a0355e1245a8ca0dc438c66a96c064b7ab40a) ) + ROM_LOAD( "sld-5_7-c.7c", 0x38000, 0x2000, CRC(bc1bea93) SHA1(77fcfef6c509186af394f0ad67717c11ca447fb7) ) + ROM_LOAD( "sld-5_8-c.8c", 0x3a000, 0x2000, CRC(337dd7fa) SHA1(4df916968f5a2e12cdc8bab585f58b6f6a9d2f4c) ) + ROM_LOAD( "sld-5_10-c.10c", 0x3c000, 0x2000, CRC(3ad32d71) SHA1(1a032eb136c56b97305e64572730a40c40d9c52b) ) + ROM_LOAD( "sld-5_11-c.11c", 0x3e000, 0x2000, CRC(5fe91932) SHA1(f4f880c55e72159a6754f7c939b4dbb16522e3ad) ) + ROM_LOAD( "sld-5_1-b.1b", 0x40000, 0x2000, CRC(54ff987e) SHA1(ea50a6e2b6c409403cec035f96f4672814e153e2) ) + ROM_LOAD( "sld-5_3-b.3b", 0x42000, 0x2000, CRC(e302e915) SHA1(cb2413c24503fd2363f6e717e8de558f771427a4) ) + ROM_LOAD( "sld-5_4-b.4b", 0x44000, 0x2000, CRC(1b981516) SHA1(16c417c9c1918a00dee976f3513925f8f28e6f41) ) + ROM_LOAD( "sld-5_6-b.6b", 0x46000, 0x2000, CRC(4ee00996) SHA1(7201aef40f6ea3b73d0c009117c174f19d97b98e) ) + ROM_LOAD( "sld-5_7-b.7b", 0x48000, 0x2000, CRC(018b7c00) SHA1(04879f476687e087d21bd8d5f439f3e45d39d142) ) + ROM_LOAD( "sld-5_8-b.8b", 0x4a000, 0x2000, CRC(024fe6ee) SHA1(4287091e65c58aec75c54e320c534d41def951f9) ) + ROM_LOAD( "sld-5_10-b.10b", 0x4c000, 0x2000, CRC(0b318dfe) SHA1(feb65530ea3aea6b0786875dc48d96e07d579636) ) ROM_REGION( 0x10000, "audiocpu", 0 ) - ROM_LOAD( "showd1h.bin", 0x0e000, 0x2000, CRC(6a10ff47) SHA1(ee57de74ab9a5cfe5726212a9b905e91e6461225) ) + ROM_LOAD( "sda-5_h-1.h1", 0x0e000, 0x2000, CRC(6a10ff47) SHA1(ee57de74ab9a5cfe5726212a9b905e91e6461225) ) ROM_REGION( 0x20000, "cvsd", 0 ) - ROM_LOAD( "showd2k.bin", 0x00000, 0x2000, CRC(67a86f7f) SHA1(a4f70aab90acd2502e8f3f39efdafcd71b1a22b4) ) - ROM_LOAD( "showd2l.bin", 0x02000, 0x2000, CRC(0bb8874b) SHA1(8b643dbd5412a713b3e2831dd1ba2b7d1f613ac2) ) - ROM_LOAD( "showd2m.bin", 0x04000, 0x2000, CRC(8b77eac8) SHA1(d70038cd6655e71c6488c555ecb1d1a424d00d49) ) - ROM_LOAD( "showd2n.bin", 0x06000, 0x2000, CRC(78e6eed6) SHA1(d9218745fc497a67373b0f6fd82caeef33bb4b3e) ) - ROM_LOAD( "showd2p.bin", 0x08000, 0x2000, CRC(03a13435) SHA1(1965d26a2f294e883cc6a13bc89bf0c28e30d28e) ) - ROM_LOAD( "showd2r.bin", 0x0a000, 0x2000, CRC(1b6b7eac) SHA1(b30965203807d8b863e8b2863a222d2e614eee2d) ) - ROM_LOAD( "showd2s.bin", 0x0c000, 0x2000, CRC(b88aeb82) SHA1(62d87430c7aec1aec892a15e45fb257206d8cf94) ) - ROM_LOAD( "showd2t.bin", 0x0e000, 0x2000, CRC(5c801f4d) SHA1(e6dbb2d2815b9d848c0580cff47d1f0d10c1906d) ) - ROM_LOAD( "showd1k.bin", 0x10000, 0x2000, CRC(4e1f4f15) SHA1(cf075e09eaeab1e630b5b2e28c806d4c34eece48) ) - ROM_LOAD( "showd1l.bin", 0x12000, 0x2000, CRC(6779a745) SHA1(de7d8e39f053eaa45238844e477732295d9af494) ) - ROM_LOAD( "showd1m.bin", 0x14000, 0x2000, CRC(9cebd8ea) SHA1(ff8121c16e8fe93a59c49c20459287f6b002bbbc) ) - ROM_LOAD( "showd1n.bin", 0x16000, 0x2000, CRC(689d8a3f) SHA1(aa592b9edcac8d264c9c89871283dfeebce2300e) ) - ROM_LOAD( "showd1p.bin", 0x18000, 0x2000, CRC(862b350d) SHA1(12e6c92ba424df578eac5a820a68aaaffd73c577) ) - ROM_LOAD( "showd1r.bin", 0x1a000, 0x2000, CRC(95b099ed) SHA1(1327852712ade3fc96bd8192045c081c4d32f4ba) ) - ROM_LOAD( "showd1s.bin", 0x1c000, 0x2000, CRC(8f230881) SHA1(daa8efc355fb042b2fce89a0d2950a90e56a806f) ) - ROM_LOAD( "showd1t.bin", 0x1e000, 0x2000, CRC(70e724c7) SHA1(df2905f91038693c87452813216aa86bbb81521b) ) + ROM_LOAD( "sda-5_k-2.k2", 0x00000, 0x2000, CRC(67a86f7f) SHA1(a4f70aab90acd2502e8f3f39efdafcd71b1a22b4) ) + ROM_LOAD( "sda-5_l-2.l2", 0x02000, 0x2000, CRC(0bb8874b) SHA1(8b643dbd5412a713b3e2831dd1ba2b7d1f613ac2) ) + ROM_LOAD( "sda-5_m-2.m2", 0x04000, 0x2000, CRC(8b77eac8) SHA1(d70038cd6655e71c6488c555ecb1d1a424d00d49) ) + ROM_LOAD( "sda-5_n-2.n2", 0x06000, 0x2000, CRC(78e6eed6) SHA1(d9218745fc497a67373b0f6fd82caeef33bb4b3e) ) + ROM_LOAD( "sda-5_p-2.p2", 0x08000, 0x2000, CRC(03a13435) SHA1(1965d26a2f294e883cc6a13bc89bf0c28e30d28e) ) + ROM_LOAD( "sda-5_r-2.r2", 0x0a000, 0x2000, CRC(1b6b7eac) SHA1(b30965203807d8b863e8b2863a222d2e614eee2d) ) + ROM_LOAD( "sda-5_s-2.s2", 0x0c000, 0x2000, CRC(b88aeb82) SHA1(62d87430c7aec1aec892a15e45fb257206d8cf94) ) + ROM_LOAD( "sda-5_t-2.t2", 0x0e000, 0x2000, CRC(5c801f4d) SHA1(e6dbb2d2815b9d848c0580cff47d1f0d10c1906d) ) + ROM_LOAD( "sda-5_k-1.k1", 0x10000, 0x2000, CRC(4e1f4f15) SHA1(cf075e09eaeab1e630b5b2e28c806d4c34eece48) ) + ROM_LOAD( "sda-5_l-1.l1", 0x12000, 0x2000, CRC(6779a745) SHA1(de7d8e39f053eaa45238844e477732295d9af494) ) + ROM_LOAD( "sda-5_m-1.m1", 0x14000, 0x2000, CRC(9cebd8ea) SHA1(ff8121c16e8fe93a59c49c20459287f6b002bbbc) ) + ROM_LOAD( "sda-5_n-1.n1", 0x16000, 0x2000, CRC(689d8a3f) SHA1(aa592b9edcac8d264c9c89871283dfeebce2300e) ) + ROM_LOAD( "sda-5_p-1.p1", 0x18000, 0x2000, CRC(862b350d) SHA1(12e6c92ba424df578eac5a820a68aaaffd73c577) ) + ROM_LOAD( "sda-5_r-1.r1", 0x1a000, 0x2000, CRC(95b099ed) SHA1(1327852712ade3fc96bd8192045c081c4d32f4ba) ) + ROM_LOAD( "sda-5_s-1.s1", 0x1c000, 0x2000, CRC(8f230881) SHA1(daa8efc355fb042b2fce89a0d2950a90e56a806f) ) + ROM_LOAD( "sda-5_t-1.t1", 0x1e000, 0x2000, CRC(70e724c7) SHA1(df2905f91038693c87452813216aa86bbb81521b) ) ROM_REGION( 0x00900, "user1", 0 ) /* vertical sync timing */ @@ -1850,7 +1850,7 @@ ROM_START( showdown ) /* horizontal sync timing */ ROM_LOAD( "xbl.9h", 0x00100, 0x0100, CRC(2e7d5562) SHA1(7cd51fad8236b9853eff2eb84b474838ae1b44e8) ) ROM_LOAD( "xbl.2h", 0x00200, 0x0100, CRC(b078c1e4) SHA1(13834da4384ad43bc1671366fd428520cc3d1c1a) ) -ROM_LOAD( "xml-3k_mmi_6331.bin", 0x00300, 0x0020, CRC(afa289d1) SHA1(703f3e433ebe0b9c2f1be31bef0d01b8007d48ea) ) + ROM_LOAD( "xml-3k_mmi_6331.bin", 0x00300, 0x0020, CRC(afa289d1) SHA1(703f3e433ebe0b9c2f1be31bef0d01b8007d48ea) ) ROM_LOAD( "xbl.4k", 0x00400, 0x0100, CRC(31a9549c) SHA1(5bfba7ef3f3f5fc59bc03feca39bb16d54a92778) ) ROM_LOAD( "xbl.5k", 0x00500, 0x0100, CRC(1379bb2a) SHA1(51e9e21aeb0db8727f58fda708ddea8fb53378d9) ) ROM_LOAD( "xbl.6k", 0x00600, 0x0100, CRC(588969f7) SHA1(316db275c4026e3a24e44f39f160e10189d310a3) ) diff --git a/src/mame/drivers/freekick.c b/src/mame/drivers/freekick.c index aad990e66a1..26fd033c52e 100644 --- a/src/mame/drivers/freekick.c +++ b/src/mame/drivers/freekick.c @@ -756,6 +756,37 @@ ROM_START( pbillrds ) /* Encrytped with a Sega MC-8123 (317-0030) CPU module */ ROM_LOAD( "82s129.3c", 0x0500, 0x0100, CRC(cc1657e5) SHA1(358f20dce376c2389009f9673ce38b297af863f6) ) ROM_END +// all ROMs were HN4827128G-25, except 17, HN27256G-25 +// CPU module marked 3?7-500B, but seems to act the same as above +ROM_START( pbillrdsa ) + ROM_REGION( 0x18000, "maincpu", 0 ) /* Z80 Code */ + ROM_LOAD( "29", 0x00000, 0x4000, CRC(da020258) SHA1(172276061c2e06bcf3477488734a72598412181b) ) /* encrypted */ // label scraped off, might be 20 + ROM_LOAD( "17", 0x04000, 0x4000, CRC(9bb3d467) SHA1(5d61c80c920363cbcb548f4a08434e2a05b3d5f3) ) /* encrypted */ + ROM_CONTINUE( 0x10000, 0x4000 ) + ROM_LOAD( "19", 0x14000, 0x4000, CRC(2335e6dd) SHA1(82352b6f4abea88aad3a96ca63cccccb6e278f48) ) /* encrypted */ + + ROM_REGION( 0x2000, "user1", 0 ) /* MC8123 key */ + ROM_LOAD( "317-0030.key", 0x0000, 0x2000, CRC(9223f06d) SHA1(51a22a4c80fe273526bde68918c13c6476cec383) ) + + ROM_REGION( 0xc000, "gfx1", 0 ) /* GFX */ + ROM_LOAD( "pb.4", 0x000000, 0x04000, CRC(2f4d4dd3) SHA1(ee4facabf591c235c270db4f4d3f612b8c474e57) ) + ROM_LOAD( "pb.5", 0x004000, 0x04000, CRC(9dfccbd3) SHA1(66ad8882f36630312b488d5d67ae554477574c31) ) + ROM_LOAD( "pb.6", 0x008000, 0x04000, CRC(b5c3f6f6) SHA1(586b47587619a766cf977b74978550aff41a58cc) ) + + ROM_REGION( 0xc000, "gfx2", 0 ) /* GFX */ + ROM_LOAD( "1", 0x000000, 0x04000, CRC(c8ed651e) SHA1(9ddeb7906e0772f344af1d4f74755694cade1f97) ) + ROM_LOAD( "3", 0x004000, 0x04000, CRC(5282fc86) SHA1(dd8938489071ce61dc9bd4fed5a28403131e5706) ) + ROM_LOAD( "2", 0x008000, 0x04000, CRC(e9f73f5b) SHA1(470ad3b0d13269b098eec9d81956d70ac3aebc39) ) + + ROM_REGION( 0x0600, "proms", 0 ) + ROM_LOAD( "82s129.3a", 0x0000, 0x0100, CRC(44802169) SHA1(f181d80185e0f87ee906d2b40e3a5deb6f563aa2) ) + ROM_LOAD( "82s129.4d", 0x0100, 0x0100, CRC(69ca07cc) SHA1(38ab08174633b53d70a38aacb40059a25cf12069) ) + ROM_LOAD( "82s129.4a", 0x0200, 0x0100, CRC(145f950a) SHA1(b007d0c1cc9545e0e241b39b79a48593d457f826) ) + ROM_LOAD( "82s129.3d", 0x0300, 0x0100, CRC(43d24e17) SHA1(de5c9391574781dcd8f244794010e8eddffa1c1e) ) + ROM_LOAD( "82s129.3b", 0x0400, 0x0100, CRC(7fdc872c) SHA1(98572560aa524490489d4202dba292a5af9f15e7) ) + ROM_LOAD( "82s129.3c", 0x0500, 0x0100, CRC(cc1657e5) SHA1(358f20dce376c2389009f9673ce38b297af863f6) ) +ROM_END + /* The original Freekick boards have the main CPU code inside a custom CPU "block". This code is stored in battery @@ -1171,6 +1202,7 @@ GAME( 1986, oigas, gigas , oigas, gigas, freekick_state, gigasb, R GAME( 1986, gigasm2b, 0, gigas, gigasm2, freekick_state, gigasb, ROT270, "bootleg", "Gigas Mark II (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1987, pbillrd, 0, pbillrd, pbillrd, driver_device, 0, ROT0, "Nihon System", "Perfect Billiard", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1987, pbillrds, pbillrd, pbillrd, pbillrd, freekick_state, pbillrds,ROT0, "Nihon System", "Perfect Billiard (MC-8123, 317-0030)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1987, pbillrdsa, pbillrd, pbillrd, pbillrd, freekick_state, pbillrds,ROT0, "Nihon System", "Perfect Billiard (MC-8123, 317-5008)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) // sticker on CPU module different (wrong?) functionality the same GAME( 1987, freekick, 0, freekickb, freekck, driver_device, 0, ROT270, "Nihon System (Merit license)", "Free Kick (NS6201-A 1987.10)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1987, freekicka, freekick, freekickb, freekck, driver_device, 0, ROT270, "Nihon System", "Free Kick (NS6201-A 1987.9)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) GAME( 1987, freekickb1,freekick, freekickb, freekck, driver_device, 0, ROT270, "bootleg", "Free Kick (bootleg set 1)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c index 8975398f84c..fce5634d3b2 100644 --- a/src/mame/drivers/galaxian.c +++ b/src/mame/drivers/galaxian.c @@ -396,8 +396,8 @@ TODO: - timefgtr : missing player bullets, sprite ROM extend(see later levels), sound is too slow, some sprites missing - zigzag : full Dip Switches and Inputs - zigzag2 : full Dip Switches and Inputs -- jumpbug : full Dip Switches and Inputs -- jumpbugb : full Dip Switches and Inputs +- jumpbug : full Dip Switches and Inputs - missing possible discrete sounds +- jumpbugb : full Dip Switches and Inputs - missing possible discrete sounds - levers : full Dip Switches and Inputs - kingball : full Dip Switches and Inputs - kingbalj : full Dip Switches and Inputs @@ -5246,7 +5246,7 @@ static MACHINE_CONFIG_DERIVED( jumpbug, galaxian_base ) MCFG_CPU_PROGRAM_MAP(jumpbug_map) /* sound hardware */ - MCFG_SOUND_ADD("8910.0", AY8910, 1789750) + MCFG_SOUND_ADD("8910.0", AY8910, GALAXIAN_PIXEL_CLOCK/3/2/2) /* matches PCB video - unconfirmed */ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END @@ -9901,6 +9901,30 @@ ROM_START( scrambp ) ROM_LOAD( "c01s.6e", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) ROM_END +// mostly the same as the scrambp set above, complete dump +ROM_START( scramce ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "es1.2c", 0x0000, 0x0800, CRC(726fb19e) SHA1(4d6d8cf1bb711ab1f13cefc56ba7273f2496d037) ) // only unique rom + ROM_LOAD( "es2.2e", 0x0800, 0x0800, CRC(66ebc070) SHA1(ada52d7880185d1ac3a39c94896d5127ea05b14a) ) + ROM_LOAD( "es3.2f", 0x1000, 0x0800, CRC(317548fd) SHA1(687c309d476cd5fc830d90e9e6293d1dcab96df7) ) + ROM_LOAD( "es4.2h", 0x1800, 0x0800, CRC(dd380a22) SHA1(125e713a58cc5f2c1e38f67dad29f8c985ce5a8b) ) + ROM_LOAD( "es5.2j", 0x2000, 0x0800, CRC(fa4f1a70) SHA1(9d797eaab0f19a2ed003f782716719c9d752bd56) ) + ROM_LOAD( "es6.2l", 0x2800, 0x0800, CRC(9fd96374) SHA1(c8456dd8a012353a023a2d3fa5d508e49c36ace8) ) + ROM_LOAD( "es7.2m", 0x3000, 0x0800, CRC(88ac07a0) SHA1(c57061db5984b472039356bf84a050b5b66e3813) ) + ROM_LOAD( "es8.2p", 0x3800, 0x0800, CRC(d20088ee) SHA1(4b2deb64f1185780e5b6d1527ed5f691591b9ea0) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "11.5c", 0x0000, 0x0800, CRC(be037cf6) SHA1(f28e5ead496e70beaada24775aa58bd5d75f2d25) ) + ROM_LOAD( "12.5d", 0x0800, 0x0800, CRC(de7912da) SHA1(8558b4eff5d7e63029b325edef9914feda5834c3) ) + ROM_LOAD( "13.5e", 0x1000, 0x0800, CRC(ba2fa933) SHA1(1f976d8595706730e29f93027e7ab4620075c078) ) + + ROM_REGION( 0x1000, "gfx1", 0 ) + ROM_LOAD( "9.5f", 0x0000, 0x0800, CRC(4708845b) SHA1(a8b1ad19a95a9d35050a2ab7194cc96fc5afcdc9) ) + ROM_LOAD( "10.5h", 0x0800, 0x0800, CRC(11fd2887) SHA1(69844e48bb4d372cac7ae83c953df573c7ecbb7f) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "prom7051.6e", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) +ROM_END ROM_START( scrampt ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -10845,8 +10869,8 @@ GAME( 198?, fantastc, 0, fantastc, fantastc, galaxian_state, fanta GAME( 198?, timefgtr, 0, timefgtr, timefgtr, galaxian_state, timefgtr, ROT90, "Taito do Brasil", "Time Fighter (Time Pilot conversion on Galaxian hardware)", GAME_SUPPORTS_SAVE | GAME_WRONG_COLORS ) // rewrite of Time Pilot (!) not a clone /* extra ROMs, protection, and sound hardware replaced with AY8910 */ -GAME( 1981, jumpbug, 0, jumpbug, jumpbug, galaxian_state, jumpbug, ROT90, "Hoei (Rock-Ola license)", "Jump Bug", GAME_SUPPORTS_SAVE ) // or by Alpha Denshi Co. under contract from Hoei? -GAME( 1981, jumpbugb, jumpbug, jumpbug, jumpbug, galaxian_state, jumpbug, ROT90, "bootleg", "Jump Bug (bootleg)", GAME_SUPPORTS_SAVE ) // bootleg of Sega license +GAME( 1981, jumpbug, 0, jumpbug, jumpbug, galaxian_state, jumpbug, ROT90, "Hoei (Rock-Ola license)", "Jump Bug", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) // or by Alpha Denshi Co. under contract from Hoei? +GAME( 1981, jumpbugb, jumpbug, jumpbug, jumpbug, galaxian_state, jumpbug, ROT90, "bootleg", "Jump Bug (bootleg)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) // bootleg of Sega license GAME( 1983, levers, 0, jumpbug, levers, galaxian_state, jumpbug, ROT90, "Rock-Ola", "Levers", GAME_SUPPORTS_SAVE ) /* 2nd CPU driving AY8910 for sound */ @@ -10918,6 +10942,7 @@ GAME( 1981, strfbomb, scramble, scramble, strfbomb, galaxian_state, scram GAME( 1981, explorer, scramble, explorer, explorer, galaxian_state, explorer, ROT90, "bootleg (Sidam)", "Explorer (bootleg of Scramble)", GAME_SUPPORTS_SAVE ) GAME( 1981, scramblebf, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "bootleg (Karateko)", "Scramble (Karateko, French bootleg)", GAME_SUPPORTS_SAVE ) GAME( 1981, scrambp, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "bootleg (Billport S.A.)", "Impacto (Billport S.A., Spanish bootleg of Scramble)", GAME_SUPPORTS_SAVE ) // similar to the Karateko set above +GAME( 1981, scramce, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "bootleg (Centromatic S.A.)", "Scramble (Centromatic S.A., Spanish bootleg)", GAME_SUPPORTS_SAVE ) // similar to above GAME( 1981, scrampt, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "bootleg (Petaco S.A.)", "Scramble (Petaco S.A., Spanish bootleg)", GAME_SUPPORTS_SAVE ) // ^^ GAME( 1981, scramrf, scramble, scramble, scramble, galaxian_state, scramble, ROT90, "bootleg (Recreativos Franco)", "Scramble (Recreativos Franco, Spanish bootleg)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/gambl186.c b/src/mame/drivers/gambl186.c index 67fba40c84a..139a5a2e569 100644 --- a/src/mame/drivers/gambl186.c +++ b/src/mame/drivers/gambl186.c @@ -20,17 +20,23 @@ U3 Max691cpe U300 Nec D7759GC (10Mhz xtal near it) -TODO: -- No idea about how to surpass the "No Funzione" (sic) screen. According to the bad settings almost - surely it wants EEPROM hooked up (i/o at 0x680/0x682?) - +In order to get the game to run, follow these steps: +- enable service mode +- run all of the tests (press '1' repeatedly to progress) +- at the "cancellare la memoria" prompt, press 'X' to allow it +- when the line of '*' appears, press the buttons in the following sequence: + 1 1 X X 1 1 1 X X X 1 1 X 1 1 1 1 X 1 1 1 1 1 X 1 1 1 1 1 1 X +(This is the "password" for the EEPROM. You have three attempts to get it correct, otherwise the service mode will restart) +- if accepted, disable service mode DIP switch +- reset machine (press 'F3') */ #include "emu.h" #include "cpu/i86/i186.h" -#include "video/pc_vga.h" +#include "video/clgd542x.h" +#include "machine/nvram.h" class gambl186_state : public driver_device @@ -41,22 +47,195 @@ public: m_maincpu(*this, "maincpu") { } required_device<cpu_device> m_maincpu; - - DECLARE_READ16_MEMBER(unk_r); + int m_comms_state; + int m_comms_ind; + UINT8 m_comms_data[1002]; + int m_comms_cmd; + int m_comms_expect; + int m_comms_blocks; + bool m_comms_ack; + + virtual void machine_start(); + DECLARE_READ16_MEMBER(comms_r); + DECLARE_WRITE16_MEMBER(comms_w); + DECLARE_WRITE16_MEMBER(data_bank_w); }; - +void gambl186_state::machine_start() +{ + membank("data_bank")->configure_entries(0, 4, memregion("data")->base(), 0x40000); +} static ADDRESS_MAP_START( gambl186_map, AS_PROGRAM, 16, gambl186_state ) - AM_RANGE(0x00000, 0x0ffff) AM_RAM - AM_RANGE(0x40000, 0x4ffff) AM_ROM AM_REGION("data",0) // TODO: way bigger than this, banked? + AM_RANGE(0x00000, 0x0ffff) AM_RAM AM_SHARE("nvram") + AM_RANGE(0x40000, 0x7ffff) AM_ROMBANK("data_bank") // TODO: way bigger than this, banked? AM_RANGE(0xa0000, 0xbffff) AM_DEVREADWRITE8("vga", cirrus_gd5428_device, mem_r, mem_w, 0xffff) AM_RANGE(0xc0000, 0xfffff) AM_ROM AM_REGION("ipl",0) ADDRESS_MAP_END -READ16_MEMBER(gambl186_state::unk_r) +static const UINT8 password[] = {5, 2, 0, 3, 0, 0, 2, 4, 5, 6, 0x16}; + +READ16_MEMBER(gambl186_state::comms_r) { - return machine().rand(); + UINT16 retval = 0; + + if ((offset == 0) && ACCESSING_BITS_0_7) //port 680 == data + { + if (m_comms_state == 0x16) //read mode, just in case + { + if (!m_comms_ind && (m_comms_cmd == 0xff)) + { + m_comms_cmd = m_comms_data[1]; + + switch (m_comms_cmd) + { + case 0: + { + m_comms_expect = 4; + break; + } + + case 1: //unverified + case 3: //unverified + { + m_comms_expect = 8; + break; + } + + case 2: + { + m_comms_expect = 408; + m_comms_data[401] = 0x34; //precalc + m_comms_blocks = 4; + break; + } + + case 4: + { + m_comms_expect = 4; + break; + } + + case 5: //unverified + { + m_comms_expect = 7; + break; + } + + case 6: + { + m_comms_expect = 1003; + m_comms_data[1001] = 0xec; //precalc + break; + } + + default: //unverified + { + m_comms_expect = 1; + } + } + } + + if (m_comms_ind < sizeof(m_comms_data)) + { + if ((m_comms_cmd == 4) && (m_comms_ind == 1) && !memcmp(m_comms_data, password, sizeof(password))) + { + m_comms_data[1] = 0x55; + m_comms_data[2] = 0x55; + } + + retval = m_comms_data[m_comms_ind++]; + + if (m_comms_expect && !--m_comms_expect) + { + if (!m_comms_blocks || !--m_comms_blocks) + { + m_comms_cmd = 0xff; + } + else if (m_comms_cmd == 2) + { + if (m_comms_blocks == 3) + { + m_comms_expect = 5; + m_comms_data[4] = 0x17; //precalc + } + else + { + m_comms_expect = 3; + m_comms_data[2] = 5; //precalc + } + } + + m_comms_ack = true; + } + } + } + } + else if (offset == 1) //port 681 == status + { + if (m_comms_state == 0x16) //read mode + { + retval = 2; //read ready + } + else if (m_comms_state == 0x31) //write mode + { + retval = 4; //write ready + } + } + + return retval; +} + +WRITE16_MEMBER(gambl186_state::comms_w) +{ + if (offset == 0) + { + if ((m_comms_state == 0x31) && (m_comms_ind < 1000)) + { + if (!m_comms_ack || (data == 0x15)) //validation failure + { + if (m_comms_cmd == 6) //1000 bytes transfer + { + data = ~data; + } + else if (m_comms_ack) + { + m_comms_cmd = 0xfe; + m_comms_expect = 2; + data = 5; + } + + m_comms_data[++m_comms_ind] = (UINT8) data; + } + + m_comms_ack = false; + } + } + else if (offset == 1) + { + if (m_comms_state != data) //detect transition + { + m_comms_ind = 0; + + if (data == 0x4e) //reset + { + m_comms_data[0] = 5; //operation complete + m_comms_cmd = 0xff; //none + m_comms_expect = 0; + m_comms_blocks = 0; + m_comms_ack = false; + } + } + + m_comms_state = data; + } +} + +WRITE16_MEMBER( gambl186_state::data_bank_w) +{ + membank("data_bank")->set_entry(data & 3); + if(data & 0xfffc) + popmessage("warning: set %04x to data bank",data); } static ADDRESS_MAP_START( gambl186_io, AS_IO, 16, gambl186_state ) @@ -73,7 +252,8 @@ static ADDRESS_MAP_START( gambl186_io, AS_IO, 16, gambl186_state ) AM_RANGE(0x0582, 0x0583) AM_READ_PORT("DSW1") AM_RANGE(0x0584, 0x0585) AM_READ_PORT("DSW2") AM_WRITENOP // ??? AM_RANGE(0x0600, 0x0603) AM_WRITENOP // lamps - AM_RANGE(0x0680, 0x0683) AM_READ(unk_r) // ??? + AM_RANGE(0x0680, 0x0683) AM_READWRITE(comms_r, comms_w) + AM_RANGE(0x0700, 0x0701) AM_WRITE(data_bank_w) ADDRESS_MAP_END @@ -360,6 +540,8 @@ static MACHINE_CONFIG_START( gambl186, gambl186_state ) MCFG_CPU_PROGRAM_MAP(gambl186_map) MCFG_CPU_IO_MAP(gambl186_io) + MCFG_NVRAM_ADD_0FILL("nvram") + MCFG_FRAGMENT_ADD( pcvideo_cirrus_gd5428 ) MACHINE_CONFIG_END @@ -393,5 +575,5 @@ ROM_START( gambl186a ) ROM_END -GAME( 1999, gambl186, 0, gambl186, gambl186, driver_device, 0, ROT0, "<unknown>", "unknown 186 based gambling game (V398)", GAME_NOT_WORKING | GAME_NO_SOUND ) -GAME( 199?, gambl186a, gambl186, gambl186, gambl186, driver_device, 0, ROT0, "<unknown>", "unknown 186 based gambling game (V399)", GAME_NOT_WORKING | GAME_NO_SOUND ) +GAME( 1997, gambl186, 0, gambl186, gambl186, driver_device, 0, ROT0, "EGD", "Multi Game - Bingo 10 (V398)", GAME_NOT_WORKING | GAME_NO_SOUND ) +GAME( 199?, gambl186a, gambl186, gambl186, gambl186, driver_device, 0, ROT0, "EGD", "Multi Game - Bingo 10 (V399)", GAME_NOT_WORKING | GAME_NO_SOUND ) diff --git a/src/mame/drivers/gei.c b/src/mame/drivers/gei.c index ab9d4ffb254..42abfaf9c24 100644 --- a/src/mame/drivers/gei.c +++ b/src/mame/drivers/gei.c @@ -1473,6 +1473,7 @@ ROM_START( gs4002a ) ROM_LOAD( "slot_9-24-84.5", 0x16000, 0x2000, CRC(25d8c504) SHA1(2d52b66e8a1f06f486015440668bd924a123dad0) ) ROM_END + /* Greyhound Poker board... @@ -1568,6 +1569,36 @@ ROM_START( amuse1 ) /* V30.08 Rom board UMV8-B */ ROM_LOAD( "beatthespread_am2p_3-16-84",0x18000, 0x4000, CRC(40997230) SHA1(49e92a9f371a9839c94aa923aa5883284dae9dc2) ) ROM_END +/* + +Rom board is "GEI, inc UVM-8B" with a date code of "8339" + +Contains 1 AM2732A eprom, 5 HN4827128G eproms, 1 MMI PAL16R4CN, 1 7474N + +Battery (3V litium battery) backed up HM6117P-4 + +Roms labeled as: + +HCON M108 9/30 at spot C (AM2732A-DC) +CONT M108 9/26 at spot 1 (HN4827128G-25) +POKR M108 9/26 at spot 2 (HN4827128G-30) +BLJK M108 9/26 at spot 3 (HN4827128G-25) +BONE M108 9/26 at spot 4 (HN4827128G-30) +SLOT M108 9/26 at spot 5 (HN4827128G-30) + +*/ + +ROM_START( amuse1a ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "cont m108 9_26.1", 0x00000, 0x4000, CRC(122d235b) SHA1(5647e7f50cc4c18d98e8f0517ca2f0dacf57cae7) ) + ROM_LOAD( "hcon m108 9_30.c", 0x05800, 0x1000, CRC(5beb3d8b) SHA1(40a9458444f6a8e763a0374ab74e745500f4bf8a) ) + /* Banked roms */ + ROM_LOAD( "pokr m108 9_26.2", 0x10000, 0x4000, CRC(eafa1e22) SHA1(714b82ce2034c88b79d45a691dd71c975f91078c) ) + ROM_LOAD( "bljk m108 9_26.3", 0x14000, 0x4000, CRC(c31a8b89) SHA1(487a3be9b5f3db3388de03ebc5f4a3f1572df19b) ) + ROM_LOAD( "bone m108 9_26.4", 0x18000, 0x4000, CRC(40307a55) SHA1(3b276aa3ee6e8b25d1840d131db8d5dca34fe856) ) + ROM_LOAD( "slot m108 9_26.5", 0x1c000, 0x4000, CRC(fbcc8942) SHA1(fc9ff6db84906edb1dfa2b0235d5cfe9d0a637ab) ) +ROM_END + ROM_START( suprpokr ) /* Super Poker Version 10.19S BOBC. Rom board UMV-7C */ ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) @@ -1935,6 +1966,7 @@ GAME( 1982, gs4002a, gs4002, gselect, gselect, driver_device, 0, ROT0 GAME( 1982, amuse, 0, amuse, gepoker, driver_device, 0, ROT0, "Greyhound Electronics", "Amuse (Version 50.08 IBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1982, amuse1, amuse, amuse1, gepoker, driver_device, 0, ROT0, "Greyhound Electronics", "Amuse (Version 30.08 IBA)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 1983, amuse1a, amuse, amuse1, gepoker, driver_device, 0, ROT0, "Greyhound Electronics", "Amuse (Version 30.08A)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1984, gepoker, 0, gepoker, gepoker, driver_device, 0, ROT0, "Greyhound Electronics", "Poker (Version 50.02 ICB, set 1)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1984, gepoker1, gepoker, gepoker, gepoker, driver_device, 0, ROT0, "Greyhound Electronics", "Poker (Version 50.02 ICB, set 2)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/headonb.c b/src/mame/drivers/headonb.c index 7eb96c23a12..b6ae831871a 100644 --- a/src/mame/drivers/headonb.c +++ b/src/mame/drivers/headonb.c @@ -37,21 +37,24 @@ class headonb_state : public driver_device public: headonb_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram"), m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode") { } + m_gfxdecode(*this, "gfxdecode"), + m_video_ram(*this, "video_ram") { } + + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; required_shared_ptr<UINT8> m_video_ram; tilemap_t *m_tilemap; - DECLARE_WRITE8_MEMBER(headonb_video_ram_w); + DECLARE_WRITE8_MEMBER(video_ram_w); virtual void video_start(); - UINT32 screen_update_headonb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - TILE_GET_INFO_MEMBER(get_headonb_tile_info); - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + TILE_GET_INFO_MEMBER(get_tile_info); }; @@ -61,7 +64,7 @@ public: ***************************************************************************/ -TILE_GET_INFO_MEMBER(headonb_state::get_headonb_tile_info) +TILE_GET_INFO_MEMBER(headonb_state::get_tile_info) { UINT8 code = m_video_ram[tile_index]; SET_TILE_INFO_MEMBER(0, code, 0, 0); @@ -69,10 +72,10 @@ TILE_GET_INFO_MEMBER(headonb_state::get_headonb_tile_info) void headonb_state::video_start() { - m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(headonb_state::get_headonb_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(headonb_state::get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); } -UINT32 headonb_state::screen_update_headonb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 headonb_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_tilemap->draw(screen, bitmap, cliprect, 0, 0); return 0; @@ -85,7 +88,7 @@ UINT32 headonb_state::screen_update_headonb(screen_device &screen, bitmap_ind16 ***************************************************************************/ -WRITE8_MEMBER(headonb_state::headonb_video_ram_w) +WRITE8_MEMBER(headonb_state::video_ram_w) { m_video_ram[offset] = data; m_tilemap->mark_tile_dirty(offset); @@ -93,7 +96,7 @@ WRITE8_MEMBER(headonb_state::headonb_video_ram_w) static ADDRESS_MAP_START( headonb_map, AS_PROGRAM, 8, headonb_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_MIRROR(0x4000) - AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(headonb_video_ram_w) AM_SHARE("video_ram") + AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(video_ram_w) AM_SHARE("video_ram") AM_RANGE(0xff00, 0xffff) AM_RAM ADDRESS_MAP_END @@ -138,7 +141,7 @@ INPUT_PORTS_END ***************************************************************************/ -static const gfx_layout headonb_charlayout = +static const gfx_layout charlayout = { 8,8, RGN_FRAC(1,1), @@ -150,7 +153,7 @@ static const gfx_layout headonb_charlayout = }; static GFXDECODE_START( headonb ) - GFXDECODE_ENTRY( "gfx1", 0, headonb_charlayout, 0, 1 ) + GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 1 ) GFXDECODE_END static MACHINE_CONFIG_START( headonb, headonb_state ) @@ -167,7 +170,7 @@ static MACHINE_CONFIG_START( headonb, headonb_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1) - MCFG_SCREEN_UPDATE_DRIVER(headonb_state, screen_update_headonb) + MCFG_SCREEN_UPDATE_DRIVER(headonb_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", headonb) @@ -201,4 +204,4 @@ ROM_START( headonb ) ROM_END -GAME( 1979, headonb, headon, headonb, headonb, driver_device, 0, ROT0, "bootleg (EFG Sanremo)", "Head On (bootleg on dedicated hardware)", GAME_NO_SOUND ) +GAME( 1979, headonb, headon, headonb, headonb, driver_device, 0, ROT0, "bootleg (EFG Sanremo)", "Head On (bootleg on dedicated hardware)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/hexion.c b/src/mame/drivers/hexion.c index 380d2646e1c..fd72a9ac3ad 100644 --- a/src/mame/drivers/hexion.c +++ b/src/mame/drivers/hexion.c @@ -332,4 +332,3 @@ ROM_END GAME( 1992, hexion, 0, hexion, hexion, driver_device, 0, ROT0, "Konami", "Hexion (Japan ver JAB)", 0 ) GAME( 1992, hexionb,hexion, hexionb,hexion, driver_device, 0, ROT0, "bootleg (Impeuropex Corp.)", "Hexion (Asia ver AAA, bootleg)", 0 ) // we're missing an original Asia AAA - diff --git a/src/mame/drivers/iteagle.c b/src/mame/drivers/iteagle.c index 83e4f614793..714bf0d0c8c 100644 --- a/src/mame/drivers/iteagle.c +++ b/src/mame/drivers/iteagle.c @@ -177,78 +177,78 @@ static INPUT_PORTS_START( iteagle ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Right" ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Fly By" ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Backspin" ) - PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x00c0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0xfe00, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("SYSTEM") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW ) PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_DIPNAME( 0x00f0, 0x00, "SW51" ) + PORT_DIPNAME( 0x0010, 0x00, "SW51-1" ) PORT_DIPSETTING(0x00, "Normal" ) PORT_DIPSETTING(0x10, "Operator Mode" ) + PORT_DIPNAME( 0x0020, 0x00, "SW51-2" ) + PORT_DIPSETTING(0x00, "On" ) + PORT_DIPSETTING(0x20, "Off" ) + PORT_DIPNAME( 0x00c0, 0x00, "SW51-34" ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_VOLUME_UP ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BILL1 ) - PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0xC000, 0xC000, "Voltage" ) PORT_DIPSETTING(0xC000, "OK" ) PORT_DIPSETTING(0x8000, "Low" ) PORT_DIPSETTING(0x4000, "High" ) PORT_DIPSETTING(0x0000, "Not Detected" ) - PORT_START("TRACKX1") - PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1) - - PORT_START("TRACKY1") - PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1) - PORT_START("VERSION") PORT_DIPNAME( 0x0F00, 0x0000, "GAME" ) PORT_DIPNAME( 0x00F0, 0x0000, "MAJOR" ) - PORT_DIPNAME( 0x000F, 0x0000, "MINOR" ) + PORT_DIPNAME( 0x000F, 0x0000, "SIMM" ) INPUT_PORTS_END -static INPUT_PORTS_START( gtfore05 ) +static INPUT_PORTS_START( gtfore02 ) PORT_INCLUDE(iteagle) + PORT_START("TRACKX1") + PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_PLAYER(1) + + PORT_START("TRACKY1") + PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(32) PORT_REVERSE PORT_PLAYER(1) + PORT_MODIFY("VERSION") PORT_DIPNAME( 0x0F00, 0x0400, "GAME" ) - PORT_DIPNAME( 0x00F0, 0x0050, "MAJOR" ) - PORT_DIPNAME( 0x000F, 0x0001, "MINOR" ) + PORT_DIPNAME( 0x00F0, 0x0030, "MAJOR" ) INPUT_PORTS_END static INPUT_PORTS_START( gtfore04 ) - PORT_INCLUDE(iteagle) + PORT_INCLUDE(gtfore02) PORT_MODIFY("VERSION") PORT_DIPNAME( 0x0F00, 0x0400, "GAME" ) PORT_DIPNAME( 0x00F0, 0x0040, "MAJOR" ) - PORT_DIPNAME( 0x000F, 0x0000, "MINOR" ) INPUT_PORTS_END -static INPUT_PORTS_START( gtfore02 ) - PORT_INCLUDE(iteagle) +static INPUT_PORTS_START( gtfore05 ) + PORT_INCLUDE(gtfore02) PORT_MODIFY("VERSION") PORT_DIPNAME( 0x0F00, 0x0400, "GAME" ) - PORT_DIPNAME( 0x00F0, 0x0030, "MAJOR" ) - PORT_DIPNAME( 0x000F, 0x0000, "MINOR" ) + PORT_DIPNAME( 0x00F0, 0x0050, "MAJOR" ) INPUT_PORTS_END static INPUT_PORTS_START( gtfore06 ) - PORT_INCLUDE(iteagle) + PORT_INCLUDE(gtfore02) PORT_MODIFY("VERSION") PORT_DIPNAME( 0x0F00, 0x0400, "GAME" ) PORT_DIPNAME( 0x00F0, 0x0060, "MAJOR" ) - PORT_DIPNAME( 0x000F, 0x0000, "MINOR" ) INPUT_PORTS_END @@ -258,7 +258,14 @@ static INPUT_PORTS_START( carnking ) PORT_MODIFY("VERSION") PORT_DIPNAME( 0x0F00, 0x0600, "GAME" ) PORT_DIPNAME( 0x00F0, 0x0030, "MAJOR" ) - PORT_DIPNAME( 0x000F, 0x0002, "MINOR" ) + + PORT_START("TRACKX1") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + //PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(1) + + PORT_START("TRACKY1") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + //PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(1) INPUT_PORTS_END diff --git a/src/mame/drivers/jackie.c b/src/mame/drivers/jackie.c index 10c6dcd46df..65f06fb3b2b 100644 --- a/src/mame/drivers/jackie.c +++ b/src/mame/drivers/jackie.c @@ -107,23 +107,23 @@ public: DECLARE_READ8_MEMBER(igs_irqack_r); DECLARE_WRITE8_MEMBER(igs_irqack_w); DECLARE_READ8_MEMBER(expram_r); - + void unk_reg_lo_w( int offset, UINT8 data, int reg ); void unk_reg_hi_w( int offset, UINT8 data, int reg ); void show_out(); - + DECLARE_CUSTOM_INPUT_MEMBER(hopper_r); - + TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_reel1_tile_info); TILE_GET_INFO_MEMBER(get_reel2_tile_info); TILE_GET_INFO_MEMBER(get_reel3_tile_info); - + DECLARE_DRIVER_INIT(jackie); virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(irq); }; diff --git a/src/mame/drivers/jaguar.c b/src/mame/drivers/jaguar.c index c3ae33ec374..170cfe6c4ce 100644 --- a/src/mame/drivers/jaguar.c +++ b/src/mame/drivers/jaguar.c @@ -2128,11 +2128,23 @@ ROM_END ****************************************/ -/* There is known to exist an Area 51 set with "136105-000x Q" labels - currently not dumped */ +ROM_START( area51t ) /* 68020 based, Area51 Time Warner License Date: Oct 17, 1996 */ + ROM_REGION( 0x200000, "maincpu", 0 ) /* 2MB for 68020 code */ + ROM_LOAD32_BYTE( "136105-0003-q_h.3h", 0x00000, 0x80000, CRC(0681f398) SHA1(9e96db5a4ff90800685a5b95f8d758d211d3b982) ) + ROM_LOAD32_BYTE( "136105-0002-q_p.3p", 0x00001, 0x80000, CRC(f76cfc68) SHA1(01a781b42b61279e09e0cb1d924e2a3e0df44591) ) + ROM_LOAD32_BYTE( "136105-0001-q_m.3m", 0x00002, 0x80000, CRC(f422b4a8) SHA1(f95ef428be18adafae65e35f412eb03dcdaf7ed4) ) + ROM_LOAD32_BYTE( "136105-0000-q_k.3k", 0x00003, 0x80000, CRC(1fb2f2b5) SHA1(cbed65463dd93eaf945750a9dc3a123d1c6bda42) ) + + ROM_REGION16_BE( 0x1000, "waverom", 0 ) + ROM_LOAD16_WORD("jagwave.rom", 0x0000, 0x1000, CRC(7a25ee5b) SHA1(58117e11fd6478c521fbd3fdbe157f39567552f0) ) + + DISK_REGION( "ide:0:hdd:image" ) + DISK_IMAGE( "area51t", 0, SHA1(d2865cc7b1bb08a4393a72013a90e18d8a8f9860) ) +ROM_END -ROM_START( area51t ) /* 68020 based, Area51 Time Warner License Date: Nov 15, 1995 */ +ROM_START( area51ta ) /* 68020 based, Area51 Time Warner License Date: Nov 15, 1995 */ ROM_REGION( 0x200000, "maincpu", 0 ) /* 2MB for 68020 code */ - ROM_LOAD32_BYTE( "136105-0003c.3h", 0x00000, 0x80000, CRC(e70a97c4) SHA1(39dabf6bf3dc6f717a587f362d040bfb332be9e1) ) /* Usually found with "green" labels */ + ROM_LOAD32_BYTE( "136105-0003c.3h", 0x00000, 0x80000, CRC(e70a97c4) SHA1(39dabf6bf3dc6f717a587f362d040bfb332be9e1) ) /* Usually found with "orange" labels */ ROM_LOAD32_BYTE( "136105-0002c.3p", 0x00001, 0x80000, CRC(e9c9f4bd) SHA1(7c6c50372d45dca8929767241b092339f3bab4d2) ) ROM_LOAD32_BYTE( "136105-0001c.3m", 0x00002, 0x80000, CRC(6f135a81) SHA1(2d9660f240b14481e8c46bc98713e9dc12035063) ) ROM_LOAD32_BYTE( "136105-0000c.3k", 0x00003, 0x80000, CRC(94f50c14) SHA1(a54552e3ac5c4f481ba4f2fc7d724534576fe76c) ) @@ -2146,7 +2158,7 @@ ROM_END ROM_START( area51a ) /* 68020 based, Area51 Atari Games License Date: Oct 25, 1995 */ ROM_REGION( 0x200000, "maincpu", 0 ) /* 2MB for 68020 code */ - ROM_LOAD32_BYTE( "136105-0003a.3h", 0x00000, 0x80000, CRC(116d37e6) SHA1(5d36cae792dd349faa77cd2d8018722a28ee55c1) ) /* Usually found with "orange" labels */ + ROM_LOAD32_BYTE( "136105-0003a.3h", 0x00000, 0x80000, CRC(116d37e6) SHA1(5d36cae792dd349faa77cd2d8018722a28ee55c1) ) /* Usually found with "green" labels */ ROM_LOAD32_BYTE( "136105-0002a.3p", 0x00001, 0x80000, CRC(eb10f539) SHA1(dadc4be5a442dd4bd17385033056555e528ed994) ) ROM_LOAD32_BYTE( "136105-0001a.3m", 0x00002, 0x80000, CRC(c6d8322b) SHA1(90cf848a4195c51b505653cc2c74a3b9e3c851b8) ) ROM_LOAD32_BYTE( "136105-0000a.3k", 0x00003, 0x80000, CRC(729eb1b7) SHA1(21864b4281b1ad17b2903e3aa294e4be74161e80) ) @@ -2175,7 +2187,7 @@ ROM_END ROM_START( maxforce ) /* R3000 based, labeled as "Maximum Force 5-23-97 v1.05" */ ROM_REGION( 0x200000, "maincpu", 0 ) /* 2MB for IDT 79R3041 code */ ROM_LOAD32_BYTE( "maxf_105.hh", 0x00000, 0x80000, CRC(ec7f8167) SHA1(0cf057bfb1f30c2c9621d3ed25021e7ba7bdd46e) ) /* Usually found with "light grey" labels */ - ROM_LOAD32_BYTE( "maxf_105.hl", 0x00001, 0x80000, CRC(3172611c) SHA1(00f14f871b737c66c20f95743740d964d0be3f24) ) + ROM_LOAD32_BYTE( "maxf_105.hl", 0x00001, 0x80000, CRC(3172611c) SHA1(00f14f871b737c66c20f95743740d964d0be3f24) ) /* Also found labeled as "MAXIMUM FORCE EE FIX PROG" */ ROM_LOAD32_BYTE( "maxf_105.lh", 0x00002, 0x80000, CRC(84d49423) SHA1(88d9a6724f1118f2bbef5dfa27accc2b65c5ba1d) ) ROM_LOAD32_BYTE( "maxf_105.ll", 0x00003, 0x80000, CRC(16d0768d) SHA1(665a6d7602a7f2f5b1f332b0220b1533143d56b1) ) @@ -2666,8 +2678,9 @@ CONS( 1993, jaguar, 0, 0, jaguar, jaguar, jaguar_state, jagua CONS( 1995, jaguarcd, jaguar, 0, jaguarcd, jaguar, jaguar_state, jaguarcd, "Atari", "Jaguar CD", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_NOT_WORKING ) GAME( 1996, area51, 0, cojagr3k, area51, jaguar_state, area51, ROT0, "Atari Games", "Area 51 (R3000)", 0 ) -GAME( 1995, area51t, area51, cojag68k, area51, jaguar_state, area51a, ROT0, "Atari Games (Time Warner license)", "Area 51 (Time Warner license)", 0 ) -GAME( 1995, area51a, area51, cojag68k, area51, jaguar_state, area51a, ROT0, "Atari Games", "Area 51 (Atari Games license)", 0 ) +GAME( 1995, area51t, area51, cojag68k, area51, jaguar_state, area51a, ROT0, "Atari Games (Time Warner license)", "Area 51 (Time Warner license, Oct 17, 1996)", 0 ) +GAME( 1995, area51ta, area51, cojag68k, area51, jaguar_state, area51a, ROT0, "Atari Games (Time Warner license)", "Area 51 (Time Warner license, Nov 15, 1995)", 0 ) +GAME( 1995, area51a, area51, cojag68k, area51, jaguar_state, area51a, ROT0, "Atari Games", "Area 51 (Atari Games license, Oct 25, 1995)", 0 ) GAME( 1995, fishfren, 0, cojagr3k_rom, fishfren, jaguar_state, fishfren, ROT0, "Time Warner Interactive", "Fishin' Frenzy (prototype)", 0 ) GAME( 1996, freezeat, 0, cojagr3k_rom, freezeat, jaguar_state, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, English voice, 96/10/25)", 0 ) GAME( 1996, freezeatjp,freezeat, cojagr3k_rom, freezeat, jaguar_state, freezeat, ROT0, "Atari Games", "Freeze (Atari) (prototype, Japanese voice, 96/10/25)", 0 ) diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index 9c244919ac8..19c29ae11eb 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -113,7 +113,7 @@ public: required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_colorram; required_shared_ptr<UINT8> m_spriteram; - UINT8 * m_cop_io; + UINT8 m_cop_port_l; /* tilemaps */ tilemap_t * m_bg_tilemap; @@ -137,8 +137,9 @@ public: DECLARE_READ8_MEMBER(adc_r); DECLARE_WRITE8_MEMBER(adc_w); DECLARE_WRITE8_MEMBER(plr2_w); - DECLARE_READ8_MEMBER(cop_io_r); - DECLARE_WRITE8_MEMBER(cop_io_w); + DECLARE_READ8_MEMBER(cop_unk_r); + DECLARE_READ_LINE_MEMBER(cop_serial_r); + DECLARE_WRITE8_MEMBER(cop_l_w); DECLARE_READ8_MEMBER(protection_r); DECLARE_WRITE_LINE_MEMBER(looping_spcint); DECLARE_WRITE8_MEMBER(looping_sound_sw); @@ -479,16 +480,20 @@ WRITE8_MEMBER(looping_state::plr2_w) * *************************************/ -READ8_MEMBER(looping_state::cop_io_r) +READ8_MEMBER(looping_state::cop_unk_r) { - // if (offset == 1) return machine().rand() & 0x01; - return 1; // m_cop_io[offset]; + return 1; } -WRITE8_MEMBER(looping_state::cop_io_w) +READ_LINE_MEMBER(looping_state::cop_serial_r) { - m_cop_io[offset] = data; -if (offset == 0) logerror("%02x ",data); + return 1; +} + +WRITE8_MEMBER(looping_state::cop_l_w) +{ + m_cop_port_l = data; + logerror("%02x ",data); } READ8_MEMBER(looping_state::protection_r) @@ -511,7 +516,7 @@ READ8_MEMBER(looping_state::protection_r) // cop write randomly fc (unfortunatly) but 61,67,b7,bf,db,e1,f3,fd,ff too and only these values // missing something - if(m_cop_io[0] != 0xfc) return m_cop_io[0]; + if(m_cop_port_l != 0xfc) return m_cop_port_l; return 0xff; } @@ -579,20 +584,6 @@ static ADDRESS_MAP_START( looping_sound_io_map, AS_IO, 8, looping_state ) ADDRESS_MAP_END -/* standard COP420 map */ -static ADDRESS_MAP_START( looping_cop_map, AS_PROGRAM, 8, looping_state ) - AM_RANGE(0x0000, 0x03ff) AM_ROM -ADDRESS_MAP_END - -static ADDRESS_MAP_START( looping_cop_data_map, AS_DATA, 8, looping_state ) - AM_RANGE(0x0000, 0x003f) AM_RAM -ADDRESS_MAP_END - -static ADDRESS_MAP_START( looping_cop_io_map, AS_IO, 8, looping_state ) - AM_RANGE(0x0100, 0x0107) AM_READWRITE(cop_io_r, cop_io_w) -ADDRESS_MAP_END - - /************************************* * * Graphics definitions @@ -633,10 +624,12 @@ static MACHINE_CONFIG_START( looping, looping_state ) MCFG_TMS99xx_ADD("audiocpu", TMS9980A, SOUND_CLOCK/4, looping_sound_map, looping_sound_io_map) MCFG_CPU_ADD("mcu", COP420, COP_CLOCK) - MCFG_CPU_PROGRAM_MAP(looping_cop_map) - MCFG_CPU_DATA_MAP(looping_cop_data_map) - MCFG_CPU_IO_MAP(looping_cop_io_map) MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED ) + MCFG_COP400_WRITE_L_CB(WRITE8(looping_state, cop_l_w)) + MCFG_COP400_READ_L_CB(READ8(looping_state, cop_unk_r)) + MCFG_COP400_READ_G_CB(READ8(looping_state, cop_unk_r)) + MCFG_COP400_READ_IN_CB(READ8(looping_state, cop_unk_r)) + MCFG_COP400_READ_SI_CB(READLINE(looping_state, cop_serial_r)) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -892,8 +885,8 @@ DRIVER_INIT_MEMBER(looping_state,looping) int length = memregion("maincpu")->bytes(); UINT8 *rom = memregion("maincpu")->base(); int i; - - m_cop_io = auto_alloc_array(machine(), UINT8, 0x08); + + m_cop_port_l = 0; /* bitswap the TMS9995 ROMs */ for (i = 0; i < length; i++) diff --git a/src/mame/drivers/magictg.c b/src/mame/drivers/magictg.c index 3214736ad09..4742e8ac4ae 100644 --- a/src/mame/drivers/magictg.c +++ b/src/mame/drivers/magictg.c @@ -192,7 +192,7 @@ public: DECLARE_WRITE32_MEMBER( f0_w ); DECLARE_READ32_MEMBER( unk_r ); - DECLARE_READ32_MEMBER( rand_r ); + DECLARE_READ32_MEMBER( unk2_r ); DECLARE_READ32_MEMBER( serial_r ); DECLARE_WRITE32_MEMBER( serial_w ); @@ -523,7 +523,7 @@ READ32_MEMBER( magictg_state::unk_r ) return 0x6000; } -READ32_MEMBER( magictg_state::rand_r ) +READ32_MEMBER( magictg_state::unk2_r ) { return 0xffffffff; } @@ -833,7 +833,7 @@ static ADDRESS_MAP_START( magictg_map, AS_PROGRAM, 32, magictg_state ) AM_RANGE(0x1b001024, 0x1b001027) AM_READ(adsp_status_r) AM_RANGE(0x1b001108, 0x1b00110b) AM_READ(unk_r) AM_RANGE(0x1e000000, 0x1e002fff) AM_RAM // NVRAM? - AM_RANGE(0x1e800000, 0x1e800007) AM_READWRITE(rand_r, serial_w) + AM_RANGE(0x1e800000, 0x1e800007) AM_READWRITE(unk2_r, serial_w) AM_RANGE(0x1fc00000, 0x1fffffff) AM_ROM AM_REGION("mips", 0) ADDRESS_MAP_END diff --git a/src/mame/drivers/midqslvr.c b/src/mame/drivers/midqslvr.c index d4995155e92..7aa1e1dadb5 100644 --- a/src/mame/drivers/midqslvr.c +++ b/src/mame/drivers/midqslvr.c @@ -462,7 +462,7 @@ ROM_START( arctthnd ) ROM_END // this also required a dongle to work -ROM_START( arctthndult ) +ROM_START( ultarctc ) ROM_REGION32_LE(0x80000, "bios", ROMREGION_ERASEFF) ROM_LOAD( "m29f002bt.u6", 0x040000, 0x040000, CRC(012c9290) SHA1(cdee6f19d5e5ea5bb1dd6a5ec397ac70b3452790) ) @@ -474,10 +474,33 @@ ROM_START( arctthndult ) DISK_IMAGE( "uarctict", 0, SHA1(8557a1d7ae8dc41c879350cb1c228f4c27a0dd09) ) ROM_END +// this is an update CD, We don't know if it updates the HDD image we have, if the image we have is already an updated version, if it +// requires a specific version we don't have, or even if it updates a regular Arctic Thunder to Ultimate. +ROM_START( ultarctcup ) + ROM_REGION32_LE(0x80000, "bios", ROMREGION_ERASEFF) + ROM_LOAD( "m29f002bt.u6", 0x040000, 0x040000, CRC(012c9290) SHA1(cdee6f19d5e5ea5bb1dd6a5ec397ac70b3452790) ) + + ROM_REGION( 0x8000, "video_bios", ROMREGION_ERASEFF ) // TODO: no VGA card is hooked up, to be removed +// ROM_LOAD16_BYTE( "trident_tgui9680_bios.bin", 0x0000, 0x4000, BAD_DUMP CRC(1eebde64) SHA1(67896a854d43a575037613b3506aea6dae5d6a19) ) +// ROM_CONTINUE( 0x0001, 0x4000 ) + + DISK_REGION( "ide:0:hdd:image" ) + DISK_IMAGE( "uarctict", 0, SHA1(8557a1d7ae8dc41c879350cb1c228f4c27a0dd09) ) + DISK_REGION( "cd" ) + DISK_IMAGE( "040503_1309", 0, SHA1(453adb81e204b0580ad02c2d98f68525757ec2a1) ) +// sourced from these +// ROM_LOAD( "040503_1309.CUE", 0x0000, 0x000004d, CRC(4a9e2de5) SHA1(04d3d90ad4b235c0ac4606557e16a1410d018fa9) ) +// ROM_LOAD( "040503_1309.BIN", 0x0000, 0x6bd9960, CRC(48a63422) SHA1(9d1cacf07526c5bddf4205c667a9010802f74859) ) + +ROM_END // there are almost certainly multiple versions of these; updates were offered on floppy disk. The version numbers for the existing CHDs are unknown. GAME(1999, hydrthnd, 0, midqslvr, at_keyboard, driver_device, 0, ROT0, "Midway Games", "Hydro Thunder", GAME_IS_SKELETON) + GAME(2000, offrthnd, 0, midqslvr, at_keyboard, driver_device, 0, ROT0, "Midway Games", "Offroad Thunder", GAME_IS_SKELETON) + GAME(2001, arctthnd, 0, midqslvr, at_keyboard, driver_device, 0, ROT0, "Midway Games", "Arctic Thunder (v1.002)", GAME_IS_SKELETON) -GAME(2001, arctthndult, arctthnd, midqslvr, at_keyboard, driver_device, 0, ROT0, "Midway Games", "Ultimate Arctic Thunder", GAME_IS_SKELETON) + +GAME(2001, ultarctc, 0, midqslvr, at_keyboard, driver_device, 0, ROT0, "Midway Games", "Ultimate Arctic Thunder", GAME_IS_SKELETON) +GAME(2004, ultarctcup, ultarctc, midqslvr, at_keyboard, driver_device, 0, ROT0, "Midway Games", "Ultimate Arctic Thunder Update CD ver 1.950 (5/3/04)", GAME_IS_SKELETON) diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index 3e972bf94c1..2c7d3a5af34 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -2731,11 +2731,11 @@ ROM_START( zeroguna ) /* Zero Gunner (Export), Model 2A */ ROM_LOAD("mpr-20303.32", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) ) ROM_LOAD("mpr-20304.33", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) ) - // 1997 317-5038-COM Model 2 - ROM_PARAMETER( ":315_5881:key", "042c0d13" ) - MODEL2_CPU_BOARD MODEL2A_VID_BOARD + + // 1997 317-5038-COM Model 2 + ROM_PARAMETER( ":315_5881:key", "042c0d13" ) ROM_END ROM_START( zerogunaj ) /* Zero Gunner (Japan), Model 2A - Sega game ID# 833-11341, Sega ROM board ID# 834-11342 */ @@ -2766,11 +2766,11 @@ ROM_START( zerogunaj ) /* Zero Gunner (Japan), Model 2A - Sega game ID# 833-1134 ROM_LOAD("mpr-20303.32", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) ) ROM_LOAD("mpr-20304.33", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) ) - // 1997 317-5038-COM Model 2 - ROM_PARAMETER( ":315_5881:key", "042c0d13" ) - MODEL2_CPU_BOARD MODEL2A_VID_BOARD + + // 1997 317-5038-COM Model 2 + ROM_PARAMETER( ":315_5881:key", "042c0d13" ) ROM_END ROM_START( zerogun ) /* Zero Gunner (Export), Model 2B */ @@ -3570,11 +3570,11 @@ ROM_START( dynamcop ) /* Dynamite Cop (Export), Model 2A, Sega Game ID# 833-1134 ROM_LOAD("mpr-20814.36", 0x400000, 0x200000, CRC(e8ebc74c) SHA1(731ce721bb9e148f3a9f7fbe569522567a681c4e) ) ROM_LOAD("mpr-20815.37", 0x600000, 0x200000, CRC(1b5aaae4) SHA1(32b4bf6c096fdccdd5d8f1ddb6c27d3389a52234) ) - // 1998 317-0236-COM Model 2 - ROM_PARAMETER( ":315_5881:key", "2c2a4a93" ) - MODEL2_CPU_BOARD MODEL2A_VID_BOARD + + // 1998 317-0236-COM Model 2 + ROM_PARAMETER( ":315_5881:key", "2c2a4a93" ) ROM_END ROM_START( dyndeka2 ) /* Dynamite Deka 2 (Japan), Model 2A */ @@ -3621,11 +3621,11 @@ ROM_START( dyndeka2 ) /* Dynamite Deka 2 (Japan), Model 2A */ ROM_LOAD("mpr-20814.36", 0x400000, 0x200000, CRC(e8ebc74c) SHA1(731ce721bb9e148f3a9f7fbe569522567a681c4e) ) ROM_LOAD("mpr-20815.37", 0x600000, 0x200000, CRC(1b5aaae4) SHA1(32b4bf6c096fdccdd5d8f1ddb6c27d3389a52234) ) - // 1998 317-0236-COM Model 2 - ROM_PARAMETER( ":315_5881:key", "2c2a4a93" ) - MODEL2_CPU_BOARD MODEL2A_VID_BOARD + + // 1998 317-0236-COM Model 2 + ROM_PARAMETER( ":315_5881:key", "2c2a4a93" ) ROM_END ROM_START( dynamcopb ) /* Dynamite Cop (Export), Model 2B */ @@ -4312,11 +4312,11 @@ ROM_START( pltkidsa ) /* Pilot Kids, Model 2A */ ROM_LOAD("mpr-21279.sd3", 0x0400000, 0x200000, CRC(3a8dcf68) SHA1(312496b45b699051c8b4dd0e5d94e73fe5f3ad8d) ) ROM_LOAD("mpr-21280.sd4", 0x0600000, 0x200000, CRC(aa548124) SHA1(a94adfe16b5c3236746451c181ccd3e1c27432f4) ) - // 1998 317-5044-COM Model 2 - ROM_PARAMETER( ":315_5881:key", "042e2dc1" ) - MODEL2_CPU_BOARD MODEL2A_VID_BOARD + + // 1998 317-5044-COM Model 2 + ROM_PARAMETER( ":315_5881:key", "042e2dc1" ) ROM_END ROM_START( pltkids ) /* Pilot Kids Revision A, Model 2B */ diff --git a/src/mame/drivers/murogem.c b/src/mame/drivers/murogem.c index 8078fa06d40..44c0fde91a1 100644 --- a/src/mame/drivers/murogem.c +++ b/src/mame/drivers/murogem.c @@ -84,8 +84,8 @@ f205v - Added "Las Vegas, Nevada" (hack). - Added the missing 74s288 dump (32x8 PROM located at 1B) from the new set. - Confirmed the MC6845 at $4000/$4001. -- Corrected screen size acording to MC6845 registers. -- Corrected visible area acording to MC6845 registers. The last characters line looks odd, but should be visible. +- Corrected screen size according to MC6845 registers. +- Corrected visible area according to MC6845 registers. The last characters line looks odd, but should be visible. - There are not illegal opcodes. The above mentioned are in fact strings (plain ASCII text). MC6845 registers: @@ -115,20 +115,23 @@ class murogem_state : public driver_device public: murogem_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), m_maincpu(*this, "maincpu"), m_dac(*this, "dac"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_videoram(*this, "videoram") { } - required_shared_ptr<UINT8> m_videoram; - DECLARE_WRITE8_MEMBER(outport_w); - DECLARE_PALETTE_INIT(murogem); - UINT32 screen_update_murogem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device<cpu_device> m_maincpu; required_device<dac_device> m_dac; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; + + required_shared_ptr<UINT8> m_videoram; + + DECLARE_WRITE8_MEMBER(outport_w); + DECLARE_PALETTE_INIT(murogem); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -211,7 +214,7 @@ GFXDECODE_END PALETTE_INIT_MEMBER(murogem_state, murogem) {} -UINT32 murogem_state::screen_update_murogem(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 murogem_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int xx,yy,count; count = 0x000; @@ -249,7 +252,7 @@ static MACHINE_CONFIG_START( murogem, murogem_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE((39+1)*8, (38+1)*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) - MCFG_SCREEN_UPDATE_DRIVER(murogem_state, screen_update_murogem) + MCFG_SCREEN_UPDATE_DRIVER(murogem_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", murogem) @@ -323,7 +326,7 @@ ROM_START( lasvegas ) ROM_LOAD( "a3.1b", 0x0000, 0x0020, CRC(abddfb6b) SHA1(ed78b93701b5a3bf2053d2584e9a354fb6cec203) ) /* 74s288 at 1B */ ROM_END -GAME( 198?, murogem, 0, murogem, murogem, driver_device, 0, ROT0, "<unknown>", "Muroge Monaco (set 1)", GAME_WRONG_COLORS ) -GAME( 198?, murogema, murogem, murogem, murogem, driver_device, 0, ROT0, "<unknown>", "Muroge Monaco (set 2)", GAME_WRONG_COLORS ) -GAME( 198?, murogemb, murogem, murogem, murogem, driver_device, 0, ROT0, "<unknown>", "Muroge Monaco (set 3)", GAME_WRONG_COLORS ) -GAME( 198?, lasvegas, murogem, murogem, murogem, driver_device, 0, ROT0, "hack", "Las Vegas, Nevada", GAME_WRONG_COLORS ) +GAME( 198?, murogem, 0, murogem, murogem, driver_device, 0, ROT0, "<unknown>", "Muroge Monaco (set 1)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) +GAME( 198?, murogema, murogem, murogem, murogem, driver_device, 0, ROT0, "<unknown>", "Muroge Monaco (set 2)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) +GAME( 198?, murogemb, murogem, murogem, murogem, driver_device, 0, ROT0, "<unknown>", "Muroge Monaco (set 3)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) +GAME( 198?, lasvegas, murogem, murogem, murogem, driver_device, 0, ROT0, "hack", "Las Vegas, Nevada", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/murogmbl.c b/src/mame/drivers/murogmbl.c index 8c1d3edaa52..f5ea5c87d34 100644 --- a/src/mame/drivers/murogmbl.c +++ b/src/mame/drivers/murogmbl.c @@ -45,18 +45,21 @@ class murogmbl_state : public driver_device public: murogmbl_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_video(*this, "video"), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_video(*this, "video") { } - required_shared_ptr<UINT8> m_video; - virtual void video_start(); - DECLARE_PALETTE_INIT(murogmbl); - UINT32 screen_update_murogmbl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; + + required_shared_ptr<UINT8> m_video; + + virtual void video_start(); + DECLARE_PALETTE_INIT(murogmbl); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -102,7 +105,7 @@ void murogmbl_state::video_start() { } -UINT32 murogmbl_state::screen_update_murogmbl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 murogmbl_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { gfx_element *gfx = m_gfxdecode->gfx(0); int count = 0; @@ -201,7 +204,7 @@ static MACHINE_CONFIG_START( murogmbl, murogmbl_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 32*8-1) - MCFG_SCREEN_UPDATE_DRIVER(murogmbl_state, screen_update_murogmbl) + MCFG_SCREEN_UPDATE_DRIVER(murogmbl_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 0x100) @@ -227,4 +230,4 @@ ROM_START(murogmbl) ROM_LOAD( "74s288.a8", 0x0000, 0x0020, CRC(fc35201c) SHA1(4549e228c48992e0d10957f029b89a547392e72b) ) ROM_END -GAME( 1982, murogmbl, murogem, murogmbl, murogmbl, driver_device, 0, ROT0, "bootleg?", "Muroge Monaco (bootleg?)", GAME_NO_SOUND ) +GAME( 1982, murogmbl, murogem, murogmbl, murogmbl, driver_device, 0, ROT0, "bootleg?", "Muroge Monaco (bootleg?)", GAME_NO_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c index d2e71f9f2e7..051f914e8d9 100644 --- a/src/mame/drivers/naomi.c +++ b/src/mame/drivers/naomi.c @@ -1504,25 +1504,8 @@ Sushi Bar */ #include "emu.h" -#include "cpu/arm7/arm7.h" -#include "cpu/z80/z80.h" -#include "machine/x76f100.h" -#include "machine/maple-dc.h" -#include "machine/dc-ctrl.h" -#include "machine/mie.h" -#include "machine/naomirom.h" -#include "machine/naomigd.h" -#include "machine/naomim1.h" -#include "machine/naomim2.h" -#include "machine/naomim4.h" -#include "machine/awboard.h" -#include "cpu/sh4/sh4.h" -#include "cpu/arm7/arm7core.h" -#include "sound/aica.h" -#include "machine/aicartc.h" -#include "machine/jvsdev.h" -#include "machine/jvs13551.h" -#include "includes/dc.h" + + #include "includes/naomi.h" #define CPU_CLOCK (200000000) @@ -1930,7 +1913,7 @@ ADDRESS_MAP_END * Input ports */ -static INPUT_PORTS_START( naomi_debug ) +INPUT_PORTS_START( naomi_debug ) PORT_START("MAMEDEBUG") PORT_DIPNAME( 0x01, 0x00, "Bilinear Filtering" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) @@ -2586,7 +2569,7 @@ MACHINE_RESET_MEMBER(naomi_state,naomi) * Common for Naomi 1, Naomi GD-Rom, Naomi 2, Atomiswave ... */ -static MACHINE_CONFIG_START( naomi_aw_base, naomi_state ) +MACHINE_CONFIG_START( naomi_aw_base, naomi_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", SH4LE, CPU_CLOCK) // SH4!!! MCFG_SH4_MD0(1) @@ -2742,11 +2725,12 @@ MACHINE_CONFIG_END /* BIOS info: -Revisions A through C can handle game carts only -Revisions D and later can also handle GD-Rom board +Revisions A through D can handle game carts only +Revisions C and later can also handle Multi-board +Revisions E and later can also handle GD-Rom board Revisions F and later can also handle GD-Rom board and or the network GD-Rom board -F355 has it's own BIOS (3 screen version) and different JVS I/O Board +F355 has it's own BIOS (3 screen version) To determine BIOS version: on test mode title screen press Service button 51 times @@ -2904,8 +2888,7 @@ Scan ROM for the text string "LOADING TEST MODE NOW" back up four (4) bytes for ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-21801.ic27", 0x000000, 0x200000, CRC(a21bef24) SHA1(c6c6ed09772b63a9a84ef0678fc1b7527484038a) ) -/* only revisions d and higher support the GDROM, and there is an additional bios (and SH4!) on the DIMM board for the CD Controller */ -/* bios e works, the newer japan one gives 'board malfunction' with some games?' */ +/* only revisions E and higher support the GDROM, and there is an additional bios (and SH4!) on the DIMM board for the CD Controller */ #define NAOMIGD_BIOS \ ROM_REGION( 0x200000, "maincpu", 0) \ ROM_SYSTEM_BIOS( 0, "bios0", "epr-21576e (Japan)" ) \ @@ -2914,26 +2897,18 @@ Scan ROM for the text string "LOADING TEST MODE NOW" back up four (4) bytes for ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-21576g.ic27", 0x000000, 0x200000, CRC(d2a1c6bf) SHA1(6d27d71aec4dfba98f66316ae74a1426d567698a) ) \ ROM_SYSTEM_BIOS( 2, "bios2", "epr-21576h (Japan)" ) \ ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-21576h.ic27", 0x000000, 0x200000, CRC(d4895685) SHA1(91424d481ff99a8d3f4c45cea6d3f0eada049a6d) ) \ - ROM_SYSTEM_BIOS( 3, "bios3", "epr-21576d (Japan)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-21576d.ic27", 0x000000, 0x200000, CRC(3b2afa7b) SHA1(d007e1d321c198a38c5baff86eb2ab84385d150a) ) \ - ROM_SYSTEM_BIOS( 4, "bios4", "epr-21578h (Export)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-21578h.ic27", 0x000000, 0x200000, CRC(7b452946) SHA1(8e9f153bbada24b37066dc45b64a7bf0d4f26a9b) ) \ - ROM_SYSTEM_BIOS( 5, "bios5", "epr-21578g (Export)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-21578g.ic27", 0x000000, 0x200000, CRC(55413214) SHA1(bd2748365a9fc1821c9369aa7155d7c41c4df43e) ) \ - ROM_SYSTEM_BIOS( 6, "bios6", "epr-21578e (Export)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-21578e.ic27", 0x000000, 0x200000, CRC(087f09a3) SHA1(0418eb2cf9766f0b1b874a4e92528779e22c0a4a) ) \ - ROM_SYSTEM_BIOS( 7, "bios7", "epr-21578d (Export)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-21578d.ic27", 0x000000, 0x200000, CRC(dfd5f42a) SHA1(614a0db4743a5e5a206190d6786ade24325afbfd) ) \ - ROM_SYSTEM_BIOS( 8, "bios8", "epr-21577h (USA)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 8, "epr-21577h.ic27", 0x000000, 0x200000, CRC(fdf17452) SHA1(5f3e4b677f0046ce690a4f096b0481e5dd8bb6e6) ) \ - ROM_SYSTEM_BIOS( 9, "bios9", "epr-21577g (USA)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 9, "epr-21577g.ic27", 0x000000, 0x200000, CRC(25f64af7) SHA1(99f9e6cc0642319bd2da492611220540add573e8) ) \ - ROM_SYSTEM_BIOS( 10, "bios10", "epr-21577e (USA)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 10, "epr-21577e.ic27", 0x000000, 0x200000, CRC(cf36e97b) SHA1(b085305982e7572e58b03a9d35f17ae319c3bbc6) ) \ - ROM_SYSTEM_BIOS( 11, "bios11", "epr-21577d (USA)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 11, "epr-21577d.ic27", 0x000000, 0x200000, CRC(60ddcbbe) SHA1(58b15096d269d6df617ca1810b66b47deb184958) ) \ - ROM_SYSTEM_BIOS( 12, "bios12", "epr-21579d (Korea)" ) \ - ROM_LOAD16_WORD_SWAP_BIOS( 12, "epr-21579d.ic27", 0x000000, 0x200000, CRC(33513691) SHA1(b1d8c7c516e1471a788fcf7a02a794ad2f05aeeb) ) \ + ROM_SYSTEM_BIOS( 3, "bios3", "epr-21578h (Export)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-21578h.ic27", 0x000000, 0x200000, CRC(7b452946) SHA1(8e9f153bbada24b37066dc45b64a7bf0d4f26a9b) ) \ + ROM_SYSTEM_BIOS( 4, "bios4", "epr-21578g (Export)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-21578g.ic27", 0x000000, 0x200000, CRC(55413214) SHA1(bd2748365a9fc1821c9369aa7155d7c41c4df43e) ) \ + ROM_SYSTEM_BIOS( 5, "bios5", "epr-21578e (Export)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-21578e.ic27", 0x000000, 0x200000, CRC(087f09a3) SHA1(0418eb2cf9766f0b1b874a4e92528779e22c0a4a) ) \ + ROM_SYSTEM_BIOS( 6, "bios6", "epr-21577h (USA)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-21577h.ic27", 0x000000, 0x200000, CRC(fdf17452) SHA1(5f3e4b677f0046ce690a4f096b0481e5dd8bb6e6) ) \ + ROM_SYSTEM_BIOS( 7, "bios7", "epr-21577g (USA)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-21577g.ic27", 0x000000, 0x200000, CRC(25f64af7) SHA1(99f9e6cc0642319bd2da492611220540add573e8) ) \ + ROM_SYSTEM_BIOS( 8, "bios8", "epr-21577e (USA)" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 8, "epr-21577e.ic27", 0x000000, 0x200000, CRC(cf36e97b) SHA1(b085305982e7572e58b03a9d35f17ae319c3bbc6) ) \ ROM_REGION( 0x200000, "user2", 0) \ ROM_LOAD16_WORD_SWAP( "fpr-23489c.ic14", 0x000000, 0x200000, CRC(bc38bea1) SHA1(b36fcc6902f397d9749e9d02de1bbb7a5e29d468) ) @@ -3350,12 +3325,12 @@ ROM_START( doa2 ) ROM_LOAD("mpr-22119.ic20s",0xa000000, 0x0800000, CRC(d608fa86) SHA1(54c8107cccec8cbb536f13cda5b220b7972190b7) ) ROM_LOAD("mpr-22120.ic21s",0xa800000, 0x0800000, CRC(a30facb4) SHA1(70415ca34095c795297486bce1f956f6a8d4817f) ) - // 841-0003 1999 317-5048-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "0008ad01" ) - // on-cart X76F100 eeprom contents ROM_REGION( 0x84, "naomibd_eeprom", 0 ) ROM_LOAD( "841-0003.sf", 0x000000, 0x000084, CRC(3a119a17) SHA1(d37a092cca7c9cfc5f2637b355af90a65d04013e) ) + + // 841-0003 1999 317-5048-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "0008ad01" ) ROM_END /* @@ -3422,12 +3397,12 @@ ROM_START( doa2m ) ROM_LOAD("mpr-22119.ic20s",0xa000000, 0x0800000, CRC(d608fa86) SHA1(54c8107cccec8cbb536f13cda5b220b7972190b7) ) ROM_LOAD("mpr-22120.ic21s",0xa800000, 0x0800000, CRC(a30facb4) SHA1(70415ca34095c795297486bce1f956f6a8d4817f) ) - // 841-0003 1999 317-5048-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "0008ad01" ) - // on-cart X76F100 eeprom contents ROM_REGION( 0x84, "naomibd_eeprom", 0 ) ROM_LOAD( "841-0003.sf", 0x000000, 0x000084, CRC(3a119a17) SHA1(d37a092cca7c9cfc5f2637b355af90a65d04013e) ) + + // 841-0003 1999 317-5048-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "0008ad01" ) ROM_END /* @@ -3479,8 +3454,6 @@ ROM_START( derbyoc ) ROM_LOAD("mpr-22097.ic13s", 0x6800000, 0x0800000, CRC(f1dedac5) SHA1(9d4499cbafe80dd0b36be617de7994a96e1e9a01) ) ROM_LOAD("mpr-22098.ic14s", 0x7000000, 0x0800000, CRC(f9824d2e) SHA1(f20f8cc2b1bef9077ede1cb874da8f2a335d39de) ) - // 840-0016 1999 317-0262-JPN Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "280fee35" ) /* 838-13661 RS422/RS232C BD DOC IC1 - Toshiba TMPZ84C015BF-10 Z80-based MCU @@ -3492,6 +3465,9 @@ ROM_START( derbyoc ) */ ROM_REGION( 0x10000, "rs422_io", 0 ) ROM_LOAD( "epr-22083.ic7", 0x0000, 0x10000, CRC(c70b0de9) SHA1(329c924b4d29017482b1ecca839fb610ca20b2af) ) + + // 840-0016 1999 317-0262-JPN Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "280fee35" ) ROM_END ROM_START( derbyocw ) @@ -3771,11 +3747,11 @@ ROM_START( f355 ) ROM_LOAD("mpr-21900.ic20s", 0xa000000, 0x0800000, CRC(81901130) SHA1(1573b5c4360e29ba1a4b4901af49d5399fa1e635) ) ROM_LOAD("mpr-21901.ic21s", 0xa800000, 0x0800000, CRC(266a3eea) SHA1(795ecc5589a0152b9cf1e03e454ed1ea01501942) ) - // 834-13842 1999 317-0254-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "280e8f84" ) - ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */ ROM_LOAD( "epr-21867.bin", 0x000000, 0x010000, CRC(4f93a2a0) SHA1(875907e7fcfc44850e2c60c12268ac61c742f217) ) + + // 834-13842 1999 317-0254-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "280e8f84" ) ROM_END ROM_START( f355twin ) @@ -3861,12 +3837,12 @@ ROM_START( alpiltdx ) ROM_LOAD( "mpr-21737.ic10", 0x5000000, 0x800000, CRC(260aaa98) SHA1(d1082587afe9d79f286df8b107a553ee51c27643) ) ROM_LOAD( "mpr-21738.ic11", 0x5800000, 0x800000, CRC(95a592e8) SHA1(862dce467e8805381bab001df68262f1baf3c498) ) - // 834-????? 1999 317-0251-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "28070e41" ) - // on-cart X76F100 eeprom contents ROM_REGION( 0x84, "naomibd_eeprom", 0 ) ROM_LOAD( "airlinepdx.sf", 0x000000, 0x000084, CRC(404b2add) SHA1(540c8474806775646ace111a2993397b1419fee3) ) + + // 834-????? 1999 317-0251-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "28070e41" ) ROM_END ROM_START( alpilota ) @@ -4156,6 +4132,15 @@ ROM_START( mtkob2 ) ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 ) + + // MUSHIKING + // The King of Beetle + // TYPE-1 + // 800 + // note: this dump from "empty/dead" Management Chip with no game run count left + ROM_REGION( 0x80, "rf_tag", 0 ) + ROM_LOAD( "mushi_type1.bin", 0, 0x80, CRC(8f36572b) SHA1(87e00e56d07a961e9180c7da02e35f7fd216dbae) ) + // 840-0150 2003 317-0394-COM Naomi ROM_PARAMETER( ":rom_board:key", "3892fb3a" ) ROM_END @@ -4622,9 +4607,6 @@ ROM_START( 18wheelr ) ROM_LOAD( "mpr-22182.ic19s", 0x9800000, 0x800000, CRC(c5606c42) SHA1(5871104ff1c7acde0493e13b9a4d0abdf8a40728) ) ROM_LOAD( "mpr-22183.ic20s", 0xa000000, 0x800000, CRC(776af308) SHA1(7d29cb4dce75d34c622549fea7e102868d0da60a) ) - // 840-0023 2000 317-0273-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "2807cf54" ) - // JVS I/O board 837-13844, code is for a Z80 of unknown type (it's inside the big Sega ASIC) ROM_REGION( 0x20000, "jvsio", ROMREGION_ERASEFF) ROM_LOAD( "epr-21868.ic7", 0x000000, 0x010000, CRC(c306a51f) SHA1(7833b73dc34c4c62401a30637968f46b949ceac0) ) @@ -4634,6 +4616,9 @@ ROM_START( 18wheelr ) // 18 Wheeler motor controller 838-13992, code is for a TMPZ84C015 which is Z80 compatible ROM_REGION( 0x10000, "motorio", ROMREGION_ERASEFF) ROM_LOAD( "epr-23000.ic8", 0x000000, 0x010000, CRC(e3b162f7) SHA1(52c7ad759c3c4a3148764e14d77ba5006bc8af48) ) + + // 840-0023 2000 317-0273-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "2807cf54" ) ROM_END /* 18 Wheeler (standard) */ @@ -4664,9 +4649,6 @@ ROM_START( 18wheels ) ROM_LOAD( "mpr-22182.ic19s", 0x9800000, 0x800000, CRC(c5606c42) SHA1(5871104ff1c7acde0493e13b9a4d0abdf8a40728) ) ROM_LOAD( "mpr-22183.ic20s", 0xa000000, 0x800000, CRC(776af308) SHA1(7d29cb4dce75d34c622549fea7e102868d0da60a) ) - // 840-0023 2000 317-0273-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "2807cf54" ) - // JVS I/O board 837-13844, code is for a Z80 of unknown type (it's inside the big Sega ASIC) ROM_REGION( 0x20000, "jvsio", ROMREGION_ERASEFF) ROM_LOAD( "epr-21868.ic7", 0x000000, 0x010000, CRC(c306a51f) SHA1(7833b73dc34c4c62401a30637968f46b949ceac0) ) @@ -4676,6 +4658,9 @@ ROM_START( 18wheels ) // 18 Wheeler motor controller 838-13992, code is for a TMPZ84C015 which is Z80 compatible ROM_REGION( 0x10000, "motorio", ROMREGION_ERASEFF) ROM_LOAD( "epr-23000.ic8", 0x000000, 0x010000, CRC(e3b162f7) SHA1(52c7ad759c3c4a3148764e14d77ba5006bc8af48) ) + + // 840-0023 2000 317-0273-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "2807cf54" ) ROM_END /* 18 Wheeler (upright) */ @@ -4706,14 +4691,14 @@ ROM_START( 18wheelu ) ROM_LOAD( "mpr-22182.ic19s", 0x9800000, 0x800000, CRC(c5606c42) SHA1(5871104ff1c7acde0493e13b9a4d0abdf8a40728) ) ROM_LOAD( "mpr-22183.ic20s", 0xa000000, 0x800000, CRC(776af308) SHA1(7d29cb4dce75d34c622549fea7e102868d0da60a) ) - // 840-0023 2000 317-0273-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "2807cf54" ) - // JVS I/O board 837-13844, code is for a Z80 of unknown type (it's inside the big Sega ASIC) ROM_REGION( 0x20000, "jvsio", ROMREGION_ERASEFF) ROM_LOAD( "epr-21868.ic7", 0x000000, 0x010000, CRC(c306a51f) SHA1(7833b73dc34c4c62401a30637968f46b949ceac0) ) // later version of the same I/O board (temporary, we'll handle this properly later) ROM_LOAD( "epr-22082.ic7", 0x010000, 0x010000, CRC(de26fc6c) SHA1(cf8ef7969770fff8697299c3e3152413b898a967) ) + + // 840-0023 2000 317-0273-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "2807cf54" ) ROM_END ROM_START( marstv ) @@ -6131,11 +6116,11 @@ ROM_START( ninjaslt ) ROM_LOAD( "nja1ma9.4c", 0x9000000, 0x1000000, CRC(8abed815) SHA1(5e1b208d23a17ba743d0507d963be42e7828755f) ) ROM_LOAD( "nja1ma10.4b", 0xa000000, 0x1000000, CRC(f14d2073) SHA1(b4a8cd585794be149b616119df3f75c0fb30e2f0) ) - // 25469801 2000 317-5068-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" ) - ROM_REGION( 0x20000, "jyu_io", 0 ) // H8/3334-based I/O board ROM, eventually should be separated out ROM_LOAD( "jyu1_prg0a.ic3", 0x000000, 0x020000, CRC(aec4dbc1) SHA1(bddd4f345baf7f594998a39c09da18b3834f0ac2) ) + + // 25469801 2000 317-5068-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" ) ROM_END ROM_START( ninjaslt1 ) @@ -6156,11 +6141,11 @@ ROM_START( ninjaslt1 ) ROM_LOAD( "nja1ma9.4c", 0x9000000, 0x1000000, CRC(8abed815) SHA1(5e1b208d23a17ba743d0507d963be42e7828755f) ) ROM_LOAD( "nja1ma10.4b", 0xa000000, 0x1000000, CRC(f14d2073) SHA1(b4a8cd585794be149b616119df3f75c0fb30e2f0) ) - // 25469801 2000 317-5068-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" ) - ROM_REGION( 0x20000, "jyu_io", 0 ) // H8/3334-based I/O board ROM, eventually should be separated out ROM_LOAD( "jyu1_prg0a.ic3", 0x000000, 0x020000, CRC(aec4dbc1) SHA1(bddd4f345baf7f594998a39c09da18b3834f0ac2) ) + + // 25469801 2000 317-5068-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" ) ROM_END ROM_START( ninjaslt2 ) @@ -6181,11 +6166,11 @@ ROM_START( ninjaslt2 ) ROM_LOAD( "nja1ma9.4c", 0x9000000, 0x1000000, CRC(8abed815) SHA1(5e1b208d23a17ba743d0507d963be42e7828755f) ) ROM_LOAD( "nja1ma10.4b", 0xa000000, 0x1000000, CRC(f14d2073) SHA1(b4a8cd585794be149b616119df3f75c0fb30e2f0) ) - // 25469801 2000 317-5068-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" ) - ROM_REGION( 0x20000, "jyu_io", 0 ) // H8/3334-based I/O board ROM, eventually should be separated out ROM_LOAD( "jyu1_prg0a.ic3", 0x000000, 0x020000, CRC(aec4dbc1) SHA1(bddd4f345baf7f594998a39c09da18b3834f0ac2) ) + + // 25469801 2000 317-5068-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" ) ROM_END ROM_START( ninjaslt4 ) @@ -6206,11 +6191,11 @@ ROM_START( ninjaslt4 ) ROM_LOAD( "nja1ma9.4c", 0x9000000, 0x1000000, CRC(8abed815) SHA1(5e1b208d23a17ba743d0507d963be42e7828755f) ) ROM_LOAD( "nja1ma10.4b", 0xa000000, 0x1000000, CRC(f14d2073) SHA1(b4a8cd585794be149b616119df3f75c0fb30e2f0) ) - // 25469801 2000 317-5068-COM Naomi - ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" ) - ROM_REGION( 0x20000, "jyu_io", 0 ) // H8/3334-based I/O board ROM, eventually should be separated out ROM_LOAD( "jyu1_prg0a.ic3", 0x000000, 0x020000, CRC(aec4dbc1) SHA1(bddd4f345baf7f594998a39c09da18b3834f0ac2) ) + + // 25469801 2000 317-5068-COM Naomi + ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" ) ROM_END ROM_START( mazan ) @@ -6506,11 +6491,11 @@ ROM_START( starhrse ) ROM_LOAD( "mpr-23233.ic3", 0x2800000, 0x1000000, CRC(d6451cab) SHA1(6508e27d0370b19df01150da7baf4875479c166a) ) ROM_LOAD( "mpr-23234.ic4", 0x3800000, 0x1000000, CRC(44044c14) SHA1(4934cb8d5f9b4085ffb5ddc711343f488aae4c4d) ) - ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // 315-5881 not populated - // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes ROM_REGION(0x84, "some_eeprom", 0) ROM_LOAD( "sflash.bin", 0x000000, 0x000084, CRC(951684e4) SHA1(0beaf5827064252293223b946c04b8698e7207bb) ) + + ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // 315-5881 not populated ROM_END ROM_START( starhrct ) @@ -6539,11 +6524,11 @@ ROM_START( starhrct ) ROM_LOAD( "ic17s.bin", 0x8800000, 0x800000, CRC(b4c40606) SHA1(4f187dfe44bd89c90b6fa4b90f16222bc0a74d22) ) // .18s chip is not present but is tested for an FF fill (pull-up resistors on the PCB's data bus presumably accomplish this) - ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // 315-5881 not populated - // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes ROM_REGION(0x84, "some_eeprom", 0) ROM_LOAD( "sflash.bin", 0x000000, 0x000084, CRC(1557297e) SHA1(41e8a7a8eaf5076b124d378afdf97e328d100e72) ) + + ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // 315-5881 not populated ROM_END ROM_START( starhrcl ) @@ -6560,11 +6545,11 @@ ROM_START( starhrcl ) ROM_LOAD( "mpr-23280.ic6", 0x5800000, 0x1000000, CRC(b1c8daa2) SHA1(a05fb374156ea013e35502abccc92f5117c39daa) ) ROM_LOAD( "mpr-23281.ic7", 0x6800000, 0x0800000, CRC(c0378369) SHA1(c728a181eddb01b9f8574669d4550baed559a5a4) ) - ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // 315-5881 not populated - // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes ROM_REGION(0x84, "some_eeprom", 0) ROM_LOAD( "sflash.bin", 0x000000, 0x000084, CRC(4929e940) SHA1(f8c4277ca0ae5e36b2eed033cc731b8fc4fccafc) ) + + ROM_PARAMETER( ":rom_board:segam2crypt:key", "-1") // 315-5881 not populated ROM_END // this is satellite unit of the main game, server/control and lagre screen units required and need to be dumped @@ -6617,12 +6602,12 @@ ROM_START( puyofevp ) ROM_COPY( "rom_board", 0x01000000, 0x400000, 0xc00000 ) - // Actel FPGA stamped 315-6257A, not 317-xxxx like security components, so most likely it doesn't implement M1 encryption - ROM_PARAMETER( ":rom_board:key", "0" ) - // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes ROM_REGION(0x84, "some_eeprom", 0) ROM_LOAD( "sflash.bin", 0x000000, 0x000084, CRC(17150bc9) SHA1(c3af7d91e12141938d2b9e67eb9f5ff961cd09ff) ) + + // Actel FPGA stamped 315-6257A, not 317-xxxx like security components, so most likely it doesn't implement M1 encryption + ROM_PARAMETER( ":rom_board:key", "0" ) ROM_END /* GD-ROM titles - a PIC supplies a decryption key @@ -7991,15 +7976,15 @@ ROM_START( hopper ) ROM_REGION( 0xb000000, "rom_board", ROMREGION_ERASEFF) ROM_LOAD( "epr-24083.ic11", 0x000000, 0x400000, CRC(2733e65a) SHA1(4a5d109d0531bebd8e8f585789adce98cac2ab93) ) - // 840-0130 2002 317-0339-COM Naomi - ROM_PARAMETER( ":rom_board:key", "1e5bb0cd" ) - ROM_REGION( 0x40000, "flash", ROMREGION_ERASEFF) ROM_LOAD( "315-6358a.ic2", 0x000000, 0x020008, CRC(ef442e67) SHA1(70ac91e2ca1ff2dfba48d566e4de68bd8b82f282) ) // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes ROM_REGION(0x84, "some_eeprom", 0) ROM_LOAD( "sflash.bin", 0x000000, 0x000084, CRC(ddedf494) SHA1(f1529615711a9871051cd09c2a9b95c90d356874) ) + + // 840-0130 2002 317-0339-COM Naomi + ROM_PARAMETER( ":rom_board:key", "1e5bb0cd" ) ROM_END ROM_START( clubkrte ) @@ -8126,12 +8111,12 @@ ROM_START( clubkpzb ) ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 ) - // 840-0137 2004 317-0368-COM Naomi 2 - ROM_PARAMETER( ":rom_board:key", "997681fe") - // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes ROM_REGION(0x84, "some_eeprom", 0) ROM_LOAD( "sflash.bin", 0x000000, 0x000084, CRC(afff6471) SHA1(c1e1d349ff25191eba09cd7d7186fbe2c6565b81) ) + + // 840-0137 2004 317-0368-COM Naomi 2 + ROM_PARAMETER( ":rom_board:key", "997681fe") ROM_END ROM_START( clubk2k3 ) diff --git a/src/mame/drivers/nbmj8688.c b/src/mame/drivers/nbmj8688.c index 61155d623a4..3c8b8094700 100644 --- a/src/mame/drivers/nbmj8688.c +++ b/src/mame/drivers/nbmj8688.c @@ -147,16 +147,16 @@ static ADDRESS_MAP_START( secolove_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) - AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x90, 0x97) AM_WRITE(blitter_w) AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w) AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w) - AM_RANGE(0xc0, 0xcf) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0xc0, 0xcf) AM_WRITE(clut_w) AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8) AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w) // AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) // AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) - AM_RANGE(0xf0, 0xf0) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_WRITE(scrolly_w) ADDRESS_MAP_END WRITE8_MEMBER(nbmj8688_state::barline_output_w) @@ -172,14 +172,14 @@ static ADDRESS_MAP_START( barline_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0x70, 0x70) AM_DEVWRITE("nb1413m3", nb1413m3_device, nmi_clock_w) AM_RANGE(0x80, 0x81) AM_DEVREADWRITE("psg", ym3812_device, read, write) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) - AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x90, 0x97) AM_WRITE(blitter_w) AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w) AM_RANGE(0xb0, 0xb0) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport2_r) AM_WRITE(barline_output_w) - AM_RANGE(0xc0, 0xcf) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0xc0, 0xcf) AM_WRITE(clut_w) AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? // AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8) //not used AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w) - AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(scrolly_w) AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) ADDRESS_MAP_END @@ -190,10 +190,10 @@ static ADDRESS_MAP_START( crystalg_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) - AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x90, 0x97) AM_WRITE(blitter_w) AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w) AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w) - AM_RANGE(0xc0, 0xcf) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0xc0, 0xcf) AM_WRITE(clut_w) AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8) AM_RANGE(0xe0, 0xe0) AM_WRITE(crystalg_romsel_w) @@ -207,9 +207,9 @@ static ADDRESS_MAP_START( otonano_io_map, AS_IO, 8, nbmj8688_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x7f) AM_DEVREAD("nb1413m3", nb1413m3_device, sndrom_r) AM_RANGE(0x00, 0x00) AM_DEVWRITE("nb1413m3", nb1413m3_device, nmi_clock_w) - AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0x20, 0x3f) AM_WRITE(clut_w) AM_RANGE(0x50, 0x50) AM_WRITE(mjsikaku_romsel_w) - AM_RANGE(0x70, 0x77) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x70, 0x77) AM_WRITE(blitter_w) AM_RANGE(0x80, 0x81) AM_DEVREADWRITE("psg", ym3812_device, read, write) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w) @@ -217,7 +217,7 @@ static ADDRESS_MAP_START( otonano_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8) AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) - AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(scrolly_w) AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) ADDRESS_MAP_END @@ -226,9 +226,9 @@ static ADDRESS_MAP_START( kaguya_io_map, AS_IO, 8, nbmj8688_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x7f) AM_DEVREAD("nb1413m3", nb1413m3_device, sndrom_r) AM_RANGE(0x00, 0x00) AM_DEVWRITE("nb1413m3", nb1413m3_device, nmi_clock_w) - AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0x20, 0x3f) AM_WRITE(clut_w) AM_RANGE(0x50, 0x50) AM_WRITE(mjsikaku_romsel_w) - AM_RANGE(0x70, 0x77) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x70, 0x77) AM_WRITE(blitter_w) AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) @@ -237,7 +237,7 @@ static ADDRESS_MAP_START( kaguya_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8) AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) - AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_WRITE(scrolly_w) AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) ADDRESS_MAP_END @@ -247,8 +247,8 @@ static ADDRESS_MAP_START( iemoto_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0x00, 0x7f) AM_DEVREAD("nb1413m3", nb1413m3_device, sndrom_r) AM_RANGE(0x00, 0x00) AM_DEVWRITE("nb1413m3", nb1413m3_device, nmi_clock_w) AM_RANGE(0x10, 0x10) AM_DEVWRITE("nb1413m3", nb1413m3_device, sndrombank2_w) - AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) - AM_RANGE(0x40, 0x47) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x20, 0x3f) AM_WRITE(clut_w) + AM_RANGE(0x40, 0x47) AM_WRITE(blitter_w) AM_RANGE(0x50, 0x50) AM_WRITE(seiha_romsel_w) AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) @@ -260,7 +260,7 @@ static ADDRESS_MAP_START( iemoto_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) // AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) // AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) - AM_RANGE(0xf0, 0xf0) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_WRITE(scrolly_w) ADDRESS_MAP_END @@ -269,12 +269,12 @@ static ADDRESS_MAP_START( seiha_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0x00, 0x7f) AM_DEVREAD("nb1413m3", nb1413m3_device, sndrom_r) AM_RANGE(0x00, 0x00) AM_DEVWRITE("nb1413m3", nb1413m3_device, nmi_clock_w) AM_RANGE(0x10, 0x10) AM_DEVWRITE("nb1413m3", nb1413m3_device, sndrombank2_w) - AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0x20, 0x3f) AM_WRITE(clut_w) AM_RANGE(0x50, 0x50) AM_WRITE(seiha_romsel_w) AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) - AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x90, 0x97) AM_WRITE(blitter_w) AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w) AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w) AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? @@ -282,19 +282,19 @@ static ADDRESS_MAP_START( seiha_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) // AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) // AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) - AM_RANGE(0xf0, 0xf0) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_WRITE(scrolly_w) ADDRESS_MAP_END static ADDRESS_MAP_START( mjgaiden_io_map, AS_IO, 8, nbmj8688_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x7f) AM_DEVREAD("nb1413m3", nb1413m3_device, sndrom_r) AM_RANGE(0x00, 0x00) AM_DEVWRITE("nb1413m3", nb1413m3_device, nmi_clock_w) - AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0x20, 0x3f) AM_WRITE(clut_w) AM_RANGE(0x50, 0x50) AM_WRITE(mjsikaku_romsel_w) AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) - AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x90, 0x97) AM_WRITE(blitter_w) AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w) AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w) AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? @@ -302,7 +302,7 @@ static ADDRESS_MAP_START( mjgaiden_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) // AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) // AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) - AM_RANGE(0xf0, 0xf0) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_WRITE(scrolly_w) ADDRESS_MAP_END static ADDRESS_MAP_START( p16bit_LCD_io_map, AS_IO, 8, nbmj8688_state ) @@ -313,21 +313,21 @@ static ADDRESS_MAP_START( p16bit_LCD_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0x43, 0x43) AM_DEVREADWRITE("lcdc0", hd61830_device, status_r, control_w) AM_RANGE(0x44, 0x44) AM_DEVREADWRITE("lcdc1", hd61830_device, data_r, data_w) AM_RANGE(0x45, 0x45) AM_DEVREADWRITE("lcdc1", hd61830_device, status_r, control_w) - AM_RANGE(0x46, 0x46) AM_WRITE(nbmj8688_HD61830B_both_data_w) - AM_RANGE(0x47, 0x47) AM_WRITE(nbmj8688_HD61830B_both_instr_w) + AM_RANGE(0x46, 0x46) AM_WRITE(HD61830B_both_data_w) + AM_RANGE(0x47, 0x47) AM_WRITE(HD61830B_both_instr_w) AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) - AM_RANGE(0x90, 0x97) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x90, 0x97) AM_WRITE(blitter_w) AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w) AM_RANGE(0xb0, 0xb0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport2_r, sndrombank1_w) - AM_RANGE(0xc0, 0xcf) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0xc0, 0xcf) AM_WRITE(clut_w) AM_RANGE(0xd0, 0xd0) AM_READ(ff_r) // irq ack? watchdog? AM_RANGE(0xd0, 0xd0) AM_DEVWRITE("dac", dac_device, write_unsigned8) AM_RANGE(0xe0, 0xe0) AM_WRITE(secolove_romsel_w) // AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) // AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) - AM_RANGE(0xf0, 0xf0) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_WRITE(scrolly_w) ADDRESS_MAP_END @@ -336,9 +336,9 @@ static ADDRESS_MAP_START( mjsikaku_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0x00, 0x7f) AM_DEVREAD("nb1413m3", nb1413m3_device, sndrom_r) AM_RANGE(0x00, 0x00) AM_DEVWRITE("nb1413m3", nb1413m3_device, nmi_clock_w) AM_RANGE(0x10, 0x10) AM_DEVWRITE("nb1413m3", nb1413m3_device, sndrombank2_w) - AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) + AM_RANGE(0x20, 0x3f) AM_WRITE(clut_w) AM_RANGE(0x50, 0x50) AM_WRITE(mjsikaku_romsel_w) - AM_RANGE(0x60, 0x67) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x60, 0x67) AM_WRITE(blitter_w) AM_RANGE(0x80, 0x81) AM_DEVREADWRITE("psg", ym3812_device, read, write) AM_RANGE(0x90, 0x90) AM_DEVREAD("nb1413m3", nb1413m3_device, inputport0_r) AM_RANGE(0xa0, 0xa0) AM_DEVREADWRITE("nb1413m3", nb1413m3_device, inputport1_r, inputportsel_w) @@ -348,7 +348,7 @@ static ADDRESS_MAP_START( mjsikaku_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) - AM_RANGE(0xf0, 0xf0) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_WRITE(scrolly_w) ADDRESS_MAP_END @@ -357,8 +357,8 @@ static ADDRESS_MAP_START( mmsikaku_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0x00, 0x7f) AM_DEVREAD("nb1413m3", nb1413m3_device, sndrom_r) AM_RANGE(0x00, 0x00) AM_DEVWRITE("nb1413m3", nb1413m3_device, nmi_clock_w) AM_RANGE(0x10, 0x10) AM_DEVWRITE("nb1413m3", nb1413m3_device, sndrombank2_w) - AM_RANGE(0x20, 0x3f) AM_WRITE(nbmj8688_clut_w) - AM_RANGE(0x40, 0x47) AM_WRITE(nbmj8688_blitter_w) + AM_RANGE(0x20, 0x3f) AM_WRITE(clut_w) + AM_RANGE(0x40, 0x47) AM_WRITE(blitter_w) AM_RANGE(0x50, 0x50) AM_WRITE(mjsikaku_romsel_w) AM_RANGE(0x81, 0x81) AM_DEVREAD("psg", ay8910_device, data_r) AM_RANGE(0x82, 0x83) AM_DEVWRITE("psg", ay8910_device, data_address_w) @@ -370,7 +370,7 @@ static ADDRESS_MAP_START( mmsikaku_io_map, AS_IO, 8, nbmj8688_state ) AM_RANGE(0xe0, 0xe0) AM_WRITE(mjsikaku_gfxflag2_w) // AM_RANGE(0xf0, 0xf0) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw1_r) // AM_RANGE(0xf1, 0xf1) AM_DEVREAD("nb1413m3", nb1413m3_device, dipsw2_r) - AM_RANGE(0xf0, 0xf0) AM_WRITE(mjsikaku_scrolly_w) + AM_RANGE(0xf0, 0xf0) AM_WRITE(scrolly_w) ADDRESS_MAP_END CUSTOM_INPUT_MEMBER( nbmj8688_state::nb1413m3_busyflag_r ) @@ -2768,7 +2768,7 @@ static MACHINE_CONFIG_START( NBMJDRV_4096, nbmj8688_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(512, 256) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1) - MCFG_SCREEN_UPDATE_DRIVER(nbmj8688_state, screen_update_mbmj8688) + MCFG_SCREEN_UPDATE_DRIVER(nbmj8688_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 4096) @@ -2927,7 +2927,7 @@ static MACHINE_CONFIG_START( mbmj_p16bit_LCD, nbmj8688_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(512, 256) MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 16, 240-1) - MCFG_SCREEN_UPDATE_DRIVER(nbmj8688_state, screen_update_mbmj8688) + MCFG_SCREEN_UPDATE_DRIVER(nbmj8688_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette_lcd", 2) @@ -4058,52 +4058,52 @@ ROM_END /* 8-bit palette */ -GAME( 1986, crystalg, 0, crystalg, crystalg, driver_device, 0, ROT0, "Nichibutsu", "Crystal Gal (Japan 860512)", 0 ) -GAME( 1986, crystal2, 0, crystal2, crystal2, driver_device, 0, ROT0, "Nichibutsu", "Crystal Gal 2 (Japan 860620)", 0 ) -GAME( 1986, nightlov, 0, nightlov, nightlov, driver_device, 0, ROT0, "Central Denshi", "Night Love (Japan 860705)", GAME_NOT_WORKING ) -GAME( 1986, apparel, 0, apparel, apparel, driver_device, 0, ROT0, "Central Denshi", "Apparel Night (Japan 860929)", 0 ) +GAME( 1986, crystalg, 0, crystalg, crystalg, driver_device, 0, ROT0, "Nichibutsu", "Crystal Gal (Japan 860512)", GAME_SUPPORTS_SAVE ) +GAME( 1986, crystal2, 0, crystal2, crystal2, driver_device, 0, ROT0, "Nichibutsu", "Crystal Gal 2 (Japan 860620)", GAME_SUPPORTS_SAVE ) +GAME( 1986, nightlov, 0, nightlov, nightlov, driver_device, 0, ROT0, "Central Denshi", "Night Love (Japan 860705)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +GAME( 1986, apparel, 0, apparel, apparel, driver_device, 0, ROT0, "Central Denshi", "Apparel Night (Japan 860929)", GAME_SUPPORTS_SAVE ) /* hybrid 12-bit palette */ -GAME( 1986, citylove, 0, citylove, citylove, driver_device, 0, ROT0, "Nichibutsu", "City Love (Japan 860908)", 0 ) -GAME( 1986, mcitylov, citylove, mcitylov, mcitylov, driver_device, 0, ROT0, "Nichibutsu", "City Love [BET] (Japan 860904)", 0 ) -GAME( 1986, secolove, 0, secolove, secolove, driver_device, 0, ROT0, "Nichibutsu", "Second Love (Japan 861201)", 0 ) -GAME( 1988, barline, 0, barline, barline, driver_device, 0, ROT180, "Nichibutsu", "Barline (Japan?)", GAME_IMPERFECT_SOUND ) +GAME( 1986, citylove, 0, citylove, citylove, driver_device, 0, ROT0, "Nichibutsu", "City Love (Japan 860908)", GAME_SUPPORTS_SAVE ) +GAME( 1986, mcitylov, citylove, mcitylov, mcitylov, driver_device, 0, ROT0, "Nichibutsu", "City Love [BET] (Japan 860904)", GAME_SUPPORTS_SAVE ) +GAME( 1986, secolove, 0, secolove, secolove, driver_device, 0, ROT0, "Nichibutsu", "Second Love (Japan 861201)", GAME_SUPPORTS_SAVE ) +GAME( 1988, barline, 0, barline, barline, driver_device, 0, ROT180, "Nichibutsu", "Barline (Japan?)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) /* hybrid 16-bit palette */ -GAME( 1987, seiha, 0, seiha, seiha, driver_device, 0, ROT0, "Nichibutsu", "Seiha (Japan 870725)", 0 ) -GAME( 1987, seiham, seiha, seiham, seiham, driver_device, 0, ROT0, "Nichibutsu", "Seiha [BET] (Japan 870723)", 0 ) -GAME( 1987, mjgaiden, 0, mjgaiden, ojousan, driver_device, 0, ROT0, "Central Denshi", "Mahjong Gaiden [BET] (Japan 870803)", 0 ) -GAME( 1987, iemoto, 0, iemoto, iemoto, driver_device, 0, ROT0, "Nichibutsu", "Iemoto (Japan 871020)", 0 ) -GAME( 1987, iemotom, iemoto, iemotom, iemotom, driver_device, 0, ROT0, "Nichibutsu", "Iemoto [BET] (Japan 871118)", 0 ) -GAME( 1987, ryuuha, iemoto, ryuuha, ryuuha, driver_device, 0, ROT0, "Central Denshi", "Ryuuha [BET] (Japan 871027)", 0 ) -GAME( 1987, ojousan, 0, ojousan, ojousan, driver_device, 0, ROT0, "Nichibutsu", "Ojousan (Japan 871204)", 0 ) -GAME( 1987, ojousanm, ojousan, ojousanm, ojousanm, driver_device, 0, ROT0, "Nichibutsu", "Ojousan [BET] (Japan 870108)", 0 ) -GAME( 1988, korinai, 0, korinai, korinai, driver_device, 0, ROT0, "Nichibutsu", "Mahjong-zukino Korinai Menmen (Japan 880425)", 0 ) -GAME( 1988, korinaim, korinai, korinaim, korinaim, driver_device, 0, ROT0, "Nichibutsu", "Mahjong-zukino Korinai Menmen [BET] (Japan 880920)", 0 ) +GAME( 1987, seiha, 0, seiha, seiha, driver_device, 0, ROT0, "Nichibutsu", "Seiha (Japan 870725)", GAME_SUPPORTS_SAVE ) +GAME( 1987, seiham, seiha, seiham, seiham, driver_device, 0, ROT0, "Nichibutsu", "Seiha [BET] (Japan 870723)", GAME_SUPPORTS_SAVE ) +GAME( 1987, mjgaiden, 0, mjgaiden, ojousan, driver_device, 0, ROT0, "Central Denshi", "Mahjong Gaiden [BET] (Japan 870803)", GAME_SUPPORTS_SAVE ) +GAME( 1987, iemoto, 0, iemoto, iemoto, driver_device, 0, ROT0, "Nichibutsu", "Iemoto (Japan 871020)", GAME_SUPPORTS_SAVE ) +GAME( 1987, iemotom, iemoto, iemotom, iemotom, driver_device, 0, ROT0, "Nichibutsu", "Iemoto [BET] (Japan 871118)", GAME_SUPPORTS_SAVE ) +GAME( 1987, ryuuha, iemoto, ryuuha, ryuuha, driver_device, 0, ROT0, "Central Denshi", "Ryuuha [BET] (Japan 871027)", GAME_SUPPORTS_SAVE ) +GAME( 1987, ojousan, 0, ojousan, ojousan, driver_device, 0, ROT0, "Nichibutsu", "Ojousan (Japan 871204)", GAME_SUPPORTS_SAVE ) +GAME( 1987, ojousanm, ojousan, ojousanm, ojousanm, driver_device, 0, ROT0, "Nichibutsu", "Ojousan [BET] (Japan 870108)", GAME_SUPPORTS_SAVE ) +GAME( 1988, korinai, 0, korinai, korinai, driver_device, 0, ROT0, "Nichibutsu", "Mahjong-zukino Korinai Menmen (Japan 880425)", GAME_SUPPORTS_SAVE ) +GAME( 1988, korinaim, korinai, korinaim, korinaim, driver_device, 0, ROT0, "Nichibutsu", "Mahjong-zukino Korinai Menmen [BET] (Japan 880920)", GAME_SUPPORTS_SAVE ) /* pure 16-bit palette (+ LCD in some) */ -GAME( 1987, housemnq, 0, housemnq, housemnq, driver_device, 0, ROT0, "Nichibutsu", "House Mannequin (Japan 870217)", 0 ) -GAME( 1987, housemn2, 0, housemn2, housemn2, driver_device, 0, ROT0, "Nichibutsu", "House Mannequin Roppongi Live hen (Japan 870418)", 0 ) -GAME( 1987, livegal, 0, livegal, livegal, driver_device, 0, ROT0, "Central Denshi", "Live Gal (Japan 870530)", 0 ) -GAME( 1987, bijokkoy, 0, bijokkoy, bijokkoy, driver_device, 0, ROT0, "Nichibutsu", "Bijokko Yume Monogatari (Japan 870925)", 0 ) -GAME( 1988, bijokkog, 0, bijokkog, bijokkog, driver_device, 0, ROT0, "Nichibutsu", "Bijokko Gakuen (Japan 880116)", 0 ) -GAME( 1988, orangec, 0, orangec, orangec, driver_device, 0, ROT0, "Daiichi Denshi", "Orange Club - Maruhi Kagai Jugyou (Japan 880213)", 0 ) -GAME( 1988, orangeci, orangec, orangeci, orangeci, driver_device, 0, ROT0, "Daiichi Denshi", "Orange Club - Maru-hi Ippatsu Kaihou [BET] (Japan 880221)", 0 ) -GAME( 1988, vipclub, orangec, vipclub, vipclub, driver_device, 0, ROT0, "Daiichi Denshi", "Vip Club - Maru-hi Ippatsu Kaihou [BET] (Japan 880310)", 0 ) +GAME( 1987, housemnq, 0, housemnq, housemnq, driver_device, 0, ROT0, "Nichibutsu", "House Mannequin (Japan 870217)", GAME_SUPPORTS_SAVE ) +GAME( 1987, housemn2, 0, housemn2, housemn2, driver_device, 0, ROT0, "Nichibutsu", "House Mannequin Roppongi Live hen (Japan 870418)", GAME_SUPPORTS_SAVE ) +GAME( 1987, livegal, 0, livegal, livegal, driver_device, 0, ROT0, "Central Denshi", "Live Gal (Japan 870530)", GAME_SUPPORTS_SAVE ) +GAME( 1987, bijokkoy, 0, bijokkoy, bijokkoy, driver_device, 0, ROT0, "Nichibutsu", "Bijokko Yume Monogatari (Japan 870925)", GAME_SUPPORTS_SAVE ) +GAME( 1988, bijokkog, 0, bijokkog, bijokkog, driver_device, 0, ROT0, "Nichibutsu", "Bijokko Gakuen (Japan 880116)", GAME_SUPPORTS_SAVE ) +GAME( 1988, orangec, 0, orangec, orangec, driver_device, 0, ROT0, "Daiichi Denshi", "Orange Club - Maruhi Kagai Jugyou (Japan 880213)", GAME_SUPPORTS_SAVE ) +GAME( 1988, orangeci, orangec, orangeci, orangeci, driver_device, 0, ROT0, "Daiichi Denshi", "Orange Club - Maru-hi Ippatsu Kaihou [BET] (Japan 880221)", GAME_SUPPORTS_SAVE ) +GAME( 1988, vipclub, orangec, vipclub, vipclub, driver_device, 0, ROT0, "Daiichi Denshi", "Vip Club - Maru-hi Ippatsu Kaihou [BET] (Japan 880310)", GAME_SUPPORTS_SAVE ) /* pure 12-bit palette */ -GAME( 1988, kaguya, 0, kaguya, kaguya, driver_device, 0, ROT0, "Miki Syouji", "Mahjong Kaguyahime [BET] (Japan 880521)", 0 ) -GAME( 1989, kaguya2, 0, kaguya2, kaguya2, nbmj8688_state, kaguya2, ROT0, "Miki Syouji", "Mahjong Kaguyahime Sono2 [BET] (Japan 890829)", 0 ) -GAME( 1989, kaguya2f, kaguya2, kaguya2, kaguya2, nbmj8688_state, kaguya2, ROT0, "Miki Syouji", "Mahjong Kaguyahime Sono2 Fukkokuban [BET] (Japan 010808)", 0 ) -GAME( 1988, kanatuen, 0, kanatuen, kanatuen, nbmj8688_state, kanatuen, ROT0, "Panac", "Kanatsuen no Onna [BET] (Japan 880905)", 0 ) -GAME( 1988, kyuhito, kanatuen, kyuhito, kyuhito, nbmj8688_state, kyuhito, ROT0, "Roller Tron", "Kyukyoku no Hito [BET] (Japan 880824)", 0 ) -GAME( 1989, idhimitu, 0, idhimitu, idhimitu, nbmj8688_state, idhimitu, ROT0, "Digital Soft", "Idol no Himitsu [BET] (Japan 890304)", 0 ) +GAME( 1988, kaguya, 0, kaguya, kaguya, driver_device, 0, ROT0, "Miki Syouji", "Mahjong Kaguyahime [BET] (Japan 880521)", GAME_SUPPORTS_SAVE ) +GAME( 1989, kaguya2, 0, kaguya2, kaguya2, nbmj8688_state, kaguya2, ROT0, "Miki Syouji", "Mahjong Kaguyahime Sono2 [BET] (Japan 890829)", GAME_SUPPORTS_SAVE ) +GAME( 1989, kaguya2f, kaguya2, kaguya2, kaguya2, nbmj8688_state, kaguya2, ROT0, "Miki Syouji", "Mahjong Kaguyahime Sono2 Fukkokuban [BET] (Japan 010808)", GAME_SUPPORTS_SAVE ) +GAME( 1988, kanatuen, 0, kanatuen, kanatuen, nbmj8688_state, kanatuen, ROT0, "Panac", "Kanatsuen no Onna [BET] (Japan 880905)", GAME_SUPPORTS_SAVE ) +GAME( 1988, kyuhito, kanatuen, kyuhito, kyuhito, nbmj8688_state, kyuhito, ROT0, "Roller Tron", "Kyukyoku no Hito [BET] (Japan 880824)", GAME_SUPPORTS_SAVE ) +GAME( 1989, idhimitu, 0, idhimitu, idhimitu, nbmj8688_state, idhimitu, ROT0, "Digital Soft", "Idol no Himitsu [BET] (Japan 890304)", GAME_SUPPORTS_SAVE ) /* pure 12-bit palette + YM3812 instead of AY-3-8910 */ -GAME( 1988, mjsikaku, 0, mjsikaku, mjsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880908)", 0 ) -GAME( 1988, mjsikakb, mjsikaku, mjsikaku, mjsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880722)", 0 ) -GAME( 1988, mjsikakc, mjsikaku, mjsikaku, mjsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880806)", 0 ) -GAME( 1988, mjsikakd, mjsikaku, mjsikaku, mjsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880802)", 0 ) -GAME( 1988, mmsikaku, mjsikaku, mmsikaku, mmsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku [BET] (Japan 880929)", 0 ) -GAME( 1988, otonano, 0, otonano, otonano, driver_device, 0, ROT0, "Apple", "Otona no Mahjong (Japan 880628)", 0 ) -GAME( 1988, mjcamera, 0, mjcamera, mjcamera, nbmj8688_state, mjcamera, ROT0, "Miki Syouji", "Mahjong Camera Kozou (set 1) (Japan 881109)", 0 ) +GAME( 1988, mjsikaku, 0, mjsikaku, mjsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880908)", GAME_SUPPORTS_SAVE ) +GAME( 1988, mjsikakb, mjsikaku, mjsikaku, mjsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880722)", GAME_SUPPORTS_SAVE ) +GAME( 1988, mjsikakc, mjsikaku, mjsikaku, mjsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880806)", GAME_SUPPORTS_SAVE ) +GAME( 1988, mjsikakd, mjsikaku, mjsikaku, mjsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880802)", GAME_SUPPORTS_SAVE ) +GAME( 1988, mmsikaku, mjsikaku, mmsikaku, mmsikaku, driver_device, 0, ROT0, "Nichibutsu", "Mahjong Shikaku [BET] (Japan 880929)", GAME_SUPPORTS_SAVE ) +GAME( 1988, otonano, 0, otonano, otonano, driver_device, 0, ROT0, "Apple", "Otona no Mahjong (Japan 880628)", GAME_SUPPORTS_SAVE ) +GAME( 1988, mjcamera, 0, mjcamera, mjcamera, nbmj8688_state, mjcamera, ROT0, "Miki Syouji", "Mahjong Camera Kozou (set 1) (Japan 881109)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/nl_breakout.c b/src/mame/drivers/nl_breakout.c new file mode 100644 index 00000000000..f6049f0bccf --- /dev/null +++ b/src/mame/drivers/nl_breakout.c @@ -0,0 +1,1744 @@ +// license:MAME,GPL-2.0+ +// copyright-holders:DICE Team,couriersud +/* + * Changelog: + * - Added discrete paddle potentiometers (couriersud) + * - Changes made to run in MAME (couriersud) + * - Original version imported from DICE + * + * TODO: + * - implement trimmers + * + * The MAME team has asked for and received written confirmation from the + * author of DICE to use, modify and redistribute code under + * a dual licensing scheme: + * + * * The licensing terms of MAME apply to this piece of code for the MAME + * project and derivative works, as defined by the MAME license. You + * may opt to make modifications, improvements or derivative works under + * that same conditions, and the MAME project may opt to keep + * modifications, improvements or derivatives under their terms exclusively. + * + * - Alternatively you can choose to apply the terms of the "GPL" (see + * below) to this - and only this - piece of code or your derivative works. + * Note that in no case your choice can have any impact on any other + * source code of the MAME project, or binary, or executable, be it closely + * or losely related to this piece of code. + * + * - GPL (GNU General Public License) + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * - DICE itself is licensed under version 3 of the GNU General Public License. + * Under no circumstances the exemptions listed above shall apply to any + * other code of DICE not contained in this file. + * + * The following is an extract from the DICE readme. + * + * ---------------------------------------------------------------------------- + * + * DICE is a Discrete Integrated Circuit Emulator. It emulates computer systems + * that lack any type of CPU, consisting only of discrete logic components. + * + * Project Page: http://sourceforge.net/projects/dice/ + * Email: dice.emulator@gmail.com + * + * License + * + * Copyright (C) 2008-2013 DICE Team + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + */ + +/* + * Notes + * FIXME: breakout generates some spurious hsync in the middle of line 27 + * + */ + + +// identify unknown devices in IDE + +#if 1 +#define NETLIST_DEVELOPMENT 0 + +#include "netlist/nl_dice_compat.h" +#include "netlist/devices/net_lib.h" +#include "netlist/analog/nld_twoterm.h" + +#define SLOW_BUT_ACCURATE 0 + +//2 555 timers +static Astable555Desc b2_555_desc(OHM(560.0), M_OHM(1.8), U_FARAD(0.1)); + +static Mono555Desc c9_555_desc(OHM(47000.0), U_FARAD(1.0)); // R33, C21 + +//check these values +//static Paddle1HorizontalDesc pad1_desc(15047.0, 47.0, &c9_555_desc); + +static CapacitorDesc c32_desc(U_FARAD(0.1)); +static CapacitorDesc c36_desc(N_FARAD(1.0)); //0.001uF = 1nF +static CapacitorDesc c37_desc(P_FARAD(330.0)); + +#if 0 +static BufferDesc pad_en_buf_desc(DELAY_NS(15.0), DELAY_NS(15.0)); // Prevents 12ns glitch on PAD_EN_n signal from resetting C9. TODO: is this accurate? +#endif + +#if 0 +static VIDEO_DESC( breakout ) + VIDEO_RESISTANCE(1, K_OHM(0.0)) + VIDEO_RESISTANCE(2, K_OHM(3.9)) + VIDEO_RESISTANCE(3, K_OHM(3.9)) + VIDEO_RESISTANCE(4, K_OHM(3.9)) + VIDEO_RESISTANCE(5, K_OHM(3.9)) + VIDEO_RESISTANCE(6, K_OHM(3.9)) + //VIDEO_RESISTANCE(Video::HBLANK_PIN, K_OHM(0.0)) + VIDEO_ORIENTATION(ROTATE_90) + VIDEO_CONTRAST(4.0) + + // Values guessed based on screenshots. TODO: Make more accurate + // X, Y, W, H, R, G, B + VIDEO_OVERLAY( 15.570e-6, 0.0, 1.911e-6, -1.0, 0.80, 0.15, 0.05 ) // Red Bricks + VIDEO_OVERLAY( 17.481e-6, 0.0, 1.956e-6, -1.0, 0.95, 0.65, 0.05 ) // Amber Bricks + VIDEO_OVERLAY( 19.437e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.25 ) // Green Bricks + VIDEO_OVERLAY( 21.393e-6, 0.0, 1.955e-6, -1.0, 0.95, 0.95, 0.20 ) // Yellow Bricks + VIDEO_OVERLAY( 51.345e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.95 ) // Blue Paddle + + // TODO: Different overlays for cocktail cabinet +VIDEO_DESC_END + +static AUDIO_DESC( breakout ) + AUDIO_RESISTANCE(1, K_OHM(47.0)) + AUDIO_RESISTANCE(2, K_OHM(47.0)) + AUDIO_RESISTANCE(3, K_OHM(47.0)) + AUDIO_RESISTANCE(4, K_OHM(47.0)) + AUDIO_GAIN(3.0) +VIDEO_DESC_END +#endif + +static Mono9602Desc n8_desc(K_OHM(33.0), U_FARAD(100.0), K_OHM(5.6), P_FARAD(0)); // No capacitor on 2nd 9602 +static Mono9602Desc f3_desc(K_OHM(47.0), U_FARAD(1.0), K_OHM(47.0), U_FARAD(1.0)); + +static Mono9602Desc a7_desc(K_OHM(68.0), U_FARAD(1.0), K_OHM(22.0), U_FARAD(10.0)); +static Mono9602Desc a8_desc(K_OHM(27.0), U_FARAD(1.0), K_OHM(27.0), U_FARAD(1.0)); + +#if 0 +static Dipswitch53137Desc dipswitch1_desc("bonus_credit", "Bonus Credit", 3, "None", "100", "200", "300", "400", "500", "600", "700", "800"); +#endif + +//static DipswitchDesc dipswitch2_desc("cabinet_type", "Cabinet Type", 0, "Normal", "Cocktail"); +//static DipswitchDesc dipswitch3_desc("coinage", "Coinage", 0, "1 Coin / 1 Credit", "1 Coin / 2 Credits"); +//static DipswitchDesc dipswitch4_desc("ball_count", "Ball Count", 0, "3", "5"); + +CIRCUIT_LAYOUT( breakout ) +#if 0 + CHIP("S1", 53137, &dipswitch1_desc) + CHIP("S2", DIPSWITCH, &dipswitch2_desc) + CHIP("S3", DIPSWITCH, &dipswitch3_desc) + CHIP("S4", DIPSWITCH, &dipswitch4_desc) +#endif + +#if (SLOW_BUT_ACCURATE) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-8) // less accuracy and diode will not work +#else + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-6) // less accuracy and diode will not work +#endif + //CHIP("CLOCK", CLOCK_14_318_MHZ) + MAINCLOCK(Y1, 14318000.0) + + // DIPSWITCH - Free game + SWITCH(S1_1) + SWITCH(S1_2) + SWITCH(S1_3) + SWITCH(S1_4) + + SWITCH2(COIN1) // Coin 1 + SWITCH2(COIN2) // Coin 2 + + SWITCH(START1) // Start 1 + SWITCH(START2) // Start 2 + + SWITCH(SERVE) // Start 2 + + SWITCH(S2) // Cocktail + SWITCH(S3) // 2 Plays / 25c + SWITCH2(S4) // Three Balls / 5 Balls + + ANALOG_INPUT(V5, 5) + ALIAS(VCC, V5) +//#define VCC "V5", Q +#define GNDD "GND", Q + + //CHIP("Y1", CLOCK_14_318_MHZ) //Y1 + + CHIP_CAPACITOR(C32, &c32_desc) + CHIP_CAPACITOR(C36, &c36_desc) + CHIP_CAPACITOR(C37, &c37_desc) +#if 0 + CHIP("PAD_EN_BUF", BUFFER, &pad_en_buf_desc) +#endif + CHIP("A3", 7474) + CHIP("A4", 7408) + CHIP("A5", 7400) + CHIP("A6", 7474) + CHIP_9602_Mono(A7, &a7_desc) + CHIP_9602_Mono(A8, &a8_desc) + + CHIP_555_Astable(B2, &b2_555_desc) + CHIP("B3", 7402) + CHIP("B4", 9316) + CHIP("B5", 74193) + CHIP("B6", 7400) + CHIP("B7", 9316) + CHIP("B8", 9316) + CHIP("B9", 7408) + + CHIP("C2", 7400) + CHIP("C3", 7400) + CHIP("C4", 7486) + CHIP("C5", 7404) + CHIP("C6", 7486) + CHIP("C7", 9316) + CHIP("C8", 9316) + //CHIP_555_Mono(C9, &c9_555_desc) + NE555_DIP(C9) + CHIP("D2", 7432) + CHIP("D3", 7474) + CHIP("D4", 9316) + CHIP("D5", 7474) + CHIP("D6", 7408) + CHIP("D7", 7411) + CHIP("D8", 7400) +// CHIP("D9", 4016) //quad bilateral switch + + CHIP("E1", 7404) + CHIP("E2", 7486) + CHIP("E3", 7402) + CHIP("E4", 7432) + CHIP("E5", 7408) + CHIP("E6", 7474) + CHIP("E7", 7402) + CHIP("E8", 7474) + CHIP("E9", 7404) + + CHIP("F1", 9316) + CHIP("F2", 7411) + CHIP_9602_Mono(F3, &f3_desc) + CHIP("F4", 7474) + CHIP("F5", 7474) + CHIP("F6", 74193) + CHIP("F7", 74279) + CHIP("F8", 7474) + CHIP("F9", 7404) + + CHIP("H1", 7437) + CHIP("H2", 7408) + CHIP("H3", 7427) + CHIP("H4", 7400) + CHIP("H5", 9312) + CHIP("H6", 9310) + CHIP("H7", 7408) //sometimes looks like N7 on schematic + CHIP("H8", 7474) + CHIP("H9", 7474) + + CHIP("J1", 74175) + CHIP("J2", 7404) + CHIP("J3", 7402) + CHIP("J4", 9312) + CHIP("J5", 7448) + CHIP("J6", 9310) + CHIP("J7", 7420) + CHIP("J8", 74279) + CHIP("J9", 7410) + + CHIP("K1", 9316) + CHIP("K2", 7486) + CHIP("K3", 7430) + CHIP("K4", 7408) + CHIP("K5", 9312) + CHIP("K6", 9310) + CHIP("K7", 7486) + CHIP("K8", 7474) //TODO: one more than bom? + CHIP("K9", 74107) + + CHIP("L1", 9316) + CHIP("L2", 7486) + CHIP("L3", 82S16) //RAM + CHIP("L4", 7411) + CHIP("L5", 9312) + CHIP("L6", 9310) + CHIP("L7", 7486) + CHIP("L8", 74193) + CHIP("L9", 7400) //TODO: 1 more chip than on bom? + + CHIP("M1", 9316) + CHIP("M2", 7483) + CHIP("M3", 7486) + CHIP("M4", 7410) + CHIP("M5", 9312) + CHIP("M6", 9310) + CHIP("M8", 7427) + CHIP("M9", 7404) + + CHIP("N1", 9316) + CHIP("N2", 7483) + CHIP("N3", 7486) + CHIP("N4", 7411) + CHIP("N5", 9312) + CHIP("N6", 9310) + CHIP("N7", 7408) //sometimes looks like H7 on schematic + CHIP_9602_Mono(N8, &n8_desc) + CHIP("N9", 74192) + + //LM380 //speaker amplifier + //LM323 //regulator + +// CHIP("CREDIT_LIGHT1", LAMP) +// CHIP("CREDIT_LIGHT2", LAMP) +// CHIP("SERVE_LIGHT", LAMP) + +#if 0 + CHIP("PAD1", PADDLE1_HORIZONTAL_INPUT, &pad1_desc) + PADDLE_CONNECTION("PAD1", "C9") +#endif + + CHIP_LATCH(LATCH) + //CHIP("COIN1", COIN_INPUT) + //CHIP_INPUT_ACTIVE_LOW(COIN1) + + //CHIP("COIN2", COIN_INPUT) + //CHIP_INPUT_ACTIVE_LOW(COIN2) + + //CHIP("START", START_INPUT) + //CHIP_INPUT_ACTIVE_LOW(START1) + //CHIP_INPUT_ACTIVE_HIGH(START2) + + //CHIP("SERVE", BUTTONS1_INPUT) + //CHIP_INPUT_ACTIVE_LOW(SERVE) // Active low? + + //TODO: start 2 + + //HSYNC and VSYNC + #define H1_d "L1", 14 + #define H2_d "L1", 13 + #define H4_d "L1", 12 + #define H8_d "L1", 11 + #define H8_n "J2", 2 + #define H16_d "K1", 14 + #define H16_n "J2", 6 + #define H32_d "K1", 13 + #define H32_n "J2", 4 + #define H64_d "K1", 12 + #define H128_d "K1", 11 + + #define V1_d "M1", 14 + #define V2_d "M1", 13 + #define V4_d "M1", 12 + #define V8_d "M1", 11 + #define V16_d "N1", 14 + #define V16_n "J2", 10 + #define V32_d "N1", 13 + #define V64_d "N1", 12 + #define V64I "H7", 11 + #define V64_n "M9", 10 + #define V128_d "N1", 11 + + #define H1 "L2", 8 + #define H2 "L2", 11 + #define H4 "L2", 3 + #define H8 "L2", 6 + #define H16 "K2", 8 + #define H32 "K2", 11 + #define H64 "K2", 3 + #define H128 "K2", 6 + + //#define V1 + #define V2 "M3", 3 + #define V4 "M3", 6 + #define V8 "M3", 11 + #define V16 "N3", 8 + #define V32 "N3", 3 + #define V64 "N3", 6 + #define V128 "N3", 11 + + #define HSYNC "J1", 2 + #define HSYNC_n "J1", 3 + #define VSYNC "J1", 7 + #define VSYNC_n "J1", 6 + #define PSYNC "J1", 11 + #define PSYNC_n "J1", 10 + #define BSYNC "J1", 15 + #define BSYNC_n "J1", 14 + + #define BALL "D7", 6 + #define BALL_DISPLAY "A4", 6 + #define PLAYFIELD "H4", 3 + #define SCORE "D3", 5 + #define VERT_TRIG_n "H1", 8 + + #define DICECLOCK "H1", 11 + #define SCLOCK "K1", 15 + #define CKBH "F1", 13 + + #define PAD_n "K3", 8 + #define PAD_EN_n "C2", 8 + + //#define P VCC + #define P "V5", Q + + #define COIN "L9", 6 + #define COIN1_n "F8", 5 + #define COIN2_n "H9", 5 + #define CREDIT_1_OR_2 "L9", 3 + #define CREDIT_1_OR_2_n "F9", 8 + #define CREDIT2 "F9", 6 + #define CREDIT2_n "M8", 8 + #define CR_START1 "E8", 5 + #define CR_START1_n "E8", 6 //Schematic shows E8.6 as positive CR_START1, but this can't be right? + #define CR_START2 "E8", 9 + #define CR_START2_n "E8", 8 + #define CSW1 "F9", 12 + #define CSW2 "F9", 2 + + #define P2_CONDITIONAL "H1", 3 + #define P2_CONDITIONAL_dash "H7", 8 + #define PLAYER_2 "B4", 14 + #define PLAYER_2_n "M9", 8 + + #define START_GAME "D8", 6 + #define START_GAME1_n "M9", 4 + #define START_GAME_n "M9", 6 + + #define BG1_n "K8", 9 + #define BG1 "K8", 8 + #define BG2_n "K8", 5 + #define BG2 "K8", 6 + + #define FREE_GAME_TONE "N7", 3 + #define BONUS_COIN "L9", 11 + + //#define Q "E9", 6 + #define LAT_Q "E9", 6 + #define Q_n "LATCH", 3 + #define SBD_n "D2", 11 + + #define PLAY_CP "D2", 8 + #define PLGM2_n "F7", 7 + #define VB_HIT_n "A5", 6 + + #define SERVE_n "SERVE", 1 + #define SERVE_WAIT "A3", 9 + #define SERVE_WAIT_n "A3", 8 + + #define BRICK_DISPLAY "E3", 1 + #define BRICK_HIT "E6", 5 + #define BRICK_HIT_n "E6", 6 + + //#define EGL "A4", 3 + #define EGL "C37" , 2 + #define EGL_n "C5", 2 + + #define RAM_PLAYER1 "E7", 4 + #define A1 "H6", 14 + #define B1 "H6", 13 + #define C1 "H6", 12 + #define D1 "H6", 11 + #define E1 "J6", 14 + #define F1 "J6", 13 + #define G1 "J6", 12 + #define H01 "J6", 11 + #define I1 "K6", 14 + #define J1 "K6", 13 + #define K1 "K6", 12 + #define L1 "K6", 11 + #define A2 "N6", 14 + #define B2 "N6", 13 + #define C2 "N6", 12 + #define D2 "N6", 11 + #define E2s "M6", 14 + #define F2 "M6", 13 + #define G2 "M6", 12 + #define H02 "M6", 11 //TODO: better name for these signals + #define I2 "L6", 14 + #define J2 "L6", 13 + #define K2 "L6", 12 + #define L2 "L6", 11 + + #define CX0 "C6", 11 + #define CX1 "C6", 6 + #define X0 "C5", 10 + #define X1 "B6", 3 + #define X2 "C6", 3 + #define Y0 "B6", 11 + #define Y1 "B6", 6 + #define Y2 "A6", 6 + #define DN "C4", 3 + #define PC "D4", 12 + #define PD "D4", 11 + #define SU_n "D5", 8 + #define V_SLOW "C5", 8 + + #define PLNR "E3", 4 + #define SCI_n "H4", 6 + #define SFL_n "E9", 12 //score flash + #define TOP_n "E9", 2 + + #define BP_HIT_n "A5", 8 + #define BTB_HIT_n "C3", 3 + + #define SET_BRICKS "D3", 9 + #define SET_BRICKS_n "D3", 8 + + #define BALL_A "B4", 13 + #define BALL_B "B4", 12 + #define BALL_C "B4", 11 + + #define FPD1 "F3", 10 + #define FPD1_n "F3", 9 + #define FPD2 "F3", 6 + #define FPD2_n "F3", 7 + + #define COUNT "N7", 11 + #define COUNT_1 "N7", 8 + #define COUNT_2 "N7", 6 + + #define ATTRACT "E6", 8 + #define ATTRACT_n "E6", 9 + + #define BRICK_SOUND "B8", 14 + #define P_HIT_SOUND "B7", 12 + #define VB_HIT_SOUND "B7", 11 + + #define LH_SIDE "J3", 13 + #define RH_SIDE "H2", 3 + #define TOP_BOUND "K4", 6 + +// CONNECTION(CREDIT_1_OR_2, "CREDIT_LIGHT1", 1) +// CONNECTION(CREDIT2, "CREDIT_LIGHT2", 1) +// CONNECTION(SERVE_WAIT_n, "SERVE_LIGHT", 1) + + //Audio + CONNECTION("M9", 2, "F6", 5) + CONNECTION("M9", 2, "F7", 15) + CONNECTION("F6", 13, "F7", 14) + CONNECTION(START_GAME_n, "F6", 11) + CONNECTION(P, "F6", 15) + CONNECTION(P, "F6", 1) + CONNECTION(P, "F6", 10) + CONNECTION(P, "F6", 9) + CONNECTION(GNDD, "F6", 14) + CONNECTION("F7", 13, "J9", 2) + CONNECTION(VSYNC, "J9", 1) + CONNECTION("A7", 9, "J9", 13) + CONNECTION("J9", 12, "F6", 4) + CONNECTION("J9", 12, "A7", 11) + CONNECTION(GNDD, "A7", 12) + CONNECTION(ATTRACT_n, "A7", 13) + CONNECTION("J9", 12, "A8", 11) + CONNECTION(GNDD, "A8", 12) + CONNECTION(ATTRACT_n, "A8", 13) + CONNECTION(VB_HIT_n, "A7", 5) + CONNECTION(GNDD, "A7", 4) + CONNECTION(ATTRACT_n, "A7", 3) + CONNECTION(BP_HIT_n, "A8", 5) + CONNECTION(GNDD, "A8", 4) + CONNECTION(ATTRACT_n, "A8", 3) + CONNECTION("A8", 6, "B9", 13) + CONNECTION(P_HIT_SOUND, "B9", 12) + CONNECTION("A8", 10, "B9", 10) + CONNECTION(BRICK_SOUND, "B9", 9) + CONNECTION("A7", 6, "B9", 4) + CONNECTION(VB_HIT_SOUND, "B9", 5) + +#if 0 + CONNECTION(GND, "S1", 1) + CONNECTION(P, "S1", 2) + CONNECTION(GND, "S1", 4) + CONNECTION(P, "S1", 3) + CONNECTION(GND, "S1", 12) + CONNECTION(P, "S1", 11) + CONNECTION(GND, "S1", 9) + CONNECTION(P, "S1", 10) +#endif + NET_C(S1_1.1, GND) + NET_C(S1_2.1, GND) + NET_C(S1_3.1, GND) + NET_C(S1_4.1, GND) + + RES(R7, RES_K(2.7)) + RES(R8, RES_K(2.7)) + RES(R9, RES_K(2.7)) + RES(R10, RES_K(2.7)) + + NET_C(R7.1, V5) + NET_C(R8.1, V5) + NET_C(R9.1, V5) + NET_C(R10.1, V5) + + NET_C(S1_1.2, R7.2) + NET_C(S1_2.2, R8.2) + NET_C(S1_3.2, R9.2) + NET_C(S1_4.2, R10.2) + + //Free Game Selector + CONNECTION(I1, "K7", 2) + //CONNECTION("S1", 15, "K7", 1) + CONNECTION("S1_1", 2, "K7", 1) + CONNECTION(J1, "K7", 12) + //CONNECTION("S1", 14, "K7", 13) + CONNECTION("S1_2", 2, "K7", 13) + CONNECTION(K1, "K7", 5) + //CONNECTION("S1", 6, "K7", 4) + CONNECTION("S1_3", 2, "K7", 4) + CONNECTION(L1, "K7", 9) + //CONNECTION("S1", 7, "K7", 10) + CONNECTION("S1_4", 2, "K7", 10) + + CONNECTION(I2, "L7", 2) + //CONNECTION("S1", 15, "L7", 1) + CONNECTION("S1_1", 2, "L7", 1) + CONNECTION(J2, "L7", 12) + //CONNECTION("S1", 14, "L7", 13) + CONNECTION("S1_2", 2, "L7", 13) + CONNECTION(K2, "L7", 5) + //CONNECTION("S1", 6, "L7", 4) + CONNECTION("S1_3", 2, "L7", 4) + CONNECTION(L2, "L7", 9) + //CONNECTION("S1", 7, "L7", 10) + CONNECTION("S1_4", 2, "L7", 10) + + + CONNECTION("K7", 3, "J7", 13) + CONNECTION("K7", 11, "J7", 12) + CONNECTION("K7", 6, "J7", 10) + CONNECTION("K7", 8, "J7", 9) + + CONNECTION("L7", 3, "J7", 1) + CONNECTION("L7", 11, "J7", 2) + CONNECTION("L7", 6, "J7", 4) + CONNECTION("L7", 8, "J7", 5) + + CONNECTION(START_GAME1_n, "J8", 12) + CONNECTION(BG1_n, "J8", 11) + CONNECTION("J7", 8, "J8", 10) + + CONNECTION(START_GAME1_n, "J8", 2) + CONNECTION(BG2_n, "J8", 3) + CONNECTION("J7", 6, "J8", 1) + + CONNECTION("J8", 9, "K8", 12) + CONNECTION(EGL, "K8", 11) + CONNECTION(P, "K8", 13) + CONNECTION(LAT_Q, "K8", 10) + + CONNECTION("J8", 4, "K8", 2) + CONNECTION(EGL, "K8", 3) + CONNECTION(P, "K8", 1) + CONNECTION(LAT_Q, "K8", 4) + + CONNECTION(P, "K9", 8) + CONNECTION("J8", 9, "K9", 9) + CONNECTION(GNDD, "K9", 11) + CONNECTION(HSYNC_n, "K9", 10) + + CONNECTION(P, "K9", 1) + CONNECTION("J8", 4, "K9", 12) + CONNECTION(GNDD, "K9", 4) + CONNECTION(HSYNC_n, "K9", 13) + + CONNECTION("K9", 6, "L9", 12) + CONNECTION("K9", 2, "L9", 13) + + CONNECTION(P, "N8", 5) + CONNECTION(BONUS_COIN, "N8", 4) + CONNECTION(ATTRACT_n, "N8", 3) + + CONNECTION(V4_d, "N7", 2) + CONNECTION("N8", 6, "N7", 1) + // + CONNECTION(GNDD, "M2", 13) + CONNECTION(V1_d, "M2", 10) + CONNECTION(V2_d, "M2", 8) + CONNECTION(V4_d, "M2", 3) + CONNECTION(V8_d, "M2", 1) + CONNECTION(GNDD, "M2", 11) + CONNECTION(P2_CONDITIONAL, "M2", 7) + CONNECTION(GNDD, "M2", 4) + CONNECTION(GNDD, "M2", 16) + + CONNECTION("M2", 14, "N2", 13) + CONNECTION(V16_d, "N2", 10) + CONNECTION(V32_d, "N2", 8) + CONNECTION(V64_d, "N2", 3) + CONNECTION(V128_d, "N2", 1) + CONNECTION(GNDD, "N2", 11) + CONNECTION(P2_CONDITIONAL, "N2", 7) + CONNECTION(GNDD, "N2", 4) + CONNECTION(GNDD, "N2", 16) + + CONNECTION("M2", 6, "M3", 2) + CONNECTION(P2_CONDITIONAL, "M3", 1) + CONNECTION("M2", 2, "M3", 5) + CONNECTION(P2_CONDITIONAL, "M3", 4) + CONNECTION("M2", 15, "M3", 12) + CONNECTION(P2_CONDITIONAL, "M3", 13) + + CONNECTION(P2_CONDITIONAL, "N3", 10) + CONNECTION("N2", 9, "N3", 9) + CONNECTION(P2_CONDITIONAL, "N3", 1) + CONNECTION("N2", 6, "N3", 2) + CONNECTION(P2_CONDITIONAL, "N3", 4) + CONNECTION("N2", 2, "N3", 5) + CONNECTION(P2_CONDITIONAL, "N3", 13) + CONNECTION("N2", 15, "N3", 12) + + CONNECTION(H1_d, "L2", 9) + CONNECTION(P2_CONDITIONAL, "L2", 10) + CONNECTION(H2_d, "L2", 12) + CONNECTION(P2_CONDITIONAL, "L2", 13) + CONNECTION(H4_d, "L2", 2) + CONNECTION(P2_CONDITIONAL, "L2", 1) + CONNECTION(H8_d, "L2", 5) + CONNECTION(P2_CONDITIONAL, "L2", 4) + + CONNECTION(P2_CONDITIONAL, "K2", 10) + CONNECTION(H16_d, "K2", 9) + CONNECTION(P2_CONDITIONAL, "K2", 13) + CONNECTION(H32_d, "K2", 12) + CONNECTION(P2_CONDITIONAL, "K2", 1) + CONNECTION(H64_d, "K2", 2) + CONNECTION(P2_CONDITIONAL, "K2", 4) + CONNECTION(H128_d, "K2", 5) + + + CONNECTION(V64, "M9", 11) + CONNECTION(H16, "J2", 5) + CONNECTION(H32, "J2", 3) + CONNECTION(V16, "J2", 11) + CONNECTION(H8, "J2", 1) + + CONNECTION(DICECLOCK, "J1", 9) + CONNECTION(SCLOCK, "J1", 4) + CONNECTION("N4", 6, "J1", 5) + CONNECTION(PAD_n, "J1", 12) + CONNECTION(BALL_DISPLAY, "J1", 13) + CONNECTION(P, "J1", 1) + + CONNECTION(P, "K1", 1) + CONNECTION(P, "K1", 3) + CONNECTION(P, "K1", 4) + CONNECTION(P, "K1", 5) + CONNECTION(P, "K1", 6) + CONNECTION(P, "K1", 9) + CONNECTION(P, "K1", 10) + CONNECTION(DICECLOCK, "K1", 2) + CONNECTION("L1", 15, "K1", 7) + + CONNECTION(P, "L1", 1) + CONNECTION(P, "L1", 3) + CONNECTION(GNDD, "L1", 4) + CONNECTION(P, "L1", 5) + CONNECTION(GNDD, "L1", 6) + CONNECTION(VERT_TRIG_n, "L1", 9) + CONNECTION(P, "L1", 10) + CONNECTION(DICECLOCK, "L1", 2) + CONNECTION(P, "L1", 7) + + CONNECTION(P, "N1", 1) + CONNECTION(P, "N1", 10) + CONNECTION(P, "N1", 3) + CONNECTION(P, "N1", 4) + CONNECTION(P, "N1", 5) + CONNECTION(P, "N1", 6) + CONNECTION(P, "N1", 9) + CONNECTION(DICECLOCK, "N1", 2) + CONNECTION("H2", 6, "N1", 7) + + CONNECTION("M1", 15, "H2", 5) + CONNECTION("L1", 15, "H2", 4) + + CONNECTION(V128_d, "N4", 5) + CONNECTION(V64_d, "N4", 3) + CONNECTION(V32_d, "N4", 4) + CONNECTION("N4", 6, "H1", 10) + CONNECTION(VSYNC_n, "H1", 9) + + CONNECTION(P, "M1", 1) + CONNECTION(GNDD, "M1", 3) + CONNECTION(GNDD, "M1", 4) + CONNECTION(P, "M1", 5) + CONNECTION(GNDD, "M1", 6) + CONNECTION(VERT_TRIG_n, "M1", 9) + CONNECTION(DICECLOCK, "M1", 2) + CONNECTION("L1", 15, "M1", 7) + CONNECTION("K1", 15, "M1", 10) + + + //9312 circuit + CONNECTION(PLAYER_2, "M9", 9) + CONNECTION(BALL_A, "C5", 5) + CONNECTION(BALL_A, "C4", 13) + CONNECTION(BALL_B, "C4", 12) + CONNECTION(BALL_A, "A4", 13) + CONNECTION(BALL_B, "A4", 12) + CONNECTION(BALL_C, "C4", 10) + CONNECTION("A4", 11, "C4", 9) + + CONNECTION(A2, "N5", 1) + CONNECTION(E2s, "N5", 2) + CONNECTION(I2, "N5", 3) + CONNECTION("C5", 6, "N5", 4) + CONNECTION(A1, "N5", 5) + CONNECTION(E1, "N5", 6) + CONNECTION(I1, "N5", 7) + CONNECTION(PLAYER_2_n, "N5", 9) + CONNECTION(H32_n, "N5", 10) + CONNECTION(V16, "N5", 11) + CONNECTION(V64, "N5", 12) + CONNECTION(V128, "N5", 13) + + CONNECTION(B2, "M5", 1) + CONNECTION(F2, "M5", 2) + CONNECTION(J2, "M5", 3) + CONNECTION("C4", 11, "M5", 4) + CONNECTION(B1, "M5", 5) + CONNECTION(F1, "M5", 6) + CONNECTION(J1, "M5", 7) + CONNECTION(PLAYER_2, "M5", 9) + CONNECTION(H32_n, "M5", 10) + CONNECTION(V16, "M5", 11) + CONNECTION(V64, "M5", 12) + CONNECTION(V128, "M5", 13) + + CONNECTION(C2, "L5", 1) + CONNECTION(G2, "L5", 2) + CONNECTION(K2, "L5", 3) + CONNECTION("C4", 8, "L5", 4) + CONNECTION(C1, "L5", 5) + CONNECTION(G1, "L5", 6) + CONNECTION(K1, "L5", 7) + CONNECTION(GNDD, "L5", 9) + CONNECTION(H32_n, "L5", 10) + CONNECTION(V16, "L5", 11) + CONNECTION(V64, "L5", 12) + CONNECTION(V128, "L5", 13) + + CONNECTION(D2, "K5", 1) + CONNECTION(H02, "K5", 2) + CONNECTION(L2, "K5", 3) + CONNECTION(GNDD, "K5", 4) + CONNECTION(D1, "K5", 5) + CONNECTION(H01, "K5", 6) + CONNECTION(L1, "K5", 7) + CONNECTION(GNDD, "K5", 9) + CONNECTION(H32_n, "K5", 10) + CONNECTION(V16, "K5", 11) + CONNECTION(V64, "K5", 12) + CONNECTION(V128, "K5", 13) + + CONNECTION(P, "J5", 4) + CONNECTION(P, "J5", 3) + CONNECTION("N5", 15, "J5", 7) + CONNECTION("M5", 15, "J5", 1) + CONNECTION("L5", 15, "J5", 2) + CONNECTION("K5", 15, "J5", 6) + CONNECTION(H32, "J5", 5) + + CONNECTION("J5", 13, "H5", 1) + CONNECTION(GNDD, "H5", 2) + CONNECTION(GNDD, "H5", 3) + CONNECTION("J5", 14, "H5", 4) + CONNECTION(GNDD, "H5", 5) + CONNECTION(GNDD, "H5", 6) + CONNECTION("J5", 10, "H5", 7) + CONNECTION(GNDD, "H5", 9) + + CONNECTION(V4, "K4", 12) + CONNECTION(V8, "K4", 13) + + CONNECTION("K4", 11, "H5", 10) + CONNECTION(H2, "H5", 11) + CONNECTION(H4, "H5", 12) + CONNECTION(H8, "H5", 13) + + CONNECTION(H2, "L4", 3) + CONNECTION(H4, "L4", 5) + CONNECTION(H8, "L4", 4) + + CONNECTION("J5", 12 , "J4", 1) + CONNECTION("J5", 11, "J4", 2) + CONNECTION(GNDD, "J4", 3) + CONNECTION(GNDD, "J4", 4) + CONNECTION("J5", 15, "J4", 5) + CONNECTION("J5", 9, "J4", 6) + CONNECTION(GNDD, "J4", 7) + CONNECTION(GNDD, "J4", 9) + CONNECTION("L4", 6, "J4", 10) + CONNECTION(H8, "J4", 11) + CONNECTION(V4, "J4", 12) + CONNECTION(V8, "J4", 13) + + CONNECTION("H5", 14, "H4", 13) + CONNECTION("J4", 14, "H4", 12) + + //PADDLES + CONNECTION(ATTRACT_n, "B2", 4) + + CONNECTION("B2", 3, "E9", 13) + CONNECTION(PLAYER_2_n, "M3", 9) + CONNECTION(V128, "M3", 10) + CONNECTION(H64, "J3", 8) + CONNECTION(H128, "J3", 9) + CONNECTION(V32, "E3", 5) + CONNECTION(V16_n, "E3", 6) + + CONNECTION(SFL_n, "M8", 1) + CONNECTION("M3", 8, "M8", 2) + CONNECTION(PLNR, "M8", 13) + CONNECTION("J3", 10, "E9", 1) + CONNECTION(V64, "E2", 5) + CONNECTION(V32, "E2", 4) + CONNECTION(PLNR, "E2", 10) + CONNECTION(H16, "E2", 9) + + CONNECTION("M8", 12, "M8", 3) + CONNECTION(TOP_n, "M8", 4) + CONNECTION(TOP_n, "M8", 5) + CONNECTION("H4", 11, "F2", 11) + CONNECTION("E2", 6, "F2", 10) + CONNECTION("E2", 8, "F2", 9) + + CONNECTION("M8", 6, "H4", 5) + CONNECTION("F2", 8, "H4", 4) + +#if 0 + CONNECTION(PAD_EN_n, "PAD_EN_BUF", 1) + + CONNECTION("PAD_EN_BUF", 2, "C9", 4) + CONNECTION("PAD_EN_BUF", 2, "C9", 2) +#else + // NOTE: Stabilizing CAP C20 not modelled. + CONNECTION(PAD_EN_n, "C9", 4) + CONNECTION(PAD_EN_n, "C9", 2) + NET_C(C9.8, V5) + NET_C(C9.1, GND) + RES(R53, RES_K(12)) // 12k + CAP(C21, CAP_U(1)) + NET_C(GND, C21.2, R53.2) + NET_C(C21.1, R53.1, C9.6, C9.7) + +#endif + + CONNECTION(BTB_HIT_n, "C5", 3) + CONNECTION(P, "F5", 10) + CONNECTION(P, "F5", 12) + CONNECTION("C5", 4, "F5", 11) + CONNECTION(SERVE_WAIT_n, "F5", 13) + CONNECTION(H64, "E5", 13) + CONNECTION("F5", 9, "E5", 12) + CONNECTION(H128, "E5", 10) + CONNECTION("F5", 8, "E5", 9) + CONNECTION("E5", 11, "E4", 12) + CONNECTION("E5", 8, "E4", 13) + CONNECTION("E4", 11, "D4", 2) + CONNECTION(P, "D4", 3) + CONNECTION(P, "D4", 4) + CONNECTION(P, "D4", 5) + CONNECTION(P, "D4", 6) + CONNECTION(P, "D4", 9) + CONNECTION(P, "D4", 10) + CONNECTION("C3", 11, "D4", 7) + CONNECTION(VSYNC_n, "D4", 1) + + CONNECTION("D4", 15, "E4", 10) + CONNECTION("H7", 6, "E4", 9) + CONNECTION("C9", 3, "H7", 5) + CONNECTION(PAD_EN_n, "H7", 4) + CONNECTION("E4", 8, "C3", 12) + CONNECTION(ATTRACT_n, "C3", 13) + CONNECTION(H8, "J3", 2) + CONNECTION(H32, "J3", 3) + + CONNECTION("C3", 11, "K3", 12) + CONNECTION(H128, "K3", 5) + CONNECTION(H64, "K3", 6) + CONNECTION(H16, "K3", 11) + CONNECTION(H4, "K3", 4) + CONNECTION("J3", 1, "K3", 1) + CONNECTION(P, "K3", 3) + CONNECTION(P, "K3", 2) + + CONNECTION(V16_d, "D7", 1) + CONNECTION(V64_d, "D7", 13) + CONNECTION(V128_d, "D7", 2) + CONNECTION("D7", 12, "H1", 4) + CONNECTION(V8_d, "H1", 5) + CONNECTION("H1", 6, "C2", 4) + CONNECTION("H1", 6, "C2", 5) + CONNECTION(V32_d, "J2", 9) + CONNECTION("J2", 8, "C2", 10) + CONNECTION("C2", 6, "C2", 9) + + + //SCORE + CONNECTION(SCI_n, "D3", 4) + CONNECTION(GNDD, "D3", 2) + CONNECTION(GNDD, "D3", 3) + CONNECTION(GNDD, "D3", 1) + + //PLAYER2_CONDITIONAL + CONNECTION(PLAYER_2, "H7", 10) +#if 0 + CONNECTION(GNDD, "S2", 1) + CONNECTION(P, "S2", 2) + CONNECTION("S2", 3, "H7", 9) +#else + NET_C(S2.2, GND) + NET_C(S2.1, H7.9) + RES(R18, RES_K(1)) + NET_C(R18.2, V5) + NET_C(R18.1, S2.1) +#endif + + //A-L 1 and 2 + CONNECTION(SET_BRICKS_n, "B3", 2) + CONNECTION(H2, "B3", 3) + CONNECTION("B3", 1, "E7", 6) + CONNECTION(PLAYER_2, "E7", 5) + CONNECTION(P, "N6", 9) + CONNECTION(P, "M6", 9) + CONNECTION(P, "L6", 9) + CONNECTION(P, "H6", 9) + CONNECTION(P, "J6", 9) + CONNECTION(P, "K6", 9) + + CONNECTION(P, "N6", 10) + CONNECTION(PLAYER_2, "N6", 7) + CONNECTION(COUNT_2, "N6", 2) + CONNECTION(START_GAME_n, "N6", 1) + + CONNECTION("N6", 15, "M6", 10) + CONNECTION(PLAYER_2, "M6", 7) + CONNECTION(COUNT_2, "M6", 2) + CONNECTION(START_GAME_n, "M6", 1) + + CONNECTION("M6", 15, "L6", 10) + CONNECTION(PLAYER_2, "L6", 7) + CONNECTION(COUNT_2, "L6", 2) + CONNECTION(START_GAME_n, "L6", 1) + + CONNECTION(P, "H6", 10) + CONNECTION(RAM_PLAYER1, "H6", 7) + CONNECTION(COUNT_1, "H6", 2) + CONNECTION(START_GAME_n, "H6", 1) + + CONNECTION("H6", 15, "J6", 10) + CONNECTION(RAM_PLAYER1, "J6", 7) + CONNECTION(COUNT_1, "J6", 2) + CONNECTION(START_GAME_n, "J6", 1) + + CONNECTION("J6", 15, "K6", 10) + CONNECTION(RAM_PLAYER1, "K6", 7) + CONNECTION(COUNT_1, "K6", 2) + CONNECTION(START_GAME_n, "K6", 1) + + + //CX0 and CX1 + CONNECTION(BRICK_HIT, "H2", 9) + CONNECTION(H16_n, "H2", 10) + CONNECTION(P, "D5", 10) + CONNECTION(P, "D5", 12) + CONNECTION("H2", 8, "D5", 11) + CONNECTION(SERVE_WAIT_n, "D5", 13) + CONNECTION(X0, "C6", 13) + CONNECTION("D5", 9, "C6", 12) + CONNECTION("D5", 9, "D6", 12) + CONNECTION(DN, "D6", 13) + CONNECTION("D6", 11, "C6", 4) + CONNECTION(X1, "C6", 5) + + //COUNT1 and COUNT2 + CONNECTION(P, "N8", 11) + CONNECTION(BRICK_HIT, "N8", 12) + CONNECTION(ATTRACT_n, "N8", 13) + CONNECTION("N8", 9, "N9", 11) + CONNECTION(P, "N9", 15) + CONNECTION(P, "N9", 5) + + CONNECTION(COUNT, "N9", 4) + CONNECTION(START_GAME, "N9", 14) + CONNECTION(H8_n, "N9", 1) + CONNECTION(H16_n, "N9", 10) + CONNECTION(GNDD, "N9", 9) + + CONNECTION("N9", 13, "N7", 13) + CONNECTION(SCLOCK, "N7", 12) + + CONNECTION(PLAYER_2, "N7", 5) + CONNECTION(COUNT, "N7", 4) + + CONNECTION(COUNT, "M9", 1) + CONNECTION(COUNT, "N7", 10) + CONNECTION(RAM_PLAYER1, "N7", 9) + + + //Ball Logic + CONNECTION(P, "C7", 1) + CONNECTION(P, "C7", 10) + CONNECTION(P, "C7", 7) + CONNECTION(CX0, "C7", 3) + CONNECTION(CX1, "C7", 4) + CONNECTION(X2, "C7", 5) + CONNECTION(GNDD, "C7", 6) + CONNECTION("D8", 8, "C7", 9) + CONNECTION("C7", 15, "C8", 7) + CONNECTION("C7", 11, "C8", 10) + CONNECTION("C7", 12, "D7", 10) + CONNECTION("C7", 13, "D7", 11) + CONNECTION(DICECLOCK, "C7", 2) + + CONNECTION(P, "C8", 1) + CONNECTION(P, "C8", 3) + CONNECTION(P, "C8", 4) + CONNECTION(P, "C8", 5) + CONNECTION(P, "C8", 6) + CONNECTION(P, "C8", 9) + CONNECTION(DICECLOCK, "C8", 2) + CONNECTION("C8", 15, "B7", 7) + CONNECTION("C7", 15, "B7", 10) + + CONNECTION(P, "B7", 1) + CONNECTION(Y0, "B7", 3) + CONNECTION(Y1, "B7", 4) + CONNECTION(Y2, "B7", 5) + CONNECTION(GNDD, "B7", 6) + CONNECTION("D8", 8, "B7", 9) + CONNECTION(DICECLOCK, "B7", 2) + CONNECTION("B7", 15, "B8", 7) + + CONNECTION(VB_HIT_SOUND, "D7", 9) + + CONNECTION(P, "B8", 1) + CONNECTION(P, "B8", 3) + CONNECTION(P, "B8", 4) + CONNECTION(P, "B8", 5) + CONNECTION(P, "B8", 6) + CONNECTION(P, "B8", 9) + CONNECTION("C8", 15, "B8", 10) + CONNECTION(DICECLOCK, "B8", 2) + + CONNECTION("B8", 15, "D8", 10) + CONNECTION("B7", 15, "D8", 9) + + CONNECTION("D7", 8, "D7", 5) + CONNECTION(P_HIT_SOUND, "D7", 4) + CONNECTION("B8", 15, "D7", 3) + + //Clock Generator + CONNECTION(CKBH, "H1", 12) + CONNECTION("F1", 14, "H1", 13) + CONNECTION("F1", 15, "E1", 5) + + CONNECTION(P, "F1", 1) + CONNECTION(P, "F1", 7) + CONNECTION(P, "F1", 10) + CONNECTION(GNDD, "F1", 3) + CONNECTION(P, "F1", 4) + CONNECTION(GNDD, "F1", 5) + CONNECTION(GNDD, "F1", 6) + CONNECTION("E1", 6, "F1", 9) + + //CONNECTION("Y1", 1, "F1", 2) + NET_C(Y1.Q, F1.2) + + // RH and LH Sides + CONNECTION(V128, "N4", 1) + CONNECTION(V64, "N4", 2) + CONNECTION(V16, "N4", 13) + CONNECTION("N4", 12, "N4", 11) + CONNECTION(V8, "N4", 10) + CONNECTION(V4, "N4", 9) + CONNECTION("N4", 8, "H2", 2) + CONNECTION(V32, "H2", 1) + CONNECTION("N4", 8, "J2", 13) + CONNECTION("J2", 12, "J3", 11) + CONNECTION(V32, "J3", 12) + + // Top Bound + CONNECTION(H128, "H3", 4) + CONNECTION(H64, "H3", 5) + CONNECTION(H32, "H3", 3) + CONNECTION("H3", 6, "L4", 9) + CONNECTION(H16, "L4", 10) + CONNECTION(H8, "L4", 11) + CONNECTION("L4", 8, "K4", 5) + CONNECTION(VSYNC_n, "K4", 4) + + //Cabinet type + + // Coin Circuit + CONNECTION("COIN1", 2, "F9", 13) + CONNECTION("COIN1", 1, "F9", 11) + NET_C(COIN1.Q, GND) + + //CONNECTION(CSW1, "F9", 11) + CONNECTION(CSW1, "COIN1", 1) + + //CONNECTION("F9", 10, "F9", 13) //TODO: causes lots of bouncing, commented out since this trace is not implemented in gotcha + CONNECTION("F9", 10, "COIN1", 2) //TODO: causes lots of bouncing, commented out since this trace is not implemented in gotcha + + CONNECTION(V64, "H7", 12) + CONNECTION(V64, "H7", 13) + + CONNECTION(CSW1, "F8", 10) + CONNECTION("F9", 10, "F8", 12) + CONNECTION(V64I, "F8", 11) + CONNECTION(P, "F8", 13) + CONNECTION(P, "F8", 1) + CONNECTION(V64I, "F8", 3) + CONNECTION("F8", 9, "F8", 2) + CONNECTION(CSW1, "F8", 4) + + CONNECTION("F8", 6, "H8", 12) + CONNECTION(P, "H8", 10) + CONNECTION(V16_d, "H8", 11) + CONNECTION(P, "H8", 13) + CONNECTION("H8", 9, "J8", 15) + CONNECTION("H8", 9, "J9", 9) + CONNECTION(V16_d, "J8", 14) + CONNECTION("J8", 13, "J9", 10) + +#if 0 + CONNECTION(P, "S3", 1) + CONNECTION(V4_d, "S3", 2) + CONNECTION("S3", 3, "J9", 11) +#else + CONNECTION(V4_d, "S3", 1) + CONNECTION("S3", 2, "J9", 11) + RES(R15, RES_K(1)) + NET_C(R15.1, V5) + NET_C(R15.2, S3.2) +#endif + + CONNECTION("J9", 8, "L9", 5) + CONNECTION("J9", 6, "L9", 4) + + //COIN2 circuit + //CONNECTION("COIN2", 1, "F9", 1) + //CONNECTION(GNDD, "F9", 1) //TODO: coin2 not implemented + + CONNECTION("COIN2", 2, "F9", 1) + CONNECTION("COIN2", 1, "F9", 3) + NET_C(COIN2.Q, GND) + + CONNECTION(CSW2, "COIN2", 1) + CONNECTION(CSW2, "H9", 10) + CONNECTION("F9", 4, "H9", 12) + CONNECTION("F9", 4, "COIN2", 2) + CONNECTION(V64_n, "H9", 11) + CONNECTION(V64_n, "H9", 3) + CONNECTION(P, "H9", 13) + CONNECTION("H9", 9, "H9", 2) + CONNECTION(CSW2, "H9", 4) + CONNECTION(P, "H9", 1) + + CONNECTION(P, "H8", 4) + CONNECTION("H9", 6, "H8", 2) + CONNECTION(V16_d, "H8", 3) + CONNECTION(P, "H8", 1) + CONNECTION("H8", 5, "J8", 6) + CONNECTION(V16_d, "J8", 5) + CONNECTION(P, "J9", 3) + CONNECTION("H8", 5, "J9", 5) + CONNECTION("J8", 7, "J9", 4) + + CONNECTION(P2_CONDITIONAL_dash, "E9", 9) + CONNECTION("E9", 8, "H1", 1) + CONNECTION("E9", 8, "H1", 2) + + //Start2 Input + //Start1 Input + RES(R58, RES_K(1)) + //CONNECTION("START", 2, "E9", 11) + NET_C(START2.2, GND) + NET_C(R58.1, V5) + NET_C(START2.1, R58.2, E9.11) + + CONNECTION("E9", 10, "E8", 12) + CONNECTION(P, "E8", 10) + CONNECTION(V64I, "E8", 11) + + CONNECTION(V128_d, "F7", 2) + CONNECTION(V128_d, "F7", 3) + CONNECTION(CREDIT2_n, "F7", 1) + CONNECTION(ATTRACT_n, "E7", 12) + CONNECTION("F7", 4, "E7", 11) + CONNECTION("E7", 13, "E8", 13) + + //Start1 Input + RES(R57, RES_K(1)) + //CONNECTION("START", 1, "E9", 3) + NET_C(START1.2, GND) + NET_C(R57.1, V5) + NET_C(START1.1, R57.2, E9.3) + CONNECTION("E9", 4, "E8", 2) + CONNECTION(P, "E8", 4) + CONNECTION(V64_d, "E8", 3) + + + CONNECTION(CREDIT_1_OR_2_n, "E7", 2) + CONNECTION(ATTRACT_n, "E7", 3) + CONNECTION("E7", 1, "E8", 1) + + CONNECTION(CR_START1_n, "D8", 4) // Schematic shows CR_START1 ? + CONNECTION(CR_START2_n, "D8", 5) + + + CONNECTION(START_GAME, "M9", 3) + CONNECTION(START_GAME, "M9", 5) + + CONNECTION(V32, "D6", 4) + CONNECTION(ATTRACT, "D6", 5) + CONNECTION(P, "E6", 10) + CONNECTION(START_GAME, "E6", 12) + CONNECTION("D6", 6, "E6", 11) + CONNECTION("D6", 3, "E6", 13) + + //TODO: hows this whole latch stuff work? what about Q_n going to COIN1_n and COIN2_n + CONNECTION(CREDIT_1_OR_2_n, "D8", 13) + CONNECTION(EGL, "D8", 12) + CONNECTION("LATCH", 1, "D8", 11) //set + CONNECTION("LATCH", 2, COIN1_n) //reset + //CONNECTION("LATCH", 3, COIN2_n) //set //TODO: coin2 here + CONNECTION( "LATCH", 3, "E9", 5) //output + + + CONNECTION(LAT_Q, "D6", 1) + CONNECTION(EGL_n, "D6", 2) + + //Serve + + RES(R30, RES_K(1)) + NET_C(SERVE.2, GND) + NET_C(SERVE.1, R30.2) + NET_C(R30.1, V5) + + CONNECTION(H64, "J3", 6) + CONNECTION(H32, "J3", 5) + CONNECTION("J3", 4, "L4", 13) + CONNECTION(H128, "L4", 2) + CONNECTION(H16, "L4", 1) + + CONNECTION(BALL_DISPLAY, "H2", 13) + CONNECTION(H128, "H2", 12) + CONNECTION("H2", 11, "C3", 9) + CONNECTION(HSYNC, "C3", 10) + CONNECTION("C3", 8, "B3", 5) + CONNECTION(H8_d, "B3", 6) + CONNECTION("B3", 4, "C3", 4) + CONNECTION(H4, "C3", 5) + CONNECTION("C3", 6, "A4", 9) + CONNECTION(START_GAME1_n, "A4", 10) + + CONNECTION(SERVE_WAIT_n, "D2", 13) + + CONNECTION(SERVE_n, "D2", 12) + CONNECTION(SERVE_n, "A3", 4) + CONNECTION(P, "A3", 2) + CONNECTION(ATTRACT, "A3", 3) + CONNECTION(SERVE_WAIT, "A3", 1) + + CONNECTION(BALL, "E1", 13) + CONNECTION("E1", 12, "B3", 8) + CONNECTION("A3", 6, "B3", 9) + CONNECTION("B3", 10, "B3", 11) + CONNECTION(SERVE_WAIT_n, "B3", 12) + CONNECTION("B3", 13, "A3", 12) + CONNECTION("A4", 8, "A3", 10) + CONNECTION("L4", 12, "A3", 11) + CONNECTION(P, "A3", 13) + + //Set Bricks + CONNECTION(P, "D3", 10) + CONNECTION(P, "D3", 12) + CONNECTION(START_GAME, "D3", 11) + CONNECTION(SERVE_n, "D3", 13) + + //Playfield + CONNECTION(LH_SIDE, "H3", 1) + CONNECTION(TOP_BOUND, "H3", 13) + CONNECTION(RH_SIDE, "H3", 2) + CONNECTION("H3", 12, "H4", 2) + CONNECTION("E1", 2, "C36", 1) + CONNECTION("C36", 2, "H4", 1) + + CONNECTION(BALL_DISPLAY, "A5", 10) + CONNECTION(PSYNC, "A5", 9) + CONNECTION(BSYNC, "C3", 2) + CONNECTION(TOP_BOUND, "C3", 1) + + CONNECTION(PC, "C4", 4) + CONNECTION(PD, "C4", 5) + CONNECTION(BP_HIT_n, "C5", 13) + CONNECTION(PD, "A5", 1) + CONNECTION("C5", 12, "A5", 2) + CONNECTION(BSYNC, "A5", 5) + CONNECTION(VSYNC, "A5", 4) + + CONNECTION("C5", 12, "A5", 13) + CONNECTION("A5", 3, "A5", 12) + + CONNECTION(BRICK_HIT, "D5", 3) + CONNECTION("E5", 3, "D5", 1) + CONNECTION("D5", 6, "D5", 2) + CONNECTION(BP_HIT_n, "D5", 4) + + CONNECTION(P, "A6", 10) + CONNECTION("C4", 6, "A6", 12) + CONNECTION(BP_HIT_n, "A6", 11) + CONNECTION(P, "A6", 13) + + CONNECTION("A5", 3, "A6", 4) + CONNECTION(V16_d, "A6", 2) + CONNECTION(VB_HIT_n, "A6", 3) + CONNECTION("A5", 11, "A6", 1) + + CONNECTION(P2_CONDITIONAL, "C6", 1) + CONNECTION("D5", 5, "C6", 2) + CONNECTION("D5", 6, "C4", 2) + CONNECTION(P2_CONDITIONAL, "C4", 1) + + CONNECTION(V_SLOW, "B6", 12) + CONNECTION("A6", 8, "B6", 13) + CONNECTION(V_SLOW, "C6", 10) + CONNECTION("A6", 5, "C6", 9) + + CONNECTION(Y0, "B6", 4) + CONNECTION("C6", 8, "B6", 5) + + CONNECTION(X2, "D6", 10) + CONNECTION("B6", 8, "D6", 9) + CONNECTION("B5", 7, "B6", 9) + CONNECTION("B5", 6, "B6", 10) + CONNECTION(X0, "B6", 1) + CONNECTION(X2, "B6", 2) + + CONNECTION("B5", 6, "C5", 11) + CONNECTION("B5", 7, "C5", 9) + + CONNECTION(SU_n, "B5", 11) + CONNECTION(P, "B5", 15) + CONNECTION(P, "B5", 1) + CONNECTION(P, "B5", 10) + CONNECTION(P, "B5", 9) + CONNECTION(P, "B5", 4) + CONNECTION("D6", 8, "B5", 5) + CONNECTION(SERVE_WAIT, "B5", 14) + + CONNECTION(BTB_HIT_n, "E5", 1) + CONNECTION(SBD_n, "E5", 2) + + CONNECTION(BP_HIT_n, "E5", 4) + CONNECTION(BTB_HIT_n, "E5", 5) + CONNECTION("E5", 6, "F7", 11) + CONNECTION("E5", 6, "F7", 12) + CONNECTION(BRICK_HIT_n, "F7", 10) + CONNECTION("F7", 9, "C2", 2) + CONNECTION(BALL_DISPLAY, "C2", 1) + CONNECTION("L3", 6, "E3", 11) + CONNECTION("C2", 3, "E3", 12) + + CONNECTION(SET_BRICKS_n, "E6", 4) + CONNECTION("E3", 13, "E6", 2) + CONNECTION(CKBH, "E6", 3) + CONNECTION("E3", 13, "D2", 2) + CONNECTION(SET_BRICKS, "D2", 1) + CONNECTION("D2", 3, "E6", 1) + + CONNECTION(BRICK_DISPLAY, "E1", 1) + CONNECTION(H1, "K4", 9) + CONNECTION(H2, "K4", 10) + CONNECTION("K4", 8, "E3", 2) + CONNECTION("L3", 6, "E3", 3) + + CONNECTION(ATTRACT_n, "C2", 13) + CONNECTION(SET_BRICKS_n, "C2", 12) + CONNECTION("C2", 11, "H3", 10) + CONNECTION(FPD1, "H3", 9) + CONNECTION(FPD2, "H3", 11) + CONNECTION("H3", 8, "E1", 3) + CONNECTION("E1", 4, "C32", 1) + CONNECTION("C32", 2, "L3", 13) + CONNECTION(H4, "L3", 2) + CONNECTION(H8, "L3", 1) + CONNECTION(H16, "L3", 15) + CONNECTION(V32, "L3", 14) + CONNECTION(V64, "L3", 7) + CONNECTION(V128, "L3", 9) + CONNECTION(V16, "L3", 10) + CONNECTION(RAM_PLAYER1, "L3", 11) + CONNECTION(H32, "L3", 3) + CONNECTION(H128, "L3", 4) + CONNECTION("H4", 8, "L3", 5) + + CONNECTION(V2, "M4", 5) + CONNECTION(V4, "M4", 4) + CONNECTION(V8, "M4", 3) + CONNECTION("M4", 6, "H4", 9) + CONNECTION(VSYNC_n, "K4", 2) + CONNECTION(H64, "K4", 1) + CONNECTION("K4", 3, "H4", 10) + CONNECTION(FPD1_n, "F2", 13) + CONNECTION(BRICK_HIT_n, "F2", 2) + CONNECTION(FPD2_n, "F2", 1) + + CONNECTION("F2", 12, "L3", 12) + + //FPD circuits + CONNECTION(K2, "M4", 2) + CONNECTION(G2, "M4", 13) + CONNECTION(D2, "M4", 1) + CONNECTION(K1, "M4", 9) + CONNECTION(G1, "M4", 10) + CONNECTION(D1, "M4", 11) + CONNECTION(BP_HIT_n, "E4", 2) + CONNECTION("M4", 12, "E4", 1) + CONNECTION(BP_HIT_n, "E4", 4) + CONNECTION("M4", 8, "E4", 5) + + CONNECTION(P, "F4", 4) + CONNECTION(P, "F4", 2) + CONNECTION("E4", 3, "F4", 3) + CONNECTION(START_GAME1_n, "F4", 1) + + CONNECTION(P, "F4", 10) + CONNECTION(P, "F4", 12) + CONNECTION("E4", 6, "F4", 11) + CONNECTION(START_GAME1_n, "F4", 13) + + CONNECTION("F4", 6, "F3", 5) + CONNECTION(GNDD, "F3", 4) + CONNECTION("F4", 8, "F3", 11) + CONNECTION(GNDD, "F3", 12) + + CONNECTION(P, "F3", 3) + CONNECTION(P, "F3", 13) + + + //CREDIT_COUNTER + CONNECTION(BONUS_COIN, "E7", 8) + CONNECTION(COIN, "E7", 9) + CONNECTION(CR_START1_n, "H7", 2) + CONNECTION(V8, "D8", 1) + CONNECTION(CR_START2, "D8", 2) + CONNECTION("D8", 3, "H7", 1) + + CONNECTION("L8", 12, "L8", 11) // not on schematic, on rollover load 16, keeps you from losing all credits + CONNECTION(P, "L8", 15) + CONNECTION(P, "L8", 1) + CONNECTION(P, "L8", 10) + CONNECTION(P, "L8", 9) + CONNECTION("E7", 10, "L8", 5) + CONNECTION("H7", 3, "L8", 4) + + CONNECTION(LAT_Q, "L9", 10) + CONNECTION("L8", 13, "L9", 9) + CONNECTION("L9", 8, "L8", 14) + CONNECTION("L8", 7, "M8", 9) + CONNECTION("L8", 6, "M8", 10) + CONNECTION("L8", 2, "M8", 11) + CONNECTION("L8", 3, "M9", 13) + + CONNECTION(CREDIT2_n, "F9", 5) + CONNECTION(CREDIT2_n, "L9", 2) + CONNECTION("M9", 12, "L9", 1) + CONNECTION(CREDIT_1_OR_2, "F9", 9) + + //PLGM2_n + CONNECTION(CR_START1_n, "F7", 6) + CONNECTION(CR_START2_n, "F7", 5) + + //PLAY_CP + CONNECTION(PLGM2_n, "F2", 5) + CONNECTION(PLAYER_2, "F2", 4) + CONNECTION(H1, "F2", 3) + + CONNECTION(P, "F5", 4) + CONNECTION(P, "F5", 2) + CONNECTION(SERVE_WAIT, "F5", 3) + CONNECTION(H128, "F5", 1) + CONNECTION("F2", 6, "D2", 9) + CONNECTION("F5", 5, "D2", 10) + + //EGL + CONNECTION(P, "B4", 10) + CONNECTION(P, "B4", 7) + CONNECTION(P, "B4", 9) + CONNECTION(PLAY_CP, "B4", 2) + + CONNECTION(EGL, "C5", 1) + + + + CONNECTION(START_GAME1_n, "B4", 1) + CONNECTION(BALL_A, "A4", 2) + CONNECTION(BALL_B, "S4", 1) // Three balls + CONNECTION(BALL_C, "S4", 2) // Five balls + //CONNECTION("S4", 3, "A4", 1) + NET_C(S4.Q, A4.1) + CONNECTION("A4", 3, "C37", 1) + + CONNECTION(SERVE_WAIT_n, "A4", 5) + CONNECTION(BALL, "A4", 4) + + // Ball Circuit + + + // Video Summing + CONNECTION(V16_d, "D2", 4) + CONNECTION(V8_d, "D2", 5) + CONNECTION("D2", 6, "E3", 8) + CONNECTION(VSYNC_n, "E3", 9) + CONNECTION(HSYNC_n, "E2", 12) + CONNECTION("E3", 10, "E2", 13) + CONNECTION(PSYNC, "B9", 1) + CONNECTION(VSYNC_n, "B9", 2) + +#if 0 + //CONNECTION("VIDEO", 1, "E2", 11) + CONNECTION("VIDEO", 2, PLAYFIELD) + CONNECTION("VIDEO", 3, BSYNC) + CONNECTION("VIDEO", 4, SCORE) + CONNECTION("VIDEO", 5, "B9", 3) + //CONNECTION("VIDEO", 6, P) + + CONNECTION("VIDEO", Video::HBLANK_PIN, HSYNC) + CONNECTION("VIDEO", Video::VBLANK_PIN, "E3", 10) +#else + // VIDEO SUMMING + RES(R41, RES_K(3.9)) + //RES(R42, RES_K(3.9)) + RES(R42, RES_K(3.9)) + RES(R43, RES_K(3.9)) + RES(R51, RES_K(3.9)) + RES(R52, RES_K(3.9)) + +#if (SLOW_BUT_ACCURATE) + DIODE(CR6, "1N914") + NET_C(E2.11, CR6.K) + + NET_C(CR6.A, R41.1, R42.1, R43.1, R51.1, R52.1) +#else + RES_SWITCH(CR6, E2.11, R41.1, GND) + PARAM(CR6.RON, 1e20) + PARAM(CR6.ROFF, 1) + NET_C(R41.1, R42.1, R43.1, R51.1, R52.1) +#endif + CONNECTION("R51", 2, PLAYFIELD) + CONNECTION("R43", 2, BSYNC) + CONNECTION("R52", 2, SCORE) + NET_C(R41.2, B9.3) + NET_C(R42.2, V5) + + ALIAS(videomix, R41.1) + +#endif + +#if 0 + // Audio Summing + CONNECTION("AUDIO", 1, "B9", 11) + CONNECTION("AUDIO", 2, "B9", 8) + CONNECTION("AUDIO", 3, FREE_GAME_TONE) + CONNECTION("AUDIO", 4, "B9", 6) +#else + RES(R36, RES_K(47)) + RES(R37, RES_K(47)) + RES(R38, RES_K(47)) + RES(R39, RES_K(47)) + CONNECTION("R36", 2, "B9", 11) + CONNECTION("R38", 2, "B9", 8) + CONNECTION("R39", 2, FREE_GAME_TONE) + CONNECTION("R37", 2, "B9", 6) + NET_C(R36.1, R37.1, R38.1, R39.1) + ALIAS(sound, R36.1) + +#endif + + /* Not connected pins */ + + NET_C(ttlhigh, B4.3, B4.4, B4.5, B4.6) + NET_C(ttlhigh, N6.3, N6.4, N6.5, N6.6) + NET_C(ttlhigh, M6.3, M6.4, M6.5, M6.6) + NET_C(ttlhigh, L6.3, L6.4, L6.5, L6.6) + + NET_C(ttlhigh, H6.3, H6.4, H6.5, H6.6) + NET_C(ttlhigh, K6.3, K6.4, K6.5, K6.6) + NET_C(ttlhigh, J6.3, J6.4, J6.5, J6.6) + + NET_C(ttlhigh, E1.9, E1.11) + NET_C(ttlhigh, E2.1, E2.2) + +#ifdef DEBUG + // RAM access + /*CONNECTION("LOG1", 3, H4) //A + CONNECTION("LOG1", 4, H8) //B + CONNECTION("LOG1", 5, H16) //C + CONNECTION("LOG1", 6, V32) //D + CONNECTION("LOG1", 7, V64) //E + CONNECTION("LOG1", 8, V128) //F + CONNECTION("LOG1", 9, V16) //G + CONNECTION("LOG1", 10, RAM_PLAYER1) //H + CONNECTION("LOG1", 11, H32) //I + CONNECTION("LOG1", 12, H128) //J + CONNECTION("LOG1", 13, "H4", 8) //K + CONNECTION("LOG1", 14, "E1", 4) //L + CONNECTION("LOG1", 15, "F2", 12) //M + CONNECTION("LOG1", 16, "L3", 6)*/ //N +#endif + + // POTS + POT2(POTP1, RES_K(5)) // 5k + PARAM(POTP1.DIALLOG, 1) // Log Dial ... + PARAM(POTP1.REVERSE, 1) // Log Dial ... + NET_C(POTP1.1, V5) + + POT2(POTP2, RES_K(5)) // 5k + PARAM(POTP2.DIALLOG, 1) // Log Dial ... + PARAM(POTP2.REVERSE, 1) // Log Dial ... + NET_C(POTP2.1, V5) + + RES(R33, 47) + + CD_4016_DIP(D9) + NET_C(D9.7, GND) + NET_C(D9.14, V5) + + CONNECTION(P2_CONDITIONAL_dash, "D9", 6) + NET_C(D9.12, E9.8) + NET_C(D9.8, POTP2.2) // Connect P2 dial here + NET_C(D9.11, POTP1.2) + + NET_C(D9.9, D9.10, R33.1) + NET_C(R33.2, C9.6) + + NET_C(GND, D9.1, D9.2, D9.13, D9.3, D9.4, D9.5) +CIRCUIT_LAYOUT_END + +#endif diff --git a/src/mame/drivers/nl_pong.c b/src/mame/drivers/nl_pong.c index 40975b5026e..ca8bd6ab740 100644 --- a/src/mame/drivers/nl_pong.c +++ b/src/mame/drivers/nl_pong.c @@ -9,6 +9,7 @@ NETLIST_START(pong_fast) SOLVER(Solver, 48000) + PARAM(Solver.PARALLEL, 0) // Don't do parallel solvers PARAM(Solver.ACCURACY, 1e-4) // works and is sufficient PARAM(Solver.LTE, 1e-4) // Default is not enough for paddle control if using LTE diff --git a/src/mame/drivers/pcat_nit.c b/src/mame/drivers/pcat_nit.c index 3b995e8e8e0..3a459122f1c 100644 --- a/src/mame/drivers/pcat_nit.c +++ b/src/mame/drivers/pcat_nit.c @@ -88,7 +88,7 @@ Smitdogg #include "machine/pcshare.h" #include "machine/ins8250.h" #include "machine/microtch.h" -#include "video/pc_vga.h" +#include "video/clgd542x.h" #include "machine/nvram.h" class pcat_nit_state : public pcat_base_state diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index edd2a909879..fa327b65a21 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -5658,10 +5658,10 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus) ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */ ROM_REGION( 0x020000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2399.u72", 0x00000, 0x8000, CRC(0424f4ba) SHA1(c8b192a6f63c8c9937cb3923d27b9ba2c39823cd) ) /* Custom The Fun Ships card backs */ - ROM_LOAD( "mgo-cg2399.u73", 0x08000, 0x8000, CRC(5848a2fa) SHA1(4173a473016b7a776d2b59bf3ded0be35bd43721) ) /* Also compatible with ACE$ Bonus Poker */ - ROM_LOAD( "mbo-cg2399.u74", 0x10000, 0x8000, CRC(5c3e16f6) SHA1(a4aa457f239527bffa6472e0d6f9d836f796b326) ) - ROM_LOAD( "mxo-cg2399.u75", 0x18000, 0x8000, CRC(bd7669d5) SHA1(4343a9764fd563e2e1cdd8558f2f53f77006b159) ) + ROM_LOAD( "mro-cg2399.u77", 0x00000, 0x8000, CRC(0424f4ba) SHA1(c8b192a6f63c8c9937cb3923d27b9ba2c39823cd) ) /* Custom The Fun Ships card backs */ + ROM_LOAD( "mgo-cg2399.u78", 0x08000, 0x8000, CRC(5848a2fa) SHA1(4173a473016b7a776d2b59bf3ded0be35bd43721) ) /* Also compatible with ACE$ Bonus Poker */ + ROM_LOAD( "mbo-cg2399.u79", 0x10000, 0x8000, CRC(5c3e16f6) SHA1(a4aa457f239527bffa6472e0d6f9d836f796b326) ) + ROM_LOAD( "mxo-cg2399.u80", 0x18000, 0x8000, CRC(bd7669d5) SHA1(4343a9764fd563e2e1cdd8558f2f53f77006b159) ) ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "capx2399.u43", 0x0000, 0x0200, NO_DUMP ) /* Should be CAPX2399 */ @@ -5684,10 +5684,10 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus) ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */ ROM_REGION( 0x020000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2374.u72", 0x00000, 0x8000, CRC(ceeb714d) SHA1(6de908d04bcaa243195943affa9ad0d725de5c81) ) /* Custom Horseshoe Casino card backs */ - ROM_LOAD( "mgo-cg2374.u73", 0x08000, 0x8000, CRC(d0fabad5) SHA1(438ebe074fa3eaa3073ef042f481449f416d0665) ) - ROM_LOAD( "mbo-cg2374.u74", 0x10000, 0x8000, CRC(9a0fbc8d) SHA1(aa39f47cbeaf8218fd2d753c9a350e9eab5df5d3) ) - ROM_LOAD( "mxo-cg2374.u75", 0x18000, 0x8000, CRC(99814562) SHA1(2d8e132f4cc4edd06332c0327927219513b22832) ) + ROM_LOAD( "mro-cg2374.u77", 0x00000, 0x8000, CRC(ceeb714d) SHA1(6de908d04bcaa243195943affa9ad0d725de5c81) ) /* Custom Horseshoe Casino card backs */ + ROM_LOAD( "mgo-cg2374.u78", 0x08000, 0x8000, CRC(d0fabad5) SHA1(438ebe074fa3eaa3073ef042f481449f416d0665) ) + ROM_LOAD( "mbo-cg2374.u79", 0x10000, 0x8000, CRC(9a0fbc8d) SHA1(aa39f47cbeaf8218fd2d753c9a350e9eab5df5d3) ) + ROM_LOAD( "mxo-cg2374.u80", 0x18000, 0x8000, CRC(99814562) SHA1(2d8e132f4cc4edd06332c0327927219513b22832) ) ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "capx2374.u43", 0x0000, 0x0200, CRC(f922e1b8) SHA1(4aa5291c59431c022dc0561a6e3b38209f60286a) ) @@ -5709,10 +5709,10 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus) ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */ ROM_REGION( 0x020000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2389.u72", 0x00000, 0x8000, CRC(912d639f) SHA1(f66f5db847816754c4f1fbeb1171c4e6c1331039) ) /* The Wild Wild West Casino card backs */ - ROM_LOAD( "mgo-cg2389.u73", 0x08000, 0x8000, CRC(87de1a4e) SHA1(4f8524eba297771d3292dd2fca9008546d0e3066) ) - ROM_LOAD( "mbo-cg2389.u74", 0x10000, 0x8000, CRC(7c248712) SHA1(4c2cfd7f46fa757438706095137ccf230c30f3a4) ) - ROM_LOAD( "mxo-cg2389.u75", 0x18000, 0x8000, CRC(4fdb7daf) SHA1(131d0a5c33f75f859522a4307c0e23273d5d4cb6) ) + ROM_LOAD( "mro-cg2389.u77", 0x00000, 0x8000, CRC(912d639f) SHA1(f66f5db847816754c4f1fbeb1171c4e6c1331039) ) /* The Wild Wild West Casino card backs */ + ROM_LOAD( "mgo-cg2389.u78", 0x08000, 0x8000, CRC(87de1a4e) SHA1(4f8524eba297771d3292dd2fca9008546d0e3066) ) + ROM_LOAD( "mbo-cg2389.u79", 0x10000, 0x8000, CRC(7c248712) SHA1(4c2cfd7f46fa757438706095137ccf230c30f3a4) ) + ROM_LOAD( "mxo-cg2389.u80", 0x18000, 0x8000, CRC(4fdb7daf) SHA1(131d0a5c33f75f859522a4307c0e23273d5d4cb6) ) ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "capx2389.u43", 0x0000, 0x0200, NO_DUMP ) /* Should be CAPX2389, but 2 PCBs had CAPX1321 */ @@ -7876,10 +7876,10 @@ SA$ - Sequential ACE$ pays the same as RF ROM_LOAD( "x002172p.u66", 0x00000, 0x10000, CRC(d4c44409) SHA1(8082b76a51fa131751b8c2c446cb29fb04f531dc) ) /* Ace$ Bonus Poker - 05/09/96 @ IGT L96-1119 */ ROM_REGION( 0x020000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2399.u72", 0x00000, 0x8000, CRC(0424f4ba) SHA1(c8b192a6f63c8c9937cb3923d27b9ba2c39823cd) ) /* Custom The Fun Ships card backs */ - ROM_LOAD( "mgo-cg2399.u73", 0x08000, 0x8000, CRC(5848a2fa) SHA1(4173a473016b7a776d2b59bf3ded0be35bd43721) ) /* Also compatible with ACE$ Bonus Poker */ - ROM_LOAD( "mbo-cg2399.u74", 0x10000, 0x8000, CRC(5c3e16f6) SHA1(a4aa457f239527bffa6472e0d6f9d836f796b326) ) - ROM_LOAD( "mxo-cg2399.u75", 0x18000, 0x8000, CRC(bd7669d5) SHA1(4343a9764fd563e2e1cdd8558f2f53f77006b159) ) + ROM_LOAD( "mro-cg2399.u77", 0x00000, 0x8000, CRC(0424f4ba) SHA1(c8b192a6f63c8c9937cb3923d27b9ba2c39823cd) ) /* Custom The Fun Ships card backs */ + ROM_LOAD( "mgo-cg2399.u78", 0x08000, 0x8000, CRC(5848a2fa) SHA1(4173a473016b7a776d2b59bf3ded0be35bd43721) ) /* Also compatible with ACE$ Bonus Poker */ + ROM_LOAD( "mbo-cg2399.u79", 0x10000, 0x8000, CRC(5c3e16f6) SHA1(a4aa457f239527bffa6472e0d6f9d836f796b326) ) + ROM_LOAD( "mxo-cg2399.u80", 0x18000, 0x8000, CRC(bd7669d5) SHA1(4343a9764fd563e2e1cdd8558f2f53f77006b159) ) ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "capx2399.u43", 0x0000, 0x0200, NO_DUMP ) /* Should be CAPX2399 */ @@ -7909,7 +7909,7 @@ SA$ - Sequential ACE$ pays the same as RF ROM_LOAD( "mgo-cg2172.u78", 0x08000, 0x8000, CRC(fff049bc) SHA1(d4b340e0c932db767cade56a55b649c80750fee4) ) ROM_LOAD( "mbo-cg2172.u79", 0x10000, 0x8000, CRC(1665c6be) SHA1(4650b9d8336434ce531c31b63e7780b47ef4e985) ) ROM_LOAD( "mxo-cg2172.u80", 0x18000, 0x8000, CRC(cc9d64e4) SHA1(4bf78e49150ca6fb4a05f3320f712bbbabcacf56) ) - + ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "capx2172.u43", 0x0000, 0x0200, CRC(c9b4f1da) SHA1(c911da564cfb33218441de0f91e67a02191d76c2) ) /* Philips N82S147N */ ROM_END @@ -8487,10 +8487,10 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4K 4A SF RF (Bonus) ROM_LOAD( "x002377p.u66", 0x00000, 0x10000, CRC(541320d2) SHA1(670b17432e994fe1937091e5e96e1d58b9afbf29) ) /* Super Double Bonus Poker */ ROM_REGION( 0x020000, "gfx1", 0 ) - ROM_LOAD( "mro-cg2244.u72", 0x00000, 0x8000, CRC(25561458) SHA1(fe5d624e0e16956df589f3682bad9181bdc99956) ) /* */ - ROM_LOAD( "mgo-cg2244.u73", 0x08000, 0x8000, CRC(b2de0a7a) SHA1(34f0ef951560f6f71e14c822baa4ccb1028b5028) ) - ROM_LOAD( "mbo-cg2244.u74", 0x10000, 0x8000, CRC(d2c12418) SHA1(dfb1aebaac23ff6e2cf556f228dbdb7c272a1b30) ) - ROM_LOAD( "mxo-cg2244.u75", 0x18000, 0x8000, CRC(8dc10a99) SHA1(92edb31f44e52609ed1ba2a53577048d424c6238) ) + ROM_LOAD( "mro-cg2244.u77", 0x00000, 0x8000, CRC(25561458) SHA1(fe5d624e0e16956df589f3682bad9181bdc99956) ) /* */ + ROM_LOAD( "mgo-cg2244.u78", 0x08000, 0x8000, CRC(b2de0a7a) SHA1(34f0ef951560f6f71e14c822baa4ccb1028b5028) ) + ROM_LOAD( "mbo-cg2244.u79", 0x10000, 0x8000, CRC(d2c12418) SHA1(dfb1aebaac23ff6e2cf556f228dbdb7c272a1b30) ) + ROM_LOAD( "mxo-cg2244.u80", 0x18000, 0x8000, CRC(8dc10a99) SHA1(92edb31f44e52609ed1ba2a53577048d424c6238) ) ROM_REGION( 0x200, "proms", 0 ) ROM_LOAD( "capx1321.u43", 0x0000, 0x0200, CRC(4b57569f) SHA1(fa29c0f627e7ce79951ec6dadec114864144f37d) ) diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index 2b4f7637638..15b5af8e4a2 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -4263,10 +4263,10 @@ GAME( 2001, ddp2101c, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, GAME( 2001, ddp2100c, ddp2, pgm_arm_type2, pgm, pgm_arm_type2_state, ddp2, ROT270, "IGS", "DoDonPachi II - Bee Storm (China, ver. 100)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) -// japan region only? service mode calls it Dragon World 2001 so I'm leaving that title in the description +// japan region only? service mode calls it Dragon World 2001 so I'm leaving that title in the description GAME( 2001, dw2001, pgm, pgm_arm_type2, dw2001, pgm_arm_type2_state, dw2001, ROT0, "IGS", "Chuugokuryuu 2001 [Dragon World 2001] (V100?, Japan)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 02/21/01 16:05:16 -// japan region only? service mode calls it Dragon World Pretty Chance so I'm leaving that title in the description +// japan region only? service mode calls it Dragon World Pretty Chance so I'm leaving that title in the description GAME( 2001, dwpc, pgm, pgm_arm_type2, dw2001, pgm_arm_type2_state, dwpc, ROT0, "IGS", "Chuugokuryuu Pretty Chance [Dragon World Pretty Chance] (V101, Japan)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 09/26/01 10:23:26 // we bypass the internal ARM rom on these, ideally it should still be dumped tho! the region screens show a blank string where the internal ROM revision would otherwise be displayed diff --git a/src/mame/drivers/pong.c b/src/mame/drivers/pong.c index 76c12c26ccb..44505e17c54 100644 --- a/src/mame/drivers/pong.c +++ b/src/mame/drivers/pong.c @@ -17,6 +17,8 @@ TODO: please see netlist include files #include "sound/dac.h" #include "video/fixfreq.h" +#include "breakout.lh" + /* * H count width to 512 * Reset at 1C6 = 454 @@ -42,22 +44,34 @@ TODO: please see netlist include files */ #define MASTER_CLOCK 7159000 -#define V_TOTAL (0x105+1) // 262 -#define H_TOTAL (0x1C6+1) // 454 +#define V_TOTAL_PONG (0x105+1) // 262 +#define H_TOTAL_PONG (0x1C6+1) // 454 -#define HBSTART (H_TOTAL) -#define HBEND (80) -#define VBSTART (V_TOTAL) -#define VBEND (16) +/* + * Breakout's H1 signal: + * + * __ _ __ _ __ _ + * | |__| |__| |__| |__| |__| |_ + * 2 2 1 2 2 2 1 2 2 2 1 + * + * ==> Pixel width is 2:2:1:2:2:1:2:2 ..... + * + * 4 Pixels = 7 cycles ==> 256 / 4 * 7 = 448 + * + * 7 cycles ==> 14 Y1 cycles + * + */ + +#define MASTER_CLOCK_BREAKOUT (14318000 / 2) + +#define V_TOTAL_BREAKOUT (0xFC) // 252 +#define H_TOTAL_BREAKOUT (448) // 448 #if 0 -fixedfreq_interface fixedfreq_mode_pongX2 = { - MASTER_CLOCK * 2, - (H_TOTAL-67) * 2, (H_TOTAL-40) * 2, (H_TOTAL-8) * 2, (H_TOTAL) * 2, - V_TOTAL-22,V_TOTAL-19,V_TOTAL-16,V_TOTAL, - 1, /* non-interlaced */ - 0.31 -}; +#define HBSTART (H_TOTAL_PONG) +#define HBEND (80) +#define VBSTART (V_TOTAL_PONG) +#define VBEND (16) #endif enum input_changed_enum @@ -70,30 +84,19 @@ enum input_changed_enum IC_VR2 }; -#if 0 -#include "nl_pongd.inc" - -#undef SRST -#undef VCC -#undef GND - -#include "nl_pong.inc" -#endif - NETLIST_EXTERNAL(pongdoubles); NETLIST_EXTERNAL(pong_fast); +NETLIST_EXTERNAL(breakout); -class pong_state : public driver_device +class ttl_mono_state : public driver_device { public: - pong_state(const machine_config &mconfig, device_type type, const char *tag) + ttl_mono_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_video(*this, "fixfreq"), - m_dac(*this, "dac"), /* just to have a sound device */ - m_sw1a(*this, "maincpu:sw1a"), - m_sw1b(*this, "maincpu:sw1b") + m_dac(*this, "dac") /* just to have a sound device */ { } @@ -102,14 +105,6 @@ public: required_device<fixedfreq_device> m_video; required_device<dac_device> m_dac; /* just to have a sound device */ - // sub devices - required_device<netlist_mame_logic_input_t> m_sw1a; - required_device<netlist_mame_logic_input_t> m_sw1b; - - //UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - DECLARE_INPUT_CHANGED_MEMBER(input_changed); - NETDEV_ANALOG_CALLBACK_MEMBER(sound_cb) { //printf("snd %f\n", newval); @@ -120,34 +115,66 @@ public: protected: // driver_device overrides - virtual void machine_start(); - virtual void machine_reset(); + virtual void machine_start() { }; + virtual void machine_reset() { }; - virtual void video_start(); + virtual void video_start() { }; private: }; -static NETLIST_START(pong) +class pong_state : public ttl_mono_state +{ +public: + pong_state(const machine_config &mconfig, device_type type, const char *tag) + : ttl_mono_state(mconfig, type, tag), + m_sw1a(*this, "maincpu:sw1a"), + m_sw1b(*this, "maincpu:sw1b") + { + } - NETLIST_MEMREGION("maincpu") + // sub devices + required_device<netlist_mame_logic_input_t> m_sw1a; + required_device<netlist_mame_logic_input_t> m_sw1b; -NETLIST_END() + DECLARE_INPUT_CHANGED_MEMBER(input_changed); -void pong_state::machine_start() -{ -} +protected: -void pong_state::machine_reset() -{ -} + // driver_device overrides + virtual void machine_start() { }; + virtual void machine_reset() { }; + virtual void video_start() { }; + +private: +}; -void pong_state::video_start() +class breakout_state : public ttl_mono_state { -} +public: + breakout_state(const machine_config &mconfig, device_type type, const char *tag) + : ttl_mono_state(mconfig, type, tag) + { + } +protected: + + // driver_device overrides + virtual void machine_start() { }; + virtual void machine_reset() { }; + virtual void video_start() { }; + +private: + +}; + +static NETLIST_START(pong) + + NETLIST_MEMREGION("maincpu") + +NETLIST_END() INPUT_CHANGED_MEMBER(pong_state::input_changed) { @@ -216,6 +243,42 @@ static INPUT_PORTS_START( pongd ) #endif INPUT_PORTS_END +static INPUT_PORTS_START( breakout ) + + PORT_START( "PADDLE0" ) /* fake input port for player 1 paddle */ + PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(1) PORT_KEYDELTA(200) PORT_CENTERDELTA(0) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot1") + + PORT_START( "PADDLE1" ) /* fake input port for player 2 paddle */ + PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(1) PORT_KEYDELTA(200) PORT_CENTERDELTA(0) PORT_PLAYER(2) NETLIST_ANALOG_PORT_CHANGED("maincpu", "pot2") + + PORT_START("IN0") /* fake as well */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "coinsw1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "coinsw2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "startsw1") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "startsw2") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) NETLIST_LOGIC_PORT_CHANGED("maincpu", "servesw") + + PORT_START("DIPS") + PORT_DIPNAME( 0x01, 0x00, "Balls" ) PORT_DIPLOCATION("SW4:1") NETLIST_LOGIC_PORT_CHANGED("maincpu", "sw4") + PORT_DIPSETTING( 0x00, "3" ) + PORT_DIPSETTING( 0x01, "5" ) + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW3:1") NETLIST_LOGIC_PORT_CHANGED("maincpu", "sw3") + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1") NETLIST_LOGIC_PORT_CHANGED("maincpu", "sw2") + PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Upright ) ) + +#if 0 + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Antenna") NETLIST_LOGIC_PORT_CHANGED("maincpu", "antenna") + + PORT_START("VR1") + PORT_ADJUSTER( 50, "VR1 - 50k, Paddle 1 adjustment" ) NETLIST_ANALOG_PORT_CHANGED("maincpu", "vr0") + PORT_START("VR2") + PORT_ADJUSTER( 50, "VR2 - 50k, Paddle 2 adjustment" ) NETLIST_ANALOG_PORT_CHANGED("maincpu", "vr1") +#endif +INPUT_PORTS_END + static MACHINE_CONFIG_START( pong, pong_state ) /* basic machine hardware */ @@ -239,8 +302,8 @@ static MACHINE_CONFIG_START( pong, pong_state ) /* video hardware */ MCFG_FIXFREQ_ADD("fixfreq", "screen") MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) - MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-40,H_TOTAL-8,H_TOTAL) - MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL_PONG-67,H_TOTAL_PONG-40,H_TOTAL_PONG-8,H_TOTAL_PONG) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL_PONG-22,V_TOTAL_PONG-19,V_TOTAL_PONG-12,V_TOTAL_PONG) MCFG_FIXFREQ_FIELDCOUNT(1) MCFG_FIXFREQ_SYNC_THRESHOLD(0.31) @@ -251,6 +314,53 @@ static MACHINE_CONFIG_START( pong, pong_state ) MACHINE_CONFIG_END +static MACHINE_CONFIG_START( breakout, breakout_state ) + + /* basic machine hardware */ + MCFG_DEVICE_ADD("maincpu", NETLIST_CPU, NETLIST_CLOCK) + MCFG_NETLIST_SETUP(breakout) +#if 0 + MCFG_NETLIST_ANALOG_INPUT("maincpu", "vr0", "ic_b9_R.R") + MCFG_NETLIST_ANALOG_MULT_OFFSET(1.0 / 100.0 * RES_K(50), RES_K(56) ) + MCFG_NETLIST_ANALOG_INPUT("maincpu", "vr1", "ic_a9_R.R") + MCFG_NETLIST_ANALOG_MULT_OFFSET(1.0 / 100.0 * RES_K(50), RES_K(56) ) + MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot0", "ic_b9_POT.DIAL") + MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot1", "ic_a9_POT.DIAL") + MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw1a", "sw1a.POS", 0, 0x01) + MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw1b", "sw1b.POS", 0, 0x01) +#endif + MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot1", "POTP1.DIAL") + MCFG_NETLIST_ANALOG_INPUT("maincpu", "pot2", "POTP2.DIAL") + MCFG_NETLIST_LOGIC_INPUT("maincpu", "coinsw1", "COIN1.POS", 0, 0x01) + MCFG_NETLIST_LOGIC_INPUT("maincpu", "coinsw2", "COIN2.POS", 0, 0x01) + MCFG_NETLIST_LOGIC_INPUT("maincpu", "startsw1", "START1.POS", 0, 0x01) + MCFG_NETLIST_LOGIC_INPUT("maincpu", "startsw2", "START2.POS", 0, 0x01) + MCFG_NETLIST_LOGIC_INPUT("maincpu", "servesw", "SERVE.POS", 0, 0x01) + MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw4", "S4.POS", 0, 0x01) + MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw3", "S3.POS", 0, 0x01) + MCFG_NETLIST_LOGIC_INPUT("maincpu", "sw2", "S2.POS", 0, 0x01) +#if 0 + MCFG_NETLIST_LOGIC_INPUT("maincpu", "antenna", "antenna.IN", 0, 0x01) +#endif + MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "snd0", "sound", breakout_state, sound_cb, "") + MCFG_NETLIST_ANALOG_OUTPUT("maincpu", "vid0", "videomix", fixedfreq_device, update_vid, "fixfreq") + + /* video hardware */ + MCFG_FIXFREQ_ADD("fixfreq", "screen") + MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK_BREAKOUT) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL_BREAKOUT-67,H_TOTAL_BREAKOUT-40,H_TOTAL_BREAKOUT-8, H_TOTAL_BREAKOUT) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL_BREAKOUT-22,V_TOTAL_BREAKOUT-22,V_TOTAL_BREAKOUT-4, V_TOTAL_BREAKOUT) + MCFG_FIXFREQ_FIELDCOUNT(1) + MCFG_FIXFREQ_SYNC_THRESHOLD(1.2) + MCFG_FIXFREQ_GAIN(0.5) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("dac", DAC, 48000) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + +MACHINE_CONFIG_END + static MACHINE_CONFIG_DERIVED( pongf, pong ) /* basic machine hardware */ @@ -289,8 +399,8 @@ static MACHINE_CONFIG_START( pongd, pong_state ) /* video hardware */ MCFG_FIXFREQ_ADD("fixfreq", "screen") MCFG_FIXFREQ_MONITOR_CLOCK(MASTER_CLOCK) - MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL-67,H_TOTAL-52,H_TOTAL-8,H_TOTAL) - MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL-22,V_TOTAL-19,V_TOTAL-12,V_TOTAL) + MCFG_FIXFREQ_HORZ_PARAMS(H_TOTAL_PONG-67,H_TOTAL_PONG-52,H_TOTAL_PONG-8,H_TOTAL_PONG) + MCFG_FIXFREQ_VERT_PARAMS(V_TOTAL_PONG-22,V_TOTAL_PONG-19,V_TOTAL_PONG-12,V_TOTAL_PONG) MCFG_FIXFREQ_FIELDCOUNT(1) MCFG_FIXFREQ_SYNC_THRESHOLD(0.31) @@ -312,6 +422,10 @@ ROM_START( pong ) /* dummy to satisfy game entry*/ ROM_LOAD( "pong.netlist", 0x000000, 0x00457f, CRC(72d5e4fe) SHA1(7bb15828223c34915c5e2869dd7917532a4bb7b4) ) ROM_END +ROM_START( breakout ) + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) +ROM_END + ROM_START( pongf ) /* dummy to satisfy game entry*/ ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) ROM_END @@ -320,6 +434,7 @@ ROM_START( pongd ) /* dummy to satisfy game entry*/ ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) ROM_END -GAME( 1972, pong, 0, pong, pong, driver_device, 0, ROT0, "Atari", "Pong (Rev E) external [TTL]", GAME_SUPPORTS_SAVE) -GAME( 1972, pongf, 0, pongf, pong, driver_device, 0, ROT0, "Atari", "Pong (Rev E) [TTL]", GAME_SUPPORTS_SAVE ) -GAME( 1974, pongd, 0, pongd, pongd, driver_device, 0, ROT0, "Atari", "Pong Doubles [TTL]", GAME_SUPPORTS_SAVE ) +GAME( 1972, pong, 0, pong, pong, driver_device, 0, ROT0, "Atari", "Pong (Rev E) external [TTL]", GAME_SUPPORTS_SAVE) +GAME( 1972, pongf, 0, pongf, pong, driver_device, 0, ROT0, "Atari", "Pong (Rev E) [TTL]", GAME_SUPPORTS_SAVE ) +GAME( 1974, pongd, 0, pongd, pongd, driver_device, 0, ROT0, "Atari", "Pong Doubles [TTL]", GAME_SUPPORTS_SAVE ) +GAMEL( 1976, breakout, 0, breakout, breakout, driver_device, 0, ROT90, "Atari", "Breakout [TTL]", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING, layout_breakout) diff --git a/src/mame/drivers/rotaryf.c b/src/mame/drivers/rotaryf.c index f99c4b62bd8..5976f98804d 100644 --- a/src/mame/drivers/rotaryf.c +++ b/src/mame/drivers/rotaryf.c @@ -40,11 +40,11 @@ public: bool m_flipscreen; UINT8 m_last; - + virtual void machine_start(); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - + TIMER_DEVICE_CALLBACK_MEMBER(rotaryf_interrupt); }; diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c index 21ee92c6018..bcd6a8df2e7 100644 --- a/src/mame/drivers/roul.c +++ b/src/mame/drivers/roul.c @@ -79,19 +79,19 @@ public: required_device<cpu_device> m_maincpu; required_device<cpu_device> m_soundcpu; - + UINT8 m_reg[0x10]; UINT8 *m_videobuf; UINT8 m_lamp_old; - + DECLARE_READ8_MEMBER(blitter_status_r); DECLARE_WRITE8_MEMBER(blitter_cmd_w); DECLARE_WRITE8_MEMBER(sound_latch_w); DECLARE_WRITE8_MEMBER(ball_w); - + virtual void video_start(); DECLARE_PALETTE_INIT(roul); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; @@ -223,7 +223,7 @@ ADDRESS_MAP_END void roul_state::video_start() { m_videobuf = auto_alloc_array_clear(machine(), UINT8, VIDEOBUF_SIZE); - + save_item(NAME(m_reg)); save_pointer(NAME(m_videobuf), VIDEOBUF_SIZE); save_item(NAME(m_lamp_old)); diff --git a/src/mame/drivers/seattle.c b/src/mame/drivers/seattle.c index 240ed6de3ad..6fd125ec12f 100644 --- a/src/mame/drivers/seattle.c +++ b/src/mame/drivers/seattle.c @@ -579,8 +579,8 @@ void seattle_state::machine_start() save_item(NAME(m_galileo.pci_ide_regs)); for (index = 0; index < ARRAY_LENGTH(m_galileo.timer); index++) { - state_save_register_item(machine(), "galileo", NULL, index, m_galileo.timer[index].count); - state_save_register_item(machine(), "galileo", NULL, index, m_galileo.timer[index].active); + save_item(NAME(m_galileo.timer[index].count), index); + save_item(NAME(m_galileo.timer[index].active), index); } save_item(NAME(m_widget.ethernet_addr)); save_item(NAME(m_widget.irq_num)); diff --git a/src/mame/drivers/segasp.c b/src/mame/drivers/segasp.c new file mode 100644 index 00000000000..c0252cc882b --- /dev/null +++ b/src/mame/drivers/segasp.c @@ -0,0 +1,558 @@ +/* + +Sega System SP (Spider) +skeleton driver + +this is another 'Naomi-derived' system + +as for SP... it must be done having few things in mind: +differences with Naomi in SH4 memory map only: +0x00200000 - 0x00207fff - no SRAM here +0x01000000 - 0x0100ffff - banked access to ROM board address space, see later +0x01010000 - 0x010101ff - I/O registers, IRQ control, reg 0 - upper 16bits of rombd bank address + +as for ROM board - unlike regular Naomi M4 it have not only ROM itself, +but the other hardware too*: +0x00000000 - 0x1fffffff - FlashROM, like in regular Naomi M4 cart +0x39xxxxxx - SRAM(128KB)** +0x3axxxxxx - CF IDE registers (0 - data, 4 - error, 8 - sector count, etc) +0x3bxxxxxx - CF IDE AltStatus/Device Ctrl register +0x3dxxxxxx - Network aka Media board shared buffer/RAM +0x3fxxxxxx - Network board present flag (0x01)** + +*note: M4-decryption works for all areas if address bit 30 is 1, +for example BIOS can read CF IDE data with on-fly data decryption + +**note: this is 8bit device on 16bit bus, each even byte access actual +data, each odd byte is 0xFF. + +so, unlike regular Naomi this "rom board" can be accessed via BOTH regular +G1 bus PIO or DMA, or directly via banked area 0x0100xxxx in SH4 address space. + + + +todo: make this actually readable, we don't support unicode source files + + Title PCB ID REV CF ID Dumped Region PIC MAIN BD Serial +Battle Police ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +Beetle DASH!! ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +Bingo Galaxy ???-????? no ???-????-???? AAFE-01E10924916, AAFE-01D67304905, Medal +Bingo Parade ???-????? no ???-????-???? AAFE-xxxxxxxxxxx, Medal +Brick People / Block People 834-14881 ROM ALL 253-5508-0558 AAFE-01F67905202, AAFE-01F68275202 +Dinosaur King 834-14493-01 D ROM US 253-5508-0408 AAFE-01D1132xxxx, AAFE-01D15924816 +Dinosaur King - Operation: Dinosaur Rescue 837-14434-91 MDA-C0021? ROM US/EXP 253-5508-0408 AAFE-01A30164715, AAFE-01B92094811 +- 834-14662-01 +Dinosaur King 2 ???-????? no 253-5508-0408 AAFE-xxxxxxxxxxx +Dinosaur King 2 Ver 2.5 834-14792-02 F MDA-C0047 CF EXP 253-5508-0408 AAFE-01D73384904 +Disney: Magical Dream Dance on Stage ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +Future Police Patrol Chase ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +Issyouni Turbo Drive ???-????? no ???-????-???? AAFE-01E91305101 +Issyouni Wan Wan ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +King of Beetle: Battle Terminal ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +Love & Berry Ver 1.003 834-14661-02 ROM EXP 253-5508-0446 AAFE-01D84934906 +Love & Berry Ver 2.000 834-14661-02 ROM EXP 253-5508-0446 AAFE-01D8493xxxx +Love & Berry 3 EXP Ver 1.002 834-14661-01 MDA-C0042 CF US/EXP 253-5508-0446 AAFE-01D64704904 +Marine & Marine ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +Mirage World ???-????? no ???-????-???? AAFE-xxxxxxxxxxx, Medal +Monopoly: The Medal ???-????? no ???-????-???? AAFE-xxxxxxxxxxx, Medal +Monopoly: The Medal 2nd Edition ???-????? no ???-????-???? AAFE-xxxxxxxxxxx, Medal +Mushiking 2K6 2ND ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +Mushiking 2K7 1ST ???-????? no ???-????-???? AAFE-xxxxxxxxxxx +Tetris Giant / Tetris Dekaris 834-14970 G MDA-C0076 CF ALL 253-5508-0604 AAFE-01G03025212 +Tetris Giant / Tetris Dekaris Ver.2.000 834-14970 G ROM ALL 253-5508-0604 AAFE-xxxxxxxxxxx +Thomas: The Tank Engine ???-????? no ???-????-???? AAFE-xxxxxxxxxxx + +REV PCB IC6s Flash AU1500 +D 171-8278D 315-6370 8x 128Mbit AMD +F 171-8278F 315-6416 8x 512Mbit AMD +G 171-8278G 315-6416 2x 512Mbit RMI + +*/ + +#include "emu.h" +#include "cpu/sh4/sh4.h" +#include "debugger.h" +#include "includes/segasp.h" + +READ64_MEMBER(segasp_state::sp_bank_r) +{ + if (mem_mask & U64(0xffffffff00000000)) + return -1; + return m_sp_bank; +} + +WRITE64_MEMBER(segasp_state::sp_bank_w) +{ + if (mem_mask & U64(0xffffffff00000000)) + return; + UINT16 bank = data & 0xffff; + if (bank != m_sp_bank) + logerror("SystemSP: G2 Bank set to %08X%s\n", (bank & 0x3fff) << 16, (bank & 0x4000) ? " decrypt ON" :"" ); + m_sp_bank = bank; +} + +READ64_MEMBER(segasp_state::sn_93c46a_r) +{ + int res; + + /* bit 3 is EEPROM data */ + res = m_eeprom->do_read() << 4; + res |= (ioport("DSW")->read() << 4) & 0xC0; // note: only old REV D PCB have DSW 3-4 here, newer does not, always 0 readed + return res; +} + +WRITE64_MEMBER(segasp_state::sn_93c46a_w) +{ + /* bit 4 is data */ + /* bit 2 is clock */ + /* bit 5 is cs */ + m_eeprom->di_write((data & 0x8) >> 3); + m_eeprom->cs_write((data & 0x20) ? ASSERT_LINE : CLEAR_LINE); + m_eeprom->clk_write((data & 0x4) ? ASSERT_LINE : CLEAR_LINE); +} + +READ64_MEMBER(segasp_state::sp_eeprom_r) +{ + if (mem_mask & U64(0xffffffff00000000)) + return -1; + return m_sp_eeprom->do_read() << 4; +} + +WRITE64_MEMBER(segasp_state::sp_eeprom_w) +{ + if (mem_mask & U64(0xffffffff00000000)) + return; + m_sp_eeprom->di_write(data & 1); + m_sp_eeprom->cs_write((data & 2) ? ASSERT_LINE : CLEAR_LINE); + m_sp_eeprom->clk_write((data & 4) ? ASSERT_LINE : CLEAR_LINE); +} + +READ64_MEMBER(segasp_state::sp_rombdflg_r) +{ + // bit 0 - romboard type, 1 = M4 + // bit 1 - debug mode (enable easter eggs in BIOS, can boot game without proper eeproms/settings) + return ioport("CFG")->read(); +} + +READ64_MEMBER(segasp_state::sp_io_r) +{ + UINT64 retval; + + int reg = offset * 2; + int shift = 0; + + if (mem_mask & U64(0xffffffff00000000)) + { + reg++; + shift = 32; + } + + switch (reg) + { + case 0x00/4: // CN9 17-24 IN_PORT 0 (IN) + retval = ioport("IN_PORT0")->read(); + break; + case 0x04/4: // CN9 41-48 IN_PORT 1 (IN) + retval = ioport("IN_PORT1")->read(); + break; + case 0x08/4: // CN9 25-32 (I/O) + retval = ioport("IN_PORT3")->read(); + break; + case 0x18/4: // IN_PORT 2 + // bit 0:3 - DIPSW 1-4 + // bit 4:5 - TEST/SERVICE SW, CN9 5-6 (old rev PCB only) + retval = ioport("DSW")->read(); + retval |= ioport("IN_PORT2")->read(); + break; + default: + retval = -1; + } + + return retval << shift; +} + +// todo, base DC / Naomi stuff should be in it's own map, differences only here, same for Naomi 2 etc. +static ADDRESS_MAP_START( segasp_map, AS_PROGRAM, 64, segasp_state ) + /* Area 0 */ + AM_RANGE(0x00000000, 0x001fffff) AM_MIRROR(0xa2000000) AM_ROM AM_REGION("maincpu", 0) // BIOS + + AM_RANGE(0x005f6800, 0x005f69ff) AM_MIRROR(0x02000000) AM_READWRITE(dc_sysctrl_r, dc_sysctrl_w ) + AM_RANGE(0x005f6c00, 0x005f6cff) AM_MIRROR(0x02000000) AM_DEVICE32( "maple_dc", maple_dc_device, amap, U64(0xffffffffffffffff) ) + AM_RANGE(0x005f7000, 0x005f70ff) AM_MIRROR(0x02000000) AM_DEVICE16( "rom_board", naomi_board, submap, U64(0x0000ffff0000ffff) ) + AM_RANGE(0x005f7400, 0x005f74ff) AM_MIRROR(0x02000000) AM_DEVICE32( "rom_board", naomi_g1_device, amap, U64(0xffffffffffffffff) ) + AM_RANGE(0x005f7800, 0x005f78ff) AM_MIRROR(0x02000000) AM_READWRITE(dc_g2_ctrl_r, dc_g2_ctrl_w ) + AM_RANGE(0x005f7c00, 0x005f7cff) AM_MIRROR(0x02000000) AM_DEVICE32("powervr2", powervr2_device, pd_dma_map, U64(0xffffffffffffffff)) + AM_RANGE(0x005f8000, 0x005f9fff) AM_MIRROR(0x02000000) AM_DEVICE32("powervr2", powervr2_device, ta_map, U64(0xffffffffffffffff)) + AM_RANGE(0x00600000, 0x006007ff) AM_MIRROR(0x02000000) AM_READWRITE(dc_modem_r, dc_modem_w ) + AM_RANGE(0x00700000, 0x00707fff) AM_MIRROR(0x02000000) AM_READWRITE32(dc_aica_reg_r, dc_aica_reg_w, U64(0xffffffffffffffff)) + AM_RANGE(0x00710000, 0x0071000f) AM_MIRROR(0x02000000) AM_DEVREADWRITE16("aicartc", aicartc_device, read, write, U64(0x0000ffff0000ffff) ) + + AM_RANGE(0x00800000, 0x00ffffff) AM_MIRROR(0x02000000) AM_READWRITE(naomi_arm_r, naomi_arm_w ) // sound RAM (8 MB) + + /* External Device */ + AM_RANGE(0x01000000, 0x0100ffff) AM_RAM // banked access to ROM/NET board address space, mainly backup SRAM and ATA + AM_RANGE(0x01010000, 0x01010007) AM_READWRITE(sp_bank_r, sp_bank_w ) +// AM_RANGE(0x01010080, 0x01010087) IRQ pending/reset, ATA control + AM_RANGE(0x01010100, 0x01010127) AM_READ(sp_io_r) + AM_RANGE(0x01010128, 0x0101012f) AM_READWRITE(sp_eeprom_r, sp_eeprom_w ) + AM_RANGE(0x01010150, 0x01010157) AM_READ(sp_rombdflg_r) +// AM_RANGE(0x01010180, 0x010101af) custom UART 1 +// AM_RANGE(0x010101c0, 0x010101ef) custom UART 2 + + /* Area 1 */ + AM_RANGE(0x04000000, 0x04ffffff) AM_MIRROR(0x02000000) AM_RAM AM_SHARE("dc_texture_ram") // texture memory 64 bit access + AM_RANGE(0x05000000, 0x05ffffff) AM_MIRROR(0x02000000) AM_RAM AM_SHARE("frameram") // apparently this actually accesses the same memory as the 64-bit texture memory access, but in a different format, keep it apart for now + + /* Area 2*/ + AM_RANGE(0x08000000, 0x09ffffff) AM_MIRROR(0x02000000) AM_NOP // 'Unassigned' + + /* Area 3 */ + AM_RANGE(0x0c000000, 0x0dffffff) AM_MIRROR(0xa2000000) AM_RAM AM_SHARE("dc_ram") + + /* Area 4 */ + AM_RANGE(0x10000000, 0x107fffff) AM_MIRROR(0x02000000) AM_DEVWRITE("powervr2", powervr2_device, ta_fifo_poly_w) + AM_RANGE(0x10800000, 0x10ffffff) AM_DEVWRITE8("powervr2", powervr2_device, ta_fifo_yuv_w, U64(0xffffffffffffffff)) + AM_RANGE(0x11000000, 0x11ffffff) AM_DEVWRITE("powervr2", powervr2_device, ta_texture_directpath0_w) // access to texture / framebuffer memory (either 32-bit or 64-bit area depending on SB_LMMODE0 register - cannot be written directly, only through dma / store queue) + /* 0x12000000 -0x13ffffff Mirror area of 0x10000000 -0x11ffffff */ + AM_RANGE(0x13000000, 0x13ffffff) AM_DEVWRITE("powervr2", powervr2_device, ta_texture_directpath1_w) // access to texture / framebuffer memory (either 32-bit or 64-bit area depending on SB_LMMODE1 register - cannot be written directly, only through dma / store queue) + + /* Area 5 */ + //AM_RANGE(0x14000000, 0x17ffffff) AM_NOP // MPX Ext. + + /* Area 6 */ + //AM_RANGE(0x18000000, 0x1bffffff) AM_NOP // Unassigned + + /* Area 7 */ + //AM_RANGE(0x1c000000, 0x1fffffff) AM_NOP // SH4 Internal +ADDRESS_MAP_END + +static ADDRESS_MAP_START( onchip_port, AS_IO, 64, segasp_state ) + AM_RANGE(0x00, 0x0f) AM_READWRITE(sn_93c46a_r, sn_93c46a_w) +ADDRESS_MAP_END + + +INPUT_PORTS_START( segasp ) + PORT_INCLUDE( naomi_debug ) + + PORT_START("CFG") + PORT_DIPNAME( 0x01, 0x01, "ROM Board type" ) + PORT_DIPSETTING( 0x00, "other" ) + PORT_DIPSETTING( 0x01, "M4-type" ) + PORT_DIPNAME( 0x02, 0x00, "BIOS Debug mode" ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x02, DEF_STR( On ) ) + + PORT_START("DSW") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:1") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, "Monitor" ) PORT_DIPLOCATION("SW:3") + PORT_DIPSETTING( 0x04, "31 kHz" ) + PORT_DIPSETTING( 0x00, "15 kHz" ) + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:4") // Must be ON, with off BIOS bootstrap will deadloop with green screen + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("IN_PORT0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) + + PORT_START("IN_PORT1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0xca, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN_PORT2") + PORT_SERVICE_NO_TOGGLE( 0x10, IP_ACTIVE_LOW ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN_PORT3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + +INPUT_PORTS_END + +static MACHINE_CONFIG_DERIVED_CLASS( segasp, naomi_aw_base, segasp_state ) + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(segasp_map) + MCFG_CPU_IO_MAP(onchip_port) + + MCFG_EEPROM_SERIAL_93C46_ADD("sp_eeprom") + +// todo, not exactly NaomiM4 (see notes at top of driver) use custom board type here instead + MCFG_X76F100_ADD("naomibd_eeprom") // actually not present + MCFG_NAOMI_M4_BOARD_ADD("rom_board", ":pic_readout", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq)) +MACHINE_CONFIG_END + +#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \ + ROMX_LOAD(name, offset, length, hash, ROM_GROUPWORD | ROM_BIOS(bios+1)) /* Note '+1' */ + +#define SEGASP_BIOS \ + ROM_REGION( 0x200000, "maincpu", 0) \ + ROM_SYSTEM_BIOS( 0, "v101", "BOOT VER 1.01" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-24236a.ic50", 0x000000, 0x200000, CRC(ca7df0de) SHA1(504c74d5fc96c53ef9f7753e9e37fb8b39cb628c) ) \ + ROM_SYSTEM_BIOS( 1, "v200", "BOOT VER 2.00" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-24328.ic50", 0x000000, 0x200000, CRC(25f2ef00) SHA1(e58dec9f171e52b3ded213b3fcd9a0de8a438076) ) \ + ROM_SYSTEM_BIOS( 2, "v201", "BOOT VER 2.01" ) \ + ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-24328a.ic50", 0x000000, 0x200000, CRC(03ec3805) SHA1(a8fbaea826ca257be0b2b86952f247254929e046) ) \ + ROM_REGION16_BE( 0x80, "main_eeprom", 0 ) \ + ROM_LOAD16_WORD( "mb_serial.ic57", 0x0000, 0x0080, CRC(e1e3c009) SHA1(66bc636c527389c3338f631d78c788b4bd4e93be) ) + +// Network/Media Board firmware VER 1.19(VxWorks), 1st half contain original 1.10 version +#define SEGASP_NETFIRM \ + ROM_REGION( 0x200000, "netcpu", 0) \ + ROM_LOAD( "net_eeprom.ic74s", 0x00000000, 0x200, CRC(77cc5a6c) SHA1(cbfba546256b70bce6c6fd0030d7e2e410a25526) ) \ + ROM_LOAD( "net_firm_119.ic72", 0x00000000, 0x200000, CRC(a738ea1c) SHA1(d25187a973a7e166e70334f964363adf2be87257) ) + +// keep M4 board code happy for now +#define SEGASP_MISC \ + ROM_REGION( 0x84, "naomibd_eeprom", ROMREGION_ERASEFF ) + +#define SEGASPEE_US \ + ROM_LOAD16_WORD( "mb_eeprom_us.ic54s", 0x0000, 0x0080, CRC(4186d7ab) SHA1(fc23da69a511a7643b6a066161bcfc3cdeeacf04) ) + +#define SEGASPEE_EXP \ + ROM_LOAD16_WORD( "mb_eeprom_exp.ic54s", 0x0000, 0x0080, CRC(947ddfad) SHA1(832a3db097af680d1d0eb9451b4650565f0cf8c7) ) + +#define SEGASP_US \ + ROM_REGION16_BE(0x80, "sp_eeprom", 0) \ + SEGASPEE_US + +#define SEGASP_EXP \ + ROM_REGION16_BE(0x80, "sp_eeprom", 0) \ + SEGASPEE_EXP + +#define SEGASP_JP \ + ROM_REGION16_BE(0x80, "sp_eeprom", ROMREGION_ERASEFF) + +ROM_START( segasp ) + SEGASP_BIOS + SEGASP_NETFIRM + SEGASP_MISC + SEGASP_JP + SEGASPEE_US + SEGASPEE_EXP + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASEFF) + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x02)) + ROM_REGION( 0x800, "pic_readout", ROMREGION_ERASE00 ) +ROM_END + +ROM_START( brickppl ) + SEGASP_BIOS + ROM_DEFAULT_BIOS( "v201" ) + SEGASP_JP + SEGASP_MISC + + ROM_REGION( 0x10000000, "rom_board", ROMREGION_ERASE) + ROM_LOAD( "ic62", 0x00000000, 0x4000000, CRC(d79afdb6) SHA1(328e535980624d9173164b756ebbdc1ca4cb6f18) ) + ROM_LOAD( "ic63", 0x04000000, 0x4000000, CRC(4f3c0937) SHA1(72d68b66c57ff539b8058f80f1a15ffa44095460) ) + ROM_LOAD( "ic64", 0x08000000, 0x4000000, CRC(383e90d9) SHA1(eeca4b1bd0cd1fed7b85f045d71e0c7258d4350b) ) + ROM_LOAD( "ic65", 0x0c000000, 0x4000000, CRC(4c29b5ac) SHA1(9e6a79ad2d2498eed5b2590c8764222e7d6c0229) ) + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x08)) // 8x 512Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0558-com.ic15", 0, 0x800, BAD_DUMP CRC(7592d004) SHA1(632373d807f54953d68c95a9f874ed3e8011f085) ) +ROM_END + +ROM_START( dinoking ) + SEGASP_BIOS + SEGASP_US + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASE) + ROM_LOAD( "ic62", 0x00000000, 0x01000000, CRC(8bd18bf7) SHA1(8972ed2bf5bc2f8af9b864118f7a22940c392079) ) + ROM_LOAD( "ic63", 0x01000000, 0x01000000, CRC(8e8c8d1b) SHA1(4ec4a91515e57524d82a0cb98beabe8a286a5cd1) ) + ROM_LOAD( "ic64", 0x02000000, 0x01000000, CRC(01b32ff7) SHA1(27301813ccd895b16a247ebed5edc3d8e3eab334) ) + ROM_LOAD( "ic65", 0x03000000, 0x01000000, CRC(4b60cdb3) SHA1(4ad3e97845d6bdd8b32369aa23e622e066c8ba67) ) + ROM_LOAD( "ic66s", 0x04000000, 0x01000000, CRC(ee3c278e) SHA1(3273a9f1eace78f65ba25bf0f6fcaa77fa421fc4) ) + ROM_LOAD( "ic67s", 0x05000000, 0x01000000, CRC(42441393) SHA1(7ba94bc12ace699ea1159cece3d070fb35789d31) ) + ROM_LOAD( "ic68s", 0x06000000, 0x01000000, CRC(4a787a44) SHA1(4d8f348466187fb67ffff8605be151cea1f77ec6) ) + ROM_LOAD( "ic69s", 0x07000000, 0x01000000, CRC(c78e46c2) SHA1(b8224c68face23010414d13ebb4cc05a2a9dce8a) ) + + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x02)) // actually 8x 128Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0408-com.ic15", 0, 0x800, BAD_DUMP CRC(0e94daba) SHA1(4e9722333a29afd0dbadba78b16344b77a689610) ) +ROM_END + +ROM_START( dinokior ) + SEGASP_BIOS + SEGASP_US + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASE) + ROM_LOAD( "ic62", 0x00000000, 0x01000000, CRC(d3f37d05) SHA1(54c25ddca061acc092a357d958f180f523b86b65) ) + ROM_LOAD( "ic63", 0x01000000, 0x01000000, CRC(07a9491a) SHA1(24b4a6e2fb136dd02fd8ede3d07dc8e3cec36f3d) ) + ROM_LOAD( "ic64", 0x02000000, 0x01000000, CRC(d14a95f7) SHA1(b078ae9ca1b75a80dfd35227351b5aa6f4465cd2) ) + ROM_LOAD( "ic65", 0x03000000, 0x01000000, CRC(09bf6418) SHA1(6d833a82e1268548a837df7fb681940faee17096) ) + ROM_LOAD( "ic66s", 0x04000000, 0x01000000, CRC(014de6b8) SHA1(68c2f25bc91dee4e1e069b586314b2e1fe4bc1b2) ) + ROM_LOAD( "ic67s", 0x05000000, 0x01000000, CRC(7bf77663) SHA1(51a0c867290dce11dcc49f61c1af0d4ed42b02f1) ) + ROM_LOAD( "ic68s", 0x06000000, 0x01000000, CRC(ff5ed2b8) SHA1(d8d86b3ed976c8c8fc51d225ae661e5f237b6e1d) ) + ROM_LOAD( "ic69s", 0x07000000, 0x01000000, CRC(ab8ac4eb) SHA1(e6b3ce796ae4887011e2764261f3f437dc9939f9) ) + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x02)) // actually 8x 128Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0408-com.ic15", 0, 0x800, BAD_DUMP CRC(0e94daba) SHA1(4e9722333a29afd0dbadba78b16344b77a689610) ) +ROM_END + +ROM_START( lovebery ) + SEGASP_BIOS + ROM_DEFAULT_BIOS( "v201" ) + SEGASP_EXP + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASE) + ROM_LOAD( "ic62", 0x00000000, 0x4000000, CRC(1bd80ed0) SHA1(d50307573389ebe71e381a75deb83811fa397b94) ) + ROM_LOAD( "ic63", 0x04000000, 0x4000000, CRC(d3870287) SHA1(efd3630d54068f5a8caf242a48db410bedf48e7a) ) + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x08)) // 8x 512Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0446-com.ic15", 0, 0x800, BAD_DUMP CRC(60f56bf2) SHA1(35e697aca7213e3fb1ebe75bb8991b1b992af6d9) ) + + // LOVE AND BERRY + // Dress up and Dance! + // Type-3 + // 800 + // note: this dump from "empty/dead" Management Chip with no game run count left + ROM_REGION( 0x80, "rf_tag", 0 ) + ROM_LOAD( "berry_type3.bin", 0, 0x80, CRC(0c58aabd) SHA1(8e5d8c9fd2c84e93b442192682930cf4da3fcf79) ) +ROM_END + +ROM_START( lovebero ) + SEGASP_BIOS + ROM_DEFAULT_BIOS( "v201" ) + SEGASP_EXP + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASE) + ROM_LOAD( "ic62", 0x00000000, 0x4000000, CRC(0a23cea3) SHA1(1780d935b0d641769859b2022df8e4262e7bafd8) ) + ROM_LOAD( "ic63", 0x04000000, 0x4000000, CRC(d3870287) SHA1(efd3630d54068f5a8caf242a48db410bedf48e7a) ) + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x08)) // 8x 512Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0446-com.ic15", 0, 0x800, BAD_DUMP CRC(60f56bf2) SHA1(35e697aca7213e3fb1ebe75bb8991b1b992af6d9) ) +ROM_END + +ROM_START( tetgiant ) + SEGASP_BIOS + ROM_DEFAULT_BIOS( "v201" ) + SEGASP_JP + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASE) + ROM_LOAD( "ic62", 0x00000000, 0x4000000, CRC(31ba1938) SHA1(9b5a05193b3df13cd7617a38913e0b0fbd61da44) ) + ROM_LOAD( "ic63", 0x04000000, 0x4000000, CRC(cb946213) SHA1(6195e33c44a1e8eb464dfc3558dc1c9b4d910ef3) ) + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x02)) // 2x 512Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0604-com.ic15", 0, 0x800, BAD_DUMP CRC(e8dd2b86) SHA1(765ffd2e4a36302b1db0815e842c9656e29f2457) ) +ROM_END + + +ROM_START( dinoki25 ) + SEGASP_BIOS + ROM_DEFAULT_BIOS( "v200" ) + SEGASP_EXP + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASEFF) + + DISK_REGION( "cflash" ) + DISK_IMAGE( "mda-c0047", 0, SHA1(0f97291d9c5dbe3e66a5220da05aebdfaa78b35d) ) + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x08)) // 8x 512Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0408-com.ic15", 0, 0x800, BAD_DUMP CRC(0e94daba) SHA1(4e9722333a29afd0dbadba78b16344b77a689610) ) + + // DINOSAUR KING + // TYPE-3 + // 800 + // note: this dump from "empty/dead" Management Chip with no game run count left + ROM_REGION( 0x80, "rf_tag", 0 ) + ROM_LOAD( "dino_type3.bin", 0, 0x80, CRC(1b6c9ea7) SHA1(2e56a1969c49c347f7facda187e5bf787c74328c) ) +ROM_END + +ROM_START( loveber3 ) + SEGASP_BIOS + ROM_DEFAULT_BIOS( "v200" ) + SEGASP_US + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASEFF) + + DISK_REGION( "cflash" ) + DISK_IMAGE( "mda-c0042", 0, SHA1(9992d90dae8ce7636e4153e02b779c27931b3be6) ) + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x08)) // 8x 512Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0446-com.ic15", 0, 0x800, BAD_DUMP CRC(60f56bf2) SHA1(35e697aca7213e3fb1ebe75bb8991b1b992af6d9) ) +ROM_END + +ROM_START( tetgiano ) + SEGASP_BIOS + ROM_DEFAULT_BIOS( "v201" ) + SEGASP_JP + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASEFF) + + DISK_REGION( "cflash" ) + DISK_IMAGE( "mda-c0076", 0, SHA1(6987c888d2a3ada2d07f6396d47fdba507ca859d) ) + + ROM_REGION( 0x04, "boardid", ROMREGION_ERASEVAL(0x02)) // 2x 512Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0604-com.ic15", 0, 0x800, BAD_DUMP CRC(e8dd2b86) SHA1(765ffd2e4a36302b1db0815e842c9656e29f2457) ) +ROM_END + + +#define GAME_FLAGS (GAME_NO_SOUND|GAME_NOT_WORKING) + +GAME( 2004, segasp, 0, segasp, segasp, driver_device, 0, ROT0, "Sega", "Sega System SP (Spider) BIOS", GAME_FLAGS | GAME_IS_BIOS_ROOT ) + +// These use ROMs +GAME( 2009, brickppl,segasp, segasp, segasp, driver_device, 0, ROT0, "Sega", "Brick People / Block PeePoo (Ver 1.002)", GAME_FLAGS ) + +GAME( 2005, dinoking,segasp, segasp, segasp, driver_device, 0, ROT0, "Sega", "Dinosaur King (USA)", GAME_FLAGS ) + +GAME( 2006, dinokior,segasp, segasp, segasp, driver_device, 0, ROT0, "Sega", "Dinosaur King - Operation: Dinosaur Rescue (USA, Export)", GAME_FLAGS ) + +GAME( 2006, lovebery,segasp, segasp, segasp, driver_device, 0, ROT0, "Sega", "Love And Berry - 1st-2nd Collection (Export, Ver 2.000)", GAME_FLAGS ) +GAME( 2006, lovebero,lovebery, segasp, segasp, driver_device, 0, ROT0, "Sega", "Love And Berry - 1st-2nd Collection (Export, Ver 1.003)", GAME_FLAGS ) + +GAME( 2009, tetgiant,segasp, segasp, segasp, driver_device, 0, ROT0, "Sega", "Tetris Giant / Tetris Dekaris (Ver.2.000)", GAME_FLAGS ) + +// These use a CF card + +GAME( 2008, dinoki25,segasp, segasp, segasp, driver_device, 0, ROT0, "Sega", "Dinosaur King - D-Team VS. the Alpha Fortress (Export, Ver 2.500) (MDA-C0047)", GAME_FLAGS ) + +GAME( 2007, loveber3,segasp, segasp, segasp, driver_device, 0, ROT0, "Sega", "Love And Berry - 3rd-5th Collection (USA, Export, Ver 1.002) (MDA-C0042)", GAME_FLAGS ) + +GAME( 2009, tetgiano,tetgiant, segasp, segasp, driver_device, 0, ROT0, "Sega", "Tetris Giant / Tetris Dekaris (MDA-C0076)", GAME_FLAGS ) diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c index a0f14e724b9..04e9a0158ff 100644 --- a/src/mame/drivers/seibuspi.c +++ b/src/mame/drivers/seibuspi.c @@ -2140,12 +2140,15 @@ READ32_MEMBER(seibuspi_state::ejanhs_speedup_r) READ32_MEMBER(seibuspi_state::rdft_speedup_r) { /* rdft */ + if (space.device().safe_pc()==0x0203f06) space.device().execute().spin_until_interrupt(); // idle + + /* rdftj? */ if (space.device().safe_pc()==0x0203f0a) space.device().execute().spin_until_interrupt(); // idle /* rdftau */ if (space.device().safe_pc()==0x0203f16) space.device().execute().spin_until_interrupt(); // idle - /* rdftj */ + /* rdftja? */ if (space.device().safe_pc()==0x0203f22) space.device().execute().spin_until_interrupt(); // idle /* rdfta, rdftadi, rdftam, rdftit */ @@ -2755,12 +2758,12 @@ ROM_START( viprp1ot ) ROM_END -ROM_START( rdft ) +ROM_START( rdft ) /* SXX2C ROM SUB2 cart */ ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program */ - ROM_LOAD32_BYTE("gd_1.211", 0x000000, 0x80000, CRC(f6b2cbdc) SHA1(040c4ff961c8be388c8279b06b777d528c2acc1b) ) - ROM_LOAD32_BYTE("gd_2.212", 0x000001, 0x80000, CRC(1982f812) SHA1(4f12fc3fd7f7a4beda4d29cc81e3a58d255e441f) ) - ROM_LOAD32_BYTE("gd_3.210", 0x000002, 0x80000, CRC(b0f59f44) SHA1(d44fe074ddab35cd0190535cd9fbd7f9e49312a4) ) - ROM_LOAD32_BYTE("gd_4.29", 0x000003, 0x80000, CRC(cd8705bd) SHA1(b19a1486d6b899a134d7b518863ddc8f07967e8b) ) + ROM_LOAD32_BYTE("raiden-fi_prg0_121196.u0211", 0x000000, 0x80000, CRC(adcb5dbc) SHA1(3831becd1e052d81dd00ee098ee630fe35164df8) ) + ROM_LOAD32_BYTE("raiden-fi_prg1_121196.u0212", 0x000001, 0x80000, CRC(60c5b92e) SHA1(ca67f97f9e7d8a21667dc59e7d390dff91179b08) ) + ROM_LOAD32_BYTE("raiden-fi_prg2_121196.u0210", 0x000002, 0x80000, CRC(44b86db5) SHA1(bb05c6d27af86084cd3e17a189826c836f229c8b) ) + ROM_LOAD32_BYTE("raiden-fi_prg3_121196.u029", 0x000003, 0x80000, CRC(e70727ce) SHA1(2e4e896d50cf086e682054cb2e9c223af04cd0cb) ) ROM_REGION( 0x40000, "audiocpu", ROMREGION_ERASE00 ) /* 256K RAM, ROM from Z80 point-of-view */ @@ -2786,7 +2789,7 @@ ROM_START( rdft ) ROM_LOAD32_BYTE("gd_8.216", 0x800000, 0x080000, CRC(f88cb6e4) SHA1(fb35b41307b490d5d08e4b8a70f8ff4ce2ca8105) ) ROM_REGION( 0x100000, "soundflash1", 0 ) /* on SPI motherboard */ - ROM_LOAD("flash0_blank_region01.u1053", 0x000000, 0x100000, CRC(7ae7ab76) SHA1(a2b196f470bf64af94002fc4e2640fadad00418f) ) + ROM_LOAD("flash0_blank_region80.u1053", 0x000000, 0x100000, CRC(e2adaff5) SHA1(9297afaf78209724515d8f78de8cee7bc7cb796b) ) ROM_END ROM_START( rdftu ) @@ -2825,6 +2828,40 @@ ROM_END ROM_START( rdftj ) ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program */ + ROM_LOAD32_BYTE("gd_1.211", 0x000000, 0x80000, CRC(f6b2cbdc) SHA1(040c4ff961c8be388c8279b06b777d528c2acc1b) ) + ROM_LOAD32_BYTE("gd_2.212", 0x000001, 0x80000, CRC(1982f812) SHA1(4f12fc3fd7f7a4beda4d29cc81e3a58d255e441f) ) + ROM_LOAD32_BYTE("gd_3.210", 0x000002, 0x80000, CRC(b0f59f44) SHA1(d44fe074ddab35cd0190535cd9fbd7f9e49312a4) ) + ROM_LOAD32_BYTE("gd_4.29", 0x000003, 0x80000, CRC(cd8705bd) SHA1(b19a1486d6b899a134d7b518863ddc8f07967e8b) ) + + ROM_REGION( 0x40000, "audiocpu", ROMREGION_ERASE00 ) /* 256K RAM, ROM from Z80 point-of-view */ + + ROM_REGION( 0x30000, "gfx1", ROMREGION_ERASEFF ) /* text layer roms */ + ROM_LOAD24_BYTE("gd_5.423", 0x000000, 0x10000, CRC(8f8d4e14) SHA1(06c803975767ae98f40ba7ac5764a5bc8baa3a30) ) + ROM_LOAD24_BYTE("gd_6.424", 0x000001, 0x10000, CRC(6ac64968) SHA1(ec395205c24c4f864a1f805bb0d4641562d4faa9) ) + ROM_LOAD24_BYTE("gd_7.48", 0x000002, 0x10000, CRC(4d87e1ea) SHA1(3230e9b643fad773e61ab8ce09c0cd7d4d0558e3) ) + + ROM_REGION( 0x600000, "gfx2", ROMREGION_ERASEFF ) /* background layer roms */ + ROM_LOAD24_WORD("gd_bg1-d.415", 0x000000, 0x200000, CRC(6a68054c) SHA1(5cbfc4ac90045f1401c2dda7a51936558c9de07e) ) + ROM_LOAD24_BYTE("gd_bg1-p.410", 0x000002, 0x100000, CRC(3400794a) SHA1(719808f7442bac612cefd7b7fffcd665e6337ad0) ) + ROM_LOAD24_WORD("gd_bg2-d.416", 0x300000, 0x200000, CRC(61cd2991) SHA1(bb608e3948bf9ea35b5e1615d2ba6858d029dcbe) ) + ROM_LOAD24_BYTE("gd_bg2-p.49", 0x300002, 0x100000, CRC(502d5799) SHA1(c3a0e1a4f5a7b35572ae1ff31315da4ed08aa2fe) ) + + ROM_REGION( 0xc00000, "gfx3", 0 ) /* sprites */ + ROM_LOAD("gd_obj-1.322", 0x000000, 0x400000, CRC(59d86c99) SHA1(d3c9241e7b51fe21f8351051b063f91dc69bf905) ) + ROM_LOAD("gd_obj-2.324", 0x400000, 0x400000, CRC(1ceb0b6f) SHA1(97225a9b3e7be18080aa52f6570af2cce8f25c06) ) + ROM_LOAD("gd_obj-3.323", 0x800000, 0x400000, CRC(36e93234) SHA1(51917a80b7da5c32a9434a1076fc2916d62e6a3e) ) + + ROM_REGION32_LE( 0xa00000, "sound01", ROMREGION_ERASE00 ) /* sound roms */ + ROM_LOAD32_WORD("gd_pcm.217", 0x000000, 0x100000, CRC(31253ad7) SHA1(c81c8d50f8f287f5cbfaec77b30d969b01ce11a9) ) + ROM_CONTINUE( 0x400000, 0x100000 ) + ROM_LOAD32_BYTE("gd_8.216", 0x800000, 0x080000, CRC(f88cb6e4) SHA1(fb35b41307b490d5d08e4b8a70f8ff4ce2ca8105) ) + + ROM_REGION( 0x100000, "soundflash1", 0 ) /* on SPI motherboard */ + ROM_LOAD("flash0_blank_region01.u1053", 0x000000, 0x100000, CRC(7ae7ab76) SHA1(a2b196f470bf64af94002fc4e2640fadad00418f) ) +ROM_END + +ROM_START( rdftja ) + ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program */ ROM_LOAD32_BYTE("rf1.bin", 0x000000, 0x80000, CRC(46861b75) SHA1(079c589c490d49f7ec97a7e68c5b6e7e37872827) ) ROM_LOAD32_BYTE("rf2.bin", 0x000001, 0x80000, CRC(6388ed11) SHA1(aebbccfb0f704cdceb45ea71216275dd83880e15) ) ROM_LOAD32_BYTE("rf3.bin", 0x000002, 0x80000, CRC(beafcd24) SHA1(2dbc47ecef6f898a371a841df2c72151da9c5a8d) ) @@ -2857,7 +2894,7 @@ ROM_START( rdftj ) ROM_LOAD("flash0_blank_region01.u1053", 0x000000, 0x100000, CRC(7ae7ab76) SHA1(a2b196f470bf64af94002fc4e2640fadad00418f) ) ROM_END -ROM_START( rdftja ) /* SXX2C ROM SUB4 cart */ +ROM_START( rdftjb ) /* SXX2C ROM SUB4 cart */ ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program */ ROM_LOAD32_BYTE("seibu1.u0211", 0x000000, 0x080000, CRC(b70afcc2) SHA1(70ac545a9fc30df310254997674878fbc2c2d718) ) // socket is silkscreened on pcb PRG0 ROM_LOAD32_BYTE("raiden-f_prg2.u0212", 0x000001, 0x080000, CRC(58ccb10c) SHA1(0cce4057bfada78121d9586574b98d46cdd7dd46) ) // socket is silkscreened on pcb PRG1 @@ -3201,7 +3238,7 @@ ROM_START( rdft2j ) /* SPI Cart, Japan */ ROM_LOAD("flash0_blank_region01.u1053", 0x000000, 0x100000, CRC(7ae7ab76) SHA1(a2b196f470bf64af94002fc4e2640fadad00418f) ) ROM_END -ROM_START( rdft2j2 ) /* SPI Cart, Japan */ +ROM_START( rdft2ja ) /* SPI Cart, Japan */ ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program */ ROM_LOAD32_BYTE("rf2.1", 0x000000, 0x80000, CRC(391d5057) SHA1(a1849142cbf7344ac1279781597e27b3b8ae6127) ) ROM_LOAD32_BYTE("rf2_2.bin", 0x000001, 0x80000, CRC(ec73a767) SHA1(83f3905afe49401793c0ea0193cb31d3ba1e1739) ) @@ -3276,7 +3313,7 @@ ROM_START( rdft2a ) /* SPI Cart, Asia (Metrotainment license); SPI PCB is marked ROM_LOAD("flash0_blank_region22.u1053", 0x000000, 0x100000, CRC(5fee8413) SHA1(6d6a62fa01293b4ba4b349a39820d024add6ea22) ) ROM_END -ROM_START( rdft2a2 ) /* SPI Cart, Asia (Dream Island license) */ +ROM_START( rdft2aa ) /* SPI Cart, Asia (Dream Island license) */ ROM_REGION32_LE( 0x200000, "maincpu", 0 ) /* i386 program */ ROM_LOAD32_BYTE("rf2_1.bin", 0x000000, 0x80000, CRC(72198410) SHA1(ca4bc858f6bf247a343b0fdae1d1a3cdabc4a3c3) ) ROM_LOAD32_BYTE("rf2_2.bin", 0x000001, 0x80000, CRC(ec73a767) SHA1(83f3905afe49401793c0ea0193cb31d3ba1e1739) ) @@ -3797,9 +3834,10 @@ GAME( 1995, viprp1hk, viprp1, spi, spi_3button, seibuspi_state, viprp1, GAME( 1996, ejanhs, 0, ejanhs, spi_ejanhs, seibuspi_state, ejanhs, ROT0, "Seibu Kaihatsu", "E-Jan High School (Japan)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) -GAME( 1996, rdft, 0, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Japan set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) -GAME( 1996, rdftj, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Japan set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) -GAME( 1996, rdftja, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Japan set 3)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 1996, rdft, 0, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu (Tuning license)", "Raiden Fighters (Germany)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 1996, rdftj, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Japan set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 1996, rdftja, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Japan set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 1996, rdftjb, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu", "Raiden Fighters (Japan set 3)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1996, rdftu, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden Fighters (US)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1996, rdftam, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu (Metrotainment license)", "Raiden Fighters (Hong Kong)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1996, rdftadi, rdft, spi, spi_3button, seibuspi_state, rdft, ROT270, "Seibu Kaihatsu (Dream Island license)", "Raiden Fighters (Korea)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) @@ -3811,9 +3849,9 @@ GAME( 1996, rdfta, rdft, spi, spi_3button, seibuspi_state, rdft, GAME( 1997, rdft2, 0, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Tuning license)", "Raiden Fighters 2 - Operation Hell Dive (Germany)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1997, rdft2u, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Fabtek license)", "Raiden Fighters 2 - Operation Hell Dive (US)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1997, rdft2j, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Japan set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) -GAME( 1997, rdft2j2, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Japan set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 1997, rdft2ja, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Japan set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1997, rdft2a, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Metrotainment license)", "Raiden Fighters 2 - Operation Hell Dive (Hong Kong)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) -GAME( 1997, rdft2a2, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Dream Island license)", "Raiden Fighters 2 - Operation Hell Dive (Korea)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 1997, rdft2aa, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu (Dream Island license)", "Raiden Fighters 2 - Operation Hell Dive (Korea)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1997, rdft2t, rdft2, spi, spi_2button, seibuspi_state, rdft2, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - Operation Hell Dive (Taiwan)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) GAME( 1998, rfjet, 0, spi, spi_2button, seibuspi_state, rfjet, ROT270, "Seibu Kaihatsu (Tuning license)", "Raiden Fighters Jet (Germany)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index 0037bb4a2cf..a7476405ea6 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -1957,6 +1957,11 @@ WRITE16_MEMBER(seta_state::zombraid_gun_w) m_gun_old_clock = data & 1; } +READ16_MEMBER(seta_state::extra_r) +{ + return ioport("EXTRA")->read_safe(0xff); +} + static ADDRESS_MAP_START( wrofaero_map, AS_PROGRAM, 16, seta_state ) AM_RANGE(0x000000, 0x1fffff) AM_ROM // ROM (up to 2MB) AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_SHARE("workram") // RAM (pointer for zombraid crosshair hack) @@ -1965,7 +1970,9 @@ static ADDRESS_MAP_START( wrofaero_map, AS_PROGRAM, 16, seta_state ) AM_RANGE(0x400000, 0x400001) AM_READ_PORT("P1") // P1 AM_RANGE(0x400002, 0x400003) AM_READ_PORT("P2") // P2 AM_RANGE(0x400004, 0x400005) AM_READ_PORT("COINS") // Coins + AM_RANGE(0x500000, 0x500005) AM_RAM_WRITE(seta_vregs_w) AM_SHARE("vregs") // (gundhara) Coin Lockout + Video Registers + AM_RANGE(0x500006, 0x500007) AM_READ(extra_r) // Buttons 4,5,6 (Daioh only) AM_RANGE(0x600000, 0x600003) AM_READ(seta_dsw_r) // DSW AM_RANGE(0x700000, 0x7003ff) AM_RAM // (rezon,jjsquawk) @@ -10473,7 +10480,7 @@ ROM_START( daiohc ) /* Found on a 93111A PCB - same PCB as War of Areo & J. J. S ROM_REGION( 0x200000, "gfx1", 0 ) /* Sprites */ ROM_LOAD( "9.u9", 0x000000, 0x080000, CRC(4444cbd4) SHA1(e039cd7e7093d399bc39aa4d355a03250e087fb3) ) /* connects to U63 & U64 through a riser card */ ROM_LOAD( "10.u10", 0x080000, 0x080000, CRC(1d88d20b) SHA1(3cf95041d0876a4ef378651783e53cee1994ed3d) ) - ROM_LOAD( "11.u11", 0x100000, 0x080000, CRC(3e41de61) SHA1(7d3ddf3780bbe99b13937d75cbdbfb58449301a6) ) + ROM_LOAD( "11.u11", 0x100000, 0x080000, CRC(3e41de61) SHA1(7d3ddf3780bbe99b13937d75cbdbfb58449301a6) ) ROM_LOAD( "12.u12", 0x180000, 0x080000, CRC(f35e3341) SHA1(9260460e1823d157201de02557c7136ef898cfb3) ) ROM_REGION( 0x200000, "gfx2", 0 ) /* Layer 1 */ diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c index 02c9afee1d1..85ac3eb5d79 100644 --- a/src/mame/drivers/sf.c +++ b/src/mame/drivers/sf.c @@ -84,8 +84,8 @@ WRITE16_MEMBER(sf_state::protection_w) space.write_word(0xffc00c, 0xc0); space.write_word(0xffc00e, 0); - sf_fg_scroll_w(space, 0, d1, 0xffff); - sf_bg_scroll_w(space, 0, d2, 0xffff); + fg_scroll_w(space, 0, d1, 0xffff); + bg_scroll_w(space, 0, d2, 0xffff); break; } case 4: @@ -109,7 +109,7 @@ WRITE16_MEMBER(sf_state::protection_w) } space.write_word(0xffc682, d1); space.write_word(0xffc00e, off); - sf_bg_scroll_w(space, 0, d1, 0xffff); + bg_scroll_w(space, 0, d1, 0xffff); } break; } @@ -123,7 +123,7 @@ WRITE16_MEMBER(sf_state::protection_w) } -WRITE8_MEMBER(sf_state::sf_coin_w) +WRITE8_MEMBER(sf_state::coin_w) { coin_counter_w(machine(), 0, data & 0x01); coin_counter_w(machine(), 1, data & 0x02); @@ -140,7 +140,7 @@ WRITE8_MEMBER(sf_state::soundcmd_w) WRITE8_MEMBER(sf_state::sound2_bank_w) { - membank("bank1")->set_base(memregion("audio2")->base() + 0x8000 * (data + 1)); + membank("bank1")->set_entry(data); } WRITE8_MEMBER(sf_state::msm1_5205_w) @@ -164,7 +164,7 @@ WRITE8_MEMBER(sf_state::msm2_5205_w) static ADDRESS_MAP_START( sfan_map, AS_PROGRAM, 16, sf_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x000000, 0x04ffff) AM_ROM - AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(sf_videoram_w) AM_SHARE("videoram") + AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") AM_RANGE(0xb00000, 0xb007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0xc00000, 0xc00001) AM_READ_PORT("IN0") AM_RANGE(0xc00002, 0xc00003) AM_READ_PORT("IN1") @@ -174,10 +174,10 @@ static ADDRESS_MAP_START( sfan_map, AS_PROGRAM, 16, sf_state ) AM_RANGE(0xc0000a, 0xc0000b) AM_READ_PORT("DSW2") AM_RANGE(0xc0000c, 0xc0000d) AM_READ_PORT("SYSTEM") AM_RANGE(0xc0000e, 0xc0000f) AM_READNOP - AM_RANGE(0xc00010, 0xc00011) AM_WRITE8(sf_coin_w, 0x00ff) - AM_RANGE(0xc00014, 0xc00015) AM_WRITE(sf_fg_scroll_w) - AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w) - AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w) + AM_RANGE(0xc00010, 0xc00011) AM_WRITE8(coin_w, 0x00ff) + AM_RANGE(0xc00014, 0xc00015) AM_WRITE(fg_scroll_w) + AM_RANGE(0xc00018, 0xc00019) AM_WRITE(bg_scroll_w) + AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(gfxctrl_w) AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE8(soundcmd_w, 0x00ff) // AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w) AM_RANGE(0xff8000, 0xffdfff) AM_RAM @@ -187,7 +187,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sfus_map, AS_PROGRAM, 16, sf_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x000000, 0x04ffff) AM_ROM - AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(sf_videoram_w) AM_SHARE("videoram") + AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") AM_RANGE(0xb00000, 0xb007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0xc00000, 0xc00001) AM_READ_PORT("IN0") AM_RANGE(0xc00002, 0xc00003) AM_READ_PORT("IN1") @@ -197,10 +197,10 @@ static ADDRESS_MAP_START( sfus_map, AS_PROGRAM, 16, sf_state ) AM_RANGE(0xc0000a, 0xc0000b) AM_READ_PORT("DSW2") AM_RANGE(0xc0000c, 0xc0000d) AM_READ_PORT("SYSTEM") AM_RANGE(0xc0000e, 0xc0000f) AM_READNOP - AM_RANGE(0xc00010, 0xc00011) AM_WRITE8(sf_coin_w, 0x00ff) - AM_RANGE(0xc00014, 0xc00015) AM_WRITE(sf_fg_scroll_w) - AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w) - AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w) + AM_RANGE(0xc00010, 0xc00011) AM_WRITE8(coin_w, 0x00ff) + AM_RANGE(0xc00014, 0xc00015) AM_WRITE(fg_scroll_w) + AM_RANGE(0xc00018, 0xc00019) AM_WRITE(bg_scroll_w) + AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(gfxctrl_w) AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE8(soundcmd_w, 0x00ff) // AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w) AM_RANGE(0xff8000, 0xffdfff) AM_RAM @@ -210,7 +210,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sfjp_map, AS_PROGRAM, 16, sf_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x000000, 0x04ffff) AM_ROM - AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(sf_videoram_w) AM_SHARE("videoram") + AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") AM_RANGE(0xb00000, 0xb007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0xc00000, 0xc00001) AM_READ_PORT("IN0") AM_RANGE(0xc00002, 0xc00003) AM_READ_PORT("IN1") @@ -220,10 +220,10 @@ static ADDRESS_MAP_START( sfjp_map, AS_PROGRAM, 16, sf_state ) AM_RANGE(0xc0000a, 0xc0000b) AM_READ_PORT("DSW2") AM_RANGE(0xc0000c, 0xc0000d) AM_READ_PORT("SYSTEM") AM_RANGE(0xc0000e, 0xc0000f) AM_READNOP - AM_RANGE(0xc00010, 0xc00011) AM_WRITE8(sf_coin_w, 0x00ff) - AM_RANGE(0xc00014, 0xc00015) AM_WRITE(sf_fg_scroll_w) - AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w) - AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w) + AM_RANGE(0xc00010, 0xc00011) AM_WRITE8(coin_w, 0x00ff) + AM_RANGE(0xc00014, 0xc00015) AM_WRITE(fg_scroll_w) + AM_RANGE(0xc00018, 0xc00019) AM_WRITE(bg_scroll_w) + AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(gfxctrl_w) AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE8(soundcmd_w, 0x00ff) AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w) AM_RANGE(0xff8000, 0xffdfff) AM_RAM @@ -327,8 +327,8 @@ static INPUT_PORTS_START( common ) PORT_DIPSETTING( 0x0180, "1st Stage Maximum" ) PORT_DIPSETTING( 0x0080, DEF_STR( None ) ) PORT_DIPNAME( 0x0400, 0x0400, "Number of Countries Selected" ) PORT_DIPLOCATION("DSW4.11E:3") - PORT_DIPSETTING( 0x0400, "4" ) - PORT_DIPSETTING( 0x0000, "2" ) + PORT_DIPSETTING( 0x0400, "2" ) + PORT_DIPSETTING( 0x0000, "4" ) PORT_DIPUNUSED_DIPLOC( 0x0800, 0x0800, "DSW4.11E:4" ) PORT_DIPUNUSED_DIPLOC( 0x1000, 0x1000, "DSW4.11E:5" ) PORT_DIPUNUSED_DIPLOC( 0x2000, 0x2000, "DSW4.11E:6" ) @@ -396,6 +396,11 @@ static INPUT_PORTS_START( sfan ) PORT_MODIFY("DSW1") PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0100, "DSW2.13E:1" ) // Flip Screen not available + PORT_MODIFY("DSW2") + PORT_DIPNAME( 0x0400, 0x0400, "Number of Countries Selected" ) PORT_DIPLOCATION("DSW4.11E:3") + PORT_DIPSETTING( 0x0400, "4" ) + PORT_DIPSETTING( 0x0000, "2" ) + // 4 pneumatic buttons. When their pressure starts decreasing, the game will latch // the highest measured value and respond with a low/mid/strong attack: approx. // 0x40 for low, 0xe0 for mid, 0xfe for strong. @@ -515,14 +520,16 @@ GFXDECODE_END void sf_state::machine_start() { - save_item(NAME(m_sf_active)); + save_item(NAME(m_active)); save_item(NAME(m_bgscroll)); save_item(NAME(m_fgscroll)); + + membank("bank1")->configure_entries(0, 256, memregion("audio2")->base() + 0x8000, 0x8000); } void sf_state::machine_reset() { - m_sf_active = 0; + m_active = 0; m_bgscroll = 0; m_fgscroll = 0; } @@ -548,7 +555,7 @@ static MACHINE_CONFIG_START( sfan, sf_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(8*8, (64-8)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_UPDATE_DRIVER(sf_state, screen_update_sf) + MCFG_SCREEN_UPDATE_DRIVER(sf_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", sf) diff --git a/src/mame/drivers/shangha3.c b/src/mame/drivers/shangha3.c index 6611911bb49..3dd81edd456 100644 --- a/src/mame/drivers/shangha3.c +++ b/src/mame/drivers/shangha3.c @@ -67,8 +67,6 @@ WRITE16_MEMBER(shangha3_state::shangha3_prot_w) logerror("PC %04x: write %02x to 20004e\n",space.device().safe_pc(),data); } - - WRITE16_MEMBER(shangha3_state::shangha3_coinctrl_w) { if (ACCESSING_BITS_8_15) @@ -118,7 +116,7 @@ WRITE16_MEMBER(shangha3_state::heberpop_sound_command_w) } } -WRITE16_MEMBER(shangha3_state::shangha3_irq_ack_w) +WRITE16_MEMBER(shangha3_state::irq_ack_w) { m_maincpu->set_input_line(4, CLEAR_LINE); } @@ -128,8 +126,8 @@ static ADDRESS_MAP_START( shangha3_map, AS_PROGRAM, 16, shangha3_state ) AM_RANGE(0x100000, 0x100fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x200000, 0x200001) AM_READ_PORT("INPUTS") AM_RANGE(0x200002, 0x200003) AM_READ_PORT("SYSTEM") - AM_RANGE(0x200008, 0x200009) AM_WRITE(shangha3_blitter_go_w) - AM_RANGE(0x20000a, 0x20000b) AM_WRITE(shangha3_irq_ack_w) + AM_RANGE(0x200008, 0x200009) AM_WRITE(blitter_go_w) + AM_RANGE(0x20000a, 0x20000b) AM_WRITE(irq_ack_w) AM_RANGE(0x20000c, 0x20000d) AM_WRITE(shangha3_coinctrl_w) AM_RANGE(0x20001e, 0x20001f) AM_DEVREAD8("aysnd", ay8910_device, data_r, 0x00ff) AM_RANGE(0x20002e, 0x20002f) AM_DEVWRITE8("aysnd", ay8910_device, data_w, 0x00ff) @@ -137,8 +135,8 @@ static ADDRESS_MAP_START( shangha3_map, AS_PROGRAM, 16, shangha3_state ) AM_RANGE(0x20004e, 0x20004f) AM_READWRITE(shangha3_prot_r,shangha3_prot_w) AM_RANGE(0x20006e, 0x20006f) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_SHARE("ram") /* gfx & work ram */ - AM_RANGE(0x340000, 0x340001) AM_WRITE(shangha3_flipscreen_w) - AM_RANGE(0x360000, 0x360001) AM_WRITE(shangha3_gfxlist_addr_w) + AM_RANGE(0x340000, 0x340001) AM_WRITE(flipscreen_w) + AM_RANGE(0x360000, 0x360001) AM_WRITE(gfxlist_addr_w) ADDRESS_MAP_END static ADDRESS_MAP_START( heberpop_map, AS_PROGRAM, 16, shangha3_state ) @@ -147,13 +145,13 @@ static ADDRESS_MAP_START( heberpop_map, AS_PROGRAM, 16, shangha3_state ) AM_RANGE(0x200000, 0x200001) AM_READ_PORT("INPUTS") AM_RANGE(0x200002, 0x200003) AM_READ_PORT("SYSTEM") AM_RANGE(0x200004, 0x200005) AM_READ_PORT("DSW") - AM_RANGE(0x200008, 0x200009) AM_WRITE(shangha3_blitter_go_w) - AM_RANGE(0x20000a, 0x20000b) AM_WRITE(shangha3_irq_ack_w) + AM_RANGE(0x200008, 0x200009) AM_WRITE(blitter_go_w) + AM_RANGE(0x20000a, 0x20000b) AM_WRITE(irq_ack_w) AM_RANGE(0x20000c, 0x20000d) AM_WRITE(heberpop_coinctrl_w) AM_RANGE(0x20000e, 0x20000f) AM_WRITE(heberpop_sound_command_w) AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_SHARE("ram") /* gfx & work ram */ - AM_RANGE(0x340000, 0x340001) AM_WRITE(shangha3_flipscreen_w) - AM_RANGE(0x360000, 0x360001) AM_WRITE(shangha3_gfxlist_addr_w) + AM_RANGE(0x340000, 0x340001) AM_WRITE(flipscreen_w) + AM_RANGE(0x360000, 0x360001) AM_WRITE(gfxlist_addr_w) AM_RANGE(0x800000, 0xb7ffff) AM_ROM AM_REGION("gfx1", 0) ADDRESS_MAP_END @@ -162,14 +160,14 @@ static ADDRESS_MAP_START( blocken_map, AS_PROGRAM, 16, shangha3_state ) AM_RANGE(0x100000, 0x100001) AM_READ_PORT("INPUTS") AM_RANGE(0x100002, 0x100003) AM_READ_PORT("SYSTEM") AM_WRITENOP // w -> unknown purpose AM_RANGE(0x100004, 0x100005) AM_READ_PORT("DSW") - AM_RANGE(0x100008, 0x100009) AM_WRITE(shangha3_blitter_go_w) - AM_RANGE(0x10000a, 0x10000b) AM_READNOP AM_WRITE(shangha3_irq_ack_w) // r -> unknown purpose (value doesn't matter, left-over?) + AM_RANGE(0x100008, 0x100009) AM_WRITE(blitter_go_w) + AM_RANGE(0x10000a, 0x10000b) AM_READNOP AM_WRITE(irq_ack_w) // r -> unknown purpose (value doesn't matter, left-over?) AM_RANGE(0x10000c, 0x10000d) AM_WRITE(blocken_coinctrl_w) AM_RANGE(0x10000e, 0x10000f) AM_WRITE(heberpop_sound_command_w) AM_RANGE(0x200000, 0x200fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x300000, 0x30ffff) AM_RAM AM_SHARE("ram") /* gfx & work ram */ - AM_RANGE(0x340000, 0x340001) AM_WRITE(shangha3_flipscreen_w) - AM_RANGE(0x360000, 0x360001) AM_WRITE(shangha3_gfxlist_addr_w) + AM_RANGE(0x340000, 0x340001) AM_WRITE(flipscreen_w) + AM_RANGE(0x360000, 0x360001) AM_WRITE(gfxlist_addr_w) AM_RANGE(0x800000, 0xb7ffff) AM_ROM AM_REGION("gfx1", 0) ADDRESS_MAP_END @@ -451,12 +449,6 @@ static GFXDECODE_START( shangha3 ) GFXDECODE_END -WRITE_LINE_MEMBER(shangha3_state::irqhandler) -{ - m_audiocpu->set_input_line(INPUT_LINE_NMI, state); -} - - static MACHINE_CONFIG_START( shangha3, shangha3_state ) /* basic machine hardware */ @@ -472,7 +464,7 @@ static MACHINE_CONFIG_START( shangha3, shangha3_state ) // MCFG_SCREEN_VISIBLE_AREA(0*16, 24*16-1, 1*16, 15*16-1) MCFG_SCREEN_RAW_PARAMS(XTAL_48MHz/6,512,0,24*16,263,1*16,15*16) /* refresh rate is unknown */ - MCFG_SCREEN_UPDATE_DRIVER(shangha3_state, screen_update_shangha3) + MCFG_SCREEN_UPDATE_DRIVER(shangha3_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", shangha3) @@ -513,7 +505,7 @@ static MACHINE_CONFIG_START( heberpop, shangha3_state ) // MCFG_SCREEN_VISIBLE_AREA(0*16, 24*16-1, 1*16, 15*16-1) MCFG_SCREEN_RAW_PARAMS(XTAL_48MHz/6,512,0,24*16,263,1*16,15*16) /* refresh rate is unknown */ - MCFG_SCREEN_UPDATE_DRIVER(shangha3_state, screen_update_shangha3) + MCFG_SCREEN_UPDATE_DRIVER(shangha3_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", shangha3) @@ -526,7 +518,7 @@ static MACHINE_CONFIG_START( heberpop, shangha3_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("ymsnd", YM3438, XTAL_48MHz/6) /* 8 MHz? */ - MCFG_YM2612_IRQ_HANDLER(WRITELINE(shangha3_state,irqhandler)) + MCFG_YM2612_IRQ_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI)) MCFG_SOUND_ROUTE(0, "mono", 0.40) MCFG_SOUND_ROUTE(1, "mono", 0.40) @@ -554,7 +546,7 @@ static MACHINE_CONFIG_START( blocken, shangha3_state ) // MCFG_SCREEN_VISIBLE_AREA(0*16, 24*16-1, 1*16, 15*16-1) MCFG_SCREEN_RAW_PARAMS(XTAL_48MHz/6,512,0,24*16,263,1*16,15*16) /* refresh rate is unknown */ - MCFG_SCREEN_UPDATE_DRIVER(shangha3_state, screen_update_shangha3) + MCFG_SCREEN_UPDATE_DRIVER(shangha3_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", shangha3) @@ -567,7 +559,7 @@ static MACHINE_CONFIG_START( blocken, shangha3_state ) MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("ymsnd", YM3438, XTAL_48MHz/6) /* 8 MHz? */ - MCFG_YM2612_IRQ_HANDLER(WRITELINE(shangha3_state,irqhandler)) + MCFG_YM2612_IRQ_HANDLER(INPUTLINE("audiocpu", INPUT_LINE_NMI)) MCFG_SOUND_ROUTE(0, "mono", 0.40) MCFG_SOUND_ROUTE(1, "mono", 0.40) @@ -723,6 +715,8 @@ ROM_END DRIVER_INIT_MEMBER(shangha3_state,shangha3) { m_do_shadows = 1; + + save_item(NAME(m_prot_count)); } DRIVER_INIT_MEMBER(shangha3_state,heberpop) @@ -730,8 +724,8 @@ DRIVER_INIT_MEMBER(shangha3_state,heberpop) m_do_shadows = 0; } -GAME( 1993, shangha3, 0, shangha3, shangha3, shangha3_state, shangha3, ROT0, "Sunsoft", "Shanghai III (World)", 0 ) -GAME( 1993, shangha3u, shangha3, shangha3, shangha3, shangha3_state, shangha3, ROT0, "Sunsoft", "Shanghai III (US)", 0 ) -GAME( 1993, shangha3j, shangha3, shangha3, shangha3, shangha3_state, shangha3, ROT0, "Sunsoft", "Shanghai III (Japan)", 0 ) -GAME( 1994, heberpop, 0, heberpop, heberpop, shangha3_state, heberpop, ROT0, "Sunsoft / Atlus", "Hebereke no Popoon (Japan)", 0 ) -GAME( 1994, blocken, 0, blocken, blocken, shangha3_state, heberpop, ROT0, "Visco / KID", "Blocken (Japan)", GAME_IMPERFECT_GRAPHICS ) +GAME( 1993, shangha3, 0, shangha3, shangha3, shangha3_state, shangha3, ROT0, "Sunsoft", "Shanghai III (World)", GAME_SUPPORTS_SAVE ) +GAME( 1993, shangha3u, shangha3, shangha3, shangha3, shangha3_state, shangha3, ROT0, "Sunsoft", "Shanghai III (US)", GAME_SUPPORTS_SAVE ) +GAME( 1993, shangha3j, shangha3, shangha3, shangha3, shangha3_state, shangha3, ROT0, "Sunsoft", "Shanghai III (Japan)", GAME_SUPPORTS_SAVE ) +GAME( 1994, heberpop, 0, heberpop, heberpop, shangha3_state, heberpop, ROT0, "Sunsoft / Atlus", "Hebereke no Popoon (Japan)", GAME_SUPPORTS_SAVE ) +GAME( 1994, blocken, 0, blocken, blocken, shangha3_state, heberpop, ROT0, "Visco / KID", "Blocken (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/shanghai.c b/src/mame/drivers/shanghai.c index 0286f886821..c31c61607b4 100644 --- a/src/mame/drivers/shanghai.c +++ b/src/mame/drivers/shanghai.c @@ -14,7 +14,7 @@ settings, but music runs too fast. * kothello Notes: If you use the key labeled as 'Service Coin' you can start the game -with a single 'coin' no matter the Coingae Setting, but the credit is not +with a single 'coin' no matter the Coinage Setting, but the credit is not displayed. ***************************************************************************/ @@ -33,14 +33,18 @@ public: m_maincpu(*this, "maincpu"), m_hd63484(*this, "hd63484") { } + required_device<cpu_device> m_maincpu; + required_device<hd63484_device> m_hd63484; + DECLARE_WRITE16_MEMBER(shanghai_coin_w); DECLARE_READ16_MEMBER(kothello_hd63484_status_r); + virtual void video_start(); DECLARE_PALETTE_INIT(shanghai); - UINT32 screen_update_shanghai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(shanghai_interrupt); - required_device<cpu_device> m_maincpu; - required_device<hd63484_device> m_hd63484; + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + INTERRUPT_GEN_MEMBER(interrupt); }; @@ -78,7 +82,7 @@ void shanghai_state::video_start() { } -UINT32 shanghai_state::screen_update_shanghai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 shanghai_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x, y, b, src; @@ -125,7 +129,7 @@ UINT32 shanghai_state::screen_update_shanghai(screen_device &screen, bitmap_ind1 return 0; } -INTERRUPT_GEN_MEMBER(shanghai_state::shanghai_interrupt) +INTERRUPT_GEN_MEMBER(shanghai_state::interrupt) { device.execute().set_input_line_and_vector(0,HOLD_LINE,0x80); } @@ -419,14 +423,14 @@ static MACHINE_CONFIG_START( shanghai, shanghai_state ) MCFG_CPU_ADD("maincpu", V30, XTAL_16MHz/2) /* NEC D70116C-8 */ MCFG_CPU_PROGRAM_MAP(shanghai_map) MCFG_CPU_IO_MAP(shanghai_portmap) - MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, shanghai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(30) MCFG_SCREEN_SIZE(384, 280) MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 280-1) // Base Screen is 384 pixel - MCFG_SCREEN_UPDATE_DRIVER(shanghai_state, screen_update_shanghai) + MCFG_SCREEN_UPDATE_DRIVER(shanghai_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 256) @@ -455,14 +459,14 @@ static MACHINE_CONFIG_START( shangha2, shanghai_state ) MCFG_CPU_ADD("maincpu", V30, XTAL_16MHz/2) /* ? */ MCFG_CPU_PROGRAM_MAP(shangha2_map) MCFG_CPU_IO_MAP(shangha2_portmap) - MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, shanghai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, interrupt) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(30) MCFG_SCREEN_SIZE(384, 280) MCFG_SCREEN_VISIBLE_AREA(0, 384-1, 0, 280-1) // Base Screen is 384 pixel - MCFG_SCREEN_UPDATE_DRIVER(shanghai_state, screen_update_shanghai) + MCFG_SCREEN_UPDATE_DRIVER(shanghai_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 256) @@ -489,7 +493,7 @@ static MACHINE_CONFIG_START( kothello, shanghai_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", V30, XTAL_16MHz) MCFG_CPU_PROGRAM_MAP(kothello_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, shanghai_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", shanghai_state, interrupt) SEIBU3A_SOUND_SYSTEM_CPU(XTAL_16MHz/4) @@ -500,7 +504,7 @@ static MACHINE_CONFIG_START( kothello, shanghai_state ) MCFG_SCREEN_REFRESH_RATE(30) /* Should be 57Hz, but plays too fast */ MCFG_SCREEN_SIZE(384, 280) MCFG_SCREEN_VISIBLE_AREA(8, 384-1, 0, 250-1) // Base Screen is 376 pixel - MCFG_SCREEN_UPDATE_DRIVER(shanghai_state, screen_update_shanghai) + MCFG_SCREEN_UPDATE_DRIVER(shanghai_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 256) @@ -684,8 +688,8 @@ ROM_END -GAME( 1988, shanghai, 0, shanghai, shanghai, driver_device, 0, ROT0, "Sunsoft", "Shanghai (World)", GAME_IMPERFECT_GRAPHICS ) -GAME( 1988, shanghaij, shanghai, shanghai, shanghai, driver_device, 0, ROT0, "Sunsoft", "Shanghai (Japan)", GAME_IMPERFECT_GRAPHICS ) -GAME( 1989, shangha2, 0, shangha2, shangha2, driver_device, 0, ROT0, "Sunsoft", "Shanghai II (Japan, set 1)", 0 ) -GAME( 1989, shangha2a, shangha2, shangha2, shangha2, driver_device, 0, ROT0, "Sunsoft", "Shanghai II (Japan, set 2)", 0 ) -GAME( 1990, kothello, 0, kothello, kothello, driver_device, 0, ROT0, "Success", "Kyuukyoku no Othello", GAME_IMPERFECT_GRAPHICS ) +GAME( 1988, shanghai, 0, shanghai, shanghai, driver_device, 0, ROT0, "Sunsoft", "Shanghai (World)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) +GAME( 1988, shanghaij, shanghai, shanghai, shanghai, driver_device, 0, ROT0, "Sunsoft", "Shanghai (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) +GAME( 1989, shangha2, 0, shangha2, shangha2, driver_device, 0, ROT0, "Sunsoft", "Shanghai II (Japan, set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1989, shangha2a, shangha2, shangha2, shangha2, driver_device, 0, ROT0, "Sunsoft", "Shanghai II (Japan, set 2)", GAME_SUPPORTS_SAVE ) +GAME( 1990, kothello, 0, kothello, kothello, driver_device, 0, ROT0, "Success", "Kyuukyoku no Othello", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/shangkid.c b/src/mame/drivers/shangkid.c index a554facbc14..6b106733c0e 100644 --- a/src/mame/drivers/shangkid.c +++ b/src/mame/drivers/shangkid.c @@ -122,7 +122,7 @@ READ8_MEMBER(shangkid_state::soundlatch_r) DRIVER_INIT_MEMBER(shangkid_state,chinhero) { m_gfx_type = 0; - + save_item(NAME(m_bbx_sound_enable)); save_item(NAME(m_sound_latch)); } @@ -134,7 +134,7 @@ DRIVER_INIT_MEMBER(shangkid_state,shangkid) /* set up banking */ membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x8000, 0x8000); membank("bank2")->configure_entries(0, 2, memregion("audiocpu")->base() + 0x0000, 0x10000); - + save_item(NAME(m_bbx_sound_enable)); save_item(NAME(m_sound_latch)); } diff --git a/src/mame/drivers/sigmab52.c b/src/mame/drivers/sigmab52.c index a46c5927cad..0b4d664496e 100644 --- a/src/mame/drivers/sigmab52.c +++ b/src/mame/drivers/sigmab52.c @@ -390,11 +390,11 @@ INPUT_CHANGED_MEMBER( sigmab52_state::coin_drop_start ) static INPUT_PORTS_START( jwildb52 ) PORT_START("IN0") PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 5 - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 4 - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 3 - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 2 - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 1 + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x50, EQUALS, 0x00) PORT_NAME("Double") PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW1", 0x50, EQUALS, 0x00) PORT_NAME("Deal / Draw") @@ -428,16 +428,16 @@ static INPUT_PORTS_START( jwildb52 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Machine Door") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Weight Switch") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 1 PORT_START("IN2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Attendant Call") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 2 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Drop Door") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CODE(KEYCODE_2_PAD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 3 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 4 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) // Hold 5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Meter Wire") PORT_START("IN3") @@ -533,12 +533,24 @@ static INPUT_PORTS_START( jwildb52 ) PORT_DIPNAME( 0x40, 0x40, "DSW2-9" ) PORT_DIPLOCATION("SW2:9") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "DSW2-10" ) PORT_DIPLOCATION("SW2:10") + PORT_DIPNAME( 0x80, 0x00, "DSW2-10" ) PORT_DIPLOCATION("SW2:10") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END +static INPUT_PORTS_START( s8waysfc ) + PORT_INCLUDE( jwildb52 ) + + PORT_MODIFY("IN0") + PORT_BIT( 0x07ff, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Start") + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Max Bet") + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("One Bet") + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Collect / Payout") +INPUT_PORTS_END + /************************* * Machine Start * @@ -554,6 +566,7 @@ void sigmab52_state::machine_reset() m_bank1->set_entry(1); m_coin_start_cycles = 0; m_hopper_start_cycles = 0; + m_audiocpu_cmd_irq = CLEAR_LINE; } /************************* @@ -583,7 +596,7 @@ static MACHINE_CONFIG_START( jwildb52, sigmab52_state ) MCFG_SCREEN_REFRESH_RATE(30) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(1024, 1024) - MCFG_SCREEN_VISIBLE_AREA(0, 512-1, 0, 384-1) + MCFG_SCREEN_VISIBLE_AREA(0, 544-1, 0, 436-1) MCFG_SCREEN_UPDATE_DEVICE("hd63484", h63484_device, update_screen) MCFG_SCREEN_PALETTE("palette") @@ -625,13 +638,13 @@ ROM_START( jwildb52a ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "sigm_wrk.bin", 0x00000, 0x10000, CRC(15c83c6c) SHA1(7a05bd94ea8b1ad051fbe6580a6550d4bb47dd15) ) - /* No gfx & sound dumps. Using the ones from parent set for now... */ - ROM_REGION16_BE( 0x40000, "gfx1", 0 ) - ROM_LOAD32_BYTE( "cards_2001-1.ic45", 0x00003, 0x10000, BAD_DUMP CRC(7664455e) SHA1(c9f129060e63b9ac9058ab94208846e4dc578ead) ) - ROM_LOAD32_BYTE( "cards_2001-2.ic46", 0x00001, 0x10000, BAD_DUMP CRC(c1455d64) SHA1(ddb576ba471b5d2faa415ec425615cf5f9d87911) ) - ROM_LOAD32_BYTE( "cards_2001-3.ic47", 0x00000, 0x10000, BAD_DUMP CRC(cb2ece6e) SHA1(f2b6949085fe395d0fdd16322a880ec87e2efd50) ) - ROM_LOAD32_BYTE( "cards_2001-4.ic48", 0x00002, 0x10000, BAD_DUMP CRC(8131d236) SHA1(8984aa1f2af70df41973b61df17f184796a2ffe9) ) + ROM_LOAD32_BYTE( "c-1416-1.ic45", 0x00003, 0x10000, CRC(02a0b517) SHA1(5a0818a174683f791ca885bfdfd7555616c80758) ) + ROM_LOAD32_BYTE( "c-1416-2.ic46", 0x00001, 0x10000, CRC(3196e486) SHA1(2d264e518083ff05d1a1eb7f8e1649feb70349e7) ) + ROM_LOAD32_BYTE( "c-1416-3.ic47", 0x00000, 0x10000, CRC(1c9a2939) SHA1(e18fdf9a656687db47ac00700e7721c3d8e800c5) ) + ROM_LOAD32_BYTE( "c-1416-4.ic48", 0x00002, 0x10000, CRC(7bd8bf78) SHA1(ddacbb75df14a343e69949dcaa14ce1a7ec8407a) ) + + /* No sound dumps. Using the ones from parent set for now... */ ROM_REGION( 0x8000, "audiocpu", 0 ) ROM_LOAD( "sound-01-00.43", 0x0000, 0x8000, BAD_DUMP CRC(2712d44c) SHA1(295526b27676cd97cbf111d47305d63c2b3ea50d) ) @@ -659,6 +672,26 @@ ROM_START( jwildb52h ) ROM_END +ROM_START( s8waysfc ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "dv98103.011", 0x00000, 0x10000, CRC(416190a1) SHA1(e2738644efc6c2adcea2470b482f3f818ed9af8d) ) + + ROM_REGION16_BE( 0x40000, "gfx1", 0 ) + ROM_LOAD32_BYTE( "symb112.1", 0x00003, 0x10000, CRC(b09bd4f5) SHA1(af04845e84cb381f9babe088884b5bbab927a326) ) + ROM_LOAD32_BYTE( "symb112.2", 0x00001, 0x10000, CRC(462a2d55) SHA1(3157893d150b98c80c0045f78cb2520e8b3ce4eb) ) + ROM_LOAD32_BYTE( "symb112.3", 0x00000, 0x10000, CRC(be0c2e64) SHA1(82de83fc4754ff73e80e22187b7fba041832613e) ) + ROM_LOAD32_BYTE( "symb112.4", 0x00002, 0x10000, CRC(f9d8529c) SHA1(7cd54bda71fb38c7bcbea42be4e322aec0581964) ) + + ROM_REGION( 0x8000, "audiocpu", 0 ) + ROM_LOAD( "v-slot02.00", 0x00000, 0x08000, CRC(bc1eec0a) SHA1(300ebfbd314c58b434bb20a5c3c8f7463b424207) ) + + /* No prom dumps. Using the ones from jwildb52 for now... */ + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "mb7118.41", 0x0000, 0x0100, CRC(b362f9e2) SHA1(3963b40389ed6584e4cd96ab48849552857d99af) ) +ROM_END + + /************************* * Driver Init * *************************/ @@ -673,6 +706,7 @@ DRIVER_INIT_MEMBER(sigmab52_state,jwildb52) *************************/ /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ -GAMEL( 199?, jwildb52, 0, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 1)", GAME_NO_SOUND | GAME_NOT_WORKING, layout_sigmab52 ) -GAMEL( 199?, jwildb52a, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 2)", GAME_NO_SOUND | GAME_NOT_WORKING, layout_sigmab52 ) -GAMEL( 199?, jwildb52h, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, Harrah's GFX)", GAME_NO_SOUND | GAME_NOT_WORKING, layout_sigmab52 ) +GAMEL( 199?, jwildb52, 0, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 1)", GAME_NOT_WORKING, layout_sigmab52 ) +GAMEL( 199?, jwildb52a, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, set 2)", GAME_NOT_WORKING, layout_sigmab52 ) +GAMEL( 199?, jwildb52h, jwildb52, jwildb52, jwildb52, sigmab52_state, jwildb52, ROT0, "Sigma", "Joker's Wild (B52 system, Harrah's GFX)", GAME_NOT_WORKING, layout_sigmab52 ) +GAME ( 199?, s8waysfc, 0, jwildb52, s8waysfc, sigmab52_state, jwildb52, ROT0, "Sigma", "Super 8 Ways FC (Fruit combination)", GAME_NOT_WORKING ) diff --git a/src/mame/drivers/sigmab98.c b/src/mame/drivers/sigmab98.c index d7b93f5a1dd..e6468423f32 100644 --- a/src/mame/drivers/sigmab98.c +++ b/src/mame/drivers/sigmab98.c @@ -21,14 +21,14 @@ http://www.nicozon.net/watch/sm14334996 Dumped games: -1997 Minna Atsumare! Dodge Hero b9802 https://youtu.be/2eXDQnKCT6A -1997 Itazura Daisuki! Sushimaru Kun b9803 https://youtu.be/nhvbZ71KWr8 -1997 GeGeGe no Kitarou Youkai Slot b9804 -1997 Burning Sanrinsya b9805 -1997 PEPSI Man b9806 https://youtu.be/p3cbZ67m4lo -1998 Transformers Beast Wars II b9808 -1997 Uchuu Tokkyuu Medalian b9809 https://youtu.be/u813kBOZbwI -2000 Minna Ganbare! Dash Hero b9811 +1997 Minna Atsumare! Dodge Hero b9802 https://youtu.be/2eXDQnKCT6A +1997 Itazura Daisuki! Sushimaru Kun b9803 https://youtu.be/nhvbZ71KWr8 +1997 GeGeGe no Kitarou Youkai Slot b9804 +1997 Burning Sanrinsya b9805 +1997 PEPSI Man b9806 https://youtu.be/p3cbZ67m4lo +1998 Transformers Beast Wars II b9808 +1997 Uchuu Tokkyuu Medalian b9809 https://youtu.be/u813kBOZbwI +2000 Minna Ganbare! Dash Hero b9811 -------------------------------------------------------------------------------------- @@ -48,11 +48,11 @@ is "Treasure Fall" (despite the cart label is "Treasure Hall"). Dumped games: -2000 Animal Catch https://youtu.be/U4L5EwWbxqw -2000 Itazura Monkey https://youtu.be/GHxiqUQRpV8 -2000 Pye-nage Taikai https://youtu.be/oL2OIbrv-KI -2000 Taihou de Doboon https://youtu.be/loPP3jt0Ob0 -2001 Hae Hae Ka Ka Ka https://youtu.be/37IxYCg0tic +2000 Animal Catch https://youtu.be/U4L5EwWbxqw +2000 Itazura Monkey https://youtu.be/GHxiqUQRpV8 +2000 Pye-nage Taikai https://youtu.be/oL2OIbrv-KI +2000 Taihou de Doboon https://youtu.be/loPP3jt0Ob0 +2001 Hae Hae Ka Ka Ka https://youtu.be/37IxYCg0tic Games with the same cabinet which might be on the same hardware: @@ -127,10 +127,10 @@ public: { } required_device<cpu_device> m_maincpu; - optional_device<buffered_spriteram8_device> m_buffered_spriteram; // not on sammymdl? - optional_shared_ptr<UINT8> m_spriteram; // optional as some games allocate it themselves (due to banking) - optional_shared_ptr<UINT8> m_vregs; // optional as some games allocate it themselves (due to banking) - optional_shared_ptr<UINT8> m_vtable; // optional as some games allocate it themselves (due to banking) + optional_device<buffered_spriteram8_device> m_buffered_spriteram; // not on sammymdl? + optional_shared_ptr<UINT8> m_spriteram; // optional as some games allocate it themselves (due to banking) + optional_shared_ptr<UINT8> m_vregs; // optional as some games allocate it themselves (due to banking) + optional_shared_ptr<UINT8> m_vtable; // optional as some games allocate it themselves (due to banking) required_shared_ptr<UINT8> m_nvram; required_device<eeprom_serial_93cxx_device> m_eeprom; required_device<gfxdecode_device> m_gfxdecode; @@ -316,9 +316,9 @@ void sigmab98_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec sy = (s[ 0x06 ] & 0x03) * 256 + s[ 0x07 ]; - zoom = (s[ 0x08 ] & 0xff) * 256 + s[ 0x09 ]; // 0x100 means no zoom + zoom = (s[ 0x08 ] & 0xff) * 256 + s[ 0x09 ]; // 0x100 means no zoom -// rot = (s[ 0x0a ] & 0xff) * 256 + s[ 0x0b ]; // unimplemented! +// rot = (s[ 0x0a ] & 0xff) * 256 + s[ 0x0b ]; // unimplemented! dx = (s[ 0x0c ] & 0xff) * 256 + s[ 0x0d ]; dy = (s[ 0x0e ] & 0xff) * 256 + s[ 0x0f ]; @@ -430,7 +430,7 @@ WRITE8_MEMBER(sigmab98_state::vregs_w) switch (offset) { - case 0x1b: // background color + case 0x1b: // background color case 0x1d: { int x = (m_vregs[0x1d] << 8) + m_vregs[0x1b]; @@ -440,8 +440,8 @@ WRITE8_MEMBER(sigmab98_state::vregs_w) m_palette->set_pen_color(0x100, pal5bit(r), pal5bit(g), pal5bit(b)); break; } -// default: -// logerror("%s: unknown video reg written: %02x = %02x\n", machine().describe_context(), offset, data); +// default: +// logerror("%s: unknown video reg written: %02x = %02x\n", machine().describe_context(), offset, data); } } @@ -460,13 +460,13 @@ READ8_MEMBER(sigmab98_state::d013_r) // bit 5 must go 0->1 (vblank?) // bit 2 must set (sprite buffered? triggered by pulsing bit 3 of port C6?) return (m_screen->vblank() ? 0x20 : 0) | 0x04; -// return machine().rand(); +// return machine().rand(); } READ8_MEMBER(sigmab98_state::d021_r) { // bit 5 must be 0? return 0; -// return machine().rand(); +// return machine().rand(); } @@ -587,7 +587,7 @@ static ADDRESS_MAP_START( dodghero_mem_map, AS_PROGRAM, 8, sigmab98_state ) AM_RANGE( 0xd813, 0xd813 ) AM_READ(d013_r) AM_RANGE( 0xd821, 0xd821 ) AM_READ(d021_r) AM_RANGE( 0xd800, 0xd821 ) AM_READWRITE(vregs_r, vregs_w) AM_SHARE("vregs") - AM_RANGE( 0xd800, 0xdfff ) AM_RAMBANK("rambank") // not used, where is it mapped? + AM_RANGE( 0xd800, 0xdfff ) AM_RAMBANK("rambank") // not used, where is it mapped? AM_RANGE( 0xe000, 0xefff ) AM_RAM AM_SHARE("nvram") // battery @@ -877,9 +877,9 @@ static ADDRESS_MAP_START( dashhero_io_map, AS_IO, 8, sigmab98_state ) // AM_RANGE( 0xa2, 0xa3 ) AM_RANGE( 0xa4, 0xa5 ) AM_READWRITE(dashhero_regs2_r, dashhero_regs2_w ) - AM_RANGE( 0xc0, 0xc0 ) AM_READ_PORT( "EEPROM" ) AM_WRITE(eeprom_w) + AM_RANGE( 0xc0, 0xc0 ) AM_READ_PORT( "EEPROM" ) AM_WRITE(eeprom_w) AM_RANGE( 0xc2, 0xc2 ) AM_READ_PORT( "BUTTON" ) - AM_RANGE( 0xc4, 0xc4 ) AM_READ_PORT( "PAYOUT" ) AM_WRITE(c4_w ) + AM_RANGE( 0xc4, 0xc4 ) AM_READ_PORT( "PAYOUT" ) AM_WRITE(c4_w ) AM_RANGE( 0xc6, 0xc6 ) AM_WRITE(c6_w ) AM_RANGE( 0xc8, 0xc8 ) AM_WRITE(c8_w ) @@ -1401,7 +1401,7 @@ WRITE8_MEMBER(sigmab98_state::itazuram_rombank_w) m_rombank = data; switch (data) { -// case 0x0f: // demo mode, after title +// case 0x0f: // demo mode, after title case 0x14: // 3800 IS ROM membank("rombank0")->set_base(rom + 0x8000); @@ -1433,7 +1433,7 @@ WRITE8_MEMBER(sigmab98_state::itazuram_rombank_w) membank("sprbank1")->set_base(m_spriteram + 0x1000*4); // scratch break; - // used in test mode: + // used in test mode (code at 2cc4): // case 0x5c: membank("rombank")->set_base(rom + 0x400 + 0x0000); break; // 3800 IS RAM! (8000 bytes) case 0x5e: // 3800 IS RAM! (1404 bytes) @@ -1465,6 +1465,13 @@ WRITE8_MEMBER(sigmab98_state::itazuram_rombank_w) membank("sprbank1")->set_base(m_spriteram + 0x1000*4); // scratch break; + case 0x16: // 3800 IS ROM + membank("rombank0")->set_base(rom + 0xa800); + membank("rombank1")->set_base(rom + 0xb800); + membank("sprbank0")->set_base(m_spriteram + 0x1000*4); // scratch + membank("sprbank1")->set_base(m_spriteram + 0x1000*4); // scratch + break; + default: logerror("%s: unknown rom bank = %02x, reg = %02x\n", machine().describe_context(), data, m_reg); } @@ -2074,7 +2081,7 @@ static MACHINE_CONFIG_DERIVED( dashhero, sigmab98 ) MCFG_CPU_PROGRAM_MAP( gegege_mem_map ) MCFG_CPU_IO_MAP( dashhero_io_map ) - MCFG_DEVICE_REMOVE("nvram") // FIXME: does not survive between sessions otherwise + MCFG_DEVICE_REMOVE("nvram") // FIXME: does not survive between sessions otherwise MACHINE_CONFIG_END @@ -2128,7 +2135,7 @@ static MACHINE_CONFIG_START( sammymdl, sigmab98_state ) MCFG_PALETTE_FORMAT(xRRRRRGGGGGBBBBB) MCFG_PALETTE_ENDIANNESS(ENDIANNESS_BIG) -// MCFG_BUFFERED_SPRITERAM8_ADD("spriteram") +// MCFG_BUFFERED_SPRITERAM8_ADD("spriteram") // sound hardware MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") @@ -2284,12 +2291,12 @@ DRIVER_INIT_MEMBER(sigmab98_state,gegege) UINT8 *rom = memregion("maincpu")->base(); // Related to d013 -// rom[0x0bdd] = 0xc9; +// rom[0x0bdd] = 0xc9; -// rom[0x0bf9] = 0xc9; +// rom[0x0bf9] = 0xc9; -// rom[0x0dec] = 0x00; -// rom[0x0ded] = 0x00; +// rom[0x0dec] = 0x00; +// rom[0x0ded] = 0x00; // EEPROM timing checks rom[0x8138] = 0x00; @@ -2371,12 +2378,12 @@ DRIVER_INIT_MEMBER(sigmab98_state,pepsiman) UINT8 *rom = memregion("maincpu")->base(); // Related to d013 -// rom[0x058a] = 0xc9; +// rom[0x058a] = 0xc9; -// rom[0x05a6] = 0xc9; +// rom[0x05a6] = 0xc9; -// rom[0xa00e] = 0x00; -// rom[0xa00f] = 0x00; +// rom[0xa00e] = 0x00; +// rom[0xa00f] = 0x00; // EEPROM timing checks rom[0x8138] = 0x00; @@ -2462,12 +2469,12 @@ DRIVER_INIT_MEMBER(sigmab98_state,ucytokyu) UINT8 *rom = memregion("maincpu")->base(); // Related to d013 -// rom[0x0bfa] = 0xc9; +// rom[0x0bfa] = 0xc9; -// rom[0x0c16] = 0xc9; +// rom[0x0c16] = 0xc9; -// rom[0xa43a] = 0x00; -// rom[0xa43b] = 0x00; +// rom[0xa43a] = 0x00; +// rom[0xa43b] = 0x00; // EEPROM timing checks rom[0x8138] = 0x00; diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c index cc2d667a4e1..bd2a13f63ac 100644 --- a/src/mame/drivers/snowbros.c +++ b/src/mame/drivers/snowbros.c @@ -61,6 +61,15 @@ These appear to have clipping problems on the left / right edges, but this may be correct, the sprites which should be drawn there are simply blanked out of the sprite list at that point.. (verify on real hw) +Ma Cheon Ru + +The electrified maze + ball minigame appears unreponsive to controls, this +is because it actually requires you to move the joysticks in a circular +motion through all 8 directions at a very even speed, a task which is +practically impossible to perform on keyboard, and not even that easy with +a joystick. This is not an emulation bug. + + ***************************************************************************/ #include "emu.h" @@ -2718,7 +2727,7 @@ GAME( 1997, pzlbreak, 0, semiprot, pzlbreak, snowbros_state, pzlbreak GAME( 1997, suhosong, 0, semiprot, suhosong, driver_device, 0, ROT0, "SemiCom", "Su Ho Seong", GAME_SUPPORTS_SAVE ) GAME( 1997, twinkle, 0, semiprot, twinkle, driver_device, 0, ROT0, "SemiCom", "Twinkle", GAME_SUPPORTS_SAVE ) GAME( 1998, 3in1semi, 0, semiprot, moremore, snowbros_state, 3in1semi, ROT0, "SemiCom", "XESS - The New Revolution (SemiCom 3-in-1)", GAME_SUPPORTS_SAVE ) -GAME( 1999, mcheonru, 0, semiprot, mcheonru, snowbros_state, 3in1semi, ROT0, "SemiCom", "Ma Cheon Ru", GAME_SUPPORTS_SAVE ) // the 'electrified maze' minigame seems to be broken, controls don't work, is it an original game bug? +GAME( 1999, mcheonru, 0, semiprot, mcheonru, snowbros_state, 3in1semi, ROT0, "SemiCom", "Ma Cheon Ru", GAME_SUPPORTS_SAVE ) GAME( 1999, moremore, 0, semiprot, moremore, snowbros_state, 3in1semi, ROT0, "SemiCom / Exit", "More More", GAME_SUPPORTS_SAVE ) GAME( 1999, moremorp, 0, semiprot, moremore, snowbros_state, 3in1semi, ROT0, "SemiCom / Exit", "More More Plus", GAME_SUPPORTS_SAVE ) // This is very similar to the SemiCom titles, but unprotected. diff --git a/src/mame/drivers/spoker.c b/src/mame/drivers/spoker.c index 3d8eb5c3489..8882971ca9a 100644 --- a/src/mame/drivers/spoker.c +++ b/src/mame/drivers/spoker.c @@ -39,7 +39,7 @@ public: required_device<gfxdecode_device> m_gfxdecode; required_device<screen_device> m_screen; required_device<palette_device> m_palette; - + required_shared_ptr<UINT8> m_bg_tile_ram; tilemap_t *m_bg_tilemap; @@ -78,7 +78,7 @@ public: TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/drivers/ssfindo.c b/src/mame/drivers/ssfindo.c index 70d609bb88e..00e0b1f5fa0 100644 --- a/src/mame/drivers/ssfindo.c +++ b/src/mame/drivers/ssfindo.c @@ -235,7 +235,7 @@ public: // driver init configuration UINT32 m_flashType; int m_iocr_hack; - + // common UINT32 m_PS7500_IO[MAXIO]; UINT32 m_PS7500_FIFO[256]; @@ -888,7 +888,7 @@ DRIVER_INIT_MEMBER(ssfindo_state,common) m_speedup = 0; m_PS7500timer0 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ssfindo_state::PS7500_Timer0_callback),this)); m_PS7500timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ssfindo_state::PS7500_Timer1_callback),this)); - + save_item(NAME(m_PS7500_IO)); save_item(NAME(m_PS7500_FIFO)); } diff --git a/src/mame/drivers/ssv.c b/src/mame/drivers/ssv.c index 8ebeae48d5a..adb43fc2c89 100644 --- a/src/mame/drivers/ssv.c +++ b/src/mame/drivers/ssv.c @@ -411,11 +411,12 @@ READ16_MEMBER(ssv_state::fake_r){ return ssv_scroll[offset]; } AM_RANGE(0x260000, 0x260001) AM_WRITE(irq_enable_w) /* IRQ En */ \ AM_RANGE(0x300000, 0x30007f) AM_DEVREADWRITE8("ensoniq", es5506_device, read, write, 0x00ff) /* Sound */ \ AM_RANGE(_ROM, 0xffffff) AM_ROM AM_REGION("maincpu", 0) /* ROM */ + /*************************************************************************** Drift Out '94 ***************************************************************************/ -READ16_MEMBER(ssv_state::drifto94_rand_r) +READ16_MEMBER(ssv_state::drifto94_unknown_r) { return machine().rand() & 0xffff; } @@ -427,8 +428,8 @@ static ADDRESS_MAP_START( drifto94_map, AS_PROGRAM, 16, ssv_state ) AM_RANGE(0x482000, 0x482fff) AM_READWRITE(dsp_r, dsp_w) AM_RANGE(0x483000, 0x485fff) AM_WRITENOP // ? AM_RANGE(0x500000, 0x500001) AM_WRITENOP // ?? - AM_RANGE(0x510000, 0x510001) AM_READ(drifto94_rand_r ) // ?? - AM_RANGE(0x520000, 0x520001) AM_READ(drifto94_rand_r ) // ?? + AM_RANGE(0x510000, 0x510001) AM_READ(drifto94_unknown_r) // ?? + AM_RANGE(0x520000, 0x520001) AM_READ(drifto94_unknown_r) // ?? AM_RANGE(0x580000, 0x5807ff) AM_RAM AM_SHARE("nvram") // NVRAM SSV_MAP( 0xc00000 ) ADDRESS_MAP_END diff --git a/src/mame/drivers/suprnova.c b/src/mame/drivers/suprnova.c index 8934acfb03b..3c8dbd68caf 100644 --- a/src/mame/drivers/suprnova.c +++ b/src/mame/drivers/suprnova.c @@ -998,7 +998,7 @@ DRIVER_INIT_MEMBER(skns_state,galpans3) { machine().device<sknsspr_device>("sp ROM_SYSTEM_BIOS( 4, "korea", "Korea" ) \ ROM_LOAD_BIOS( 4, "sknsk1.u10", 0x000000, 0x080000, CRC(ff1c9f79) SHA1(a51e598d43e76d37da69b1f094c111273bdfc94a) ) \ ROM_SYSTEM_BIOS( 5, "japanmod", "Japan (No Region Lock)" ) /* hack */ \ - ROM_LOAD_BIOS( 5, "supernova_modbios.u10", 0x000000, 0x080000, CRC(b8d3190c) SHA1(62c9a4a075fd944e89fe95c6b46046101eb6de1c) ) + ROM_LOAD_BIOS( 5, "supernova_modbios.u10", 0x000000, 0x080000, CRC(b8d3190c) SHA1(62c9a4a075fd944e89fe95c6b46046101eb6de1c) ) #define SKNS_JAPAN \ SKNS_BIOS \ diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index 9a74bd79f73..612ad6fb40e 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -2745,6 +2745,34 @@ ROM_START( spatter ) /* pr-5317.106 */ ROM_END +ROM_START( spattera ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "epr-6597.116", 0x0000, 0x4000, BAD_DUMP CRC(be80384d) SHA1(9e1f5807492b98c3f36a5b80466dcb2a1f1fead8) ) /* encrypted */ // consistent read, but fails ingame ROM check on PCB + ROM_LOAD( "epr-6598.109", 0x4000, 0x4000, CRC(5dff037a) SHA1(8e6f6b75a89609ab0498d317c11e6d653343ffbe) ) /* encrypted */ + ROM_LOAD( "epr-6599.96", 0x8000, 0x4000, CRC(7ba9de5b) SHA1(f18542c95e8241433ed995c213924ad1ce03cd5b) ) + + ROM_REGION( 0x10000, "soundcpu", 0 ) + ROM_LOAD( "epr-6316.120", 0x0000, 0x2000, CRC(1df95511) SHA1(5780631c8c5a2c3fcd4085f217affa660d72a4e9) ) + + ROM_REGION( 0xc000, "tiles", 0 ) + ROM_LOAD( "epr-6328.62", 0x0000, 0x2000, CRC(a2bf2832) SHA1(5d7047a6a0c0588a4e98b6ce94d5fd0e6ab963f9) ) + ROM_LOAD( "epr-6397.61", 0x2000, 0x2000, CRC(c60d4471) SHA1(9e8130d575fa342485dfe093e086a4b48e51b904) ) + ROM_LOAD( "epr-6326.64", 0x4000, 0x2000, CRC(269fbb4c) SHA1(7b91f551360698195bf9ce8e32dd2e8fa17e9db8) ) + ROM_LOAD( "epr-6396.63", 0x6000, 0x2000, CRC(c15ccf3b) SHA1(14809ab81816eedb85cacda042e437d48cf9b31a) ) + ROM_LOAD( "epr-6324.66", 0x8000, 0x2000, CRC(8ab3b563) SHA1(6ede93b9f1593dbcbabd6c875bac8ec01a1b40a2) ) + ROM_LOAD( "epr-6395.65", 0xa000, 0x2000, CRC(3f083065) SHA1(cb17c8c2fe04baa58863c10cd8f359a58def3417) ) + + ROM_REGION( 0x10000, "sprites", 0 ) + ROM_LOAD( "epr-6306.04", 0x0000, 0x4000, CRC(e871e132) SHA1(55f7ab1a8c9a118911c64930452ea05f6ee37fc4) ) + ROM_LOAD( "epr-6308.117", 0x4000, 0x4000, CRC(99c2d90e) SHA1(5be54d931622892b7acc320e714d5b1cdce02d19) ) + ROM_LOAD( "epr-6307.05", 0x8000, 0x4000, CRC(0a5ad543) SHA1(5acada30c1affc4ffbebc8365a9ba4465f213d47) ) + ROM_LOAD( "epr-6309.110", 0xc000, 0x4000, CRC(7423ad98) SHA1(e19b4c64795f30e1491520160d315e4148d58df2) ) + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) + /* pr-5317.106 */ +ROM_END + ROM_START( ssanchan ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "epr-6310.116", 0x0000, 0x4000, CRC(26b43701) SHA1(e041bde10da12a3f698da09220f0a7cc2ee99abe) ) /* encrypted */ @@ -3660,9 +3688,8 @@ ROM_START( raflesia ) ROM_LOAD( "epr-7410.05", 0xc000, 0x4000, CRC(ced74789) SHA1(d0ad845bfe83412ac8d43125e1c50d0581a5b47e) ) /* epr-7410.2 */ ROM_REGION( 0x0100, "proms", 0 ) - ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) - /* pr-5317.106 */ -ROM_END + ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* pr-5317.106 */ + ROM_END ROM_START( wboy ) @@ -3692,11 +3719,17 @@ ROM_START( wboy ) ROM_LOAD( "pr-5317.76", 0x0000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) ROM_END + +/* Wonder Boy (Escape, Sega license) +PCB: 834-3984-09 WONDER BOY +CPU: 317-0003 (encrypted Z80 @ IC137) +PAL: 315-5063 (PAL @ IC67) +*/ ROM_START( wboyo ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "epr-.116", 0x0000, 0x4000, CRC(51d27534) SHA1(1cbc7201aacde89857f83b2600f309b514c5e758) ) /* encrypted */ - ROM_LOAD( "epr-.109", 0x4000, 0x4000, CRC(e29d1cd1) SHA1(f6ff4a6fffea77cc5706549bb2d8bf9e96ed0be0) ) /* encrypted */ - ROM_LOAD( "epr-7491.96", 0x8000, 0x4000, CRC(1f7d0efe) SHA1(a1b4f8faf1614f4808df1292209c340f1490adbd) ) + ROM_LOAD( "epr-7532.116", 0x0000, 0x4000, CRC(51d27534) SHA1(1cbc7201aacde89857f83b2600f309b514c5e758) ) /* encrypted */ + ROM_LOAD( "epr-7533.109", 0x4000, 0x4000, CRC(e29d1cd1) SHA1(f6ff4a6fffea77cc5706549bb2d8bf9e96ed0be0) ) /* encrypted */ + ROM_LOAD( "epr-7534.96", 0x8000, 0x4000, CRC(1f7d0efe) SHA1(a1b4f8faf1614f4808df1292209c340f1490adbd) ) /* same contents as epr-7491.96 */ ROM_REGION( 0x10000, "soundcpu", 0 ) ROM_LOAD( "epr-7498.120", 0x0000, 0x2000, CRC(78ae1e7b) SHA1(86032f443359b0bb2766e33024ed2e320aa9bc84) ) @@ -4873,7 +4906,8 @@ GAME( 1986, nobb, nob, nob, nob, system1_state, nobb, GAME( 1984, flicky, 0, sys1pio, flicky, system1_state, flicky, ROT0, "Sega", "Flicky (128k Version, System 2, 315-5051)", GAME_SUPPORTS_SAVE ) GAME( 1984, flickys2, flicky, sys1pio, flickys2, system1_state, bank00, ROT0, "Sega", "Flicky (128k Version, System 2, not encrypted)", GAME_SUPPORTS_SAVE ) GAME( 1984, thetogyu, bullfgt, sys1pio, bullfgt, system1_state, bullfgtj, ROT0, "Coreland / Sega", "The Togyu (315-5065, Japan)", GAME_SUPPORTS_SAVE ) -GAME( 1984, spatter, 0, sys1pios, spatter, system1_state, spatter, ROT0, "Sega", "Spatter", GAME_SUPPORTS_SAVE ) +GAME( 1984, spatter, 0, sys1pios, spatter, system1_state, spatter, ROT0, "Sega", "Spatter (set 1)", GAME_SUPPORTS_SAVE ) +GAME( 1984, spattera, spatter, sys1pios, spatter, system1_state, spatter, ROT0, "Sega", "Spatter (315-5099)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) GAME( 1984, ssanchan, spatter, sys1pios, spatter, system1_state, spatter, ROT0, "Sega", "Sanrin San Chan (Japan)", GAME_SUPPORTS_SAVE ) GAME( 1985, pitfall2, 0, sys1pio, pitfall2, system1_state, pitfall2, ROT0, "Sega", "Pitfall II (315-5093)", GAME_SUPPORTS_SAVE ) GAME( 1985, pitfall2a, pitfall2, sys1pio, pitfall2, system1_state, pitfall2, ROT0, "Sega", "Pitfall II (315-5093, Flicky Conversion)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/taitoair.c b/src/mame/drivers/taitoair.c index 7acd3109cfd..b7e61c91d2a 100644 --- a/src/mame/drivers/taitoair.c +++ b/src/mame/drivers/taitoair.c @@ -639,8 +639,8 @@ void taitoair_state::machine_start() for (int i = 0; i < TAITOAIR_POLY_MAX_PT; i++) { - state_save_register_item(machine(), "globals", NULL, i, m_q.p[i].x); - state_save_register_item(machine(), "globals", NULL, i, m_q.p[i].y); + save_item(NAME(m_q.p[i].x), i); + save_item(NAME(m_q.p[i].y), i); } } diff --git a/src/mame/drivers/taitotx.c b/src/mame/drivers/taitotx.c index 36337f05233..ba7f95f3fff 100644 --- a/src/mame/drivers/taitotx.c +++ b/src/mame/drivers/taitotx.c @@ -23,58 +23,81 @@ - Taito's NESiCA Live platform probably comes after this, but as it's likely impossible to ever emulate it. - - Prelim game lists (system16.com) + - Preliminary game lists (mainly from system16.com) Taito Type X games Chaos Breaker / Dark Awake Datacarddass Dragon Ball Z - Dinoking III + Dinoking III Allosaurus Dinomax - Dragon Quest Monster: Battle Road + Dragon Quest - Monster Battle Road + Dragon Quest - Monster Battle Road II Legends Gigawing Generations + Goketsuji Ichizoku: Matsuri Senzo Kuyou Harakari Professional Baseball Homura King Of Jurassic + KOF Sky Stage + Matrimelee Matsuri / Power Instinct V Raiden III Raiden IV Shikigami No Shiro III / The Castle of Shikigami III Spica Adventure Taisen Hot Gimmick 5 Taisen Hot Gimmick Mix Party - Tetris The Grand Master 3 : Terror Instinct + Tetris The Grand Master 3 - Terror-Instinct The King of Fighters 98 Ultimate Match - Trouble Witches + Trouble Witches AC Usagi Online + Valve Limit R Zoids Card Colosseum Taito Type X+ games + Battle Gear 4 Battle Gear 4 Tuned Half Life 2 Survivor + Mobile Suit Gundam - Spirits of Zeon Senshi no Kioku War Of The Grail - Taito Type X2 games - + Battle Fantasia BlazBlue: Calamity Trigger + BlazBlue: Chrono Phantasma BlazBlue: Continuum Shift BlazBlue: Continuum Shift Extend BlazBlue: Continuum Shift II Chase H.Q. 2 / Chase H. Q. : Nancy Yori Kinkyuu Renraku + Chou Chabudai Gaeshi! + Chou Chabudai Gaeshi! 2 + Chou Chabudai Gaeshi! Kyojin No Hoshi + Cyber Diver D1GP Arcade - Dariusburst AC + Dariusburst - Another Chronicle + Dariusburst - Another Chronicle EX Elevator Action Death Parade + Gunslinger Stratos Half Life 2: Survivor Ver. 2.0 + Haunted Museum / Panic Museum + Haunted Museum II / Panic Museum II + Hopping Kids + Hopping Road KOF Maximum Impact: Regulation A KOF Maximum Impact: Regulation A2 + Lord Of Vermilion Re:2 Matrimelee Matsuri / Power Instinct V + P4U - Persona 4 The Ultimate In Mayonaka Arena + P4U - Persona 4 The Ultimax Ultra Suplex Hold Samurai Spirits Sen / Samurai Shodown: Edge of Destiny + Senko no Ronde DUO : Dis-United Order Street Fighter IV Super Street Fighter IV Arcade Edition The King of Fighters XII The King of Fighters XIII + The King Of Fighters XIII Climax + Top Speed Wacky Races Taito Type X2 satellite terminal games @@ -82,7 +105,7 @@ Aquarian Age Alternative Eternal Wheel Lord of Vermilion - + Lord of Vermilion II Taito Type X Zero games diff --git a/src/mame/drivers/thayers.c b/src/mame/drivers/thayers.c index 23ba45a8a84..c7cd01f9f99 100644 --- a/src/mame/drivers/thayers.c +++ b/src/mame/drivers/thayers.c @@ -75,8 +75,8 @@ public: DECLARE_READ8_MEMBER(cop_g_r); DECLARE_WRITE8_MEMBER(control_w); DECLARE_WRITE8_MEMBER(cop_g_w); - DECLARE_READ8_MEMBER(cop_si_r); - DECLARE_WRITE8_MEMBER(cop_so_w); + DECLARE_READ_LINE_MEMBER(cop_si_r); + DECLARE_WRITE_LINE_MEMBER(cop_so_w); DECLARE_WRITE8_MEMBER(control2_w); DECLARE_READ8_MEMBER(dsw_b_r); DECLARE_READ8_MEMBER(laserdsc_data_r); @@ -294,7 +294,7 @@ WRITE8_MEMBER(thayers_state::cop_g_w) /* Keyboard */ -READ8_MEMBER(thayers_state::cop_si_r) +READ_LINE_MEMBER(thayers_state::cop_si_r) { /* keyboard data */ @@ -327,11 +327,11 @@ READ8_MEMBER(thayers_state::cop_si_r) } } -WRITE8_MEMBER(thayers_state::cop_so_w) +WRITE_LINE_MEMBER(thayers_state::cop_so_w) { /* keyboard clock */ - if (data) + if (state) { m_rx_bit++; @@ -622,14 +622,6 @@ static ADDRESS_MAP_START( thayers_io_map, AS_IO, 8, thayers_state ) AM_RANGE(0xf7, 0xf7) AM_WRITE(den2_w) ADDRESS_MAP_END -static ADDRESS_MAP_START( thayers_cop_io_map, AS_IO, 8, thayers_state ) - AM_RANGE(COP400_PORT_L, COP400_PORT_L) AM_READWRITE(cop_l_r, cop_l_w) - AM_RANGE(COP400_PORT_G, COP400_PORT_G) AM_READWRITE(cop_g_r, cop_g_w) - AM_RANGE(COP400_PORT_D, COP400_PORT_D) AM_WRITE(cop_d_w) - AM_RANGE(COP400_PORT_SK, COP400_PORT_SK) AM_WRITENOP - AM_RANGE(COP400_PORT_SIO, COP400_PORT_SIO) AM_READ(cop_si_r) AM_WRITE(cop_so_w) -ADDRESS_MAP_END - /* Input Ports */ CUSTOM_INPUT_MEMBER(thayers_state::laserdisc_enter_r) @@ -780,15 +772,21 @@ void thayers_state::machine_reset() /* Machine Driver */ static MACHINE_CONFIG_START( thayers, thayers_state ) + /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_4MHz) MCFG_CPU_PROGRAM_MAP(thayers_map) MCFG_CPU_IO_MAP(thayers_io_map) MCFG_CPU_ADD("mcu", COP421, XTAL_4MHz/2) // COP421L-PCA/N - MCFG_CPU_IO_MAP(thayers_cop_io_map) MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED ) - + MCFG_COP400_READ_L_CB(READ8(thayers_state, cop_l_r)) + MCFG_COP400_WRITE_L_CB(WRITE8(thayers_state, cop_l_w)) + MCFG_COP400_READ_G_CB(READ8(thayers_state, cop_g_r)) + MCFG_COP400_WRITE_G_CB(WRITE8(thayers_state, cop_g_w)) + MCFG_COP400_WRITE_D_CB(WRITE8(thayers_state, cop_d_w)) + MCFG_COP400_READ_SI_CB(READLINE(thayers_state, cop_si_r)) + MCFG_COP400_WRITE_SO_CB(WRITELINE(thayers_state, cop_so_w)) MCFG_LASERDISC_PR7820_ADD("laserdisc") diff --git a/src/mame/drivers/toobin.c b/src/mame/drivers/toobin.c index 7efaeb49fc2..6a4d671835a 100644 --- a/src/mame/drivers/toobin.c +++ b/src/mame/drivers/toobin.c @@ -84,18 +84,18 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, toobin_state ) AM_RANGE(0xc00000, 0xc07fff) AM_RAM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") AM_RANGE(0xc08000, 0xc097ff) AM_MIRROR(0x046000) AM_RAM_DEVWRITE("alpha", tilemap_device, write) AM_SHARE("alpha") AM_RANGE(0xc09800, 0xc09fff) AM_MIRROR(0x046000) AM_RAM AM_SHARE("mob") - AM_RANGE(0xc10000, 0xc107ff) AM_MIRROR(0x047800) AM_RAM_WRITE(toobin_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0xc10000, 0xc107ff) AM_MIRROR(0x047800) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xff6000, 0xff6001) AM_READNOP /* who knows? read at controls time */ AM_RANGE(0xff8000, 0xff8001) AM_MIRROR(0x4500fe) AM_WRITE(watchdog_reset16_w) AM_RANGE(0xff8100, 0xff8101) AM_MIRROR(0x4500fe) AM_DEVWRITE8("jsa", atari_jsa_i_device, main_command_w, 0x00ff) - AM_RANGE(0xff8300, 0xff8301) AM_MIRROR(0x45003e) AM_WRITE(toobin_intensity_w) + AM_RANGE(0xff8300, 0xff8301) AM_MIRROR(0x45003e) AM_WRITE(intensity_w) AM_RANGE(0xff8340, 0xff8341) AM_MIRROR(0x45003e) AM_WRITE(interrupt_scan_w) AM_SHARE("interrupt_scan") - AM_RANGE(0xff8380, 0xff8381) AM_MIRROR(0x45003e) AM_RAM_WRITE(toobin_slip_w) AM_SHARE("mob:slip") + AM_RANGE(0xff8380, 0xff8381) AM_MIRROR(0x45003e) AM_RAM_WRITE(slip_w) AM_SHARE("mob:slip") AM_RANGE(0xff83c0, 0xff83c1) AM_MIRROR(0x45003e) AM_WRITE(scanline_int_ack_w) AM_RANGE(0xff8400, 0xff8401) AM_MIRROR(0x4500fe) AM_DEVWRITE("jsa", atari_jsa_i_device, sound_reset_w) AM_RANGE(0xff8500, 0xff8501) AM_MIRROR(0x4500fe) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) - AM_RANGE(0xff8600, 0xff8601) AM_MIRROR(0x4500fe) AM_WRITE(toobin_xscroll_w) AM_SHARE("xscroll") - AM_RANGE(0xff8700, 0xff8701) AM_MIRROR(0x4500fe) AM_WRITE(toobin_yscroll_w) AM_SHARE("yscroll") + AM_RANGE(0xff8600, 0xff8601) AM_MIRROR(0x4500fe) AM_WRITE(xscroll_w) AM_SHARE("xscroll") + AM_RANGE(0xff8700, 0xff8701) AM_MIRROR(0x4500fe) AM_WRITE(yscroll_w) AM_SHARE("yscroll") AM_RANGE(0xff8800, 0xff8801) AM_MIRROR(0x4507fe) AM_READ_PORT("FF8800") AM_RANGE(0xff9000, 0xff9001) AM_MIRROR(0x4507fe) AM_READ_PORT("FF9000") AM_RANGE(0xff9800, 0xff9801) AM_MIRROR(0x4507fe) AM_DEVREAD8("jsa", atari_jsa_i_device, main_response_r, 0x00ff) @@ -214,7 +214,7 @@ static MACHINE_CONFIG_START( toobin, toobin_state ) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 640, 0, 512, 416, 0, 384) - MCFG_SCREEN_UPDATE_DRIVER(toobin_state, screen_update_toobin) + MCFG_SCREEN_UPDATE_DRIVER(toobin_state, screen_update) MCFG_GFXDECODE_ADD("gfxdecode", "palette", toobin) MCFG_PALETTE_ADD("palette", 1024) @@ -575,28 +575,15 @@ ROM_START( toobin1 ) ROM_END - -/************************************* - * - * Driver initialization - * - *************************************/ - -DRIVER_INIT_MEMBER(toobin_state,toobin) -{ -} - - - /************************************* * * Game driver(s) * *************************************/ -GAME( 1988, toobin, 0, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (rev 3)", 0 ) -GAME( 1988, toobine, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (Europe, rev 3)", 0 ) -GAME( 1988, toobing, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (German, rev 3)", 0 ) -GAME( 1988, toobin2, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (rev 2)", 0 ) -GAME( 1988, toobin2e, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (Europe, rev 2)", 0 ) -GAME( 1988, toobin1, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (rev 1)", 0 ) +GAME( 1988, toobin, 0, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (rev 3)", GAME_SUPPORTS_SAVE ) +GAME( 1988, toobine, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (Europe, rev 3)", GAME_SUPPORTS_SAVE ) +GAME( 1988, toobing, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (German, rev 3)", GAME_SUPPORTS_SAVE ) +GAME( 1988, toobin2, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (rev 2)", GAME_SUPPORTS_SAVE ) +GAME( 1988, toobin2e, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (Europe, rev 2)", GAME_SUPPORTS_SAVE ) +GAME( 1988, toobin1, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (rev 1)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/truco.c b/src/mame/drivers/truco.c index f4db5d43691..3b6d743d9de 100644 --- a/src/mame/drivers/truco.c +++ b/src/mame/drivers/truco.c @@ -208,7 +208,6 @@ #include "cpu/m6809/m6809.h" #include "video/mc6845.h" #include "machine/6821pia.h" -#include "sound/dac.h" #include "includes/truco.h" @@ -355,6 +354,11 @@ static INPUT_PORTS_START( truco ) INPUT_PORTS_END +void truco_state::machine_start() +{ + save_item(NAME(m_trigger)); +} + /******************************************* * Machine Reset & Interrupts * *******************************************/ @@ -389,7 +393,7 @@ void truco_state::machine_reset() m_battery_ram[0x020] = m_battery_ram[0x011]; } -INTERRUPT_GEN_MEMBER(truco_state::truco_interrupt) +INTERRUPT_GEN_MEMBER(truco_state::interrupt) { /* coinup */ @@ -414,7 +418,7 @@ static MACHINE_CONFIG_START( truco, truco_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", M6809, CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", truco_state, truco_interrupt) + MCFG_CPU_VBLANK_INT_DRIVER("screen", truco_state, interrupt) MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(1.6)) /* 1.6 seconds */ MCFG_DEVICE_ADD("pia0", PIA6821, 0) @@ -432,7 +436,7 @@ static MACHINE_CONFIG_START( truco, truco_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(256, 192) MCFG_SCREEN_VISIBLE_AREA(0, 256-1, 0, 192-1) - MCFG_SCREEN_UPDATE_DRIVER(truco_state, screen_update_truco) + MCFG_SCREEN_UPDATE_DRIVER(truco_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_PALETTE_ADD("palette", 16) @@ -463,4 +467,4 @@ ROM_START( truco ) ROM_END /* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ -GAME( 198?, truco, 0, truco, truco, driver_device, 0, ROT0, "Playtronic SRL", "Truco-Tron", 0 ) +GAME( 198?, truco, 0, truco, truco, driver_device, 0, ROT0, "Playtronic SRL", "Truco-Tron", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/ttchamp.c b/src/mame/drivers/ttchamp.c index 6a6a969a200..12f0d3f4896 100644 --- a/src/mame/drivers/ttchamp.c +++ b/src/mame/drivers/ttchamp.c @@ -261,10 +261,10 @@ WRITE16_MEMBER(ttchamp_state::paldat_w) READ16_MEMBER(ttchamp_state::ttchamp_pic_r) { -// printf("%06x: read from PIC (%04x)\n", space.device().safe_pc(),mem_mask); +// printf("%06x: read from PIC (%04x)\n", space.device().safe_pc(),mem_mask); if (picmodex == PIC_SET_READLATCH) { -// printf("read data %02x from %02x\n", m_pic_latched, m_pic_readaddr); +// printf("read data %02x from %02x\n", m_pic_latched, m_pic_readaddr); picmodex = PIC_IDLE; return m_pic_latched << 8; @@ -276,29 +276,29 @@ READ16_MEMBER(ttchamp_state::ttchamp_pic_r) WRITE16_MEMBER(ttchamp_state::ttchamp_pic_w) { -// printf("%06x: write to PIC %04x (%04x) (%d)\n", space.device().safe_pc(),data,mem_mask, picmodex); +// printf("%06x: write to PIC %04x (%04x) (%d)\n", space.device().safe_pc(),data,mem_mask, picmodex); if (picmodex == PIC_IDLE) { if (data == 0x11) { picmodex = PIC_SET_READADDRESS; -// printf("state = SET_READADDRESS\n"); +// printf("state = SET_READADDRESS\n"); } else if (data == 0x12) { picmodex = PIC_SET_WRITELATCH; -// printf("latch write data.. \n" ); +// printf("latch write data.. \n" ); } else if (data == 0x20) { picmodex = PIC_SET_WRITEADDRESS; -// printf("state = PIC_SET_WRITEADDRESS\n"); +// printf("state = PIC_SET_WRITEADDRESS\n"); } else if (data == 0x21) // write latched data { picmodex = PIC_IDLE; m_bakram[m_pic_writeaddr] = m_pic_writelatched; - // printf("wrote %02x to %02x\n", m_pic_writelatched, m_pic_writeaddr); + // printf("wrote %02x to %02x\n", m_pic_writelatched, m_pic_writeaddr); } else if (data == 0x22) // next data to latch { @@ -306,12 +306,12 @@ WRITE16_MEMBER(ttchamp_state::ttchamp_pic_w) // address by 1 to give correct results? maybe it can read 'previous' data' too? m_pic_latched = m_bakram[m_pic_readaddr>>1]; -// printf("latch read data %02x from %02x\n",m_pic_latched, m_pic_readaddr ); +// printf("latch read data %02x from %02x\n",m_pic_latched, m_pic_readaddr ); picmodex = PIC_SET_READLATCH; // waiting to read... } else { -// printf("unknown\n"); +// printf("unknown\n"); } } else if (picmodex == PIC_SET_READADDRESS) diff --git a/src/mame/drivers/twins.c b/src/mame/drivers/twins.c index 8f58e5b4b91..2efa996a04a 100644 --- a/src/mame/drivers/twins.c +++ b/src/mame/drivers/twins.c @@ -513,10 +513,10 @@ WRITE16_MEMBER(twins_state::spider_port_1c_w) // otherwise you get garbage sprites between rounds and the bg incorrectly wiped UINT16* vram; -// if (m_videorambank & 1) +// if (m_videorambank & 1) vram = m_videoram2; -// else -// vram = m_videoram; +// else +// vram = m_videoram; for (int i = 0; i < 0x8000; i++) { diff --git a/src/mame/drivers/usgames.c b/src/mame/drivers/usgames.c index 7110df01a46..3255d088aef 100644 --- a/src/mame/drivers/usgames.c +++ b/src/mame/drivers/usgames.c @@ -35,7 +35,7 @@ void usgames_state::machine_start() membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000); } -WRITE8_MEMBER(usgames_state::usgames_rombank_w) +WRITE8_MEMBER(usgames_state::rombank_w) { membank("bank1")->set_entry(data); } @@ -67,11 +67,11 @@ static ADDRESS_MAP_START( usgames_map, AS_PROGRAM, 8, usgames_state ) AM_RANGE(0x2040, 0x2040) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x2041, 0x2041) AM_READ_PORT("UNK1") AM_RANGE(0x2041, 0x2041) AM_DEVWRITE("crtc", mc6845_device, register_w) - AM_RANGE(0x2060, 0x2060) AM_WRITE(usgames_rombank_w) + AM_RANGE(0x2060, 0x2060) AM_WRITE(rombank_w) AM_RANGE(0x2070, 0x2070) AM_READ_PORT("UNK2") AM_RANGE(0x2400, 0x2401) AM_DEVWRITE("aysnd", ay8910_device, address_data_w) - AM_RANGE(0x2800, 0x2fff) AM_RAM_WRITE(usgames_charram_w) AM_SHARE("charram") - AM_RANGE(0x3000, 0x3fff) AM_RAM_WRITE(usgames_videoram_w) AM_SHARE("videoram") + AM_RANGE(0x2800, 0x2fff) AM_RAM_WRITE(charram_w) AM_SHARE("charram") + AM_RANGE(0x3000, 0x3fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1") AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -87,10 +87,10 @@ static ADDRESS_MAP_START( usg185_map, AS_PROGRAM, 8, usgames_state ) AM_RANGE(0x2440, 0x2440) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0x2441, 0x2441) AM_READ_PORT("UNK1") AM_RANGE(0x2441, 0x2441) AM_DEVWRITE("crtc", mc6845_device, register_w) - AM_RANGE(0x2460, 0x2460) AM_WRITE(usgames_rombank_w) + AM_RANGE(0x2460, 0x2460) AM_WRITE(rombank_w) AM_RANGE(0x2470, 0x2470) AM_READ_PORT("UNK2") - AM_RANGE(0x2800, 0x2fff) AM_RAM_WRITE(usgames_charram_w) AM_SHARE("charram") - AM_RANGE(0x3000, 0x3fff) AM_RAM_WRITE(usgames_videoram_w) AM_SHARE("videoram") + AM_RANGE(0x2800, 0x2fff) AM_RAM_WRITE(charram_w) AM_SHARE("charram") + AM_RANGE(0x3000, 0x3fff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1") AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -226,7 +226,7 @@ static MACHINE_CONFIG_START( usg32, usgames_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) MCFG_SCREEN_SIZE(64*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(7*8, 57*8-1, 0*8, 31*8-1) - MCFG_SCREEN_UPDATE_DRIVER(usgames_state, screen_update_usgames) + MCFG_SCREEN_UPDATE_DRIVER(usgames_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", usgames) @@ -399,11 +399,11 @@ ROM_START( usg182 ) /* Version 18.2 */ ROM_END -GAME( 1987, usg32, 0, usg32, usg32, driver_device, 0, ROT0, "U.S. Games", "Super Duper Casino (California V3.2)", 0 ) -GAME( 1988, superten, 0, usg32, usg83, driver_device, 0, ROT0, "U.S. Games", "Super Ten V8.3", 0 ) -GAME( 1988, usg83x, superten, usg32, usg83, driver_device, 0, ROT0, "U.S. Games", "Super Ten V8.3X", 0 ) /* "Experimental" version?? */ -GAME( 1988, usg82, superten, usg32, usg83, driver_device, 0, ROT0, "U.S. Games", "Super Ten V8.2" , 0) -GAME( 1992, usgames, 0, usg185, usg83, driver_device, 0, ROT0, "U.S. Games", "Games V25.4X", 0 ) -GAME( 1991, usg187c, usgames, usg185, usg83, driver_device, 0, ROT0, "U.S. Games", "Games V18.7C", 0 ) -GAME( 1990, usg185, usgames, usg185, usg83, driver_device, 0, ROT0, "U.S. Games", "Games V18.5", 0 ) -GAME( 1989, usg182, usgames, usg185, usg83, driver_device, 0, ROT0, "U.S. Games", "Games V18.2", 0 ) +GAME( 1987, usg32, 0, usg32, usg32, driver_device, 0, ROT0, "U.S. Games", "Super Duper Casino (California V3.2)", GAME_SUPPORTS_SAVE ) +GAME( 1988, superten, 0, usg32, usg83, driver_device, 0, ROT0, "U.S. Games", "Super Ten V8.3", GAME_SUPPORTS_SAVE ) +GAME( 1988, usg83x, superten, usg32, usg83, driver_device, 0, ROT0, "U.S. Games", "Super Ten V8.3X", GAME_SUPPORTS_SAVE ) /* "Experimental" version?? */ +GAME( 1988, usg82, superten, usg32, usg83, driver_device, 0, ROT0, "U.S. Games", "Super Ten V8.2" , GAME_SUPPORTS_SAVE ) +GAME( 1992, usgames, 0, usg185, usg83, driver_device, 0, ROT0, "U.S. Games", "Games V25.4X", GAME_SUPPORTS_SAVE ) +GAME( 1991, usg187c, usgames, usg185, usg83, driver_device, 0, ROT0, "U.S. Games", "Games V18.7C", GAME_SUPPORTS_SAVE ) +GAME( 1990, usg185, usgames, usg185, usg83, driver_device, 0, ROT0, "U.S. Games", "Games V18.5", GAME_SUPPORTS_SAVE ) +GAME( 1989, usg182, usgames, usg185, usg83, driver_device, 0, ROT0, "U.S. Games", "Games V18.2", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index 41476df94f6..712a2ddcf59 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -50,7 +50,7 @@ Undumped Semicom games on similar hardware: Red Wyvern - A semi-sequel or update? Same time era, but unknown hardware: - Gaia The last Choice of the Earth (c) 1998 (might be Byron Future Assault type hardware) + Gaia The last Choice of the Earth (c) 1998 (might be Baryon Future Assault type hardware) Choice III: Joker's Dream (c) 2001 TODO: @@ -75,25 +75,20 @@ class vamphalf_state : public driver_device public: vamphalf_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_tiles(*this,"tiles"), - m_wram(*this,"wram"), - m_tiles32(*this,"tiles32"), - m_wram32(*this,"wram32"), m_maincpu(*this, "maincpu"), m_qs1000(*this, "qs1000"), m_oki(*this, "oki"), m_oki2(*this, "oki_2"), m_eeprom(*this, "eeprom"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { + m_palette(*this, "palette"), + m_tiles(*this,"tiles"), + m_wram(*this,"wram"), + m_tiles32(*this,"tiles32"), + m_wram32(*this,"wram32") { m_has_extra_gfx = 0; } - optional_shared_ptr<UINT16> m_tiles; - optional_shared_ptr<UINT16> m_wram; - optional_shared_ptr<UINT32> m_tiles32; - optional_shared_ptr<UINT32> m_wram32; - required_device<cpu_device> m_maincpu; optional_device<qs1000_device> m_qs1000; optional_device<okim6295_device> m_oki; @@ -102,15 +97,22 @@ public: required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; + optional_shared_ptr<UINT16> m_tiles; + optional_shared_ptr<UINT16> m_wram; + optional_shared_ptr<UINT32> m_tiles32; + optional_shared_ptr<UINT32> m_wram32; + + // driver init configuration int m_flip_bit; - int m_flipscreen; int m_palshift; + int m_has_extra_gfx; + UINT16 m_semicom_prot_data[2]; + + int m_flipscreen; int m_semicom_prot_idx; int m_semicom_prot_which; - UINT16 m_semicom_prot_data[2]; UINT16 m_finalgdr_backupram_bank; UINT8 *m_finalgdr_backupram; - int m_has_extra_gfx; UINT8 m_qs1000_data; DECLARE_WRITE16_MEMBER(flipscreen_w); @@ -162,10 +164,10 @@ public: DECLARE_WRITE16_MEMBER(boonggab_oki_bank_w); DECLARE_WRITE32_MEMBER(wyvernwg_snd_w); DECLARE_WRITE16_MEMBER(misncrft_snd_w); - - DECLARE_READ8_MEMBER(qs1000_p1_r); DECLARE_WRITE8_MEMBER(qs1000_p3_w); + + virtual void video_start(); DECLARE_DRIVER_INIT(vamphalf); DECLARE_DRIVER_INIT(vamphafk); DECLARE_DRIVER_INIT(coolmini); @@ -185,6 +187,7 @@ public: DECLARE_DRIVER_INIT(boonggab); DECLARE_DRIVER_INIT(wyvernwg); DECLARE_DRIVER_INIT(yorijori); + UINT32 screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_aoh(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap); @@ -590,6 +593,12 @@ or Offset+3 -------x xxxxxxxx X offs */ + +void vamphalf_state::video_start() +{ + save_item(NAME(m_flipscreen)); +} + void vamphalf_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap) { gfx_element *gfx = m_gfxdecode->gfx(0); @@ -2683,6 +2692,8 @@ DRIVER_INIT_MEMBER(vamphalf_state,misncrft) // Configure the QS1000 ROM banking. Care must be taken not to overlap the 256b internal RAM machine().device("qs1000:cpu")->memory().space(AS_IO).install_read_bank(0x0100, 0xffff, "data"); membank("qs1000:data")->configure_entries(0, 16, memregion("qs1000:cpu")->base()+0x100, 0x8000-0x100); + + save_item(NAME(m_qs1000_data)); } DRIVER_INIT_MEMBER(vamphalf_state,coolmini) @@ -2741,11 +2752,15 @@ DRIVER_INIT_MEMBER(vamphalf_state,wyvernwg) // Configure the QS1000 ROM banking. Care must be taken not to overlap the 256b internal RAM machine().device("qs1000:cpu")->memory().space(AS_IO).install_read_bank(0x0100, 0xffff, "data"); membank("qs1000:data")->configure_entries(0, 16, memregion("qs1000:cpu")->base()+0x100, 0x8000-0x100); + + save_item(NAME(m_qs1000_data)); + save_item(NAME(m_semicom_prot_idx)); + save_item(NAME(m_semicom_prot_which)); } DRIVER_INIT_MEMBER(vamphalf_state,yorijori) { - // seesm close to Final Godori in terms of port mappings, possibly a SemiCom game? + // seems close to Final Godori in terms of port mappings, possibly a SemiCom game? m_palshift = 0; m_flip_bit = 1; @@ -2762,6 +2777,8 @@ DRIVER_INIT_MEMBER(vamphalf_state,yorijori) // Configure the QS1000 ROM banking. Care must be taken not to overlap the 256b internal RAM machine().device("qs1000:cpu")->memory().space(AS_IO).install_read_bank(0x0100, 0xffff, "data"); membank("qs1000:data")->configure_entries(0, 16, memregion("qs1000:cpu")->base()+0x100, 0x8000-0x100); + + save_item(NAME(m_qs1000_data)); } DRIVER_INIT_MEMBER(vamphalf_state,finalgdr) @@ -2777,6 +2794,11 @@ DRIVER_INIT_MEMBER(vamphalf_state,finalgdr) m_semicom_prot_idx = 8; m_semicom_prot_data[0] = 2; m_semicom_prot_data[1] = 3; + + save_item(NAME(m_finalgdr_backupram_bank)); + save_pointer(NAME(m_finalgdr_backupram), 0x80*0x100); + save_item(NAME(m_semicom_prot_idx)); + save_item(NAME(m_semicom_prot_which)); } DRIVER_INIT_MEMBER(vamphalf_state,mrkicker) @@ -2793,6 +2815,9 @@ DRIVER_INIT_MEMBER(vamphalf_state,mrkicker) m_semicom_prot_idx = 8; m_semicom_prot_data[0] = 2; m_semicom_prot_data[1] = 3; + + save_item(NAME(m_semicom_prot_idx)); + save_item(NAME(m_semicom_prot_which)); } DRIVER_INIT_MEMBER(vamphalf_state,dquizgo2) @@ -2854,26 +2879,26 @@ DRIVER_INIT_MEMBER(vamphalf_state,boonggab) m_flip_bit = 1; } -GAME( 1999, coolmini, 0, coolmini, common, vamphalf_state, coolmini, ROT0, "SemiCom", "Cool Minigame Collection", 0 ) -GAME( 1999, jmpbreak, 0, jmpbreak, common, vamphalf_state, jmpbreak, ROT0, "F2 System", "Jumping Break" , 0 ) -GAME( 1999, suplup, 0, suplup, common, vamphalf_state, suplup, ROT0, "Omega System", "Super Lup Lup Puzzle / Zhuan Zhuan Puzzle (version 4.0 / 990518)" , 0 ) -GAME( 1999, luplup, suplup, suplup, common, vamphalf_state, luplup, ROT0, "Omega System", "Lup Lup Puzzle / Zhuan Zhuan Puzzle (version 3.0 / 990128)", 0 ) -GAME( 1999, luplup29, suplup, suplup, common, vamphalf_state, luplup29, ROT0, "Omega System", "Lup Lup Puzzle / Zhuan Zhuan Puzzle (version 2.9 / 990108)", 0 ) -GAME( 1999, puzlbang, suplup, suplup, common, vamphalf_state, puzlbang, ROT0, "Omega System", "Puzzle Bang Bang (Korea, version 2.9 / 990108)", 0 ) -GAME( 1999, puzlbanga, suplup, suplup, common, vamphalf_state, puzlbang, ROT0, "Omega System", "Puzzle Bang Bang (Korea, version 2.8 / 990106)", 0 ) -GAME( 1999, vamphalf, 0, vamphalf, common, vamphalf_state, vamphalf, ROT0, "Danbi / F2 System", "Vamf x1/2 (Europe)", 0 ) -GAME( 1999, vamphalfk, vamphalf, vamphalf, common, vamphalf_state, vamphafk, ROT0, "Danbi / F2 System", "Vamp x1/2 (Korea)", 0 ) -GAME( 2000, dquizgo2, 0, coolmini, common, vamphalf_state, dquizgo2, ROT0, "SemiCom", "Date Quiz Go Go Episode 2" , 0) -GAME( 2000, misncrft, 0, misncrft, common, vamphalf_state, misncrft, ROT90, "Sun", "Mission Craft (version 2.7)", GAME_IMPERFECT_SOUND ) -GAME( 2000, misncrfta, misncrft, misncrft, common, vamphalf_state, misncrft, ROT90, "Sun", "Mission Craft (version 2.4)", GAME_IMPERFECT_SOUND ) -GAME( 2000, mrdig, 0, mrdig, common, vamphalf_state, mrdig, ROT0, "Sun", "Mr. Dig", 0 ) -GAME( 2001, dtfamily, 0, coolmini, common, vamphalf_state, dtfamily, ROT0, "SemiCom", "Diet Family", 0 ) -GAME( 2001, finalgdr, 0, finalgdr, finalgdr, vamphalf_state, finalgdr, ROT0, "SemiCom", "Final Godori (Korea, version 2.20.5915)", 0 ) -GAME( 2001, mrkicker, 0, mrkicker, finalgdr, vamphalf_state, mrkicker, ROT0, "SemiCom", "Mr. Kicker", 0 ) -GAME( 2001, toyland, 0, coolmini, common, vamphalf_state, toyland, ROT0, "SemiCom", "Toy Land Adventure", 0 ) -GAME( 2001, wivernwg, 0, wyvernwg, common, vamphalf_state, wyvernwg, ROT270, "SemiCom", "Wivern Wings", GAME_IMPERFECT_SOUND ) -GAME( 2001, wyvernwg, wivernwg, wyvernwg, common, vamphalf_state, wyvernwg, ROT270, "SemiCom (Game Vision license)", "Wyvern Wings (set 1)", GAME_IMPERFECT_SOUND ) -GAME( 2001, wyvernwga, wivernwg, wyvernwg, common, vamphalf_state, wyvernwg, ROT270, "SemiCom (Game Vision license)", "Wyvern Wings (set 2)", GAME_IMPERFECT_SOUND ) -GAME( 2001, aoh, 0, aoh, aoh, vamphalf_state, aoh, ROT0, "Unico", "Age Of Heroes - Silkroad 2 (v0.63 - 2001/02/07)", 0 ) -GAME( 2001, boonggab, 0, boonggab, boonggab, vamphalf_state, boonggab, ROT270, "Taff System", "Boong-Ga Boong-Ga (Spank'em!)", 0 ) -GAME( 199?, yorijori, 0, yorijori, common, vamphalf_state, yorijori, ROT0, "Golden Bell Entertainment", "Yori Jori Kuk Kuk", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) +GAME( 1999, coolmini, 0, coolmini, common, vamphalf_state, coolmini, ROT0, "SemiCom", "Cool Minigame Collection", GAME_SUPPORTS_SAVE ) +GAME( 1999, jmpbreak, 0, jmpbreak, common, vamphalf_state, jmpbreak, ROT0, "F2 System", "Jumping Break" , GAME_SUPPORTS_SAVE ) +GAME( 1999, suplup, 0, suplup, common, vamphalf_state, suplup, ROT0, "Omega System", "Super Lup Lup Puzzle / Zhuan Zhuan Puzzle (version 4.0 / 990518)" , GAME_SUPPORTS_SAVE ) +GAME( 1999, luplup, suplup, suplup, common, vamphalf_state, luplup, ROT0, "Omega System", "Lup Lup Puzzle / Zhuan Zhuan Puzzle (version 3.0 / 990128)", GAME_SUPPORTS_SAVE ) +GAME( 1999, luplup29, suplup, suplup, common, vamphalf_state, luplup29, ROT0, "Omega System", "Lup Lup Puzzle / Zhuan Zhuan Puzzle (version 2.9 / 990108)", GAME_SUPPORTS_SAVE ) +GAME( 1999, puzlbang, suplup, suplup, common, vamphalf_state, puzlbang, ROT0, "Omega System", "Puzzle Bang Bang (Korea, version 2.9 / 990108)", GAME_SUPPORTS_SAVE ) +GAME( 1999, puzlbanga, suplup, suplup, common, vamphalf_state, puzlbang, ROT0, "Omega System", "Puzzle Bang Bang (Korea, version 2.8 / 990106)", GAME_SUPPORTS_SAVE ) +GAME( 1999, vamphalf, 0, vamphalf, common, vamphalf_state, vamphalf, ROT0, "Danbi / F2 System", "Vamf x1/2 (Europe)", GAME_SUPPORTS_SAVE ) +GAME( 1999, vamphalfk, vamphalf, vamphalf, common, vamphalf_state, vamphafk, ROT0, "Danbi / F2 System", "Vamp x1/2 (Korea)", GAME_SUPPORTS_SAVE ) +GAME( 2000, dquizgo2, 0, coolmini, common, vamphalf_state, dquizgo2, ROT0, "SemiCom", "Date Quiz Go Go Episode 2" , GAME_SUPPORTS_SAVE ) +GAME( 2000, misncrft, 0, misncrft, common, vamphalf_state, misncrft, ROT90, "Sun", "Mission Craft (version 2.7)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2000, misncrfta, misncrft, misncrft, common, vamphalf_state, misncrft, ROT90, "Sun", "Mission Craft (version 2.4)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2000, mrdig, 0, mrdig, common, vamphalf_state, mrdig, ROT0, "Sun", "Mr. Dig", GAME_SUPPORTS_SAVE ) +GAME( 2001, dtfamily, 0, coolmini, common, vamphalf_state, dtfamily, ROT0, "SemiCom", "Diet Family", GAME_SUPPORTS_SAVE ) +GAME( 2001, finalgdr, 0, finalgdr, finalgdr, vamphalf_state, finalgdr, ROT0, "SemiCom", "Final Godori (Korea, version 2.20.5915)", GAME_SUPPORTS_SAVE ) +GAME( 2001, mrkicker, 0, mrkicker, finalgdr, vamphalf_state, mrkicker, ROT0, "SemiCom", "Mr. Kicker", GAME_SUPPORTS_SAVE ) +GAME( 2001, toyland, 0, coolmini, common, vamphalf_state, toyland, ROT0, "SemiCom", "Toy Land Adventure", GAME_SUPPORTS_SAVE ) +GAME( 2001, wivernwg, 0, wyvernwg, common, vamphalf_state, wyvernwg, ROT270, "SemiCom", "Wivern Wings", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2001, wyvernwg, wivernwg, wyvernwg, common, vamphalf_state, wyvernwg, ROT270, "SemiCom (Game Vision license)", "Wyvern Wings (set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2001, wyvernwga, wivernwg, wyvernwg, common, vamphalf_state, wyvernwg, ROT270, "SemiCom (Game Vision license)", "Wyvern Wings (set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +GAME( 2001, aoh, 0, aoh, aoh, vamphalf_state, aoh, ROT0, "Unico", "Age Of Heroes - Silkroad 2 (v0.63 - 2001/02/07)", GAME_SUPPORTS_SAVE ) +GAME( 2001, boonggab, 0, boonggab, boonggab, vamphalf_state, boonggab, ROT270, "Taff System", "Boong-Ga Boong-Ga (Spank'em!)", GAME_SUPPORTS_SAVE ) +GAME( 199?, yorijori, 0, yorijori, common, vamphalf_state, yorijori, ROT0, "Golden Bell Entertainment", "Yori Jori Kuk Kuk", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/vicdual.c b/src/mame/drivers/vicdual.c index 744c48f1ba2..9fd5ce8b4df 100644 --- a/src/mame/drivers/vicdual.c +++ b/src/mame/drivers/vicdual.c @@ -1123,7 +1123,7 @@ WRITE8_MEMBER(vicdual_state::alphaho_io_w) static ADDRESS_MAP_START( vicdual_dualgame_map, AS_PROGRAM, 8, vicdual_state ) - AM_RANGE(0x0000, 0x3fff) AM_MIRROR(0x4000) AM_ROM + AM_RANGE(0x0000, 0x3fff) AM_MIRROR(0x4000) AM_ROM AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x7000) AM_RAM_WRITE(vicdual_videoram_w) AM_SHARE("videoram") AM_RANGE(0x8400, 0x87ff) AM_MIRROR(0x7000) AM_RAM AM_RANGE(0x8800, 0x8fff) AM_MIRROR(0x7000) AM_RAM_WRITE(vicdual_characterram_w) AM_SHARE("characterram") diff --git a/src/mame/drivers/videopin.c b/src/mame/drivers/videopin.c index 43c732033d3..4c13079d6da 100644 --- a/src/mame/drivers/videopin.c +++ b/src/mame/drivers/videopin.c @@ -69,18 +69,29 @@ TIMER_CALLBACK_MEMBER(videopin_state::interrupt_callback) if (scanline >= 263) scanline = 32; - timer_set(m_screen->time_until_pos(scanline), TIMER_INTERRUPT, scanline); + m_interrupt_timer->adjust(m_screen->time_until_pos(scanline), scanline); +} + + +void videopin_state::machine_start() +{ + m_interrupt_timer = timer_alloc(TIMER_INTERRUPT); + + save_item(NAME(m_time_pushed)); + save_item(NAME(m_time_released)); + save_item(NAME(m_prev)); + save_item(NAME(m_mask)); } void videopin_state::machine_reset() { - timer_set(m_screen->time_until_pos(32), TIMER_INTERRUPT, 32); + m_interrupt_timer->adjust(m_screen->time_until_pos(32), 32); /* both output latches are cleared on reset */ - videopin_out1_w(machine().driver_data()->generic_space(), 0, 0); - videopin_out2_w(machine().driver_data()->generic_space(), 0, 0); + out1_w(machine().driver_data()->generic_space(), 0, 0); + out2_w(machine().driver_data()->generic_space(), 0, 0); } @@ -90,7 +101,7 @@ double videopin_state::calc_plunger_pos() } -READ8_MEMBER(videopin_state::videopin_misc_r) +READ8_MEMBER(videopin_state::misc_r) { double plunger = calc_plunger_pos(); @@ -118,7 +129,7 @@ READ8_MEMBER(videopin_state::videopin_misc_r) } -WRITE8_MEMBER(videopin_state::videopin_led_w) +WRITE8_MEMBER(videopin_state::led_w) { int i = (m_screen->vpos() >> 5) & 7; static const char *const matrix[8][4] = @@ -145,7 +156,7 @@ WRITE8_MEMBER(videopin_state::videopin_led_w) } -WRITE8_MEMBER(videopin_state::videopin_out1_w) +WRITE8_MEMBER(videopin_state::out1_w) { /* D0 => OCTAVE0 */ /* D1 => OCTACE1 */ @@ -168,7 +179,7 @@ WRITE8_MEMBER(videopin_state::videopin_out1_w) } -WRITE8_MEMBER(videopin_state::videopin_out2_w) +WRITE8_MEMBER(videopin_state::out2_w) { /* D0 => VOL0 */ /* D1 => VOL1 */ @@ -188,7 +199,7 @@ WRITE8_MEMBER(videopin_state::videopin_out2_w) } -WRITE8_MEMBER(videopin_state::videopin_note_dvsr_w) +WRITE8_MEMBER(videopin_state::note_dvsr_w) { /* note data */ m_discrete->write(space, VIDEOPIN_NOTE_DATA, ~data &0xff); @@ -203,13 +214,13 @@ WRITE8_MEMBER(videopin_state::videopin_note_dvsr_w) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, videopin_state ) AM_RANGE(0x0000, 0x01ff) AM_RAM - AM_RANGE(0x0200, 0x07ff) AM_RAM_WRITE(videopin_video_ram_w) AM_SHARE("video_ram") - AM_RANGE(0x0800, 0x0800) AM_READ(videopin_misc_r) AM_WRITE(videopin_note_dvsr_w) - AM_RANGE(0x0801, 0x0801) AM_WRITE(videopin_led_w) + AM_RANGE(0x0200, 0x07ff) AM_RAM_WRITE(video_ram_w) AM_SHARE("video_ram") + AM_RANGE(0x0800, 0x0800) AM_READ(misc_r) AM_WRITE(note_dvsr_w) + AM_RANGE(0x0801, 0x0801) AM_WRITE(led_w) AM_RANGE(0x0802, 0x0802) AM_WRITE(watchdog_reset_w) - AM_RANGE(0x0804, 0x0804) AM_WRITE(videopin_ball_w) - AM_RANGE(0x0805, 0x0805) AM_WRITE(videopin_out1_w) - AM_RANGE(0x0806, 0x0806) AM_WRITE(videopin_out2_w) + AM_RANGE(0x0804, 0x0804) AM_WRITE(ball_w) + AM_RANGE(0x0805, 0x0805) AM_WRITE(out1_w) + AM_RANGE(0x0806, 0x0806) AM_WRITE(out2_w) AM_RANGE(0x1000, 0x1000) AM_READ_PORT("IN0") AM_RANGE(0x1800, 0x1800) AM_READ_PORT("DSW") AM_RANGE(0x2000, 0x3fff) AM_ROM @@ -353,7 +364,7 @@ static MACHINE_CONFIG_START( videopin, videopin_state ) MCFG_SCREEN_REFRESH_RATE(60) MCFG_SCREEN_SIZE(304, 263) MCFG_SCREEN_VISIBLE_AREA(0, 303, 0, 255) - MCFG_SCREEN_UPDATE_DRIVER(videopin_state, screen_update_videopin) + MCFG_SCREEN_UPDATE_DRIVER(videopin_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", videopin) @@ -447,5 +458,5 @@ ROM_END * *************************************/ -GAMEL( 1979, videopin, 0, videopin, videopin, driver_device, 0, ROT270, "Atari", "Video Pinball", 0, layout_videopin ) -GAMEL( 1979, solarwar, 0, videopin, solarwar, driver_device, 0, ROT270, "Atari", "Solar War", 0, layout_videopin ) +GAMEL( 1979, videopin, 0, videopin, videopin, driver_device, 0, ROT270, "Atari", "Video Pinball", GAME_SUPPORTS_SAVE, layout_videopin ) +GAMEL( 1979, solarwar, 0, videopin, solarwar, driver_device, 0, ROT270, "Atari", "Solar War", GAME_SUPPORTS_SAVE, layout_videopin ) diff --git a/src/mame/drivers/vigilant.c b/src/mame/drivers/vigilant.c index 62ea412c426..ef910062437 100644 --- a/src/mame/drivers/vigilant.c +++ b/src/mame/drivers/vigilant.c @@ -27,7 +27,7 @@ void vigilant_state::machine_start() membank("bank1")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x4000); } -WRITE8_MEMBER(vigilant_state::vigilant_bank_select_w) +WRITE8_MEMBER(vigilant_state::bank_select_w) { membank("bank1")->set_entry(data & 0x07); } @@ -65,7 +65,7 @@ static ADDRESS_MAP_START( vigilant_map, AS_PROGRAM, 8, vigilant_state ) AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") /* Fallthrough */ AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc020, 0xc0df) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(vigilant_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xd000, 0xdfff) AM_RAM AM_SHARE("videoram") AM_RANGE(0xe000, 0xefff) AM_RAM ADDRESS_MAP_END @@ -76,7 +76,7 @@ static ADDRESS_MAP_START( vigilant_io_map, AS_IO, 8, vigilant_state ) AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_WRITE(vigilant_out2_w) /* OUT2 */ AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") - AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW2") AM_WRITE(vigilant_bank_select_w) /* PBANK */ + AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW2") AM_WRITE(bank_select_w) /* PBANK */ AM_RANGE(0x80, 0x81) AM_WRITE(vigilant_horiz_scroll_w) /* HSPL, HSPH */ AM_RANGE(0x82, 0x83) AM_WRITE(vigilant_rear_horiz_scroll_w) /* RHSPL, RHSPH */ AM_RANGE(0x84, 0x84) AM_WRITE(vigilant_rear_color_w) /* RCOD */ @@ -86,7 +86,7 @@ static ADDRESS_MAP_START( kikcubic_map, AS_PROGRAM, 8, vigilant_state ) AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") /* Fallthrough */ AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc0ff) AM_RAM AM_SHARE("spriteram") - AM_RANGE(0xc800, 0xcaff) AM_RAM_WRITE(vigilant_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0xc800, 0xcaff) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xd000, 0xdfff) AM_RAM AM_SHARE("videoram") AM_RANGE(0xe000, 0xffff) AM_RAM ADDRESS_MAP_END @@ -97,7 +97,7 @@ static ADDRESS_MAP_START( kikcubic_io_map, AS_IO, 8, vigilant_state ) AM_RANGE(0x01, 0x01) AM_READ_PORT("DSW2") AM_RANGE(0x02, 0x02) AM_READ_PORT("IN0") AM_RANGE(0x03, 0x03) AM_READ_PORT("IN1") - AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") AM_WRITE(vigilant_bank_select_w) + AM_RANGE(0x04, 0x04) AM_READ_PORT("IN2") AM_WRITE(bank_select_w) AM_RANGE(0x06, 0x06) AM_DEVWRITE("m72", m72_audio_device, sound_command_byte_w) // AM_RANGE(0x07, 0x07) AM_WRITENOP /* ?? */ ADDRESS_MAP_END @@ -964,15 +964,15 @@ ROM_START( buccanrsa ) ROM_LOAD( "prom2.u99", 0x0300, 0x0100, CRC(e0aa8869) SHA1(ac8bdfeba69420ba56ec561bf3d0f1229d02cea2) ) ROM_END -GAME( 1988, vigilant, 0, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev E)", GAME_NO_COCKTAIL ) -GAME( 1988, vigilant1, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev C)", GAME_NO_COCKTAIL ) -GAME( 1988, vigilantu, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East USA license)", "Vigilante (US)", GAME_NO_COCKTAIL ) -GAME( 1988, vigilantu2,vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East USA license)", "Vigilante (US, Rev G)", GAME_NO_COCKTAIL ) -GAME( 1988, vigilantj, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (Japan, Rev D)", GAME_NO_COCKTAIL ) -GAME( 1988, vigilantb, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "bootleg", "Vigilante (bootleg)", GAME_NO_COCKTAIL ) +GAME( 1988, vigilant, 0, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev E)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilant1, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (World, Rev C)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilantu, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East USA license)", "Vigilante (US)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilantu2,vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem (Data East USA license)", "Vigilante (US, Rev G)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilantj, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "Irem", "Vigilante (Japan, Rev D)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1988, vigilantb, vigilant, vigilant, vigilant, driver_device, 0, ROT0, "bootleg", "Vigilante (bootleg)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) -GAME( 1988, kikcubic, 0, kikcubic, kikcubic, driver_device, 0, ROT0, "Irem", "Meikyu Jima (Japan)", GAME_NO_COCKTAIL ) /* English title is Kickle Cubicle */ -GAME( 1988, kikcubicb, kikcubic, kikcubic, kikcubic, driver_device, 0, ROT0, "bootleg", "Kickle Cubele", GAME_NO_COCKTAIL ) +GAME( 1988, kikcubic, 0, kikcubic, kikcubic, driver_device, 0, ROT0, "Irem", "Meikyu Jima (Japan)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) /* English title is Kickle Cubicle */ +GAME( 1988, kikcubicb, kikcubic, kikcubic, kikcubic, driver_device, 0, ROT0, "bootleg", "Kickle Cubele", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) -GAME( 1989, buccanrs, 0, buccanrs, buccanrs, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 1)", GAME_NO_COCKTAIL ) -GAME( 1989, buccanrsa, buccanrs, buccanrs, buccanra, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 2)", GAME_NO_COCKTAIL ) +GAME( 1989, buccanrs, 0, buccanrs, buccanrs, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 1)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) +GAME( 1989, buccanrsa, buccanrs, buccanrs, buccanra, driver_device, 0, ROT0, "Duintronic", "Buccaneers (set 2)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/vroulet.c b/src/mame/drivers/vroulet.c index 3e9a6d3c607..a7d3241c701 100644 --- a/src/mame/drivers/vroulet.c +++ b/src/mame/drivers/vroulet.c @@ -46,38 +46,44 @@ class vroulet_state : public driver_device public: vroulet_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"), - m_ball(*this, "ball"), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_generic_paletteram_8(*this, "paletteram") { } + m_generic_paletteram_8(*this, "paletteram"), + m_videoram(*this, "videoram"), + m_colorram(*this, "colorram"), + m_ball(*this, "ball") { } + + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + required_shared_ptr<UINT8> m_generic_paletteram_8; required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_colorram; required_shared_ptr<UINT8> m_ball; + tilemap_t *m_bg_tilemap; - DECLARE_WRITE8_MEMBER(vroulet_paletteram_w); - DECLARE_WRITE8_MEMBER(vroulet_videoram_w); - DECLARE_WRITE8_MEMBER(vroulet_colorram_w); + + DECLARE_WRITE8_MEMBER(paletteram_w); + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(colorram_w); DECLARE_WRITE8_MEMBER(ppi8255_a_w); DECLARE_WRITE8_MEMBER(ppi8255_b_w); DECLARE_WRITE8_MEMBER(ppi8255_c_w); + TILE_GET_INFO_MEMBER(get_bg_tile_info); + virtual void video_start(); - UINT32 screen_update_vroulet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; - required_shared_ptr<UINT8> m_generic_paletteram_8; + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; /* video */ -WRITE8_MEMBER(vroulet_state::vroulet_paletteram_w) +WRITE8_MEMBER(vroulet_state::paletteram_w) { /* paletteram_xxxxBBBBGGGGRRRR_byte_be_w @@ -97,13 +103,13 @@ WRITE8_MEMBER(vroulet_state::vroulet_paletteram_w) } } -WRITE8_MEMBER(vroulet_state::vroulet_videoram_w) +WRITE8_MEMBER(vroulet_state::videoram_w) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(vroulet_state::vroulet_colorram_w) +WRITE8_MEMBER(vroulet_state::colorram_w) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); @@ -124,7 +130,7 @@ void vroulet_state::video_start() 8, 8, 32, 32); } -UINT32 vroulet_state::screen_update_vroulet(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 vroulet_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, 0x320, 1, 0, 0, @@ -138,10 +144,10 @@ static ADDRESS_MAP_START( vroulet_map, AS_PROGRAM, 8, vroulet_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x6000, 0x67ff) AM_RAM AM_SHARE("nvram") AM_RANGE(0x8000, 0x8000) AM_NOP - AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(vroulet_videoram_w) AM_SHARE("videoram") - AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(vroulet_colorram_w) AM_SHARE("colorram") + AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram") + AM_RANGE(0x9400, 0x97ff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram") AM_RANGE(0xa000, 0xa001) AM_RAM AM_SHARE("ball") - AM_RANGE(0xb000, 0xb0ff) AM_WRITE(vroulet_paletteram_w) AM_SHARE("paletteram") + AM_RANGE(0xb000, 0xb0ff) AM_WRITE(paletteram_w) AM_SHARE("paletteram") AM_RANGE(0xc000, 0xc000) AM_NOP ADDRESS_MAP_END @@ -283,7 +289,7 @@ static MACHINE_CONFIG_START( vroulet, vroulet_state ) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_DRIVER(vroulet_state, screen_update_vroulet) + MCFG_SCREEN_UPDATE_DRIVER(vroulet_state, screen_update) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", vroulet) @@ -313,4 +319,4 @@ ROM_END /* Game Driver */ -GAME( 1989, vroulet, 0, vroulet, vroulet, driver_device, 0, ROT90, "World Game", "Vegas Roulette", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS ) +GAME( 1989, vroulet, 0, vroulet, vroulet, driver_device, 0, ROT90, "World Game", "Vegas Roulette", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_COLORS | GAME_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/wms.c b/src/mame/drivers/wms.c index de809fa3f76..c1c90a315b2 100644 --- a/src/mame/drivers/wms.c +++ b/src/mame/drivers/wms.c @@ -1,14 +1,86 @@ -/* +/************************************************************************************************** -WMS Russian Fruit Machines (Mechanical?) + WMS 360 / 550 (also 3601?) CPU 1.5 Plus board + --------------------------------------------- -x86 based + Both systems (360 and 550) were originally composed by two boards: -*/ + CPU board: WMS CPU 1.5 (Plus) MPU/CPU board. Copyright 1999. + I/O board: WMS PCBA Video I/O board. + +*************************************************************************************************** + + Hardware Specs... + + WMS CPU 1.5 (Plus) MPU/CPU board: + + 1x AMD N80C188-20 (CMOS High-Integration 16-bit Microprocessor), @20Mhz (40/2) [XU12] + 1X Analog Devices ADSP-2105 (Single-Chip 16-bit Microcomputers: 20 MIPS, 5v, 1 Serial Port) [U28] + 1x Cirrus Logic CL-GD5429-86QC-C (VGA Graphics Controller) [U32] + 1x QuickLogic QL2003-XPF144C FPGA [U21] + + 4x (1-2-4/8 Mb selectable through jumper) program ROM sockets. [XU02, XU03, XU04, XU05] + 4x (1-2-4/8 Mb selectable through jumper) sound ROM sockets. [XU17, XU18, XU30, XU31] + 1x unknown serial EEPROM (DIP8) (currently missing) [XU27] + + 4x ISSI IS41C16257-60K (256K x 16, 4-MBit Dynamic RAM with fast page mode) [U14, U15, U22, U23] + 2x Cypress Semiconductor CY62256LL-70SNC (32K x 8 Static RAM) (near program ROMs) [U6, U9] + 3x Cypress Semiconductor CY7C128A-35VC (CMOS 2048 x 8 Static RAM) (between ADSP-2105 and sound ROMs) [U25, U29, U33] + + 1x EXAR ST 16C1550CJ (UART Interface IC W/16-byte FIFO) [U19A] + 1x Intersil Corporation CS82C59A (CMOS Priority Interrupt Controller) [U20] + 1x MAXIM MAX232CWE (Integrated RS-232 Interface IC) (near ADSP-2105) [U24] + 1x MAXIM MAX691ACWE (Microprocessor Supervisory Circuit) [U7] + 1x EPSON RTC72423 (4-bit Real-Time Clock) [U10] + + 1x Pletronics MP49 (1.8432 MHz) Crystal (between the edge connectors) [X1] + 1x Pletronics MP49 (14.31818 MHz) Crystal (near the Cirrus Logic VGA device) [X2] + 1x Pletronics 40.000 MHz. Crystal (near the AMD N80C188) [Y1] + + 1x 3-pin jumper (for program ROM size) [JP2] + 1x 3-pin jumper (for sound ROM size) [JP3] + 1x 2-pin jumper (near the 40 MHz crystal) [JP300] + + 1x VGA D-SUB connector [J1] + 2x 96-Pins (male) edge connectors. + 1x push button [SW1] + 1x 7-segments LED [DS1] + 1x 3.6V lithium battery [B1] + + +*************************************************************************************************** + + Notes... + + The WMS CPU 1.5 Plus board has an upgrade: The WMS 360 / 550 Bluebird CPU NXT board, + based on a Pentium processor. + +*************************************************************************************************** + + Settings... + + JP2 Software: + 1-2: 4M or less EPROMS. + 2-3: 8M EPROMS. + + JP3 Sound: + 1-2: 4M or less EPROMS. + 2-3: 8M EPROMS. + + +***************************************************************************************************/ + + +#define MAIN_CLOCK XTAL_40MHz // Pletronics 40.000 MHz. Crystal. Used for CPU clock. +#define VIDEO_CLOCK XTAL_14_31818MHz // Pletronics MP49 14.31818 MHz. Crystal. Used in common VGA ISA cards. + +#define UART_CLOCK XTAL_1_8432MHz // Seems UART clock, since allows integer division to common baud rates. + // (16 * 115200 baud, 192 * 9600 baud, 1536 * 1200 baud, etc...) #include "emu.h" -#include "cpu/i386/i386.h" +#include "cpu/i86/i186.h" + class wms_state : public driver_device { @@ -27,50 +99,69 @@ public: }; -static ADDRESS_MAP_START( wms_map, AS_PROGRAM, 32, wms_state ) - AM_RANGE(0x00000000, 0x000fffff) AM_ROM AM_REGION("maincpu", 0 ) +/********************************************* +* Memory Map Information * +*********************************************/ - AM_RANGE(0xfff00000, 0xffffffff) AM_ROM AM_REGION("maincpu", 0 ) +static ADDRESS_MAP_START( wms_map, AS_PROGRAM, 8, wms_state ) + AM_RANGE(0x00000, 0xfffff) AM_ROM AM_REGION("maincpu", 0) ADDRESS_MAP_END -static ADDRESS_MAP_START( wms_io, AS_IO, 32, wms_state ) + +static ADDRESS_MAP_START( wms_io, AS_IO, 8, wms_state ) ADDRESS_MAP_END +/********************************************* +* Input Ports * +*********************************************/ + static INPUT_PORTS_START( wms ) INPUT_PORTS_END +/********************************************* +* Machine Drivers * +*********************************************/ static MACHINE_CONFIG_START( wms, wms_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", I486, 40000000 ) // ?? + MCFG_CPU_ADD("maincpu", I80188, MAIN_CLOCK ) // AMD N80C188-20, ( 40 MHz. internally divided by 2) MCFG_CPU_PROGRAM_MAP(wms_map) MCFG_CPU_IO_MAP(wms_io) MACHINE_CONFIG_END -ROM_START( wms ) - ROM_REGION32_LE(0x100000, "maincpu", 0) + +/********************************************* +* ROMs Load * +*********************************************/ + +// --------------- SetUp/Clear Chips --------------- + +ROM_START( wms ) // RamClear Rev 3.03 + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "10.bin", 0x0e0000, 0x020000, CRC(cf901f7d) SHA1(009a28fede06d2ff7f476ff643bf27cddd2adbab) ) ROM_REGION(0x100000, "rom", ROMREGION_ERASE00) ROM_END -ROM_START( wmsa ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( wmsa ) // RamClear Rev 3.03 + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "10cver4.010", 0x0e0000, 0x020000, CRC(fd310b97) SHA1(5745549258a1cefec4b3dddbe9d9a0d6281278e9) ) ROM_REGION(0x100000, "rom", ROMREGION_ERASE00) ROM_END - -ROM_START( wmsb ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( wmsb ) // RamClear Rev 3.03 + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "50cver4.010", 0x0e0000, 0x020000, CRC(eeeeab29) SHA1(898c05c0674a9978caaad4a0fe3650a9d9a56715) ) ROM_REGION(0x100000, "rom", ROMREGION_ERASE00) ROM_END -ROM_START( btippers ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +// ----------------- Regular Sets ------------------ + + +ROM_START( btippers ) // Big Tippers (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(96e362e3) SHA1(a0c35e9aa6bcbc5ffbf8750fa728294ef1e21b02) ) ROM_REGION(0x100000, "rom", 0) @@ -84,8 +175,9 @@ ROM_START( btippers ) ROM_LOAD( "xu-18.bin", 0x0000, 0x100000, CRC(c845e18a) SHA1(3e20fbf6ac127a780a7a1517347e3cf7e951e5eb) ) ROM_END -ROM_START( wmsboom ) - ROM_REGION32_LE(0x100000, "maincpu", 0) + +ROM_START( wmsboom ) // Boom (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(5008854d) SHA1(8d9d11775b6cbdef1c71683c4d92e64af26e8939) ) ROM_REGION(0x100000, "rom", 0) @@ -97,8 +189,9 @@ ROM_START( wmsboom ) ROM_LOAD( "xu-18.bin", 0x0000, 0x080000, CRC(68187707) SHA1(9a85fe5737ae372999f2bfaf50263c00fc9b22f4) ) ROM_END -ROM_START( cashcrop ) - ROM_REGION32_LE(0x100000, "maincpu", 0) + +ROM_START( cashcrop ) // Cash Crop (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(e1918f25) SHA1(55c33c1f604a44caef65e712e69d21792161dfbc) ) ROM_REGION(0x100000, "rom", 0) @@ -112,8 +205,9 @@ ROM_START( cashcrop ) ROM_LOAD( "xu-18.bin", 0x0000, 0x100000, CRC(17cdabce) SHA1(d54e6d1697ccd424922c712f4a1f75e8d5f44288) ) ROM_END -ROM_START( filthyr ) - ROM_REGION32_LE(0x100000, "maincpu", 0) + +ROM_START( filthyr ) // Filthy Rich (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(4b57aa15) SHA1(076ef6c1782a0ec34c15bffd5e93644ba179c1f7) ) ROM_REGION(0x100000, "rom", 0) @@ -125,9 +219,24 @@ ROM_START( filthyr ) ROM_LOAD( "xu-18.bin", 0x0000, 0x080000, CRC(fb0de283) SHA1(e1df32787a6fcf597041923d977eacbe5744b770) ) ROM_END -ROM_START( hottop ) - ROM_REGION32_LE(0x100000, "maincpu", 0) - ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, NO_DUMP ) // missing? + +ROM_START( hottop ) // Hot Toppings (English) + ROM_REGION(0x100000, "maincpu", 0) + ROM_LOAD( "hot_topping_9fbah.xu03", 0x0000, 0x100000, CRC(9da8d2d7) SHA1(722809ec9df83c866ec7cbcc83b619d65134b523) ) + + ROM_REGION(0x100000, "rom", 0) + ROM_LOAD( "hot_topping_8aceh.xu02", 0x0000, 0x100000, CRC(15ebe9a4) SHA1(3852bf9bd0976abe46102b2c237a513f6447bea6) ) + ROM_LOAD( "hot_topping_2935h.xu04", 0x0000, 0x100000, CRC(8cab6576) SHA1(be1dc406cbf4fd4035f4e123c4095a0a07350035) ) + // sound + ROM_LOAD( "hot_topping_1a00h.xu30", 0x0000, 0x100000, CRC(18b938ff) SHA1(4c75bfc23cb3754aa1457ed4183664c8d579b46f) ) + ROM_LOAD( "hot_topping_8f00h.xu31", 0x0000, 0x100000, CRC(944df9f0) SHA1(5cc1f40aefcc82098d12d00fef603d86cd0c145f) ) + ROM_LOAD( "hot_topping_6100h.xu17", 0x0000, 0x100000, CRC(9345c066) SHA1(ae04f59e4791ec1cc8751fb1fe194e4f690e442b) ) + ROM_LOAD( "hot_topping_1600h.xu18", 0x0000, 0x100000, CRC(2ad1b2e2) SHA1(47832422be66acace22fe411062010303b9ce899) ) +ROM_END + +ROM_START( hottopa ) // Hot Toppings (Russian?) + ROM_REGION(0x100000, "maincpu", 0) + ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, NO_DUMP ) // missing ROM_REGION(0x100000, "rom", 0) ROM_LOAD( "xu-2.bin", 0x0000, 0x100000, CRC(15ebe9a4) SHA1(3852bf9bd0976abe46102b2c237a513f6447bea6) ) @@ -139,8 +248,9 @@ ROM_START( hottop ) ROM_LOAD( "xu-18.bin", 0x0000, 0x100000, CRC(bee1eae3) SHA1(e18b10e7c6dafd9df8b34ee19ce74a82b8adcec4) ) ROM_END -ROM_START( inwinner ) - ROM_REGION32_LE(0x100000, "maincpu", 0) + +ROM_START( inwinner ) // Instant Winner (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(f5c26579) SHA1(4ef22c0115417320ef17f0c3fc7550db24bdcb8c) ) ROM_REGION(0x100000, "rom", 0) @@ -153,9 +263,8 @@ ROM_START( inwinner ) ROM_END - -ROM_START( jptparty ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( jptparty ) // Jackpot Party (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(750bfd36) SHA1(161c98455cb2ceb1d7d1a35941b5bb0784129b25) ) ROM_REGION(0x100000, "rom", 0) @@ -168,8 +277,8 @@ ROM_START( jptparty ) ROM_END -ROM_START( leprgld ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( leprgld ) // Leprechaun's Gold (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(0985d6b6) SHA1(291c124a9ae813942b14620789370b4a7b9cf85e) ) ROM_REGION(0x100000, "rom", 0) @@ -183,10 +292,24 @@ ROM_START( leprgld ) ROM_LOAD( "xu-18.bin", 0x0000, 0x100000, CRC(a3f82467) SHA1(0971f32bff0d4bda43cd98e975e49710d73f9286) ) ROM_END +ROM_START( leprglds ) // Leprechaun's Gold (Spanish) + ROM_REGION(0x100000, "maincpu", 0) + ROM_LOAD( "leprechaun's_gold.xu03", 0x0000, 0x100000, CRC(a750e5b9) SHA1(891bbfded9ece4d81aa8415cbb5a2728c118300e) ) + + ROM_REGION(0x100000, "rom", 0) + ROM_LOAD( "leprechaun's_gold.xu02", 0x0000, 0x100000, CRC(884d4871) SHA1(2c7a452dd466532df5fc14b209302a5ad42bb356) ) + ROM_LOAD( "leprechaun's_gold.xu04", 0x0000, 0x100000, CRC(02642dd2) SHA1(4ac00b9053f9859865910888952e09d2fda5db06) ) + ROM_LOAD( "leprechaun's_gold.xu05", 0x0000, 0x100000, CRC(eedd0dd2) SHA1(2b1dceb541a660357404f24069392f7892c87cfb) ) + // sound + ROM_LOAD( "leprechaun's_gold.xu30", 0x0000, 0x100000, CRC(6a41056f) SHA1(54168a0115dc8d232100fbbd440063dc75fdbaaf) ) + ROM_LOAD( "leprechaun's_gold.xu31", 0x0000, 0x100000, CRC(0485e432) SHA1(c57a47fd27a14a2ea01400515f61be58be5fa391) ) + ROM_LOAD( "leprechaun's_gold.xu17", 0x0000, 0x100000, CRC(10bfcdcf) SHA1(34dc619f33c81014120d9b6a2f8b2373451af2e4) ) + ROM_LOAD( "leprechaun's_gold.xu18", 0x0000, 0x100000, CRC(a3f82467) SHA1(0971f32bff0d4bda43cd98e975e49710d73f9286) ) +ROM_END -ROM_START( lol ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( lol ) // Life of Luxury (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(28af87a0) SHA1(c94b98b6922b5f5551eff239226bfe007535fc21) ) ROM_REGION(0x100000, "rom", 0) @@ -197,8 +320,8 @@ ROM_START( lol ) ROM_END -ROM_START( lovewin ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( lovewin ) // Love To Win (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(b1b2c7da) SHA1(96430bfa062467bba1daaf2e6180068b3211a739) ) ROM_REGION(0x100000, "rom", 0) @@ -213,9 +336,8 @@ ROM_START( lovewin ) ROM_END - -ROM_START( mtburn ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( mtburn ) // Money To Burn (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(a329aff0) SHA1(2f631783bd15b8a695d92d0861e167130f914046) ) ROM_REGION(0x100000, "rom", 0) @@ -228,9 +350,8 @@ ROM_START( mtburn ) ROM_END - -ROM_START( otchart ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( otchart ) // Off The Charts (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(b1baee77) SHA1(9f8e87bb10499fa73d961bce4fd75d31c880ea51) ) ROM_REGION(0x100000, "rom", 0) @@ -243,9 +364,8 @@ ROM_START( otchart ) ROM_END - -ROM_START( perfect ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( perfect ) // Perfect Game (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(1e90dc52) SHA1(6ac1762ce979e1259e03025d89271034565d8f4a) ) ROM_REGION(0x100000, "rom", 0) @@ -260,8 +380,8 @@ ROM_START( perfect ) ROM_END -ROM_START( reelemin ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( reelemin ) // Reel 'Em In (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(a3840965) SHA1(1e782bb5eaeabce0d1a07eb895d344028364cd4f) ) ROM_REGION(0x100000, "rom", 0) @@ -274,8 +394,8 @@ ROM_START( reelemin ) ROM_END -ROM_START( sonoth ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( sonoth ) // Something For Nothing (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(a5afc1dd) SHA1(5743c630d382d1cc2f7720a2038b105f0dd49790) ) ROM_REGION(0x100000, "rom", 0) @@ -285,8 +405,8 @@ ROM_START( sonoth ) ROM_END -ROM_START( swingin ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( swingin ) // Swingin In The Green (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(f0ee2385) SHA1(8269cf0a765228fd8a2512cefde715e3a7219d7a) ) ROM_REGION(0x100000, "rom", 0) @@ -299,8 +419,8 @@ ROM_START( swingin ) ROM_END -ROM_START( wmstopb ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( wmstopb ) // Top Banana (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(dbbabd02) SHA1(6e85bb11222c593a326e282e6edfff3647379c78) ) ROM_REGION(0x100000, "rom", 0) @@ -312,8 +432,8 @@ ROM_START( wmstopb ) ROM_END -ROM_START( wdun ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( wdun ) // Who Dunnit (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(9c5f2a50) SHA1(8c591eb80276d460dd66bdf817778aed11d013ef) ) ROM_REGION(0x100000, "rom", 0) @@ -326,8 +446,8 @@ ROM_START( wdun ) ROM_END -ROM_START( winbid ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( winbid ) // Winning Bid (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(873eecfb) SHA1(35960c9a2a4efeac8b8cea94f1eac6ffb175b9a9) ) ROM_REGION(0x100000, "rom", 0) @@ -341,8 +461,8 @@ ROM_START( winbid ) ROM_END -ROM_START( wldstrek ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( wldstrek ) // Wild Streak (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(6200c5e3) SHA1(fcf542875a11972974a9c72e171d4ca0686b0c0e) ) ROM_REGION(0x100000, "rom", 0) @@ -355,8 +475,8 @@ ROM_START( wldstrek ) ROM_END -ROM_START( yukongld ) - ROM_REGION32_LE(0x100000, "maincpu", 0) +ROM_START( yukongld ) // Yukon Gold (Russian) + ROM_REGION(0x100000, "maincpu", 0) ROM_LOAD( "xu-3.bin", 0x0000, 0x100000, CRC(7c12f7c7) SHA1(20eb1a5ff85e0fd36e669c7dc53b677f12446af3) ) ROM_REGION(0x100000, "rom", 0) @@ -371,33 +491,45 @@ ROM_START( yukongld ) ROM_END +/********************************************* +* Driver Init * +*********************************************/ DRIVER_INIT_MEMBER(wms_state,wms) { } -GAME( 200?, wms, 0, wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 1)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, wmsa, wms, wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 2)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, wmsb, wms, wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 3)", GAME_IS_SKELETON_MECHANICAL ) - -GAME( 200?, btippers, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Big Tippers (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, wmsboom, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Boom (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, cashcrop, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Cash Crop (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, filthyr, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Filthy Rich (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, hottop, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Hot Toppings (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, inwinner, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Instant Winner (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, jptparty, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Jackpot Party (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, leprgld, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Leprechaun's Gold (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, lol, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Life of Luxury (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, lovewin, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Love To Win (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, mtburn, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Money To Burn (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, otchart, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Off The Charts (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, perfect, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Perfect Game (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, reelemin, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Reel 'Em In (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, sonoth, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Something For Nothing (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, swingin, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Swingin In The Green (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, wmstopb, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Top Banana (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, wdun, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Who Dunnit (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, winbid, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Winning Bid (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, wldstrek, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Wild Streak (Russia)", GAME_IS_SKELETON_MECHANICAL ) -GAME( 200?, yukongld, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Yukon Gold (Russia)", GAME_IS_SKELETON_MECHANICAL ) + +/********************************************* +* Game Drivers * +*********************************************/ + +// YEAR NAME PARENT MACHINE INPUT STATS INIT ROT COMPANY FULLNAME FLAGS + +GAME( 200?, wms, 0, wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 1)", GAME_IS_SKELETON ) +GAME( 200?, wmsa, wms, wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 2)", GAME_IS_SKELETON ) +GAME( 200?, wmsb, wms, wms, wms, wms_state, wms, ROT0, "WMS", "WMS SetUp/Clear Chips (set 3)", GAME_IS_SKELETON ) + +GAME( 200?, btippers, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Big Tippers (Russian)", GAME_IS_SKELETON ) +GAME( 200?, wmsboom, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Boom (Russian)", GAME_IS_SKELETON ) +GAME( 200?, cashcrop, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Cash Crop (Russian)", GAME_IS_SKELETON ) +GAME( 200?, filthyr, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Filthy Rich (Russian)", GAME_IS_SKELETON ) +GAME( 200?, hottop, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Hot Toppings (English)", GAME_IS_SKELETON ) +GAME( 200?, hottopa, hottop, wms, wms, wms_state, wms, ROT0, "WMS", "Hot Toppings (Russian?)", GAME_IS_SKELETON ) +GAME( 200?, inwinner, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Instant Winner (Russian)", GAME_IS_SKELETON ) +GAME( 200?, jptparty, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Jackpot Party (Russian)", GAME_IS_SKELETON ) +GAME( 200?, leprgld, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Leprechaun's Gold (Russian)", GAME_IS_SKELETON ) +GAME( 200?, leprglds, leprgld, wms, wms, wms_state, wms, ROT0, "WMS", "Leprechaun's Gold (Spanish)", GAME_IS_SKELETON ) +GAME( 200?, lol, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Life of Luxury (Russian)", GAME_IS_SKELETON ) +GAME( 200?, lovewin, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Love To Win (Russian)", GAME_IS_SKELETON ) +GAME( 200?, mtburn, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Money To Burn (Russian)", GAME_IS_SKELETON ) +GAME( 200?, otchart, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Off The Charts (Russian)", GAME_IS_SKELETON ) +GAME( 200?, perfect, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Perfect Game (Russian)", GAME_IS_SKELETON ) +GAME( 200?, reelemin, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Reel 'Em In (Russian)", GAME_IS_SKELETON ) +GAME( 200?, sonoth, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Something For Nothing (Russian)", GAME_IS_SKELETON ) +GAME( 200?, swingin, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Swingin In The Green (Russian)", GAME_IS_SKELETON ) +GAME( 200?, wmstopb, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Top Banana (Russian)", GAME_IS_SKELETON ) +GAME( 200?, wdun, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Who Dunnit (Russian)", GAME_IS_SKELETON ) +GAME( 200?, winbid, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Winning Bid (Russian)", GAME_IS_SKELETON ) +GAME( 200?, wldstrek, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Wild Streak (Russian)", GAME_IS_SKELETON ) +GAME( 200?, yukongld, 0, wms, wms, wms_state, wms, ROT0, "WMS", "Yukon Gold (Russian)", GAME_IS_SKELETON ) diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c index 86047557ba3..ac5ef82d215 100644 --- a/src/mame/drivers/xmen.c +++ b/src/mame/drivers/xmen.c @@ -660,6 +660,34 @@ ROM_START( xmen2pe ) ROM_LOAD( "xmen_eaa.nv", 0x0000, 0x0080, CRC(1cbcb653) SHA1(a86b4ad34ccbd868662ff8c61eb21ec07e8bf8b1) ) ROM_END +ROM_START( xmen2pu ) + ROM_REGION( 0x100000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "065-uab04.10d", 0x00000, 0x20000, CRC(ff003db1) SHA1(b8aeb98dc0a38f0bda152d893fb60679bbdbadb3) ) /* US 2 Player version */ + ROM_LOAD16_BYTE( "065-uab05.10f", 0x00001, 0x20000, CRC(4e99a943) SHA1(66b47de497a116b2002cc5496c1a3f4173a55bc5) ) + ROM_LOAD16_BYTE( "065-a02.9d", 0x80000, 0x40000, CRC(b31dc44c) SHA1(4bdac05826b4d6d4fe46686ede5190e2f73eefc5) ) + ROM_LOAD16_BYTE( "065-a03.9f", 0x80001, 0x40000, CRC(13842fe6) SHA1(b61f094eb94336edb8708d3437ead9b853b2d6e6) ) + + ROM_REGION( 0x30000, "audiocpu", 0 ) /* 64k+128k for sound cpu */ + ROM_LOAD( "065-a01.6f", 0x00000, 0x20000, CRC(147d3a4d) SHA1(a14409fe991e803b9e7812303e3a9ebd857d8b01) ) + ROM_RELOAD( 0x10000, 0x20000 ) + + ROM_REGION( 0x200000, "k052109", 0 ) /* tiles */ + ROM_LOAD32_WORD( "065-a08.15l", 0x000000, 0x100000, CRC(6b649aca) SHA1(2595f314517738e8614facf578cc951a6c36a180) ) + ROM_LOAD32_WORD( "065-a07.16l", 0x000002, 0x100000, CRC(c5dc8fc4) SHA1(9887cb002c8b72be7ce933cb397f00cdc5506c8c) ) + + ROM_REGION( 0x400000, "gfx2", 0 ) /* graphics (addressable by the main CPU) */ + ROM_LOAD64_WORD( "065-a09.2h", 0x000000, 0x100000, CRC(ea05d52f) SHA1(7f2c14f907355856fb94e3a67b73aa1919776835) ) /* sprites */ + ROM_LOAD64_WORD( "065-a10.2l", 0x000002, 0x100000, CRC(96b91802) SHA1(641943557b59b91f0edd49ec8a73cef7d9268b32) ) + ROM_LOAD64_WORD( "065-a12.1h", 0x000004, 0x100000, CRC(321ed07a) SHA1(5b00ed676daeea974bdce6701667cfe573099dad) ) + ROM_LOAD64_WORD( "065-a11.1l", 0x000006, 0x100000, CRC(46da948e) SHA1(168ac9178ee5bad5931557fb549e1237971d7839) ) + + ROM_REGION( 0x200000, "k054539", 0 ) /* samples for the 054539 */ + ROM_LOAD( "065-a06.1f", 0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) ) + + ROM_REGION16_BE( 0x80, "eeprom", 0 ) + ROM_LOAD( "xmen_uab.nv", 0x0000, 0x0080, CRC(79b76593) SHA1(f9921a2963f249fa341bfb57cc9e213e2efed9b9) ) +ROM_END + ROM_START( xmen2pa ) ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD16_BYTE( "065-aaa04.10d", 0x00000, 0x20000, CRC(7f8b27c2) SHA1(052db1f47671564a440544a41fc397a19d1aff3a) ) /* Asia 2 Player version */ @@ -798,7 +826,6 @@ ROM_START( xmen6p ) ROM_LOAD( "xmen_ecb.nv", 0x0000, 0x0080, CRC(462c6e1a) SHA1(a57087163d7a760d5922c70842cfae20e6a2f5b5) ) ROM_END - ROM_START( xmen6pu ) ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD16_BYTE( "065-ucb04.18g", 0x00000, 0x20000, CRC(0f09b8e0) SHA1(79f4d86d8ec45b39e34ddf45860bea0c74dae183) ) /* US 6 Player version */ @@ -835,6 +862,7 @@ GAME( 1992, xmene, xmen, xmen, xmen, driver_device, 0, ROT0, "Konami", GAME( 1992, xmena, xmen, xmen, xmen, driver_device, 0, ROT0, "Konami", "X-Men (4 Players ver AEA)", GAME_SUPPORTS_SAVE ) GAME( 1992, xmenaa, xmen, xmen, xmen, driver_device, 0, ROT0, "Konami", "X-Men (4 Players ver ADA)", GAME_SUPPORTS_SAVE ) GAME( 1992, xmen2pe, xmen, xmen, xmen2p, driver_device, 0, ROT0, "Konami", "X-Men (2 Players ver EAA)", GAME_SUPPORTS_SAVE ) +GAME( 1992, xmen2pu, xmen, xmen, xmen2p, driver_device, 0, ROT0, "Konami", "X-Men (2 Players ver UAB)", GAME_SUPPORTS_SAVE ) GAME( 1992, xmen2pa, xmen, xmen, xmen2p, driver_device, 0, ROT0, "Konami", "X-Men (2 Players ver AAA)", GAME_SUPPORTS_SAVE ) GAME( 1992, xmen2pj, xmen, xmen, xmen2p, driver_device, 0, ROT0, "Konami", "X-Men (2 Players ver JAA)", GAME_SUPPORTS_SAVE ) diff --git a/src/mame/etc/template_cpu.c b/src/mame/etc/template_cpu.c index ee76f8fefbd..4c3e3cac81e 100644 --- a/src/mame/etc/template_cpu.c +++ b/src/mame/etc/template_cpu.c @@ -107,12 +107,12 @@ xxx_cpu_device::xxx_cpu_device(const machine_config &mconfig, const char *tag, d } -void xxx_cpu_device::state_string_export(const device_state_entry &entry, astring &str) +void xxx_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) { switch (entry.index()) { case STATE_GENFLAGS: - str.printf("%c%c%c%c", + strprintf(str, "%c%c%c%c", m_flags & 0x80 ? 'S':'.', m_flags & 0x40 ? 'Z':'.', m_flags & 0x20 ? 'V':'.', diff --git a/src/mame/etc/template_cpu.h b/src/mame/etc/template_cpu.h index ff3cadc646c..82900d37406 100644 --- a/src/mame/etc/template_cpu.h +++ b/src/mame/etc/template_cpu.h @@ -42,7 +42,7 @@ protected: virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); } // device_state_interface overrides - void state_string_export(const device_state_entry &entry, astring &str); + void state_string_export(const device_state_entry &entry, std::string &str); // device_disasm_interface overrides virtual UINT32 disasm_min_opcode_bytes() const { return 4; } diff --git a/src/mame/includes/aztarac.h b/src/mame/includes/aztarac.h index 0636d55bed1..7590b9ffaf4 100644 --- a/src/mame/includes/aztarac.h +++ b/src/mame/includes/aztarac.h @@ -14,31 +14,36 @@ public: m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_vector(*this, "vector"), + m_screen(*this, "screen"), m_nvram(*this, "nvram") , - m_vectorram(*this, "vectorram"), - m_screen(*this, "screen") { } + m_vectorram(*this, "vectorram") { } required_device<cpu_device> m_maincpu; required_device<cpu_device> m_audiocpu; required_device<vector_device> m_vector; + required_device<screen_device> m_screen; + required_shared_ptr<UINT16> m_nvram; required_shared_ptr<UINT16> m_vectorram; - required_device<screen_device> m_screen; int m_sound_status; int m_xcenter; int m_ycenter; + DECLARE_READ16_MEMBER(nvram_r); DECLARE_READ16_MEMBER(joystick_r); - DECLARE_WRITE16_MEMBER(aztarac_ubr_w); - DECLARE_READ16_MEMBER(aztarac_sound_r); - DECLARE_WRITE16_MEMBER(aztarac_sound_w); - DECLARE_READ8_MEMBER(aztarac_snd_command_r); - DECLARE_READ8_MEMBER(aztarac_snd_status_r); - DECLARE_WRITE8_MEMBER(aztarac_snd_status_w); - virtual void machine_reset(); + DECLARE_WRITE16_MEMBER(ubr_w); + DECLARE_READ16_MEMBER(sound_r); + DECLARE_WRITE16_MEMBER(sound_w); + DECLARE_READ8_MEMBER(snd_command_r); + DECLARE_READ8_MEMBER(snd_status_r); + DECLARE_WRITE8_MEMBER(snd_status_w); + + virtual void machine_start(); virtual void video_start(); - INTERRUPT_GEN_MEMBER(aztarac_snd_timed_irq); - IRQ_CALLBACK_MEMBER(aztarac_irq_callback); + + INTERRUPT_GEN_MEMBER(snd_timed_irq); + IRQ_CALLBACK_MEMBER(irq_callback); + inline void read_vectorram(UINT16 *vectorram, int addr, int *x, int *y, int *c); }; diff --git a/src/mame/includes/bagman.h b/src/mame/includes/bagman.h index 8ada16d917b..9d4b9ffbba2 100644 --- a/src/mame/includes/bagman.h +++ b/src/mame/includes/bagman.h @@ -1,25 +1,35 @@ +#include "sound/tms5110.h" class bagman_state : public driver_device { public: bagman_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), + m_tmsprom(*this, "tmsprom"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_video_enable(*this, "video_enable"), - m_spriteram(*this, "spriteram"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_spriteram(*this, "spriteram") { } + + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; + required_device<palette_device> m_palette; + optional_device<tmsprom_device> m_tmsprom; + required_shared_ptr<UINT8> m_videoram; + required_shared_ptr<UINT8> m_colorram; + required_shared_ptr<UINT8> m_video_enable; + required_shared_ptr<UINT8> m_spriteram; + + UINT8 m_irq_mask; UINT8 m_ls259_buf[8]; UINT8 m_p1_res; UINT8 m_p1_old_val; UINT8 m_p2_res; UINT8 m_p2_old_val; - required_shared_ptr<UINT8> m_videoram; - required_shared_ptr<UINT8> m_colorram; - required_shared_ptr<UINT8> m_video_enable; /*table holds outputs of all ANDs (after AND map)*/ UINT8 m_andmap[64]; @@ -31,31 +41,38 @@ public: UINT8 m_outvalue[8]; tilemap_t *m_bg_tilemap; - required_shared_ptr<UINT8> m_spriteram; - UINT8 m_irq_mask; - DECLARE_WRITE8_MEMBER(bagman_coin_counter_w); + // common + DECLARE_WRITE8_MEMBER(coincounter_w); DECLARE_WRITE8_MEMBER(irq_mask_w); - DECLARE_WRITE8_MEMBER(bagman_pal16r6_w); - DECLARE_READ8_MEMBER(bagman_pal16r6_r); - void update_pal(); - DECLARE_WRITE8_MEMBER(bagman_videoram_w); - DECLARE_WRITE8_MEMBER(bagman_colorram_w); - DECLARE_WRITE8_MEMBER(bagman_flipscreen_w); - DECLARE_WRITE8_MEMBER(bagman_ls259_w); + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(colorram_w); + DECLARE_WRITE8_MEMBER(flipscreen_w); + + // bagman + DECLARE_WRITE8_MEMBER(ls259_w); + DECLARE_WRITE8_MEMBER(pal16r6_w); + DECLARE_READ8_MEMBER(pal16r6_r); + + // squaitsa DECLARE_READ8_MEMBER(dial_input_p1_r); DECLARE_READ8_MEMBER(dial_input_p2_r); - DECLARE_DRIVER_INIT(bagman); + TILE_GET_INFO_MEMBER(get_bg_tile_info); - DECLARE_MACHINE_RESET(bagman); - DECLARE_VIDEO_START(bagman); + + virtual void machine_start(); + DECLARE_MACHINE_START(bagman); + DECLARE_MACHINE_START(squaitsa); + virtual void machine_reset(); + virtual void video_start(); DECLARE_PALETTE_INIT(bagman); - UINT32 screen_update_bagman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + DECLARE_DRIVER_INIT(bagman); + INTERRUPT_GEN_MEMBER(vblank_irq); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; - required_device<palette_device> m_palette; + void update_pal(); }; /*----------- timings -----------*/ diff --git a/src/mame/includes/centiped.h b/src/mame/includes/centiped.h index 9c547ec847c..6184ad604aa 100644 --- a/src/mame/includes/centiped.h +++ b/src/mame/includes/centiped.h @@ -53,7 +53,7 @@ public: DECLARE_WRITE8_MEMBER(led_w); DECLARE_WRITE8_MEMBER(coin_count_w); DECLARE_WRITE8_MEMBER(bullsdrt_coin_count_w); - DECLARE_READ8_MEMBER(caterplr_rand_r); + DECLARE_READ8_MEMBER(caterplr_unknown_r); DECLARE_WRITE8_MEMBER(caterplr_AY8910_w); DECLARE_READ8_MEMBER(caterplr_AY8910_r); DECLARE_READ8_MEMBER(multiped_eeprom_r); diff --git a/src/mame/includes/cheekyms.h b/src/mame/includes/cheekyms.h index fe3634e5aad..4c29084979e 100644 --- a/src/mame/includes/cheekyms.h +++ b/src/mame/includes/cheekyms.h @@ -34,21 +34,21 @@ public: /* video-related */ tilemap_t *m_cm_tilemap; bitmap_ind16 *m_bitmap_buffer; - + UINT8 m_irq_mask; DECLARE_WRITE8_MEMBER(port_40_w); DECLARE_WRITE8_MEMBER(port_80_w); - + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); INTERRUPT_GEN_MEMBER(vblank_irq); - + TILE_GET_INFO_MEMBER(get_tile_info); - + virtual void machine_start(); virtual void video_start(); DECLARE_PALETTE_INIT(cheekyms); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, gfx_element *gfx, int flip ); }; diff --git a/src/mame/includes/clshroad.h b/src/mame/includes/clshroad.h index a845e52f707..c4bdc9de7ec 100644 --- a/src/mame/includes/clshroad.h +++ b/src/mame/includes/clshroad.h @@ -28,7 +28,7 @@ public: DECLARE_WRITE8_MEMBER(flipscreen_w); DECLARE_WRITE8_MEMBER(vram_0_w); DECLARE_WRITE8_MEMBER(vram_1_w); - + TILE_GET_INFO_MEMBER(get_tile_info_0a); TILE_GET_INFO_MEMBER(get_tile_info_0b); TILEMAP_MAPPER_MEMBER(tilemap_scan_rows_extra); diff --git a/src/mame/includes/darkseal.h b/src/mame/includes/darkseal.h index fab8b8fee0b..8ebb638605d 100644 --- a/src/mame/includes/darkseal.h +++ b/src/mame/includes/darkseal.h @@ -7,42 +7,43 @@ class darkseal_state : public driver_device public: darkseal_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_palette(*this, "palette"), m_deco_tilegen1(*this, "tilegen1"), m_deco_tilegen2(*this, "tilegen2"), - m_spriteram(*this, "spriteram") , + m_sprgen(*this, "spritegen"), + m_spriteram(*this, "spriteram"), m_ram(*this, "ram"), m_pf1_rowscroll(*this, "pf1_rowscroll"), m_pf3_rowscroll(*this, "pf3_rowscroll"), - m_sprgen(*this, "spritegen"), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_palette(*this, "palette"), m_generic_paletteram_16(*this, "paletteram"), m_generic_paletteram2_16(*this, "paletteram2") { } + required_device<cpu_device> m_maincpu; + required_device<cpu_device> m_audiocpu; + required_device<palette_device> m_palette; required_device<deco16ic_device> m_deco_tilegen1; required_device<deco16ic_device> m_deco_tilegen2; + required_device<decospr_device> m_sprgen; required_device<buffered_spriteram16_device> m_spriteram; + required_shared_ptr<UINT16> m_ram; required_shared_ptr<UINT16> m_pf1_rowscroll; //UINT16 *m_pf2_rowscroll; required_shared_ptr<UINT16> m_pf3_rowscroll; //UINT16 *m_pf4_rowscroll; - optional_device<decospr_device> m_sprgen; + required_shared_ptr<UINT16> m_generic_paletteram_16; + required_shared_ptr<UINT16> m_generic_paletteram2_16; + DECLARE_WRITE16_MEMBER(control_w); + DECLARE_READ16_MEMBER(control_r); + DECLARE_WRITE16_MEMBER(palette_24bit_rg_w); + DECLARE_WRITE16_MEMBER(palette_24bit_b_w); - int m_flipscreen; - DECLARE_WRITE16_MEMBER(darkseal_control_w); - DECLARE_READ16_MEMBER(darkseal_control_r); - DECLARE_WRITE16_MEMBER(darkseal_palette_24bit_rg_w); - DECLARE_WRITE16_MEMBER(darkseal_palette_24bit_b_w); DECLARE_DRIVER_INIT(darkseal); virtual void video_start(); - UINT32 screen_update_darkseal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void update_24bitcol(int offset); - required_device<cpu_device> m_maincpu; - required_device<cpu_device> m_audiocpu; - required_device<palette_device> m_palette; - required_shared_ptr<UINT16> m_generic_paletteram_16; - required_shared_ptr<UINT16> m_generic_paletteram2_16; }; diff --git a/src/mame/includes/dc.h b/src/mame/includes/dc.h index 98c2d870783..a2c81714e0a 100644 --- a/src/mame/includes/dc.h +++ b/src/mame/includes/dc.h @@ -41,7 +41,7 @@ class dc_state : public driver_device UINT8 m_armrst; struct { - UINT32 aica_addr; + UINT32 g2_addr; UINT32 root_addr; UINT32 size; UINT8 dir; @@ -49,18 +49,18 @@ class dc_state : public driver_device UINT8 indirect; UINT8 start; UINT8 sel; - }m_wave_dma; + }m_g2_dma[4]; virtual void machine_start(); virtual void machine_reset(); - TIMER_CALLBACK_MEMBER(aica_dma_irq); + TIMER_CALLBACK_MEMBER(g2_dma_irq); TIMER_CALLBACK_MEMBER(ch2_dma_irq); TIMER_CALLBACK_MEMBER(yuv_fifo_irq); DECLARE_READ32_MEMBER(dc_aica_reg_r); DECLARE_WRITE32_MEMBER(dc_aica_reg_w); DECLARE_READ32_MEMBER(dc_arm_aica_r); DECLARE_WRITE32_MEMBER(dc_arm_aica_w); - void wave_dma_execute(address_space &space); + void g2_dma_execute(address_space &space, int channel); inline int decode_reg32_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift); inline int decode_reg3216_64(UINT32 offset, UINT64 mem_mask, UINT64 *shift); int dc_compute_interrupt_level(); diff --git a/src/mame/includes/hng64.h b/src/mame/includes/hng64.h index 2dce852e5a0..6f83990a298 100644 --- a/src/mame/includes/hng64.h +++ b/src/mame/includes/hng64.h @@ -323,7 +323,7 @@ public: void setLighting(const UINT16* packet); void set3dFlags(const UINT16* packet); void setCameraProjectionMatrix(const UINT16* packet); - void recoverPolygonBlock(const UINT16* packet, std::vector<struct polygon> &polys, int* numPolys); + void recoverPolygonBlock(const UINT16* packet, int* numPolys); void hng64_mark_all_tiles_dirty(int tilemap); void hng64_mark_tile_dirty(int tilemap, int tile_index); @@ -389,4 +389,6 @@ public: DECLARE_READ16_MEMBER(sound_comms_r); DECLARE_WRITE16_MEMBER(sound_comms_w); UINT16 main_latch[2],sound_latch[2]; + + std::vector<polygon> polys;//(1024*5); }; diff --git a/src/mame/includes/n64.h b/src/mame/includes/n64.h index ffad8cca5bf..8f55c04823f 100644 --- a/src/mame/includes/n64.h +++ b/src/mame/includes/n64.h @@ -123,6 +123,10 @@ public: bool disk_present; bool cart_present; + // Mouse X2/Y2 for delta position + int mouse_x2[4]; + int mouse_y2[4]; + void poll_reset_button(bool button); UINT32 dp_clock; @@ -339,16 +343,16 @@ extern const device_type N64PERIPH; #define DD_SEQ_MICRO_INT_MASK 0x80000000 #define DD_SEQ_MICRO_PC_ENABLE 0x40000000 -#define SECTORS_PER_BLOCK 85 -#define BLOCKS_PER_TRACK 2 +#define SECTORS_PER_BLOCK 85 +#define BLOCKS_PER_TRACK 2 const unsigned int ddZoneSecSize[16] = {232,216,208,192,176,160,144,128, - 216,208,192,176,160,144,128,112}; + 216,208,192,176,160,144,128,112}; const unsigned int ddZoneTrackSize[16] = {158,158,149,149,149,149,149,114, - 158,158,149,149,149,149,149,114}; + 158,158,149,149,149,149,149,114}; const unsigned int ddStartOffset[16] = {0x0,0x5F15E0,0xB79D00,0x10801A0,0x1523720,0x1963D80,0x1D414C0,0x20BBCE0, - 0x23196E0,0x28A1E00,0x2DF5DC0,0x3299340,0x36D99A0,0x3AB70E0,0x3E31900,0x4149200}; + 0x23196E0,0x28A1E00,0x2DF5DC0,0x3299340,0x36D99A0,0x3AB70E0,0x3E31900,0x4149200}; diff --git a/src/mame/includes/naomi.h b/src/mame/includes/naomi.h index 13d3800880b..def6e3d1cb8 100644 --- a/src/mame/includes/naomi.h +++ b/src/mame/includes/naomi.h @@ -5,6 +5,25 @@ naomi.h -> NAOMI includes */ #include "machine/eepromser.h" #include "machine/intelfsh.h" +#include "cpu/arm7/arm7.h" +#include "cpu/z80/z80.h" +#include "machine/x76f100.h" +#include "machine/maple-dc.h" +#include "machine/dc-ctrl.h" +#include "machine/mie.h" +#include "machine/naomirom.h" +#include "machine/naomigd.h" +#include "machine/naomim1.h" +#include "machine/naomim2.h" +#include "machine/naomim4.h" +#include "machine/awboard.h" +#include "cpu/sh4/sh4.h" +#include "cpu/arm7/arm7core.h" +#include "sound/aica.h" +#include "machine/aicartc.h" +#include "machine/jvsdev.h" +#include "machine/jvs13551.h" +#include "dc.h" enum { JVSBD_DEFAULT = 0, @@ -84,3 +103,6 @@ class naomi_state : public dc_state DECLARE_READ64_MEMBER( naomigd_sfz3ugd_idle_skip_r ); DECLARE_READ64_MEMBER( hotd2_idle_skip_r ); }; + +MACHINE_CONFIG_EXTERN(naomi_aw_base); +INPUT_PORTS_EXTERN( naomi_debug ); diff --git a/src/mame/includes/nbmj8688.h b/src/mame/includes/nbmj8688.h index 7dfdd667558..b617ea509b7 100644 --- a/src/mame/includes/nbmj8688.h +++ b/src/mame/includes/nbmj8688.h @@ -22,7 +22,10 @@ public: optional_device<hd61830_device> m_lcdc0; optional_device<hd61830_device> m_lcdc1; - int m_mjsikaku_scrolly; + // defined in video_start + int m_gfxmode; + + int m_scrolly; int m_blitter_destx; int m_blitter_desty; int m_blitter_sizex; @@ -30,32 +33,39 @@ public: int m_blitter_direction_x; int m_blitter_direction_y; int m_blitter_src_addr; - int m_mjsikaku_gfxrom; - int m_mjsikaku_dispflag; - int m_mjsikaku_gfxflag2; - int m_mjsikaku_gfxflag3; - int m_mjsikaku_flipscreen; - int m_mjsikaku_screen_refresh; - int m_mjsikaku_gfxmode; - bitmap_ind16 *m_mjsikaku_tmpbitmap; - UINT16 *m_mjsikaku_videoram; + int m_gfxrom; + int m_dispflag; + int m_gfxflag2; + int m_gfxflag3; + int m_flipscreen; + int m_screen_refresh; + bitmap_ind16 *m_tmpbitmap; + UINT16 *m_videoram; UINT8 *m_clut; - int m_mjsikaku_flipscreen_old; + int m_flipscreen_old; + emu_timer *m_blitter_timer; + + // common DECLARE_READ8_MEMBER(ff_r); - DECLARE_WRITE8_MEMBER(barline_output_w); - DECLARE_WRITE8_MEMBER(nbmj8688_clut_w); - DECLARE_WRITE8_MEMBER(nbmj8688_blitter_w); + DECLARE_WRITE8_MEMBER(clut_w); + DECLARE_WRITE8_MEMBER(blitter_w); + DECLARE_WRITE8_MEMBER(scrolly_w); + + DECLARE_WRITE8_MEMBER(mjsikaku_gfxflag2_w); DECLARE_WRITE8_MEMBER(mjsikaku_gfxflag3_w); - DECLARE_WRITE8_MEMBER(mjsikaku_scrolly_w); DECLARE_WRITE8_MEMBER(mjsikaku_romsel_w); DECLARE_WRITE8_MEMBER(secolove_romsel_w); DECLARE_WRITE8_MEMBER(crystalg_romsel_w); DECLARE_WRITE8_MEMBER(seiha_romsel_w); - DECLARE_WRITE8_MEMBER(nbmj8688_HD61830B_both_instr_w); - DECLARE_WRITE8_MEMBER(nbmj8688_HD61830B_both_data_w); + DECLARE_WRITE8_MEMBER(HD61830B_both_instr_w); + DECLARE_WRITE8_MEMBER(HD61830B_both_data_w); + DECLARE_READ8_MEMBER(dipsw1_r); + DECLARE_READ8_MEMBER(dipsw2_r); + DECLARE_WRITE8_MEMBER(barline_output_w); + DECLARE_CUSTOM_INPUT_MEMBER(nb1413m3_busyflag_r); - void mjsikaku_vramflip(); + DECLARE_DRIVER_INIT(kyuhito); DECLARE_DRIVER_INIT(idhimitu); DECLARE_DRIVER_INIT(kaguya2); @@ -71,14 +81,15 @@ public: DECLARE_VIDEO_START(mbmj8688_hybrid_16bit); DECLARE_VIDEO_START(mbmj8688_hybrid_12bit); DECLARE_VIDEO_START(mbmj8688_pure_16bit); - DECLARE_READ8_MEMBER(dipsw1_r); - DECLARE_READ8_MEMBER(dipsw2_r); - UINT32 screen_update_mbmj8688(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void vramflip(); void update_pixel(int x, int y); void writeram_low(int x, int y, int color); void writeram_high(int x, int y, int color); - void mbmj8688_gfxdraw(int gfxtype); + void gfxdraw(int gfxtype); void common_video_start(); + void postload(); protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); diff --git a/src/mame/includes/pitnrun.h b/src/mame/includes/pitnrun.h index 5f1cc06c470..c87c30ce82d 100644 --- a/src/mame/includes/pitnrun.h +++ b/src/mame/includes/pitnrun.h @@ -60,7 +60,7 @@ public: TILE_GET_INFO_MEMBER(get_tile_info1); TILE_GET_INFO_MEMBER(get_tile_info2); - + INTERRUPT_GEN_MEMBER(nmi_source); TIMER_CALLBACK_MEMBER(mcu_real_data_r); TIMER_CALLBACK_MEMBER(mcu_real_data_w); diff --git a/src/mame/includes/powerins.h b/src/mame/includes/powerins.h index 7332262c572..e4d069b8eda 100644 --- a/src/mame/includes/powerins.h +++ b/src/mame/includes/powerins.h @@ -12,7 +12,7 @@ public: m_vctrl_0(*this, "vctrl_0"), m_vram_0(*this, "vram_0"), m_vram_1(*this, "vram_1"), - m_spriteram(*this, "spriteram") { } + m_spriteram(*this, "spriteram") { } required_device<cpu_device> m_maincpu; diff --git a/src/mame/includes/quizdna.h b/src/mame/includes/quizdna.h index b819f58d6d1..ed4dbba10ae 100644 --- a/src/mame/includes/quizdna.h +++ b/src/mame/includes/quizdna.h @@ -15,7 +15,7 @@ public: required_shared_ptr<UINT8> m_spriteram; required_shared_ptr<UINT8> m_generic_paletteram_8; - + UINT8 *m_bg_ram; UINT8 *m_fg_ram; tilemap_t *m_bg_tilemap; @@ -32,7 +32,7 @@ public: DECLARE_WRITE8_MEMBER(screen_ctrl_w); DECLARE_WRITE8_MEMBER(paletteram_xBGR_RRRR_GGGG_BBBB_w); DECLARE_WRITE8_MEMBER(rombank_w); - + // game specific DECLARE_WRITE8_MEMBER(gekiretu_rombank_w); diff --git a/src/mame/includes/sbugger.h b/src/mame/includes/sbugger.h index 117937e7c80..5fe32af9d6b 100644 --- a/src/mame/includes/sbugger.h +++ b/src/mame/includes/sbugger.h @@ -15,14 +15,14 @@ public: required_shared_ptr<UINT8> m_videoram; tilemap_t *m_tilemap; - + DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_WRITE8_MEMBER(videoram_attr_w); - + TILE_GET_INFO_MEMBER(get_tile_info); - + virtual void video_start(); DECLARE_PALETTE_INIT(sbugger); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/segasp.h b/src/mame/includes/segasp.h new file mode 100644 index 00000000000..a772a03fd3c --- /dev/null +++ b/src/mame/includes/segasp.h @@ -0,0 +1,29 @@ +/* Sega SP (Spider) + + Naomi derived platform + +*/ + +#include "naomi.h" + +class segasp_state : public naomi_state +{ +public: + segasp_state(const machine_config &mconfig, device_type type, const char *tag) + : naomi_state(mconfig, type, tag), + m_sp_eeprom(*this, "sp_eeprom") + { } + required_device<eeprom_serial_93cxx_device> m_sp_eeprom; + + DECLARE_READ64_MEMBER(sp_eeprom_r); + DECLARE_WRITE64_MEMBER(sp_eeprom_w); + DECLARE_READ64_MEMBER(sp_rombdflg_r); + DECLARE_READ64_MEMBER(sp_io_r); + DECLARE_READ64_MEMBER(sn_93c46a_r); + DECLARE_WRITE64_MEMBER(sn_93c46a_w); + DECLARE_READ64_MEMBER(sp_bank_r); + DECLARE_WRITE64_MEMBER(sp_bank_w); + UINT16 m_sp_bank; + +protected: +}; diff --git a/src/mame/includes/seta.h b/src/mame/includes/seta.h index e8e2b7e821c..197efa17094 100644 --- a/src/mame/includes/seta.h +++ b/src/mame/includes/seta.h @@ -170,6 +170,7 @@ public: DECLARE_WRITE16_MEMBER(magspeed_lights_w); DECLARE_READ8_MEMBER(dsw1_r); DECLARE_READ8_MEMBER(dsw2_r); + DECLARE_READ16_MEMBER(extra_r); DECLARE_DRIVER_INIT(downtown); DECLARE_DRIVER_INIT(rezon); DECLARE_DRIVER_INIT(twineagl); diff --git a/src/mame/includes/sf.h b/src/mame/includes/sf.h index 7054fdba80e..a8fac3f1de0 100644 --- a/src/mame/includes/sf.h +++ b/src/mame/includes/sf.h @@ -37,18 +37,18 @@ public: tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; tilemap_t *m_tx_tilemap; - int m_sf_active; + int m_active; UINT16 m_bgscroll; UINT16 m_fgscroll; - DECLARE_WRITE8_MEMBER(sf_coin_w); + DECLARE_WRITE8_MEMBER(coin_w); DECLARE_WRITE8_MEMBER(soundcmd_w); DECLARE_WRITE16_MEMBER(protection_w); DECLARE_WRITE8_MEMBER(sound2_bank_w); - DECLARE_WRITE16_MEMBER(sf_videoram_w); - DECLARE_WRITE16_MEMBER(sf_bg_scroll_w); - DECLARE_WRITE16_MEMBER(sf_fg_scroll_w); - DECLARE_WRITE16_MEMBER(sf_gfxctrl_w); + DECLARE_WRITE16_MEMBER(videoram_w); + DECLARE_WRITE16_MEMBER(bg_scroll_w); + DECLARE_WRITE16_MEMBER(fg_scroll_w); + DECLARE_WRITE16_MEMBER(gfxctrl_w); DECLARE_WRITE8_MEMBER(msm1_5205_w); DECLARE_WRITE8_MEMBER(msm2_5205_w); TILE_GET_INFO_MEMBER(get_bg_tile_info); @@ -57,8 +57,8 @@ public: virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - UINT32 screen_update_sf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - inline int sf_invert( int nb ); + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + inline int invert( int nb ); void draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ); void write_dword( address_space &space, offs_t offset, UINT32 data ); }; diff --git a/src/mame/includes/shangha3.h b/src/mame/includes/shangha3.h index 699e84b021a..3276f9c54e2 100644 --- a/src/mame/includes/shangha3.h +++ b/src/mame/includes/shangha3.h @@ -5,42 +5,52 @@ class shangha3_state : public driver_device public: shangha3_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_ram(*this, "ram"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_oki(*this, "oki"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_ram(*this, "ram") { } + + required_device<cpu_device> m_maincpu; + optional_device<cpu_device> m_audiocpu; + required_device<okim6295_device> m_oki; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; - int m_prot_count; required_shared_ptr<UINT16> m_ram; + // driver init configuration int m_do_shadows; + UINT8 m_drawmode_table[16]; + int m_prot_count; UINT16 m_gfxlist_addr; bitmap_ind16 m_rawbitmap; - UINT8 m_drawmode_table[16]; + // common + DECLARE_WRITE16_MEMBER(flipscreen_w); + DECLARE_WRITE16_MEMBER(gfxlist_addr_w); + DECLARE_WRITE16_MEMBER(blitter_go_w); + DECLARE_WRITE16_MEMBER(irq_ack_w); + + // shangha3 specific DECLARE_READ16_MEMBER(shangha3_prot_r); DECLARE_WRITE16_MEMBER(shangha3_prot_w); DECLARE_WRITE16_MEMBER(shangha3_coinctrl_w); + + // heberpop specific DECLARE_WRITE16_MEMBER(heberpop_coinctrl_w); + DECLARE_WRITE16_MEMBER(heberpop_sound_command_w); // used by blocken too + + // blocken specific DECLARE_WRITE16_MEMBER(blocken_coinctrl_w); - DECLARE_WRITE16_MEMBER(heberpop_sound_command_w); - DECLARE_WRITE16_MEMBER(shangha3_flipscreen_w); - DECLARE_WRITE16_MEMBER(shangha3_gfxlist_addr_w); - DECLARE_WRITE16_MEMBER(shangha3_blitter_go_w); - DECLARE_WRITE16_MEMBER(shangha3_irq_ack_w); + DECLARE_DRIVER_INIT(shangha3); DECLARE_DRIVER_INIT(heberpop); virtual void video_start(); - UINT32 screen_update_shangha3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE_LINE_MEMBER(irqhandler); - required_device<cpu_device> m_maincpu; - optional_device<cpu_device> m_audiocpu; - required_device<okim6295_device> m_oki; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/shangkid.h b/src/mame/includes/shangkid.h index 263092adb9d..d43fda6d39d 100644 --- a/src/mame/includes/shangkid.h +++ b/src/mame/includes/shangkid.h @@ -35,7 +35,7 @@ public: DECLARE_READ8_MEMBER(soundlatch_r); DECLARE_WRITE8_MEMBER(videoram_w); DECLARE_WRITE8_MEMBER(ay8910_portb_w); - + // game specific DECLARE_WRITE8_MEMBER(chinhero_ay8910_porta_w); DECLARE_WRITE8_MEMBER(shangkid_ay8910_porta_w); diff --git a/src/mame/includes/shaolins.h b/src/mame/includes/shaolins.h index bb57a0efdc4..991112162e8 100644 --- a/src/mame/includes/shaolins.h +++ b/src/mame/includes/shaolins.h @@ -8,7 +8,7 @@ public: m_palette(*this, "palette"), m_spriteram(*this, "spriteram"), m_colorram(*this, "colorram"), - m_videoram(*this, "videoram") { } + m_videoram(*this, "videoram") { } required_device<cpu_device> m_maincpu; required_device<gfxdecode_device> m_gfxdecode; @@ -27,14 +27,14 @@ public: DECLARE_WRITE8_MEMBER(palettebank_w); DECLARE_WRITE8_MEMBER(scroll_w); DECLARE_WRITE8_MEMBER(nmi_w); - + TILE_GET_INFO_MEMBER(get_bg_tile_info); - + virtual void video_start(); DECLARE_PALETTE_INIT(shaolins); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - + TIMER_DEVICE_CALLBACK_MEMBER(interrupt); }; diff --git a/src/mame/includes/spcforce.h b/src/mame/includes/spcforce.h index 4295a47a48f..35c4047d1ed 100644 --- a/src/mame/includes/spcforce.h +++ b/src/mame/includes/spcforce.h @@ -34,7 +34,7 @@ public: int m_sn2_ready; int m_sn3_ready; UINT8 m_irq_mask; - + DECLARE_WRITE8_MEMBER(SN76496_latch_w); DECLARE_READ8_MEMBER(SN76496_select_r); DECLARE_WRITE8_MEMBER(SN76496_select_w); @@ -45,11 +45,11 @@ public: DECLARE_WRITE8_MEMBER(soundtrigger_w); DECLARE_WRITE8_MEMBER(irq_mask_w); DECLARE_WRITE8_MEMBER(flip_screen_w); - + virtual void machine_start(); DECLARE_PALETTE_INIT(spcforce); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(vblank_irq); }; diff --git a/src/mame/includes/splash.h b/src/mame/includes/splash.h index 2f5344e411f..e289e01dbda 100644 --- a/src/mame/includes/splash.h +++ b/src/mame/includes/splash.h @@ -42,12 +42,12 @@ public: // driver init configuration int m_bitmap_type; int m_sprite_attr2_shift; - + tilemap_t *m_bg_tilemap[2]; // splash specific int m_adpcm_data; - + //roldfrog specific int m_ret; int m_vblank_irq; @@ -118,7 +118,7 @@ public: void draw_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); void funystrp_draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(roldfrog_interrupt); void roldfrog_update_irq( ); }; diff --git a/src/mame/includes/ssv.h b/src/mame/includes/ssv.h index 0627c79a39d..55e500ebc16 100644 --- a/src/mame/includes/ssv.h +++ b/src/mame/includes/ssv.h @@ -76,7 +76,7 @@ public: DECLARE_READ16_MEMBER(dsp_r); DECLARE_WRITE16_MEMBER(dsp_w); DECLARE_READ16_MEMBER(fake_r); - DECLARE_READ16_MEMBER(drifto94_rand_r); + DECLARE_READ16_MEMBER(drifto94_unknown_r); DECLARE_READ16_MEMBER(gdfs_gfxram_r); DECLARE_WRITE16_MEMBER(gdfs_gfxram_w); DECLARE_READ16_MEMBER(gdfs_blitram_r); diff --git a/src/mame/includes/toobin.h b/src/mame/includes/toobin.h index 931a20b2434..3eb3adb6e3f 100644 --- a/src/mame/includes/toobin.h +++ b/src/mame/includes/toobin.h @@ -22,7 +22,6 @@ public: m_interrupt_scan(*this, "interrupt_scan") { } required_device<atari_jsa_i_device> m_jsa; - required_device<tilemap_device> m_playfield_tilemap; required_device<tilemap_device> m_alpha_tilemap; required_device<atari_motion_objects_device> m_mob; @@ -31,20 +30,24 @@ public: double m_brightness; bitmap_ind16 m_pfbitmap; + virtual void update_interrupts(); + DECLARE_WRITE16_MEMBER(interrupt_scan_w); - DECLARE_DRIVER_INIT(toobin); + DECLARE_WRITE16_MEMBER(paletteram_w); + DECLARE_WRITE16_MEMBER(intensity_w); + DECLARE_WRITE16_MEMBER(xscroll_w); + DECLARE_WRITE16_MEMBER(yscroll_w); + DECLARE_WRITE16_MEMBER(slip_w); + TILE_GET_INFO_MEMBER(get_alpha_tile_info); TILE_GET_INFO_MEMBER(get_playfield_tile_info); + DECLARE_MACHINE_START(toobin); DECLARE_MACHINE_RESET(toobin); DECLARE_VIDEO_START(toobin); - UINT32 screen_update_toobin(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - DECLARE_WRITE16_MEMBER( toobin_paletteram_w ); - DECLARE_WRITE16_MEMBER( toobin_intensity_w ); - DECLARE_WRITE16_MEMBER( toobin_xscroll_w ); - DECLARE_WRITE16_MEMBER( toobin_yscroll_w ); - DECLARE_WRITE16_MEMBER( toobin_slip_w ); + + UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); static const atari_motion_objects_config s_mob_config; }; diff --git a/src/mame/includes/truco.h b/src/mame/includes/truco.h index 765a642391e..e7855a5b934 100644 --- a/src/mame/includes/truco.h +++ b/src/mame/includes/truco.h @@ -5,23 +5,30 @@ class truco_state : public driver_device public: truco_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_battery_ram(*this, "battery_ram"), m_maincpu(*this, "maincpu"), - m_dac(*this, "dac") { } + m_dac(*this, "dac"), + m_videoram(*this, "videoram"), + m_battery_ram(*this, "battery_ram") { } + + required_device<cpu_device> m_maincpu; + required_device<dac_device> m_dac; required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_battery_ram; + int m_trigger; + DECLARE_WRITE8_MEMBER(porta_w); DECLARE_WRITE_LINE_MEMBER(pia_ca2_w); DECLARE_WRITE8_MEMBER(portb_w); DECLARE_WRITE_LINE_MEMBER(pia_irqa_w); DECLARE_WRITE_LINE_MEMBER(pia_irqb_w); + + virtual void machine_start(); virtual void machine_reset(); DECLARE_PALETTE_INIT(truco); - UINT32 screen_update_truco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(truco_interrupt); - required_device<cpu_device> m_maincpu; - required_device<dac_device> m_dac; + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + INTERRUPT_GEN_MEMBER(interrupt); }; diff --git a/src/mame/includes/usgames.h b/src/mame/includes/usgames.h index 51316a7a165..8fd00869660 100644 --- a/src/mame/includes/usgames.h +++ b/src/mame/includes/usgames.h @@ -3,24 +3,30 @@ class usgames_state : public driver_device public: usgames_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_charram(*this, "charram"), m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode") { } + m_gfxdecode(*this, "gfxdecode"), + m_videoram(*this, "videoram"), + m_charram(*this, "charram") { } + + required_device<cpu_device> m_maincpu; + required_device<gfxdecode_device> m_gfxdecode; required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_charram; + tilemap_t *m_tilemap; - DECLARE_WRITE8_MEMBER(usgames_rombank_w); + + DECLARE_WRITE8_MEMBER(rombank_w); DECLARE_WRITE8_MEMBER(lamps1_w); DECLARE_WRITE8_MEMBER(lamps2_w); - DECLARE_WRITE8_MEMBER(usgames_videoram_w); - DECLARE_WRITE8_MEMBER(usgames_charram_w); - TILE_GET_INFO_MEMBER(get_usgames_tile_info); + DECLARE_WRITE8_MEMBER(videoram_w); + DECLARE_WRITE8_MEMBER(charram_w); + + TILE_GET_INFO_MEMBER(get_tile_info); + virtual void machine_start(); virtual void video_start(); DECLARE_PALETTE_INIT(usgames); - UINT32 screen_update_usgames(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - required_device<cpu_device> m_maincpu; - required_device<gfxdecode_device> m_gfxdecode; + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); }; diff --git a/src/mame/includes/victory.h b/src/mame/includes/victory.h index 9fe00f0240d..a7337c1afe0 100644 --- a/src/mame/includes/victory.h +++ b/src/mame/includes/victory.h @@ -48,7 +48,7 @@ public: required_shared_ptr<UINT8> m_videoram; required_shared_ptr<UINT8> m_charram; - + UINT16 m_paletteram[0x40]; UINT8 *m_bgbitmap; UINT8 *m_fgbitmap; @@ -66,19 +66,19 @@ public: UINT8 m_scrolly; UINT8 m_video_control; struct micro_t m_micro; - + DECLARE_WRITE8_MEMBER(lamp_control_w); DECLARE_WRITE8_MEMBER(paletteram_w); DECLARE_READ8_MEMBER(video_control_r); DECLARE_WRITE8_MEMBER(video_control_w); - + virtual void video_start(); - + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - + INTERRUPT_GEN_MEMBER(vblank_interrupt); TIMER_CALLBACK_MEMBER(bgcoll_irq_callback); - + void update_irq(); void set_palette(); int command2(); diff --git a/src/mame/includes/videopin.h b/src/mame/includes/videopin.h index 1f5efd09832..e8beff32998 100644 --- a/src/mame/includes/videopin.h +++ b/src/mame/includes/videopin.h @@ -25,41 +25,50 @@ public: videopin_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram"), m_maincpu(*this, "maincpu"), m_discrete(*this, "discrete"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette") { } + m_palette(*this, "palette"), + m_video_ram(*this, "video_ram") { } + + required_device<cpu_device> m_maincpu; + required_device<discrete_device> m_discrete; + required_device<gfxdecode_device> m_gfxdecode; + required_device<screen_device> m_screen; + required_device<palette_device> m_palette; + + required_shared_ptr<UINT8> m_video_ram; attotime m_time_pushed; attotime m_time_released; UINT8 m_prev; UINT8 m_mask; - required_shared_ptr<UINT8> m_video_ram; int m_ball_x; int m_ball_y; tilemap_t* m_bg_tilemap; - DECLARE_READ8_MEMBER(videopin_misc_r); - DECLARE_WRITE8_MEMBER(videopin_led_w); - DECLARE_WRITE8_MEMBER(videopin_ball_w); - DECLARE_WRITE8_MEMBER(videopin_video_ram_w); - DECLARE_WRITE8_MEMBER(videopin_out1_w); - DECLARE_WRITE8_MEMBER(videopin_out2_w); - DECLARE_WRITE8_MEMBER(videopin_note_dvsr_w); + emu_timer *m_interrupt_timer; + + DECLARE_READ8_MEMBER(misc_r); + DECLARE_WRITE8_MEMBER(led_w); + DECLARE_WRITE8_MEMBER(ball_w); + DECLARE_WRITE8_MEMBER(video_ram_w); + DECLARE_WRITE8_MEMBER(out1_w); + DECLARE_WRITE8_MEMBER(out2_w); + DECLARE_WRITE8_MEMBER(note_dvsr_w); + TILEMAP_MAPPER_MEMBER(get_memory_offset); TILE_GET_INFO_MEMBER(get_tile_info); + + virtual void machine_start(); virtual void machine_reset(); virtual void video_start(); - UINT32 screen_update_videopin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + TIMER_CALLBACK_MEMBER(interrupt_callback); void update_plunger(); double calc_plunger_pos(); - required_device<cpu_device> m_maincpu; - required_device<discrete_device> m_discrete; - required_device<gfxdecode_device> m_gfxdecode; - required_device<screen_device> m_screen; - required_device<palette_device> m_palette; protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); diff --git a/src/mame/includes/vigilant.h b/src/mame/includes/vigilant.h index e1797090313..342b6c8c287 100644 --- a/src/mame/includes/vigilant.h +++ b/src/mame/includes/vigilant.h @@ -5,16 +5,13 @@ class vigilant_state : public driver_device public: vigilant_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_spriteram(*this, "spriteram"), - m_videoram(*this, "videoram"), m_maincpu(*this, "maincpu"), m_audio(*this, "m72"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_generic_paletteram_8(*this, "paletteram") { } - - required_shared_ptr<UINT8> m_spriteram; - required_shared_ptr<UINT8> m_videoram; + m_generic_paletteram_8(*this, "paletteram"), + m_spriteram(*this, "spriteram"), + m_videoram(*this, "videoram") { } required_device<cpu_device> m_maincpu; required_device<m72_audio_device> m_audio; @@ -22,6 +19,9 @@ public: required_device<palette_device> m_palette; required_shared_ptr<UINT8> m_generic_paletteram_8; + required_shared_ptr<UINT8> m_spriteram; + required_shared_ptr<UINT8> m_videoram; + int m_horiz_scroll_low; int m_horiz_scroll_high; int m_rear_horiz_scroll_low; @@ -31,20 +31,28 @@ public: int m_rear_refresh; bitmap_ind16 *m_bg_bitmap; - DECLARE_WRITE8_MEMBER(vigilant_bank_select_w); + // common + DECLARE_WRITE8_MEMBER(bank_select_w); + DECLARE_WRITE8_MEMBER(paletteram_w); + + // vigilant and buccanrs DECLARE_WRITE8_MEMBER(vigilant_out2_w); - DECLARE_WRITE8_MEMBER(kikcubic_coin_w); - DECLARE_WRITE8_MEMBER(vigilant_paletteram_w); DECLARE_WRITE8_MEMBER(vigilant_horiz_scroll_w); DECLARE_WRITE8_MEMBER(vigilant_rear_horiz_scroll_w); DECLARE_WRITE8_MEMBER(vigilant_rear_color_w); + + // kikcubic + DECLARE_WRITE8_MEMBER(kikcubic_coin_w); + virtual void machine_start(); virtual void video_start(); virtual void video_reset(); + UINT32 screen_update_vigilant(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); UINT32 screen_update_kikcubic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void update_background(); void draw_foreground(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority, int opaque ); void draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); + void vigilant_postload(); }; diff --git a/src/mame/layout/breakout.lay b/src/mame/layout/breakout.lay new file mode 100644 index 00000000000..5d3fc3eb486 --- /dev/null +++ b/src/mame/layout/breakout.lay @@ -0,0 +1,46 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + <element name="overlay"> + <rect> + <bounds left="0" top="0" right="192" bottom="64" /> + <color red="1" green="1" blue="1" /> + </rect> + <rect> + <bounds left="0" top="63" right="192" bottom="73" /> + <color red="1" green="0.125" blue="0.125" /> + </rect> + <rect> + <bounds left="0" top="73" right="192" bottom="82" /> + <color red="1" green="0.5" blue="0.0625" /> + </rect> + <rect> + <bounds left="0" top="82" right="192" bottom="90" /> + <color red="0.25" green="1" blue="0.25" /> + </rect> + <rect> + <bounds left="0" top="90" right="192" bottom="100" /> + <color red="1" green="1" blue="0.25" /> + </rect> + <rect> + <bounds left="0" top="100" right="192" bottom="232" /> + <color red="1" green="1" blue="1" /> + </rect> + <rect> + <bounds left="0" top="232" right="192" bottom="240" /> + <color red="0.125" green="0.125" blue="1" /> + </rect> + <rect> + <bounds left="0" top="240" right="192" bottom="256" /> + <color red="1" green="1" blue="1" /> + </rect> + </element> + + <view name="Color Overlay"> + <screen index="0"> + <bounds left="0" top="0" right="3" bottom="4" /> + </screen> + <overlay name="overlay" element="overlay"> + <bounds left="0" top="0" right="3" bottom="4" /> + </overlay> + </view> +</mamelayout> diff --git a/src/mame/layout/sigmab52.lay b/src/mame/layout/sigmab52.lay index 175b1bcd4b0..ac636d245ce 100644 --- a/src/mame/layout/sigmab52.lay +++ b/src/mame/layout/sigmab52.lay @@ -84,19 +84,19 @@ <bounds left="0" top="0" right="4" bottom="3" /> </screen> - <bezel name="lamp5" element="HOLD" inputtag="IN1" inputmask="0x80"> + <bezel name="lamp5" element="HOLD" inputtag="IN0" inputmask="0x0400"> <bounds x="0.80" y="3.05" width="0.30" height="0.15" /> </bezel> - <bezel name="lamp6" element="HOLD" inputtag="IN2" inputmask="0x02"> + <bezel name="lamp6" element="HOLD" inputtag="IN0" inputmask="0x0200"> <bounds x="1.15" y="3.05" width="0.30" height="0.15" /> </bezel> - <bezel name="lamp7" element="HOLD" inputtag="IN2" inputmask="0x10"> + <bezel name="lamp7" element="HOLD" inputtag="IN0" inputmask="0x0100"> <bounds x="1.50" y="3.05" width="0.30" height="0.15" /> </bezel> - <bezel name="lamp8" element="HOLD" inputtag="IN2" inputmask="0x20"> + <bezel name="lamp8" element="HOLD" inputtag="IN0" inputmask="0x0080"> <bounds x="1.85" y="3.05" width="0.30" height="0.15" /> </bezel>4 - <bezel name="lamp9" element="HOLD" inputtag="IN2" inputmask="0x40"> + <bezel name="lamp9" element="HOLD" inputtag="IN0" inputmask="0x0040"> <bounds x="2.20" y="3.05" width="0.30" height="0.15" /> </bezel> diff --git a/src/mame/machine/awboard.c b/src/mame/machine/awboard.c index 836ebf47564..d041f07e3d2 100644 --- a/src/mame/machine/awboard.c +++ b/src/mame/machine/awboard.c @@ -108,7 +108,7 @@ DEVICE_ADDRESS_MAP_START(submap, 16, aw_rom_board) AM_RANGE(0x08, 0x09) AM_WRITE(mpr_first_file_index_w) AM_RANGE(0x0a, 0x0b) AM_WRITE(mpr_file_offsetl_w) AM_RANGE(0x0c, 0x0d) AM_WRITE(mpr_file_offseth_w) - AM_RANGE(0x40, 0x41) AM_READWRITE(adj_offset_r, adj_offset_w) + AM_RANGE(0x40, 0x41) AM_READWRITE(pio_r, pio_w) ADDRESS_MAP_END aw_rom_board::aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) @@ -255,14 +255,20 @@ void aw_rom_board::device_reset() dma_limit = 0; } -READ16_MEMBER(aw_rom_board::adj_offset_r) +READ16_MEMBER(aw_rom_board::pio_r) { - return adjust_off; + // FIXME: this must return original encrypted data, used by Extreme Hunt 2 in ROM TEST + UINT16 retval = m_region->u16(epr_offset * 2); + epr_offset++; + return retval; } -WRITE16_MEMBER(aw_rom_board::adj_offset_w) +WRITE16_MEMBER(aw_rom_board::pio_w) { - adjust_off = data; + // write to ROM board address space, including FlashROM programming using CFI (TODO) + if (epr_offset == 0x7fffff) // special register which changes ROMBD addressing + adjust_off = data; + epr_offset++; } WRITE16_MEMBER(aw_rom_board::epr_offsetl_w) diff --git a/src/mame/machine/awboard.h b/src/mame/machine/awboard.h index 6e11a11061d..c47b2aa4b23 100644 --- a/src/mame/machine/awboard.h +++ b/src/mame/machine/awboard.h @@ -22,8 +22,8 @@ public: DECLARE_WRITE16_MEMBER(mpr_first_file_index_w); // 5f7010 DECLARE_WRITE16_MEMBER(mpr_file_offsetl_w); // 5f7014 DECLARE_WRITE16_MEMBER(mpr_file_offseth_w); // 5f7018 - DECLARE_READ16_MEMBER(adj_offset_r); // 5f7080 - DECLARE_WRITE16_MEMBER(adj_offset_w); // 5f7080 + DECLARE_READ16_MEMBER(pio_r); // 5f7080 + DECLARE_WRITE16_MEMBER(pio_w); // 5f7080 protected: virtual void device_start(); diff --git a/src/mame/machine/bagman.c b/src/mame/machine/bagman.c index bc86e701eef..e5ff0a3be7d 100644 --- a/src/mame/machine/bagman.c +++ b/src/mame/machine/bagman.c @@ -1,6 +1,6 @@ /*************************************************************************** - machine.c + bagman.c Functions to emulate general aspects of the machine (RAM, ROM, interrupts, I/O ports) @@ -199,7 +199,7 @@ UINT8 row, column, val; } -WRITE8_MEMBER(bagman_state::bagman_pal16r6_w) +WRITE8_MEMBER(bagman_state::pal16r6_w) { UINT8 line; @@ -208,21 +208,21 @@ UINT8 line; m_columnvalue[line + 1] = 1 - (data & 1); } -MACHINE_RESET_MEMBER(bagman_state,bagman) +void bagman_state::machine_reset() { address_space &space = m_maincpu->space(AS_PROGRAM); - bagman_pal16r6_w(space, 0, 1); /*pin 2*/ - bagman_pal16r6_w(space, 1, 1); /*pin 3*/ - bagman_pal16r6_w(space, 2, 1); /*pin 4*/ - bagman_pal16r6_w(space, 3, 1); /*pin 5*/ - bagman_pal16r6_w(space, 4, 1); /*pin 6*/ - bagman_pal16r6_w(space, 5, 1); /*pin 7*/ - bagman_pal16r6_w(space, 6, 1); /*pin 8*/ - bagman_pal16r6_w(space, 7, 1); /*pin 9*/ + pal16r6_w(space, 0, 1); /*pin 2*/ + pal16r6_w(space, 1, 1); /*pin 3*/ + pal16r6_w(space, 2, 1); /*pin 4*/ + pal16r6_w(space, 3, 1); /*pin 5*/ + pal16r6_w(space, 4, 1); /*pin 6*/ + pal16r6_w(space, 5, 1); /*pin 7*/ + pal16r6_w(space, 6, 1); /*pin 8*/ + pal16r6_w(space, 7, 1); /*pin 9*/ update_pal(); } -READ8_MEMBER(bagman_state::bagman_pal16r6_r) +READ8_MEMBER(bagman_state::pal16r6_r) { update_pal(); return (m_outvalue[6]) + (m_outvalue[5] << 1) + (m_outvalue[4] << 2) + diff --git a/src/mame/machine/balsente.c b/src/mame/machine/balsente.c index 846931eb776..803b5dc5325 100644 --- a/src/mame/machine/balsente.c +++ b/src/mame/machine/balsente.c @@ -84,14 +84,14 @@ void balsente_state::machine_start() /* register for saving */ for (i = 0; i < 3; i++) { - state_save_register_item(machine(), "8253counter", NULL, i, m_counter[i].timer_active); - state_save_register_item(machine(), "8253counter", NULL, i, m_counter[i].initial); - state_save_register_item(machine(), "8253counter", NULL, i, m_counter[i].count); - state_save_register_item(machine(), "8253counter", NULL, i, m_counter[i].gate); - state_save_register_item(machine(), "8253counter", NULL, i, m_counter[i].out); - state_save_register_item(machine(), "8253counter", NULL, i, m_counter[i].mode); - state_save_register_item(machine(), "8253counter", NULL, i, m_counter[i].readbyte); - state_save_register_item(machine(), "8253counter", NULL, i, m_counter[i].writebyte); + save_item(m_counter[i].timer_active, "8253counter[i].timer_active", i); + save_item(m_counter[i].initial, "8253counter[i].initial", i); + save_item(m_counter[i].count, "8253counter[i].count", i); + save_item(m_counter[i].gate, "8253counter[i].gate", i); + save_item(m_counter[i].out, "8253counter[i].out", i); + save_item(m_counter[i].mode, "8253counter[i].mode", i); + save_item(m_counter[i].readbyte, "8253counter[i].readbyte", i); + save_item(m_counter[i].writebyte, "8253counter[i].writebyte", i); } save_item(NAME(m_counter_control)); diff --git a/src/mame/machine/dc.c b/src/mame/machine/dc.c index 63e30f0b747..9792f56ee15 100644 --- a/src/mame/machine/dc.c +++ b/src/mame/machine/dc.c @@ -91,10 +91,10 @@ void dc_state::generic_dma(UINT32 main_adr, void *dma_ptr, UINT32 length, UINT32 m_maincpu->sh4_dma_ddt(&ddt); } -TIMER_CALLBACK_MEMBER(dc_state::aica_dma_irq) +TIMER_CALLBACK_MEMBER(dc_state::g2_dma_irq) { - m_wave_dma.start = g2bus_regs[SB_ADST] = 0; - dc_sysctrl_regs[SB_ISTNRM] |= IST_DMA_AICA; + m_g2_dma[param].start = g2bus_regs[SB_ADST + (param * 8)] = 0; + dc_sysctrl_regs[SB_ISTNRM] |= IST_DMA_AICA << param; dc_update_interrupt_status(); } @@ -190,19 +190,19 @@ TIMER_CALLBACK_MEMBER(dc_state::ch2_dma_irq) dc_update_interrupt_status(); } -void dc_state::wave_dma_execute(address_space &space) +void dc_state::g2_dma_execute(address_space &space, int channel) { UINT32 src,dst,size; - dst = m_wave_dma.aica_addr; - src = m_wave_dma.root_addr; + dst = m_g2_dma[channel].g2_addr; + src = m_g2_dma[channel].root_addr; size = 0; /* 0 rounding size = 32 Mbytes */ - if(m_wave_dma.size == 0) { m_wave_dma.size = 0x200000; } + if (m_g2_dma[channel].size == 0) { m_g2_dma[channel].size = 0x200000; } - if(m_wave_dma.dir == 0) + if (m_g2_dma[channel].dir == 0) { - for(;size<m_wave_dma.size;size+=4) + for (; size<m_g2_dma[channel].size; size += 4) { space.write_dword(dst,space.read_dword(src)); src+=4; @@ -211,7 +211,7 @@ void dc_state::wave_dma_execute(address_space &space) } else { - for(;size<m_wave_dma.size;size+=4) + for (; size<m_g2_dma[channel].size; size += 4) { space.write_dword(src,space.read_dword(dst)); src+=4; @@ -220,13 +220,13 @@ void dc_state::wave_dma_execute(address_space &space) } /* update the params*/ - m_wave_dma.aica_addr = g2bus_regs[SB_ADSTAG] = dst; - m_wave_dma.root_addr = g2bus_regs[SB_ADSTAR] = src; - m_wave_dma.size = g2bus_regs[SB_ADLEN] = 0; - m_wave_dma.flag = (m_wave_dma.indirect & 1) ? 1 : 0; + m_g2_dma[channel].g2_addr = g2bus_regs[SB_ADSTAG + (channel * 8)] = dst; + m_g2_dma[channel].root_addr = g2bus_regs[SB_ADSTAR + (channel * 8)] = src; + m_g2_dma[channel].size = g2bus_regs[SB_ADLEN + (channel * 8)] = 0; + m_g2_dma[channel].flag = (m_g2_dma[channel].indirect & 1) ? 1 : 0; /* Note: if you trigger an instant DMA IRQ trigger, sfz3upper doesn't play any bgm. */ /* TODO: timing of this */ - machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(m_wave_dma.size/4), timer_expired_delegate(FUNC(dc_state::aica_dma_irq),this)); + machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(m_g2_dma[channel].size / 4), timer_expired_delegate(FUNC(dc_state::g2_dma_irq), this), channel); } // register decode helpers @@ -335,14 +335,17 @@ void dc_state::dc_update_interrupt_status() m_maincpu->sh4_set_irln_input(15-level); /* Wave DMA HW trigger */ - if(m_wave_dma.flag && ((m_wave_dma.sel & 2) == 2)) + for (int i = 0; i < 4; i++) { - if((dc_sysctrl_regs[SB_G2DTNRM] & dc_sysctrl_regs[SB_ISTNRM]) || (dc_sysctrl_regs[SB_G2DTEXT] & dc_sysctrl_regs[SB_ISTEXT])) + if (m_g2_dma[i].flag && ((m_g2_dma[i].sel & 2) == 2)) { - address_space &space = m_maincpu->space(AS_PROGRAM); + if ((dc_sysctrl_regs[SB_G2DTNRM] & dc_sysctrl_regs[SB_ISTNRM]) || (dc_sysctrl_regs[SB_G2DTEXT] & dc_sysctrl_regs[SB_ISTEXT])) + { + address_space &space = m_maincpu->space(AS_PROGRAM); - printf("Wave DMA HW trigger\n"); - wave_dma_execute(space); + printf("Wave DMA HW trigger\n"); + g2_dma_execute(space, i); + } } } @@ -533,54 +536,43 @@ WRITE64_MEMBER(dc_state::dc_g2_ctrl_w ) g2bus_regs[reg] = dat; // 5f7800+reg*4=dat - switch (reg) + if (reg >= (0x80 / 4)) + return; + int g2chan = reg >> 3; + switch (reg & 7) { - /*AICA Address register*/ - case SB_ADSTAG: m_wave_dma.aica_addr = dat; break; + /*G2 Address register*/ + case SB_ADSTAG: m_g2_dma[g2chan].g2_addr = dat; break; /*Root address (work ram)*/ - case SB_ADSTAR: m_wave_dma.root_addr = dat; break; + case SB_ADSTAR: m_g2_dma[g2chan].root_addr = dat; break; /*DMA size (in dword units, bit 31 is "set dma initiation enable setting to 0"*/ case SB_ADLEN: - m_wave_dma.size = dat & 0x7fffffff; - m_wave_dma.indirect = (dat & 0x80000000)>>31; + m_g2_dma[g2chan].size = dat & 0x7fffffff; + m_g2_dma[g2chan].indirect = (dat & 0x80000000) >> 31; break; /*0 = root memory to aica / 1 = aica to root memory*/ - case SB_ADDIR: m_wave_dma.dir = (dat & 1); break; + case SB_ADDIR: m_g2_dma[g2chan].dir = (dat & 1); break; /*dma flag (active HIGH, bug in docs)*/ - case SB_ADEN: m_wave_dma.flag = (dat & 1); break; + case SB_ADEN: m_g2_dma[g2chan].flag = (dat & 1); break; /* SB_ADTSEL bit 1: (0) Wave DMA through SB_ADST flag (1) Wave DMA through irq trigger, defined by SB_G2DTNRM / SB_G2DTEXT */ - case SB_ADTSEL: m_wave_dma.sel = dat & 7; break; + case SB_ADTSEL: m_g2_dma[g2chan].sel = dat & 7; break; /*ready for dma'ing*/ case SB_ADST: - old = m_wave_dma.start & 1; - m_wave_dma.start = dat & 1; + old = m_g2_dma[g2chan].start & 1; + m_g2_dma[g2chan].start = dat & 1; #if DEBUG_AICA_DMA printf("AICA: G2-DMA start \n"); - printf("DST %08x SRC %08x SIZE %08x IND %02x\n",m_wave_dma.aica_addr,m_wave_dma.root_addr,m_wave_dma.size,m_wave_dma.indirect); - printf("SEL %08x ST %08x FLAG %08x DIR %02x\n",m_wave_dma.sel,m_wave_dma.start,m_wave_dma.flag,m_wave_dma.dir); + printf("DST %08x SRC %08x SIZE %08x IND %02x\n",m_g2_dma[g2chan].g2_addr,m_g2_dma[g2chan].root_addr,m_g2_dma[g2chan].size,m_g2_dma[g2chan].indirect); + printf("SEL %08x ST %08x FLAG %08x DIR %02x\n",m_g2_dma[g2chan].sel,m_g2_dma[g2chan].start,m_g2_dma[g2chan].flag,m_g2_dma[g2chan].dir); #endif //osd_printf_verbose("SB_ADST data %08x\n",dat); - if(((old & 1) == 0) && m_wave_dma.flag && m_wave_dma.start && ((m_wave_dma.sel & 2) == 0)) // 0 -> 1 - wave_dma_execute(space); - break; - - case SB_E1ST: - case SB_E2ST: - case SB_DDST: - if(dat & 1) - printf("Warning: enabled G2 Debug / External DMA %08x\n",reg); - break; - - case SB_ADSUSP: - case SB_E1SUSP: - case SB_E2SUSP: - case SB_DDSUSP: - case SB_G2APRO: + if (((old & 1) == 0) && m_g2_dma[g2chan].flag && m_g2_dma[g2chan].start && ((m_g2_dma[g2chan].sel & 2) == 0)) // 0 -> 1 + g2_dma_execute(space, g2chan); break; default: @@ -641,6 +633,15 @@ WRITE64_MEMBER(dc_state::dc_modem_w ) osd_printf_verbose("MODEM: [%08x=%x] write %" I64FMT "x to %x, mask %" I64FMT "x\n", 0x600000+reg*4, dat, data, offset, mem_mask); } +#define SAVE_G2DMA(x) \ + save_item(NAME(m_g2_dma[x].g2_addr)); \ + save_item(NAME(m_g2_dma[x].root_addr)); \ + save_item(NAME(m_g2_dma[x].size)); \ + save_item(NAME(m_g2_dma[x].dir)); \ + save_item(NAME(m_g2_dma[x].flag)); \ + save_item(NAME(m_g2_dma[x].indirect)); \ + save_item(NAME(m_g2_dma[x].start)); \ + save_item(NAME(m_g2_dma[x].sel)); void dc_state::machine_start() { @@ -651,15 +652,11 @@ void dc_state::machine_start() // save states save_pointer(NAME(dc_sysctrl_regs), 0x200/4); save_pointer(NAME(g2bus_regs), 0x100/4); - save_item(NAME(m_wave_dma.aica_addr)); - save_item(NAME(m_wave_dma.root_addr)); - save_item(NAME(m_wave_dma.size)); - save_item(NAME(m_wave_dma.dir)); - save_item(NAME(m_wave_dma.flag)); - save_item(NAME(m_wave_dma.indirect)); - save_item(NAME(m_wave_dma.start)); - save_item(NAME(m_wave_dma.sel)); save_pointer(NAME(dc_sound_ram.target()),dc_sound_ram.bytes()); + SAVE_G2DMA(0) + SAVE_G2DMA(1) + SAVE_G2DMA(2) + SAVE_G2DMA(3) } void dc_state::machine_reset() diff --git a/src/mame/machine/fd1089.c b/src/mame/machine/fd1089.c index a9c7cf0465e..3128f56a7b8 100644 --- a/src/mame/machine/fd1089.c +++ b/src/mame/machine/fd1089.c @@ -220,7 +220,7 @@ fd1089_base_device::fd1089_base_device(const machine_config &mconfig, device_typ : m68000_device(mconfig, tag, owner, clock, shortname, source) { // override the name after the m68000 initializes - m_name.cpy(name); + m_name.assign(name); } fd1089a_device::fd1089a_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) diff --git a/src/mame/machine/fd1094.c b/src/mame/machine/fd1094.c index 7dc24150121..050755aed69 100644 --- a/src/mame/machine/fd1094.c +++ b/src/mame/machine/fd1094.c @@ -558,7 +558,7 @@ fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, dev m_key(NULL) { // override the name after the m68000 initializes - m_name.cpy("FD1094"); + m_name.assign("FD1094"); // create the initial masked opcode table memset(m_masked_opcodes_lookup, 0, sizeof(m_masked_opcodes_lookup)); diff --git a/src/mame/machine/iteagle_fpga.c b/src/mame/machine/iteagle_fpga.c index 4dbec2afde9..df236ff21c2 100644 --- a/src/mame/machine/iteagle_fpga.c +++ b/src/mame/machine/iteagle_fpga.c @@ -109,7 +109,7 @@ void iteagle_fpga_device::update_sequence(UINT32 data) m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((val1 + m_seq_rem1 + m_seq_rem2)&0xFF); } else { val1 = ((m_seq & 0x2)<<6) | ((m_seq & 0x4)<<4) | ((m_seq & 0x8)<<2) | ((m_seq & 0x10)<<0) - | ((m_seq & 0x20)>>2) | ((m_seq & 0x40)>>4) | ((m_seq & 0x80)>>6) | ((m_seq & 0x100)>>8); + | ((m_seq & 0x20)>>2) | ((m_seq & 0x40)>>4) | ((m_seq & 0x80)>>6) | ((m_seq & 0x100)>>8); m_seq = (m_seq>>8) | ((feed&0xff)<<16); m_fpga_regs[offset] = (m_fpga_regs[offset]&0xFFFFFF00) | ((val1 + m_seq_rem1 + m_seq_rem2) & 0xff); } @@ -155,7 +155,6 @@ READ32_MEMBER( iteagle_fpga_device::fpga_r ) WRITE32_MEMBER( iteagle_fpga_device::fpga_w ) { - COMBINE_DATA(&m_fpga_regs[offset]); switch (offset) { case 0x04/4: diff --git a/src/mame/machine/konppc.c b/src/mame/machine/konppc.c index dd631ad6401..9855ac9f928 100644 --- a/src/mame/machine/konppc.c +++ b/src/mame/machine/konppc.c @@ -44,18 +44,18 @@ void konppc_device::device_start() nwk_fifo[i] = auto_alloc_array(machine(), UINT32, 0x800); nwk_ram[i] = auto_alloc_array(machine(), UINT32, 0x2000); - state_save_register_item_array(machine(), "konppc", NULL, i, dsp_comm_ppc[i]); - state_save_register_item_array(machine(), "konppc", NULL, i, dsp_comm_sharc[i]); - state_save_register_item(machine(), "konppc", NULL, i, dsp_shared_ram_bank[i]); - state_save_register_item_pointer(machine(), "konppc", NULL, i, dsp_shared_ram[i], DSP_BANK_SIZE * 2 / sizeof(dsp_shared_ram[i][0])); - state_save_register_item(machine(), "konppc", NULL, i, dsp_state[i]); - state_save_register_item(machine(), "konppc", NULL, i, nwk_device_sel[i]); - state_save_register_item(machine(), "konppc", NULL, i, nwk_fifo_read_ptr[i]); - state_save_register_item(machine(), "konppc", NULL, i, nwk_fifo_write_ptr[i]); - state_save_register_item_pointer(machine(), "konppc", NULL, i, nwk_fifo[i], 0x800); - state_save_register_item_pointer(machine(), "konppc", NULL, i, nwk_ram[i], 0x2000); - } - state_save_register_item(machine(), "konppc", NULL, 0, cgboard_id); + save_item(NAME(dsp_comm_ppc[i]), i); + save_item(NAME(dsp_comm_sharc[i]), i); + save_item(NAME(dsp_shared_ram_bank[i]), i); + save_pointer(NAME(dsp_shared_ram[i]), DSP_BANK_SIZE * 2 / sizeof(dsp_shared_ram[i][0]), i); + save_item(NAME(dsp_state[i]), i); + save_item(NAME(nwk_device_sel[i]), i); + save_item(NAME(nwk_fifo_read_ptr[i]), i); + save_item(NAME(nwk_fifo_write_ptr[i]), i); + save_pointer(NAME(nwk_fifo[i]), 0x800, i); + save_pointer(NAME(nwk_ram[i]), 0x2000, i); + } + save_item(NAME(cgboard_id)); if (cgboard_type == CGBOARD_TYPE_NWKTR) { diff --git a/src/mame/machine/mcr68.c b/src/mame/machine/mcr68.c index 792435e8421..823e2a2d721 100644 --- a/src/mame/machine/mcr68.c +++ b/src/mame/machine/mcr68.c @@ -57,10 +57,10 @@ MACHINE_START_MEMBER(mcr68_state,mcr68) m6840->timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mcr68_state::counter_fired_callback),this)); - state_save_register_item(machine(), "m6840", NULL, i, m6840->control); - state_save_register_item(machine(), "m6840", NULL, i, m6840->latch); - state_save_register_item(machine(), "m6840", NULL, i, m6840->count); - state_save_register_item(machine(), "m6840", NULL, i, m6840->timer_active); + save_item(m6840->control, "m6840/control", i); + save_item(m6840->latch, "m6840/latch", i); + save_item(m6840->count, "m6840/count", i); + save_item(m6840->timer_active, "m6840/timer_active", i); } save_item(NAME(m_m6840_status)); diff --git a/src/mame/machine/mhavoc.c b/src/mame/machine/mhavoc.c index 655f3497ea7..e9c517f192c 100644 --- a/src/mame/machine/mhavoc.c +++ b/src/mame/machine/mhavoc.c @@ -64,18 +64,18 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_gamma_irq_ack_w) void mhavoc_state::machine_start() { - state_save_register_item(machine(), "misc", NULL, 0, m_alpha_data); - state_save_register_item(machine(), "misc", NULL, 0, m_alpha_rcvd); - state_save_register_item(machine(), "misc", NULL, 0, m_alpha_xmtd); - state_save_register_item(machine(), "misc", NULL, 0, m_gamma_data); - state_save_register_item(machine(), "misc", NULL, 0, m_gamma_rcvd); - state_save_register_item(machine(), "misc", NULL, 0, m_gamma_xmtd); - state_save_register_item(machine(), "misc", NULL, 0, m_player_1); - state_save_register_item(machine(), "misc", NULL, 0, m_alpha_irq_clock); - state_save_register_item(machine(), "misc", NULL, 0, m_alpha_irq_clock_enable); - state_save_register_item(machine(), "misc", NULL, 0, m_gamma_irq_clock); - - state_save_register_item(machine(), "misc", NULL, 0, m_speech_write_buffer); + save_item(NAME(m_alpha_data)); + save_item(NAME(m_alpha_rcvd)); + save_item(NAME(m_alpha_xmtd)); + save_item(NAME(m_gamma_data)); + save_item(NAME(m_gamma_rcvd)); + save_item(NAME(m_gamma_xmtd)); + save_item(NAME(m_player_1)); + save_item(NAME(m_alpha_irq_clock)); + save_item(NAME(m_alpha_irq_clock_enable)); + save_item(NAME(m_gamma_irq_clock)); + + save_item(NAME(m_speech_write_buffer)); } diff --git a/src/mame/machine/midikbd.c b/src/mame/machine/midikbd.c index 070511fc2a8..2c9fef21e28 100644 --- a/src/mame/machine/midikbd.c +++ b/src/mame/machine/midikbd.c @@ -12,66 +12,73 @@ midi_keyboard_device::midi_keyboard_device(const machine_config &mconfig, const void midi_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { - const int keyboard_notes[24] = + if(id) { - 0x3c, // C1 - 0x3d, // C1# - 0x3e, // D1 - 0x3f, // D1# - 0x40, // E1 - 0x41, // F1 - 0x42, // F1# - 0x43, // G1 - 0x44, // G1# - 0x45, // A1 - 0x46, // A1# - 0x47, // B1 - 0x48, // C2 - 0x49, // C2# - 0x4a, // D2 - 0x4b, // D2# - 0x4c, // E2 - 0x4d, // F2 - 0x4e, // F2# - 0x4f, // G2 - 0x50, // G2# - 0x51, // A2 - 0x52, // A2# - 0x53, // B2 - }; - - int i; - - UINT32 kbstate = m_keyboard->read(); - if(kbstate != m_keyboard_state) + device_serial_interface::device_timer(timer, id, param, ptr); + } + else { - for (i=0; i < 24; i++) + const int keyboard_notes[24] = { - int kbnote = keyboard_notes[i]; + 0x3c, // C1 + 0x3d, // C1# + 0x3e, // D1 + 0x3f, // D1# + 0x40, // E1 + 0x41, // F1 + 0x42, // F1# + 0x43, // G1 + 0x44, // G1# + 0x45, // A1 + 0x46, // A1# + 0x47, // B1 + 0x48, // C2 + 0x49, // C2# + 0x4a, // D2 + 0x4b, // D2# + 0x4c, // E2 + 0x4d, // F2 + 0x4e, // F2# + 0x4f, // G2 + 0x50, // G2# + 0x51, // A2 + 0x52, // A2# + 0x53, // B2 + }; - if ((m_keyboard_state & (1 << i)) != 0 && (kbstate & (1 << i)) == 0) - { - // key was on, now off -> send Note Off message - push_tx(0x80); - push_tx(kbnote); - push_tx(0x7f); - } - else if ((m_keyboard_state & (1 << i)) == 0 && (kbstate & (1 << i)) != 0) + int i; + + UINT32 kbstate = m_keyboard->read(); + if(kbstate != m_keyboard_state) + { + for (i=0; i < 24; i++) { - // key was off, now on -> send Note On message - push_tx(0x90); - push_tx(kbnote); - push_tx(0x7f); + int kbnote = keyboard_notes[i]; + + if ((m_keyboard_state & (1 << i)) != 0 && (kbstate & (1 << i)) == 0) + { + // key was on, now off -> send Note Off message + push_tx(0x80); + push_tx(kbnote); + push_tx(0x7f); + } + else if ((m_keyboard_state & (1 << i)) == 0 && (kbstate & (1 << i)) != 0) + { + // key was off, now on -> send Note On message + push_tx(0x90); + push_tx(kbnote); + push_tx(0x7f); + } } } - } - else - // no messages, send Active Sense message instead - push_tx(0xfe); + else + // no messages, send Active Sense message instead + push_tx(0xfe); - m_keyboard_state = kbstate; - if(is_transmit_register_empty()) - tra_complete(); + m_keyboard_state = kbstate; + if(is_transmit_register_empty()) + tra_complete(); + } } void midi_keyboard_device::device_start() diff --git a/src/mame/machine/n64.c b/src/mame/machine/n64.c index ed3834707eb..75b68b3f419 100644 --- a/src/mame/machine/n64.c +++ b/src/mame/machine/n64.c @@ -18,7 +18,6 @@ const device_type N64PERIPH = &device_creator<n64_periphs>; - n64_periphs::n64_periphs(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, N64PERIPH, "N64 Periphal Chips", tag, owner, clock, "n64_periphs", __FILE__) , device_video_interface(mconfig, *this) @@ -271,6 +270,13 @@ void n64_periphs::device_reset() pif_ram[0x27] = 0x3f; cic_type=6; } + + // Mouse X2/Y2 for delta + for (int i = 0; i < 4; i++) + { + mouse_x2[i] = 0; + mouse_y2[i] = 0; + } } // Memory Interface (MI) @@ -1709,18 +1715,28 @@ int n64_periphs::pif_channel_handle_command(int channel, int slength, UINT8 *sda { case 0: case 1: - { - // Read status - rdata[0] = 0x05; - rdata[1] = 0x00; - rdata[2] = 0x01; - return 0; - } case 2: case 3: { - // Read status (unconnected) - return 1; + // Read status + switch ((machine().root_device().ioport("input")->read() >> (2 * channel)) & 3) + { + case 0: //NONE (unconnected) + case 3: //Invalid + return 1; + + case 1: //JOYPAD + rdata[0] = 0x05; + rdata[1] = 0x00; + rdata[2] = 0x01; + return 0; + + case 2: //MOUSE + rdata[0] = 0x02; + rdata[1] = 0x00; + rdata[2] = 0x01; + return 0; + } } case 4: { @@ -1744,9 +1760,11 @@ int n64_periphs::pif_channel_handle_command(int channel, int slength, UINT8 *sda case 0x01: // Read button values { UINT16 buttons = 0; - INT8 x = 0, y = 0; - /* add here tags for P3 and P4 when implemented */ - static const char *const portnames[] = { "P1", "P1_ANALOG_X", "P1_ANALOG_Y", "P2", "P2_ANALOG_X", "P2_ANALOG_Y" }; + int x = 0, y = 0; + static const char *const portnames[] = { "P1", "P1_ANALOG_X", "P1_ANALOG_Y", "P1_MOUSE_X", "P1_MOUSE_Y", + "P2", "P2_ANALOG_X", "P2_ANALOG_Y", "P2_MOUSE_X", "P2_MOUSE_Y", + "P3", "P3_ANALOG_X", "P3_ANALOG_Y", "P3_MOUSE_X", "P3_MOUSE_Y", + "P4", "P4_ANALOG_X", "P4_ANALOG_Y", "P4_MOUSE_X", "P4_MOUSE_Y" }; if (slength != 1 || rlength != 4) { @@ -1757,22 +1775,84 @@ int n64_periphs::pif_channel_handle_command(int channel, int slength, UINT8 *sda { case 0: // P1 Inputs case 1: // P2 Inputs + case 2: // P3 Inputs + case 3: // P4 Inputs { - buttons = machine().root_device().ioport(portnames[(channel*3) + 0])->read(); - x = machine().root_device().ioport(portnames[(channel*3) + 1])->read() - 128; - y = machine().root_device().ioport(portnames[(channel*3) + 2])->read() - 128; - - rdata[0] = (buttons >> 8) & 0xff; - rdata[1] = (buttons >> 0) & 0xff; - rdata[2] = (UINT8)(x); - rdata[3] = (UINT8)(y); - return 0; - } - case 2: - case 3: - { - // P3/P4 Inputs (not connected) - return 1; + switch ((machine().root_device().ioport("input")->read() >> (2 * channel)) & 3) + { + case 0: //NONE + case 3: //Invalid + return 1; + + case 1: //JOYPAD + buttons = machine().root_device().ioport(portnames[(channel*5) + 0])->read(); + x = machine().root_device().ioport(portnames[(channel*5) + 1])->read() - 128; + y = machine().root_device().ioport(portnames[(channel*5) + 2])->read() - 128; + + rdata[0] = (buttons >> 8) & 0xff; + rdata[1] = (buttons >> 0) & 0xff; + rdata[2] = (UINT8)(x); + rdata[3] = (UINT8)(y); + return 0; + + case 2: //MOUSE + buttons = machine().root_device().ioport(portnames[(channel*5) + 0])->read(); + x = machine().root_device().ioport(portnames[(channel*5) + 1 + 2])->read() - 128; + y = machine().root_device().ioport(portnames[(channel*5) + 2 + 2])->read() - 128; + + //x /= 4; + //y /= 4; + + int mouse_dx = 0; + int mouse_dy = 0; + + if (x != mouse_x2[channel]) + { + mouse_dx = x - mouse_x2[channel]; + + if (mouse_dx > 0x40) + mouse_dx = (0x80) - mouse_dx; + else if (mouse_dx < -0x40) + mouse_dx = -(0x80) - mouse_dx; + + mouse_x2[channel] = x; + } + + if (y != mouse_y2[channel]) + { + mouse_dy = y - mouse_y2[channel]; + + if (mouse_dy > 0x40) + mouse_dy = (0x80) - mouse_dy; + else if (mouse_dy < -0x40) + mouse_dy = -(0x80) - mouse_dy; + + mouse_y2[channel] = y; + } + + if (mouse_dx) + { + if(mouse_dx < 0) + mouse_dx++; + else + mouse_dx--; + } + + if (mouse_dy) + { + if(mouse_dy < 0) + mouse_dy++; + else + mouse_dy--; + } + + rdata[0] = (buttons >> 8) & 0xff; + rdata[1] = (buttons >> 0) & 0xff; + rdata[2] = (UINT8)(mouse_dx); + rdata[3] = (UINT8)(mouse_dy); + return 0; + + } } } @@ -2264,7 +2344,7 @@ void n64_periphs::dd_read_sector() for(int i = 0; i < ddZoneSecSize[dd_zone]/4; i++) { dd_sector_data[i] = sector[(i*4 + 0)] << 24 | sector[(i*4 + 1)] << 16 | - sector[(i*4 + 2)] << 8 | sector[(i*4 + 3)]; + sector[(i*4 + 2)] << 8 | sector[(i*4 + 3)]; } return; } diff --git a/src/mame/machine/naomim4.c b/src/mame/machine/naomim4.c index e83f34b4d5a..dc322ed0aa1 100644 --- a/src/mame/machine/naomim4.c +++ b/src/mame/machine/naomim4.c @@ -127,6 +127,8 @@ void naomi_m4_board::board_setup_address(UINT32 address, bool is_dma) void naomi_m4_board::board_get_buffer(UINT8 *&base, UINT32 &limit) { + static UINT8 retzero[2] = { 0, 0 }; + if (cfi_mode) { int fpr_num = 0; @@ -148,8 +150,15 @@ void naomi_m4_board::board_get_buffer(UINT8 *&base, UINT32 &limit) limit = BUFFER_SIZE; } else { - base = m_region->base() + rom_cur_address; - limit = m_region->bytes() - rom_cur_address; + UINT32 size = m_region->bytes(); + if (rom_cur_address < size) + { + base = m_region->base() + rom_cur_address; + limit = size - rom_cur_address; + } else { + base = retzero; + limit = 2; + } } } diff --git a/src/mame/machine/nb1413m3.c b/src/mame/machine/nb1413m3.c index d74bc6163ed..a2dce7d9207 100644 --- a/src/mame/machine/nb1413m3.c +++ b/src/mame/machine/nb1413m3.c @@ -50,7 +50,7 @@ nb1413m3_device::nb1413m3_device(const machine_config &mconfig, const char *tag, void nb1413m3_device::device_start() { m_timer_cb = timer_alloc(TIMER_CB); - synchronize(TIMER_CB); + m_timer_cb->adjust(attotime::zero); save_item(NAME(m_nb1413m3_type)); save_item(NAME(m_sndrombank1)); diff --git a/src/mame/machine/rainbow.c b/src/mame/machine/rainbow.c index 627c54fac36..46db538807e 100644 --- a/src/mame/machine/rainbow.c +++ b/src/mame/machine/rainbow.c @@ -821,10 +821,10 @@ void rbisland_state::rbisland_cchip_init( int version ) { m_CRAM[i] = auto_alloc_array(machine(), UINT8, 0x400); - state_save_register_item_pointer(machine(), "cchip", NULL, i, m_CRAM[i], 0x400); + save_pointer(m_CRAM[i], "cchip/m_CRAM[i]", 0x400, i); } - state_save_register_item(machine(), "cchip", NULL, 0, m_current_bank); + save_item(m_current_bank, "cchip/m_current_bank"); machine().scheduler().timer_pulse(attotime::from_hz(60), timer_expired_delegate(FUNC(rbisland_state::cchip_timer),this)); } diff --git a/src/mame/mame.lst b/src/mame/mame.lst index f5620972c43..148541fb98e 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -323,6 +323,7 @@ scrambler // bootleg explorer // bootleg strfbomb // bootleg scrambp // bootleg (Billport S.A.) +scramce // bootleg (Centromatic S.A.) scrampt // bootleg (Petaco S.A.) scramrf // bootleg (Recreativos Franco) atlantis // (c) 1981 Comsoft @@ -2290,7 +2291,7 @@ puzznic // C20 (c) 1989 Taito Corporation (Japan) puzznicj // C20 (c) 1989 Taito Corporation (Japan) puzznici // bootleg puzznicb // bootleg -puzznicba // bootleg +puzznicba // bootleg horshoes // C47 (c) 1990 Taito America Corporation (US) palamed // C63 (c) 1990 Taito Corporation (Japan) cachat // ??? (c) 1993 Taito Corporation (Japan) @@ -4336,7 +4337,7 @@ nsub // 268-275 (c) 1980 Sega samurai // 289-302 + upgrades (c) 1980 Sega invinco // 310-318 (c) 1979 Sega invds // 367-382 (c) 1979 Sega -carhntds // +carhntds // tranqgun // 413-428 (c) 1980 Sega // 450-465 Tranquilizer Gun (different version?) // ???-??? Car Hunt / Deep Scan @@ -4433,6 +4434,7 @@ wmatch // (c) 1984 (S1) bullfgt // 834-5478 (c) 1984 Sega / Coreland (S1) thetogyu // 834-5478 (c) 1984 Sega / Coreland (S1) spatter // 834-5583 (c) 1984 (S1) +spattera // 834-5583 (c) 1984 (S1) ssanchan // 834-5583 (c) 1984 (S1) pitfall2 // 834-5627 [1985?] reprogrammed, (c) 1984 Activision (S1) pitfall2a // 834-5627 [1985?] reprogrammed, (c) 1984 Activision (S1) @@ -5524,8 +5526,11 @@ starhrpr // 2009.07.27 Star Horse Progress Returns (satellite) // 2009.?? Project Cerberus (planned to be released in 2009) // NAOMI based (System SP) - // 2004.10 Oshare Majo Love and Berry / Fashionable Witch Love and Berry - // 2005.09 Kodai Ouja Kyouryuu King / Ancient Ruler Dinosaur King +segasp +lovebery // 2004.10 Oshare Majo Love and Berry / Fashionable Witch Love and Berry +lovebero +dinoking // 2005.09 Kodai Ouja Kyouryuu King / Ancient Ruler Dinosaur King +dinokior // 2007.06 Issyo ni Wanwan // 2007.06 Konchuu Dash!! // 2007.07 Marine Marine @@ -5533,6 +5538,11 @@ starhrpr // 2009.07.27 Star Horse Progress Returns (satellite) // 2008.02 Marine Marine Ver.2 // 2008.04 Issyo ni Wanwan Waiwai Puppy // 2008.07 Issyo ni Turbo Drive +brickppl +tetgiant +tetgiano +dinoki25 +loveber3 // NAOMI 2 naomi2 // 2001.?? Naomi 2 BIOS @@ -6045,6 +6055,7 @@ cninjabl2 // bootleg stoneage // bootleg robocop2 // MAH (c) 1991 Data East Corporation (World) robocop2u // MAH (c) 1991 Data East Corporation (US) +robocop2ua // MAH (c) 1991 Data East Corporation (US) robocop2j // MAH (c) 1991 Data East Corporation (Japan) thndzone // MAJ (c) 1991 Data East Corporation (World) - Rev 1 thndzonea // MAJ (c) 1991 Data East Corporation (World) @@ -6105,15 +6116,17 @@ pktgaldxb // bootleg // MBA ?? // MBB ?? // MBC ?? -boogwing // MBD (c) 1992 (Euro) -boogwinga // MBD (c) 1992 (Asia) -ragtime // MBD (c) 1992 (Japan) -ragtimea // MBD (c) 1992 (Japan) +boogwing // MBD (c) 1992 (Euro, v1.5) +boogwingu // MBD (c) 1992 (USA, v1.7) +boogwinga // MBD (c) 1992 (Asia, v1.5) +ragtime // MBD (c) 1992 (Japan, v1.5) +ragtimea // MBD (c) 1992 (Japan, v1.3) dblewing // MBE (c) 1993 Mitchell fghthist // MBF (c) 1993 Data East Corporation (World) DE-0380-2 PCB fghthistu // MBF (c) 1993 Data East Corporation (US) DE-0395-1 PCB +fghthistua // MBF (c) 1993 Data East Corporation (US) DE-0395-1 PCB fghthistj // MBF (c) 1993 Data East Corporation (Japan) DE-0395-1 PCB -fghthistua // MBF (c) 1993 Data East Corporation (US) DE-0380-2 PCB +fghthistub // MBF (c) 1993 Data East Corporation (US) DE-0380-2 PCB fghthistja // MBF (c) 1993 Data East Corporation (Japan) DE-0380-2 PCB fghthistjb // MBF (c) 1993 Data East Corporation (Japan) DE-0380-1 PCB hvysmsh // MBG (c) 1993 Data East Corporation (World) @@ -6462,7 +6475,7 @@ chqflag // GX717 (c) 1988 chqflagj // GX717 (c) 1988 (Japan) ultraman // GX910 (c) 1991 Banpresto/Bandai hexion // GX122 (c) 1992 -hexionb // bootleg +hexionb // bootleg lethalen // GX191 (c) 1992 lethalenub // GX191 (c) 1992 lethalenua // GX191 (c) 1992 @@ -6563,6 +6576,7 @@ xmene // GX065 (c) 1992 (World) xmena // GX065 (c) 1992 (Asia) xmenaa // GX065 (c) 1992 (Asia) xmen2pe // GX065 (c) 1992 (World) +xmen2pu // GX065 (c) 1992 (US) xmen2pa // GX065 (c) 1992 (Asia) xmen2pj // GX065 (c) 1992 (Japan) xmen6p // GX065 (c) 1992 (World) @@ -7370,6 +7384,7 @@ primrage20 // 136102 (c) 1994 metalmx // 136103? (c) 1994 area51 // 136105 (c) 1995 area51t // 136105 (c) 1995 +area51ta // 136105 (c) 1995 area51a // 136105 (c) 1995 fishfren // (proto) (c) 1995 freezeat // (proto) (c) 1996 @@ -7851,7 +7866,7 @@ gangwarsj // Alpha-68K96V (c) 1989 Alpha Denshi Co. gangwarsu // Alpha-68K96V (c) 1989 Alpha Denshi Co. gangwarsb // bootleg sbasebal // Alpha-68K96V (c) 1989 SNK of America licensed from Alpha -sbasebalj // Alpha-68K96V +sbasebalj // Alpha-68K96V tnextspc // A8003 'NS' (c) 1989 - MASKROM tnextspc2 // A8003 'NS' (c) 1989 - EPROMs tnextspcj // A8003 'NS' (c) 1989 - Japan @@ -7915,6 +7930,7 @@ vballb // bootleg (of US set) vball2pjb // bootleg (of Japan set) ddragon2 // TA-0026 (c) 1988 (World) ddragon2u // TA-0026 (c) 1988 (US) +ddragon2j // TA-0026 (c) 1988 (Japan) toffy // (c) 1993 Midas stoffy // (c) 1994 Midas stoffyu // (c) 1994 Midas + Unico @@ -8259,7 +8275,8 @@ cartfury // (c) 2000 Midway Games hydrthnd // (c) 1999 Midway Games offrthnd // (c) 2000 Midway Games arctthnd // (c) 2001 Midway Games -arctthndult // (c) 2001 Midway Games +ultarctc // (c) 2001 Midway Games +ultarctcup // (c) 2001 Midway Games // Midway Touchmaster / Galaxy Games tm // (c) 1996 Midway Games @@ -8520,12 +8537,13 @@ viprp1hk // (c) 1995 Seibu Kaihatsu (Metrotainment License) ejanhs // (c) 1996 Seibu Kaihatsu -rdft // (c) 1996 Seibu Kaihatsu +rdft // (c) 1996 Seibu Kaihatsu (Tuning License) rdftu // (c) 1996 Seibu Kaihatsu (Fabtek license) rdftau // (c) 1996 Seibu Kaihatsu rdftauge // (c) 1996 Seibu Kaihatsu (Tuning license and text display, but Australia region code) rdftj // (c) 1996 Seibu Kaihatsu rdftja // (c) 1996 Seibu Kaihatsu +rdftjb // (c) 1996 Seibu Kaihatsu rdftadi // (c) 1996 Seibu Kaihatsu (Dream Island license) rdftam // (c) 1996 Seibu Kaihatsu (Metrotainment license) rdftit // (c) 1996 Seibu Kaihatsu @@ -8534,9 +8552,9 @@ rdfts // (c) 1996 Seibu Kaihatsu (Explorer System Corp.) rdft2 // (c) 1997 Seibu Kaihatsu (Tuning License) rdft2a // (c) 1997 Seibu Kaihatsu (Metrotainment license) -rdft2a2 // (c) 1997 Seibu Kaihatsu (Dream Island license) +rdft2aa // (c) 1997 Seibu Kaihatsu (Dream Island license) rdft2j // (c) 1997 Seibu Kaihatsu -rdft2j2 // (c) 1997 Seibu Kaihatsu +rdft2ja // (c) 1997 Seibu Kaihatsu rdft2t // (c) 1997 Seibu Kaihatsu rdft2u // (c) 1997 Seibu Kaihatsu (Fabtek license) rdft2us // (c) 1997 Seibu Kaihatsu (Fabtek license) @@ -9542,7 +9560,7 @@ redhawk // (c) 1997 New Vision Ent. license redhawke // (c) 1997 Excellent Co., Ltd license redhawki // (c) 1997 Haedong Corp. license redhawkb // (c) 1997 -redhawkk // (c) 1997 +redhawkk // (c) 1997 grdnstrm // (c) 1998 Apples Industries license grdnstrmv // (c) 1998 Apples Industries license grdnstrmk // (c) 1998 (Korea) @@ -9729,6 +9747,7 @@ sub // (c) 1985 Sigma Ent. Inc. jwildb52 // (c) 199? Sigma jwildb52a // (c) 199? Sigma jwildb52h // (c) 199? Sigma +s8waysfc // (c) 199? Sigma // Sigma B98 / Sammy Medal Games dodghero // b9802 (c) 1997 Sigma @@ -9862,7 +9881,7 @@ drgw2j // drgw2hk // drgw3 // (c) 1998 Dragon World 3 drgw3105 // -drgw3103 // +drgw3103 // drgw3100 // dwex // (c) 1998 Dragon World 3 EX killbld // (c) 1998 The Killing Blade @@ -10042,7 +10061,8 @@ gigasb // (c) 1986 bootleg gigasm2b // (c) 1986 bootleg oigas // (c) 1986 bootleg pbillrd // (c) 1987 Nihon System -pbillrds // (c) 1988 Nihon System (+ optional Sega) +pbillrds // (c) 1987 Nihon System (Sega license?) +pbillrdsa // (c) 1987 Nihon System (Sega license?) freekick // (c) 1988 Nihon System licensed to Merit (+ optional Sega) NS6201-A 1987.10 freekicka // (c) 1988 Nihon System (+ optional Sega) NS6201-A 1987.9 freekickb1 // (c) 1987 bootleg @@ -10348,6 +10368,7 @@ jokpokerc // (c) 1983 Greyhound Electronics superbwl // (c) 1982 Greyhound Electronics amuse // (c) 1982 Greyhound Electronics amuse1 // (c) 1982 Greyhound Electronics +amuse1a // (c) 1983 Greyhound Electronics gs4002 // (c) 1982 G.E.I. gs4002a // (c) 1982 G.E.I. gepoker // (c) 1984 Greyhound Electronics @@ -12683,33 +12704,35 @@ tajmah // Tajmahal 3wishrd // Three Wishes Red -// WMS (Russian) +// WMS 360 / 550 wms // Set Chips wmsa // wmsb // -btippers // Big Tippers (Russia) -wmsboom // Boom (Russia) -cashcrop // Cash Crop (Russia) -filthyr // Filthy Rich (Russia) -hottop // Hot Toppings (Russia) -inwinner // In Winner (Russia) -jptparty // Jackpot Party (Russia) -leprgld // Leprecorns Gold (Russia) -lol // Life of Luxury (Russia) -lovewin // Love To Win (Russia) -mtburn // Money To Burn (Russia) -otchart // Off The Charts (Russia) -perfect // Perfect Game (Russia) -reelemin // Reel 'Em In (Russia) -sonoth // Sum Of Nothing (Russia) -swingin // Swingin' Green (Russia) -wmstopb // Top Banana (Russia) -wdun // Who Dunnit (Russia) -winbid // Winning Bid (Russia) -wldstrek // Wild Streak (Russia) -yukongld // Yukon Gold (Russia) +btippers // Big Tippers (Russian) +wmsboom // Boom (Russian) +cashcrop // Cash Crop (Russian) +filthyr // Filthy Rich (Russian) +hottop // Hot Toppings (English) +hottopa // Hot Toppings (Russian?) +inwinner // In Winner (Russian) +jptparty // Jackpot Party (Russian) +leprgld // Leprecorns Gold (Russian) +leprglds // Leprecorns Gold (Spanish) +lol // Life of Luxury (Russian) +lovewin // Love To Win (Russian) +mtburn // Money To Burn (Russian) +otchart // Off The Charts (Russian) +perfect // Perfect Game (Russian) +reelemin // Reel 'Em In (Russian) +sonoth // Sum Of Nothing (Russian) +swingin // Swingin' Green (Russian) +wmstopb // Top Banana (Russian) +wdun // Who Dunnit (Russian) +winbid // Winning Bid (Russian) +wldstrek // Wild Streak (Russian) +yukongld // Yukon Gold (Russian) // Extrema (Russian) @@ -12907,8 +12930,8 @@ tank // (c) 1974 Atari // Atari 100% TTL pong // (c) 1972 Atari pongd // (c) 1975 Atari -pongf // (c) 1972 Atari - no subcycles -//breakout +pongf // (c) 1972 Atari +breakout // (c) 1976 Atari //coupedem //goal4 //gotchaat @@ -17035,6 +17058,7 @@ sc4s6cb // sc4s6cc // sc4s6cd // sc4s6ce // +sc4s6cf // sc4sdr // Super Diamonds & Rubies (Bellfruit) sc4sdra // sc4sdrb // @@ -17133,6 +17157,7 @@ sc4ticlb // Treasure Island Club (Bellfruit) sc4ticlba // sc4ticlbb // sc4ticlbc // +sc4ticlbd // sc4ttomb // Treasure Tomb (Bellfruit) sc4ttomba // sc4ttombb // @@ -17251,6 +17276,7 @@ sc4legd // sc4lege // sc4legf // sc4legg // +sc4legh // sc4legcb // Who Wants To Be A Legionnaire Club (Bellfruit) sc4legcba // sc4legcbb // @@ -18590,6 +18616,8 @@ sc5dndboh // sc5dndboi // sc5dndboj // sc5dndbok // +sc5dndbol // +sc5dndbom // sc5dndbl // Deal Or No Deal Beat The Banker Club (Bellfruit) sc5dndbla // sc5dndblb // @@ -20064,6 +20092,37 @@ sc5nunsmc // sc5nunsmd // sc5nunsme // sc5dndbe // Deal Or No Deal Beat The Banker (Bellfruit) +sc5_3512 +sc5_3437 +sc5_3438 +sc5_3508 +sc5_3514 +sc5_3517 +sc5_3524 +sc5_3515 +sc5_3511 +sc5_3513 +sc5_3516 +sc5_3530 +sc5_3552 +sc5_3551 +sc5_3525 +sc5_3553 +sc5_3555 +sc5_3519 +sc5_3510 +sc5_3557 +sc5_3451 +sc5_3450 +sc5_3435 +sc5_3520 +sc5_3434 +sc5_z059 +sc5_z058 +sc5_z060 +sc5_z057 +sc5_3414 +sc5_3518 // Adder 5 diff --git a/src/mame/video/aztarac.c b/src/mame/video/aztarac.c index 239def668c8..df99f492f45 100644 --- a/src/mame/video/aztarac.c +++ b/src/mame/video/aztarac.c @@ -21,9 +21,8 @@ inline void aztarac_state::read_vectorram(UINT16 *vectorram, int addr, int *x, i if (*y & 0x200) *y |= 0xfffffc00; } -WRITE16_MEMBER(aztarac_state::aztarac_ubr_w) +WRITE16_MEMBER(aztarac_state::ubr_w) { - UINT16 *vectorram = m_vectorram; int x, y, c, intensity, xoffset, yoffset, color; int defaddr, objaddr=0, ndefs; @@ -33,7 +32,7 @@ WRITE16_MEMBER(aztarac_state::aztarac_ubr_w) while (1) { - read_vectorram(vectorram, objaddr, &xoffset, &yoffset, &c); + read_vectorram(m_vectorram, objaddr, &xoffset, &yoffset, &c); objaddr++; if (c & 0x4000) @@ -44,7 +43,7 @@ WRITE16_MEMBER(aztarac_state::aztarac_ubr_w) defaddr = (c >> 1) & 0x7ff; AVECTOR (xoffset, yoffset, 0, 0); - read_vectorram(vectorram, defaddr, &x, &ndefs, &c); + read_vectorram(m_vectorram, defaddr, &x, &ndefs, &c); ndefs++; if (c & 0xff00) @@ -55,7 +54,7 @@ WRITE16_MEMBER(aztarac_state::aztarac_ubr_w) while (ndefs--) { defaddr++; - read_vectorram(vectorram, defaddr, &x, &y, &c); + read_vectorram(m_vectorram, defaddr, &x, &y, &c); if ((c & 0xff00) == 0) AVECTOR (x + xoffset, y + yoffset, 0, 0); else @@ -68,7 +67,7 @@ WRITE16_MEMBER(aztarac_state::aztarac_ubr_w) while (ndefs--) { defaddr++; - read_vectorram(vectorram, defaddr, &x, &y, &c); + read_vectorram(m_vectorram, defaddr, &x, &y, &c); color = VECTOR_COLOR222(c & 0x3f); AVECTOR (x + xoffset, y + yoffset, color, c >> 8); } diff --git a/src/mame/video/bagman.c b/src/mame/video/bagman.c index 9515fb0a037..2232d30721c 100644 --- a/src/mame/video/bagman.c +++ b/src/mame/video/bagman.c @@ -1,6 +1,6 @@ /*************************************************************************** - video.c + bagman.c Functions to emulate the video hardware of the machine. @@ -11,13 +11,13 @@ #include "includes/bagman.h" -WRITE8_MEMBER(bagman_state::bagman_videoram_w) +WRITE8_MEMBER(bagman_state::videoram_w) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(bagman_state::bagman_colorram_w) +WRITE8_MEMBER(bagman_state::colorram_w) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); @@ -80,7 +80,7 @@ PALETTE_INIT_MEMBER(bagman_state,bagman) } } -WRITE8_MEMBER(bagman_state::bagman_flipscreen_w) +WRITE8_MEMBER(bagman_state::flipscreen_w) { flip_screen_set(data & 0x01); } @@ -94,7 +94,7 @@ TILE_GET_INFO_MEMBER(bagman_state::get_bg_tile_info) SET_TILE_INFO_MEMBER(gfxbank, code, color, 0); } -VIDEO_START_MEMBER(bagman_state,bagman) +void bagman_state::video_start() { m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bagman_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); @@ -103,17 +103,14 @@ VIDEO_START_MEMBER(bagman_state,bagman) void bagman_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 *spriteram = m_spriteram; - int offs; - - for (offs = m_spriteram.bytes() - 4;offs >= 0;offs -= 4) + for (int offs = m_spriteram.bytes() - 4;offs >= 0;offs -= 4) { int sx,sy,flipx,flipy; - sx = spriteram[offs + 3]; - sy = 256 - spriteram[offs + 2] - 16; - flipx = spriteram[offs] & 0x40; - flipy = spriteram[offs] & 0x80; + sx = m_spriteram[offs + 3]; + sy = 256 - m_spriteram[offs + 2] - 16; + flipx = m_spriteram[offs] & 0x40; + flipy = m_spriteram[offs] & 0x80; if (flip_screen()) { sx = 256 - sx - 15; @@ -122,17 +119,17 @@ void bagman_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) flipy = !flipy; } - if (spriteram[offs + 2] && spriteram[offs + 3]) + if (m_spriteram[offs + 2] && m_spriteram[offs + 3]) m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, - (spriteram[offs] & 0x3f) + 2 * (spriteram[offs + 1] & 0x20), - spriteram[offs + 1] & 0x1f, + (m_spriteram[offs] & 0x3f) + 2 * (m_spriteram[offs + 1] & 0x20), + m_spriteram[offs + 1] & 0x1f, flipx,flipy, sx,sy,0); } } -UINT32 bagman_state::screen_update_bagman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 bagman_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bitmap.fill(0, cliprect); if (*m_video_enable == 0) diff --git a/src/mame/video/darkseal.c b/src/mame/video/darkseal.c index 1100aa479ab..ab8b941da02 100644 --- a/src/mame/video/darkseal.c +++ b/src/mame/video/darkseal.c @@ -36,13 +36,13 @@ void darkseal_state::update_24bitcol(int offset) m_palette->set_pen_color(offset,rgb_t(r,g,b)); } -WRITE16_MEMBER(darkseal_state::darkseal_palette_24bit_rg_w) +WRITE16_MEMBER(darkseal_state::palette_24bit_rg_w) { COMBINE_DATA(&m_generic_paletteram_16[offset]); update_24bitcol(offset); } -WRITE16_MEMBER(darkseal_state::darkseal_palette_24bit_b_w) +WRITE16_MEMBER(darkseal_state::palette_24bit_b_w) { COMBINE_DATA(&m_generic_paletteram2_16[offset]); update_24bitcol(offset); @@ -56,9 +56,11 @@ void darkseal_state::video_start() /******************************************************************************/ -UINT32 darkseal_state::screen_update_darkseal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 darkseal_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); + address_space &space = machine().driver_data()->generic_space(); + UINT16 flip = m_deco_tilegen2->pf_control_r(space, 0, 0xffff); + flip_screen_set(!BIT(flip, 7)); bitmap.fill(m_palette->black_pen(), cliprect); diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index 9f7028d11de..0a93b093cf6 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -1274,6 +1274,7 @@ void hng64_state::video_start() m_dl = auto_alloc_array(machine(), UINT16, 0x200/2); + polys.resize(1024*5); m_texturerom = memregion("textures")->base(); m_vertsrom = (UINT16*)memregion("verts")->base(); diff --git a/src/mame/video/hng64_3d.c b/src/mame/video/hng64_3d.c index 9f4d1d2fefc..56c66cbe5c0 100644 --- a/src/mame/video/hng64_3d.c +++ b/src/mame/video/hng64_3d.c @@ -48,7 +48,7 @@ WRITE32_MEMBER(hng64_state::dl_upload_w) // this is written after the game uploads 16 packets, each 32 bytes long (2x 16 words?) // we're assuming it to be a 'send to 3d hardware' trigger. // this can be called multiple times per frame (at least 2, as long as it gets the expected interrupt / status flags) - +g_profiler.start(PROFILER_USER1); for(int packetStart=0;packetStart<0x200;packetStart+=32) { // Send it off to the 3d subsystem. @@ -56,6 +56,7 @@ WRITE32_MEMBER(hng64_state::dl_upload_w) } machine().scheduler().timer_set(m_maincpu->cycles_to_attotime(0x200*8), timer_expired_delegate(FUNC(hng64_state::hng64_3dfifo_processed),this)); +g_profiler.stop(); } TIMER_CALLBACK_MEMBER(hng64_state::hng64_3dfifo_processed ) @@ -284,7 +285,7 @@ void hng64_state::setCameraProjectionMatrix(const UINT16* packet) // Operation 0100 // Polygon rasterization. -void hng64_state::recoverPolygonBlock(const UINT16* packet, std::vector<struct polygon> &polys, int* numPolys) +void hng64_state::recoverPolygonBlock(const UINT16* packet, int* numPolys) { /*////////////// // PACKET FORMAT @@ -863,9 +864,7 @@ void hng64_state::recoverPolygonBlock(const UINT16* packet, std::vector<struct p void hng64_state::hng64_command3d(const UINT16* packet) { - /* A temporary place to put some polygons. This will optimize away if the compiler's any good. */ int numPolys = 0; - std::vector<polygon> polys(1024*5); //printf("packet type : %04x %04x|%04x %04x|%04x %04x|%04x %04x | %04x %04x %04x %04x %04x %04x %04x %04x\n", packet[0],packet[1],packet[2],packet[3],packet[4],packet[5],packet[6],packet[7], packet[8], packet[9], packet[10], packet[11], packet[12], packet[13], packet[14], packet[15]); @@ -899,7 +898,7 @@ void hng64_state::hng64_command3d(const UINT16* packet) if (packet[2] == 0x0003 && packet[3] == 0x8f37 && m_mcu_type == SHOOT_MCU) break; - recoverPolygonBlock( packet, polys, &numPolys); + recoverPolygonBlock( packet, &numPolys); break; case 0x0102: // Geometry with only translation @@ -919,7 +918,7 @@ void hng64_state::hng64_command3d(const UINT16* packet) miniPacket[7] = 0x7fff; miniPacket[11] = 0x7fff; miniPacket[15] = 0x7fff; - recoverPolygonBlock( miniPacket, polys, &numPolys); + recoverPolygonBlock( miniPacket, &numPolys); memset(miniPacket, 0, sizeof(UINT16)*16); for (int i = 0; i < 7; i++) miniPacket[i] = packet[i+8]; @@ -927,7 +926,7 @@ void hng64_state::hng64_command3d(const UINT16* packet) miniPacket[7] = 0x7fff; miniPacket[11] = 0x7fff; miniPacket[15] = 0x7fff; - recoverPolygonBlock( miniPacket, polys, &numPolys); + recoverPolygonBlock( miniPacket, &numPolys); break; case 0x1000: // Unknown: Some sort of global flags? diff --git a/src/mame/video/m92.c b/src/mame/video/m92.c index 45fee1cf2ef..63c5a97bdf4 100644 --- a/src/mame/video/m92.c +++ b/src/mame/video/m92.c @@ -278,8 +278,8 @@ VIDEO_START_MEMBER(m92_state,m92) layer->tmap->set_transmask(2, 0x0001, (laynum == 2) ? 0xfffe : 0xffff); layer->wide_tmap->set_transmask(2, 0x0001, (laynum == 2) ? 0xfffe : 0xffff); - state_save_register_item(machine(), "layer", NULL, laynum, layer->vram_base); - state_save_register_item_array(machine(), "layer", NULL, laynum, layer->control); + save_item(NAME(layer->vram_base), laynum); + save_item(NAME(layer->control), laynum); } m_paletteram.resize(m_palette->entries()); diff --git a/src/mame/video/nbmj8688.c b/src/mame/video/nbmj8688.c index 89734fb7132..a37d5b66314 100644 --- a/src/mame/video/nbmj8688.c +++ b/src/mame/video/nbmj8688.c @@ -102,7 +102,7 @@ PALETTE_INIT_MEMBER(nbmj8688_state,mbmj8688_lcd) palette.set_pen_color(1, rgb_t(0, 0, 0)); } -WRITE8_MEMBER(nbmj8688_state::nbmj8688_clut_w) +WRITE8_MEMBER(nbmj8688_state::clut_w) { m_clut[offset] = (data ^ 0xff); } @@ -112,7 +112,7 @@ WRITE8_MEMBER(nbmj8688_state::nbmj8688_clut_w) ******************************************************************************/ -WRITE8_MEMBER(nbmj8688_state::nbmj8688_blitter_w) +WRITE8_MEMBER(nbmj8688_state::blitter_w) { switch (offset) { @@ -123,13 +123,13 @@ WRITE8_MEMBER(nbmj8688_state::nbmj8688_blitter_w) case 0x04: m_blitter_sizex = data; break; case 0x05: m_blitter_sizey = data; /* writing here also starts the blit */ - mbmj8688_gfxdraw(m_mjsikaku_gfxmode); + gfxdraw(m_gfxmode); break; case 0x06: m_blitter_direction_x = (data & 0x01) ? 1 : 0; m_blitter_direction_y = (data & 0x02) ? 1 : 0; - m_mjsikaku_flipscreen = (data & 0x04) ? 0 : 1; - m_mjsikaku_dispflag = (data & 0x08) ? 0 : 1; - mjsikaku_vramflip(); + m_flipscreen = (data & 0x04) ? 0 : 1; + m_dispflag = (data & 0x08) ? 0 : 1; + vramflip(); break; case 0x07: break; } @@ -137,85 +137,85 @@ WRITE8_MEMBER(nbmj8688_state::nbmj8688_blitter_w) WRITE8_MEMBER(nbmj8688_state::mjsikaku_gfxflag2_w) { - m_mjsikaku_gfxflag2 = data; + m_gfxflag2 = data; if (m_nb1413m3->m_nb1413m3_type == NB1413M3_SEIHAM || m_nb1413m3->m_nb1413m3_type == NB1413M3_KORINAI || m_nb1413m3->m_nb1413m3_type == NB1413M3_KORINAIM || m_nb1413m3->m_nb1413m3_type == NB1413M3_LIVEGAL) - m_mjsikaku_gfxflag2 ^= 0x20; + m_gfxflag2 ^= 0x20; if (m_nb1413m3->m_nb1413m3_type == NB1413M3_OJOUSANM || m_nb1413m3->m_nb1413m3_type == NB1413M3_RYUUHA) - m_mjsikaku_gfxflag2 |= 0x20; + m_gfxflag2 |= 0x20; } WRITE8_MEMBER(nbmj8688_state::mjsikaku_gfxflag3_w) { - m_mjsikaku_gfxflag3 = (data & 0xe0); + m_gfxflag3 = (data & 0xe0); } -WRITE8_MEMBER(nbmj8688_state::mjsikaku_scrolly_w) +WRITE8_MEMBER(nbmj8688_state::scrolly_w) { - m_mjsikaku_scrolly = data; + m_scrolly = data; } WRITE8_MEMBER(nbmj8688_state::mjsikaku_romsel_w) { int gfxlen = memregion("gfx1")->bytes(); - m_mjsikaku_gfxrom = (data & 0x0f); + m_gfxrom = (data & 0x0f); - if ((m_mjsikaku_gfxrom << 17) > (gfxlen - 1)) + if ((m_gfxrom << 17) > (gfxlen - 1)) { #ifdef MAME_DEBUG popmessage("GFXROM BANK OVER!!"); #endif - m_mjsikaku_gfxrom &= (gfxlen / 0x20000 - 1); + m_gfxrom &= (gfxlen / 0x20000 - 1); } } WRITE8_MEMBER(nbmj8688_state::secolove_romsel_w) { int gfxlen = memregion("gfx1")->bytes(); - m_mjsikaku_gfxrom = ((data & 0xc0) >> 4) + (data & 0x03); + m_gfxrom = ((data & 0xc0) >> 4) + (data & 0x03); mjsikaku_gfxflag2_w(space, 0, data); - if ((m_mjsikaku_gfxrom << 17) > (gfxlen - 1)) + if ((m_gfxrom << 17) > (gfxlen - 1)) { #ifdef MAME_DEBUG popmessage("GFXROM BANK OVER!!"); #endif - m_mjsikaku_gfxrom &= (gfxlen / 0x20000 - 1); + m_gfxrom &= (gfxlen / 0x20000 - 1); } } WRITE8_MEMBER(nbmj8688_state::crystalg_romsel_w) { int gfxlen = memregion("gfx1")->bytes(); - m_mjsikaku_gfxrom = (data & 0x03); + m_gfxrom = (data & 0x03); mjsikaku_gfxflag2_w(space, 0, data); - if ((m_mjsikaku_gfxrom << 17) > (gfxlen - 1)) + if ((m_gfxrom << 17) > (gfxlen - 1)) { #ifdef MAME_DEBUG popmessage("GFXROM BANK OVER!!"); #endif - m_mjsikaku_gfxrom &= (gfxlen / 0x20000 - 1); + m_gfxrom &= (gfxlen / 0x20000 - 1); } } WRITE8_MEMBER(nbmj8688_state::seiha_romsel_w) { int gfxlen = memregion("gfx1")->bytes(); - m_mjsikaku_gfxrom = (data & 0x1f); + m_gfxrom = (data & 0x1f); mjsikaku_gfxflag3_w(space, 0, data); - if ((m_mjsikaku_gfxrom << 17) > (gfxlen - 1)) + if ((m_gfxrom << 17) > (gfxlen - 1)) { #ifdef MAME_DEBUG popmessage("GFXROM BANK OVER!!"); #endif - m_mjsikaku_gfxrom &= (gfxlen / 0x20000 - 1); + m_gfxrom &= (gfxlen / 0x20000 - 1); } } @@ -223,46 +223,46 @@ WRITE8_MEMBER(nbmj8688_state::seiha_romsel_w) ******************************************************************************/ -void nbmj8688_state::mjsikaku_vramflip() +void nbmj8688_state::vramflip() { int x, y; UINT16 color1, color2; - if (m_mjsikaku_flipscreen == m_mjsikaku_flipscreen_old) return; + if (m_flipscreen == m_flipscreen_old) return; for (y = 0; y < (256 / 2); y++) { for (x = 0; x < 512; x++) { - color1 = m_mjsikaku_videoram[(y * 512) + x]; - color2 = m_mjsikaku_videoram[((y ^ 0xff) * 512) + (x ^ 0x1ff)]; - m_mjsikaku_videoram[(y * 512) + x] = color2; - m_mjsikaku_videoram[((y ^ 0xff) * 512) + (x ^ 0x1ff)] = color1; + color1 = m_videoram[(y * 512) + x]; + color2 = m_videoram[((y ^ 0xff) * 512) + (x ^ 0x1ff)]; + m_videoram[(y * 512) + x] = color2; + m_videoram[((y ^ 0xff) * 512) + (x ^ 0x1ff)] = color1; } } - m_mjsikaku_flipscreen_old = m_mjsikaku_flipscreen; - m_mjsikaku_screen_refresh = 1; + m_flipscreen_old = m_flipscreen; + m_screen_refresh = 1; } void nbmj8688_state::update_pixel(int x, int y) { - int color = m_mjsikaku_videoram[(y * 512) + x]; - m_mjsikaku_tmpbitmap->pix16(y, x) = color; + int color = m_videoram[(y * 512) + x]; + m_tmpbitmap->pix16(y, x) = color; } void nbmj8688_state::writeram_low(int x, int y, int color) { - m_mjsikaku_videoram[(y * 512) + x] &= 0xff00; - m_mjsikaku_videoram[(y * 512) + x] |= color; + m_videoram[(y * 512) + x] &= 0xff00; + m_videoram[(y * 512) + x] |= color; update_pixel(x, y); } void nbmj8688_state::writeram_high(int x, int y, int color) { - m_mjsikaku_videoram[(y * 512) + x] &= 0x00ff; - m_mjsikaku_videoram[(y * 512) + x] |= color << 8; + m_videoram[(y * 512) + x] &= 0x00ff; + m_videoram[(y * 512) + x] |= color << 8; update_pixel(x, y); } @@ -278,7 +278,7 @@ void nbmj8688_state::device_timer(emu_timer &timer, device_timer_id id, int para } } -void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) +void nbmj8688_state::gfxdraw(int gfxtype) { UINT8 *GFX = memregion("gfx1")->base(); @@ -293,7 +293,7 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) if (gfxtype == GFXTYPE_PURE_12BIT) { - if (m_mjsikaku_gfxflag2 & 0x20) return; + if (m_gfxflag2 & 0x20) return; } m_nb1413m3->m_busyctr = 0; @@ -324,7 +324,7 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) } gfxlen = memregion("gfx1")->bytes(); - gfxaddr = (m_mjsikaku_gfxrom << 17) + (m_blitter_src_addr << 1); + gfxaddr = (m_gfxrom << 17) + (m_blitter_src_addr << 1); //popmessage("ADDR:%08X DX:%03d DY:%03d SX:%03d SY:%03d", gfxaddr, startx, starty, sizex, sizey); //logerror("ADDR:%08X DX:%03d DY:%03d SX:%03d SY:%03d\n", gfxaddr, startx, starty, sizex, sizey); @@ -346,9 +346,9 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) dx1 = (2 * x + 0) & 0x1ff; dx2 = (2 * x + 1) & 0x1ff; - dy = (y + m_mjsikaku_scrolly) & 0xff; + dy = (y + m_scrolly) & 0xff; - if (m_mjsikaku_flipscreen) + if (m_flipscreen) { dx1 ^= 0x1ff; dx2 ^= 0x1ff; @@ -357,11 +357,11 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) if (gfxtype == GFXTYPE_HYBRID_16BIT) { - if (m_mjsikaku_gfxflag3 & 0x40) + if (m_gfxflag3 & 0x40) { // direct mode - if (m_mjsikaku_gfxflag3 & 0x80) + if (m_gfxflag3 & 0x80) { /* least significant bits */ if (color != 0xff) @@ -386,10 +386,10 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) // lookup table mode // unknown flag (seiha, seiham) - // if (m_mjsikaku_gfxflag3 & 0x80) return; + // if (m_gfxflag3 & 0x80) return; // unknown (seiha, seiham, iemoto, ojousan) - if (!(m_mjsikaku_gfxflag2 & 0x20)) return; + if (!(m_gfxflag2 & 0x20)) return; if (m_blitter_direction_x) { @@ -411,7 +411,7 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) { /* extend color from 12-bit to 16-bit */ color1 = (color1 & 0xffc0) | ((color1 & 0x20) >> 1) | ((color1 & 0x10) >> 2); - m_mjsikaku_videoram[(dy * 512) + dx1] = color1; + m_videoram[(dy * 512) + dx1] = color1; update_pixel(dx1, dy); } @@ -419,7 +419,7 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) { /* extend color from 12-bit to 16-bit */ color2 = (color2 & 0xffc0) | ((color2 & 0x20) >> 1) | ((color2 & 0x10) >> 2); - m_mjsikaku_videoram[(dy * 512) + dx2] = color2; + m_videoram[(dy * 512) + dx2] = color2; update_pixel(dx2, dy); } } @@ -446,25 +446,25 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) if (color1 != 0x0fff) { - m_mjsikaku_videoram[(dy * 512) + dx1] = color1; + m_videoram[(dy * 512) + dx1] = color1; update_pixel(dx1, dy); } if (color2 != 0x0fff) { - m_mjsikaku_videoram[(dy * 512) + dx2] = color2; + m_videoram[(dy * 512) + dx2] = color2; update_pixel(dx2, dy); } } else { - if (gfxtype == GFXTYPE_HYBRID_12BIT && (m_mjsikaku_gfxflag2 & 0x20)) + if (gfxtype == GFXTYPE_HYBRID_12BIT && (m_gfxflag2 & 0x20)) { /* 4096 colors mode, wedged in on top of normal mode Here we affect only the 4 least significant bits, the others are changed as usual. */ - if (m_mjsikaku_gfxflag2 & 0x10) + if (m_gfxflag2 & 0x10) { // 4096 colors low mode (2nd draw upper) color = m_clut[((color & 0xf0) >> 4)]; @@ -484,7 +484,7 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) } else { - if (m_mjsikaku_gfxflag2 & 0x04) + if (m_gfxflag2 & 0x04) { // direct mode @@ -511,7 +511,7 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) color2 = m_clut[color2]; } - if (gfxtype == GFXTYPE_PURE_16BIT && !(m_mjsikaku_gfxflag2 & 0x20)) + if (gfxtype == GFXTYPE_PURE_16BIT && !(m_gfxflag2 & 0x20)) { /* 16-bit palette most significant bits */ if (color1 != 0xff) writeram_high(dx1, dy, color1); @@ -533,9 +533,9 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) m_nb1413m3->m_busyflag = 0; if (gfxtype == GFXTYPE_8BIT) - timer_set(attotime::from_hz(400000) * m_nb1413m3->m_busyctr, TIMER_BLITTER); + m_blitter_timer->adjust(attotime::from_hz(400000) * m_nb1413m3->m_busyctr); else - timer_set(attotime::from_hz(400000) * m_nb1413m3->m_busyctr, TIMER_BLITTER); + m_blitter_timer->adjust(attotime::from_hz(400000) * m_nb1413m3->m_busyctr); } @@ -546,56 +546,83 @@ void nbmj8688_state::mbmj8688_gfxdraw(int gfxtype) void nbmj8688_state::common_video_start() { - m_mjsikaku_tmpbitmap = auto_bitmap_ind16_alloc(machine(), 512, 256); - m_mjsikaku_videoram = auto_alloc_array_clear(machine(), UINT16, 512 * 256); + m_blitter_timer = timer_alloc(TIMER_BLITTER); + + m_tmpbitmap = auto_bitmap_ind16_alloc(machine(), 512, 256); + m_videoram = auto_alloc_array_clear(machine(), UINT16, 512 * 256); m_clut = auto_alloc_array(machine(), UINT8, 0x20); - m_mjsikaku_scrolly = 0; // reset because crystalg/crystal2 don't write to this register + m_scrolly = 0; // reset because crystalg/crystal2 don't write to this register + m_screen_refresh = 1; + + save_pointer(NAME(m_videoram), 512 * 256); + save_pointer(NAME(m_clut), 0x20); + save_item(NAME(m_scrolly)); + save_item(NAME(m_blitter_destx)); + save_item(NAME(m_blitter_desty)); + save_item(NAME(m_blitter_sizex)); + save_item(NAME(m_blitter_sizey)); + save_item(NAME(m_blitter_direction_x)); + save_item(NAME(m_blitter_direction_y)); + save_item(NAME(m_blitter_src_addr)); + save_item(NAME(m_gfxrom)); + save_item(NAME(m_dispflag)); + save_item(NAME(m_gfxflag2)); + save_item(NAME(m_gfxflag3)); + save_item(NAME(m_flipscreen)); + save_item(NAME(m_flipscreen_old)); + + machine().save().register_postload(save_prepost_delegate(FUNC(nbmj8688_state::postload), this)); +} + +void nbmj8688_state::postload() +{ + m_screen_refresh = 1; } VIDEO_START_MEMBER(nbmj8688_state,mbmj8688_8bit) { - m_mjsikaku_gfxmode = GFXTYPE_8BIT; + m_gfxmode = GFXTYPE_8BIT; common_video_start(); } VIDEO_START_MEMBER(nbmj8688_state,mbmj8688_hybrid_12bit) { - m_mjsikaku_gfxmode = GFXTYPE_HYBRID_12BIT; + m_gfxmode = GFXTYPE_HYBRID_12BIT; common_video_start(); } VIDEO_START_MEMBER(nbmj8688_state,mbmj8688_pure_12bit) { - m_mjsikaku_gfxmode = GFXTYPE_PURE_12BIT; + m_gfxmode = GFXTYPE_PURE_12BIT; common_video_start(); } VIDEO_START_MEMBER(nbmj8688_state,mbmj8688_hybrid_16bit) { - m_mjsikaku_gfxmode = GFXTYPE_HYBRID_16BIT; + m_gfxmode = GFXTYPE_HYBRID_16BIT; common_video_start(); } VIDEO_START_MEMBER(nbmj8688_state,mbmj8688_pure_16bit) { - m_mjsikaku_gfxmode = GFXTYPE_PURE_16BIT; + m_gfxmode = GFXTYPE_PURE_16BIT; common_video_start(); } VIDEO_START_MEMBER(nbmj8688_state,mbmj8688_pure_16bit_LCD) { - m_mjsikaku_gfxmode = GFXTYPE_PURE_16BIT; + m_gfxmode = GFXTYPE_PURE_16BIT; common_video_start(); } -WRITE8_MEMBER(nbmj8688_state::nbmj8688_HD61830B_both_instr_w) +WRITE8_MEMBER(nbmj8688_state::HD61830B_both_instr_w) { m_lcdc0->control_w(space, offset, data); m_lcdc1->control_w(space, offset, data); } -WRITE8_MEMBER(nbmj8688_state::nbmj8688_HD61830B_both_data_w) +WRITE8_MEMBER(nbmj8688_state::HD61830B_both_data_w) { m_lcdc0->data_w(space, offset, data); m_lcdc1->data_w(space, offset, data); @@ -609,7 +636,7 @@ WRITE8_MEMBER(nbmj8688_state::nbmj8688_HD61830B_both_data_w) ******************************************************************************/ -UINT32 nbmj8688_state::screen_update_mbmj8688(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 nbmj8688_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x, y; @@ -618,9 +645,9 @@ if(machine().input().code_pressed_once(KEYCODE_T)) // } - if (m_mjsikaku_screen_refresh) + if (m_screen_refresh) { - m_mjsikaku_screen_refresh = 0; + m_screen_refresh = 0; for (y = 0; y < 256; y++) { for (x = 0; x < 512; x++) @@ -630,14 +657,14 @@ if(machine().input().code_pressed_once(KEYCODE_T)) } } -// if (m_mjsikaku_dispflag) +// if (m_dispflag) { int scrolly; - if (m_mjsikaku_flipscreen) scrolly = m_mjsikaku_scrolly; - else scrolly = (-m_mjsikaku_scrolly) & 0xff; + if (m_flipscreen) scrolly = m_scrolly; + else scrolly = (-m_scrolly) & 0xff; - copybitmap(bitmap, *m_mjsikaku_tmpbitmap, 0, 0, 0, scrolly, cliprect); - copybitmap(bitmap, *m_mjsikaku_tmpbitmap, 0, 0, 0, scrolly - 256, cliprect); + copybitmap(bitmap, *m_tmpbitmap, 0, 0, 0, scrolly, cliprect); + copybitmap(bitmap, *m_tmpbitmap, 0, 0, 0, scrolly - 256, cliprect); } // else // bitmap.fill(0); diff --git a/src/mame/video/pitnrun.c b/src/mame/video/pitnrun.c index 078e177b3aa..62f5c82a3d8 100644 --- a/src/mame/video/pitnrun.c +++ b/src/mame/video/pitnrun.c @@ -163,7 +163,7 @@ void pitnrun_state::video_start() m_tmp_bitmap[2] = auto_bitmap_ind16_alloc(machine(),128,128); m_tmp_bitmap[3] = auto_bitmap_ind16_alloc(machine(),128,128); spotlights(); - + save_item(NAME(m_h_heed)); save_item(NAME(m_v_heed)); save_item(NAME(m_ha)); diff --git a/src/mame/video/quizdna.c b/src/mame/video/quizdna.c index dff8198bb49..fe48799e159 100644 --- a/src/mame/video/quizdna.c +++ b/src/mame/video/quizdna.c @@ -58,7 +58,7 @@ void quizdna_state::video_start() m_fg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(quizdna_state::get_fg_tile_info),this),TILEMAP_SCAN_ROWS,16,8,32,32 ); m_fg_tilemap->set_transparent_pen(0 ); - + save_pointer(NAME(m_bg_ram), 0x2000); save_pointer(NAME(m_fg_ram), 0x1000); save_item(NAME(m_bg_xscroll)); diff --git a/src/mame/video/sauro.c b/src/mame/video/sauro.c index a0951820837..262e7536ba7 100644 --- a/src/mame/video/sauro.c +++ b/src/mame/video/sauro.c @@ -87,7 +87,7 @@ VIDEO_START_MEMBER(sauro_state,sauro) m_fg_tilemap->set_transparent_pen(0); m_palette_bank = 0; - + save_item(NAME(m_palette_bank)); } diff --git a/src/mame/video/sf.c b/src/mame/video/sf.c index 4624af83c4b..2cbe1459ff2 100644 --- a/src/mame/video/sf.c +++ b/src/mame/video/sf.c @@ -66,25 +66,25 @@ void sf_state::video_start() ***************************************************************************/ -WRITE16_MEMBER(sf_state::sf_videoram_w) +WRITE16_MEMBER(sf_state::videoram_w) { COMBINE_DATA(&m_videoram[offset]); m_tx_tilemap->mark_tile_dirty(offset); } -WRITE16_MEMBER(sf_state::sf_bg_scroll_w) +WRITE16_MEMBER(sf_state::bg_scroll_w) { COMBINE_DATA(&m_bgscroll); m_bg_tilemap->set_scrollx(0, m_bgscroll); } -WRITE16_MEMBER(sf_state::sf_fg_scroll_w) +WRITE16_MEMBER(sf_state::fg_scroll_w) { COMBINE_DATA(&m_fgscroll); m_fg_tilemap->set_scrollx(0, m_fgscroll); } -WRITE16_MEMBER(sf_state::sf_gfxctrl_w) +WRITE16_MEMBER(sf_state::gfxctrl_w) { /* b0 = reset, or maybe "set anyway" */ /* b1 = pulsed when control6.b6==0 until it's 1 */ @@ -97,7 +97,7 @@ WRITE16_MEMBER(sf_state::sf_gfxctrl_w) if (ACCESSING_BITS_0_7) { - m_sf_active = data & 0xff; + m_active = data & 0xff; flip_screen_set(data & 0x04); m_tx_tilemap->enable(data & 0x08); m_bg_tilemap->enable(data & 0x20); @@ -113,7 +113,7 @@ WRITE16_MEMBER(sf_state::sf_gfxctrl_w) ***************************************************************************/ -inline int sf_state::sf_invert( int nb ) +inline int sf_state::invert( int nb ) { static const int delta[4] = {0x00, 0x18, 0x18, 0x00}; return nb ^ delta[(nb >> 3) & 3]; @@ -163,25 +163,25 @@ void sf_state::draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ) m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, - sf_invert(c1), + invert(c1), color, flipx,flipy, sx,sy, 15); m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, - sf_invert(c2), + invert(c2), color, flipx,flipy, sx+16,sy, 15); m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, - sf_invert(c3), + invert(c3), color, flipx,flipy, sx,sy+16, 15); m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, - sf_invert(c4), + invert(c4), color, flipx,flipy, sx+16,sy+16, 15); @@ -198,7 +198,7 @@ void sf_state::draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ) m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, - sf_invert(c), + invert(c), color, flipx,flipy, sx,sy, 15); @@ -207,16 +207,16 @@ void sf_state::draw_sprites( bitmap_ind16 &bitmap,const rectangle &cliprect ) } -UINT32 sf_state::screen_update_sf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 sf_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - if (m_sf_active & 0x20) + if (m_active & 0x20) m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); else bitmap.fill(0, cliprect); m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); - if (m_sf_active & 0x80) + if (m_active & 0x80) draw_sprites(bitmap, cliprect); m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0); diff --git a/src/mame/video/shangha3.c b/src/mame/video/shangha3.c index 8f02aaac761..a54b5771a9d 100644 --- a/src/mame/video/shangha3.c +++ b/src/mame/video/shangha3.c @@ -21,12 +21,12 @@ The chip addresses 0x100000 bytes of memory, containing both the command list, tilemap, and spare RAM to be used by the CPU. The command list starts at a variable point in memory, set by -shangha3_gfxlist_addr_w(), and always ends at 0x0fffff. +gfxlist_addr_w(), and always ends at 0x0fffff. Large sprites refer to a single tilemap starting at 0x000000, the command list contains the coordinates of the place in the tilemap to pick data from. -The commands list is processed when shangha3_blitter_go_w() is written to, so +The commands list is processed when blitter_go_w() is written to, so it is not processed automatically every frame. The commands have a fixed length of 16 words. The format is as follows: @@ -80,11 +80,14 @@ void shangha3_state::video_start() for (i = 0;i < 128;i++) m_palette->shadow_table()[i] = i+128; } + + save_item(NAME(m_gfxlist_addr)); + save_item(NAME(m_rawbitmap)); } -WRITE16_MEMBER(shangha3_state::shangha3_flipscreen_w) +WRITE16_MEMBER(shangha3_state::flipscreen_w) { if (ACCESSING_BITS_0_7) { @@ -95,13 +98,13 @@ WRITE16_MEMBER(shangha3_state::shangha3_flipscreen_w) } } -WRITE16_MEMBER(shangha3_state::shangha3_gfxlist_addr_w) +WRITE16_MEMBER(shangha3_state::gfxlist_addr_w) { COMBINE_DATA(&m_gfxlist_addr); } -WRITE16_MEMBER(shangha3_state::shangha3_blitter_go_w) +WRITE16_MEMBER(shangha3_state::blitter_go_w) { UINT16 *shangha3_ram = m_ram; bitmap_ind16 &rawbitmap = m_rawbitmap; @@ -254,7 +257,7 @@ else } -UINT32 shangha3_state::screen_update_shangha3(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 shangha3_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { copybitmap(bitmap, m_rawbitmap, 0, 0, 0, 0, cliprect); return 0; diff --git a/src/mame/video/shaolins.c b/src/mame/video/shaolins.c index afe34f881f7..32d9785e4f5 100644 --- a/src/mame/video/shaolins.c +++ b/src/mame/video/shaolins.c @@ -140,7 +140,7 @@ void shaolins_state::video_start() 8, 8, 32, 32); m_bg_tilemap->set_scroll_cols(32); - + save_item(NAME(m_palettebank)); save_item(NAME(m_nmi_enable)); } diff --git a/src/mame/video/toobin.c b/src/mame/video/toobin.c index 5b1328a2c67..597b11add20 100644 --- a/src/mame/video/toobin.c +++ b/src/mame/video/toobin.c @@ -94,7 +94,7 @@ VIDEO_START_MEMBER(toobin_state,toobin) * *************************************/ -WRITE16_MEMBER( toobin_state::toobin_paletteram_w ) +WRITE16_MEMBER( toobin_state::paletteram_w ) { int newword; @@ -119,7 +119,7 @@ WRITE16_MEMBER( toobin_state::toobin_paletteram_w ) } -WRITE16_MEMBER( toobin_state::toobin_intensity_w ) +WRITE16_MEMBER( toobin_state::intensity_w ) { int i; @@ -141,7 +141,7 @@ WRITE16_MEMBER( toobin_state::toobin_intensity_w ) * *************************************/ -WRITE16_MEMBER( toobin_state::toobin_xscroll_w ) +WRITE16_MEMBER( toobin_state::xscroll_w ) { UINT16 oldscroll = *m_xscroll; UINT16 newscroll = oldscroll; @@ -160,7 +160,7 @@ WRITE16_MEMBER( toobin_state::toobin_xscroll_w ) } -WRITE16_MEMBER( toobin_state::toobin_yscroll_w ) +WRITE16_MEMBER( toobin_state::yscroll_w ) { UINT16 oldscroll = *m_yscroll; UINT16 newscroll = oldscroll; @@ -186,7 +186,7 @@ WRITE16_MEMBER( toobin_state::toobin_yscroll_w ) * *************************************/ -WRITE16_MEMBER( toobin_state::toobin_slip_w ) +WRITE16_MEMBER( toobin_state::slip_w ) { UINT16 oldslip = m_mob->slipram(offset); UINT16 newslip = oldslip; @@ -208,7 +208,7 @@ WRITE16_MEMBER( toobin_state::toobin_slip_w ) * *************************************/ -UINT32 toobin_state::screen_update_toobin(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +UINT32 toobin_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { // start drawing m_mob->draw_async(cliprect); diff --git a/src/mame/video/truco.c b/src/mame/video/truco.c index 4f6ae6a108d..45cddea3453 100644 --- a/src/mame/video/truco.c +++ b/src/mame/video/truco.c @@ -31,7 +31,7 @@ PALETTE_INIT_MEMBER(truco_state, truco) } } -UINT32 truco_state::screen_update_truco(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 truco_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { UINT8 *videoram = m_videoram; UINT8 *vid = videoram; diff --git a/src/mame/video/usgames.c b/src/mame/video/usgames.c index cb48de94f5c..f0258209b07 100644 --- a/src/mame/video/usgames.c +++ b/src/mame/video/usgames.c @@ -31,37 +31,35 @@ PALETTE_INIT_MEMBER(usgames_state, usgames) -TILE_GET_INFO_MEMBER(usgames_state::get_usgames_tile_info) +TILE_GET_INFO_MEMBER(usgames_state::get_tile_info) { - int tileno, colour; - - tileno = m_videoram[tile_index*2]; - colour = m_videoram[tile_index*2+1]; + int tileno = m_videoram[tile_index*2]; + int colour = m_videoram[tile_index*2+1]; SET_TILE_INFO_MEMBER(0,tileno,colour,0); } void usgames_state::video_start() { - m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(usgames_state::get_usgames_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32); + m_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(usgames_state::get_tile_info),this),TILEMAP_SCAN_ROWS, 8, 8,64,32); m_gfxdecode->gfx(0)->set_source(m_charram); } -WRITE8_MEMBER(usgames_state::usgames_videoram_w) +WRITE8_MEMBER(usgames_state::videoram_w) { m_videoram[offset] = data; m_tilemap->mark_tile_dirty(offset/2); } -WRITE8_MEMBER(usgames_state::usgames_charram_w) +WRITE8_MEMBER(usgames_state::charram_w) { m_charram[offset] = data; m_gfxdecode->gfx(0)->mark_dirty(offset/8); } -UINT32 usgames_state::screen_update_usgames(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 usgames_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_tilemap->draw(screen, bitmap, cliprect, 0,0); return 0; diff --git a/src/mame/video/vertigo.c b/src/mame/video/vertigo.c index 647d8a4b182..5813681b013 100644 --- a/src/mame/video/vertigo.c +++ b/src/mame/video/vertigo.c @@ -118,36 +118,36 @@ enum { void vertigo_state::vertigo_vproc_init() { - state_save_register_item_array(machine(), "vector_proc", NULL, 0, m_vs.sram); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vs.ramlatch); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vs.rom_adr); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vs.pc); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vs.ret); - - state_save_register_item_array(machine(), "vector_proc", NULL, 0, m_bsp.ram); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_bsp.d); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_bsp.q); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_bsp.f); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_bsp.y); - - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.sreg); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.l1); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.l2); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.c_v); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.c_h); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.c_l); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.adder_s); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.adder_a); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.color); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.intensity); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.brez); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.vfin); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.hud1); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.hud2); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.vud1); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.vud2); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.hc1); - state_save_register_item(machine(), "vector_proc", NULL, 0, m_vgen.ven); + save_item(m_vs.sram, "vector_proc/m_vs.sram"); + save_item(m_vs.ramlatch, "vector_proc/m_vs.ramlatch"); + save_item(m_vs.rom_adr, "vector_proc/m_vs.rom_adr"); + save_item(m_vs.pc, "vector_proc/m_vs.pc"); + save_item(m_vs.ret, "vector_proc/m_vs.ret"); + + save_item(m_bsp.ram, "vector_proc/m_bsp.ram"); + save_item(m_bsp.d, "vector_proc/m_bsp.d"); + save_item(m_bsp.q, "vector_proc/m_bsp.q"); + save_item(m_bsp.f, "vector_proc/m_bsp.f"); + save_item(m_bsp.y, "vector_proc/m_bsp.y"); + + save_item(m_vgen.sreg, "vector_proc/m_vgen.sreg"); + save_item(m_vgen.l1, "vector_proc/m_vgen.l1"); + save_item(m_vgen.l2, "vector_proc/m_vgen.l2"); + save_item(m_vgen.c_v, "vector_proc/m_vgen.c_v"); + save_item(m_vgen.c_h, "vector_proc/m_vgen.c_h"); + save_item(m_vgen.c_l, "vector_proc/m_vgen.c_l"); + save_item(m_vgen.adder_s, "vector_proc/m_vgen.adder_s"); + save_item(m_vgen.adder_a, "vector_proc/m_vgen.adder_a"); + save_item(m_vgen.color, "vector_proc/m_vgen.color"); + save_item(m_vgen.intensity, "vector_proc/m_vgen.intensity"); + save_item(m_vgen.brez, "vector_proc/m_vgen.brez"); + save_item(m_vgen.vfin, "vector_proc/m_vgen.vfin"); + save_item(m_vgen.hud1, "vector_proc/m_vgen.hud1"); + save_item(m_vgen.hud2, "vector_proc/m_vgen.hud2"); + save_item(m_vgen.vud1, "vector_proc/m_vgen.vud1"); + save_item(m_vgen.vud2, "vector_proc/m_vgen.vud2"); + save_item(m_vgen.hc1, "vector_proc/m_vgen.hc1"); + save_item(m_vgen.ven, "vector_proc/m_vgen.ven"); } diff --git a/src/mame/video/videopin.c b/src/mame/video/videopin.c index 625d0f96f4a..ec508b9d18e 100644 --- a/src/mame/video/videopin.c +++ b/src/mame/video/videopin.c @@ -28,10 +28,13 @@ TILE_GET_INFO_MEMBER(videopin_state::get_tile_info) void videopin_state::video_start() { m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(videopin_state::get_tile_info),this), tilemap_mapper_delegate(FUNC(videopin_state::get_memory_offset),this), 8, 8, 48, 32); + + save_item(NAME(m_ball_x)); + save_item(NAME(m_ball_y)); } -UINT32 videopin_state::screen_update_videopin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +UINT32 videopin_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int col; int row; @@ -84,14 +87,14 @@ UINT32 videopin_state::screen_update_videopin(screen_device &screen, bitmap_ind1 } -WRITE8_MEMBER(videopin_state::videopin_ball_w) +WRITE8_MEMBER(videopin_state::ball_w) { m_ball_x = data & 15; m_ball_y = data >> 4; } -WRITE8_MEMBER(videopin_state::videopin_video_ram_w) +WRITE8_MEMBER(videopin_state::video_ram_w) { m_video_ram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); diff --git a/src/mame/video/vigilant.c b/src/mame/video/vigilant.c index 6930e7f06cc..f0f6c9c44e8 100644 --- a/src/mame/video/vigilant.c +++ b/src/mame/video/vigilant.c @@ -1,6 +1,6 @@ /*************************************************************************** - video.c + vigilant.c Functions to emulate the video hardware of the machine. @@ -20,8 +20,22 @@ static const rectangle bottomvisiblearea(16*8, 48*8-1, 6*8, 32*8-1); void vigilant_state::video_start() { m_bg_bitmap = auto_bitmap_ind16_alloc(machine(),512*4,256); + + save_item(NAME(m_horiz_scroll_low)); + save_item(NAME(m_horiz_scroll_high)); + save_item(NAME(m_rear_horiz_scroll_low)); + save_item(NAME(m_rear_horiz_scroll_high)); + save_item(NAME(m_rear_color)); + save_item(NAME(m_rear_disable)); + + m_rear_refresh = 1; + machine().save().register_postload(save_prepost_delegate(FUNC(vigilant_state::vigilant_postload), this)); } +void vigilant_state::vigilant_postload() +{ + m_rear_refresh = 1; +} void vigilant_state::video_reset() { @@ -31,7 +45,6 @@ void vigilant_state::video_reset() m_rear_horiz_scroll_high = 0; m_rear_color = 0; m_rear_disable = 1; - m_rear_refresh = 1; } @@ -39,7 +52,6 @@ void vigilant_state::video_reset() update_background There are three background ROMs, each one contains a 512x256 picture. - Redraw them if the palette changes. **************************************************************************/ void vigilant_state::update_background() { @@ -69,7 +81,7 @@ void vigilant_state::update_background() } /*************************************************************************** - vigilant_paletteram_w + paletteram_w There are two palette chips, each one is labelled "KNA91H014". One is used for the sprites, one is used for the two background layers. @@ -84,7 +96,7 @@ void vigilant_state::update_background() These are used to index a color triplet of RGB. The triplet is read from RAM, and output to R0-R4, G0-G4, and B0-B4. **************************************************************************/ -WRITE8_MEMBER(vigilant_state::vigilant_paletteram_w) +WRITE8_MEMBER(vigilant_state::paletteram_w) { int bank,r,g,b; @@ -160,18 +172,16 @@ WRITE8_MEMBER(vigilant_state::vigilant_rear_color_w) void vigilant_state::draw_foreground(bitmap_ind16 &bitmap, const rectangle &cliprect, int priority, int opaque ) { - UINT8 *videoram = m_videoram; - int offs; int scroll = -(m_horiz_scroll_low + m_horiz_scroll_high); - for (offs = 0; offs < 0x1000; offs += 2) + for (int offs = 0; offs < 0x1000; offs += 2) { int sy = 8 * ((offs/2) / 64); int sx = 8 * ((offs/2) % 64); - int attributes = videoram[offs+1]; + int attributes = m_videoram[offs+1]; int color = attributes & 0x0F; - int tile_number = videoram[offs] | ((attributes & 0xF0) << 4); + int tile_number = m_videoram[offs] | ((attributes & 0xF0) << 4); if (priority) /* foreground */ { @@ -223,20 +233,17 @@ void vigilant_state::draw_background(bitmap_ind16 &bitmap, const rectangle &clip void vigilant_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect) { - UINT8 *spriteram = m_spriteram; - int offs; - - for (offs = 0;offs < m_spriteram.bytes();offs += 8) + for (int offs = 0;offs < m_spriteram.bytes();offs += 8) { int code,color,sx,sy,flipx,flipy,h,y; - code = spriteram[offs+4] | ((spriteram[offs+5] & 0x0f) << 8); - color = spriteram[offs+0] & 0x0f; - sx = (spriteram[offs+6] | ((spriteram[offs+7] & 0x01) << 8)); - sy = 256+128 - (spriteram[offs+2] | ((spriteram[offs+3] & 0x01) << 8)); - flipx = spriteram[offs+5] & 0x40; - flipy = spriteram[offs+5] & 0x80; - h = 1 << ((spriteram[offs+5] & 0x30) >> 4); + code = m_spriteram[offs+4] | ((m_spriteram[offs+5] & 0x0f) << 8); + color = m_spriteram[offs+0] & 0x0f; + sx = (m_spriteram[offs+6] | ((m_spriteram[offs+7] & 0x01) << 8)); + sy = 256+128 - (m_spriteram[offs+2] | ((m_spriteram[offs+3] & 0x01) << 8)); + flipx = m_spriteram[offs+5] & 0x40; + flipy = m_spriteram[offs+5] & 0x80; + h = 1 << ((m_spriteram[offs+5] & 0x30) >> 4); sy -= 16 * h; code &= ~(h - 1); @@ -259,16 +266,13 @@ void vigilant_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect UINT32 vigilant_state::screen_update_kikcubic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT8 *videoram = m_videoram; - int offs; - - for (offs = 0; offs < 0x1000; offs += 2) + for (int offs = 0; offs < 0x1000; offs += 2) { int sy = 8 * ((offs/2) / 64); int sx = 8 * ((offs/2) % 64); - int attributes = videoram[offs+1]; + int attributes = m_videoram[offs+1]; int color = (attributes & 0xF0) >> 4; - int tile_number = videoram[offs] | ((attributes & 0x0F) << 8); + int tile_number = m_videoram[offs] | ((attributes & 0x0F) << 8); m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, tile_number, @@ -283,10 +287,8 @@ UINT32 vigilant_state::screen_update_kikcubic(screen_device &screen, bitmap_ind1 UINT32 vigilant_state::screen_update_vigilant(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int i; - /* copy the background palette */ - for (i = 0;i < 16;i++) + for (int i = 0;i < 16;i++) { int r,g,b; diff --git a/src/mess/audio/lynx.c b/src/mess/audio/lynx.c index 6a3d0e624dc..2db121308c0 100644 --- a/src/mess/audio/lynx.c +++ b/src/mess/audio/lynx.c @@ -139,19 +139,19 @@ void lynx_sound_device::register_save() save_item(NAME(m_master_enable)); for (int chan = 0; chan < LYNX_AUDIO_CHANNELS; chan++) { - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.volume); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.feedback); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.output); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.shifter); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.bakup); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.control1); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.counter); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].reg.control2); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].attenuation); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].mask); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].shifter); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].ticks); - state_save_register_item(machine(), "Lynx sound", NULL, chan, m_audio[chan].count); + save_item(NAME(m_audio[chan].reg.volume), chan); + save_item(NAME(m_audio[chan].reg.feedback), chan); + save_item(NAME(m_audio[chan].reg.output), chan); + save_item(NAME(m_audio[chan].reg.shifter), chan); + save_item(NAME(m_audio[chan].reg.bakup), chan); + save_item(NAME(m_audio[chan].reg.control1), chan); + save_item(NAME(m_audio[chan].reg.counter), chan); + save_item(NAME(m_audio[chan].reg.control2), chan); + save_item(NAME(m_audio[chan].attenuation), chan); + save_item(NAME(m_audio[chan].mask), chan); + save_item(NAME(m_audio[chan].shifter), chan); + save_item(NAME(m_audio[chan].ticks), chan); + save_item(NAME(m_audio[chan].count), chan); } } diff --git a/src/mess/drivers/abc1600.c b/src/mess/drivers/abc1600.c index 2279a3019c1..f12862cc3e5 100644 --- a/src/mess/drivers/abc1600.c +++ b/src/mess/drivers/abc1600.c @@ -123,7 +123,7 @@ READ8_MEMBER( abc1600_state::bus_r ) // EXP data = m_bus0x->exp_r(); - logerror("%s EXP %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s EXP %02x: %02x\n", machine().describe_context(), cs, data); } else { @@ -167,7 +167,7 @@ READ8_MEMBER( abc1600_state::bus_r ) data = 0xfc | (m_csb & 0x03); } - logerror("%s RCSB %02x\n", machine().describe_context(), data); + if (LOG) logerror("%s RCSB %02x\n", machine().describe_context(), data); } } else @@ -188,7 +188,7 @@ READ8_MEMBER( abc1600_state::bus_r ) data &= m_bus2->inp_r(); } - logerror("%s INP %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s INP %02x: %02x\n", machine().describe_context(), cs, data); break; case STAT: @@ -203,7 +203,7 @@ READ8_MEMBER( abc1600_state::bus_r ) data &= m_bus2->stat_r(); } - logerror("%s STAT %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s STAT %02x: %02x\n", machine().describe_context(), cs, data); break; case OPS: @@ -218,11 +218,11 @@ READ8_MEMBER( abc1600_state::bus_r ) data &= m_bus2->ops_r(); } - logerror("%s OPS %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s OPS %02x: %02x\n", machine().describe_context(), cs, data); break; default: - logerror("%s Unmapped read from virtual I/O %06x\n", machine().describe_context(), offset); + if (LOG) logerror("%s Unmapped read from virtual I/O %06x\n", machine().describe_context(), offset); } } @@ -246,7 +246,7 @@ WRITE8_MEMBER( abc1600_state::bus_w ) switch ((offset >> 1) & 0x07) { case OUT: - logerror("%s OUT %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s OUT %02x: %02x\n", machine().describe_context(), cs, data); if (m_bus0) { @@ -261,7 +261,7 @@ WRITE8_MEMBER( abc1600_state::bus_w ) break; case C1: - logerror("%s C1 %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s C1 %02x: %02x\n", machine().describe_context(), cs, data); if (m_bus0) { @@ -276,7 +276,7 @@ WRITE8_MEMBER( abc1600_state::bus_w ) break; case C2: - logerror("%s C2 %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s C2 %02x: %02x\n", machine().describe_context(), cs, data); if (m_bus0) { @@ -291,7 +291,7 @@ WRITE8_MEMBER( abc1600_state::bus_w ) break; case C3: - logerror("%s C3 %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s C3 %02x: %02x\n", machine().describe_context(), cs, data); if (m_bus0) { @@ -306,7 +306,7 @@ WRITE8_MEMBER( abc1600_state::bus_w ) break; case C4: - logerror("%s C4 %02x: %02x\n", machine().describe_context(), cs, data); + if (LOG) logerror("%s C4 %02x: %02x\n", machine().describe_context(), cs, data); if (m_bus0) { @@ -321,7 +321,7 @@ WRITE8_MEMBER( abc1600_state::bus_w ) break; default: - logerror("%s Unmapped write %02x to virtual I/O %06x\n", machine().describe_context(), data, offset); + if (LOG) logerror("%s Unmapped write %02x to virtual I/O %06x\n", machine().describe_context(), data, offset); } } diff --git a/src/mess/drivers/abc80.c b/src/mess/drivers/abc80.c index c53e8bb1d23..686ae144b8d 100644 --- a/src/mess/drivers/abc80.c +++ b/src/mess/drivers/abc80.c @@ -394,8 +394,8 @@ WRITE8_MEMBER( abc80_state::kbd_w ) /* DEVICE_INPUT_DEFAULTS_START( abc830_slow ) - DEVICE_INPUT_DEFAULTS("SW1", 0x0f, 0x03) - DEVICE_INPUT_DEFAULTS("S1", 0x01, 0x01) + DEVICE_INPUT_DEFAULTS("SW1", 0x0f, 0x03) + DEVICE_INPUT_DEFAULTS("S1", 0x01, 0x01) DEVICE_INPUT_DEFAULTS_END */ @@ -555,7 +555,7 @@ static MACHINE_CONFIG_START( abc80, abc80_state ) MCFG_ABC80_KEYBOARD_KEYDOWN_CALLBACK(WRITELINE(abc80_state, keydown_w)) MCFG_ABCBUS_SLOT_ADD(ABCBUS_TAG, abc80_cards, "abcexp") - + MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL) MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0) MCFG_GENERIC_KEYBOARD_CB(WRITE8(abc80_state, kbd_w)) diff --git a/src/mess/drivers/advision.c b/src/mess/drivers/advision.c index 5ecef4b6934..148039c842c 100644 --- a/src/mess/drivers/advision.c +++ b/src/mess/drivers/advision.c @@ -42,14 +42,6 @@ static ADDRESS_MAP_START( io_map, AS_IO, 8, advision_state ) AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(vsync_r) ADDRESS_MAP_END -static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, advision_state ) - AM_RANGE(COP400_PORT_L, COP400_PORT_L) AM_READ(sound_cmd_r) - AM_RANGE(COP400_PORT_G, COP400_PORT_G) AM_WRITE(sound_g_w) - AM_RANGE(COP400_PORT_D, COP400_PORT_D) AM_WRITE(sound_d_w) - AM_RANGE(COP400_PORT_SIO, COP400_PORT_SIO) AM_NOP - AM_RANGE(COP400_PORT_SK, COP400_PORT_SK) AM_NOP -ADDRESS_MAP_END - /* Input Ports */ static INPUT_PORTS_START( advision ) @@ -74,7 +66,9 @@ static MACHINE_CONFIG_START( advision, advision_state ) MCFG_CPU_ADD(COP411_TAG, COP411, 52631*16) // COP411L-KCN/N MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_4, COP400_CKO_RAM_POWER_SUPPLY, COP400_MICROBUS_DISABLED) - MCFG_CPU_IO_MAP(sound_io_map) + MCFG_COP400_READ_L_CB(READ8(advision_state, sound_cmd_r)) + MCFG_COP400_WRITE_G_CB(WRITE8(advision_state, sound_g_w)) + MCFG_COP400_WRITE_D_CB(WRITE8(advision_state, sound_d_w)) /* video hardware */ MCFG_SCREEN_ADD(SCREEN_TAG, RASTER) @@ -113,5 +107,5 @@ ROM_END /* Game Driver */ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -CONS( 1982, advision, 0, 0, advision, advision, driver_device, 0, "Entex Industries Inc", "Adventure Vision", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ +CONS( 1982, advision, 0, 0, advision, advision, driver_device, 0, "Entex", "Adventure Vision", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) diff --git a/src/mess/drivers/aim65.c b/src/mess/drivers/aim65.c index 951c0204792..933b0b642ca 100644 --- a/src/mess/drivers/aim65.c +++ b/src/mess/drivers/aim65.c @@ -156,8 +156,8 @@ int aim65_state::load_cart(device_image_interface &image, generic_slot_device *s if (image.software_entry() != NULL && image.get_software_region(slot_tag) == NULL) { - astring errmsg; - errmsg.printf("Attempted to load file with wrong extension\nSocket '%s' only accepts files with '.%s' extension", + std::string errmsg; + strprintf(errmsg,"Attempted to load file with wrong extension\nSocket '%s' only accepts files with '.%s' extension", slot_tag, slot_tag); image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.c_str()); return IMAGE_INIT_FAIL; diff --git a/src/mess/drivers/bebox.c b/src/mess/drivers/bebox.c index 39b0aa99499..85670758480 100644 --- a/src/mess/drivers/bebox.c +++ b/src/mess/drivers/bebox.c @@ -11,7 +11,7 @@ #include "includes/bebox.h" /* Components */ -#include "video/pc_vga.h" +#include "video/clgd542x.h" #include "bus/lpci/cirrus.h" #include "cpu/powerpc/ppc.h" #include "sound/3812intf.h" diff --git a/src/mess/drivers/beta.c b/src/mess/drivers/beta.c index 0c410445a62..984d266496b 100644 --- a/src/mess/drivers/beta.c +++ b/src/mess/drivers/beta.c @@ -316,8 +316,8 @@ void beta_state::machine_start() memset(&m_eprom_rom[0], 0xff, 0x800); else { - astring region_tag; - memcpy(&m_eprom_rom[0], memregion(region_tag.cpy(m_eprom->tag()).cat(GENERIC_ROM_REGION_TAG).c_str())->base(), 0x800); + std::string region_tag; + memcpy(&m_eprom_rom[0], memregion(region_tag.assign(m_eprom->tag()).append(GENERIC_ROM_REGION_TAG).c_str())->base(), 0x800); } // state saving diff --git a/src/mess/drivers/c900.c b/src/mess/drivers/c900.c index ebcd4e13601..68a6e3e9896 100644 --- a/src/mess/drivers/c900.c +++ b/src/mess/drivers/c900.c @@ -13,6 +13,8 @@ The FDC is an intelligent device that communicates with the main board via the MMU. It has a 6508 CPU. + Disk drive is a Matsushita JA-560-012 + *******************************************************************************************/ diff --git a/src/mess/drivers/cc40.c b/src/mess/drivers/cc40.c index b17d13d023f..b5cfcf4cad1 100644 --- a/src/mess/drivers/cc40.c +++ b/src/mess/drivers/cc40.c @@ -545,8 +545,8 @@ void cc40_state::postload() void cc40_state::machine_start() { // init - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); membank("sysbank")->configure_entries(0, 4, memregion("system")->base(), 0x2000); if (m_cart_rom) diff --git a/src/mess/drivers/elecbowl.c b/src/mess/drivers/elecbowl.c index 8eb92579f80..9f506afccce 100644 --- a/src/mess/drivers/elecbowl.c +++ b/src/mess/drivers/elecbowl.c @@ -115,6 +115,7 @@ WRITE16_MEMBER(elecbowl_state::write_o) READ8_MEMBER(elecbowl_state::read_k) { + // K: multiplexed inputs return read_inputs(4); } diff --git a/src/mess/drivers/fidelz80.c b/src/mess/drivers/fidelz80.c index 4b26ce0b4a8..32acdd01919 100644 --- a/src/mess/drivers/fidelz80.c +++ b/src/mess/drivers/fidelz80.c @@ -898,7 +898,7 @@ READ8_MEMBER(fidelz80_state::unknown_r) return 0; } -READ8_MEMBER(fidelz80_state::rand_r) +READ8_MEMBER(fidelz80_state::unknown2_r) { return machine().rand(); } @@ -1040,7 +1040,7 @@ static ADDRESS_MAP_START(bridgec_mcu_io, AS_IO, 8, fidelz80_state) // related to the card scanner, probably clock and data optical AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(unknown_r) - AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(rand_r) + AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(unknown2_r) ADDRESS_MAP_END /****************************************************************************** diff --git a/src/mess/drivers/gameking.c b/src/mess/drivers/gameking.c index 4a7ac0bb425..9a1092d83ae 100644 --- a/src/mess/drivers/gameking.c +++ b/src/mess/drivers/gameking.c @@ -118,8 +118,8 @@ DEVICE_IMAGE_LOAD_MEMBER( gameking_state, gameking_cart ) void gameking_state::machine_start() { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (!m_cart_rom) { diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c index f1ec69c97ab..da9f891ba8a 100644 --- a/src/mess/drivers/gba.c +++ b/src/mess/drivers/gba.c @@ -161,7 +161,7 @@ void gba_state::dma_exec(FPTR ch) else { // if (dst >= 0x6000000 && dst <= 0x6017fff) -// printf("DMA exec: ch %d from %08x to %08x, mode %04x, count %04x (%s)\n", (int)ch, src, dst, ctrl, cnt, ((ctrl>>10) & 1) ? "32" : "16"); +// printf("DMA exec: ch %d from %08x to %08x, mode %04x, count %04x (%s)\n", (int)ch, src, dst, ctrl, cnt, ((ctrl>>10) & 1) ? "32" : "16"); } for (int i = 0; i < cnt; i++) @@ -1559,7 +1559,7 @@ WRITE32_MEMBER(gba_state::gba_io_w) ch = offset / 3; -// printf("%08x: DMA(%d): %x to reg %d (mask %08x)\n", space.device().safe_pc(), ch, data, offset%3, ~mem_mask); +// printf("%08x: DMA(%d): %x to reg %d (mask %08x)\n", space.device().safe_pc(), ch, data, offset%3, ~mem_mask); if (((offset % 3) == 2) && ((~mem_mask & 0xffff0000) == 0)) { @@ -2117,8 +2117,8 @@ void gba_state::machine_start() m_maincpu->space(AS_PROGRAM).install_read_bank(0x0a000000, 0x0bffffff, 0, 0, "rom2"); m_maincpu->space(AS_PROGRAM).install_read_bank(0x0c000000, 0x0cffffff, 0, 0, "rom3"); - astring region_tag; - memory_region *cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GBASLOT_ROM_REGION_TAG).c_str()); + std::string region_tag; + memory_region *cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GBASLOT_ROM_REGION_TAG).c_str()); // install ROM accesses membank("rom1")->set_base(cart_rom->base()); diff --git a/src/mess/drivers/hh_cop400.c b/src/mess/drivers/hh_cop400.c new file mode 100644 index 00000000000..67fa4c0d6ba --- /dev/null +++ b/src/mess/drivers/hh_cop400.c @@ -0,0 +1,504 @@ +// license:BSD-3-Clause +// copyright-holders:hap, Sean Riddle +/*************************************************************************** + + National Semiconductor COP400 MCU handhelds or other simple devices, + mostly LED electronic games/toys. + +***************************************************************************/ + +#include "emu.h" +#include "cpu/cop400/cop400.h" +#include "sound/speaker.h" + +// internal artwork +#include "einvaderc.lh" // test-layout(but still playable) +#include "lightfgt.lh" // clickable + +//#include "hh_cop400_test.lh" // common test-layout - use external artwork + + +class hh_cop400_state : public driver_device +{ +public: + hh_cop400_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_inp_matrix(*this, "IN"), + m_speaker(*this, "speaker"), + m_display_wait(33), + m_display_maxy(1), + m_display_maxx(0) + { } + + // devices + required_device<cpu_device> m_maincpu; + optional_ioport_array<5> m_inp_matrix; // max 5 + optional_device<speaker_sound_device> m_speaker; + + // misc common + UINT8 m_l; // MCU port L write data + UINT8 m_g; // MCU port G write data + UINT8 m_d; // MCU port D write data + int m_so; // MCU SO line state + int m_sk; // MCU SK line state + UINT16 m_inp_mux; // multiplexed inputs mask + + UINT8 read_inputs(int columns); + + // display common + int m_display_wait; // led/lamp off-delay in microseconds (default 33ms) + int m_display_maxy; // display matrix number of rows + int m_display_maxx; // display matrix number of columns (max 31 for now) + + UINT32 m_display_state[0x20]; // display matrix rows data (last bit is used for always-on) + UINT16 m_display_segmask[0x20]; // if not 0, display matrix row is a digit, mask indicates connected segments + UINT32 m_display_cache[0x20]; // (internal use) + UINT8 m_display_decay[0x20][0x20]; // (internal use) + + TIMER_DEVICE_CALLBACK_MEMBER(display_decay_tick); + void display_update(); + void set_display_size(int maxx, int maxy); + void display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety); + +protected: + virtual void machine_start(); + virtual void machine_reset(); +}; + + +// machine start/reset + +void hh_cop400_state::machine_start() +{ + // zerofill + memset(m_display_state, 0, sizeof(m_display_state)); + memset(m_display_cache, ~0, sizeof(m_display_cache)); + memset(m_display_decay, 0, sizeof(m_display_decay)); + memset(m_display_segmask, 0, sizeof(m_display_segmask)); + + m_l = 0; + m_g = 0; + m_d = 0; + m_so = 0; + m_sk = 0; + m_inp_mux = 0; + + // register for savestates + save_item(NAME(m_display_maxy)); + save_item(NAME(m_display_maxx)); + save_item(NAME(m_display_wait)); + + save_item(NAME(m_display_state)); + /* save_item(NAME(m_display_cache)); */ // don't save! + save_item(NAME(m_display_decay)); + save_item(NAME(m_display_segmask)); + + save_item(NAME(m_l)); + save_item(NAME(m_g)); + save_item(NAME(m_d)); + save_item(NAME(m_so)); + save_item(NAME(m_sk)); + save_item(NAME(m_inp_mux)); +} + +void hh_cop400_state::machine_reset() +{ +} + + + +/*************************************************************************** + + Helper Functions + +***************************************************************************/ + +// The device may strobe the outputs very fast, it is unnoticeable to the user. +// To prevent flickering here, we need to simulate a decay. + +void hh_cop400_state::display_update() +{ + UINT32 active_state[0x20]; + + for (int y = 0; y < m_display_maxy; y++) + { + active_state[y] = 0; + + for (int x = 0; x <= m_display_maxx; x++) + { + // turn on powered segments + if (m_display_state[y] >> x & 1) + m_display_decay[y][x] = m_display_wait; + + // determine active state + UINT32 ds = (m_display_decay[y][x] != 0) ? 1 : 0; + active_state[y] |= (ds << x); + } + } + + // on difference, send to output + for (int y = 0; y < m_display_maxy; y++) + if (m_display_cache[y] != active_state[y]) + { + if (m_display_segmask[y] != 0) + output_set_digit_value(y, active_state[y] & m_display_segmask[y]); + + const int mul = (m_display_maxx <= 10) ? 10 : 100; + for (int x = 0; x <= m_display_maxx; x++) + { + int state = active_state[y] >> x & 1; + char buf1[0x10]; // lampyx + char buf2[0x10]; // y.x + + if (x == m_display_maxx) + { + // always-on if selected + sprintf(buf1, "lamp%da", y); + sprintf(buf2, "%d.a", y); + } + else + { + sprintf(buf1, "lamp%d", y * mul + x); + sprintf(buf2, "%d.%d", y, x); + } + output_set_value(buf1, state); + output_set_value(buf2, state); + } + } + + memcpy(m_display_cache, active_state, sizeof(m_display_cache)); +} + +TIMER_DEVICE_CALLBACK_MEMBER(hh_cop400_state::display_decay_tick) +{ + // slowly turn off unpowered segments + for (int y = 0; y < m_display_maxy; y++) + for (int x = 0; x <= m_display_maxx; x++) + if (m_display_decay[y][x] != 0) + m_display_decay[y][x]--; + + display_update(); +} + +void hh_cop400_state::set_display_size(int maxx, int maxy) +{ + m_display_maxx = maxx; + m_display_maxy = maxy; +} + +void hh_cop400_state::display_matrix(int maxx, int maxy, UINT32 setx, UINT32 sety) +{ + set_display_size(maxx, maxy); + + // update current state + UINT32 mask = (1 << maxx) - 1; + for (int y = 0; y < maxy; y++) + m_display_state[y] = (sety >> y & 1) ? ((setx & mask) | (1 << maxx)) : 0; + + display_update(); +} + + +UINT8 hh_cop400_state::read_inputs(int columns) +{ + UINT8 ret = 0; + + // read selected input rows + for (int i = 0; i < columns; i++) + if (m_inp_mux >> i & 1) + ret |= m_inp_matrix[i]->read(); + + return ret; +} + + + +/*************************************************************************** + + Minidrivers (subclass, I/O, Inputs, Machine Config) + +***************************************************************************/ + +/*************************************************************************** + + Entex Space Invader + * COP444L MCU labeled /B138 COPL444-HRZ/N INV II (die labeled HRZ COP 444L/A) + * 3 7seg LEDs, LED matrix and overlay mask, 1bit sound + + The first version was on TMS1100 (see hh_tms1k.c), this is the reprogrammed + second release with a gray case instead of black. + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class einvaderc_state : public hh_cop400_state +{ +public: + einvaderc_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_cop400_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE_LINE_MEMBER(write_so); + DECLARE_WRITE_LINE_MEMBER(write_sk); + DECLARE_WRITE8_MEMBER(write_g); + DECLARE_WRITE8_MEMBER(write_d); + DECLARE_WRITE8_MEMBER(write_l); +}; + +// handlers + +void einvaderc_state::prepare_display() +{ + // D0-D2 are 7segs + for (int y = 0; y < 3; y++) + m_display_segmask[y] = 0x7f; + + // update display + UINT8 l = BITSWAP8(m_l,7,6,0,1,2,3,4,5); + UINT16 grid = (m_d | m_g << 4 | m_sk << 8 | m_so << 9) ^ 0x0f0; + display_matrix(8, 10, l, grid); +} + +WRITE8_MEMBER(einvaderc_state::write_d) +{ + // D: led grid 0-3 + m_d = data; + prepare_display(); +} + +WRITE8_MEMBER(einvaderc_state::write_g) +{ + // G: led grid 4-7 + m_g = data; + prepare_display(); +} + +WRITE_LINE_MEMBER(einvaderc_state::write_sk) +{ + // SK: speaker out + m_speaker->level_w(state); + + // SK: led grid 8 + m_sk = state; + prepare_display(); +} + +WRITE_LINE_MEMBER(einvaderc_state::write_so) +{ + // SO: led grid 9 + m_so = state; + prepare_display(); +} + +WRITE8_MEMBER(einvaderc_state::write_l) +{ + // L: led state/segment + m_l = data; + prepare_display(); +} + + +// config + +static INPUT_PORTS_START( einvaderc ) + PORT_START("IN.0") + PORT_CONFNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x01, "Amateur" ) + PORT_CONFSETTING( 0x00, "Professional" ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( einvaderc, einvaderc_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", COP444, 1000000) // approximation - RC osc. R=47K to +9V, C=100pf to GND(-9V) + MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED) // guessed + MCFG_COP400_READ_IN_CB(IOPORT("IN.0")) + MCFG_COP400_WRITE_SO_CB(WRITELINE(einvaderc_state, write_so)) + MCFG_COP400_WRITE_SK_CB(WRITELINE(einvaderc_state, write_sk)) + MCFG_COP400_WRITE_G_CB(WRITE8(einvaderc_state, write_g)) + MCFG_COP400_WRITE_D_CB(WRITE8(einvaderc_state, write_d)) + MCFG_COP400_WRITE_L_CB(WRITE8(einvaderc_state, write_l)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_einvaderc) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Milton Bradley (Electronic) Lightfight + * COP421L MCU labeled /B119 COP421L-HLA/N + * LED matrix, 1bit sound + + Xbox-shaped electronic game for 2 or more players, with long diagonal buttons + next to each outer LED. The main object of the game is to pinpoint a light + by pressing 2 buttons. To start, press a skill-level button(P2 button 7/8/9) + after selecting a game mode(P1 button 6-10). + + The game variations are: + 1: LightFight + 2: NightFight + 3: RiteSite + 4: QuiteBrite + 5: RightLight + +***************************************************************************/ + +class lightfgt_state : public hh_cop400_state +{ +public: + lightfgt_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_cop400_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE_LINE_MEMBER(write_so); + DECLARE_WRITE_LINE_MEMBER(write_sk); + DECLARE_READ8_MEMBER(read_g); + DECLARE_WRITE8_MEMBER(write_d); + DECLARE_WRITE8_MEMBER(write_l); +}; + +// handlers + +void lightfgt_state::prepare_display() +{ + UINT8 grid = (m_so | m_d << 1) ^ 0x1f; + display_matrix(5, 5, m_l, grid); +} + +WRITE_LINE_MEMBER(lightfgt_state::write_so) +{ + // SO: led grid 0 (and input mux) + m_so = state; + prepare_display(); +} + +WRITE8_MEMBER(lightfgt_state::write_d) +{ + // D: led grid 1-4 (and input mux) + m_d = data; + prepare_display(); +} + +WRITE8_MEMBER(lightfgt_state::write_l) +{ + // L0-L4: led state + // L5-L7: N/C + m_l = data & 0x1f; + prepare_display(); +} + +WRITE_LINE_MEMBER(lightfgt_state::write_sk) +{ + // SK: speaker out + m_speaker->level_w(state); +} + +READ8_MEMBER(lightfgt_state::read_g) +{ + // G: multiplexed inputs + m_inp_mux = (m_so | m_d << 1) ^ 0x1f; + return read_inputs(5) ^ 0xf; +} + + +// config + +static INPUT_PORTS_START( lightfgt ) + PORT_START("IN.0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON6 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // note: button 1 is on the left side from player perspective + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_COCKTAIL + + PORT_START("IN.1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON7 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_COCKTAIL + + PORT_START("IN.2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON8 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_COCKTAIL + + PORT_START("IN.3") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON9 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON4 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_COCKTAIL + + PORT_START("IN.4") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON10 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON5 ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_COCKTAIL +INPUT_PORTS_END + +static MACHINE_CONFIG_START( lightfgt, lightfgt_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", COP421, 950000) // approximation - RC osc. R=82K to +6V, C=56pf to GND(-6V) + MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED) // guessed + MCFG_COP400_WRITE_SO_CB(WRITELINE(lightfgt_state, write_so)) + MCFG_COP400_WRITE_SK_CB(WRITELINE(lightfgt_state, write_sk)) + MCFG_COP400_READ_G_CB(READ8(lightfgt_state, read_g)) + MCFG_COP400_WRITE_D_CB(WRITE8(lightfgt_state, write_d)) + MCFG_COP400_WRITE_L_CB(WRITE8(lightfgt_state, write_l)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_cop400_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_lightfgt) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + +ROM_START( einvaderc ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "entexsi.bin", 0x0000, 0x0800, CRC(76400f38) SHA1(0e92ab0517f7b7687293b189d30d57110df20fe0) ) +ROM_END + + +ROM_START( lightfgt ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "lightfight.bin", 0x0000, 0x0400, CRC(aceb2d65) SHA1(2328cbb195faf93c575f3afa3a1fe0079180edd7) ) +ROM_END + + + +/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1981, einvaderc, einvader, 0, einvaderc, einvaderc, driver_device, 0, "Entex", "Space Invader (Entex, COP444)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) + +CONS( 1981, lightfgt, 0, 0, lightfgt, lightfgt, driver_device, 0, "Milton Bradley", "Lightfight", GAME_SUPPORTS_SAVE ) diff --git a/src/mess/drivers/hh_hmcs40.c b/src/mess/drivers/hh_hmcs40.c index cebec56b36e..ec8755a8319 100644 --- a/src/mess/drivers/hh_hmcs40.c +++ b/src/mess/drivers/hh_hmcs40.c @@ -2,33 +2,38 @@ // copyright-holders:hap, Kevin Horton /*************************************************************************** - Hitachi HMCS40 MCU tabletops/handhelds or other simple devices. + Hitachi HMCS40 MCU tabletops/handhelds or other simple devices, + most of them are VFD electronic games/toys. known chips: serial device etc. ---------------------------------------------------------------- - *07 HD38750A 1979, Bambino Knock-Em Out Boxing (ET-06B) - @08 HD38750A 1979, Bambino Basketball (ET-05) - *45 HD38750A 1981, Vtech Invaders + @07 HD38750A 1979, Bambino Knock-Em Out Boxing (ET-06B) + @08 HD38750A 1979, Bambino Dribble Away Basketball (ET-05) + @45 HD38750A 1981, VTech Invaders *58 HD38750A 1982, Ludotronic(Hanzawa) Grand Prix Turbo *62 HD38750A 1982, Actronics(Hanzawa) Pack'n Maze - *04 HD38800A 1980, Gakken Heiankyo Alien + @04 HD38800A 1980, Gakken Heiankyo Alien @25 HD38800A 1981, Coleco Alien Attack @27 HD38800A 1981, Bandai Packri Monster + *31 HD38800A 1981, Entex Select-a-Game cartridge: Space Invader 2 (have dump) *41 HD38800A 1982, Gakken Puck Monster *51 HD38800A 1981, Actronics(Hanzawa) Twinvader @70 HD38800A 1982, Coleco Galaxian - @73 HD38800A 1982, Bandai(Mattel) Star Hawk - @77 HD38800A 1982, Bandai Frisky Tom - + @73 HD38800A 1982, Bandai(Mattel) Star Hawk (PT-317B) + @77 HD38800A 1982, Bandai Frisky Tom (PT-327A) + @88 HD38800A 1984, Tomy Tron (THN-02) + + @01 HD38800B 1982, Gakken Crazy Kong @23 HD38800B 1982, Tomy Kingman (THF-01II) *24 HD38800B 1982, Actronics(Hanzawa) Wanted G-Man *29 HD38800B 1984, Tomy Portable 6000 Bombman *35 HD38800B 1983, Bandai Gundam vs Gelgoog Zaku - *43 HD38800B 1983, Bandai Dokodemo Dorayaki Doraemon + @43 HD38800B 1983, Bandai Dokodemo Dorayaki Doraemon (PT-412) + @09 HD38820A 1980, Mattel World Championship Baseball @13 HD38820A 1981, Entex Galaxian 2 @23 HD38820A 1981, Entex Pac Man 2 @28 HD38820A 1981, Coleco Pac-Man (ver 1) @@ -40,18 +45,33 @@ @45 HD38820A 1982, Coleco Donkey Kong @49 HD38820A 1983, Bandai Zackman @61 HD38820A 1983, Coleco Ms. Pac-Man + @69 HD38820A 1983, Gakken Dig Dug @70 HD38820A 1983, Parker Brothers Q*Bert - @88 HD38820A 1984, Tomy Tron (THN-02) + @85 HD38820A 1984, Bandai Machine Man (PT-438) (* denotes not yet emulated by MESS, @ denotes it's in this driver) + + TODO: + - cdkong discrete sound (simple volume decay, simulated for now) + - cgalaxn discrete sound (alien attacking sound effect) + - vinvader locks up at boot + - gckong random lockups (tap the jump button repeatedly): mcu stack overflow, + works ok if stack levels is increased, 38800 B rev. has more stack levels? + Or it could be a race condition: irq happening too late/early. + - epacman booting the game in demo mode, pacman should go straight to the + upper-left power pill: mcu cycle/interrupt timing related + - Though very uncommon when compared to games with LED/lamp display, + some games may manipulate VFD plate brightness by strobing it longer, + eg. cgalaxn when the player ship explodes. + ***************************************************************************/ #include "emu.h" #include "cpu/hmcs40/hmcs40.h" #include "sound/speaker.h" -#include "hh_hmcs40_test.lh" // test-layout - use external artwork +#include "hh_hmcs40_test.lh" // common test-layout - use external artwork class hh_hmcs40_state : public driver_device @@ -290,7 +310,7 @@ INPUT_CHANGED_MEMBER(hh_hmcs40_state::single_interrupt_line) /*************************************************************************** - Bambino Basketball - Dribble Away (manufactured in Japan) + Bambino Dribble Away Basketball (manufactured in Japan) * PCBs are labeled Emix Corp. ET-05 * Hitachi HD38750A08 MCU * green VFD display Emix-106, with bezel overlay @@ -315,7 +335,7 @@ public: WRITE8_MEMBER(bambball_state::plate_w) { - // R1x-R3x, D0-D3: vfd matrix plate + // R1x-R3x(,D0-D3): vfd matrix plate int shift = (offset - HMCS40_PORT_R1X) * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); @@ -335,13 +355,13 @@ WRITE16_MEMBER(bambball_state::grid_w) // D7-D15: vfd matrix grid m_grid = data >> 7 & 0x1ff; - // D0-D3: plates (update display there) + // D0-D3: more plates (update display there) plate_w(space, 3 + HMCS40_PORT_R1X, data & 0xf); } READ8_MEMBER(bambball_state::input_r) { - // R0x: inputs + // R0x: multiplexed inputs return read_inputs(4); } @@ -356,8 +376,8 @@ static INPUT_PORTS_START( bambball ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_NAME("Shoot") PORT_START("IN.1") // D8 port R0x - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // separate directional buttons, hence 16way - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // " + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.2") // D9 port R0x @@ -378,7 +398,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( bambball, bambball_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation MCFG_HMCS40_READ_R_CB(0, READ8(bambball_state, input_r)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bambball_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bambball_state, plate_w)) @@ -402,6 +422,142 @@ MACHINE_CONFIG_END /*************************************************************************** + Bambino Knock-Em Out Boxing + * PCBs are labeled Emix Corp. ET-06B + * Hitachi HD38750A07 MCU + * cyan VFD display Emix-103, with blue or green color overlay + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class bmboxing_state : public hh_hmcs40_state +{ +public: + bmboxing_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_hmcs40_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE16_MEMBER(grid_w); + DECLARE_READ8_MEMBER(input_r); +}; + +// handlers + +void bmboxing_state::prepare_display() +{ + UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8); + UINT32 plate = BITSWAP16(m_plate,15,14,13,12,1,2,0,3,11,4,10,7,5,6,9,8); + display_matrix(12, 9, plate, grid); +} + +WRITE8_MEMBER(bmboxing_state::plate_w) +{ + // R1x-R3x: vfd matrix plate + int shift = (offset - HMCS40_PORT_R1X) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE16_MEMBER(bmboxing_state::grid_w) +{ + // D13: speaker out + m_speaker->level_w(data >> 13 & 1); + + // D9-D12: input mux + m_inp_mux = data >> 9 & 0xf; + + // D4-D12: vfd matrix grid + m_grid = data >> 4 & 0x1ff; + prepare_display(); +} + +READ8_MEMBER(bmboxing_state::input_r) +{ + // R0x: multiplexed inputs + return read_inputs(4); +} + + +// config + +/* physical button layout and labels is like this: + + * left = P2 side * * right = P1 side * + + [ BACK ] [ HIGH ] (players sw) [ HIGH ] [ BACK ] + 1<--->2 [START/ + [NORMAL] [MEDIUM] RESET] [MEDIUM] [NORMAL] + 1<---OFF--->2 + [ DUCK ] [ LOW ] (skill lvl sw) [ LOW ] [ DUCK ] +*/ + +static INPUT_PORTS_START( bmboxing ) + PORT_START("IN.0") // D9 port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("P1 Punch High") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("P1 Punch Medium") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("P1 Punch Low") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // D10 port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("P1 Position Normal") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("P1 Position Back") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("P1 Position Ducking") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.2") // D11 port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("P2 Punch High") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("P2 Punch Medium") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("P2 Punch Low") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.3") // D12 port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("P2 Position Normal") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("P2 Position Back") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("P2 Position Ducking") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.4") // port D + PORT_CONFNAME( 0x0001, 0x0000, "Players" ) + PORT_CONFSETTING( 0x0000, "1" ) + PORT_CONFSETTING( 0x0001, "2" ) + PORT_CONFNAME( 0x0002, 0x0000, "Skill Level" ) + PORT_CONFSETTING( 0x0000, "1" ) + PORT_CONFSETTING( 0x0002, "2" ) + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_START ) + PORT_BIT( 0xfff8, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( bmboxing, bmboxing_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation + MCFG_HMCS40_READ_R_CB(0, READ8(bmboxing_state, input_r)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bmboxing_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bmboxing_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(bmboxing_state, plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(bmboxing_state, grid_w)) + MCFG_HMCS40_READ_D_CB(IOPORT("IN.4")) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Bandai Frisky Tom (manufactured in Japan) * PCBs are labeled Kaken Corp., PT-327A * Hitachi HD38800A77 MCU @@ -502,7 +658,7 @@ INPUT_CHANGED_MEMBER(bfriskyt_state::input_changed) static MACHINE_CONFIG_START( bfriskyt, bfriskyt_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(bfriskyt_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bfriskyt_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bfriskyt_state, plate_w)) @@ -557,7 +713,7 @@ public: WRITE8_MEMBER(packmon_state::plate_w) { - // R0x-R3x, D0-D3: vfd matrix plate + // R0x-R3x(,D0-D3): vfd matrix plate int shift = offset * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); @@ -585,7 +741,7 @@ WRITE16_MEMBER(packmon_state::grid_w) READ16_MEMBER(packmon_state::input_r) { // D5: multiplexed inputs - return read_inputs(5); + return read_inputs(5) & 0x20; } @@ -611,7 +767,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( packmon, packmon_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(packmon_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(packmon_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(packmon_state, plate_w)) @@ -636,11 +792,11 @@ MACHINE_CONFIG_END /*************************************************************************** - Bandai(Mattel) Star Hawk (manufactured in Japan) + Bandai/Mattel Star Hawk (manufactured in Japan) * PCBs are labeled Kaken, PT-317B * Hitachi HD38800A73 MCU - * cyan/red VFD display Futaba DM-41ZK, with partial color overlay - + * cyan/red VFD display Futaba DM-41ZK, with partial color overlay + bezel + Kaken was a subsidiary of Bandai. The original Japanese release is unknown, was it canceled and only released in the USA? @@ -746,7 +902,7 @@ INPUT_CHANGED_MEMBER(msthawk_state::input_changed) static MACHINE_CONFIG_START( msthawk, msthawk_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(msthawk_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(msthawk_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(msthawk_state, plate_w)) @@ -771,7 +927,7 @@ MACHINE_CONFIG_END /*************************************************************************** Bandai Zackman "The Pit, FL Exploration of Space" (manufactured in Japan) - * Hitachi HD38820A49 MCU + * Hitachi QFP HD38820A49 MCU * cyan/red/yellow VFD display Futaba DM-53Z 3E, with color overlay NOTE!: MESS external artwork is recommended @@ -796,7 +952,7 @@ public: WRITE8_MEMBER(zackman_state::plate_w) { - // R0x-R6x,D0,D1: vfd matrix plate + // R0x-R6x(,D0,D1): vfd matrix plate int shift = offset * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); @@ -861,7 +1017,7 @@ INPUT_CHANGED_MEMBER(zackman_state::input_changed) static MACHINE_CONFIG_START( zackman, zackman_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(zackman_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(zackman_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(zackman_state, plate_w)) @@ -888,10 +1044,197 @@ MACHINE_CONFIG_END /*************************************************************************** + Bandai Dokodemo Dorayaki Doraemon (FL LSI Game Push Up) (manufactured in Japan) + * PCB label Kaken Corp PT-412 FL-Doreamon(in katakana) + * Hitachi HD38800B43 MCU + * cyan/red/blue VFD display Futaba DM-71 + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class bdoramon_state : public hh_hmcs40_state +{ +public: + bdoramon_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_hmcs40_state(mconfig, type, tag) + { } + + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE16_MEMBER(grid_w); +}; + +// handlers + +WRITE8_MEMBER(bdoramon_state::plate_w) +{ + // R0x-R3x(,D0-D3): vfd matrix plate + int shift = offset * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // update display + UINT8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,7,6); + UINT32 plate = BITSWAP24(m_plate,23,22,21,20,11,19,18,17,16,15,14,13,12,10,9,8,7,6,5,4,3,2,1,0); + display_matrix(19, 8, plate, grid); +} + +WRITE16_MEMBER(bdoramon_state::grid_w) +{ + // D7: speaker out + m_speaker->level_w(data >> 7 & 1); + + // D8-D15: vfd matrix grid + m_grid = data >> 8 & 0xff; + + // D0-D3: plate 15-18 (update display there) + plate_w(space, 4, data & 0xf); +} + + +// config + +static INPUT_PORTS_START( bdoramon ) + PORT_START("IN.0") // INT0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) + + PORT_START("IN.1") // INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1) + + PORT_START("IN.2") // port D + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0xff8f, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.3") // port R2x + PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_CONFNAME( 0x08, 0x00, "Factory Test" ) + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x08, DEF_STR( On ) ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( bdoramon, bdoramon_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation + MCFG_HMCS40_WRITE_R_CB(0, WRITE8(bdoramon_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(bdoramon_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(bdoramon_state, plate_w)) + MCFG_HMCS40_READ_R_CB(2, IOPORT("IN.3")) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(bdoramon_state, plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(bdoramon_state, grid_w)) + MCFG_HMCS40_READ_D_CB(IOPORT("IN.2")) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Bandai Machine Man (FL Flat Type) (manufactured in Japan) + * PCB label Kaken PT-438 + * Hitachi QFP HD38820A85 MCU + * cyan/red/green VFD display NEC FIP5CM33T no. 4 21 + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class machiman_state : public hh_hmcs40_state +{ +public: + machiman_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_hmcs40_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE16_MEMBER(grid_w); +}; + +// handlers + +void machiman_state::prepare_display() +{ + UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18); + display_matrix(19, 5, plate, m_grid); +} + +WRITE8_MEMBER(machiman_state::plate_w) +{ + // R0x-R3x,R6012: vfd matrix plate + int shift = (offset == HMCS40_PORT_R6X) ? 16 : offset * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE16_MEMBER(machiman_state::grid_w) +{ + // D13: speaker out + m_speaker->level_w(data >> 13 & 1); + + // D0-D4: vfd matrix grid + m_grid = data & 0x1f; + prepare_display(); +} + + +// config + +static INPUT_PORTS_START( machiman ) + PORT_START("IN.0") // INT0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) + + PORT_START("IN.1") // port D + PORT_BIT( 0x3fff, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY +INPUT_PORTS_END + +static MACHINE_CONFIG_START( machiman, machiman_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation + MCFG_HMCS40_WRITE_R_CB(0, WRITE8(machiman_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(machiman_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(machiman_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(machiman_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(6, WRITE8(machiman_state, plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(machiman_state, grid_w)) + MCFG_HMCS40_READ_D_CB(IOPORT("IN.1")) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Coleco Alien Attack (manufactured in Taiwan) * Hitachi HD38800A25 MCU * cyan/red VFD display Futaba DM-19Z 1J - + It looks like Coleco took Gakken's Heiankyo Alien and turned it into a more action-oriented game. @@ -915,12 +1258,12 @@ public: WRITE8_MEMBER(alnattck_state::plate_w) { - // R0x-R3x, D0-D3: vfd matrix plate + // R0x-R3x(,D0-D3): vfd matrix plate int shift = offset * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); // update display - UINT32 plate = BITSWAP16(m_plate,11,9,8,10,7,2,0,1,3,4,5,6,12,13,14,15) | (m_plate & 0xf0000); + UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,18,17,16,11,9,8,10,7,2,0,1,3,4,5,6,12,13,14,15); display_matrix(20, 10, plate, m_grid); } @@ -942,14 +1285,14 @@ WRITE16_MEMBER(alnattck_state::grid_w) READ16_MEMBER(alnattck_state::input_r) { // D5: multiplexed inputs - return read_inputs(7); + return read_inputs(7) & 0x20; } // config static INPUT_PORTS_START( alnattck ) - PORT_START("IN.0") // D5 D7 + PORT_START("IN.0") // D7 line D5 PORT_CONFNAME( 0x20, 0x00, "Skill Level" ) PORT_CONFSETTING( 0x00, "1" ) PORT_CONFSETTING( 0x20, "2" ) @@ -967,16 +1310,16 @@ static INPUT_PORTS_START( alnattck ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_START("IN.5") // D12 line D5 - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Move") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Move") PORT_START("IN.6") // D13 line D5 - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Fire") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Fire") INPUT_PORTS_END static MACHINE_CONFIG_START( alnattck, alnattck_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(alnattck_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(alnattck_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(alnattck_state, plate_w)) @@ -1003,7 +1346,7 @@ MACHINE_CONFIG_END Coleco Donkey Kong (manufactured in Taiwan) * PCB label Coleco Rev C 75790 DK - * Hitachi HD38820A45 MCU + * Hitachi QFP HD38820A45 MCU * cyan/red VFD display Futaba DM-47ZK 2K, with color overlay NOTE!: MESS external artwork is recommended @@ -1076,15 +1419,15 @@ WRITE16_MEMBER(cdkong_state::grid_w) // config static INPUT_PORTS_START( cdkong ) - PORT_START("IN.0") // port D + PORT_START("IN.0") // INT0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) + + PORT_START("IN.1") // port D PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x7ff8, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) - - PORT_START("IN.1") // INT0 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) + PORT_BIT( 0x7ff8, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END @@ -1100,7 +1443,7 @@ void cdkong_state::machine_start() static MACHINE_CONFIG_START( cdkong, cdkong_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(cdkong_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(cdkong_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(cdkong_state, plate_w)) @@ -1109,7 +1452,7 @@ static MACHINE_CONFIG_START( cdkong, cdkong_state ) MCFG_HMCS40_WRITE_R_CB(5, WRITE8(cdkong_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(6, WRITE8(cdkong_state, plate_w)) MCFG_HMCS40_WRITE_D_CB(WRITE16(cdkong_state, grid_w)) - MCFG_HMCS40_READ_D_CB(IOPORT("IN.0")) + MCFG_HMCS40_READ_D_CB(IOPORT("IN.1")) MCFG_TIMER_DRIVER_ADD_PERIODIC("speaker_decay", cdkong_state, speaker_decay_sim, attotime::from_msec(CDKONG_SPEAKER_DECAY)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) @@ -1152,9 +1495,11 @@ public: { } void prepare_display(); - DECLARE_WRITE16_MEMBER(plate_w); DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_WRITE16_MEMBER(plate_w); DECLARE_READ8_MEMBER(input_r); + + DECLARE_INPUT_CHANGED_MEMBER(player_switch); }; // handlers @@ -1162,24 +1507,12 @@ public: void cgalaxn_state::prepare_display() { UINT16 grid = BITSWAP16(m_grid,15,14,13,12,1,2,0,11,10,9,8,7,6,5,4,3); - UINT16 plate = BITSWAP16(m_plate,15,14,5,4,3,2,1,0,7,11,12,9,8,10,6,13); - display_matrix(14, 12, plate, grid); + UINT16 plate = BITSWAP16(m_plate,15,14,6,5,4,3,2,1,7,8,9,10,11,0,12,13); + display_matrix(15, 12, plate, grid); } WRITE8_MEMBER(cgalaxn_state::grid_w) { - // D0: speaker out - m_speaker->level_w(data & 1); - - // D1: speaker on? - - // D2-D15: vfd matrix plate - m_plate = data >> 2 & 0x3fff; - prepare_display(); -} - -WRITE16_MEMBER(cgalaxn_state::plate_w) -{ // R10,R11: input mux if (offset == HMCS40_PORT_R1X) m_inp_mux = data & 3; @@ -1190,6 +1523,18 @@ WRITE16_MEMBER(cgalaxn_state::plate_w) prepare_display(); } +WRITE16_MEMBER(cgalaxn_state::plate_w) +{ + // D0: speaker out + m_speaker->level_w(data & 1); + + // D1: start alien attack whine sound effect (edge triggered) + + // D2-D15: vfd matrix plate + m_plate = (m_plate & 0x4000) | (data >> 2 & 0x3fff); + prepare_display(); +} + READ8_MEMBER(cgalaxn_state::input_r) { // R0x: multiplexed inputs @@ -1207,7 +1552,7 @@ static INPUT_PORTS_START( cgalaxn ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_START("IN.1") // R11 port R0x - PORT_CONFNAME( 0x01, 0x01, "Players" ) + PORT_CONFNAME( 0x01, 0x01, "Players" ) PORT_CHANGED_MEMBER(DEVICE_SELF, cgalaxn_state, player_switch, NULL) PORT_CONFSETTING( 0x01, "1" ) PORT_CONFSETTING( 0x00, "2" ) PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -1219,10 +1564,17 @@ static INPUT_PORTS_START( cgalaxn ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1) INPUT_PORTS_END +INPUT_CHANGED_MEMBER(cgalaxn_state::player_switch) +{ + // 2-player switch directly enables plate 14 + m_plate = (m_plate & 0x3fff) | (newval ? 0 : 0x4000); +} + + static MACHINE_CONFIG_START( cgalaxn, cgalaxn_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation MCFG_HMCS40_READ_R_CB(0, READ8(cgalaxn_state, input_r)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(cgalaxn_state, grid_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(cgalaxn_state, grid_w)) @@ -1248,7 +1600,7 @@ MACHINE_CONFIG_END Coleco Pac-Man (manufactured in Taiwan) * PCB label Coleco 75690 - * Hitachi HD38820A28/29 MCU + * Hitachi QFP HD38820A28/29 MCU * cyan/red VFD display Futaba DM-34Z 2A, with color overlay known releases: @@ -1283,7 +1635,7 @@ public: WRITE8_MEMBER(cpacman_state::plate_w) { - // R1x-R6x, D1,D2: vfd matrix plate + // R1x-R6x(,D1,D2): vfd matrix plate int shift = (offset - HMCS40_PORT_R1X) * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); @@ -1340,7 +1692,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( cpacman, cpacman_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation MCFG_HMCS40_READ_R_CB(0, READ8(cpacman_state, input_r)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(cpacman_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(cpacman_state, plate_w)) @@ -1369,7 +1721,7 @@ MACHINE_CONFIG_END Coleco Ms. Pac-Man (manufactured in Taiwan) * PCB label Coleco 911171 - * Hitachi HD38820A61 MCU + * Hitachi QFP HD38820A61 MCU * cyan/red VFD display Futaba DM-60Z 3I, with color overlay Select game mode on start: @@ -1399,7 +1751,7 @@ public: WRITE8_MEMBER(cmspacmn_state::plate_w) { - // R1x-R6x, D0,D1: vfd matrix plate + // R1x-R6x(,D0,D1): vfd matrix plate int shift = (offset - HMCS40_PORT_R1X) * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); @@ -1420,7 +1772,7 @@ WRITE16_MEMBER(cmspacmn_state::grid_w) // D5-D15: vfd matrix grid m_grid = data >> 5 & 0x7ff; - // D0,D1: plate 11+17,6+22 (update display there) + // D0,D1: more plates (update display there) plate_w(space, 6 + HMCS40_PORT_R1X, data & 3); } @@ -1456,7 +1808,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( cmspacmn, cmspacmn_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation MCFG_HMCS40_READ_R_CB(0, READ8(cmspacmn_state, input_r)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(cmspacmn_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(cmspacmn_state, plate_w)) @@ -1484,7 +1836,8 @@ MACHINE_CONFIG_END /*************************************************************************** Entex Galaxian 2 (manufactured in Japan) - * Hitachi HD38820A13 MCU + * PCB labels ENTEX GALAXIAN PB-118/116/097 80-210137/135/114 + * Hitachi QFP HD38820A13 MCU * cyan/red/green VFD display Futaba DM-20 NOTE!: MESS external artwork is recommended @@ -1546,15 +1899,15 @@ READ8_MEMBER(egalaxn2_state::input_r) static INPUT_PORTS_START( egalaxn2 ) PORT_START("IN.0") // D1 port R0x PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // separate directional buttons, hence 16way + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // " + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_START("IN.1") // D2 port R0x - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY // separate directional buttons, hence 16way - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY // " - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY // " - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY // " + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY PORT_START("IN.2") // D3 port R0x PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) @@ -1577,7 +1930,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( egalaxn2, egalaxn2_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation MCFG_HMCS40_READ_R_CB(0, READ8(egalaxn2_state, input_r)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(egalaxn2_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(egalaxn2_state, plate_w)) @@ -1605,8 +1958,11 @@ MACHINE_CONFIG_END /*************************************************************************** Entex Pac Man 2 (manufactured in Japan) - * Hitachi HD38820A23 MCU - * cyan/red VFD display Futaba DM-28Z 1G + * PCB labels ENTEX PAC-MAN PB-093/094 80-210149/50/51 + * Hitachi QFP HD38820A23 MCU + * cyan/red VFD display Futaba DM-28Z 1G(cyan Pac-Man) or DM-28 1K(orange Pac-Man) + + 2 VFD revisions are known, the difference is Pac-Man's color: cyan or red. NOTE!: MESS external artwork is recommended @@ -1626,16 +1982,16 @@ public: static INPUT_PORTS_START( epacman2 ) PORT_START("IN.0") // D1 port R0x - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY // separate directional buttons, hence 16way - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // " - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY // " - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // " + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_START("IN.1") // D2 port R0x - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY // separate directional buttons, hence 16way - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY // " - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY // " - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY // " + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY PORT_START("IN.2") // D3 port R0x PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Skill Control") @@ -1657,7 +2013,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( epacman2, epacman2_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation MCFG_HMCS40_READ_R_CB(0, READ8(egalaxn2_state, input_r)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(egalaxn2_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(egalaxn2_state, plate_w)) @@ -1684,8 +2040,534 @@ MACHINE_CONFIG_END /*************************************************************************** + Gakken Heiankyo Alien (manufactured in Japan) + * Hitachi HD38800A04 MCU + * cyan/red VFD display Futaba DM-11Z 1H + + known releases: + - Japan: Heiankyo Alien + - USA: Earth Invaders, published by CGL + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class ghalien_state : public hh_hmcs40_state +{ +public: + ghalien_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_hmcs40_state(mconfig, type, tag) + { } + + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE16_MEMBER(grid_w); + DECLARE_READ16_MEMBER(input_r); +}; + +// handlers + +WRITE8_MEMBER(ghalien_state::plate_w) +{ + // R0x-R3x(,D10-D13): vfd matrix plate + int shift = offset * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // update display + UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9); + UINT32 plate = BITSWAP24(m_plate,23,22,21,20,14,12,10,8,9,13,15,2,0,1,3,11,7,5,4,6,19,17,16,18); + display_matrix(20, 10, plate, grid); +} + +WRITE16_MEMBER(ghalien_state::grid_w) +{ + // D14: speaker out + m_speaker->level_w(data >> 14 & 1); + + // D0-D6: input mux + m_inp_mux = data & 0x7f; + + // D0-D9: vfd matrix grid + m_grid = data & 0x3ff; + + // D10-D13: more plates (update display there) + plate_w(space, 4, data >> 10 & 0xf); +} + +READ16_MEMBER(ghalien_state::input_r) +{ + // D15: multiplexed inputs + return read_inputs(7) & 0x8000; +} + + +// config + +static INPUT_PORTS_START( ghalien ) + PORT_START("IN.0") // D0 line D15 + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + + PORT_START("IN.1") // D1 line D15 + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + + PORT_START("IN.2") // D2 line D15 + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + + PORT_START("IN.3") // D3 line D15 + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + + PORT_START("IN.4") // D4 line D15 + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Dig") + + PORT_START("IN.5") // D5 line D15 + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Bury") + + PORT_START("IN.6") // D6 line D15 + PORT_CONFNAME( 0x8000, 0x0000, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x0000, "Amateur" ) + PORT_CONFSETTING( 0x8000, "Professional" ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( ghalien, ghalien_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation + MCFG_HMCS40_WRITE_R_CB(0, WRITE8(ghalien_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(ghalien_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(ghalien_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(ghalien_state, plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(ghalien_state, grid_w)) + MCFG_HMCS40_READ_D_CB(READ16(ghalien_state, input_r)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Gakken Crazy Kong (manufactured in Japan) + * PCB label ZENY 5603601 + * Hitachi HD38800B01 MCU + * cyan/red/blue VFD display Futaba DM-54Z 2H, with bezel overlay + + known releases: + - Japan: Crazy Kong + - USA: Super Kong, published by CGL + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class gckong_state : public hh_hmcs40_state +{ +public: + gckong_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_hmcs40_state(mconfig, type, tag) + { } + + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE16_MEMBER(grid_w); + + void update_int1(); + DECLARE_INPUT_CHANGED_MEMBER(input_changed); +}; + +// handlers + +WRITE8_MEMBER(gckong_state::plate_w) +{ + // R0x-R3x(,D0,D1): vfd matrix plate + int shift = offset * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // update display + UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,0,1,2,3,4,5,6,7,8,9,10); + UINT32 plate = BITSWAP32(m_plate,31,30,29,28,27,26,25,6,7,8,12,13,14,15,16,17,18,17,16,12,11,10,9,8,7,6,5,4,3,2,1,0); + display_matrix(32, 11, plate, grid); +} + +WRITE16_MEMBER(gckong_state::grid_w) +{ + // D2: speaker out + m_speaker->level_w(data >> 2 & 1); + + // D5-D8: input mux + UINT8 inp_mux = data >> 5 & 0xf; + if (inp_mux != m_inp_mux) + { + m_inp_mux = inp_mux; + update_int1(); + } + + // D5-D15: vfd matrix grid + m_grid = data >> 5 & 0x7ff; + + // D0,D1: more plates (update display there) + plate_w(space, 4, data & 3); +} + +void gckong_state::update_int1() +{ + // INT1 on multiplexed inputs + set_interrupt(1, read_inputs(4)); +} + + +// config + +static INPUT_PORTS_START( gckong ) + PORT_START("IN.0") // D5 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL) + + PORT_START("IN.1") // D6 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL) + + PORT_START("IN.2") // D7 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL) + + PORT_START("IN.3") // D8 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL) + + PORT_START("IN.4") // INT0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) + + PORT_START("IN.5") // port D + PORT_CONFNAME( 0x0010, 0x0000, "Skill Level" ) + PORT_CONFSETTING( 0x0000, "A" ) + PORT_CONFSETTING( 0x0010, "B" ) + PORT_BIT( 0xffef, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +INPUT_CHANGED_MEMBER(gckong_state::input_changed) +{ + update_int1(); +} + + +static MACHINE_CONFIG_START( gckong, gckong_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation + MCFG_HMCS40_WRITE_R_CB(0, WRITE8(gckong_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(gckong_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(gckong_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(gckong_state, plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(gckong_state, grid_w)) + MCFG_HMCS40_READ_D_CB(IOPORT("IN.5")) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Gakken Dig Dug (manufactured in Japan) + * PCB label Gakken DIG-DAG KS-004283(A/B) + * Hitachi QFP HD38820A69 MCU + * cyan/red/green VFD display Futaba DM-69Z 3F, with color overlay + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class gdigdug_state : public hh_hmcs40_state +{ +public: + gdigdug_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_hmcs40_state(mconfig, type, tag) + { } + + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE16_MEMBER(grid_w); + + void update_int1(); + DECLARE_INPUT_CHANGED_MEMBER(input_changed); +}; + +// handlers + +WRITE8_MEMBER(gdigdug_state::plate_w) +{ + // R0x-R6x(,D0-D3): vfd matrix plate + int shift = offset * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // update display + UINT32 plate = BITSWAP32(m_plate,30,31,0,1,2,3,4,5,6,7,20,21,22,27,26,25,28,29,24,23,15,14,13,12,8,9,10,11,19,18,17,16); + display_matrix(32, 9, plate, m_grid); +} + +WRITE16_MEMBER(gdigdug_state::grid_w) +{ + // D6: speaker out + m_speaker->level_w(data >> 6 & 1); + + // D11-D15: input mux + UINT8 inp_mux = data >> 11 & 0x1f; + if (inp_mux != m_inp_mux) + { + m_inp_mux = inp_mux; + update_int1(); + } + + // D7-D15: vfd matrix grid + m_grid = data >> 7 & 0x1ff; + + // D0-D3: more plates (update display there) + plate_w(space, 7, data & 0xf); +} + +void gdigdug_state::update_int1() +{ + // INT1 on multiplexed inputs + set_interrupt(1, read_inputs(5)); +} + + +// config + +static INPUT_PORTS_START( gdigdug ) + PORT_START("IN.0") // D11 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL) + + PORT_START("IN.1") // D12 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL) + + PORT_START("IN.2") // D13 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL) + + PORT_START("IN.3") // D14 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL) + + PORT_START("IN.4") // D15 INT1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL) + + PORT_START("IN.5") // INT0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) +INPUT_PORTS_END + +INPUT_CHANGED_MEMBER(gdigdug_state::input_changed) +{ + update_int1(); +} + + +static MACHINE_CONFIG_START( gdigdug, gdigdug_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation + MCFG_HMCS40_WRITE_R_CB(0, WRITE8(gdigdug_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(gdigdug_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(gdigdug_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(gdigdug_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(4, WRITE8(gdigdug_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(5, WRITE8(gdigdug_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(6, WRITE8(gdigdug_state, plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(gdigdug_state, grid_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Mattel World Championship Baseball + * PCB label MEL-001 Baseball Rev. B + * Hitachi QFP HD38820A09 MCU + * cyan/red/green VFD display Futaba DM-24ZK 1G, with etched overlay + + To start the game in 2-player mode, simply turn the game on. For 1-player, + turn the game on while holding the 1-key and use the visitor's side keypad + to play offsense. + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class mwcbaseb_state : public hh_hmcs40_state +{ +public: + mwcbaseb_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_hmcs40_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE16_MEMBER(grid_w); + DECLARE_WRITE8_MEMBER(speaker_w); + DECLARE_READ8_MEMBER(input_r); +}; + +// handlers + +void mwcbaseb_state::prepare_display() +{ + UINT8 grid = BITSWAP8(m_grid,0,1,2,3,4,5,6,7); + display_matrix(16, 8, m_plate, grid); +} + +WRITE8_MEMBER(mwcbaseb_state::plate_w) +{ + // R1x-R3x,R6x: vfd matrix plate + int shift = (offset == HMCS40_PORT_R6X) ? 12 : (offset - HMCS40_PORT_R1X) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE16_MEMBER(mwcbaseb_state::grid_w) +{ + // D9-D15: input mux + m_inp_mux = data >> 9 & 0x7f; + + // D0-D7: vfd matrix grid + m_grid = data & 0xff; + prepare_display(); +} + +WRITE8_MEMBER(mwcbaseb_state::speaker_w) +{ + // R50,R51+R52(tied together): speaker out + m_speaker->level_w(data & 7); +} + +READ8_MEMBER(mwcbaseb_state::input_r) +{ + // R4x: multiplexed inputs + return read_inputs(7); +} + + +// config + +/* physical button layout and labels is like this: + + (visitor team side) (home team side) + COMP PITCH [SCORE] [INNING] + [1] [2] [3] [1] [2] [3] + NEW PITCHER PINCH HITTER NEW PITCHER PINCH HITTER + + [4] [5] [6] [4] [5] [6] + BACKWARD (pitch) FORWARD BACKWARD (pitch) FORWARD + + [7] [8] [9] [7] [8] [9] + + BUNT NORMAL HR SWING BUNT NORMAL HR SWING + [CLEAR] [0] [ENTER] [CLEAR] [0] [ENTER] + SLOW CURVE FAST SLOW CURVE FAST +*/ + +static INPUT_PORTS_START( mwcbaseb ) + PORT_START("IN.0") // D9 port R4x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) PORT_NAME("P2 4") // note: P1 = left/visitor, P2 = right/home + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_NAME("P2 3") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_NAME("P2 2") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_NAME("P2 1") + + PORT_START("IN.1") // D10 port R4x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("P2 8") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("P2 7") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("P2 6") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("P2 5") + + PORT_START("IN.2") // D11 port R4x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("P2 Enter") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_NAME("P2 Clear") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("P2 0") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("P2 9") + + PORT_START("IN.3") // D12 port R4x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Inning") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("Score") + + PORT_START("IN.4") // D13 port R4x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("P1 Enter") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("P1 Clear") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("P1 0") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("P1 9") + + PORT_START("IN.5") // D14 port R4x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("P1 8") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("P1 7") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("P1 6") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("P1 5") + + PORT_START("IN.6") // D15 port R4x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("P1 4") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("P1 3") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("P1 2") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("P1 1") +INPUT_PORTS_END + + +static const INT16 mwcbaseb_speaker_levels[] = { 0, 16384, -16384, 0, -16384, 0, -32768, -16384 }; + +static MACHINE_CONFIG_START( mwcbaseb, mwcbaseb_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(mwcbaseb_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(mwcbaseb_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(mwcbaseb_state, plate_w)) + MCFG_HMCS40_READ_R_CB(4, READ8(mwcbaseb_state, input_r)) + MCFG_HMCS40_WRITE_R_CB(5, WRITE8(mwcbaseb_state, speaker_w)) + MCFG_HMCS40_WRITE_R_CB(6, WRITE8(mwcbaseb_state, plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(mwcbaseb_state, grid_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SPEAKER_LEVELS(8, mwcbaseb_speaker_levels) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Parker Brothers Q*Bert - * Hitachi HD38820A70 MCU + * PCB label 13662 REV-4 + * Hitachi QFP HD38820A70 MCU * cyan/red/green/darkgreen VFD display Itron CP5137 NOTE!: MESS external artwork is recommended @@ -1707,7 +2589,7 @@ public: WRITE8_MEMBER(pbqbert_state::plate_w) { - // R0x-R6x,D8: vfd matrix plate + // R0x-R6x(,D8): vfd matrix plate int shift = offset * 4; m_plate = (m_plate & ~(0xf << shift)) | (data << shift); @@ -1743,7 +2625,7 @@ INPUT_PORTS_END static MACHINE_CONFIG_START( pbqbert, pbqbert_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38820, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(pbqbert_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(pbqbert_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(pbqbert_state, plate_w)) @@ -1868,7 +2750,7 @@ INPUT_CHANGED_MEMBER(kingman_state::input_changed) static MACHINE_CONFIG_START( kingman, kingman_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(kingman_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(kingman_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(kingman_state, plate_w)) @@ -1965,16 +2847,16 @@ void tmtron_state::update_int1() static INPUT_PORTS_START( tmtron ) PORT_START("IN.0") // D12 INT1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_16WAY // separate directional buttons, hence 16way + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_START("IN.1") // D13 INT1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_16WAY // " + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_START("IN.2") // D14 INT1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_16WAY // " + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_START("IN.3") // D15 INT1 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_16WAY // " + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL) PORT_START("IN.4") // INT0 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0) @@ -1989,7 +2871,7 @@ INPUT_CHANGED_MEMBER(tmtron_state::input_changed) static MACHINE_CONFIG_START( tmtron, tmtron_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation - RC osc. + MCFG_CPU_ADD("maincpu", HD38800, 400000) // approximation MCFG_HMCS40_WRITE_R_CB(0, WRITE8(tmtron_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(1, WRITE8(tmtron_state, plate_w)) MCFG_HMCS40_WRITE_R_CB(2, WRITE8(tmtron_state, plate_w)) @@ -2013,6 +2895,100 @@ MACHINE_CONFIG_END /*************************************************************************** + VTech Invaders (manufactured in Taiwan) + * Hitachi HD38750A45 MCU + * cyan/red VFD display Futaba DM-26Z 1G, with bezel + + known releases: + - USA: Invaders/Sonic Invader + - UK: Cosmic Invader, published by Grandstand + - UK: Galactic Invaders, published by Prinztronic + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class vinvader_state : public hh_hmcs40_state +{ +public: + vinvader_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_hmcs40_state(mconfig, type, tag) + { } + + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE16_MEMBER(grid_w); +}; + +// handlers + +WRITE8_MEMBER(vinvader_state::plate_w) +{ + // R1x-R3x(,D4-D6): vfd matrix plate + int shift = (offset - HMCS40_PORT_R1X) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // update display + UINT16 plate = BITSWAP16(m_plate,15,11,7,3,10,6,14,2,9,5,13,1,8,4,12,0); + display_matrix(12, 9, plate, m_grid); +} + +WRITE16_MEMBER(vinvader_state::grid_w) +{ + // D0: speaker out + m_speaker->level_w(data & 1); + + // D7-D15: vfd matrix grid + m_grid = data >> 7 & 0x1ff; + + // D4-D6: more plates (update display there) + plate_w(space, 3 + HMCS40_PORT_R1X, data >> 4 & 7); +} + + +// config + +static INPUT_PORTS_START( vinvader ) + PORT_START("IN.0") // port R0x + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // port D + PORT_CONFNAME( 0x0002, 0x0000, "Skill Level") + PORT_CONFSETTING( 0x0000, "1" ) + PORT_CONFSETTING( 0x0002, "2" ) + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0xfff5, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( vinvader, vinvader_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", HD38750, 400000) // approximation + MCFG_HMCS40_READ_R_CB(0, IOPORT("IN.0")) + MCFG_HMCS40_WRITE_R_CB(1, WRITE8(vinvader_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(2, WRITE8(vinvader_state, plate_w)) + MCFG_HMCS40_WRITE_R_CB(3, WRITE8(vinvader_state, plate_w)) + MCFG_HMCS40_WRITE_D_CB(WRITE16(vinvader_state, grid_w)) + MCFG_HMCS40_READ_D_CB(IOPORT("IN.1")) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_hmcs40_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_hmcs40_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Game driver(s) ***************************************************************************/ @@ -2024,6 +3000,13 @@ ROM_START( bambball ) ROM_END +ROM_START( bmboxing ) + ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "hd38750a07", 0x0000, 0x0800, CRC(7f33e259) SHA1(c5fcdd6bf060c96666354f09f0570c754f6ed4e0) ) + ROM_CONTINUE( 0x0f00, 0x0080 ) +ROM_END + + ROM_START( bfriskyt ) ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "hd38800a77", 0x0000, 0x1000, CRC(a2445c4f) SHA1(0aaccfec90b66d27dae194d4462d88e654c41578) ) @@ -2038,6 +3021,13 @@ ROM_START( packmon ) ROM_END +ROM_START( msthawk ) + ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "hd38800a73", 0x0000, 0x1000, CRC(a4f9a523) SHA1(465f06b02e2e7d2277218fd447830725790a816c) ) + ROM_CONTINUE( 0x1e80, 0x0100 ) +ROM_END + + ROM_START( zackman ) ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "hd38820a49", 0x0000, 0x1000, CRC(b97f5ef6) SHA1(7fe20e8107361caf9ea657e504be1f8b10b8b03f) ) @@ -2045,6 +3035,20 @@ ROM_START( zackman ) ROM_END +ROM_START( bdoramon ) + ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "hd38800b43", 0x0000, 0x1000, CRC(9387ca42) SHA1(8937e208934b34bd9f49700aa50287dfc8bda76c) ) + ROM_CONTINUE( 0x1e80, 0x0100 ) +ROM_END + + +ROM_START( machiman ) + ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "hd38820a85", 0x0000, 0x1000, CRC(894b4954) SHA1(cab49638a326b031aa548301beb16f818759ef62) ) + ROM_CONTINUE( 0x1e80, 0x0100 ) +ROM_END + + ROM_START( alnattck ) ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD( "hd38800a25", 0x0000, 0x1000, CRC(18b50869) SHA1(11e9d5f7b4ae818b077b0ee14a3b43190e20bff3) ) @@ -2100,9 +3104,30 @@ ROM_START( epacman2 ) ROM_END -ROM_START( msthawk ) +ROM_START( ghalien ) ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) - ROM_LOAD( "hd38800a73", 0x0000, 0x1000, CRC(a4f9a523) SHA1(465f06b02e2e7d2277218fd447830725790a816c) ) + ROM_LOAD( "hd38800a04", 0x0000, 0x1000, CRC(019c3328) SHA1(9f1029c5c479f78350952c4f18747341ba5ea7a0) ) + ROM_CONTINUE( 0x1e80, 0x0100 ) +ROM_END + + +ROM_START( gckong ) + ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "hd38800b01", 0x0000, 0x1000, CRC(d5a2cca3) SHA1(37bb5784383daab672ed1e0e2362c7a40d8d9b3f) ) + ROM_CONTINUE( 0x1e80, 0x0100 ) +ROM_END + + +ROM_START( gdigdug ) + ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "hd38820a69", 0x0000, 0x1000, CRC(501165a9) SHA1(8a15d00c4aa66e870cadde33148426463560d2e6) ) + ROM_CONTINUE( 0x1e80, 0x0100 ) +ROM_END + + +ROM_START( mwcbaseb ) + ROM_REGION( 0x2000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "hd38820a09", 0x0000, 0x1000, CRC(25ba7dc0) SHA1(69e0a867fdcf07b454b1faf835e576ae782432c0) ) ROM_CONTINUE( 0x1e80, 0x0100 ) ROM_END @@ -2128,18 +3153,28 @@ ROM_START( tmtron ) ROM_END +ROM_START( vinvader ) + ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "hd38750a45", 0x0000, 0x0800, CRC(e02d94d9) SHA1(d4679abbb9c6778e5e853aa6c2b90dee1d21c9dd) ) + ROM_CONTINUE( 0x0f00, 0x0080 ) +ROM_END + + /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Basketball - Dribble Away", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1979, bambball, 0, 0, bambball, bambball, driver_device, 0, "Bambino", "Dribble Away Basketball", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1979, bmboxing, 0, 0, bmboxing, bmboxing, driver_device, 0, "Bambino", "Knock-Em Out Boxing", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, bfriskyt, 0, 0, bfriskyt, bfriskyt, driver_device, 0, "Bandai", "Frisky Tom (Bandai)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1981, packmon, 0, 0, packmon, packmon, driver_device, 0, "Bandai", "Packri Monster", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, msthawk, 0, 0, msthawk, msthawk, driver_device, 0, "Bandai (Mattel license)", "Star Hawk (Mattel)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1983, zackman, 0, 0, zackman, zackman, driver_device, 0, "Bandai", "Zackman", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1983, bdoramon, 0, 0, bdoramon, bdoramon, driver_device, 0, "Bandai", "Dokodemo Dorayaki Doraemon", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1984, machiman, 0, 0, machiman, machiman, driver_device, 0, "Bandai", "Machine Man", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1981, alnattck, 0, 0, alnattck, alnattck, driver_device, 0, "Coleco", "Alien Attack", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, cdkong, 0, 0, cdkong, cdkong, driver_device, 0, "Coleco", "Donkey Kong (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_IMPERFECT_SOUND ) -CONS( 1982, cgalaxn, 0, 0, cgalaxn, cgalaxn, driver_device, 0, "Coleco", "Galaxian (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) +CONS( 1982, cgalaxn, 0, 0, cgalaxn, cgalaxn, driver_device, 0, "Coleco", "Galaxian (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_IMPERFECT_SOUND ) CONS( 1981, cpacman, 0, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 29)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1981, cpacmanr1, cpacman, 0, cpacman, cpacman, driver_device, 0, "Coleco", "Pac-Man (Coleco, Rev. 28)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1983, cmspacmn, 0, 0, cmspacmn, cmspacmn, driver_device, 0, "Coleco", "Ms. Pac-Man (Coleco)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) @@ -2147,8 +3182,15 @@ CONS( 1983, cmspacmn, 0, 0, cmspacmn, cmspacmn, driver_device, 0, "Colec CONS( 1981, egalaxn2, 0, 0, egalaxn2, egalaxn2, driver_device, 0, "Entex", "Galaxian 2 (Entex)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1981, epacman2, 0, 0, epacman2, epacman2, driver_device, 0, "Entex", "Pac Man 2 (Entex)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1980, ghalien, 0, 0, ghalien, ghalien, driver_device, 0, "Gakken", "Heiankyo Alien (Gakken)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1982, gckong, 0, 0, gckong, gckong, driver_device, 0, "Gakken", "Crazy Kong (Gakken)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) +CONS( 1983, gdigdug, 0, 0, gdigdug, gdigdug, driver_device, 0, "Gakken", "Dig Dug (Gakken)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) + +CONS( 1980, mwcbaseb, 0, 0, mwcbaseb, mwcbaseb, driver_device, 0, "Mattel", "World Championship Baseball", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1983, pbqbert, 0, 0, pbqbert, pbqbert, driver_device, 0, "Parker Brothers", "Q*Bert (Parker Brothers)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, kingman, 0, 0, kingman, kingman, driver_device, 0, "Tomy", "Kingman", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1984, tmtron, 0, 0, tmtron, tmtron, driver_device, 0, "Tomy", "Tron (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) + +CONS( 1981, vinvader, 0, 0, vinvader, vinvader, driver_device, 0, "VTech", "Invaders (VTech)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK | GAME_NOT_WORKING ) diff --git a/src/mess/drivers/hh_pic16.c b/src/mess/drivers/hh_pic16.c index 29bebc43685..fe5bed0aed7 100644 --- a/src/mess/drivers/hh_pic16.c +++ b/src/mess/drivers/hh_pic16.c @@ -9,6 +9,7 @@ serial device etc. ----------------------------------------------------------- @036 1655A 1979, Ideal Maniac + *061 1655A 1980, Lakeside Le Boom (have dump) *110 1650A 1979, Tiger Rocket Pinball *192 1650 19??, (a phone dialer, have dump) *255 1655 19??, (a talking clock, have dump) diff --git a/src/mess/drivers/hh_tms1k.c b/src/mess/drivers/hh_tms1k.c index 6e3e26b4e0e..0bf1bfcebc4 100644 --- a/src/mess/drivers/hh_tms1k.c +++ b/src/mess/drivers/hh_tms1k.c @@ -9,56 +9,61 @@ Let's use this driver for a list of known devices and their serials, excluding TI's own products (see ticalc1x.c, tispeak.c) - serial device etc. + serial device etc. -------------------------------------------------------------------- - @CP0904A TMS0970 1977, Milton Bradley Comp IV - @MP0905B TMS0970 1977, Parker Brothers Codename Sector - *MP0168 TMS1000? 1979, Conic Basketball - @MP0914 TMS1000 1979, Entex Baseball 1 - @MP0923 TMS1000 1979, Entex Baseball 2 - @MP1030 TMS1100 1980, APF Mathemagician - @MP1133 TMS1470 1979, Kosmos Astro - @MP1204 TMS1100 1980, Entex Baseball 3 - @MP1211 TMS1100 1980, Entex Space Invader - *MP1221 TMS1100 1980, Entex Raise The Devil - *MP1312 TMS1100 198?, Tandy/RadioShack Science Fair Microcomputer Trainer - *MP2105 TMS1370 1979, Gakken Poker, Entex Electronic Poker - *MP2139 TMS1370? 1982, Gakken Galaxy Invader 1000 - *MP2788 ? 1980, Bandai Flight Time (? note: VFD-capable) - @MP3226 TMS1000 1978, Milton Bradley Simon - *MP3301 TMS1000 1979, Milton Bradley Big Trak - *MP3320A TMS1000 1979, Coleco Head to Head Basketball - MP3403 TMS1100 1978, Marx Electronic Bowling -> elecbowl.c - @MP3404 TMS1100 1978, Parker Brothers Merlin - @MP3405 TMS1100 1979, Coleco Amaze-A-Tron - @MP3438A TMS1100 1979, Kenner Star Wars Electronic Battle Command - MP3450A TMS1100 1979, MicroVision cartridge: Blockbuster - MP3454 TMS1100 1979, MicroVision cartridge: Star Trek Phaser Strike - MP3455 TMS1100 1980, MicroVision cartridge: Pinball - MP3457 TMS1100 1979, MicroVision cartridge: Mindbuster - MP3474 TMS1100 1979, MicroVision cartridge: Vegas Slots - MP3475 TMS1100 1979, MicroVision cartridge: Bowling - @MP3476 TMS1100 1979, Milton Bradley Super Simon - MP3479 TMS1100 1980, MicroVision cartridge: Baseball - MP3481 TMS1100 1979, MicroVision cartridge: Connect Four - MP3496 TMS1100 1980, MicroVision cartridge: Sea Duel - M34009 TMS1100 1981, MicroVision cartridge: Alien Raiders (note: MP3498, MP3499, M34000, ..) - M34017 TMS1100 1981, MicroVision cartridge: Cosmic Hunter - M34047 TMS1100 1982, MicroVision cartridge: Super Blockbuster - @MP6100A TMS0980 1979, Ideal Electronic Detective - @MP6101B TMS0980 1979, Parker Brothers Stop Thief - *MP6361 ? 1983, Defender Strikes (? note: VFD-capable) - *MP7303 TMS1400? 19??, Tiger 7-in-1 Sports Stadium - @MP7313 TMS1400 1980, Parker Brothers Bank Shot - @MP7314 TMS1400 1980, Parker Brothers Split Second - *MP7324 TMS1400? 1985, Coleco Talking Teacher - MP7332 TMS1400 1981, Milton Bradley Dark Tower -> mbdtower.c - @MP7334 TMS1400 1981, Coleco Total Control 4 - *MP7573 ? 1981, Entex Select-a-Game cartridge: Football (? note: 40-pin, VFD-capable) + @CP0904A TMS0970 1977, Milton Bradley Comp IV + @MP0905B TMS0970 1977, Parker Brothers Codename Sector + *MP0168 TMS1000? 1979, Conic Basketball + @MP0914 TMS1000 1979, Entex Baseball 1 + @MP0923 TMS1000 1979, Entex Baseball 2 + @MP1030 TMS1100 1980, APF Mathemagician + @MP1133 TMS1470 1979, Kosmos Astro + @MP1204 TMS1100 1980, Entex Baseball 3 + @MP1211 TMS1100 1980, Entex Space Invader + @MP1221 TMS1100 1980, Entex Raise The Devil + *MP1296 TMS1100? 1982, Entex Black Knight + *MP1312 TMS1100 198?, Tandy/RadioShack Science Fair Microcomputer Trainer + @MP1525 TMS1170 1980, Coleco Head to Head Baseball + @MP2105 TMS1370 1979, Gakken Poker + *MP2139 TMS1370? 1982, Gakken Galaxy Invader 1000 + *MP2788 ? 1980, Bandai Flight Time (? note: VFD-capable) + *MP3208 TMS1000 1977, Milton Bradley Electronic Battleship (1977, model 4750A or B) + @MP3226 TMS1000 1978, Milton Bradley Simon (model 4850) + @MP3301A TMS1000 1979, Milton Bradley Big Trak + *MP3320A TMS1000 1979, Coleco Head to Head Basketball + MP3403 TMS1100 1978, Marx Electronic Bowling -> elecbowl.c + @MP3404 TMS1100 1978, Parker Brothers Merlin + @MP3405 TMS1100 1979, Coleco Amaze-A-Tron + @MP3438A TMS1100 1979, Kenner Star Wars Electronic Battle Command + MP3450A TMS1100 1979, MicroVision cartridge: Blockbuster + MP3454 TMS1100 1979, MicroVision cartridge: Star Trek Phaser Strike + MP3455 TMS1100 1980, MicroVision cartridge: Pinball + MP3457 TMS1100 1979, MicroVision cartridge: Mindbuster + @MP3460 TMS1100 1980, Coleco Head to Head Football + MP3474 TMS1100 1979, MicroVision cartridge: Vegas Slots + MP3475 TMS1100 1979, MicroVision cartridge: Bowling + @MP3476 TMS1100 1979, Milton Bradley Super Simon + MP3479 TMS1100 1980, MicroVision cartridge: Baseball + MP3481 TMS1100 1979, MicroVision cartridge: Connect Four + MP3496 TMS1100 1980, MicroVision cartridge: Sea Duel + M34009 TMS1100 1981, MicroVision cartridge: Alien Raiders (note: MP3498, MP3499, M34000, ..) + M34017 TMS1100 1981, MicroVision cartridge: Cosmic Hunter + M34047 TMS1100 1982, MicroVision cartridge: Super Blockbuster + @MP6100A TMS0980 1979, Ideal Electronic Detective + @MP6101B TMS0980 1979, Parker Brothers Stop Thief + *MP6361 ? 1983, Defender Strikes (? note: VFD-capable) + *MP7303 TMS1400? 19??, Tiger 7-in-1 Sports Stadium + @MP7313 TMS1400 1980, Parker Brothers Bank Shot + @MP7314 TMS1400 1980, Parker Brothers Split Second + *MP7324 TMS1400? 1985, Coleco Talking Teacher + MP7332 TMS1400 1981, Milton Bradley Dark Tower -> mbdtower.c + @MP7334 TMS1400 1981, Coleco Total Control 4 + @MP7351 TMS1400CR 1982, Parker Brothers Master Merlin + *MP7573 ? 1981, Entex Select-a-Game cartridge: Football 4 (? note: 40-pin, VFD-capable) inconsistent: - *MPF553 TMS1670 1980, Entex Jackpot Gin Rummy Black Jack + @MPF553 TMS1670 1980, Gakken Jackpot: Gin Rummy & Black Jack *M95041 ? 1983, Tsukuda Game Pachinko (? note: 40-pin, VFD-capable) @CD7282SL TMS1100 1981, Tandy/RadioShack Tandy-12 (serial is similar to TI Speak & Spell series?) @@ -68,30 +73,37 @@ TODO: - verify output PLA and microinstructions PLA for MCUs that have been dumped electronically (mpla is usually the default, opla is often custom) - - unknown MCU clocks for some: TMS1000 and TMS1100 RC curve is documented in - the data manual, but for TMS1400 it's unknown. TMS0970/0980 osc. is on-die. + - unknown MCU clocks for some: TMS1000 RC curve is documented in the data manual, + but not for newer ones (rev. E or TMS1400 MCUs). TMS0970/0980 osc. is on-die. - some of the games rely on the fact that faster/longer strobed leds appear - brighter: tc4(offensive players), bankshot(cue ball), ... + brighter: tc4/h2hfootb(offense), bankshot(cue ball), ... - add softwarelist for tc4 cartridges? - stopthiep: unable to start a game (may be intentional?) ***************************************************************************/ #include "includes/hh_tms1k.h" +#include "sound/beep.h" // internal artwork #include "amaztron.lh" #include "astro.lh" #include "bankshot.lh" +#include "bigtrak.lh" #include "cnsector.lh" +#include "comp4.lh" #include "ebball.lh" #include "ebball2.lh" #include "ebball3.lh" #include "einvader.lh" // test-layout(but still playable) #include "elecdet.lh" -#include "comp4.lh" +#include "gjackpot.lh" +#include "gpoker.lh" +#include "h2hbaseb.lh" +#include "h2hfootb.lh" #include "mathmagi.lh" #include "merlin.lh" // clickable +#include "mmerlin.lh" // clickable #include "simon.lh" // clickable #include "ssimon.lh" // clickable #include "splitsec.lh" @@ -100,6 +112,8 @@ #include "tandy12.lh" // clickable #include "tc4.lh" +#include "hh_tms1k_test.lh" // common test-layout - use external artwork + // machine_start/reset @@ -347,7 +361,7 @@ WRITE16_MEMBER(mathmagi_state::write_r) WRITE16_MEMBER(mathmagi_state::write_o) { - // O1-O7: led segments A-G + // O1-O7: digit segments A-G // O0: N/C data = (data << 1 & 0xfe) | (data >> 7 & 1); // because opla is unknown m_o = data; @@ -355,6 +369,7 @@ WRITE16_MEMBER(mathmagi_state::write_o) READ8_MEMBER(mathmagi_state::read_k) { + // K: multiplexed inputs return read_inputs(6); } @@ -405,9 +420,7 @@ static INPUT_PORTS_START( mathmagi ) PORT_CONFNAME( 0x01, 0x00, "Players") PORT_CONFSETTING( 0x00, "1" ) PORT_CONFSETTING( 0x01, "2" ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END @@ -528,7 +541,7 @@ WRITE16_MEMBER(amaztron_state::write_r) WRITE16_MEMBER(amaztron_state::write_o) { - // O0-O6: led segments A-G + // O0-O6: digit segments A-G // O7: N/C m_o = data & 0x7f; prepare_display(); @@ -536,6 +549,7 @@ WRITE16_MEMBER(amaztron_state::write_o) READ8_MEMBER(amaztron_state::read_k) { + // K: multiplexed inputs UINT8 k = read_inputs(6); // the 5th column is tied to K4+K8 @@ -548,46 +562,44 @@ READ8_MEMBER(amaztron_state::read_k) static INPUT_PORTS_START( amaztron ) PORT_START("IN.0") // R0 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Button 1") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Button 6") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Button 11") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Button 16") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Button 21") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Grid 1") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Grid 6") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Grid 11") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Grid 16") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Z) PORT_NAME("Grid 21") PORT_START("IN.1") // R1 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Button 2") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Button 7") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Button 12") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Button 17") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Button 22") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Grid 2") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Grid 7") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Grid 12") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Grid 17") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Grid 22") PORT_START("IN.2") // R2 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Button 3") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Button 8") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Button 13") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Button 18") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Button 23") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Grid 3") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Grid 8") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Grid 13") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Grid 18") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Grid 23") PORT_START("IN.3") // R3 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Button 4") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_NAME("Button 9") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Button 14") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Button 19") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Button 24") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Grid 4") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_NAME("Grid 9") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Grid 14") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Grid 19") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Grid 24") PORT_START("IN.4") // R4 - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Button 5") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_NAME("Button 10") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Button 15") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Button 20") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Button 25") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Grid 5") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_NAME("Grid 10") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Grid 15") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Grid 20") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("Grid 25") PORT_START("IN.5") // R5 PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Game Select") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("Game Start") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x1c, IP_ACTIVE_HIGH, IPT_UNUSED) INPUT_PORTS_END static MACHINE_CONFIG_START( amaztron, amaztron_state ) @@ -615,6 +627,267 @@ MACHINE_CONFIG_END /*************************************************************************** + Coleco Head to Head Baseball + * PCB labels Coleco rev C 73891/2 + * TMS1170NLN MP1525-N2 (die labeled MP1525) + * 9-digit cyan VFD display, and other LEDs behind bezel, 1bit sound + + known releases: + - USA: Head to Head Baseball + - Japan: Computer Baseball, published by Tsukuda + +***************************************************************************/ + +class h2hbaseb_state : public hh_tms1k_state +{ +public: + h2hbaseb_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); + + void set_clock(); + DECLARE_INPUT_CHANGED_MEMBER(skill_switch); + +protected: + virtual void machine_reset(); +}; + +// handlers + +void h2hbaseb_state::prepare_display() +{ + memset(m_display_segmask, ~0, sizeof(m_display_segmask)); + display_matrix_seg(9, 9, (m_r & 0x100) | m_o, (m_r & 0xff) | (m_r >> 1 & 0x100), 0x7f); +} + +WRITE16_MEMBER(h2hbaseb_state::write_r) +{ + // R10: speaker out + m_speaker->level_w(data >> 10 & 1); + + // R4-R7: input mux + m_inp_mux = data >> 4 & 0xf; + + // R0-R7,R9: select vfd digit/led + // R8: led state + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(h2hbaseb_state::write_o) +{ + // O0-O6: digit segments A-G + // O7: N/C + m_o = data; + prepare_display(); +} + +READ8_MEMBER(h2hbaseb_state::read_k) +{ + // K: multiplexed inputs (note: K8(Vss row) is always on) + return m_inp_matrix[4]->read() | read_inputs(4); +} + + +// config + +static INPUT_PORTS_START( h2hbaseb ) + PORT_START("IN.0") // R4 + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("N") + PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // R5 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("B") + PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.2") // R6 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("S") + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.3") // R7 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Curve") // these two buttons appear twice on the board + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Fast Pitch") + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.4") // Vss! + PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Swing") + + PORT_START("IN.5") // fake + PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, h2hbaseb_state, skill_switch, NULL) + PORT_CONFSETTING( 0x00, "1" ) + PORT_CONFSETTING( 0x01, "2" ) +INPUT_PORTS_END + +INPUT_CHANGED_MEMBER(h2hbaseb_state::skill_switch) +{ + set_clock(); +} + + +void h2hbaseb_state::set_clock() +{ + // MCU clock is from an RC circuit with C=47pf, and R value is depending on + // skill switch: R=51K(1) or 43K(2) + m_maincpu->set_unscaled_clock((m_inp_matrix[5]->read() & 1) ? 400000 : 350000); +} + +void h2hbaseb_state::machine_reset() +{ + hh_tms1k_state::machine_reset(); + set_clock(); +} + +static MACHINE_CONFIG_START( h2hbaseb, h2hbaseb_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1170, 350000) // see set_clock + MCFG_TMS1XXX_READ_K_CB(READ8(h2hbaseb_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(h2hbaseb_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(h2hbaseb_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_h2hbaseb) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Coleco Head to Head Football + * TMS1100NLLE (rev. E!) MP3460 (die labeled MP3460) + * 2*SN75492N LED display drivers, 9-digit LED grid, 1bit sound + + LED electronic football game. To distinguish between offense and defense, + offense blips (should) appear brighter. + +***************************************************************************/ + +class h2hfootb_state : public hh_tms1k_state +{ +public: + h2hfootb_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); +}; + +// handlers + +void h2hfootb_state::prepare_display() +{ + memset(m_display_segmask, ~0, sizeof(m_display_segmask)); + display_matrix_seg(9, 9, m_o | (m_r >> 1 & 0x100), (m_r & 0x1ff), 0x7f); +} + +WRITE16_MEMBER(h2hfootb_state::write_r) +{ + // R10: speaker out + m_speaker->level_w(data >> 10 & 1); + + // R0-R8: input mux + m_inp_mux = data & 0x1ff; + + // R0-R8: select led + // R9: led between digits + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(h2hfootb_state::write_o) +{ + // O0-O7: digit segments A-G,A' + m_o = data; + prepare_display(); +} + +READ8_MEMBER(h2hfootb_state::read_k) +{ + // K: multiplexed inputs + UINT8 k = 0; + + // compared to the usual setup, the button matrix is rotated + for (int i = 0; i < 4; i++) + if (m_inp_matrix[i]->read() & m_inp_mux) + k |= 1 << i; + + return k; +} + + +// config + +static INPUT_PORTS_START( h2hfootb ) + PORT_START("IN.0") // K1 + PORT_CONFNAME( 0x03, 0x01, "Players" ) + PORT_CONFSETTING( 0x01, "1" ) + PORT_CONFSETTING( 0x02, "2" ) + + PORT_START("IN.1") // K2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_TOGGLE PORT_NAME("P1 Play Selector") // pass + PORT_BIT( 0x02, 0x02, IPT_SPECIAL ) PORT_CONDITION("IN.1", 0x01, EQUALS, 0x00) // run/kick + + PORT_START("IN.2") // K4 + PORT_CONFNAME( 0x03, 0x01, "Skill Level" ) + PORT_CONFSETTING( 0x01, "1" ) + PORT_CONFSETTING( 0x02, "2" ) + + PORT_START("IN.3") // K8 + PORT_BIT( 0x001, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Left/Right") + PORT_BIT( 0x002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x004, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x008, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Kick/Pass") + PORT_BIT( 0x010, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Display") + PORT_BIT( 0x020, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x040, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY +INPUT_PORTS_END + +static MACHINE_CONFIG_START( h2hfootb, h2hfootb_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1100, 325000) // approximation - RC osc. R=39K, C=100pf, but unknown RC curve + MCFG_TMS1XXX_READ_K_CB(READ8(h2hfootb_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(h2hfootb_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(h2hfootb_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_h2hfootb) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Coleco Total Control 4 * TMS1400NLL MP7334-N2 (die labeled MP7334) * 2x2-digit 7seg LED display + 4 LEDs, LED grid display, 1bit sound @@ -662,9 +935,7 @@ public: void tc4_state::prepare_display() { - m_display_wait = 50; - - // R5,7,8,9 are 7segs + // R5,R7-R9 are 7segs for (int y = 0; y < 10; y++) if (y >= 5 && y <= 9 && y != 6) m_display_segmask[y] = 0x7f; @@ -680,10 +951,11 @@ WRITE16_MEMBER(tc4_state::write_r) // R0-R5: input mux // R9: to cartridge slot - m_inp_mux = data & 0x23f; + m_inp_mux = (data & 0x3f) | (data >> 3 & 0x40); - // R6: led column 8 - // +other columns + // R0-R4: select led + // R6: led 8 state + // R5,R7-R9: select digit m_r = data; prepare_display(); } @@ -697,13 +969,8 @@ WRITE16_MEMBER(tc4_state::write_o) READ8_MEMBER(tc4_state::read_k) { - UINT8 k = read_inputs(6); - - // read from cartridge - if (m_inp_mux & 0x200) - k |= m_inp_matrix[6]->read(); - - return k; + // K: multiplexed inputs + return read_inputs(7); } @@ -793,7 +1060,6 @@ MACHINE_CONFIG_END are denoted by words ("left", "center", "short", etc), and an alternate one with little guys drawn next to the LEDs. - lamp translation table: led LDzz from game PCB = MESS lampyx: LD0 = - LD10 = lamp12 LD20 = lamp42 LD30 = lamp60 @@ -849,13 +1115,13 @@ WRITE16_MEMBER(ebball_state::write_o) { // O0-O6: led state // O7: N/C - m_o = data; + m_o = data & 0x7f; prepare_display(); } READ8_MEMBER(ebball_state::read_k) { - // note: K8(Vss row) is always on + // K: multiplexed inputs (note: K8(Vss row) is always on) return m_inp_matrix[5]->read() | read_inputs(5); } @@ -927,7 +1193,6 @@ MACHINE_CONFIG_END The sequel to Entex Baseball, this version keeps up with score and innings. As its predecessor, the pitcher controls are on a separate joypad. - lamp translation table: led zz from game PCB = MESS lampyx: 00 = - 10 = lamp94 20 = lamp74 30 = lamp50 @@ -960,7 +1225,7 @@ public: void ebball2_state::prepare_display() { - // the first 3 are 7segs + // R0-R2 are 7segs for (int y = 0; y < 3; y++) m_display_segmask[y] = 0x7f; @@ -989,6 +1254,7 @@ WRITE16_MEMBER(ebball2_state::write_o) READ8_MEMBER(ebball2_state::read_k) { + // K: multiplexed inputs return read_inputs(4); } @@ -1046,14 +1312,13 @@ MACHINE_CONFIG_END Entex Electronic Baseball 3 * PCBs are labeled: ZENY - * TMS1100NLL 6007 MP1204 (die labeled MP1204) + * TMS1100NLL 6007 MP1204 (rev. E!) (die labeled MP1204) * 2*SN75492N LED display driver * 4 7seg LEDs, and other LEDs behind bezel, 1bit sound This is another improvement over Entex Baseball, where gameplay is a bit more varied. Like the others, the pitcher controls are on a separate joypad. - lamp translation table: led zz from game PCB = MESS lampyx: note: unlabeled panel leds are listed here as Sz, Bz, Oz, Iz, z left-to-right @@ -1137,6 +1402,7 @@ WRITE16_MEMBER(ebball3_state::write_o) READ8_MEMBER(ebball3_state::read_k) { + // K: multiplexed inputs return read_inputs(3); } @@ -1264,7 +1530,7 @@ void einvader_state::prepare_display() // R7-R9 are 7segs for (int y = 7; y < 10; y++) m_display_segmask[y] = 0x7f; - + display_matrix(8, 10, m_o, m_r); } @@ -1291,8 +1557,8 @@ WRITE16_MEMBER(einvader_state::write_o) static INPUT_PORTS_START( einvader ) PORT_START("IN.0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // separate directional buttons, hence 16way - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // " + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_CONFNAME( 0x08, 0x00, DEF_STR( Difficulty ) ) PORT_CHANGED_MEMBER(DEVICE_SELF, einvader_state, difficulty_switch, NULL) PORT_CONFSETTING( 0x00, "Amateur" ) PORT_CONFSETTING( 0x08, "Professional" ) @@ -1343,6 +1609,412 @@ MACHINE_CONFIG_END /*************************************************************************** + Entex Raise The Devil + * TMS1100 MP1221 (die labeled MP1221) + * 4 7seg LEDs(rightmost one unused), and other LEDs behind bezel, 1bit sound + + lamp translation table: led zz from game PCB = MESS lampyx: + + 0 = - 10 = lamp44 20 = lamp53 30 = lamp95 40 = lamp92 + 1 = lamp30 11 = lamp45 21 = lamp54 31 = lamp85 41 = lamp93 + 2 = lamp31 12 = - 22 = - 32 = lamp65 42 = lamp90 + 3 = lamp32 13 = lamp50 23 = lamp60 33 = lamp74 43 = lamp91 + 4 = lamp33 14 = lamp51 24 = lamp61 34 = lamp70 + 5 = lamp34 15 = lamp52 25 = lamp62 35 = lamp71 + 6 = lamp40 16 = - 26 = lamp63 36 = lamp80 + 7 = lamp41 17 = lamp72 27 = lamp64 37 = lamp81 + 8 = lamp42 18 = lamp73 28 = lamp84 38 = lamp82 + 9 = lamp43 19 = - 29 = lamp94 39 = lamp83 + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class raisedvl_state : public hh_tms1k_state +{ +public: + raisedvl_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); + + void set_clock(); + DECLARE_INPUT_CHANGED_MEMBER(skill_switch); + +protected: + virtual void machine_reset(); +}; + +// handlers + +void raisedvl_state::prepare_display() +{ + // R0-R2 are 7segs + for (int y = 0; y < 3; y++) + m_display_segmask[y] = 0x7f; + + display_matrix(7, 10, m_o, m_r); +} + +WRITE16_MEMBER(raisedvl_state::write_r) +{ + // R10: speaker out + m_speaker->level_w(data >> 10 & 1); + + // R0,R1: input mux + m_inp_mux = data & 3; + + // R0-R9: led select + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(raisedvl_state::write_o) +{ + // O0-O6: led state + // O7: N/C + m_o = data & 0x7f; + prepare_display(); +} + +READ8_MEMBER(raisedvl_state::read_k) +{ + // K: multiplexed inputs + return read_inputs(2) & 0xf; +} + + +// config + +static INPUT_PORTS_START( raisedvl ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Shoot") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Left Flipper") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Right Flipper") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // R1 (only bit 0) + PORT_CONFNAME( 0x31, 0x00, "Skill Level" ) PORT_CHANGED_MEMBER(DEVICE_SELF, raisedvl_state, skill_switch, NULL) + PORT_CONFSETTING( 0x00, "1" ) + PORT_CONFSETTING( 0x10, "2" ) + PORT_CONFSETTING( 0x11, "3" ) + PORT_CONFSETTING( 0x21, "4" ) +INPUT_PORTS_END + +INPUT_CHANGED_MEMBER(raisedvl_state::skill_switch) +{ + set_clock(); +} + + +void raisedvl_state::set_clock() +{ + // MCU clock is from an RC circuit with C=47pf, R=47K by default. Skills + // 2 and 3 add a 150K resistor in parallel, and skill 4 adds a 100K one. + // 0: R=47K -> ~350kHz + // 2,3: R=35K8 -> ~425kHz (combined) + // 4: R=32K -> ~465kHz (combined) + UINT8 inp = m_inp_matrix[1]->read(); + m_maincpu->set_unscaled_clock((inp & 0x20) ? 465000 : ((inp & 0x10) ? 425000 : 350000)); +} + +void raisedvl_state::machine_reset() +{ + hh_tms1k_state::machine_reset(); + set_clock(); +} + +static MACHINE_CONFIG_START( raisedvl, raisedvl_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1100, 350000) // see set_clock + MCFG_TMS1XXX_READ_K_CB(READ8(raisedvl_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(raisedvl_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(raisedvl_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_tms1k_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Gakken Poker + * PCB label POKER. gakken + * TMS1370 MP2105 (die labeled MP2105) + * 11-digit cyan VFD display Itron FG1114B, oscillator sound + + known releases: + - Japan: Poker + - USA: Electronic Poker, published by Entex + +***************************************************************************/ + +class gpoker_state : public hh_tms1k_state +{ +public: + gpoker_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag), + m_beeper(*this, "beeper") + { } + + required_device<beep_device> m_beeper; + + void prepare_display(); + virtual DECLARE_WRITE16_MEMBER(write_r); + virtual DECLARE_WRITE16_MEMBER(write_o); + virtual DECLARE_READ8_MEMBER(read_k); + +protected: + virtual void machine_reset(); +}; + +// handlers + +void gpoker_state::prepare_display() +{ + memset(m_display_segmask, ~0, sizeof(m_display_segmask)); + display_matrix_seg(12, 11, m_o | (m_r >> 3 & 0xf00), m_r & 0x7ff, 0x7f); +} + +WRITE16_MEMBER(gpoker_state::write_r) +{ + // R15: enable beeper + m_beeper->set_state(data >> 15 & 1); + + // R0-R6: input mux + m_inp_mux = data & 0x7f; + + // R0-R10: select digit + // R11-R14: card symbols + m_r = data; + prepare_display(); +} + +WRITE16_MEMBER(gpoker_state::write_o) +{ + // O0-O7: digit segments A-G,H + m_o = data; + prepare_display(); +} + +READ8_MEMBER(gpoker_state::read_k) +{ + // K: multiplexed inputs + return read_inputs(7); +} + + +// config + +/* physical button layout and labels is like this: + + [7] [8] [9] [DL] | (on/off switch) + [4] [5] [6] [BT] + [1] [2] [3] [CA] [CE] + [0] [GO] [T] [AC] +*/ + +static INPUT_PORTS_START( gpoker ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Go") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // R1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.2") // R2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.3") // R3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_D) PORT_NAME("9/Deal") // DL, shares pad with 9 + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear Entry") // CE + + PORT_START("IN.4") // R4 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") + PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.5") // R5 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear All") // AC + + PORT_START("IN.6") // R6 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Call") // CA + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Total") // T + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Bet") // BT +INPUT_PORTS_END + + +void gpoker_state::machine_reset() +{ + hh_tms1k_state::machine_reset(); + m_beeper->set_state(0); +} + +static MACHINE_CONFIG_START( gpoker, gpoker_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1370, 350000) // RC osc. R=47K, C=47pf -> ~350kHz + MCFG_TMS1XXX_READ_K_CB(READ8(gpoker_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(gpoker_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(gpoker_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_gpoker) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("beeper", BEEP, 2405) // astable multivibrator - C1 and C2 are 0.003uF, R1 and R4 are 1K, R2 and R3 are 100K + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Gakken Jackpot: Gin Rummy & Black Jack + * PCB label gakken + * TMS1670 MPF553 (die labeled MPF553) + * 11-digit cyan VFD display Itron FG1114B, oscillator sound + + known releases: + - Japan: Jackpot(?) + - USA: Electronic Jackpot: Gin Rummy & Black Jack, published by Entex + +***************************************************************************/ + +class gjackpot_state : public gpoker_state +{ +public: + gjackpot_state(const machine_config &mconfig, device_type type, const char *tag) + : gpoker_state(mconfig, type, tag) + { } + + virtual DECLARE_WRITE16_MEMBER(write_r); +}; + +// handlers + +WRITE16_MEMBER(gjackpot_state::write_r) +{ + // same as gpoker, only input mux msb is R10 instead of R6 + gpoker_state::write_r(space, offset, data); + m_inp_mux = (data & 0x3f) | (data >> 4 & 0x40); +} + + +// config + +/* physical button layout and labels is like this: + (note: on dual-function buttons, upper label=Gin, lower label=Black Jack) + + BJ --o GIN + OFF + [7] [8] [9] [DL] + + [4] [5] [6] [ [KN + DB] SP] + [1] [2] [3] [DS] [DR] + BT] HT] + [10/1] [T] [MD [CH [AC] + GO] ST] +*/ + +static INPUT_PORTS_START( gjackpot ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("10/0") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("Draw/Hit") // DR/HT + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("Deal") // DL + + PORT_START("IN.1") // R1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("Knock/Split") // KN/SP + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Total") // T + + PORT_START("IN.2") // R2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Display/Bet") // DS/BT + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.3") // R3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("Meld/Go") // MD/GO + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("Double") // DB + + PORT_START("IN.4") // R4 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Change/Stand") // CH/ST + PORT_BIT( 0x0a, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.5") // R5 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear Entry") // CE + PORT_BIT( 0x0a, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.6") // R10 + PORT_CONFNAME( 0x06, 0x04, "Game Select" ) + PORT_CONFSETTING( 0x04, "Gin Rummy" ) + PORT_CONFSETTING( 0x02, "Black Jack" ) + PORT_BIT( 0x09, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( gjackpot, gjackpot_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1670, 450000) // approximation - RC osc. R=47K, C=47pf, but unknown RC curve + MCFG_TMS1XXX_READ_K_CB(READ8(gpoker_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(gjackpot_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(gpoker_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_gjackpot) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("beeper", BEEP, 2405) // see gpoker + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Ideal Electronic Detective * TMS0980NLL MP6100A (die labeled 0980B-00) * 10-digit 7seg LED display, 1bit sound @@ -1376,10 +2048,8 @@ WRITE16_MEMBER(elecdet_state::write_r) m_speaker->level_w((data & 0x180 && m_o & 0x80) ? 1 : 0); // R0-R6: select digit - for (int y = 0; y < 7; y++) - m_display_segmask[y] = 0x7f; - - display_matrix(7, 7, BITSWAP8(m_o,7,5,2,1,4,0,6,3), data); + memset(m_display_segmask, ~0, sizeof(m_display_segmask)); + display_matrix_seg(7, 7, BITSWAP8(m_o,7,5,2,1,4,0,6,3), data, 0x7f); } WRITE16_MEMBER(elecdet_state::write_o) @@ -1387,14 +2057,14 @@ WRITE16_MEMBER(elecdet_state::write_o) // O0,O1,O4,O6: input mux m_inp_mux = (data & 3) | (data >> 2 & 4) | (data >> 3 & 8); - // O0-O6: led segments A-G - // O7: speaker out + // O0-O6: digit segments A-G + // O7: speaker out -> write_r m_o = data; } READ8_MEMBER(elecdet_state::read_k) { - // note: the Vss row is always on + // K: multiplexed inputs (note: the Vss row is always on) return m_inp_matrix[4]->read() | read_inputs(4); } @@ -1528,6 +2198,7 @@ WRITE16_MEMBER(starwbc_state::write_o) READ8_MEMBER(starwbc_state::read_k) { + // K: multiplexed inputs return read_inputs(5); } @@ -1627,11 +2298,8 @@ public: void astro_state::prepare_display() { - // declare 7segs - for (int y = 0; y < 9; y++) - m_display_segmask[y] = 0xff; - - display_matrix(8, 10, m_o, m_r); + memset(m_display_segmask, ~0, sizeof(m_display_segmask)); + display_matrix_seg(8, 10, m_o, m_r, 0xff); } WRITE16_MEMBER(astro_state::write_r) @@ -1653,6 +2321,7 @@ WRITE16_MEMBER(astro_state::write_o) READ8_MEMBER(astro_state::read_k) { + // K: multiplexed inputs return read_inputs(8); } @@ -1781,6 +2450,7 @@ WRITE16_MEMBER(comp4_state::write_o) READ8_MEMBER(comp4_state::read_k) { + // K: multiplexed inputs return read_inputs(3); } @@ -1833,7 +2503,7 @@ MACHINE_CONFIG_END Revision A hardware: * TMS1000 (die labeled MP3226) - * DS75494 lamp driver, 4 big lamps, 1bit sound + * DS75494 Hex digit LED driver, 4 big lamps, 1bit sound Newer revisions (also Pocket Simon) have a smaller 16-pin MB4850 chip instead of the TMS1000. This one has been decapped too, but we couldn't @@ -1875,6 +2545,7 @@ WRITE16_MEMBER(simon_state::write_r) READ8_MEMBER(simon_state::read_k) { + // K: multiplexed inputs return read_inputs(4); } @@ -1978,6 +2649,7 @@ WRITE16_MEMBER(ssimon_state::write_r) READ8_MEMBER(ssimon_state::read_k) { + // K: multiplexed inputs return read_inputs(6); } @@ -2021,7 +2693,6 @@ static INPUT_PORTS_START( ssimon ) PORT_START("IN.5") // R10 PORT_BIT( 0x02, 0x02, IPT_SPECIAL ) PORT_CONDITION("IN.4", 0x0f, EQUALS, 0x00) - PORT_BIT( 0x02, 0x00, IPT_SPECIAL ) PORT_CONDITION("IN.4", 0x0f, NOTEQUALS, 0x00) PORT_BIT( 0x0d, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.6") // fake @@ -2077,6 +2748,192 @@ MACHINE_CONFIG_END /*************************************************************************** + Milton Bradley Big Trak + * TMS1000NLL MP3301A or MP3301ANLL E (rev. E!) (die labeled 1000E MP3301) + * SN75494N Hex digit LED driver, 1 lamp, 3-level sound + * gearbox with magnetic clutch, 1 IR led+sensor, 2 motors(middle wheels) + * 24-button keypad, ext in/out ports + + Big Trak is a programmable toy car, up to 16 steps. Supported commands include + driving and turning, firing a photon cannon(hey, have some imagination!), + and I/O ports. The output port was used for powering the dump truck accessory. + + The In command was canceled midst production, it is basically a nop. Newer + releases and the European version removed the button completely. + +***************************************************************************/ + +class bigtrak_state : public hh_tms1k_state +{ +public: + bigtrak_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_tms1k_state(mconfig, type, tag) + { } + + DECLARE_WRITE16_MEMBER(write_r); + DECLARE_WRITE16_MEMBER(write_o); + DECLARE_READ8_MEMBER(read_k); + + int m_gearbox_pos; + bool sensor_state() { return m_gearbox_pos < 0 && m_display_decay[0][0] != 0; } + TIMER_DEVICE_CALLBACK_MEMBER(gearbox_sim_tick); + +protected: + virtual void machine_start(); +}; + +// handlers + +TIMER_DEVICE_CALLBACK_MEMBER(bigtrak_state::gearbox_sim_tick) +{ + // the last gear in the gearbox has 12 evenly spaced holes, it is located + // between an IR emitter and receiver + static const int speed = 17; + if (m_gearbox_pos >= speed) + m_gearbox_pos = -speed; + + if (m_o & 0x1e) + m_gearbox_pos++; +} + +WRITE16_MEMBER(bigtrak_state::write_r) +{ + // R0-R5,R8: input mux (keypad, ext in enable) + m_inp_mux = (data & 0x3f) | (data >> 2 & 0x40); + + // R6: N/C + // R7: IR led on + // R9: lamp on + display_matrix(2, 1, (data >> 7 & 1) | (data >> 8 & 2), 1); + + // (O0,O7,)R10(tied together): speaker out + m_speaker->level_w((m_o & 1) | (m_o >> 6 & 2) | (data >> 8 & 4)); + m_r = data; +} + +WRITE16_MEMBER(bigtrak_state::write_o) +{ + // O1: left motor forward + // O2: left motor reverse + // O3: right motor reverse + // O4: right motor reverse + // O5: ext out + // O6: N/C + output_set_value("left_motor_forward", data >> 1 & 1); + output_set_value("left_motor_reverse", data >> 2 & 1); + output_set_value("right_motor_forward", data >> 3 & 1); + output_set_value("right_motor_reverse", data >> 4 & 1); + output_set_value("ext_out", data >> 5 & 1); + + // O0,O7(,R10)(tied together): speaker out + m_speaker->level_w((data & 1) | (data >> 6 & 2) | (m_r >> 8 & 4)); + m_o = data; +} + +READ8_MEMBER(bigtrak_state::read_k) +{ + // K: multiplexed inputs + // K8: IR sensor + return read_inputs(7) | (sensor_state() ? 8 : 0); +} + + +// config + +/* physical button layout and labels is like this: + + USA version: UK version: + + [^] [CLR] [^] [CM] + [<] [HOLD] [>] [FIRE] [<] [P] [>] [\|/] + [v] [CLS] [v] [CE] + [7] [8] [9] [RPT] [7] [8] [9] [x2] + [4] [5] [6] [TEST] [4] [5] [6] [TEST] + [1] [2] [3] [CK] [1] [2] [3] [checkmark] + [IN] [0] [OUT] [GO] [0] [OUT] [GO] +*/ + +static INPUT_PORTS_START( bigtrak ) + PORT_START("IN.0") // R0 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("Hold") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_UP) PORT_NAME("Forward") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("Fire") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("Clear Memory") + + PORT_START("IN.1") // R1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Backward") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear Last Step") + + PORT_START("IN.2") // R2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("Repeat") + + PORT_START("IN.3") // R3 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Test") + + PORT_START("IN.4") // R4 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Check") + + PORT_START("IN.5") // R5 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("In") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("0") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_O) PORT_NAME("Out") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Go") + + PORT_START("IN.6") // R8 + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_F1) PORT_NAME("Input Port") + PORT_BIT( 0x0b, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + + +void bigtrak_state::machine_start() +{ + hh_tms1k_state::machine_start(); + + // zerofill/register for savestates + m_gearbox_pos = 0; + save_item(NAME(m_gearbox_pos)); +} + +static const INT16 bigtrak_speaker_levels[] = { 0, 32767/3, 32767/3, 32767/3*2, 32767/3, 32767/3*2, 32767/3*2, 32767 }; + +static MACHINE_CONFIG_START( bigtrak, bigtrak_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1000, 200000) // approximation - RC osc. R=83K, C=100pf, but unknown RC curve + MCFG_TMS1XXX_READ_K_CB(READ8(bigtrak_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(bigtrak_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(bigtrak_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("gearbox", bigtrak_state, gearbox_sim_tick, attotime::from_msec(1)) + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_bigtrak) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SPEAKER_LEVELS(8, bigtrak_speaker_levels) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Parker Brothers Code Name: Sector, by Bob Doyle * TMS0970 MCU, MP0905BNL ZA0379 (die labeled 0970F-05B) * 6-digit 7seg LED display + 4 LEDs for compass, no sound @@ -2128,12 +2985,26 @@ WRITE16_MEMBER(cnsector_state::write_o) READ8_MEMBER(cnsector_state::read_k) { + // K: multiplexed inputs return read_inputs(5); } // config +/* physical button layout and labels is like this: + + COMBAT INFORMATION CENTER + [NEXT SHIP] [RECALL] [MOVE SHIP] + + [LEFT] [RIGHT] o [SLOWER] [FASTER] + STEERING EVASIVE SUB SPEED o (on/off switch) + NAVIGATIONAL PROGRAMMING | + + [RANGE] [AIM] [FIRE] o [TEACH MODE] + SONAR CONTROL SUB FINDER +*/ + static INPUT_PORTS_START( cnsector ) PORT_START("IN.0") // O0 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("Next Ship") @@ -2190,11 +3061,11 @@ MACHINE_CONFIG_END Parker Bros Merlin handheld game, by Bob Doyle * TMS1100NLL MP3404A-N2 - * 11 LEDs behind buttons, 2bit sound + * 11 LEDs behind buttons, 3-level sound Also published in Japan by Tomy as "Dr. Smith", white case instead of red. - The one with dark-blue case is the rare sequel Master Merlin. More sequels - followed too, but on other hardware. + The one with dark-blue case is the rare sequel Master Merlin, see below. + More sequels followed too, but on other hardware. To start a game, press NEW GAME, followed by a number: 1: Tic-Tac-Toe @@ -2215,9 +3086,9 @@ public: : hh_tms1k_state(mconfig, type, tag) { } - DECLARE_WRITE16_MEMBER(write_r); - DECLARE_WRITE16_MEMBER(write_o); - DECLARE_READ8_MEMBER(read_k); + virtual DECLARE_WRITE16_MEMBER(write_r); + virtual DECLARE_WRITE16_MEMBER(write_o); + virtual DECLARE_READ8_MEMBER(read_k); }; // handlers @@ -2237,9 +3108,8 @@ WRITE16_MEMBER(merlin_state::write_r) WRITE16_MEMBER(merlin_state::write_o) { - // O4-O6: speaker out (paralleled for increased current driving capability) - static const int count[8] = { 0, 1, 1, 2, 1, 2, 2, 3 }; - m_speaker->level_w(count[data >> 4 & 7]); + // O4-O6(tied together): speaker out + m_speaker->level_w(data >> 4 & 7); // O0-O3: input mux // O7: N/C @@ -2248,6 +3118,7 @@ WRITE16_MEMBER(merlin_state::write_o) READ8_MEMBER(merlin_state::read_k) { + // K: multiplexed inputs return read_inputs(4); } @@ -2270,7 +3141,7 @@ static INPUT_PORTS_START( merlin ) PORT_START("IN.2") // O2 PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Button 8") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Button 9") - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Same Game") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Same Game") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Button 10") PORT_START("IN.3") // O3 @@ -2281,7 +3152,7 @@ static INPUT_PORTS_START( merlin ) INPUT_PORTS_END -static const INT16 merlin_speaker_levels[] = { 0, 10922, 21845, 32767 }; +static const INT16 merlin_speaker_levels[] = { 0, 32767/3, 32767/3, 32767/3*2, 32767/3, 32767/3*2, 32767/3*2, 32767 }; static MACHINE_CONFIG_START( merlin, merlin_state ) @@ -2299,7 +3170,73 @@ static MACHINE_CONFIG_START( merlin, merlin_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) - MCFG_SPEAKER_LEVELS(4, merlin_speaker_levels) + MCFG_SPEAKER_LEVELS(8, merlin_speaker_levels) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Parker Brothers Master Merlin + * TMS1400 MP7351-N2LL (die labeled 1400CR MP7351) + * 11 LEDs behind buttons, 3-level sound + + The TMS1400CR MCU has the same pinout as a standard TMS1100. The hardware + outside of the MCU is exactly the same as Merlin. + + The included minigames are: + 1: Three Shells + 2: Hi/Lo + 3: Match It + 4: Hit or Miss + 5: Pair Off + 6: Tempo + 7: Musical Ladder + 8: Patterns + 9: Hot Potato + +***************************************************************************/ + +class mmerlin_state : public merlin_state +{ +public: + mmerlin_state(const machine_config &mconfig, device_type type, const char *tag) + : merlin_state(mconfig, type, tag) + { } +}; + +// handlers: uses the ones in merlin_state + + +// config + +static INPUT_PORTS_START( mmerlin ) + PORT_INCLUDE( merlin ) + + PORT_MODIFY("IN.3") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Score") // instead of Hit Me +INPUT_PORTS_END + +static MACHINE_CONFIG_START( mmerlin, mmerlin_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", TMS1400, 425000) // approximation - RC osc. R=30K, C=100pf, but unknown RC curve + MCFG_TMS1XXX_READ_K_CB(READ8(mmerlin_state, read_k)) + MCFG_TMS1XXX_WRITE_R_CB(WRITE16(mmerlin_state, write_r)) + MCFG_TMS1XXX_WRITE_O_CB(WRITE16(mmerlin_state, write_o)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_tms1k_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_mmerlin) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SPEAKER_LEVELS(8, merlin_speaker_levels) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) MACHINE_CONFIG_END @@ -2362,7 +3299,7 @@ WRITE16_MEMBER(stopthief_state::write_o) READ8_MEMBER(stopthief_state::read_k) { - // note: the Vss row is always on + // K: multiplexed inputs (note: the Vss row is always on) return m_inp_matrix[2]->read() | read_inputs(2); } @@ -2473,12 +3410,13 @@ WRITE16_MEMBER(bankshot_state::write_o) { // O0-O6: led state // O7: N/C - m_o = data; + m_o = data & 0x7f; display_matrix(7, 11, m_o, m_r); } READ8_MEMBER(bankshot_state::read_k) { + // K: multiplexed inputs return read_inputs(2); } @@ -2501,11 +3439,11 @@ static INPUT_PORTS_START( bankshot ) PORT_START("IN.0") // R2 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Angle") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Aim") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Cue Up / Shoot") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Cue Up/Shoot") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.1") // R3 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Select / Score") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Select/Score") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Ball Up") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Ball Over") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -2597,12 +3535,13 @@ WRITE16_MEMBER(splitsec_state::write_o) { // O0-O6: led state // O7: N/C - m_o = data; + m_o = data & 0x7f; display_matrix(7, 8, m_o, m_r); } READ8_MEMBER(splitsec_state::read_k) { + // K: multiplexed inputs return read_inputs(2); } @@ -2611,7 +3550,7 @@ READ8_MEMBER(splitsec_state::read_k) static INPUT_PORTS_START( splitsec ) PORT_START("IN.0") // R9 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // 4 separate directional buttons, hence 16way + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -2710,6 +3649,7 @@ WRITE16_MEMBER(tandy12_state::write_o) READ8_MEMBER(tandy12_state::read_k) { + // K: multiplexed inputs return read_inputs(5); } @@ -2739,10 +3679,10 @@ READ8_MEMBER(tandy12_state::read_k) static INPUT_PORTS_START( tandy12 ) PORT_START("IN.0") // R5 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_EQUALS) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("12") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("11") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("10") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("9") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_EQUALS) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("Button 12") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) PORT_CODE(KEYCODE_MINUS_PAD) PORT_NAME("Button 11") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Button 10") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Button 9") PORT_START("IN.1") // R6 PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("Space-2") @@ -2757,16 +3697,16 @@ static INPUT_PORTS_START( tandy12 ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("IN.3") // R8 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Button 4") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Button 3") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Button 2") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Button 1") PORT_START("IN.4") // R9 - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Button 8") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Button 7") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Button 6") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Button 5") INPUT_PORTS_END @@ -2834,6 +3774,28 @@ ROM_START( amaztron ) ROM_END +ROM_START( h2hbaseb ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp1525", 0x0000, 0x0800, CRC(b5d6bf9b) SHA1(2cc9f35f077c1209c46d16ec853af87e4725c2fd) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_h2hbaseb_opla.pla", 0, 365, CRC(cb3d7e38) SHA1(6ab4a7c52e6010b7c7158463cb499973e52ff556) ) +ROM_END + + +ROM_START( h2hfootb ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp3460.u3", 0x0000, 0x0800, CRC(3a4e53a8) SHA1(5052e706f992c6c4bada1fa7769589eec3df6471) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_h2hfootb_opla.pla", 0, 365, CRC(c8d85873) SHA1(16bd6fc8e3cd16d5f8fd32d0c74e67de77f5487e) ) +ROM_END + + ROM_START( tc4 ) ROM_REGION( 0x1000, "maincpu", 0 ) ROM_LOAD( "mp7334", 0x0000, 0x1000, CRC(923f3821) SHA1(a9ae342d7ff8dae1dedcd1e4984bcfae68586581) ) @@ -2889,6 +3851,39 @@ ROM_START( einvader ) ROM_END +ROM_START( raisedvl ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp1221", 0x0000, 0x0800, CRC(782791cc) SHA1(214249406fcaf44efc6350022bd534e59ec69c88) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_raisedvl_mpla.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_raisedvl_opla.pla", 0, 365, CRC(00db663b) SHA1(6eae12503364cfb1f863df0e57970d3e766ec165) ) +ROM_END + + +ROM_START( gpoker ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "mp2105", 0x0000, 0x0800, CRC(95a8f5b4) SHA1(d14f00ba9f57e437264d972baa14a14a28ff8719) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_gpoker_mpla.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1100_gpoker_opla.pla", 0, 365, CRC(f7e2d812) SHA1(cc3abd89afb1d2145dc47636553ccd0ba7de70d9) ) +ROM_END + + +ROM_START( gjackpot ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "mpf553", 0x0000, 0x1000, CRC(f45fd008) SHA1(8d5d6407a8a031a833ceedfb931f5c9d2725ecd0) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1400_gjackpot_mpla.pla", 0, 867, CRC(7cc90264) SHA1(c6e1cf1ffb178061da9e31858514f7cd94e86990) ) + ROM_REGION( 557, "maincpu:opla", 0 ) + ROM_LOAD( "tms1400_gjackpot_opla.pla", 0, 557, CRC(50e471a7) SHA1(9d862cb9f51a563882b62662c5bfe61b52e3df00) ) +ROM_END + + ROM_START( elecdet ) ROM_REGION( 0x1000, "maincpu", 0 ) ROM_LOAD( "mp6100a", 0x0000, 0x1000, CRC(6f396bb8) SHA1(1f104d4ca9bee0d4572be4779b7551dfe20c4f04) ) @@ -2973,6 +3968,17 @@ ROM_START( ssimon ) ROM_END +ROM_START( bigtrak ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "mp3301a", 0x0000, 0x0400, CRC(1351bcdd) SHA1(68865389c25b541c09a742be61f8fb6488134d4e) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1000_bigtrak_mpla.pla", 0, 867, CRC(80912d0a) SHA1(7ae5293ed4d93f5b7a64d43fe30c3639f39fbe5a) ) + ROM_REGION( 365, "maincpu:opla", 0 ) + ROM_LOAD( "tms1000_bigtrak_opla.pla", 0, 365, CRC(63be45f6) SHA1(918e38a223152db883c1a6f7acf56e87d7074734) ) +ROM_END + + ROM_START( cnsector ) ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD( "mp0905bnl_za0379", 0x0000, 0x0400, CRC(201036e9) SHA1(b37fef86bb2bceaf0ac8bb3745b4702d17366914) ) @@ -2999,6 +4005,17 @@ ROM_START( merlin ) ROM_END +ROM_START( mmerlin ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "mp7351", 0x0000, 0x1000, CRC(0f7a4c83) SHA1(242c1278ddfe92c28fd7cd87300e48e7a4827831) ) + + ROM_REGION( 867, "maincpu:mpla", 0 ) + ROM_LOAD( "tms1100_default_mpla.pla", 0, 867, CRC(62445fc9) SHA1(d6297f2a4bc7a870b76cc498d19dbb0ce7d69fec) ) + ROM_REGION( 557, "maincpu:opla", 0 ) + ROM_LOAD( "tms1400_mmerlin_opla.pla", 0, 557, CRC(fd3dcd93) SHA1(f2afc52df700daa0eb7356c7876af9b2966f971b) ) +ROM_END + + ROM_START( stopthie ) ROM_REGION( 0x1000, "maincpu", 0 ) ROM_LOAD( "mp6101b", 0x0000, 0x1000, CRC(8bde5bb4) SHA1(8c318fcce67acc24c7ae361f575f28ec6f94665a) ) @@ -3066,12 +4083,18 @@ ROM_END COMP( 1980, mathmagi, 0, 0, mathmagi, mathmagi, driver_device, 0, "APF Electronics Inc.", "Mathemagician", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) CONS( 1979, amaztron, 0, 0, amaztron, amaztron, driver_device, 0, "Coleco", "Amaze-A-Tron", GAME_SUPPORTS_SAVE ) +CONS( 1980, h2hbaseb, 0, 0, h2hbaseb, h2hbaseb, driver_device, 0, "Coleco", "Head to Head Baseball", GAME_SUPPORTS_SAVE ) +CONS( 1980, h2hfootb, 0, 0, h2hfootb, h2hfootb, driver_device, 0, "Coleco", "Head to Head Football", GAME_SUPPORTS_SAVE ) CONS( 1981, tc4, 0, 0, tc4, tc4, driver_device, 0, "Coleco", "Total Control 4", GAME_SUPPORTS_SAVE ) CONS( 1979, ebball, 0, 0, ebball, ebball, driver_device, 0, "Entex", "Electronic Baseball (Entex)", GAME_SUPPORTS_SAVE ) CONS( 1979, ebball2, 0, 0, ebball2, ebball2, driver_device, 0, "Entex", "Electronic Baseball 2 (Entex)", GAME_SUPPORTS_SAVE ) CONS( 1980, ebball3, 0, 0, ebball3, ebball3, driver_device, 0, "Entex", "Electronic Baseball 3 (Entex)", GAME_SUPPORTS_SAVE ) CONS( 1980, einvader, 0, 0, einvader, einvader, driver_device, 0, "Entex", "Space Invader (Entex, TMS1100)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1980, raisedvl, 0, 0, raisedvl, raisedvl, driver_device, 0, "Entex", "Raise The Devil", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) + +CONS( 1979, gpoker, 0, 0, gpoker, gpoker, driver_device, 0, "Gakken", "Poker (Gakken, 1979 version)", GAME_SUPPORTS_SAVE ) +CONS( 1980, gjackpot, 0, 0, gjackpot, gjackpot, driver_device, 0, "Gakken", "Jackpot: Gin Rummy & Black Jack", GAME_SUPPORTS_SAVE ) CONS( 1979, elecdet, 0, 0, elecdet, elecdet, driver_device, 0, "Ideal", "Electronic Detective", GAME_SUPPORTS_SAVE ) // *** @@ -3083,6 +4106,7 @@ COMP( 1979, astro, 0, 0, astro, astro, driver_device, 0, "Kos CONS( 1977, comp4, 0, 0, comp4, comp4, driver_device, 0, "Milton Bradley", "Comp IV", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) CONS( 1978, simon, 0, 0, simon, simon, driver_device, 0, "Milton Bradley", "Simon (Rev. A)", GAME_SUPPORTS_SAVE ) CONS( 1979, ssimon, 0, 0, ssimon, ssimon, driver_device, 0, "Milton Bradley", "Super Simon", GAME_SUPPORTS_SAVE ) +CONS( 1979, bigtrak, 0, 0, bigtrak, bigtrak, driver_device, 0, "Milton Bradley", "Big Trak", GAME_SUPPORTS_SAVE | GAME_MECHANICAL ) // *** CONS( 1977, cnsector, 0, 0, cnsector, cnsector, driver_device, 0, "Parker Brothers", "Code Name: Sector", GAME_SUPPORTS_SAVE | GAME_NO_SOUND_HW ) // *** CONS( 1978, merlin, 0, 0, merlin, merlin, driver_device, 0, "Parker Brothers", "Merlin - The Electronic Wizard", GAME_SUPPORTS_SAVE ) @@ -3090,6 +4114,7 @@ CONS( 1979, stopthie, 0, 0, stopthief, stopthief, driver_device, 0, "Par CONS( 1979, stopthiep, stopthie, 0, stopthief, stopthief, driver_device, 0, "Parker Brothers", "Stop Thief (Electronic Crime Scanner) (prototype)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING ) CONS( 1980, bankshot, 0, 0, bankshot, bankshot, driver_device, 0, "Parker Brothers", "Bank Shot - Electronic Pool", GAME_SUPPORTS_SAVE ) CONS( 1980, splitsec, 0, 0, splitsec, splitsec, driver_device, 0, "Parker Brothers", "Split Second", GAME_SUPPORTS_SAVE ) +CONS( 1982, mmerlin, 0, 0, mmerlin, mmerlin, driver_device, 0, "Parker Brothers", "Master Merlin", GAME_SUPPORTS_SAVE ) CONS( 1981, tandy12, 0, 0, tandy12, tandy12, driver_device, 0, "Tandy Radio Shack", "Tandy-12: Computerized Arcade", GAME_SUPPORTS_SAVE ) // some of the minigames: *** diff --git a/src/mess/drivers/hh_ucom4.c b/src/mess/drivers/hh_ucom4.c index bef639156f9..b8738fc8bba 100644 --- a/src/mess/drivers/hh_ucom4.c +++ b/src/mess/drivers/hh_ucom4.c @@ -2,7 +2,19 @@ // copyright-holders:hap, Kevin Horton /*************************************************************************** - NEC uCOM4 MCU tabletops/handhelds or other simple devices. + NEC uCOM4 MCU tabletops/handhelds or other simple devices, + most of them are VFD electronic games/toys. + + Commonly used VFD(vacuum fluorescent display) are by NEC or Futaba. + + NEC FIP9AM20T (example, Epoch Astro Command) + grcss + + FIP = fluorescent indicator panel + g = number of grids + A = revision of the VFD + M = custom display + 20 = unique display part number known chips: @@ -10,16 +22,19 @@ serial device etc. ---------------------------------------------------------------- @017 uPD552C 1979, Bambino UFO Master-Blaster Station (ET-02) - @031 uPD553C 1979, Bambino Superstar Football (ET-03) - *042 uPD552C 1979, Tomy Space Attack + @042 uPD552C 1980, Tomy Cosmic Combat (TN-??) + @043 uPD552C 1979, Bambino Kick The Goal Soccer (ET-10) + *044 uPD552C 1979, Bambino Lucky Puck Ice Hockey (ET-08) @048 uPD552C 1980, Tomy Tennis (TN-04) + @049 uPD552C 1981, Bambino Safari (ET-11) + @054 uPD552C 1980, Epoch Invader From Space + + @031 uPD553C 1979, Bambino Superstar Football (ET-03) @049 uPD553C 1979, Mego Mini-Vid Break Free - @055 uPD553C 1980, Bambino Laser Fight (ET-12) - *085 uPD650C 1980, Roland TR-808 + @055 uPD553C 1980, Bambino Space Laser Fight (ET-12) + @080 uPD553C 1980, Epoch Electronic Football *102 uPD553C 1981, Bandai Block Out - *127 uPD650C 198? Sony OA-S1100 Typecorder (subcpu, have dump) - *128 uPD650C 1982, Roland TR-606 - 133 uPD650C 1982, Roland TB-303 -> tb303.c + @153 uPD553C 1981, Epoch Galaxy II @160 uPD553C 1982, Tomy Pac Man (TN-08) @170 uPD553C 1982, Bandai Crazy Climber @192 uPD553C 1982, Tomy Scramble (TN-10) @@ -28,36 +43,24 @@ @209 uPD553C 1982, Tomy Caveman (TN-12) @258 uPD553C 1984, Tomy Alien Chase (TN-16) - (* denotes not yet emulated by MESS, @ denotes it's in this driver) - -***************************************************************************/ - - - - - - - - -/*************************************************************************** - - Mego Mini-Vid Break Free (manufactured in Japan) - * PCB label Mego 79 rev F - * NEC uCOM-43 MCU, labeled D553C 031 - * cyan VFD display Futaba DM-4.5 91 + *085 uPD650C 1980, Roland TR-808 + *127 uPD650C 198?, Sony OA-S1100 Typecorder (subcpu, have dump) + *128 uPD650C 1982, Roland TR-606 + 133 uPD650C 1982, Roland TB-303 -> tb303.c - NOTE!: MESS external artwork is recommended + (* denotes not yet emulated by MESS, @ denotes it's in this driver) ***************************************************************************/ - - - #include "emu.h" #include "cpu/ucom4/ucom4.h" #include "sound/speaker.h" -#include "hh_ucom4_test.lh" // test-layout - use external artwork +// internal artwork +#include "efball.lh" +#include "mvbfree.lh" + +#include "hh_ucom4_test.lh" // common test-layout - use external artwork class hh_ucom4_state : public driver_device @@ -262,12 +265,13 @@ UINT8 hh_ucom4_state::read_inputs(int columns) Bambino UFO Master-Blaster Station (manufactured in Japan) * PCB label Emix Corp. ET-02 * NEC uCOM-44 MCU, labeled EMIX D552C 017 - * cyan VFD display Emix-101, with blue overlay - + * cyan VFD display Emix-101, with blue color overlay + This is Bambino's first game, it is not known if ET-01 exists. Emix Corp. wasn't initially a toy company, the first release was through Tomy. Emix - created the Bambino brand afterwards. The manual claims it to be the first - computerized VFD game (true, unless TI's Speak & Spell is considered a game?) + created the Bambino brand afterwards. It is claimed to be the first + computerized VFD game (true, unless TI Speak & Spell(1978), or even Invicta + Electronic Mastermind(1977) are considered games) known releases: - Japan: "Missile Guerilla Warfare Maneuvers", published by Tomy @@ -329,7 +333,6 @@ static INPUT_PORTS_START( ufombs ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_BIT( 0x04, 0x04, IPT_SPECIAL ) PORT_CONDITION("IN.0", 0x0a, EQUALS, 0x00) // pad in the middle, pressed when joystick is centered - PORT_BIT( 0x04, 0x00, IPT_SPECIAL ) PORT_CONDITION("IN.0", 0x0a, NOTEQUALS, 0x00) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_START("IN.1") // port B @@ -378,7 +381,9 @@ MACHINE_CONFIG_END Bambino Superstar Football (manufactured in Japan) * PCB label Emix Corp. ET-03 * NEC uCOM-43 MCU, labeled D553C 031 - * cyan VFD display Emix-102 + * cyan VFD display Emix-102, with bezel + + The game was rereleased in 1982 as Classic Football, with an improved VFD. Press the Kick button to start the game, an automatic sequence follows. Then choose a formation(A,B,C) and either pass the ball, and/or start @@ -445,6 +450,17 @@ READ8_MEMBER(ssfball_state::input_b_r) // config +/* physical button layout and labels is like this: + + [A] [B] [C] [PASS] [KICK/ + ^FORMATION^ DISPLAY] + + [^] + [<>] + (game lvl sw) [v] + 1<---OFF--->2 +*/ + static INPUT_PORTS_START( ssfball ) PORT_START("IN.0") // F3 port B3 PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -452,7 +468,7 @@ static INPUT_PORTS_START( ssfball ) PORT_START("IN.1") // G3 port B3 PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_CONFNAME( 0x08, 0x00, "Skill Level" ) + PORT_CONFNAME( 0x08, 0x00, "Game Level" ) PORT_CONFSETTING( 0x00, "1" ) PORT_CONFSETTING( 0x08, "2" ) @@ -460,12 +476,12 @@ static INPUT_PORTS_START( ssfball ) PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Kick/Display") PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("Formation C") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("Formation B") - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) // multiplexed, handled in ssfball_input_b_r + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) // multiplexed, handled in input_b_r PORT_START("IN.3") // port A - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Left/Right") - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_UP) PORT_NAME("Up") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DOWN) PORT_NAME("Down") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_NAME("Ball-carrier Left/Right") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_NAME("Ball-carrier Up") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_NAME("Ball-carrier Down") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pass") INPUT_PORTS_END @@ -504,10 +520,245 @@ MACHINE_CONFIG_END /*************************************************************************** + Bambino Kick The Goal Soccer + * PCB label Emix Corp. ET-10/08 (PCB is for 2 possible games) + * NEC uCOM-44 MCU, labeled D552C 043 + * cyan VFD display Emix-105, with bezel overlay + + Press the Display button twice to start the game. Action won't start until + player 1 presses one of the directional keys. In 2-player mode, player 2 + controls the goalkeeper, defensive players are still controlled by the CPU. + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class bmsoccer_state : public hh_ucom4_state +{ +public: + bmsoccer_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_ucom4_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_READ8_MEMBER(input_a_r); +}; + +// handlers + +void bmsoccer_state::prepare_display() +{ + UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,11,7,3,12,17,13,18,16,14,15,8,4,0,9,5,1,10,6,2); + display_matrix(16, 9, plate, m_grid); +} + +WRITE8_MEMBER(bmsoccer_state::grid_w) +{ + // C01: input mux + if (offset == NEC_UCOM4_PORTC) + m_inp_mux = data & 3; + + // C,D(,E3): vfd matrix grid + int shift = (offset - NEC_UCOM4_PORTC) * 4; + m_grid = (m_grid & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE8_MEMBER(bmsoccer_state::plate_w) +{ + // G3: speaker out + if (offset == NEC_UCOM4_PORTG) + m_speaker->level_w(data >> 3 & 1); + + // E012,F012,G012,H,I: vfd matrix plate + int shift = (offset - NEC_UCOM4_PORTE) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // E3: grid 8 + if (offset == NEC_UCOM4_PORTE) + grid_w(space, offset, data >> 3 & 1); + else + prepare_display(); +} + +READ8_MEMBER(bmsoccer_state::input_a_r) +{ + // port A: multiplexed inputs + return read_inputs(2); +} + + +// config + +static INPUT_PORTS_START( bmsoccer ) + PORT_START("IN.0") // C0 port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("Ball-carrier Right") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_NAME("Ball-carrier Down") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_NAME("Ball-carrier Left") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_NAME("Ball-carrier Up") + + PORT_START("IN.1") // C1 port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL PORT_16WAY PORT_NAME("Goalkeeper Left") // note: swap buttons if viewed from the same angle as player 1 + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL PORT_16WAY PORT_NAME("Goalkeeper Right") + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.2") // port B + PORT_CONFNAME( 0x01, 0x00, "Skill Level" ) + PORT_CONFSETTING( 0x00, "1" ) + PORT_CONFSETTING( 0x01, "2" ) + PORT_CONFNAME( 0x02, 0x00, "Players" ) + PORT_CONFSETTING( 0x00, "1" ) + PORT_CONFSETTING( 0x02, "2" ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Display/Banana Shoot") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Shoot") +INPUT_PORTS_END + +static MACHINE_CONFIG_START( bmsoccer, bmsoccer_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D552, 400000) // approximation + MCFG_UCOM4_READ_A_CB(READ8(bmsoccer_state, input_a_r)) + MCFG_UCOM4_READ_B_CB(IOPORT("IN.2")) + MCFG_UCOM4_WRITE_C_CB(WRITE8(bmsoccer_state, grid_w)) + MCFG_UCOM4_WRITE_D_CB(WRITE8(bmsoccer_state, grid_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(bmsoccer_state, plate_w)) + MCFG_UCOM4_WRITE_F_CB(WRITE8(bmsoccer_state, plate_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(bmsoccer_state, plate_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(bmsoccer_state, plate_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(bmsoccer_state, plate_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Bambino Safari (manufactured in Japan) + * PCB label Emix Corp. ET-11 + * NEC uCOM-44 MCU, labeled EMIX D552C 049 + * cyan VFD display Emix-108 + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class bmsafari_state : public hh_ucom4_state +{ +public: + bmsafari_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_ucom4_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE8_MEMBER(speaker_w); +}; + +// handlers + +void bmsafari_state::prepare_display() +{ + UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,0,1,2,3,4,5,6,7,8); + UINT16 plate = BITSWAP16(m_plate,15,14,13,12,11,7,10,2,9,5,8,4,0,1,6,3); + display_matrix(10, 9, plate, grid); +} + +WRITE8_MEMBER(bmsafari_state::grid_w) +{ + // C,D(,E3): vfd matrix grid + int shift = (offset - NEC_UCOM4_PORTC) * 4; + m_grid = (m_grid & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE8_MEMBER(bmsafari_state::plate_w) +{ + // E012,H,I: vfd matrix plate + int shift = (offset == NEC_UCOM4_PORTE) ? 8 : (offset - NEC_UCOM4_PORTH) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + + // E3: grid 0 + if (offset == NEC_UCOM4_PORTE) + grid_w(space, offset, data >> 3 & 1); + else + prepare_display(); +} + +WRITE8_MEMBER(bmsafari_state::speaker_w) +{ + // G0: speaker out + m_speaker->level_w(data & 1); +} + + +// config + +static INPUT_PORTS_START( bmsafari ) + PORT_START("IN.0") // port A + PORT_CONFNAME( 0x07, 0x04, "Skill Level" ) + PORT_CONFSETTING( 0x04, "1" ) + PORT_CONFSETTING( 0x02, "2" ) + PORT_CONFSETTING( 0x01, "3" ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + + PORT_START("IN.1") // port B + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY +INPUT_PORTS_END + +static MACHINE_CONFIG_START( bmsafari, bmsafari_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D552, 400000) // approximation + MCFG_UCOM4_READ_A_CB(IOPORT("IN.0")) + MCFG_UCOM4_READ_B_CB(IOPORT("IN.1")) + MCFG_UCOM4_WRITE_C_CB(WRITE8(bmsafari_state, grid_w)) + MCFG_UCOM4_WRITE_D_CB(WRITE8(bmsafari_state, grid_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(bmsafari_state, plate_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(bmsafari_state, speaker_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(bmsafari_state, plate_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(bmsafari_state, plate_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Bambino Space Laser Fight (manufactured in Japan) * PCB label Emix Corp. ET-12 * NEC uCOM-43 MCU, labeled D553C 055 - * cyan VFD display Emix-104, with color overlay (blue or green overlay, depending on region) + * cyan VFD display Emix-104, with blue or green color overlay + + This is basically a revamp of their earlier Boxing game (ET-06), case and + buttons are exactly the same. NOTE!: MESS external artwork is recommended @@ -755,10 +1006,323 @@ MACHINE_CONFIG_END /*************************************************************************** + Epoch Invader From Space (manufactured in Japan) + * PCB labels 36010(A/B) + * NEC uCOM-44 MCU, labeled D552C 054 + * cyan VFD display NEC FIP9AM18T tube no. 0D, with color overlay + + known releases: + - USA: Invader From Space + - UK: Invader From Space, published by Grandstand + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class invspace_state : public hh_ucom4_state +{ +public: + invspace_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_ucom4_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_WRITE8_MEMBER(plate_w); +}; + +// handlers + +void invspace_state::prepare_display() +{ + UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,8,9,7,6,5,4,3,2,1,0); + UINT32 plate = BITSWAP24(m_plate,23,22,21,20,19,9,14,13,8,15,11,10,7,11,3,2,6,10,1,5,9,0,4,8); + display_matrix(19, 9, plate, grid); +} + +WRITE8_MEMBER(invspace_state::grid_w) +{ + // I0: speaker out + if (offset == NEC_UCOM4_PORTI) + m_speaker->level_w(data & 1); + + // C,D,I1: vfd matrix grid + int shift = (offset == NEC_UCOM4_PORTI) ? 8 : (offset - NEC_UCOM4_PORTC) * 4; + m_grid = (m_grid & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE8_MEMBER(invspace_state::plate_w) +{ + // E,F,G,H123: vfd matrix plate + int shift = (offset - NEC_UCOM4_PORTE) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + + +// config + +static INPUT_PORTS_START( invspace ) + PORT_START("IN.0") // port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // port B + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( invspace, invspace_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D552, XTAL_400kHz) + MCFG_UCOM4_READ_A_CB(IOPORT("IN.0")) + MCFG_UCOM4_READ_B_CB(IOPORT("IN.1")) + MCFG_UCOM4_WRITE_C_CB(WRITE8(invspace_state, grid_w)) + MCFG_UCOM4_WRITE_D_CB(WRITE8(invspace_state, grid_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(invspace_state, plate_w)) + MCFG_UCOM4_WRITE_F_CB(WRITE8(invspace_state, plate_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(invspace_state, plate_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(invspace_state, plate_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(invspace_state, grid_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Epoch Electronic Football (manufactured in Japan) + * PCB labels 36020(A/B/C) + * NEC uCOM-43 MCU, labeled D553C 080 + * cyan VFD display NEC FIP10AM15T tube no. 0F, with bezel overlay + + known releases: + - USA: Electronic Football (aka Pro-Bowl Football) + - Japan: American Football + +***************************************************************************/ + +class efball_state : public hh_ucom4_state +{ +public: + efball_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_ucom4_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_WRITE8_MEMBER(plate_w); +}; + +// handlers + +void efball_state::prepare_display() +{ + UINT16 plate = BITSWAP16(m_plate,15,14,13,12,11,4,3,0,2,1,6,10,9,5,8,7); + display_matrix(11, 10, plate, m_grid); +} + +WRITE8_MEMBER(efball_state::grid_w) +{ + // H2: speaker out + if (offset == NEC_UCOM4_PORTH) + m_speaker->level_w(data >> 2 & 1); + + // F,G,H01: vfd matrix grid + int shift = (offset - NEC_UCOM4_PORTF) * 4; + m_grid = (m_grid & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE8_MEMBER(efball_state::plate_w) +{ + // D,E,I: vfd matrix plate + int shift = (offset == NEC_UCOM4_PORTI) ? 8 : (offset - NEC_UCOM4_PORTD) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + + +// config + +static INPUT_PORTS_START( efball ) + PORT_START("IN.0") // port A + PORT_CONFNAME( 0x01, 0x00, DEF_STR( Difficulty ) ) + PORT_CONFSETTING( 0x00, "Amateur" ) + PORT_CONFSETTING( 0x01, "Professional" ) + PORT_CONFNAME( 0x02, 0x02, "Players" ) + PORT_CONFSETTING( 0x02, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("P1 Down-Field") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("P1 Score-Time") + + PORT_START("IN.1") // port B + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY PORT_NAME("P1 Left/Right") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Pass") + + PORT_START("IN.2") // port C + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL PORT_NAME("P2 Kick Return") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Kick") +INPUT_PORTS_END + +static MACHINE_CONFIG_START( efball, efball_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz) + MCFG_UCOM4_READ_A_CB(IOPORT("IN.0")) + MCFG_UCOM4_READ_B_CB(IOPORT("IN.1")) + MCFG_UCOM4_READ_C_CB(IOPORT("IN.2")) + MCFG_UCOM4_WRITE_D_CB(WRITE8(efball_state, plate_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(efball_state, plate_w)) + MCFG_UCOM4_WRITE_F_CB(WRITE8(efball_state, grid_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(efball_state, grid_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(efball_state, grid_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(efball_state, plate_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_efball) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Epoch Galaxy II (manufactured in Japan) + * PCB labels 19096/96062 + * NEC uCOM-43 MCU, labeled D553C 153 + * cyan/red VFD display NEC FIP10xM20T, with color overlay. x = multiple VFD + revisions exist, with different graphics: rev B no. 1-8, rev. D no. 2-21. + + known releases: + - USA: Galaxy II + - Japan: Astro Wars + - UK: Astro Wars, published by Grandstand + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class galaxy2_state : public hh_ucom4_state +{ +public: + galaxy2_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_ucom4_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_WRITE8_MEMBER(plate_w); +}; + +// handlers + +void galaxy2_state::prepare_display() +{ + UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9); + UINT16 plate = BITSWAP16(m_plate,15,3,2,6,1,5,4,0,11,10,7,12,14,13,8,9); + display_matrix(15, 10, plate, grid); +} + +WRITE8_MEMBER(galaxy2_state::grid_w) +{ + // E3: speaker out + if (offset == NEC_UCOM4_PORTE) + m_speaker->level_w(data >> 3 & 1); + + // C,D,E01: vfd matrix grid + int shift = (offset - NEC_UCOM4_PORTC) * 4; + m_grid = (m_grid & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE8_MEMBER(galaxy2_state::plate_w) +{ + // F,G,H,I: vfd matrix plate + int shift = (offset - NEC_UCOM4_PORTF) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + + +// config + +static INPUT_PORTS_START( galaxy2 ) + PORT_START("IN.0") // port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("IN.1") // port B + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START ) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( galaxy2, galaxy2_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D553, XTAL_400kHz) + MCFG_UCOM4_READ_A_CB(IOPORT("IN.0")) + MCFG_UCOM4_READ_B_CB(IOPORT("IN.1")) + MCFG_UCOM4_WRITE_C_CB(WRITE8(galaxy2_state, grid_w)) + MCFG_UCOM4_WRITE_D_CB(WRITE8(galaxy2_state, grid_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(galaxy2_state, grid_w)) + MCFG_UCOM4_WRITE_F_CB(WRITE8(galaxy2_state, plate_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(galaxy2_state, plate_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(galaxy2_state, plate_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(galaxy2_state, plate_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Epoch Astro Command (manufactured in Japan) - * PCB label 96111 + * PCB labels 96111/96112 * NEC uCOM-43 MCU, labeled D553C 202 - * cyan/red VFD display NEC FIP9AM20T no. 42-42, with color overlay (FIP=fluorescent indicator panel) + * cyan/red VFD display NEC FIP9AM20T no. 42-42, with color overlay + bezel known releases: - Japan: Astro Command @@ -959,6 +1523,208 @@ MACHINE_CONFIG_END /*************************************************************************** + Mego Mini-Vid Break Free (manufactured in Japan) + * PCB label Mego 79 rev F + * NEC uCOM-43 MCU, labeled D553C 049 + * cyan VFD display Futaba DM-4.5 91 + +***************************************************************************/ + +class mvbfree_state : public hh_ucom4_state +{ +public: + mvbfree_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_ucom4_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_WRITE8_MEMBER(plate_w); + DECLARE_WRITE8_MEMBER(speaker_w); +}; + +// handlers + +void mvbfree_state::prepare_display() +{ + UINT16 grid = BITSWAP16(m_grid,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); + UINT16 plate = BITSWAP16(m_plate,15,14,13,12,11,10,0,1,2,3,4,5,6,7,8,9); + display_matrix(10, 14, plate, grid); +} + +WRITE8_MEMBER(mvbfree_state::grid_w) +{ + // E23,F,G,H: vfd matrix grid + int shift = (offset - NEC_UCOM4_PORTE) * 4; + m_grid = (m_grid & ~(0xf << shift)) | (data << shift); + + // E01: plate 0,1 + if (offset == NEC_UCOM4_PORTE) + plate_w(space, 2 + NEC_UCOM4_PORTC, data & 3); + else + prepare_display(); +} + +WRITE8_MEMBER(mvbfree_state::plate_w) +{ + // C,D(,E01): vfd matrix plate + int shift = (offset - NEC_UCOM4_PORTC) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE8_MEMBER(mvbfree_state::speaker_w) +{ + // I0: speaker out + m_speaker->level_w(data & 1); +} + + +// config + +static INPUT_PORTS_START( mvbfree ) + PORT_START("IN.0") // port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + + PORT_START("IN.1") // port B + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED ) // unimplemented p1/p2 buttons + PORT_CONFNAME( 0x0c, 0x04, "Game Select") + PORT_CONFSETTING( 0x04, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + PORT_CONFSETTING( 0x08, "3" ) +INPUT_PORTS_END + +static MACHINE_CONFIG_START( mvbfree, mvbfree_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D553, 400000) // approximation + MCFG_UCOM4_READ_A_CB(IOPORT("IN.0")) + MCFG_UCOM4_READ_B_CB(IOPORT("IN.1")) + MCFG_UCOM4_WRITE_C_CB(WRITE8(mvbfree_state, plate_w)) + MCFG_UCOM4_WRITE_D_CB(WRITE8(mvbfree_state, plate_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(mvbfree_state, grid_w)) + MCFG_UCOM4_WRITE_F_CB(WRITE8(mvbfree_state, grid_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(mvbfree_state, grid_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(mvbfree_state, grid_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(mvbfree_state, speaker_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_mvbfree) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + + Tomy(tronic) Cosmic Combat (manufactured in Japan) + * PCBs are labeled 2E1019-E01 + * NEC uCOM-44 MCU, labeled D552C 042 + * cyan VFD display NEC FIP32AM18Y tube no. 0E, with color overlay + + known releases: + - USA: Cosmic Combat + - Japan: Space Attack + + NOTE!: MESS external artwork is recommended + +***************************************************************************/ + +class tccombat_state : public hh_ucom4_state +{ +public: + tccombat_state(const machine_config &mconfig, device_type type, const char *tag) + : hh_ucom4_state(mconfig, type, tag) + { } + + void prepare_display(); + DECLARE_WRITE8_MEMBER(grid_w); + DECLARE_WRITE8_MEMBER(plate_w); +}; + +// handlers + +void tccombat_state::prepare_display() +{ + UINT16 grid = BITSWAP16(m_grid,15,14,13,12,11,10,9,8,3,2,1,0,7,6,5,4); + UINT32 plate = BITSWAP24(m_plate,23,22,21,20,11,15,3,10,14,2,9,13,1,0,12,8,15,1,5,0,3,7,2,6); + display_matrix(20, 9, plate, grid); +} + +WRITE8_MEMBER(tccombat_state::grid_w) +{ + // I1: speaker out + if (offset == NEC_UCOM4_PORTI) + m_speaker->level_w(data >> 1 & 1); + + // C,D,I0: vfd matrix grid + int shift = (offset == NEC_UCOM4_PORTI) ? 8 : (offset - NEC_UCOM4_PORTC) * 4; + m_grid = (m_grid & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + +WRITE8_MEMBER(tccombat_state::plate_w) +{ + // E,F123,G,H: vfd matrix plate + int shift = (offset - NEC_UCOM4_PORTE) * 4; + m_plate = (m_plate & ~(0xf << shift)) | (data << shift); + prepare_display(); +} + + +// config + +static INPUT_PORTS_START( tccombat ) + PORT_START("IN.0") // port A + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_CONFNAME( 0x02, 0x02, "Skill Level" ) + PORT_CONFSETTING( 0x02, "1" ) + PORT_CONFSETTING( 0x00, "2" ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY +INPUT_PORTS_END + +static MACHINE_CONFIG_START( tccombat, tccombat_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", NEC_D552, 400000) // approximation + MCFG_UCOM4_READ_A_CB(IOPORT("IN.0")) + MCFG_UCOM4_WRITE_C_CB(WRITE8(tccombat_state, grid_w)) + MCFG_UCOM4_WRITE_D_CB(WRITE8(tccombat_state, grid_w)) + MCFG_UCOM4_WRITE_E_CB(WRITE8(tccombat_state, plate_w)) + MCFG_UCOM4_WRITE_F_CB(WRITE8(tccombat_state, plate_w)) + MCFG_UCOM4_WRITE_G_CB(WRITE8(tccombat_state, plate_w)) + MCFG_UCOM4_WRITE_H_CB(WRITE8(tccombat_state, plate_w)) + MCFG_UCOM4_WRITE_I_CB(WRITE8(tccombat_state, grid_w)) + + MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_ucom4_state, display_decay_tick, attotime::from_msec(1)) + MCFG_DEFAULT_LAYOUT(layout_hh_ucom4_test) + + /* no video! */ + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) +MACHINE_CONFIG_END + + + + + +/*************************************************************************** + Tomy(tronic) Tennis (manufactured in Japan) * PCB labeled TOMY TN-04 TENNIS * NEC uCOM-44 MCU, labeled D552C 048 @@ -969,7 +1735,7 @@ MACHINE_CONFIG_END Press the Serve button to start, then hit the ball by pressing one of the positional buttons when the ball flies over it. - + NOTE!: MESS external artwork is recommended ***************************************************************************/ @@ -1182,10 +1948,10 @@ WRITE8_MEMBER(tmpacman_state::plate_w) static INPUT_PORTS_START( tmpacman ) PORT_START("IN.0") // port A - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY // separate directional buttons, hence 16way - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY // " - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY // " - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY // " + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_16WAY PORT_START("IN.1") // port B PORT_CONFNAME( 0x01, 0x00, DEF_STR( Difficulty ) ) @@ -1291,8 +2057,8 @@ static INPUT_PORTS_START( tmscramb ) PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_START("IN.1") // port B - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_2WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_2WAY PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END @@ -1482,7 +2248,7 @@ WRITE8_MEMBER(alnchase_state::output_w) READ8_MEMBER(alnchase_state::input_r) { - // A: buttons + // A: multiplexed buttons return read_inputs(2); } @@ -1573,6 +2339,18 @@ ROM_START( ssfball ) ROM_END +ROM_START( bmsoccer ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "d552c-043", 0x0000, 0x0400, CRC(10c2a4ea) SHA1(6ebca7d406e22ff7a8cd529579b55a700da487b4) ) +ROM_END + + +ROM_START( bmsafari ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "d552c-049", 0x0000, 0x0400, CRC(82fa3cbe) SHA1(019e7ec784e977eba09997fc46af253054fb222c) ) +ROM_END + + ROM_START( splasfgt ) ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "d553c-055", 0x0000, 0x0800, CRC(eb471fbd) SHA1(f06cfe567bf6f9ed4dcdc88acdcfad50cd370a02) ) @@ -1585,6 +2363,24 @@ ROM_START( bcclimbr ) ROM_END +ROM_START( invspace ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "d552c-054", 0x0000, 0x0400, CRC(913d9c13) SHA1(f20edb5458e54d2f6d4e45e5d59efd87e05a6f3f) ) +ROM_END + + +ROM_START( efball ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "d553c-080", 0x0000, 0x0800, CRC(54c1027f) SHA1(6cc98074dae9361fa8c0ed6501b6a57ad325ccbd) ) +ROM_END + + +ROM_START( galaxy2 ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "d553c-153.s01", 0x0000, 0x0800, CRC(70d552b3) SHA1(72d50647701cb4bf85ea947a149a317aaec0f52c) ) +ROM_END + + ROM_START( astrocmd ) ROM_REGION( 0x0800, "maincpu", 0 ) ROM_LOAD( "d553c-202.s01", 0x0000, 0x0800, CRC(b4b34883) SHA1(6246d561c2df1f2124575d2ca671ef85b1819edd) ) @@ -1597,6 +2393,18 @@ ROM_START( edracula ) ROM_END +ROM_START( mvbfree ) + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "d553c-049", 0x0000, 0x0800, CRC(d64a8399) SHA1(97887e486fa29b1fc4a5a40cacf3c960f67aacbf) ) +ROM_END + + +ROM_START( tccombat ) + ROM_REGION( 0x0400, "maincpu", 0 ) + ROM_LOAD( "d552c-042", 0x0000, 0x0400, CRC(d7b5cfeb) SHA1(a267be8e43b7740758eb0881b655b1cc8aec43da) ) +ROM_END + + ROM_START( tmtennis ) ROM_REGION( 0x0400, "maincpu", 0 ) ROM_LOAD( "d552c-048", 0x0000, 0x0400, CRC(78702003) SHA1(4d427d4dbeed901770c682338867f58c7b54eee3) ) @@ -1631,13 +2439,21 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ CONS( 1979, ufombs, 0, 0, ufombs, ufombs, driver_device, 0, "Bambino", "UFO Master-Blaster Station", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1979, ssfball, 0, 0, ssfball, ssfball, driver_device, 0, "Bambino", "Superstar Football", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1979, bmsoccer, 0, 0, bmsoccer, bmsoccer, driver_device, 0, "Bambino", "Kick The Goal Soccer", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1981, bmsafari, 0, 0, bmsafari, bmsafari, driver_device, 0, "Bambino", "Safari (Bambino)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1980, splasfgt, 0, 0, splasfgt, splasfgt, driver_device, 0, "Bambino", "Space Laser Fight", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, bcclimbr, 0, 0, bcclimbr, bcclimbr, driver_device, 0, "Bandai", "Crazy Climber (Bandai)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1980, invspace, 0, 0, invspace, invspace, driver_device, 0, "Epoch", "Invader From Space", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1980, efball, 0, 0, efball, efball, driver_device, 0, "Epoch", "Electronic Football (Epoch)", GAME_SUPPORTS_SAVE ) +CONS( 1981, galaxy2, 0, 0, galaxy2, galaxy2, driver_device, 0, "Epoch", "Galaxy II", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, astrocmd, 0, 0, astrocmd, astrocmd, driver_device, 0, "Epoch", "Astro Command", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, edracula, 0, 0, edracula, edracula, driver_device, 0, "Epoch", "Dracula (Epoch)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) +CONS( 1979, mvbfree, 0, 0, mvbfree, mvbfree, driver_device, 0, "Mego", "Mini-Vid Break Free", GAME_SUPPORTS_SAVE ) + +CONS( 1980, tccombat, 0, 0, tccombat, tccombat, driver_device, 0, "Tomy", "Cosmic Combat", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1980, tmtennis, 0, 0, tmtennis, tmtennis, driver_device, 0, "Tomy", "Tennis (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, tmpacman, 0, 0, tmpacman, tmpacman, driver_device, 0, "Tomy", "Pac Man (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) CONS( 1982, tmscramb, 0, 0, tmscramb, tmscramb, driver_device, 0, "Tomy", "Scramble (Tomy)", GAME_SUPPORTS_SAVE | GAME_REQUIRES_ARTWORK ) diff --git a/src/mess/drivers/imds2.c b/src/mess/drivers/imds2.c index 89de9892f3b..0eb65373a96 100644 --- a/src/mess/drivers/imds2.c +++ b/src/mess/drivers/imds2.c @@ -35,7 +35,7 @@ // // This board acts as a controller for all I/O of the system. // It is structured as if it were 2 boards in one: -// One part (around 8080) controls Keyboard, CRT & floppy, the other part (around PIO 8741) controls all parallel I/Os +// One part (around 8080) controls Keyboard, CRT & floppy, the other part (around PIO 8041A) controls all parallel I/Os // (Line printer, Paper tape puncher, Paper tape reader, I/O to PROM programmer). // Both parts are interfaced to IPC through a bidirectional 8-bit bus. // IOC is composed of these parts: @@ -51,7 +51,7 @@ // A20 8275 CRT controller // A19 2708 Character generator ROM // LS1 3.3 kHz beeper -//*A72 8741-4 CPU @ 6 MHz (PIO: parallel I/O) +// A72 8041A CPU @ 6 MHz (PIO: parallel I/O) // // ********** // Keyboard controller @@ -62,10 +62,13 @@ // // ICs that are not emulated yet are marked with "*" // +// NOTE: +// Firmware running on PIO is NOT original because a dump is not available at the moment. +// Emulator runs a version of PIO firmware that was specifically developped by me to implement +// line printer output. +// // TODO: -// - Improve keyboard mapping -// - Emulate PIO. No known dumps of its ROM are available, though. -// - Emulate line printer output on PIO +// - Find a dump of the original PIO firmware // - Emulate serial channels on IPC // - Emulate PIT on IPC // - Adjust speed of processors. Wait states are not accounted for yet. @@ -87,8 +90,6 @@ // should be mounted and the system reset. After a few seconds the ISIS-II // prompt should appear. A command that could be tried is "DIR" that lists // the content of floppy disk. -// Please note that the message "FAILURE -- PIO NOT RESPONDING" is normal -// as the support for PIO isn't implemented yet #include "includes/imds2.h" @@ -101,6 +102,9 @@ // FDC oscillator of IOC board: 8 MHz #define IOC_XTAL_Y1 XTAL_8MHz +// PIO oscillator: 6 MHz +#define IOC_XTAL_Y3 XTAL_6MHz + // Frequency of beeper #define IOC_BEEP_FREQ 3300 @@ -112,12 +116,13 @@ static ADDRESS_MAP_START(ipc_io_map , AS_IO , 8 , imds2_state) ADDRESS_MAP_UNMAP_LOW AM_RANGE(0xc0 , 0xc0) AM_READWRITE(imds2_ipc_dbbout_r , imds2_ipc_dbbin_data_w) AM_RANGE(0xc1 , 0xc1) AM_READWRITE(imds2_ipc_status_r , imds2_ipc_dbbin_cmd_w) + AM_RANGE(0xf8 , 0xf9) AM_DEVREADWRITE("iocpio" , i8041_device , upi41_master_r , upi41_master_w) AM_RANGE(0xfa , 0xfb) AM_READWRITE(imds2_ipclocpic_r , imds2_ipclocpic_w) AM_RANGE(0xfc , 0xfd) AM_READWRITE(imds2_ipcsyspic_r , imds2_ipcsyspic_w) AM_RANGE(0xff , 0xff) AM_WRITE(imds2_ipc_control_w) ADDRESS_MAP_END - static ADDRESS_MAP_START(ioc_mem_map , AS_PROGRAM , 8 , imds2_state) +static ADDRESS_MAP_START(ioc_mem_map , AS_PROGRAM , 8 , imds2_state) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000 , 0x1fff) AM_ROM AM_RANGE(0x4000 , 0x5fff) AM_RAM @@ -143,6 +148,11 @@ static ADDRESS_MAP_START(ioc_io_map , AS_IO , 8 , imds2_state) AM_RANGE(0xf0 , 0xf8) AM_DEVREADWRITE("iocdma" , i8257_device , read , write) ADDRESS_MAP_END +static ADDRESS_MAP_START(pio_io_map , AS_IO , 8 , imds2_state) + AM_RANGE(MCS48_PORT_P1 , MCS48_PORT_P1) AM_READWRITE(imds2_pio_port_p1_r , imds2_pio_port_p1_w) + AM_RANGE(MCS48_PORT_P2 , MCS48_PORT_P2) AM_READWRITE(imds2_pio_port_p2_r , imds2_pio_port_p2_w) +ADDRESS_MAP_END + static ADDRESS_MAP_START(kb_io_map , AS_IO , 8 , imds2_state) AM_RANGE(MCS48_PORT_P1 , MCS48_PORT_P1) AM_WRITE(imds2_kb_port_p1_w) AM_RANGE(MCS48_PORT_P2 , MCS48_PORT_P2) AM_READ(imds2_kb_port_p2_r) @@ -161,10 +171,12 @@ imds2_state::imds2_state(const machine_config &mconfig, device_type type, const m_iocbeep(*this , "iocbeep"), m_ioctimer(*this , "ioctimer"), m_iocfdc(*this , "iocfdc"), + m_iocpio(*this , "iocpio"), m_kbcpu(*this , "kbcpu"), m_palette(*this , "palette"), m_gfxdecode(*this, "gfxdecode"), m_floppy0(*this , FLOPPY_0), + m_centronics(*this , "centronics"), m_io_key0(*this , "KEY0"), m_io_key1(*this , "KEY1"), m_io_key2(*this , "KEY2"), @@ -173,7 +185,8 @@ imds2_state::imds2_state(const machine_config &mconfig, device_type type, const m_io_key5(*this , "KEY5"), m_io_key6(*this , "KEY6"), m_io_key7(*this , "KEY7"), - m_ioc_options(*this , "IOC_OPTS") + m_ioc_options(*this , "IOC_OPTS"), + m_device_status_byte(0xff) { } @@ -370,7 +383,7 @@ WRITE8_MEMBER(imds2_state::imds2_ioc_reset_f1_w) READ8_MEMBER(imds2_state::imds2_ioc_status_r) { - return (~m_ipc_ioc_status & 0x0f) | 0xf0; + return ~m_ipc_ioc_status; } READ8_MEMBER(imds2_state::imds2_ioc_dbbin_r) @@ -428,6 +441,64 @@ WRITE8_MEMBER(imds2_state::imds2_ioc_mem_w) return prog_space.write_byte(offset , data); } +READ8_MEMBER(imds2_state::imds2_pio_port_p1_r) +{ + // If STATUS ENABLE/ == 0 return inverted device status byte, else return 0xff + // STATUS ENABLE/ == 0 when P23-P20 == 12 & P24 == 0 & P25 = 1 & P26 = 1 + if ((m_pio_port2 & 0x7f) == 0x6c) { + return ~m_device_status_byte; + } else { + return 0xff; +} +} + +WRITE8_MEMBER(imds2_state::imds2_pio_port_p1_w) +{ + m_pio_port1 = data; + imds2_update_printer(); +} + +READ8_MEMBER(imds2_state::imds2_pio_port_p2_r) +{ + return m_pio_port2; +} + +WRITE8_MEMBER(imds2_state::imds2_pio_port_p2_w) +{ + m_pio_port2 = data; + imds2_update_printer(); + // Send INTR to IPC + m_ipclocpic->ir5_w(BIT(data , 7)); +} + +WRITE_LINE_MEMBER(imds2_state::imds2_pio_lpt_ack_w) +{ + if (state) { + m_device_status_byte |= 0x20; + } else { + m_device_status_byte &= ~0x20; + } +} + +WRITE_LINE_MEMBER(imds2_state::imds2_pio_lpt_busy_w) +{ + // Busy is active high in centronics_device whereas it's active low in MDS + if (!state) { + m_device_status_byte |= 0x10; + } else { + m_device_status_byte &= ~0x10; + } +} + +WRITE_LINE_MEMBER(imds2_state::imds2_pio_lpt_select_w) +{ + if (state) { + m_device_status_byte |= 0x40; + } else { + m_device_status_byte &= ~0x40; + } +} + I8275_DRAW_CHARACTER_MEMBER(imds2_state::crtc_display_pixels) { unsigned i; @@ -538,18 +609,40 @@ void imds2_state::imds2_update_beeper(void) m_iocbeep->set_state(m_beeper_timer == 0 && BIT(m_miscout , 0) == 0); } +void imds2_state::imds2_update_printer(void) +{ + // Data to printer is ~P1 when STATUS ENABLE/==1, else 0xff (assuming pull-ups on printer) + UINT8 printer_data; + if ((m_pio_port2 & 0x7f) == 0x6c) { + printer_data = 0xff; + } else { + printer_data = ~m_pio_port1; + } + m_centronics->write_data0(BIT(printer_data , 0)); + m_centronics->write_data1(BIT(printer_data , 1)); + m_centronics->write_data2(BIT(printer_data , 2)); + m_centronics->write_data3(BIT(printer_data , 3)); + m_centronics->write_data4(BIT(printer_data , 4)); + m_centronics->write_data5(BIT(printer_data , 5)); + m_centronics->write_data6(BIT(printer_data , 6)); + m_centronics->write_data7(BIT(printer_data , 7)); + + // LPT DATA STROBE/ == 0 when P23-P20 == 9 & P24 == 0 + m_centronics->write_strobe((m_pio_port2 & 0x1f) != 0x09); +} + static INPUT_PORTS_START(imds2) // See [1], pg 56 for key matrix layout // See [1], pg 57 for keyboard layout PORT_START("KEY0") PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR('@') PORT_CHAR('`') // OK PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') // OK PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) // OK - PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') - PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') // ' - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') // . - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') // OK + PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(':') PORT_CHAR('*') // OK + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') // OK + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') // OK PORT_START("KEY1") PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') // OK @@ -563,13 +656,13 @@ static INPUT_PORTS_START(imds2) PORT_START("KEY2") PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('~') // OK - PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') // OK PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') // OK PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') // OK PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') // OK PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') // OK PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') // OK - PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') + PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR('+') // OK PORT_START("KEY3") PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') // OK @@ -604,17 +697,17 @@ static INPUT_PORTS_START(imds2) PORT_START("KEY6") PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) // BS PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) // OK - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') // OK + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('\\') PORT_CHAR('|') // OK PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) // OK PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) // OK PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) // OK - PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x40 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') // OK PORT_BIT(0x80 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) // OK PORT_START("KEY7") PORT_BIT(0x01 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) // OK PORT_BIT(0x02 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) // OK - PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('_') PORT_CHAR('^') + PORT_BIT(0x04 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('_') PORT_CHAR('^') // OK PORT_BIT(0x08 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // OK PORT_BIT(0x10 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) // OK PORT_BIT(0x20 , IP_ACTIVE_LOW , IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) @@ -727,9 +820,18 @@ static MACHINE_CONFIG_START(imds2 , imds2_state) MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, imds2_floppy_interface) + MCFG_CPU_ADD("iocpio" , I8041 , IOC_XTAL_Y3) + MCFG_CPU_IO_MAP(pio_io_map) + MCFG_QUANTUM_TIME(attotime::from_hz(100)) + MCFG_CPU_ADD("kbcpu", I8741, XTAL_3_579545MHz) /* 3.579545 MHz */ MCFG_CPU_IO_MAP(kb_io_map) MCFG_QUANTUM_TIME(attotime::from_hz(100)) + + MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer") + MCFG_CENTRONICS_ACK_HANDLER(WRITELINE(imds2_state , imds2_pio_lpt_ack_w)) + MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(imds2_state , imds2_pio_lpt_busy_w)) + MCFG_CENTRONICS_PERROR_HANDLER(WRITELINE(imds2_state , imds2_pio_lpt_select_w)) MACHINE_CONFIG_END ROM_START(imds2) @@ -743,6 +845,13 @@ ROM_START(imds2) ROM_LOAD("ioc_a51.bin" , 0x0800 , 0x0800 , CRC(6aa2f86c) SHA1(d3a5314d86e3366545b4c97b29e323dfab383d5f)) ROM_LOAD("ioc_a52.bin" , 0x1000 , 0x0800 , CRC(b88a38d5) SHA1(934716a1daec852f4d1f846510f42408df0c9584)) ROM_LOAD("ioc_a53.bin" , 0x1800 , 0x0800 , CRC(c8df4bb9) SHA1(2dfb921e94ae7033a7182457b2f00657674d1b77)) + + // ROM definition of PIO controller (8041A) + // For the time being a specially developped PIO firmware is used until a dump of the original PIO is + // available. + ROM_REGION(0x400 , "iocpio" , 0) + ROM_LOAD("pio_a72.bin" , 0 , 0x400 , BAD_DUMP CRC(8c8e740b)) + // ROM definition of keyboard controller (8741) ROM_REGION(0x400 , "kbcpu" , 0) ROM_LOAD("kbd511.bin" , 0 , 0x400 , CRC(ba7c4303) SHA1(19899af732d0ae1247bfc79979b1ee5f339ee5cf)) diff --git a/src/mess/drivers/kyocera.c b/src/mess/drivers/kyocera.c index f6b8df08143..14ffe1f28fc 100644 --- a/src/mess/drivers/kyocera.c +++ b/src/mess/drivers/kyocera.c @@ -1168,8 +1168,8 @@ void kc85_state::machine_start() { address_space &program = m_maincpu->space(AS_PROGRAM); - astring region_tag; - m_opt_region = memregion(region_tag.cpy(m_opt_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_opt_region = memregion(region_tag.assign(m_opt_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); /* initialize RTC */ m_rtc->cs_w(1); @@ -1211,8 +1211,8 @@ void pc8201_state::machine_start() { UINT8 *ram = m_ram->pointer(); - astring region_tag; - m_opt_region = memregion(region_tag.cpy(m_opt_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_opt_region = memregion(region_tag.assign(m_opt_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); /* initialize RTC */ m_rtc->cs_w(1); @@ -1245,8 +1245,8 @@ void trsm100_state::machine_start() { address_space &program = m_maincpu->space(AS_PROGRAM); - astring region_tag; - m_opt_region = memregion(region_tag.cpy(m_opt_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_opt_region = memregion(region_tag.assign(m_opt_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); /* initialize RTC */ m_rtc->cs_w(1); @@ -1296,8 +1296,8 @@ void trsm100_state::machine_start() void tandy200_state::machine_start() { - astring region_tag; - m_opt_region = memregion(region_tag.cpy(m_opt_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_opt_region = memregion(region_tag.assign(m_opt_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); /* configure ROM banking */ membank("bank1")->configure_entry(0, m_rom->base()); diff --git a/src/mess/drivers/leapster.c b/src/mess/drivers/leapster.c index 49c712dc0cc..5b71e821a6d 100644 --- a/src/mess/drivers/leapster.c +++ b/src/mess/drivers/leapster.c @@ -269,8 +269,8 @@ DEVICE_IMAGE_LOAD_MEMBER( leapster_state, leapster_cart ) void leapster_state::machine_start() { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (m_cart_rom) { diff --git a/src/mess/drivers/lisa.c b/src/mess/drivers/lisa.c index 3bd85209368..3827d7406ca 100644 --- a/src/mess/drivers/lisa.c +++ b/src/mess/drivers/lisa.c @@ -23,26 +23,6 @@ static ADDRESS_MAP_START(lisa_map, AS_PROGRAM, 16, lisa_state ) AM_RANGE(0x000000, 0xffffff) AM_READWRITE(lisa_r, lisa_w) /* no fixed map, we use an MMU */ ADDRESS_MAP_END -static ADDRESS_MAP_START( lisa_cop_io_map, AS_IO, 8, lisa_state ) - AM_RANGE(COP400_PORT_L, COP400_PORT_L) AM_NOP - AM_RANGE(COP400_PORT_G, COP400_PORT_G) AM_NOP - AM_RANGE(COP400_PORT_D, COP400_PORT_D) AM_NOP - AM_RANGE(COP400_PORT_IN, COP400_PORT_IN) AM_NOP - AM_RANGE(COP400_PORT_SK, COP400_PORT_SK) AM_WRITENOP - AM_RANGE(COP400_PORT_SIO, COP400_PORT_SIO) AM_NOP - AM_RANGE(COP400_PORT_CKO, COP400_PORT_CKO) AM_READNOP -ADDRESS_MAP_END - -static ADDRESS_MAP_START( kb_cop_io_map, AS_IO, 8, lisa_state ) - AM_RANGE(COP400_PORT_L, COP400_PORT_L) AM_NOP - AM_RANGE(COP400_PORT_G, COP400_PORT_G) AM_NOP - AM_RANGE(COP400_PORT_D, COP400_PORT_D) AM_NOP - AM_RANGE(COP400_PORT_IN, COP400_PORT_IN) AM_NOP - AM_RANGE(COP400_PORT_SK, COP400_PORT_SK) AM_WRITENOP - AM_RANGE(COP400_PORT_SIO, COP400_PORT_SIO) AM_NOP - AM_RANGE(COP400_PORT_CKO, COP400_PORT_CKO) AM_READNOP -ADDRESS_MAP_END - static ADDRESS_MAP_START(lisa_fdc_map, AS_PROGRAM, 8, lisa_state ) ADDRESS_MAP_GLOBAL_MASK(0x1fff) // only 8k of address space AM_RANGE(0x0000, 0x03ff) AM_RAM AM_SHARE("fdc_ram") /* RAM (shared with 68000) */ @@ -120,11 +100,9 @@ static MACHINE_CONFIG_START( lisa, lisa_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", lisa_state, lisa_interrupt) MCFG_CPU_ADD(COP421_TAG, COP421, 3900000) - MCFG_CPU_IO_MAP(lisa_cop_io_map) MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED ) MCFG_CPU_ADD(KB_COP421_TAG, COP421, 3900000) // ? - MCFG_CPU_IO_MAP(kb_cop_io_map) MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED ) MCFG_CPU_ADD("fdccpu", M6504, 2000000) /* 16.000 MHz / 8 in when DIS asserted, 16.000 MHz / 9 otherwise (?) */ diff --git a/src/mess/drivers/m24.c b/src/mess/drivers/m24.c index b29edcf54ae..5f7ac2572e5 100644 --- a/src/mess/drivers/m24.c +++ b/src/mess/drivers/m24.c @@ -5,8 +5,12 @@ #include "bus/isa/isa.h" #include "bus/isa/isa_cards.h" #include "machine/m24_kbd.h" +#include "machine/m24_z8000.h" #include "machine/mm58274c.h" #include "includes/genpc.h" +#include "formats/pc_dsk.h" +#include "formats/naslite_dsk.h" +#include "formats/m20_dsk.h" class m24_state : public driver_device { @@ -16,12 +20,14 @@ public: m_maincpu(*this, "maincpu"), m_mb(*this, "mb"), m_kbc(*this, "kbc"), - m_keyboard(*this, "keyboard") + m_keyboard(*this, "keyboard"), + m_z8000_apb(*this, "z8000_apb") { } required_device<cpu_device> m_maincpu; required_device<pc_noppi_mb_device> m_mb; required_device<cpu_device> m_kbc; required_device<m24_keyboard_device> m_keyboard; + optional_device<m24_z8000_device> m_z8000_apb; DECLARE_READ8_MEMBER(keyboard_r); DECLARE_WRITE8_MEMBER(keyboard_w); @@ -30,11 +36,15 @@ public: DECLARE_READ8_MEMBER(kbcdata_r); DECLARE_WRITE8_MEMBER(kbcdata_w); DECLARE_WRITE_LINE_MEMBER(kbcin_w); + DECLARE_WRITE_LINE_MEMBER(dma_hrq_w); + DECLARE_WRITE_LINE_MEMBER(int_w); + DECLARE_WRITE_LINE_MEMBER(halt_i86_w); + DECLARE_FLOPPY_FORMATS( floppy_formats ); void machine_reset(); UINT8 m_sysctl, m_pa, m_kbcin, m_kbcout; - bool m_kbcibf, m_kbdata; + bool m_kbcibf, m_kbdata, m_i86_halt, m_i86_halt_perm; }; void m24_state::machine_reset() @@ -43,6 +53,10 @@ void m24_state::machine_reset() m_pa = 0x40; m_kbcibf = false; m_kbdata = true; + m_i86_halt = false; + m_i86_halt_perm = false; + if(m_z8000_apb) + m_z8000_apb->m_z8000->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); } READ8_MEMBER(m24_state::keyboard_r) @@ -58,7 +72,7 @@ READ8_MEMBER(m24_state::keyboard_r) case 2: return 0; case 4: - return m_kbcibf ? 2 : 0; + return (m_kbcibf ? 2 : 0) | ((m_pa & 0x40) ? 0 : 1); } return 0xff; } @@ -81,6 +95,10 @@ WRITE8_MEMBER(m24_state::keyboard_w) else m_pa &= ~4; break; + case 5: + m_maincpu->set_input_line(INPUT_LINE_HALT, (data & 0x40) ? ASSERT_LINE : CLEAR_LINE); + m_i86_halt = true; + m_i86_halt_perm = true; } } @@ -115,6 +133,33 @@ WRITE_LINE_MEMBER(m24_state::kbcin_w) m_kbdata = state; } +WRITE_LINE_MEMBER(m24_state::dma_hrq_w) +{ + if(!m_i86_halt) + m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + if(m_z8000_apb && !m_z8000_apb->halted()) + m_z8000_apb->m_z8000->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + + /* Assert HLDA */ + m_mb->m_dma8237->hack_w(state); +} + +WRITE_LINE_MEMBER(m24_state::int_w) +{ + if(!m_i86_halt) + m_maincpu->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE); + if(m_z8000_apb && !m_z8000_apb->halted()) + m_z8000_apb->m_z8000->set_input_line(INPUT_LINE_IRQ1, state ? ASSERT_LINE : CLEAR_LINE); +} + +WRITE_LINE_MEMBER(m24_state::halt_i86_w) +{ + if(m_i86_halt_perm) + return; + m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); + m_i86_halt = state ? true : false; +} + static ADDRESS_MAP_START( m24_map, AS_PROGRAM, 16, m24_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x00000, 0x9ffff) AM_RAMBANK("bank10") @@ -127,6 +172,7 @@ static ADDRESS_MAP_START(m24_io, AS_IO, 16, m24_state ) AM_RANGE(0x0060, 0x0065) AM_READWRITE8(keyboard_r, keyboard_w, 0xffff) AM_RANGE(0x0066, 0x0067) AM_READ_PORT("DSW0") AM_RANGE(0x0070, 0x007f) AM_DEVREADWRITE8("mm58174an", mm58274c_device, read, write, 0xffff) + AM_RANGE(0x80c0, 0x80c1) AM_DEVREADWRITE8("z8000_apb", m24_z8000_device, handshake_r, handshake_w, 0xff00) ADDRESS_MAP_END static ADDRESS_MAP_START(kbc_map, AS_PROGRAM, 8, m24_state) @@ -182,6 +228,20 @@ static INPUT_PORTS_START( m24 ) PORT_DIPSETTING( 0xc000, "4" ) INPUT_PORTS_END +FLOPPY_FORMATS_MEMBER( m24_state::floppy_formats ) + FLOPPY_PC_FORMAT, + FLOPPY_NASLITE_FORMAT, + FLOPPY_M20_FORMAT +FLOPPY_FORMATS_END + +static MACHINE_CONFIG_FRAGMENT( cfg_m20_format ) + MCFG_DEVICE_MODIFY("fdc:0") + static_cast<floppy_connector *>(device)->set_formats(m24_state::floppy_formats); + + MCFG_DEVICE_MODIFY("fdc:1") + static_cast<floppy_connector *>(device)->set_formats(m24_state::floppy_formats); +MACHINE_CONFIG_END + static MACHINE_CONFIG_START( olivetti, m24_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", I8086, XTAL_8MHz) @@ -191,10 +251,15 @@ static MACHINE_CONFIG_START( olivetti, m24_state ) MCFG_PCNOPPI_MOTHERBOARD_ADD("mb", "maincpu") - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "cga", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "lpt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "com", false) + MCFG_ISA8_SLOT_ADD("mb:isa", "mb1", pc_isa8_cards, "cga_m24", true) + MCFG_ISA8_SLOT_ADD("mb:isa", "mb2", pc_isa8_cards, "fdc_xt", true) + MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_m20_format) + MCFG_ISA8_SLOT_ADD("mb:isa", "mb3", pc_isa8_cards, "lpt", true) + MCFG_ISA8_SLOT_ADD("mb:isa", "mb4", pc_isa8_cards, "com", true) + + MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, NULL, false) + MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, NULL, false) + MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false) /* internal ram */ MCFG_RAM_ADD(RAM_TAG) @@ -211,6 +276,13 @@ static MACHINE_CONFIG_START( olivetti, m24_state ) MCFG_MM58274C_MODE24(1) // ? MCFG_MM58274C_DAY1(1) // ? + MCFG_DEVICE_ADD("z8000_apb", M24_Z8000, 0) + MCFG_M24_Z8000_HALT(WRITELINE(m24_state, halt_i86_w)) + MCFG_DEVICE_MODIFY("mb:dma8237") + MCFG_I8237_OUT_HREQ_CB(DEVWRITELINE(":", m24_state, dma_hrq_w)) + MCFG_DEVICE_MODIFY("mb:pic8259") + devcb = &pic8259_device::static_set_out_int_callback(*device, DEVCB_DEVWRITELINE(":", m24_state, int_w)); + /* software lists */ MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150") MACHINE_CONFIG_END diff --git a/src/mess/drivers/mbdtower.c b/src/mess/drivers/mbdtower.c index 1db1a8eaede..b456d65cbea 100644 --- a/src/mess/drivers/mbdtower.c +++ b/src/mess/drivers/mbdtower.c @@ -8,7 +8,7 @@ * TMS1400NLL MP7332-N1.U1(Rev. B) or MP7332-N2LL(Rev. C), die labeled MP7332 (assume same ROM contents between revisions) * SN75494N MOS-to-LED digit driver - * rotating reel + lightsensor, 1bit-sound + * motorized rotating reel + lightsensor, 1bit-sound This is a board game, it obviously requires game pieces and the board. The emulated part is the centerpiece, a black tower with a rotating card @@ -164,7 +164,8 @@ WRITE16_MEMBER(mbdtower_state::write_o) READ8_MEMBER(mbdtower_state::read_k) { - // rotation sensor is on K8 + // K: multiplexed inputs + // K8: rotation sensor return read_inputs(3) | ((!m_sensor_blind && sensor_led_on()) ? 8 : 0); } diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c index 5f47632305c..f5e7014d255 100644 --- a/src/mess/drivers/msx.c +++ b/src/mess/drivers/msx.c @@ -1258,14 +1258,14 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( msx2p_floplist ) MCFG_SOFTWARE_LIST_ADD("flop_list", "msx2p_flop") MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx2_flp_l", "msx2_flop") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flp_l", "msx1_flop") // maybe not? + MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flp_l", "msx1_flop") // maybe not? MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( msxr_floplist ) MCFG_SOFTWARE_LIST_ADD("flop_list", "msxr_flop") MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx2p_flp_l", "msx2p_flop") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx2_flp_l", "msx2_flop") // maybe not? - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flp_l", "msx1_flop") // maybe not? + MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx2_flp_l", "msx2_flop") // maybe not? + MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flp_l", "msx1_flop") // maybe not? MACHINE_CONFIG_END FLOPPY_FORMATS_MEMBER( msx_state::floppy_formats ) diff --git a/src/mess/drivers/n64.c b/src/mess/drivers/n64.c index 2c05e376674..1037d2dd65f 100644 --- a/src/mess/drivers/n64.c +++ b/src/mess/drivers/n64.c @@ -88,9 +88,28 @@ static ADDRESS_MAP_START( rsp_map, AS_PROGRAM, 32, n64_mess_state ) ADDRESS_MAP_END static INPUT_PORTS_START( n64 ) + PORT_START("input") + PORT_CONFNAME(0x03, 0x01, "Controller Port 0 Device") + PORT_CONFSETTING(0x00, "None") + PORT_CONFSETTING(0x01, "Joypad") + PORT_CONFSETTING(0x02, "Mouse") + PORT_CONFNAME(0x0C, 0x00, "Controller Port 1 Device") + PORT_CONFSETTING(0x00, "None") + PORT_CONFSETTING(0x04, "Joypad") + PORT_CONFSETTING(0x08, "Mouse") + PORT_CONFNAME(0x30, 0x00, "Controller Port 2 Device") + PORT_CONFSETTING(0x00, "None") + PORT_CONFSETTING(0x10, "Joypad") + PORT_CONFSETTING(0x20, "Mouse") + PORT_CONFNAME(0xC0, 0x00, "Controller Port 3 Device") + PORT_CONFSETTING(0x00, "None") + PORT_CONFSETTING(0x40, "Joypad") + PORT_CONFSETTING(0x80, "Mouse") + + //Player 1 PORT_START("P1") - PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Button A") - PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Button B") + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Button A / Left Click") + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Button B / Right Click") PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) PORT_NAME("P1 Button Z") PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(1) PORT_NAME("P1 Start") PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_NAME("P1 Joypad \xE2\x86\x91") /* Up */ @@ -111,9 +130,16 @@ static INPUT_PORTS_START( n64 ) PORT_START("P1_ANALOG_Y") PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(1) PORT_REVERSE + PORT_START("P1_MOUSE_X") + PORT_BIT( 0xffff, 0x0000, IPT_MOUSE_X ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) + + PORT_START("P1_MOUSE_Y") + PORT_BIT( 0xffff, 0x0000, IPT_MOUSE_Y ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) PORT_REVERSE + + //Player 2 PORT_START("P2") - PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Button A") - PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Button B") + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Button A / Left Click") + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Button B / Right Click") PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2) PORT_NAME("P2 Button Z") PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(2) PORT_NAME("P2 Start") PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) PORT_NAME("P2 Joypad \xE2\x86\x91") /* Up */ @@ -134,6 +160,72 @@ static INPUT_PORTS_START( n64 ) PORT_START("P2_ANALOG_Y") PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(2) PORT_REVERSE + PORT_START("P2_MOUSE_X") + PORT_BIT( 0xffff, 0x0000, IPT_MOUSE_X ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) + + PORT_START("P2_MOUSE_Y") + PORT_BIT( 0xffff, 0x0000, IPT_MOUSE_Y ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) PORT_REVERSE + + //Player 3 + PORT_START("P3") + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(3) PORT_NAME("P3 Button A / Left Click") + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(3) PORT_NAME("P3 Button B / Right Click") + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(3) PORT_NAME("P3 Button Z") + PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(3) PORT_NAME("P3 Start") + PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(3) PORT_NAME("P3 Joypad \xE2\x86\x91") /* Up */ + PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3) PORT_NAME("P3 Joypad \xE2\x86\x93") /* Down */ + PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3) PORT_NAME("P3 Joypad \xE2\x86\x90") /* Left */ + PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3) PORT_NAME("P3 Joypad \xE2\x86\x92") /* Right */ + PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(3) PORT_NAME("P3 Button L") + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(3) PORT_NAME("P3 Button R") + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(3) PORT_NAME("P3 Button C \xE2\x86\x91") /* Up */ + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_PLAYER(3) PORT_NAME("P3 Button C \xE2\x86\x93") /* Down */ + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_PLAYER(3) PORT_NAME("P3 Button C \xE2\x86\x90") /* Left */ + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_PLAYER(3) PORT_NAME("P3 Button C \xE2\x86\x92") /* Right */ + + PORT_START("P3_ANALOG_X") + PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(3) + + PORT_START("P3_ANALOG_Y") + PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(3) PORT_REVERSE + + PORT_START("P3_MOUSE_X") + PORT_BIT( 0xffff, 0x0000, IPT_MOUSE_X ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(3) + + PORT_START("P3_MOUSE_Y") + PORT_BIT( 0xffff, 0x0000, IPT_MOUSE_Y ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(3) PORT_REVERSE + + //Player 4 + PORT_START("P4") + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(4) PORT_NAME("P4 Button A / Left Click") + PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(4) PORT_NAME("P4 Button B / Right Click") + PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(4) PORT_NAME("P4 Button Z") + PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_START ) PORT_PLAYER(4) PORT_NAME("P4 Start") + PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(4) PORT_NAME("P4 Joypad \xE2\x86\x91") /* Up */ + PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4) PORT_NAME("P4 Joypad \xE2\x86\x93") /* Down */ + PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4) PORT_NAME("P4 Joypad \xE2\x86\x90") /* Left */ + PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4) PORT_NAME("P4 Joypad \xE2\x86\x92") /* Right */ + PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(4) PORT_NAME("P4 Button L") + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(4) PORT_NAME("P4 Button R") + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(4) PORT_NAME("P4 Button C \xE2\x86\x91") /* Up */ + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_PLAYER(4) PORT_NAME("P4 Button C \xE2\x86\x93") /* Down */ + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_PLAYER(4) PORT_NAME("P4 Button C \xE2\x86\x90") /* Left */ + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_PLAYER(4) PORT_NAME("P4 Button C \xE2\x86\x92") /* Right */ + + PORT_START("P4_ANALOG_X") + PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(4) + + PORT_START("P4_ANALOG_Y") + PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_PLAYER(4) PORT_REVERSE + + PORT_START("P4_MOUSE_X") + PORT_BIT( 0xffff, 0x0000, IPT_MOUSE_X ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(4) + + PORT_START("P4_MOUSE_Y") + PORT_BIT( 0xffff, 0x0000, IPT_MOUSE_Y ) PORT_MINMAX(0x0000,0xffff) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(4) PORT_REVERSE + PORT_START("RESET") PORT_BIT( 0xfffe, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Warm Reset") PORT_CODE(KEYCODE_3) diff --git a/src/mess/drivers/nc.c b/src/mess/drivers/nc.c index bfe79bc11b9..6e1e1d108a7 100644 --- a/src/mess/drivers/nc.c +++ b/src/mess/drivers/nc.c @@ -795,8 +795,8 @@ void nc_state::machine_start() { m_type = NC_TYPE_1xx; - astring region_tag; - m_card_ram = memregion(region_tag.cpy(m_card->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_card_ram = memregion(region_tag.assign(m_card->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (m_card_ram) m_card_size = m_card_ram->bytes(); else @@ -1139,8 +1139,8 @@ MACHINE_START_MEMBER(nc_state, nc200) { m_type = NC_TYPE_200; - astring region_tag; - m_card_ram = memregion(region_tag.cpy(m_card->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_card_ram = memregion(region_tag.assign(m_card->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (m_card_ram) m_card_size = m_card_ram->bytes(); else diff --git a/src/mess/drivers/newbrain.c b/src/mess/drivers/newbrain.c index 47c165d7343..33ce6bfda8c 100644 --- a/src/mess/drivers/newbrain.c +++ b/src/mess/drivers/newbrain.c @@ -492,20 +492,20 @@ READ8_MEMBER( newbrain_state::cop_in_r ) return (m_cop_wr << 3) | (m_cop_access << 2) | (m_cop_rd << 1) | BIT(m_keydata, 2); } -WRITE8_MEMBER( newbrain_state::cop_so_w ) +WRITE_LINE_MEMBER( newbrain_state::cop_so_w ) { // connected to K1 - m_cop_so = data; + m_cop_so = state; } -WRITE8_MEMBER( newbrain_state::cop_sk_w ) +WRITE_LINE_MEMBER( newbrain_state::cop_sk_w ) { // connected to K2 m_segment_data[m_keylatch] >>= 1; m_segment_data[m_keylatch] = (m_cop_so << 15) | (m_segment_data[m_keylatch] & 0x7fff); } -READ8_MEMBER( newbrain_state::cop_si_r ) +READ_LINE_MEMBER( newbrain_state::cop_si_r ) { // connected to TDI m_cop_tdi = (((m_cassette1)->input() > +1.0) || ((m_cassette2)->input() > +1.0)) ^ m_cop_tdo; @@ -1019,16 +1019,6 @@ static ADDRESS_MAP_START( newbrain_a_io_map, AS_IO, 8, newbrain_state ) AM_RANGE(0x16, 0x16) AM_MIRROR(0xffc0) AM_READ(user_r) ADDRESS_MAP_END -static ADDRESS_MAP_START( newbrain_cop_io_map, AS_IO, 8, newbrain_state ) - AM_RANGE(COP400_PORT_L, COP400_PORT_L) AM_READWRITE(cop_l_r, cop_l_w) - AM_RANGE(COP400_PORT_G, COP400_PORT_G) AM_READWRITE(cop_g_r, cop_g_w) - AM_RANGE(COP400_PORT_D, COP400_PORT_D) AM_WRITE(cop_d_w) - AM_RANGE(COP400_PORT_IN, COP400_PORT_IN) AM_READ(cop_in_r) - AM_RANGE(COP400_PORT_SK, COP400_PORT_SK) AM_WRITE(cop_sk_w) - AM_RANGE(COP400_PORT_SIO, COP400_PORT_SIO) AM_READWRITE(cop_si_r, cop_so_w) - AM_RANGE(COP400_PORT_CKO, COP400_PORT_CKO) AM_READNOP -ADDRESS_MAP_END - static ADDRESS_MAP_START( newbrain_fdc_map, AS_PROGRAM, 8, newbrain_eim_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x1fff) AM_ROM @@ -1321,8 +1311,16 @@ static MACHINE_CONFIG_START( newbrain_a, newbrain_state ) MCFG_CPU_VBLANK_INT_DRIVER(SCREEN_TAG, newbrain_state, newbrain_interrupt) MCFG_CPU_ADD(COP420_TAG, COP420, XTAL_16MHz/8) // COP420-GUW/N - MCFG_CPU_IO_MAP(newbrain_cop_io_map) MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED ) + MCFG_COP400_READ_L_CB(READ8(newbrain_state, cop_l_r)) + MCFG_COP400_WRITE_L_CB(WRITE8(newbrain_state, cop_l_w)) + MCFG_COP400_READ_G_CB(READ8(newbrain_state, cop_g_r)) + MCFG_COP400_WRITE_G_CB(WRITE8(newbrain_state, cop_g_w)) + MCFG_COP400_WRITE_D_CB(WRITE8(newbrain_state, cop_d_w)) + MCFG_COP400_READ_IN_CB(READ8(newbrain_state, cop_in_r)) + MCFG_COP400_WRITE_SK_CB(WRITELINE(newbrain_state, cop_sk_w)) + MCFG_COP400_READ_SI_CB(READLINE(newbrain_state, cop_si_r)) + MCFG_COP400_WRITE_SO_CB(WRITELINE(newbrain_state, cop_so_w)) MCFG_GFXDECODE_ADD("gfxdecode", "palette", newbrain) diff --git a/src/mess/drivers/ngp.c b/src/mess/drivers/ngp.c index e7d980cb999..13c0ef74b03 100644 --- a/src/mess/drivers/ngp.c +++ b/src/mess/drivers/ngp.c @@ -644,8 +644,8 @@ void ngp_state::machine_start() { if (m_cart->exists()) { - astring region_tag; - UINT8 *cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str())->base(); + std::string region_tag; + UINT8 *cart = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str())->base(); m_maincpu->space(AS_PROGRAM).install_read_bank(0x200000, 0x3fffff, "flash0"); m_maincpu->space(AS_PROGRAM).install_read_bank(0x800000, 0x9fffff, "flash1"); diff --git a/src/mess/drivers/pasogo.c b/src/mess/drivers/pasogo.c index 0ee66b8a748..49b404d548f 100644 --- a/src/mess/drivers/pasogo.c +++ b/src/mess/drivers/pasogo.c @@ -516,9 +516,9 @@ INTERRUPT_GEN_MEMBER(pasogo_state::pasogo_interrupt) void pasogo_state::machine_reset() { - astring region_tag; + std::string region_tag; ioport_port *color = ioport("COLOR"); - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (!m_cart_rom) // this should never happen, since we make carts mandatory! m_cart_rom = memregion("maincpu"); diff --git a/src/mess/drivers/pb1000.c b/src/mess/drivers/pb1000.c index 3a313497501..fb15a0b912d 100644 --- a/src/mess/drivers/pb1000.c +++ b/src/mess/drivers/pb1000.c @@ -458,12 +458,12 @@ TIMER_CALLBACK_MEMBER(pb1000_state::keyboard_timer) void pb1000_state::machine_start() { - astring region_tag; + std::string region_tag; m_rom_reg = memregion("rom"); if (m_card1) - m_card1_reg = memregion(region_tag.cpy(m_card1->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + m_card1_reg = memregion(region_tag.assign(m_card1->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (m_card2) - m_card2_reg = memregion(region_tag.cpy(m_card2->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + m_card2_reg = memregion(region_tag.assign(m_card2->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); membank("bank1")->set_base(m_rom_reg->base()); diff --git a/src/mess/drivers/pc2000.c b/src/mess/drivers/pc2000.c index bd29eaee6cc..a8537b96e6a 100644 --- a/src/mess/drivers/pc2000.c +++ b/src/mess/drivers/pc2000.c @@ -740,9 +740,9 @@ INPUT_PORTS_END void pc2000_state::machine_start() { - astring region_tag; + std::string region_tag; UINT8 *bios = memregion("bios")->base(); - UINT8 *cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str())->base(); + UINT8 *cart = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str())->base(); if (!cart) cart = memregion("bios")->base(); @@ -754,9 +754,9 @@ void pc2000_state::machine_start() void gl4004_state::machine_start() { - astring region_tag; + std::string region_tag; UINT8 *bios = memregion("bios")->base(); - UINT8 *cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str())->base(); + UINT8 *cart = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str())->base(); if (!cart) cart = memregion("bios")->base(); diff --git a/src/mess/drivers/pc6001.c b/src/mess/drivers/pc6001.c index 6316e4cc26d..89cc4befb1a 100644 --- a/src/mess/drivers/pc6001.c +++ b/src/mess/drivers/pc6001.c @@ -2078,8 +2078,8 @@ void pc6001_state::machine_reset() if (m_cart->exists()) m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0x5fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); m_port_c_8255=0; @@ -2096,8 +2096,8 @@ MACHINE_RESET_MEMBER(pc6001_state,pc6001m2) { m_video_ram = m_region_maincpu->base() + 0xc000 + 0x28000; - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); // hackish way to simplify bankswitch handling if (m_cart_rom) memcpy(m_region_maincpu->base() + 0x48000, m_cart_rom->base(), 0x4000); @@ -2135,8 +2135,8 @@ MACHINE_RESET_MEMBER(pc6001_state,pc6001sr) { m_video_ram = m_region_maincpu->base() + 0x70000; - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); // should this be mirrored into the EXROM regions? hard to tell without an actual cart dump... m_port_c_8255=0; diff --git a/src/mess/drivers/pc8401a.c b/src/mess/drivers/pc8401a.c index fdce7dbb51f..05e8eec5ba8 100644 --- a/src/mess/drivers/pc8401a.c +++ b/src/mess/drivers/pc8401a.c @@ -488,8 +488,8 @@ INPUT_PORTS_END void pc8401a_state::machine_start() { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); /* initialize RTC */ m_rtc->cs_w(1); diff --git a/src/mess/drivers/pc88va.c b/src/mess/drivers/pc88va.c index b2eb7413f7b..33d350af686 100644 --- a/src/mess/drivers/pc88va.c +++ b/src/mess/drivers/pc88va.c @@ -1727,9 +1727,9 @@ WRITE_LINE_MEMBER( pc88va_state::fdc_irq ) WRITE_LINE_MEMBER(pc88va_state::pc88va_hlda_w) { -// m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); +// m_maincpu->set_input_line(INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE); - m_dmac->hack_w(state); + m_dmac->hack_w(state); // printf("%02x HLDA\n",state); } diff --git a/src/mess/drivers/pegasus.c b/src/mess/drivers/pegasus.c index 3971ea51613..b39777f045c 100644 --- a/src/mess/drivers/pegasus.c +++ b/src/mess/drivers/pegasus.c @@ -383,7 +383,7 @@ static GFXDECODE_START( pegasus ) GFXDECODE_END -// An encrypted single rom starts with 02, decrypted with 20. +// An encrypted single rom starts with 02, decrypted with 20. // The 2nd and 3rd part of a multi-rom set will have no obvious byte, // so we check the first 4 bytes for a signature, and decrypt if found. void pegasus_state::pegasus_decrypt_rom(UINT8 *ROM) @@ -433,8 +433,8 @@ int pegasus_state::load_cart(device_image_interface &image, generic_slot_device if (size == 0) { - astring errmsg; - errmsg.printf("Attempted to load a file that does not work in this socket.\nPlease check \"Usage\" field in the software list for the correct socket(s) to use."); + std::string errmsg; + strprintf(errmsg,"Attempted to load a file that does not work in this socket.\nPlease check \"Usage\" field in the software list for the correct socket(s) to use."); image.seterror(IMAGE_ERROR_UNSPECIFIED, errmsg.c_str()); return IMAGE_INIT_FAIL; } diff --git a/src/mess/drivers/plus4.c b/src/mess/drivers/plus4.c index 7c2fd159650..c902cf303a6 100644 --- a/src/mess/drivers/plus4.c +++ b/src/mess/drivers/plus4.c @@ -4,7 +4,6 @@ TODO: - - cassette motor is turned on only for a moment while LOADing - c16 function ROM test fails - clean up TED - dump PLA @@ -794,12 +793,12 @@ static MACHINE_CONFIG_START( plus4, plus4_state ) MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, plus4_datassette_devices, "c1531", NULL) - MCFG_CBM_IEC_ADD(NULL) + MCFG_CBM_IEC_ADD("c1541") MCFG_CBM_IEC_BUS_ATN_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_9)) MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL) MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy") - MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/16, plus4_expansion_cards, "c1551") + MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/16, plus4_expansion_cards, NULL) MCFG_PLUS4_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(plus4_state, exp_irq_w)) MCFG_PLUS4_EXPANSION_SLOT_CD_INPUT_CALLBACK(READ8(plus4_state, read)) MCFG_PLUS4_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(plus4_state, write)) @@ -812,6 +811,7 @@ static MACHINE_CONFIG_START( plus4, plus4_state ) MCFG_RAM_DEFAULT_SIZE("64K") MACHINE_CONFIG_END + //------------------------------------------------- // MACHINE_CONFIG( plus4p ) //------------------------------------------------- @@ -832,6 +832,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( plus4p, plus4, c16_state ) MCFG_SOFTWARE_LIST_FILTER("flop_list", "PAL") MACHINE_CONFIG_END + //------------------------------------------------- // MACHINE_CONFIG( plus4n ) //------------------------------------------------- diff --git a/src/mess/drivers/pockstat.c b/src/mess/drivers/pockstat.c index 6442d04c47b..fe1cf24052e 100644 --- a/src/mess/drivers/pockstat.c +++ b/src/mess/drivers/pockstat.c @@ -885,8 +885,8 @@ void pockstat_state::machine_start() m_rtc_regs.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pockstat_state::rtc_tick),this)); m_rtc_regs.timer->adjust(attotime::from_hz(1), index); - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); save_item(NAME(m_ftlb_regs.control)); save_item(NAME(m_ftlb_regs.stat)); diff --git a/src/mess/drivers/prestige.c b/src/mess/drivers/prestige.c index 3a15969e0e6..751769cecc2 100644 --- a/src/mess/drivers/prestige.c +++ b/src/mess/drivers/prestige.c @@ -618,8 +618,8 @@ IRQ_CALLBACK_MEMBER(prestige_state::prestige_int_ack) void prestige_state::machine_start() { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); UINT8 *rom = memregion("maincpu")->base(); UINT8 *cart = m_cart_rom->base(); diff --git a/src/mess/drivers/pv1000.c b/src/mess/drivers/pv1000.c index b555fba8505..ea9fdfe7343 100644 --- a/src/mess/drivers/pv1000.c +++ b/src/mess/drivers/pv1000.c @@ -405,8 +405,8 @@ void pv1000_state::machine_start() m_maincpu->space(AS_PROGRAM).install_read_handler(0x0000, 0x7fff, read8_delegate(FUNC(generic_slot_device::read_rom),(generic_slot_device*)m_cart)); // FIXME: this is needed for gfx decoding, but there is probably a cleaner solution! - astring region_tag; - memcpy(memregion("gfxrom")->base(), memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str())->base(), m_cart->get_rom_size()); + std::string region_tag; + memcpy(memregion("gfxrom")->base(), memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str())->base(), m_cart->get_rom_size()); } save_item(NAME(m_io_regs)); diff --git a/src/mess/drivers/px4.c b/src/mess/drivers/px4.c index 0e379ce08e4..46dd71d6e36 100644 --- a/src/mess/drivers/px4.c +++ b/src/mess/drivers/px4.c @@ -1228,9 +1228,9 @@ DRIVER_INIT_MEMBER( px4p_state, px4p ) void px4_state::machine_start() { - astring region_tag; - m_caps1_rom = memregion(region_tag.cpy(m_caps1->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); - m_caps2_rom = memregion(region_tag.cpy(m_caps2->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_caps1_rom = memregion(region_tag.assign(m_caps1->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); + m_caps2_rom = memregion(region_tag.assign(m_caps2->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); m_nvram->set_base(m_ram->pointer(), 0x10000); diff --git a/src/mess/drivers/rvoice.c b/src/mess/drivers/rvoice.c index 3beb473f114..38323a389e4 100644 --- a/src/mess/drivers/rvoice.c +++ b/src/mess/drivers/rvoice.c @@ -1,3 +1,5 @@ +// license:BSD-3-Clause +// copyright-holders:Jonathan Gevaryahu, Kevin Horton /****************************************************************************** * * Bare bones Realvoice PC driver diff --git a/src/mess/drivers/sms.c b/src/mess/drivers/sms.c index 30299616356..d6c029b5434 100644 --- a/src/mess/drivers/sms.c +++ b/src/mess/drivers/sms.c @@ -13,18 +13,17 @@ To do: - SIO interface for Game Gear (needs netplay, I guess) - - Sega Demo Unit II (kiosk expansion device) - - SMS 8 slot game changer (kiosk expansion device) - - SMS Disk System (floppy disk drive expansion device) - unreleased + - Support for other DE-9 compatible controllers, like the Mega Drive 6-Button + that has homebrew software support - Rapid button of Japanese Master System - Keyboard support for Sega Mark III (sg1000m3 driver) - Link between two Mark III's through keyboard, supported by F-16 Fighting Falcon - Mark III expansion slot, used by keyboard and FM module - - Disabling of the SN76489 PSG chip on smsj system (sms1krfm not confirmed) - Software compatibility flags, by region and/or BIOS + - Sega Demo Unit II (kiosk expansion device) + - SMS 8 slot game changer (kiosk expansion device) + - SMS Disk System (floppy disk drive expansion device) - unreleased - Emulate SRAM cartridges? (for use with Bock's dump tool) - - Support for other DE-9 compatible controllers, like the Mega Drive 6-Button - that has homebrew software support The Game Gear SIO hardware is not emulated but has some placeholders in 'machine/sms.c' @@ -293,8 +292,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sg1000m3_io, AS_IO, 8, sms_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x40, 0x7f) AM_READ(sms_count_r) - AM_RANGE(0x40, 0x7f) AM_DEVWRITE("segapsg", segapsg_device, write) + AM_RANGE(0x40, 0x7f) AM_READWRITE(sms_count_r, sms_psg_w) AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, vram_read, vram_write) AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, register_read, register_write) AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x1e) AM_READ(sms_input_port_dc_r) @@ -303,7 +301,7 @@ static ADDRESS_MAP_START( sg1000m3_io, AS_IO, 8, sms_state ) AM_RANGE(0xe1, 0xe1) AM_MIRROR(0x0e) AM_READ(sms_input_port_dd_r) AM_RANGE(0xf0, 0xf0) AM_READWRITE(sms_input_port_dc_r, sms_ym2413_register_port_w) AM_RANGE(0xf1, 0xf1) AM_READWRITE(sms_input_port_dd_r, sms_ym2413_data_port_w) - AM_RANGE(0xf2, 0xf2) AM_READWRITE(sms_fm_detect_r, sms_fm_detect_w) + AM_RANGE(0xf2, 0xf2) AM_READWRITE(sms_audio_control_r, sms_audio_control_w) AM_RANGE(0xf3, 0xf3) AM_READ(sms_input_port_dd_r) AM_RANGE(0xf4, 0xf4) AM_MIRROR(0x02) AM_READ(sms_input_port_dc_r) AM_RANGE(0xf5, 0xf5) AM_MIRROR(0x02) AM_READ(sms_input_port_dd_r) @@ -331,7 +329,7 @@ static ADDRESS_MAP_START( smsj_io, AS_IO, 8, sms_state ) ADDRESS_MAP_END -// The first Korean version also seems to lack I/O port $3F. +// The first Korean SMS version also seems to lack I/O port $3F. // Games detect the first version as Japanese region (opposite to the second // version). The region detection tests the behavior of the TH bits of port // $DD. Port $3F sets the mode used by those bits. If the first version would @@ -344,21 +342,17 @@ static ADDRESS_MAP_START( sms1kr_io, AS_IO, 8, sms_state ) ADDRESS_MAP_END +// It seems the mirrors for I/O ports $3E/$3F also don't seem to exist on the +// Game Gear. Leaving the mirrors breaks 'gloc' (it freezes after 1st stage). static ADDRESS_MAP_START( gg_io, AS_IO, 8, sms_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x00, 0x00) AM_READ(gg_input_port_00_r) AM_RANGE(0x01, 0x05) AM_READWRITE(gg_sio_r, gg_sio_w) - AM_RANGE(0x06, 0x06) AM_DEVWRITE("gamegear", gamegear_device, stereo_w) - AM_RANGE(0x07, 0x07) AM_WRITE(sms_io_control_w) - AM_RANGE(0x08, 0x08) AM_MIRROR(0x06) AM_WRITE(sms_mem_control_w) - AM_RANGE(0x09, 0x09) AM_MIRROR(0x06) AM_WRITE(sms_io_control_w) - AM_RANGE(0x10, 0x10) AM_MIRROR(0x0e) AM_WRITE(sms_mem_control_w) - AM_RANGE(0x11, 0x11) AM_MIRROR(0x0e) AM_WRITE(sms_io_control_w) - AM_RANGE(0x20, 0x20) AM_MIRROR(0x1e) AM_WRITE(sms_mem_control_w) - AM_RANGE(0x21, 0x21) AM_MIRROR(0x1e) AM_WRITE(sms_io_control_w) - AM_RANGE(0x40, 0x7f) AM_READ(sms_count_r) - AM_RANGE(0x40, 0x7f) AM_DEVWRITE("gamegear", gamegear_device, write) + AM_RANGE(0x06, 0x06) AM_WRITE(gg_psg_stereo_w) + AM_RANGE(0x3e, 0x3e) AM_WRITE(sms_mem_control_w) + AM_RANGE(0x3f, 0x3f) AM_WRITE(sms_io_control_w) + AM_RANGE(0x40, 0x7f) AM_READWRITE(sms_count_r, gg_psg_w) AM_RANGE(0x80, 0x80) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, vram_read, vram_write) AM_RANGE(0x81, 0x81) AM_MIRROR(0x3e) AM_DEVREADWRITE("sms_vdp", sega315_5124_device, register_read, register_write) AM_RANGE(0xc0, 0xc0) AM_READ(sms_input_port_dc_r) diff --git a/src/mess/drivers/socrates.c b/src/mess/drivers/socrates.c index b6c2fe87868..6dc5b1ff33b 100644 --- a/src/mess/drivers/socrates.c +++ b/src/mess/drivers/socrates.c @@ -317,8 +317,8 @@ void socrates_state::socrates_check_kb_latch( ) // if kb[1] is full and kb[0] i void socrates_state::machine_reset() { - astring region_tag; - m_cart_reg = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_reg = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); m_rom_bank = 0xF3; // actually set semi-randomly on real console but we need to initialize it somewhere... socrates_set_rom_bank(); @@ -896,8 +896,8 @@ WRITE8_MEMBER( iqunlim_state::video_regs_w ) void iqunlim_state::machine_start() { - astring region_tag; - m_cart_reg = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_reg = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); UINT8 *bios = m_bios_reg->base(); UINT8 *cart = m_cart_reg ? m_cart_reg->base() : m_bios_reg->base(); diff --git a/src/mess/drivers/spc1000.c b/src/mess/drivers/spc1000.c index e67c0c4b3d6..246a5f494bf 100644 --- a/src/mess/drivers/spc1000.c +++ b/src/mess/drivers/spc1000.c @@ -24,6 +24,14 @@ NOTE: 2014-09-13: added code from someone's modified MESS driver for floppy 2014-10-11: Replaced above code with MESS-compliant code [Meeso Kim] + +IMPORTANT NOTE for tape usage: you *FIRST* press PLAY on the tape drive + (e.g. by pressing F2 in partial emulated keyboard mode) and *THEN* you + type LOAD on the BASIC prompt! + Otherwise, the system turns the tape motor ON but it does not receive any + data from tape, and it turns it OFF before the user can press PLAY. + + ****************************************************************************/ /* * SAMSUNG SPC-1000 Series (info from zannylim) @@ -143,6 +151,7 @@ class spc1000_state : public driver_device public: spc1000_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) + , m_motor(false) , m_maincpu(*this, "maincpu") , m_vdg(*this, "mc6847") , m_cass(*this, "cassette") @@ -171,6 +180,7 @@ private: UINT8 m_GMODE; UINT16 m_page; UINT8 *m_work_ram; + bool m_motor; virtual void machine_start(); virtual void machine_reset(); required_device<z80_device> m_maincpu; @@ -206,7 +216,11 @@ READ8_MEMBER(spc1000_state::iplk_r) WRITE8_MEMBER( spc1000_state::cass_w ) { + bool m = BIT(data, 1) ? true : false; m_cass->output(BIT(data, 0) ? -1.0 : 1.0); + if (m && !m_motor) + m_cass->change_state(m_cass->get_state() & CASSETTE_MASK_MOTOR ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR); + m_motor = m; } WRITE8_MEMBER(spc1000_state::gmode_w) @@ -387,6 +401,7 @@ void spc1000_state::machine_reset() { m_work_ram = auto_alloc_array_clear(machine(), UINT8, 0x10000); m_IPLK = 1; + m_motor = false; } READ8_MEMBER(spc1000_state::mc6847_videoram_r) @@ -414,7 +429,7 @@ READ8_MEMBER( spc1000_state::porta_r ) { UINT8 data = 0x3f; data |= (m_cass->input() > 0.0038) ? 0x80 : 0; - data |= ((m_cass->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY) ? 0x00 : 0x40; + data |= ((m_cass->get_state() & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED) && ((m_cass->get_state() & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED) ? 0x00 : 0x40; data &= ~(m_io_joy->read() & 0x3f); return data; @@ -464,7 +479,7 @@ static MACHINE_CONFIG_START( spc1000, spc1000_state ) MCFG_CASSETTE_ADD("cassette") MCFG_CASSETTE_FORMATS(spc1000_cassette_formats) - MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED) + MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_DISABLED) MCFG_SOFTWARE_LIST_ADD("cass_list", "spc1000_cass") diff --git a/src/mess/drivers/svision.c b/src/mess/drivers/svision.c index 4752c1adfcf..a8055bde218 100644 --- a/src/mess/drivers/svision.c +++ b/src/mess/drivers/svision.c @@ -468,8 +468,8 @@ DEVICE_IMAGE_LOAD_MEMBER( svision_state, svision_cart ) void svision_state::machine_start() { int num_banks; - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); num_banks = m_cart_rom->bytes() / 0x4000; m_bank1 = membank("bank1"); diff --git a/src/mess/drivers/test_t400.c b/src/mess/drivers/test_t400.c index e3761fc070d..e52f28bc1ad 100644 --- a/src/mess/drivers/test_t400.c +++ b/src/mess/drivers/test_t400.c @@ -27,23 +27,16 @@ WRITE8_MEMBER( t400_test_suite_state::port_l_w ) // printf("L: %u\n", data); } -static ADDRESS_MAP_START( cop_io, AS_IO, 8, t400_test_suite_state ) - AM_RANGE(COP400_PORT_L, COP400_PORT_L) AM_WRITE(port_l_w) - AM_RANGE(COP400_PORT_SK, COP400_PORT_SK) AM_NOP - AM_RANGE(COP400_PORT_SIO, COP400_PORT_SIO) AM_NOP - AM_RANGE(COP400_PORT_CKO, COP400_PORT_CKO) AM_NOP -ADDRESS_MAP_END - static MACHINE_CONFIG_START( test_t410, t400_test_suite_state ) MCFG_CPU_ADD("maincpu", COP410, 1000000) - MCFG_CPU_IO_MAP(cop_io) MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED ) + MCFG_COP400_WRITE_L_CB(WRITE8(t400_test_suite_state, port_l_w)) MACHINE_CONFIG_END static MACHINE_CONFIG_START( test_t420, t400_test_suite_state ) MCFG_CPU_ADD("maincpu", COP420, 1000000) - MCFG_CPU_IO_MAP(cop_io) MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED ) + MCFG_COP400_WRITE_L_CB(WRITE8(t400_test_suite_state, port_l_w)) MACHINE_CONFIG_END ROM_START( test410 ) diff --git a/src/mess/drivers/ticalc1x.c b/src/mess/drivers/ticalc1x.c index 54ff7ed2241..cb969098250 100644 --- a/src/mess/drivers/ticalc1x.c +++ b/src/mess/drivers/ticalc1x.c @@ -107,6 +107,7 @@ WRITE16_MEMBER(tisr16_state::write_o) READ8_MEMBER(tisr16_state::read_k) { + // K: multiplexed inputs return read_inputs(11); } @@ -309,6 +310,7 @@ WRITE16_MEMBER(ti1270_state::write_o) READ8_MEMBER(ti1270_state::read_k) { + // K: multiplexed inputs return read_inputs(6); } @@ -412,6 +414,7 @@ WRITE16_MEMBER(ti1000_state::write_o) READ8_MEMBER(ti1000_state::read_k) { + // K: multiplexed inputs return read_inputs(5); } @@ -519,6 +522,7 @@ WRITE16_MEMBER(wizatron_state::write_o) READ8_MEMBER(wizatron_state::read_k) { + // K: multiplexed inputs return read_inputs(4); } @@ -605,6 +609,7 @@ WRITE16_MEMBER(lilprof_state::write_o) READ8_MEMBER(lilprof_state::read_k) { + // K: multiplexed inputs return read_inputs(5); } @@ -701,6 +706,7 @@ WRITE16_MEMBER(lilprof78_state::write_o) READ8_MEMBER(lilprof78_state::read_k) { + // K: multiplexed inputs return read_inputs(5); } @@ -804,7 +810,7 @@ WRITE16_MEMBER(majestic_state::write_o) READ8_MEMBER(majestic_state::read_k) { - // note: the Vss row is always on + // K: multiplexed inputs (note: the Vss row is always on) return m_inp_matrix[7]->read() | read_inputs(7); } @@ -863,11 +869,11 @@ static INPUT_PORTS_START( ti30 ) // note: even though power buttons are on the matrix, they are not CPU-controlled PORT_START("IN.7") // Vss! - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("ON/C") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("On/C") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_NAME("1/x") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_NAME(UTF8_SQUAREROOT"x") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("x" UTF8_POW_2) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) INPUT_PORTS_END @@ -927,7 +933,7 @@ static INPUT_PORTS_START( tiprog ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_NAME("DEC") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_NAME("OCT") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_NAME("HEX") - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) INPUT_PORTS_END @@ -984,11 +990,11 @@ static INPUT_PORTS_START( tibusan1 ) // note: even though power buttons are on the matrix, they are not CPU-controlled PORT_START("IN.7") // Vss! - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("ON/C") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGUP) PORT_CODE(KEYCODE_DEL) PORT_NAME("On/C") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)true) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("2nd") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_NAME("x" UTF8_POW_2" " UTF8_SQUAREROOT"x") PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_NAME("ln(x) e" UTF8_POW_X) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("OFF") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("Off") PORT_CHANGED_MEMBER(DEVICE_SELF, hh_tms1k_state, power_button, (void *)false) INPUT_PORTS_END diff --git a/src/mess/drivers/timex.c b/src/mess/drivers/timex.c index fcf96c417f9..90f1f7b084f 100644 --- a/src/mess/drivers/timex.c +++ b/src/mess/drivers/timex.c @@ -544,8 +544,8 @@ MACHINE_RESET_MEMBER(spectrum_state,ts2068) m_port_ff_data = 0; m_port_f4_data = 0; - astring region_tag; - m_dock_crt = memregion(region_tag.cpy(m_dock->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_dock_crt = memregion(region_tag.assign(m_dock->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); m_dock_cart_type = m_dock_crt ? TIMEX_CART_DOCK : TIMEX_CART_NONE; ts2068_update_memory(); diff --git a/src/mess/drivers/tispeak.c b/src/mess/drivers/tispeak.c index b7264622879..b3e2e06ef7b 100644 --- a/src/mess/drivers/tispeak.c +++ b/src/mess/drivers/tispeak.c @@ -354,8 +354,8 @@ void tispeak_state::init_cartridge() { if (m_cart != NULL && m_cart->exists()) { - astring region_tag; - memory_region *src = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + memory_region *src = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (src) memcpy(m_cart_base, src->base(), src->bytes()); } diff --git a/src/mess/drivers/tutor.c b/src/mess/drivers/tutor.c index 01b74a2386e..6433a4c4814 100644 --- a/src/mess/drivers/tutor.c +++ b/src/mess/drivers/tutor.c @@ -225,8 +225,8 @@ public: void tutor_state::machine_start() { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); m_tape_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tutor_state::tape_interrupt_handler),this)); diff --git a/src/mess/drivers/tvc.c b/src/mess/drivers/tvc.c index 6b992f5a8fc..682e1de9047 100644 --- a/src/mess/drivers/tvc.c +++ b/src/mess/drivers/tvc.c @@ -607,8 +607,8 @@ void tvc_state::machine_start() m_ext = memregion("ext"); m_vram = memregion("vram"); - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); } void tvc_state::machine_reset() diff --git a/src/mess/drivers/vboy.c b/src/mess/drivers/vboy.c index db507565c2e..64ff7725fa2 100644 --- a/src/mess/drivers/vboy.c +++ b/src/mess/drivers/vboy.c @@ -1173,8 +1173,8 @@ void vboy_state::machine_start() // trampoline (but forces us to alloc always a 0x200000-wide region) if (m_cart->exists()) { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(VBOYSLOT_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(VBOYSLOT_ROM_REGION_TAG).c_str()); m_maincpu->space(AS_PROGRAM).install_read_bank(0x07000000, 0x071fffff, 0, 0x0e00000, "prog_cart_bank"); m_maincpu->space(AS_IO).install_read_bank(0x07000000, 0x071fffff, 0, 0x0e00000, "io_cart_bank"); diff --git a/src/mess/drivers/vii.c b/src/mess/drivers/vii.c index 78041843b8d..dfaabb9f51c 100644 --- a/src/mess/drivers/vii.c +++ b/src/mess/drivers/vii.c @@ -1023,8 +1023,8 @@ void vii_state::machine_start() if (m_cart && m_cart->exists()) { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); memcpy(&m_p_cart[0], m_cart_rom->base(), 0x400000 * 2); } else if (m_spg243_mode == SPG243_VII) // Vii bios is banked diff --git a/src/mess/drivers/vt100.c b/src/mess/drivers/vt100.c index 2a5b7e986f6..f127b848683 100644 --- a/src/mess/drivers/vt100.c +++ b/src/mess/drivers/vt100.c @@ -562,15 +562,20 @@ MACHINE_CONFIG_END * The optional AVO character set roms (see below) have: pin 18: /CS2*; pin 20: /CS1; pin 21: CS3 hence they match a normal 2716 *(this is marked on the image as if it was CS2 but the input is tied to gnd meaning it must be /CS2) - * The AVO itself can hold up to four character set roms on it (see http://www.bitsavers.org/pdf/dec/terminal/vt100/MP00633_VT100_Mar80.pdf + * The AVO itself can hold up to four roms on it (see http://www.bitsavers.org/pdf/dec/terminal/vt100/MP00633_VT100_Mar80.pdf and http://vt100.net/dec/ek-vt1ac-ug-002.pdf ) - at least eight of these AVO roms were made, and are used as such: + and these roms can depending on jumpers be mapped at 0x8000, OR overlay the main code roms at 0x0000-0x1fff! + They may even allow banking between the main code roms and the overlay roms, I haven't traced the schematic. + At least sixteen of these AVO roms were made, and are used as such: + (based on EK-VT100-TM-003_VT100_Technical_Manual_Jul82.pdf) * No roms - normal vt100 system with AVO installed * 23-069E2 (location e21) - meant for vt100-wa and -wb 'LA120' 'word processing' systems (the mapping of the rom for this system is different than for the ones below) - * 23-099E2 (location e21) and 23-100E2 (location e17) - meant for vt132 + * 23-099E2 (location e21) and 23-100E2 (location e17) - meant for vt132 but only with the OLD vt132 main romset of 095,096,097,098E2 * 23-093E2 (location e21) - meant for vt100 wc through wz 'foreign language' word processing systems * 23-184E2 and 23-185E2 - meant for vt100 with STP printer option board installed, version 1, comes with vt1xx-ac kit * 23-186E2 and 23-187E2 - meant for vt100 with STP printer option board installed, version 2, comes with vt1xx-ac kit + * 23-224E2, 23-225E2, 23-226E2, 23-227E2 - meant for vt132 but only with the NEW vt132 main romset of 180,181,182,183E2 + * 23-236E2, 23-237E2, 23-238E2, 23-239E2 - meant for vt132 but only with the NEW vt132 main romset of 180,181,182,183E2, unknown difference to above (PROM VS MASK ROM? same contents?) */ /* ROM definition */ @@ -596,7 +601,7 @@ ROM_END ROM_START( vt100wp ) // This is from the schematics at http://www.bitsavers.org/pdf/dec/terminal/vt100/MP00633_VT100_Mar80.pdf // This is the standard vt100 cpu board, with the ?word processing? romset, included in the VT1xx-CE kit? // the vt103 can also use this rom set (-04 and -05 revs have it by default, -05 rev also has the optional alt charset rom by default) -// NOTE: this is actually the same as the VT132 romset; vt132 has different AVO roms as well. +// NOTE: this is actually the same as the newer VT132 romset; vt132 has different AVO roms as well. ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "23-180e2-00.e56", 0x0000, 0x0800, NO_DUMP) ROM_LOAD( "23-181e2-00.e52", 0x0800, 0x0800, NO_DUMP) @@ -618,16 +623,34 @@ ROM_START( vt132 ) // This is from anecdotal evidence and vt100.net, as the vt13 // but is pretty much confirmed by page 433 in http://bitsavers.trailing-edge.com/www.computer.museum.uq.edu.au/pdf/EK-VT100-TM-003%20VT100%20Series%20Video%20Terminal%20Technical%20Manual.pdf // VT100 board with block serial roms, AVO with special roms, STP, custom firmware with block serial mode ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + // OLDER vt132 romset + ROM_LOAD( "23-095e2-00.e56", 0x0000, 0x0800, NO_DUMP) + ROM_LOAD( "23-096e2-00.e52", 0x0800, 0x0800, NO_DUMP) + ROM_LOAD( "23-097e2-00.e45", 0x1000, 0x0800, NO_DUMP) + ROM_LOAD( "23-098e2-00.e40", 0x1800, 0x0800, NO_DUMP) + + // NEWER vt132 (and STP?) romset ROM_LOAD( "23-180e2-00.e56", 0x0000, 0x0800, NO_DUMP) ROM_LOAD( "23-181e2-00.e52", 0x0800, 0x0800, NO_DUMP) ROM_LOAD( "23-182e2-00.e45", 0x1000, 0x0800, NO_DUMP) ROM_LOAD( "23-183e2-00.e40", 0x1800, 0x0800, NO_DUMP) + // AVO roms for OLDER romset only ROM_REGION(0x1000, "avo", 0) - ROM_LOAD( "23-236e2-00.bin", 0x0000, 0x0800, NO_DUMP) - ROM_LOAD( "23-237e2-00.bin", 0x0800, 0x0800, NO_DUMP) - ROM_LOAD( "23-238e2-00.bin", 0x1000, 0x0800, NO_DUMP) - ROM_LOAD( "23-239e2-00.bin", 0x1800, 0x0800, NO_DUMP) + ROM_LOAD( "23-099e2-00.e21", 0x0000, 0x0800, NO_DUMP) + ROM_LOAD( "23-100e2-00.e17", 0x0800, 0x0800, NO_DUMP) + // other 2 sockets are empty + + // AVO roms for NEWER romset only + ROM_LOAD( "23-224e2-00.e21", 0x0000, 0x0800, NO_DUMP) + ROM_LOAD( "23-225e2-00.e17", 0x0800, 0x0800, NO_DUMP) + ROM_LOAD( "23-226e2-00.e15", 0x1000, 0x0800, NO_DUMP) // loc is a guess + ROM_LOAD( "23-227e2-00.e13", 0x1800, 0x0800, NO_DUMP) // loc is a guess + // alt rev of newer avo roms, tech manual implies above are PROMS below are MASK ROMS? same data? + ROM_LOAD( "23-236e2-00.e21", 0x0000, 0x0800, NO_DUMP) + ROM_LOAD( "23-237e2-00.e17", 0x0800, 0x0800, NO_DUMP) + ROM_LOAD( "23-238e2-00.e15", 0x1000, 0x0800, NO_DUMP) // loc is a guess + ROM_LOAD( "23-239e2-00.e13", 0x1800, 0x0800, NO_DUMP) // loc is a guess ROM_REGION(0x1000, "chargen", 0) ROM_LOAD( "23-018e2-00.e4", 0x0000, 0x0800, CRC(6958458b) SHA1(103429674fc01c215bbc2c91962ae99231f8ae53)) @@ -636,7 +659,7 @@ ROM_END ROM_START( vt100stp ) // This is from the VT180 technical manual at http://www.bitsavers.org/pdf/dec/terminal/vt180/EK-VT18X-TM-001_VT180_Technical_Man_Feb83.pdf // This is the standard vt100 cpu board, but with the rom set included with the VT1xx-AC kit -// which is only used when the STP 'printer port expansion' card is installed into the terminal board. +// which is only used when the part 54-14260-00 STP 'printer port expansion' card is installed into the terminal board. // Or as http://bitsavers.trailing-edge.com/www.computer.museum.uq.edu.au/pdf/EK-VT100-TM-003%20VT100%20Series%20Video%20Terminal%20Technical%20Manual.pdf // on page 433: VT100 WC or WK uses these as well. // This romset adds the Set-up C page to the setup menu (press keypad 5 twice once you hit set-up) @@ -720,8 +743,8 @@ ROM_END ROM_START( vt125 ) // This is from bitsavers and vt100.net, as the vt125 schematics are not scanned // This is the standard VT100 cpu board with the 'normal' roms (but later rev of eprom 0) populated but with a -// special "GPO" ReGIS cpu+ram card installed which provides a framebuffer, text rotation, custom ram fonts, and many other features. -// Comes with a custom STP card as well. +// special "GPO" ReGIS cpu+ram card 54-14277 installed which provides a framebuffer, text rotation, custom ram fonts, and many other features. +// Comes with a custom 'dumb' STP card 54-14275 as well. // VT125 upgrade kit (upgrade from vt100 or vt105) was called VT1xx-CB or CL ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "23-061e2-00.e56", 0x0000, 0x0800, CRC(3dae97ff) SHA1(e3437850c33565751b86af6c2fe270a491246d15)) // version 2 1980 'later rom' @@ -736,7 +759,7 @@ ROM_START( vt125 ) // This is from bitsavers and vt100.net, as the vt125 schemat // "GPO" aka vt125 "mono board" roms and proms ROM_REGION(0x10000, "monocpu", ROMREGION_ERASEFF) // roms for the 8085 subcpu ROM_LOAD( "23-043e4-00.e22", 0x0000, 0x2000, NO_DUMP) // 2364/MK36xxx mask rom - ROM_LOAD( "23-043e4-00.e23", 0x2000, 0x2000, NO_DUMP) // 2364/MK36xxx mask rom + ROM_LOAD( "23-044e4-00.e23", 0x2000, 0x2000, NO_DUMP) // 2364/MK36xxx mask rom ROM_LOAD( "23-045e4-00.e24", 0x4000, 0x2000, NO_DUMP) // 2364/MK36xxx mask rom // E25 socket is empty diff --git a/src/mess/drivers/vt220.c b/src/mess/drivers/vt220.c index 417dd6f6405..57b1037e6c6 100644 --- a/src/mess/drivers/vt220.c +++ b/src/mess/drivers/vt220.c @@ -1,9 +1,14 @@ +// license:MAME +// copyright-holders: Micko, Jonathan Gevaryahu /*************************************************************************** DEC VT220 30/06/2009 Skeleton driver. + Schematics at www.bitsavers.org/pdf/dec/terminal/vt220/VT220_Schematic_Aug83.pdf + There is an X2212 NVRAM at E17 which needs hookup + ****************************************************************************/ #include "emu.h" @@ -55,7 +60,7 @@ UINT32 vt220_state::screen_update_vt220(screen_device &screen, bitmap_ind16 &bit static MACHINE_CONFIG_START( vt220, vt220_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", I8051, XTAL_16MHz) + MCFG_CPU_ADD("maincpu", I8051, XTAL_11_0592MHz) // from schematic MCFG_CPU_PROGRAM_MAP(vt220_mem) MCFG_CPU_IO_MAP(vt220_io) @@ -79,7 +84,27 @@ MACHINE_CONFIG_END /* ROM definition */ ROM_START( vt220 ) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "23-178e6.bin", 0x0000, 0x8000, CRC(cce5088c) SHA1(4638304729d1213658a96bb22c5211322b74d8fc)) + ROM_DEFAULT_BIOS( "vt220" ) + ROM_SYSTEM_BIOS( 0, "vt220o", "VT220 from schematics" ) + ROMX_LOAD( "23-012e5.e3", 0x0000, 0x4000, NO_DUMP, ROM_BIOS(1)) // location e3 with jumper w7 present and w6 cut; the 8051 maps on top(?) of the first 0x1000 bytes of this rom, though this rom does seem to contain code there. + ROMX_LOAD( "23-012e5.e3", 0x4000, 0x4000, NO_DUMP, ROM_BIOS(1)) // the rom also maps to 4000-7fff as a14 is unconnected (do we have a ROMX_RELOAD I could use here instead of this?) + ROMX_LOAD( "23-248e4.e4", 0x8000, 0x2000, NO_DUMP, ROM_BIOS(1)) + // a000-bfff may be open bus or may be a mirror of above depending on whether the rom uses PGM/A13 as a secondary enable or not + ROMX_LOAD( "23-248e4.e4", 0xc000, 0x2000, NO_DUMP, ROM_BIOS(1)) + // e000-ffff may be open bus or may be a mirror of above depending on whether the rom uses PGM/A13 as a secondary enable or not + ROMX_LOAD( "23-011m1.e1", 0x0000, 0x1000, CRC(6c4930a9) SHA1(1200a5dbf431017a11a51b5c4c9b4e7952b0a2bb), ROM_BIOS(1)) // 8051 internal code, maps on top of the e3 rom at 0000-1000 + ROM_SYSTEM_BIOS( 1, "vt220v21", "VT220 Version 2.1" ) + ROMX_LOAD( "23-183e5.e3", 0x0000, 0x4000, CRC(2848db40) SHA1(b3b029ef964c86ede68ad1b2854cfad766f20af0), ROM_BIOS(2)) // location e3 with jumper w7 present and w6 cut; the 8051 maps on top(?) of the first 0x1000 bytes of this rom, though this rom does seem to contain code there. + ROMX_LOAD( "23-183e5.e3", 0x4000, 0x4000, CRC(2848db40) SHA1(b3b029ef964c86ede68ad1b2854cfad766f20af0), ROM_BIOS(2)) // the rom also maps to 4000-7fff as a14 is unconnected (do we have a ROMX_RELOAD I could use here instead of this?) + ROMX_LOAD( "23-182e5.e4", 0x8000, 0x4000, CRC(c759bf9f) SHA1(6fe21e8eb9576fbcda76d7909b07859db0793c4e), ROM_BIOS(2)) + ROMX_LOAD( "23-182e5.e4", 0xc000, 0x4000, CRC(c759bf9f) SHA1(6fe21e8eb9576fbcda76d7909b07859db0793c4e), ROM_BIOS(2)) // again a14 is unconnected here, so it maps at c000-ffff as well (do we have a ROMX_RELOAD I could use here instead of this?) + ROMX_LOAD( "23-011m1.e1", 0x0000, 0x1000, CRC(6c4930a9) SHA1(1200a5dbf431017a11a51b5c4c9b4e7952b0a2bb), ROM_BIOS(2)) // 8051 internal code, maps on top of the e3 rom at 0000-1000 + ROM_SYSTEM_BIOS( 2, "vt220", "VT220 Version 2.3" ) + ROMX_LOAD( "23-178e6.bin", 0x0000, 0x8000, CRC(cce5088c) SHA1(4638304729d1213658a96bb22c5211322b74d8fc), ROM_BIOS(3)) // probably location e3 with jumper w7 cut and w6 present, hence a14 connects to this rom. socket e4 would be empty so 8000-ffff is open bus + + ROM_REGION( 0x4000, "chargen", ROMREGION_ERASEFF ) + ROM_LOAD( "23-247e4.e13", 0x0000, 0x2000, NO_DUMP) // this is listed in the schematics + ROM_LOAD( "23-348e4.e13", 0x0000, 0x2000, CRC(994f3e37) SHA1(fe72a9fe9adb3a24743a6288d88ae07570cfea9a)) // this can maybe be read as well as a read/writable ram for custom characters which lives ?above? it in chargen address space by setting a bit in a config register. I haven't figured out where in 8051 address space it appears when readable nor where the ram appears. ROM_END /* Driver */ diff --git a/src/mess/drivers/vt240.c b/src/mess/drivers/vt240.c index f14845b6c46..eebf91dfd63 100644 --- a/src/mess/drivers/vt240.c +++ b/src/mess/drivers/vt240.c @@ -15,6 +15,7 @@ 0x0071: RAM fill to 0x00 0x1c8f: UPD7220 + // vt240: x2212 nvram at E56 ****************************************************************************/ #include "emu.h" @@ -267,6 +268,35 @@ ROM_START( mc7105 ) ROM_LOAD16_BYTE( "032.bin", 0x10001, 0x8000, CRC(e81d93c4) SHA1(982412a7a6e65d6f6b4f66bd093e54ee16f31384)) ROM_END +/* ROM definition */ +ROM_START( vt240 ) + ROM_REGION( 0x10000, "charcpu", ROMREGION_ERASEFF ) + ROM_LOAD( "23-008e6-00.e100", 0x0000, 0x8000, CRC(ebc8a2fe) SHA1(70838175f8302fdc0dee79b2403fa95e6d989206)) + + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASEFF ) + ROM_DEFAULT_BIOS( "vt240" ) + ROM_SYSTEM_BIOS( 0, "vt240o", "VT240 older" ) + ROMX_LOAD( "23-004e6-00.e22", 0x00000, 0x8000, CRC(EBA10FEF) SHA1(C0EE4D8E4EEB70066F03F3D17A7E2F2BD0B5F8AD), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "23-005e6-00.e21", 0x00001, 0x8000, CRC(558D0285) SHA1(E96A49BF9D55D8AB879D9B39AA380368C5C9ADE0), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "23-006e6-00.e20", 0x10000, 0x8000, CRC(79C11D82) SHA1(5A6FE5B75B6504A161F2C9B148C0FE9F19770837), ROM_SKIP(1) | ROM_BIOS(1)) + ROMX_LOAD( "23-007e6-00.e19", 0x10001, 0x8000, CRC(D18A2AB8) SHA1(37F448A332FC50298007ED39C8BF1AB1EB6D4CAE), ROM_SKIP(1) | ROM_BIOS(1)) + ROM_SYSTEM_BIOS( 1, "vt240", "VT240 newer" ) + ROMX_LOAD( "23-056e6.e22", 0x00000, 0x8000, CRC(C46E13C3) SHA1(0F2801FA7483D1F97708143CD81AE0816BF9A435), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "23-057e6.e21", 0x00001, 0x8000, CRC(7CE9DCE9) SHA1(5A105E5BDCA13910B3B79CC23567CE2DC36B844D), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "23-058e6.e20", 0x10000, 0x8000, CRC(D2A56B90) SHA1(39CBB26134D7D8BA308DF3A93228918A5945B45F), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD( "23-059e6.e19", 0x10001, 0x8000, CRC(F8393346) SHA1(1E28DAF1B7F2BDABC47CE2F6FA99EF038B275A29), ROM_SKIP(1) | ROM_BIOS(2)) + + ROM_REGION( 0x1000, "proms", ROMREGION_ERASEFF ) + ROM_LOAD( "23-351a1.e149", 0x0000, 0x0020, NO_DUMP) // 82s123; DRAM RAS/CAS Timing PROM + ROM_LOAD( "23-352a1.e187", 0x0020, 0x0020, NO_DUMP) // 82s123; "CT0" Timing PROM + ROM_LOAD( "23-369a1.e53", 0x0040, 0x0020, NO_DUMP) // 82s123; ROM and RAM mapping PROM + ROM_LOAD( "23-370a1.e188", 0x0060, 0x0020, NO_DUMP) // 82s123; "CT1" Timing PROM + ROM_LOAD( "23-994a9.e74", 0x0100, 0x0200, NO_DUMP) // 82s131; T11 Interrupt Encoder PROM + + ROM_REGION( 0x1000, "pals", 0 ) + ROM_LOAD( "23-087j5.e182.e183.jed", 0x0000, 0x1000, NO_DUMP ) // PAL16L8ACN; "Logic Unit" Character Pattern Related +ROM_END + /* Driver */ DRIVER_INIT_MEMBER(vt240_state,vt240) { @@ -283,7 +313,7 @@ DRIVER_INIT_MEMBER(vt240_state,vt240) ROM[0x15e] = 0x00; } -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -//COMP( 1983, vt240, 0, 0, vt220, vt220, driver_device, 0, "Digital Equipment Corporation", "VT240", GAME_NOT_WORKING | GAME_NO_SOUND) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +COMP( 1983, vt240, 0, 0, mc7105, vt240, vt240_state, vt240, "Digital Equipment Corporation", "VT240", GAME_NOT_WORKING | GAME_NO_SOUND) //COMP( 1983, vt241, 0, 0, vt220, vt220, driver_device, 0, "Digital Equipment Corporation", "VT241", GAME_NOT_WORKING | GAME_NO_SOUND) COMP( 1983, mc7105, 0, 0, mc7105, vt240, vt240_state, vt240, "Elektronika", "MC7105", GAME_NOT_WORKING | GAME_NO_SOUND) diff --git a/src/mess/drivers/vt320.c b/src/mess/drivers/vt320.c index 31e63f7e4c4..838cde2875f 100644 --- a/src/mess/drivers/vt320.c +++ b/src/mess/drivers/vt320.c @@ -105,7 +105,11 @@ MACHINE_CONFIG_END /* ROM definition */ ROM_START( vt320 ) ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "23-054e7.bin", 0x0000, 0x10000, CRC(be98f9a4) SHA1(b8044d42ffaadb734fbd047fbca9c8aadeb0bf6c)) + ROM_DEFAULT_BIOS( "vt320" ) + ROM_SYSTEM_BIOS( 0, "vt320o", "VT320 older version" ) + ROMX_LOAD( "23-054e7.e9", 0x0000, 0x10000, CRC(be98f9a4) SHA1(b8044d42ffaadb734fbd047fbca9c8aadeb0bf6c), ROM_BIOS(1)) + ROM_SYSTEM_BIOS( 1, "vt320", "VT320 newer version" ) + ROMX_LOAD( "23-104e7.e9", 0x0000, 0x10000, CRC(5f419b5a) SHA1(dbc429b32d6baefd8a56862717d6e7fea1fb0c1c), ROM_BIOS(2)) ROM_END /* Driver */ diff --git a/src/mess/drivers/vt520.c b/src/mess/drivers/vt520.c index 850b0895487..6ba295538b6 100644 --- a/src/mess/drivers/vt520.c +++ b/src/mess/drivers/vt520.c @@ -31,7 +31,7 @@ static ADDRESS_MAP_START(vt520_mem, AS_PROGRAM, 8, vt520_state) ADDRESS_MAP_END /* - On the boardthere is TC160G41AF (1222) custom chip + On the board there is TC160G41AF (1222) custom chip doing probably all video/uart logic there is 43.430MHz xtal near by */ diff --git a/src/mess/drivers/zrt80.c b/src/mess/drivers/zrt80.c index 06bef179caf..a2f53116770 100644 --- a/src/mess/drivers/zrt80.c +++ b/src/mess/drivers/zrt80.c @@ -302,7 +302,7 @@ static MACHINE_CONFIG_START( zrt80, zrt80_state ) MCFG_MC6845_UPDATE_ROW_CB(zrt80_state, crtc_update_row) MCFG_DEVICE_ADD( "ins8250", INS8250, 2457600 ) - MCFG_INS8250_OUT_RTS_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) + MCFG_INS8250_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0) MCFG_GENERIC_KEYBOARD_CB(WRITE8(zrt80_state, kbd_put)) MACHINE_CONFIG_END @@ -319,5 +319,5 @@ ROM_END /* Driver */ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ COMP( 1982, zrt80, 0, 0, zrt80, zrt80, driver_device, 0, "Digital Research Computers", "ZRT-80", 0) diff --git a/src/mess/includes/abc80.h b/src/mess/includes/abc80.h index bdbb0743438..4e169b4903e 100644 --- a/src/mess/includes/abc80.h +++ b/src/mess/includes/abc80.h @@ -58,8 +58,8 @@ #define Z80PIO_TAG "cd67" #define SN76477_TAG "g8" #define RS232_TAG "ser" -#define CASSETTE_TAG "cassette" -#define KEYBOARD_TAG "keyboard" +#define CASSETTE_TAG "cassette" +#define KEYBOARD_TAG "keyboard" #define TIMER_CASSETTE_TAG "cass" class abc80_state : public driver_device diff --git a/src/mess/includes/fidelz80.h b/src/mess/includes/fidelz80.h index c5457137108..1052607ecf6 100644 --- a/src/mess/includes/fidelz80.h +++ b/src/mess/includes/fidelz80.h @@ -53,9 +53,9 @@ public: DECLARE_WRITE8_MEMBER(bridgec_speech_w ); DECLARE_WRITE8_MEMBER(kp_matrix_w); DECLARE_READ8_MEMBER(unknown_r); + DECLARE_READ8_MEMBER(unknown2_r); DECLARE_READ8_MEMBER(exp_i8243_p2_r); DECLARE_WRITE8_MEMBER(exp_i8243_p2_w); - DECLARE_READ8_MEMBER(rand_r); DECLARE_WRITE8_MEMBER(mcu_data_w); DECLARE_WRITE8_MEMBER(mcu_command_w); DECLARE_READ8_MEMBER(mcu_data_r); diff --git a/src/mess/includes/imds2.h b/src/mess/includes/imds2.h index 7223c336e30..c6bc8e60e54 100644 --- a/src/mess/includes/imds2.h +++ b/src/mess/includes/imds2.h @@ -15,6 +15,7 @@ #include "machine/pic8259.h" #include "machine/i8271.h" #include "imagedev/flopdrv.h" +#include "bus/centronics/ctronics.h" class imds2_state : public driver_device { @@ -53,6 +54,13 @@ class imds2_state : public driver_device DECLARE_READ8_MEMBER(imds2_ioc_mem_r); DECLARE_WRITE8_MEMBER(imds2_ioc_mem_w); + DECLARE_READ8_MEMBER(imds2_pio_port_p1_r); + DECLARE_WRITE8_MEMBER(imds2_pio_port_p1_w); + DECLARE_READ8_MEMBER(imds2_pio_port_p2_r); + DECLARE_WRITE8_MEMBER(imds2_pio_port_p2_w); + DECLARE_WRITE_LINE_MEMBER(imds2_pio_lpt_ack_w); + DECLARE_WRITE_LINE_MEMBER(imds2_pio_lpt_busy_w); + DECLARE_WRITE_LINE_MEMBER(imds2_pio_lpt_select_w); I8275_DRAW_CHARACTER_MEMBER(crtc_display_pixels); @@ -71,10 +79,12 @@ class imds2_state : public driver_device required_device<beep_device> m_iocbeep; required_device<pit8253_device> m_ioctimer; required_device<i8271_device> m_iocfdc; + required_device<i8041_device> m_iocpio; required_device<i8741_device> m_kbcpu; required_device<palette_device> m_palette; required_device<gfxdecode_device> m_gfxdecode; required_device<legacy_floppy_image_device> m_floppy0; + required_device<centronics_device> m_centronics; required_ioport m_io_key0; required_ioport m_io_key1; required_ioport m_io_key2; @@ -90,6 +100,7 @@ class imds2_state : public driver_device bool imds2_in_ipc_rom(offs_t offset) const; void imds2_update_beeper(void); + void imds2_update_printer(void); // IPC control port UINT8 m_ipc_control; @@ -117,6 +128,15 @@ class imds2_state : public driver_device // IPC/IOC status UINT8 m_ipc_ioc_status; + + // PIO port 1 + UINT8 m_pio_port1; + + // PIO port 2 + UINT8 m_pio_port2; + + // PIO device status byte + UINT8 m_device_status_byte; }; #endif /* _IMDS2_H_ */ diff --git a/src/mess/includes/newbrain.h b/src/mess/includes/newbrain.h index 212cf43ab53..6819aef9729 100644 --- a/src/mess/includes/newbrain.h +++ b/src/mess/includes/newbrain.h @@ -103,9 +103,9 @@ public: DECLARE_READ8_MEMBER( cop_g_r ); DECLARE_WRITE8_MEMBER( cop_d_w ); DECLARE_READ8_MEMBER( cop_in_r ); - DECLARE_WRITE8_MEMBER( cop_sk_w ); - DECLARE_READ8_MEMBER( cop_si_r ); - DECLARE_WRITE8_MEMBER( cop_so_w ); + DECLARE_WRITE_LINE_MEMBER( cop_sk_w ); + DECLARE_READ_LINE_MEMBER( cop_si_r ); + DECLARE_WRITE_LINE_MEMBER( cop_so_w ); DECLARE_READ8_MEMBER( tvl_r ); DECLARE_WRITE8_MEMBER( tvl_w ); DECLARE_WRITE8_MEMBER( tvctl_w ); diff --git a/src/mess/includes/sms.h b/src/mess/includes/sms.h index c6f85a0e735..aa7eb1b5d37 100644 --- a/src/mess/includes/sms.h +++ b/src/mess/includes/sms.h @@ -33,6 +33,8 @@ public: m_maincpu(*this, "maincpu"), m_vdp(*this, "sms_vdp"), m_main_scr(*this, "screen"), + m_psg_sms(*this, "segapsg"), + m_psg_gg(*this, "gamegear"), m_ym(*this, "ym2413"), m_port_ctrl1(*this, CONTROL1_TAG), m_port_ctrl2(*this, CONTROL2_TAG), @@ -62,6 +64,8 @@ public: required_device<cpu_device> m_maincpu; required_device<sega315_5124_device> m_vdp; required_device<screen_device> m_main_scr; + optional_device<segapsg_device> m_psg_sms; + optional_device<gamegear_device> m_psg_gg; optional_device<ym2413_device> m_ym; optional_device<sms_control_port_device> m_port_ctrl1; optional_device<sms_control_port_device> m_port_ctrl2; @@ -116,7 +120,7 @@ public: UINT8 m_io_ctrl_reg; UINT8 m_mem_ctrl_reg; UINT8 m_mem_device_enabled; - UINT8 m_fm_detect; + UINT8 m_audio_control; UINT8 m_port_dc_reg; UINT8 m_port_dd_reg; UINT8 m_gg_sio[5]; @@ -164,8 +168,11 @@ public: DECLARE_READ8_MEMBER(gg_input_port_00_r); DECLARE_READ8_MEMBER(gg_sio_r); DECLARE_WRITE8_MEMBER(gg_sio_w); - DECLARE_READ8_MEMBER(sms_fm_detect_r); - DECLARE_WRITE8_MEMBER(sms_fm_detect_w); + DECLARE_WRITE8_MEMBER(gg_psg_stereo_w); + DECLARE_WRITE8_MEMBER(gg_psg_w); + DECLARE_WRITE8_MEMBER(sms_psg_w); + DECLARE_READ8_MEMBER(sms_audio_control_r); + DECLARE_WRITE8_MEMBER(sms_audio_control_w); DECLARE_WRITE8_MEMBER(sms_ym2413_register_port_w); DECLARE_WRITE8_MEMBER(sms_ym2413_data_port_w); DECLARE_READ8_MEMBER(sms_sscope_r); diff --git a/src/mess/layout/bigtrak.lay b/src/mess/layout/bigtrak.lay new file mode 100644 index 00000000000..c74d1d04e82 --- /dev/null +++ b/src/mess/layout/bigtrak.lay @@ -0,0 +1,79 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="text_l"><text string="L"><color red="0.8" green="0.8" blue="0.8" /></text></element> + <element name="text_r"><text string="R"><color red="0.8" green="0.8" blue="0.8" /></text></element> + + <element name="arrow_up" defstate="0"> + <text state="0" string="<--" align="2"><color red="0.3" green="0.3" blue="0.3" /></text> + <text state="1" string="<--" align="2"><color red="1.0" green="1.0" blue="1.0" /></text> + </element> + <element name="arrow_down" defstate="0"> + <text state="0" string="-->" align="1"><color red="0.3" green="0.3" blue="0.3" /></text> + <text state="1" string="-->" align="1"><color red="1.0" green="1.0" blue="1.0" /></text> + </element> + + <element name="text_lamp"><text string="LAMP" align="1"><color red="0.8" green="0.8" blue="0.8" /></text></element> + <element name="text_in"><text string="IN" align="1"><color red="0.8" green="0.8" blue="0.8" /></text></element> + <element name="text_out"><text string="OUT" align="1"><color red="0.8" green="0.8" blue="0.8" /></text></element> + <element name="text_dash"><text string="-" align="1"><color red="0.8" green="0.8" blue="0.8" /></text></element> + + <element name="ind_r" defstate="0"> + <disk state="1"><color red="1.0" green="0.23" blue="0.25" /></disk> + <disk state="0"><color red="0.3" green="0.08" blue="0.07" /></disk> + </element> + <element name="lamp_b" defstate="0"> + <disk state="1"><color red="0.25" green="0.23" blue="1.0" /></disk> + <disk state="0"><color red="0.08" green="0.07" blue="0.3" /></disk> + </element> + + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="17.5" top="0" bottom="36.5" /> + <bezel element="static_black"> + <bounds left="0" right="17.5" top="0" bottom="36.5" /> + </bezel> + + <bezel element="text_lamp"><bounds x="1" y="1" width="10" height="4" /></bezel> + <bezel element="text_dash"><bounds x="10" y="1" width="4" height="4" /></bezel> + <bezel name="lamp1" element="lamp_b"><bounds x="13" y="1.8" width="3" height="3" /></bezel> + + <bezel element="text_in"><bounds x="1" y="27" width="10" height="4" /></bezel> + <bezel element="text_dash"><bounds x="10" y="27" width="4" height="4" /></bezel> + <bezel element="ind_r" inputtag="IN.6" inputmask="0x04">><bounds x="13" y="27.8" width="3" height="3" /></bezel> + + <bezel element="text_out"><bounds x="1" y="31" width="10" height="4" /></bezel> + <bezel element="text_dash"><bounds x="10" y="31" width="4" height="4" /></bezel> + <bezel name="ext_out" element="ind_r"><bounds x="13" y="31.8" width="3" height="3" /></bezel> + + + <bezel element="text_l"><bounds x="2" y="12" width="4" height="4" /></bezel> + <bezel name="left_motor_forward" element="arrow_up"> + <bounds x="2" y="2" width="4" height="10" /> + <orientation rotate="90" /> + </bezel> + <bezel name="left_motor_reverse" element="arrow_down"> + <bounds x="2" y="16.4" width="4" height="10" /> + <orientation rotate="90" /> + </bezel> + + <bezel element="text_r"><bounds x="8" y="12" width="4" height="4" /></bezel> + <bezel name="right_motor_forward" element="arrow_up"> + <bounds x="8" y="2" width="4" height="10" /> + <orientation rotate="90" /> + </bezel> + <bezel name="right_motor_reverse" element="arrow_down"> + <bounds x="8" y="16.4" width="4" height="10" /> + <orientation rotate="90" /> + </bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/efball.lay b/src/mess/layout/efball.lay new file mode 100644 index 00000000000..f46120fae29 --- /dev/null +++ b/src/mess/layout/efball.lay @@ -0,0 +1,279 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="static_white"><rect><color red="0.81" green="0.82" blue="0.81" /></rect></element> + <element name="static_green"><rect><color red="0.03" green="0.7" blue="0.22" /></rect></element> + + <element name="text_down"> + <rect><color red="0.81" green="0.82" blue="0.81" /></rect> + <text string="DOWN"><color red="0.16" green="0.17" blue="0.16" /></text> + </element> + <element name="text_home"> + <rect><color red="0.81" green="0.82" blue="0.81" /></rect> + <text string="HOME"><color red="0.16" green="0.17" blue="0.16" /></text> + </element> + <element name="text_yards"> + <rect><color red="0.81" green="0.82" blue="0.81" /></rect> + <text string="YARDS TO GO"><color red="0.16" green="0.17" blue="0.16" /></text> + </element> + <element name="text_time"> + <rect><color red="0.81" green="0.82" blue="0.81" /></rect> + <text string="TIME REMAINING"><color red="0.16" green="0.17" blue="0.16" /></text> + </element> + <element name="text_field"> + <rect><color red="0.81" green="0.82" blue="0.81" /></rect> + <text string="FIELD POSITION"><color red="0.16" green="0.17" blue="0.16" /></text> + </element> + <element name="text_visitor"> + <rect><color red="0.81" green="0.82" blue="0.81" /></rect> + <text string="VISITOR"><color red="0.16" green="0.17" blue="0.16" /></text> + </element> + + <element name="text_10"><text string="10"><color red="0.83" green="0.84" blue="0.83" /></text></element> + <element name="text_20"><text string="20"><color red="0.83" green="0.84" blue="0.83" /></text></element> + <element name="text_30"><text string="30"><color red="0.83" green="0.84" blue="0.83" /></text></element> + <element name="text_40"><text string="40"><color red="0.83" green="0.84" blue="0.83" /></text></element> + <element name="text_50"><text string="50"><color red="0.83" green="0.84" blue="0.83" /></text></element> + + <!-- 7segs are not italic here, so let's make custom ones --> + + <element name="seg" defstate="0"> + <rect state="0"><color red="0.1" green="0.1" blue="0.1" /></rect> + <rect state="1"><color red="0.2" green="1.0" blue="0.9" /></rect> + </element> + <element name="led" defstate="0"> + <disk state="0"><color red="0.1" green="0.1" blue="0.1" /></disk> + <disk state="1"><color red="0.2" green="1.0" blue="0.9" /></disk> + </element> + <element name="ind" defstate="0"> + <text state="0" string="^"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="^"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-8" right="298" top="-46" bottom="121" /> + <bezel element="static_green"> + <bounds left="-8" right="298" top="-46" bottom="121" /> + </bezel> + + <!-- outer bezel --> + + <bezel element="static_white"><bounds left="-8" right="298" top="-42" bottom="117" /></bezel> + <bezel element="static_green"><bounds left="-8" right="298" top="-22" bottom="-20" /></bezel> + <bezel element="static_green"><bounds left="-8" right="298" top="95" bottom="97" /></bezel> + + <bezel element="static_black"><bounds left="-5" right="295" top="-3" bottom="78" /></bezel> + <bezel element="static_black"><bounds x="-5" y="-17" width="300" height="12" /></bezel> + <bezel element="static_black"><bounds x="-5" y="80" width="300" height="12" /></bezel> + + <bezel element="text_10"><bounds x="10" y="-17" width="30" height="12" /></bezel> + <bezel element="text_20"><bounds x="40" y="-17" width="30" height="12" /></bezel> + <bezel element="text_30"><bounds x="70" y="-17" width="30" height="12" /></bezel> + <bezel element="text_40"><bounds x="100" y="-17" width="30" height="12" /></bezel> + <bezel element="text_50"><bounds x="130" y="-17" width="30" height="12" /></bezel> + <bezel element="text_40"><bounds x="160" y="-17" width="30" height="12" /></bezel> + <bezel element="text_30"><bounds x="190" y="-17" width="30" height="12" /></bezel> + <bezel element="text_20"><bounds x="220" y="-17" width="30" height="12" /></bezel> + <bezel element="text_10"><bounds x="250" y="-17" width="30" height="12" /></bezel> + + <bezel element="text_down"><bounds x="-5" y="-39" width="74" height="14" /></bezel> + <bezel element="text_field"><bounds x="71" y="-39" width="148" height="14" /></bezel> + <bezel element="text_yards"><bounds x="221" y="-39" width="77" height="14" /></bezel> + + <bezel element="text_home"><bounds x="-5" y="100" width="74" height="14" /></bezel> + <bezel element="text_time"><bounds x="71" y="100" width="148" height="14" /></bezel> + <bezel element="text_visitor"><bounds x="221" y="100" width="77" height="14" /></bezel> + + <bezel element="static_green"><bounds x="69" y="-43" width="2" height="22" /></bezel> + <bezel element="static_green"><bounds x="69" y="96" width="2" height="22" /></bezel> + <bezel element="static_green"><bounds x="219" y="-43" width="2" height="22" /></bezel> + <bezel element="static_green"><bounds x="219" y="96" width="2" height="22" /></bezel> + + <!-- vfd --> + + <bezel name="0.0" element="ind"><bounds x="0" y="1" width="20" height="17" /></bezel> + <bezel name="1.0" element="ind"><bounds x="30" y="1" width="20" height="17" /></bezel> + <bezel name="2.0" element="ind"><bounds x="60" y="1" width="20" height="17" /></bezel> + <bezel name="3.0" element="ind"><bounds x="90" y="1" width="20" height="17" /></bezel> + <bezel name="4.0" element="ind"><bounds x="120" y="1" width="20" height="17" /></bezel> + <bezel name="5.0" element="ind"><bounds x="150" y="1" width="20" height="17" /></bezel> + <bezel name="6.0" element="ind"><bounds x="180" y="1" width="20" height="17" /></bezel> + <bezel name="7.0" element="ind"><bounds x="210" y="1" width="20" height="17" /></bezel> + <bezel name="8.0" element="ind"><bounds x="240" y="1" width="20" height="17" /></bezel> + <bezel name="9.0" element="ind"><bounds x="270" y="1" width="20" height="17" /></bezel> + + <bezel name="0.10" element="led"><bounds x="6" y="17" width="8" height="6" /></bezel> + <bezel name="0.10" element="led"><bounds x="6" y="22" width="8" height="6" /></bezel> + <bezel name="0.2" element="led"><bounds x="6" y="41" width="8" height="6" /></bezel> + <bezel name="0.2" element="led"><bounds x="6" y="46" width="8" height="6" /></bezel> + <bezel name="0.5" element="led"><bounds x="6" y="65" width="8" height="6" /></bezel> + <bezel name="0.5" element="led"><bounds x="6" y="70" width="8" height="6" /></bezel> + + <bezel name="1.10" element="led"><bounds x="36" y="17" width="8" height="6" /></bezel> + <bezel name="1.10" element="led"><bounds x="36" y="22" width="8" height="6" /></bezel> + <bezel name="1.2" element="led"><bounds x="36" y="41" width="8" height="6" /></bezel> + <bezel name="1.2" element="led"><bounds x="36" y="46" width="8" height="6" /></bezel> + <bezel name="1.5" element="led"><bounds x="36" y="65" width="8" height="6" /></bezel> + <bezel name="1.5" element="led"><bounds x="36" y="70" width="8" height="6" /></bezel> + + <bezel name="2.10" element="led"><bounds x="66" y="17" width="8" height="6" /></bezel> + <bezel name="2.10" element="led"><bounds x="66" y="22" width="8" height="6" /></bezel> + <bezel name="2.2" element="led"><bounds x="66" y="41" width="8" height="6" /></bezel> + <bezel name="2.2" element="led"><bounds x="66" y="46" width="8" height="6" /></bezel> + <bezel name="2.5" element="led"><bounds x="66" y="65" width="8" height="6" /></bezel> + <bezel name="2.5" element="led"><bounds x="66" y="70" width="8" height="6" /></bezel> + + <bezel name="3.10" element="led"><bounds x="96" y="17" width="8" height="6" /></bezel> + <bezel name="3.10" element="led"><bounds x="96" y="22" width="8" height="6" /></bezel> + <bezel name="3.2" element="led"><bounds x="96" y="41" width="8" height="6" /></bezel> + <bezel name="3.2" element="led"><bounds x="96" y="46" width="8" height="6" /></bezel> + <bezel name="3.5" element="led"><bounds x="96" y="65" width="8" height="6" /></bezel> + <bezel name="3.5" element="led"><bounds x="96" y="70" width="8" height="6" /></bezel> + + <bezel name="4.10" element="led"><bounds x="126" y="17" width="8" height="6" /></bezel> + <bezel name="4.10" element="led"><bounds x="126" y="22" width="8" height="6" /></bezel> + <bezel name="4.2" element="led"><bounds x="126" y="41" width="8" height="6" /></bezel> + <bezel name="4.2" element="led"><bounds x="126" y="46" width="8" height="6" /></bezel> + <bezel name="4.5" element="led"><bounds x="126" y="65" width="8" height="6" /></bezel> + <bezel name="4.5" element="led"><bounds x="126" y="70" width="8" height="6" /></bezel> + + <bezel name="5.10" element="led"><bounds x="156" y="17" width="8" height="6" /></bezel> + <bezel name="5.10" element="led"><bounds x="156" y="22" width="8" height="6" /></bezel> + <bezel name="5.2" element="led"><bounds x="156" y="41" width="8" height="6" /></bezel> + <bezel name="5.2" element="led"><bounds x="156" y="46" width="8" height="6" /></bezel> + <bezel name="5.5" element="led"><bounds x="156" y="65" width="8" height="6" /></bezel> + <bezel name="5.5" element="led"><bounds x="156" y="70" width="8" height="6" /></bezel> + + <bezel name="6.10" element="led"><bounds x="186" y="17" width="8" height="6" /></bezel> + <bezel name="6.10" element="led"><bounds x="186" y="22" width="8" height="6" /></bezel> + <bezel name="6.2" element="led"><bounds x="186" y="41" width="8" height="6" /></bezel> + <bezel name="6.2" element="led"><bounds x="186" y="46" width="8" height="6" /></bezel> + <bezel name="6.5" element="led"><bounds x="186" y="65" width="8" height="6" /></bezel> + <bezel name="6.5" element="led"><bounds x="186" y="70" width="8" height="6" /></bezel> + + <bezel name="7.10" element="led"><bounds x="216" y="17" width="8" height="6" /></bezel> + <bezel name="7.10" element="led"><bounds x="216" y="22" width="8" height="6" /></bezel> + <bezel name="7.2" element="led"><bounds x="216" y="41" width="8" height="6" /></bezel> + <bezel name="7.2" element="led"><bounds x="216" y="46" width="8" height="6" /></bezel> + <bezel name="7.5" element="led"><bounds x="216" y="65" width="8" height="6" /></bezel> + <bezel name="7.5" element="led"><bounds x="216" y="70" width="8" height="6" /></bezel> + + <bezel name="8.10" element="led"><bounds x="246" y="17" width="8" height="6" /></bezel> + <bezel name="8.10" element="led"><bounds x="246" y="22" width="8" height="6" /></bezel> + <bezel name="8.2" element="led"><bounds x="246" y="41" width="8" height="6" /></bezel> + <bezel name="8.2" element="led"><bounds x="246" y="46" width="8" height="6" /></bezel> + <bezel name="8.5" element="led"><bounds x="246" y="65" width="8" height="6" /></bezel> + <bezel name="8.5" element="led"><bounds x="246" y="70" width="8" height="6" /></bezel> + + <bezel name="9.10" element="led"><bounds x="276" y="17" width="8" height="6" /></bezel> + <bezel name="9.10" element="led"><bounds x="276" y="22" width="8" height="6" /></bezel> + <bezel name="9.2" element="led"><bounds x="276" y="41" width="8" height="6" /></bezel> + <bezel name="9.2" element="led"><bounds x="276" y="46" width="8" height="6" /></bezel> + <bezel name="9.5" element="led"><bounds x="276" y="65" width="8" height="6" /></bezel> + <bezel name="9.5" element="led"><bounds x="276" y="70" width="8" height="6" /></bezel> + + <bezel element="static_black"><bounds x="0" y="19" width="290" height="7" /></bezel> + <bezel element="static_black"><bounds x="0" y="43" width="290" height="7" /></bezel> + <bezel element="static_black"><bounds x="0" y="67" width="290" height="7" /></bezel> + + <bezel name="0.1" element="seg"><bounds x="0" y="20" width="20" height="5" /></bezel> + <bezel name="0.3" element="seg"><bounds x="0" y="44" width="20" height="5" /></bezel> + <bezel name="0.4" element="seg"><bounds x="0" y="68" width="20" height="5" /></bezel> + <bezel name="0.9" element="seg"><bounds x="0" y="26" width="5" height="17" /></bezel> + <bezel name="0.7" element="seg"><bounds x="0" y="50" width="5" height="17" /></bezel> + <bezel name="0.8" element="seg"><bounds x="15" y="26" width="5" height="17" /></bezel> + <bezel name="0.6" element="seg"><bounds x="15" y="50" width="5" height="17" /></bezel> + + <bezel name="1.1" element="seg"><bounds x="30" y="20" width="20" height="5" /></bezel> + <bezel name="1.3" element="seg"><bounds x="30" y="44" width="20" height="5" /></bezel> + <bezel name="1.4" element="seg"><bounds x="30" y="68" width="20" height="5" /></bezel> + <bezel name="1.9" element="seg"><bounds x="30" y="26" width="5" height="17" /></bezel> + <bezel name="1.7" element="seg"><bounds x="30" y="50" width="5" height="17" /></bezel> + <bezel name="1.8" element="seg"><bounds x="45" y="26" width="5" height="17" /></bezel> + <bezel name="1.6" element="seg"><bounds x="45" y="50" width="5" height="17" /></bezel> + + <bezel name="2.1" element="seg"><bounds x="60" y="20" width="20" height="5" /></bezel> + <bezel name="2.3" element="seg"><bounds x="60" y="44" width="20" height="5" /></bezel> + <bezel name="2.4" element="seg"><bounds x="60" y="68" width="20" height="5" /></bezel> + <bezel name="2.9" element="seg"><bounds x="60" y="26" width="5" height="17" /></bezel> + <bezel name="2.7" element="seg"><bounds x="60" y="50" width="5" height="17" /></bezel> + <bezel name="2.8" element="seg"><bounds x="75" y="26" width="5" height="17" /></bezel> + <bezel name="2.6" element="seg"><bounds x="75" y="50" width="5" height="17" /></bezel> + + <bezel name="3.1" element="seg"><bounds x="90" y="20" width="20" height="5" /></bezel> + <bezel name="3.3" element="seg"><bounds x="90" y="44" width="20" height="5" /></bezel> + <bezel name="3.4" element="seg"><bounds x="90" y="68" width="20" height="5" /></bezel> + <bezel name="3.9" element="seg"><bounds x="90" y="26" width="5" height="17" /></bezel> + <bezel name="3.7" element="seg"><bounds x="90" y="50" width="5" height="17" /></bezel> + <bezel name="3.8" element="seg"><bounds x="105" y="26" width="5" height="17" /></bezel> + <bezel name="3.6" element="seg"><bounds x="105" y="50" width="5" height="17" /></bezel> + + <bezel name="4.1" element="seg"><bounds x="120" y="20" width="20" height="5" /></bezel> + <bezel name="4.3" element="seg"><bounds x="120" y="44" width="20" height="5" /></bezel> + <bezel name="4.4" element="seg"><bounds x="120" y="68" width="20" height="5" /></bezel> + <bezel name="4.9" element="seg"><bounds x="120" y="26" width="5" height="17" /></bezel> + <bezel name="4.7" element="seg"><bounds x="120" y="50" width="5" height="17" /></bezel> + <bezel name="4.8" element="seg"><bounds x="135" y="26" width="5" height="17" /></bezel> + <bezel name="4.6" element="seg"><bounds x="135" y="50" width="5" height="17" /></bezel> + + <bezel name="5.1" element="seg"><bounds x="150" y="20" width="20" height="5" /></bezel> + <bezel name="5.3" element="seg"><bounds x="150" y="44" width="20" height="5" /></bezel> + <bezel name="5.4" element="seg"><bounds x="150" y="68" width="20" height="5" /></bezel> + <bezel name="5.9" element="seg"><bounds x="150" y="26" width="5" height="17" /></bezel> + <bezel name="5.7" element="seg"><bounds x="150" y="50" width="5" height="17" /></bezel> + <bezel name="5.8" element="seg"><bounds x="165" y="26" width="5" height="17" /></bezel> + <bezel name="5.6" element="seg"><bounds x="165" y="50" width="5" height="17" /></bezel> + + <bezel name="6.1" element="seg"><bounds x="180" y="20" width="20" height="5" /></bezel> + <bezel name="6.3" element="seg"><bounds x="180" y="44" width="20" height="5" /></bezel> + <bezel name="6.4" element="seg"><bounds x="180" y="68" width="20" height="5" /></bezel> + <bezel name="6.9" element="seg"><bounds x="180" y="26" width="5" height="17" /></bezel> + <bezel name="6.7" element="seg"><bounds x="180" y="50" width="5" height="17" /></bezel> + <bezel name="6.8" element="seg"><bounds x="195" y="26" width="5" height="17" /></bezel> + <bezel name="6.6" element="seg"><bounds x="195" y="50" width="5" height="17" /></bezel> + + <bezel name="7.1" element="seg"><bounds x="210" y="20" width="20" height="5" /></bezel> + <bezel name="7.3" element="seg"><bounds x="210" y="44" width="20" height="5" /></bezel> + <bezel name="7.4" element="seg"><bounds x="210" y="68" width="20" height="5" /></bezel> + <bezel name="7.9" element="seg"><bounds x="210" y="26" width="5" height="17" /></bezel> + <bezel name="7.7" element="seg"><bounds x="210" y="50" width="5" height="17" /></bezel> + <bezel name="7.8" element="seg"><bounds x="225" y="26" width="5" height="17" /></bezel> + <bezel name="7.6" element="seg"><bounds x="225" y="50" width="5" height="17" /></bezel> + + <bezel name="8.1" element="seg"><bounds x="240" y="20" width="20" height="5" /></bezel> + <bezel name="8.3" element="seg"><bounds x="240" y="44" width="20" height="5" /></bezel> + <bezel name="8.4" element="seg"><bounds x="240" y="68" width="20" height="5" /></bezel> + <bezel name="8.9" element="seg"><bounds x="240" y="26" width="5" height="17" /></bezel> + <bezel name="8.7" element="seg"><bounds x="240" y="50" width="5" height="17" /></bezel> + <bezel name="8.8" element="seg"><bounds x="255" y="26" width="5" height="17" /></bezel> + <bezel name="8.6" element="seg"><bounds x="255" y="50" width="5" height="17" /></bezel> + + <bezel name="9.1" element="seg"><bounds x="270" y="20" width="20" height="5" /></bezel> + <bezel name="9.3" element="seg"><bounds x="270" y="44" width="20" height="5" /></bezel> + <bezel name="9.4" element="seg"><bounds x="270" y="68" width="20" height="5" /></bezel> + <bezel name="9.9" element="seg"><bounds x="270" y="26" width="5" height="17" /></bezel> + <bezel name="9.7" element="seg"><bounds x="270" y="50" width="5" height="17" /></bezel> + <bezel name="9.8" element="seg"><bounds x="285" y="26" width="5" height="17" /></bezel> + <bezel name="9.6" element="seg"><bounds x="285" y="50" width="5" height="17" /></bezel> + + + <!-- inner bezel --> + + <bezel element="static_white"><bounds x="24" y="-4" width="2" height="83" /></bezel> + <bezel element="static_white"><bounds x="54" y="-4" width="2" height="83" /></bezel> + <bezel element="static_white"><bounds x="84" y="-4" width="2" height="83" /></bezel> + <bezel element="static_white"><bounds x="114" y="-4" width="2" height="83" /></bezel> + <bezel element="static_white"><bounds x="144" y="-4" width="2" height="83" /></bezel> + <bezel element="static_white"><bounds x="174" y="-4" width="2" height="83" /></bezel> + <bezel element="static_white"><bounds x="204" y="-4" width="2" height="83" /></bezel> + <bezel element="static_white"><bounds x="234" y="-4" width="2" height="83" /></bezel> + <bezel element="static_white"><bounds x="264" y="-4" width="2" height="83" /></bezel> + + </view> +</mamelayout> diff --git a/src/mess/layout/einvaderc.lay b/src/mess/layout/einvaderc.lay new file mode 100644 index 00000000000..0916b783796 --- /dev/null +++ b/src/mess/layout/einvaderc.lay @@ -0,0 +1,85 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="digit" defstate="0"> + <led7seg><color red="1.0" green="0.20" blue="0.22" /></led7seg> + </element> + <element name="led" defstate="0"> + <disk state="0"><color red="0.2" green="0.04" blue="0.05" /></disk> + <disk state="1"><color red="1.0" green="0.20" blue="0.22" /></disk> + </element> + + +<!-- build screen --> + + <view name="Test Layout"> + <bounds left="0" right="12" top="0" bottom="28" /> + <bezel element="static_black"> + <bounds left="0" right="12" top="0" bottom="28" /> + </bezel> + + <bezel name="digit0" element="digit"><bounds x="0" y="0" width="4" height="6" /></bezel> + <bezel name="digit1" element="digit"><bounds x="4" y="0" width="4" height="6" /></bezel> + <bezel name="digit2" element="digit"><bounds x="8" y="0" width="4" height="6" /></bezel> + + <!-- led matrix --> + + <bezel name="lamp90" element="led"><bounds x="0" y="10" width="1" height="1" /></bezel> + <bezel name="lamp91" element="led"><bounds x="2" y="10" width="1" height="1" /></bezel> + <bezel name="lamp92" element="led"><bounds x="4" y="10" width="1" height="1" /></bezel> + <bezel name="lamp93" element="led"><bounds x="6" y="10" width="1" height="1" /></bezel> + <bezel name="lamp94" element="led"><bounds x="8" y="10" width="1" height="1" /></bezel> + <bezel name="lamp95" element="led"><bounds x="10" y="10" width="1" height="1" /></bezel> + + <bezel name="lamp80" element="led"><bounds x="0" y="12" width="1" height="1" /></bezel> + <bezel name="lamp81" element="led"><bounds x="2" y="12" width="1" height="1" /></bezel> + <bezel name="lamp82" element="led"><bounds x="4" y="12" width="1" height="1" /></bezel> + <bezel name="lamp83" element="led"><bounds x="6" y="12" width="1" height="1" /></bezel> + <bezel name="lamp84" element="led"><bounds x="8" y="12" width="1" height="1" /></bezel> + <bezel name="lamp85" element="led"><bounds x="10" y="12" width="1" height="1" /></bezel> + + <bezel name="lamp40" element="led"><bounds x="0" y="14" width="1" height="1" /></bezel> + <bezel name="lamp41" element="led"><bounds x="2" y="14" width="1" height="1" /></bezel> + <bezel name="lamp42" element="led"><bounds x="4" y="14" width="1" height="1" /></bezel> + <bezel name="lamp43" element="led"><bounds x="6" y="14" width="1" height="1" /></bezel> + <bezel name="lamp44" element="led"><bounds x="8" y="14" width="1" height="1" /></bezel> + <bezel name="lamp45" element="led"><bounds x="10" y="14" width="1" height="1" /></bezel> + + <bezel name="lamp50" element="led"><bounds x="0" y="16" width="1" height="1" /></bezel> + <bezel name="lamp51" element="led"><bounds x="2" y="16" width="1" height="1" /></bezel> + <bezel name="lamp52" element="led"><bounds x="4" y="16" width="1" height="1" /></bezel> + <bezel name="lamp53" element="led"><bounds x="6" y="16" width="1" height="1" /></bezel> + <bezel name="lamp54" element="led"><bounds x="8" y="16" width="1" height="1" /></bezel> + <bezel name="lamp55" element="led"><bounds x="10" y="16" width="1" height="1" /></bezel> + + <bezel name="lamp60" element="led"><bounds x="0" y="18" width="1" height="1" /></bezel> + <bezel name="lamp61" element="led"><bounds x="2" y="18" width="1" height="1" /></bezel> + <bezel name="lamp62" element="led"><bounds x="4" y="18" width="1" height="1" /></bezel> + <bezel name="lamp63" element="led"><bounds x="6" y="18" width="1" height="1" /></bezel> + <bezel name="lamp64" element="led"><bounds x="8" y="18" width="1" height="1" /></bezel> + <bezel name="lamp65" element="led"><bounds x="10" y="18" width="1" height="1" /></bezel> + + <bezel name="lamp70" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel> + <bezel name="lamp71" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel> + <bezel name="lamp72" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel> + <bezel name="lamp73" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel> + <bezel name="lamp74" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel> + <bezel name="lamp75" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel> + + <bezel name="lamp97" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel> + <bezel name="lamp96" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel> + + <bezel name="lamp30" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel> + <bezel name="lamp31" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel> + <bezel name="lamp32" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel> + <bezel name="lamp33" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel> + <bezel name="lamp34" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel> + <bezel name="lamp35" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/gjackpot.lay b/src/mess/layout/gjackpot.lay new file mode 100644 index 00000000000..84d57fc9745 --- /dev/null +++ b/src/mess/layout/gjackpot.lay @@ -0,0 +1,175 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="static_yellow"><rect><color red="0.85" green="0.75" blue="0.28" /></rect></element> + + <element name="text_gr"><text string="GIN RUMMY"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_bj"><text string="BLACK JACK"><color red="0.9" green="0.8" blue="0.3" /></text></element> + + <element name="text_dealer"><text string="DEALER"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_1"><text string="1"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_2"><text string="2"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_3"><text string="3"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_4"><text string="4"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_5"><text string="5"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_6"><text string="6"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_7"><text string="7"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_8"><text string="8"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_9"><text string="9"><color red="0.9" green="0.8" blue="0.3" /></text></element> + <element name="text_10"><text string="10"><color red="0.9" green="0.8" blue="0.3" /></text></element> + + <element name="digit" defstate="0"> + <led7seg><color red="0.2" green="1.0" blue="0.9" /></led7seg> + </element> + <element name="seg_h" defstate="0"> + <text state="0" string="\"><color red="0.0235" green="0.1255" blue="0.1098" /></text> + <text state="1" string="\"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + + <element name="sym_heart" defstate="0"> + <text state="0" string="H"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="H"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + <element name="sym_diamond" defstate="0"> + <text state="0" string="D"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="D"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + <element name="sym_club" defstate="0"> + <text state="0" string="C"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="C"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + <element name="sym_spade" defstate="0"> + <text state="0" string="S"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="S"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="114" top="0" bottom="53" /> + <bezel element="static_black"> + <bounds left="0" right="114" top="0" bottom="53" /> + </bezel> + + <!-- VFD digits --> + + <bezel name="digit10" element="digit"><bounds x="2" y="19" width="10" height="15" /></bezel> + <bezel name="digit9" element="digit"><bounds x="12" y="19" width="10" height="15" /></bezel> + <bezel name="digit8" element="digit"><bounds x="22" y="19" width="10" height="15" /></bezel> + <bezel name="digit7" element="digit"><bounds x="32" y="19" width="10" height="15" /></bezel> + <bezel name="digit6" element="digit"><bounds x="42" y="19" width="10" height="15" /></bezel> + <bezel name="digit5" element="digit"><bounds x="52" y="19" width="10" height="15" /></bezel> + <bezel name="digit4" element="digit"><bounds x="62" y="19" width="10" height="15" /></bezel> + <bezel name="digit3" element="digit"><bounds x="72" y="19" width="10" height="15" /></bezel> + <bezel name="digit2" element="digit"><bounds x="82" y="19" width="10" height="15" /></bezel> + <bezel name="digit1" element="digit"><bounds x="92" y="19" width="10" height="15" /></bezel> + <bezel name="digit0" element="digit"><bounds x="102" y="19" width="10" height="15" /></bezel> + + <bezel name="10.7" element="seg_h"><bounds x="3" y="27" width="8" height="5" /></bezel> + <bezel name="9.7" element="seg_h"><bounds x="13" y="27" width="8" height="5" /></bezel> + <bezel name="8.7" element="seg_h"><bounds x="23" y="27" width="8" height="5" /></bezel> + <bezel name="7.7" element="seg_h"><bounds x="33" y="27" width="8" height="5" /></bezel> + <bezel name="6.7" element="seg_h"><bounds x="43" y="27" width="8" height="5" /></bezel> + <bezel name="5.7" element="seg_h"><bounds x="53" y="27" width="8" height="5" /></bezel> + <bezel name="4.7" element="seg_h"><bounds x="63" y="27" width="8" height="5" /></bezel> + <bezel name="3.7" element="seg_h"><bounds x="73" y="27" width="8" height="5" /></bezel> + <bezel name="2.7" element="seg_h"><bounds x="83" y="27" width="8" height="5" /></bezel> + <bezel name="1.7" element="seg_h"><bounds x="93" y="27" width="8" height="5" /></bezel> + <bezel name="0.7" element="seg_h"><bounds x="103" y="27" width="8" height="5" /></bezel> + + <!-- VFD card symbols --> + + <bezel name="10.10" element="sym_heart"><bounds x="4" y="15" width="3" height="3" /></bezel> + <bezel name="10.8" element="sym_club"><bounds x="7.5" y="15" width="3" height="3" /></bezel> + <bezel name="10.11" element="sym_spade"><bounds x="3" y="35" width="3" height="3" /></bezel> + <bezel name="10.9" element="sym_diamond"><bounds x="6.5" y="35" width="3" height="3" /></bezel> + + <bezel name="9.10" element="sym_heart"><bounds x="14" y="15" width="3" height="3" /></bezel> + <bezel name="9.8" element="sym_club"><bounds x="17.5" y="15" width="3" height="3" /></bezel> + <bezel name="9.11" element="sym_spade"><bounds x="13" y="35" width="3" height="3" /></bezel> + <bezel name="9.9" element="sym_diamond"><bounds x="16.5" y="35" width="3" height="3" /></bezel> + + <bezel name="8.10" element="sym_heart"><bounds x="24" y="15" width="3" height="3" /></bezel> + <bezel name="8.8" element="sym_club"><bounds x="27.5" y="15" width="3" height="3" /></bezel> + <bezel name="8.11" element="sym_spade"><bounds x="23" y="35" width="3" height="3" /></bezel> + <bezel name="8.9" element="sym_diamond"><bounds x="26.5" y="35" width="3" height="3" /></bezel> + + <bezel name="7.10" element="sym_heart"><bounds x="34" y="15" width="3" height="3" /></bezel> + <bezel name="7.8" element="sym_club"><bounds x="37.5" y="15" width="3" height="3" /></bezel> + <bezel name="7.11" element="sym_spade"><bounds x="33" y="35" width="3" height="3" /></bezel> + <bezel name="7.9" element="sym_diamond"><bounds x="36.5" y="35" width="3" height="3" /></bezel> + + <bezel name="6.10" element="sym_heart"><bounds x="44" y="15" width="3" height="3" /></bezel> + <bezel name="6.8" element="sym_club"><bounds x="47.5" y="15" width="3" height="3" /></bezel> + <bezel name="6.11" element="sym_spade"><bounds x="43" y="35" width="3" height="3" /></bezel> + <bezel name="6.9" element="sym_diamond"><bounds x="46.5" y="35" width="3" height="3" /></bezel> + + <bezel name="5.10" element="sym_heart"><bounds x="54" y="15" width="3" height="3" /></bezel> + <bezel name="5.8" element="sym_club"><bounds x="57.5" y="15" width="3" height="3" /></bezel> + <bezel name="5.11" element="sym_spade"><bounds x="53" y="35" width="3" height="3" /></bezel> + <bezel name="5.9" element="sym_diamond"><bounds x="56.5" y="35" width="3" height="3" /></bezel> + + <bezel name="4.10" element="sym_heart"><bounds x="64" y="15" width="3" height="3" /></bezel> + <bezel name="4.8" element="sym_club"><bounds x="67.5" y="15" width="3" height="3" /></bezel> + <bezel name="4.11" element="sym_spade"><bounds x="63" y="35" width="3" height="3" /></bezel> + <bezel name="4.9" element="sym_diamond"><bounds x="66.5" y="35" width="3" height="3" /></bezel> + + <bezel name="3.10" element="sym_heart"><bounds x="74" y="15" width="3" height="3" /></bezel> + <bezel name="3.8" element="sym_club"><bounds x="77.5" y="15" width="3" height="3" /></bezel> + <bezel name="3.11" element="sym_spade"><bounds x="73" y="35" width="3" height="3" /></bezel> + <bezel name="3.9" element="sym_diamond"><bounds x="76.5" y="35" width="3" height="3" /></bezel> + + <bezel name="2.10" element="sym_heart"><bounds x="84" y="15" width="3" height="3" /></bezel> + <bezel name="2.8" element="sym_club"><bounds x="87.5" y="15" width="3" height="3" /></bezel> + <bezel name="2.11" element="sym_spade"><bounds x="83" y="35" width="3" height="3" /></bezel> + <bezel name="2.9" element="sym_diamond"><bounds x="86.5" y="35" width="3" height="3" /></bezel> + + <bezel name="1.10" element="sym_heart"><bounds x="94" y="15" width="3" height="3" /></bezel> + <bezel name="1.8" element="sym_club"><bounds x="97.5" y="15" width="3" height="3" /></bezel> + <bezel name="1.11" element="sym_spade"><bounds x="93" y="35" width="3" height="3" /></bezel> + <bezel name="1.9" element="sym_diamond"><bounds x="96.5" y="35" width="3" height="3" /></bezel> + + <bezel name="0.10" element="sym_heart"><bounds x="104" y="15" width="3" height="3" /></bezel> + <bezel name="0.8" element="sym_club"><bounds x="107.5" y="15" width="3" height="3" /></bezel> + <bezel name="0.11" element="sym_spade"><bounds x="103" y="35" width="3" height="3" /></bezel> + <bezel name="0.9" element="sym_diamond"><bounds x="106.5" y="35" width="3" height="3" /></bezel> + + + <!-- bezel --> + + <bezel element="static_yellow"><bounds x="0" y="13" width="114" height="0.5" /></bezel> + <bezel element="static_yellow"><bounds x="0" y="39.5" width="114" height="0.5" /></bezel> + <bezel element="static_yellow"><bounds x="0" y="13.25" width="0.5" height="26.5" /></bezel> + <bezel element="static_yellow"><bounds x="113.5" y="13.25" width="0.5" height="26.5" /></bezel> + + <bezel element="static_yellow"><bounds x="0" y="6.5" width="114" height="0.5" /></bezel> + <bezel element="static_yellow"><bounds x="0" y="46" width="114" height="0.5" /></bezel> + + <bezel element="text_gr"><bounds x="0" y="1.25" width="114" height="4" /></bezel> + <bezel element="text_bj"><bounds x="0" y="47.75" width="114" height="4" /></bezel> + + <bezel element="text_10"><bounds x="2" y="8" width="10" height="4" /></bezel> + <bezel element="text_9"><bounds x="12" y="8" width="10" height="4" /></bezel> + <bezel element="text_8"><bounds x="22" y="8" width="10" height="4" /></bezel> + <bezel element="text_7"><bounds x="32" y="8" width="10" height="4" /></bezel> + <bezel element="text_6"><bounds x="42" y="8" width="10" height="4" /></bezel> + <bezel element="text_5"><bounds x="52" y="8" width="10" height="4" /></bezel> + <bezel element="text_4"><bounds x="62" y="8" width="10" height="4" /></bezel> + <bezel element="text_3"><bounds x="72" y="8" width="10" height="4" /></bezel> + <bezel element="text_2"><bounds x="82" y="8" width="10" height="4" /></bezel> + <bezel element="text_1"><bounds x="92" y="8" width="10" height="4" /></bezel> + + <bezel element="text_dealer"><bounds x="2" y="41" width="30" height="4" /></bezel> + <bezel element="text_5"><bounds x="62" y="41" width="10" height="4" /></bezel> + <bezel element="text_4"><bounds x="72" y="41" width="10" height="4" /></bezel> + <bezel element="text_3"><bounds x="82" y="41" width="10" height="4" /></bezel> + <bezel element="text_2"><bounds x="92" y="41" width="10" height="4" /></bezel> + <bezel element="text_1"><bounds x="102" y="41" width="10" height="4" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/gpoker.lay b/src/mess/layout/gpoker.lay new file mode 100644 index 00000000000..25578e687f2 --- /dev/null +++ b/src/mess/layout/gpoker.lay @@ -0,0 +1,156 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="static_white"><rect><color red="0.85" green="0.85" blue="0.85" /></rect></element> + + <element name="text_dealer"><text string="DEALER"><color red="0.9" green="0.9" blue="0.9" /></text></element> + <element name="text_1"><text string="1"><color red="0.9" green="0.9" blue="0.9" /></text></element> + <element name="text_2"><text string="2"><color red="0.9" green="0.9" blue="0.9" /></text></element> + <element name="text_3"><text string="3"><color red="0.9" green="0.9" blue="0.9" /></text></element> + <element name="text_4"><text string="4"><color red="0.9" green="0.9" blue="0.9" /></text></element> + <element name="text_5"><text string="5"><color red="0.9" green="0.9" blue="0.9" /></text></element> + + <element name="digit" defstate="0"> + <led7seg><color red="0.2" green="1.0" blue="0.9" /></led7seg> + </element> + <element name="seg_h" defstate="0"> + <text state="0" string="\"><color red="0.0235" green="0.1255" blue="0.1098" /></text> + <text state="1" string="\"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + + <element name="sym_heart" defstate="0"> + <text state="0" string="H"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="H"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + <element name="sym_diamond" defstate="0"> + <text state="0" string="D"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="D"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + <element name="sym_club" defstate="0"> + <text state="0" string="C"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="C"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + <element name="sym_spade" defstate="0"> + <text state="0" string="S"><color red="0.1" green="0.1" blue="0.1" /></text> + <text state="1" string="S"><color red="0.2" green="1.0" blue="0.9" /></text> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="114" top="0" bottom="33" /> + <bezel element="static_black"> + <bounds left="0" right="114" top="0" bottom="33" /> + </bezel> + + <!-- VFD digits --> + + <bezel name="digit9" element="digit"><bounds x="2" y="12" width="10" height="15" /></bezel> + <bezel name="digit8" element="digit"><bounds x="12" y="12" width="10" height="15" /></bezel> + <bezel name="digit7" element="digit"><bounds x="22" y="12" width="10" height="15" /></bezel> + <bezel name="digit6" element="digit"><bounds x="32" y="12" width="10" height="15" /></bezel> + <bezel name="digit5" element="digit"><bounds x="42" y="12" width="10" height="15" /></bezel> + <bezel name="digit10" element="digit"><bounds x="52" y="12" width="10" height="15" /></bezel> + <bezel name="digit4" element="digit"><bounds x="62" y="12" width="10" height="15" /></bezel> + <bezel name="digit3" element="digit"><bounds x="72" y="12" width="10" height="15" /></bezel> + <bezel name="digit2" element="digit"><bounds x="82" y="12" width="10" height="15" /></bezel> + <bezel name="digit1" element="digit"><bounds x="92" y="12" width="10" height="15" /></bezel> + <bezel name="digit0" element="digit"><bounds x="102" y="12" width="10" height="15" /></bezel> + + <bezel name="9.7" element="seg_h"><bounds x="3" y="20" width="8" height="5" /></bezel> + <bezel name="8.7" element="seg_h"><bounds x="13" y="20" width="8" height="5" /></bezel> + <bezel name="7.7" element="seg_h"><bounds x="23" y="20" width="8" height="5" /></bezel> + <bezel name="6.7" element="seg_h"><bounds x="33" y="20" width="8" height="5" /></bezel> + <bezel name="5.7" element="seg_h"><bounds x="43" y="20" width="8" height="5" /></bezel> + <bezel name="10.7" element="seg_h"><bounds x="53" y="20" width="8" height="5" /></bezel> + <bezel name="4.7" element="seg_h"><bounds x="63" y="20" width="8" height="5" /></bezel> + <bezel name="3.7" element="seg_h"><bounds x="73" y="20" width="8" height="5" /></bezel> + <bezel name="2.7" element="seg_h"><bounds x="83" y="20" width="8" height="5" /></bezel> + <bezel name="1.7" element="seg_h"><bounds x="93" y="20" width="8" height="5" /></bezel> + <bezel name="0.7" element="seg_h"><bounds x="103" y="20" width="8" height="5" /></bezel> + + <!-- VFD card symbols --> + + <bezel name="9.10" element="sym_heart"><bounds x="4" y="8" width="3" height="3" /></bezel> + <bezel name="9.8" element="sym_club"><bounds x="7.5" y="8" width="3" height="3" /></bezel> + <bezel name="9.11" element="sym_spade"><bounds x="3" y="28" width="3" height="3" /></bezel> + <bezel name="9.9" element="sym_diamond"><bounds x="6.5" y="28" width="3" height="3" /></bezel> + + <bezel name="8.10" element="sym_heart"><bounds x="14" y="8" width="3" height="3" /></bezel> + <bezel name="8.8" element="sym_club"><bounds x="17.5" y="8" width="3" height="3" /></bezel> + <bezel name="8.11" element="sym_spade"><bounds x="13" y="28" width="3" height="3" /></bezel> + <bezel name="8.9" element="sym_diamond"><bounds x="16.5" y="28" width="3" height="3" /></bezel> + + <bezel name="7.10" element="sym_heart"><bounds x="24" y="8" width="3" height="3" /></bezel> + <bezel name="7.8" element="sym_club"><bounds x="27.5" y="8" width="3" height="3" /></bezel> + <bezel name="7.11" element="sym_spade"><bounds x="23" y="28" width="3" height="3" /></bezel> + <bezel name="7.9" element="sym_diamond"><bounds x="26.5" y="28" width="3" height="3" /></bezel> + + <bezel name="6.10" element="sym_heart"><bounds x="34" y="8" width="3" height="3" /></bezel> + <bezel name="6.8" element="sym_club"><bounds x="37.5" y="8" width="3" height="3" /></bezel> + <bezel name="6.11" element="sym_spade"><bounds x="33" y="28" width="3" height="3" /></bezel> + <bezel name="6.9" element="sym_diamond"><bounds x="36.5" y="28" width="3" height="3" /></bezel> + + <bezel name="5.10" element="sym_heart"><bounds x="44" y="8" width="3" height="3" /></bezel> + <bezel name="5.8" element="sym_club"><bounds x="47.5" y="8" width="3" height="3" /></bezel> + <bezel name="5.11" element="sym_spade"><bounds x="43" y="28" width="3" height="3" /></bezel> + <bezel name="5.9" element="sym_diamond"><bounds x="46.5" y="28" width="3" height="3" /></bezel> + + <bezel name="10.10" element="sym_heart"><bounds x="54" y="8" width="3" height="3" /></bezel> + <bezel name="10.8" element="sym_club"><bounds x="57.5" y="8" width="3" height="3" /></bezel> + <bezel name="10.11" element="sym_spade"><bounds x="53" y="28" width="3" height="3" /></bezel> + <bezel name="10.9" element="sym_diamond"><bounds x="56.5" y="28" width="3" height="3" /></bezel> + + <bezel name="4.10" element="sym_heart"><bounds x="64" y="8" width="3" height="3" /></bezel> + <bezel name="4.8" element="sym_club"><bounds x="67.5" y="8" width="3" height="3" /></bezel> + <bezel name="4.11" element="sym_spade"><bounds x="63" y="28" width="3" height="3" /></bezel> + <bezel name="4.9" element="sym_diamond"><bounds x="66.5" y="28" width="3" height="3" /></bezel> + + <bezel name="3.10" element="sym_heart"><bounds x="74" y="8" width="3" height="3" /></bezel> + <bezel name="3.8" element="sym_club"><bounds x="77.5" y="8" width="3" height="3" /></bezel> + <bezel name="3.11" element="sym_spade"><bounds x="73" y="28" width="3" height="3" /></bezel> + <bezel name="3.9" element="sym_diamond"><bounds x="76.5" y="28" width="3" height="3" /></bezel> + + <bezel name="2.10" element="sym_heart"><bounds x="84" y="8" width="3" height="3" /></bezel> + <bezel name="2.8" element="sym_club"><bounds x="87.5" y="8" width="3" height="3" /></bezel> + <bezel name="2.11" element="sym_spade"><bounds x="83" y="28" width="3" height="3" /></bezel> + <bezel name="2.9" element="sym_diamond"><bounds x="86.5" y="28" width="3" height="3" /></bezel> + + <bezel name="1.10" element="sym_heart"><bounds x="94" y="8" width="3" height="3" /></bezel> + <bezel name="1.8" element="sym_club"><bounds x="97.5" y="8" width="3" height="3" /></bezel> + <bezel name="1.11" element="sym_spade"><bounds x="93" y="28" width="3" height="3" /></bezel> + <bezel name="1.9" element="sym_diamond"><bounds x="96.5" y="28" width="3" height="3" /></bezel> + + <bezel name="0.10" element="sym_heart"><bounds x="104" y="8" width="3" height="3" /></bezel> + <bezel name="0.8" element="sym_club"><bounds x="107.5" y="8" width="3" height="3" /></bezel> + <bezel name="0.11" element="sym_spade"><bounds x="103" y="28" width="3" height="3" /></bezel> + <bezel name="0.9" element="sym_diamond"><bounds x="106.5" y="28" width="3" height="3" /></bezel> + + + <!-- bezel --> + + <bezel element="static_white"><bounds x="0" y="6" width="54" height="0.5" /></bezel> + <bezel element="static_white"><bounds x="0" y="32.5" width="54" height="0.5" /></bezel> + <bezel element="static_white"><bounds x="0" y="6.25" width="0.5" height="26.5" /></bezel> + <bezel element="static_white"><bounds x="53.5" y="6.25" width="0.5" height="26.5" /></bezel> + + <bezel element="static_white"><bounds x="60" y="6" width="54" height="0.5" /></bezel> + <bezel element="static_white"><bounds x="60" y="32.5" width="54" height="0.5" /></bezel> + <bezel element="static_white"><bounds x="60" y="6.25" width="0.5" height="26.5" /></bezel> + <bezel element="static_white"><bounds x="113.5" y="6.25" width="0.5" height="26.5" /></bezel> + + <bezel element="text_dealer"><bounds x="2" y="1" width="50" height="4" /></bezel> + + <bezel element="text_5"><bounds x="62" y="1" width="10" height="4" /></bezel> + <bezel element="text_4"><bounds x="72" y="1" width="10" height="4" /></bezel> + <bezel element="text_3"><bounds x="82" y="1" width="10" height="4" /></bezel> + <bezel element="text_2"><bounds x="92" y="1" width="10" height="4" /></bezel> + <bezel element="text_1"><bounds x="102" y="1" width="10" height="4" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/h2hbaseb.lay b/src/mess/layout/h2hbaseb.lay new file mode 100644 index 00000000000..860ee6c23b6 --- /dev/null +++ b/src/mess/layout/h2hbaseb.lay @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="digit" defstate="0"> + <led7seg><color red="0.2" green="1.0" blue="0.97" /></led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="0"><color red="0.2" green="0.05" blue="0.05" /></disk> + <disk state="1"><color red="1.0" green="0.25" blue="0.25" /></disk> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="100" top="0" bottom="50" /> + <bezel element="static_black"> + <bounds left="0" right="100" top="0" bottom="50" /> + </bezel> + + <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel> + <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel> + <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel> + <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel> + <bezel element="digit"><bounds x="40" y="0" width="10" height="15" /></bezel> + <bezel name="digit4" element="digit"><bounds x="50" y="0" width="10" height="15" /></bezel> + <bezel name="digit5" element="digit"><bounds x="60" y="0" width="10" height="15" /></bezel> + <bezel name="digit6" element="digit"><bounds x="70" y="0" width="10" height="15" /></bezel> + <bezel name="digit7" element="digit"><bounds x="80" y="0" width="10" height="15" /></bezel> + + <bezel name="0.8" element="led"><bounds x="0" y="20" width="4" height="4" /></bezel> + <bezel name="1.8" element="led"><bounds x="5" y="20" width="4" height="4" /></bezel> + <bezel name="2.8" element="led"><bounds x="10" y="20" width="4" height="4" /></bezel> + <bezel name="3.8" element="led"><bounds x="15" y="20" width="4" height="4" /></bezel> + <bezel name="4.8" element="led"><bounds x="20" y="20" width="4" height="4" /></bezel> + + <bezel name="5.8" element="led"><bounds x="30" y="20" width="4" height="4" /></bezel> + <bezel name="6.8" element="led"><bounds x="35" y="20" width="4" height="4" /></bezel> + <bezel name="7.8" element="led"><bounds x="40" y="20" width="4" height="4" /></bezel> + <bezel name="8.8" element="led"><bounds x="45" y="20" width="4" height="4" /></bezel> + + </view> +</mamelayout> diff --git a/src/mess/layout/h2hfootb.lay b/src/mess/layout/h2hfootb.lay new file mode 100644 index 00000000000..1bf59a074c9 --- /dev/null +++ b/src/mess/layout/h2hfootb.lay @@ -0,0 +1,236 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="static_white"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element> + <element name="static_green"><rect><color red="0.39" green="0.64" blue="0.39" /></rect></element> + + <element name="text_down"> + <rect><color red="0.39" green="0.64" blue="0.39" /></rect> + <text string="DOWN"><color red="0.84" green="0.84" blue="0.84" /></text> + </element> + <element name="text_home"> + <rect><color red="0.39" green="0.64" blue="0.39" /></rect> + <text string="HOME"><color red="0.84" green="0.84" blue="0.84" /></text> + </element> + <element name="text_yards"> + <rect><color red="0.39" green="0.64" blue="0.39" /></rect> + <text string="YARDS TO GO"><color red="0.84" green="0.84" blue="0.84" /></text> + </element> + <element name="text_time"> + <rect><color red="0.39" green="0.64" blue="0.39" /></rect> + <text string="TIME REMAINING"><color red="0.84" green="0.84" blue="0.84" /></text> + </element> + <element name="text_field"> + <rect><color red="0.39" green="0.64" blue="0.39" /></rect> + <text string="FIELD POS."><color red="0.84" green="0.84" blue="0.84" /></text> + </element> + <element name="text_visitor"> + <rect><color red="0.39" green="0.64" blue="0.39" /></rect> + <text string="VISITOR"><color red="0.84" green="0.84" blue="0.84" /></text> + </element> + + <element name="text_p1"> + <rect><color red="0.24" green="0.4" blue="0.24" /></rect> + <text string="P1 SEL:"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.7" green="0.7" blue="0.8" /> + </text> + </element> + <element name="text_p2" defstate="0"> + <rect><color red="0.24" green="0.4" blue="0.24" /></rect> + <text state="0" string="RUN/KICK"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.82" green="0.82" blue="0.82" /> + </text> + <text state="1" string="PASS"> + <bounds x="0.0" y="0.17" width="1.0" height="0.6" /> + <color red="0.82" green="0.82" blue="0.82" /> + </text> + </element> + + <!-- 7segs are not italic here, so let's make custom ones --> + + <element name="seg" defstate="0"> + <rect state="0"><color red="0.13" green="0.0325" blue="0.0338" /></rect> + <rect state="1"><color red="1.0" green="0.25" blue="0.26" /></rect> + </element> + <element name="led" defstate="0"> + <disk state="0"><color red="0.13" green="0.0325" blue="0.0338" /></disk> + <disk state="1"><color red="1.0" green="0.25" blue="0.26" /></disk> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-9" right="393" top="-130" bottom="156" /> + <bezel element="static_black"> + <bounds left="-9" right="393" top="-130" bottom="156" /> + </bezel> + + <!-- bezel --> + + <bezel element="static_green"><bounds left="-9" right="393" top="-130" bottom="-60" /></bezel> + <bezel element="static_green"><bounds left="-9" right="393" top="111" bottom="156" /></bezel> + + <bezel element="text_down"><bounds x="-5" y="-120" width="86" height="19" /></bezel> + <bezel element="text_yards"><bounds x="107" y="-120" width="170" height="19" /></bezel> + <bezel element="text_field"><bounds x="301" y="-120" width="90" height="19" /></bezel> + + <bezel element="text_home"><bounds x="-5" y="-86" width="86" height="19" /></bezel> + <bezel element="text_time"><bounds x="107" y="-86" width="170" height="19" /></bezel> + <bezel element="text_visitor"><bounds x="301" y="-86" width="90" height="19" /></bezel> + + <bezel element="text_p1"><bounds x="301" y="130" width="40" height="16" /></bezel> + <bezel element="text_p2" inputtag="IN.1" inputmask="0x01"> + <bounds x="339" y="130" width="50" height="16" /> + </bezel> + + <bezel element="static_white"><bounds left="-9" right="393" top="-96" bottom="-90" /></bezel> + <bezel element="static_white"><bounds left="-9" right="393" top="-61" bottom="-51" /></bezel> + <bezel element="static_white"><bounds left="-9" right="393" top="110" bottom="120" /></bezel> + + <bezel element="static_white"><bounds x="-9" y="-52" width="4" height="163" /></bezel> + <bezel element="static_white"><bounds x="37" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="81" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="125" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="169" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="213" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="257" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="301" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="345" y="-52" width="2" height="163" /></bezel> + <bezel element="static_white"><bounds x="389" y="-52" width="4" height="163" /></bezel> + + <bezel element="static_black"><bounds x="0" y="7.5" width="350" height="20" /></bezel> + <bezel element="static_black"><bounds x="0" y="31.5" width="350" height="20" /></bezel> + + <bezel element="static_white"><bounds x="36" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="36" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="36" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="80" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="80" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="80" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="124" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="124" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="124" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="168" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="168" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="168" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="212" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="212" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="212" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="256" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="256" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="256" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="300" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="300" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="300" y="56" width="4" height="1" /></bezel> + + <bezel element="static_white"><bounds x="344" y="2" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="344" y="29" width="4" height="1" /></bezel> + <bezel element="static_white"><bounds x="344" y="56" width="4" height="1" /></bezel> + + + <!-- leds --> + + <bezel name="0.5" element="seg"><bounds x="0" y="0" width="5" height="20" /></bezel> + <bezel name="0.4" element="seg"><bounds x="0" y="21" width="5" height="20" /></bezel> + <bezel name="0.1" element="seg"><bounds x="27" y="0" width="5" height="20" /></bezel> + <bezel name="0.2" element="seg"><bounds x="27" y="21" width="5" height="20" /></bezel> + <bezel name="0.0" element="seg"><bounds x="6" y="0" width="20" height="5" /></bezel> + <bezel name="0.6" element="seg"><bounds x="6" y="18" width="20" height="5" /></bezel> + <bezel name="0.3" element="seg"><bounds x="6" y="36" width="20" height="5" /></bezel> + <bezel name="0.7" element="seg"><bounds x="6" y="54" width="20" height="5" /></bezel> + <bezel name="0.8" element="led"><bounds x="35.5" y="18" width="5" height="5" /></bezel> + + <bezel name="1.5" element="seg"><bounds x="44" y="0" width="5" height="20" /></bezel> + <bezel name="1.4" element="seg"><bounds x="44" y="21" width="5" height="20" /></bezel> + <bezel name="1.1" element="seg"><bounds x="71" y="0" width="5" height="20" /></bezel> + <bezel name="1.2" element="seg"><bounds x="71" y="21" width="5" height="20" /></bezel> + <bezel name="1.0" element="seg"><bounds x="50" y="0" width="20" height="5" /></bezel> + <bezel name="1.6" element="seg"><bounds x="50" y="18" width="20" height="5" /></bezel> + <bezel name="1.3" element="seg"><bounds x="50" y="36" width="20" height="5" /></bezel> + <bezel name="1.7" element="seg"><bounds x="50" y="54" width="20" height="5" /></bezel> + <bezel name="1.8" element="led"><bounds x="79.5" y="18" width="5" height="5" /></bezel> + + <bezel name="2.5" element="seg"><bounds x="88" y="0" width="5" height="20" /></bezel> + <bezel name="2.4" element="seg"><bounds x="88" y="21" width="5" height="20" /></bezel> + <bezel name="2.1" element="seg"><bounds x="115" y="0" width="5" height="20" /></bezel> + <bezel name="2.2" element="seg"><bounds x="115" y="21" width="5" height="20" /></bezel> + <bezel name="2.0" element="seg"><bounds x="94" y="0" width="20" height="5" /></bezel> + <bezel name="2.6" element="seg"><bounds x="94" y="18" width="20" height="5" /></bezel> + <bezel name="2.3" element="seg"><bounds x="94" y="36" width="20" height="5" /></bezel> + <bezel name="2.7" element="seg"><bounds x="94" y="54" width="20" height="5" /></bezel> + <bezel name="2.8" element="led"><bounds x="123.5" y="18" width="5" height="5" /></bezel> + + <bezel name="3.5" element="seg"><bounds x="132" y="0" width="5" height="20" /></bezel> + <bezel name="3.4" element="seg"><bounds x="132" y="21" width="5" height="20" /></bezel> + <bezel name="3.1" element="seg"><bounds x="159" y="0" width="5" height="20" /></bezel> + <bezel name="3.2" element="seg"><bounds x="159" y="21" width="5" height="20" /></bezel> + <bezel name="3.0" element="seg"><bounds x="138" y="0" width="20" height="5" /></bezel> + <bezel name="3.6" element="seg"><bounds x="138" y="18" width="20" height="5" /></bezel> + <bezel name="3.3" element="seg"><bounds x="138" y="36" width="20" height="5" /></bezel> + <bezel name="3.7" element="seg"><bounds x="138" y="54" width="20" height="5" /></bezel> + <bezel name="3.8" element="led"><bounds x="167.5" y="18" width="5" height="5" /></bezel> + + <bezel name="4.5" element="seg"><bounds x="176" y="0" width="5" height="20" /></bezel> + <bezel name="4.4" element="seg"><bounds x="176" y="21" width="5" height="20" /></bezel> + <bezel name="4.1" element="seg"><bounds x="203" y="0" width="5" height="20" /></bezel> + <bezel name="4.2" element="seg"><bounds x="203" y="21" width="5" height="20" /></bezel> + <bezel name="4.0" element="seg"><bounds x="182" y="0" width="20" height="5" /></bezel> + <bezel name="4.6" element="seg"><bounds x="182" y="18" width="20" height="5" /></bezel> + <bezel name="4.3" element="seg"><bounds x="182" y="36" width="20" height="5" /></bezel> + <bezel name="4.7" element="seg"><bounds x="182" y="54" width="20" height="5" /></bezel> + <bezel name="4.8" element="led"><bounds x="211.5" y="18" width="5" height="5" /></bezel> + + <bezel name="5.5" element="seg"><bounds x="220" y="0" width="5" height="20" /></bezel> + <bezel name="5.4" element="seg"><bounds x="220" y="21" width="5" height="20" /></bezel> + <bezel name="5.1" element="seg"><bounds x="247" y="0" width="5" height="20" /></bezel> + <bezel name="5.2" element="seg"><bounds x="247" y="21" width="5" height="20" /></bezel> + <bezel name="5.0" element="seg"><bounds x="226" y="0" width="20" height="5" /></bezel> + <bezel name="5.6" element="seg"><bounds x="226" y="18" width="20" height="5" /></bezel> + <bezel name="5.3" element="seg"><bounds x="226" y="36" width="20" height="5" /></bezel> + <bezel name="5.7" element="seg"><bounds x="226" y="54" width="20" height="5" /></bezel> + <bezel name="5.8" element="led"><bounds x="255.5" y="18" width="5" height="5" /></bezel> + + <bezel name="6.5" element="seg"><bounds x="264" y="0" width="5" height="20" /></bezel> + <bezel name="6.4" element="seg"><bounds x="264" y="21" width="5" height="20" /></bezel> + <bezel name="6.1" element="seg"><bounds x="291" y="0" width="5" height="20" /></bezel> + <bezel name="6.2" element="seg"><bounds x="291" y="21" width="5" height="20" /></bezel> + <bezel name="6.0" element="seg"><bounds x="270" y="0" width="20" height="5" /></bezel> + <bezel name="6.6" element="seg"><bounds x="270" y="18" width="20" height="5" /></bezel> + <bezel name="6.3" element="seg"><bounds x="270" y="36" width="20" height="5" /></bezel> + <bezel name="6.7" element="seg"><bounds x="270" y="54" width="20" height="5" /></bezel> + <bezel name="6.8" element="led"><bounds x="299.5" y="18" width="5" height="5" /></bezel> + + <bezel name="7.5" element="seg"><bounds x="308" y="0" width="5" height="20" /></bezel> + <bezel name="7.4" element="seg"><bounds x="308" y="21" width="5" height="20" /></bezel> + <bezel name="7.1" element="seg"><bounds x="335" y="0" width="5" height="20" /></bezel> + <bezel name="7.2" element="seg"><bounds x="335" y="21" width="5" height="20" /></bezel> + <bezel name="7.0" element="seg"><bounds x="314" y="0" width="20" height="5" /></bezel> + <bezel name="7.6" element="seg"><bounds x="314" y="18" width="20" height="5" /></bezel> + <bezel name="7.3" element="seg"><bounds x="314" y="36" width="20" height="5" /></bezel> + <bezel name="7.7" element="seg"><bounds x="314" y="54" width="20" height="5" /></bezel> + <bezel name="7.8" element="led"><bounds x="343.5" y="18" width="5" height="5" /></bezel> + + <bezel name="8.5" element="seg"><bounds x="352" y="0" width="5" height="20" /></bezel> + <bezel name="8.4" element="seg"><bounds x="352" y="21" width="5" height="20" /></bezel> + <bezel name="8.1" element="seg"><bounds x="379" y="0" width="5" height="20" /></bezel> + <bezel name="8.2" element="seg"><bounds x="379" y="21" width="5" height="20" /></bezel> + <bezel name="8.0" element="seg"><bounds x="358" y="0" width="20" height="5" /></bezel> + <bezel name="8.6" element="seg"><bounds x="358" y="18" width="20" height="5" /></bezel> + <bezel name="8.3" element="seg"><bounds x="358" y="36" width="20" height="5" /></bezel> + <bezel name="8.7" element="seg"><bounds x="358" y="54" width="20" height="5" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/hh_hmcs40_test.lay b/src/mess/layout/hh_hmcs40_test.lay index 95fdc39d59d..0a7960cee0e 100644 --- a/src/mess/layout/hh_hmcs40_test.lay +++ b/src/mess/layout/hh_hmcs40_test.lay @@ -23,661 +23,661 @@ <!-- max 16*40 matrix --> - <bezel name="lamp0" element="led"><bounds x="0" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1" element="led"><bounds x="0" y="2" width="1" height="1" /></bezel> - <bezel name="lamp2" element="led"><bounds x="0" y="4" width="1" height="1" /></bezel> - <bezel name="lamp3" element="led"><bounds x="0" y="6" width="1" height="1" /></bezel> - <bezel name="lamp4" element="led"><bounds x="0" y="8" width="1" height="1" /></bezel> - <bezel name="lamp5" element="led"><bounds x="0" y="10" width="1" height="1" /></bezel> - <bezel name="lamp6" element="led"><bounds x="0" y="12" width="1" height="1" /></bezel> - <bezel name="lamp7" element="led"><bounds x="0" y="14" width="1" height="1" /></bezel> - <bezel name="lamp8" element="led"><bounds x="0" y="16" width="1" height="1" /></bezel> - <bezel name="lamp9" element="led"><bounds x="0" y="18" width="1" height="1" /></bezel> - <bezel name="lamp10" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel> - <bezel name="lamp11" element="led"><bounds x="0" y="22" width="1" height="1" /></bezel> - <bezel name="lamp12" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel> - <bezel name="lamp13" element="led"><bounds x="0" y="26" width="1" height="1" /></bezel> - <bezel name="lamp14" element="led"><bounds x="0" y="28" width="1" height="1" /></bezel> - <bezel name="lamp15" element="led"><bounds x="0" y="30" width="1" height="1" /></bezel> - <bezel name="lamp16" element="led"><bounds x="0" y="32" width="1" height="1" /></bezel> - <bezel name="lamp17" element="led"><bounds x="0" y="34" width="1" height="1" /></bezel> - <bezel name="lamp18" element="led"><bounds x="0" y="36" width="1" height="1" /></bezel> - <bezel name="lamp19" element="led"><bounds x="0" y="38" width="1" height="1" /></bezel> - <bezel name="lamp20" element="led"><bounds x="0" y="40" width="1" height="1" /></bezel> - <bezel name="lamp21" element="led"><bounds x="0" y="42" width="1" height="1" /></bezel> - <bezel name="lamp22" element="led"><bounds x="0" y="44" width="1" height="1" /></bezel> - <bezel name="lamp23" element="led"><bounds x="0" y="46" width="1" height="1" /></bezel> - <bezel name="lamp24" element="led"><bounds x="0" y="48" width="1" height="1" /></bezel> - <bezel name="lamp25" element="led"><bounds x="0" y="50" width="1" height="1" /></bezel> - <bezel name="lamp26" element="led"><bounds x="0" y="52" width="1" height="1" /></bezel> - <bezel name="lamp27" element="led"><bounds x="0" y="54" width="1" height="1" /></bezel> - <bezel name="lamp28" element="led"><bounds x="0" y="56" width="1" height="1" /></bezel> - <bezel name="lamp29" element="led"><bounds x="0" y="58" width="1" height="1" /></bezel> - <bezel name="lamp30" element="led"><bounds x="0" y="60" width="1" height="1" /></bezel> - <bezel name="lamp31" element="led"><bounds x="0" y="62" width="1" height="1" /></bezel> - <bezel name="lamp32" element="led"><bounds x="0" y="64" width="1" height="1" /></bezel> - <bezel name="lamp33" element="led"><bounds x="0" y="66" width="1" height="1" /></bezel> - <bezel name="lamp34" element="led"><bounds x="0" y="68" width="1" height="1" /></bezel> - <bezel name="lamp35" element="led"><bounds x="0" y="70" width="1" height="1" /></bezel> - <bezel name="lamp36" element="led"><bounds x="0" y="72" width="1" height="1" /></bezel> - <bezel name="lamp37" element="led"><bounds x="0" y="74" width="1" height="1" /></bezel> - <bezel name="lamp38" element="led"><bounds x="0" y="76" width="1" height="1" /></bezel> - <bezel name="lamp39" element="led"><bounds x="0" y="78" width="1" height="1" /></bezel> + <bezel name="0.0" element="led"><bounds x="0" y="0" width="1" height="1" /></bezel> + <bezel name="0.1" element="led"><bounds x="0" y="2" width="1" height="1" /></bezel> + <bezel name="0.2" element="led"><bounds x="0" y="4" width="1" height="1" /></bezel> + <bezel name="0.3" element="led"><bounds x="0" y="6" width="1" height="1" /></bezel> + <bezel name="0.4" element="led"><bounds x="0" y="8" width="1" height="1" /></bezel> + <bezel name="0.5" element="led"><bounds x="0" y="10" width="1" height="1" /></bezel> + <bezel name="0.6" element="led"><bounds x="0" y="12" width="1" height="1" /></bezel> + <bezel name="0.7" element="led"><bounds x="0" y="14" width="1" height="1" /></bezel> + <bezel name="0.8" element="led"><bounds x="0" y="16" width="1" height="1" /></bezel> + <bezel name="0.9" element="led"><bounds x="0" y="18" width="1" height="1" /></bezel> + <bezel name="0.10" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel> + <bezel name="0.11" element="led"><bounds x="0" y="22" width="1" height="1" /></bezel> + <bezel name="0.12" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel> + <bezel name="0.13" element="led"><bounds x="0" y="26" width="1" height="1" /></bezel> + <bezel name="0.14" element="led"><bounds x="0" y="28" width="1" height="1" /></bezel> + <bezel name="0.15" element="led"><bounds x="0" y="30" width="1" height="1" /></bezel> + <bezel name="0.16" element="led"><bounds x="0" y="32" width="1" height="1" /></bezel> + <bezel name="0.17" element="led"><bounds x="0" y="34" width="1" height="1" /></bezel> + <bezel name="0.18" element="led"><bounds x="0" y="36" width="1" height="1" /></bezel> + <bezel name="0.19" element="led"><bounds x="0" y="38" width="1" height="1" /></bezel> + <bezel name="0.20" element="led"><bounds x="0" y="40" width="1" height="1" /></bezel> + <bezel name="0.21" element="led"><bounds x="0" y="42" width="1" height="1" /></bezel> + <bezel name="0.22" element="led"><bounds x="0" y="44" width="1" height="1" /></bezel> + <bezel name="0.23" element="led"><bounds x="0" y="46" width="1" height="1" /></bezel> + <bezel name="0.24" element="led"><bounds x="0" y="48" width="1" height="1" /></bezel> + <bezel name="0.25" element="led"><bounds x="0" y="50" width="1" height="1" /></bezel> + <bezel name="0.26" element="led"><bounds x="0" y="52" width="1" height="1" /></bezel> + <bezel name="0.27" element="led"><bounds x="0" y="54" width="1" height="1" /></bezel> + <bezel name="0.28" element="led"><bounds x="0" y="56" width="1" height="1" /></bezel> + <bezel name="0.29" element="led"><bounds x="0" y="58" width="1" height="1" /></bezel> + <bezel name="0.30" element="led"><bounds x="0" y="60" width="1" height="1" /></bezel> + <bezel name="0.31" element="led"><bounds x="0" y="62" width="1" height="1" /></bezel> + <bezel name="0.32" element="led"><bounds x="0" y="64" width="1" height="1" /></bezel> + <bezel name="0.33" element="led"><bounds x="0" y="66" width="1" height="1" /></bezel> + <bezel name="0.34" element="led"><bounds x="0" y="68" width="1" height="1" /></bezel> + <bezel name="0.35" element="led"><bounds x="0" y="70" width="1" height="1" /></bezel> + <bezel name="0.36" element="led"><bounds x="0" y="72" width="1" height="1" /></bezel> + <bezel name="0.37" element="led"><bounds x="0" y="74" width="1" height="1" /></bezel> + <bezel name="0.38" element="led"><bounds x="0" y="76" width="1" height="1" /></bezel> + <bezel name="0.39" element="led"><bounds x="0" y="78" width="1" height="1" /></bezel> - <bezel name="lamp100" element="led"><bounds x="2" y="0" width="1" height="1" /></bezel> - <bezel name="lamp101" element="led"><bounds x="2" y="2" width="1" height="1" /></bezel> - <bezel name="lamp102" element="led"><bounds x="2" y="4" width="1" height="1" /></bezel> - <bezel name="lamp103" element="led"><bounds x="2" y="6" width="1" height="1" /></bezel> - <bezel name="lamp104" element="led"><bounds x="2" y="8" width="1" height="1" /></bezel> - <bezel name="lamp105" element="led"><bounds x="2" y="10" width="1" height="1" /></bezel> - <bezel name="lamp106" element="led"><bounds x="2" y="12" width="1" height="1" /></bezel> - <bezel name="lamp107" element="led"><bounds x="2" y="14" width="1" height="1" /></bezel> - <bezel name="lamp108" element="led"><bounds x="2" y="16" width="1" height="1" /></bezel> - <bezel name="lamp109" element="led"><bounds x="2" y="18" width="1" height="1" /></bezel> - <bezel name="lamp110" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel> - <bezel name="lamp111" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel> - <bezel name="lamp112" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel> - <bezel name="lamp113" element="led"><bounds x="2" y="26" width="1" height="1" /></bezel> - <bezel name="lamp114" element="led"><bounds x="2" y="28" width="1" height="1" /></bezel> - <bezel name="lamp115" element="led"><bounds x="2" y="30" width="1" height="1" /></bezel> - <bezel name="lamp116" element="led"><bounds x="2" y="32" width="1" height="1" /></bezel> - <bezel name="lamp117" element="led"><bounds x="2" y="34" width="1" height="1" /></bezel> - <bezel name="lamp118" element="led"><bounds x="2" y="36" width="1" height="1" /></bezel> - <bezel name="lamp119" element="led"><bounds x="2" y="38" width="1" height="1" /></bezel> - <bezel name="lamp120" element="led"><bounds x="2" y="40" width="1" height="1" /></bezel> - <bezel name="lamp121" element="led"><bounds x="2" y="42" width="1" height="1" /></bezel> - <bezel name="lamp122" element="led"><bounds x="2" y="44" width="1" height="1" /></bezel> - <bezel name="lamp123" element="led"><bounds x="2" y="46" width="1" height="1" /></bezel> - <bezel name="lamp124" element="led"><bounds x="2" y="48" width="1" height="1" /></bezel> - <bezel name="lamp125" element="led"><bounds x="2" y="50" width="1" height="1" /></bezel> - <bezel name="lamp126" element="led"><bounds x="2" y="52" width="1" height="1" /></bezel> - <bezel name="lamp127" element="led"><bounds x="2" y="54" width="1" height="1" /></bezel> - <bezel name="lamp128" element="led"><bounds x="2" y="56" width="1" height="1" /></bezel> - <bezel name="lamp129" element="led"><bounds x="2" y="58" width="1" height="1" /></bezel> - <bezel name="lamp130" element="led"><bounds x="2" y="60" width="1" height="1" /></bezel> - <bezel name="lamp131" element="led"><bounds x="2" y="62" width="1" height="1" /></bezel> - <bezel name="lamp132" element="led"><bounds x="2" y="64" width="1" height="1" /></bezel> - <bezel name="lamp133" element="led"><bounds x="2" y="66" width="1" height="1" /></bezel> - <bezel name="lamp134" element="led"><bounds x="2" y="68" width="1" height="1" /></bezel> - <bezel name="lamp135" element="led"><bounds x="2" y="70" width="1" height="1" /></bezel> - <bezel name="lamp136" element="led"><bounds x="2" y="72" width="1" height="1" /></bezel> - <bezel name="lamp137" element="led"><bounds x="2" y="74" width="1" height="1" /></bezel> - <bezel name="lamp138" element="led"><bounds x="2" y="76" width="1" height="1" /></bezel> - <bezel name="lamp139" element="led"><bounds x="2" y="78" width="1" height="1" /></bezel> + <bezel name="1.0" element="led"><bounds x="2" y="0" width="1" height="1" /></bezel> + <bezel name="1.1" element="led"><bounds x="2" y="2" width="1" height="1" /></bezel> + <bezel name="1.2" element="led"><bounds x="2" y="4" width="1" height="1" /></bezel> + <bezel name="1.3" element="led"><bounds x="2" y="6" width="1" height="1" /></bezel> + <bezel name="1.4" element="led"><bounds x="2" y="8" width="1" height="1" /></bezel> + <bezel name="1.5" element="led"><bounds x="2" y="10" width="1" height="1" /></bezel> + <bezel name="1.6" element="led"><bounds x="2" y="12" width="1" height="1" /></bezel> + <bezel name="1.7" element="led"><bounds x="2" y="14" width="1" height="1" /></bezel> + <bezel name="1.8" element="led"><bounds x="2" y="16" width="1" height="1" /></bezel> + <bezel name="1.9" element="led"><bounds x="2" y="18" width="1" height="1" /></bezel> + <bezel name="1.10" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel> + <bezel name="1.11" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel> + <bezel name="1.12" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel> + <bezel name="1.13" element="led"><bounds x="2" y="26" width="1" height="1" /></bezel> + <bezel name="1.14" element="led"><bounds x="2" y="28" width="1" height="1" /></bezel> + <bezel name="1.15" element="led"><bounds x="2" y="30" width="1" height="1" /></bezel> + <bezel name="1.16" element="led"><bounds x="2" y="32" width="1" height="1" /></bezel> + <bezel name="1.17" element="led"><bounds x="2" y="34" width="1" height="1" /></bezel> + <bezel name="1.18" element="led"><bounds x="2" y="36" width="1" height="1" /></bezel> + <bezel name="1.19" element="led"><bounds x="2" y="38" width="1" height="1" /></bezel> + <bezel name="1.20" element="led"><bounds x="2" y="40" width="1" height="1" /></bezel> + <bezel name="1.21" element="led"><bounds x="2" y="42" width="1" height="1" /></bezel> + <bezel name="1.22" element="led"><bounds x="2" y="44" width="1" height="1" /></bezel> + <bezel name="1.23" element="led"><bounds x="2" y="46" width="1" height="1" /></bezel> + <bezel name="1.24" element="led"><bounds x="2" y="48" width="1" height="1" /></bezel> + <bezel name="1.25" element="led"><bounds x="2" y="50" width="1" height="1" /></bezel> + <bezel name="1.26" element="led"><bounds x="2" y="52" width="1" height="1" /></bezel> + <bezel name="1.27" element="led"><bounds x="2" y="54" width="1" height="1" /></bezel> + <bezel name="1.28" element="led"><bounds x="2" y="56" width="1" height="1" /></bezel> + <bezel name="1.29" element="led"><bounds x="2" y="58" width="1" height="1" /></bezel> + <bezel name="1.30" element="led"><bounds x="2" y="60" width="1" height="1" /></bezel> + <bezel name="1.31" element="led"><bounds x="2" y="62" width="1" height="1" /></bezel> + <bezel name="1.32" element="led"><bounds x="2" y="64" width="1" height="1" /></bezel> + <bezel name="1.33" element="led"><bounds x="2" y="66" width="1" height="1" /></bezel> + <bezel name="1.34" element="led"><bounds x="2" y="68" width="1" height="1" /></bezel> + <bezel name="1.35" element="led"><bounds x="2" y="70" width="1" height="1" /></bezel> + <bezel name="1.36" element="led"><bounds x="2" y="72" width="1" height="1" /></bezel> + <bezel name="1.37" element="led"><bounds x="2" y="74" width="1" height="1" /></bezel> + <bezel name="1.38" element="led"><bounds x="2" y="76" width="1" height="1" /></bezel> + <bezel name="1.39" element="led"><bounds x="2" y="78" width="1" height="1" /></bezel> - <bezel name="lamp200" element="led"><bounds x="4" y="0" width="1" height="1" /></bezel> - <bezel name="lamp201" element="led"><bounds x="4" y="2" width="1" height="1" /></bezel> - <bezel name="lamp202" element="led"><bounds x="4" y="4" width="1" height="1" /></bezel> - <bezel name="lamp203" element="led"><bounds x="4" y="6" width="1" height="1" /></bezel> - <bezel name="lamp204" element="led"><bounds x="4" y="8" width="1" height="1" /></bezel> - <bezel name="lamp205" element="led"><bounds x="4" y="10" width="1" height="1" /></bezel> - <bezel name="lamp206" element="led"><bounds x="4" y="12" width="1" height="1" /></bezel> - <bezel name="lamp207" element="led"><bounds x="4" y="14" width="1" height="1" /></bezel> - <bezel name="lamp208" element="led"><bounds x="4" y="16" width="1" height="1" /></bezel> - <bezel name="lamp209" element="led"><bounds x="4" y="18" width="1" height="1" /></bezel> - <bezel name="lamp210" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel> - <bezel name="lamp211" element="led"><bounds x="4" y="22" width="1" height="1" /></bezel> - <bezel name="lamp212" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel> - <bezel name="lamp213" element="led"><bounds x="4" y="26" width="1" height="1" /></bezel> - <bezel name="lamp214" element="led"><bounds x="4" y="28" width="1" height="1" /></bezel> - <bezel name="lamp215" element="led"><bounds x="4" y="30" width="1" height="1" /></bezel> - <bezel name="lamp216" element="led"><bounds x="4" y="32" width="1" height="1" /></bezel> - <bezel name="lamp217" element="led"><bounds x="4" y="34" width="1" height="1" /></bezel> - <bezel name="lamp218" element="led"><bounds x="4" y="36" width="1" height="1" /></bezel> - <bezel name="lamp219" element="led"><bounds x="4" y="38" width="1" height="1" /></bezel> - <bezel name="lamp220" element="led"><bounds x="4" y="40" width="1" height="1" /></bezel> - <bezel name="lamp221" element="led"><bounds x="4" y="42" width="1" height="1" /></bezel> - <bezel name="lamp222" element="led"><bounds x="4" y="44" width="1" height="1" /></bezel> - <bezel name="lamp223" element="led"><bounds x="4" y="46" width="1" height="1" /></bezel> - <bezel name="lamp224" element="led"><bounds x="4" y="48" width="1" height="1" /></bezel> - <bezel name="lamp225" element="led"><bounds x="4" y="50" width="1" height="1" /></bezel> - <bezel name="lamp226" element="led"><bounds x="4" y="52" width="1" height="1" /></bezel> - <bezel name="lamp227" element="led"><bounds x="4" y="54" width="1" height="1" /></bezel> - <bezel name="lamp228" element="led"><bounds x="4" y="56" width="1" height="1" /></bezel> - <bezel name="lamp229" element="led"><bounds x="4" y="58" width="1" height="1" /></bezel> - <bezel name="lamp230" element="led"><bounds x="4" y="60" width="1" height="1" /></bezel> - <bezel name="lamp231" element="led"><bounds x="4" y="62" width="1" height="1" /></bezel> - <bezel name="lamp232" element="led"><bounds x="4" y="64" width="1" height="1" /></bezel> - <bezel name="lamp233" element="led"><bounds x="4" y="66" width="1" height="1" /></bezel> - <bezel name="lamp234" element="led"><bounds x="4" y="68" width="1" height="1" /></bezel> - <bezel name="lamp235" element="led"><bounds x="4" y="70" width="1" height="1" /></bezel> - <bezel name="lamp236" element="led"><bounds x="4" y="72" width="1" height="1" /></bezel> - <bezel name="lamp237" element="led"><bounds x="4" y="74" width="1" height="1" /></bezel> - <bezel name="lamp238" element="led"><bounds x="4" y="76" width="1" height="1" /></bezel> - <bezel name="lamp239" element="led"><bounds x="4" y="78" width="1" height="1" /></bezel> + <bezel name="2.0" element="led"><bounds x="4" y="0" width="1" height="1" /></bezel> + <bezel name="2.1" element="led"><bounds x="4" y="2" width="1" height="1" /></bezel> + <bezel name="2.2" element="led"><bounds x="4" y="4" width="1" height="1" /></bezel> + <bezel name="2.3" element="led"><bounds x="4" y="6" width="1" height="1" /></bezel> + <bezel name="2.4" element="led"><bounds x="4" y="8" width="1" height="1" /></bezel> + <bezel name="2.5" element="led"><bounds x="4" y="10" width="1" height="1" /></bezel> + <bezel name="2.6" element="led"><bounds x="4" y="12" width="1" height="1" /></bezel> + <bezel name="2.7" element="led"><bounds x="4" y="14" width="1" height="1" /></bezel> + <bezel name="2.8" element="led"><bounds x="4" y="16" width="1" height="1" /></bezel> + <bezel name="2.9" element="led"><bounds x="4" y="18" width="1" height="1" /></bezel> + <bezel name="2.10" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel> + <bezel name="2.11" element="led"><bounds x="4" y="22" width="1" height="1" /></bezel> + <bezel name="2.12" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel> + <bezel name="2.13" element="led"><bounds x="4" y="26" width="1" height="1" /></bezel> + <bezel name="2.14" element="led"><bounds x="4" y="28" width="1" height="1" /></bezel> + <bezel name="2.15" element="led"><bounds x="4" y="30" width="1" height="1" /></bezel> + <bezel name="2.16" element="led"><bounds x="4" y="32" width="1" height="1" /></bezel> + <bezel name="2.17" element="led"><bounds x="4" y="34" width="1" height="1" /></bezel> + <bezel name="2.18" element="led"><bounds x="4" y="36" width="1" height="1" /></bezel> + <bezel name="2.19" element="led"><bounds x="4" y="38" width="1" height="1" /></bezel> + <bezel name="2.20" element="led"><bounds x="4" y="40" width="1" height="1" /></bezel> + <bezel name="2.21" element="led"><bounds x="4" y="42" width="1" height="1" /></bezel> + <bezel name="2.22" element="led"><bounds x="4" y="44" width="1" height="1" /></bezel> + <bezel name="2.23" element="led"><bounds x="4" y="46" width="1" height="1" /></bezel> + <bezel name="2.24" element="led"><bounds x="4" y="48" width="1" height="1" /></bezel> + <bezel name="2.25" element="led"><bounds x="4" y="50" width="1" height="1" /></bezel> + <bezel name="2.26" element="led"><bounds x="4" y="52" width="1" height="1" /></bezel> + <bezel name="2.27" element="led"><bounds x="4" y="54" width="1" height="1" /></bezel> + <bezel name="2.28" element="led"><bounds x="4" y="56" width="1" height="1" /></bezel> + <bezel name="2.29" element="led"><bounds x="4" y="58" width="1" height="1" /></bezel> + <bezel name="2.30" element="led"><bounds x="4" y="60" width="1" height="1" /></bezel> + <bezel name="2.31" element="led"><bounds x="4" y="62" width="1" height="1" /></bezel> + <bezel name="2.32" element="led"><bounds x="4" y="64" width="1" height="1" /></bezel> + <bezel name="2.33" element="led"><bounds x="4" y="66" width="1" height="1" /></bezel> + <bezel name="2.34" element="led"><bounds x="4" y="68" width="1" height="1" /></bezel> + <bezel name="2.35" element="led"><bounds x="4" y="70" width="1" height="1" /></bezel> + <bezel name="2.36" element="led"><bounds x="4" y="72" width="1" height="1" /></bezel> + <bezel name="2.37" element="led"><bounds x="4" y="74" width="1" height="1" /></bezel> + <bezel name="2.38" element="led"><bounds x="4" y="76" width="1" height="1" /></bezel> + <bezel name="2.39" element="led"><bounds x="4" y="78" width="1" height="1" /></bezel> - <bezel name="lamp300" element="led"><bounds x="6" y="0" width="1" height="1" /></bezel> - <bezel name="lamp301" element="led"><bounds x="6" y="2" width="1" height="1" /></bezel> - <bezel name="lamp302" element="led"><bounds x="6" y="4" width="1" height="1" /></bezel> - <bezel name="lamp303" element="led"><bounds x="6" y="6" width="1" height="1" /></bezel> - <bezel name="lamp304" element="led"><bounds x="6" y="8" width="1" height="1" /></bezel> - <bezel name="lamp305" element="led"><bounds x="6" y="10" width="1" height="1" /></bezel> - <bezel name="lamp306" element="led"><bounds x="6" y="12" width="1" height="1" /></bezel> - <bezel name="lamp307" element="led"><bounds x="6" y="14" width="1" height="1" /></bezel> - <bezel name="lamp308" element="led"><bounds x="6" y="16" width="1" height="1" /></bezel> - <bezel name="lamp309" element="led"><bounds x="6" y="18" width="1" height="1" /></bezel> - <bezel name="lamp310" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel> - <bezel name="lamp311" element="led"><bounds x="6" y="22" width="1" height="1" /></bezel> - <bezel name="lamp312" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel> - <bezel name="lamp313" element="led"><bounds x="6" y="26" width="1" height="1" /></bezel> - <bezel name="lamp314" element="led"><bounds x="6" y="28" width="1" height="1" /></bezel> - <bezel name="lamp315" element="led"><bounds x="6" y="30" width="1" height="1" /></bezel> - <bezel name="lamp316" element="led"><bounds x="6" y="32" width="1" height="1" /></bezel> - <bezel name="lamp317" element="led"><bounds x="6" y="34" width="1" height="1" /></bezel> - <bezel name="lamp318" element="led"><bounds x="6" y="36" width="1" height="1" /></bezel> - <bezel name="lamp319" element="led"><bounds x="6" y="38" width="1" height="1" /></bezel> - <bezel name="lamp320" element="led"><bounds x="6" y="40" width="1" height="1" /></bezel> - <bezel name="lamp321" element="led"><bounds x="6" y="42" width="1" height="1" /></bezel> - <bezel name="lamp322" element="led"><bounds x="6" y="44" width="1" height="1" /></bezel> - <bezel name="lamp323" element="led"><bounds x="6" y="46" width="1" height="1" /></bezel> - <bezel name="lamp324" element="led"><bounds x="6" y="48" width="1" height="1" /></bezel> - <bezel name="lamp325" element="led"><bounds x="6" y="50" width="1" height="1" /></bezel> - <bezel name="lamp326" element="led"><bounds x="6" y="52" width="1" height="1" /></bezel> - <bezel name="lamp327" element="led"><bounds x="6" y="54" width="1" height="1" /></bezel> - <bezel name="lamp328" element="led"><bounds x="6" y="56" width="1" height="1" /></bezel> - <bezel name="lamp329" element="led"><bounds x="6" y="58" width="1" height="1" /></bezel> - <bezel name="lamp330" element="led"><bounds x="6" y="60" width="1" height="1" /></bezel> - <bezel name="lamp331" element="led"><bounds x="6" y="62" width="1" height="1" /></bezel> - <bezel name="lamp332" element="led"><bounds x="6" y="64" width="1" height="1" /></bezel> - <bezel name="lamp333" element="led"><bounds x="6" y="66" width="1" height="1" /></bezel> - <bezel name="lamp334" element="led"><bounds x="6" y="68" width="1" height="1" /></bezel> - <bezel name="lamp335" element="led"><bounds x="6" y="70" width="1" height="1" /></bezel> - <bezel name="lamp336" element="led"><bounds x="6" y="72" width="1" height="1" /></bezel> - <bezel name="lamp337" element="led"><bounds x="6" y="74" width="1" height="1" /></bezel> - <bezel name="lamp338" element="led"><bounds x="6" y="76" width="1" height="1" /></bezel> - <bezel name="lamp339" element="led"><bounds x="6" y="78" width="1" height="1" /></bezel> + <bezel name="3.0" element="led"><bounds x="6" y="0" width="1" height="1" /></bezel> + <bezel name="3.1" element="led"><bounds x="6" y="2" width="1" height="1" /></bezel> + <bezel name="3.2" element="led"><bounds x="6" y="4" width="1" height="1" /></bezel> + <bezel name="3.3" element="led"><bounds x="6" y="6" width="1" height="1" /></bezel> + <bezel name="3.4" element="led"><bounds x="6" y="8" width="1" height="1" /></bezel> + <bezel name="3.5" element="led"><bounds x="6" y="10" width="1" height="1" /></bezel> + <bezel name="3.6" element="led"><bounds x="6" y="12" width="1" height="1" /></bezel> + <bezel name="3.7" element="led"><bounds x="6" y="14" width="1" height="1" /></bezel> + <bezel name="3.8" element="led"><bounds x="6" y="16" width="1" height="1" /></bezel> + <bezel name="3.9" element="led"><bounds x="6" y="18" width="1" height="1" /></bezel> + <bezel name="3.10" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel> + <bezel name="3.11" element="led"><bounds x="6" y="22" width="1" height="1" /></bezel> + <bezel name="3.12" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel> + <bezel name="3.13" element="led"><bounds x="6" y="26" width="1" height="1" /></bezel> + <bezel name="3.14" element="led"><bounds x="6" y="28" width="1" height="1" /></bezel> + <bezel name="3.15" element="led"><bounds x="6" y="30" width="1" height="1" /></bezel> + <bezel name="3.16" element="led"><bounds x="6" y="32" width="1" height="1" /></bezel> + <bezel name="3.17" element="led"><bounds x="6" y="34" width="1" height="1" /></bezel> + <bezel name="3.18" element="led"><bounds x="6" y="36" width="1" height="1" /></bezel> + <bezel name="3.19" element="led"><bounds x="6" y="38" width="1" height="1" /></bezel> + <bezel name="3.20" element="led"><bounds x="6" y="40" width="1" height="1" /></bezel> + <bezel name="3.21" element="led"><bounds x="6" y="42" width="1" height="1" /></bezel> + <bezel name="3.22" element="led"><bounds x="6" y="44" width="1" height="1" /></bezel> + <bezel name="3.23" element="led"><bounds x="6" y="46" width="1" height="1" /></bezel> + <bezel name="3.24" element="led"><bounds x="6" y="48" width="1" height="1" /></bezel> + <bezel name="3.25" element="led"><bounds x="6" y="50" width="1" height="1" /></bezel> + <bezel name="3.26" element="led"><bounds x="6" y="52" width="1" height="1" /></bezel> + <bezel name="3.27" element="led"><bounds x="6" y="54" width="1" height="1" /></bezel> + <bezel name="3.28" element="led"><bounds x="6" y="56" width="1" height="1" /></bezel> + <bezel name="3.29" element="led"><bounds x="6" y="58" width="1" height="1" /></bezel> + <bezel name="3.30" element="led"><bounds x="6" y="60" width="1" height="1" /></bezel> + <bezel name="3.31" element="led"><bounds x="6" y="62" width="1" height="1" /></bezel> + <bezel name="3.32" element="led"><bounds x="6" y="64" width="1" height="1" /></bezel> + <bezel name="3.33" element="led"><bounds x="6" y="66" width="1" height="1" /></bezel> + <bezel name="3.34" element="led"><bounds x="6" y="68" width="1" height="1" /></bezel> + <bezel name="3.35" element="led"><bounds x="6" y="70" width="1" height="1" /></bezel> + <bezel name="3.36" element="led"><bounds x="6" y="72" width="1" height="1" /></bezel> + <bezel name="3.37" element="led"><bounds x="6" y="74" width="1" height="1" /></bezel> + <bezel name="3.38" element="led"><bounds x="6" y="76" width="1" height="1" /></bezel> + <bezel name="3.39" element="led"><bounds x="6" y="78" width="1" height="1" /></bezel> - <bezel name="lamp400" element="led"><bounds x="8" y="0" width="1" height="1" /></bezel> - <bezel name="lamp401" element="led"><bounds x="8" y="2" width="1" height="1" /></bezel> - <bezel name="lamp402" element="led"><bounds x="8" y="4" width="1" height="1" /></bezel> - <bezel name="lamp403" element="led"><bounds x="8" y="6" width="1" height="1" /></bezel> - <bezel name="lamp404" element="led"><bounds x="8" y="8" width="1" height="1" /></bezel> - <bezel name="lamp405" element="led"><bounds x="8" y="10" width="1" height="1" /></bezel> - <bezel name="lamp406" element="led"><bounds x="8" y="12" width="1" height="1" /></bezel> - <bezel name="lamp407" element="led"><bounds x="8" y="14" width="1" height="1" /></bezel> - <bezel name="lamp408" element="led"><bounds x="8" y="16" width="1" height="1" /></bezel> - <bezel name="lamp409" element="led"><bounds x="8" y="18" width="1" height="1" /></bezel> - <bezel name="lamp410" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel> - <bezel name="lamp411" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel> - <bezel name="lamp412" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel> - <bezel name="lamp413" element="led"><bounds x="8" y="26" width="1" height="1" /></bezel> - <bezel name="lamp414" element="led"><bounds x="8" y="28" width="1" height="1" /></bezel> - <bezel name="lamp415" element="led"><bounds x="8" y="30" width="1" height="1" /></bezel> - <bezel name="lamp416" element="led"><bounds x="8" y="32" width="1" height="1" /></bezel> - <bezel name="lamp417" element="led"><bounds x="8" y="34" width="1" height="1" /></bezel> - <bezel name="lamp418" element="led"><bounds x="8" y="36" width="1" height="1" /></bezel> - <bezel name="lamp419" element="led"><bounds x="8" y="38" width="1" height="1" /></bezel> - <bezel name="lamp420" element="led"><bounds x="8" y="40" width="1" height="1" /></bezel> - <bezel name="lamp421" element="led"><bounds x="8" y="42" width="1" height="1" /></bezel> - <bezel name="lamp422" element="led"><bounds x="8" y="44" width="1" height="1" /></bezel> - <bezel name="lamp423" element="led"><bounds x="8" y="46" width="1" height="1" /></bezel> - <bezel name="lamp424" element="led"><bounds x="8" y="48" width="1" height="1" /></bezel> - <bezel name="lamp425" element="led"><bounds x="8" y="50" width="1" height="1" /></bezel> - <bezel name="lamp426" element="led"><bounds x="8" y="52" width="1" height="1" /></bezel> - <bezel name="lamp427" element="led"><bounds x="8" y="54" width="1" height="1" /></bezel> - <bezel name="lamp428" element="led"><bounds x="8" y="56" width="1" height="1" /></bezel> - <bezel name="lamp429" element="led"><bounds x="8" y="58" width="1" height="1" /></bezel> - <bezel name="lamp430" element="led"><bounds x="8" y="60" width="1" height="1" /></bezel> - <bezel name="lamp431" element="led"><bounds x="8" y="62" width="1" height="1" /></bezel> - <bezel name="lamp432" element="led"><bounds x="8" y="64" width="1" height="1" /></bezel> - <bezel name="lamp433" element="led"><bounds x="8" y="66" width="1" height="1" /></bezel> - <bezel name="lamp434" element="led"><bounds x="8" y="68" width="1" height="1" /></bezel> - <bezel name="lamp435" element="led"><bounds x="8" y="70" width="1" height="1" /></bezel> - <bezel name="lamp436" element="led"><bounds x="8" y="72" width="1" height="1" /></bezel> - <bezel name="lamp437" element="led"><bounds x="8" y="74" width="1" height="1" /></bezel> - <bezel name="lamp438" element="led"><bounds x="8" y="76" width="1" height="1" /></bezel> - <bezel name="lamp439" element="led"><bounds x="8" y="78" width="1" height="1" /></bezel> + <bezel name="4.0" element="led"><bounds x="8" y="0" width="1" height="1" /></bezel> + <bezel name="4.1" element="led"><bounds x="8" y="2" width="1" height="1" /></bezel> + <bezel name="4.2" element="led"><bounds x="8" y="4" width="1" height="1" /></bezel> + <bezel name="4.3" element="led"><bounds x="8" y="6" width="1" height="1" /></bezel> + <bezel name="4.4" element="led"><bounds x="8" y="8" width="1" height="1" /></bezel> + <bezel name="4.5" element="led"><bounds x="8" y="10" width="1" height="1" /></bezel> + <bezel name="4.6" element="led"><bounds x="8" y="12" width="1" height="1" /></bezel> + <bezel name="4.7" element="led"><bounds x="8" y="14" width="1" height="1" /></bezel> + <bezel name="4.8" element="led"><bounds x="8" y="16" width="1" height="1" /></bezel> + <bezel name="4.9" element="led"><bounds x="8" y="18" width="1" height="1" /></bezel> + <bezel name="4.10" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel> + <bezel name="4.11" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel> + <bezel name="4.12" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel> + <bezel name="4.13" element="led"><bounds x="8" y="26" width="1" height="1" /></bezel> + <bezel name="4.14" element="led"><bounds x="8" y="28" width="1" height="1" /></bezel> + <bezel name="4.15" element="led"><bounds x="8" y="30" width="1" height="1" /></bezel> + <bezel name="4.16" element="led"><bounds x="8" y="32" width="1" height="1" /></bezel> + <bezel name="4.17" element="led"><bounds x="8" y="34" width="1" height="1" /></bezel> + <bezel name="4.18" element="led"><bounds x="8" y="36" width="1" height="1" /></bezel> + <bezel name="4.19" element="led"><bounds x="8" y="38" width="1" height="1" /></bezel> + <bezel name="4.20" element="led"><bounds x="8" y="40" width="1" height="1" /></bezel> + <bezel name="4.21" element="led"><bounds x="8" y="42" width="1" height="1" /></bezel> + <bezel name="4.22" element="led"><bounds x="8" y="44" width="1" height="1" /></bezel> + <bezel name="4.23" element="led"><bounds x="8" y="46" width="1" height="1" /></bezel> + <bezel name="4.24" element="led"><bounds x="8" y="48" width="1" height="1" /></bezel> + <bezel name="4.25" element="led"><bounds x="8" y="50" width="1" height="1" /></bezel> + <bezel name="4.26" element="led"><bounds x="8" y="52" width="1" height="1" /></bezel> + <bezel name="4.27" element="led"><bounds x="8" y="54" width="1" height="1" /></bezel> + <bezel name="4.28" element="led"><bounds x="8" y="56" width="1" height="1" /></bezel> + <bezel name="4.29" element="led"><bounds x="8" y="58" width="1" height="1" /></bezel> + <bezel name="4.30" element="led"><bounds x="8" y="60" width="1" height="1" /></bezel> + <bezel name="4.31" element="led"><bounds x="8" y="62" width="1" height="1" /></bezel> + <bezel name="4.32" element="led"><bounds x="8" y="64" width="1" height="1" /></bezel> + <bezel name="4.33" element="led"><bounds x="8" y="66" width="1" height="1" /></bezel> + <bezel name="4.34" element="led"><bounds x="8" y="68" width="1" height="1" /></bezel> + <bezel name="4.35" element="led"><bounds x="8" y="70" width="1" height="1" /></bezel> + <bezel name="4.36" element="led"><bounds x="8" y="72" width="1" height="1" /></bezel> + <bezel name="4.37" element="led"><bounds x="8" y="74" width="1" height="1" /></bezel> + <bezel name="4.38" element="led"><bounds x="8" y="76" width="1" height="1" /></bezel> + <bezel name="4.39" element="led"><bounds x="8" y="78" width="1" height="1" /></bezel> - <bezel name="lamp500" element="led"><bounds x="10" y="0" width="1" height="1" /></bezel> - <bezel name="lamp501" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel> - <bezel name="lamp502" element="led"><bounds x="10" y="4" width="1" height="1" /></bezel> - <bezel name="lamp503" element="led"><bounds x="10" y="6" width="1" height="1" /></bezel> - <bezel name="lamp504" element="led"><bounds x="10" y="8" width="1" height="1" /></bezel> - <bezel name="lamp505" element="led"><bounds x="10" y="10" width="1" height="1" /></bezel> - <bezel name="lamp506" element="led"><bounds x="10" y="12" width="1" height="1" /></bezel> - <bezel name="lamp507" element="led"><bounds x="10" y="14" width="1" height="1" /></bezel> - <bezel name="lamp508" element="led"><bounds x="10" y="16" width="1" height="1" /></bezel> - <bezel name="lamp509" element="led"><bounds x="10" y="18" width="1" height="1" /></bezel> - <bezel name="lamp510" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel> - <bezel name="lamp511" element="led"><bounds x="10" y="22" width="1" height="1" /></bezel> - <bezel name="lamp512" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel> - <bezel name="lamp513" element="led"><bounds x="10" y="26" width="1" height="1" /></bezel> - <bezel name="lamp514" element="led"><bounds x="10" y="28" width="1" height="1" /></bezel> - <bezel name="lamp515" element="led"><bounds x="10" y="30" width="1" height="1" /></bezel> - <bezel name="lamp516" element="led"><bounds x="10" y="32" width="1" height="1" /></bezel> - <bezel name="lamp517" element="led"><bounds x="10" y="34" width="1" height="1" /></bezel> - <bezel name="lamp518" element="led"><bounds x="10" y="36" width="1" height="1" /></bezel> - <bezel name="lamp519" element="led"><bounds x="10" y="38" width="1" height="1" /></bezel> - <bezel name="lamp520" element="led"><bounds x="10" y="40" width="1" height="1" /></bezel> - <bezel name="lamp521" element="led"><bounds x="10" y="42" width="1" height="1" /></bezel> - <bezel name="lamp522" element="led"><bounds x="10" y="44" width="1" height="1" /></bezel> - <bezel name="lamp523" element="led"><bounds x="10" y="46" width="1" height="1" /></bezel> - <bezel name="lamp524" element="led"><bounds x="10" y="48" width="1" height="1" /></bezel> - <bezel name="lamp525" element="led"><bounds x="10" y="50" width="1" height="1" /></bezel> - <bezel name="lamp526" element="led"><bounds x="10" y="52" width="1" height="1" /></bezel> - <bezel name="lamp527" element="led"><bounds x="10" y="54" width="1" height="1" /></bezel> - <bezel name="lamp528" element="led"><bounds x="10" y="56" width="1" height="1" /></bezel> - <bezel name="lamp529" element="led"><bounds x="10" y="58" width="1" height="1" /></bezel> - <bezel name="lamp530" element="led"><bounds x="10" y="60" width="1" height="1" /></bezel> - <bezel name="lamp531" element="led"><bounds x="10" y="62" width="1" height="1" /></bezel> - <bezel name="lamp532" element="led"><bounds x="10" y="64" width="1" height="1" /></bezel> - <bezel name="lamp533" element="led"><bounds x="10" y="66" width="1" height="1" /></bezel> - <bezel name="lamp534" element="led"><bounds x="10" y="68" width="1" height="1" /></bezel> - <bezel name="lamp535" element="led"><bounds x="10" y="70" width="1" height="1" /></bezel> - <bezel name="lamp536" element="led"><bounds x="10" y="72" width="1" height="1" /></bezel> - <bezel name="lamp537" element="led"><bounds x="10" y="74" width="1" height="1" /></bezel> - <bezel name="lamp538" element="led"><bounds x="10" y="76" width="1" height="1" /></bezel> - <bezel name="lamp539" element="led"><bounds x="10" y="78" width="1" height="1" /></bezel> + <bezel name="5.0" element="led"><bounds x="10" y="0" width="1" height="1" /></bezel> + <bezel name="5.1" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel> + <bezel name="5.2" element="led"><bounds x="10" y="4" width="1" height="1" /></bezel> + <bezel name="5.3" element="led"><bounds x="10" y="6" width="1" height="1" /></bezel> + <bezel name="5.4" element="led"><bounds x="10" y="8" width="1" height="1" /></bezel> + <bezel name="5.5" element="led"><bounds x="10" y="10" width="1" height="1" /></bezel> + <bezel name="5.6" element="led"><bounds x="10" y="12" width="1" height="1" /></bezel> + <bezel name="5.7" element="led"><bounds x="10" y="14" width="1" height="1" /></bezel> + <bezel name="5.8" element="led"><bounds x="10" y="16" width="1" height="1" /></bezel> + <bezel name="5.9" element="led"><bounds x="10" y="18" width="1" height="1" /></bezel> + <bezel name="5.10" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel> + <bezel name="5.11" element="led"><bounds x="10" y="22" width="1" height="1" /></bezel> + <bezel name="5.12" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel> + <bezel name="5.13" element="led"><bounds x="10" y="26" width="1" height="1" /></bezel> + <bezel name="5.14" element="led"><bounds x="10" y="28" width="1" height="1" /></bezel> + <bezel name="5.15" element="led"><bounds x="10" y="30" width="1" height="1" /></bezel> + <bezel name="5.16" element="led"><bounds x="10" y="32" width="1" height="1" /></bezel> + <bezel name="5.17" element="led"><bounds x="10" y="34" width="1" height="1" /></bezel> + <bezel name="5.18" element="led"><bounds x="10" y="36" width="1" height="1" /></bezel> + <bezel name="5.19" element="led"><bounds x="10" y="38" width="1" height="1" /></bezel> + <bezel name="5.20" element="led"><bounds x="10" y="40" width="1" height="1" /></bezel> + <bezel name="5.21" element="led"><bounds x="10" y="42" width="1" height="1" /></bezel> + <bezel name="5.22" element="led"><bounds x="10" y="44" width="1" height="1" /></bezel> + <bezel name="5.23" element="led"><bounds x="10" y="46" width="1" height="1" /></bezel> + <bezel name="5.24" element="led"><bounds x="10" y="48" width="1" height="1" /></bezel> + <bezel name="5.25" element="led"><bounds x="10" y="50" width="1" height="1" /></bezel> + <bezel name="5.26" element="led"><bounds x="10" y="52" width="1" height="1" /></bezel> + <bezel name="5.27" element="led"><bounds x="10" y="54" width="1" height="1" /></bezel> + <bezel name="5.28" element="led"><bounds x="10" y="56" width="1" height="1" /></bezel> + <bezel name="5.29" element="led"><bounds x="10" y="58" width="1" height="1" /></bezel> + <bezel name="5.30" element="led"><bounds x="10" y="60" width="1" height="1" /></bezel> + <bezel name="5.31" element="led"><bounds x="10" y="62" width="1" height="1" /></bezel> + <bezel name="5.32" element="led"><bounds x="10" y="64" width="1" height="1" /></bezel> + <bezel name="5.33" element="led"><bounds x="10" y="66" width="1" height="1" /></bezel> + <bezel name="5.34" element="led"><bounds x="10" y="68" width="1" height="1" /></bezel> + <bezel name="5.35" element="led"><bounds x="10" y="70" width="1" height="1" /></bezel> + <bezel name="5.36" element="led"><bounds x="10" y="72" width="1" height="1" /></bezel> + <bezel name="5.37" element="led"><bounds x="10" y="74" width="1" height="1" /></bezel> + <bezel name="5.38" element="led"><bounds x="10" y="76" width="1" height="1" /></bezel> + <bezel name="5.39" element="led"><bounds x="10" y="78" width="1" height="1" /></bezel> - <bezel name="lamp600" element="led"><bounds x="12" y="0" width="1" height="1" /></bezel> - <bezel name="lamp601" element="led"><bounds x="12" y="2" width="1" height="1" /></bezel> - <bezel name="lamp602" element="led"><bounds x="12" y="4" width="1" height="1" /></bezel> - <bezel name="lamp603" element="led"><bounds x="12" y="6" width="1" height="1" /></bezel> - <bezel name="lamp604" element="led"><bounds x="12" y="8" width="1" height="1" /></bezel> - <bezel name="lamp605" element="led"><bounds x="12" y="10" width="1" height="1" /></bezel> - <bezel name="lamp606" element="led"><bounds x="12" y="12" width="1" height="1" /></bezel> - <bezel name="lamp607" element="led"><bounds x="12" y="14" width="1" height="1" /></bezel> - <bezel name="lamp608" element="led"><bounds x="12" y="16" width="1" height="1" /></bezel> - <bezel name="lamp609" element="led"><bounds x="12" y="18" width="1" height="1" /></bezel> - <bezel name="lamp610" element="led"><bounds x="12" y="20" width="1" height="1" /></bezel> - <bezel name="lamp611" element="led"><bounds x="12" y="22" width="1" height="1" /></bezel> - <bezel name="lamp612" element="led"><bounds x="12" y="24" width="1" height="1" /></bezel> - <bezel name="lamp613" element="led"><bounds x="12" y="26" width="1" height="1" /></bezel> - <bezel name="lamp614" element="led"><bounds x="12" y="28" width="1" height="1" /></bezel> - <bezel name="lamp615" element="led"><bounds x="12" y="30" width="1" height="1" /></bezel> - <bezel name="lamp616" element="led"><bounds x="12" y="32" width="1" height="1" /></bezel> - <bezel name="lamp617" element="led"><bounds x="12" y="34" width="1" height="1" /></bezel> - <bezel name="lamp618" element="led"><bounds x="12" y="36" width="1" height="1" /></bezel> - <bezel name="lamp619" element="led"><bounds x="12" y="38" width="1" height="1" /></bezel> - <bezel name="lamp620" element="led"><bounds x="12" y="40" width="1" height="1" /></bezel> - <bezel name="lamp621" element="led"><bounds x="12" y="42" width="1" height="1" /></bezel> - <bezel name="lamp622" element="led"><bounds x="12" y="44" width="1" height="1" /></bezel> - <bezel name="lamp623" element="led"><bounds x="12" y="46" width="1" height="1" /></bezel> - <bezel name="lamp624" element="led"><bounds x="12" y="48" width="1" height="1" /></bezel> - <bezel name="lamp625" element="led"><bounds x="12" y="50" width="1" height="1" /></bezel> - <bezel name="lamp626" element="led"><bounds x="12" y="52" width="1" height="1" /></bezel> - <bezel name="lamp627" element="led"><bounds x="12" y="54" width="1" height="1" /></bezel> - <bezel name="lamp628" element="led"><bounds x="12" y="56" width="1" height="1" /></bezel> - <bezel name="lamp629" element="led"><bounds x="12" y="58" width="1" height="1" /></bezel> - <bezel name="lamp630" element="led"><bounds x="12" y="60" width="1" height="1" /></bezel> - <bezel name="lamp631" element="led"><bounds x="12" y="62" width="1" height="1" /></bezel> - <bezel name="lamp632" element="led"><bounds x="12" y="64" width="1" height="1" /></bezel> - <bezel name="lamp633" element="led"><bounds x="12" y="66" width="1" height="1" /></bezel> - <bezel name="lamp634" element="led"><bounds x="12" y="68" width="1" height="1" /></bezel> - <bezel name="lamp635" element="led"><bounds x="12" y="70" width="1" height="1" /></bezel> - <bezel name="lamp636" element="led"><bounds x="12" y="72" width="1" height="1" /></bezel> - <bezel name="lamp637" element="led"><bounds x="12" y="74" width="1" height="1" /></bezel> - <bezel name="lamp638" element="led"><bounds x="12" y="76" width="1" height="1" /></bezel> - <bezel name="lamp639" element="led"><bounds x="12" y="78" width="1" height="1" /></bezel> + <bezel name="6.0" element="led"><bounds x="12" y="0" width="1" height="1" /></bezel> + <bezel name="6.1" element="led"><bounds x="12" y="2" width="1" height="1" /></bezel> + <bezel name="6.2" element="led"><bounds x="12" y="4" width="1" height="1" /></bezel> + <bezel name="6.3" element="led"><bounds x="12" y="6" width="1" height="1" /></bezel> + <bezel name="6.4" element="led"><bounds x="12" y="8" width="1" height="1" /></bezel> + <bezel name="6.5" element="led"><bounds x="12" y="10" width="1" height="1" /></bezel> + <bezel name="6.6" element="led"><bounds x="12" y="12" width="1" height="1" /></bezel> + <bezel name="6.7" element="led"><bounds x="12" y="14" width="1" height="1" /></bezel> + <bezel name="6.8" element="led"><bounds x="12" y="16" width="1" height="1" /></bezel> + <bezel name="6.9" element="led"><bounds x="12" y="18" width="1" height="1" /></bezel> + <bezel name="6.10" element="led"><bounds x="12" y="20" width="1" height="1" /></bezel> + <bezel name="6.11" element="led"><bounds x="12" y="22" width="1" height="1" /></bezel> + <bezel name="6.12" element="led"><bounds x="12" y="24" width="1" height="1" /></bezel> + <bezel name="6.13" element="led"><bounds x="12" y="26" width="1" height="1" /></bezel> + <bezel name="6.14" element="led"><bounds x="12" y="28" width="1" height="1" /></bezel> + <bezel name="6.15" element="led"><bounds x="12" y="30" width="1" height="1" /></bezel> + <bezel name="6.16" element="led"><bounds x="12" y="32" width="1" height="1" /></bezel> + <bezel name="6.17" element="led"><bounds x="12" y="34" width="1" height="1" /></bezel> + <bezel name="6.18" element="led"><bounds x="12" y="36" width="1" height="1" /></bezel> + <bezel name="6.19" element="led"><bounds x="12" y="38" width="1" height="1" /></bezel> + <bezel name="6.20" element="led"><bounds x="12" y="40" width="1" height="1" /></bezel> + <bezel name="6.21" element="led"><bounds x="12" y="42" width="1" height="1" /></bezel> + <bezel name="6.22" element="led"><bounds x="12" y="44" width="1" height="1" /></bezel> + <bezel name="6.23" element="led"><bounds x="12" y="46" width="1" height="1" /></bezel> + <bezel name="6.24" element="led"><bounds x="12" y="48" width="1" height="1" /></bezel> + <bezel name="6.25" element="led"><bounds x="12" y="50" width="1" height="1" /></bezel> + <bezel name="6.26" element="led"><bounds x="12" y="52" width="1" height="1" /></bezel> + <bezel name="6.27" element="led"><bounds x="12" y="54" width="1" height="1" /></bezel> + <bezel name="6.28" element="led"><bounds x="12" y="56" width="1" height="1" /></bezel> + <bezel name="6.29" element="led"><bounds x="12" y="58" width="1" height="1" /></bezel> + <bezel name="6.30" element="led"><bounds x="12" y="60" width="1" height="1" /></bezel> + <bezel name="6.31" element="led"><bounds x="12" y="62" width="1" height="1" /></bezel> + <bezel name="6.32" element="led"><bounds x="12" y="64" width="1" height="1" /></bezel> + <bezel name="6.33" element="led"><bounds x="12" y="66" width="1" height="1" /></bezel> + <bezel name="6.34" element="led"><bounds x="12" y="68" width="1" height="1" /></bezel> + <bezel name="6.35" element="led"><bounds x="12" y="70" width="1" height="1" /></bezel> + <bezel name="6.36" element="led"><bounds x="12" y="72" width="1" height="1" /></bezel> + <bezel name="6.37" element="led"><bounds x="12" y="74" width="1" height="1" /></bezel> + <bezel name="6.38" element="led"><bounds x="12" y="76" width="1" height="1" /></bezel> + <bezel name="6.39" element="led"><bounds x="12" y="78" width="1" height="1" /></bezel> - <bezel name="lamp700" element="led"><bounds x="14" y="0" width="1" height="1" /></bezel> - <bezel name="lamp701" element="led"><bounds x="14" y="2" width="1" height="1" /></bezel> - <bezel name="lamp702" element="led"><bounds x="14" y="4" width="1" height="1" /></bezel> - <bezel name="lamp703" element="led"><bounds x="14" y="6" width="1" height="1" /></bezel> - <bezel name="lamp704" element="led"><bounds x="14" y="8" width="1" height="1" /></bezel> - <bezel name="lamp705" element="led"><bounds x="14" y="10" width="1" height="1" /></bezel> - <bezel name="lamp706" element="led"><bounds x="14" y="12" width="1" height="1" /></bezel> - <bezel name="lamp707" element="led"><bounds x="14" y="14" width="1" height="1" /></bezel> - <bezel name="lamp708" element="led"><bounds x="14" y="16" width="1" height="1" /></bezel> - <bezel name="lamp709" element="led"><bounds x="14" y="18" width="1" height="1" /></bezel> - <bezel name="lamp710" element="led"><bounds x="14" y="20" width="1" height="1" /></bezel> - <bezel name="lamp711" element="led"><bounds x="14" y="22" width="1" height="1" /></bezel> - <bezel name="lamp712" element="led"><bounds x="14" y="24" width="1" height="1" /></bezel> - <bezel name="lamp713" element="led"><bounds x="14" y="26" width="1" height="1" /></bezel> - <bezel name="lamp714" element="led"><bounds x="14" y="28" width="1" height="1" /></bezel> - <bezel name="lamp715" element="led"><bounds x="14" y="30" width="1" height="1" /></bezel> - <bezel name="lamp716" element="led"><bounds x="14" y="32" width="1" height="1" /></bezel> - <bezel name="lamp717" element="led"><bounds x="14" y="34" width="1" height="1" /></bezel> - <bezel name="lamp718" element="led"><bounds x="14" y="36" width="1" height="1" /></bezel> - <bezel name="lamp719" element="led"><bounds x="14" y="38" width="1" height="1" /></bezel> - <bezel name="lamp720" element="led"><bounds x="14" y="40" width="1" height="1" /></bezel> - <bezel name="lamp721" element="led"><bounds x="14" y="42" width="1" height="1" /></bezel> - <bezel name="lamp722" element="led"><bounds x="14" y="44" width="1" height="1" /></bezel> - <bezel name="lamp723" element="led"><bounds x="14" y="46" width="1" height="1" /></bezel> - <bezel name="lamp724" element="led"><bounds x="14" y="48" width="1" height="1" /></bezel> - <bezel name="lamp725" element="led"><bounds x="14" y="50" width="1" height="1" /></bezel> - <bezel name="lamp726" element="led"><bounds x="14" y="52" width="1" height="1" /></bezel> - <bezel name="lamp727" element="led"><bounds x="14" y="54" width="1" height="1" /></bezel> - <bezel name="lamp728" element="led"><bounds x="14" y="56" width="1" height="1" /></bezel> - <bezel name="lamp729" element="led"><bounds x="14" y="58" width="1" height="1" /></bezel> - <bezel name="lamp730" element="led"><bounds x="14" y="60" width="1" height="1" /></bezel> - <bezel name="lamp731" element="led"><bounds x="14" y="62" width="1" height="1" /></bezel> - <bezel name="lamp732" element="led"><bounds x="14" y="64" width="1" height="1" /></bezel> - <bezel name="lamp733" element="led"><bounds x="14" y="66" width="1" height="1" /></bezel> - <bezel name="lamp734" element="led"><bounds x="14" y="68" width="1" height="1" /></bezel> - <bezel name="lamp735" element="led"><bounds x="14" y="70" width="1" height="1" /></bezel> - <bezel name="lamp736" element="led"><bounds x="14" y="72" width="1" height="1" /></bezel> - <bezel name="lamp737" element="led"><bounds x="14" y="74" width="1" height="1" /></bezel> - <bezel name="lamp738" element="led"><bounds x="14" y="76" width="1" height="1" /></bezel> - <bezel name="lamp739" element="led"><bounds x="14" y="78" width="1" height="1" /></bezel> + <bezel name="7.0" element="led"><bounds x="14" y="0" width="1" height="1" /></bezel> + <bezel name="7.1" element="led"><bounds x="14" y="2" width="1" height="1" /></bezel> + <bezel name="7.2" element="led"><bounds x="14" y="4" width="1" height="1" /></bezel> + <bezel name="7.3" element="led"><bounds x="14" y="6" width="1" height="1" /></bezel> + <bezel name="7.4" element="led"><bounds x="14" y="8" width="1" height="1" /></bezel> + <bezel name="7.5" element="led"><bounds x="14" y="10" width="1" height="1" /></bezel> + <bezel name="7.6" element="led"><bounds x="14" y="12" width="1" height="1" /></bezel> + <bezel name="7.7" element="led"><bounds x="14" y="14" width="1" height="1" /></bezel> + <bezel name="7.8" element="led"><bounds x="14" y="16" width="1" height="1" /></bezel> + <bezel name="7.9" element="led"><bounds x="14" y="18" width="1" height="1" /></bezel> + <bezel name="7.10" element="led"><bounds x="14" y="20" width="1" height="1" /></bezel> + <bezel name="7.11" element="led"><bounds x="14" y="22" width="1" height="1" /></bezel> + <bezel name="7.12" element="led"><bounds x="14" y="24" width="1" height="1" /></bezel> + <bezel name="7.13" element="led"><bounds x="14" y="26" width="1" height="1" /></bezel> + <bezel name="7.14" element="led"><bounds x="14" y="28" width="1" height="1" /></bezel> + <bezel name="7.15" element="led"><bounds x="14" y="30" width="1" height="1" /></bezel> + <bezel name="7.16" element="led"><bounds x="14" y="32" width="1" height="1" /></bezel> + <bezel name="7.17" element="led"><bounds x="14" y="34" width="1" height="1" /></bezel> + <bezel name="7.18" element="led"><bounds x="14" y="36" width="1" height="1" /></bezel> + <bezel name="7.19" element="led"><bounds x="14" y="38" width="1" height="1" /></bezel> + <bezel name="7.20" element="led"><bounds x="14" y="40" width="1" height="1" /></bezel> + <bezel name="7.21" element="led"><bounds x="14" y="42" width="1" height="1" /></bezel> + <bezel name="7.22" element="led"><bounds x="14" y="44" width="1" height="1" /></bezel> + <bezel name="7.23" element="led"><bounds x="14" y="46" width="1" height="1" /></bezel> + <bezel name="7.24" element="led"><bounds x="14" y="48" width="1" height="1" /></bezel> + <bezel name="7.25" element="led"><bounds x="14" y="50" width="1" height="1" /></bezel> + <bezel name="7.26" element="led"><bounds x="14" y="52" width="1" height="1" /></bezel> + <bezel name="7.27" element="led"><bounds x="14" y="54" width="1" height="1" /></bezel> + <bezel name="7.28" element="led"><bounds x="14" y="56" width="1" height="1" /></bezel> + <bezel name="7.29" element="led"><bounds x="14" y="58" width="1" height="1" /></bezel> + <bezel name="7.30" element="led"><bounds x="14" y="60" width="1" height="1" /></bezel> + <bezel name="7.31" element="led"><bounds x="14" y="62" width="1" height="1" /></bezel> + <bezel name="7.32" element="led"><bounds x="14" y="64" width="1" height="1" /></bezel> + <bezel name="7.33" element="led"><bounds x="14" y="66" width="1" height="1" /></bezel> + <bezel name="7.34" element="led"><bounds x="14" y="68" width="1" height="1" /></bezel> + <bezel name="7.35" element="led"><bounds x="14" y="70" width="1" height="1" /></bezel> + <bezel name="7.36" element="led"><bounds x="14" y="72" width="1" height="1" /></bezel> + <bezel name="7.37" element="led"><bounds x="14" y="74" width="1" height="1" /></bezel> + <bezel name="7.38" element="led"><bounds x="14" y="76" width="1" height="1" /></bezel> + <bezel name="7.39" element="led"><bounds x="14" y="78" width="1" height="1" /></bezel> - <bezel name="lamp800" element="led"><bounds x="16" y="0" width="1" height="1" /></bezel> - <bezel name="lamp801" element="led"><bounds x="16" y="2" width="1" height="1" /></bezel> - <bezel name="lamp802" element="led"><bounds x="16" y="4" width="1" height="1" /></bezel> - <bezel name="lamp803" element="led"><bounds x="16" y="6" width="1" height="1" /></bezel> - <bezel name="lamp804" element="led"><bounds x="16" y="8" width="1" height="1" /></bezel> - <bezel name="lamp805" element="led"><bounds x="16" y="10" width="1" height="1" /></bezel> - <bezel name="lamp806" element="led"><bounds x="16" y="12" width="1" height="1" /></bezel> - <bezel name="lamp807" element="led"><bounds x="16" y="14" width="1" height="1" /></bezel> - <bezel name="lamp808" element="led"><bounds x="16" y="16" width="1" height="1" /></bezel> - <bezel name="lamp809" element="led"><bounds x="16" y="18" width="1" height="1" /></bezel> - <bezel name="lamp810" element="led"><bounds x="16" y="20" width="1" height="1" /></bezel> - <bezel name="lamp811" element="led"><bounds x="16" y="22" width="1" height="1" /></bezel> - <bezel name="lamp812" element="led"><bounds x="16" y="24" width="1" height="1" /></bezel> - <bezel name="lamp813" element="led"><bounds x="16" y="26" width="1" height="1" /></bezel> - <bezel name="lamp814" element="led"><bounds x="16" y="28" width="1" height="1" /></bezel> - <bezel name="lamp815" element="led"><bounds x="16" y="30" width="1" height="1" /></bezel> - <bezel name="lamp816" element="led"><bounds x="16" y="32" width="1" height="1" /></bezel> - <bezel name="lamp817" element="led"><bounds x="16" y="34" width="1" height="1" /></bezel> - <bezel name="lamp818" element="led"><bounds x="16" y="36" width="1" height="1" /></bezel> - <bezel name="lamp819" element="led"><bounds x="16" y="38" width="1" height="1" /></bezel> - <bezel name="lamp820" element="led"><bounds x="16" y="40" width="1" height="1" /></bezel> - <bezel name="lamp821" element="led"><bounds x="16" y="42" width="1" height="1" /></bezel> - <bezel name="lamp822" element="led"><bounds x="16" y="44" width="1" height="1" /></bezel> - <bezel name="lamp823" element="led"><bounds x="16" y="46" width="1" height="1" /></bezel> - <bezel name="lamp824" element="led"><bounds x="16" y="48" width="1" height="1" /></bezel> - <bezel name="lamp825" element="led"><bounds x="16" y="50" width="1" height="1" /></bezel> - <bezel name="lamp826" element="led"><bounds x="16" y="52" width="1" height="1" /></bezel> - <bezel name="lamp827" element="led"><bounds x="16" y="54" width="1" height="1" /></bezel> - <bezel name="lamp828" element="led"><bounds x="16" y="56" width="1" height="1" /></bezel> - <bezel name="lamp829" element="led"><bounds x="16" y="58" width="1" height="1" /></bezel> - <bezel name="lamp830" element="led"><bounds x="16" y="60" width="1" height="1" /></bezel> - <bezel name="lamp831" element="led"><bounds x="16" y="62" width="1" height="1" /></bezel> - <bezel name="lamp832" element="led"><bounds x="16" y="64" width="1" height="1" /></bezel> - <bezel name="lamp833" element="led"><bounds x="16" y="66" width="1" height="1" /></bezel> - <bezel name="lamp834" element="led"><bounds x="16" y="68" width="1" height="1" /></bezel> - <bezel name="lamp835" element="led"><bounds x="16" y="70" width="1" height="1" /></bezel> - <bezel name="lamp836" element="led"><bounds x="16" y="72" width="1" height="1" /></bezel> - <bezel name="lamp837" element="led"><bounds x="16" y="74" width="1" height="1" /></bezel> - <bezel name="lamp838" element="led"><bounds x="16" y="76" width="1" height="1" /></bezel> - <bezel name="lamp839" element="led"><bounds x="16" y="78" width="1" height="1" /></bezel> + <bezel name="8.0" element="led"><bounds x="16" y="0" width="1" height="1" /></bezel> + <bezel name="8.1" element="led"><bounds x="16" y="2" width="1" height="1" /></bezel> + <bezel name="8.2" element="led"><bounds x="16" y="4" width="1" height="1" /></bezel> + <bezel name="8.3" element="led"><bounds x="16" y="6" width="1" height="1" /></bezel> + <bezel name="8.4" element="led"><bounds x="16" y="8" width="1" height="1" /></bezel> + <bezel name="8.5" element="led"><bounds x="16" y="10" width="1" height="1" /></bezel> + <bezel name="8.6" element="led"><bounds x="16" y="12" width="1" height="1" /></bezel> + <bezel name="8.7" element="led"><bounds x="16" y="14" width="1" height="1" /></bezel> + <bezel name="8.8" element="led"><bounds x="16" y="16" width="1" height="1" /></bezel> + <bezel name="8.9" element="led"><bounds x="16" y="18" width="1" height="1" /></bezel> + <bezel name="8.10" element="led"><bounds x="16" y="20" width="1" height="1" /></bezel> + <bezel name="8.11" element="led"><bounds x="16" y="22" width="1" height="1" /></bezel> + <bezel name="8.12" element="led"><bounds x="16" y="24" width="1" height="1" /></bezel> + <bezel name="8.13" element="led"><bounds x="16" y="26" width="1" height="1" /></bezel> + <bezel name="8.14" element="led"><bounds x="16" y="28" width="1" height="1" /></bezel> + <bezel name="8.15" element="led"><bounds x="16" y="30" width="1" height="1" /></bezel> + <bezel name="8.16" element="led"><bounds x="16" y="32" width="1" height="1" /></bezel> + <bezel name="8.17" element="led"><bounds x="16" y="34" width="1" height="1" /></bezel> + <bezel name="8.18" element="led"><bounds x="16" y="36" width="1" height="1" /></bezel> + <bezel name="8.19" element="led"><bounds x="16" y="38" width="1" height="1" /></bezel> + <bezel name="8.20" element="led"><bounds x="16" y="40" width="1" height="1" /></bezel> + <bezel name="8.21" element="led"><bounds x="16" y="42" width="1" height="1" /></bezel> + <bezel name="8.22" element="led"><bounds x="16" y="44" width="1" height="1" /></bezel> + <bezel name="8.23" element="led"><bounds x="16" y="46" width="1" height="1" /></bezel> + <bezel name="8.24" element="led"><bounds x="16" y="48" width="1" height="1" /></bezel> + <bezel name="8.25" element="led"><bounds x="16" y="50" width="1" height="1" /></bezel> + <bezel name="8.26" element="led"><bounds x="16" y="52" width="1" height="1" /></bezel> + <bezel name="8.27" element="led"><bounds x="16" y="54" width="1" height="1" /></bezel> + <bezel name="8.28" element="led"><bounds x="16" y="56" width="1" height="1" /></bezel> + <bezel name="8.29" element="led"><bounds x="16" y="58" width="1" height="1" /></bezel> + <bezel name="8.30" element="led"><bounds x="16" y="60" width="1" height="1" /></bezel> + <bezel name="8.31" element="led"><bounds x="16" y="62" width="1" height="1" /></bezel> + <bezel name="8.32" element="led"><bounds x="16" y="64" width="1" height="1" /></bezel> + <bezel name="8.33" element="led"><bounds x="16" y="66" width="1" height="1" /></bezel> + <bezel name="8.34" element="led"><bounds x="16" y="68" width="1" height="1" /></bezel> + <bezel name="8.35" element="led"><bounds x="16" y="70" width="1" height="1" /></bezel> + <bezel name="8.36" element="led"><bounds x="16" y="72" width="1" height="1" /></bezel> + <bezel name="8.37" element="led"><bounds x="16" y="74" width="1" height="1" /></bezel> + <bezel name="8.38" element="led"><bounds x="16" y="76" width="1" height="1" /></bezel> + <bezel name="8.39" element="led"><bounds x="16" y="78" width="1" height="1" /></bezel> - <bezel name="lamp900" element="led"><bounds x="18" y="0" width="1" height="1" /></bezel> - <bezel name="lamp901" element="led"><bounds x="18" y="2" width="1" height="1" /></bezel> - <bezel name="lamp902" element="led"><bounds x="18" y="4" width="1" height="1" /></bezel> - <bezel name="lamp903" element="led"><bounds x="18" y="6" width="1" height="1" /></bezel> - <bezel name="lamp904" element="led"><bounds x="18" y="8" width="1" height="1" /></bezel> - <bezel name="lamp905" element="led"><bounds x="18" y="10" width="1" height="1" /></bezel> - <bezel name="lamp906" element="led"><bounds x="18" y="12" width="1" height="1" /></bezel> - <bezel name="lamp907" element="led"><bounds x="18" y="14" width="1" height="1" /></bezel> - <bezel name="lamp908" element="led"><bounds x="18" y="16" width="1" height="1" /></bezel> - <bezel name="lamp909" element="led"><bounds x="18" y="18" width="1" height="1" /></bezel> - <bezel name="lamp910" element="led"><bounds x="18" y="20" width="1" height="1" /></bezel> - <bezel name="lamp911" element="led"><bounds x="18" y="22" width="1" height="1" /></bezel> - <bezel name="lamp912" element="led"><bounds x="18" y="24" width="1" height="1" /></bezel> - <bezel name="lamp913" element="led"><bounds x="18" y="26" width="1" height="1" /></bezel> - <bezel name="lamp914" element="led"><bounds x="18" y="28" width="1" height="1" /></bezel> - <bezel name="lamp915" element="led"><bounds x="18" y="30" width="1" height="1" /></bezel> - <bezel name="lamp916" element="led"><bounds x="18" y="32" width="1" height="1" /></bezel> - <bezel name="lamp917" element="led"><bounds x="18" y="34" width="1" height="1" /></bezel> - <bezel name="lamp918" element="led"><bounds x="18" y="36" width="1" height="1" /></bezel> - <bezel name="lamp919" element="led"><bounds x="18" y="38" width="1" height="1" /></bezel> - <bezel name="lamp920" element="led"><bounds x="18" y="40" width="1" height="1" /></bezel> - <bezel name="lamp921" element="led"><bounds x="18" y="42" width="1" height="1" /></bezel> - <bezel name="lamp922" element="led"><bounds x="18" y="44" width="1" height="1" /></bezel> - <bezel name="lamp923" element="led"><bounds x="18" y="46" width="1" height="1" /></bezel> - <bezel name="lamp924" element="led"><bounds x="18" y="48" width="1" height="1" /></bezel> - <bezel name="lamp925" element="led"><bounds x="18" y="50" width="1" height="1" /></bezel> - <bezel name="lamp926" element="led"><bounds x="18" y="52" width="1" height="1" /></bezel> - <bezel name="lamp927" element="led"><bounds x="18" y="54" width="1" height="1" /></bezel> - <bezel name="lamp928" element="led"><bounds x="18" y="56" width="1" height="1" /></bezel> - <bezel name="lamp929" element="led"><bounds x="18" y="58" width="1" height="1" /></bezel> - <bezel name="lamp930" element="led"><bounds x="18" y="60" width="1" height="1" /></bezel> - <bezel name="lamp931" element="led"><bounds x="18" y="62" width="1" height="1" /></bezel> - <bezel name="lamp932" element="led"><bounds x="18" y="64" width="1" height="1" /></bezel> - <bezel name="lamp933" element="led"><bounds x="18" y="66" width="1" height="1" /></bezel> - <bezel name="lamp934" element="led"><bounds x="18" y="68" width="1" height="1" /></bezel> - <bezel name="lamp935" element="led"><bounds x="18" y="70" width="1" height="1" /></bezel> - <bezel name="lamp936" element="led"><bounds x="18" y="72" width="1" height="1" /></bezel> - <bezel name="lamp937" element="led"><bounds x="18" y="74" width="1" height="1" /></bezel> - <bezel name="lamp938" element="led"><bounds x="18" y="76" width="1" height="1" /></bezel> - <bezel name="lamp939" element="led"><bounds x="18" y="78" width="1" height="1" /></bezel> + <bezel name="9.0" element="led"><bounds x="18" y="0" width="1" height="1" /></bezel> + <bezel name="9.1" element="led"><bounds x="18" y="2" width="1" height="1" /></bezel> + <bezel name="9.2" element="led"><bounds x="18" y="4" width="1" height="1" /></bezel> + <bezel name="9.3" element="led"><bounds x="18" y="6" width="1" height="1" /></bezel> + <bezel name="9.4" element="led"><bounds x="18" y="8" width="1" height="1" /></bezel> + <bezel name="9.5" element="led"><bounds x="18" y="10" width="1" height="1" /></bezel> + <bezel name="9.6" element="led"><bounds x="18" y="12" width="1" height="1" /></bezel> + <bezel name="9.7" element="led"><bounds x="18" y="14" width="1" height="1" /></bezel> + <bezel name="9.8" element="led"><bounds x="18" y="16" width="1" height="1" /></bezel> + <bezel name="9.9" element="led"><bounds x="18" y="18" width="1" height="1" /></bezel> + <bezel name="9.10" element="led"><bounds x="18" y="20" width="1" height="1" /></bezel> + <bezel name="9.11" element="led"><bounds x="18" y="22" width="1" height="1" /></bezel> + <bezel name="9.12" element="led"><bounds x="18" y="24" width="1" height="1" /></bezel> + <bezel name="9.13" element="led"><bounds x="18" y="26" width="1" height="1" /></bezel> + <bezel name="9.14" element="led"><bounds x="18" y="28" width="1" height="1" /></bezel> + <bezel name="9.15" element="led"><bounds x="18" y="30" width="1" height="1" /></bezel> + <bezel name="9.16" element="led"><bounds x="18" y="32" width="1" height="1" /></bezel> + <bezel name="9.17" element="led"><bounds x="18" y="34" width="1" height="1" /></bezel> + <bezel name="9.18" element="led"><bounds x="18" y="36" width="1" height="1" /></bezel> + <bezel name="9.19" element="led"><bounds x="18" y="38" width="1" height="1" /></bezel> + <bezel name="9.20" element="led"><bounds x="18" y="40" width="1" height="1" /></bezel> + <bezel name="9.21" element="led"><bounds x="18" y="42" width="1" height="1" /></bezel> + <bezel name="9.22" element="led"><bounds x="18" y="44" width="1" height="1" /></bezel> + <bezel name="9.23" element="led"><bounds x="18" y="46" width="1" height="1" /></bezel> + <bezel name="9.24" element="led"><bounds x="18" y="48" width="1" height="1" /></bezel> + <bezel name="9.25" element="led"><bounds x="18" y="50" width="1" height="1" /></bezel> + <bezel name="9.26" element="led"><bounds x="18" y="52" width="1" height="1" /></bezel> + <bezel name="9.27" element="led"><bounds x="18" y="54" width="1" height="1" /></bezel> + <bezel name="9.28" element="led"><bounds x="18" y="56" width="1" height="1" /></bezel> + <bezel name="9.29" element="led"><bounds x="18" y="58" width="1" height="1" /></bezel> + <bezel name="9.30" element="led"><bounds x="18" y="60" width="1" height="1" /></bezel> + <bezel name="9.31" element="led"><bounds x="18" y="62" width="1" height="1" /></bezel> + <bezel name="9.32" element="led"><bounds x="18" y="64" width="1" height="1" /></bezel> + <bezel name="9.33" element="led"><bounds x="18" y="66" width="1" height="1" /></bezel> + <bezel name="9.34" element="led"><bounds x="18" y="68" width="1" height="1" /></bezel> + <bezel name="9.35" element="led"><bounds x="18" y="70" width="1" height="1" /></bezel> + <bezel name="9.36" element="led"><bounds x="18" y="72" width="1" height="1" /></bezel> + <bezel name="9.37" element="led"><bounds x="18" y="74" width="1" height="1" /></bezel> + <bezel name="9.38" element="led"><bounds x="18" y="76" width="1" height="1" /></bezel> + <bezel name="9.39" element="led"><bounds x="18" y="78" width="1" height="1" /></bezel> - <bezel name="lamp1000" element="led"><bounds x="20" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1001" element="led"><bounds x="20" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1002" element="led"><bounds x="20" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1003" element="led"><bounds x="20" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1004" element="led"><bounds x="20" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1005" element="led"><bounds x="20" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1006" element="led"><bounds x="20" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1007" element="led"><bounds x="20" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1008" element="led"><bounds x="20" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1009" element="led"><bounds x="20" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1010" element="led"><bounds x="20" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1011" element="led"><bounds x="20" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1012" element="led"><bounds x="20" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1013" element="led"><bounds x="20" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1014" element="led"><bounds x="20" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1015" element="led"><bounds x="20" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1016" element="led"><bounds x="20" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1017" element="led"><bounds x="20" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1018" element="led"><bounds x="20" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1019" element="led"><bounds x="20" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1020" element="led"><bounds x="20" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1021" element="led"><bounds x="20" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1022" element="led"><bounds x="20" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1023" element="led"><bounds x="20" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1024" element="led"><bounds x="20" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1025" element="led"><bounds x="20" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1026" element="led"><bounds x="20" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1027" element="led"><bounds x="20" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1028" element="led"><bounds x="20" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1029" element="led"><bounds x="20" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1030" element="led"><bounds x="20" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1031" element="led"><bounds x="20" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1032" element="led"><bounds x="20" y="64" width="1" height="1" /></bezel> - <bezel name="lamp1033" element="led"><bounds x="20" y="66" width="1" height="1" /></bezel> - <bezel name="lamp1034" element="led"><bounds x="20" y="68" width="1" height="1" /></bezel> - <bezel name="lamp1035" element="led"><bounds x="20" y="70" width="1" height="1" /></bezel> - <bezel name="lamp1036" element="led"><bounds x="20" y="72" width="1" height="1" /></bezel> - <bezel name="lamp1037" element="led"><bounds x="20" y="74" width="1" height="1" /></bezel> - <bezel name="lamp1038" element="led"><bounds x="20" y="76" width="1" height="1" /></bezel> - <bezel name="lamp1039" element="led"><bounds x="20" y="78" width="1" height="1" /></bezel> + <bezel name="10.0" element="led"><bounds x="20" y="0" width="1" height="1" /></bezel> + <bezel name="10.1" element="led"><bounds x="20" y="2" width="1" height="1" /></bezel> + <bezel name="10.2" element="led"><bounds x="20" y="4" width="1" height="1" /></bezel> + <bezel name="10.3" element="led"><bounds x="20" y="6" width="1" height="1" /></bezel> + <bezel name="10.4" element="led"><bounds x="20" y="8" width="1" height="1" /></bezel> + <bezel name="10.5" element="led"><bounds x="20" y="10" width="1" height="1" /></bezel> + <bezel name="10.6" element="led"><bounds x="20" y="12" width="1" height="1" /></bezel> + <bezel name="10.7" element="led"><bounds x="20" y="14" width="1" height="1" /></bezel> + <bezel name="10.8" element="led"><bounds x="20" y="16" width="1" height="1" /></bezel> + <bezel name="10.9" element="led"><bounds x="20" y="18" width="1" height="1" /></bezel> + <bezel name="10.10" element="led"><bounds x="20" y="20" width="1" height="1" /></bezel> + <bezel name="10.11" element="led"><bounds x="20" y="22" width="1" height="1" /></bezel> + <bezel name="10.12" element="led"><bounds x="20" y="24" width="1" height="1" /></bezel> + <bezel name="10.13" element="led"><bounds x="20" y="26" width="1" height="1" /></bezel> + <bezel name="10.14" element="led"><bounds x="20" y="28" width="1" height="1" /></bezel> + <bezel name="10.15" element="led"><bounds x="20" y="30" width="1" height="1" /></bezel> + <bezel name="10.16" element="led"><bounds x="20" y="32" width="1" height="1" /></bezel> + <bezel name="10.17" element="led"><bounds x="20" y="34" width="1" height="1" /></bezel> + <bezel name="10.18" element="led"><bounds x="20" y="36" width="1" height="1" /></bezel> + <bezel name="10.19" element="led"><bounds x="20" y="38" width="1" height="1" /></bezel> + <bezel name="10.20" element="led"><bounds x="20" y="40" width="1" height="1" /></bezel> + <bezel name="10.21" element="led"><bounds x="20" y="42" width="1" height="1" /></bezel> + <bezel name="10.22" element="led"><bounds x="20" y="44" width="1" height="1" /></bezel> + <bezel name="10.23" element="led"><bounds x="20" y="46" width="1" height="1" /></bezel> + <bezel name="10.24" element="led"><bounds x="20" y="48" width="1" height="1" /></bezel> + <bezel name="10.25" element="led"><bounds x="20" y="50" width="1" height="1" /></bezel> + <bezel name="10.26" element="led"><bounds x="20" y="52" width="1" height="1" /></bezel> + <bezel name="10.27" element="led"><bounds x="20" y="54" width="1" height="1" /></bezel> + <bezel name="10.28" element="led"><bounds x="20" y="56" width="1" height="1" /></bezel> + <bezel name="10.29" element="led"><bounds x="20" y="58" width="1" height="1" /></bezel> + <bezel name="10.30" element="led"><bounds x="20" y="60" width="1" height="1" /></bezel> + <bezel name="10.31" element="led"><bounds x="20" y="62" width="1" height="1" /></bezel> + <bezel name="10.32" element="led"><bounds x="20" y="64" width="1" height="1" /></bezel> + <bezel name="10.33" element="led"><bounds x="20" y="66" width="1" height="1" /></bezel> + <bezel name="10.34" element="led"><bounds x="20" y="68" width="1" height="1" /></bezel> + <bezel name="10.35" element="led"><bounds x="20" y="70" width="1" height="1" /></bezel> + <bezel name="10.36" element="led"><bounds x="20" y="72" width="1" height="1" /></bezel> + <bezel name="10.37" element="led"><bounds x="20" y="74" width="1" height="1" /></bezel> + <bezel name="10.38" element="led"><bounds x="20" y="76" width="1" height="1" /></bezel> + <bezel name="10.39" element="led"><bounds x="20" y="78" width="1" height="1" /></bezel> - <bezel name="lamp1100" element="led"><bounds x="22" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1101" element="led"><bounds x="22" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1102" element="led"><bounds x="22" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1103" element="led"><bounds x="22" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1104" element="led"><bounds x="22" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1105" element="led"><bounds x="22" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1106" element="led"><bounds x="22" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1107" element="led"><bounds x="22" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1108" element="led"><bounds x="22" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1109" element="led"><bounds x="22" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1110" element="led"><bounds x="22" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1111" element="led"><bounds x="22" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1112" element="led"><bounds x="22" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1113" element="led"><bounds x="22" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1114" element="led"><bounds x="22" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1115" element="led"><bounds x="22" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1116" element="led"><bounds x="22" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1117" element="led"><bounds x="22" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1118" element="led"><bounds x="22" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1119" element="led"><bounds x="22" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1120" element="led"><bounds x="22" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1121" element="led"><bounds x="22" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1122" element="led"><bounds x="22" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1123" element="led"><bounds x="22" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1124" element="led"><bounds x="22" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1125" element="led"><bounds x="22" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1126" element="led"><bounds x="22" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1127" element="led"><bounds x="22" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1128" element="led"><bounds x="22" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1129" element="led"><bounds x="22" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1130" element="led"><bounds x="22" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1131" element="led"><bounds x="22" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1132" element="led"><bounds x="22" y="64" width="1" height="1" /></bezel> - <bezel name="lamp1133" element="led"><bounds x="22" y="66" width="1" height="1" /></bezel> - <bezel name="lamp1134" element="led"><bounds x="22" y="68" width="1" height="1" /></bezel> - <bezel name="lamp1135" element="led"><bounds x="22" y="70" width="1" height="1" /></bezel> - <bezel name="lamp1136" element="led"><bounds x="22" y="72" width="1" height="1" /></bezel> - <bezel name="lamp1137" element="led"><bounds x="22" y="74" width="1" height="1" /></bezel> - <bezel name="lamp1138" element="led"><bounds x="22" y="76" width="1" height="1" /></bezel> - <bezel name="lamp1139" element="led"><bounds x="22" y="78" width="1" height="1" /></bezel> + <bezel name="11.0" element="led"><bounds x="22" y="0" width="1" height="1" /></bezel> + <bezel name="11.1" element="led"><bounds x="22" y="2" width="1" height="1" /></bezel> + <bezel name="11.2" element="led"><bounds x="22" y="4" width="1" height="1" /></bezel> + <bezel name="11.3" element="led"><bounds x="22" y="6" width="1" height="1" /></bezel> + <bezel name="11.4" element="led"><bounds x="22" y="8" width="1" height="1" /></bezel> + <bezel name="11.5" element="led"><bounds x="22" y="10" width="1" height="1" /></bezel> + <bezel name="11.6" element="led"><bounds x="22" y="12" width="1" height="1" /></bezel> + <bezel name="11.7" element="led"><bounds x="22" y="14" width="1" height="1" /></bezel> + <bezel name="11.8" element="led"><bounds x="22" y="16" width="1" height="1" /></bezel> + <bezel name="11.9" element="led"><bounds x="22" y="18" width="1" height="1" /></bezel> + <bezel name="11.10" element="led"><bounds x="22" y="20" width="1" height="1" /></bezel> + <bezel name="11.11" element="led"><bounds x="22" y="22" width="1" height="1" /></bezel> + <bezel name="11.12" element="led"><bounds x="22" y="24" width="1" height="1" /></bezel> + <bezel name="11.13" element="led"><bounds x="22" y="26" width="1" height="1" /></bezel> + <bezel name="11.14" element="led"><bounds x="22" y="28" width="1" height="1" /></bezel> + <bezel name="11.15" element="led"><bounds x="22" y="30" width="1" height="1" /></bezel> + <bezel name="11.16" element="led"><bounds x="22" y="32" width="1" height="1" /></bezel> + <bezel name="11.17" element="led"><bounds x="22" y="34" width="1" height="1" /></bezel> + <bezel name="11.18" element="led"><bounds x="22" y="36" width="1" height="1" /></bezel> + <bezel name="11.19" element="led"><bounds x="22" y="38" width="1" height="1" /></bezel> + <bezel name="11.20" element="led"><bounds x="22" y="40" width="1" height="1" /></bezel> + <bezel name="11.21" element="led"><bounds x="22" y="42" width="1" height="1" /></bezel> + <bezel name="11.22" element="led"><bounds x="22" y="44" width="1" height="1" /></bezel> + <bezel name="11.23" element="led"><bounds x="22" y="46" width="1" height="1" /></bezel> + <bezel name="11.24" element="led"><bounds x="22" y="48" width="1" height="1" /></bezel> + <bezel name="11.25" element="led"><bounds x="22" y="50" width="1" height="1" /></bezel> + <bezel name="11.26" element="led"><bounds x="22" y="52" width="1" height="1" /></bezel> + <bezel name="11.27" element="led"><bounds x="22" y="54" width="1" height="1" /></bezel> + <bezel name="11.28" element="led"><bounds x="22" y="56" width="1" height="1" /></bezel> + <bezel name="11.29" element="led"><bounds x="22" y="58" width="1" height="1" /></bezel> + <bezel name="11.30" element="led"><bounds x="22" y="60" width="1" height="1" /></bezel> + <bezel name="11.31" element="led"><bounds x="22" y="62" width="1" height="1" /></bezel> + <bezel name="11.32" element="led"><bounds x="22" y="64" width="1" height="1" /></bezel> + <bezel name="11.33" element="led"><bounds x="22" y="66" width="1" height="1" /></bezel> + <bezel name="11.34" element="led"><bounds x="22" y="68" width="1" height="1" /></bezel> + <bezel name="11.35" element="led"><bounds x="22" y="70" width="1" height="1" /></bezel> + <bezel name="11.36" element="led"><bounds x="22" y="72" width="1" height="1" /></bezel> + <bezel name="11.37" element="led"><bounds x="22" y="74" width="1" height="1" /></bezel> + <bezel name="11.38" element="led"><bounds x="22" y="76" width="1" height="1" /></bezel> + <bezel name="11.39" element="led"><bounds x="22" y="78" width="1" height="1" /></bezel> - <bezel name="lamp1200" element="led"><bounds x="24" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1201" element="led"><bounds x="24" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1202" element="led"><bounds x="24" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1203" element="led"><bounds x="24" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1204" element="led"><bounds x="24" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1205" element="led"><bounds x="24" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1206" element="led"><bounds x="24" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1207" element="led"><bounds x="24" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1208" element="led"><bounds x="24" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1209" element="led"><bounds x="24" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1210" element="led"><bounds x="24" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1211" element="led"><bounds x="24" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1212" element="led"><bounds x="24" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1213" element="led"><bounds x="24" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1214" element="led"><bounds x="24" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1215" element="led"><bounds x="24" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1216" element="led"><bounds x="24" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1217" element="led"><bounds x="24" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1218" element="led"><bounds x="24" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1219" element="led"><bounds x="24" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1220" element="led"><bounds x="24" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1221" element="led"><bounds x="24" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1222" element="led"><bounds x="24" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1223" element="led"><bounds x="24" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1224" element="led"><bounds x="24" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1225" element="led"><bounds x="24" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1226" element="led"><bounds x="24" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1227" element="led"><bounds x="24" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1228" element="led"><bounds x="24" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1229" element="led"><bounds x="24" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1230" element="led"><bounds x="24" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1231" element="led"><bounds x="24" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1232" element="led"><bounds x="24" y="64" width="1" height="1" /></bezel> - <bezel name="lamp1233" element="led"><bounds x="24" y="66" width="1" height="1" /></bezel> - <bezel name="lamp1234" element="led"><bounds x="24" y="68" width="1" height="1" /></bezel> - <bezel name="lamp1235" element="led"><bounds x="24" y="70" width="1" height="1" /></bezel> - <bezel name="lamp1236" element="led"><bounds x="24" y="72" width="1" height="1" /></bezel> - <bezel name="lamp1237" element="led"><bounds x="24" y="74" width="1" height="1" /></bezel> - <bezel name="lamp1238" element="led"><bounds x="24" y="76" width="1" height="1" /></bezel> - <bezel name="lamp1239" element="led"><bounds x="24" y="78" width="1" height="1" /></bezel> + <bezel name="12.0" element="led"><bounds x="24" y="0" width="1" height="1" /></bezel> + <bezel name="12.1" element="led"><bounds x="24" y="2" width="1" height="1" /></bezel> + <bezel name="12.2" element="led"><bounds x="24" y="4" width="1" height="1" /></bezel> + <bezel name="12.3" element="led"><bounds x="24" y="6" width="1" height="1" /></bezel> + <bezel name="12.4" element="led"><bounds x="24" y="8" width="1" height="1" /></bezel> + <bezel name="12.5" element="led"><bounds x="24" y="10" width="1" height="1" /></bezel> + <bezel name="12.6" element="led"><bounds x="24" y="12" width="1" height="1" /></bezel> + <bezel name="12.7" element="led"><bounds x="24" y="14" width="1" height="1" /></bezel> + <bezel name="12.8" element="led"><bounds x="24" y="16" width="1" height="1" /></bezel> + <bezel name="12.9" element="led"><bounds x="24" y="18" width="1" height="1" /></bezel> + <bezel name="12.10" element="led"><bounds x="24" y="20" width="1" height="1" /></bezel> + <bezel name="12.11" element="led"><bounds x="24" y="22" width="1" height="1" /></bezel> + <bezel name="12.12" element="led"><bounds x="24" y="24" width="1" height="1" /></bezel> + <bezel name="12.13" element="led"><bounds x="24" y="26" width="1" height="1" /></bezel> + <bezel name="12.14" element="led"><bounds x="24" y="28" width="1" height="1" /></bezel> + <bezel name="12.15" element="led"><bounds x="24" y="30" width="1" height="1" /></bezel> + <bezel name="12.16" element="led"><bounds x="24" y="32" width="1" height="1" /></bezel> + <bezel name="12.17" element="led"><bounds x="24" y="34" width="1" height="1" /></bezel> + <bezel name="12.18" element="led"><bounds x="24" y="36" width="1" height="1" /></bezel> + <bezel name="12.19" element="led"><bounds x="24" y="38" width="1" height="1" /></bezel> + <bezel name="12.20" element="led"><bounds x="24" y="40" width="1" height="1" /></bezel> + <bezel name="12.21" element="led"><bounds x="24" y="42" width="1" height="1" /></bezel> + <bezel name="12.22" element="led"><bounds x="24" y="44" width="1" height="1" /></bezel> + <bezel name="12.23" element="led"><bounds x="24" y="46" width="1" height="1" /></bezel> + <bezel name="12.24" element="led"><bounds x="24" y="48" width="1" height="1" /></bezel> + <bezel name="12.25" element="led"><bounds x="24" y="50" width="1" height="1" /></bezel> + <bezel name="12.26" element="led"><bounds x="24" y="52" width="1" height="1" /></bezel> + <bezel name="12.27" element="led"><bounds x="24" y="54" width="1" height="1" /></bezel> + <bezel name="12.28" element="led"><bounds x="24" y="56" width="1" height="1" /></bezel> + <bezel name="12.29" element="led"><bounds x="24" y="58" width="1" height="1" /></bezel> + <bezel name="12.30" element="led"><bounds x="24" y="60" width="1" height="1" /></bezel> + <bezel name="12.31" element="led"><bounds x="24" y="62" width="1" height="1" /></bezel> + <bezel name="12.32" element="led"><bounds x="24" y="64" width="1" height="1" /></bezel> + <bezel name="12.33" element="led"><bounds x="24" y="66" width="1" height="1" /></bezel> + <bezel name="12.34" element="led"><bounds x="24" y="68" width="1" height="1" /></bezel> + <bezel name="12.35" element="led"><bounds x="24" y="70" width="1" height="1" /></bezel> + <bezel name="12.36" element="led"><bounds x="24" y="72" width="1" height="1" /></bezel> + <bezel name="12.37" element="led"><bounds x="24" y="74" width="1" height="1" /></bezel> + <bezel name="12.38" element="led"><bounds x="24" y="76" width="1" height="1" /></bezel> + <bezel name="12.39" element="led"><bounds x="24" y="78" width="1" height="1" /></bezel> - <bezel name="lamp1300" element="led"><bounds x="26" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1301" element="led"><bounds x="26" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1302" element="led"><bounds x="26" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1303" element="led"><bounds x="26" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1304" element="led"><bounds x="26" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1305" element="led"><bounds x="26" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1306" element="led"><bounds x="26" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1307" element="led"><bounds x="26" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1308" element="led"><bounds x="26" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1309" element="led"><bounds x="26" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1310" element="led"><bounds x="26" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1311" element="led"><bounds x="26" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1312" element="led"><bounds x="26" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1313" element="led"><bounds x="26" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1314" element="led"><bounds x="26" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1315" element="led"><bounds x="26" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1316" element="led"><bounds x="26" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1317" element="led"><bounds x="26" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1318" element="led"><bounds x="26" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1319" element="led"><bounds x="26" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1320" element="led"><bounds x="26" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1321" element="led"><bounds x="26" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1322" element="led"><bounds x="26" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1323" element="led"><bounds x="26" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1324" element="led"><bounds x="26" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1325" element="led"><bounds x="26" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1326" element="led"><bounds x="26" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1327" element="led"><bounds x="26" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1328" element="led"><bounds x="26" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1329" element="led"><bounds x="26" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1330" element="led"><bounds x="26" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1331" element="led"><bounds x="26" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1332" element="led"><bounds x="26" y="64" width="1" height="1" /></bezel> - <bezel name="lamp1333" element="led"><bounds x="26" y="66" width="1" height="1" /></bezel> - <bezel name="lamp1334" element="led"><bounds x="26" y="68" width="1" height="1" /></bezel> - <bezel name="lamp1335" element="led"><bounds x="26" y="70" width="1" height="1" /></bezel> - <bezel name="lamp1336" element="led"><bounds x="26" y="72" width="1" height="1" /></bezel> - <bezel name="lamp1337" element="led"><bounds x="26" y="74" width="1" height="1" /></bezel> - <bezel name="lamp1338" element="led"><bounds x="26" y="76" width="1" height="1" /></bezel> - <bezel name="lamp1339" element="led"><bounds x="26" y="78" width="1" height="1" /></bezel> + <bezel name="13.0" element="led"><bounds x="26" y="0" width="1" height="1" /></bezel> + <bezel name="13.1" element="led"><bounds x="26" y="2" width="1" height="1" /></bezel> + <bezel name="13.2" element="led"><bounds x="26" y="4" width="1" height="1" /></bezel> + <bezel name="13.3" element="led"><bounds x="26" y="6" width="1" height="1" /></bezel> + <bezel name="13.4" element="led"><bounds x="26" y="8" width="1" height="1" /></bezel> + <bezel name="13.5" element="led"><bounds x="26" y="10" width="1" height="1" /></bezel> + <bezel name="13.6" element="led"><bounds x="26" y="12" width="1" height="1" /></bezel> + <bezel name="13.7" element="led"><bounds x="26" y="14" width="1" height="1" /></bezel> + <bezel name="13.8" element="led"><bounds x="26" y="16" width="1" height="1" /></bezel> + <bezel name="13.9" element="led"><bounds x="26" y="18" width="1" height="1" /></bezel> + <bezel name="13.10" element="led"><bounds x="26" y="20" width="1" height="1" /></bezel> + <bezel name="13.11" element="led"><bounds x="26" y="22" width="1" height="1" /></bezel> + <bezel name="13.12" element="led"><bounds x="26" y="24" width="1" height="1" /></bezel> + <bezel name="13.13" element="led"><bounds x="26" y="26" width="1" height="1" /></bezel> + <bezel name="13.14" element="led"><bounds x="26" y="28" width="1" height="1" /></bezel> + <bezel name="13.15" element="led"><bounds x="26" y="30" width="1" height="1" /></bezel> + <bezel name="13.16" element="led"><bounds x="26" y="32" width="1" height="1" /></bezel> + <bezel name="13.17" element="led"><bounds x="26" y="34" width="1" height="1" /></bezel> + <bezel name="13.18" element="led"><bounds x="26" y="36" width="1" height="1" /></bezel> + <bezel name="13.19" element="led"><bounds x="26" y="38" width="1" height="1" /></bezel> + <bezel name="13.20" element="led"><bounds x="26" y="40" width="1" height="1" /></bezel> + <bezel name="13.21" element="led"><bounds x="26" y="42" width="1" height="1" /></bezel> + <bezel name="13.22" element="led"><bounds x="26" y="44" width="1" height="1" /></bezel> + <bezel name="13.23" element="led"><bounds x="26" y="46" width="1" height="1" /></bezel> + <bezel name="13.24" element="led"><bounds x="26" y="48" width="1" height="1" /></bezel> + <bezel name="13.25" element="led"><bounds x="26" y="50" width="1" height="1" /></bezel> + <bezel name="13.26" element="led"><bounds x="26" y="52" width="1" height="1" /></bezel> + <bezel name="13.27" element="led"><bounds x="26" y="54" width="1" height="1" /></bezel> + <bezel name="13.28" element="led"><bounds x="26" y="56" width="1" height="1" /></bezel> + <bezel name="13.29" element="led"><bounds x="26" y="58" width="1" height="1" /></bezel> + <bezel name="13.30" element="led"><bounds x="26" y="60" width="1" height="1" /></bezel> + <bezel name="13.31" element="led"><bounds x="26" y="62" width="1" height="1" /></bezel> + <bezel name="13.32" element="led"><bounds x="26" y="64" width="1" height="1" /></bezel> + <bezel name="13.33" element="led"><bounds x="26" y="66" width="1" height="1" /></bezel> + <bezel name="13.34" element="led"><bounds x="26" y="68" width="1" height="1" /></bezel> + <bezel name="13.35" element="led"><bounds x="26" y="70" width="1" height="1" /></bezel> + <bezel name="13.36" element="led"><bounds x="26" y="72" width="1" height="1" /></bezel> + <bezel name="13.37" element="led"><bounds x="26" y="74" width="1" height="1" /></bezel> + <bezel name="13.38" element="led"><bounds x="26" y="76" width="1" height="1" /></bezel> + <bezel name="13.39" element="led"><bounds x="26" y="78" width="1" height="1" /></bezel> - <bezel name="lamp1400" element="led"><bounds x="28" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1401" element="led"><bounds x="28" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1402" element="led"><bounds x="28" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1403" element="led"><bounds x="28" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1404" element="led"><bounds x="28" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1405" element="led"><bounds x="28" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1406" element="led"><bounds x="28" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1407" element="led"><bounds x="28" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1408" element="led"><bounds x="28" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1409" element="led"><bounds x="28" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1410" element="led"><bounds x="28" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1411" element="led"><bounds x="28" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1412" element="led"><bounds x="28" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1413" element="led"><bounds x="28" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1414" element="led"><bounds x="28" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1415" element="led"><bounds x="28" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1416" element="led"><bounds x="28" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1417" element="led"><bounds x="28" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1418" element="led"><bounds x="28" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1419" element="led"><bounds x="28" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1420" element="led"><bounds x="28" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1421" element="led"><bounds x="28" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1422" element="led"><bounds x="28" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1423" element="led"><bounds x="28" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1424" element="led"><bounds x="28" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1425" element="led"><bounds x="28" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1426" element="led"><bounds x="28" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1427" element="led"><bounds x="28" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1428" element="led"><bounds x="28" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1429" element="led"><bounds x="28" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1430" element="led"><bounds x="28" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1431" element="led"><bounds x="28" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1432" element="led"><bounds x="28" y="64" width="1" height="1" /></bezel> - <bezel name="lamp1433" element="led"><bounds x="28" y="66" width="1" height="1" /></bezel> - <bezel name="lamp1434" element="led"><bounds x="28" y="68" width="1" height="1" /></bezel> - <bezel name="lamp1435" element="led"><bounds x="28" y="70" width="1" height="1" /></bezel> - <bezel name="lamp1436" element="led"><bounds x="28" y="72" width="1" height="1" /></bezel> - <bezel name="lamp1437" element="led"><bounds x="28" y="74" width="1" height="1" /></bezel> - <bezel name="lamp1438" element="led"><bounds x="28" y="76" width="1" height="1" /></bezel> - <bezel name="lamp1439" element="led"><bounds x="28" y="78" width="1" height="1" /></bezel> + <bezel name="14.0" element="led"><bounds x="28" y="0" width="1" height="1" /></bezel> + <bezel name="14.1" element="led"><bounds x="28" y="2" width="1" height="1" /></bezel> + <bezel name="14.2" element="led"><bounds x="28" y="4" width="1" height="1" /></bezel> + <bezel name="14.3" element="led"><bounds x="28" y="6" width="1" height="1" /></bezel> + <bezel name="14.4" element="led"><bounds x="28" y="8" width="1" height="1" /></bezel> + <bezel name="14.5" element="led"><bounds x="28" y="10" width="1" height="1" /></bezel> + <bezel name="14.6" element="led"><bounds x="28" y="12" width="1" height="1" /></bezel> + <bezel name="14.7" element="led"><bounds x="28" y="14" width="1" height="1" /></bezel> + <bezel name="14.8" element="led"><bounds x="28" y="16" width="1" height="1" /></bezel> + <bezel name="14.9" element="led"><bounds x="28" y="18" width="1" height="1" /></bezel> + <bezel name="14.10" element="led"><bounds x="28" y="20" width="1" height="1" /></bezel> + <bezel name="14.11" element="led"><bounds x="28" y="22" width="1" height="1" /></bezel> + <bezel name="14.12" element="led"><bounds x="28" y="24" width="1" height="1" /></bezel> + <bezel name="14.13" element="led"><bounds x="28" y="26" width="1" height="1" /></bezel> + <bezel name="14.14" element="led"><bounds x="28" y="28" width="1" height="1" /></bezel> + <bezel name="14.15" element="led"><bounds x="28" y="30" width="1" height="1" /></bezel> + <bezel name="14.16" element="led"><bounds x="28" y="32" width="1" height="1" /></bezel> + <bezel name="14.17" element="led"><bounds x="28" y="34" width="1" height="1" /></bezel> + <bezel name="14.18" element="led"><bounds x="28" y="36" width="1" height="1" /></bezel> + <bezel name="14.19" element="led"><bounds x="28" y="38" width="1" height="1" /></bezel> + <bezel name="14.20" element="led"><bounds x="28" y="40" width="1" height="1" /></bezel> + <bezel name="14.21" element="led"><bounds x="28" y="42" width="1" height="1" /></bezel> + <bezel name="14.22" element="led"><bounds x="28" y="44" width="1" height="1" /></bezel> + <bezel name="14.23" element="led"><bounds x="28" y="46" width="1" height="1" /></bezel> + <bezel name="14.24" element="led"><bounds x="28" y="48" width="1" height="1" /></bezel> + <bezel name="14.25" element="led"><bounds x="28" y="50" width="1" height="1" /></bezel> + <bezel name="14.26" element="led"><bounds x="28" y="52" width="1" height="1" /></bezel> + <bezel name="14.27" element="led"><bounds x="28" y="54" width="1" height="1" /></bezel> + <bezel name="14.28" element="led"><bounds x="28" y="56" width="1" height="1" /></bezel> + <bezel name="14.29" element="led"><bounds x="28" y="58" width="1" height="1" /></bezel> + <bezel name="14.30" element="led"><bounds x="28" y="60" width="1" height="1" /></bezel> + <bezel name="14.31" element="led"><bounds x="28" y="62" width="1" height="1" /></bezel> + <bezel name="14.32" element="led"><bounds x="28" y="64" width="1" height="1" /></bezel> + <bezel name="14.33" element="led"><bounds x="28" y="66" width="1" height="1" /></bezel> + <bezel name="14.34" element="led"><bounds x="28" y="68" width="1" height="1" /></bezel> + <bezel name="14.35" element="led"><bounds x="28" y="70" width="1" height="1" /></bezel> + <bezel name="14.36" element="led"><bounds x="28" y="72" width="1" height="1" /></bezel> + <bezel name="14.37" element="led"><bounds x="28" y="74" width="1" height="1" /></bezel> + <bezel name="14.38" element="led"><bounds x="28" y="76" width="1" height="1" /></bezel> + <bezel name="14.39" element="led"><bounds x="28" y="78" width="1" height="1" /></bezel> - <bezel name="lamp1500" element="led"><bounds x="30" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1501" element="led"><bounds x="30" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1502" element="led"><bounds x="30" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1503" element="led"><bounds x="30" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1504" element="led"><bounds x="30" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1505" element="led"><bounds x="30" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1506" element="led"><bounds x="30" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1507" element="led"><bounds x="30" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1508" element="led"><bounds x="30" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1509" element="led"><bounds x="30" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1510" element="led"><bounds x="30" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1511" element="led"><bounds x="30" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1512" element="led"><bounds x="30" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1513" element="led"><bounds x="30" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1514" element="led"><bounds x="30" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1515" element="led"><bounds x="30" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1516" element="led"><bounds x="30" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1517" element="led"><bounds x="30" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1518" element="led"><bounds x="30" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1519" element="led"><bounds x="30" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1520" element="led"><bounds x="30" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1521" element="led"><bounds x="30" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1522" element="led"><bounds x="30" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1523" element="led"><bounds x="30" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1524" element="led"><bounds x="30" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1525" element="led"><bounds x="30" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1526" element="led"><bounds x="30" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1527" element="led"><bounds x="30" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1528" element="led"><bounds x="30" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1529" element="led"><bounds x="30" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1530" element="led"><bounds x="30" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1531" element="led"><bounds x="30" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1532" element="led"><bounds x="30" y="64" width="1" height="1" /></bezel> - <bezel name="lamp1533" element="led"><bounds x="30" y="66" width="1" height="1" /></bezel> - <bezel name="lamp1534" element="led"><bounds x="30" y="68" width="1" height="1" /></bezel> - <bezel name="lamp1535" element="led"><bounds x="30" y="70" width="1" height="1" /></bezel> - <bezel name="lamp1536" element="led"><bounds x="30" y="72" width="1" height="1" /></bezel> - <bezel name="lamp1537" element="led"><bounds x="30" y="74" width="1" height="1" /></bezel> - <bezel name="lamp1538" element="led"><bounds x="30" y="76" width="1" height="1" /></bezel> - <bezel name="lamp1539" element="led"><bounds x="30" y="78" width="1" height="1" /></bezel> + <bezel name="15.0" element="led"><bounds x="30" y="0" width="1" height="1" /></bezel> + <bezel name="15.1" element="led"><bounds x="30" y="2" width="1" height="1" /></bezel> + <bezel name="15.2" element="led"><bounds x="30" y="4" width="1" height="1" /></bezel> + <bezel name="15.3" element="led"><bounds x="30" y="6" width="1" height="1" /></bezel> + <bezel name="15.4" element="led"><bounds x="30" y="8" width="1" height="1" /></bezel> + <bezel name="15.5" element="led"><bounds x="30" y="10" width="1" height="1" /></bezel> + <bezel name="15.6" element="led"><bounds x="30" y="12" width="1" height="1" /></bezel> + <bezel name="15.7" element="led"><bounds x="30" y="14" width="1" height="1" /></bezel> + <bezel name="15.8" element="led"><bounds x="30" y="16" width="1" height="1" /></bezel> + <bezel name="15.9" element="led"><bounds x="30" y="18" width="1" height="1" /></bezel> + <bezel name="15.10" element="led"><bounds x="30" y="20" width="1" height="1" /></bezel> + <bezel name="15.11" element="led"><bounds x="30" y="22" width="1" height="1" /></bezel> + <bezel name="15.12" element="led"><bounds x="30" y="24" width="1" height="1" /></bezel> + <bezel name="15.13" element="led"><bounds x="30" y="26" width="1" height="1" /></bezel> + <bezel name="15.14" element="led"><bounds x="30" y="28" width="1" height="1" /></bezel> + <bezel name="15.15" element="led"><bounds x="30" y="30" width="1" height="1" /></bezel> + <bezel name="15.16" element="led"><bounds x="30" y="32" width="1" height="1" /></bezel> + <bezel name="15.17" element="led"><bounds x="30" y="34" width="1" height="1" /></bezel> + <bezel name="15.18" element="led"><bounds x="30" y="36" width="1" height="1" /></bezel> + <bezel name="15.19" element="led"><bounds x="30" y="38" width="1" height="1" /></bezel> + <bezel name="15.20" element="led"><bounds x="30" y="40" width="1" height="1" /></bezel> + <bezel name="15.21" element="led"><bounds x="30" y="42" width="1" height="1" /></bezel> + <bezel name="15.22" element="led"><bounds x="30" y="44" width="1" height="1" /></bezel> + <bezel name="15.23" element="led"><bounds x="30" y="46" width="1" height="1" /></bezel> + <bezel name="15.24" element="led"><bounds x="30" y="48" width="1" height="1" /></bezel> + <bezel name="15.25" element="led"><bounds x="30" y="50" width="1" height="1" /></bezel> + <bezel name="15.26" element="led"><bounds x="30" y="52" width="1" height="1" /></bezel> + <bezel name="15.27" element="led"><bounds x="30" y="54" width="1" height="1" /></bezel> + <bezel name="15.28" element="led"><bounds x="30" y="56" width="1" height="1" /></bezel> + <bezel name="15.29" element="led"><bounds x="30" y="58" width="1" height="1" /></bezel> + <bezel name="15.30" element="led"><bounds x="30" y="60" width="1" height="1" /></bezel> + <bezel name="15.31" element="led"><bounds x="30" y="62" width="1" height="1" /></bezel> + <bezel name="15.32" element="led"><bounds x="30" y="64" width="1" height="1" /></bezel> + <bezel name="15.33" element="led"><bounds x="30" y="66" width="1" height="1" /></bezel> + <bezel name="15.34" element="led"><bounds x="30" y="68" width="1" height="1" /></bezel> + <bezel name="15.35" element="led"><bounds x="30" y="70" width="1" height="1" /></bezel> + <bezel name="15.36" element="led"><bounds x="30" y="72" width="1" height="1" /></bezel> + <bezel name="15.37" element="led"><bounds x="30" y="74" width="1" height="1" /></bezel> + <bezel name="15.38" element="led"><bounds x="30" y="76" width="1" height="1" /></bezel> + <bezel name="15.39" element="led"><bounds x="30" y="78" width="1" height="1" /></bezel> </view> diff --git a/src/mess/layout/hh_tms1k_test.lay b/src/mess/layout/hh_tms1k_test.lay new file mode 100644 index 00000000000..691c91e1aa1 --- /dev/null +++ b/src/mess/layout/hh_tms1k_test.lay @@ -0,0 +1,556 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="led" defstate="2"> + <disk state="0"><color red="0.2" green="0.04" blue="0.05" /></disk> + <disk state="1"><color red="1.0" green="0.2" blue="0.23" /></disk> + + <disk state="2"><color red="0" green="0" blue="0" /></disk> + </element> + + +<!-- build screen --> + + <view name="Test Layout"> + <bounds left="0" right="64" top="0" bottom="64" /> + <bezel element="static_black"> + <bounds left="0" right="64" top="0" bottom="64" /> + </bezel> + + <!-- max 16*32 matrix --> + + <bezel name="0.0" element="led"><bounds x="0" y="0" width="1" height="1" /></bezel> + <bezel name="0.1" element="led"><bounds x="0" y="2" width="1" height="1" /></bezel> + <bezel name="0.2" element="led"><bounds x="0" y="4" width="1" height="1" /></bezel> + <bezel name="0.3" element="led"><bounds x="0" y="6" width="1" height="1" /></bezel> + <bezel name="0.4" element="led"><bounds x="0" y="8" width="1" height="1" /></bezel> + <bezel name="0.5" element="led"><bounds x="0" y="10" width="1" height="1" /></bezel> + <bezel name="0.6" element="led"><bounds x="0" y="12" width="1" height="1" /></bezel> + <bezel name="0.7" element="led"><bounds x="0" y="14" width="1" height="1" /></bezel> + <bezel name="0.8" element="led"><bounds x="0" y="16" width="1" height="1" /></bezel> + <bezel name="0.9" element="led"><bounds x="0" y="18" width="1" height="1" /></bezel> + <bezel name="0.10" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel> + <bezel name="0.11" element="led"><bounds x="0" y="22" width="1" height="1" /></bezel> + <bezel name="0.12" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel> + <bezel name="0.13" element="led"><bounds x="0" y="26" width="1" height="1" /></bezel> + <bezel name="0.14" element="led"><bounds x="0" y="28" width="1" height="1" /></bezel> + <bezel name="0.15" element="led"><bounds x="0" y="30" width="1" height="1" /></bezel> + <bezel name="0.16" element="led"><bounds x="0" y="32" width="1" height="1" /></bezel> + <bezel name="0.17" element="led"><bounds x="0" y="34" width="1" height="1" /></bezel> + <bezel name="0.18" element="led"><bounds x="0" y="36" width="1" height="1" /></bezel> + <bezel name="0.19" element="led"><bounds x="0" y="38" width="1" height="1" /></bezel> + <bezel name="0.20" element="led"><bounds x="0" y="40" width="1" height="1" /></bezel> + <bezel name="0.21" element="led"><bounds x="0" y="42" width="1" height="1" /></bezel> + <bezel name="0.22" element="led"><bounds x="0" y="44" width="1" height="1" /></bezel> + <bezel name="0.23" element="led"><bounds x="0" y="46" width="1" height="1" /></bezel> + <bezel name="0.24" element="led"><bounds x="0" y="48" width="1" height="1" /></bezel> + <bezel name="0.25" element="led"><bounds x="0" y="50" width="1" height="1" /></bezel> + <bezel name="0.26" element="led"><bounds x="0" y="52" width="1" height="1" /></bezel> + <bezel name="0.27" element="led"><bounds x="0" y="54" width="1" height="1" /></bezel> + <bezel name="0.28" element="led"><bounds x="0" y="56" width="1" height="1" /></bezel> + <bezel name="0.29" element="led"><bounds x="0" y="58" width="1" height="1" /></bezel> + <bezel name="0.30" element="led"><bounds x="0" y="60" width="1" height="1" /></bezel> + <bezel name="0.31" element="led"><bounds x="0" y="62" width="1" height="1" /></bezel> + + <bezel name="1.0" element="led"><bounds x="2" y="0" width="1" height="1" /></bezel> + <bezel name="1.1" element="led"><bounds x="2" y="2" width="1" height="1" /></bezel> + <bezel name="1.2" element="led"><bounds x="2" y="4" width="1" height="1" /></bezel> + <bezel name="1.3" element="led"><bounds x="2" y="6" width="1" height="1" /></bezel> + <bezel name="1.4" element="led"><bounds x="2" y="8" width="1" height="1" /></bezel> + <bezel name="1.5" element="led"><bounds x="2" y="10" width="1" height="1" /></bezel> + <bezel name="1.6" element="led"><bounds x="2" y="12" width="1" height="1" /></bezel> + <bezel name="1.7" element="led"><bounds x="2" y="14" width="1" height="1" /></bezel> + <bezel name="1.8" element="led"><bounds x="2" y="16" width="1" height="1" /></bezel> + <bezel name="1.9" element="led"><bounds x="2" y="18" width="1" height="1" /></bezel> + <bezel name="1.10" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel> + <bezel name="1.11" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel> + <bezel name="1.12" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel> + <bezel name="1.13" element="led"><bounds x="2" y="26" width="1" height="1" /></bezel> + <bezel name="1.14" element="led"><bounds x="2" y="28" width="1" height="1" /></bezel> + <bezel name="1.15" element="led"><bounds x="2" y="30" width="1" height="1" /></bezel> + <bezel name="1.16" element="led"><bounds x="2" y="32" width="1" height="1" /></bezel> + <bezel name="1.17" element="led"><bounds x="2" y="34" width="1" height="1" /></bezel> + <bezel name="1.18" element="led"><bounds x="2" y="36" width="1" height="1" /></bezel> + <bezel name="1.19" element="led"><bounds x="2" y="38" width="1" height="1" /></bezel> + <bezel name="1.20" element="led"><bounds x="2" y="40" width="1" height="1" /></bezel> + <bezel name="1.21" element="led"><bounds x="2" y="42" width="1" height="1" /></bezel> + <bezel name="1.22" element="led"><bounds x="2" y="44" width="1" height="1" /></bezel> + <bezel name="1.23" element="led"><bounds x="2" y="46" width="1" height="1" /></bezel> + <bezel name="1.24" element="led"><bounds x="2" y="48" width="1" height="1" /></bezel> + <bezel name="1.25" element="led"><bounds x="2" y="50" width="1" height="1" /></bezel> + <bezel name="1.26" element="led"><bounds x="2" y="52" width="1" height="1" /></bezel> + <bezel name="1.27" element="led"><bounds x="2" y="54" width="1" height="1" /></bezel> + <bezel name="1.28" element="led"><bounds x="2" y="56" width="1" height="1" /></bezel> + <bezel name="1.29" element="led"><bounds x="2" y="58" width="1" height="1" /></bezel> + <bezel name="1.30" element="led"><bounds x="2" y="60" width="1" height="1" /></bezel> + <bezel name="1.31" element="led"><bounds x="2" y="62" width="1" height="1" /></bezel> + + <bezel name="2.0" element="led"><bounds x="4" y="0" width="1" height="1" /></bezel> + <bezel name="2.1" element="led"><bounds x="4" y="2" width="1" height="1" /></bezel> + <bezel name="2.2" element="led"><bounds x="4" y="4" width="1" height="1" /></bezel> + <bezel name="2.3" element="led"><bounds x="4" y="6" width="1" height="1" /></bezel> + <bezel name="2.4" element="led"><bounds x="4" y="8" width="1" height="1" /></bezel> + <bezel name="2.5" element="led"><bounds x="4" y="10" width="1" height="1" /></bezel> + <bezel name="2.6" element="led"><bounds x="4" y="12" width="1" height="1" /></bezel> + <bezel name="2.7" element="led"><bounds x="4" y="14" width="1" height="1" /></bezel> + <bezel name="2.8" element="led"><bounds x="4" y="16" width="1" height="1" /></bezel> + <bezel name="2.9" element="led"><bounds x="4" y="18" width="1" height="1" /></bezel> + <bezel name="2.10" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel> + <bezel name="2.11" element="led"><bounds x="4" y="22" width="1" height="1" /></bezel> + <bezel name="2.12" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel> + <bezel name="2.13" element="led"><bounds x="4" y="26" width="1" height="1" /></bezel> + <bezel name="2.14" element="led"><bounds x="4" y="28" width="1" height="1" /></bezel> + <bezel name="2.15" element="led"><bounds x="4" y="30" width="1" height="1" /></bezel> + <bezel name="2.16" element="led"><bounds x="4" y="32" width="1" height="1" /></bezel> + <bezel name="2.17" element="led"><bounds x="4" y="34" width="1" height="1" /></bezel> + <bezel name="2.18" element="led"><bounds x="4" y="36" width="1" height="1" /></bezel> + <bezel name="2.19" element="led"><bounds x="4" y="38" width="1" height="1" /></bezel> + <bezel name="2.20" element="led"><bounds x="4" y="40" width="1" height="1" /></bezel> + <bezel name="2.21" element="led"><bounds x="4" y="42" width="1" height="1" /></bezel> + <bezel name="2.22" element="led"><bounds x="4" y="44" width="1" height="1" /></bezel> + <bezel name="2.23" element="led"><bounds x="4" y="46" width="1" height="1" /></bezel> + <bezel name="2.24" element="led"><bounds x="4" y="48" width="1" height="1" /></bezel> + <bezel name="2.25" element="led"><bounds x="4" y="50" width="1" height="1" /></bezel> + <bezel name="2.26" element="led"><bounds x="4" y="52" width="1" height="1" /></bezel> + <bezel name="2.27" element="led"><bounds x="4" y="54" width="1" height="1" /></bezel> + <bezel name="2.28" element="led"><bounds x="4" y="56" width="1" height="1" /></bezel> + <bezel name="2.29" element="led"><bounds x="4" y="58" width="1" height="1" /></bezel> + <bezel name="2.30" element="led"><bounds x="4" y="60" width="1" height="1" /></bezel> + <bezel name="2.31" element="led"><bounds x="4" y="62" width="1" height="1" /></bezel> + + <bezel name="3.0" element="led"><bounds x="6" y="0" width="1" height="1" /></bezel> + <bezel name="3.1" element="led"><bounds x="6" y="2" width="1" height="1" /></bezel> + <bezel name="3.2" element="led"><bounds x="6" y="4" width="1" height="1" /></bezel> + <bezel name="3.3" element="led"><bounds x="6" y="6" width="1" height="1" /></bezel> + <bezel name="3.4" element="led"><bounds x="6" y="8" width="1" height="1" /></bezel> + <bezel name="3.5" element="led"><bounds x="6" y="10" width="1" height="1" /></bezel> + <bezel name="3.6" element="led"><bounds x="6" y="12" width="1" height="1" /></bezel> + <bezel name="3.7" element="led"><bounds x="6" y="14" width="1" height="1" /></bezel> + <bezel name="3.8" element="led"><bounds x="6" y="16" width="1" height="1" /></bezel> + <bezel name="3.9" element="led"><bounds x="6" y="18" width="1" height="1" /></bezel> + <bezel name="3.10" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel> + <bezel name="3.11" element="led"><bounds x="6" y="22" width="1" height="1" /></bezel> + <bezel name="3.12" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel> + <bezel name="3.13" element="led"><bounds x="6" y="26" width="1" height="1" /></bezel> + <bezel name="3.14" element="led"><bounds x="6" y="28" width="1" height="1" /></bezel> + <bezel name="3.15" element="led"><bounds x="6" y="30" width="1" height="1" /></bezel> + <bezel name="3.16" element="led"><bounds x="6" y="32" width="1" height="1" /></bezel> + <bezel name="3.17" element="led"><bounds x="6" y="34" width="1" height="1" /></bezel> + <bezel name="3.18" element="led"><bounds x="6" y="36" width="1" height="1" /></bezel> + <bezel name="3.19" element="led"><bounds x="6" y="38" width="1" height="1" /></bezel> + <bezel name="3.20" element="led"><bounds x="6" y="40" width="1" height="1" /></bezel> + <bezel name="3.21" element="led"><bounds x="6" y="42" width="1" height="1" /></bezel> + <bezel name="3.22" element="led"><bounds x="6" y="44" width="1" height="1" /></bezel> + <bezel name="3.23" element="led"><bounds x="6" y="46" width="1" height="1" /></bezel> + <bezel name="3.24" element="led"><bounds x="6" y="48" width="1" height="1" /></bezel> + <bezel name="3.25" element="led"><bounds x="6" y="50" width="1" height="1" /></bezel> + <bezel name="3.26" element="led"><bounds x="6" y="52" width="1" height="1" /></bezel> + <bezel name="3.27" element="led"><bounds x="6" y="54" width="1" height="1" /></bezel> + <bezel name="3.28" element="led"><bounds x="6" y="56" width="1" height="1" /></bezel> + <bezel name="3.29" element="led"><bounds x="6" y="58" width="1" height="1" /></bezel> + <bezel name="3.30" element="led"><bounds x="6" y="60" width="1" height="1" /></bezel> + <bezel name="3.31" element="led"><bounds x="6" y="62" width="1" height="1" /></bezel> + + <bezel name="4.0" element="led"><bounds x="8" y="0" width="1" height="1" /></bezel> + <bezel name="4.1" element="led"><bounds x="8" y="2" width="1" height="1" /></bezel> + <bezel name="4.2" element="led"><bounds x="8" y="4" width="1" height="1" /></bezel> + <bezel name="4.3" element="led"><bounds x="8" y="6" width="1" height="1" /></bezel> + <bezel name="4.4" element="led"><bounds x="8" y="8" width="1" height="1" /></bezel> + <bezel name="4.5" element="led"><bounds x="8" y="10" width="1" height="1" /></bezel> + <bezel name="4.6" element="led"><bounds x="8" y="12" width="1" height="1" /></bezel> + <bezel name="4.7" element="led"><bounds x="8" y="14" width="1" height="1" /></bezel> + <bezel name="4.8" element="led"><bounds x="8" y="16" width="1" height="1" /></bezel> + <bezel name="4.9" element="led"><bounds x="8" y="18" width="1" height="1" /></bezel> + <bezel name="4.10" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel> + <bezel name="4.11" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel> + <bezel name="4.12" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel> + <bezel name="4.13" element="led"><bounds x="8" y="26" width="1" height="1" /></bezel> + <bezel name="4.14" element="led"><bounds x="8" y="28" width="1" height="1" /></bezel> + <bezel name="4.15" element="led"><bounds x="8" y="30" width="1" height="1" /></bezel> + <bezel name="4.16" element="led"><bounds x="8" y="32" width="1" height="1" /></bezel> + <bezel name="4.17" element="led"><bounds x="8" y="34" width="1" height="1" /></bezel> + <bezel name="4.18" element="led"><bounds x="8" y="36" width="1" height="1" /></bezel> + <bezel name="4.19" element="led"><bounds x="8" y="38" width="1" height="1" /></bezel> + <bezel name="4.20" element="led"><bounds x="8" y="40" width="1" height="1" /></bezel> + <bezel name="4.21" element="led"><bounds x="8" y="42" width="1" height="1" /></bezel> + <bezel name="4.22" element="led"><bounds x="8" y="44" width="1" height="1" /></bezel> + <bezel name="4.23" element="led"><bounds x="8" y="46" width="1" height="1" /></bezel> + <bezel name="4.24" element="led"><bounds x="8" y="48" width="1" height="1" /></bezel> + <bezel name="4.25" element="led"><bounds x="8" y="50" width="1" height="1" /></bezel> + <bezel name="4.26" element="led"><bounds x="8" y="52" width="1" height="1" /></bezel> + <bezel name="4.27" element="led"><bounds x="8" y="54" width="1" height="1" /></bezel> + <bezel name="4.28" element="led"><bounds x="8" y="56" width="1" height="1" /></bezel> + <bezel name="4.29" element="led"><bounds x="8" y="58" width="1" height="1" /></bezel> + <bezel name="4.30" element="led"><bounds x="8" y="60" width="1" height="1" /></bezel> + <bezel name="4.31" element="led"><bounds x="8" y="62" width="1" height="1" /></bezel> + + <bezel name="5.0" element="led"><bounds x="10" y="0" width="1" height="1" /></bezel> + <bezel name="5.1" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel> + <bezel name="5.2" element="led"><bounds x="10" y="4" width="1" height="1" /></bezel> + <bezel name="5.3" element="led"><bounds x="10" y="6" width="1" height="1" /></bezel> + <bezel name="5.4" element="led"><bounds x="10" y="8" width="1" height="1" /></bezel> + <bezel name="5.5" element="led"><bounds x="10" y="10" width="1" height="1" /></bezel> + <bezel name="5.6" element="led"><bounds x="10" y="12" width="1" height="1" /></bezel> + <bezel name="5.7" element="led"><bounds x="10" y="14" width="1" height="1" /></bezel> + <bezel name="5.8" element="led"><bounds x="10" y="16" width="1" height="1" /></bezel> + <bezel name="5.9" element="led"><bounds x="10" y="18" width="1" height="1" /></bezel> + <bezel name="5.10" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel> + <bezel name="5.11" element="led"><bounds x="10" y="22" width="1" height="1" /></bezel> + <bezel name="5.12" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel> + <bezel name="5.13" element="led"><bounds x="10" y="26" width="1" height="1" /></bezel> + <bezel name="5.14" element="led"><bounds x="10" y="28" width="1" height="1" /></bezel> + <bezel name="5.15" element="led"><bounds x="10" y="30" width="1" height="1" /></bezel> + <bezel name="5.16" element="led"><bounds x="10" y="32" width="1" height="1" /></bezel> + <bezel name="5.17" element="led"><bounds x="10" y="34" width="1" height="1" /></bezel> + <bezel name="5.18" element="led"><bounds x="10" y="36" width="1" height="1" /></bezel> + <bezel name="5.19" element="led"><bounds x="10" y="38" width="1" height="1" /></bezel> + <bezel name="5.20" element="led"><bounds x="10" y="40" width="1" height="1" /></bezel> + <bezel name="5.21" element="led"><bounds x="10" y="42" width="1" height="1" /></bezel> + <bezel name="5.22" element="led"><bounds x="10" y="44" width="1" height="1" /></bezel> + <bezel name="5.23" element="led"><bounds x="10" y="46" width="1" height="1" /></bezel> + <bezel name="5.24" element="led"><bounds x="10" y="48" width="1" height="1" /></bezel> + <bezel name="5.25" element="led"><bounds x="10" y="50" width="1" height="1" /></bezel> + <bezel name="5.26" element="led"><bounds x="10" y="52" width="1" height="1" /></bezel> + <bezel name="5.27" element="led"><bounds x="10" y="54" width="1" height="1" /></bezel> + <bezel name="5.28" element="led"><bounds x="10" y="56" width="1" height="1" /></bezel> + <bezel name="5.29" element="led"><bounds x="10" y="58" width="1" height="1" /></bezel> + <bezel name="5.30" element="led"><bounds x="10" y="60" width="1" height="1" /></bezel> + <bezel name="5.31" element="led"><bounds x="10" y="62" width="1" height="1" /></bezel> + + <bezel name="6.0" element="led"><bounds x="12" y="0" width="1" height="1" /></bezel> + <bezel name="6.1" element="led"><bounds x="12" y="2" width="1" height="1" /></bezel> + <bezel name="6.2" element="led"><bounds x="12" y="4" width="1" height="1" /></bezel> + <bezel name="6.3" element="led"><bounds x="12" y="6" width="1" height="1" /></bezel> + <bezel name="6.4" element="led"><bounds x="12" y="8" width="1" height="1" /></bezel> + <bezel name="6.5" element="led"><bounds x="12" y="10" width="1" height="1" /></bezel> + <bezel name="6.6" element="led"><bounds x="12" y="12" width="1" height="1" /></bezel> + <bezel name="6.7" element="led"><bounds x="12" y="14" width="1" height="1" /></bezel> + <bezel name="6.8" element="led"><bounds x="12" y="16" width="1" height="1" /></bezel> + <bezel name="6.9" element="led"><bounds x="12" y="18" width="1" height="1" /></bezel> + <bezel name="6.10" element="led"><bounds x="12" y="20" width="1" height="1" /></bezel> + <bezel name="6.11" element="led"><bounds x="12" y="22" width="1" height="1" /></bezel> + <bezel name="6.12" element="led"><bounds x="12" y="24" width="1" height="1" /></bezel> + <bezel name="6.13" element="led"><bounds x="12" y="26" width="1" height="1" /></bezel> + <bezel name="6.14" element="led"><bounds x="12" y="28" width="1" height="1" /></bezel> + <bezel name="6.15" element="led"><bounds x="12" y="30" width="1" height="1" /></bezel> + <bezel name="6.16" element="led"><bounds x="12" y="32" width="1" height="1" /></bezel> + <bezel name="6.17" element="led"><bounds x="12" y="34" width="1" height="1" /></bezel> + <bezel name="6.18" element="led"><bounds x="12" y="36" width="1" height="1" /></bezel> + <bezel name="6.19" element="led"><bounds x="12" y="38" width="1" height="1" /></bezel> + <bezel name="6.20" element="led"><bounds x="12" y="40" width="1" height="1" /></bezel> + <bezel name="6.21" element="led"><bounds x="12" y="42" width="1" height="1" /></bezel> + <bezel name="6.22" element="led"><bounds x="12" y="44" width="1" height="1" /></bezel> + <bezel name="6.23" element="led"><bounds x="12" y="46" width="1" height="1" /></bezel> + <bezel name="6.24" element="led"><bounds x="12" y="48" width="1" height="1" /></bezel> + <bezel name="6.25" element="led"><bounds x="12" y="50" width="1" height="1" /></bezel> + <bezel name="6.26" element="led"><bounds x="12" y="52" width="1" height="1" /></bezel> + <bezel name="6.27" element="led"><bounds x="12" y="54" width="1" height="1" /></bezel> + <bezel name="6.28" element="led"><bounds x="12" y="56" width="1" height="1" /></bezel> + <bezel name="6.29" element="led"><bounds x="12" y="58" width="1" height="1" /></bezel> + <bezel name="6.30" element="led"><bounds x="12" y="60" width="1" height="1" /></bezel> + <bezel name="6.31" element="led"><bounds x="12" y="62" width="1" height="1" /></bezel> + + <bezel name="7.0" element="led"><bounds x="14" y="0" width="1" height="1" /></bezel> + <bezel name="7.1" element="led"><bounds x="14" y="2" width="1" height="1" /></bezel> + <bezel name="7.2" element="led"><bounds x="14" y="4" width="1" height="1" /></bezel> + <bezel name="7.3" element="led"><bounds x="14" y="6" width="1" height="1" /></bezel> + <bezel name="7.4" element="led"><bounds x="14" y="8" width="1" height="1" /></bezel> + <bezel name="7.5" element="led"><bounds x="14" y="10" width="1" height="1" /></bezel> + <bezel name="7.6" element="led"><bounds x="14" y="12" width="1" height="1" /></bezel> + <bezel name="7.7" element="led"><bounds x="14" y="14" width="1" height="1" /></bezel> + <bezel name="7.8" element="led"><bounds x="14" y="16" width="1" height="1" /></bezel> + <bezel name="7.9" element="led"><bounds x="14" y="18" width="1" height="1" /></bezel> + <bezel name="7.10" element="led"><bounds x="14" y="20" width="1" height="1" /></bezel> + <bezel name="7.11" element="led"><bounds x="14" y="22" width="1" height="1" /></bezel> + <bezel name="7.12" element="led"><bounds x="14" y="24" width="1" height="1" /></bezel> + <bezel name="7.13" element="led"><bounds x="14" y="26" width="1" height="1" /></bezel> + <bezel name="7.14" element="led"><bounds x="14" y="28" width="1" height="1" /></bezel> + <bezel name="7.15" element="led"><bounds x="14" y="30" width="1" height="1" /></bezel> + <bezel name="7.16" element="led"><bounds x="14" y="32" width="1" height="1" /></bezel> + <bezel name="7.17" element="led"><bounds x="14" y="34" width="1" height="1" /></bezel> + <bezel name="7.18" element="led"><bounds x="14" y="36" width="1" height="1" /></bezel> + <bezel name="7.19" element="led"><bounds x="14" y="38" width="1" height="1" /></bezel> + <bezel name="7.20" element="led"><bounds x="14" y="40" width="1" height="1" /></bezel> + <bezel name="7.21" element="led"><bounds x="14" y="42" width="1" height="1" /></bezel> + <bezel name="7.22" element="led"><bounds x="14" y="44" width="1" height="1" /></bezel> + <bezel name="7.23" element="led"><bounds x="14" y="46" width="1" height="1" /></bezel> + <bezel name="7.24" element="led"><bounds x="14" y="48" width="1" height="1" /></bezel> + <bezel name="7.25" element="led"><bounds x="14" y="50" width="1" height="1" /></bezel> + <bezel name="7.26" element="led"><bounds x="14" y="52" width="1" height="1" /></bezel> + <bezel name="7.27" element="led"><bounds x="14" y="54" width="1" height="1" /></bezel> + <bezel name="7.28" element="led"><bounds x="14" y="56" width="1" height="1" /></bezel> + <bezel name="7.29" element="led"><bounds x="14" y="58" width="1" height="1" /></bezel> + <bezel name="7.30" element="led"><bounds x="14" y="60" width="1" height="1" /></bezel> + <bezel name="7.31" element="led"><bounds x="14" y="62" width="1" height="1" /></bezel> + + <bezel name="8.0" element="led"><bounds x="16" y="0" width="1" height="1" /></bezel> + <bezel name="8.1" element="led"><bounds x="16" y="2" width="1" height="1" /></bezel> + <bezel name="8.2" element="led"><bounds x="16" y="4" width="1" height="1" /></bezel> + <bezel name="8.3" element="led"><bounds x="16" y="6" width="1" height="1" /></bezel> + <bezel name="8.4" element="led"><bounds x="16" y="8" width="1" height="1" /></bezel> + <bezel name="8.5" element="led"><bounds x="16" y="10" width="1" height="1" /></bezel> + <bezel name="8.6" element="led"><bounds x="16" y="12" width="1" height="1" /></bezel> + <bezel name="8.7" element="led"><bounds x="16" y="14" width="1" height="1" /></bezel> + <bezel name="8.8" element="led"><bounds x="16" y="16" width="1" height="1" /></bezel> + <bezel name="8.9" element="led"><bounds x="16" y="18" width="1" height="1" /></bezel> + <bezel name="8.10" element="led"><bounds x="16" y="20" width="1" height="1" /></bezel> + <bezel name="8.11" element="led"><bounds x="16" y="22" width="1" height="1" /></bezel> + <bezel name="8.12" element="led"><bounds x="16" y="24" width="1" height="1" /></bezel> + <bezel name="8.13" element="led"><bounds x="16" y="26" width="1" height="1" /></bezel> + <bezel name="8.14" element="led"><bounds x="16" y="28" width="1" height="1" /></bezel> + <bezel name="8.15" element="led"><bounds x="16" y="30" width="1" height="1" /></bezel> + <bezel name="8.16" element="led"><bounds x="16" y="32" width="1" height="1" /></bezel> + <bezel name="8.17" element="led"><bounds x="16" y="34" width="1" height="1" /></bezel> + <bezel name="8.18" element="led"><bounds x="16" y="36" width="1" height="1" /></bezel> + <bezel name="8.19" element="led"><bounds x="16" y="38" width="1" height="1" /></bezel> + <bezel name="8.20" element="led"><bounds x="16" y="40" width="1" height="1" /></bezel> + <bezel name="8.21" element="led"><bounds x="16" y="42" width="1" height="1" /></bezel> + <bezel name="8.22" element="led"><bounds x="16" y="44" width="1" height="1" /></bezel> + <bezel name="8.23" element="led"><bounds x="16" y="46" width="1" height="1" /></bezel> + <bezel name="8.24" element="led"><bounds x="16" y="48" width="1" height="1" /></bezel> + <bezel name="8.25" element="led"><bounds x="16" y="50" width="1" height="1" /></bezel> + <bezel name="8.26" element="led"><bounds x="16" y="52" width="1" height="1" /></bezel> + <bezel name="8.27" element="led"><bounds x="16" y="54" width="1" height="1" /></bezel> + <bezel name="8.28" element="led"><bounds x="16" y="56" width="1" height="1" /></bezel> + <bezel name="8.29" element="led"><bounds x="16" y="58" width="1" height="1" /></bezel> + <bezel name="8.30" element="led"><bounds x="16" y="60" width="1" height="1" /></bezel> + <bezel name="8.31" element="led"><bounds x="16" y="62" width="1" height="1" /></bezel> + + <bezel name="9.0" element="led"><bounds x="18" y="0" width="1" height="1" /></bezel> + <bezel name="9.1" element="led"><bounds x="18" y="2" width="1" height="1" /></bezel> + <bezel name="9.2" element="led"><bounds x="18" y="4" width="1" height="1" /></bezel> + <bezel name="9.3" element="led"><bounds x="18" y="6" width="1" height="1" /></bezel> + <bezel name="9.4" element="led"><bounds x="18" y="8" width="1" height="1" /></bezel> + <bezel name="9.5" element="led"><bounds x="18" y="10" width="1" height="1" /></bezel> + <bezel name="9.6" element="led"><bounds x="18" y="12" width="1" height="1" /></bezel> + <bezel name="9.7" element="led"><bounds x="18" y="14" width="1" height="1" /></bezel> + <bezel name="9.8" element="led"><bounds x="18" y="16" width="1" height="1" /></bezel> + <bezel name="9.9" element="led"><bounds x="18" y="18" width="1" height="1" /></bezel> + <bezel name="9.10" element="led"><bounds x="18" y="20" width="1" height="1" /></bezel> + <bezel name="9.11" element="led"><bounds x="18" y="22" width="1" height="1" /></bezel> + <bezel name="9.12" element="led"><bounds x="18" y="24" width="1" height="1" /></bezel> + <bezel name="9.13" element="led"><bounds x="18" y="26" width="1" height="1" /></bezel> + <bezel name="9.14" element="led"><bounds x="18" y="28" width="1" height="1" /></bezel> + <bezel name="9.15" element="led"><bounds x="18" y="30" width="1" height="1" /></bezel> + <bezel name="9.16" element="led"><bounds x="18" y="32" width="1" height="1" /></bezel> + <bezel name="9.17" element="led"><bounds x="18" y="34" width="1" height="1" /></bezel> + <bezel name="9.18" element="led"><bounds x="18" y="36" width="1" height="1" /></bezel> + <bezel name="9.19" element="led"><bounds x="18" y="38" width="1" height="1" /></bezel> + <bezel name="9.20" element="led"><bounds x="18" y="40" width="1" height="1" /></bezel> + <bezel name="9.21" element="led"><bounds x="18" y="42" width="1" height="1" /></bezel> + <bezel name="9.22" element="led"><bounds x="18" y="44" width="1" height="1" /></bezel> + <bezel name="9.23" element="led"><bounds x="18" y="46" width="1" height="1" /></bezel> + <bezel name="9.24" element="led"><bounds x="18" y="48" width="1" height="1" /></bezel> + <bezel name="9.25" element="led"><bounds x="18" y="50" width="1" height="1" /></bezel> + <bezel name="9.26" element="led"><bounds x="18" y="52" width="1" height="1" /></bezel> + <bezel name="9.27" element="led"><bounds x="18" y="54" width="1" height="1" /></bezel> + <bezel name="9.28" element="led"><bounds x="18" y="56" width="1" height="1" /></bezel> + <bezel name="9.29" element="led"><bounds x="18" y="58" width="1" height="1" /></bezel> + <bezel name="9.30" element="led"><bounds x="18" y="60" width="1" height="1" /></bezel> + <bezel name="9.31" element="led"><bounds x="18" y="62" width="1" height="1" /></bezel> + + <bezel name="10.0" element="led"><bounds x="20" y="0" width="1" height="1" /></bezel> + <bezel name="10.1" element="led"><bounds x="20" y="2" width="1" height="1" /></bezel> + <bezel name="10.2" element="led"><bounds x="20" y="4" width="1" height="1" /></bezel> + <bezel name="10.3" element="led"><bounds x="20" y="6" width="1" height="1" /></bezel> + <bezel name="10.4" element="led"><bounds x="20" y="8" width="1" height="1" /></bezel> + <bezel name="10.5" element="led"><bounds x="20" y="10" width="1" height="1" /></bezel> + <bezel name="10.6" element="led"><bounds x="20" y="12" width="1" height="1" /></bezel> + <bezel name="10.7" element="led"><bounds x="20" y="14" width="1" height="1" /></bezel> + <bezel name="10.8" element="led"><bounds x="20" y="16" width="1" height="1" /></bezel> + <bezel name="10.9" element="led"><bounds x="20" y="18" width="1" height="1" /></bezel> + <bezel name="10.10" element="led"><bounds x="20" y="20" width="1" height="1" /></bezel> + <bezel name="10.11" element="led"><bounds x="20" y="22" width="1" height="1" /></bezel> + <bezel name="10.12" element="led"><bounds x="20" y="24" width="1" height="1" /></bezel> + <bezel name="10.13" element="led"><bounds x="20" y="26" width="1" height="1" /></bezel> + <bezel name="10.14" element="led"><bounds x="20" y="28" width="1" height="1" /></bezel> + <bezel name="10.15" element="led"><bounds x="20" y="30" width="1" height="1" /></bezel> + <bezel name="10.16" element="led"><bounds x="20" y="32" width="1" height="1" /></bezel> + <bezel name="10.17" element="led"><bounds x="20" y="34" width="1" height="1" /></bezel> + <bezel name="10.18" element="led"><bounds x="20" y="36" width="1" height="1" /></bezel> + <bezel name="10.19" element="led"><bounds x="20" y="38" width="1" height="1" /></bezel> + <bezel name="10.20" element="led"><bounds x="20" y="40" width="1" height="1" /></bezel> + <bezel name="10.21" element="led"><bounds x="20" y="42" width="1" height="1" /></bezel> + <bezel name="10.22" element="led"><bounds x="20" y="44" width="1" height="1" /></bezel> + <bezel name="10.23" element="led"><bounds x="20" y="46" width="1" height="1" /></bezel> + <bezel name="10.24" element="led"><bounds x="20" y="48" width="1" height="1" /></bezel> + <bezel name="10.25" element="led"><bounds x="20" y="50" width="1" height="1" /></bezel> + <bezel name="10.26" element="led"><bounds x="20" y="52" width="1" height="1" /></bezel> + <bezel name="10.27" element="led"><bounds x="20" y="54" width="1" height="1" /></bezel> + <bezel name="10.28" element="led"><bounds x="20" y="56" width="1" height="1" /></bezel> + <bezel name="10.29" element="led"><bounds x="20" y="58" width="1" height="1" /></bezel> + <bezel name="10.30" element="led"><bounds x="20" y="60" width="1" height="1" /></bezel> + <bezel name="10.31" element="led"><bounds x="20" y="62" width="1" height="1" /></bezel> + + <bezel name="11.0" element="led"><bounds x="22" y="0" width="1" height="1" /></bezel> + <bezel name="11.1" element="led"><bounds x="22" y="2" width="1" height="1" /></bezel> + <bezel name="11.2" element="led"><bounds x="22" y="4" width="1" height="1" /></bezel> + <bezel name="11.3" element="led"><bounds x="22" y="6" width="1" height="1" /></bezel> + <bezel name="11.4" element="led"><bounds x="22" y="8" width="1" height="1" /></bezel> + <bezel name="11.5" element="led"><bounds x="22" y="10" width="1" height="1" /></bezel> + <bezel name="11.6" element="led"><bounds x="22" y="12" width="1" height="1" /></bezel> + <bezel name="11.7" element="led"><bounds x="22" y="14" width="1" height="1" /></bezel> + <bezel name="11.8" element="led"><bounds x="22" y="16" width="1" height="1" /></bezel> + <bezel name="11.9" element="led"><bounds x="22" y="18" width="1" height="1" /></bezel> + <bezel name="11.10" element="led"><bounds x="22" y="20" width="1" height="1" /></bezel> + <bezel name="11.11" element="led"><bounds x="22" y="22" width="1" height="1" /></bezel> + <bezel name="11.12" element="led"><bounds x="22" y="24" width="1" height="1" /></bezel> + <bezel name="11.13" element="led"><bounds x="22" y="26" width="1" height="1" /></bezel> + <bezel name="11.14" element="led"><bounds x="22" y="28" width="1" height="1" /></bezel> + <bezel name="11.15" element="led"><bounds x="22" y="30" width="1" height="1" /></bezel> + <bezel name="11.16" element="led"><bounds x="22" y="32" width="1" height="1" /></bezel> + <bezel name="11.17" element="led"><bounds x="22" y="34" width="1" height="1" /></bezel> + <bezel name="11.18" element="led"><bounds x="22" y="36" width="1" height="1" /></bezel> + <bezel name="11.19" element="led"><bounds x="22" y="38" width="1" height="1" /></bezel> + <bezel name="11.20" element="led"><bounds x="22" y="40" width="1" height="1" /></bezel> + <bezel name="11.21" element="led"><bounds x="22" y="42" width="1" height="1" /></bezel> + <bezel name="11.22" element="led"><bounds x="22" y="44" width="1" height="1" /></bezel> + <bezel name="11.23" element="led"><bounds x="22" y="46" width="1" height="1" /></bezel> + <bezel name="11.24" element="led"><bounds x="22" y="48" width="1" height="1" /></bezel> + <bezel name="11.25" element="led"><bounds x="22" y="50" width="1" height="1" /></bezel> + <bezel name="11.26" element="led"><bounds x="22" y="52" width="1" height="1" /></bezel> + <bezel name="11.27" element="led"><bounds x="22" y="54" width="1" height="1" /></bezel> + <bezel name="11.28" element="led"><bounds x="22" y="56" width="1" height="1" /></bezel> + <bezel name="11.29" element="led"><bounds x="22" y="58" width="1" height="1" /></bezel> + <bezel name="11.30" element="led"><bounds x="22" y="60" width="1" height="1" /></bezel> + <bezel name="11.31" element="led"><bounds x="22" y="62" width="1" height="1" /></bezel> + + <bezel name="12.0" element="led"><bounds x="24" y="0" width="1" height="1" /></bezel> + <bezel name="12.1" element="led"><bounds x="24" y="2" width="1" height="1" /></bezel> + <bezel name="12.2" element="led"><bounds x="24" y="4" width="1" height="1" /></bezel> + <bezel name="12.3" element="led"><bounds x="24" y="6" width="1" height="1" /></bezel> + <bezel name="12.4" element="led"><bounds x="24" y="8" width="1" height="1" /></bezel> + <bezel name="12.5" element="led"><bounds x="24" y="10" width="1" height="1" /></bezel> + <bezel name="12.6" element="led"><bounds x="24" y="12" width="1" height="1" /></bezel> + <bezel name="12.7" element="led"><bounds x="24" y="14" width="1" height="1" /></bezel> + <bezel name="12.8" element="led"><bounds x="24" y="16" width="1" height="1" /></bezel> + <bezel name="12.9" element="led"><bounds x="24" y="18" width="1" height="1" /></bezel> + <bezel name="12.10" element="led"><bounds x="24" y="20" width="1" height="1" /></bezel> + <bezel name="12.11" element="led"><bounds x="24" y="22" width="1" height="1" /></bezel> + <bezel name="12.12" element="led"><bounds x="24" y="24" width="1" height="1" /></bezel> + <bezel name="12.13" element="led"><bounds x="24" y="26" width="1" height="1" /></bezel> + <bezel name="12.14" element="led"><bounds x="24" y="28" width="1" height="1" /></bezel> + <bezel name="12.15" element="led"><bounds x="24" y="30" width="1" height="1" /></bezel> + <bezel name="12.16" element="led"><bounds x="24" y="32" width="1" height="1" /></bezel> + <bezel name="12.17" element="led"><bounds x="24" y="34" width="1" height="1" /></bezel> + <bezel name="12.18" element="led"><bounds x="24" y="36" width="1" height="1" /></bezel> + <bezel name="12.19" element="led"><bounds x="24" y="38" width="1" height="1" /></bezel> + <bezel name="12.20" element="led"><bounds x="24" y="40" width="1" height="1" /></bezel> + <bezel name="12.21" element="led"><bounds x="24" y="42" width="1" height="1" /></bezel> + <bezel name="12.22" element="led"><bounds x="24" y="44" width="1" height="1" /></bezel> + <bezel name="12.23" element="led"><bounds x="24" y="46" width="1" height="1" /></bezel> + <bezel name="12.24" element="led"><bounds x="24" y="48" width="1" height="1" /></bezel> + <bezel name="12.25" element="led"><bounds x="24" y="50" width="1" height="1" /></bezel> + <bezel name="12.26" element="led"><bounds x="24" y="52" width="1" height="1" /></bezel> + <bezel name="12.27" element="led"><bounds x="24" y="54" width="1" height="1" /></bezel> + <bezel name="12.28" element="led"><bounds x="24" y="56" width="1" height="1" /></bezel> + <bezel name="12.29" element="led"><bounds x="24" y="58" width="1" height="1" /></bezel> + <bezel name="12.30" element="led"><bounds x="24" y="60" width="1" height="1" /></bezel> + <bezel name="12.31" element="led"><bounds x="24" y="62" width="1" height="1" /></bezel> + + <bezel name="13.0" element="led"><bounds x="26" y="0" width="1" height="1" /></bezel> + <bezel name="13.1" element="led"><bounds x="26" y="2" width="1" height="1" /></bezel> + <bezel name="13.2" element="led"><bounds x="26" y="4" width="1" height="1" /></bezel> + <bezel name="13.3" element="led"><bounds x="26" y="6" width="1" height="1" /></bezel> + <bezel name="13.4" element="led"><bounds x="26" y="8" width="1" height="1" /></bezel> + <bezel name="13.5" element="led"><bounds x="26" y="10" width="1" height="1" /></bezel> + <bezel name="13.6" element="led"><bounds x="26" y="12" width="1" height="1" /></bezel> + <bezel name="13.7" element="led"><bounds x="26" y="14" width="1" height="1" /></bezel> + <bezel name="13.8" element="led"><bounds x="26" y="16" width="1" height="1" /></bezel> + <bezel name="13.9" element="led"><bounds x="26" y="18" width="1" height="1" /></bezel> + <bezel name="13.10" element="led"><bounds x="26" y="20" width="1" height="1" /></bezel> + <bezel name="13.11" element="led"><bounds x="26" y="22" width="1" height="1" /></bezel> + <bezel name="13.12" element="led"><bounds x="26" y="24" width="1" height="1" /></bezel> + <bezel name="13.13" element="led"><bounds x="26" y="26" width="1" height="1" /></bezel> + <bezel name="13.14" element="led"><bounds x="26" y="28" width="1" height="1" /></bezel> + <bezel name="13.15" element="led"><bounds x="26" y="30" width="1" height="1" /></bezel> + <bezel name="13.16" element="led"><bounds x="26" y="32" width="1" height="1" /></bezel> + <bezel name="13.17" element="led"><bounds x="26" y="34" width="1" height="1" /></bezel> + <bezel name="13.18" element="led"><bounds x="26" y="36" width="1" height="1" /></bezel> + <bezel name="13.19" element="led"><bounds x="26" y="38" width="1" height="1" /></bezel> + <bezel name="13.20" element="led"><bounds x="26" y="40" width="1" height="1" /></bezel> + <bezel name="13.21" element="led"><bounds x="26" y="42" width="1" height="1" /></bezel> + <bezel name="13.22" element="led"><bounds x="26" y="44" width="1" height="1" /></bezel> + <bezel name="13.23" element="led"><bounds x="26" y="46" width="1" height="1" /></bezel> + <bezel name="13.24" element="led"><bounds x="26" y="48" width="1" height="1" /></bezel> + <bezel name="13.25" element="led"><bounds x="26" y="50" width="1" height="1" /></bezel> + <bezel name="13.26" element="led"><bounds x="26" y="52" width="1" height="1" /></bezel> + <bezel name="13.27" element="led"><bounds x="26" y="54" width="1" height="1" /></bezel> + <bezel name="13.28" element="led"><bounds x="26" y="56" width="1" height="1" /></bezel> + <bezel name="13.29" element="led"><bounds x="26" y="58" width="1" height="1" /></bezel> + <bezel name="13.30" element="led"><bounds x="26" y="60" width="1" height="1" /></bezel> + <bezel name="13.31" element="led"><bounds x="26" y="62" width="1" height="1" /></bezel> + + <bezel name="14.0" element="led"><bounds x="28" y="0" width="1" height="1" /></bezel> + <bezel name="14.1" element="led"><bounds x="28" y="2" width="1" height="1" /></bezel> + <bezel name="14.2" element="led"><bounds x="28" y="4" width="1" height="1" /></bezel> + <bezel name="14.3" element="led"><bounds x="28" y="6" width="1" height="1" /></bezel> + <bezel name="14.4" element="led"><bounds x="28" y="8" width="1" height="1" /></bezel> + <bezel name="14.5" element="led"><bounds x="28" y="10" width="1" height="1" /></bezel> + <bezel name="14.6" element="led"><bounds x="28" y="12" width="1" height="1" /></bezel> + <bezel name="14.7" element="led"><bounds x="28" y="14" width="1" height="1" /></bezel> + <bezel name="14.8" element="led"><bounds x="28" y="16" width="1" height="1" /></bezel> + <bezel name="14.9" element="led"><bounds x="28" y="18" width="1" height="1" /></bezel> + <bezel name="14.10" element="led"><bounds x="28" y="20" width="1" height="1" /></bezel> + <bezel name="14.11" element="led"><bounds x="28" y="22" width="1" height="1" /></bezel> + <bezel name="14.12" element="led"><bounds x="28" y="24" width="1" height="1" /></bezel> + <bezel name="14.13" element="led"><bounds x="28" y="26" width="1" height="1" /></bezel> + <bezel name="14.14" element="led"><bounds x="28" y="28" width="1" height="1" /></bezel> + <bezel name="14.15" element="led"><bounds x="28" y="30" width="1" height="1" /></bezel> + <bezel name="14.16" element="led"><bounds x="28" y="32" width="1" height="1" /></bezel> + <bezel name="14.17" element="led"><bounds x="28" y="34" width="1" height="1" /></bezel> + <bezel name="14.18" element="led"><bounds x="28" y="36" width="1" height="1" /></bezel> + <bezel name="14.19" element="led"><bounds x="28" y="38" width="1" height="1" /></bezel> + <bezel name="14.20" element="led"><bounds x="28" y="40" width="1" height="1" /></bezel> + <bezel name="14.21" element="led"><bounds x="28" y="42" width="1" height="1" /></bezel> + <bezel name="14.22" element="led"><bounds x="28" y="44" width="1" height="1" /></bezel> + <bezel name="14.23" element="led"><bounds x="28" y="46" width="1" height="1" /></bezel> + <bezel name="14.24" element="led"><bounds x="28" y="48" width="1" height="1" /></bezel> + <bezel name="14.25" element="led"><bounds x="28" y="50" width="1" height="1" /></bezel> + <bezel name="14.26" element="led"><bounds x="28" y="52" width="1" height="1" /></bezel> + <bezel name="14.27" element="led"><bounds x="28" y="54" width="1" height="1" /></bezel> + <bezel name="14.28" element="led"><bounds x="28" y="56" width="1" height="1" /></bezel> + <bezel name="14.29" element="led"><bounds x="28" y="58" width="1" height="1" /></bezel> + <bezel name="14.30" element="led"><bounds x="28" y="60" width="1" height="1" /></bezel> + <bezel name="14.31" element="led"><bounds x="28" y="62" width="1" height="1" /></bezel> + + <bezel name="15.0" element="led"><bounds x="30" y="0" width="1" height="1" /></bezel> + <bezel name="15.1" element="led"><bounds x="30" y="2" width="1" height="1" /></bezel> + <bezel name="15.2" element="led"><bounds x="30" y="4" width="1" height="1" /></bezel> + <bezel name="15.3" element="led"><bounds x="30" y="6" width="1" height="1" /></bezel> + <bezel name="15.4" element="led"><bounds x="30" y="8" width="1" height="1" /></bezel> + <bezel name="15.5" element="led"><bounds x="30" y="10" width="1" height="1" /></bezel> + <bezel name="15.6" element="led"><bounds x="30" y="12" width="1" height="1" /></bezel> + <bezel name="15.7" element="led"><bounds x="30" y="14" width="1" height="1" /></bezel> + <bezel name="15.8" element="led"><bounds x="30" y="16" width="1" height="1" /></bezel> + <bezel name="15.9" element="led"><bounds x="30" y="18" width="1" height="1" /></bezel> + <bezel name="15.10" element="led"><bounds x="30" y="20" width="1" height="1" /></bezel> + <bezel name="15.11" element="led"><bounds x="30" y="22" width="1" height="1" /></bezel> + <bezel name="15.12" element="led"><bounds x="30" y="24" width="1" height="1" /></bezel> + <bezel name="15.13" element="led"><bounds x="30" y="26" width="1" height="1" /></bezel> + <bezel name="15.14" element="led"><bounds x="30" y="28" width="1" height="1" /></bezel> + <bezel name="15.15" element="led"><bounds x="30" y="30" width="1" height="1" /></bezel> + <bezel name="15.16" element="led"><bounds x="30" y="32" width="1" height="1" /></bezel> + <bezel name="15.17" element="led"><bounds x="30" y="34" width="1" height="1" /></bezel> + <bezel name="15.18" element="led"><bounds x="30" y="36" width="1" height="1" /></bezel> + <bezel name="15.19" element="led"><bounds x="30" y="38" width="1" height="1" /></bezel> + <bezel name="15.20" element="led"><bounds x="30" y="40" width="1" height="1" /></bezel> + <bezel name="15.21" element="led"><bounds x="30" y="42" width="1" height="1" /></bezel> + <bezel name="15.22" element="led"><bounds x="30" y="44" width="1" height="1" /></bezel> + <bezel name="15.23" element="led"><bounds x="30" y="46" width="1" height="1" /></bezel> + <bezel name="15.24" element="led"><bounds x="30" y="48" width="1" height="1" /></bezel> + <bezel name="15.25" element="led"><bounds x="30" y="50" width="1" height="1" /></bezel> + <bezel name="15.26" element="led"><bounds x="30" y="52" width="1" height="1" /></bezel> + <bezel name="15.27" element="led"><bounds x="30" y="54" width="1" height="1" /></bezel> + <bezel name="15.28" element="led"><bounds x="30" y="56" width="1" height="1" /></bezel> + <bezel name="15.29" element="led"><bounds x="30" y="58" width="1" height="1" /></bezel> + <bezel name="15.30" element="led"><bounds x="30" y="60" width="1" height="1" /></bezel> + <bezel name="15.31" element="led"><bounds x="30" y="62" width="1" height="1" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/hh_ucom4_test.lay b/src/mess/layout/hh_ucom4_test.lay index 55266384f2e..597af18b4e0 100644 --- a/src/mess/layout/hh_ucom4_test.lay +++ b/src/mess/layout/hh_ucom4_test.lay @@ -6,8 +6,8 @@ <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> <element name="led" defstate="2"> - <disk state="0"><color red="0.1" green="0.2" blue="0.2" /></disk> - <disk state="1"><color red="0.5" green="1.0" blue="1.0" /></disk> + <disk state="0"><color red="0.06" green="0.2" blue="0.06" /></disk> + <disk state="1"><color red="0.3" green="1.0" blue="0.3" /></disk> <disk state="2"><color red="0" green="0" blue="0" /></disk> </element> @@ -23,533 +23,533 @@ <!-- max 16*32 matrix --> - <bezel name="lamp0" element="led"><bounds x="0" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1" element="led"><bounds x="0" y="2" width="1" height="1" /></bezel> - <bezel name="lamp2" element="led"><bounds x="0" y="4" width="1" height="1" /></bezel> - <bezel name="lamp3" element="led"><bounds x="0" y="6" width="1" height="1" /></bezel> - <bezel name="lamp4" element="led"><bounds x="0" y="8" width="1" height="1" /></bezel> - <bezel name="lamp5" element="led"><bounds x="0" y="10" width="1" height="1" /></bezel> - <bezel name="lamp6" element="led"><bounds x="0" y="12" width="1" height="1" /></bezel> - <bezel name="lamp7" element="led"><bounds x="0" y="14" width="1" height="1" /></bezel> - <bezel name="lamp8" element="led"><bounds x="0" y="16" width="1" height="1" /></bezel> - <bezel name="lamp9" element="led"><bounds x="0" y="18" width="1" height="1" /></bezel> - <bezel name="lamp10" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel> - <bezel name="lamp11" element="led"><bounds x="0" y="22" width="1" height="1" /></bezel> - <bezel name="lamp12" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel> - <bezel name="lamp13" element="led"><bounds x="0" y="26" width="1" height="1" /></bezel> - <bezel name="lamp14" element="led"><bounds x="0" y="28" width="1" height="1" /></bezel> - <bezel name="lamp15" element="led"><bounds x="0" y="30" width="1" height="1" /></bezel> - <bezel name="lamp16" element="led"><bounds x="0" y="32" width="1" height="1" /></bezel> - <bezel name="lamp17" element="led"><bounds x="0" y="34" width="1" height="1" /></bezel> - <bezel name="lamp18" element="led"><bounds x="0" y="36" width="1" height="1" /></bezel> - <bezel name="lamp19" element="led"><bounds x="0" y="38" width="1" height="1" /></bezel> - <bezel name="lamp20" element="led"><bounds x="0" y="40" width="1" height="1" /></bezel> - <bezel name="lamp21" element="led"><bounds x="0" y="42" width="1" height="1" /></bezel> - <bezel name="lamp22" element="led"><bounds x="0" y="44" width="1" height="1" /></bezel> - <bezel name="lamp23" element="led"><bounds x="0" y="46" width="1" height="1" /></bezel> - <bezel name="lamp24" element="led"><bounds x="0" y="48" width="1" height="1" /></bezel> - <bezel name="lamp25" element="led"><bounds x="0" y="50" width="1" height="1" /></bezel> - <bezel name="lamp26" element="led"><bounds x="0" y="52" width="1" height="1" /></bezel> - <bezel name="lamp27" element="led"><bounds x="0" y="54" width="1" height="1" /></bezel> - <bezel name="lamp28" element="led"><bounds x="0" y="56" width="1" height="1" /></bezel> - <bezel name="lamp29" element="led"><bounds x="0" y="58" width="1" height="1" /></bezel> - <bezel name="lamp30" element="led"><bounds x="0" y="60" width="1" height="1" /></bezel> - <bezel name="lamp31" element="led"><bounds x="0" y="62" width="1" height="1" /></bezel> + <bezel name="0.0" element="led"><bounds x="0" y="0" width="1" height="1" /></bezel> + <bezel name="0.1" element="led"><bounds x="0" y="2" width="1" height="1" /></bezel> + <bezel name="0.2" element="led"><bounds x="0" y="4" width="1" height="1" /></bezel> + <bezel name="0.3" element="led"><bounds x="0" y="6" width="1" height="1" /></bezel> + <bezel name="0.4" element="led"><bounds x="0" y="8" width="1" height="1" /></bezel> + <bezel name="0.5" element="led"><bounds x="0" y="10" width="1" height="1" /></bezel> + <bezel name="0.6" element="led"><bounds x="0" y="12" width="1" height="1" /></bezel> + <bezel name="0.7" element="led"><bounds x="0" y="14" width="1" height="1" /></bezel> + <bezel name="0.8" element="led"><bounds x="0" y="16" width="1" height="1" /></bezel> + <bezel name="0.9" element="led"><bounds x="0" y="18" width="1" height="1" /></bezel> + <bezel name="0.10" element="led"><bounds x="0" y="20" width="1" height="1" /></bezel> + <bezel name="0.11" element="led"><bounds x="0" y="22" width="1" height="1" /></bezel> + <bezel name="0.12" element="led"><bounds x="0" y="24" width="1" height="1" /></bezel> + <bezel name="0.13" element="led"><bounds x="0" y="26" width="1" height="1" /></bezel> + <bezel name="0.14" element="led"><bounds x="0" y="28" width="1" height="1" /></bezel> + <bezel name="0.15" element="led"><bounds x="0" y="30" width="1" height="1" /></bezel> + <bezel name="0.16" element="led"><bounds x="0" y="32" width="1" height="1" /></bezel> + <bezel name="0.17" element="led"><bounds x="0" y="34" width="1" height="1" /></bezel> + <bezel name="0.18" element="led"><bounds x="0" y="36" width="1" height="1" /></bezel> + <bezel name="0.19" element="led"><bounds x="0" y="38" width="1" height="1" /></bezel> + <bezel name="0.20" element="led"><bounds x="0" y="40" width="1" height="1" /></bezel> + <bezel name="0.21" element="led"><bounds x="0" y="42" width="1" height="1" /></bezel> + <bezel name="0.22" element="led"><bounds x="0" y="44" width="1" height="1" /></bezel> + <bezel name="0.23" element="led"><bounds x="0" y="46" width="1" height="1" /></bezel> + <bezel name="0.24" element="led"><bounds x="0" y="48" width="1" height="1" /></bezel> + <bezel name="0.25" element="led"><bounds x="0" y="50" width="1" height="1" /></bezel> + <bezel name="0.26" element="led"><bounds x="0" y="52" width="1" height="1" /></bezel> + <bezel name="0.27" element="led"><bounds x="0" y="54" width="1" height="1" /></bezel> + <bezel name="0.28" element="led"><bounds x="0" y="56" width="1" height="1" /></bezel> + <bezel name="0.29" element="led"><bounds x="0" y="58" width="1" height="1" /></bezel> + <bezel name="0.30" element="led"><bounds x="0" y="60" width="1" height="1" /></bezel> + <bezel name="0.31" element="led"><bounds x="0" y="62" width="1" height="1" /></bezel> - <bezel name="lamp100" element="led"><bounds x="2" y="0" width="1" height="1" /></bezel> - <bezel name="lamp101" element="led"><bounds x="2" y="2" width="1" height="1" /></bezel> - <bezel name="lamp102" element="led"><bounds x="2" y="4" width="1" height="1" /></bezel> - <bezel name="lamp103" element="led"><bounds x="2" y="6" width="1" height="1" /></bezel> - <bezel name="lamp104" element="led"><bounds x="2" y="8" width="1" height="1" /></bezel> - <bezel name="lamp105" element="led"><bounds x="2" y="10" width="1" height="1" /></bezel> - <bezel name="lamp106" element="led"><bounds x="2" y="12" width="1" height="1" /></bezel> - <bezel name="lamp107" element="led"><bounds x="2" y="14" width="1" height="1" /></bezel> - <bezel name="lamp108" element="led"><bounds x="2" y="16" width="1" height="1" /></bezel> - <bezel name="lamp109" element="led"><bounds x="2" y="18" width="1" height="1" /></bezel> - <bezel name="lamp110" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel> - <bezel name="lamp111" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel> - <bezel name="lamp112" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel> - <bezel name="lamp113" element="led"><bounds x="2" y="26" width="1" height="1" /></bezel> - <bezel name="lamp114" element="led"><bounds x="2" y="28" width="1" height="1" /></bezel> - <bezel name="lamp115" element="led"><bounds x="2" y="30" width="1" height="1" /></bezel> - <bezel name="lamp116" element="led"><bounds x="2" y="32" width="1" height="1" /></bezel> - <bezel name="lamp117" element="led"><bounds x="2" y="34" width="1" height="1" /></bezel> - <bezel name="lamp118" element="led"><bounds x="2" y="36" width="1" height="1" /></bezel> - <bezel name="lamp119" element="led"><bounds x="2" y="38" width="1" height="1" /></bezel> - <bezel name="lamp120" element="led"><bounds x="2" y="40" width="1" height="1" /></bezel> - <bezel name="lamp121" element="led"><bounds x="2" y="42" width="1" height="1" /></bezel> - <bezel name="lamp122" element="led"><bounds x="2" y="44" width="1" height="1" /></bezel> - <bezel name="lamp123" element="led"><bounds x="2" y="46" width="1" height="1" /></bezel> - <bezel name="lamp124" element="led"><bounds x="2" y="48" width="1" height="1" /></bezel> - <bezel name="lamp125" element="led"><bounds x="2" y="50" width="1" height="1" /></bezel> - <bezel name="lamp126" element="led"><bounds x="2" y="52" width="1" height="1" /></bezel> - <bezel name="lamp127" element="led"><bounds x="2" y="54" width="1" height="1" /></bezel> - <bezel name="lamp128" element="led"><bounds x="2" y="56" width="1" height="1" /></bezel> - <bezel name="lamp129" element="led"><bounds x="2" y="58" width="1" height="1" /></bezel> - <bezel name="lamp130" element="led"><bounds x="2" y="60" width="1" height="1" /></bezel> - <bezel name="lamp131" element="led"><bounds x="2" y="62" width="1" height="1" /></bezel> + <bezel name="1.0" element="led"><bounds x="2" y="0" width="1" height="1" /></bezel> + <bezel name="1.1" element="led"><bounds x="2" y="2" width="1" height="1" /></bezel> + <bezel name="1.2" element="led"><bounds x="2" y="4" width="1" height="1" /></bezel> + <bezel name="1.3" element="led"><bounds x="2" y="6" width="1" height="1" /></bezel> + <bezel name="1.4" element="led"><bounds x="2" y="8" width="1" height="1" /></bezel> + <bezel name="1.5" element="led"><bounds x="2" y="10" width="1" height="1" /></bezel> + <bezel name="1.6" element="led"><bounds x="2" y="12" width="1" height="1" /></bezel> + <bezel name="1.7" element="led"><bounds x="2" y="14" width="1" height="1" /></bezel> + <bezel name="1.8" element="led"><bounds x="2" y="16" width="1" height="1" /></bezel> + <bezel name="1.9" element="led"><bounds x="2" y="18" width="1" height="1" /></bezel> + <bezel name="1.10" element="led"><bounds x="2" y="20" width="1" height="1" /></bezel> + <bezel name="1.11" element="led"><bounds x="2" y="22" width="1" height="1" /></bezel> + <bezel name="1.12" element="led"><bounds x="2" y="24" width="1" height="1" /></bezel> + <bezel name="1.13" element="led"><bounds x="2" y="26" width="1" height="1" /></bezel> + <bezel name="1.14" element="led"><bounds x="2" y="28" width="1" height="1" /></bezel> + <bezel name="1.15" element="led"><bounds x="2" y="30" width="1" height="1" /></bezel> + <bezel name="1.16" element="led"><bounds x="2" y="32" width="1" height="1" /></bezel> + <bezel name="1.17" element="led"><bounds x="2" y="34" width="1" height="1" /></bezel> + <bezel name="1.18" element="led"><bounds x="2" y="36" width="1" height="1" /></bezel> + <bezel name="1.19" element="led"><bounds x="2" y="38" width="1" height="1" /></bezel> + <bezel name="1.20" element="led"><bounds x="2" y="40" width="1" height="1" /></bezel> + <bezel name="1.21" element="led"><bounds x="2" y="42" width="1" height="1" /></bezel> + <bezel name="1.22" element="led"><bounds x="2" y="44" width="1" height="1" /></bezel> + <bezel name="1.23" element="led"><bounds x="2" y="46" width="1" height="1" /></bezel> + <bezel name="1.24" element="led"><bounds x="2" y="48" width="1" height="1" /></bezel> + <bezel name="1.25" element="led"><bounds x="2" y="50" width="1" height="1" /></bezel> + <bezel name="1.26" element="led"><bounds x="2" y="52" width="1" height="1" /></bezel> + <bezel name="1.27" element="led"><bounds x="2" y="54" width="1" height="1" /></bezel> + <bezel name="1.28" element="led"><bounds x="2" y="56" width="1" height="1" /></bezel> + <bezel name="1.29" element="led"><bounds x="2" y="58" width="1" height="1" /></bezel> + <bezel name="1.30" element="led"><bounds x="2" y="60" width="1" height="1" /></bezel> + <bezel name="1.31" element="led"><bounds x="2" y="62" width="1" height="1" /></bezel> - <bezel name="lamp200" element="led"><bounds x="4" y="0" width="1" height="1" /></bezel> - <bezel name="lamp201" element="led"><bounds x="4" y="2" width="1" height="1" /></bezel> - <bezel name="lamp202" element="led"><bounds x="4" y="4" width="1" height="1" /></bezel> - <bezel name="lamp203" element="led"><bounds x="4" y="6" width="1" height="1" /></bezel> - <bezel name="lamp204" element="led"><bounds x="4" y="8" width="1" height="1" /></bezel> - <bezel name="lamp205" element="led"><bounds x="4" y="10" width="1" height="1" /></bezel> - <bezel name="lamp206" element="led"><bounds x="4" y="12" width="1" height="1" /></bezel> - <bezel name="lamp207" element="led"><bounds x="4" y="14" width="1" height="1" /></bezel> - <bezel name="lamp208" element="led"><bounds x="4" y="16" width="1" height="1" /></bezel> - <bezel name="lamp209" element="led"><bounds x="4" y="18" width="1" height="1" /></bezel> - <bezel name="lamp210" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel> - <bezel name="lamp211" element="led"><bounds x="4" y="22" width="1" height="1" /></bezel> - <bezel name="lamp212" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel> - <bezel name="lamp213" element="led"><bounds x="4" y="26" width="1" height="1" /></bezel> - <bezel name="lamp214" element="led"><bounds x="4" y="28" width="1" height="1" /></bezel> - <bezel name="lamp215" element="led"><bounds x="4" y="30" width="1" height="1" /></bezel> - <bezel name="lamp216" element="led"><bounds x="4" y="32" width="1" height="1" /></bezel> - <bezel name="lamp217" element="led"><bounds x="4" y="34" width="1" height="1" /></bezel> - <bezel name="lamp218" element="led"><bounds x="4" y="36" width="1" height="1" /></bezel> - <bezel name="lamp219" element="led"><bounds x="4" y="38" width="1" height="1" /></bezel> - <bezel name="lamp220" element="led"><bounds x="4" y="40" width="1" height="1" /></bezel> - <bezel name="lamp221" element="led"><bounds x="4" y="42" width="1" height="1" /></bezel> - <bezel name="lamp222" element="led"><bounds x="4" y="44" width="1" height="1" /></bezel> - <bezel name="lamp223" element="led"><bounds x="4" y="46" width="1" height="1" /></bezel> - <bezel name="lamp224" element="led"><bounds x="4" y="48" width="1" height="1" /></bezel> - <bezel name="lamp225" element="led"><bounds x="4" y="50" width="1" height="1" /></bezel> - <bezel name="lamp226" element="led"><bounds x="4" y="52" width="1" height="1" /></bezel> - <bezel name="lamp227" element="led"><bounds x="4" y="54" width="1" height="1" /></bezel> - <bezel name="lamp228" element="led"><bounds x="4" y="56" width="1" height="1" /></bezel> - <bezel name="lamp229" element="led"><bounds x="4" y="58" width="1" height="1" /></bezel> - <bezel name="lamp230" element="led"><bounds x="4" y="60" width="1" height="1" /></bezel> - <bezel name="lamp231" element="led"><bounds x="4" y="62" width="1" height="1" /></bezel> + <bezel name="2.0" element="led"><bounds x="4" y="0" width="1" height="1" /></bezel> + <bezel name="2.1" element="led"><bounds x="4" y="2" width="1" height="1" /></bezel> + <bezel name="2.2" element="led"><bounds x="4" y="4" width="1" height="1" /></bezel> + <bezel name="2.3" element="led"><bounds x="4" y="6" width="1" height="1" /></bezel> + <bezel name="2.4" element="led"><bounds x="4" y="8" width="1" height="1" /></bezel> + <bezel name="2.5" element="led"><bounds x="4" y="10" width="1" height="1" /></bezel> + <bezel name="2.6" element="led"><bounds x="4" y="12" width="1" height="1" /></bezel> + <bezel name="2.7" element="led"><bounds x="4" y="14" width="1" height="1" /></bezel> + <bezel name="2.8" element="led"><bounds x="4" y="16" width="1" height="1" /></bezel> + <bezel name="2.9" element="led"><bounds x="4" y="18" width="1" height="1" /></bezel> + <bezel name="2.10" element="led"><bounds x="4" y="20" width="1" height="1" /></bezel> + <bezel name="2.11" element="led"><bounds x="4" y="22" width="1" height="1" /></bezel> + <bezel name="2.12" element="led"><bounds x="4" y="24" width="1" height="1" /></bezel> + <bezel name="2.13" element="led"><bounds x="4" y="26" width="1" height="1" /></bezel> + <bezel name="2.14" element="led"><bounds x="4" y="28" width="1" height="1" /></bezel> + <bezel name="2.15" element="led"><bounds x="4" y="30" width="1" height="1" /></bezel> + <bezel name="2.16" element="led"><bounds x="4" y="32" width="1" height="1" /></bezel> + <bezel name="2.17" element="led"><bounds x="4" y="34" width="1" height="1" /></bezel> + <bezel name="2.18" element="led"><bounds x="4" y="36" width="1" height="1" /></bezel> + <bezel name="2.19" element="led"><bounds x="4" y="38" width="1" height="1" /></bezel> + <bezel name="2.20" element="led"><bounds x="4" y="40" width="1" height="1" /></bezel> + <bezel name="2.21" element="led"><bounds x="4" y="42" width="1" height="1" /></bezel> + <bezel name="2.22" element="led"><bounds x="4" y="44" width="1" height="1" /></bezel> + <bezel name="2.23" element="led"><bounds x="4" y="46" width="1" height="1" /></bezel> + <bezel name="2.24" element="led"><bounds x="4" y="48" width="1" height="1" /></bezel> + <bezel name="2.25" element="led"><bounds x="4" y="50" width="1" height="1" /></bezel> + <bezel name="2.26" element="led"><bounds x="4" y="52" width="1" height="1" /></bezel> + <bezel name="2.27" element="led"><bounds x="4" y="54" width="1" height="1" /></bezel> + <bezel name="2.28" element="led"><bounds x="4" y="56" width="1" height="1" /></bezel> + <bezel name="2.29" element="led"><bounds x="4" y="58" width="1" height="1" /></bezel> + <bezel name="2.30" element="led"><bounds x="4" y="60" width="1" height="1" /></bezel> + <bezel name="2.31" element="led"><bounds x="4" y="62" width="1" height="1" /></bezel> - <bezel name="lamp300" element="led"><bounds x="6" y="0" width="1" height="1" /></bezel> - <bezel name="lamp301" element="led"><bounds x="6" y="2" width="1" height="1" /></bezel> - <bezel name="lamp302" element="led"><bounds x="6" y="4" width="1" height="1" /></bezel> - <bezel name="lamp303" element="led"><bounds x="6" y="6" width="1" height="1" /></bezel> - <bezel name="lamp304" element="led"><bounds x="6" y="8" width="1" height="1" /></bezel> - <bezel name="lamp305" element="led"><bounds x="6" y="10" width="1" height="1" /></bezel> - <bezel name="lamp306" element="led"><bounds x="6" y="12" width="1" height="1" /></bezel> - <bezel name="lamp307" element="led"><bounds x="6" y="14" width="1" height="1" /></bezel> - <bezel name="lamp308" element="led"><bounds x="6" y="16" width="1" height="1" /></bezel> - <bezel name="lamp309" element="led"><bounds x="6" y="18" width="1" height="1" /></bezel> - <bezel name="lamp310" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel> - <bezel name="lamp311" element="led"><bounds x="6" y="22" width="1" height="1" /></bezel> - <bezel name="lamp312" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel> - <bezel name="lamp313" element="led"><bounds x="6" y="26" width="1" height="1" /></bezel> - <bezel name="lamp314" element="led"><bounds x="6" y="28" width="1" height="1" /></bezel> - <bezel name="lamp315" element="led"><bounds x="6" y="30" width="1" height="1" /></bezel> - <bezel name="lamp316" element="led"><bounds x="6" y="32" width="1" height="1" /></bezel> - <bezel name="lamp317" element="led"><bounds x="6" y="34" width="1" height="1" /></bezel> - <bezel name="lamp318" element="led"><bounds x="6" y="36" width="1" height="1" /></bezel> - <bezel name="lamp319" element="led"><bounds x="6" y="38" width="1" height="1" /></bezel> - <bezel name="lamp320" element="led"><bounds x="6" y="40" width="1" height="1" /></bezel> - <bezel name="lamp321" element="led"><bounds x="6" y="42" width="1" height="1" /></bezel> - <bezel name="lamp322" element="led"><bounds x="6" y="44" width="1" height="1" /></bezel> - <bezel name="lamp323" element="led"><bounds x="6" y="46" width="1" height="1" /></bezel> - <bezel name="lamp324" element="led"><bounds x="6" y="48" width="1" height="1" /></bezel> - <bezel name="lamp325" element="led"><bounds x="6" y="50" width="1" height="1" /></bezel> - <bezel name="lamp326" element="led"><bounds x="6" y="52" width="1" height="1" /></bezel> - <bezel name="lamp327" element="led"><bounds x="6" y="54" width="1" height="1" /></bezel> - <bezel name="lamp328" element="led"><bounds x="6" y="56" width="1" height="1" /></bezel> - <bezel name="lamp329" element="led"><bounds x="6" y="58" width="1" height="1" /></bezel> - <bezel name="lamp330" element="led"><bounds x="6" y="60" width="1" height="1" /></bezel> - <bezel name="lamp331" element="led"><bounds x="6" y="62" width="1" height="1" /></bezel> + <bezel name="3.0" element="led"><bounds x="6" y="0" width="1" height="1" /></bezel> + <bezel name="3.1" element="led"><bounds x="6" y="2" width="1" height="1" /></bezel> + <bezel name="3.2" element="led"><bounds x="6" y="4" width="1" height="1" /></bezel> + <bezel name="3.3" element="led"><bounds x="6" y="6" width="1" height="1" /></bezel> + <bezel name="3.4" element="led"><bounds x="6" y="8" width="1" height="1" /></bezel> + <bezel name="3.5" element="led"><bounds x="6" y="10" width="1" height="1" /></bezel> + <bezel name="3.6" element="led"><bounds x="6" y="12" width="1" height="1" /></bezel> + <bezel name="3.7" element="led"><bounds x="6" y="14" width="1" height="1" /></bezel> + <bezel name="3.8" element="led"><bounds x="6" y="16" width="1" height="1" /></bezel> + <bezel name="3.9" element="led"><bounds x="6" y="18" width="1" height="1" /></bezel> + <bezel name="3.10" element="led"><bounds x="6" y="20" width="1" height="1" /></bezel> + <bezel name="3.11" element="led"><bounds x="6" y="22" width="1" height="1" /></bezel> + <bezel name="3.12" element="led"><bounds x="6" y="24" width="1" height="1" /></bezel> + <bezel name="3.13" element="led"><bounds x="6" y="26" width="1" height="1" /></bezel> + <bezel name="3.14" element="led"><bounds x="6" y="28" width="1" height="1" /></bezel> + <bezel name="3.15" element="led"><bounds x="6" y="30" width="1" height="1" /></bezel> + <bezel name="3.16" element="led"><bounds x="6" y="32" width="1" height="1" /></bezel> + <bezel name="3.17" element="led"><bounds x="6" y="34" width="1" height="1" /></bezel> + <bezel name="3.18" element="led"><bounds x="6" y="36" width="1" height="1" /></bezel> + <bezel name="3.19" element="led"><bounds x="6" y="38" width="1" height="1" /></bezel> + <bezel name="3.20" element="led"><bounds x="6" y="40" width="1" height="1" /></bezel> + <bezel name="3.21" element="led"><bounds x="6" y="42" width="1" height="1" /></bezel> + <bezel name="3.22" element="led"><bounds x="6" y="44" width="1" height="1" /></bezel> + <bezel name="3.23" element="led"><bounds x="6" y="46" width="1" height="1" /></bezel> + <bezel name="3.24" element="led"><bounds x="6" y="48" width="1" height="1" /></bezel> + <bezel name="3.25" element="led"><bounds x="6" y="50" width="1" height="1" /></bezel> + <bezel name="3.26" element="led"><bounds x="6" y="52" width="1" height="1" /></bezel> + <bezel name="3.27" element="led"><bounds x="6" y="54" width="1" height="1" /></bezel> + <bezel name="3.28" element="led"><bounds x="6" y="56" width="1" height="1" /></bezel> + <bezel name="3.29" element="led"><bounds x="6" y="58" width="1" height="1" /></bezel> + <bezel name="3.30" element="led"><bounds x="6" y="60" width="1" height="1" /></bezel> + <bezel name="3.31" element="led"><bounds x="6" y="62" width="1" height="1" /></bezel> - <bezel name="lamp400" element="led"><bounds x="8" y="0" width="1" height="1" /></bezel> - <bezel name="lamp401" element="led"><bounds x="8" y="2" width="1" height="1" /></bezel> - <bezel name="lamp402" element="led"><bounds x="8" y="4" width="1" height="1" /></bezel> - <bezel name="lamp403" element="led"><bounds x="8" y="6" width="1" height="1" /></bezel> - <bezel name="lamp404" element="led"><bounds x="8" y="8" width="1" height="1" /></bezel> - <bezel name="lamp405" element="led"><bounds x="8" y="10" width="1" height="1" /></bezel> - <bezel name="lamp406" element="led"><bounds x="8" y="12" width="1" height="1" /></bezel> - <bezel name="lamp407" element="led"><bounds x="8" y="14" width="1" height="1" /></bezel> - <bezel name="lamp408" element="led"><bounds x="8" y="16" width="1" height="1" /></bezel> - <bezel name="lamp409" element="led"><bounds x="8" y="18" width="1" height="1" /></bezel> - <bezel name="lamp410" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel> - <bezel name="lamp411" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel> - <bezel name="lamp412" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel> - <bezel name="lamp413" element="led"><bounds x="8" y="26" width="1" height="1" /></bezel> - <bezel name="lamp414" element="led"><bounds x="8" y="28" width="1" height="1" /></bezel> - <bezel name="lamp415" element="led"><bounds x="8" y="30" width="1" height="1" /></bezel> - <bezel name="lamp416" element="led"><bounds x="8" y="32" width="1" height="1" /></bezel> - <bezel name="lamp417" element="led"><bounds x="8" y="34" width="1" height="1" /></bezel> - <bezel name="lamp418" element="led"><bounds x="8" y="36" width="1" height="1" /></bezel> - <bezel name="lamp419" element="led"><bounds x="8" y="38" width="1" height="1" /></bezel> - <bezel name="lamp420" element="led"><bounds x="8" y="40" width="1" height="1" /></bezel> - <bezel name="lamp421" element="led"><bounds x="8" y="42" width="1" height="1" /></bezel> - <bezel name="lamp422" element="led"><bounds x="8" y="44" width="1" height="1" /></bezel> - <bezel name="lamp423" element="led"><bounds x="8" y="46" width="1" height="1" /></bezel> - <bezel name="lamp424" element="led"><bounds x="8" y="48" width="1" height="1" /></bezel> - <bezel name="lamp425" element="led"><bounds x="8" y="50" width="1" height="1" /></bezel> - <bezel name="lamp426" element="led"><bounds x="8" y="52" width="1" height="1" /></bezel> - <bezel name="lamp427" element="led"><bounds x="8" y="54" width="1" height="1" /></bezel> - <bezel name="lamp428" element="led"><bounds x="8" y="56" width="1" height="1" /></bezel> - <bezel name="lamp429" element="led"><bounds x="8" y="58" width="1" height="1" /></bezel> - <bezel name="lamp430" element="led"><bounds x="8" y="60" width="1" height="1" /></bezel> - <bezel name="lamp431" element="led"><bounds x="8" y="62" width="1" height="1" /></bezel> + <bezel name="4.0" element="led"><bounds x="8" y="0" width="1" height="1" /></bezel> + <bezel name="4.1" element="led"><bounds x="8" y="2" width="1" height="1" /></bezel> + <bezel name="4.2" element="led"><bounds x="8" y="4" width="1" height="1" /></bezel> + <bezel name="4.3" element="led"><bounds x="8" y="6" width="1" height="1" /></bezel> + <bezel name="4.4" element="led"><bounds x="8" y="8" width="1" height="1" /></bezel> + <bezel name="4.5" element="led"><bounds x="8" y="10" width="1" height="1" /></bezel> + <bezel name="4.6" element="led"><bounds x="8" y="12" width="1" height="1" /></bezel> + <bezel name="4.7" element="led"><bounds x="8" y="14" width="1" height="1" /></bezel> + <bezel name="4.8" element="led"><bounds x="8" y="16" width="1" height="1" /></bezel> + <bezel name="4.9" element="led"><bounds x="8" y="18" width="1" height="1" /></bezel> + <bezel name="4.10" element="led"><bounds x="8" y="20" width="1" height="1" /></bezel> + <bezel name="4.11" element="led"><bounds x="8" y="22" width="1" height="1" /></bezel> + <bezel name="4.12" element="led"><bounds x="8" y="24" width="1" height="1" /></bezel> + <bezel name="4.13" element="led"><bounds x="8" y="26" width="1" height="1" /></bezel> + <bezel name="4.14" element="led"><bounds x="8" y="28" width="1" height="1" /></bezel> + <bezel name="4.15" element="led"><bounds x="8" y="30" width="1" height="1" /></bezel> + <bezel name="4.16" element="led"><bounds x="8" y="32" width="1" height="1" /></bezel> + <bezel name="4.17" element="led"><bounds x="8" y="34" width="1" height="1" /></bezel> + <bezel name="4.18" element="led"><bounds x="8" y="36" width="1" height="1" /></bezel> + <bezel name="4.19" element="led"><bounds x="8" y="38" width="1" height="1" /></bezel> + <bezel name="4.20" element="led"><bounds x="8" y="40" width="1" height="1" /></bezel> + <bezel name="4.21" element="led"><bounds x="8" y="42" width="1" height="1" /></bezel> + <bezel name="4.22" element="led"><bounds x="8" y="44" width="1" height="1" /></bezel> + <bezel name="4.23" element="led"><bounds x="8" y="46" width="1" height="1" /></bezel> + <bezel name="4.24" element="led"><bounds x="8" y="48" width="1" height="1" /></bezel> + <bezel name="4.25" element="led"><bounds x="8" y="50" width="1" height="1" /></bezel> + <bezel name="4.26" element="led"><bounds x="8" y="52" width="1" height="1" /></bezel> + <bezel name="4.27" element="led"><bounds x="8" y="54" width="1" height="1" /></bezel> + <bezel name="4.28" element="led"><bounds x="8" y="56" width="1" height="1" /></bezel> + <bezel name="4.29" element="led"><bounds x="8" y="58" width="1" height="1" /></bezel> + <bezel name="4.30" element="led"><bounds x="8" y="60" width="1" height="1" /></bezel> + <bezel name="4.31" element="led"><bounds x="8" y="62" width="1" height="1" /></bezel> - <bezel name="lamp500" element="led"><bounds x="10" y="0" width="1" height="1" /></bezel> - <bezel name="lamp501" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel> - <bezel name="lamp502" element="led"><bounds x="10" y="4" width="1" height="1" /></bezel> - <bezel name="lamp503" element="led"><bounds x="10" y="6" width="1" height="1" /></bezel> - <bezel name="lamp504" element="led"><bounds x="10" y="8" width="1" height="1" /></bezel> - <bezel name="lamp505" element="led"><bounds x="10" y="10" width="1" height="1" /></bezel> - <bezel name="lamp506" element="led"><bounds x="10" y="12" width="1" height="1" /></bezel> - <bezel name="lamp507" element="led"><bounds x="10" y="14" width="1" height="1" /></bezel> - <bezel name="lamp508" element="led"><bounds x="10" y="16" width="1" height="1" /></bezel> - <bezel name="lamp509" element="led"><bounds x="10" y="18" width="1" height="1" /></bezel> - <bezel name="lamp510" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel> - <bezel name="lamp511" element="led"><bounds x="10" y="22" width="1" height="1" /></bezel> - <bezel name="lamp512" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel> - <bezel name="lamp513" element="led"><bounds x="10" y="26" width="1" height="1" /></bezel> - <bezel name="lamp514" element="led"><bounds x="10" y="28" width="1" height="1" /></bezel> - <bezel name="lamp515" element="led"><bounds x="10" y="30" width="1" height="1" /></bezel> - <bezel name="lamp516" element="led"><bounds x="10" y="32" width="1" height="1" /></bezel> - <bezel name="lamp517" element="led"><bounds x="10" y="34" width="1" height="1" /></bezel> - <bezel name="lamp518" element="led"><bounds x="10" y="36" width="1" height="1" /></bezel> - <bezel name="lamp519" element="led"><bounds x="10" y="38" width="1" height="1" /></bezel> - <bezel name="lamp520" element="led"><bounds x="10" y="40" width="1" height="1" /></bezel> - <bezel name="lamp521" element="led"><bounds x="10" y="42" width="1" height="1" /></bezel> - <bezel name="lamp522" element="led"><bounds x="10" y="44" width="1" height="1" /></bezel> - <bezel name="lamp523" element="led"><bounds x="10" y="46" width="1" height="1" /></bezel> - <bezel name="lamp524" element="led"><bounds x="10" y="48" width="1" height="1" /></bezel> - <bezel name="lamp525" element="led"><bounds x="10" y="50" width="1" height="1" /></bezel> - <bezel name="lamp526" element="led"><bounds x="10" y="52" width="1" height="1" /></bezel> - <bezel name="lamp527" element="led"><bounds x="10" y="54" width="1" height="1" /></bezel> - <bezel name="lamp528" element="led"><bounds x="10" y="56" width="1" height="1" /></bezel> - <bezel name="lamp529" element="led"><bounds x="10" y="58" width="1" height="1" /></bezel> - <bezel name="lamp530" element="led"><bounds x="10" y="60" width="1" height="1" /></bezel> - <bezel name="lamp531" element="led"><bounds x="10" y="62" width="1" height="1" /></bezel> + <bezel name="5.0" element="led"><bounds x="10" y="0" width="1" height="1" /></bezel> + <bezel name="5.1" element="led"><bounds x="10" y="2" width="1" height="1" /></bezel> + <bezel name="5.2" element="led"><bounds x="10" y="4" width="1" height="1" /></bezel> + <bezel name="5.3" element="led"><bounds x="10" y="6" width="1" height="1" /></bezel> + <bezel name="5.4" element="led"><bounds x="10" y="8" width="1" height="1" /></bezel> + <bezel name="5.5" element="led"><bounds x="10" y="10" width="1" height="1" /></bezel> + <bezel name="5.6" element="led"><bounds x="10" y="12" width="1" height="1" /></bezel> + <bezel name="5.7" element="led"><bounds x="10" y="14" width="1" height="1" /></bezel> + <bezel name="5.8" element="led"><bounds x="10" y="16" width="1" height="1" /></bezel> + <bezel name="5.9" element="led"><bounds x="10" y="18" width="1" height="1" /></bezel> + <bezel name="5.10" element="led"><bounds x="10" y="20" width="1" height="1" /></bezel> + <bezel name="5.11" element="led"><bounds x="10" y="22" width="1" height="1" /></bezel> + <bezel name="5.12" element="led"><bounds x="10" y="24" width="1" height="1" /></bezel> + <bezel name="5.13" element="led"><bounds x="10" y="26" width="1" height="1" /></bezel> + <bezel name="5.14" element="led"><bounds x="10" y="28" width="1" height="1" /></bezel> + <bezel name="5.15" element="led"><bounds x="10" y="30" width="1" height="1" /></bezel> + <bezel name="5.16" element="led"><bounds x="10" y="32" width="1" height="1" /></bezel> + <bezel name="5.17" element="led"><bounds x="10" y="34" width="1" height="1" /></bezel> + <bezel name="5.18" element="led"><bounds x="10" y="36" width="1" height="1" /></bezel> + <bezel name="5.19" element="led"><bounds x="10" y="38" width="1" height="1" /></bezel> + <bezel name="5.20" element="led"><bounds x="10" y="40" width="1" height="1" /></bezel> + <bezel name="5.21" element="led"><bounds x="10" y="42" width="1" height="1" /></bezel> + <bezel name="5.22" element="led"><bounds x="10" y="44" width="1" height="1" /></bezel> + <bezel name="5.23" element="led"><bounds x="10" y="46" width="1" height="1" /></bezel> + <bezel name="5.24" element="led"><bounds x="10" y="48" width="1" height="1" /></bezel> + <bezel name="5.25" element="led"><bounds x="10" y="50" width="1" height="1" /></bezel> + <bezel name="5.26" element="led"><bounds x="10" y="52" width="1" height="1" /></bezel> + <bezel name="5.27" element="led"><bounds x="10" y="54" width="1" height="1" /></bezel> + <bezel name="5.28" element="led"><bounds x="10" y="56" width="1" height="1" /></bezel> + <bezel name="5.29" element="led"><bounds x="10" y="58" width="1" height="1" /></bezel> + <bezel name="5.30" element="led"><bounds x="10" y="60" width="1" height="1" /></bezel> + <bezel name="5.31" element="led"><bounds x="10" y="62" width="1" height="1" /></bezel> - <bezel name="lamp600" element="led"><bounds x="12" y="0" width="1" height="1" /></bezel> - <bezel name="lamp601" element="led"><bounds x="12" y="2" width="1" height="1" /></bezel> - <bezel name="lamp602" element="led"><bounds x="12" y="4" width="1" height="1" /></bezel> - <bezel name="lamp603" element="led"><bounds x="12" y="6" width="1" height="1" /></bezel> - <bezel name="lamp604" element="led"><bounds x="12" y="8" width="1" height="1" /></bezel> - <bezel name="lamp605" element="led"><bounds x="12" y="10" width="1" height="1" /></bezel> - <bezel name="lamp606" element="led"><bounds x="12" y="12" width="1" height="1" /></bezel> - <bezel name="lamp607" element="led"><bounds x="12" y="14" width="1" height="1" /></bezel> - <bezel name="lamp608" element="led"><bounds x="12" y="16" width="1" height="1" /></bezel> - <bezel name="lamp609" element="led"><bounds x="12" y="18" width="1" height="1" /></bezel> - <bezel name="lamp610" element="led"><bounds x="12" y="20" width="1" height="1" /></bezel> - <bezel name="lamp611" element="led"><bounds x="12" y="22" width="1" height="1" /></bezel> - <bezel name="lamp612" element="led"><bounds x="12" y="24" width="1" height="1" /></bezel> - <bezel name="lamp613" element="led"><bounds x="12" y="26" width="1" height="1" /></bezel> - <bezel name="lamp614" element="led"><bounds x="12" y="28" width="1" height="1" /></bezel> - <bezel name="lamp615" element="led"><bounds x="12" y="30" width="1" height="1" /></bezel> - <bezel name="lamp616" element="led"><bounds x="12" y="32" width="1" height="1" /></bezel> - <bezel name="lamp617" element="led"><bounds x="12" y="34" width="1" height="1" /></bezel> - <bezel name="lamp618" element="led"><bounds x="12" y="36" width="1" height="1" /></bezel> - <bezel name="lamp619" element="led"><bounds x="12" y="38" width="1" height="1" /></bezel> - <bezel name="lamp620" element="led"><bounds x="12" y="40" width="1" height="1" /></bezel> - <bezel name="lamp621" element="led"><bounds x="12" y="42" width="1" height="1" /></bezel> - <bezel name="lamp622" element="led"><bounds x="12" y="44" width="1" height="1" /></bezel> - <bezel name="lamp623" element="led"><bounds x="12" y="46" width="1" height="1" /></bezel> - <bezel name="lamp624" element="led"><bounds x="12" y="48" width="1" height="1" /></bezel> - <bezel name="lamp625" element="led"><bounds x="12" y="50" width="1" height="1" /></bezel> - <bezel name="lamp626" element="led"><bounds x="12" y="52" width="1" height="1" /></bezel> - <bezel name="lamp627" element="led"><bounds x="12" y="54" width="1" height="1" /></bezel> - <bezel name="lamp628" element="led"><bounds x="12" y="56" width="1" height="1" /></bezel> - <bezel name="lamp629" element="led"><bounds x="12" y="58" width="1" height="1" /></bezel> - <bezel name="lamp630" element="led"><bounds x="12" y="60" width="1" height="1" /></bezel> - <bezel name="lamp631" element="led"><bounds x="12" y="62" width="1" height="1" /></bezel> + <bezel name="6.0" element="led"><bounds x="12" y="0" width="1" height="1" /></bezel> + <bezel name="6.1" element="led"><bounds x="12" y="2" width="1" height="1" /></bezel> + <bezel name="6.2" element="led"><bounds x="12" y="4" width="1" height="1" /></bezel> + <bezel name="6.3" element="led"><bounds x="12" y="6" width="1" height="1" /></bezel> + <bezel name="6.4" element="led"><bounds x="12" y="8" width="1" height="1" /></bezel> + <bezel name="6.5" element="led"><bounds x="12" y="10" width="1" height="1" /></bezel> + <bezel name="6.6" element="led"><bounds x="12" y="12" width="1" height="1" /></bezel> + <bezel name="6.7" element="led"><bounds x="12" y="14" width="1" height="1" /></bezel> + <bezel name="6.8" element="led"><bounds x="12" y="16" width="1" height="1" /></bezel> + <bezel name="6.9" element="led"><bounds x="12" y="18" width="1" height="1" /></bezel> + <bezel name="6.10" element="led"><bounds x="12" y="20" width="1" height="1" /></bezel> + <bezel name="6.11" element="led"><bounds x="12" y="22" width="1" height="1" /></bezel> + <bezel name="6.12" element="led"><bounds x="12" y="24" width="1" height="1" /></bezel> + <bezel name="6.13" element="led"><bounds x="12" y="26" width="1" height="1" /></bezel> + <bezel name="6.14" element="led"><bounds x="12" y="28" width="1" height="1" /></bezel> + <bezel name="6.15" element="led"><bounds x="12" y="30" width="1" height="1" /></bezel> + <bezel name="6.16" element="led"><bounds x="12" y="32" width="1" height="1" /></bezel> + <bezel name="6.17" element="led"><bounds x="12" y="34" width="1" height="1" /></bezel> + <bezel name="6.18" element="led"><bounds x="12" y="36" width="1" height="1" /></bezel> + <bezel name="6.19" element="led"><bounds x="12" y="38" width="1" height="1" /></bezel> + <bezel name="6.20" element="led"><bounds x="12" y="40" width="1" height="1" /></bezel> + <bezel name="6.21" element="led"><bounds x="12" y="42" width="1" height="1" /></bezel> + <bezel name="6.22" element="led"><bounds x="12" y="44" width="1" height="1" /></bezel> + <bezel name="6.23" element="led"><bounds x="12" y="46" width="1" height="1" /></bezel> + <bezel name="6.24" element="led"><bounds x="12" y="48" width="1" height="1" /></bezel> + <bezel name="6.25" element="led"><bounds x="12" y="50" width="1" height="1" /></bezel> + <bezel name="6.26" element="led"><bounds x="12" y="52" width="1" height="1" /></bezel> + <bezel name="6.27" element="led"><bounds x="12" y="54" width="1" height="1" /></bezel> + <bezel name="6.28" element="led"><bounds x="12" y="56" width="1" height="1" /></bezel> + <bezel name="6.29" element="led"><bounds x="12" y="58" width="1" height="1" /></bezel> + <bezel name="6.30" element="led"><bounds x="12" y="60" width="1" height="1" /></bezel> + <bezel name="6.31" element="led"><bounds x="12" y="62" width="1" height="1" /></bezel> - <bezel name="lamp700" element="led"><bounds x="14" y="0" width="1" height="1" /></bezel> - <bezel name="lamp701" element="led"><bounds x="14" y="2" width="1" height="1" /></bezel> - <bezel name="lamp702" element="led"><bounds x="14" y="4" width="1" height="1" /></bezel> - <bezel name="lamp703" element="led"><bounds x="14" y="6" width="1" height="1" /></bezel> - <bezel name="lamp704" element="led"><bounds x="14" y="8" width="1" height="1" /></bezel> - <bezel name="lamp705" element="led"><bounds x="14" y="10" width="1" height="1" /></bezel> - <bezel name="lamp706" element="led"><bounds x="14" y="12" width="1" height="1" /></bezel> - <bezel name="lamp707" element="led"><bounds x="14" y="14" width="1" height="1" /></bezel> - <bezel name="lamp708" element="led"><bounds x="14" y="16" width="1" height="1" /></bezel> - <bezel name="lamp709" element="led"><bounds x="14" y="18" width="1" height="1" /></bezel> - <bezel name="lamp710" element="led"><bounds x="14" y="20" width="1" height="1" /></bezel> - <bezel name="lamp711" element="led"><bounds x="14" y="22" width="1" height="1" /></bezel> - <bezel name="lamp712" element="led"><bounds x="14" y="24" width="1" height="1" /></bezel> - <bezel name="lamp713" element="led"><bounds x="14" y="26" width="1" height="1" /></bezel> - <bezel name="lamp714" element="led"><bounds x="14" y="28" width="1" height="1" /></bezel> - <bezel name="lamp715" element="led"><bounds x="14" y="30" width="1" height="1" /></bezel> - <bezel name="lamp716" element="led"><bounds x="14" y="32" width="1" height="1" /></bezel> - <bezel name="lamp717" element="led"><bounds x="14" y="34" width="1" height="1" /></bezel> - <bezel name="lamp718" element="led"><bounds x="14" y="36" width="1" height="1" /></bezel> - <bezel name="lamp719" element="led"><bounds x="14" y="38" width="1" height="1" /></bezel> - <bezel name="lamp720" element="led"><bounds x="14" y="40" width="1" height="1" /></bezel> - <bezel name="lamp721" element="led"><bounds x="14" y="42" width="1" height="1" /></bezel> - <bezel name="lamp722" element="led"><bounds x="14" y="44" width="1" height="1" /></bezel> - <bezel name="lamp723" element="led"><bounds x="14" y="46" width="1" height="1" /></bezel> - <bezel name="lamp724" element="led"><bounds x="14" y="48" width="1" height="1" /></bezel> - <bezel name="lamp725" element="led"><bounds x="14" y="50" width="1" height="1" /></bezel> - <bezel name="lamp726" element="led"><bounds x="14" y="52" width="1" height="1" /></bezel> - <bezel name="lamp727" element="led"><bounds x="14" y="54" width="1" height="1" /></bezel> - <bezel name="lamp728" element="led"><bounds x="14" y="56" width="1" height="1" /></bezel> - <bezel name="lamp729" element="led"><bounds x="14" y="58" width="1" height="1" /></bezel> - <bezel name="lamp730" element="led"><bounds x="14" y="60" width="1" height="1" /></bezel> - <bezel name="lamp731" element="led"><bounds x="14" y="62" width="1" height="1" /></bezel> + <bezel name="7.0" element="led"><bounds x="14" y="0" width="1" height="1" /></bezel> + <bezel name="7.1" element="led"><bounds x="14" y="2" width="1" height="1" /></bezel> + <bezel name="7.2" element="led"><bounds x="14" y="4" width="1" height="1" /></bezel> + <bezel name="7.3" element="led"><bounds x="14" y="6" width="1" height="1" /></bezel> + <bezel name="7.4" element="led"><bounds x="14" y="8" width="1" height="1" /></bezel> + <bezel name="7.5" element="led"><bounds x="14" y="10" width="1" height="1" /></bezel> + <bezel name="7.6" element="led"><bounds x="14" y="12" width="1" height="1" /></bezel> + <bezel name="7.7" element="led"><bounds x="14" y="14" width="1" height="1" /></bezel> + <bezel name="7.8" element="led"><bounds x="14" y="16" width="1" height="1" /></bezel> + <bezel name="7.9" element="led"><bounds x="14" y="18" width="1" height="1" /></bezel> + <bezel name="7.10" element="led"><bounds x="14" y="20" width="1" height="1" /></bezel> + <bezel name="7.11" element="led"><bounds x="14" y="22" width="1" height="1" /></bezel> + <bezel name="7.12" element="led"><bounds x="14" y="24" width="1" height="1" /></bezel> + <bezel name="7.13" element="led"><bounds x="14" y="26" width="1" height="1" /></bezel> + <bezel name="7.14" element="led"><bounds x="14" y="28" width="1" height="1" /></bezel> + <bezel name="7.15" element="led"><bounds x="14" y="30" width="1" height="1" /></bezel> + <bezel name="7.16" element="led"><bounds x="14" y="32" width="1" height="1" /></bezel> + <bezel name="7.17" element="led"><bounds x="14" y="34" width="1" height="1" /></bezel> + <bezel name="7.18" element="led"><bounds x="14" y="36" width="1" height="1" /></bezel> + <bezel name="7.19" element="led"><bounds x="14" y="38" width="1" height="1" /></bezel> + <bezel name="7.20" element="led"><bounds x="14" y="40" width="1" height="1" /></bezel> + <bezel name="7.21" element="led"><bounds x="14" y="42" width="1" height="1" /></bezel> + <bezel name="7.22" element="led"><bounds x="14" y="44" width="1" height="1" /></bezel> + <bezel name="7.23" element="led"><bounds x="14" y="46" width="1" height="1" /></bezel> + <bezel name="7.24" element="led"><bounds x="14" y="48" width="1" height="1" /></bezel> + <bezel name="7.25" element="led"><bounds x="14" y="50" width="1" height="1" /></bezel> + <bezel name="7.26" element="led"><bounds x="14" y="52" width="1" height="1" /></bezel> + <bezel name="7.27" element="led"><bounds x="14" y="54" width="1" height="1" /></bezel> + <bezel name="7.28" element="led"><bounds x="14" y="56" width="1" height="1" /></bezel> + <bezel name="7.29" element="led"><bounds x="14" y="58" width="1" height="1" /></bezel> + <bezel name="7.30" element="led"><bounds x="14" y="60" width="1" height="1" /></bezel> + <bezel name="7.31" element="led"><bounds x="14" y="62" width="1" height="1" /></bezel> - <bezel name="lamp800" element="led"><bounds x="16" y="0" width="1" height="1" /></bezel> - <bezel name="lamp801" element="led"><bounds x="16" y="2" width="1" height="1" /></bezel> - <bezel name="lamp802" element="led"><bounds x="16" y="4" width="1" height="1" /></bezel> - <bezel name="lamp803" element="led"><bounds x="16" y="6" width="1" height="1" /></bezel> - <bezel name="lamp804" element="led"><bounds x="16" y="8" width="1" height="1" /></bezel> - <bezel name="lamp805" element="led"><bounds x="16" y="10" width="1" height="1" /></bezel> - <bezel name="lamp806" element="led"><bounds x="16" y="12" width="1" height="1" /></bezel> - <bezel name="lamp807" element="led"><bounds x="16" y="14" width="1" height="1" /></bezel> - <bezel name="lamp808" element="led"><bounds x="16" y="16" width="1" height="1" /></bezel> - <bezel name="lamp809" element="led"><bounds x="16" y="18" width="1" height="1" /></bezel> - <bezel name="lamp810" element="led"><bounds x="16" y="20" width="1" height="1" /></bezel> - <bezel name="lamp811" element="led"><bounds x="16" y="22" width="1" height="1" /></bezel> - <bezel name="lamp812" element="led"><bounds x="16" y="24" width="1" height="1" /></bezel> - <bezel name="lamp813" element="led"><bounds x="16" y="26" width="1" height="1" /></bezel> - <bezel name="lamp814" element="led"><bounds x="16" y="28" width="1" height="1" /></bezel> - <bezel name="lamp815" element="led"><bounds x="16" y="30" width="1" height="1" /></bezel> - <bezel name="lamp816" element="led"><bounds x="16" y="32" width="1" height="1" /></bezel> - <bezel name="lamp817" element="led"><bounds x="16" y="34" width="1" height="1" /></bezel> - <bezel name="lamp818" element="led"><bounds x="16" y="36" width="1" height="1" /></bezel> - <bezel name="lamp819" element="led"><bounds x="16" y="38" width="1" height="1" /></bezel> - <bezel name="lamp820" element="led"><bounds x="16" y="40" width="1" height="1" /></bezel> - <bezel name="lamp821" element="led"><bounds x="16" y="42" width="1" height="1" /></bezel> - <bezel name="lamp822" element="led"><bounds x="16" y="44" width="1" height="1" /></bezel> - <bezel name="lamp823" element="led"><bounds x="16" y="46" width="1" height="1" /></bezel> - <bezel name="lamp824" element="led"><bounds x="16" y="48" width="1" height="1" /></bezel> - <bezel name="lamp825" element="led"><bounds x="16" y="50" width="1" height="1" /></bezel> - <bezel name="lamp826" element="led"><bounds x="16" y="52" width="1" height="1" /></bezel> - <bezel name="lamp827" element="led"><bounds x="16" y="54" width="1" height="1" /></bezel> - <bezel name="lamp828" element="led"><bounds x="16" y="56" width="1" height="1" /></bezel> - <bezel name="lamp829" element="led"><bounds x="16" y="58" width="1" height="1" /></bezel> - <bezel name="lamp830" element="led"><bounds x="16" y="60" width="1" height="1" /></bezel> - <bezel name="lamp831" element="led"><bounds x="16" y="62" width="1" height="1" /></bezel> + <bezel name="8.0" element="led"><bounds x="16" y="0" width="1" height="1" /></bezel> + <bezel name="8.1" element="led"><bounds x="16" y="2" width="1" height="1" /></bezel> + <bezel name="8.2" element="led"><bounds x="16" y="4" width="1" height="1" /></bezel> + <bezel name="8.3" element="led"><bounds x="16" y="6" width="1" height="1" /></bezel> + <bezel name="8.4" element="led"><bounds x="16" y="8" width="1" height="1" /></bezel> + <bezel name="8.5" element="led"><bounds x="16" y="10" width="1" height="1" /></bezel> + <bezel name="8.6" element="led"><bounds x="16" y="12" width="1" height="1" /></bezel> + <bezel name="8.7" element="led"><bounds x="16" y="14" width="1" height="1" /></bezel> + <bezel name="8.8" element="led"><bounds x="16" y="16" width="1" height="1" /></bezel> + <bezel name="8.9" element="led"><bounds x="16" y="18" width="1" height="1" /></bezel> + <bezel name="8.10" element="led"><bounds x="16" y="20" width="1" height="1" /></bezel> + <bezel name="8.11" element="led"><bounds x="16" y="22" width="1" height="1" /></bezel> + <bezel name="8.12" element="led"><bounds x="16" y="24" width="1" height="1" /></bezel> + <bezel name="8.13" element="led"><bounds x="16" y="26" width="1" height="1" /></bezel> + <bezel name="8.14" element="led"><bounds x="16" y="28" width="1" height="1" /></bezel> + <bezel name="8.15" element="led"><bounds x="16" y="30" width="1" height="1" /></bezel> + <bezel name="8.16" element="led"><bounds x="16" y="32" width="1" height="1" /></bezel> + <bezel name="8.17" element="led"><bounds x="16" y="34" width="1" height="1" /></bezel> + <bezel name="8.18" element="led"><bounds x="16" y="36" width="1" height="1" /></bezel> + <bezel name="8.19" element="led"><bounds x="16" y="38" width="1" height="1" /></bezel> + <bezel name="8.20" element="led"><bounds x="16" y="40" width="1" height="1" /></bezel> + <bezel name="8.21" element="led"><bounds x="16" y="42" width="1" height="1" /></bezel> + <bezel name="8.22" element="led"><bounds x="16" y="44" width="1" height="1" /></bezel> + <bezel name="8.23" element="led"><bounds x="16" y="46" width="1" height="1" /></bezel> + <bezel name="8.24" element="led"><bounds x="16" y="48" width="1" height="1" /></bezel> + <bezel name="8.25" element="led"><bounds x="16" y="50" width="1" height="1" /></bezel> + <bezel name="8.26" element="led"><bounds x="16" y="52" width="1" height="1" /></bezel> + <bezel name="8.27" element="led"><bounds x="16" y="54" width="1" height="1" /></bezel> + <bezel name="8.28" element="led"><bounds x="16" y="56" width="1" height="1" /></bezel> + <bezel name="8.29" element="led"><bounds x="16" y="58" width="1" height="1" /></bezel> + <bezel name="8.30" element="led"><bounds x="16" y="60" width="1" height="1" /></bezel> + <bezel name="8.31" element="led"><bounds x="16" y="62" width="1" height="1" /></bezel> - <bezel name="lamp900" element="led"><bounds x="18" y="0" width="1" height="1" /></bezel> - <bezel name="lamp901" element="led"><bounds x="18" y="2" width="1" height="1" /></bezel> - <bezel name="lamp902" element="led"><bounds x="18" y="4" width="1" height="1" /></bezel> - <bezel name="lamp903" element="led"><bounds x="18" y="6" width="1" height="1" /></bezel> - <bezel name="lamp904" element="led"><bounds x="18" y="8" width="1" height="1" /></bezel> - <bezel name="lamp905" element="led"><bounds x="18" y="10" width="1" height="1" /></bezel> - <bezel name="lamp906" element="led"><bounds x="18" y="12" width="1" height="1" /></bezel> - <bezel name="lamp907" element="led"><bounds x="18" y="14" width="1" height="1" /></bezel> - <bezel name="lamp908" element="led"><bounds x="18" y="16" width="1" height="1" /></bezel> - <bezel name="lamp909" element="led"><bounds x="18" y="18" width="1" height="1" /></bezel> - <bezel name="lamp910" element="led"><bounds x="18" y="20" width="1" height="1" /></bezel> - <bezel name="lamp911" element="led"><bounds x="18" y="22" width="1" height="1" /></bezel> - <bezel name="lamp912" element="led"><bounds x="18" y="24" width="1" height="1" /></bezel> - <bezel name="lamp913" element="led"><bounds x="18" y="26" width="1" height="1" /></bezel> - <bezel name="lamp914" element="led"><bounds x="18" y="28" width="1" height="1" /></bezel> - <bezel name="lamp915" element="led"><bounds x="18" y="30" width="1" height="1" /></bezel> - <bezel name="lamp916" element="led"><bounds x="18" y="32" width="1" height="1" /></bezel> - <bezel name="lamp917" element="led"><bounds x="18" y="34" width="1" height="1" /></bezel> - <bezel name="lamp918" element="led"><bounds x="18" y="36" width="1" height="1" /></bezel> - <bezel name="lamp919" element="led"><bounds x="18" y="38" width="1" height="1" /></bezel> - <bezel name="lamp920" element="led"><bounds x="18" y="40" width="1" height="1" /></bezel> - <bezel name="lamp921" element="led"><bounds x="18" y="42" width="1" height="1" /></bezel> - <bezel name="lamp922" element="led"><bounds x="18" y="44" width="1" height="1" /></bezel> - <bezel name="lamp923" element="led"><bounds x="18" y="46" width="1" height="1" /></bezel> - <bezel name="lamp924" element="led"><bounds x="18" y="48" width="1" height="1" /></bezel> - <bezel name="lamp925" element="led"><bounds x="18" y="50" width="1" height="1" /></bezel> - <bezel name="lamp926" element="led"><bounds x="18" y="52" width="1" height="1" /></bezel> - <bezel name="lamp927" element="led"><bounds x="18" y="54" width="1" height="1" /></bezel> - <bezel name="lamp928" element="led"><bounds x="18" y="56" width="1" height="1" /></bezel> - <bezel name="lamp929" element="led"><bounds x="18" y="58" width="1" height="1" /></bezel> - <bezel name="lamp930" element="led"><bounds x="18" y="60" width="1" height="1" /></bezel> - <bezel name="lamp931" element="led"><bounds x="18" y="62" width="1" height="1" /></bezel> + <bezel name="9.0" element="led"><bounds x="18" y="0" width="1" height="1" /></bezel> + <bezel name="9.1" element="led"><bounds x="18" y="2" width="1" height="1" /></bezel> + <bezel name="9.2" element="led"><bounds x="18" y="4" width="1" height="1" /></bezel> + <bezel name="9.3" element="led"><bounds x="18" y="6" width="1" height="1" /></bezel> + <bezel name="9.4" element="led"><bounds x="18" y="8" width="1" height="1" /></bezel> + <bezel name="9.5" element="led"><bounds x="18" y="10" width="1" height="1" /></bezel> + <bezel name="9.6" element="led"><bounds x="18" y="12" width="1" height="1" /></bezel> + <bezel name="9.7" element="led"><bounds x="18" y="14" width="1" height="1" /></bezel> + <bezel name="9.8" element="led"><bounds x="18" y="16" width="1" height="1" /></bezel> + <bezel name="9.9" element="led"><bounds x="18" y="18" width="1" height="1" /></bezel> + <bezel name="9.10" element="led"><bounds x="18" y="20" width="1" height="1" /></bezel> + <bezel name="9.11" element="led"><bounds x="18" y="22" width="1" height="1" /></bezel> + <bezel name="9.12" element="led"><bounds x="18" y="24" width="1" height="1" /></bezel> + <bezel name="9.13" element="led"><bounds x="18" y="26" width="1" height="1" /></bezel> + <bezel name="9.14" element="led"><bounds x="18" y="28" width="1" height="1" /></bezel> + <bezel name="9.15" element="led"><bounds x="18" y="30" width="1" height="1" /></bezel> + <bezel name="9.16" element="led"><bounds x="18" y="32" width="1" height="1" /></bezel> + <bezel name="9.17" element="led"><bounds x="18" y="34" width="1" height="1" /></bezel> + <bezel name="9.18" element="led"><bounds x="18" y="36" width="1" height="1" /></bezel> + <bezel name="9.19" element="led"><bounds x="18" y="38" width="1" height="1" /></bezel> + <bezel name="9.20" element="led"><bounds x="18" y="40" width="1" height="1" /></bezel> + <bezel name="9.21" element="led"><bounds x="18" y="42" width="1" height="1" /></bezel> + <bezel name="9.22" element="led"><bounds x="18" y="44" width="1" height="1" /></bezel> + <bezel name="9.23" element="led"><bounds x="18" y="46" width="1" height="1" /></bezel> + <bezel name="9.24" element="led"><bounds x="18" y="48" width="1" height="1" /></bezel> + <bezel name="9.25" element="led"><bounds x="18" y="50" width="1" height="1" /></bezel> + <bezel name="9.26" element="led"><bounds x="18" y="52" width="1" height="1" /></bezel> + <bezel name="9.27" element="led"><bounds x="18" y="54" width="1" height="1" /></bezel> + <bezel name="9.28" element="led"><bounds x="18" y="56" width="1" height="1" /></bezel> + <bezel name="9.29" element="led"><bounds x="18" y="58" width="1" height="1" /></bezel> + <bezel name="9.30" element="led"><bounds x="18" y="60" width="1" height="1" /></bezel> + <bezel name="9.31" element="led"><bounds x="18" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1000" element="led"><bounds x="20" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1001" element="led"><bounds x="20" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1002" element="led"><bounds x="20" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1003" element="led"><bounds x="20" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1004" element="led"><bounds x="20" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1005" element="led"><bounds x="20" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1006" element="led"><bounds x="20" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1007" element="led"><bounds x="20" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1008" element="led"><bounds x="20" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1009" element="led"><bounds x="20" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1010" element="led"><bounds x="20" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1011" element="led"><bounds x="20" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1012" element="led"><bounds x="20" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1013" element="led"><bounds x="20" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1014" element="led"><bounds x="20" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1015" element="led"><bounds x="20" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1016" element="led"><bounds x="20" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1017" element="led"><bounds x="20" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1018" element="led"><bounds x="20" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1019" element="led"><bounds x="20" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1020" element="led"><bounds x="20" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1021" element="led"><bounds x="20" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1022" element="led"><bounds x="20" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1023" element="led"><bounds x="20" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1024" element="led"><bounds x="20" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1025" element="led"><bounds x="20" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1026" element="led"><bounds x="20" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1027" element="led"><bounds x="20" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1028" element="led"><bounds x="20" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1029" element="led"><bounds x="20" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1030" element="led"><bounds x="20" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1031" element="led"><bounds x="20" y="62" width="1" height="1" /></bezel> + <bezel name="10.0" element="led"><bounds x="20" y="0" width="1" height="1" /></bezel> + <bezel name="10.1" element="led"><bounds x="20" y="2" width="1" height="1" /></bezel> + <bezel name="10.2" element="led"><bounds x="20" y="4" width="1" height="1" /></bezel> + <bezel name="10.3" element="led"><bounds x="20" y="6" width="1" height="1" /></bezel> + <bezel name="10.4" element="led"><bounds x="20" y="8" width="1" height="1" /></bezel> + <bezel name="10.5" element="led"><bounds x="20" y="10" width="1" height="1" /></bezel> + <bezel name="10.6" element="led"><bounds x="20" y="12" width="1" height="1" /></bezel> + <bezel name="10.7" element="led"><bounds x="20" y="14" width="1" height="1" /></bezel> + <bezel name="10.8" element="led"><bounds x="20" y="16" width="1" height="1" /></bezel> + <bezel name="10.9" element="led"><bounds x="20" y="18" width="1" height="1" /></bezel> + <bezel name="10.10" element="led"><bounds x="20" y="20" width="1" height="1" /></bezel> + <bezel name="10.11" element="led"><bounds x="20" y="22" width="1" height="1" /></bezel> + <bezel name="10.12" element="led"><bounds x="20" y="24" width="1" height="1" /></bezel> + <bezel name="10.13" element="led"><bounds x="20" y="26" width="1" height="1" /></bezel> + <bezel name="10.14" element="led"><bounds x="20" y="28" width="1" height="1" /></bezel> + <bezel name="10.15" element="led"><bounds x="20" y="30" width="1" height="1" /></bezel> + <bezel name="10.16" element="led"><bounds x="20" y="32" width="1" height="1" /></bezel> + <bezel name="10.17" element="led"><bounds x="20" y="34" width="1" height="1" /></bezel> + <bezel name="10.18" element="led"><bounds x="20" y="36" width="1" height="1" /></bezel> + <bezel name="10.19" element="led"><bounds x="20" y="38" width="1" height="1" /></bezel> + <bezel name="10.20" element="led"><bounds x="20" y="40" width="1" height="1" /></bezel> + <bezel name="10.21" element="led"><bounds x="20" y="42" width="1" height="1" /></bezel> + <bezel name="10.22" element="led"><bounds x="20" y="44" width="1" height="1" /></bezel> + <bezel name="10.23" element="led"><bounds x="20" y="46" width="1" height="1" /></bezel> + <bezel name="10.24" element="led"><bounds x="20" y="48" width="1" height="1" /></bezel> + <bezel name="10.25" element="led"><bounds x="20" y="50" width="1" height="1" /></bezel> + <bezel name="10.26" element="led"><bounds x="20" y="52" width="1" height="1" /></bezel> + <bezel name="10.27" element="led"><bounds x="20" y="54" width="1" height="1" /></bezel> + <bezel name="10.28" element="led"><bounds x="20" y="56" width="1" height="1" /></bezel> + <bezel name="10.29" element="led"><bounds x="20" y="58" width="1" height="1" /></bezel> + <bezel name="10.30" element="led"><bounds x="20" y="60" width="1" height="1" /></bezel> + <bezel name="10.31" element="led"><bounds x="20" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1100" element="led"><bounds x="22" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1101" element="led"><bounds x="22" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1102" element="led"><bounds x="22" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1103" element="led"><bounds x="22" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1104" element="led"><bounds x="22" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1105" element="led"><bounds x="22" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1106" element="led"><bounds x="22" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1107" element="led"><bounds x="22" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1108" element="led"><bounds x="22" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1109" element="led"><bounds x="22" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1110" element="led"><bounds x="22" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1111" element="led"><bounds x="22" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1112" element="led"><bounds x="22" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1113" element="led"><bounds x="22" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1114" element="led"><bounds x="22" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1115" element="led"><bounds x="22" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1116" element="led"><bounds x="22" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1117" element="led"><bounds x="22" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1118" element="led"><bounds x="22" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1119" element="led"><bounds x="22" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1120" element="led"><bounds x="22" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1121" element="led"><bounds x="22" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1122" element="led"><bounds x="22" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1123" element="led"><bounds x="22" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1124" element="led"><bounds x="22" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1125" element="led"><bounds x="22" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1126" element="led"><bounds x="22" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1127" element="led"><bounds x="22" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1128" element="led"><bounds x="22" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1129" element="led"><bounds x="22" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1130" element="led"><bounds x="22" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1131" element="led"><bounds x="22" y="62" width="1" height="1" /></bezel> + <bezel name="11.0" element="led"><bounds x="22" y="0" width="1" height="1" /></bezel> + <bezel name="11.1" element="led"><bounds x="22" y="2" width="1" height="1" /></bezel> + <bezel name="11.2" element="led"><bounds x="22" y="4" width="1" height="1" /></bezel> + <bezel name="11.3" element="led"><bounds x="22" y="6" width="1" height="1" /></bezel> + <bezel name="11.4" element="led"><bounds x="22" y="8" width="1" height="1" /></bezel> + <bezel name="11.5" element="led"><bounds x="22" y="10" width="1" height="1" /></bezel> + <bezel name="11.6" element="led"><bounds x="22" y="12" width="1" height="1" /></bezel> + <bezel name="11.7" element="led"><bounds x="22" y="14" width="1" height="1" /></bezel> + <bezel name="11.8" element="led"><bounds x="22" y="16" width="1" height="1" /></bezel> + <bezel name="11.9" element="led"><bounds x="22" y="18" width="1" height="1" /></bezel> + <bezel name="11.10" element="led"><bounds x="22" y="20" width="1" height="1" /></bezel> + <bezel name="11.11" element="led"><bounds x="22" y="22" width="1" height="1" /></bezel> + <bezel name="11.12" element="led"><bounds x="22" y="24" width="1" height="1" /></bezel> + <bezel name="11.13" element="led"><bounds x="22" y="26" width="1" height="1" /></bezel> + <bezel name="11.14" element="led"><bounds x="22" y="28" width="1" height="1" /></bezel> + <bezel name="11.15" element="led"><bounds x="22" y="30" width="1" height="1" /></bezel> + <bezel name="11.16" element="led"><bounds x="22" y="32" width="1" height="1" /></bezel> + <bezel name="11.17" element="led"><bounds x="22" y="34" width="1" height="1" /></bezel> + <bezel name="11.18" element="led"><bounds x="22" y="36" width="1" height="1" /></bezel> + <bezel name="11.19" element="led"><bounds x="22" y="38" width="1" height="1" /></bezel> + <bezel name="11.20" element="led"><bounds x="22" y="40" width="1" height="1" /></bezel> + <bezel name="11.21" element="led"><bounds x="22" y="42" width="1" height="1" /></bezel> + <bezel name="11.22" element="led"><bounds x="22" y="44" width="1" height="1" /></bezel> + <bezel name="11.23" element="led"><bounds x="22" y="46" width="1" height="1" /></bezel> + <bezel name="11.24" element="led"><bounds x="22" y="48" width="1" height="1" /></bezel> + <bezel name="11.25" element="led"><bounds x="22" y="50" width="1" height="1" /></bezel> + <bezel name="11.26" element="led"><bounds x="22" y="52" width="1" height="1" /></bezel> + <bezel name="11.27" element="led"><bounds x="22" y="54" width="1" height="1" /></bezel> + <bezel name="11.28" element="led"><bounds x="22" y="56" width="1" height="1" /></bezel> + <bezel name="11.29" element="led"><bounds x="22" y="58" width="1" height="1" /></bezel> + <bezel name="11.30" element="led"><bounds x="22" y="60" width="1" height="1" /></bezel> + <bezel name="11.31" element="led"><bounds x="22" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1200" element="led"><bounds x="24" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1201" element="led"><bounds x="24" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1202" element="led"><bounds x="24" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1203" element="led"><bounds x="24" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1204" element="led"><bounds x="24" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1205" element="led"><bounds x="24" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1206" element="led"><bounds x="24" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1207" element="led"><bounds x="24" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1208" element="led"><bounds x="24" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1209" element="led"><bounds x="24" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1210" element="led"><bounds x="24" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1211" element="led"><bounds x="24" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1212" element="led"><bounds x="24" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1213" element="led"><bounds x="24" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1214" element="led"><bounds x="24" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1215" element="led"><bounds x="24" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1216" element="led"><bounds x="24" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1217" element="led"><bounds x="24" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1218" element="led"><bounds x="24" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1219" element="led"><bounds x="24" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1220" element="led"><bounds x="24" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1221" element="led"><bounds x="24" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1222" element="led"><bounds x="24" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1223" element="led"><bounds x="24" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1224" element="led"><bounds x="24" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1225" element="led"><bounds x="24" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1226" element="led"><bounds x="24" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1227" element="led"><bounds x="24" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1228" element="led"><bounds x="24" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1229" element="led"><bounds x="24" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1230" element="led"><bounds x="24" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1231" element="led"><bounds x="24" y="62" width="1" height="1" /></bezel> + <bezel name="12.0" element="led"><bounds x="24" y="0" width="1" height="1" /></bezel> + <bezel name="12.1" element="led"><bounds x="24" y="2" width="1" height="1" /></bezel> + <bezel name="12.2" element="led"><bounds x="24" y="4" width="1" height="1" /></bezel> + <bezel name="12.3" element="led"><bounds x="24" y="6" width="1" height="1" /></bezel> + <bezel name="12.4" element="led"><bounds x="24" y="8" width="1" height="1" /></bezel> + <bezel name="12.5" element="led"><bounds x="24" y="10" width="1" height="1" /></bezel> + <bezel name="12.6" element="led"><bounds x="24" y="12" width="1" height="1" /></bezel> + <bezel name="12.7" element="led"><bounds x="24" y="14" width="1" height="1" /></bezel> + <bezel name="12.8" element="led"><bounds x="24" y="16" width="1" height="1" /></bezel> + <bezel name="12.9" element="led"><bounds x="24" y="18" width="1" height="1" /></bezel> + <bezel name="12.10" element="led"><bounds x="24" y="20" width="1" height="1" /></bezel> + <bezel name="12.11" element="led"><bounds x="24" y="22" width="1" height="1" /></bezel> + <bezel name="12.12" element="led"><bounds x="24" y="24" width="1" height="1" /></bezel> + <bezel name="12.13" element="led"><bounds x="24" y="26" width="1" height="1" /></bezel> + <bezel name="12.14" element="led"><bounds x="24" y="28" width="1" height="1" /></bezel> + <bezel name="12.15" element="led"><bounds x="24" y="30" width="1" height="1" /></bezel> + <bezel name="12.16" element="led"><bounds x="24" y="32" width="1" height="1" /></bezel> + <bezel name="12.17" element="led"><bounds x="24" y="34" width="1" height="1" /></bezel> + <bezel name="12.18" element="led"><bounds x="24" y="36" width="1" height="1" /></bezel> + <bezel name="12.19" element="led"><bounds x="24" y="38" width="1" height="1" /></bezel> + <bezel name="12.20" element="led"><bounds x="24" y="40" width="1" height="1" /></bezel> + <bezel name="12.21" element="led"><bounds x="24" y="42" width="1" height="1" /></bezel> + <bezel name="12.22" element="led"><bounds x="24" y="44" width="1" height="1" /></bezel> + <bezel name="12.23" element="led"><bounds x="24" y="46" width="1" height="1" /></bezel> + <bezel name="12.24" element="led"><bounds x="24" y="48" width="1" height="1" /></bezel> + <bezel name="12.25" element="led"><bounds x="24" y="50" width="1" height="1" /></bezel> + <bezel name="12.26" element="led"><bounds x="24" y="52" width="1" height="1" /></bezel> + <bezel name="12.27" element="led"><bounds x="24" y="54" width="1" height="1" /></bezel> + <bezel name="12.28" element="led"><bounds x="24" y="56" width="1" height="1" /></bezel> + <bezel name="12.29" element="led"><bounds x="24" y="58" width="1" height="1" /></bezel> + <bezel name="12.30" element="led"><bounds x="24" y="60" width="1" height="1" /></bezel> + <bezel name="12.31" element="led"><bounds x="24" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1300" element="led"><bounds x="26" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1301" element="led"><bounds x="26" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1302" element="led"><bounds x="26" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1303" element="led"><bounds x="26" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1304" element="led"><bounds x="26" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1305" element="led"><bounds x="26" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1306" element="led"><bounds x="26" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1307" element="led"><bounds x="26" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1308" element="led"><bounds x="26" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1309" element="led"><bounds x="26" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1310" element="led"><bounds x="26" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1311" element="led"><bounds x="26" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1312" element="led"><bounds x="26" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1313" element="led"><bounds x="26" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1314" element="led"><bounds x="26" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1315" element="led"><bounds x="26" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1316" element="led"><bounds x="26" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1317" element="led"><bounds x="26" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1318" element="led"><bounds x="26" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1319" element="led"><bounds x="26" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1320" element="led"><bounds x="26" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1321" element="led"><bounds x="26" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1322" element="led"><bounds x="26" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1323" element="led"><bounds x="26" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1324" element="led"><bounds x="26" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1325" element="led"><bounds x="26" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1326" element="led"><bounds x="26" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1327" element="led"><bounds x="26" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1328" element="led"><bounds x="26" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1329" element="led"><bounds x="26" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1330" element="led"><bounds x="26" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1331" element="led"><bounds x="26" y="62" width="1" height="1" /></bezel> + <bezel name="13.0" element="led"><bounds x="26" y="0" width="1" height="1" /></bezel> + <bezel name="13.1" element="led"><bounds x="26" y="2" width="1" height="1" /></bezel> + <bezel name="13.2" element="led"><bounds x="26" y="4" width="1" height="1" /></bezel> + <bezel name="13.3" element="led"><bounds x="26" y="6" width="1" height="1" /></bezel> + <bezel name="13.4" element="led"><bounds x="26" y="8" width="1" height="1" /></bezel> + <bezel name="13.5" element="led"><bounds x="26" y="10" width="1" height="1" /></bezel> + <bezel name="13.6" element="led"><bounds x="26" y="12" width="1" height="1" /></bezel> + <bezel name="13.7" element="led"><bounds x="26" y="14" width="1" height="1" /></bezel> + <bezel name="13.8" element="led"><bounds x="26" y="16" width="1" height="1" /></bezel> + <bezel name="13.9" element="led"><bounds x="26" y="18" width="1" height="1" /></bezel> + <bezel name="13.10" element="led"><bounds x="26" y="20" width="1" height="1" /></bezel> + <bezel name="13.11" element="led"><bounds x="26" y="22" width="1" height="1" /></bezel> + <bezel name="13.12" element="led"><bounds x="26" y="24" width="1" height="1" /></bezel> + <bezel name="13.13" element="led"><bounds x="26" y="26" width="1" height="1" /></bezel> + <bezel name="13.14" element="led"><bounds x="26" y="28" width="1" height="1" /></bezel> + <bezel name="13.15" element="led"><bounds x="26" y="30" width="1" height="1" /></bezel> + <bezel name="13.16" element="led"><bounds x="26" y="32" width="1" height="1" /></bezel> + <bezel name="13.17" element="led"><bounds x="26" y="34" width="1" height="1" /></bezel> + <bezel name="13.18" element="led"><bounds x="26" y="36" width="1" height="1" /></bezel> + <bezel name="13.19" element="led"><bounds x="26" y="38" width="1" height="1" /></bezel> + <bezel name="13.20" element="led"><bounds x="26" y="40" width="1" height="1" /></bezel> + <bezel name="13.21" element="led"><bounds x="26" y="42" width="1" height="1" /></bezel> + <bezel name="13.22" element="led"><bounds x="26" y="44" width="1" height="1" /></bezel> + <bezel name="13.23" element="led"><bounds x="26" y="46" width="1" height="1" /></bezel> + <bezel name="13.24" element="led"><bounds x="26" y="48" width="1" height="1" /></bezel> + <bezel name="13.25" element="led"><bounds x="26" y="50" width="1" height="1" /></bezel> + <bezel name="13.26" element="led"><bounds x="26" y="52" width="1" height="1" /></bezel> + <bezel name="13.27" element="led"><bounds x="26" y="54" width="1" height="1" /></bezel> + <bezel name="13.28" element="led"><bounds x="26" y="56" width="1" height="1" /></bezel> + <bezel name="13.29" element="led"><bounds x="26" y="58" width="1" height="1" /></bezel> + <bezel name="13.30" element="led"><bounds x="26" y="60" width="1" height="1" /></bezel> + <bezel name="13.31" element="led"><bounds x="26" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1400" element="led"><bounds x="28" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1401" element="led"><bounds x="28" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1402" element="led"><bounds x="28" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1403" element="led"><bounds x="28" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1404" element="led"><bounds x="28" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1405" element="led"><bounds x="28" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1406" element="led"><bounds x="28" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1407" element="led"><bounds x="28" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1408" element="led"><bounds x="28" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1409" element="led"><bounds x="28" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1410" element="led"><bounds x="28" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1411" element="led"><bounds x="28" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1412" element="led"><bounds x="28" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1413" element="led"><bounds x="28" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1414" element="led"><bounds x="28" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1415" element="led"><bounds x="28" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1416" element="led"><bounds x="28" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1417" element="led"><bounds x="28" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1418" element="led"><bounds x="28" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1419" element="led"><bounds x="28" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1420" element="led"><bounds x="28" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1421" element="led"><bounds x="28" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1422" element="led"><bounds x="28" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1423" element="led"><bounds x="28" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1424" element="led"><bounds x="28" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1425" element="led"><bounds x="28" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1426" element="led"><bounds x="28" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1427" element="led"><bounds x="28" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1428" element="led"><bounds x="28" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1429" element="led"><bounds x="28" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1430" element="led"><bounds x="28" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1431" element="led"><bounds x="28" y="62" width="1" height="1" /></bezel> + <bezel name="14.0" element="led"><bounds x="28" y="0" width="1" height="1" /></bezel> + <bezel name="14.1" element="led"><bounds x="28" y="2" width="1" height="1" /></bezel> + <bezel name="14.2" element="led"><bounds x="28" y="4" width="1" height="1" /></bezel> + <bezel name="14.3" element="led"><bounds x="28" y="6" width="1" height="1" /></bezel> + <bezel name="14.4" element="led"><bounds x="28" y="8" width="1" height="1" /></bezel> + <bezel name="14.5" element="led"><bounds x="28" y="10" width="1" height="1" /></bezel> + <bezel name="14.6" element="led"><bounds x="28" y="12" width="1" height="1" /></bezel> + <bezel name="14.7" element="led"><bounds x="28" y="14" width="1" height="1" /></bezel> + <bezel name="14.8" element="led"><bounds x="28" y="16" width="1" height="1" /></bezel> + <bezel name="14.9" element="led"><bounds x="28" y="18" width="1" height="1" /></bezel> + <bezel name="14.10" element="led"><bounds x="28" y="20" width="1" height="1" /></bezel> + <bezel name="14.11" element="led"><bounds x="28" y="22" width="1" height="1" /></bezel> + <bezel name="14.12" element="led"><bounds x="28" y="24" width="1" height="1" /></bezel> + <bezel name="14.13" element="led"><bounds x="28" y="26" width="1" height="1" /></bezel> + <bezel name="14.14" element="led"><bounds x="28" y="28" width="1" height="1" /></bezel> + <bezel name="14.15" element="led"><bounds x="28" y="30" width="1" height="1" /></bezel> + <bezel name="14.16" element="led"><bounds x="28" y="32" width="1" height="1" /></bezel> + <bezel name="14.17" element="led"><bounds x="28" y="34" width="1" height="1" /></bezel> + <bezel name="14.18" element="led"><bounds x="28" y="36" width="1" height="1" /></bezel> + <bezel name="14.19" element="led"><bounds x="28" y="38" width="1" height="1" /></bezel> + <bezel name="14.20" element="led"><bounds x="28" y="40" width="1" height="1" /></bezel> + <bezel name="14.21" element="led"><bounds x="28" y="42" width="1" height="1" /></bezel> + <bezel name="14.22" element="led"><bounds x="28" y="44" width="1" height="1" /></bezel> + <bezel name="14.23" element="led"><bounds x="28" y="46" width="1" height="1" /></bezel> + <bezel name="14.24" element="led"><bounds x="28" y="48" width="1" height="1" /></bezel> + <bezel name="14.25" element="led"><bounds x="28" y="50" width="1" height="1" /></bezel> + <bezel name="14.26" element="led"><bounds x="28" y="52" width="1" height="1" /></bezel> + <bezel name="14.27" element="led"><bounds x="28" y="54" width="1" height="1" /></bezel> + <bezel name="14.28" element="led"><bounds x="28" y="56" width="1" height="1" /></bezel> + <bezel name="14.29" element="led"><bounds x="28" y="58" width="1" height="1" /></bezel> + <bezel name="14.30" element="led"><bounds x="28" y="60" width="1" height="1" /></bezel> + <bezel name="14.31" element="led"><bounds x="28" y="62" width="1" height="1" /></bezel> - <bezel name="lamp1500" element="led"><bounds x="30" y="0" width="1" height="1" /></bezel> - <bezel name="lamp1501" element="led"><bounds x="30" y="2" width="1" height="1" /></bezel> - <bezel name="lamp1502" element="led"><bounds x="30" y="4" width="1" height="1" /></bezel> - <bezel name="lamp1503" element="led"><bounds x="30" y="6" width="1" height="1" /></bezel> - <bezel name="lamp1504" element="led"><bounds x="30" y="8" width="1" height="1" /></bezel> - <bezel name="lamp1505" element="led"><bounds x="30" y="10" width="1" height="1" /></bezel> - <bezel name="lamp1506" element="led"><bounds x="30" y="12" width="1" height="1" /></bezel> - <bezel name="lamp1507" element="led"><bounds x="30" y="14" width="1" height="1" /></bezel> - <bezel name="lamp1508" element="led"><bounds x="30" y="16" width="1" height="1" /></bezel> - <bezel name="lamp1509" element="led"><bounds x="30" y="18" width="1" height="1" /></bezel> - <bezel name="lamp1510" element="led"><bounds x="30" y="20" width="1" height="1" /></bezel> - <bezel name="lamp1511" element="led"><bounds x="30" y="22" width="1" height="1" /></bezel> - <bezel name="lamp1512" element="led"><bounds x="30" y="24" width="1" height="1" /></bezel> - <bezel name="lamp1513" element="led"><bounds x="30" y="26" width="1" height="1" /></bezel> - <bezel name="lamp1514" element="led"><bounds x="30" y="28" width="1" height="1" /></bezel> - <bezel name="lamp1515" element="led"><bounds x="30" y="30" width="1" height="1" /></bezel> - <bezel name="lamp1516" element="led"><bounds x="30" y="32" width="1" height="1" /></bezel> - <bezel name="lamp1517" element="led"><bounds x="30" y="34" width="1" height="1" /></bezel> - <bezel name="lamp1518" element="led"><bounds x="30" y="36" width="1" height="1" /></bezel> - <bezel name="lamp1519" element="led"><bounds x="30" y="38" width="1" height="1" /></bezel> - <bezel name="lamp1520" element="led"><bounds x="30" y="40" width="1" height="1" /></bezel> - <bezel name="lamp1521" element="led"><bounds x="30" y="42" width="1" height="1" /></bezel> - <bezel name="lamp1522" element="led"><bounds x="30" y="44" width="1" height="1" /></bezel> - <bezel name="lamp1523" element="led"><bounds x="30" y="46" width="1" height="1" /></bezel> - <bezel name="lamp1524" element="led"><bounds x="30" y="48" width="1" height="1" /></bezel> - <bezel name="lamp1525" element="led"><bounds x="30" y="50" width="1" height="1" /></bezel> - <bezel name="lamp1526" element="led"><bounds x="30" y="52" width="1" height="1" /></bezel> - <bezel name="lamp1527" element="led"><bounds x="30" y="54" width="1" height="1" /></bezel> - <bezel name="lamp1528" element="led"><bounds x="30" y="56" width="1" height="1" /></bezel> - <bezel name="lamp1529" element="led"><bounds x="30" y="58" width="1" height="1" /></bezel> - <bezel name="lamp1530" element="led"><bounds x="30" y="60" width="1" height="1" /></bezel> - <bezel name="lamp1531" element="led"><bounds x="30" y="62" width="1" height="1" /></bezel> + <bezel name="15.0" element="led"><bounds x="30" y="0" width="1" height="1" /></bezel> + <bezel name="15.1" element="led"><bounds x="30" y="2" width="1" height="1" /></bezel> + <bezel name="15.2" element="led"><bounds x="30" y="4" width="1" height="1" /></bezel> + <bezel name="15.3" element="led"><bounds x="30" y="6" width="1" height="1" /></bezel> + <bezel name="15.4" element="led"><bounds x="30" y="8" width="1" height="1" /></bezel> + <bezel name="15.5" element="led"><bounds x="30" y="10" width="1" height="1" /></bezel> + <bezel name="15.6" element="led"><bounds x="30" y="12" width="1" height="1" /></bezel> + <bezel name="15.7" element="led"><bounds x="30" y="14" width="1" height="1" /></bezel> + <bezel name="15.8" element="led"><bounds x="30" y="16" width="1" height="1" /></bezel> + <bezel name="15.9" element="led"><bounds x="30" y="18" width="1" height="1" /></bezel> + <bezel name="15.10" element="led"><bounds x="30" y="20" width="1" height="1" /></bezel> + <bezel name="15.11" element="led"><bounds x="30" y="22" width="1" height="1" /></bezel> + <bezel name="15.12" element="led"><bounds x="30" y="24" width="1" height="1" /></bezel> + <bezel name="15.13" element="led"><bounds x="30" y="26" width="1" height="1" /></bezel> + <bezel name="15.14" element="led"><bounds x="30" y="28" width="1" height="1" /></bezel> + <bezel name="15.15" element="led"><bounds x="30" y="30" width="1" height="1" /></bezel> + <bezel name="15.16" element="led"><bounds x="30" y="32" width="1" height="1" /></bezel> + <bezel name="15.17" element="led"><bounds x="30" y="34" width="1" height="1" /></bezel> + <bezel name="15.18" element="led"><bounds x="30" y="36" width="1" height="1" /></bezel> + <bezel name="15.19" element="led"><bounds x="30" y="38" width="1" height="1" /></bezel> + <bezel name="15.20" element="led"><bounds x="30" y="40" width="1" height="1" /></bezel> + <bezel name="15.21" element="led"><bounds x="30" y="42" width="1" height="1" /></bezel> + <bezel name="15.22" element="led"><bounds x="30" y="44" width="1" height="1" /></bezel> + <bezel name="15.23" element="led"><bounds x="30" y="46" width="1" height="1" /></bezel> + <bezel name="15.24" element="led"><bounds x="30" y="48" width="1" height="1" /></bezel> + <bezel name="15.25" element="led"><bounds x="30" y="50" width="1" height="1" /></bezel> + <bezel name="15.26" element="led"><bounds x="30" y="52" width="1" height="1" /></bezel> + <bezel name="15.27" element="led"><bounds x="30" y="54" width="1" height="1" /></bezel> + <bezel name="15.28" element="led"><bounds x="30" y="56" width="1" height="1" /></bezel> + <bezel name="15.29" element="led"><bounds x="30" y="58" width="1" height="1" /></bezel> + <bezel name="15.30" element="led"><bounds x="30" y="60" width="1" height="1" /></bezel> + <bezel name="15.31" element="led"><bounds x="30" y="62" width="1" height="1" /></bezel> </view> diff --git a/src/mess/layout/lightfgt.lay b/src/mess/layout/lightfgt.lay new file mode 100644 index 00000000000..cd0a06b9e51 --- /dev/null +++ b/src/mess/layout/lightfgt.lay @@ -0,0 +1,200 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="static_cyan"><rect><color red="0.2" green="0.65" blue="0.9" /></rect></element> + <element name="static_purple"><rect><color red="0.8" green="0.4" blue="0.9" /></rect></element> + <element name="static_yellow"><rect><color red="0.8" green="0.8" blue="0.2" /></rect></element> + + <element name="text_g1"> + <rect><color red="0.8" green="0.8" blue="0.2" /></rect> + <text string="LightFight"><color red="0.0" green="0.0" blue="0.0" /></text> + </element> + <element name="text_g2"> + <rect><color red="0.8" green="0.8" blue="0.2" /></rect> + <text string="NightFight"><color red="0.0" green="0.0" blue="0.0" /></text> + </element> + <element name="text_g3"> + <rect><color red="0.8" green="0.8" blue="0.2" /></rect> + <text string="RiteSite"><color red="0.0" green="0.0" blue="0.0" /></text> + </element> + <element name="text_g4"> + <rect><color red="0.8" green="0.8" blue="0.2" /></rect> + <text string="QuiteBrite"><color red="0.0" green="0.0" blue="0.0" /></text> + </element> + <element name="text_g5"> + <rect><color red="0.8" green="0.8" blue="0.2" /></rect> + <text string="RightLight"><color red="0.0" green="0.0" blue="0.0" /></text> + </element> + + <element name="text_s1"> + <rect><color red="0.8" green="0.8" blue="0.2" /></rect> + <text string="BEGINNER"><color red="0.0" green="0.0" blue="0.0" /></text> + </element> + <element name="text_s2"> + <rect><color red="0.8" green="0.8" blue="0.2" /></rect> + <text string="ADVANCED"><color red="0.0" green="0.0" blue="0.0" /></text> + </element> + <element name="text_s3"> + <rect><color red="0.8" green="0.8" blue="0.2" /></rect> + <text string="EXPERT"><color red="0.0" green="0.0" blue="0.0" /></text> + </element> + + <element name="led" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="0"> + <bounds x="0.1" y="0.1" width="0.8" height="0.8" /> + <color red="0.3" green="0.03" blue="0.06" /> + </disk> + <disk state="1"> + <bounds x="0.1" y="0.1" width="0.8" height="0.8" /> + <color red="1.0" green="0.1" blue="0.2" /> + </disk> + </element> + + <element name="buttond" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="2.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <rect state="0"> + <bounds x="0.1" y="0.4" width="1.8" height="0.5" /> + <color red="0.2" green="0.1" blue="0.14" /> + </rect> + <rect state="1"> + <bounds x="0.16" y="0.46" width="1.68" height="0.38" /> + <color red="0.2" green="0.1" blue="0.14" /> + </rect> + </element> + + <element name="buttonu" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="2.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <rect state="0"> + <bounds x="0.1" y="0.1" width="1.8" height="0.5" /> + <color red="0.2" green="0.1" blue="0.14" /> + </rect> + <rect state="1"> + <bounds x="0.16" y="0.16" width="1.68" height="0.38" /> + <color red="0.2" green="0.1" blue="0.14" /> + </rect> + </element> + + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="3" right="26" top="7" bottom="22" /> + <bezel element="static_black"> + <bounds left="3" right="26" top="7" bottom="22" /> + </bezel> + + <!-- led matrix --> + + <bezel name="lamp44" element="led"><bounds x="10" y="14" width="1" height="1" /></bezel> + <bezel name="lamp43" element="led"><bounds x="11" y="15" width="1" height="1" /></bezel> + <bezel name="lamp42" element="led"><bounds x="12" y="16" width="1" height="1" /></bezel> + <bezel name="lamp41" element="led"><bounds x="13" y="17" width="1" height="1" /></bezel> + <bezel name="lamp40" element="led"><bounds x="14" y="18" width="1" height="1" /></bezel> + + <bezel name="lamp34" element="led"><bounds x="11" y="13" width="1" height="1" /></bezel> + <bezel name="lamp33" element="led"><bounds x="12" y="14" width="1" height="1" /></bezel> + <bezel name="lamp32" element="led"><bounds x="13" y="15" width="1" height="1" /></bezel> + <bezel name="lamp31" element="led"><bounds x="14" y="16" width="1" height="1" /></bezel> + <bezel name="lamp30" element="led"><bounds x="15" y="17" width="1" height="1" /></bezel> + + <bezel name="lamp24" element="led"><bounds x="12" y="12" width="1" height="1" /></bezel> + <bezel name="lamp23" element="led"><bounds x="13" y="13" width="1" height="1" /></bezel> + <bezel name="lamp22" element="led"><bounds x="14" y="14" width="1" height="1" /></bezel> + <bezel name="lamp21" element="led"><bounds x="15" y="15" width="1" height="1" /></bezel> + <bezel name="lamp20" element="led"><bounds x="16" y="16" width="1" height="1" /></bezel> + + <bezel name="lamp14" element="led"><bounds x="13" y="11" width="1" height="1" /></bezel> + <bezel name="lamp13" element="led"><bounds x="14" y="12" width="1" height="1" /></bezel> + <bezel name="lamp12" element="led"><bounds x="15" y="13" width="1" height="1" /></bezel> + <bezel name="lamp11" element="led"><bounds x="16" y="14" width="1" height="1" /></bezel> + <bezel name="lamp10" element="led"><bounds x="17" y="15" width="1" height="1" /></bezel> + + <bezel name="lamp4" element="led"><bounds x="14" y="10" width="1" height="1" /></bezel> + <bezel name="lamp3" element="led"><bounds x="15" y="11" width="1" height="1" /></bezel> + <bezel name="lamp2" element="led"><bounds x="16" y="12" width="1" height="1" /></bezel> + <bezel name="lamp1" element="led"><bounds x="17" y="13" width="1" height="1" /></bezel> + <bezel name="lamp0" element="led"><bounds x="18" y="14" width="1" height="1" /></bezel> + + + <!-- buttons --> + + <bezel element="buttond" inputtag="IN.0" inputmask="0x02"><bounds x="3" y="20" width="2" height="1" /></bezel> + <bezel element="buttond" inputtag="IN.1" inputmask="0x02"><bounds x="5" y="20" width="2" height="1" /></bezel> + <bezel element="buttond" inputtag="IN.2" inputmask="0x02"><bounds x="7" y="20" width="2" height="1" /></bezel> + <bezel element="buttond" inputtag="IN.3" inputmask="0x02"><bounds x="9" y="20" width="2" height="1" /></bezel> + <bezel element="buttond" inputtag="IN.4" inputmask="0x02"><bounds x="11" y="20" width="2" height="1" /></bezel> + + <bezel element="buttond" inputtag="IN.0" inputmask="0x01"><bounds x="16" y="20" width="2" height="1" /></bezel> + <bezel element="buttond" inputtag="IN.1" inputmask="0x01"><bounds x="18" y="20" width="2" height="1" /></bezel> + <bezel element="buttond" inputtag="IN.2" inputmask="0x01"><bounds x="20" y="20" width="2" height="1" /></bezel> + <bezel element="buttond" inputtag="IN.3" inputmask="0x01"><bounds x="22" y="20" width="2" height="1" /></bezel> + <bezel element="buttond" inputtag="IN.4" inputmask="0x01"><bounds x="24" y="20" width="2" height="1" /></bezel> + + <bezel element="buttonu" inputtag="IN.0" inputmask="0x08"><bounds x="3" y="8" width="2" height="1" /></bezel> + <bezel element="buttonu" inputtag="IN.1" inputmask="0x08"><bounds x="5" y="8" width="2" height="1" /></bezel> + <bezel element="buttonu" inputtag="IN.2" inputmask="0x08"><bounds x="7" y="8" width="2" height="1" /></bezel> + <bezel element="buttonu" inputtag="IN.3" inputmask="0x08"><bounds x="9" y="8" width="2" height="1" /></bezel> + <bezel element="buttonu" inputtag="IN.4" inputmask="0x08"><bounds x="11" y="8" width="2" height="1" /></bezel> + + <bezel element="buttonu" inputtag="IN.0" inputmask="0x04"><bounds x="16" y="8" width="2" height="1" /></bezel> + <bezel element="buttonu" inputtag="IN.1" inputmask="0x04"><bounds x="18" y="8" width="2" height="1" /></bezel> + <bezel element="buttonu" inputtag="IN.2" inputmask="0x04"><bounds x="20" y="8" width="2" height="1" /></bezel> + <bezel element="buttonu" inputtag="IN.3" inputmask="0x04"><bounds x="22" y="8" width="2" height="1" /></bezel> + <bezel element="buttonu" inputtag="IN.4" inputmask="0x04"><bounds x="24" y="8" width="2" height="1" /></bezel> + + + <!-- bezel --> + + <bezel element="static_cyan"><bounds x="13.3" y="8" width="2.4" height="0.2" /></bezel> + <bezel element="static_cyan"><bounds x="14.3" y="9" width="0.4" height="0.2" /></bezel> + + <bezel element="static_cyan"><bounds x="13.3" y="20.8" width="2.4" height="0.2" /></bezel> + <bezel element="static_cyan"><bounds x="14.3" y="19.8" width="0.4" height="0.2" /></bezel> + + <bezel element="static_cyan"><bounds x="8" y="14" width="0.2" height="1" /></bezel> + <bezel element="static_cyan"><bounds x="7" y="13" width="0.2" height="3" /></bezel> + <bezel element="static_cyan"><bounds x="6" y="12" width="0.2" height="5" /></bezel> + <bezel element="static_cyan"><bounds x="5" y="11" width="0.2" height="7" /></bezel> + <bezel element="static_cyan"><bounds x="4" y="10" width="0.2" height="9" /></bezel> + <bezel element="static_cyan"><bounds x="3" y="9" width="0.2" height="11" /></bezel> + + <bezel element="static_cyan"><bounds x="20.8" y="14" width="0.2" height="1" /></bezel> + <bezel element="static_cyan"><bounds x="21.8" y="13" width="0.2" height="3" /></bezel> + <bezel element="static_cyan"><bounds x="22.8" y="12" width="0.2" height="5" /></bezel> + <bezel element="static_cyan"><bounds x="23.8" y="11" width="0.2" height="7" /></bezel> + <bezel element="static_cyan"><bounds x="24.8" y="10" width="0.2" height="9" /></bezel> + <bezel element="static_cyan"><bounds x="25.8" y="9" width="0.2" height="11" /></bezel> + + <bezel element="static_yellow"><bounds x="3" y="7" width="10" height="0.7" /></bezel> + <bezel element="static_purple"><bounds x="16" y="7" width="10" height="0.7" /></bezel> + + <bezel element="static_purple"><bounds x="3" y="21.3" width="10" height="0.7" /></bezel> + <bezel element="static_yellow"><bounds x="16" y="21.3" width="10" height="0.7" /></bezel> + + <bezel element="text_g1"><bounds x="16.1" y="21.43" width="2" height="0.4" /></bezel> + <bezel element="text_g2"><bounds x="18" y="21.43" width="2" height="0.4" /></bezel> + <bezel element="text_g3"><bounds x="20" y="21.43" width="2" height="0.4" /></bezel> + <bezel element="text_g4"><bounds x="22" y="21.43" width="2" height="0.4" /></bezel> + <bezel element="text_g5"><bounds x="24" y="21.43" width="2" height="0.4" /></bezel> + + <bezel element="text_s3"><bounds x="5" y="7.15" width="2" height="0.4" /></bezel> + <bezel element="text_s2"><bounds x="7" y="7.15" width="2" height="0.4" /></bezel> + <bezel element="text_s1"><bounds x="9" y="7.15" width="2" height="0.4" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/mmerlin.lay b/src/mess/layout/mmerlin.lay new file mode 100644 index 00000000000..4538a482149 --- /dev/null +++ b/src/mess/layout/mmerlin.lay @@ -0,0 +1,414 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + + +<!-- define elements --> + + <!-- layout is based on merlin.lay, ignore unnecessary bloat --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + <element name="static_blue"><rect><color red="0.133" green="0.333" blue="0.466" /></rect></element> + <element name="static_darkblue"><rect><color red="0.1" green="0.25" blue="0.35" /></rect></element> + + <!-- buttons are not pushbuttons, they are pressed very lightly --> + + <element name="button" defstate="0"> + <text state="0" string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <text state="1" string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk state="1"> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.33" green="0.33" blue="0.22" /> + </disk> + </element> + + <element name="led" defstate="0"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.30" y="0.30" width="0.40" height="0.40"/> + <color red="0.0" green="0.0" blue="0.0" /> + </disk> + <disk state="0"> + <bounds x="0.36" y="0.36" width="0.28" height="0.28"/> + <color red="0.25" green="0.05" blue="0.04" /> + </disk> + <disk state="1"> + <bounds x="0.36" y="0.36" width="0.28" height="0.28"/> + <color red="1.0" green="0.2" blue="0.15" /> + </disk> + </element> + + + <!-- number panels --> + + <element name="panel_0"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="0"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_0"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="0"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_1"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="1"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_2"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="2"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_3"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="3"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_4"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="4"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_5"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="5"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_6"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="6"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_7"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="7"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_8"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="8"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_9"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="9"> + <bounds x="0.1" y="0.13" width="0.83" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_10"> + <text string=" "><color red="0.0" green="0.0" blue="0.0" /></text> + <disk> + <bounds x="0.13" y="0.13" width="0.74" height="0.74"/> + <color red="0.68" green="0.675" blue="0.66" /> + </disk> + <text string="10"> + <bounds x="0.1" y="0.13" width="0.81" height="0.16"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + + <!-- bottom panels --> + + <element name="panel_newgame"> + <rect><color red="0.68" green="0.675" blue="0.66" /></rect> + <text string="NEW"> + <bounds x="0.0" y="0.25" width="1.0" height="0.24"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <text string="GAME"> + <bounds x="0.0" y="0.50" width="1.0" height="0.24"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_samegame"> + <rect><color red="0.68" green="0.675" blue="0.66" /></rect> + <text string="SAME"> + <bounds x="0.0" y="0.25" width="1.0" height="0.24"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <text string="GAME"> + <bounds x="0.0" y="0.50" width="1.0" height="0.24"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_score"> + <rect><color red="0.68" green="0.675" blue="0.66" /></rect> + <text string="SCORE"> + <bounds x="0.0" y="0.37" width="1.0" height="0.24"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + <element name="panel_compturn"> + <rect><color red="0.68" green="0.675" blue="0.66" /></rect> + <text string="COMP"> + <bounds x="0.0" y="0.25" width="1.0" height="0.24"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <text string="TURN"> + <bounds x="0.0" y="0.50" width="1.0" height="0.24"/> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + </element> + + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="88" top="0" bottom="216" /> + <bezel element="static_black"> + <bounds left="0" right="88" top="0" bottom="216" /> + </bezel> + + <!-- (don't care about the upper loudspeaker+logo part) --> + + <bezel element="static_darkblue"> + <bounds x="10" y="4" width="68" height="160" /> + </bezel> + + <bezel element="static_blue"> + <bounds x="7" y="0" width="74" height="8" /> + </bezel> + <bezel element="static_blue"> + <bounds x="4" y="14" width="80" height="128" /> + </bezel> + <bezel element="static_blue"> + <bounds x="7" y="148" width="74" height="62" /> + </bezel> + + + <!-- number panels --> + + <bezel element="panel_0"> + <bounds x="34" y="20" width="20" height="20" /> + </bezel> + <bezel name="lamp0" element="led"> + <bounds x="34" y="20" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.0" inputmask="0x01"> + <bounds x="34" y="20" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + <bezel element="panel_1"> + <bounds x="10" y="44" width="20" height="20" /> + </bezel> + <bezel name="lamp1" element="led"> + <bounds x="10" y="44" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.0" inputmask="0x02"> + <bounds x="10" y="44" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + <bezel element="panel_2"> + <bounds x="34" y="44" width="20" height="20" /> + </bezel> + <bezel name="lamp2" element="led"> + <bounds x="34" y="44" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.0" inputmask="0x08"> + <bounds x="34" y="44" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + <bezel element="panel_3"> + <bounds x="58" y="44" width="20" height="20" /> + </bezel> + <bezel name="lamp3" element="led"> + <bounds x="58" y="44" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.0" inputmask="0x04"> + <bounds x="58" y="44" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + <bezel element="panel_4"> + <bounds x="10" y="68" width="20" height="20" /> + </bezel> + <bezel name="lamp4" element="led"> + <bounds x="10" y="68" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.1" inputmask="0x01"> + <bounds x="10" y="68" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + <bezel element="panel_5"> + <bounds x="34" y="68" width="20" height="20" /> + </bezel> + <bezel name="lamp5" element="led"> + <bounds x="34" y="68" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.1" inputmask="0x02"> + <bounds x="34" y="68" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + <bezel element="panel_6"> + <bounds x="58" y="68" width="20" height="20" /> + </bezel> + <bezel name="lamp6" element="led"> + <bounds x="58" y="68" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.1" inputmask="0x08"> + <bounds x="58" y="68" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + <bezel element="panel_7"> + <bounds x="10" y="92" width="20" height="20" /> + </bezel> + <bezel name="lamp7" element="led"> + <bounds x="10" y="92" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.1" inputmask="0x04"> + <bounds x="10" y="92" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + <bezel element="panel_8"> + <bounds x="34" y="92" width="20" height="20" /> + </bezel> + <bezel name="lamp8" element="led"> + <bounds x="34" y="92" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.2" inputmask="0x01"> + <bounds x="34" y="92" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + <bezel element="panel_9"> + <bounds x="58" y="92" width="20" height="20" /> + </bezel> + <bezel name="lamp9" element="led"> + <bounds x="58" y="92" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.2" inputmask="0x02"> + <bounds x="58" y="92" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + <bezel element="panel_10"> + <bounds x="34" y="116" width="20" height="20" /> + </bezel> + <bezel name="lamp10" element="led"> + <bounds x="34" y="116" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.2" inputmask="0x08"> + <bounds x="34" y="116" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + + <!-- bottom panels --> + + <bezel element="panel_newgame"> + <bounds x="21" y="156" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.3" inputmask="0x08"> + <bounds x="21" y="156" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + <bezel element="panel_samegame"> + <bounds x="47" y="156" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.2" inputmask="0x04"> + <bounds x="47" y="156" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + <bezel element="panel_score"> + <bounds x="21" y="182" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.3" inputmask="0x04"> + <bounds x="21" y="182" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + <bezel element="panel_compturn"> + <bounds x="47" y="182" width="20" height="20" /> + </bezel> + <bezel element="button" inputtag="IN.3" inputmask="0x02"> + <bounds x="47" y="182" width="20" height="20" /> + <color alpha="0.2" /> + </bezel> + + </view> +</mamelayout> diff --git a/src/mess/layout/mvbfree.lay b/src/mess/layout/mvbfree.lay new file mode 100644 index 00000000000..29598b63efc --- /dev/null +++ b/src/mess/layout/mvbfree.lay @@ -0,0 +1,178 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + +<!-- define elements --> + + <element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element> + + <element name="plate" defstate="0"> + <rect state="0"><color red="0.2" green="0.2" blue="0.2" /></rect> + <rect state="1"><color red="0.4" green="1.0" blue="0.95" /></rect> + </element> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-1" right="14" top="-0.2" bottom="10.2" /> + <bezel element="static_black"> + <bounds left="-1" right="14" top="-0.2" bottom="10.2" /> + </bezel> + + <bezel name="0.0" element="plate"><bounds x="0" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="0.1" element="plate"><bounds x="0" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="0.2" element="plate"><bounds x="0" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="0.3" element="plate"><bounds x="0" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="0.4" element="plate"><bounds x="0" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="0.5" element="plate"><bounds x="0" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="0.6" element="plate"><bounds x="0" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="0.7" element="plate"><bounds x="0" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="0.8" element="plate"><bounds x="0" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="0.9" element="plate"><bounds x="0" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="1.0" element="plate"><bounds x="1" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="1.1" element="plate"><bounds x="1" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="1.2" element="plate"><bounds x="1" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="1.3" element="plate"><bounds x="1" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="1.4" element="plate"><bounds x="1" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="1.5" element="plate"><bounds x="1" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="1.6" element="plate"><bounds x="1" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="1.7" element="plate"><bounds x="1" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="1.8" element="plate"><bounds x="1" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="1.9" element="plate"><bounds x="1" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="2.0" element="plate"><bounds x="2" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="2.1" element="plate"><bounds x="2" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="2.2" element="plate"><bounds x="2" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="2.3" element="plate"><bounds x="2" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="2.4" element="plate"><bounds x="2" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="2.5" element="plate"><bounds x="2" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="2.6" element="plate"><bounds x="2" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="2.7" element="plate"><bounds x="2" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="2.8" element="plate"><bounds x="2" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="2.9" element="plate"><bounds x="2" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="3.0" element="plate"><bounds x="3" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="3.1" element="plate"><bounds x="3" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="3.2" element="plate"><bounds x="3" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="3.3" element="plate"><bounds x="3" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="3.4" element="plate"><bounds x="3" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="3.5" element="plate"><bounds x="3" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="3.6" element="plate"><bounds x="3" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="3.7" element="plate"><bounds x="3" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="3.8" element="plate"><bounds x="3" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="3.9" element="plate"><bounds x="3" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="4.0" element="plate"><bounds x="4" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="4.1" element="plate"><bounds x="4" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="4.2" element="plate"><bounds x="4" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="4.3" element="plate"><bounds x="4" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="4.4" element="plate"><bounds x="4" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="4.5" element="plate"><bounds x="4" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="4.6" element="plate"><bounds x="4" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="4.7" element="plate"><bounds x="4" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="4.8" element="plate"><bounds x="4" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="4.9" element="plate"><bounds x="4" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="5.0" element="plate"><bounds x="5" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="5.1" element="plate"><bounds x="5" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="5.2" element="plate"><bounds x="5" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="5.3" element="plate"><bounds x="5" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="5.4" element="plate"><bounds x="5" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="5.5" element="plate"><bounds x="5" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="5.6" element="plate"><bounds x="5" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="5.7" element="plate"><bounds x="5" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="5.8" element="plate"><bounds x="5" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="5.9" element="plate"><bounds x="5" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="6.0" element="plate"><bounds x="6" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="6.1" element="plate"><bounds x="6" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="6.2" element="plate"><bounds x="6" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="6.3" element="plate"><bounds x="6" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="6.4" element="plate"><bounds x="6" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="6.5" element="plate"><bounds x="6" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="6.6" element="plate"><bounds x="6" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="6.7" element="plate"><bounds x="6" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="6.8" element="plate"><bounds x="6" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="6.9" element="plate"><bounds x="6" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="7.0" element="plate"><bounds x="7" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="7.1" element="plate"><bounds x="7" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="7.2" element="plate"><bounds x="7" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="7.3" element="plate"><bounds x="7" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="7.4" element="plate"><bounds x="7" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="7.5" element="plate"><bounds x="7" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="7.6" element="plate"><bounds x="7" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="7.7" element="plate"><bounds x="7" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="7.8" element="plate"><bounds x="7" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="7.9" element="plate"><bounds x="7" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="8.0" element="plate"><bounds x="8" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="8.1" element="plate"><bounds x="8" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="8.2" element="plate"><bounds x="8" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="8.3" element="plate"><bounds x="8" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="8.4" element="plate"><bounds x="8" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="8.5" element="plate"><bounds x="8" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="8.6" element="plate"><bounds x="8" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="8.7" element="plate"><bounds x="8" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="8.8" element="plate"><bounds x="8" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="8.9" element="plate"><bounds x="8" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="9.0" element="plate"><bounds x="9" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="9.1" element="plate"><bounds x="9" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="9.2" element="plate"><bounds x="9" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="9.3" element="plate"><bounds x="9" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="9.4" element="plate"><bounds x="9" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="9.5" element="plate"><bounds x="9" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="9.6" element="plate"><bounds x="9" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="9.7" element="plate"><bounds x="9" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="9.8" element="plate"><bounds x="9" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="9.9" element="plate"><bounds x="9" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="10.0" element="plate"><bounds x="10" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="10.1" element="plate"><bounds x="10" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="10.2" element="plate"><bounds x="10" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="10.3" element="plate"><bounds x="10" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="10.4" element="plate"><bounds x="10" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="10.5" element="plate"><bounds x="10" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="10.6" element="plate"><bounds x="10" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="10.7" element="plate"><bounds x="10" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="10.8" element="plate"><bounds x="10" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="10.9" element="plate"><bounds x="10" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="11.0" element="plate"><bounds x="11" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="11.1" element="plate"><bounds x="11" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="11.2" element="plate"><bounds x="11" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="11.3" element="plate"><bounds x="11" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="11.4" element="plate"><bounds x="11" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="11.5" element="plate"><bounds x="11" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="11.6" element="plate"><bounds x="11" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="11.7" element="plate"><bounds x="11" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="11.8" element="plate"><bounds x="11" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="11.9" element="plate"><bounds x="11" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="12.0" element="plate"><bounds x="12" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="12.1" element="plate"><bounds x="12" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="12.2" element="plate"><bounds x="12" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="12.3" element="plate"><bounds x="12" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="12.4" element="plate"><bounds x="12" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="12.5" element="plate"><bounds x="12" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="12.6" element="plate"><bounds x="12" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="12.7" element="plate"><bounds x="12" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="12.8" element="plate"><bounds x="12" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="12.9" element="plate"><bounds x="12" y="9" width="0.4" height="0.8" /></bezel> + + <bezel name="13.0" element="plate"><bounds x="13" y="0" width="0.4" height="0.8" /></bezel> + <bezel name="13.1" element="plate"><bounds x="13" y="1" width="0.4" height="0.8" /></bezel> + <bezel name="13.2" element="plate"><bounds x="13" y="2" width="0.4" height="0.8" /></bezel> + <bezel name="13.3" element="plate"><bounds x="13" y="3" width="0.4" height="0.8" /></bezel> + <bezel name="13.4" element="plate"><bounds x="13" y="4" width="0.4" height="0.8" /></bezel> + <bezel name="13.5" element="plate"><bounds x="13" y="5" width="0.4" height="0.8" /></bezel> + <bezel name="13.6" element="plate"><bounds x="13" y="6" width="0.4" height="0.8" /></bezel> + <bezel name="13.7" element="plate"><bounds x="13" y="7" width="0.4" height="0.8" /></bezel> + <bezel name="13.8" element="plate"><bounds x="13" y="8" width="0.4" height="0.8" /></bezel> + <bezel name="13.9" element="plate"><bounds x="13" y="9" width="0.4" height="0.8" /></bezel> + + + </view> +</mamelayout> diff --git a/src/mess/layout/ssimon.lay b/src/mess/layout/ssimon.lay index d2d43002475..38540fbfaf4 100644 --- a/src/mess/layout/ssimon.lay +++ b/src/mess/layout/ssimon.lay @@ -42,16 +42,12 @@ <bounds x="0" y="0" width="1.6" height="1" /> </rect> <rect state="0"> - <color red="0.4" green="0.4" blue="0.06" /> - <bounds x="0.2" y="0.2" width="1.2" height="0.6" /> - </rect> - <rect state="0"> <color red="0.6" green="0.6" blue="0.1" /> - <bounds x="0.3" y="0.1" width="1.2" height="0.6" /> + <bounds x="0.2" y="0.2" width="1.2" height="0.6" /> </rect> <rect state="1"> <color red="0.6" green="0.6" blue="0.1" /> - <bounds x="0.2" y="0.2" width="1.2" height="0.6" /> + <bounds x="0.3" y="0.25" width="1.0" height="0.5" /> </rect> </element> @@ -81,7 +77,7 @@ <bezel element="static_black"> <bounds left="0" right="47" top="0" bottom="53" /> </bezel> - + <!-- lamps --> <bezel name="lamp3" element="lamp_r" inputtag="IN.1" inputmask="0x08"> diff --git a/src/mess/machine/advision.c b/src/mess/machine/advision.c index 7f3199d8870..4dd92ae27f9 100644 --- a/src/mess/machine/advision.c +++ b/src/mess/machine/advision.c @@ -27,8 +27,8 @@ void advision_state::machine_start() { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); /* configure EA banking */ m_bank1->configure_entry(0, memregion(I8048_TAG)->base()); diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c index 33c89b5dc0b..aea285de11e 100644 --- a/src/mess/machine/amstrad.c +++ b/src/mess/machine/amstrad.c @@ -3032,8 +3032,8 @@ MACHINE_START_MEMBER(amstrad_state,plus) m_system_type = SYSTEM_PLUS; m_centronics->write_data7(0); - astring region_tag; - m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_region_cart = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (!m_region_cart) // this should never happen, since we make carts mandatory! m_region_cart = memregion("maincpu"); } @@ -3076,8 +3076,8 @@ MACHINE_START_MEMBER(amstrad_state,gx4000) m_asic.ram = m_region_user1->base(); // 16kB RAM for ASIC, memory-mapped registers. m_system_type = SYSTEM_GX4000; - astring region_tag; - m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_region_cart = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (!m_region_cart) // this should never happen, since we make carts mandatory! m_region_cart = memregion("maincpu"); } diff --git a/src/mess/machine/apple2gs.c b/src/mess/machine/apple2gs.c index a82e3956f32..e67a0d4a32b 100644 --- a/src/mess/machine/apple2gs.c +++ b/src/mess/machine/apple2gs.c @@ -1856,7 +1856,7 @@ void apple2gs_state::apple2gs_setup_memory() /* allocate memory for E00000-E1FFFF */ m_slowmem = auto_alloc_array_clear(machine(), UINT8, 128*1024); - state_save_register_item_pointer(machine(), "APPLE2GS_SLOWMEM", NULL, 0, m_slowmem, 128*1024); + save_pointer(m_slowmem, "APPLE2GS_SLOWMEM", 128*1024); // install expanded memory // fair warning: other code assumes banks 0 and 1 are the first 128k of the RAM device, so you must install bank 1 at 0x10000 @@ -2008,52 +2008,52 @@ MACHINE_START_MEMBER(apple2gs_state,apple2gscommon) /* save state stuff. note that the driver takes care of docram. */ UINT8* ram = m_ram->pointer(); - state_save_register_item_pointer(machine(), "APPLE2GS_RAM", NULL, 0, ram, m_ram->size()); - - state_save_register_item(machine(), "NEWVIDEO", NULL, 0, m_newvideo); - state_save_register_item(machine(), "BORDERCOLOR", NULL, 0, m_bordercolor); - state_save_register_item(machine(), "VGCINT", NULL,0, m_vgcint); - state_save_register_item(machine(), "LANGSEL", NULL,0, m_langsel); - state_save_register_item(machine(), "SLTROMSEL", NULL,0, m_sltromsel); - state_save_register_item(machine(), "CYAREG", NULL,0, m_cyareg); - state_save_register_item(machine(), "INTEN", NULL,0, m_inten); - state_save_register_item(machine(), "INTFLAG", NULL,0, m_intflag); - state_save_register_item(machine(), "SHADOW", NULL,0, m_shadow); - state_save_register_item(machine(), "PENDIRQ", NULL,0, m_pending_irqs); - state_save_register_item(machine(), "MX", NULL,0, m_mouse_x); - state_save_register_item(machine(), "MY", NULL,0, m_mouse_y); - state_save_register_item(machine(), "MDX", NULL,0, m_mouse_dx); - state_save_register_item(machine(), "MDY", NULL,0, m_mouse_dy); - - state_save_register_item(machine(), "CLKDATA", NULL,0, m_clock_data); - state_save_register_item(machine(), "CLKCTRL", NULL,0, m_clock_control); - state_save_register_item(machine(), "CLKRD", NULL,0, m_clock_read); - state_save_register_item(machine(), "CLKREG1", NULL,0, m_clock_reg1); - state_save_register_item(machine(), "CLKCURTIME", NULL,0, m_clock_curtime); - state_save_register_item(machine(), "CLKCURTIMEINT", NULL,0, m_clock_curtime_interval); -// state_save_register_item(machine(), "CLKMODE", NULL,0, m_clock_mode); + save_pointer(ram, "APPLE2GS_RAM", m_ram->size()); + + save_item(m_newvideo, "NEWVIDEO"); + save_item(m_bordercolor, "BORDERCOLOR"); + save_item(m_vgcint, "VGCINT"); + save_item(m_langsel, "LANGSEL"); + save_item(m_sltromsel, "SLTROMSEL"); + save_item(m_cyareg, "CYAREG"); + save_item(m_inten, "INTEN"); + save_item(m_intflag, "INTFLAG"); + save_item(m_shadow, "SHADOW"); + save_item(m_pending_irqs, "PENDIRQ"); + save_item(m_mouse_x, "MX"); + save_item(m_mouse_y, "MY"); + save_item(m_mouse_dx, "MDX"); + save_item(m_mouse_dy, "MDY"); + + save_item(m_clock_data, "CLKDATA"); + save_item(m_clock_control, "CLKCTRL"); + save_item(m_clock_read, "CLKRD"); + save_item(m_clock_reg1, "CLKREG1"); + save_item(m_clock_curtime, "CLKCURTIME"); + save_item(m_clock_curtime_interval, "CLKCURTIMEINT"); +// save_item(m_clock_mode, "CLKMODE"); save_item(NAME(m_clock_bram)); #if !RUN_ADB_MICRO save_item(NAME(m_adb_memory)); save_item(NAME(m_adb_command_bytes)); save_item(NAME(m_adb_response_bytes)); -// state_save_register_item(machine(), "ADB", NULL,0, m_adb_state); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_command); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_mode); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_kmstatus); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_latent_result); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_command_length); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_command_pos); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_response_length); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_response_pos); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_address_keyboard); - state_save_register_item(machine(), "ADB", NULL,0, m_adb_address_mouse); +// save_item(m_adb_state, "ADB/m_adb_state"); + save_item(m_adb_command, "ADB/m_adb_command"); + save_item(m_adb_mode, "ADB/m_adb_mode"); + save_item(m_adb_kmstatus, "ADB/m_adb_kmstatus"); + save_item(m_adb_latent_result, "ADB/m_adb_latent_result"); + save_item(m_adb_command_length, "ADB/m_adb_command_length"); + save_item(m_adb_command_pos, "ADB/m_adb_command_pos"); + save_item(m_adb_response_length, "ADB/m_adb_response_length"); + save_item(m_adb_response_pos, "ADB/m_adb_response_pos"); + save_item(m_adb_address_keyboard, "ADB/m_adb_address_keyboard"); + save_item(m_adb_address_mouse, "ADB/m_adb_address_mouse"); #endif - state_save_register_item(machine(), "SNDGLUCTRL", NULL,0, m_sndglu_ctrl); - state_save_register_item(machine(), "SNDGLUADDR", NULL,0, m_sndglu_addr); - state_save_register_item(machine(), "SNDGLUDUMMYRD", NULL,0, m_sndglu_dummy_read); + save_item(m_sndglu_ctrl, "SNDGLUCTRL"); + save_item(m_sndglu_addr, "SNDGLUADDR"); + save_item(m_sndglu_dummy_read, "SNDGLUDUMMYRD"); - state_save_register_item(machine(), "ECHOBANK", NULL,0, m_echo_bank); + save_item(m_echo_bank, "ECHOBANK"); m_clock_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(apple2gs_state::apple2gs_clock_tick),this)); m_clock_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1)); diff --git a/src/mess/machine/bbc.c b/src/mess/machine/bbc.c index a3a1f517b8b..12923f19048 100644 --- a/src/mess/machine/bbc.c +++ b/src/mess/machine/bbc.c @@ -2033,22 +2033,22 @@ DRIVER_INIT_MEMBER(bbc_state,bbcm) // setup pointers for optional EPROMs void bbc_state::bbc_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size) { - astring region_tag; + std::string region_tag; memory_region *tmp_reg; UINT8 *eprom[4]; - if (m_exp1 && (tmp_reg = memregion(region_tag.cpy(m_exp1->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()))) + if (m_exp1 && (tmp_reg = memregion(region_tag.assign(m_exp1->tag()).append(GENERIC_ROM_REGION_TAG).c_str()))) eprom[0] = tmp_reg->base() + shift; else eprom[0] = m_region_opt->base() + 0x0000 + shift; - if (m_exp2 && (tmp_reg = memregion(region_tag.cpy(m_exp2->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()))) + if (m_exp2 && (tmp_reg = memregion(region_tag.assign(m_exp2->tag()).append(GENERIC_ROM_REGION_TAG).c_str()))) eprom[1] = tmp_reg->base() + shift; else eprom[1] = m_region_opt->base() + 0x4000 + shift; - if (m_exp3 && (tmp_reg = memregion(region_tag.cpy(m_exp3->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()))) + if (m_exp3 && (tmp_reg = memregion(region_tag.assign(m_exp3->tag()).append(GENERIC_ROM_REGION_TAG).c_str()))) eprom[2] = tmp_reg->base() + shift; else eprom[2] = m_region_opt->base() + 0x8000 + shift; - if (m_exp4 && (tmp_reg = memregion(region_tag.cpy(m_exp4->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()))) + if (m_exp4 && (tmp_reg = memregion(region_tag.assign(m_exp4->tag()).append(GENERIC_ROM_REGION_TAG).c_str()))) eprom[3] = tmp_reg->base() + shift; else eprom[3] = m_region_opt->base() + 0xc000 + shift; @@ -2067,14 +2067,14 @@ void bbc_state::bbc_setup_banks(memory_bank *membank, int banks, UINT32 shift, U void bbc_state::bbcm_setup_banks(memory_bank *membank, int banks, UINT32 shift, UINT32 size) { - astring region_tag; + std::string region_tag; memory_region *tmp_reg; UINT8 *eprom[2]; - if (m_exp1 && (tmp_reg = memregion(region_tag.cpy(m_exp1->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()))) + if (m_exp1 && (tmp_reg = memregion(region_tag.assign(m_exp1->tag()).append(GENERIC_ROM_REGION_TAG).c_str()))) eprom[0] = tmp_reg->base() + shift; else eprom[0] = m_region_opt->base() + 0x0000 + shift; - if (m_exp2 && (tmp_reg = memregion(region_tag.cpy(m_exp2->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()))) + if (m_exp2 && (tmp_reg = memregion(region_tag.assign(m_exp2->tag()).append(GENERIC_ROM_REGION_TAG).c_str()))) eprom[1] = tmp_reg->base() + shift; else eprom[1] = m_region_opt->base() + 0x8000 + shift; diff --git a/src/mess/machine/cuda.c b/src/mess/machine/cuda.c index aa2dc4e4222..c7321554409 100644 --- a/src/mess/machine/cuda.c +++ b/src/mess/machine/cuda.c @@ -438,8 +438,7 @@ void cuda_device::device_start() save_item(NAME(pram)); save_item(NAME(disk_pram)); - astring tempstring; - UINT8 *rom = device().machine().root_device().memregion(device().subtag(tempstring, CUDA_CPU_TAG).c_str())->base(); + UINT8 *rom = device().machine().root_device().memregion(device().subtag(CUDA_CPU_TAG).c_str())->base(); if (rom) { diff --git a/src/mess/machine/egret.c b/src/mess/machine/egret.c index b8cb5e78cf6..b0d760a635a 100644 --- a/src/mess/machine/egret.c +++ b/src/mess/machine/egret.c @@ -387,8 +387,7 @@ void egret_device::device_start() save_item(NAME(pram)); save_item(NAME(disk_pram)); - astring tempstring; - UINT8 *rom = device().machine().root_device().memregion(device().subtag(tempstring, EGRET_CPU_TAG).c_str())->base(); + UINT8 *rom = device().machine().root_device().memregion(device().subtag(EGRET_CPU_TAG).c_str())->base(); if (rom) { diff --git a/src/mess/machine/electron.c b/src/mess/machine/electron.c index d88d2cfcc2c..e344624b444 100644 --- a/src/mess/machine/electron.c +++ b/src/mess/machine/electron.c @@ -346,8 +346,8 @@ void electron_state::machine_reset() void electron_state::machine_start() { UINT8 *lo_rom, *up_rom; - astring region_tag; - memory_region *cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + memory_region *cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); if (cart_rom) up_rom = cart_rom->base(); diff --git a/src/mess/machine/gamecom.c b/src/mess/machine/gamecom.c index 49742f3ffa4..2d2b9908c71 100644 --- a/src/mess/machine/gamecom.c +++ b/src/mess/machine/gamecom.c @@ -25,9 +25,9 @@ void gamecom_state::machine_reset() m_lcv_reg = 0x27; m_lcdc_reg = 0xb0; - astring region_tag; - m_cart1_rom = memregion(region_tag.cpy(m_cart1->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); - m_cart2_rom = memregion(region_tag.cpy(m_cart2->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart1_rom = memregion(region_tag.assign(m_cart1->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); + m_cart2_rom = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); } void gamecom_state::gamecom_set_mmu(UINT8 mmu, UINT8 data) diff --git a/src/mess/machine/hp48.c b/src/mess/machine/hp48.c index a14d9c78172..a40bb747bd9 100644 --- a/src/mess/machine/hp48.c +++ b/src/mess/machine/hp48.c @@ -1130,9 +1130,9 @@ void hp48_state::hp48_machine_start( hp48_models model ) save_item(NAME(m_bank_switch) ); for ( i = 0; i < 6; i++ ) { - state_save_register_item(machine(), "globals", NULL, i, m_modules[i].state ); - state_save_register_item(machine(), "globals", NULL, i, m_modules[i].base ); - state_save_register_item(machine(), "globals", NULL, i, m_modules[i].mask ); + save_item(m_modules[i].state, "globals/m_modules[i].state", i); + save_item(m_modules[i].base, "globals/m_modules[i].base", i); + save_item(m_modules[i].mask, "globals/m_modules[i].mask", i); } save_item(NAME(m_io) ); machine().save().register_postload( save_prepost_delegate(FUNC(hp48_state::hp48_update_annunciators), this )); diff --git a/src/mess/machine/lynx.c b/src/mess/machine/lynx.c index f2864ef3ed6..df70f47f6d3 100644 --- a/src/mess/machine/lynx.c +++ b/src/mess/machine/lynx.c @@ -1381,11 +1381,11 @@ void lynx_state::lynx_timer_init(int which) memset(&m_timer[which], 0, sizeof(LYNX_TIMER)); m_timer[which].timer = timer_alloc(TIMER_SHOT); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].bakup); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].cntrl1); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].cntrl2); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].counter); - state_save_register_item(machine(), "Lynx", NULL, which, m_timer[which].timer_active); + save_item(NAME(m_timer[which].bakup), which); + save_item(NAME(m_timer[which].cntrl1), which); + save_item(NAME(m_timer[which].cntrl2), which); + save_item(NAME(m_timer[which].counter), which); + save_item(NAME(m_timer[which].timer_active), which); } void lynx_state::lynx_timer_signal_irq(int which) diff --git a/src/mess/machine/m24_z8000.c b/src/mess/machine/m24_z8000.c new file mode 100644 index 00000000000..540d47ddfb1 --- /dev/null +++ b/src/mess/machine/m24_z8000.c @@ -0,0 +1,227 @@ +#include "m24_z8000.h" + +const device_type M24_Z8000 = &device_creator<m24_z8000_device>; + +m24_z8000_device::m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, M24_Z8000, "Olivetti M24 Z8000 Adapter", tag, owner, clock, "m24_z8000", __FILE__), + m_z8000(*this, "z8000"), + m_maincpu(*this, ":maincpu"), + m_pic(*this, ":mb:pic8259"), + m_halt_out(*this), + m_z8000_halt(true) +{ +} + +void m24_z8000_device::device_start() +{ + m_halt_out.resolve_safe(); +} + +void m24_z8000_device::device_reset() +{ + m_z8000_halt = true; + m_z8000_mem = false; + m_timer_irq = false; + m_irq = 0; + m_z8000->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); +} + +ROM_START( m24_z8000 ) + ROM_REGION(0x4000, "z8000", 0) + ROM_LOAD("m24apb.bin", 0x0000, 0x4000, CRC(3b3d2895) SHA1(ff048cf61b090b147be7e29a929a0be7b3ac8409)) +ROM_END + + +const rom_entry *m24_z8000_device::device_rom_region() const +{ + return ROM_NAME( m24_z8000 ); +} + +static ADDRESS_MAP_START(z8000_prog, AS_PROGRAM, 16, m24_z8000_device) + AM_RANGE(0x40000, 0x43fff) AM_ROM AM_REGION("z8000", 0) + AM_RANGE(0x50000, 0x53fff) AM_ROM AM_REGION("z8000", 0) + AM_RANGE(0x70000, 0x73fff) AM_ROM AM_REGION("z8000", 0) + AM_RANGE(0x00000, 0xfffff) AM_READWRITE(pmem_r, pmem_w) +ADDRESS_MAP_END + +static ADDRESS_MAP_START(z8000_data, AS_DATA, 16, m24_z8000_device) + AM_RANGE(0x40000, 0x43fff) AM_ROM AM_REGION("z8000", 0) + AM_RANGE(0x70000, 0x73fff) AM_ROM AM_REGION("z8000", 0) + AM_RANGE(0x00000, 0xfffff) AM_READWRITE(dmem_r, dmem_w) +ADDRESS_MAP_END + +static ADDRESS_MAP_START(z8000_io, AS_IO, 16, m24_z8000_device) + AM_RANGE(0x0080, 0x0081) AM_WRITE8(irqctl_w, 0x00ff) + AM_RANGE(0x00a0, 0x00a1) AM_WRITE8(serctl_w, 0x00ff) + AM_RANGE(0x00c0, 0x00c1) AM_DEVREADWRITE8("i8251", i8251_device, data_r, data_w, 0x00ff) + AM_RANGE(0x00c2, 0x00c3) AM_DEVREADWRITE8("i8251", i8251_device, status_r, control_w, 0x00ff) + AM_RANGE(0x0120, 0x0127) AM_DEVREADWRITE8("pit8253", pit8253_device, read, write, 0x00ff) + AM_RANGE(0x80c0, 0x80c1) AM_READWRITE8(handshake_r, handshake_w, 0x00ff) + AM_RANGE(0x8000, 0x83ff) AM_READWRITE(i86_io_r, i86_io_w) +ADDRESS_MAP_END + +static MACHINE_CONFIG_FRAGMENT( m24_z8000 ) + MCFG_CPU_ADD("z8000", Z8001, XTAL_8MHz/2) + MCFG_CPU_PROGRAM_MAP(z8000_prog) + MCFG_CPU_DATA_MAP(z8000_data) + MCFG_CPU_IO_MAP(z8000_io) + MCFG_CPU_IRQ_ACKNOWLEDGE_DRIVER(m24_z8000_device, int_cb) + MCFG_Z8000_MO(WRITELINE(m24_z8000_device, mo_w)) + + MCFG_DEVICE_ADD("pit8253", PIT8253, 0) + MCFG_PIT8253_CLK0(19660000/15) + MCFG_PIT8253_OUT0_HANDLER(NULL) //8251 + MCFG_PIT8253_CLK1(19660000/15) + MCFG_PIT8253_OUT1_HANDLER(NULL) + MCFG_PIT8253_CLK2(19660000/15) + MCFG_PIT8253_OUT2_HANDLER(WRITELINE(m24_z8000_device, timer_irq_w)) + + MCFG_DEVICE_ADD("i8251", I8251, 0) +MACHINE_CONFIG_END + +machine_config_constructor m24_z8000_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( m24_z8000 ); +} + +const UINT8 m24_z8000_device::pmem_table[16][4] = + {{0, 1, 2, 3}, {1, 2, 3, 255}, {4, 5, 6, 7}, {46, 40, 41, 42}, + {255, 255, 255, 255}, {255, 255, 255, 47}, {1, 2, 3, 255}, {255, 255, 255, 255}, + {1, 2, 8, 9}, {5, 6, 10, 11}, {1, 2, 8, 9}, {12, 13, 14, 15}, + {16, 17, 18, 19}, {20, 21, 22, 23}, {24, 25, 26, 27}, {28, 29, 30, 31}}; + +READ16_MEMBER(m24_z8000_device::pmem_r) +{ + UINT16 ret; + UINT8 hostseg; + offset <<= 1; + if(!m_z8000_mem) + return memregion(subtag("z8000").c_str())->u16(offset >> 1); + + hostseg = pmem_table[(offset >> 16) & 0xf][(offset >> 14) & 3]; + if(hostseg == 255) + return 0; + offset = (offset & 0x3fff) | (hostseg << 14); + if((hostseg >= 40) && (hostseg <= 47)) + offset = (offset & 0xf0000) | BITSWAP16(offset,15,7,6,14,13,12,11,10,9,8,5,4,3,2,1,0); // move A6/A7 so CGA framebuffer appears linear + ret = m_maincpu->space(AS_PROGRAM).read_word(offset, (mem_mask << 8) | (mem_mask >> 8)); + return (ret << 8) | (ret >> 8); +} + +WRITE16_MEMBER(m24_z8000_device::pmem_w) +{ + UINT8 hostseg; + data = (data << 8) | (data >> 8); + offset <<= 1; + hostseg = pmem_table[(offset >> 16) & 0xf][(offset >> 14) & 3]; + if(hostseg == 255) + return; + offset = (offset & 0x3fff) | (hostseg << 14); + if((hostseg >= 40) && (hostseg <= 47)) + offset = (offset & 0xf0000) | BITSWAP16(offset,15,7,6,14,13,12,11,10,9,8,5,4,3,2,1,0); + m_maincpu->space(AS_PROGRAM).write_word(offset, data, (mem_mask << 8) | (mem_mask >> 8)); +} + +const UINT8 m24_z8000_device::dmem_table[16][4] = + {{0, 1, 2, 3}, {4, 5, 6, 7}, {4, 5, 6, 7}, {46, 40, 41, 42}, + {255, 255, 255, 255}, {1, 2, 3, 47}, {1, 2, 3, 255}, {255, 255, 255, 255}, + {5, 6, 10, 11}, {5, 6, 10, 11}, {1, 2, 8, 9}, {12, 13, 14, 15}, + {16, 17, 18, 19}, {20, 21, 22, 23}, {24, 25, 26, 27}, {28, 29, 30, 31}}; + +READ16_MEMBER(m24_z8000_device::dmem_r) +{ + UINT16 ret; + UINT8 hostseg; + offset <<= 1; + hostseg = dmem_table[(offset >> 16) & 0xf][(offset >> 14) & 3]; + if(hostseg == 255) + return 0; + offset = (offset & 0x3fff) | (hostseg << 14); + if((hostseg >= 40) && (hostseg <= 47)) + offset = (offset & 0xf0000) | BITSWAP16(offset,15,7,6,14,13,12,11,10,9,8,5,4,3,2,1,0); + ret = m_maincpu->space(AS_PROGRAM).read_word(offset, (mem_mask << 8) | (mem_mask >> 8)); + return (ret << 8) | (ret >> 8); +} + +WRITE16_MEMBER(m24_z8000_device::dmem_w) +{ + UINT8 hostseg; + data = (data << 8) | (data >> 8); + offset <<= 1; + hostseg = dmem_table[(offset >> 16) & 0xf][(offset >> 14) & 3]; + if(hostseg == 255) + return; + offset = (offset & 0x3fff) | (hostseg << 14); + if((hostseg >= 40) && (hostseg <= 47)) + offset = (offset & 0xf0000) | BITSWAP16(offset,15,7,6,14,13,12,11,10,9,8,5,4,3,2,1,0); + m_maincpu->space(AS_PROGRAM).write_word(offset, data, (mem_mask << 8) | (mem_mask >> 8)); +} + +READ16_MEMBER(m24_z8000_device::i86_io_r) +{ + UINT16 ret = m_maincpu->space(AS_IO).read_word(offset << 1, (mem_mask << 8) | (mem_mask >> 8)); + return (ret << 8) | (ret >> 8); +} + +WRITE16_MEMBER(m24_z8000_device::i86_io_w) +{ + data = (data << 8) | (data >> 8); + m_maincpu->space(AS_IO).write_word(offset << 1, data, (mem_mask << 8) | (mem_mask >> 8)); +} + +WRITE8_MEMBER(m24_z8000_device::irqctl_w) +{ + m_irq = data; +} + +WRITE8_MEMBER(m24_z8000_device::serctl_w) +{ + m_z8000_mem = (data & 0x20) ? true : false; +} + +IRQ_CALLBACK_MEMBER(m24_z8000_device::int_cb) +{ + if (!irqline) + { + m_z8000->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); + return 0xff; // NVI, value ignored + } + else + return m_pic->acknowledge(); +} + +READ8_MEMBER(m24_z8000_device::handshake_r) +{ + return 0; +} + +WRITE8_MEMBER(m24_z8000_device::handshake_w) +{ + m_handshake = data; + if(data & 1) + { + m_z8000->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); + m_z8000->set_input_line(INPUT_LINE_RESET, PULSE_LINE); + m_z8000->mi_w(CLEAR_LINE); + m_z8000_halt = false; + } + else + { + m_z8000->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); + m_z8000_halt = true; + m_z8000_mem = false; + m_halt_out(CLEAR_LINE); + } +} + +WRITE_LINE_MEMBER(m24_z8000_device::mo_w) +{ + m_z8000->mi_w(state ? ASSERT_LINE : CLEAR_LINE); + m_halt_out(state); +} + +WRITE_LINE_MEMBER(m24_z8000_device::timer_irq_w) +{ + m_timer_irq = state ? true : false; + m_z8000->set_input_line(INPUT_LINE_IRQ0, state ? ASSERT_LINE : CLEAR_LINE); +} diff --git a/src/mess/machine/m24_z8000.h b/src/mess/machine/m24_z8000.h new file mode 100644 index 00000000000..1d27f882dd6 --- /dev/null +++ b/src/mess/machine/m24_z8000.h @@ -0,0 +1,54 @@ +#ifndef M24_Z8000_H_ +#define M24_Z8000_H_ + +#include "emu.h" +#include "cpu/z8000/z8000.h" +#include "machine/i8251.h" +#include "machine/pit8253.h" +#include "machine/pic8259.h" + +#define MCFG_M24_Z8000_HALT(_devcb) \ + devcb = &m24_z8000_device::set_halt_callback(*device, DEVCB_##_devcb); + +class m24_z8000_device : public device_t +{ +public: + m24_z8000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual const rom_entry *device_rom_region() const; + virtual machine_config_constructor device_mconfig_additions() const; + template<class _Object> static devcb_base &set_halt_callback(device_t &device, _Object object) { return downcast<m24_z8000_device &>(device).m_halt_out.set_callback(object); } + + DECLARE_READ16_MEMBER(pmem_r); + DECLARE_WRITE16_MEMBER(pmem_w); + DECLARE_READ16_MEMBER(dmem_r); + DECLARE_WRITE16_MEMBER(dmem_w); + DECLARE_READ16_MEMBER(i86_io_r); + DECLARE_WRITE16_MEMBER(i86_io_w); + DECLARE_WRITE8_MEMBER(irqctl_w); + DECLARE_WRITE8_MEMBER(serctl_w); + DECLARE_READ8_MEMBER(handshake_r); + DECLARE_WRITE8_MEMBER(handshake_w); + DECLARE_WRITE_LINE_MEMBER(mo_w); + DECLARE_WRITE_LINE_MEMBER(timer_irq_w); + IRQ_CALLBACK_MEMBER(int_cb); + bool halted() { return m_z8000_halt; } + + required_device<z8001_device> m_z8000; +protected: + void device_start(); + void device_reset(); + +private: + required_device<cpu_device> m_maincpu; + required_device<pic8259_device> m_pic; + devcb_write_line m_halt_out; + static const UINT8 pmem_table[16][4]; + static const UINT8 dmem_table[16][4]; + UINT8 m_handshake, m_irq; + bool m_z8000_halt, m_z8000_mem, m_timer_irq; +}; + +extern const device_type M24_Z8000; + +#endif /* M24_Z8000_H_ */ diff --git a/src/mess/machine/pce_cd.c b/src/mess/machine/pce_cd.c index 03e5b8cfdf7..ffec0a7e5b4 100644 --- a/src/mess/machine/pce_cd.c +++ b/src/mess/machine/pce_cd.c @@ -232,7 +232,7 @@ void pce_cd_device::late_setup() void pce_cd_device::nvram_init(nvram_device &nvram, void *data, size_t size) { static const UINT8 init[8] = { 0x48, 0x55, 0x42, 0x4d, 0x00, 0xa0, 0x10, 0x80 }; - + memset(data, 0x00, size); memcpy(data, init, sizeof(init)); } diff --git a/src/mess/machine/pce_cd.h b/src/mess/machine/pce_cd.h index 580884c8f86..bf2b29423b9 100644 --- a/src/mess/machine/pce_cd.h +++ b/src/mess/machine/pce_cd.h @@ -61,7 +61,7 @@ public: DECLARE_READ8_MEMBER(acard_r); void nvram_init(nvram_device &nvram, void *data, size_t size); - + private: void adpcm_stop(UINT8 irq_flag); void adpcm_play(); diff --git a/src/mess/machine/primo.c b/src/mess/machine/primo.c index f7bf1079efd..d82df83669d 100644 --- a/src/mess/machine/primo.c +++ b/src/mess/machine/primo.c @@ -242,9 +242,9 @@ void primo_state::primo_common_machine_init () void primo_state::machine_start() { - astring region_tag; - m_cart1_rom = memregion(region_tag.cpy(m_cart1->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); - m_cart2_rom = memregion(region_tag.cpy(m_cart2->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart1_rom = memregion(region_tag.assign(m_cart1->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); + m_cart2_rom = memregion(region_tag.assign(m_cart2->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); } void primo_state::machine_reset() diff --git a/src/mess/machine/sms.c b/src/mess/machine/sms.c index 6cc56fc1302..402caedba67 100644 --- a/src/mess/machine/sms.c +++ b/src/mess/machine/sms.c @@ -1,6 +1,7 @@ #include "emu.h" #include "crsshair.h" #include "video/315_5124.h" +#include "sound/sn76496.h" #include "sound/2413intf.h" #include "includes/sms.h" @@ -124,34 +125,6 @@ void sms_state::sms_get_inputs() } -WRITE8_MEMBER(sms_state::sms_fm_detect_w) -{ - if (m_has_fm) - m_fm_detect = (data & 0x01); -} - - -READ8_MEMBER(sms_state::sms_fm_detect_r) -{ - if (m_has_fm) - { - return m_fm_detect; - } - else - { - if (!m_is_mark_iii && (m_mem_ctrl_reg & IO_CHIP)) - { - return 0xff; - } - else - { - sms_get_inputs(); - return m_port_dc_reg; - } - } -} - - WRITE8_MEMBER(sms_state::sms_io_control_w) { bool latch_hcount = false; @@ -400,16 +373,37 @@ READ8_MEMBER(sms_state::sms_input_port_dd_r) } -WRITE8_MEMBER(sms_state::sms_ym2413_register_port_w) +WRITE8_MEMBER(sms_state::sms_audio_control_w) { if (m_has_fm) - m_ym->write(space, 0, (data & 0x3f)); + { + if (m_is_smsj) + m_audio_control = data & 0x03; + else + m_audio_control = data & 0x01; + } } -WRITE8_MEMBER(sms_state::sms_ym2413_data_port_w) +READ8_MEMBER(sms_state::sms_audio_control_r) { if (m_has_fm) + return m_audio_control & 0x01; // just one bit even for smsj. + else + return sms_input_port_dc_r(space, offset); +} + + +WRITE8_MEMBER(sms_state::sms_ym2413_register_port_w) +{ + if (m_has_fm && (m_audio_control & 0x01)) + m_ym->write(space, 0, data & 0x3f); +} + + +WRITE8_MEMBER(sms_state::sms_ym2413_data_port_w) +{ + if (m_has_fm && (m_audio_control & 0x01)) { //logerror("data_port_w %x %x\n", offset, data); m_ym->write(space, 1, data); @@ -417,6 +411,31 @@ WRITE8_MEMBER(sms_state::sms_ym2413_data_port_w) } +WRITE8_MEMBER(sms_state::sms_psg_w) +{ + // On Japanese SMS, if FM is enabled, PSG must be explicitly enabled too. + if (m_is_smsj && (m_audio_control & 0x01) && !(m_audio_control & 0x02)) + return; + + m_psg_sms->write(space, offset, data, mem_mask); +} + + +WRITE8_MEMBER(sms_state::gg_psg_w) +{ + m_psg_gg->write(space, offset, data, mem_mask); +} + + +WRITE8_MEMBER(sms_state::gg_psg_stereo_w) +{ + if (m_cartslot->exists() && m_cartslot->m_cart->get_sms_mode()) + return; + + m_psg_gg->stereo_w(space, offset, data, mem_mask); +} + + READ8_MEMBER(sms_state::gg_input_port_00_r) { if (m_cartslot->exists() && m_cartslot->m_cart->get_sms_mode()) @@ -871,7 +890,7 @@ MACHINE_START_MEMBER(sms_state,sms) // a F0 pattern on power up; F0 = RET P. // This initialization breaks some Game Gear games though (e.g. // tempojr), suggesting that not all systems had the same initialization. - // This also breaks some homebrew software (e.g. Nine Pixels). + // This also breaks some homebrew softwares (e.g. Nine Pixels). // For the moment we apply this to systems that have the Japanese SMS // cartridge slot. if (m_has_jpn_sms_cart_slot) @@ -888,7 +907,7 @@ MACHINE_START_MEMBER(sms_state,sms) if (m_has_fm) { - save_item(NAME(m_fm_detect)); + save_item(NAME(m_audio_control)); } if (!m_is_mark_iii) @@ -935,7 +954,7 @@ MACHINE_START_MEMBER(sms_state,sms) MACHINE_RESET_MEMBER(sms_state,sms) { if (m_has_fm) - m_fm_detect = 0x01; + m_audio_control = 0x00; if (!m_is_mark_iii) { diff --git a/src/mess/machine/spec_snqk.c b/src/mess/machine/spec_snqk.c index dfc8ce696f5..480c6188e18 100644 --- a/src/mess/machine/spec_snqk.c +++ b/src/mess/machine/spec_snqk.c @@ -46,22 +46,22 @@ static void log_quickload(running_machine &machine, const char *type, UINT32 start, UINT32 length, UINT32 exec, const char *exec_format) { - astring tempstring; + std::string tempstring; logerror("Loading %04X bytes of RAM at %04X\n", length, start); - tempstring.catprintf("Quickload type: %s Length: %d bytes\n", type, length); - tempstring.catprintf("Start: 0x%04X End: 0x%04X Exec: ", start, start + length - 1); + strcatprintf(tempstring,"Quickload type: %s Length: %d bytes\n", type, length); + strcatprintf(tempstring,"Start: 0x%04X End: 0x%04X Exec: ", start, start + length - 1); logerror("Quickload loaded.\n"); if (!core_stricmp(exec_format, EXEC_NA)) - tempstring.cat("N/A"); + tempstring.append("N/A"); else { logerror("Execution can resume with "); logerror(exec_format, exec); logerror("\n"); - tempstring.catprintf(exec_format, exec); + strcatprintf(tempstring,exec_format, exec); } machine.ui().popup_time(10, "%s", tempstring.c_str()); diff --git a/src/mess/machine/svi318.c b/src/mess/machine/svi318.c index 80c0550b2a0..7a2f558e493 100644 --- a/src/mess/machine/svi318.c +++ b/src/mess/machine/svi318.c @@ -421,8 +421,8 @@ DRIVER_INIT_MEMBER(svi318_state, svi328_806) void svi318_state::machine_start() { - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); m_bios_rom = memregion("maincpu"); // 80 column card start diff --git a/src/mess/machine/thomson.c b/src/mess/machine/thomson.c index ad18eed60cc..19be7a86354 100644 --- a/src/mess/machine/thomson.c +++ b/src/mess/machine/thomson.c @@ -375,8 +375,8 @@ DEVICE_IMAGE_LOAD_MEMBER( thomson_state, to7_cartridge ) m_thom_cart_nb_banks = 4; else { - astring errmsg; - errmsg.printf("Invalid cartridge size %u", size); + std::string errmsg; + strprintf(errmsg,"Invalid cartridge size %u", size); image.seterror(IMAGE_ERROR_UNSUPPORTED, errmsg.c_str()); return IMAGE_INIT_FAIL; } @@ -1516,8 +1516,8 @@ DEVICE_IMAGE_LOAD_MEMBER( thomson_state, mo5_cartridge ) m_thom_cart_nb_banks = 4; else { - astring errmsg; - errmsg.printf("Invalid cartridge size %" I64FMT "d", size); + std::string errmsg; + strprintf(errmsg,"Invalid cartridge size %" I64FMT "d", size); image.seterror(IMAGE_ERROR_UNSUPPORTED, errmsg.c_str()); return IMAGE_INIT_FAIL; } diff --git a/src/mess/machine/ti99/gromport.c b/src/mess/machine/ti99/gromport.c index 236f65173fd..726c87a86a8 100644 --- a/src/mess/machine/ti99/gromport.c +++ b/src/mess/machine/ti99/gromport.c @@ -2285,7 +2285,7 @@ rpk_socket* rpk_reader::load_ram_resource(emu_options &options, xml_data_node* r global_free_array(contents); throw rpk_exception(RPK_INVALID_RAM_SPEC, "<ram type='persistent'> must have a 'file' attribute"); } - astring ram_pathname = astring(system_name).cat(PATH_SEPARATOR).cat(ram_filename); + std::string ram_pathname = std::string(system_name).append(PATH_SEPARATOR).append(ram_filename); ram_pname = core_strdup(ram_pathname.c_str()); // load, and fill rest with 00 if (VERBOSE>6) LOG("gromport/RPK: Loading NVRAM contents from '%s'\n", ram_pname); diff --git a/src/mess/machine/ti99/gromport.h b/src/mess/machine/ti99/gromport.h index dd88cb3ca55..115d546c62d 100644 --- a/src/mess/machine/ti99/gromport.h +++ b/src/mess/machine/ti99/gromport.h @@ -509,7 +509,7 @@ public: const char* to_string() { if (m_detail==NULL) return error_text[(int)m_err]; - astring errormsg = astring(error_text[(int)m_err]).cat(": ").cat(m_detail); + std::string errormsg = std::string(error_text[(int)m_err]).append(": ").append(m_detail); return core_strdup(errormsg.c_str()); } diff --git a/src/mess/machine/victor9k_fdc.c b/src/mess/machine/victor9k_fdc.c index 5d4b39b7c4f..1ae238401ed 100644 --- a/src/mess/machine/victor9k_fdc.c +++ b/src/mess/machine/victor9k_fdc.c @@ -54,6 +54,7 @@ #define LOG 0 #define LOG_VIA 0 #define LOG_SCP 0 +#define LOG_BITS 0 #define I8048_TAG "5d" #define M6522_4_TAG "1f" @@ -1069,22 +1070,23 @@ void victor_9000_fdc_t::live_start() cur_live.wrsync = m_wrsync; cur_live.erase = m_erase; - pll_reset(cur_live.tm, attotime::from_nsec(2130)); + pll_reset(cur_live.tm); checkpoint_live = cur_live; pll_save_checkpoint(); live_run(); } -void victor_9000_fdc_t::pll_reset(const attotime &when, const attotime &clock) +void victor_9000_fdc_t::pll_reset(const attotime &when) { cur_pll.reset(when); - cur_pll.set_clock(clock); + cur_pll.set_clock(attotime::from_nsec(2130)); } void victor_9000_fdc_t::pll_start_writing(const attotime &tm) { cur_pll.start_writing(tm); + pll_reset(cur_live.tm); } void victor_9000_fdc_t::pll_commit(floppy_image_device *floppy, const attotime &tm) @@ -1095,6 +1097,7 @@ void victor_9000_fdc_t::pll_commit(floppy_image_device *floppy, const attotime & void victor_9000_fdc_t::pll_stop_writing(floppy_image_device *floppy, const attotime &tm) { cur_pll.stop_writing(floppy, tm); + pll_reset(cur_live.tm); } void victor_9000_fdc_t::pll_save_checkpoint() @@ -1114,7 +1117,7 @@ int victor_9000_fdc_t::pll_get_next_bit(attotime &tm, floppy_image_device *flopp bool victor_9000_fdc_t::pll_write_next_bit(bool bit, attotime &tm, floppy_image_device *floppy, const attotime &limit) { - return cur_pll.write_next_bit_prev_cell(bit, tm, floppy, limit); + return cur_pll.write_next_bit(bit, tm, floppy, limit); } void victor_9000_fdc_t::checkpoint() @@ -1197,10 +1200,22 @@ void victor_9000_fdc_t::live_run(const attotime &limit) return; // read bit - int bit = pll_get_next_bit(cur_live.tm, get_floppy(), limit); - if(bit < 0) - return; + int bit = 0; + if (cur_live.drw) { + bit = pll_get_next_bit(cur_live.tm, get_floppy(), limit); + if(bit < 0) + return; + } + + // write bit + int write_bit = 0; + if (!cur_live.drw) { // TODO WPS + write_bit = BIT(cur_live.shift_reg_write, 9); + if (pll_write_next_bit(write_bit, cur_live.tm, get_floppy(), limit)) + return; + } + // clock read shift register cur_live.shift_reg <<= 1; cur_live.shift_reg |= bit; cur_live.shift_reg &= 0x3ff; @@ -1261,11 +1276,12 @@ void victor_9000_fdc_t::live_run(const attotime &limit) // GCR error int gcr_err = !(brdy || BIT(cur_live.e, 3)); - // write bit - if (!cur_live.drw) { // TODO WPS - int write_bit = BIT(cur_live.shift_reg_write, 9); - if (LOG) logerror("%s writing bit %u sr %03x\n",cur_live.tm.as_string(),write_bit,cur_live.shift_reg_write); - pll_write_next_bit(write_bit, cur_live.tm, get_floppy(), limit); + if (LOG_BITS) { + if (cur_live.drw) { + logerror("%s cyl %u bit %u sync %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),bit,sync,cur_live.bit_counter,cur_live.shift_reg,cur_live.i,cur_live.e); + } else { + logerror("%s cyl %u writing bit %u bc %u sr %03x i %03x e %02x\n",cur_live.tm.as_string(),get_floppy()->get_cyl(),write_bit,cur_live.bit_counter,cur_live.shift_reg_write,cur_live.i,cur_live.e); + } } if (!brdy) { diff --git a/src/mess/machine/victor9k_fdc.h b/src/mess/machine/victor9k_fdc.h index f107e718452..f9005c4af16 100644 --- a/src/mess/machine/victor9k_fdc.h +++ b/src/mess/machine/victor9k_fdc.h @@ -218,7 +218,7 @@ private: floppy_image_device* get_floppy(); void live_start(); - void pll_reset(const attotime &when, const attotime &clock); + void pll_reset(const attotime &when); void pll_start_writing(const attotime &tm); void pll_commit(floppy_image_device *floppy, const attotime &tm); void pll_stop_writing(floppy_image_device *floppy, const attotime &tm); diff --git a/src/mess/machine/vtech2.c b/src/mess/machine/vtech2.c index 98480ab5e6c..b7850bd9f8c 100644 --- a/src/mess/machine/vtech2.c +++ b/src/mess/machine/vtech2.c @@ -73,8 +73,8 @@ DRIVER_INIT_MEMBER(vtech2_state,laser) m_mem = memregion("maincpu")->base(); // check ROM expansion - astring region_tag; - m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG).c_str()); + std::string region_tag; + m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); for (i = 0; i < ARRAY_LENGTH(m_laser_bank); i++) m_laser_bank[i] = -1; diff --git a/src/mess/mess.lst b/src/mess/mess.lst index 6843acc7069..3fde7a755be 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -1662,7 +1662,7 @@ vt520 // 1994 Digital Equipment Corporation //vt525 vk100 // 1980 Digital Equipment Corporation dectalk // 1983 Digital Equipment Corporation -//vt240 // 1983 Digital Equipment Corporation +vt240 // 1983 Digital Equipment Corporation //vt241 mc7105 // Elektronika MC7105 rainbow100a // 1982 DEC Rainbow 100-A @@ -2182,32 +2182,49 @@ ngenb38 // 1991 386i // 199? // Dedicated handhelds/tabletops +einvaderc // Entex +lightfgt // Milton Bradley + bambball // Bambino +bmboxing // Bambino bfriskyt // Bandai packmon // Bandai -msthawk // Bandai(Mattel) +msthawk // Bandai/Mattel zackman // Bandai +bdoramon // Bandai +machiman // Bandai alnattck // Coleco cdkong // Coleco cgalaxn // Coleco cpacman // Coleco -cpacmanr1 // +cpacmanr1 // Coleco (rev 1) cmspacmn // Coleco egalaxn2 // Entex epacman2 // Entex +ghalien // Gakken +gckong // Gakken +gdigdug // Gakken +mwcbaseb // Mattel pbqbert // Parker Brothers +mvbfree // Mego kingman // Tomy tmtron // Tomy +vinvader // VTech maniac // Ideal mathmagi // APF amaztron // Coleco +h2hbaseb // Coleco +h2hfootb // Coleco tc4 // Coleco ebball // Entex ebball2 // Entex ebball3 // Entex einvader // Entex +raisedvl // Entex +gpoker // Gakken +gjackpot // Gakken elecdet // Ideal starwbc // Kenner starwbcp // Kenner (prototype) @@ -2215,12 +2232,14 @@ astro // Kosmos comp4 // Milton Bradley simon // Milton Bradley ssimon // Milton Bradley +bigtrak // Milton Bradley cnsector // Parker Bros merlin // Parker Bros stopthie // Parker Bros stopthiep // Parker Bros (prototype) bankshot // Parker Bros splitsec // Parker Bros +mmerlin // Parker Bros tandy12 // Tandy Radio Shack elecbowl // Marx @@ -2228,10 +2247,16 @@ mbdtower // Milton Bradley ufombs // Bambino ssfball // Bambino +bmsoccer // Bambino +bmsafari // Bambino splasfgt // Bambino bcclimbr // Bandai +invspace // Epoch +efball // Epoch +galaxy2 // Epoch astrocmd // Epoch edracula // Epoch +tccombat // Tomy tmpacman // Tomy tmtennis // Tomy tmscramb // Tomy diff --git a/src/mess/tools/imgtool/imghd.c b/src/mess/tools/imgtool/imghd.c index e96ecc8f51c..f07334d68ef 100644 --- a/src/mess/tools/imgtool/imghd.c +++ b/src/mess/tools/imgtool/imghd.c @@ -52,7 +52,7 @@ imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 hunksize, UINT32 cylind chd_error rc; UINT64 logicalbytes; int hunknum, totalhunks; - astring metadata; + std::string metadata; chd_codec_type compression[4] = { CHD_CODEC_NONE }; /* sanity check args */ @@ -92,7 +92,7 @@ imgtoolerr_t imghd_create(imgtool_stream *stream, UINT32 hunksize, UINT32 cylind } /* write the metadata */ - metadata.format(HARD_DISK_METADATA_FORMAT, cylinders, heads, sectors, seclen); + strprintf(metadata,HARD_DISK_METADATA_FORMAT, cylinders, heads, sectors, seclen); err = (imgtoolerr_t)chd.write_metadata(HARD_DISK_METADATA_TAG, 0, metadata); if (rc != CHDERR_NONE) { diff --git a/src/mess/video/abc1600.c b/src/mess/video/abc1600.c index 7b51036caf2..312e0260425 100644 --- a/src/mess/video/abc1600.c +++ b/src/mess/video/abc1600.c @@ -9,14 +9,6 @@ **********************************************************************/ -/* - - TODO: - - - portrait/landscape detection is broken - -*/ - #include "includes/abc1600.h" #include "abc1600.lh" @@ -620,6 +612,8 @@ WRITE8_MEMBER( abc1600_mover_device::ldty_hb_w ) if (LOG) logerror("%s LDTY HB: %02x\n", machine().describe_context(), data); + if (L_P) return; + m_ty = ((data & 0x0f) << 8) | (m_yto & 0xff); m_yto = ((data & 0x0f) << 8) | (m_yto & 0xff); m_mta = ((data & 0x0f) << 14) | (m_mta & 0x3fff); @@ -649,6 +643,8 @@ WRITE8_MEMBER( abc1600_mover_device::ldty_lb_w ) if (LOG) logerror("%s LDTY LB: %02x\n", machine().describe_context(), data); + if (L_P) return; + m_ty = (m_ty & 0xf00) | data; m_yto = (m_yto & 0xf00) | data; m_mta = (m_mta & 0x3c03f) | (data << 6); diff --git a/src/mess/video/apple2gs.c b/src/mess/video/apple2gs.c index 31580a45160..b45446fe989 100644 --- a/src/mess/video/apple2gs.c +++ b/src/mess/video/apple2gs.c @@ -19,7 +19,7 @@ VIDEO_START_MEMBER(apple2gs_state,apple2gs) apple2_video_start(m_slowmem, m_slowmem+0x10000, 0, 8); m_legacy_gfx = auto_bitmap_ind16_alloc(machine(), 560, 192); - state_save_register_item(machine(), "BORDERCLR", NULL, 0, m_bordercolor); + save_item(m_bordercolor, "BORDERCLR"); save_item(NAME(m_fgcolor)); save_item(NAME(m_bgcolor)); } diff --git a/src/mess/video/stic.c b/src/mess/video/stic.c index 622ef481d98..1de7814f58e 100644 --- a/src/mess/video/stic.c +++ b/src/mess/video/stic.c @@ -58,23 +58,23 @@ void stic_device::device_start() save_item(NAME(m_backtab_buffer)); for (int sp = 0; sp < STIC_MOBS; sp++) { - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].visible); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].xpos); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].ypos); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].coll); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].collision); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].doublex); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].doubley); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].quady); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].xflip); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].yflip); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].behind_foreground); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].grom); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].card); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].color); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].doubleyres); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite[sp].dirty); - state_save_register_item(machine(), "STIC sprite", NULL, sp, m_sprite_buffers[sp]); + save_item(m_sprite[sp].visible, "STIC sprite/m_sprite[sp].visible", sp); + save_item(m_sprite[sp].xpos, "STIC sprite/m_sprite[sp].xpos", sp); + save_item(m_sprite[sp].ypos, "STIC sprite/m_sprite[sp].ypos", sp); + save_item(m_sprite[sp].coll, "STIC sprite/m_sprite[sp].coll", sp); + save_item(m_sprite[sp].collision, "STIC sprite/m_sprite[sp].collision", sp); + save_item(m_sprite[sp].doublex, "STIC sprite/m_sprite[sp].doublex", sp); + save_item(m_sprite[sp].doubley, "STIC sprite/m_sprite[sp].doubley", sp); + save_item(m_sprite[sp].quady, "STIC sprite/m_sprite[sp].quady", sp); + save_item(m_sprite[sp].xflip, "STIC sprite/m_sprite[sp].xflip", sp); + save_item(m_sprite[sp].yflip, "STIC sprite/m_sprite[sp].yflip", sp); + save_item(m_sprite[sp].behind_foreground, "STIC sprite/m_sprite[sp].behind_foreground", sp); + save_item(m_sprite[sp].grom, "STIC sprite/m_sprite[sp].grom", sp); + save_item(m_sprite[sp].card, "STIC sprite/m_sprite[sp].card", sp); + save_item(m_sprite[sp].color, "STIC sprite/m_sprite[sp].color", sp); + save_item(m_sprite[sp].doubleyres, "STIC sprite/m_sprite[sp].doubleyres", sp); + save_item(m_sprite[sp].dirty, "STIC sprite/m_sprite[sp].dirty", sp); + save_item(m_sprite_buffers[sp], "STIC sprite/m_sprite[sp].sprite_buffers", sp); } } diff --git a/src/osd/modules/debugger/debugint.c b/src/osd/modules/debugger/debugint.c index 9e2c988deff..1d25453f443 100644 --- a/src/osd/modules/debugger/debugint.c +++ b/src/osd/modules/debugger/debugint.c @@ -157,7 +157,7 @@ public: { } int active; render_container * container; - astring str; + std::string str; }; /*************************************************************************** @@ -222,7 +222,7 @@ public: rectangle bounds; int ofs_x; int ofs_y; - astring title; + std::string title; int last_x; int last_y; // Scrollbars @@ -459,9 +459,9 @@ static void dview_draw_size(DView *dv) r.width(),r.height(), rgb_t(0xff, 0xff, 0xff, 0x00)); } -static void dview_set_title(DView *dv, astring title) +static void dview_set_title(DView *dv, std::string title) { - if (dv->title.cmp(title) != 0) + if (dv->title.compare(title) != 0) { dv->title = title; dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE); @@ -481,7 +481,7 @@ static void dview_draw_title(DView *dv) dview_draw_outlined_box(dv, RECT_DVIEW_TITLE, 0, 0, dv->bounds.width(), TITLE_HEIGHT, col); - if (!dv->title) + if (dv->title.empty()) return; for (i = 0; i<strlen(dv->title.c_str()); i++) @@ -1155,7 +1155,7 @@ static void CreateMainMenu(running_machine &machine) { const char *subtext = ""; int rc; - astring title; + std::string title; if (menu) global_free( menu); @@ -1180,7 +1180,7 @@ static void CreateMainMenu(running_machine &machine) break; } - menu->item_append(title.cat(focus_view->title).c_str(), NULL, MENU_FLAG_DISABLE, NULL); + menu->item_append(title.append(focus_view->title).c_str(), NULL, MENU_FLAG_DISABLE, NULL); menu->item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL); switch (focus_view->type) @@ -1295,11 +1295,11 @@ static void handle_editor(running_machine &machine) { case UI_EVENT_CHAR: /* if it's a backspace and we can handle it, do so */ - if ((event.ch == 8 || event.ch == 0x7f) && focus_view->editor.str.len() > 0) + if ((event.ch == 8 || event.ch == 0x7f) && focus_view->editor.str.length() > 0) { /* autoschow */ cur_editor = &focus_view->editor; - cur_editor->str = cur_editor->str.substr(0, cur_editor->str.len()-1); + cur_editor->str = cur_editor->str.substr(0, cur_editor->str.length()-1); } /* if it's any other key and we're not maxed out, update */ else if (event.ch >= ' ' && event.ch < 0x7f) @@ -1310,7 +1310,7 @@ static void handle_editor(running_machine &machine) cur_editor = &focus_view->editor; ret = utf8_from_uchar(buf, 10, event.ch); buf[ret] = 0; - cur_editor->str = cur_editor->str.cat(buf); + cur_editor->str = cur_editor->str.append(buf); } break; default: @@ -1380,7 +1380,7 @@ static void handle_menus(running_machine &machine) static void followers_set_cpu(device_t *device) { - astring title; + std::string title; for (DView *dv = list; dv != NULL; dv = dv->next) { @@ -1392,7 +1392,7 @@ static void followers_set_cpu(device_t *device) case DVT_DISASSEMBLY: case DVT_STATE: dv->view->set_source(*source); - title.printf("%s", source->name()); + strprintf(title, "%s", source->name()); dview_set_title(dv, title); break; } diff --git a/src/osd/modules/debugger/qt/deviceinformationwindow.h b/src/osd/modules/debugger/qt/deviceinformationwindow.h index eb32398e9b3..58fcb764cc8 100644 --- a/src/osd/modules/debugger/qt/deviceinformationwindow.h +++ b/src/osd/modules/debugger/qt/deviceinformationwindow.h @@ -34,7 +34,7 @@ private: class DeviceInformationWindowQtConfig : public WindowQtConfig { public: - astring m_device_tag; + std::string m_device_tag; DeviceInformationWindowQtConfig() : WindowQtConfig(WIN_TYPE_DEVICE_INFORMATION) diff --git a/src/osd/modules/debugger/qt/mainwindow.c b/src/osd/modules/debugger/qt/mainwindow.c index 8e07cd09c3e..382370fc4c8 100644 --- a/src/osd/modules/debugger/qt/mainwindow.c +++ b/src/osd/modules/debugger/qt/mainwindow.c @@ -136,8 +136,8 @@ void MainWindow::setProcessor(device_t* processor) m_dasmFrame->view()->verticalScrollBar()->setValue(m_dasmFrame->view()->view()->visible_position().y); // Window title - astring title; - title.printf("Debug: %s - %s '%s'", m_machine->system().name, processor->name(), processor->tag()); + std::string title; + strprintf(title,"Debug: %s - %s '%s'", m_machine->system().name, processor->name(), processor->tag()); setWindowTitle(title.c_str()); } @@ -225,14 +225,14 @@ void MainWindow::toggleBreakpointAtCursor(bool changedTo) } // If none exists, add a new one - astring command; + std::string command; if (bpindex == -1) { - command.printf("bpset 0x%X", address); + strprintf(command,"bpset 0x%X", address); } else { - command.printf("bpclear 0x%X", bpindex); + strprintf(command,"bpclear 0x%X", bpindex); } debug_console_execute_command(*m_machine, command.c_str(), 1); } @@ -257,8 +257,8 @@ void MainWindow::enableBreakpointAtCursor(bool changedTo) if (bp != NULL) { INT32 const bpindex = bp->index(); - astring command; - command.printf(bp->enabled() ? "bpdisable 0x%X" : "bpenable 0x%X", bpindex); + std::string command; + strprintf(command,bp->enabled() ? "bpdisable 0x%X" : "bpenable 0x%X", bpindex); debug_console_execute_command(*m_machine, command.c_str(), 1); } } @@ -273,8 +273,8 @@ void MainWindow::runToCursor(bool changedTo) if (dasmView->cursor_visible() && (debug_cpu_get_visible_cpu(*m_machine) == dasmView->source()->device())) { offs_t address = downcast<debug_view_disasm*>(dasmView)->selected_address(); - astring command; - command.printf("go 0x%X", address); + std::string command; + strprintf(command,"go 0x%X", address); debug_console_execute_command(*m_machine, command.c_str(), 1); } } @@ -463,8 +463,8 @@ void MainWindow::createImagesMenu() image_interface_iterator iter(m_machine->root_device()); for (device_image_interface *img = iter.first(); img != NULL; img = iter.next()) { - astring menuName; - menuName.format("%s : %s", img->device().name(), img->exists() ? img->filename() : "[empty slot]"); + std::string menuName; + strprintf(menuName,"%s : %s", img->device().name(), img->exists() ? img->filename() : "[empty slot]"); QMenu* interfaceMenu = imagesMenu->addMenu(menuName.c_str()); interfaceMenu->setObjectName(img->device().name()); diff --git a/src/osd/modules/debugger/win/consolewininfo.c b/src/osd/modules/debugger/win/consolewininfo.c index 892eec0768f..a55c7b7885f 100644 --- a/src/osd/modules/debugger/win/consolewininfo.c +++ b/src/osd/modules/debugger/win/consolewininfo.c @@ -44,8 +44,8 @@ consolewin_info::consolewin_info(debugger_windows_interface &debugger) : m_devices_menu = CreatePopupMenu(); for ( ; img != NULL; img = iter.next()) { - astring temp; - temp.format("%s : %s", img->device().name(), img->exists() ? img->filename() : "[no image]"); + std::string temp; + strprintf(temp,"%s : %s", img->device().name(), img->exists() ? img->filename() : "[no image]"); TCHAR *tc_buf = tstring_from_utf8(temp.c_str()); if (tc_buf != NULL) { @@ -107,11 +107,11 @@ void consolewin_info::set_cpu(device_t &device) // then update the caption char curtitle[256]; - astring title; + std::string title; - title.printf("Debug: %s - %s '%s'", device.machine().system().name, device.name(), device.tag()); + strprintf(title, "Debug: %s - %s '%s'", device.machine().system().name, device.name(), device.tag()); win_get_window_text_utf8(window(), curtitle, ARRAY_LENGTH(curtitle)); - if (title.cmp(curtitle) != 0) + if (title.compare(curtitle) != 0) win_set_window_text_utf8(window(), title.c_str()); // and recompute the children @@ -201,8 +201,8 @@ void consolewin_info::update_menu() AppendMenu(devicesubmenu, flags_for_exists, new_item + DEVOPTION_CASSETTE_FASTFORWARD, TEXT("Fast Forward")); } - astring temp; - temp.format("%s :%s", img->device().name(), img->exists() ? img->filename() : "[empty slot]"); + std::string temp; + strprintf(temp,"%s :%s", img->device().name(), img->exists() ? img->filename() : "[empty slot]"); TCHAR *tc_buf = tstring_from_utf8(temp.c_str()); if (tc_buf != NULL) { @@ -227,7 +227,7 @@ bool consolewin_info::handle_command(WPARAM wparam, LPARAM lparam) { case DEVOPTION_OPEN : { - astring filter; + std::string filter; build_generic_filter(img, false, filter); LPTSTR t_filter = tstring_from_utf8(filter.c_str()); if (t_filter) @@ -314,41 +314,41 @@ void consolewin_info::process_string(char const *string) } -void consolewin_info::build_generic_filter(device_image_interface *img, bool is_save, astring &filter) +void consolewin_info::build_generic_filter(device_image_interface *img, bool is_save, std::string &filter) { // common image types add_filter_entry(filter, "Common image types", img->file_extensions()); // compressed if (!is_save) - filter.cat("Compressed Images (*.zip)|*.zip|"); + filter.append("Compressed Images (*.zip)|*.zip|"); // all files - filter.cat("All files (*.*)|*.*|"); + filter.append("All files (*.*)|*.*|"); } -void consolewin_info::add_filter_entry(astring &dest, const char *description, const char *extensions) +void consolewin_info::add_filter_entry(std::string &dest, const char *description, const char *extensions) { // add the description - dest.cat(description); - dest.catformat(" ("); + dest.append(description); + dest.append(" ("); // add the extensions to the description copy_extension_list(dest, extensions); // add the trailing rparen and '|' character - dest.cat(")|"); + dest.append(")|"); // now add the extension list itself copy_extension_list(dest, extensions); // append a '|' - dest.cat('|'); + dest.append("|"); } -void consolewin_info::copy_extension_list(astring &dest, const char *extensions) +void consolewin_info::copy_extension_list(std::string &dest, const char *extensions) { // our extension lists are comma delimited; Win32 expects to see lists // delimited by semicolons @@ -357,14 +357,14 @@ void consolewin_info::copy_extension_list(astring &dest, const char *extensions) { // append a semicolon if not at the beginning if (s != extensions) - dest.cat(';'); + dest.push_back(';'); // append ".*" - dest.cat("*."); + dest.append("*."); // append the file extension while (*s && (*s != ',')) - dest.cat(*s++); + dest.push_back(*s++); // if we found a comma, advance while(*s == ',') diff --git a/src/osd/modules/debugger/win/consolewininfo.h b/src/osd/modules/debugger/win/consolewininfo.h index b74a189657d..f788b044873 100644 --- a/src/osd/modules/debugger/win/consolewininfo.h +++ b/src/osd/modules/debugger/win/consolewininfo.h @@ -43,9 +43,9 @@ private: virtual void process_string(char const *string); - static void build_generic_filter(device_image_interface *img, bool is_save, astring &filter); - static void add_filter_entry(astring &dest, char const *description, char const *extensions); - static void copy_extension_list(astring &dest, char const *extensions); + static void build_generic_filter(device_image_interface *img, bool is_save, std::string &filter); + static void add_filter_entry(std::string &dest, char const *description, char const *extensions); + static void copy_extension_list(std::string &dest, char const *extensions); HMENU m_devices_menu; }; diff --git a/src/osd/modules/debugger/win/disasmbasewininfo.c b/src/osd/modules/debugger/win/disasmbasewininfo.c index c06c6cf1326..783cc8d75fa 100644 --- a/src/osd/modules/debugger/win/disasmbasewininfo.c +++ b/src/osd/modules/debugger/win/disasmbasewininfo.c @@ -195,11 +195,11 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam) } else if (dasmview->source_is_visible_cpu()) { - astring command; + std::string command; if (bpindex == -1) - command.printf("bpset 0x%X", address); + strprintf(command, "bpset 0x%X", address); else - command.printf("bpclear 0x%X", bpindex); + strprintf(command, "bpclear 0x%X", bpindex); debug_console_execute_command(machine(), command.c_str(), 1); } } @@ -228,8 +228,8 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam) } else if (dasmview->source_is_visible_cpu()) { - astring command; - command.printf(bp->enabled() ? "bpdisable 0x%X" : "bpenable 0x%X", (UINT32)bp->index()); + std::string command; + strprintf(command, bp->enabled() ? "bpdisable 0x%X" : "bpenable 0x%X", (UINT32)bp->index()); debug_console_execute_command(machine(), command.c_str(), 1); } } @@ -242,8 +242,8 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam) offs_t const address = dasmview->selected_address(); if (dasmview->source_is_visible_cpu()) { - astring command; - command.printf("go 0x%X", address); + std::string command; + strprintf(command, "go 0x%X", address); debug_console_execute_command(machine(), command.c_str(), 1); } else diff --git a/src/osd/modules/debugger/win/disasmwininfo.c b/src/osd/modules/debugger/win/disasmwininfo.c index 7b9097a1e67..5d9c72f3fc6 100644 --- a/src/osd/modules/debugger/win/disasmwininfo.c +++ b/src/osd/modules/debugger/win/disasmwininfo.c @@ -145,5 +145,5 @@ void disasmwin_info::process_string(char const *string) void disasmwin_info::update_caption() { - win_set_window_text_utf8(window(), astring("Disassembly: ").cat(m_views[0]->source_name()).c_str()); + win_set_window_text_utf8(window(), std::string("Disassembly: ").append(m_views[0]->source_name()).c_str()); } diff --git a/src/osd/modules/debugger/win/editwininfo.h b/src/osd/modules/debugger/win/editwininfo.h index ff5e20f03ec..f1b729a1f59 100644 --- a/src/osd/modules/debugger/win/editwininfo.h +++ b/src/osd/modules/debugger/win/editwininfo.h @@ -46,7 +46,7 @@ private: static int const HISTORY_LENGTH = 20; HWND m_editwnd; - astring m_edit_defstr; + std::string m_edit_defstr; WNDPROC m_original_editproc; TCHAR m_history[HISTORY_LENGTH][MAX_EDIT_STRING]; int m_history_count; diff --git a/src/osd/modules/debugger/win/logwininfo.c b/src/osd/modules/debugger/win/logwininfo.c index 6621048ac48..c623245db72 100644 --- a/src/osd/modules/debugger/win/logwininfo.c +++ b/src/osd/modules/debugger/win/logwininfo.c @@ -12,7 +12,7 @@ logwin_info::logwin_info(debugger_windows_interface &debugger) : - debugwin_info(debugger, false, astring("Errorlog: ").cat(debugger.machine().system().description).cat(" [").cat(debugger.machine().system().name).cat("]").c_str(), NULL) + debugwin_info(debugger, false, std::string("Errorlog: ").append(debugger.machine().system().description).append(" [").append(debugger.machine().system().name).append("]").c_str(), NULL) { if (!window()) return; diff --git a/src/osd/modules/debugger/win/memorywininfo.c b/src/osd/modules/debugger/win/memorywininfo.c index 1610e2b6002..0c67bdf01da 100644 --- a/src/osd/modules/debugger/win/memorywininfo.c +++ b/src/osd/modules/debugger/win/memorywininfo.c @@ -275,5 +275,5 @@ void memorywin_info::process_string(char const *string) void memorywin_info::update_caption() { - win_set_window_text_utf8(window(), astring("Memory: ").cat(m_views[0]->source_name()).c_str()); + win_set_window_text_utf8(window(), std::string("Memory: ").append(m_views[0]->source_name()).c_str()); } diff --git a/src/osd/modules/debugger/win/pointswininfo.c b/src/osd/modules/debugger/win/pointswininfo.c index 6395603ec6e..5ed28a17e16 100644 --- a/src/osd/modules/debugger/win/pointswininfo.c +++ b/src/osd/modules/debugger/win/pointswininfo.c @@ -14,7 +14,7 @@ pointswin_info::pointswin_info(debugger_windows_interface &debugger) : - debugwin_info(debugger, false, astring("All Breakpoints").c_str(), NULL) + debugwin_info(debugger, false, std::string("All Breakpoints").c_str(), NULL) { if (!window()) return; diff --git a/src/osd/modules/font/font_osx.c b/src/osd/modules/font/font_osx.c index 753b339629b..3306b521f1d 100644 --- a/src/osd/modules/font/font_osx.c +++ b/src/osd/modules/font/font_osx.c @@ -10,7 +10,6 @@ #include <Carbon/Carbon.h> -#include "astring.h" #include "corealloc.h" #include "fileio.h" @@ -35,26 +34,25 @@ private: CTFontRef m_font; }; -bool osd_font_osx::open(const char *font_path, const char *_name, int &height) +bool osd_font_osx::open(const char *font_path, const char *name, int &height) { m_font = NULL; - astring name(_name); - osd_printf_verbose("FONT NAME %s\n", _name); + osd_printf_verbose("FONT NAME %s\n", name); #if 0 - if (name == "default") + if (!strcmp(name, "default")) { name = "LucidaGrande"; } #endif - /* handle bdf fonts in the core */ - if (name.len() > 4) + + CFStringRef const font_name = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8); + if (kCFNotFound != CFStringFind(font_name, CFSTR(".BDF"), kCFCompareCaseInsensitive | kCFCompareBackwards | kCFCompareAnchored | kCFCompareNonliteral).location) { - if (name.makeupper().substr(name.len() - 4, 4) == ".BDF") - return false; + // handle bdf fonts in the core + CFRelease(font_name); + return false; } - CTFontRef ct_font = NULL; - CFStringRef const font_name = CFStringCreateWithCString(NULL, name.c_str(), kCFStringEncodingUTF8); if (font_name != NULL) { CTFontDescriptorRef const font_descriptor = CTFontDescriptorCreateWithNameAndSize(font_name, 0.0); @@ -68,7 +66,7 @@ bool osd_font_osx::open(const char *font_path, const char *_name, int &height) if (!ct_font) { - osd_printf_verbose("Couldn't find/open font %s, using MAME default\n", name.c_str()); + osd_printf_verbose("Couldn't find/open font %s, using MAME default\n", name); return false; } diff --git a/src/osd/modules/font/font_sdl.c b/src/osd/modules/font/font_sdl.c index fbe1206d068..3ef57aec3d2 100644 --- a/src/osd/modules/font/font_sdl.c +++ b/src/osd/modules/font/font_sdl.c @@ -18,7 +18,7 @@ #endif -#include "astring.h" +#include "corestr.h" #include "corealloc.h" #include "fileio.h" @@ -39,10 +39,10 @@ public: virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs); private: #ifndef SDLMAME_HAIKU - TTF_Font *search_font_config(astring name, bool bold, bool italic, bool underline, bool &bakedstyles); + TTF_Font *search_font_config(std::string name, bool bold, bool italic, bool underline, bool &bakedstyles); #endif - bool BDF_Check_Magic(astring name); - TTF_Font * TTF_OpenFont_Magic(astring name, int fsize); + bool BDF_Check_Magic(std::string name); + TTF_Font * TTF_OpenFont_Magic(std::string name, int fsize); TTF_Font *m_font; }; @@ -53,17 +53,17 @@ bool osd_font_sdl::open(const char *font_path, const char *_name, int &height) int style = 0; // accept qualifiers from the name - astring name(_name); + std::string name(_name); - if (name == "default") + if (name.compare("default")==0) { name = "Liberation Sans"; } - bool bold = (name.replace(0, "[B]", "") + name.replace(0, "[b]", "") > 0); - bool italic = (name.replace(0, "[I]", "") + name.replace(0, "[i]", "") > 0); - bool underline = (name.replace(0, "[U]", "") + name.replace(0, "[u]", "") > 0); - bool strike = (name.replace(0, "[S]", "") + name.replace(0, "[s]", "") > 0); + bool bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0); + bool italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0); + bool underline = (strreplace(name, "[U]", "") + strreplace(name, "[u]", "") > 0); + bool strike = (strreplace(name, "[S]", "") + strreplace(name, "[s]", "") > 0); // first up, try it as a filename font = TTF_OpenFont_Magic(name, POINT_SIZE); @@ -77,7 +77,7 @@ bool osd_font_sdl::open(const char *font_path, const char *_name, int &height) emu_file file(font_path, OPEN_FLAG_READ); if (file.open(name.c_str()) == FILERR_NONE) { - astring full_name = file.fullpath(); + std::string full_name = file.fullpath(); font = TTF_OpenFont_Magic(full_name, POINT_SIZE); if (font) osd_printf_verbose("Found font %s\n", full_name.c_str()); @@ -184,7 +184,7 @@ bool osd_font_sdl::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 & return bitmap.valid(); } -TTF_Font * osd_font_sdl::TTF_OpenFont_Magic(astring name, int fsize) +TTF_Font * osd_font_sdl::TTF_OpenFont_Magic(std::string name, int fsize) { emu_file file(OPEN_FLAG_READ); if (file.open(name.c_str()) == FILERR_NONE) @@ -198,7 +198,7 @@ TTF_Font * osd_font_sdl::TTF_OpenFont_Magic(astring name, int fsize) return TTF_OpenFont(name.c_str(), POINT_SIZE); } -bool osd_font_sdl::BDF_Check_Magic(astring name) +bool osd_font_sdl::BDF_Check_Magic(std::string name) { emu_file file(OPEN_FLAG_READ); if (file.open(name.c_str()) == FILERR_NONE) @@ -215,7 +215,7 @@ bool osd_font_sdl::BDF_Check_Magic(astring name) } #ifndef SDLMAME_HAIKU -TTF_Font *osd_font_sdl::search_font_config(astring name, bool bold, bool italic, bool underline, bool &bakedstyles) +TTF_Font *osd_font_sdl::search_font_config(std::string name, bool bold, bool italic, bool underline, bool &bakedstyles) { TTF_Font *font = (TTF_Font *)NULL; FcConfig *config; @@ -269,7 +269,7 @@ TTF_Font *osd_font_sdl::search_font_config(astring name, bool bold, bool italic, osd_printf_verbose("Matching font: %s\n", val.u.s); { - astring match_name((const char*)val.u.s); + std::string match_name((const char*)val.u.s); font = TTF_OpenFont_Magic(match_name, POINT_SIZE); } @@ -306,7 +306,7 @@ TTF_Font *osd_font_sdl::search_font_config(astring name, bool bold, bool italic, osd_printf_verbose("Matching unstyled font: %s\n", val.u.s); { - astring match_name((const char*)val.u.s); + std::string match_name((const char*)val.u.s); font = TTF_OpenFont_Magic(match_name, POINT_SIZE); } diff --git a/src/osd/modules/font/font_windows.c b/src/osd/modules/font/font_windows.c index 9056b98054a..5b0b57823ab 100644 --- a/src/osd/modules/font/font_windows.c +++ b/src/osd/modules/font/font_windows.c @@ -19,7 +19,7 @@ #include "modules/osdmodule.h" #include "strconv.h" -#include "astring.h" +#include "corestr.h" #include "corealloc.h" #include "fileio.h" @@ -46,10 +46,10 @@ private: bool osd_font_windows::open(const char *font_path, const char *_name, int &height) { // accept qualifiers from the name - astring name(_name); - if (name == "default") name = "Tahoma"; - bool bold = (name.replace(0, "[B]", "") + name.replace(0, "[b]", "") > 0); - bool italic = (name.replace(0, "[I]", "") + name.replace(0, "[i]", "") > 0); + std::string name(_name); + if (name.compare("default")==0) name = "Tahoma"; + bool bold = (strreplace(name, "[B]", "") + strreplace(name, "[b]", "") > 0); + bool italic = (strreplace(name, "[I]", "") + strreplace(name, "[i]", "") > 0); // build a basic LOGFONT description of what we want LOGFONT logfont; diff --git a/src/osd/modules/lib/osdobj_common.c b/src/osd/modules/lib/osdobj_common.c index 41f9d4396ba..903ee072d36 100644 --- a/src/osd/modules/lib/osdobj_common.c +++ b/src/osd/modules/lib/osdobj_common.c @@ -245,22 +245,22 @@ void osd_common_t::register_options() void osd_common_t::update_option(const char * key, std::vector<const char *> &values) { - astring current_value(m_options.description(key)); - astring new_option_value(""); + std::string current_value(m_options.description(key)); + std::string new_option_value(""); for (unsigned int index = 0; index < values.size(); index++) { - astring t(values[index]); - if (new_option_value.len() > 0) + std::string t(values[index]); + if (new_option_value.length() > 0) { if( index != (values.size()-1)) - new_option_value.cat(", "); + new_option_value.append(", "); else - new_option_value.cat(" or "); + new_option_value.append(" or "); } - new_option_value.cat(t); + new_option_value.append(t); } // TODO: core_strdup() is leaked - m_options.set_description(key, core_strdup(current_value.cat(new_option_value).c_str())); + m_options.set_description(key, core_strdup(current_value.append(new_option_value).c_str())); } diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h index e6a2a7a0311..d46463b414d 100644 --- a/src/osd/modules/lib/osdobj_common.h +++ b/src/osd/modules/lib/osdobj_common.h @@ -113,10 +113,10 @@ public: const char *aspect() const { return value(OSDOPTION_ASPECT); } const char *resolution() const { return value(OSDOPTION_RESOLUTION); } const char *view() const { return value(OSDOPTION_VIEW); } - const char *screen(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SCREEN, index).c_str()); } - const char *aspect(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_ASPECT, index).c_str()); } - const char *resolution(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_RESOLUTION, index).c_str()); } - const char *view(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_VIEW, index).c_str()); } + const char *screen(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SCREEN, index); return value(temp.c_str()); } + const char *aspect(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_ASPECT, index); return value(temp.c_str()); } + const char *resolution(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_RESOLUTION, index); return value(temp.c_str()); } + const char *view(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_VIEW, index); return value(temp.c_str()); } // full screen options bool switch_res() const { return bool_value(OSDOPTION_SWITCHRES); } @@ -136,12 +136,12 @@ public: bool gl_pbo() const { return bool_value(OSDOPTION_GL_PBO); } bool gl_glsl() const { return bool_value(OSDOPTION_GL_GLSL); } bool glsl_filter() const { return bool_value(OSDOPTION_GLSL_FILTER); } - const char *shader_mame(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SHADER_MAME, index).c_str()); } - const char *shader_screen(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SHADER_SCREEN, index).c_str()); } + const char *shader_mame(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SHADER_MAME, index); return value(temp.c_str()); } + const char *shader_screen(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SHADER_SCREEN, index); return value(temp.c_str()); } // CoreAudio specific options const char *audio_output() const { return value(OSDOPTION_AUDIO_OUTPUT); } - const char *audio_effect(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_AUDIO_EFFECT, index).c_str()); } + const char *audio_effect(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_AUDIO_EFFECT, index); return value(temp.c_str()); } private: static const options_entry s_option_entries[]; @@ -238,10 +238,10 @@ private: void update_option(const char * key, std::vector<const char *> &values); // FIXME: should be elsewhere - osd_module *select_module_options(const core_options &opts, const astring &opt_name) + osd_module *select_module_options(const core_options &opts, const std::string &opt_name) { - astring opt_val = opts.value(opt_name.c_str()); - if (opt_val == "auto") + std::string opt_val = opts.value(opt_name.c_str()); + if (opt_val.compare("auto")==0) opt_val = ""; else if (!m_mod_man.type_has_name(opt_name.c_str(), opt_val.c_str())) { @@ -252,7 +252,7 @@ private: } template<class C> - C select_module_options(const core_options &opts, const astring &opt_name) + C select_module_options(const core_options &opts, const std::string &opt_name) { return dynamic_cast<C>(select_module_options(opts, opt_name)); } diff --git a/src/osd/modules/osdmodule.h b/src/osd/modules/osdmodule.h index f8378fb6dcb..64f0f3c99e6 100644 --- a/src/osd/modules/osdmodule.h +++ b/src/osd/modules/osdmodule.h @@ -41,8 +41,8 @@ public: virtual void exit() { } private: - astring m_name; - astring m_type; + std::string m_name; + std::string m_type; }; // a module_type is simply a pointer to its alloc function diff --git a/src/osd/modules/render/d3d/d3dhlsl.c b/src/osd/modules/render/d3d/d3dhlsl.c index b76c3365528..733ccfe0723 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.c +++ b/src/osd/modules/render/d3d/d3dhlsl.c @@ -370,8 +370,8 @@ void shaders::render_snapshot(surface *surface) return; // add two text entries describing the image - astring text1 = astring(emulator_info::get_appname()).cat(" ").cat(build_version); - astring text2 = astring(machine->system().manufacturer).cat(" ").cat(machine->system().description); + std::string text1 = std::string(emulator_info::get_appname()).append(" ").append(build_version); + std::string text2 = std::string(machine->system().manufacturer).append(" ").append(machine->system().description); png_info pnginfo = { 0 }; png_add_text(&pnginfo, "Software", text1.c_str()); png_add_text(&pnginfo, "System", text2.c_str()); @@ -540,7 +540,7 @@ void shaders::begin_avi_recording(const char *name) // create a new temporary movie file file_error filerr; - astring fullpath; + std::string fullpath; { emu_file tempfile(machine->options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); if (name != NULL) @@ -2394,415 +2394,415 @@ static slider_state *slider_alloc(running_machine &machine, const char *title, I // assorted global slider accessors //============================================================ -static INT32 slider_set(float *option, float scale, const char *fmt, astring *str, INT32 newval) +static INT32 slider_set(float *option, float scale, const char *fmt, std::string *str, INT32 newval) { if (option != NULL && newval != SLIDER_NOCHANGE) *option = (float)newval * scale; - if (str != NULL) str->printf(fmt, *option); + if (str != NULL) strprintf(*str, fmt, *option); return floor(*option / scale + 0.5f); } -static INT32 slider_shadow_mask_alpha(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_shadow_mask_alpha(running_machine &machine, void *arg, std::string *str, INT32 newval) { return slider_set(&(((hlsl_options*)arg)->shadow_mask_alpha), 0.01f, "%2.2f", str, newval); } -static INT32 slider_shadow_mask_x_count(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_shadow_mask_x_count(running_machine &machine, void *arg, std::string *str, INT32 newval) { hlsl_options *options = (hlsl_options*)arg; if (newval != SLIDER_NOCHANGE) options->shadow_mask_count_x = newval; - if (str != NULL) str->printf("%d", options->shadow_mask_count_x); + if (str != NULL) strprintf(*str, "%d", options->shadow_mask_count_x); options->params_dirty = true; return options->shadow_mask_count_x; } -static INT32 slider_shadow_mask_y_count(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_shadow_mask_y_count(running_machine &machine, void *arg, std::string *str, INT32 newval) { hlsl_options *options = (hlsl_options*)arg; if (newval != SLIDER_NOCHANGE) options->shadow_mask_count_y = newval; - if (str != NULL) str->printf("%d", options->shadow_mask_count_y); + if (str != NULL) strprintf(*str, "%d", options->shadow_mask_count_y); options->params_dirty = true; return options->shadow_mask_count_y; } -static INT32 slider_shadow_mask_usize(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_shadow_mask_usize(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->shadow_mask_u_size), 1.0f / 32.0f, "%2.5f", str, newval); } -static INT32 slider_shadow_mask_vsize(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_shadow_mask_vsize(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->shadow_mask_v_size), 1.0f / 32.0f, "%2.5f", str, newval); } -static INT32 slider_curvature(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_curvature(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->curvature), 0.01f, "%2.2f", str, newval); } -static INT32 slider_pincushion(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_pincushion(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->pincushion), 0.01f, "%2.2f", str, newval); } -static INT32 slider_scanline_alpha(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_scanline_alpha(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scanline_alpha), 0.01f, "%2.2f", str, newval); } -static INT32 slider_scanline_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_scanline_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scanline_scale), 0.05f, "%2.2f", str, newval); } -static INT32 slider_scanline_height(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_scanline_height(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scanline_height), 0.05f, "%2.2f", str, newval); } -static INT32 slider_scanline_bright_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_scanline_bright_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scanline_bright_scale), 0.05f, "%2.2f", str, newval); } -static INT32 slider_scanline_bright_offset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_scanline_bright_offset(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scanline_bright_offset), 0.05f, "%2.2f", str, newval); } -static INT32 slider_scanline_offset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_scanline_offset(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scanline_offset), 0.05f, "%2.2f", str, newval); } -static INT32 slider_defocus_x(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_defocus_x(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->defocus[0]), 0.5f, "%2.1f", str, newval); } -static INT32 slider_defocus_y(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_defocus_y(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->defocus[1]), 0.5f, "%2.1f", str, newval); } -static INT32 slider_red_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_converge_x(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->converge_x[0]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_red_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_converge_y(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->converge_y[0]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_green_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_converge_x(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->converge_x[1]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_green_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_converge_y(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->converge_y[1]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_blue_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_converge_x(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->converge_x[2]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_blue_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_converge_y(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->converge_y[2]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_red_radial_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_radial_converge_x(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->radial_converge_x[0]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_red_radial_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_radial_converge_y(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->radial_converge_y[0]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_green_radial_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_radial_converge_x(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->radial_converge_x[1]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_green_radial_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_radial_converge_y(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->radial_converge_y[1]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_blue_radial_converge_x(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_radial_converge_x(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->radial_converge_x[2]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_blue_radial_converge_y(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_radial_converge_y(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->radial_converge_y[2]), 0.1f, "%3.1f", str, newval); } -static INT32 slider_red_from_r(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_from_r(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->red_ratio[0]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_red_from_g(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_from_g(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->red_ratio[1]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_red_from_b(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_from_b(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->red_ratio[2]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_green_from_r(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_from_r(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->grn_ratio[0]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_green_from_g(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_from_g(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->grn_ratio[1]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_green_from_b(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_from_b(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->grn_ratio[2]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_blue_from_r(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_from_r(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->blu_ratio[0]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_blue_from_g(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_from_g(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->blu_ratio[1]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_blue_from_b(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_from_b(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->blu_ratio[2]), 0.005f, "%2.3f", str, newval); } -static INT32 slider_red_offset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_offset(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->offset[0]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_green_offset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_offset(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->offset[1]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_blue_offset(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_offset(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->offset[2]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_red_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scale[0]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_green_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scale[1]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_blue_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->scale[2]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_red_power(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_power(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->power[0]), 0.05f, "%2.2f", str, newval); } -static INT32 slider_green_power(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_power(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->power[1]), 0.05f, "%2.2f", str, newval); } -static INT32 slider_blue_power(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_power(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->power[2]), 0.05f, "%2.2f", str, newval); } -static INT32 slider_red_floor(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_floor(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->floor[0]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_green_floor(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_floor(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->floor[1]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_blue_floor(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_floor(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->floor[2]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_red_phosphor_life(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_red_phosphor_life(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->phosphor[0]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_green_phosphor_life(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_green_phosphor_life(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->phosphor[1]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_blue_phosphor_life(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_blue_phosphor_life(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->phosphor[2]), 0.01f, "%2.2f", str, newval); } -static INT32 slider_saturation(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_saturation(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->saturation), 0.01f, "%2.2f", str, newval); } -static INT32 slider_vector_attenuation(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_vector_attenuation(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->vector_length_scale), 0.01f, "%1.2f", str, newval); } -static INT32 slider_vector_length_max(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_vector_length_max(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->vector_length_ratio), 1.0f, "%4f", str, newval); } -static INT32 slider_vector_bloom_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_vector_bloom_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->vector_bloom_scale), 0.001f, "%1.3f", str, newval); } -static INT32 slider_raster_bloom_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_raster_bloom_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->raster_bloom_scale), 0.001f, "%1.3f", str, newval); } -static INT32 slider_bloom_lvl0_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl0_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level0_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl1_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl1_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level1_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl2_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl2_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level2_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl3_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl3_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level3_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl4_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl4_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level4_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl5_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl5_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level5_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl6_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl6_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level6_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl7_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl7_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level7_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl8_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl8_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level8_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl9_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl9_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level9_weight), 0.01f, "%1.2f", str, newval); } -static INT32 slider_bloom_lvl10_scale(running_machine &machine, void *arg, astring *str, INT32 newval) +static INT32 slider_bloom_lvl10_scale(running_machine &machine, void *arg, std::string *str, INT32 newval) { ((hlsl_options*)arg)->params_dirty = true; return slider_set(&(((hlsl_options*)arg)->bloom_level10_weight), 0.01f, "%1.2f", str, newval); @@ -3393,30 +3393,30 @@ static file_error open_next(d3d::renderer *d3d, emu_file &file, const char *temp if (snapname == NULL || snapname[0] == 0) snapname = "%g/%i"; - astring snapstr(snapname); + std::string snapstr(snapname); // strip any extension in the provided name - int index = snapstr.rchr(0, '.'); + int index = snapstr.find_last_of('.'); if (index != -1) snapstr.substr(0, index); // handle %d in the template (for image devices) - astring snapdev("%d_"); - int pos = snapstr.find(0, snapdev.c_str()); + std::string snapdev("%d_"); + int pos = snapstr.find(snapdev,0); if (pos != -1) { // if more %d are found, revert to default and ignore them all - if (snapstr.find(pos + 3, snapdev.c_str()) != -1) - snapstr.cpy("%g/%i"); + if (snapstr.find(snapdev, pos + 3) != -1) + snapstr.assign("%g/%i"); // else if there is a single %d, try to create the correct snapname else { int name_found = 0; // find length of the device name - int end1 = snapstr.find(pos + 3, "/"); - int end2 = snapstr.find(pos + 3, "%"); + int end1 = snapstr.find("/", pos + 3); + int end2 = snapstr.find("%", pos + 3); int end = -1; if ((end1 != -1) && (end2 != -1)) @@ -3426,35 +3426,35 @@ static file_error open_next(d3d::renderer *d3d, emu_file &file, const char *temp else if (end2 != -1) end = end2; else - end = snapstr.len(); + end = snapstr.length(); if (end - pos < 3) fatalerror("Something very wrong is going on!!!\n"); // copy the device name to an astring - astring snapdevname; - snapdevname.cpysubstr(snapstr, pos + 3, end - pos - 3); + std::string snapdevname; + snapdevname.assign(snapstr.substr(pos + 3, end - pos - 3)); // verify that there is such a device for this system image_interface_iterator iter(d3d->window().machine().root_device()); for (device_image_interface *image = iter.first(); image != NULL; iter.next()) { // get the device name - astring tempdevname(image->brief_instance_name()); + std::string tempdevname(image->brief_instance_name()); - if (snapdevname.cmp(tempdevname) == 0) + if (snapdevname.compare(tempdevname) == 0) { // verify that such a device has an image mounted if (image->basename() != NULL) { - astring filename(image->basename()); + std::string filename(image->basename()); // strip extension - filename.substr(0, filename.rchr(0, '.')); + filename.substr(0, filename.find_last_of('.')); // setup snapname and remove the %d_ - snapstr.replace(0, snapdevname.c_str(), filename.c_str()); - snapstr.del(pos, 3); + strreplace(snapstr, snapdevname.c_str(), filename.c_str()); + snapstr.erase(pos, 3); name_found = 1; } @@ -3463,33 +3463,34 @@ static file_error open_next(d3d::renderer *d3d, emu_file &file, const char *temp // or fallback to default if (name_found == 0) - snapstr.cpy("%g/%i"); + snapstr.assign("%g/%i"); } } // add our own index // add our own extension - snapstr.cat(".").cat(extension); + snapstr.append(".").append(extension); // substitute path and gamename up front - snapstr.replace(0, "/", PATH_SEPARATOR); - snapstr.replace(0, "%g", d3d->window().machine().basename()); + strreplace(snapstr, "/", PATH_SEPARATOR); + strreplace(snapstr, "%g", d3d->window().machine().basename()); // determine if the template has an index; if not, we always use the same name - astring fname; - if (snapstr.find(0, "%i") == -1) - fname.cpy(snapstr); + std::string fname; + if (snapstr.find("%i") == -1) + fname.assign(snapstr); // otherwise, we scan for the next available filename else { // try until we succeed - astring seqtext; + std::string seqtext; file.set_openflags(OPEN_FLAG_READ); for (int seq = 0; ; seq++) { // build up the filename - fname.cpy(snapstr).replace(0, "%i", seqtext.format("%04d_%d", seq, idx).c_str()); + strprintf(seqtext, "%04d_%d", seq, idx); + strreplace(fname.assign(snapstr), "%i", seqtext.c_str()); // try to open the file; stop when we fail file_error filerr = file.open(fname.c_str()); diff --git a/src/osd/modules/render/d3d/d3dhlsl.h b/src/osd/modules/render/d3d/d3dhlsl.h index 8b8904123b2..b86af5a1bac 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.h +++ b/src/osd/modules/render/d3d/d3dhlsl.h @@ -302,7 +302,7 @@ public: int defval; int maxval; int step; - INT32 (*adjustor)(running_machine &, void *, astring *, INT32); + INT32(*adjustor)(running_machine &, void *, std::string *, INT32); }; private: diff --git a/src/osd/modules/sound/coreaudio_sound.c b/src/osd/modules/sound/coreaudio_sound.c index 9090a937826..e6039d0c233 100644 --- a/src/osd/modules/sound/coreaudio_sound.c +++ b/src/osd/modules/sound/coreaudio_sound.c @@ -847,9 +847,9 @@ bool sound_coreaudio::extract_effect_info( CFTypeRef subtype_val = NULL; CFTypeRef manufacturer_val = NULL; if (CFDictionaryContainsKey(desc, CFSTR("ComponentType")) - && CFDictionaryContainsKey(desc, CFSTR("ComponentSubType")) - && CFDictionaryContainsKey(desc, CFSTR("ComponentManufacturer")) - && CFDictionaryContainsKey(desc, CFSTR("ClassInfo"))) + && CFDictionaryContainsKey(desc, CFSTR("ComponentSubType")) + && CFDictionaryContainsKey(desc, CFSTR("ComponentManufacturer")) + && CFDictionaryContainsKey(desc, CFSTR("ClassInfo"))) { type_val = CFDictionaryGetValue(desc, CFSTR("ComponentType")); subtype_val = CFDictionaryGetValue(desc, CFSTR("ComponentSubType")); @@ -857,8 +857,8 @@ bool sound_coreaudio::extract_effect_info( class_info = CFDictionaryGetValue(desc, CFSTR("ClassInfo")); } else if (CFDictionaryContainsKey(desc, CFSTR(kAUPresetTypeKey)) - && CFDictionaryContainsKey(desc, CFSTR(kAUPresetSubtypeKey)) - && CFDictionaryContainsKey(desc, CFSTR(kAUPresetManufacturerKey))) + && CFDictionaryContainsKey(desc, CFSTR(kAUPresetSubtypeKey)) + && CFDictionaryContainsKey(desc, CFSTR(kAUPresetManufacturerKey))) { type_val = CFDictionaryGetValue(desc, CFSTR(kAUPresetTypeKey)); subtype_val = CFDictionaryGetValue(desc, CFSTR(kAUPresetSubtypeKey)); @@ -875,16 +875,16 @@ bool sound_coreaudio::extract_effect_info( SInt64 type_int, subtype_int, manufacturer_int; if ((NULL == type_val) - || (NULL == subtype_val) - || (NULL == manufacturer_val) - || (NULL == class_info) - || (CFNumberGetTypeID() != CFGetTypeID(type_val)) - || (CFNumberGetTypeID() != CFGetTypeID(subtype_val)) - || (CFNumberGetTypeID() != CFGetTypeID(manufacturer_val)) - || (CFDictionaryGetTypeID() != CFGetTypeID(class_info)) - || !CFNumberGetValue((CFNumberRef)type_val, kCFNumberSInt64Type, &type_int) - || !CFNumberGetValue((CFNumberRef)subtype_val, kCFNumberSInt64Type, &subtype_int) - || !CFNumberGetValue((CFNumberRef)manufacturer_val, kCFNumberSInt64Type, &manufacturer_int)) + || (NULL == subtype_val) + || (NULL == manufacturer_val) + || (NULL == class_info) + || (CFNumberGetTypeID() != CFGetTypeID(type_val)) + || (CFNumberGetTypeID() != CFGetTypeID(subtype_val)) + || (CFNumberGetTypeID() != CFGetTypeID(manufacturer_val)) + || (CFDictionaryGetTypeID() != CFGetTypeID(class_info)) + || !CFNumberGetValue((CFNumberRef)type_val, kCFNumberSInt64Type, &type_int) + || !CFNumberGetValue((CFNumberRef)subtype_val, kCFNumberSInt64Type, &subtype_int) + || !CFNumberGetValue((CFNumberRef)manufacturer_val, kCFNumberSInt64Type, &manufacturer_int)) { osd_printf_error( "%s is not a valid AudioUnit effect description: incorrect property type(s)\n", diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index 25a383f74f4..2df16b8db02 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -226,7 +226,7 @@ typedef UINT32 FPTR; #ifdef _MSC_VER #include <malloc.h> #if _MSC_VER == 1900 // < VS2015 -#define __LINE__Var 0 +#define __LINE__Var 0 #endif #if _MSC_VER < 1900 // < VS2015 #define snprintf _snprintf @@ -247,7 +247,7 @@ static __inline double log2(double x) { return log(x) * M_LOG2E; } #ifdef __GNUC__ #ifndef alloca -#define alloca __builtin_alloca +#define alloca(size) __builtin_alloca(size) #endif #endif diff --git a/src/osd/sdl/aueffectutil.m b/src/osd/sdl/aueffectutil.m index d5c1e18d3e6..397fb640c68 100644 --- a/src/osd/sdl/aueffectutil.m +++ b/src/osd/sdl/aueffectutil.m @@ -20,6 +20,9 @@ typedef ComponentDescription AudioComponentDescription; +@protocol NSApplicationDelegate <NSObject> +@end + @protocol NSWindowDelegate <NSObject> @end @@ -723,7 +726,7 @@ static void UpdateChangeCountCallback(void *userData, @end -@interface AUEffectUtilAppDelegate : NSObject +@interface AUEffectUtilAppDelegate : NSObject <NSApplicationDelegate> { EffectInfo *effects; @@ -1036,7 +1039,7 @@ int main(int argc, char *argv[]) pool = [[NSAutoreleasePool alloc] init]; [NSApplication sharedApplication]; AUEffectUtilAppDelegate *const delegate = [[AUEffectUtilAppDelegate alloc] init]; - [NSApp setDelegate:delegate]; + [[NSApplication sharedApplication] setDelegate:delegate]; [pool release]; // Let's go! diff --git a/src/osd/sdl/input.c b/src/osd/sdl/input.c index 5fab6a71fde..42fc08a8ebd 100644 --- a/src/osd/sdl/input.c +++ b/src/osd/sdl/input.c @@ -132,7 +132,7 @@ struct device_info // device information device_info ** head; device_info * next; - astring name; + std::string name; // MAME information input_device * device; @@ -2231,7 +2231,7 @@ static device_info *generic_device_alloc(device_info **devlist_head_ptr, const c devinfo->head = devlist_head_ptr; // allocate a UTF8 copy of the name - devinfo->name.cpy(name); + devinfo->name.assign(name); // append us to the list for (curdev_ptr = devinfo->head; *curdev_ptr != NULL; curdev_ptr = &(*curdev_ptr)->next) ; diff --git a/src/osd/sdl/man/castool.1 b/src/osd/sdl/man/castool.1 index 56ef844e08f..88e6ab7d9ad 100644 --- a/src/osd/sdl/man/castool.1 +++ b/src/osd/sdl/man/castool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco <c.falco@ubuntu.com>, February 2011 .\" .\" -.TH CASTOOL 1 2015-03-23 0.160 "MESS Generic cassette manipulation tool" +.TH CASTOOL 1 2015-04-25 0.161 "MESS Generic cassette manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/chdman.1 b/src/osd/sdl/man/chdman.1 index dfa9440428d..592854200d8 100644 --- a/src/osd/sdl/man/chdman.1 +++ b/src/osd/sdl/man/chdman.1 @@ -6,7 +6,7 @@ .\" Ashley T. Howes <debiandev@ashleyhowes.com>, February 2005 .\" updated by Cesare Falco <c.falco@ubuntu.com>, February 2007 .\" -.TH CHDMAN 1 2015-03-23 0.160 "MAME Compressed Hunks of Data (CHD) manager" +.TH CHDMAN 1 2015-04-25 0.161 "MAME Compressed Hunks of Data (CHD) manager" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/floptool.1 b/src/osd/sdl/man/floptool.1 index 338bf9b6b3b..4ff8f44c27e 100644 --- a/src/osd/sdl/man/floptool.1 +++ b/src/osd/sdl/man/floptool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco <c.falco@ubuntu.com>, April 2014 .\" .\" -.TH FLOPTOOL 1 2015-03-23 0.160 "MESS Generic floppy manipulation tool" +.TH FLOPTOOL 1 2015-04-25 0.161 "MESS Generic floppy manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/imgtool.1 b/src/osd/sdl/man/imgtool.1 index 392a767c166..544e56af6c9 100644 --- a/src/osd/sdl/man/imgtool.1 +++ b/src/osd/sdl/man/imgtool.1 @@ -6,7 +6,7 @@ .\" Cesare Falco <c.falco@ubuntu.com>, February 2011 .\" .\" -.TH IMGTOOL 1 2015-03-23 0.160 "MESS media image manipulation tool" +.TH IMGTOOL 1 2015-04-25 0.161 "MESS media image manipulation tool" .\" .\" .\" NAME chapter diff --git a/src/osd/sdl/man/jedutil.1 b/src/osd/sdl/man/jedutil.1 index f85a5a3d620..4c5f094efcf 100644 --- a/src/osd/sdl/man/jedutil.1 +++ b/src/osd/sdl/man/jedutil.1 @@ -8,7 +8,7 @@ .\" References .\" http://aarongiles.com/?p=159 .\" -.TH JEDUTIL 1 2015-03-23 0.160 "MAME JEDEC file utilities" +.TH JEDUTIL 1 2015-04-25 0.161 "MAME JEDEC file utilities" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/ldresample.1 b/src/osd/sdl/man/ldresample.1 index cf719c41ac9..4a15b8d8416 100644 --- a/src/osd/sdl/man/ldresample.1 +++ b/src/osd/sdl/man/ldresample.1 @@ -3,7 +3,7 @@ .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .\" -.TH LDRESAMPLE 1 2015-03-23 0.160 "MAME laserdisc audio manipulation tool" +.TH LDRESAMPLE 1 2015-04-25 0.161 "MAME laserdisc audio manipulation tool" .\" .\" Please adjust this date whenever revising the manpage. .\" diff --git a/src/osd/sdl/man/ldverify.1 b/src/osd/sdl/man/ldverify.1 index 83b43efe118..d08ad4b0be9 100644 --- a/src/osd/sdl/man/ldverify.1 +++ b/src/osd/sdl/man/ldverify.1 @@ -5,7 +5,7 @@ .\" Man page created from source and usage information by .\" Cesare Falco <c.falco@ubuntu.com>, August 2008 .\" -.TH LDVERIFY 1 2015-03-23 0.160 "MAME laserdisc data checker" +.TH LDVERIFY 1 2015-04-25 0.161 "MAME laserdisc data checker" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/mame.6 b/src/osd/sdl/man/mame.6 index 6d128814d66..f85ddf66fd5 100644 --- a/src/osd/sdl/man/mame.6 +++ b/src/osd/sdl/man/mame.6 @@ -13,7 +13,7 @@ .\" and updated by Andrew Burton <burtona@gol.com>, July 2003 .\" .\" -.TH MAME 6 2015-03-23 0.160 "MAME \- The Multiple Arcade Machine Emulator" +.TH MAME 6 2015-04-25 0.161 "MAME \- The Multiple Arcade Machine Emulator" .\" .\" .\" NAME chapter @@ -1058,6 +1058,15 @@ immediately upon startup. The default is NULL (no commands). .\" SDL specific .\" +++++++++++++++++++++++++++++++++++++++++++++++++++++++ .TP +.B \-debugger \fIdebugger_name +Name of the debugger to use. Default is AUTO. +.TP +.B \-debugger_font, \-dfont \fIfont_name +Specifies the font to use for debugging. Default is AUTO. +.TP +.B \-debugger_font_size, \-dfontsize \fIsize +Specifies the font size to use for debugging. +.TP .B \-[no]oslog Outputs the error.log data to the system debugger. This can be used at the same time as \-log to output the log data to both targets as well. diff --git a/src/osd/sdl/man/mess.6 b/src/osd/sdl/man/mess.6 index 393943979e9..3de152071d5 100644 --- a/src/osd/sdl/man/mess.6 +++ b/src/osd/sdl/man/mess.6 @@ -16,7 +16,7 @@ .\" http://www.mess.org/ .\" .\" -.TH MESS 6 2015-03-23 0.160 "The Multiple Emulator Super System (MESS)" +.TH MESS 6 2015-04-25 0.161 "The Multiple Emulator Super System (MESS)" .\" .\" .\" NAME chapter @@ -1065,6 +1065,15 @@ immediately upon startup. The default is NULL (no commands). .\" SDL specific .\" +++++++++++++++++++++++++++++++++++++++++++++++++++++++ .TP +.B \-debugger \fIdebugger_name +Name of the debugger to use. Default is AUTO. +.TP +.B \-debugger_font, \-dfont \fIfont_name +Specifies the font to use for debugging. Default is AUTO. +.TP +.B \-debugger_font_size, \-dfontsize \fIsize +Specifies the font size to use for debugging. +.TP .B \-[no]oslog Outputs the error.log data to the system debugger. This can be used at the same time as \-log to output the log data to both targets as well. diff --git a/src/osd/sdl/man/romcmp.1 b/src/osd/sdl/man/romcmp.1 index a52c2a1b472..848c0caefc8 100644 --- a/src/osd/sdl/man/romcmp.1 +++ b/src/osd/sdl/man/romcmp.1 @@ -9,7 +9,7 @@ .\" References .\" http://www.mame.net/mamefaq.html .\" -.TH ROMCMP 1 2015-03-23 0.160 "MAME romset checking tool" +.TH ROMCMP 1 2015-04-25 0.161 "MAME romset checking tool" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/man/testkeys.1 b/src/osd/sdl/man/testkeys.1 index 4ef207a35b6..00016e22952 100644 --- a/src/osd/sdl/man/testkeys.1 +++ b/src/osd/sdl/man/testkeys.1 @@ -5,7 +5,7 @@ .\" Man page created from source and usage information .\" Cesare Falco <c.falco@ubuntu.com>, February 2007 .\" -.TH TESTKEYS 1 2015-03-23 0.160 "MAME SDL keycode scanner" +.TH TESTKEYS 1 2015-04-25 0.161 "MAME SDL keycode scanner" .\" .\" NAME chapter .SH NAME diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h index c1dd01cd837..f3a3241e065 100644 --- a/src/osd/sdl/osdsdl.h +++ b/src/osd/sdl/osdsdl.h @@ -119,12 +119,12 @@ public: const char *ui_mode_key() const { return value(SDLOPTION_UIMODEKEY); } // joystick mapping - const char *joy_index(int index) const { astring temp; return value(temp.format("%s%d", SDLOPTION_JOYINDEX, index).c_str()); } + const char *joy_index(int index) const { std::string temp; return value(strformat(temp, "%s%d", SDLOPTION_JOYINDEX, index).c_str()); } bool sixaxis() const { return bool_value(SDLOPTION_SIXAXIS); } #if (SDLMAME_SDL2) - const char *mouse_index(int index) const { astring temp; return value(temp.format("%s%d", SDLOPTION_MOUSEINDEX, index).c_str()); } - const char *keyboard_index(int index) const { astring temp; return value(temp.format("%s%d", SDLOPTION_KEYBINDEX, index).c_str()); } + const char *mouse_index(int index) const { std::string temp; return value(strformat(temp, "%s%d", SDLOPTION_MOUSEINDEX, index).c_str()); } + const char *keyboard_index(int index) const { std::string temp; return value(strformat(temp, "%s%d", SDLOPTION_KEYBINDEX, index).c_str()); } #endif const char *video_driver() const { return value(SDLOPTION_VIDEODRIVER); } diff --git a/src/osd/sdl/sdlmain.c b/src/osd/sdl/sdlmain.c index 3ed26882d81..04d622874f6 100644 --- a/src/osd/sdl/sdlmain.c +++ b/src/osd/sdl/sdlmain.c @@ -209,9 +209,9 @@ void MorphToPM() sdl_options::sdl_options() : osd_options() { - astring ini_path(INI_PATH); + std::string ini_path(INI_PATH); add_entries(sdl_options::s_option_entries); - ini_path.replace(0, "APP_NAME", emulator_info::get_appname_lower()); + strreplace(ini_path,"APP_NAME", emulator_info::get_appname_lower()); set_default_value(SDLOPTION_INIPATH, ini_path.c_str()); } @@ -493,14 +493,14 @@ void sdl_osd_interface::init(running_machine &machine) // determine if we are benchmarking, and adjust options appropriately int bench = options().bench(); - astring error_string; + std::string error_string; if (bench > 0) { options().set_value(OPTION_THROTTLE, false, OPTION_PRIORITY_MAXIMUM, error_string); options().set_value(OSDOPTION_SOUND, "none", OPTION_PRIORITY_MAXIMUM, error_string); options().set_value(OSDOPTION_VIDEO, "none", OPTION_PRIORITY_MAXIMUM, error_string); options().set_value(OPTION_SECONDS_TO_RUN, bench, OPTION_PRIORITY_MAXIMUM, error_string); - assert(!error_string); + assert(error_string.c_str()[0] == 0); } // Some driver options - must be before audio init! diff --git a/src/osd/sdl/sdlprefix.h b/src/osd/sdl/sdlprefix.h index ed1b2e11204..f46bf2a22df 100644 --- a/src/osd/sdl/sdlprefix.h +++ b/src/osd/sdl/sdlprefix.h @@ -81,4 +81,3 @@ struct _IO_FILE {}; //_IO_FILE is an opaque type in the emscripten libc which m #endif #endif /* SDLMAME_UNIX */ - diff --git a/src/osd/sdl/video.c b/src/osd/sdl/video.c index 71d4f779f67..3d8f6c095bb 100644 --- a/src/osd/sdl/video.c +++ b/src/osd/sdl/video.c @@ -285,8 +285,6 @@ void sdl_monitor_info::refresh() float osd_monitor_info::aspect() { - // refresh the monitor information and compute the aspect - refresh(); // FIXME: returning 0 looks odd, video_config is bad if (video_config.keepaspect) { diff --git a/src/osd/sdl/video.h b/src/osd/sdl/video.h index 862988fe6ac..e79442bdd3c 100644 --- a/src/osd/sdl/video.h +++ b/src/osd/sdl/video.h @@ -115,17 +115,19 @@ public: virtual ~osd_monitor_info() { } + virtual void refresh() = 0; + const void *oshandle() { return m_handle; } - const osd_rect &position_size() { refresh(); return m_pos_size; } - const osd_rect &usuable_position_size() { refresh(); return m_usuable_pos_size; } + const osd_rect &position_size() { return m_pos_size; } + const osd_rect &usuable_position_size() { return m_usuable_pos_size; } - const char *devicename() { refresh(); return m_name[0] ? m_name : "UNKNOWN"; } + const char *devicename() { return m_name[0] ? m_name : "UNKNOWN"; } float aspect(); void set_aspect(const float a) { m_aspect = a; } - bool is_primary() { refresh(); return m_is_primary; } + bool is_primary() { return m_is_primary; } osd_monitor_info * next() { return m_next; } // pointer to next monitor in list @@ -135,7 +137,6 @@ public: // FIXME: should be private! osd_monitor_info *m_next; // pointer to next monitor in list protected: - virtual void refresh() = 0; osd_rect m_pos_size; osd_rect m_usuable_pos_size; bool m_is_primary; diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c index d44742c80f6..c73ded1690c 100644 --- a/src/osd/sdl/window.c +++ b/src/osd/sdl/window.c @@ -929,6 +929,7 @@ osd_dim sdl_window_info::pick_best_mode() int minimum_width, minimum_height, target_width, target_height; int i; float size_score, best_score = 0.0f; + int best_width = 0, best_height = 0; SDL_Rect **modes; // determine the minimum width/height for the selected target @@ -989,12 +990,13 @@ osd_dim sdl_window_info::pick_best_mode() if (size_score > best_score) { best_score = size_score; - return osd_dim(modes[i]->w, modes[i]->h); + best_width = modes[i]->w; + best_height = modes[i]->h; } } } - return osd_dim(0,0); + return osd_dim(best_width, best_height); } #endif @@ -1268,6 +1270,7 @@ OSDWORK_CALLBACK( sdl_window_info::complete_create_wt ) SDL_WM_SetCaption(window->m_title, "SDLMAME"); #endif + window->monitor()->refresh(); // initialize the drawing backend if (window->renderer().create()) return (void *) &result[1]; diff --git a/src/osd/windows/video.c b/src/osd/windows/video.c index 3bfefee7270..d135d7a2bc9 100644 --- a/src/osd/windows/video.c +++ b/src/osd/windows/video.c @@ -113,6 +113,7 @@ void windows_osd_interface::video_exit() win_monitor_info::win_monitor_info(const HMONITOR handle, const char *monitor_device, float aspect) : osd_monitor_info(&m_handle, monitor_device, aspect), m_handle(handle) { + refresh(); } win_monitor_info::~win_monitor_info() @@ -135,6 +136,8 @@ void win_monitor_info::refresh() if (temp) strncpy(m_name, temp, sizeof(m_name)); + osd_free(temp); + m_pos_size = RECT_to_osd_rect(m_info.rcMonitor); m_usuable_pos_size = RECT_to_osd_rect(m_info.rcWork); m_is_primary = ((m_info.dwFlags & MONITORINFOF_PRIMARY) != 0); @@ -149,8 +152,6 @@ void win_monitor_info::refresh() float osd_monitor_info::aspect() { - // refresh the monitor information and compute the aspect - refresh(); // FIXME: returning 0 looks odd, video_config is bad if (video_config.keepaspect) { diff --git a/src/osd/windows/video.h b/src/osd/windows/video.h index 87ce0d8527c..23ff05a7371 100644 --- a/src/osd/windows/video.h +++ b/src/osd/windows/video.h @@ -110,17 +110,19 @@ public: virtual ~osd_monitor_info() { } + virtual void refresh() = 0; + const void *oshandle() { return m_handle; } - const osd_rect &position_size() { refresh(); return m_pos_size; } - const osd_rect &usuable_position_size() { refresh(); return m_usuable_pos_size; } + const osd_rect &position_size() { return m_pos_size; } + const osd_rect &usuable_position_size() { return m_usuable_pos_size; } - const char *devicename() { refresh(); return m_name[0] ? m_name : "UNKNOWN"; } + const char *devicename() { return m_name[0] ? m_name : "UNKNOWN"; } float aspect(); void set_aspect(const float a) { m_aspect = a; } - bool is_primary() { refresh(); return m_is_primary; } + bool is_primary() { return m_is_primary; } osd_monitor_info * next() { return m_next; } // pointer to next monitor in list @@ -130,7 +132,6 @@ public: // FIXME: should be private! osd_monitor_info *m_next; // pointer to next monitor in list protected: - virtual void refresh() = 0; osd_rect m_pos_size; osd_rect m_usuable_pos_size; bool m_is_primary; diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index 52db665fae8..6ca2e6bb420 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -1447,6 +1447,17 @@ LRESULT CALLBACK win_window_info::video_window_proc(HWND wnd, UINT message, WPAR window->maximize_window(); break; + // maximum size set + case WM_DISPLAYCHANGE: + /* FIXME: The current codebase has an issue with setting aspect + * ratios correctly after display change. set_aspect should + * be set_forced_aspect and on a refresh this forced aspect should + * be preserved if set. If not, the standard aspect calculation + * should be used. + */ + window->m_monitor->refresh(); + break; + // set focus: if we're not the primary window, switch back // commented out ATM because this prevents us from resizing secondary windows // case WM_SETFOCUS: diff --git a/src/osd/windows/winmain.c b/src/osd/windows/winmain.c index c9360a648c4..cc6fd4c2dd9 100644 --- a/src/osd/windows/winmain.c +++ b/src/osd/windows/winmain.c @@ -134,8 +134,8 @@ private: // internal helpers bool query_system_for_address(FPTR address); void scan_file_for_address(FPTR address, bool create_cache); - bool parse_sym_line(const char *line, FPTR &address, astring &symbol); - bool parse_map_line(const char *line, FPTR &address, astring &symbol); + bool parse_sym_line(const char *line, FPTR &address, std::string &symbol); + bool parse_map_line(const char *line, FPTR &address, std::string &symbol); void scan_cache_for_address(FPTR address); void format_symbol(const char *name, UINT32 displacement, const char *filename = NULL, int linenumber = 0); @@ -149,13 +149,13 @@ private: cache_entry * m_next; FPTR m_address; - astring m_name; + std::string m_name; }; simple_list<cache_entry> m_cache; - astring m_mapfile; - astring m_symfile; - astring m_buffer; + std::string m_mapfile; + std::string m_symfile; + std::string m_buffer; HANDLE m_process; FPTR m_last_base; FPTR m_text_base; @@ -544,14 +544,14 @@ void windows_osd_interface::init(running_machine &machine) // determine if we are benchmarking, and adjust options appropriately int bench = options.bench(); - astring error_string; + std::string error_string; if (bench > 0) { options.set_value(OPTION_THROTTLE, false, OPTION_PRIORITY_MAXIMUM, error_string); options.set_value(OSDOPTION_SOUND, "none", OPTION_PRIORITY_MAXIMUM, error_string); options.set_value(OSDOPTION_VIDEO, "none", OPTION_PRIORITY_MAXIMUM, error_string); options.set_value(OPTION_SECONDS_TO_RUN, bench, OPTION_PRIORITY_MAXIMUM, error_string); - assert(!error_string); + assert(error_string.empty()); } // determine if we are profiling, and adjust options appropriately @@ -561,7 +561,7 @@ void windows_osd_interface::init(running_machine &machine) options.set_value(OPTION_THROTTLE, false, OPTION_PRIORITY_MAXIMUM, error_string); options.set_value(OSDOPTION_MULTITHREADING, false, OPTION_PRIORITY_MAXIMUM, error_string); options.set_value(OSDOPTION_NUMPROCESSORS, 1, OPTION_PRIORITY_MAXIMUM, error_string); - assert(!error_string); + assert(error_string.empty()); } // thread priority @@ -587,10 +587,10 @@ void windows_osd_interface::init(running_machine &machine) osd_common_t::init_subsystems(); // notify listeners of screen configuration - astring tempstring; + std::string tempstring; for (win_window_info *info = win_window_list; info != NULL; info = info->m_next) { - tempstring.printf("Orientation(%s)", info->m_monitor->devicename()); + strprintf(tempstring, "Orientation(%s)", info->m_monitor->devicename()); output_set_value(tempstring.c_str(), info->m_targetorient); } @@ -1010,23 +1010,23 @@ symbol_manager::symbol_manager(const char *argv0) { #ifdef __GNUC__ // compute the name of the mapfile - int extoffs = m_mapfile.rchr(0, '.'); + int extoffs = m_mapfile.find_last_of('.'); if (extoffs != -1) m_mapfile.substr(0, extoffs); - m_mapfile.cat(".map"); + m_mapfile.append(".map"); // and the name of the symfile - extoffs = m_symfile.rchr(0, '.'); + extoffs = m_symfile.find_last_of('.'); if (extoffs != -1) - m_symfile.substr(0, extoffs); - m_symfile.cat(".sym"); + m_symfile = m_symfile.substr(0, extoffs); + m_symfile.append(".sym"); // figure out the base of the .text section m_text_base = get_text_section_base(); #endif // expand the buffer to be decently large up front - m_buffer.printf("%500s", ""); + strprintf(m_buffer,"%500s", ""); } @@ -1048,7 +1048,7 @@ symbol_manager::~symbol_manager() const char *symbol_manager::symbol_for_address(FPTR address) { // default the buffer - m_buffer.cpy(" (not found)"); + m_buffer.assign(" (not found)"); m_last_base = 0; // first try to do it using system APIs @@ -1129,11 +1129,11 @@ void symbol_manager::scan_file_for_address(FPTR address, bool create_cache) return; // reset the best info - astring best_symbol; + std::string best_symbol; FPTR best_addr = 0; // parse the file, looking for valid entries - astring symbol; + std::string symbol; char line[1024]; while (fgets(line, sizeof(line) - 1, srcfile)) { @@ -1174,7 +1174,7 @@ void symbol_manager::scan_file_for_address(FPTR address, bool create_cache) void symbol_manager::scan_cache_for_address(FPTR address) { // reset the best info - astring best_symbol; + std::string best_symbol; FPTR best_addr = 0; // walk the cache, looking for valid entries @@ -1198,7 +1198,7 @@ void symbol_manager::scan_cache_for_address(FPTR address) // which is just the output of objdump //------------------------------------------------- -bool symbol_manager::parse_sym_line(const char *line, FPTR &address, astring &symbol) +bool symbol_manager::parse_sym_line(const char *line, FPTR &address, std::string &symbol) { #ifdef __GNUC__ /* @@ -1238,8 +1238,8 @@ bool symbol_manager::parse_sym_line(const char *line, FPTR &address, astring &sy chptr++; // extract the symbol name - symbol.cpy(chptr).trimspace(); - return (symbol.len() > 0); + strtrimspace(symbol.assign(chptr)); + return (symbol.length() > 0); } } #endif @@ -1252,7 +1252,7 @@ bool symbol_manager::parse_sym_line(const char *line, FPTR &address, astring &sy // generated map file //------------------------------------------------- -bool symbol_manager::parse_map_line(const char *line, FPTR &address, astring &symbol) +bool symbol_manager::parse_map_line(const char *line, FPTR &address, std::string &symbol) { #ifdef __GNUC__ /* @@ -1278,8 +1278,8 @@ bool symbol_manager::parse_map_line(const char *line, FPTR &address, astring &sy chptr++; // extract the symbol name - symbol.cpy(chptr).trimspace(); - return (symbol.len() > 0); + strtrimspace(symbol.assign(chptr)); + return (symbol.length() > 0); } #endif return false; @@ -1293,16 +1293,16 @@ bool symbol_manager::parse_map_line(const char *line, FPTR &address, astring &sy void symbol_manager::format_symbol(const char *name, UINT32 displacement, const char *filename, int linenumber) { // start with the address and offset - m_buffer.printf(" (%s", name); + strprintf(m_buffer, " (%s", name); if (displacement != 0) - m_buffer.catprintf("+0x%04x", (UINT32)displacement); + strcatprintf(m_buffer, "+0x%04x", (UINT32)displacement); // append file/line if present if (filename != NULL) - m_buffer.catprintf(", %s:%d", filename, linenumber); + strcatprintf(m_buffer, ", %s:%d", filename, linenumber); // close up the string - m_buffer.cat(")"); + m_buffer.append(")"); } diff --git a/src/tools/chdman.c b/src/tools/chdman.c index d80e6d79921..3ea0a31f752 100644 --- a/src/tools/chdman.c +++ b/src/tools/chdman.c @@ -96,7 +96,7 @@ const int MODE_GDI = 2; // FUNCTION PROTOTYPES //************************************************************************** -typedef tagmap_t<astring *> parameters_t; +typedef tagmap_t<std::string *> parameters_t; static void report_error(int error, const char *format, ...) ATTR_PRINTF(2,3); static void do_info(parameters_t ¶ms); @@ -320,7 +320,7 @@ public: if (offset >= startoffs && offset < endoffs) { // if we don't already have this file open, open it now - if (m_file == NULL || m_lastfile != m_info.track[tracknum].fname) + if (m_file == NULL || m_lastfile.compare(m_info.track[tracknum].fname)!=0) { if (m_file != NULL) core_fclose(m_file); @@ -381,7 +381,7 @@ public: private: // internal state - astring m_lastfile; + std::string m_lastfile; core_file * m_file; cdrom_toc & m_toc; chdcd_track_input_info & m_info; @@ -826,27 +826,27 @@ static int print_help(const char *argv0, const command_description &desc, const // big_int_string - create a 64-bit string //------------------------------------------------- -const char *big_int_string(astring &str, UINT64 intvalue) +const char *big_int_string(std::string &str, UINT64 intvalue) { // 0 is a special case if (intvalue == 0) - return str.cpy("0").c_str(); + return str.assign("0").c_str(); // loop until all chunks are done - str.reset(); + str.clear(); bool first = true; while (intvalue != 0) { int chunk = intvalue % 1000; intvalue /= 1000; - astring insert; - insert.format((intvalue != 0) ? "%03d" : "%d", chunk); + std::string insert; + strprintf(insert, (intvalue != 0) ? "%03d" : "%d", chunk); if (!first) - str.ins(0, ",").c_str(); + str.insert(0, ",").c_str(); first = false; - str.ins(0, insert); + str.insert(0, insert); } return str.c_str(); } @@ -857,9 +857,10 @@ const char *big_int_string(astring &str, UINT64 intvalue) // number of frames in M:S:F format //------------------------------------------------- -const char *msf_string_from_frames(astring &str, UINT32 frames) +const char *msf_string_from_frames(std::string &str, UINT32 frames) { - return str.format("%02d:%02d:%02d", frames / (75 * 60), (frames / 75) % 60, frames % 75).c_str(); + strprintf(str, "%02d:%02d:%02d", frames / (75 * 60), (frames / 75) % 60, frames % 75); + return str.c_str(); } @@ -900,7 +901,7 @@ UINT64 parse_number(const char *string) // compute a best guess CHS value set //------------------------------------------------- -static void guess_chs(astring *filename, UINT64 filesize, int sectorsize, UINT32 &cylinders, UINT32 &heads, UINT32 §ors, UINT32 &bps) +static void guess_chs(std::string *filename, UINT64 filesize, int sectorsize, UINT32 &cylinders, UINT32 &heads, UINT32 §ors, UINT32 &bps) { // if this is a direct physical drive read, handle it specially if (filename != NULL && osd_get_physical_drive_geometry(filename->c_str(), &cylinders, &heads, §ors, &bps)) @@ -939,7 +940,7 @@ static void guess_chs(astring *filename, UINT64 filesize, int sectorsize, UINT32 static void parse_input_chd_parameters(const parameters_t ¶ms, chd_file &input_chd, chd_file &input_parent_chd, bool writeable = false) { // process input parent file - astring *input_chd_parent_str = params.find(OPTION_INPUT_PARENT); + std::string *input_chd_parent_str = params.find(OPTION_INPUT_PARENT); if (input_chd_parent_str != NULL) { chd_error err = input_parent_chd.open(input_chd_parent_str->c_str()); @@ -948,7 +949,7 @@ static void parse_input_chd_parameters(const parameters_t ¶ms, chd_file &inp } // process input file - astring *input_chd_str = params.find(OPTION_INPUT); + std::string *input_chd_str = params.find(OPTION_INPUT); if (input_chd_str != NULL) { chd_error err = input_chd.open(input_chd_str->c_str(), writeable, input_parent_chd.opened() ? &input_parent_chd : NULL); @@ -970,9 +971,9 @@ static void parse_input_start_end(const parameters_t ¶ms, UINT64 logical_siz input_end = logical_size; // process input start - astring *input_start_byte_str = params.find(OPTION_INPUT_START_BYTE); - astring *input_start_hunk_str = params.find(OPTION_INPUT_START_HUNK); - astring *input_start_frame_str = params.find(OPTION_INPUT_START_FRAME); + std::string *input_start_byte_str = params.find(OPTION_INPUT_START_BYTE); + std::string *input_start_hunk_str = params.find(OPTION_INPUT_START_HUNK); + std::string *input_start_frame_str = params.find(OPTION_INPUT_START_FRAME); if (input_start_byte_str != NULL) input_start = parse_number(input_start_byte_str->c_str()); if (input_start_hunk_str != NULL) @@ -983,9 +984,9 @@ static void parse_input_start_end(const parameters_t ¶ms, UINT64 logical_siz report_error(1, "Input start offset greater than input file size"); // process input length - astring *input_length_bytes_str = params.find(OPTION_INPUT_LENGTH_BYTES); - astring *input_length_hunks_str = params.find(OPTION_INPUT_LENGTH_HUNKS); - astring *input_length_frames_str = params.find(OPTION_INPUT_LENGTH_FRAMES); + std::string *input_length_bytes_str = params.find(OPTION_INPUT_LENGTH_BYTES); + std::string *input_length_hunks_str = params.find(OPTION_INPUT_LENGTH_HUNKS); + std::string *input_length_frames_str = params.find(OPTION_INPUT_LENGTH_FRAMES); UINT64 input_length = input_end; if (input_length_bytes_str != NULL) input_length = parse_number(input_length_bytes_str->c_str()); @@ -1024,10 +1025,10 @@ static void check_existing_output_file(const parameters_t ¶ms, const char *f // standard set of output CHD parameters //------------------------------------------------- -static astring *parse_output_chd_parameters(const parameters_t ¶ms, chd_file &output_parent_chd) +static std::string *parse_output_chd_parameters(const parameters_t ¶ms, chd_file &output_parent_chd) { // process output parent file - astring *output_chd_parent_str = params.find(OPTION_OUTPUT_PARENT); + std::string *output_chd_parent_str = params.find(OPTION_OUTPUT_PARENT); if (output_chd_parent_str != NULL) { chd_error err = output_parent_chd.open(output_chd_parent_str->c_str()); @@ -1036,7 +1037,7 @@ static astring *parse_output_chd_parameters(const parameters_t ¶ms, chd_file } // process output file - astring *output_chd_str = params.find(OPTION_OUTPUT); + std::string *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) check_existing_output_file(params, output_chd_str->c_str()); return output_chd_str; @@ -1050,7 +1051,7 @@ static astring *parse_output_chd_parameters(const parameters_t ¶ms, chd_file static void parse_hunk_size(const parameters_t ¶ms, UINT32 required_granularity, UINT32 &hunk_size) { - astring *hunk_size_str = params.find(OPTION_HUNK_SIZE); + std::string *hunk_size_str = params.find(OPTION_HUNK_SIZE); if (hunk_size_str != NULL) { hunk_size = parse_number(hunk_size_str->c_str()); @@ -1070,12 +1071,12 @@ static void parse_hunk_size(const parameters_t ¶ms, UINT32 required_granular static void parse_compression(const parameters_t ¶ms, chd_codec_type compression[4]) { // see if anything was specified - astring *compression_str = params.find(OPTION_COMPRESSION); + std::string *compression_str = params.find(OPTION_COMPRESSION); if (compression_str == NULL) return; // special case: 'none' - if (*compression_str == "none") + if (compression_str->compare("none")==0) { compression[0] = compression[1] = compression[2] = compression[3] = CHD_CODEC_NONE; return; @@ -1083,10 +1084,10 @@ static void parse_compression(const parameters_t ¶ms, chd_codec_type compres // iterate through compressors int index = 0; - for (int start = 0, end = compression_str->chr(0, ','); index < 4; start = end + 1, end = compression_str->chr(end + 1, ',')) + for (int start = 0, end = compression_str->find_first_of(','); index < 4; start = end + 1, end = compression_str->find_first_of(',', end + 1)) { - astring name(*compression_str, start, (end == -1) ? -1 : end - start); - if (name.len() != 4) + std::string name(*compression_str, start, (end == -1) ? -1 : end - start); + if (name.length() != 4) report_error(1, "Invalid compressor '%s' specified", name.c_str()); chd_codec_type type = CHD_MAKE_TAG(name[0], name[1], name[2], name[3]); if (!chd_codec_list::codec_exists(type)) @@ -1110,7 +1111,7 @@ static void parse_compression(const parameters_t ¶ms, chd_codec_type compres static void parse_numprocessors(const parameters_t ¶ms) { - astring *numprocessors_str = params.find(OPTION_NUMPROCESSORS); + std::string *numprocessors_str = params.find(OPTION_NUMPROCESSORS); if (numprocessors_str == NULL) return; @@ -1128,12 +1129,12 @@ static void parse_numprocessors(const parameters_t ¶ms) // describing a set of compressors //------------------------------------------------- -static const char *compression_string(astring &str, chd_codec_type compression[4]) +static const char *compression_string(std::string &str, chd_codec_type compression[4]) { // output compression types - str.reset(); + str.clear(); if (compression[0] == CHD_CODEC_NONE) - return str.cpy("none").c_str(); + return str.assign("none").c_str(); // iterate over types for (int index = 0; index < 4; index++) @@ -1142,9 +1143,12 @@ static const char *compression_string(astring &str, chd_codec_type compression[4 if (type == CHD_CODEC_NONE) break; if (index != 0) - str.cat(", "); - str.cat((type >> 24) & 0xff).cat((type >> 16) & 0xff).cat((type >> 8) & 0xff).cat(type & 0xff); - str.cat(" (").cat(chd_codec_list::codec_name(type)).cat(")"); + str.append(", "); + str.push_back((type >> 24) & 0xff); + str.push_back((type >> 16) & 0xff); + str.push_back((type >> 8) & 0xff); + str.push_back(type & 0xff); + str.append(" (").append(chd_codec_list::codec_name(type)).append(")"); } return str.c_str(); } @@ -1240,12 +1244,12 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ core_fprintf(file, "FILE \"%s\" BINARY\n", filename); // determine submode - astring tempstr; + std::string tempstr; switch (info.trktype) { case CD_TRACK_MODE1: case CD_TRACK_MODE1_RAW: - tempstr.format("MODE1/%04d", info.datasize); + strprintf(tempstr,"MODE1/%04d", info.datasize); break; case CD_TRACK_MODE2: @@ -1253,11 +1257,11 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ case CD_TRACK_MODE2_FORM2: case CD_TRACK_MODE2_FORM_MIX: case CD_TRACK_MODE2_RAW: - tempstr.format("MODE2/%04d", info.datasize); + strprintf(tempstr,"MODE2/%04d", info.datasize); break; case CD_TRACK_AUDIO: - tempstr.cpy("AUDIO"); + tempstr.assign("AUDIO"); break; } @@ -1295,11 +1299,11 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ core_fprintf(file, "// Track %d\n", tracknum + 1); // write out the track type - astring modesubmode; + std::string modesubmode; if (info.subtype != CD_SUB_NONE) - modesubmode.format("%s %s", cdrom_get_type_string(info.trktype), cdrom_get_subtype_string(info.subtype)); + strprintf(modesubmode,"%s %s", cdrom_get_type_string(info.trktype), cdrom_get_subtype_string(info.subtype)); else - modesubmode.format("%s", cdrom_get_type_string(info.trktype)); + strprintf(modesubmode,"%s", cdrom_get_type_string(info.trktype)); core_fprintf(file, "TRACK %s\n", modesubmode.c_str()); // write out the attributes @@ -1311,7 +1315,7 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ } // output pregap - astring tempstr; + std::string tempstr; if (info.pregap > 0) core_fprintf(file, "ZERO %s %s\n", modesubmode.c_str(), msf_string_from_frames(tempstr, info.pregap)); @@ -1343,7 +1347,7 @@ static void do_info(parameters_t ¶ms) parse_input_chd_parameters(params, input_chd, input_parent_chd); // print filename and version - astring tempstr; + std::string tempstr; printf("Input file: %s\n", params.find(OPTION_INPUT)->c_str()); printf("File Version: %d\n", input_chd.version()); if (input_chd.version() < 3) @@ -1467,7 +1471,7 @@ static void do_info(parameters_t ¶ms) } // output the stats - astring tempstr; + std::string tempstr; printf("%10s %5.1f%% %-40s\n", big_int_string(tempstr, compression_types[comptype]), 100.0 * double(compression_types[comptype]) / double(input_chd.hunk_count()), @@ -1519,7 +1523,7 @@ static void do_verify(parameters_t ¶ms) // finish up if (raw_sha1 != computed_sha1) { - astring tempstr; + std::string tempstr; fprintf(stderr, "Error: Raw SHA1 in header = %s\n", raw_sha1.as_string(tempstr)); fprintf(stderr, " actual SHA1 = %s\n", computed_sha1.as_string(tempstr)); @@ -1542,7 +1546,7 @@ static void do_verify(parameters_t ¶ms) printf("Overall SHA1 verification successful!\n"); else { - astring tempstr; + std::string tempstr; fprintf(stderr, "Error: Overall SHA1 in header = %s\n", input_chd.sha1().as_string(tempstr)); fprintf(stderr, " actual SHA1 = %s\n", computed_overall_sha1.as_string(tempstr)); @@ -1567,7 +1571,7 @@ static void do_create_raw(parameters_t ¶ms) { // process input file core_file *input_file = NULL; - astring *input_file_str = params.find(OPTION_INPUT); + std::string *input_file_str = params.find(OPTION_INPUT); if (input_file_str != NULL) { file_error filerr = core_fopen(input_file_str->c_str(), OPEN_FLAG_READ, &input_file); @@ -1577,7 +1581,7 @@ static void do_create_raw(parameters_t ¶ms) // process output CHD chd_file output_parent; - astring *output_chd_str = parse_output_chd_parameters(params, output_parent); + std::string *output_chd_str = parse_output_chd_parameters(params, output_parent); // process hunk size UINT32 hunk_size = output_parent.opened() ? output_parent.hunk_bytes() : 0; @@ -1585,7 +1589,7 @@ static void do_create_raw(parameters_t ¶ms) // process unit size UINT32 unit_size = output_parent.opened() ? output_parent.unit_bytes() : 0; - astring *unit_size_str = params.find(OPTION_UNIT_SIZE); + std::string *unit_size_str = params.find(OPTION_UNIT_SIZE); if (unit_size_str != NULL) { unit_size = parse_number(unit_size_str->c_str()); @@ -1607,7 +1611,7 @@ static void do_create_raw(parameters_t ¶ms) parse_numprocessors(params); // print some info - astring tempstr; + std::string tempstr; printf("Output CHD: %s\n", output_chd_str->c_str()); if (output_parent.opened()) printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str()); @@ -1647,7 +1651,7 @@ static void do_create_raw(parameters_t ¶ms) { delete chd; // delete the output file - astring *output_chd_str = params.find(OPTION_OUTPUT); + std::string *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(output_chd_str->c_str()); throw; @@ -1664,7 +1668,7 @@ static void do_create_hd(parameters_t ¶ms) { // process input file core_file *input_file = NULL; - astring *input_file_str = params.find(OPTION_INPUT); + std::string *input_file_str = params.find(OPTION_INPUT); if (input_file_str != NULL) { file_error filerr = core_fopen(input_file_str->c_str(), OPEN_FLAG_READ, &input_file); @@ -1674,11 +1678,11 @@ static void do_create_hd(parameters_t ¶ms) // process output CHD chd_file output_parent; - astring *output_chd_str = parse_output_chd_parameters(params, output_parent); + std::string *output_chd_str = parse_output_chd_parameters(params, output_parent); // process sectorsize UINT32 sector_size = output_parent.opened() ? output_parent.unit_bytes() : IDE_SECTOR_SIZE; - astring *sectorsize_str = params.find(OPTION_SECTOR_SIZE); + std::string *sectorsize_str = params.find(OPTION_SECTOR_SIZE); if (sectorsize_str != NULL) { if (output_parent.opened()) @@ -1701,7 +1705,7 @@ static void do_create_hd(parameters_t ¶ms) } else { - astring *size_str = params.find(OPTION_SIZE); + std::string *size_str = params.find(OPTION_SIZE); if (size_str != NULL) { if (sscanf(size_str->c_str(), "%" I64FMT"d", &filesize) != 1) @@ -1725,7 +1729,7 @@ static void do_create_hd(parameters_t ¶ms) UINT32 cylinders = 0; UINT32 heads = 0; UINT32 sectors = 0; - astring *chs_str = params.find(OPTION_CHS); + std::string *chs_str = params.find(OPTION_CHS); if (chs_str != NULL) { if (output_parent.opened()) @@ -1738,7 +1742,7 @@ static void do_create_hd(parameters_t ¶ms) dynamic_buffer identdata; if (output_parent.opened()) output_parent.read_metadata(HARD_DISK_IDENT_METADATA_TAG, 0, identdata); - astring *ident_str = params.find(OPTION_IDENT); + std::string *ident_str = params.find(OPTION_IDENT); if (ident_str != NULL) { // load the file @@ -1757,7 +1761,7 @@ static void do_create_hd(parameters_t ¶ms) // extract geometry from the parent if we have one if (output_parent.opened() && cylinders == 0) { - astring metadata; + std::string metadata; if (output_parent.read_metadata(HARD_DISK_METADATA_TAG, 0, metadata) != CHDERR_NONE) report_error(1, "Unable to find hard disk metadata in parent CHD"); if (sscanf(metadata.c_str(), HARD_DISK_METADATA_FORMAT, &cylinders, &heads, §ors, §or_size) != 4) @@ -1778,7 +1782,7 @@ static void do_create_hd(parameters_t ¶ms) UINT32 totalsectors = cylinders * heads * sectors; // print some info - astring tempstr; + std::string tempstr; printf("Output CHD: %s\n", output_chd_str->c_str()); if (output_parent.opened()) printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str()); @@ -1814,8 +1818,8 @@ static void do_create_hd(parameters_t ¶ms) report_error(1, "Error creating CHD file (%s): %s", output_chd_str->c_str(), chd_file::error_string(err)); // add the standard hard disk metadata - astring metadata; - metadata.format(HARD_DISK_METADATA_FORMAT, cylinders, heads, sectors, sector_size); + std::string metadata; + strprintf(metadata, HARD_DISK_METADATA_FORMAT, cylinders, heads, sectors, sector_size); err = chd->write_metadata(HARD_DISK_METADATA_TAG, 0, metadata); if (err != CHDERR_NONE) report_error(1, "Error adding hard disk metadata: %s", chd_file::error_string(err)); @@ -1837,7 +1841,7 @@ static void do_create_hd(parameters_t ¶ms) { delete chd; // delete the output file - astring *output_chd_str = params.find(OPTION_OUTPUT); + std::string *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(output_chd_str->c_str()); throw; @@ -1855,7 +1859,7 @@ static void do_create_cd(parameters_t ¶ms) // process input file chdcd_track_input_info track_info; cdrom_toc toc = { 0 }; - astring *input_file_str = params.find(OPTION_INPUT); + std::string *input_file_str = params.find(OPTION_INPUT); if (input_file_str != NULL) { chd_error err = chdcd_parse_toc(input_file_str->c_str(), toc, track_info); @@ -1865,7 +1869,7 @@ static void do_create_cd(parameters_t ¶ms) // process output CHD chd_file output_parent; - astring *output_chd_str = parse_output_chd_parameters(params, output_parent); + std::string *output_chd_str = parse_output_chd_parameters(params, output_parent); // process hunk size UINT32 hunk_size = output_parent.opened() ? output_parent.hunk_bytes() : CD_FRAMES_PER_HUNK * CD_FRAME_SIZE; @@ -1892,7 +1896,7 @@ static void do_create_cd(parameters_t ¶ms) } // print some info - astring tempstr; + std::string tempstr; printf("Output CHD: %s\n", output_chd_str->c_str()); if (output_parent.opened()) printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str()); @@ -1929,7 +1933,7 @@ static void do_create_cd(parameters_t ¶ms) { delete chd; // delete the output file - astring *output_chd_str = params.find(OPTION_OUTPUT); + std::string *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(output_chd_str->c_str()); throw; @@ -1946,7 +1950,7 @@ static void do_create_ld(parameters_t ¶ms) { // process input file avi_file *input_file = NULL; - astring *input_file_str = params.find(OPTION_INPUT); + std::string *input_file_str = params.find(OPTION_INPUT); if (input_file_str != NULL) { avi_error avierr = avi_open(input_file_str->c_str(), &input_file); @@ -1957,7 +1961,7 @@ static void do_create_ld(parameters_t ¶ms) // process output CHD chd_file output_parent; - astring *output_chd_str = parse_output_chd_parameters(params, output_parent); + std::string *output_chd_str = parse_output_chd_parameters(params, output_parent); // process input start/end UINT64 input_start; @@ -2002,7 +2006,7 @@ static void do_create_ld(parameters_t ¶ms) parse_numprocessors(params); // print some info - astring tempstr; + std::string tempstr; printf("Output CHD: %s\n", output_chd_str->c_str()); if (output_parent.opened()) printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str()); @@ -2035,8 +2039,8 @@ static void do_create_ld(parameters_t ¶ms) report_error(1, "Error creating CHD file (%s): %s", output_chd_str->c_str(), chd_file::error_string(err)); // write the core A/V metadata - astring metadata; - metadata.format(AV_METADATA_FORMAT, info.fps_times_1million / 1000000, info.fps_times_1million % 1000000, info.width, info.height, info.interlaced, info.channels, info.rate); + std::string metadata; + strprintf(metadata, AV_METADATA_FORMAT, info.fps_times_1million / 1000000, info.fps_times_1million % 1000000, info.width, info.height, info.interlaced, info.channels, info.rate); err = chd->write_metadata(AV_METADATA_TAG, 0, metadata); if (err != CHDERR_NONE) report_error(1, "Error adding AV metadata: %s\n", chd_file::error_string(err)); @@ -2057,7 +2061,7 @@ static void do_create_ld(parameters_t ¶ms) { delete chd; // delete the output file - astring *output_chd_str = params.find(OPTION_OUTPUT); + std::string *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(output_chd_str->c_str()); throw; @@ -2084,7 +2088,7 @@ static void do_copy(parameters_t ¶ms) // process output CHD chd_file output_parent; - astring *output_chd_str = parse_output_chd_parameters(params, output_parent); + std::string *output_chd_str = parse_output_chd_parameters(params, output_parent); // process hunk size UINT32 hunk_size = input_chd.hunk_bytes(); @@ -2115,7 +2119,7 @@ static void do_copy(parameters_t ¶ms) parse_numprocessors(params); // print some info - astring tempstr; + std::string tempstr; printf("Output CHD: %s\n", output_chd_str->c_str()); if (output_parent.opened()) printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str()); @@ -2193,7 +2197,7 @@ static void do_copy(parameters_t ¶ms) { delete chd; // delete the output file - astring *output_chd_str = params.find(OPTION_OUTPUT); + std::string *output_chd_str = params.find(OPTION_OUTPUT); if (output_chd_str != NULL) osd_rmfile(output_chd_str->c_str()); throw; @@ -2219,12 +2223,12 @@ static void do_extract_raw(parameters_t ¶ms) parse_input_start_end(params, input_chd.logical_bytes(), input_chd.hunk_bytes(), input_chd.hunk_bytes(), input_start, input_end); // verify output file doesn't exist - astring *output_file_str = params.find(OPTION_OUTPUT); + std::string *output_file_str = params.find(OPTION_OUTPUT); if (output_file_str != NULL) check_existing_output_file(params, output_file_str->c_str()); // print some info - astring tempstr; + std::string tempstr; printf("Output File: %s\n", output_file_str->c_str()); printf("Input CHD: %s\n", params.find(OPTION_INPUT)->c_str()); if (input_start != 0 || input_end != input_chd.logical_bytes()) @@ -2299,25 +2303,25 @@ static void do_extract_cd(parameters_t ¶ms) const cdrom_toc *toc = cdrom_get_toc(cdrom); // verify output file doesn't exist - astring *output_file_str = params.find(OPTION_OUTPUT); + std::string *output_file_str = params.find(OPTION_OUTPUT); if (output_file_str != NULL) check_existing_output_file(params, output_file_str->c_str()); // verify output BIN file doesn't exist - astring *output_bin_file_str = params.find(OPTION_OUTPUT_BIN); - astring default_name(*output_file_str); - int chop = default_name.rchr(0, '.'); + std::string *output_bin_file_str = params.find(OPTION_OUTPUT_BIN); + std::string default_name(*output_file_str); + int chop = default_name.find_last_of('.'); if (chop != -1) default_name.substr(0, chop); char basename[128]; strncpy(basename, default_name.c_str(), 127); - default_name.cat(".bin"); + default_name.append(".bin"); if (output_bin_file_str == NULL) output_bin_file_str = &default_name; check_existing_output_file(params, output_bin_file_str->c_str()); // print some info - astring tempstr; + std::string tempstr; printf("Output TOC: %s\n", output_file_str->c_str()); printf("Output Data: %s\n", output_bin_file_str->c_str()); printf("Input CHD: %s\n", params.find(OPTION_INPUT)->c_str()); @@ -2368,17 +2372,17 @@ static void do_extract_cd(parameters_t ¶ms) dynamic_buffer buffer; for (int tracknum = 0; tracknum < toc->numtrks; tracknum++) { - astring trackbin_name(basename); + std::string trackbin_name(basename); if (mode == MODE_GDI) { char temp[8]; sprintf(temp, "%02d", tracknum+1); - trackbin_name.cat(temp); + trackbin_name.append(temp); if (toc->tracks[tracknum].trktype == CD_TRACK_AUDIO) - trackbin_name.cat(".raw"); + trackbin_name.append(".raw"); else - trackbin_name.cat(".bin"); + trackbin_name.append(".bin"); if (output_bin_file) { @@ -2395,7 +2399,7 @@ static void do_extract_cd(parameters_t ¶ms) // output the metadata about the track to the TOC file const cdrom_track_info &trackinfo = toc->tracks[tracknum]; - astring temp; + std::string temp; if (mode == MODE_GDI) { output_track_metadata(mode, output_toc_file, tracknum, trackinfo, core_filename_extract_base(temp, trackbin_name.c_str()).c_str(), discoffs, outputoffs); @@ -2494,7 +2498,7 @@ static void do_extract_ld(parameters_t ¶ms) parse_input_chd_parameters(params, input_chd, input_parent_chd); // read core metadata - astring metadata; + std::string metadata; chd_error err = input_chd.read_metadata(AV_METADATA_TAG, 0, metadata); if (err != CHDERR_NONE) report_error(1, "Unable to find A/V metadata in the input CHD"); @@ -2546,12 +2550,12 @@ static void do_extract_ld(parameters_t ¶ms) info.audio_samplerate = rate; // verify output file doesn't exist - astring *output_file_str = params.find(OPTION_OUTPUT); + std::string *output_file_str = params.find(OPTION_OUTPUT); if (output_file_str != NULL) check_existing_output_file(params, output_file_str->c_str()); // print some info - astring tempstr; + std::string tempstr; printf("Output File: %s\n", output_file_str->c_str()); printf("Input CHD: %s\n", params.find(OPTION_INPUT)->c_str()); if (input_start != 0 || input_end != input_chd.hunk_count()) @@ -2645,31 +2649,31 @@ static void do_add_metadata(parameters_t ¶ms) // process tag chd_metadata_tag tag = CHD_MAKE_TAG('?','?','?','?'); - astring *tag_str = params.find(OPTION_TAG); + std::string *tag_str = params.find(OPTION_TAG); if (tag_str != NULL) { - tag_str->cat(" "); + tag_str->append(" "); tag = CHD_MAKE_TAG((*tag_str)[0], (*tag_str)[1], (*tag_str)[2], (*tag_str)[3]); } // process index UINT32 index = 0; - astring *index_str = params.find(OPTION_INDEX); + std::string *index_str = params.find(OPTION_INDEX); if (index_str != NULL) index = atoi(index_str->c_str()); // process text input - astring *text_str = params.find(OPTION_VALUE_TEXT); - astring text; + std::string *text_str = params.find(OPTION_VALUE_TEXT); + std::string text; if (text_str != NULL) { text = *text_str; - if (text[0] == '"' && text[text.len() - 1] == '"') - text.substr(1, text.len() - 2); + if (text[0] == '"' && text[text.length() - 1] == '"') + text.substr(1, text.length() - 2); } // process file input - astring *file_str = params.find(OPTION_VALUE_FILE); + std::string *file_str = params.find(OPTION_VALUE_FILE); dynamic_buffer file; if (file_str != NULL) { @@ -2690,7 +2694,7 @@ static void do_add_metadata(parameters_t ¶ms) flags &= ~CHD_MDFLAGS_CHECKSUM; // print some info - astring tempstr; + std::string tempstr; printf("Input file: %s\n", params.find(OPTION_INPUT)->c_str()); printf("Tag: %c%c%c%c\n", (tag >> 24) & 0xff, (tag >> 16) & 0xff, (tag >> 8) & 0xff, tag & 0xff); printf("Index: %d\n", index); @@ -2725,21 +2729,21 @@ static void do_del_metadata(parameters_t ¶ms) // process tag chd_metadata_tag tag = CHD_MAKE_TAG('?','?','?','?'); - astring *tag_str = params.find(OPTION_TAG); + std::string *tag_str = params.find(OPTION_TAG); if (tag_str != NULL) { - tag_str->cat(" "); + tag_str->append(" "); tag = CHD_MAKE_TAG((*tag_str)[0], (*tag_str)[1], (*tag_str)[2], (*tag_str)[3]); } // process index UINT32 index = 0; - astring *index_str = params.find(OPTION_INDEX); + std::string *index_str = params.find(OPTION_INDEX); if (index_str != NULL) index = atoi(index_str->c_str()); // print some info - astring tempstr; + std::string tempstr; printf("Input file: %s\n", params.find(OPTION_INPUT)->c_str()); printf("Tag: %c%c%c%c\n", (tag >> 24) & 0xff, (tag >> 16) & 0xff, (tag >> 8) & 0xff, tag & 0xff); printf("Index: %d\n", index); @@ -2765,22 +2769,22 @@ static void do_dump_metadata(parameters_t ¶ms) parse_input_chd_parameters(params, input_chd, input_parent_chd); // verify output file doesn't exist - astring *output_file_str = params.find(OPTION_OUTPUT); + std::string *output_file_str = params.find(OPTION_OUTPUT); if (output_file_str != NULL) check_existing_output_file(params, output_file_str->c_str()); // process tag chd_metadata_tag tag = CHD_MAKE_TAG('?','?','?','?'); - astring *tag_str = params.find(OPTION_TAG); + std::string *tag_str = params.find(OPTION_TAG); if (tag_str != NULL) { - tag_str->cat(" "); + tag_str->append(" "); tag = CHD_MAKE_TAG((*tag_str)[0], (*tag_str)[1], (*tag_str)[2], (*tag_str)[3]); } // process index UINT32 index = 0; - astring *index_str = params.find(OPTION_INDEX); + std::string *index_str = params.find(OPTION_INDEX); if (index_str != NULL) index = atoi(index_str->c_str()); @@ -2808,7 +2812,7 @@ static void do_dump_metadata(parameters_t ¶ms) core_fclose(output_file); // provide some feedback - astring tempstr; + std::string tempstr; printf("File (%s) written, %s bytes\n", output_file_str->c_str(), big_int_string(tempstr, buffer.size())); } @@ -2864,7 +2868,7 @@ int CLIB_DECL main(int argc, char *argv[]) return print_help(argv[0], desc); // otherwise, verify the parameters - tagmap_t<astring *> parameters; + tagmap_t<std::string *> parameters; while (argnum < argc) { // should be an option name @@ -2905,7 +2909,7 @@ int CLIB_DECL main(int argc, char *argv[]) } // add to the map - if (parameters.add(odesc.name, new astring(param)) == TMERR_DUPLICATE) + if (parameters.add(odesc.name, new std::string(param)) == TMERR_DUPLICATE) return print_help(argv[0], desc, "Multiple parameters of the same type specified"); break; } diff --git a/src/tools/ldresample.c b/src/tools/ldresample.c index 26266f064ae..d22fcd7a4a9 100644 --- a/src/tools/ldresample.c +++ b/src/tools/ldresample.c @@ -167,7 +167,7 @@ static chd_error open_chd(chd_file &file, const char *filename, movie_info &info } // get the metadata - astring metadata; + std::string metadata; chderr = file.read_metadata(AV_METADATA_TAG, 0, metadata); if (chderr != CHDERR_NONE) { diff --git a/src/tools/ldverify.c b/src/tools/ldverify.c index 80094128265..020e611181c 100644 --- a/src/tools/ldverify.c +++ b/src/tools/ldverify.c @@ -183,7 +183,7 @@ static void *open_chd(const char *filename, movie_info &info) } // get the metadata - astring metadata; + std::string metadata; chderr = chd->read_metadata(AV_METADATA_TAG, 0, metadata); if (chderr != CHDERR_NONE) { diff --git a/src/tools/nltool.c b/src/tools/nltool.c index 109453581eb..b4fa261e0a7 100644 --- a/src/tools/nltool.c +++ b/src/tools/nltool.c @@ -12,7 +12,6 @@ #include <ctype.h> #include <sstream> #include <assert.h> -#include "astring.h" #include "corefile.h" #include "corestr.h" #include "sha1.h" @@ -205,7 +204,7 @@ private: void usage(core_options &opts) { - astring buffer; + std::string buffer; fprintf(stderr, "Usage:\n" " nltool -help\n" @@ -298,7 +297,7 @@ int main(int argc, char *argv[]) { //int result; core_options opts(oplist); - astring aerror(""); + std::string aerror(""); fprintf(stderr, "%s", "WARNING: This is Work In Progress! - It may fail anytime\n"); if (!opts.parse_command_line(argc, argv, OPTION_PRIORITY_DEFAULT, aerror)) diff --git a/src/tools/pngcmp.c b/src/tools/pngcmp.c index 3fa7e8ba724..4b0974d824f 100644 --- a/src/tools/pngcmp.c +++ b/src/tools/pngcmp.c @@ -28,7 +28,7 @@ PROTOTYPES ***************************************************************************/ -static int generate_png_diff(const astring& imgfile1, const astring& imgfile2, const astring& outfilename); +static int generate_png_diff(const std::string& imgfile1, const std::string& imgfile2, const std::string& outfilename); /*************************************************************************** MAIN @@ -46,9 +46,9 @@ int main(int argc, char *argv[]) fprintf(stderr, "Usage:\npngcmp <image1> <image2> <outfile>\n"); return 10; } - astring imgfilename1(argv[1]); - astring imgfilename2(argv[2]); - astring outfilename(argv[3]); + std::string imgfilename1(argv[1]); + std::string imgfilename2(argv[2]); + std::string outfilename(argv[3]); try { return generate_png_diff(imgfilename1, imgfilename2, outfilename); @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) side with a third set of differences -------------------------------------------------*/ -static int generate_png_diff(const astring& imgfile1, const astring& imgfile2, const astring& outfilename) +static int generate_png_diff(const std::string& imgfile1, const std::string& imgfile2, const std::string& outfilename) { bitmap_argb32 bitmap1; bitmap_argb32 bitmap2; diff --git a/src/tools/regrep.c b/src/tools/regrep.c index c6b27f99192..8c2beddf0ed 100644 --- a/src/tools/regrep.c +++ b/src/tools/regrep.c @@ -63,7 +63,7 @@ struct summary_file char source[100]; UINT8 status[MAX_COMPARES]; UINT8 matchbitmap[MAX_COMPARES]; - astring text[MAX_COMPARES]; + std::string text[MAX_COMPARES]; }; @@ -148,15 +148,15 @@ static int CLIB_DECL compare_file(const void *file0ptr, const void *file1ptr); static summary_file *sort_file_list(void); /* HTML helpers */ -static core_file *create_file_and_output_header(astring &filename, astring &templatefile, astring &title); -static void output_footer_and_close_file(core_file *file, astring &templatefile, astring &title); +static core_file *create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &title); +static void output_footer_and_close_file(core_file *file, std::string &templatefile, std::string &title); /* report generators */ -static void output_report(astring &dirname, astring &tempheader, astring &tempfooter, summary_file *filelist); +static void output_report(std::string &dirname, std::string &tempheader, std::string &tempfooter, summary_file *filelist); static int compare_screenshots(summary_file *curfile); -static int generate_png_diff(const summary_file *curfile, astring &destdir, const char *destname); -static void create_linked_file(astring &dirname, const summary_file *curfile, const summary_file *prevfile, const summary_file *nextfile, const char *pngfile, astring &tempheader, astring &tempfooter); -static void append_driver_list_table(const char *header, astring &dirname, core_file *indexfile, const summary_file *listhead, astring &tempheader, astring &tempfooter); +static int generate_png_diff(const summary_file *curfile, std::string &destdir, const char *destname); +static void create_linked_file(std::string &dirname, const summary_file *curfile, const summary_file *prevfile, const summary_file *nextfile, const char *pngfile, std::string &tempheader, std::string &tempfooter); +static void append_driver_list_table(const char *header, std::string &dirname, core_file *indexfile, const summary_file *listhead, std::string &tempheader, std::string &tempfooter); @@ -229,33 +229,33 @@ int main(int argc, char *argv[]) fprintf(stderr, "Usage:\nregrep <template> <outputdir> <summary1> [<summary2> [<summary3> ...]]\n"); return 1; } - astring tempfilename(argv[1]); - astring dirname(argv[2]); + std::string tempfilename(argv[1]); + std::string dirname(argv[2]); list_count = argc - 3; /* read the template file into an astring */ - astring tempheader; + std::string tempheader; if (core_fload(tempfilename.c_str(), &buffer, &bufsize) == FILERR_NONE) { - tempheader.cpy((const char *)buffer, bufsize); + tempheader.assign((const char *)buffer, bufsize); osd_free(buffer); } /* verify the template */ - if (tempheader.len() == 0) + if (tempheader.length() == 0) { fprintf(stderr, "Unable to read template file\n"); return 1; } - result = tempheader.find(0, "<!--CONTENT-->"); + result = tempheader.find("<!--CONTENT-->"); if (result == -1) { fprintf(stderr, "Template is missing a <!--CONTENT--> marker\n"); return 1; } - astring tempfooter(tempheader); - tempfooter.substr(result + 14); - tempheader.substr(0, result); + std::string tempfooter(tempheader); + tempfooter = tempfooter.substr(result + 14); + tempfooter = tempheader.substr(0, result); /* loop over arguments and read the files */ for (listnum = 0; listnum < list_count; listnum++) @@ -403,7 +403,7 @@ static int read_summary_log(const char *filename, int index) continue; /* append our text */ - curfile->text[index].cat(linestart); + curfile->text[index].append(linestart); } } @@ -460,7 +460,7 @@ static summary_file *parse_driver_tag(char *linestart, int index) /* clear out any old status for this file */ curfile->status[index] = STATUS_NOT_PRESENT; - curfile->text[index].reset(); + curfile->text[index].clear(); /* strip leading/trailing spaces from the status */ colon = trim_string(colon + 1); @@ -560,7 +560,7 @@ static summary_file *sort_file_list(void) HTML file with a standard header -------------------------------------------------*/ -static core_file *create_file_and_output_header(astring &filename, astring &templatefile, astring &title) +static core_file *create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &title) { core_file *file; @@ -569,9 +569,9 @@ static core_file *create_file_and_output_header(astring &filename, astring &temp return NULL; /* print a header */ - astring modified(templatefile); - modified.replace("<!--TITLE-->", title.c_str()); - core_fwrite(file, modified.c_str(), modified.len()); + std::string modified(templatefile); + strreplace(modified, "<!--TITLE-->", title.c_str()); + core_fwrite(file, modified.c_str(), modified.length()); /* return the file */ return file; @@ -583,11 +583,11 @@ static core_file *create_file_and_output_header(astring &filename, astring &temp standard footer to an HTML file and close it -------------------------------------------------*/ -static void output_footer_and_close_file(core_file *file, astring &templatefile, astring &title) +static void output_footer_and_close_file(core_file *file, std::string &templatefile, std::string &title) { - astring modified(templatefile); - modified.replace(0, "<!--TITLE-->", title.c_str()); - core_fwrite(file, modified.c_str(), modified.len()); + std::string modified(templatefile); + strreplace(modified, "<!--TITLE-->", title.c_str()); + core_fwrite(file, modified.c_str(), modified.length()); core_fclose(file); } @@ -602,12 +602,12 @@ static void output_footer_and_close_file(core_file *file, astring &templatefile, report HTML files -------------------------------------------------*/ -static void output_report(astring &dirname, astring &tempheader, astring &tempfooter, summary_file *filelist) +static void output_report(std::string &dirname, std::string &tempheader, std::string &tempfooter, summary_file *filelist) { summary_file *buckethead[BUCKET_COUNT], **buckettailptr[BUCKET_COUNT]; summary_file *curfile; - astring title("MAME Regressions"); - astring tempname; + std::string title("MAME Regressions"); + std::string tempname; int listnum, bucknum; core_file *indexfile; int count = 0, total; @@ -686,7 +686,7 @@ static void output_report(astring &dirname, astring &tempheader, astring &tempfo *buckettailptr[bucknum] = NULL; /* output header */ - tempname.printf("%s" PATH_SEPARATOR "%s", dirname.c_str(), "index.html"); + strprintf(tempname,"%s" PATH_SEPARATOR "%s", dirname.c_str(), "index.html"); indexfile = create_file_and_output_header(tempname, tempheader, title); if (indexfile == NULL) { @@ -727,12 +727,12 @@ static int compare_screenshots(summary_file *curfile) for (listnum = 0; listnum < list_count; listnum++) if (curfile->status[listnum] == STATUS_SUCCESS) { - astring fullname; + std::string fullname; file_error filerr; core_file *file; /* get the filename for the image */ - fullname.printf("%s" PATH_SEPARATOR "snap" PATH_SEPARATOR "%s" PATH_SEPARATOR "final.png", lists[listnum].dir, curfile->name); + strprintf(fullname,"%s" PATH_SEPARATOR "snap" PATH_SEPARATOR "%s" PATH_SEPARATOR "final.png", lists[listnum].dir, curfile->name); /* open the file */ filerr = core_fopen(fullname.c_str(), OPEN_FLAG_READ, &file); @@ -741,7 +741,7 @@ static int compare_screenshots(summary_file *curfile) if (filerr != FILERR_NONE) { /* get the filename for the image */ - fullname.printf("%s" PATH_SEPARATOR "snap" PATH_SEPARATOR "_%s.png", lists[listnum].dir, curfile->name); + strprintf(fullname, "%s" PATH_SEPARATOR "snap" PATH_SEPARATOR "_%s.png", lists[listnum].dir, curfile->name); /* open the file */ filerr = core_fopen(fullname.c_str(), OPEN_FLAG_READ, &file); @@ -826,12 +826,12 @@ static int compare_screenshots(summary_file *curfile) side with a third set of differences -------------------------------------------------*/ -static int generate_png_diff(const summary_file *curfile, astring &destdir, const char *destname) +static int generate_png_diff(const summary_file *curfile, std::string &destdir, const char *destname) { bitmap_argb32 bitmaps[MAX_COMPARES]; - astring srcimgname; - astring dstfilename; - astring tempname; + std::string srcimgname; + std::string dstfilename; + std::string tempname; bitmap_argb32 finalbitmap; int width, height, maxwidth; int bitmapcount = 0; @@ -843,14 +843,14 @@ static int generate_png_diff(const summary_file *curfile, astring &destdir, cons int starty; /* generate the common source filename */ - dstfilename.printf("%s" PATH_SEPARATOR "%s", destdir.c_str(), destname); - srcimgname.printf("snap" PATH_SEPARATOR "%s" PATH_SEPARATOR "final.png", curfile->name); + strprintf(dstfilename,"%s" PATH_SEPARATOR "%s", destdir.c_str(), destname); + strprintf(srcimgname,"snap" PATH_SEPARATOR "%s" PATH_SEPARATOR "final.png", curfile->name); /* open and load all unique bitmaps */ for (listnum = 0; listnum < list_count; listnum++) if (curfile->matchbitmap[listnum] == listnum) { - tempname.printf("%s" PATH_SEPARATOR "%s", lists[listnum].dir, srcimgname.c_str()); + strprintf(tempname, "%s" PATH_SEPARATOR "%s", lists[listnum].dir, srcimgname.c_str()); /* open the source image */ filerr = core_fopen(tempname.c_str(), OPEN_FLAG_READ, &file); @@ -948,20 +948,20 @@ error: file between differing versions -------------------------------------------------*/ -static void create_linked_file(astring &dirname, const summary_file *curfile, const summary_file *prevfile, const summary_file *nextfile, const char *pngfile, astring &tempheader, astring &tempfooter) +static void create_linked_file(std::string &dirname, const summary_file *curfile, const summary_file *prevfile, const summary_file *nextfile, const char *pngfile, std::string &tempheader, std::string &tempfooter) { - astring linkname; - astring filename; - astring title; + std::string linkname; + std::string filename; + std::string title; core_file *linkfile; int listnum; /* create the filename */ - filename.printf("%s.html", curfile->name); + strprintf(filename,"%s.html", curfile->name); /* output header */ - title.printf("%s Regressions (%s)", curfile->name, curfile->source); - linkname.printf("%s" PATH_SEPARATOR "%s", dirname.c_str(), filename.c_str()); + strprintf(title, "%s Regressions (%s)", curfile->name, curfile->source); + strprintf(linkname,"%s" PATH_SEPARATOR "%s", dirname.c_str(), filename.c_str()); linkfile = create_file_and_output_header(linkname, tempheader, title); if (linkfile == NULL) { @@ -998,7 +998,7 @@ static void create_linked_file(astring &dirname, const summary_file *curfile, co if (imageindex != -1) core_fprintf(linkfile, " [%d]", imageindex); core_fprintf(linkfile, "\t</p>\n"); - if (curfile->text[listnum].len() != 0) + if (curfile->text[listnum].length() != 0) { core_fprintf(linkfile, "\t<p>\n"); core_fprintf(linkfile, "\t<b>Errors:</b>\n"); @@ -1026,7 +1026,7 @@ static void create_linked_file(astring &dirname, const summary_file *curfile, co of drivers from a list to an HTML file -------------------------------------------------*/ -static void append_driver_list_table(const char *header, astring &dirname, core_file *indexfile, const summary_file *listhead, astring &tempheader, astring &tempfooter) +static void append_driver_list_table(const char *header, std::string &dirname, core_file *indexfile, const summary_file *listhead, std::string &tempheader, std::string &tempfooter) { const summary_file *curfile, *prevfile; int width = 100 / (2 + list_count); diff --git a/src/tools/split.c b/src/tools/split.c index 4e3d93c8bb8..302bc6d8d7f 100644 --- a/src/tools/split.c +++ b/src/tools/split.c @@ -13,7 +13,6 @@ #include <string.h> #include <ctype.h> #include <assert.h> -#include "astring.h" #include "corefile.h" #include "corestr.h" #include "sha1.h" @@ -33,7 +32,7 @@ hash over a buffer and return a string -------------------------------------------------*/ -static void compute_hash_as_string(astring &buffer, void *data, UINT32 length) +static void compute_hash_as_string(std::string &buffer, void *data, UINT32 length) { char expanded[SHA1_DIGEST_SIZE * 2]; UINT8 sha1digest[SHA1_DIGEST_SIZE]; @@ -54,7 +53,7 @@ static void compute_hash_as_string(astring &buffer, void *data, UINT32 length) } // copy it to the buffer - buffer.cpy(expanded, sizeof(expanded)); + buffer.assign(expanded, sizeof(expanded)); } @@ -64,9 +63,9 @@ static void compute_hash_as_string(astring &buffer, void *data, UINT32 length) static int split_file(const char *filename, const char *basename, UINT32 splitsize) { - astring outfilename, basefilename, splitfilename; + std::string outfilename, basefilename, splitfilename; core_file *outfile = NULL, *infile = NULL, *splitfile = NULL; - astring computedhash; + std::string computedhash; void *splitbuffer = NULL; int index, partnum; UINT64 totallength; @@ -111,13 +110,13 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi } // find the base name of the file - basefilename.cpy(basename); - index = basefilename.rchr(0, PATH_SEPARATOR[0]); + basefilename.assign(basename); + index = basefilename.find_last_of(PATH_SEPARATOR[0]); if (index != -1) - basefilename.del(0, index + 1); + basefilename.erase(0, index + 1); // compute the split filename - splitfilename.cpy(basename).cat(".split"); + splitfilename.assign(basename).append(".split"); // create the split file filerr = core_fopen(splitfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_NO_BOM, &splitfile); @@ -153,7 +152,7 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi core_fprintf(splitfile, "hash=%s file=%s.%03d\n", computedhash.c_str(), basefilename.c_str(), partnum); // compute the full filename for this guy - outfilename.printf("%s.%03d", basename, partnum); + strprintf(outfilename,"%s.%03d", basename, partnum); // create it filerr = core_fopen(outfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &outfile); @@ -216,9 +215,9 @@ cleanup: static int join_file(const char *filename, const char *outname, int write_output) { - astring expectedhash, computedhash; - astring outfilename, infilename; - astring basepath; + std::string expectedhash, computedhash; + std::string outfilename, infilename; + std::string basepath; core_file *outfile = NULL, *infile = NULL, *splitfile = NULL; void *splitbuffer = NULL; file_error filerr; @@ -241,21 +240,22 @@ static int join_file(const char *filename, const char *outname, int write_output fprintf(stderr, "Fatal error: corrupt or incomplete split file at line:\n%s\n", buffer); goto cleanup; } - outfilename.cpy(buffer + 10).trimspace(); + outfilename.assign(buffer + 10); + strtrimspace(outfilename); // compute the base path - basepath.cpy(filename); - index = basepath.rchr(0, PATH_SEPARATOR[0]); + basepath.assign(filename); + index = basepath.find_last_of(PATH_SEPARATOR[0]); if (index != -1) - basepath.del(index + 1); + basepath.erase(index + 1); else - basepath.reset(); + basepath.clear(); // override the output filename if specified, otherwise prepend the path if (outname != NULL) - outfilename.cpy(outname); + outfilename.assign(outname); else - outfilename.ins(0, basepath); + outfilename.insert(0, basepath); // read the split size if (!core_fgets(buffer, sizeof(buffer), splitfile) || sscanf(buffer, "splitsize=%d", &splitsize) != 1) @@ -299,13 +299,14 @@ static int join_file(const char *filename, const char *outname, int write_output fprintf(stderr, "Fatal error: corrupt or incomplete split file at line:\n%s\n", buffer); goto cleanup; } - expectedhash.cpy(buffer + 5, SHA1_DIGEST_SIZE * 2); - infilename.cpy(buffer + 5 + SHA1_DIGEST_SIZE * 2 + 6).trimspace(); + expectedhash.assign(buffer + 5, SHA1_DIGEST_SIZE * 2); + infilename.assign(buffer + 5 + SHA1_DIGEST_SIZE * 2 + 6); + strtrimspace(infilename); printf(" Reading file '%s'...", infilename.c_str()); // read the file's contents - infilename.ins(0, basepath); + infilename.insert(0, basepath); filerr = core_fload(infilename.c_str(), &splitbuffer, &length); if (filerr != FILERR_NONE) { @@ -318,7 +319,7 @@ static int join_file(const char *filename, const char *outname, int write_output compute_hash_as_string(computedhash, splitbuffer, length); // compare - if (computedhash != expectedhash) + if (computedhash.compare(expectedhash)!=0) { printf("\n"); fprintf(stderr, "Fatal error: file '%s' has incorrect hash\n Expected: %s\n Computed: %s\n", infilename.c_str(), expectedhash.c_str(), computedhash.c_str()); diff --git a/src/tools/src2html.c b/src/tools/src2html.c index 33dd77604f4..91780cd2fc6 100644 --- a/src/tools/src2html.c +++ b/src/tools/src2html.c @@ -21,7 +21,7 @@ #include <ctype.h> #include <assert.h> #include "osdcore.h" -#include "astring.h" +#include "corestr.h" #include "corefile.h" @@ -66,14 +66,14 @@ struct token_entry struct include_path { include_path * next; - astring path; + std::string path; }; struct list_entry { list_entry * next; - astring name; + std::string name; }; @@ -202,17 +202,17 @@ static const token_entry c_token_table[] = ***************************************************************************/ // core output functions -static int recurse_dir(int srcrootlen, int dstrootlen, astring &srcdir, astring &dstdir, astring &tempheader, astring &tempfooter); -static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &srcfile, astring &dstfile, bool link_to_file, astring &tempheader, astring &tempfooter); +static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std::string &dstdir, std::string &tempheader, std::string &tempfooter); +static int output_file(file_type type, int srcrootlen, int dstrootlen, std::string &srcfile, std::string &dstfile, bool link_to_file, std::string &tempheader, std::string &tempfooter); // HTML helpers -static core_file *create_file_and_output_header(astring &filename, astring &templatefile, astring &path); -static void output_footer_and_close_file(core_file *file, astring &templatefile, astring &path); +static core_file *create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &path); +static void output_footer_and_close_file(core_file *file, std::string &templatefile, std::string &path); // path helpers -static astring &normalized_subpath(astring &dest, astring &path, int start); -static void output_path_as_links(core_file *file, astring &path, bool end_is_directory, bool link_to_file); -static bool find_include_file(astring &srcincpath, int srcrootlen, int dstrootlen, astring &srcfile, astring &dstfile, astring &filename); +static std::string &normalized_subpath(std::string &dest, std::string &path, int start); +static void output_path_as_links(core_file *file, std::string &path, bool end_is_directory, bool link_to_file); +static bool find_include_file(std::string &srcincpath, int srcrootlen, int dstrootlen, std::string &srcfile, std::string &dstfile, std::string &filename); @@ -234,7 +234,7 @@ int main(int argc, char *argv[]) { // loop over arguments include_path **incpathhead = &incpaths; - astring srcdir, dstdir, tempfilename, tempheader, tempfooter; + std::string srcdir, dstdir, tempfilename, tempheader, tempfooter; int unadorned = 0; for (int argnum = 1; argnum < argc; argnum++) { @@ -247,7 +247,7 @@ int main(int argc, char *argv[]) if (*incpathhead != NULL) { (*incpathhead)->next = NULL; - (*incpathhead)->path.cpy(&arg[2]).replacechr('/', PATH_SEPARATOR[0]); + strreplacechr((*incpathhead)->path.assign(&arg[2]), '/', PATH_SEPARATOR[0]); incpathhead = &(*incpathhead)->next; } } @@ -255,17 +255,17 @@ int main(int argc, char *argv[]) // other parameter else if (arg[0] != '-' && unadorned == 0) { - srcdir.cpy(arg); + srcdir.assign(arg); unadorned++; } else if (arg[0] != '-' && unadorned == 1) { - dstdir.cpy(arg); + dstdir.assign(arg); unadorned++; } else if (arg[0] != '-' && unadorned == 2) { - tempfilename.cpy(arg); + tempfilename.assign(arg); unadorned++; } else @@ -273,35 +273,35 @@ int main(int argc, char *argv[]) } // make sure we got 3 parameters - if (srcdir.len() == 0 || dstdir.len() == 0 || tempfilename.len() == 0) + if (srcdir.length() == 0 || dstdir.length() == 0 || tempfilename.length() == 0) usage(argv[0]); - // read the template file into an astring + // read the template file into an std::string UINT32 bufsize; void *buffer; if (core_fload(tempfilename.c_str(), &buffer, &bufsize) == FILERR_NONE) { - tempheader.cpy((const char *)buffer, bufsize); + tempheader.assign((const char *)buffer, bufsize); osd_free(buffer); } // verify the template - if (tempheader.len() == 0) + if (tempheader.length() == 0) { fprintf(stderr, "Unable to read template file\n"); return 1; } - int result = tempheader.find(0, "<!--CONTENT-->"); + int result = tempheader.find("<!--CONTENT-->"); if (result == -1) { fprintf(stderr, "Template is missing a <!--CONTENT--> marker\n"); return 1; } - tempfooter.cpy(tempheader).substr(result + 14, -1); + tempfooter.assign(tempheader).substr(result + 14, -1); tempheader.substr(0, result); // recurse over subdirectories - return recurse_dir(srcdir.len(), dstdir.len(), srcdir, dstdir, tempheader, tempfooter); + return recurse_dir(srcdir.length(), dstdir.length(), srcdir, dstdir, tempheader, tempfooter); } @@ -314,7 +314,7 @@ static int compare_list_entries(const void *p1, const void *p2) { const list_entry *entry1 = *(const list_entry **)p1; const list_entry *entry2 = *(const list_entry **)p2; - return entry1->name.cmp(entry2->name); + return entry1->name.compare(entry2->name); } @@ -322,17 +322,17 @@ static int compare_list_entries(const void *p1, const void *p2) recurse_dir - recurse through a directory -------------------------------------------------*/ -static int recurse_dir(int srcrootlen, int dstrootlen, astring &srcdir, astring &dstdir, astring &tempheader, astring &tempfooter) +static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std::string &dstdir, std::string &tempheader, std::string &tempfooter) { static const osd_dir_entry_type typelist[] = { ENTTYPE_DIR, ENTTYPE_FILE }; // extract a normalized subpath - astring srcdir_subpath; + std::string srcdir_subpath; normalized_subpath(srcdir_subpath, srcdir, srcrootlen + 1); // create an index file - astring indexname; - indexname.printf("%s%c%s", dstdir.c_str(), PATH_SEPARATOR[0], "index.html"); + std::string indexname; + strprintf(indexname,"%s%c%s", dstdir.c_str(), PATH_SEPARATOR[0], "index.html"); core_file *indexfile = create_file_and_output_header(indexname, tempheader, srcdir_subpath); // output the directory navigation @@ -362,7 +362,7 @@ static int recurse_dir(int srcrootlen, int dstrootlen, astring &srcdir, astring if (entry->type == entry_type && entry->name[0] != '.') { list_entry *lentry = new list_entry; - lentry->name.cpy(entry->name); + lentry->name.assign(entry->name); lentry->next = list; list = lentry; found++; @@ -401,11 +401,11 @@ static int recurse_dir(int srcrootlen, int dstrootlen, astring &srcdir, astring core_fprintf(indexfile, "\t<h2>%s</h2>\n\t<ul>\n", (entry_type == ENTTYPE_DIR) ? "Directories" : "Files"); // build the source filename - astring srcfile; - srcfile.printf("%s%c%s", srcdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str()); + std::string srcfile; + strprintf(srcfile, "%s%c%s", srcdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str()); // if we have a file, output it - astring dstfile; + std::string dstfile; if (entry_type == ENTTYPE_FILE) { // make sure we care, first @@ -420,17 +420,17 @@ static int recurse_dir(int srcrootlen, int dstrootlen, astring &srcdir, astring // if we got a valid file, process it if (type != FILE_TYPE_INVALID) { - dstfile.printf("%s%c%s.html", dstdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str()); + strprintf(dstfile, "%s%c%s.html", dstdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str()); if (indexfile != NULL) core_fprintf(indexfile, "\t<li><a href=\"%s.html\">%s</a></li>\n", curlist->name.c_str(), curlist->name.c_str()); - result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile, srcdir == dstdir, tempheader, tempfooter); + result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile, srcdir.compare(dstdir) == 0, tempheader, tempfooter); } } // if we have a directory, recurse else { - dstfile.printf("%s%c%s", dstdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str()); + strprintf(dstfile, "%s%c%s", dstdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str()); if (indexfile != NULL) core_fprintf(indexfile, "\t<li><a href=\"%s/index.html\">%s/</a></li>\n", curlist->name.c_str(), curlist->name.c_str()); result = recurse_dir(srcrootlen, dstrootlen, srcfile, dstfile, tempheader, tempfooter); @@ -461,10 +461,10 @@ static int recurse_dir(int srcrootlen, int dstrootlen, astring &srcdir, astring HTML -------------------------------------------------*/ -static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &srcfile, astring &dstfile, bool link_to_file, astring &tempheader, astring &tempfooter) +static int output_file(file_type type, int srcrootlen, int dstrootlen, std::string &srcfile, std::string &dstfile, bool link_to_file, std::string &tempheader, std::string &tempfooter) { // extract a normalized subpath - astring srcfile_subpath; + std::string srcfile_subpath; normalized_subpath(srcfile_subpath, srcfile, srcrootlen + 1); fprintf(stderr, "Processing %s\n", srcfile_subpath.c_str()); @@ -547,8 +547,8 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & while (core_fgets(srcline, ARRAY_LENGTH(srcline), src) != NULL) { // start with the line number - astring dstline; - dstline.catprintf("<span class=\"linenum\">%5d</span> ", linenum++); + std::string dstline; + strcatprintf(dstline, "<span class=\"linenum\">%5d</span> ", linenum++); // iterate over characters in the source line bool escape = false; @@ -568,7 +568,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & { if (!in_comment && ch == comment_start[0] && strncmp(srcptr - 1, comment_start, strlen(comment_start)) == 0) { - dstline.catprintf("<span class=\"comment\">%s", comment_start_esc); + strcatprintf(dstline, "<span class=\"comment\">%s", comment_start_esc); curcol += strlen(comment_start); srcptr += strlen(comment_start) - 1; ch = 0; @@ -576,7 +576,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & } else if (in_comment && ch == comment_end[0] && strncmp(srcptr - 1, comment_end, strlen(comment_end)) == 0) { - dstline.catprintf("%s</span>", comment_end_esc); + strcatprintf(dstline, "%s</span>", comment_end_esc); curcol += strlen(comment_end); srcptr += strlen(comment_end) - 1; ch = 0; @@ -587,7 +587,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & // track whether or not we are within an inline (C++-style) comment if (!in_quotes && !in_comment && !in_inline_comment && ch == comment_inline[0] && strncmp(srcptr - 1, comment_inline, strlen(comment_inline)) == 0) { - dstline.catprintf("<span class=\"comment\">%s", comment_inline_esc); + strcatprintf(dstline, "<span class=\"comment\">%s", comment_inline_esc); curcol += strlen(comment_inline); srcptr += strlen(comment_inline) - 1; ch = 0; @@ -611,7 +611,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & for (curtoken = token_table; curtoken->token != NULL; curtoken++) if (strncmp(srcptr - 1, curtoken->token, toklength) == 0 && strlen(curtoken->token) == toklength) { - dstline.catprintf("<span class=\"%s\">%s</span>", curtoken->color, curtoken->token); + strcatprintf(dstline, "<span class=\"%s\">%s</span>", curtoken->color, curtoken->token); curcol += strlen(curtoken->token); srcptr += strlen(curtoken->token) - 1; ch = 0; @@ -631,7 +631,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & int spaces = 4 - curcol % 4; while (spaces--) { - dstline.cat(' '); + dstline.push_back(' '); curcol++; } } @@ -643,9 +643,9 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & if (!in_comment && !in_inline_comment && !in_quotes && (ch == '"' || ch == '\'')) { if (color_quotes) - dstline.catprintf("<span class=\"string\">%c", ch); + strcatprintf(dstline, "<span class=\"string\">%c", ch); else - dstline.cat(ch); + dstline.push_back(ch); in_quotes = true; curquote = ch; @@ -655,11 +655,11 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & char *endquote = strchr(srcptr, ch); if (endquote != NULL) { - astring filename(srcptr, endquote - srcptr); - astring target; + std::string filename(srcptr, endquote - srcptr); + std::string target; if (find_include_file(target, srcrootlen, dstrootlen, srcfile, dstfile, filename)) { - dstline.catprintf("<a href=\"%s\">", target.c_str()); + strcatprintf(dstline, "<a href=\"%s\">", target.c_str()); quotes_are_linked = true; } } @@ -670,11 +670,11 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & else if (!in_comment && !in_inline_comment && in_quotes && (ch == curquote) && !escape) { if (quotes_are_linked) - dstline.catprintf("</a>"); + dstline.append("</a>"); if (color_quotes) - dstline.catprintf("%c</span>", ch); + strcatprintf(dstline, "%c</span>", ch); else - dstline.cat(ch); + dstline.push_back(ch); in_quotes = false; curquote = 0; quotes_are_linked = false; @@ -682,13 +682,13 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & // else just output the current character else if (ch == '&') - dstline.catprintf("&"); + dstline.append("&"); else if (ch == '<') - dstline.catprintf("<"); + dstline.append("<"); else if (ch == '>') - dstline.catprintf(">"); + dstline.append(">"); else - dstline.cat(ch); + dstline.push_back(ch); curcol++; } @@ -700,12 +700,12 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & // finish inline comments if (in_inline_comment) { - dstline.catprintf("</span>"); + dstline.append("</span>"); in_inline_comment = false; } // append a break and move on - dstline.catprintf("\n"); + dstline.append("\n"); core_fputs(dst, dstline.c_str()); } @@ -729,7 +729,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring & HTML file with a standard header -------------------------------------------------*/ -static core_file *create_file_and_output_header(astring &filename, astring &templatefile, astring &path) +static core_file *create_file_and_output_header(std::string &filename, std::string &templatefile, std::string &path) { // create the indexfile core_file *file; @@ -737,9 +737,9 @@ static core_file *create_file_and_output_header(astring &filename, astring &temp return NULL; // print a header - astring modified(templatefile); - modified.replace(0, "<!--PATH-->", path.c_str()); - core_fwrite(file, modified.c_str(), modified.len()); + std::string modified(templatefile); + strreplace(modified, "<!--PATH-->", path.c_str()); + core_fwrite(file, modified.c_str(), modified.length()); // return the file return file; @@ -751,11 +751,11 @@ static core_file *create_file_and_output_header(astring &filename, astring &temp standard footer to an HTML file and close it -------------------------------------------------*/ -static void output_footer_and_close_file(core_file *file, astring &templatefile, astring &path) +static void output_footer_and_close_file(core_file *file, std::string &templatefile, std::string &path) { - astring modified(templatefile); - modified.replace(0, "<!--PATH-->", path.c_str()); - core_fwrite(file, modified.c_str(), modified.len()); + std::string modified(templatefile); + strreplace(modified, "<!--PATH-->", path.c_str()); + core_fwrite(file, modified.c_str(), modified.length()); core_fclose(file); } @@ -770,9 +770,10 @@ static void output_footer_and_close_file(core_file *file, astring &templatefile, forward slashes and extract a subpath -------------------------------------------------*/ -static astring &normalized_subpath(astring &dest, astring &path, int start) +static std::string &normalized_subpath(std::string &dest, std::string &path, int start) { - return dest.cpysubstr(path, start, -1).replacechr(PATH_SEPARATOR[0], '/'); + strreplacechr(dest.assign(path.substr(start, -1)),PATH_SEPARATOR[0], '/'); + return dest; } @@ -781,11 +782,11 @@ static astring &normalized_subpath(astring &dest, astring &path, int start) series of links -------------------------------------------------*/ -static void output_path_as_links(core_file *file, astring &path, bool end_is_directory, bool link_to_file) +static void output_path_as_links(core_file *file, std::string &path, bool end_is_directory, bool link_to_file) { // first count how deep we are int srcdepth = 0; - for (int slashindex = path.chr(0, '/'); slashindex != -1; slashindex = path.chr(slashindex + 1, '/')) + for (int slashindex = path.find_first_of('/'); slashindex != -1; slashindex = path.find_first_of('/', slashindex + 1)) srcdepth++; if (end_is_directory) srcdepth++; @@ -799,9 +800,9 @@ static void output_path_as_links(core_file *file, astring &path, bool end_is_dir // now output links to each path up the chain int curdepth = 0; int lastslash = 0; - for (int slashindex = path.chr(lastslash, '/'); slashindex != -1; slashindex = path.chr(lastslash, '/')) + for (int slashindex = path.find_first_of('/', lastslash); slashindex != -1; slashindex = path.find_first_of('/', lastslash)) { - astring substr(path, lastslash, slashindex - lastslash); + std::string substr(path, lastslash, slashindex - lastslash); curdepth++; core_fprintf(file, "<a href=\""); @@ -813,7 +814,7 @@ static void output_path_as_links(core_file *file, astring &path, bool end_is_dir } // and a final link to the current directory - astring substr(path, lastslash, -1); + std::string substr(path, lastslash, -1); if (end_is_directory) core_fprintf(file, "<a href=\"index.html\">%s</a>", substr.c_str()); else if (link_to_file) @@ -827,41 +828,41 @@ static void output_path_as_links(core_file *file, astring &path, bool end_is_dir find_include_file - find an include file -------------------------------------------------*/ -static bool find_include_file(astring &srcincpath, int srcrootlen, int dstrootlen, astring &srcfile, astring &dstfile, astring &filename) +static bool find_include_file(std::string &srcincpath, int srcrootlen, int dstrootlen, std::string &srcfile, std::string &dstfile, std::string &filename) { // iterate over include paths and find the file for (include_path *curpath = incpaths; curpath != NULL; curpath = curpath->next) { // a '.' include path is specially treated - if (curpath->path == ".") - srcincpath.cpysubstr(srcfile, 0, srcfile.rchr(0, PATH_SEPARATOR[0])); + if (curpath->path.compare(".") == 0) + srcincpath.assign(srcfile.substr(0, srcfile.find_last_of(PATH_SEPARATOR[0]))); else - srcincpath.cpysubstr(srcfile, 0, srcrootlen + 1).cat(curpath->path); + srcincpath.assign(srcfile.substr(0, srcrootlen + 1)).append(curpath->path); // append the filename piecemeal to account for directories int lastsepindex = 0; int sepindex; - while ((sepindex = filename.chr(lastsepindex, '/')) != -1) + while ((sepindex = filename.find_first_of('/', lastsepindex)) != -1) { // handle .. by removing a chunk from the incpath - astring pathpart(filename, lastsepindex, sepindex - lastsepindex); - if (pathpart == "..") + std::string pathpart(filename, lastsepindex, sepindex - lastsepindex); + if (pathpart.compare("..")==0) { - sepindex = srcincpath.rchr(0, PATH_SEPARATOR[0]); + sepindex = srcincpath.find_last_of(PATH_SEPARATOR[0]); if (sepindex != -1) srcincpath.substr(0, sepindex); } // otherwise, append a path separator and the pathpart else - srcincpath.cat(PATH_SEPARATOR).cat(pathpart); + srcincpath.append(PATH_SEPARATOR).append(pathpart); // advance past the previous index lastsepindex = sepindex + 1; } // now append the filename - srcincpath.cat(PATH_SEPARATOR).catsubstr(filename, lastsepindex, -1); + srcincpath.append(PATH_SEPARATOR).append(filename.substr(lastsepindex, -1)); // see if we can open it core_file *testfile; @@ -872,29 +873,30 @@ static bool find_include_file(astring &srcincpath, int srcrootlen, int dstrootle // find the longest matching directory substring between the include and source file lastsepindex = 0; - while ((sepindex = srcincpath.chr(lastsepindex, PATH_SEPARATOR[0])) != -1) + while ((sepindex = srcincpath.find_first_of(PATH_SEPARATOR[0], lastsepindex)) != -1) { // get substrings up to the current directory - astring tempfile(srcfile, 0, sepindex); - astring tempinc(srcincpath, 0, sepindex); + std::string tempfile(srcfile, 0, sepindex); + std::string tempinc(srcincpath, 0, sepindex); // if we don't match, stop - if (tempfile != tempinc) + if (tempfile.compare(tempinc)!=0) break; lastsepindex = sepindex + 1; } // chop off the common parts of the paths - astring tempfile(srcfile, lastsepindex, -1); - srcincpath.substr(lastsepindex, -1).replacechr(PATH_SEPARATOR[0], '/'); + std::string tempfile(srcfile, lastsepindex, -1); + srcincpath = srcincpath.substr(lastsepindex, -1); + strreplacechr(srcincpath, PATH_SEPARATOR[0], '/'); // for each directory left in the filename, we need to prepend a "../" - while ((sepindex = tempfile.chr(0, PATH_SEPARATOR[0])) != -1) + while ((sepindex = tempfile.find_first_of(PATH_SEPARATOR[0])) != -1) { tempfile.substr(sepindex + 1, -1); - srcincpath.ins(0, "../"); + srcincpath.insert(0, "../"); } - srcincpath.cat(".html"); + srcincpath.append(".html"); // free the strings and return the include path return true; diff --git a/src/ume/dummy.lst b/src/ume/dummy.lst new file mode 100644 index 00000000000..a7f56072e22 --- /dev/null +++ b/src/ume/dummy.lst @@ -0,0 +1,10 @@ +/****************************************************************************** + + dummy.lst + + List of all enabled drivers in the system. This file is parsed by + makelist.exe, sorted, and output as C code describing the drivers. + +******************************************************************************/ + +coleco diff --git a/src/version.c b/src/version.c index da26f7e0bbe..5a6d9acefbc 100644 --- a/src/version.c +++ b/src/version.c @@ -8,7 +8,7 @@ ***************************************************************************/ -#define BARE_BUILD_VERSION "0.160" +#define BARE_BUILD_VERSION "0.161" extern const char bare_build_version[]; extern const char build_version[]; |